- Always look into /usr/local before /usr

- Added breaks to make sure the preferred value is used.
This commit is contained in:
foobar 2003-10-01 02:53:23 +00:00
parent 5b17050a79
commit dc080a5db6
16 changed files with 66 additions and 78 deletions

View File

@ -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)

View File

@ -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
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_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
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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
])

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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_SUBST(READLINE_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBREADLINE, 1, [ ])
PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli)
PHP_SUBST(READLINE_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBREADLINE, 1, [ ])
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_SUBST(READLINE_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBEDIT, 1, [ ])
PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli)
PHP_SUBST(READLINE_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBEDIT, 1, [ ])
fi

View File

@ -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

View File

@ -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

View File

@ -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