1 ## $Id$ -*- autoconf -*-
2 dnl ## Process this file with autoconf to produce a configure script.
4 dnl include Zend specific macro definitions first
5 dnl -------------------------------------------------------------------------
6 sinclude(Zend/acinclude.m4)
8 dnl Basic autoconf + automake initialization, generation of config.nice.
9 dnl -------------------------------------------------------------------------
12 AC_INIT(README.GIT-RULES)
13 ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
15 PHP_CONFIG_NICE(config.nice)
17 PHP_CANONICAL_HOST_TARGET
19 AC_CONFIG_HEADER(main/php_config.h)
21 #if defined(__GNUC__) && __GNUC__ >= 4
22 # define ZEND_API __attribute__ ((visibility("default")))
23 # define ZEND_DLEXPORT __attribute__ ((visibility("default")))
26 # define ZEND_DLEXPORT
34 /* Define if you want to enable memory limit support */
35 #define MEMORY_LIMIT 0
38 #ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
44 #ifdef HAVE_SYS_TYPES_H
45 # include <sys/types.h>
48 #ifdef HAVE_SYS_SELECT_H
49 #include <sys/select.h>
62 #if ZEND_BROKEN_SPRINTF
63 int zend_sprintf(char *buffer, const char *format, ...);
65 # define zend_sprintf sprintf
70 /* To enable the is_nan, is_infinite and is_finite PHP functions */
74 #define HAVE_ISFINITE 1
79 #define zend_isnan(a) isnan(a)
80 #elif defined(HAVE_FPCLASS)
81 #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
83 #define zend_isnan(a) 0
88 #define zend_isinf(a) isinf(a)
89 #elif defined(INFINITY)
90 /* Might not work, but is required by ISO C99 */
91 #define zend_isinf(a) (((a)==INFINITY)?1:0)
92 #elif defined(HAVE_FPCLASS)
93 #define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
95 #define zend_isinf(a) 0
99 #define zend_finite(a) finite(a)
100 #elif defined(HAVE_ISFINITE) || defined(isfinite)
101 #define zend_finite(a) isfinite(a)
102 #elif defined(fpclassify)
103 #define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
105 #define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
108 #endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
112 #/*This detection against winsock is of no use*/ undef HAVE_SOCKLEN_T
113 #/*This detection against winsock is of no use*/ undef HAVE_SYS_SOCKET_H
122 PHP_RELEASE_VERSION=14
124 PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
125 PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
127 dnl Allow version values to be used in Makefile
128 PHP_SUBST(PHP_MAJOR_VERSION)
129 PHP_SUBST(PHP_MINOR_VERSION)
130 PHP_SUBST(PHP_RELEASE_VERSION)
131 PHP_SUBST(PHP_EXTRA_VERSION)
133 dnl Define where extension directories are located in the configure context
134 AC_DEFUN([PHP_EXT_BUILDDIR],[ext/$1])dnl
135 AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
136 AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
137 AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
139 dnl Setting up the PHP version based on the information above.
140 dnl -------------------------------------------------------------------------
142 echo "/* automatically generated by configure */" > php_version.h.new
143 echo "/* edit configure.in to change version number */" >> php_version.h.new
144 echo "#define PHP_MAJOR_VERSION $PHP_MAJOR_VERSION" >> php_version.h.new
145 echo "#define PHP_MINOR_VERSION $PHP_MINOR_VERSION" >> php_version.h.new
146 echo "#define PHP_RELEASE_VERSION $PHP_RELEASE_VERSION" >> php_version.h.new
147 echo "#define PHP_EXTRA_VERSION \"$PHP_EXTRA_VERSION\"" >> php_version.h.new
148 echo "#define PHP_VERSION \"$PHP_VERSION\"" >> php_version.h.new
149 echo "#define PHP_VERSION_ID $PHP_VERSION_ID" >> php_version.h.new
150 cmp php_version.h.new $srcdir/main/php_version.h >/dev/null 2>&1
151 if test $? -ne 0 ; then
152 rm -f $srcdir/main/php_version.h && mv php_version.h.new $srcdir/main/php_version.h && \
153 echo 'Updated main/php_version.h'
155 rm -f php_version.h.new
159 dnl Catch common errors here to save a few seconds of our users' time
160 dnl -------------------------------------------------------------------------
162 if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then
163 AC_MSG_ERROR([--with-shared-apache is not supported. Please refer to the documentation for using APXS])
166 if test -n "$with_apache" && test -n "$with_apxs"; then
167 AC_MSG_ERROR([--with-apache and --with-apxs cannot be used together])
170 if test -n "$with_apxs2filter" && test -n "$with_apxs2"; then
171 AC_MSG_ERROR([--with-apxs2filter and --with-apxs2 cannot be used together])
175 dnl Settings we want to make before the checks.
176 dnl -------------------------------------------------------------------------
180 php_shtool=$srcdir/build/shtool
181 T_MD=`$php_shtool echo -n -e %B`
182 T_ME=`$php_shtool echo -n -e %b`
184 PHP_INIT_BUILD_SYSTEM
186 dnl We want this one before the checks, so the checks can modify CFLAGS.
187 test -z "$CFLAGS" && auto_cflags=1
189 abs_srcdir=`(cd $srcdir; pwd)`
192 php_abs_top_srcdir=$abs_srcdir
193 php_abs_top_builddir=$abs_builddir
195 dnl Because ``make install'' is often performed by the superuser,
196 dnl we create the libs subdirectory as the user who configures PHP.
197 dnl Otherwise, the current user will not be able to delete libs
198 dnl or the contents of libs.
200 $php_shtool mkdir -p libs
203 dnl Checks for programs.
204 dnl -------------------------------------------------------------------------
210 dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
216 dnl Support systems with system libraries in e.g. /usr/lib64
217 PHP_ARG_WITH(libdir, for system library directory,
218 [ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib],lib,no)
220 PHP_ARG_ENABLE(rpath, whether to enable runpaths,
221 [ --disable-rpath Disable passing additional runtime library
222 search paths], yes, no)
224 dnl check for -R, etc. switch
227 dnl Checks for some support/generator progs
232 dnl Check if bison generated files exist when bison does not..
233 case $php_cv_bison_version in
235 if ! test -f "$abs_srcdir/Zend/zend_language_parser.h" || ! test -f "$abs_srcdir/Zend/zend_language_parser.c" ; then
236 AC_MSG_ERROR([bison is required to build PHP/Zend when building a GIT checkout!])
241 PHP_ARG_ENABLE(re2c-cgoto, whether to enable computed goto gcc extension with re2c,
242 [ --enable-re2c-cgoto Enable -g flag to re2c to use computed goto gcc extension], no, no)
244 if test "$PHP_RE2C_CGOTO" = "no"; then
247 AC_MSG_CHECKING([whether re2c -g works])
249 int main(int argc, const char **argv)
255 static void *adr[] = { &&label1, &&label2};
267 PHP_SUBST(RE2C_FLAGS)
269 dnl Platform-specific compile settings.
270 dnl -------------------------------------------------------------------------
275 if test "$GCC" = "yes"; then
276 CFLAGS="$CFLAGS -mieee"
278 CFLAGS="$CFLAGS -ieee"
282 if test "$SUNCC" = "yes"; then
283 CFLAGS="$CFLAGS -xmemalign=8s"
288 dnl activate some gcc specific optimizations for gcc >= 4
289 if test "$GCC" = "yes"; then
292 GCC_MAJOR_VERSION=`$CC -dumpversion | /usr/bin/sed -nE '1s/([[0-9]]+)\.[[0-9]]+\..*/\1/;1p'`
295 GCC_MAJOR_VERSION=`$CC --version | $SED -n '1s/[[^0-9]]*//;1s/\..*//;1p'`
298 if test $GCC_MAJOR_VERSION -ge 4; then
299 CFLAGS="$CFLAGS -fvisibility=hidden"
305 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
306 if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then
311 CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR"
314 if test -n "$GCC"; then
315 PHP_CHECK_GCC_ARG(-no-cpp-precomp, gcc_no_cpp_precomp=yes)
316 if test "$gcc_no_cpp_precomp" = "yes"; then
317 CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
320 php_multiple_shlib_versions_ok=yes
324 LIBS="$LIBS -lbe -lroot"
327 CPPFLAGS="$CPPFLAGS -D_XPG_IV"
330 if test "$GCC" = "yes"; then
331 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
336 PHP_ADD_SOURCES(/main, internal_functions.c,,PHP_GLOBAL_OBJS)
337 PHP_ADD_SOURCES(win32, sendmail.c, -I$CFLAGS, PHP_GLOBAL_OBJS)
338 PHP5LIB_SHARED_LIBADD=\$\(EXTRA_LIBS\)
339 EXTENSION_DIR=sys:/php$PHP_MAJOR_VERSION/ext
340 PHP_SUBST(PHP5LIB_SHARED_LIBADD)
341 PHP_SHARED_MODULE(php5lib, PHP_GLOBAL_OBJS, netware)
345 # Disable PIC mode by default where it is known to be safe to do so,
346 # to avoid the performance hit from the lost register
347 AC_MSG_CHECKING([whether to force non-PIC code in shared modules])
349 i?86-*-linux*|i?86-*-freebsd*)
350 if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then
363 dnl Include Zend and TSRM configurations.
364 dnl -------------------------------------------------------------------------
366 sinclude(Zend/Zend.m4)
367 sinclude(TSRM/threads.m4)
368 sinclude(TSRM/tsrm.m4)
371 dnl -------------------------------------------------------------------------
374 PHP_HELP_SEPARATOR([SAPI modules:])
375 PHP_SHLIB_SUFFIX_NAMES
380 dnl SAPI configuration.
381 dnl -------------------------------------------------------------------------
383 dnl paths to the targets are relative to the build directory
384 SAPI_SHARED=libs/libphp[]$PHP_MAJOR_VERSION[.]$SHLIB_DL_SUFFIX_NAME
385 SAPI_STATIC=libs/libphp[]$PHP_MAJOR_VERSION[.a]
386 SAPI_LIBTOOL=libphp[]$PHP_MAJOR_VERSION[.la]
388 PHP_CONFIGURE_PART(Configuring SAPI modules)
390 esyscmd(./build/config-stubs sapi)
392 dnl Show which main SAPI was selected
393 AC_MSG_CHECKING([for chosen SAPI module])
394 AC_MSG_RESULT([$PHP_SAPI])
396 dnl Show which binaries were selected
397 AC_MSG_CHECKING([for executable SAPI binaries])
398 if test "$PHP_BINARIES"; then
399 AC_MSG_RESULT([$PHP_BINARIES])
401 AC_MSG_RESULT([none])
405 if test -z "$PHP_INSTALLED_SAPIS"; then
406 AC_MSG_ERROR([Nothing to build.])
410 if test "$enable_maintainer_zts" = "yes"; then
415 dnl Starting system checks.
416 dnl -------------------------------------------------------------------------
418 PHP_CONFIGURE_PART(Running system checks)
420 dnl Find sendmail binary
423 dnl Check whether the system uses EBCDIC (not ASCII) as its native codeset
426 dnl Check whether the system byte ordering is bigendian
429 dnl Check whether writing to stdout works
430 PHP_TEST_WRITE_STDOUT
432 dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
433 dnl and source packages. This should be harmless on other OSs.
434 if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
435 CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
436 LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
438 test -d /usr/ucblib && PHP_ADD_LIBPATH(/usr/ucblib)
441 dnl First, library checks.
442 dnl -------------------------------------------------------------------------
444 dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try
445 dnl to avoid -lnsl checks, if we already have the functions which
446 dnl are usually in libnsl
447 dnl Also, uClibc will bark at linking with glibc's libnsl.
449 PHP_CHECK_FUNC(socket, socket)
450 PHP_CHECK_FUNC(socketpair, socket)
451 PHP_CHECK_FUNC(htonl, socket)
452 PHP_CHECK_FUNC(gethostname, nsl)
453 PHP_CHECK_FUNC(gethostbyaddr, nsl)
454 PHP_CHECK_FUNC(yp_get_default_domain, nsl)
459 ac_cv_func_dlopen=yes
460 if test "$ac_cv_func_dlopen" = "yes"; then
461 AC_DEFINE(HAVE_LIBDL, 1, [ ])
465 dnl Check for inet_aton
466 dnl in -lc, -lbind and -lresolv
467 PHP_CHECK_FUNC(inet_aton, resolv, bind)
470 dnl -------------------------------------------------------------------------
472 dnl Checks for header files.
476 dnl QNX requires unix.h to allow functions in libunix to work properly
481 ApplicationServices/ApplicationServices.h \
533 #ifdef HAVE_SYS_PARAM_H
534 #include <sys/param.h>
536 #ifdef HAVE_SYS_TYPES_H
537 #include <sys/types.h>
539 #ifdef HAVE_SYS_TIME_H
540 #include <sys/time.h>
542 #ifdef HAVE_NETINET_IN_H
543 #include <netinet/in.h>
545 #ifdef HAVE_ARPA_NAMESER_H
546 #include <arpa/nameser.h>
552 PHP_BROKEN_GLIBC_FOPEN_APPEND
554 dnl Checks for typedefs, structures, and compiler characteristics.
555 dnl -------------------------------------------------------------------------
560 PHP_MISSING_TIME_R_DECL
561 PHP_MISSING_FCLOSE_DECL
567 AC_CHECK_SIZEOF(size_t, 8)
568 AC_CHECK_SIZEOF(long long, 8)
569 AC_CHECK_SIZEOF(long long int, 8)
570 AC_CHECK_SIZEOF(long, 8)
571 AC_CHECK_SIZEOF(int, 4)
573 dnl These are defined elsewhere than stdio.h
574 PHP_CHECK_SIZEOF(intmax_t, 0)
575 PHP_CHECK_SIZEOF(ssize_t, 8)
576 PHP_CHECK_SIZEOF(ptrdiff_t, 8)
578 dnl Check for members of the stat structure
580 dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exists
581 dnl The WARNING_LEVEL required because cc in QNX hates -w option without an argument
582 if test "`uname -s 2>/dev/null`" != "QNX"; then
585 AC_MSG_WARN([warnings level for cc set to 0])
594 dnl Checks for sockaddr_storage and sockaddr.sa_len
597 dnl Check for IPv6 support
598 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
599 [AC_TRY_LINK([ #include <sys/types.h>
600 #include <sys/socket.h>
601 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;],
602 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
604 dnl Checks for library functions.
605 dnl -------------------------------------------------------------------------
693 dnl Some systems (like OpenSolaris) do not have nanosleep in libc
694 PHP_CHECK_FUNC_LIB(nanosleep, rt)
696 dnl Check for getaddrinfo, should be a better way, but...
697 dnl Also check for working getaddrinfo
698 AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
699 [AC_TRY_LINK([#include <netdb.h>],
700 [struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);],
703 #include <sys/types.h>
705 # include <sys/socket.h>
708 struct addrinfo *ai, *pai, hints;
710 memset(&hints, 0, sizeof(hints));
711 hints.ai_flags = AI_NUMERICHOST;
713 if (getaddrinfo("127.0.0.1", 0, &hints, &ai) < 0) {
724 if (pai->ai_family != AF_INET) {
725 /* 127.0.0.1/NUMERICHOST should only resolve ONE way */
728 if (pai->ai_addr->sa_family != AF_INET) {
729 /* 127.0.0.1/NUMERICHOST should only resolve ONE way */
737 ],ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no, ac_cv_func_getaddrinfo=no),
738 ac_cv_func_getaddrinfo=no)])
739 if test "$ac_cv_func_getaddrinfo" = yes; then
740 AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo function])
743 dnl Check for the __sync_fetch_and_add builtin
744 AC_CACHE_CHECK([for __sync_fetch_and_add], ac_cv_func_sync_fetch_and_add,
745 [AC_TRY_LINK([],[int x;__sync_fetch_and_add(&x,1);],ac_cv_func_sync_fetch_and_add=yes,ac_cv_func_sync_fetch_and_add=no)])
746 if test "$ac_cv_func_sync_fetch_and_add" = yes; then
747 AC_DEFINE(HAVE_SYNC_FETCH_AND_ADD,1,[Define if you have the __sync_fetch_and_add function])
750 AC_REPLACE_FUNCS(strlcat strlcpy getopt)
753 dnl PHP_AC_BROKEN_SPRINTF
754 dnl PHP_AC_BROKEN_SNPRINTF
755 PHP_DECLARED_TIMEZONE
760 AC_CHECK_FUNCS(crypt_r, [ php_crypt_r="1" ], [ php_crypt_r="0" ])
761 if test "x$php_crypt_r" = "x1"; then
765 dnl General settings.
766 dnl -------------------------------------------------------------------------
767 PHP_CONFIGURE_PART(General settings)
769 PHP_HELP_SEPARATOR([General settings:])
771 PHP_ARG_ENABLE(gcov, whether to include gcov symbols,
772 [ --enable-gcov Enable GCOV code coverage (requires LTP) - FOR DEVELOPERS ONLY!!], no, no)
774 if test "$PHP_GCOV" = "yes"; then
776 if test "$GCC" != "yes"; then
777 AC_MSG_ERROR([GCC is required for --enable-gcov])
780 dnl Check if ccache is being used
781 case `$php_shtool path $CC` in
782 *ccache*[)] gcc_ccache=yes;;
786 if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
787 AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
790 ltp_version_list="1.5 1.6 1.7"
792 AC_CHECK_PROG(LTP, lcov, lcov)
793 AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
795 PHP_SUBST(LTP_GENHTML)
798 AC_CACHE_CHECK([for ltp version], php_cv_ltp_version, [
799 php_cv_ltp_version=invalid
800 ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
801 for ltp_check_version in $ltp_version_list; do
802 if test "$ltp_version" = "$ltp_check_version"; then
803 php_cv_ltp_version="$ltp_check_version (ok)"
808 ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list"
809 AC_MSG_ERROR([$ltp_msg])
812 case $php_cv_ltp_version in
814 ltp_msg="You must have one of the following versions of LTP: $ltp_version_list (found: $ltp_version)."
815 AC_MSG_ERROR([$ltp_msg])
820 if test -z "$LTP_GENHTML"; then
821 AC_MSG_ERROR([Could not find genhtml from the LTP package])
824 AC_DEFINE(HAVE_GCOV, 1, [Whether you have gcov])
825 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.gcov, $abs_srcdir)
827 dnl Remove all optimization flags from CFLAGS
829 CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
830 CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
833 dnl Add the special gcc flags
834 CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
835 CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage"
838 PHP_ARG_ENABLE(debug, whether to include debugging symbols,
839 [ --enable-debug Compile with debugging symbols], no, no)
841 if test "$PHP_DEBUG" = "yes"; then
845 CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
846 CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
848 dnl add -O0 only if GCC or ICC is used
849 if test "$GCC" = "yes" || test "$ICC" = "yes"; then
851 CXXFLAGS="$CXXFLAGS -g -O0"
853 if test "$SUNCC" = "yes"; then
854 if test -n "$auto_cflags"; then
859 CXXFLAGS="$CFLAGS -g"
867 PHP_ARG_WITH(layout, layout of installed files,
868 [ --with-layout=TYPE Set how installed files will be laid out. Type can
869 be either PHP or GNU @<:@PHP@:>@], PHP, no)
880 PHP_ARG_WITH(config-file-path, path to configuration file,
881 [ --with-config-file-path=PATH
882 Set the path in which to look for php.ini @<:@PREFIX/lib@:>@], DEFAULT, no)
884 if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then
887 PHP_CONFIG_FILE_PATH=$sysconfdir
890 PHP_CONFIG_FILE_PATH=$libdir
895 AC_MSG_CHECKING([where to scan for configuration files])
896 PHP_ARG_WITH(config-file-scan-dir,,
897 [ --with-config-file-scan-dir=PATH
898 Set the path where to scan for configuration files], DEFAULT, no)
899 if test "$PHP_CONFIG_FILE_SCAN_DIR" = "DEFAULT"; then
900 PHP_CONFIG_FILE_SCAN_DIR=
902 AC_MSG_RESULT([$PHP_CONFIG_FILE_SCAN_DIR])
904 test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
906 PHP_ARG_ENABLE(sigchild, whether to enable PHP's own SIGCHLD handler,
907 [ --enable-sigchild Enable PHP's own SIGCHLD handler], no, no)
909 if test "$PHP_SIGCHILD" = "yes"; then
910 AC_DEFINE(PHP_SIGCHILD, 1, [ ])
912 AC_DEFINE(PHP_SIGCHILD, 0, [ ])
915 PHP_ARG_ENABLE(libgcc, whether to explicitly link against libgcc,
916 [ --enable-libgcc Enable explicitly linking against libgcc], no, no)
918 if test "$PHP_LIBGCC" = "yes"; then
919 PHP_LIBGCC_LIBPATH(gcc)
920 if test -z "$libgcc_libpath"; then
921 AC_MSG_ERROR([Cannot locate libgcc. Make sure that gcc is in your path])
923 PHP_ADD_LIBPATH($libgcc_libpath)
924 PHP_ADD_LIBRARY(gcc, yes)
927 PHP_ARG_ENABLE(short-tags, whether to enable short tags by default,
928 [ --disable-short-tags Disable the short-form <? start tag by default], yes, no)
930 if test "$PHP_SHORT_TAGS" = "yes"; then
931 AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, "1", [ ])
933 AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, "0", [ ])
936 PHP_ARG_ENABLE(dmalloc, whether to enable dmalloc,
937 [ --enable-dmalloc Enable dmalloc], no, no)
939 if test "$PHP_DMALLOC" = "yes"; then
940 AC_CHECK_LIB(dmalloc, dmalloc_error, [
941 PHP_ADD_LIBRARY(dmalloc)
942 AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
943 CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
945 AC_MSG_ERROR([Problem with enabling dmalloc. Please check config.log for details.])
949 PHP_ARG_ENABLE(ipv6, whether to enable IPv6 support,
950 [ --disable-ipv6 Disable IPv6 support], yes, no)
952 if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then
953 AC_DEFINE(HAVE_IPV6, 1, [Whether to enable IPv6 support])
958 dnl ## Note: this has to be done after SAPI configuration!
960 PHP_ARG_ENABLE(dtrace, whether to enable DTrace support,
961 [ --enable-dtrace Enable DTrace support], no, no)
963 if test "$PHP_DTRACE" = "yes"; then
964 AC_CHECK_HEADERS([sys/sdt.h], [
965 PHP_INIT_DTRACE([Zend/zend_dtrace.d],[Zend/zend_dtrace_gen.h],[main/main.c Zend/zend_API.c \
966 Zend/zend_execute.c Zend/zend_exceptions.c \
967 Zend/zend_dtrace.c Zend/zend.c])
968 AC_DEFINE(HAVE_DTRACE, 1, [Whether to enable DTrace support])
969 PHP_SUBST(PHP_DTRACE_OBJS)
971 AC_MSG_ERROR([Cannot find sys/sdt.h which is required for DTrace support])
975 AC_MSG_CHECKING([how big to make fd sets])
976 PHP_ARG_ENABLE(fd-setsize,,
977 [ --enable-fd-setsize Set size of descriptor sets], no, no)
979 if test "$PHP_FD_SETSIZE" != "no"; then
980 if test "0$PHP_FD_SETSIZE" -gt 0 2>/dev/null; then
981 CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PHP_FD_SETSIZE"
982 AC_MSG_RESULT([using $PHP_FD_SETSIZE])
984 AC_MSG_ERROR([Invalid value passed to --enable-fd-setsize!])
987 AC_MSG_RESULT([using system default])
990 dnl Extension configuration.
991 dnl -------------------------------------------------------------------------
993 PHP_HELP_SEPARATOR([Extensions:
995 --with-EXTENSION=[shared[,PATH]]
997 NOTE: Not all extensions can be build as 'shared'.
999 Example: --with-foobar=shared,/usr/local/foobar/
1001 o Builds the foobar extension as shared extension.
1002 o foobar package install prefix is /usr/local/foobar/
1005 PHP_CONFIGURE_PART(Configuring extensions)
1008 dnl Check if all enabled by default extensions should be disabled
1012 [ --disable-all Disable all extensions which are enabled by default
1014 PHP_ENABLE_ALL=$enableval
1017 # reading config stubs
1018 esyscmd(./build/config-stubs ext)
1020 dnl Extensions post-config
1021 dnl -------------------------------------------------------------------------
1026 case $php_sapi_module in
1031 standard_libtool_flag='-prefer-pic'
1034 standard_libtool_flag='-prefer-non-pic'
1037 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
1040 standard_libtool_flag='-prefer-non-pic -static'
1041 if test -z "$PHP_MODULES" && test -z "$PHP_ZEND_EX"; then
1047 EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
1049 dnl this has to be here to prevent the openssl crypt() from
1050 dnl overriding the system provided crypt().
1051 if test "$ac_cv_lib_crypt_crypt" = "yes"; then
1052 EXTRA_LIBS="-lcrypt $EXTRA_LIBS -lcrypt"
1058 dnl -------------------------------------------------------------------------
1060 PHP_HELP_SEPARATOR([PEAR:])
1061 PHP_CONFIGURE_PART(Configuring PEAR)
1064 if test -z "$with_pear" && test "$enable_pear" = "no"; then
1068 # If CLI is disabled -> disable PEAR
1069 if test "$PHP_CLI" = "no"; then
1073 PHP_ARG_WITH(pear, [whether to install PEAR],
1074 [ --with-pear=DIR Install PEAR in DIR @<:@PREFIX/lib/php@:>@
1075 --without-pear Do not install PEAR], DEFAULT, yes)
1077 if test "$PHP_PEAR" != "no"; then
1080 dnl PEAR dependancies
1082 if test "$PHP_XML" = "no"; then
1083 pear_error_msg="$pear_error_msg
1084 PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --without-pear)"
1088 dnl if test "$PHP_XMLRPC" = "no"; then
1089 dnl pear_error_msg="$pear_error_msg
1090 dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line. (or --without-pear)"
1094 if test "$pear_error_msg"; then
1095 AC_MSG_ERROR([$pear_error_msg])
1098 install_pear="install-pear"
1099 PEAR_INSTALLDIR=$PHP_PEAR
1101 if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then
1103 GNU) PEAR_INSTALLDIR=$datadir/pear;;
1104 *) PEAR_INSTALLDIR=$libdir/php;;
1108 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
1112 dnl Configuring Zend and TSRM.
1113 dnl -------------------------------------------------------------------------
1115 PHP_HELP_SEPARATOR([Zend:])
1116 PHP_CONFIGURE_PART(Configuring Zend)
1118 LIBZEND_BASIC_CHECKS
1120 LIBZEND_OTHER_CHECKS
1122 if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
1123 AC_DEFINE(ZTS,1,[ ])
1124 PHP_THREAD_SAFETY=yes
1126 PHP_THREAD_SAFETY=no
1129 INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM"
1130 INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
1132 if test "$abs_srcdir" != "$abs_builddir"; then
1133 INCLUDES="$INCLUDES -I\$(top_srcdir)/main -I\$(top_srcdir)/Zend"
1134 INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM -I\$(top_builddir)/"
1137 ZEND_EXTRA_LIBS="$LIBS"
1140 PHP_HELP_SEPARATOR([TSRM:])
1141 PHP_CONFIGURE_PART(Configuring TSRM)
1143 if test "$PHP_THREAD_SAFETY" = "yes"; then
1147 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
1148 EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $LDFLAGS"
1149 EXTRA_LIBS="$EXTRA_LIBS $LIBS"
1152 test "$prefix" = "NONE" && prefix=/usr/local
1153 test "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
1154 test "$program_prefix" = "NONE" && program_prefix=
1155 test "$program_suffix" = "NONE" && program_suffix=
1158 '${exec_prefix}/lib')
1164 datadir=$datadir/php
1168 phplibdir=`pwd`/modules
1169 $php_shtool mkdir -p $phplibdir
1170 phptempdir=`pwd`/libs
1172 old_exec_prefix=$exec_prefix
1174 old_datadir=$datadir
1175 exec_prefix=`eval echo $exec_prefix`
1176 libdir=`eval echo $libdir`
1177 datadir=`eval echo $datadir`
1179 dnl Build extension directory path
1181 ZEND_MODULE_API_NO=`$EGREP '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|$SED 's/#define ZEND_MODULE_API_NO //'`
1183 if test -z "$EXTENSION_DIR"; then
1184 extbasedir=$ZEND_MODULE_API_NO
1185 if test "$oldstyleextdir" = "yes"; then
1186 if test "$PHP_DEBUG" = "1"; then
1191 if test "$enable_maintainer_zts" = "yes"; then
1196 extbasedir=$part1-$part2-$extbasedir
1197 EXTENSION_DIR=$libdir/extensions/$extbasedir
1199 if test "$enable_maintainer_zts" = "yes"; then
1200 extbasedir=$extbasedir-zts
1203 if test "$PHP_DEBUG" = "1"; then
1204 extbasedir=$extbasedir-debug
1206 EXTENSION_DIR=$libdir/$extbasedir
1212 datarootdir=$prefix/share
1215 datarootdir=$prefix/php
1219 dnl Expand all directory names for use in macros/constants
1220 EXPANDED_PEAR_INSTALLDIR=`eval echo $PEAR_INSTALLDIR`
1221 EXPANDED_EXTENSION_DIR=`eval echo $EXTENSION_DIR`
1222 EXPANDED_LOCALSTATEDIR=`eval echo $localstatedir`
1223 EXPANDED_BINDIR=`eval echo $bindir`
1224 EXPANDED_SBINDIR=`eval echo $sbindir`
1225 EXPANDED_MANDIR=`eval echo $mandir`
1226 EXPANDED_LIBDIR=$libdir
1227 EXPANDED_SYSCONFDIR=`eval echo $sysconfdir`
1228 EXPANDED_DATADIR=$datadir
1229 EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
1230 EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
1231 INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR
1233 exec_prefix=$old_exec_prefix
1235 datadir=$old_datadir
1237 AC_SUBST(INCLUDE_PATH)
1238 AC_SUBST(EXPANDED_PEAR_INSTALLDIR)
1239 AC_SUBST(EXPANDED_EXTENSION_DIR)
1240 AC_SUBST(EXPANDED_BINDIR)
1241 AC_SUBST(EXPANDED_SBINDIR)
1242 AC_SUBST(EXPANDED_MANDIR)
1243 AC_SUBST(EXPANDED_LIBDIR)
1244 AC_SUBST(EXPANDED_DATADIR)
1245 AC_SUBST(EXPANDED_SYSCONFDIR)
1246 AC_SUBST(EXPANDED_LOCALSTATEDIR)
1247 AC_SUBST(EXPANDED_PHP_CONFIG_FILE_PATH)
1248 AC_SUBST(EXPANDED_PHP_CONFIG_FILE_SCAN_DIR)
1250 if test -n "$php_ldflags_add_usr_lib"; then
1251 PHP_RPATHS="$PHP_RPATHS /usr/lib"
1256 if test -z "$php_ldflags_add_usr_lib"; then
1257 PHP_REMOVE_USR_LIB(PHP_LDFLAGS)
1258 PHP_REMOVE_USR_LIB(LDFLAGS)
1261 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
1262 EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
1264 PHP_BUILD_DATE=`date '+%Y-%m-%d'`
1265 AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
1271 AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[hardcode for each of the cross compiler host])
1272 AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[hardcode for each of the cross compiler host])
1275 PHP_UNAME=`uname -a | xargs`
1276 AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
1277 PHP_OS=`uname | xargs`
1278 AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
1282 PHP_SUBST_OLD(PHP_INSTALLED_SAPIS)
1284 PHP_SUBST(PHP_EXECUTABLE)
1286 PHP_SUBST(PHP_SAPI_OBJS)
1287 PHP_SUBST(PHP_BINARY_OBJS)
1288 PHP_SUBST(PHP_GLOBAL_OBJS)
1290 PHP_SUBST(PHP_BINARIES)
1291 PHP_SUBST(PHP_MODULES)
1292 PHP_SUBST(PHP_ZEND_EX)
1296 PHP_SUBST_OLD(abs_builddir)
1297 PHP_SUBST_OLD(abs_srcdir)
1298 PHP_SUBST_OLD(php_abs_top_builddir)
1299 PHP_SUBST_OLD(php_abs_top_srcdir)
1303 PHP_SUBST(exec_prefix)
1304 PHP_SUBST_OLD(program_prefix)
1305 PHP_SUBST_OLD(program_suffix)
1306 PHP_SUBST(includedir)
1309 PHP_SUBST(phplibdir)
1310 PHP_SUBST(phptempdir)
1312 PHP_SUBST(localstatedir)
1314 PHP_SUBST(datarootdir)
1315 PHP_SUBST(sysconfdir)
1320 PHP_SUBST(CFLAGS_CLEAN)
1325 PHP_SUBST(CXXFLAGS_CLEAN)
1326 PHP_SUBST_OLD(DEBUG_CFLAGS)
1327 PHP_SUBST_OLD(EXTENSION_DIR)
1328 PHP_SUBST_OLD(EXTRA_LDFLAGS)
1329 PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
1330 PHP_SUBST_OLD(EXTRA_LIBS)
1331 PHP_SUBST_OLD(ZEND_EXTRA_LIBS)
1332 PHP_SUBST_OLD(INCLUDES)
1333 PHP_SUBST_OLD(EXTRA_INCLUDES)
1334 PHP_SUBST_OLD(INCLUDE_PATH)
1335 PHP_SUBST_OLD(INSTALL_IT)
1339 PHP_SUBST_OLD(NATIVE_RPATHS)
1340 PHP_SUBST_OLD(PEAR_INSTALLDIR)
1341 PHP_SUBST(PHP_BUILD_DATE)
1342 PHP_SUBST_OLD(PHP_LDFLAGS)
1343 PHP_SUBST_OLD(PHP_LIBS)
1344 PHP_SUBST(OVERALL_TARGET)
1345 PHP_SUBST(PHP_RPATHS)
1347 PHP_SUBST_OLD(PHP_VERSION)
1348 PHP_SUBST_OLD(PHP_VERSION_ID)
1350 PHP_SUBST(SHARED_LIBTOOL)
1351 PHP_SUBST(WARNING_LEVEL)
1352 PHP_SUBST(PHP_FRAMEWORKS)
1353 PHP_SUBST(PHP_FRAMEWORKPATH)
1354 PHP_SUBST(INSTALL_HEADERS)
1358 if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then
1359 CXXFLAGS="$CXXFLAGS $ac_cv_pthreads_cflags"
1360 INLINE_CFLAGS="$INLINE_CFLAGS $ac_cv_pthreads_cflags"
1363 exec $CC $ac_cv_pthreads_cflags \$@
1365 CC="$abs_builddir/meta_ccld"
1369 dnl This will go away, if we have a facility to run per-extension code
1370 dnl after the thread_safety decision was done
1371 if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then
1372 CPPFLAGS="$CPPFLAGS -DTHREAD=1"
1375 ZEND_EXT_TYPE="zend_extension"
1376 PHP_SUBST(ZEND_EXT_TYPE)
1379 dnl Libtool creation
1382 PHP_HELP_SEPARATOR([Libtool:])
1383 PHP_CONFIGURE_PART(Configuring libtool)
1385 LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
1387 dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
1388 dnl This hack works around it. Ugly.
1390 *darwin9*|*darwin10*)
1395 dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
1396 dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
1397 AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
1398 undefine([AC_PROG_CXX])
1399 AC_DEFUN([AC_PROG_CXX], [])
1400 undefine([AC_PROG_CXXCPP])
1401 AC_DEFUN([AC_PROG_CXXCPP], [php_prog_cxxcpp=disabled])
1405 if test "$enable_debug" != "yes"; then
1406 PHP_SET_LIBTOOL_VARIABLE([--silent])
1409 dnl libtool 1.4.3 needs this.
1410 PHP_SET_LIBTOOL_VARIABLE([--preserve-dup-deps])
1412 test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
1413 test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<'
1414 SHARED_LIBTOOL='$(LIBTOOL)'
1418 PHP_CONFIGURE_PART(Generating files)
1420 CXXFLAGS_CLEAN=$CXXFLAGS
1421 CFLAGS_CLEAN=$CFLAGS
1422 CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
1423 INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
1424 CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
1426 if test "$PHP_PHAR" != "no" && test "$PHP_CLI" != "no"; then
1428 pharcmd_install=install-pharcmd
1434 all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_ZEND_EX) \$(PHP_BINARIES) $pharcmd"
1435 install_targets="$install_sapi $install_modules $install_binaries install-build install-headers install-programs $install_pear $pharcmd_install"
1437 PHP_SUBST(all_targets)
1438 PHP_SUBST(install_targets)
1439 PHP_SUBST(install_binary_targets)
1441 PHP_INSTALL_HEADERS([Zend/ TSRM/ include/ main/ main/streams/])
1443 PHP_ADD_SOURCES(TSRM, TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c)
1445 PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
1446 fopen_wrappers.c alloca.c php_scandir.c \
1447 php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
1448 strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
1449 network.c php_open_temporary_file.c php_logos.c \
1452 PHP_ADD_SOURCES(main/streams, streams.c cast.c memory.c filter.c \
1453 plain_wrapper.c userspace.c transports.c xp_socket.c mmap.c \
1456 PHP_ADD_SOURCES(/main, internal_functions.c,, sapi)
1460 PHP_ADD_BUILD_DIR(win32)
1461 PHP_ADD_BUILD_DIR(netware)
1464 PHP_ADD_SOURCES_X(/main, internal_functions_cli.c,, PHP_BINARY_OBJS)
1468 PHP_ADD_SOURCES(Zend, \
1469 zend_language_parser.c zend_language_scanner.c \
1470 zend_ini_parser.c zend_ini_scanner.c \
1471 zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c zend_dtrace.c \
1472 zend_execute_API.c zend_highlight.c zend_llist.c \
1473 zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
1474 zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
1475 zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
1476 zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \
1477 zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c zend_gc.c \
1478 zend_closures.c zend_float.c zend_string.c zend_signal.c)
1480 if test -r "$abs_srcdir/Zend/zend_objects.c"; then
1481 PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c zend_default_classes.c)
1484 dnl Selectively disable optimization due to high RAM usage during
1485 dnl compiling the executor.
1486 if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
1492 PHP_ADD_SOURCES_X(Zend, zend_execute.c,,PHP_GLOBAL_OBJS,,$flag)
1494 PHP_ADD_BUILD_DIR(main main/streams)
1495 PHP_ADD_BUILD_DIR(TSRM)
1496 PHP_ADD_BUILD_DIR(Zend)
1498 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/scripts/Makefile.frag,$abs_srcdir/scripts,scripts)
1499 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend)
1500 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Zend/Makefile.frag,$abs_srcdir/Zend,Zend)
1503 PHP_GEN_GLOBAL_MAKEFILE
1505 AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
1507 $php_shtool mkdir -p pear/scripts
1508 $php_shtool mkdir -p scripts
1509 $php_shtool mkdir -p scripts/man1
1511 ALL_OUTPUT_FILES="php5.spec main/build-defs.h \
1512 scripts/phpize scripts/man1/phpize.1 \
1513 scripts/php-config scripts/man1/php-config.1 \
1517 dnl Check for unknown configure options
1519 PHP_CHECK_CONFIGURE_OPTIONS
1522 dnl Generate build files
1524 AC_OUTPUT($ALL_OUTPUT_FILES, [], [
1526 if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
1530 ################################################################
1531 # Create configuration headers
1534 test -d TSRM || $php_shtool mkdir TSRM
1535 echo '#include <../main/php_config.h>' > TSRM/tsrm_config.h
1537 test -d Zend || $php_shtool mkdir Zend
1539 cat >Zend/zend_config.h <<FEO
1540 #include <../main/php_config.h>
1541 #if defined(APACHE) && defined(PHP_API_VERSION)
1546 # run this only when generating all the files?
1547 if test -n "\$REDO_ALL"; then
1548 # Hacking while airborne considered harmful.
1550 echo "creating main/internal_functions.c"
1551 extensions="$EXT_STATIC"
1552 dnl mv -f main/internal_functions.c main/internal_functions.c.old 2>/dev/null
1553 sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$extensions > main/internal_functions.c
1555 echo "creating main/internal_functions_cli.c"
1556 cli_extensions="$EXT_CLI_STATIC"
1557 sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$cli_extensions > main/internal_functions_cli.c
1559 if test "$UNAME" = "FreeBSD" && test "$PHP_SAPI" = "apache2filter" && test "$TSRM_PTH" != "pth-config" ; then
1560 echo "+--------------------------------------------------------------------+"
1561 echo "| *** WARNING *** |"
1563 echo "| In order to build PHP as a Apache2 module on FreeBSD, you have to |"
1564 echo "| add --with-tsrm-pth to your ./configure line. Therefore you need |"
1565 echo "| to install gnu-pth from /usr/ports/devel/pth. |"
1568 if test -n "$PHP_APXS_BROKEN"; then
1569 echo "+--------------------------------------------------------------------+"
1570 echo "| WARNING: Your $APXS script is most likely broken."
1572 echo "| Please go read http://www.php.net/faq.build#faq.build.apxs |"
1573 echo "| and make the changes described there and try again. |"
1576 if test -n "$DEBUG_LOG"; then
1579 +--------------------------------------------------------------------+
1580 | *** ATTENTION *** |
1582 | Something is likely to be messed up here, because the configure |
1583 | script was not able to detect a simple feature on your platform. |
1584 | This is often caused by incorrect configuration parameters. Please |
1585 | see the file debug.log for error messages. |
1587 | If you are unable to fix this, send the file debug.log to the |
1588 | php-install@lists.php.net mailing list and include appropiate |
1589 | information about your setup. |
1593 if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
1594 if test "$APACHE_VERSION" -ge 2004001; then
1595 if test -z "$APACHE_THREADED_MPM"; then
1597 +--------------------------------------------------------------------+
1600 | You have built PHP for Apache's current non-threaded MPM. |
1601 | If you change Apache to use a threaded MPM you must reconfigure |
1602 | PHP with --enable-maintainer-zts |
1608 # Warn about linking Apache with libpthread if oci8 extension is enabled on linux.
1609 if test "$PHP_OCI8" != "no"; then
1610 if test "$PHP_SAPI" = "apache"; then
1611 if test `uname` = "Linux"; then
1613 +--------------------------------------------------------------------+
1616 | Please check that your Apache (httpd) is linked with libpthread. |
1617 | If not, you have to recompile Apache with pthread. For more |
1618 | details, see this page: http://www.php.net/manual/ref.oci8.php |
1623 if test "$PHP_SIGCHILD" != "yes"; then
1624 if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
1626 +--------------------------------------------------------------------+
1628 | If you encounter <defunc> processes when using a local Oracle |
1629 | database, set the value BEQUEATH_DETACH=YES in Oracle Net's |
1630 | sqlnet.ora file on the PHP host, or set the environment variable |
1631 | BEQUEATH_DETACH to YES before starting Apache. If the problem |
1632 | still occurs, then recompile PHP and specify --enable-sigchild |
1633 | when configuring. |
1640 +--------------------------------------------------------------------+
1642 | This software is subject to the PHP License, available in this |
1643 | distribution in the file LICENSE. By continuing this installation |
1644 | process, you are bound by the terms of this license agreement. |
1645 | If you do not agree with the terms of this license, you must abort |
1646 | the installation process at this point. |
1647 +--------------------------------------------------------------------+
1649 Thank you for using PHP.
1653 # Output unknown configure options
1654 if test "$PHP_UNKNOWN_CONFIGURE_OPTIONS"; then
1655 echo "Notice: Following unknown configure options were used:
1656 $PHP_UNKNOWN_CONFIGURE_OPTIONS
1658 Check '[$]0 --help' for available options
1665 dnl ## Local Variables: