cvs: php4 /ext/gd config.m4

From: Date: Tue, 23 Oct 2001 09:19:11 +0000
Subject: cvs: php4 /ext/gd config.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7959@lists.php.net to get a copy of this message
sniper Tue Oct 23 05:19:11 2001 EDT Modified files: /php4/ext/gd config.m4 Log: Support also --with-gd (without path). Please test this! Index: php4/ext/gd/config.m4 diff -u php4/ext/gd/config.m4:1.78 php4/ext/gd/config.m4:1.79 --- php4/ext/gd/config.m4:1.78 Tue Oct 23 04:52:14 2001 +++ php4/ext/gd/config.m4 Tue Oct 23 05:19:11 2001 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.78 2001/10/23 08:52:14 sniper Exp $ +dnl $Id: config.m4,v 1.79 2001/10/23 09:19:11 sniper Exp $ dnl AC_DEFUN(PHP_GD_JPEG,[ @@ -224,31 +224,29 @@ PHP_GD_FREETYPE1 PHP_GD_T1LIB - case $PHP_GD in - yes) - PHP_ADD_LIBRARY(gd,, GD_SHARED_LIBADD) - PHP_GD_CHECK_VERSION - AC_DEFINE(HAVE_LIBGD,1,[ ]) - ;; - *) -dnl A whole whack of possible places where these might be - for i in include/gd1.3 include/gd include gd1.3 gd ""; do - test -f $PHP_GD/$i/gd.h && GD_INCLUDE=$PHP_GD/$i - done - - for i in lib/gd1.3 lib/gd lib gd1.3 gd ""; do - test -f $PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME -o -f $PHP_GD/$i/libgd.a && GD_LIB=$PHP_GD/$i - done - - if test -n "$GD_INCLUDE" -a -n "$GD_LIB" ; then - PHP_ADD_LIBRARY_WITH_PATH(gd, $GD_LIB, GD_SHARED_LIBADD) - AC_DEFINE(HAVE_LIBGD,1,[ ]) - PHP_GD_CHECK_VERSION - else - AC_MSG_ERROR([Unable to find libgd.(a|so) anywhere under $withval]) - fi - ;; - esac + if test "$PHP_GD" = "yes"; then + GD_SEARCH_PATHS="/usr/local /usr" + else + GD_SEARCH_PATHS=$PHP_GD + fi + + for j in $GD_SEARCH_PATHS; do + for i in include/gd1.3 include/gd include gd1.3 gd ""; do + test -f $j/$i/gd.h && GD_INCLUDE=$j/$i + done + + for i in lib/gd1.3 lib/gd lib gd1.3 gd ""; do + test -f $j/$i/libgd.$SHLIB_SUFFIX_NAME -o -f $j/$i/libgd.a && GD_LIB=$j/$i + done + done + + if test -n "$GD_INCLUDE" -a -n "$GD_LIB" ; then + PHP_ADD_LIBRARY_WITH_PATH(gd, $GD_LIB, GD_SHARED_LIBADD) + AC_DEFINE(HAVE_LIBGD,1,[ ]) + PHP_GD_CHECK_VERSION + else + AC_MSG_ERROR([Unable to find libgd.(a|so) anywhere under $withval]) + fi dnl NetBSD package structure if test -f /usr/pkg/include/gd/gd.h -a -z "$GD_INCLUDE" ; then

« previous php.cvs (#7959) next »