php-src/ext/gd/config.m4
Stig Bakken 257de2bade First commit of re-structuring phase one. We have started using automake in
sub-directories and started to move extension code into ext/<name>.  For now,
I have moved the "standard" extension (which is quite a mix of everything
right now) and the GD extension into their own subdirs in ext/.
The configure script now also runs configure in the libzend directory
automatically and makes sure php4 and libzend use the same config.cache file.
To avoid running configure in libzend, use the --no-recursion option.
"make" in php4 also builds libzend now.
The Apache module doesn't compile right now, but a fix for that is
coming up.
1999-04-17 00:37:12 +00:00

55 lines
1.9 KiB
Plaintext

AC_MSG_CHECKING(whether to include GD support)
AC_ARG_WITH(gd,
[ --without-gd Disable GD support.
--with-gd[=DIR] Include GD support (DIR is GD's install dir).],
[
case "$withval" in
no)
AC_MSG_RESULT(no) ;;
yes)
GD_LIBS="-lgd"
AC_DEFINE(HAVE_LIBGD)
AC_MSG_RESULT(yes)
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
ac_cv_lib_gd_gdImageLine=yes
;;
*)
dnl A whole whack of possible places where this might be
test -f $withval/include/gd1.3/gd.h && GD_INCLUDE="-I$withval/include/gd1.3"
test -f $withval/include/gd/gd.h && GD_INCLUDE="-I$withval/include/gd"
test -f $withval/include/gd.h && GD_INCLUDE="-I$withval/include"
test -f $withval/gd1.3/gd.h && GD_INCLUDE="-I$withval/gd1.3"
test -f $withval/gd/gd.h && GD_INCLUDE="-I$withval/gd"
test -f $withval/gd.h && GD_INCLUDE="-I$withval"
test -f $withval/lib/libgd.a && GD_LIB="$withval/lib"
test -f $withval/lib/gd/libgd.a && GD_LIB="$withval/lib/gd"
test -f $withval/lib/gd1.3/libgd.a && GD_LIB="$withval/lib/gd1.3"
test -f $withval/libgd.a && GD_LIB="$withval"
test -f $withval/gd/libgd.a && GD_LIB="$withval/gd"
test -f $withval/gd1.3/libgd.a && GD_LIB="$withval/gd1.3"
if test -n "$GD_INCLUDE" && test -n "$GD_LIB" ; then
GD_LIBS="-L$GD_LIB -lgd"
AC_DEFINE(HAVE_LIBGD)
AC_MSG_RESULT(yes)
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
ac_cv_lib_gd_gdImageLine=yes
else
AC_MSG_RESULT(no)
fi ;;
esac
],[
AC_CHECK_LIB(gd, gdImageLine)
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
])
if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
if test -f /usr/pkg/include/gd/gd.h -a -z "$GD_INCLUDE" ; then
GD_INCLUDE="-I/usr/pkg/include/gd"
fi
AC_CHECK_LIB(ttf, TT_Open_Face)
PHP_EXTENSION(gd)
LIBS="$LIBS $GD_LIBS"
INCLUDE="$INCLUDE $GD_INCLUDE"
fi