1
- # # $Id$ -*- autoconf -*-
1
+ # # $Id$ -*- autoconf -*-
2
2
dnl ## Process this file with autoconf to produce a configure script.
3
3
4
4
divert ( 1 )
@@ -10,8 +10,6 @@ dnl ## options and check for the basic compile tools.
10
10
dnl ## Diversion 2 is the initial checking of OS features, programs,
11
11
dnl ## libraries and so on.
12
12
13
-
14
-
15
13
dnl ## In diversion 3 we check for compile-time options to the PHP
16
14
dnl ## core and how to deal with different system dependencies. This
17
15
dnl ## includes what regex library is used and whether debugging or short
@@ -131,9 +129,8 @@ AC_AIX
131
129
AC_PROG_LN_S
132
130
133
131
dnl Support systems with system libraries in e.g. /usr/lib64
134
- AC_ARG_WITH ( libdir ,
135
- [ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib] ,
136
- [ PHP_LIBDIR=$withval] , [ PHP_LIBDIR=lib] )
132
+ PHP_ARG_WITH(libdir, for system library directory,
133
+ [ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib] ,lib,no)
137
134
138
135
dnl check for -R, etc. switch
139
136
PHP_RUNPATH_SWITCH
707
704
ZEND_DEBUG=no
708
705
fi
709
706
710
- PHP_ARG_WITH(layout,[ layout of installed files] ,
711
- [ --with-layout=TYPE Set how installed files will be laid out. Type is
712
- one of " PHP" or " GNU" [ TYPE= PHP] ] , PHP, no)
707
+ PHP_ARG_WITH(layout, layout of installed files,
708
+ [ --with-layout=TYPE Set how installed files will be laid out. Type can
709
+ be either PHP or GNU [ PHP] ] , PHP, no)
713
710
714
711
case $PHP_LAYOUT in
715
712
GNU)
@@ -720,7 +717,7 @@ case $PHP_LAYOUT in
720
717
;;
721
718
esac
722
719
723
- PHP_ARG_WITH(config-file-path,[ path to configuration file] ,
720
+ PHP_ARG_WITH(config-file-path, path to configuration file,
724
721
[ --with-config-file-path=PATH
725
722
Set the path in which to look for php.ini [ PREFIX/lib] ] , DEFAULT, no)
726
723
@@ -735,12 +732,14 @@ if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then
735
732
esac
736
733
fi
737
734
738
- PHP_ARG_WITH(config-file-scan-dir,[ where to scan for configuration files] ,
735
+ AC_MSG_CHECKING ( [ where to scan for configuration files] )
736
+ PHP_ARG_WITH(config-file-scan-dir,,
739
737
[ --with-config-file-scan-dir=PATH
740
738
Set the path where to scan for configuration files] , DEFAULT, no)
741
739
if test "$PHP_CONFIG_FILE_SCAN_DIR" = "DEFAULT"; then
742
740
PHP_CONFIG_FILE_SCAN_DIR=
743
741
fi
742
+ AC_MSG_RESULT ( [ $PHP_CONFIG_FILE_SCAN_DIR] )
744
743
745
744
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
746
745
@@ -754,28 +753,19 @@ else
754
753
fi
755
754
756
755
AC_MSG_CHECKING ( [ for safe mode exec dir] )
757
- AC_ARG_WITH ( exec-dir ,
756
+ PHP_ARG_WITH (exec-dir, ,
758
757
[ --with-exec-dir[ =DIR] Only allow executables in DIR under safe-mode
759
- [ /usr/local/php/bin] ] ,
760
- [
761
- if test "$withval" != "no"; then
762
- if test "$withval" = "yes"; then
763
- AC_DEFINE ( PHP_SAFE_MODE_EXEC_DIR ,"/usr/local/php/bin" , [ ] )
764
- AC_MSG_RESULT ( [ /usr/local/php/bin] )
765
- else
766
- AC_DEFINE_UNQUOTED ( PHP_SAFE_MODE_EXEC_DIR ,"$withval" , [ ] )
767
- AC_MSG_RESULT ( [ $withval] )
768
- fi
769
- else
770
- AC_DEFINE ( PHP_SAFE_MODE_EXEC_DIR ,"/usr/local/php/bin" , [ ] )
771
- AC_MSG_RESULT ( [ /usr/local/php/bin] )
772
- fi
773
- ] ,[
774
- AC_DEFINE ( PHP_SAFE_MODE_EXEC_DIR ,"/usr/local/php/bin" , [ ] )
758
+ [ /usr/local/php/bin] ] , no, no)
759
+
760
+ if test "$PHP_EXEC_DIR" != "no" && test "$PHP_EXEC_DIR" != "yes" ; then
761
+ AC_DEFINE_UNQUOTED ( PHP_SAFE_MODE_EXEC_DIR , "$PHP_EXEC_DIR" , [ ] )
762
+ AC_MSG_RESULT ( [ $PHP_EXEC_DIR] )
763
+ else
764
+ AC_DEFINE ( PHP_SAFE_MODE_EXEC_DIR , "/usr/local/php/bin" , [ ] )
775
765
AC_MSG_RESULT ( [ /usr/local/php/bin] )
776
- ] )
766
+ fi
777
767
778
- PHP_ARG_ENABLE(sigchild,whether to enable PHP's own SIGCHLD handler,
768
+ PHP_ARG_ENABLE(sigchild, whether to enable PHP's own SIGCHLD handler,
779
769
[ --enable-sigchild Enable PHP's own SIGCHLD handler] , no, no)
780
770
781
771
if test "$PHP_SIGCHILD" = "yes"; then
784
774
AC_DEFINE ( PHP_SIGCHILD , 0 , [ ] )
785
775
fi
786
776
787
- PHP_ARG_ENABLE(magic-quotes,whether to enable magic quotes by default,
777
+ PHP_ARG_ENABLE(magic-quotes, whether to enable magic quotes by default,
788
778
[ --enable-magic-quotes Enable magic quotes by default.] , no, no)
789
779
790
780
if test "$PHP_MAGIC_QUOTES" = "yes"; then
@@ -809,20 +799,19 @@ if test "$PHP_LIBGCC" = "yes"; then
809
799
PHP_ADD_LIBRARY(gcc, yes)
810
800
fi
811
801
812
- PHP_ARG_ENABLE(short-tags,whether to enable short tags by default,
813
- [ --disable-short-tags Disable the short-form <? start tag by default] ,yes, no)
802
+ PHP_ARG_ENABLE(short-tags, whether to enable short tags by default,
803
+ [ --disable-short-tags Disable the short-form <? start tag by default] , yes, no)
814
804
815
805
if test "$PHP_SHORT_TAGS" = "yes"; then
816
- AC_DEFINE ( DEFAULT_SHORT_OPEN_TAG ,"1" ,[ ] )
806
+ AC_DEFINE ( DEFAULT_SHORT_OPEN_TAG , "1" , [ ] )
817
807
else
818
- AC_DEFINE ( DEFAULT_SHORT_OPEN_TAG ,"0" ,[ ] )
808
+ AC_DEFINE ( DEFAULT_SHORT_OPEN_TAG , "0" , [ ] )
819
809
fi
820
810
821
- PHP_ARG_ENABLE(dmalloc,whether to enable dmalloc,
811
+ PHP_ARG_ENABLE(dmalloc, whether to enable dmalloc,
822
812
[ --enable-dmalloc Enable dmalloc] , no, no)
823
813
824
814
if test "$PHP_DMALLOC" = "yes"; then
825
-
826
815
AC_CHECK_LIB ( dmalloc , dmalloc_error , [
827
816
PHP_ADD_LIBRARY(dmalloc)
828
817
AC_DEFINE ( HAVE_DMALLOC ,1 ,[ Whether you have dmalloc] )
@@ -832,25 +821,23 @@ if test "$PHP_DMALLOC" = "yes"; then
832
821
] )
833
822
fi
834
823
835
- PHP_ARG_ENABLE(ipv6,whether to enable IPv6 support,
824
+ PHP_ARG_ENABLE(ipv6, whether to enable IPv6 support,
836
825
[ --disable-ipv6 Disable IPv6 support] , yes, no)
837
826
838
827
if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then
839
- AC_DEFINE ( HAVE_IPV6 ,1 , [ Whether to enable IPv6 support] )
828
+ AC_DEFINE ( HAVE_IPV6 , 1 , [ Whether to enable IPv6 support] )
840
829
fi
841
830
842
831
AC_MSG_CHECKING ( [ how big to make fd sets] )
843
- AC_ARG_ENABLE ( fd-setsize ,
844
- [ --enable-fd-setsize Set size of descriptor sets] ,[
845
- if test "x$enableval" != "xyes"; then
846
- CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$enableval"
847
- AC_MSG_RESULT ( using $enableval )
848
- else
849
- AC_MSG_RESULT ( using system default )
850
- fi
851
- ] ,[
852
- AC_MSG_RESULT ( using system default )
853
- ] )
832
+ PHP_ARG_ENABLE(fd-setsize,,
833
+ [ --enable-fd-setsize Set size of descriptor sets] , no, no)
834
+
835
+ if test "$PHP_FD_SETSIZE" != "yes"; then
836
+ CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PHP_FD_SETSIZE"
837
+ AC_MSG_RESULT ( [ using $PHP_FD_SETSIZE] )
838
+ else
839
+ AC_MSG_RESULT ( [ using system default] )
840
+ fi
854
841
855
842
divert ( 5 )
856
843
@@ -932,7 +919,7 @@ if test -z "$with_pear" && test "$enable_pear" = "no"; then
932
919
fi
933
920
934
921
# If CLI is disabled -> disable PEAR
935
- if test "$PHP_SAPI_CLI " = "no"; then
922
+ if test "$PHP_CLI " = "no"; then
936
923
with_pear=no
937
924
fi
938
925
@@ -1146,7 +1133,7 @@ case $host_alias in
1146
1133
;;
1147
1134
esac
1148
1135
1149
- if test "$PHP_SAPI_CLI " != "no"; then
1136
+ if test "$PHP_CLI " != "no"; then
1150
1137
PHP_CLI_TARGET="\$(SAPI_CLI_PATH)"
1151
1138
PHP_INSTALL_CLI_TARGET="install-cli"
1152
1139
PHP_ADD_SOURCES(sapi/cli, php_cli.c php_cli_readline.c getopt.c,, cli)
@@ -1365,6 +1352,14 @@ scripts/phpize scripts/man1/phpize.1 \
1365
1352
scripts/php-config scripts/man1/php-config.1 \
1366
1353
$PHP_OUTPUT_FILES"
1367
1354
1355
+ dnl
1356
+ dnl Check for unknown configure options
1357
+ dnl
1358
+ PHP_CHECK_CONFIGURE_OPTIONS
1359
+
1360
+ dnl
1361
+ dnl Generate build files
1362
+ dnl
1368
1363
AC_OUTPUT ($ALL_OUTPUT_FILES, [ ] , [
1369
1364
1370
1365
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
@@ -1426,17 +1421,15 @@ dnl fi
1426
1421
1427
1422
# Warn about CGI version with no extra security options.
1428
1423
if test "$PHP_SAPI" = "cgi"; then
1429
- if test "$REDIRECT" = "0"; then
1430
- if test "$DISCARD_PATH" = "0"; then
1431
- echo "+--------------------------------------------------------------------+"
1432
- echo "| *** WARNING *** |"
1433
- echo "| |"
1434
- echo "| You will be compiling the CGI version of PHP without any |"
1435
- echo "| redirection checking. By putting this cgi binary somewhere in |"
1436
- echo "| your web space, users may be able to circumvent existing .htaccess |"
1437
- echo "| security by loading files directly through the parser. See |"
1438
- echo "| http://www.php.net/manual/security.php for more details. |"
1439
- fi
1424
+ if test "$PHP_FORCE_CGI_REDIRECT" = "no" && test "$PHP_DISCARD_PATH" = "no"; then
1425
+ echo "+--------------------------------------------------------------------+"
1426
+ echo "| *** WARNING *** |"
1427
+ echo "| |"
1428
+ echo "| You will be compiling the CGI version of PHP without any |"
1429
+ echo "| redirection checking. By putting this cgi binary somewhere in |"
1430
+ echo "| your web space, users may be able to circumvent existing .htaccess |"
1431
+ echo "| security by loading files directly through the parser. See |"
1432
+ echo "| http://www.php.net/manual/security.php for more details. |"
1440
1433
fi
1441
1434
fi
1442
1435
@@ -1498,6 +1491,15 @@ Thank you for using PHP.
1498
1491
1499
1492
X
1500
1493
1494
+ # Output unknown configure options
1495
+ if test "$PHP_UNKNOWN_CONFIGURE_OPTIONS"; then
1496
+ echo "Notice: Following unknown configure options were used:
1497
+ $PHP_UNKNOWN_CONFIGURE_OPTIONS
1498
+
1499
+ Check '[ $] 0 --help' for available options
1500
+ "
1501
+ fi
1502
+
1501
1503
fi
1502
1504
] )
1503
1505
0 commit comments