Skip to content

Commit 3be17e3

Browse files
author
foobar
committed
- Prevent resetting the PHP_*_DIR variables if already set.
1 parent 8213494 commit 3be17e3

File tree

4 files changed

+38
-16
lines changed

4 files changed

+38
-16
lines changed

ext/domxml/config.m4

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ PHP_ARG_WITH(dom, for DOM support,
2323
[ --with-dom[=DIR] Include DOM support (requires libxml >= 2.4.14).
2424
DIR is the libxml install directory.])
2525

26+
if test -z "$PHP_ZLIB_DIR"; then
27+
PHP_ARG_WITH(zlib-dir, for the location of libz,
28+
[ --with-zlib-dir[=DIR] DOMXML: Set the path to libz install prefix.], no, no)
29+
fi
30+
2631
if test "$PHP_DOM" != "no"; then
2732

2833
DOMXML_DIR_ADD=""

ext/gd/config.m4

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ dnl
99
PHP_ARG_WITH(gd, for GD support,
1010
[ --with-gd[=DIR] Include GD support (DIR is GD's install dir).])
1111

12-
PHP_ARG_WITH(jpeg-dir, for the location of libjpeg,
13-
[ --with-jpeg-dir=DIR GD: Set the path to libjpeg install prefix.], no, no)
12+
if test -z "$PHP_JPEG_DIR"; then
13+
PHP_ARG_WITH(jpeg-dir, for the location of libjpeg,
14+
[ --with-jpeg-dir=DIR GD: Set the path to libjpeg install prefix.], no, no)
15+
fi
1416

15-
PHP_ARG_WITH(png-dir, for the location of libpng,
16-
[ --with-png-dir=DIR GD: Set the path to libpng install prefix.], no, no)
17+
if test -z "$PHP_PNG_DIR"; then
18+
PHP_ARG_WITH(png-dir, for the location of libpng,
19+
[ --with-png-dir=DIR GD: Set the path to libpng install prefix.], no, no)
20+
fi
1721

18-
PHP_ARG_WITH(zlib-dir, for the location of libz,
19-
[ --with-zlib-dir[=DIR] GD: Set the path to libz install prefix.], no, no)
22+
if test -z "$PHP_ZLIB_DIR"; then
23+
PHP_ARG_WITH(zlib-dir, for the location of libz,
24+
[ --with-zlib-dir[=DIR] GD: Set the path to libz install prefix.], no, no)
25+
fi
2026

2127
PHP_ARG_WITH(xpm-dir, for the location of libXpm,
2228
[ --with-xpm-dir=DIR GD: Set the path to libXpm install prefix.], no, no)

ext/mysql/config.m4

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,14 @@ PHP_ARG_WITH(mysql, for MySQL support,
4848
If unspecified, the bundled MySQL library will be used.], yes)
4949

5050
PHP_ARG_WITH(mysql-sock, for specified location of the MySQL UNIX socket,
51-
[ --with-mysql-sock[=DIR] Location of the MySQL unix socket pointer.
52-
If unspecified, the default locations are searched.], no, no)
51+
[ --with-mysql-sock[=DIR] MySQL: Location of the MySQL unix socket pointer.
52+
If unspecified, the default locations are searched.], no, no)
53+
54+
if test -z "$PHP_ZLIB_DIR"; then
55+
PHP_ARG_WITH(zlib-dir, for the location of libz,
56+
[ --with-zlib-dir[=DIR] MySQL: Set the path to libz install prefix.], no, no)
57+
fi
58+
5359

5460
if test "$PHP_MYSQL" != "no"; then
5561
AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])

ext/pdf/config.m4

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,24 @@ dnl
55
PHP_ARG_WITH(pdflib,for PDFlib support,
66
[ --with-pdflib[=DIR] Include PDFlib support.])
77

8-
PHP_ARG_WITH(jpeg-dir, for the location of libjpeg,
9-
[ --with-jpeg-dir[=DIR] PDFLIB: define libjpeg install directory.
8+
if test -z "$PHP_JPEG_DIR"; then
9+
PHP_ARG_WITH(jpeg-dir, for the location of libjpeg,
10+
[ --with-jpeg-dir[=DIR] PDFLIB: define libjpeg install directory.
1011
(OPTIONAL for PDFlib v4)], no, no)
12+
fi
1113

12-
PHP_ARG_WITH(png-dir, for the location of libpng,
13-
[ --with-png-dir[=DIR] PDFLIB: define libpng install directory.
14+
if test -z "$PHP_PNG_DIR"; then
15+
PHP_ARG_WITH(png-dir, for the location of libpng,
16+
[ --with-png-dir[=DIR] PDFLIB: define libpng install directory.
1417
(OPTIONAL for PDFlib v4)], no, no)
18+
fi
1519

16-
PHP_ARG_WITH(zlib-dir, for the location of libz,
17-
[ --with-zlib-dir[=DIR] PDFLIB: define libz install directory.
20+
if test -z "$PHP_ZLIB_DIR"; then
21+
PHP_ARG_WITH(zlib-dir, for the location of libz,
22+
[ --with-zlib-dir[=DIR] PDFLIB: define libz install directory.
1823
(OPTIONAL for PDFlib v4)], no, no)
19-
24+
fi
25+
2026
PHP_ARG_WITH(tiff-dir, for the location of libtiff,
2127
[ --with-tiff-dir[=DIR] PDFLIB: define libtiff install directory.
2228
(OPTIONAL for PDFlib v4)], no, no)
@@ -121,4 +127,3 @@ See config.log for more information.
121127
;;
122128
esac
123129
fi
124-

0 commit comments

Comments
 (0)