diff options
author | foobar <sniper@php.net> | 2003-10-01 02:53:23 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2003-10-01 02:53:23 +0000 |
commit | dc080a5db6f31c5d174dc0cc097da509c2533142 (patch) | |
tree | 39482ab88773c67f3b569e6e34bdfc02f818aec2 | |
parent | 5b17050a79fff705bc446446d35525d776b78de7 (diff) | |
download | php-git-dc080a5db6f31c5d174dc0cc097da509c2533142.tar.gz |
- Always look into /usr/local before /usr
- Added breaks to make sure the preferred value is used.
-rw-r--r-- | ext/cpdf/config.m4 | 2 | ||||
-rw-r--r-- | ext/crack/config.m4 | 37 | ||||
-rw-r--r-- | ext/fbsql/config.m4 | 2 | ||||
-rw-r--r-- | ext/fdf/config.m4 | 2 | ||||
-rw-r--r-- | ext/gd/config.m4 | 26 | ||||
-rw-r--r-- | ext/gettext/config.m4 | 6 | ||||
-rw-r--r-- | ext/gmp/config.m4 | 9 | ||||
-rw-r--r-- | ext/imap/config.m4 | 7 | ||||
-rw-r--r-- | ext/mcrypt/config.m4 | 4 | ||||
-rw-r--r-- | ext/mhash/config.m4 | 10 | ||||
-rw-r--r-- | ext/ovrimos/config.m4 | 8 | ||||
-rw-r--r-- | ext/pfpro/config.m4 | 2 | ||||
-rw-r--r-- | ext/readline/config.m4 | 14 | ||||
-rw-r--r-- | ext/recode/config.m4 | 3 | ||||
-rw-r--r-- | ext/session/config.m4 | 4 | ||||
-rw-r--r-- | ext/xmlrpc/config.m4 | 4 |
16 files changed, 64 insertions, 76 deletions
diff --git a/ext/cpdf/config.m4 b/ext/cpdf/config.m4 index 4f9a8e5cbc..b1bce3bab4 100644 --- a/ext/cpdf/config.m4 +++ b/ext/cpdf/config.m4 @@ -58,7 +58,7 @@ AC_ARG_WITH(cpdflib, CPDF_JPEG_TEST CPDF_TIFF_TEST - for i in $cpdf_withval /usr /usr/local; do + for i in $cpdf_withval /usr/local /usr; do if test -f "$i/include/cpdflib.h"; then CPDFLIB_INCLUDE=$i/include AC_MSG_CHECKING(for cpdflib.h) diff --git a/ext/crack/config.m4 b/ext/crack/config.m4 index 55757ab14c..0a9768f54d 100644 --- a/ext/crack/config.m4 +++ b/ext/crack/config.m4 @@ -7,27 +7,26 @@ PHP_ARG_WITH(crack, for CRACKlib support, if test "$PHP_CRACK" != "no"; then - for i in $PHP_CRACK/lib $PHP_CRACK/cracklib /usr/local/lib /usr/lib; do - test -f $i/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i - done + for i in $PHP_CRACK/lib $PHP_CRACK/cracklib /usr/local/lib /usr/lib; do + test -f $i/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i && break + done - for i in $PHP_CRACK/include $PHP_CRACK/cracklib /usr/local/include /usr/include; do - test -f $i/packer.h && CRACK_INCLUDEDIR=$i - done - - if test -z "$CRACK_LIBDIR"; then - AC_MSG_ERROR(Cannot find the cracklib library file) - fi + if test -z "$CRACK_LIBDIR"; then + AC_MSG_ERROR(Cannot find the cracklib library file) + fi - if test -z "$CRACK_INCLUDEDIR"; then - AC_MSG_ERROR(Cannot find a cracklib header file) - fi + for i in $PHP_CRACK/include $PHP_CRACK/cracklib /usr/local/include /usr/include; do + test -f $i/packer.h && CRACK_INCLUDEDIR=$i && break + done + + if test -z "$CRACK_INCLUDEDIR"; then + AC_MSG_ERROR(Cannot find a cracklib header file) + fi - PHP_ADD_INCLUDE($CRACK_INCLUDEDIR) - PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD) + PHP_ADD_INCLUDE($CRACK_INCLUDEDIR) + PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD) - PHP_NEW_EXTENSION(crack, crack.c, $ext_shared) - PHP_SUBST(CRACK_SHARED_LIBADD) - AC_DEFINE(HAVE_CRACK, 1, [ ]) + PHP_NEW_EXTENSION(crack, crack.c, $ext_shared) + PHP_SUBST(CRACK_SHARED_LIBADD) + AC_DEFINE(HAVE_CRACK, 1, [ ]) fi - diff --git a/ext/fbsql/config.m4 b/ext/fbsql/config.m4 index 14360ce8b2..60707d3269 100644 --- a/ext/fbsql/config.m4 +++ b/ext/fbsql/config.m4 @@ -13,7 +13,7 @@ if test "$PHP_FBSQL" != "no"; then FBSQL_INSTALLATION_DIR="" if test "$PHP_FBSQL" = "yes"; then - for i in /Local/Library /usr /usr/local /opt /Library /usr/lib; do + for i in /Local/Library /usr/local /usr /opt /Library /usr/lib; do if test -f $i/FrontBase/include/FBCAccess/FBCAccess.h; then FBSQL_INSTALLATION_DIR=$i/FrontBase break diff --git a/ext/fdf/config.m4 b/ext/fdf/config.m4 index 2ed695e17e..ada0f80e95 100644 --- a/ext/fdf/config.m4 +++ b/ext/fdf/config.m4 @@ -23,7 +23,7 @@ if test "$PHP_FDFTK" != "no"; then esac if test "$PHP_FDFTK" = "yes"; then - PHP_FDFTK="/usr /usr/local ../FDFToolkitForUNIX ext/fdf/FDFToolkitForUNIX ../fdftk ext/fdf/fdftk" + PHP_FDFTK="/usr/local /usr ../FDFToolkitForUNIX ext/fdf/FDFToolkitForUNIX ../fdftk ext/fdf/fdftk" fi for dir in $PHP_FDFTK; do diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index fa21f81a13..aacb084e13 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -50,8 +50,8 @@ dnl AC_DEFUN(PHP_GD_JPEG,[ if test "$PHP_JPEG_DIR" != "no"; then - for i in $PHP_JPEG_DIR /usr /usr/local; do - test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i + for i in $PHP_JPEG_DIR /usr/local /usr; do + test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i && break done if test -z "$GD_JPEG_DIR"; then @@ -75,8 +75,8 @@ AC_DEFUN(PHP_GD_JPEG,[ AC_DEFUN(PHP_GD_PNG,[ if test "$PHP_PNG_DIR" != "no"; then - for i in $PHP_PNG_DIR /usr /usr/local; do - test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i + for i in $PHP_PNG_DIR /usr/local /usr; do + test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i && break done if test -z "$GD_PNG_DIR"; then @@ -110,8 +110,8 @@ AC_DEFUN(PHP_GD_PNG,[ AC_DEFUN(PHP_GD_XPM,[ if test "$PHP_XPM_DIR" != "no"; then - for i in $PHP_XPM_DIR /usr /usr/local /usr/X11R6; do - test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i + for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do + test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i && break done if test -z "$GD_XPM_DIR"; then @@ -144,9 +144,9 @@ AC_DEFUN(PHP_GD_XPM,[ AC_DEFUN(PHP_GD_FREETYPE1,[ if test "$PHP_TTF" != "no"; then if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then - if test -n "$PHP_TTF" ; then - for i in $PHP_TTF /usr /usr/local; do - if test -f "$i/include/freetype.h" ; then + if test -n "$PHP_TTF"; then + for i in $PHP_TTF /usr/local /usr; do + if test -f "$i/include/freetype.h"; then TTF_DIR=$i unset TTF_INC_DIR fi @@ -158,6 +158,7 @@ AC_DEFUN(PHP_GD_FREETYPE1,[ TTF_DIR=$i TTF_INC_DIR=$i/include/freetype1/freetype fi + test -n "$TTF_DIR" && break done fi if test -n "$TTF_DIR" ; then @@ -178,10 +179,11 @@ AC_DEFUN(PHP_GD_FREETYPE1,[ AC_DEFUN(PHP_GD_FREETYPE2,[ if test "$PHP_FREETYPE_DIR" != "no"; then - for i in $PHP_FREETYPE_DIR /usr /usr/local; do + for i in $PHP_FREETYPE_DIR /usr/local /usr; do if test -f "$i/include/freetype2/freetype/freetype.h"; then FREETYPE2_DIR=$i FREETYPE2_INC_DIR=$i/include/freetype2 + break fi done @@ -202,8 +204,8 @@ AC_DEFUN(PHP_GD_FREETYPE2,[ AC_DEFUN(PHP_GD_T1LIB,[ if test "$PHP_T1LIB" != "no"; then - for i in $PHP_T1LIB /usr /usr/local; do - test -f "$i/include/t1lib.h" && GD_T1_DIR=$i + for i in $PHP_T1LIB /usr/local /usr; do + test -f "$i/include/t1lib.h" && GD_T1_DIR=$i && break done if test -z "$GD_T1_DIR"; then diff --git a/ext/gettext/config.m4 b/ext/gettext/config.m4 index 6cb1dd91c1..23bc9ae6f3 100644 --- a/ext/gettext/config.m4 +++ b/ext/gettext/config.m4 @@ -6,10 +6,8 @@ PHP_ARG_WITH(gettext,for GNU gettext support, [ --with-gettext[=DIR] Include GNU gettext support.]) if test "$PHP_GETTEXT" != "no"; then - for i in $PHP_GETTEXT /usr /usr/local; do - if test -r $i/include/libintl.h; then - GETTEXT_DIR=$i - fi + for i in $PHP_GETTEXT /usr/local /usr; do + test -r $i/include/libintl.h && GETTEXT_DIR=$i && break done if test -z "$GETTEXT_DIR"; then diff --git a/ext/gmp/config.m4 b/ext/gmp/config.m4 index 8548811bb7..39e1bb24f9 100644 --- a/ext/gmp/config.m4 +++ b/ext/gmp/config.m4 @@ -8,18 +8,17 @@ PHP_ARG_WITH(gmp, for GNU MP support, if test "$PHP_GMP" != "no"; then for i in $PHP_GMP /usr/local /usr; do - if test -f $i/include/gmp.h; then - GMP_DIR=$i - fi + test -f $i/include/gmp.h && GMP_DIR=$i && break done if test -z "$GMP_DIR"; then AC_MSG_ERROR(Unable to locate gmp.h) fi + + PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD) PHP_ADD_INCLUDE($GMP_DIR/include) PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared) - AC_DEFINE(HAVE_GMP, 1, [ ]) PHP_SUBST(GMP_SHARED_LIBADD) - PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD) + AC_DEFINE(HAVE_GMP, 1, [ ]) fi diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 index 146ce8f3d7..ceefb0d04a 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 @@ -6,18 +6,17 @@ AC_DEFUN(IMAP_INC_CHK,[if test -r "$i$1/c-client.h"; then AC_DEFINE(HAVE_IMAP2000, 1, [ ]) IMAP_DIR=$i IMAP_INC_DIR=$i$1 + break elif test -r "$i$1/rfc822.h"; then IMAP_DIR=$i; IMAP_INC_DIR=$i$1 + break ]) AC_DEFUN(IMAP_LIB_CHK,[ str="$IMAP_DIR/$1/lib$lib.*" for i in `echo $str`; do - if test -r $i; then - IMAP_LIBDIR=$IMAP_DIR/$1 - break 2 - fi + test -r $i && IMAP_LIBDIR=$IMAP_DIR/$1 && break 2 done ]) diff --git a/ext/mcrypt/config.m4 b/ext/mcrypt/config.m4 index 76c097cddd..4d9cc3eb06 100644 --- a/ext/mcrypt/config.m4 +++ b/ext/mcrypt/config.m4 @@ -25,9 +25,7 @@ PHP_ARG_WITH(mcrypt, for mcrypt support, if test "$PHP_MCRYPT" != "no"; then for i in $PHP_MCRYPT /usr/local /usr; do - if test -f $i/include/mcrypt.h; then - MCRYPT_DIR=$i - fi + test -f $i/include/mcrypt.h && MCRYPT_DIR=$i && break done if test -z "$MCRYPT_DIR"; then diff --git a/ext/mhash/config.m4 b/ext/mhash/config.m4 index da7286e49f..6b93decbcb 100644 --- a/ext/mhash/config.m4 +++ b/ext/mhash/config.m4 @@ -7,19 +7,17 @@ PHP_ARG_WITH(mhash, for mhash support, if test "$PHP_MHASH" != "no"; then for i in $PHP_MHASH /usr/local /usr /opt/mhash; do - if test -f $i/include/mhash.h; then - MHASH_DIR=$i - fi + test -f $i/include/mhash.h && MHASH_DIR=$i && break done if test -z "$MHASH_DIR"; then AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h) fi + PHP_ADD_INCLUDE($MHASH_DIR/include) PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/lib, MHASH_SHARED_LIBADD) - PHP_SUBST(MHASH_SHARED_LIBADD) - - AC_DEFINE(HAVE_LIBMHASH,1,[ ]) PHP_NEW_EXTENSION(mhash, mhash.c, $ext_shared) + PHP_SUBST(MHASH_SHARED_LIBADD) + AC_DEFINE(HAVE_LIBMHASH,1,[ ]) fi diff --git a/ext/ovrimos/config.m4 b/ext/ovrimos/config.m4 index 19482f39cb..e22148ea12 100644 --- a/ext/ovrimos/config.m4 +++ b/ext/ovrimos/config.m4 @@ -8,9 +8,7 @@ PHP_ARG_WITH(ovrimos, for Ovrimos SQL Server support, if test "$PHP_OVRIMOS" != "no"; then for i in $PHP_OVRIMOS /usr/local /usr; do - if test -f $i/include/sqlcli.h; then - OVRIMOS_DIR=$i - fi + test -f $i/include/sqlcli.h && OVRIMOS_DIR=$i && break done if test -z "$OVRIMOS_DIR"; then @@ -18,11 +16,11 @@ if test "$PHP_OVRIMOS" != "no"; then fi PHP_ADD_INCLUDE($OVRIMOS_DIR/include) - PHP_SUBST(OVRIMOS_SHARED_LIBADD) LDFLAGS="$LDFLAGS $ld_runpath_switch$OVRIMOS_DIR/lib -L$OVRIMOS_DIR/lib" AC_CHECK_LIB(sqlcli, main) PHP_ADD_LIBRARY_WITH_PATH(sqlcli, $OVRIMOS_DIR/lib, OVRIMOS_SHARED_LIBADD) - AC_DEFINE(HAVE_LIBSQLCLI,1,[ ]) PHP_NEW_EXTENSION(ovrimos, ovrimos.c, $ext_shared) + PHP_SUBST(OVRIMOS_SHARED_LIBADD) + AC_DEFINE(HAVE_LIBSQLCLI,1,[ ]) fi diff --git a/ext/pfpro/config.m4 b/ext/pfpro/config.m4 index 17424aae10..b18abd3ab5 100644 --- a/ext/pfpro/config.m4 +++ b/ext/pfpro/config.m4 @@ -25,6 +25,8 @@ if test "$PHP_PFPRO" != "no"; then elif test -r $i/lib/$PFPRO_LIB; then PFPRO_LIB_DIR=$i/lib fi + + test -n "$PFPRO_INC_DIR" && test -n "$PFPRO_LIB_DIR" && break done if test -z "$PFPRO_INC_DIR"; then diff --git a/ext/readline/config.m4 b/ext/readline/config.m4 index e5c2a057a0..7df38b247a 100644 --- a/ext/readline/config.m4 +++ b/ext/readline/config.m4 @@ -10,9 +10,7 @@ PHP_ARG_WITH(readline,for readline support, if test "$PHP_READLINE" != "no"; then for i in $PHP_READLINE /usr/local /usr; do - if test -f $i/include/readline/readline.h; then - READLINE_DIR=$i - fi + test -f $i/include/readline/readline.h && READLINE_DIR=$i && break done if test -z "$READLINE_DIR"; then @@ -49,17 +47,14 @@ if test "$PHP_READLINE" != "no"; then -L$READLINE_DIR/lib ]) + PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) PHP_SUBST(READLINE_SHARED_LIBADD) - AC_DEFINE(HAVE_LIBREADLINE, 1, [ ]) - PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) elif test "$PHP_LIBEDIT" != "no"; then for i in $PHP_LIBEDIT /usr/local /usr; do - if test -f $i/include/readline/readline.h; then - LIBEDIT_DIR=$i - fi + test -f $i/include/readline/readline.h && LIBEDIT_DIR=$i && break done if test -z "$LIBEDIT_DIR"; then @@ -87,8 +82,7 @@ elif test "$PHP_LIBEDIT" != "no"; then -L$READLINE_DIR/lib ]) + PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) PHP_SUBST(READLINE_SHARED_LIBADD) - AC_DEFINE(HAVE_LIBEDIT, 1, [ ]) - PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) fi diff --git a/ext/recode/config.m4 b/ext/recode/config.m4 index aae118a76b..aa94914df8 100644 --- a/ext/recode/config.m4 +++ b/ext/recode/config.m4 @@ -6,7 +6,7 @@ PHP_ARG_WITH(recode,for recode support, [ --with-recode[=DIR] Include recode support.]) if test "$PHP_RECODE" != "no"; then - RECODE_LIST="$PHP_RECODE /usr /usr/local /opt" + RECODE_LIST="$PHP_RECODE /usr/local /usr /opt" for i in $RECODE_LIST; do if test -f $i/include/recode.h; then @@ -24,6 +24,7 @@ if test "$PHP_RECODE" != "no"; then RECODE_INC=include RECODE_LIB=lib fi + test -n "$RECODE_DIR" && break done if test -z "$RECODE_DIR"; then diff --git a/ext/session/config.m4 b/ext/session/config.m4 index 9be3040d07..3f74899676 100644 --- a/ext/session/config.m4 +++ b/ext/session/config.m4 @@ -18,9 +18,7 @@ fi if test "$PHP_MM" != "no"; then for i in $PHP_MM /usr/local /usr; do - if test -f "$i/include/mm.h"; then - MM_DIR=$i - fi + test -f "$i/include/mm.h" && MM_DIR=$i && break done if test -z "$MM_DIR" ; then diff --git a/ext/xmlrpc/config.m4 b/ext/xmlrpc/config.m4 index 09d684e921..8551f6b958 100644 --- a/ext/xmlrpc/config.m4 +++ b/ext/xmlrpc/config.m4 @@ -22,12 +22,13 @@ if test "$PHP_XMLRPC" != "no"; then AC_DEFINE(HAVE_XMLRPC,1,[ ]) testval=no - for i in $PHP_EXPAT_DIR $XMLRPC_DIR /usr /usr/local; do + for i in $PHP_EXPAT_DIR $XMLRPC_DIR /usr/local /usr; do if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.$SHLIB_SUFFIX_NAME; then AC_DEFINE(HAVE_LIBEXPAT2,1,[ ]) PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib, XMLRPC_SHARED_LIBADD) PHP_ADD_INCLUDE($i/include) testval=yes + break fi done @@ -76,6 +77,7 @@ dnl for xmlrpc-epi because of this. if test -r $i/include/xmlrpc.h; then XMLRPC_DIR=$i/include AC_MSG_RESULT(found in $i) + break fi done fi |