Skip to content

Commit 526a3d9

Browse files
author
Ilia Alshanetsky
committed
Always prefer user specified paths over the default /usr /usr/local.
This may fix compilation problems with on systems with multiple copies of the same library.
1 parent 3f415b2 commit 526a3d9

File tree

12 files changed

+19
-19
lines changed

12 files changed

+19
-19
lines changed

ext/crack/config.m4

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ PHP_ARG_WITH(crack, for CRACKlib support,
77

88
if test "$PHP_CRACK" != "no"; then
99

10-
for i in /usr/local/lib /usr/lib $PHP_CRACK/lib $PHP_CRACK/cracklib; do
10+
for i in $PHP_CRACK/lib $PHP_CRACK/cracklib /usr/local/lib /usr/lib; do
1111
test -f $i/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i
1212
done
1313

14-
for i in /usr/local/include /usr/include $PHP_CRACK/include $PHP_CRACK/cracklib; do
14+
for i in $PHP_CRACK/include $PHP_CRACK/cracklib /usr/local/include /usr/include; do
1515
test -f $i/packer.h && CRACK_INCLUDEDIR=$i
1616
done
1717

ext/gd/config.m4

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ dnl
5050
AC_DEFUN(PHP_GD_JPEG,[
5151
if test "$PHP_JPEG_DIR" != "no"; then
5252
53-
for i in /usr /usr/local $PHP_JPEG_DIR; do
53+
for i in $PHP_JPEG_DIR /usr /usr/local; do
5454
test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i
5555
done
5656
@@ -75,7 +75,7 @@ AC_DEFUN(PHP_GD_JPEG,[
7575
AC_DEFUN(PHP_GD_PNG,[
7676
if test "$PHP_PNG_DIR" != "no"; then
7777
78-
for i in /usr /usr/local $PHP_PNG_DIR; do
78+
for i in $PHP_PNG_DIR /usr /usr/local; do
7979
test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i
8080
done
8181
@@ -110,7 +110,7 @@ AC_DEFUN(PHP_GD_PNG,[
110110
AC_DEFUN(PHP_GD_XPM,[
111111
if test "$PHP_XPM_DIR" != "no"; then
112112
113-
for i in /usr /usr/local /usr/X11R6 $PHP_XPM_DIR; do
113+
for i in $PHP_XPM_DIR /usr /usr/local /usr/X11R6; do
114114
test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i
115115
done
116116
@@ -145,7 +145,7 @@ AC_DEFUN(PHP_GD_FREETYPE1,[
145145
if test "$PHP_TTF" != "no"; then
146146
if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then
147147
if test -n "$PHP_TTF" ; then
148-
for i in /usr /usr/local $PHP_TTF; do
148+
for i in $PHP_TTF /usr /usr/local; do
149149
if test -f "$i/include/freetype.h" ; then
150150
TTF_DIR=$i
151151
unset TTF_INC_DIR
@@ -178,7 +178,7 @@ AC_DEFUN(PHP_GD_FREETYPE1,[
178178
AC_DEFUN(PHP_GD_FREETYPE2,[
179179
if test "$PHP_FREETYPE_DIR" != "no"; then
180180
181-
for i in /usr /usr/local $PHP_FREETYPE_DIR; do
181+
for i in $PHP_FREETYPE_DIR /usr /usr/local; do
182182
if test -f "$i/include/freetype2/freetype/freetype.h"; then
183183
FREETYPE2_DIR=$i
184184
FREETYPE2_INC_DIR=$i/include/freetype2
@@ -202,7 +202,7 @@ AC_DEFUN(PHP_GD_FREETYPE2,[
202202
AC_DEFUN(PHP_GD_T1LIB,[
203203
if test "$PHP_T1LIB" != "no"; then
204204
205-
for i in /usr /usr/local $PHP_T1LIB; do
205+
for i in $PHP_T1LIB /usr /usr/local; do
206206
test -f "$i/include/t1lib.h" && GD_T1_DIR=$i
207207
done
208208

ext/gettext/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PHP_ARG_WITH(gettext,for GNU gettext support,
66
[ --with-gettext[=DIR] Include GNU gettext support.])
77

88
if test "$PHP_GETTEXT" != "no"; then
9-
for i in /usr /usr/local $PHP_GETTEXT; do
9+
for i in $PHP_GETTEXT /usr /usr/local; do
1010
if test -r $i/include/libintl.h; then
1111
GETTEXT_DIR=$i
1212
fi

ext/gmp/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PHP_ARG_WITH(gmp, for GNU MP support,
77

88
if test "$PHP_GMP" != "no"; then
99

10-
for i in /usr/local /usr $PHP_GMP; do
10+
for i in $PHP_GMP /usr/local /usr; do
1111
if test -f $i/include/gmp.h; then
1212
GMP_DIR=$i
1313
fi

ext/imap/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ if test "$PHP_IMAP" != "no"; then
137137
PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared)
138138
AC_DEFINE(HAVE_IMAP,1,[ ])
139139

140-
for i in /usr/local /usr $PHP_IMAP; do
140+
for i in $PHP_IMAP /usr/local /usr; do
141141
IMAP_INC_CHK()
142142
el[]IMAP_INC_CHK(/include/c-client)
143143
el[]IMAP_INC_CHK(/include/imap)

ext/mcrypt/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ PHP_ARG_WITH(mcrypt, for mcrypt support,
2424
[ --with-mcrypt[=DIR] Include mcrypt support.])
2525

2626
if test "$PHP_MCRYPT" != "no"; then
27-
for i in /usr/local /usr $PHP_MCRYPT; do
27+
for i in $PHP_MCRYPT /usr/local /usr; do
2828
if test -f $i/include/mcrypt.h; then
2929
MCRYPT_DIR=$i
3030
fi

ext/mhash/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PHP_ARG_WITH(mhash, for mhash support,
66
[ --with-mhash[=DIR] Include mhash support.])
77

88
if test "$PHP_MHASH" != "no"; then
9-
for i in /usr/local /usr /opt/mhash $PHP_MHASH; do
9+
for i in $PHP_MHASH /usr/local /usr /opt/mhash; do
1010
if test -f $i/include/mhash.h; then
1111
MHASH_DIR=$i
1212
fi

ext/ovrimos/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PHP_ARG_WITH(ovrimos, for Ovrimos SQL Server support,
77
Ovrimos libsqlcli install directory.])
88

99
if test "$PHP_OVRIMOS" != "no"; then
10-
for i in /usr/local /usr $PHP_OVRIMOS; do
10+
for i in $PHP_OVRIMOS /usr/local /usr; do
1111
if test -f $i/include/sqlcli.h; then
1212
OVRIMOS_DIR=$i
1313
fi

ext/pfpro/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if test "$PHP_PFPRO" != "no"; then
99
PFPRO_LIB=libpfpro.so
1010
PFPRO_HDR=pfpro.h
1111

12-
for i in /usr/local /usr $PHP_PFPRO; do
12+
for i in $PHP_PFPRO /usr/local /usr; do
1313
if test -r $i/$PFPRO_HDR; then
1414
PFPRO_INC_DIR=$i
1515
elif test -r $i/include/$PFPRO_HDR; then

ext/readline/config.m4

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PHP_ARG_WITH(readline,for readline support,
99
[ --with-readline[=DIR] Include readline support (CLI/CGI only).])
1010

1111
if test "$PHP_READLINE" != "no"; then
12-
for i in /usr/local /usr $PHP_READLINE; do
12+
for i in $PHP_READLINE /usr/local /usr; do
1313
if test -f $i/include/readline/readline.h; then
1414
READLINE_DIR=$i
1515
fi
@@ -56,7 +56,7 @@ if test "$PHP_READLINE" != "no"; then
5656

5757
elif test "$PHP_LIBEDIT" != "no"; then
5858

59-
for i in /usr/local /usr $PHP_LIBEDIT; do
59+
for i in $PHP_LIBEDIT /usr/local /usr; do
6060
if test -f $i/include/readline/readline.h; then
6161
LIBEDIT_DIR=$i
6262
fi

ext/session/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if test "$PHP_SESSION" != "no"; then
1717
fi
1818

1919
if test "$PHP_MM" != "no"; then
20-
for i in /usr/local /usr $PHP_MM; do
20+
for i in $PHP_MM /usr/local /usr; do
2121
if test -f "$i/include/mm.h"; then
2222
MM_DIR=$i
2323
fi

ext/xmlrpc/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if test "$PHP_XMLRPC" != "no"; then
2222
AC_DEFINE(HAVE_XMLRPC,1,[ ])
2323

2424
testval=no
25-
for i in /usr /usr/local $PHP_EXPAT_DIR $XMLRPC_DIR; do
25+
for i in $PHP_EXPAT_DIR $XMLRPC_DIR /usr /usr/local; do
2626
if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.$SHLIB_SUFFIX_NAME; then
2727
AC_DEFINE(HAVE_LIBEXPAT2,1,[ ])
2828
PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib, XMLRPC_SHARED_LIBADD)

0 commit comments

Comments
 (0)