From: Ilia Alshanetsky Date: Tue, 30 Sep 2003 22:38:29 +0000 (+0000) Subject: MFH: Always prefer user specified paths over the default /usr /usr/local. X-Git-Tag: php-4.3.4RC2~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a11f040979206d254a466d34391edaac8791c70d;p=php MFH: Always prefer user specified paths over the default /usr /usr/local. --- diff --git a/ext/crack/config.m4 b/ext/crack/config.m4 index d88ccb14bf..55757ab14c 100644 --- a/ext/crack/config.m4 +++ b/ext/crack/config.m4 @@ -7,11 +7,11 @@ PHP_ARG_WITH(crack, for CRACKlib support, if test "$PHP_CRACK" != "no"; then - for i in /usr/local/lib /usr/lib $PHP_CRACK/lib $PHP_CRACK/cracklib; do + 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 /usr/local/include /usr/include $PHP_CRACK/include $PHP_CRACK/cracklib; do + for i in $PHP_CRACK/include $PHP_CRACK/cracklib /usr/local/include /usr/include; do test -f $i/packer.h && CRACK_INCLUDEDIR=$i done diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index 7057a203f5..d5320959ef 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -50,7 +50,7 @@ dnl AC_DEFUN(PHP_GD_JPEG,[ if test "$PHP_JPEG_DIR" != "no"; then - for i in /usr /usr/local $PHP_JPEG_DIR; do + 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 done @@ -75,7 +75,7 @@ AC_DEFUN(PHP_GD_JPEG,[ AC_DEFUN(PHP_GD_PNG,[ if test "$PHP_PNG_DIR" != "no"; then - for i in /usr /usr/local $PHP_PNG_DIR; do + 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 done @@ -110,7 +110,7 @@ AC_DEFUN(PHP_GD_PNG,[ AC_DEFUN(PHP_GD_XPM,[ if test "$PHP_XPM_DIR" != "no"; then - for i in /usr /usr/local /usr/X11R6 $PHP_XPM_DIR; do + 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 done @@ -145,7 +145,7 @@ 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 /usr /usr/local $PHP_TTF; do + for i in $PHP_TTF /usr /usr/local; do if test -f "$i/include/freetype.h" ; then TTF_DIR=$i unset TTF_INC_DIR @@ -177,7 +177,7 @@ AC_DEFUN(PHP_GD_FREETYPE1,[ AC_DEFUN(PHP_GD_FREETYPE2,[ if test "$PHP_FREETYPE_DIR" != "no"; then - for i in /usr /usr/local $PHP_FREETYPE_DIR; do + for i in $PHP_FREETYPE_DIR /usr /usr/local; do if test -f "$i/include/freetype2/freetype/freetype.h"; then FREETYPE2_DIR=$i FREETYPE2_INC_DIR=$i/include/freetype2 @@ -201,7 +201,7 @@ AC_DEFUN(PHP_GD_FREETYPE2,[ AC_DEFUN(PHP_GD_T1LIB,[ if test "$PHP_T1LIB" != "no"; then - for i in /usr /usr/local $PHP_T1LIB; do + for i in $PHP_T1LIB /usr /usr/local; do test -f "$i/include/t1lib.h" && GD_T1_DIR=$i done diff --git a/ext/gettext/config.m4 b/ext/gettext/config.m4 index f4a6fc34e9..6cb1dd91c1 100644 --- a/ext/gettext/config.m4 +++ b/ext/gettext/config.m4 @@ -6,7 +6,7 @@ PHP_ARG_WITH(gettext,for GNU gettext support, [ --with-gettext[=DIR] Include GNU gettext support.]) if test "$PHP_GETTEXT" != "no"; then - for i in /usr /usr/local $PHP_GETTEXT; do + for i in $PHP_GETTEXT /usr /usr/local; do if test -r $i/include/libintl.h; then GETTEXT_DIR=$i fi diff --git a/ext/gmp/config.m4 b/ext/gmp/config.m4 index f996ae978f..8548811bb7 100644 --- a/ext/gmp/config.m4 +++ b/ext/gmp/config.m4 @@ -7,7 +7,7 @@ PHP_ARG_WITH(gmp, for GNU MP support, if test "$PHP_GMP" != "no"; then - for i in /usr/local /usr $PHP_GMP; do + for i in $PHP_GMP /usr/local /usr; do if test -f $i/include/gmp.h; then GMP_DIR=$i fi diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 index f992ab8ec3..146ce8f3d7 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 @@ -137,7 +137,7 @@ if test "$PHP_IMAP" != "no"; then PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared) AC_DEFINE(HAVE_IMAP,1,[ ]) - for i in /usr/local /usr $PHP_IMAP; do + for i in $PHP_IMAP /usr/local /usr; do IMAP_INC_CHK() el[]IMAP_INC_CHK(/include/c-client) el[]IMAP_INC_CHK(/include/imap) diff --git a/ext/mcrypt/config.m4 b/ext/mcrypt/config.m4 index 042833fd55..c8604411eb 100644 --- a/ext/mcrypt/config.m4 +++ b/ext/mcrypt/config.m4 @@ -6,7 +6,7 @@ PHP_ARG_WITH(mcrypt, for mcrypt support, [ --with-mcrypt[=DIR] Include mcrypt support.]) if test "$PHP_MCRYPT" != "no"; then - for i in /usr/local /usr $PHP_MCRYPT; do + for i in $PHP_MCRYPT /usr/local /usr; do if test -f $i/include/mcrypt.h; then MCRYPT_DIR=$i fi diff --git a/ext/mhash/config.m4 b/ext/mhash/config.m4 index e53bd28f61..da7286e49f 100644 --- a/ext/mhash/config.m4 +++ b/ext/mhash/config.m4 @@ -6,7 +6,7 @@ PHP_ARG_WITH(mhash, for mhash support, [ --with-mhash[=DIR] Include mhash support.]) if test "$PHP_MHASH" != "no"; then - for i in /usr/local /usr /opt/mhash $PHP_MHASH; do + for i in $PHP_MHASH /usr/local /usr /opt/mhash; do if test -f $i/include/mhash.h; then MHASH_DIR=$i fi diff --git a/ext/ovrimos/config.m4 b/ext/ovrimos/config.m4 index b424664fb2..19482f39cb 100644 --- a/ext/ovrimos/config.m4 +++ b/ext/ovrimos/config.m4 @@ -7,7 +7,7 @@ PHP_ARG_WITH(ovrimos, for Ovrimos SQL Server support, Ovrimos libsqlcli install directory.]) if test "$PHP_OVRIMOS" != "no"; then - for i in /usr/local /usr $PHP_OVRIMOS; do + for i in $PHP_OVRIMOS /usr/local /usr; do if test -f $i/include/sqlcli.h; then OVRIMOS_DIR=$i fi diff --git a/ext/pfpro/config.m4 b/ext/pfpro/config.m4 index 63fc634c42..17424aae10 100644 --- a/ext/pfpro/config.m4 +++ b/ext/pfpro/config.m4 @@ -9,7 +9,7 @@ if test "$PHP_PFPRO" != "no"; then PFPRO_LIB=libpfpro.so PFPRO_HDR=pfpro.h - for i in /usr/local /usr $PHP_PFPRO; do + for i in $PHP_PFPRO /usr/local /usr; do if test -r $i/$PFPRO_HDR; then PFPRO_INC_DIR=$i elif test -r $i/include/$PFPRO_HDR; then diff --git a/ext/readline/config.m4 b/ext/readline/config.m4 index a22c09dee7..e5c2a057a0 100644 --- a/ext/readline/config.m4 +++ b/ext/readline/config.m4 @@ -9,7 +9,7 @@ PHP_ARG_WITH(readline,for readline support, [ --with-readline[=DIR] Include readline support (CLI/CGI only).]) if test "$PHP_READLINE" != "no"; then - for i in /usr/local /usr $PHP_READLINE; do + for i in $PHP_READLINE /usr/local /usr; do if test -f $i/include/readline/readline.h; then READLINE_DIR=$i fi @@ -56,7 +56,7 @@ if test "$PHP_READLINE" != "no"; then elif test "$PHP_LIBEDIT" != "no"; then - for i in /usr/local /usr $PHP_LIBEDIT; do + for i in $PHP_LIBEDIT /usr/local /usr; do if test -f $i/include/readline/readline.h; then LIBEDIT_DIR=$i fi diff --git a/ext/session/config.m4 b/ext/session/config.m4 index 4e5a4ddd2c..9be3040d07 100644 --- a/ext/session/config.m4 +++ b/ext/session/config.m4 @@ -17,7 +17,7 @@ if test "$PHP_SESSION" != "no"; then fi if test "$PHP_MM" != "no"; then - for i in /usr/local /usr $PHP_MM; do + for i in $PHP_MM /usr/local /usr; do if test -f "$i/include/mm.h"; then MM_DIR=$i fi diff --git a/ext/xmlrpc/config.m4 b/ext/xmlrpc/config.m4 index 712e240470..e81d5bc525 100644 --- a/ext/xmlrpc/config.m4 +++ b/ext/xmlrpc/config.m4 @@ -22,7 +22,7 @@ if test "$PHP_XMLRPC" != "no"; then AC_DEFINE(HAVE_XMLRPC,1,[ ]) testval=no - for i in /usr /usr/local $PHP_EXPAT_DIR $XMLRPC_DIR; do + for i in $PHP_EXPAT_DIR $XMLRPC_DIR /usr /usr/local; 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) diff --git a/ext/xslt/config.m4 b/ext/xslt/config.m4 index bb1f96a6e1..721408bb57 100644 --- a/ext/xslt/config.m4 +++ b/ext/xslt/config.m4 @@ -123,7 +123,7 @@ int main () ]) if test "$PHP_SABLOT_JS" != "no"; then - for i in /usr/local /usr $PHP_SABLOT_JS; do + for i in $PHP_SABLOT_JS /usr/local /usr; do if test -f $i/lib/libjs.a -o -f $i/lib/libjs.$SHLIB_SUFFIX_NAME; then PHP_SABLOT_JS_DIR=$i fi