Browse Source

use AC_ADD_ macros

experimetnal/RETURN_REF_PATCH
Stig Bakken 27 years ago
parent
commit
c901d4c528
  1. 30
      ext/gd/config.m4

30
ext/gd/config.m4

@ -7,7 +7,7 @@ AC_ARG_WITH(gd,
no)
AC_MSG_RESULT(no) ;;
yes)
GD_LIBS="-lgd"
AC_ADD_LIBRARY(-lgd)
AC_DEFINE(HAVE_LIBGD)
AC_MSG_RESULT(yes)
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
@ -15,12 +15,19 @@ AC_ARG_WITH(gd,
;;
*)
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/include/gd1.3/gd.h && GD_INCLUDE="$withval/include/gd1.3"
test -f $withval/include/gd/gd.h && GD_INCLUDE="$withval/include/gd"
test -f $withval/include/gd.h && GD_INCLUDE="$withval/include"
test -f $withval/gd1.3/gd.h && GD_INCLUDE="$withval/gd1.3"
test -f $withval/gd/gd.h && GD_INCLUDE="$withval/gd"
test -f $withval/gd.h && GD_INCLUDE="$withval"
test -f $withval/lib/libgd.so && GD_LIB="$withval/lib"
test -f $withval/lib/gd/libgd.so && GD_LIB="$withval/lib/gd"
test -f $withval/lib/gd1.3/libgd.so && GD_LIB="$withval/lib/gd1.3"
test -f $withval/libgd.so && GD_LIB="$withval"
test -f $withval/gd/libgd.so && GD_LIB="$withval/gd"
test -f $withval/gd1.3/libgd.so && GD_LIB="$withval/gd1.3"
test -f $withval/lib/libgd.a && GD_LIB="$withval/lib"
test -f $withval/lib/gd/libgd.a && GD_LIB="$withval/lib/gd"
@ -30,13 +37,13 @@ dnl A whole whack of possible places where this might be
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_ADD_LIBRARY_WITH_PATH(-lgd, $GD_LIB)
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_ERROR(Unable to find libgd.a anywhere under $withval)
AC_MSG_ERROR([Unable to find libgd.(a|so) anywhere under $withval])
fi ;;
esac
],[
@ -84,7 +91,7 @@ if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
fi
if test -f /usr/pkg/include/gd/gd.h -a -z "$GD_INCLUDE" ; then
GD_INCLUDE="-I/usr/pkg/include/gd"
GD_INCLUDE="/usr/pkg/include/gd"
fi
AC_MSG_CHECKING(whether to enable 4bit antialias hack with FreeType2)
@ -101,6 +108,5 @@ if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
])
PHP_EXTENSION(gd)
EXTRA_LIBS="$EXTRA_LIBS $GD_LIBS"
INCLUDES="$INCLUDES $GD_INCLUDE"
AC_ADD_INCLUDE($GD_INCLUDE)
fi
Loading…
Cancel
Save