Skip to content

Commit 3bf7519

Browse files
author
foobar
committed
@- Added --disable-all configure option. (Jani)
1 parent dcf995c commit 3bf7519

File tree

16 files changed

+125
-118
lines changed

16 files changed

+125
-118
lines changed

acinclude.m4

+28-10
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ AC_DEFUN(PHP_EVAL_INCLINE,[
280280
esac
281281
done
282282
])
283-
283+
284284
AC_DEFUN(PHP_READDIR_R_TYPE,[
285285
dnl HAVE_READDIR_R is also defined by libmysql
286286
AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
@@ -512,40 +512,58 @@ PHP_ALWAYS_SHARED([$1])
512512
])
513513

514514
AC_DEFUN(PHP_ARG_ANALYZE,[
515-
PHP_ARG_ANALYZE_EX([$1])
515+
ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])])
516516
ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
517517
])
518518

519519
dnl
520-
dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val])
520+
dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]])
521521
dnl Sets PHP_ARG_NAME either to the user value or to the default value.
522522
dnl default-val defaults to no. This will also set the variable ext_shared,
523523
dnl and will overwrite any previous variable of that name.
524+
dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
525+
dnl the PHP_ARG_ANALYZE_EX.
524526
dnl
525527
AC_DEFUN(PHP_ARG_WITH,[
526-
PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_))
528+
PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
527529
])
528530

529531
AC_DEFUN(PHP_REAL_ARG_WITH,[
530532
ifelse([$2],,,[AC_MSG_CHECKING([$2])])
531-
AC_ARG_WITH($1,[$3],$5=[$]withval,$5=ifelse($4,,no,$4))
532-
PHP_ARG_ANALYZE($5,[$2])
533+
AC_ARG_WITH($1,[$3],$5=[$]withval,
534+
[
535+
$5=ifelse($4,,no,$4)
536+
537+
if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then
538+
$5=$PHP_ENABLE_ALL
539+
fi
540+
])
541+
PHP_ARG_ANALYZE($5,[$2],$6)
533542
])
534543

535544
dnl
536-
dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val])
545+
dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]])
537546
dnl Sets PHP_ARG_NAME either to the user value or to the default value.
538547
dnl default-val defaults to no. This will also set the variable ext_shared,
539548
dnl and will overwrite any previous variable of that name.
549+
dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
550+
dnl the PHP_ARG_ANALYZE_EX.
540551
dnl
541552
AC_DEFUN(PHP_ARG_ENABLE,[
542-
PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
553+
PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_),[ifelse($5,,yes,$5)])
543554
])
544555

545556
AC_DEFUN(PHP_REAL_ARG_ENABLE,[
546557
ifelse([$2],,,[AC_MSG_CHECKING([$2])])
547-
AC_ARG_ENABLE($1,[$3],$5=[$]enableval,$5=ifelse($4,,no,$4))
548-
PHP_ARG_ANALYZE($5,[$2])
558+
AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
559+
[
560+
$5=ifelse($4,,no,$4)
561+
562+
if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then
563+
$5=$PHP_ENABLE_ALL
564+
fi
565+
])
566+
PHP_ARG_ANALYZE($5,[$2],$6)
549567
])
550568

551569
AC_DEFUN(PHP_MODULE_PTR,[

configure.in

+36-25
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ dnl -------------------------------------------------------------------------
531531
PHP_HELP_SEPARATOR([General settings:])
532532
533533
PHP_ARG_ENABLE(debug, whether to include debugging symbols,
534-
[ --enable-debug Compile with debugging symbols.], no)
534+
[ --enable-debug Compile with debugging symbols.], no, no)
535535
536536
if test "$PHP_DEBUG" = "yes"; then
537537
PHP_DEBUG=1
@@ -543,7 +543,7 @@ fi
543543
544544
PHP_ARG_WITH(layout,[layout of installed files],
545545
[ --with-layout=TYPE Sets how installed files will be laid out. Type is
546-
one of "PHP" (default) or "GNU"], PHP)
546+
one of "PHP" (default) or "GNU"], PHP, no)
547547
548548
case $PHP_LAYOUT in
549549
GNU)
@@ -557,7 +557,7 @@ esac
557557
PHP_ARG_WITH(config-file-path,[path to configuration file],
558558
[ --with-config-file-path=PATH
559559
Sets the path in which to look for php.ini,
560-
defaults to PREFIX/lib], DEFAULT)
560+
defaults to PREFIX/lib], DEFAULT, no)
561561
562562
if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then
563563
case $PHP_LAYOUT in
@@ -577,7 +577,7 @@ fi
577577
578578
PHP_ARG_WITH(pear, [whether to install PEAR, and where],
579579
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
580-
--without-pear Do not install PEAR], DEFAULT)
580+
--without-pear Do not install PEAR], DEFAULT, no)
581581
582582
if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then
583583
install_pear="install-pear install-build install-headers install-programs"
@@ -594,7 +594,7 @@ fi
594594
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
595595
596596
PHP_ARG_ENABLE(safe-mode, whether to enable safe mode by default,
597-
[ --enable-safe-mode Enable safe mode by default.])
597+
[ --enable-safe-mode Enable safe mode by default.], no, no)
598598
599599
if test "$PHP_SAFE_MODE" = "yes"; then
600600
AC_DEFINE(PHP_SAFE_MODE,1,[ ])
@@ -624,16 +624,8 @@ AC_ARG_WITH(exec-dir,
624624
AC_MSG_RESULT([/usr/local/php/bin])
625625
])
626626
627-
PHP_ARG_WITH(openssl,for OpenSSL support,
628-
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ])
629-
630-
if test "$PHP_OPENSSL" != "no"; then
631-
ext_openssl_shared=$ext_shared
632-
PHP_SETUP_OPENSSL
633-
fi
634-
635627
PHP_ARG_ENABLE(sigchild,whether to enable PHP's own SIGCHLD handler,
636-
[ --enable-sigchild Enable PHP's own SIGCHLD handler.],no)
628+
[ --enable-sigchild Enable PHP's own SIGCHLD handler.], no, no)
637629
638630
if test "$PHP_SIGCHILD" = "yes"; then
639631
AC_DEFINE(PHP_SIGCHILD, 1, [ ])
@@ -642,7 +634,7 @@ else
642634
fi
643635
644636
PHP_ARG_ENABLE(magic-quotes,whether to enable magic quotes by default,
645-
[ --enable-magic-quotes Enable magic quotes by default.])
637+
[ --enable-magic-quotes Enable magic quotes by default.], no, no)
646638
647639
if test "$PHP_MAGIC_QUOTES" = "yes"; then
648640
AC_DEFINE(MAGIC_QUOTES, 1, [ ])
@@ -652,10 +644,10 @@ fi
652644
653645
PHP_ARG_ENABLE(rpath, whether to enable runpaths,
654646
[ --disable-rpath Disable passing additional runtime library
655-
search paths], yes)
647+
search paths], yes, no)
656648
657649
PHP_ARG_ENABLE(libgcc, whether to explicitly link against libgcc,
658-
[ --enable-libgcc Enable explicitly linking against libgcc])
650+
[ --enable-libgcc Enable explicitly linking against libgcc], no, no)
659651
660652
if test "$PHP_LIBGCC" = "yes"; then
661653
PHP_LIBGCC_LIBPATH(gcc)
@@ -667,17 +659,16 @@ if test "$PHP_LIBGCC" = "yes"; then
667659
fi
668660
669661
PHP_ARG_ENABLE(short-tags,whether to enable short tags by default,
670-
[ --disable-short-tags Disable the short-form <? start tag by default.],yes)
662+
[ --disable-short-tags Disable the short-form <? start tag by default.],yes, no)
671663
672664
if test "$PHP_SHORT_TAGS" = "yes"; then
673665
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,"1",[ ])
674666
else
675667
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,"0",[ ])
676668
fi
677669
678-
679670
PHP_ARG_ENABLE(dmalloc,whether to enable dmalloc,
680-
[ --enable-dmalloc Enable dmalloc])
671+
[ --enable-dmalloc Enable dmalloc], no, no)
681672
682673
if test "$PHP_DMALLOC" = "yes"; then
683674
@@ -691,27 +682,36 @@ if test "$PHP_DMALLOC" = "yes"; then
691682
fi
692683
693684
PHP_ARG_ENABLE(ipv6,whether to enable IPv6 support,
694-
[ --disable-ipv6 Disable IPv6 support],yes)
685+
[ --disable-ipv6 Disable IPv6 support], yes, no)
695686
696687
if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then
697688
AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
698689
fi
699690
691+
692+
dnl
693+
dnl OpenSSL configure
694+
dnl
695+
PHP_ARG_WITH(openssl,for OpenSSL support,
696+
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ])
697+
698+
if test "$PHP_OPENSSL" != "no"; then
699+
ext_openssl_shared=$ext_shared
700+
PHP_SETUP_OPENSSL
701+
fi
702+
703+
700704
AC_CHECK_LIB(crypt, crypt, [
701705
PHP_ADD_LIBRARY(crypt)
702706
PHP_ADD_LIBRARY(crypt, 1)
703707
AC_DEFINE(HAVE_CRYPT,1,[ ])
704708
])
705709
706-
707-
708710
divert(5)
709711
710712
dnl ## In diversion 5 we check which extensions should be compiled.
711713
dnl ## All of these are normally in the extension directories.
712714
713-
714-
715715
dnl Extension configuration.
716716
dnl -------------------------------------------------------------------------
717717
@@ -729,6 +729,17 @@ PHP_HELP_SEPARATOR([Extensions:
729729
730730
PHP_CONFIGURE_PART(Configuring extensions)
731731
732+
dnl
733+
dnl Check if all enabled by default extensions should be disabled
734+
dnl
735+
736+
AC_ARG_ENABLE(all,
737+
[ --disable-all Disable all extensions enabled by default.
738+
--enable-all Enable all extensions.
739+
], [
740+
PHP_ENABLE_ALL=$enableval
741+
])
742+
732743
# reading config stubs
733744
esyscmd(./scripts/config-stubs ext)
734745

ext/curl/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PHP_ARG_WITH(curl, for CURL support,
77

88
dnl Temporary option while we develop this aspect of the extension
99
PHP_ARG_WITH(curlwrappers, if we should use CURL for url streams,
10-
[ --with-curlwrappers Use CURL for url streams])
10+
[ --with-curlwrappers Use CURL for url streams], no, no)
1111

1212
if test "$PHP_CURL" != "no"; then
1313
if test -r $PHP_CURL/include/curl/easy.h; then

ext/domxml/config.m4

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ AC_DEFUN(PHP_DOM_EXSLT_CHECK_VERSION,[
108108
])
109109

110110
PHP_ARG_WITH(dom-xslt, for DOM XSLT support,
111-
[ --with-dom-xslt[=DIR] Include DOM XSLT support (requires libxslt >= 1.0.18).
112-
DIR is the libxslt install directory.])
111+
[ --with-dom-xslt[=DIR] DOMXML: Include DOM XSLT support (requires libxslt >= 1.0.18).
112+
DIR is the libxslt install directory.], no, no)
113113

114114
PHP_ARG_WITH(dom-exslt, for DOM EXSLT support,
115-
[ --with-dom-exslt[=DIR] Include DOM EXSLT support (requires libxslt >= 1.0.18).
116-
DIR is the libexslt install directory.])
115+
[ --with-dom-exslt[=DIR] DOMXML: Include DOM EXSLT support (requires libxslt >= 1.0.18).
116+
DIR is the libexslt install directory.], no, no)
117117

118118
if test "$PHP_DOM_XSLT" != "no"; then
119119

ext/gd/config.m4

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ PHP_ARG_WITH(gd, for GD support,
1010
[ --with-gd[=DIR] Include GD support (DIR is GD's install dir).])
1111

1212
PHP_ARG_WITH(jpeg-dir, for the location of libjpeg,
13-
[ --with-jpeg-dir=DIR GD: Set the path to libjpeg install prefix.])
13+
[ --with-jpeg-dir=DIR GD: Set the path to libjpeg install prefix.], no, no)
1414

1515
PHP_ARG_WITH(png-dir, for the location of libpng,
16-
[ --with-png-dir=DIR GD: Set the path to libpng install prefix.])
16+
[ --with-png-dir=DIR GD: Set the path to libpng install prefix.], no, no)
1717

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

2121
PHP_ARG_WITH(ttf, for FreeType 1.x support,
22-
[ --with-ttf[=DIR] GD: Include FreeType 1.x support])
22+
[ --with-ttf[=DIR] GD: Include FreeType 1.x support], no, no)
2323

2424
PHP_ARG_WITH(freetype-dir, for FreeType 2,
25-
[ --with-freetype-dir=DIR GD: Set the path to FreeType 2 install prefix.])
25+
[ --with-freetype-dir=DIR GD: Set the path to FreeType 2 install prefix.], no, no)
2626

2727
PHP_ARG_WITH(t1lib, for T1lib support,
28-
[ --with-t1lib[=DIR] GD: Include T1lib support.])
28+
[ --with-t1lib[=DIR] GD: Include T1lib support.], no, no)
2929

3030
PHP_ARG_ENABLE(gd-native-ttf, whether to enable truetype string function in GD,
31-
[ --enable-gd-native-ttf GD: Enable TrueType string function.])
31+
[ --enable-gd-native-ttf GD: Enable TrueType string function.], no, no)
3232

3333
dnl
3434
dnl Checks for the configure options

ext/mbstring/config.m4

+1-4
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@ fi
3535

3636

3737
PHP_ARG_ENABLE(mbregex, whether to enable multibyte regex support,
38-
[ --disable-mbregex Disable multibyte regex support], yes)
38+
[ --disable-mbregex Disable multibyte regex support], yes, no)
3939

4040
if test "$MBREGEX" != "no" ; then
4141
AC_DEFINE(HAVE_MBREGEX, 1, [whether to have multibyte regex support])
4242
fi
43-
44-
45-

ext/mysql/config.m4

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ AC_DEFUN(PHP_MYSQL_SOCKET_SEARCH, [
4343
])
4444

4545

46-
PHP_ARG_WITH(mysql-sock, for specified location of the MySQL UNIX socket,
47-
[ --with-mysql-sock[=DIR] Location of the MySQL unix socket pointer.
48-
If unspecified, the default locations are searched.])
49-
5046
PHP_ARG_WITH(mysql, for MySQL support,
5147
[ --with-mysql[=DIR] Include MySQL support. DIR is the MySQL base directory.
5248
If unspecified, the bundled MySQL library will be used.], yes)
5349

50+
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)
53+
5454
if test "$PHP_MYSQL" != "no"; then
5555
AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
5656

ext/pdf/config.m4

+4-6
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,21 @@ dnl
55
PHP_ARG_WITH(pdflib,for PDFlib support,
66
[ --with-pdflib[=DIR] Include PDFlib support.])
77

8-
pdflib_ext_shared=$ext_shared
9-
108
PHP_ARG_WITH(jpeg-dir, for the location of libjpeg,
119
[ --with-jpeg-dir[=DIR] PDFLIB: define libjpeg install directory.
12-
(OPTIONAL for PDFlib v4)])
10+
(OPTIONAL for PDFlib v4)], no, no)
1311

1412
PHP_ARG_WITH(png-dir, for the location of libpng,
1513
[ --with-png-dir[=DIR] PDFLIB: define libpng install directory.
16-
(OPTIONAL for PDFlib v4)])
14+
(OPTIONAL for PDFlib v4)], no, no)
1715

1816
PHP_ARG_WITH(tiff-dir, for the location of libtiff,
1917
[ --with-tiff-dir[=DIR] PDFLIB: define libtiff install directory.
20-
(OPTIONAL for PDFlib v4)])
18+
(OPTIONAL for PDFlib v4)], no, no)
2119

2220
if test "$PHP_PDFLIB" != "no"; then
2321

24-
PHP_NEW_EXTENSION(pdf, pdf.c, $pdflib_ext_shared)
22+
PHP_NEW_EXTENSION(pdf, pdf.c, $ext_shared)
2523
PHP_SUBST(PDFLIB_SHARED_LIBADD)
2624

2725
dnl #

ext/rpc/xmlrpc/config.m4

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ sinclude(libxmlrpc/xmlrpc.m4)
1010
PHP_ARG_WITH(xmlrpc, for XMLRPC-EPI support,
1111
[ --with-xmlrpc[=DIR] Include XMLRPC-EPI support.])
1212

13-
xmlrpc_ext_shared=$ext_shared
14-
1513
PHP_ARG_WITH(expat-dir, libexpat dir for XMLRPC-EPI,
16-
[ --with-expat-dir=DIR XMLRPC-EPI: libexpat dir for XMLRPC-EPI.])
14+
[ --with-expat-dir=DIR XMLRPC-EPI: libexpat dir for XMLRPC-EPI.],yes,no)
1715

1816
PHP_ARG_WITH(iconv-dir, iconv dir for XMLRPC-EPI,
19-
[ --with-iconv-dir=DIR XMLRPC-EPI: iconv dir for XMLRPC-EPI.])
17+
[ --with-iconv-dir=DIR XMLRPC-EPI: iconv dir for XMLRPC-EPI.],yes,no)
2018

2119
if test "$PHP_XMLRPC" != "no"; then
2220

@@ -58,7 +56,7 @@ if test "$PHP_XMLRPC" = "yes"; then
5856
libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
5957
libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
6058
libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
61-
libxmlrpc/xml_to_soap.c,$xmlrpc_ext_shared,,
59+
libxmlrpc/xml_to_soap.c,$ext_shared,,
6260
-I@ext_srcdir@/libxmlrpc -DVERSION="0.50")
6361
PHP_ADD_BUILD_DIR($ext_builddir/libxmlrpc)
6462
XMLRPC_MODULE_TYPE=builtin

0 commit comments

Comments
 (0)