File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / configure.in
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:34 2012 UTC (12 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_17p0, HEAD
php 5.4.3+patches

    1: ## $Id: configure.in,v 1.1.1.2 2012/05/29 12:34:34 misho Exp $ -*- autoconf -*-
    2: dnl ## Process this file with autoconf to produce a configure script.
    3: 
    4: dnl include Zend specific macro definitions first
    5: dnl -------------------------------------------------------------------------
    6: sinclude(Zend/acinclude.m4)
    7: 
    8: dnl Basic autoconf + automake initialization, generation of config.nice.
    9: dnl -------------------------------------------------------------------------
   10: 
   11: AC_PREREQ(2.59)
   12: AC_INIT(README.SVN-RULES)
   13: ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
   14: 
   15: PHP_CONFIG_NICE(config.nice)
   16: 
   17: PHP_CANONICAL_HOST_TARGET
   18: 
   19: AC_CONFIG_HEADER(main/php_config.h)
   20: AH_TOP([
   21: #if defined(__GNUC__) && __GNUC__ >= 4
   22: # define ZEND_API __attribute__ ((visibility("default")))
   23: # define ZEND_DLEXPORT __attribute__ ((visibility("default")))
   24: #else
   25: # define ZEND_API
   26: # define ZEND_DLEXPORT
   27: #endif
   28: 
   29: #define ZEND_DLIMPORT
   30: 
   31: #undef uint
   32: #undef ulong
   33: 
   34: /* Define if you want to enable memory limit support */
   35: #define MEMORY_LIMIT 0
   36: ])
   37: AH_BOTTOM([
   38: #ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
   39: 
   40: #ifdef HAVE_STDLIB_H
   41: # include <stdlib.h>
   42: #endif
   43: 
   44: #ifdef HAVE_SYS_TYPES_H
   45: # include <sys/types.h>
   46: #endif
   47: 
   48: #ifdef HAVE_SYS_SELECT_H
   49: #include <sys/select.h>
   50: #endif
   51: 
   52: #ifdef HAVE_IEEEFP_H
   53: # include <ieeefp.h>
   54: #endif
   55: 
   56: #ifdef HAVE_STRING_H
   57: # include <string.h>
   58: #else
   59: # include <strings.h>
   60: #endif
   61: 
   62: #if ZEND_BROKEN_SPRINTF
   63: int zend_sprintf(char *buffer, const char *format, ...);
   64: #else
   65: # define zend_sprintf sprintf
   66: #endif
   67: 
   68: #include <math.h>
   69: 
   70: /* To enable the is_nan, is_infinite and is_finite PHP functions */
   71: #ifdef NETWARE
   72: 	#define HAVE_ISNAN 1
   73: 	#define HAVE_ISINF 1
   74: 	#define HAVE_ISFINITE 1
   75: #endif
   76: 
   77: #ifndef zend_isnan
   78: #ifdef HAVE_ISNAN
   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))
   82: #else
   83: #define zend_isnan(a) 0
   84: #endif
   85: #endif
   86: 
   87: #ifdef HAVE_ISINF
   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))
   94: #else
   95: #define zend_isinf(a) 0
   96: #endif
   97: 
   98: #ifdef HAVE_FINITE
   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)
  104: #else
  105: #define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
  106: #endif
  107: 
  108: #endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
  109: 
  110: #ifdef NETWARE
  111: #ifdef USE_WINSOCK
  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
  114: #endif
  115: #endif
  116: 
  117: #undef PTHREADS
  118: ])
  119: 
  120: PHP_MAJOR_VERSION=5
  121: PHP_MINOR_VERSION=4
  122: PHP_RELEASE_VERSION=3
  123: PHP_EXTRA_VERSION=""
  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`
  126: 
  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)
  132: 
  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
  138: 
  139: dnl Setting up the PHP version based on the information above.
  140: dnl -------------------------------------------------------------------------
  141: 
  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'
  154: else
  155:   rm -f php_version.h.new
  156: fi
  157: 
  158: 
  159: dnl Catch common errors here to save a few seconds of our users' time
  160: dnl -------------------------------------------------------------------------
  161: 
  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])
  164: fi
  165: 
  166: if test -n "$with_apache" && test -n "$with_apxs"; then
  167:   AC_MSG_ERROR([--with-apache and --with-apxs cannot be used together])
  168: fi
  169: 
  170: if test -n "$with_apxs2filter" && test -n "$with_apxs2"; then
  171:   AC_MSG_ERROR([--with-apxs2filter and --with-apxs2 cannot be used together])
  172: fi
  173: 
  174:   
  175: dnl Settings we want to make before the checks.
  176: dnl -------------------------------------------------------------------------
  177: 
  178: cwd=`pwd`
  179: 
  180: php_shtool=$srcdir/build/shtool
  181: T_MD=`$php_shtool echo -n -e %B`
  182: T_ME=`$php_shtool echo -n -e %b`
  183: 
  184: PHP_INIT_BUILD_SYSTEM
  185: 
  186: dnl We want this one before the checks, so the checks can modify CFLAGS.
  187: test -z "$CFLAGS" && auto_cflags=1
  188: 
  189: abs_srcdir=`(cd $srcdir; pwd)`
  190: abs_builddir=`pwd`
  191: 
  192: php_abs_top_srcdir=$abs_srcdir
  193: php_abs_top_builddir=$abs_builddir
  194: 
  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.
  199: 
  200: $php_shtool mkdir -p libs
  201: rm -f libs/*
  202: 
  203: dnl Checks for programs.
  204: dnl -------------------------------------------------------------------------
  205: 
  206: AC_PROG_CC([cc gcc])
  207: PHP_DETECT_ICC
  208: PHP_DETECT_SUNCC
  209: AC_PROG_CC_C_O
  210: dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
  211: dnl AC_PROG_CC_STDC
  212: AC_PROG_CPP
  213: AC_AIX
  214: AC_PROG_LN_S
  215: 
  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)
  219: 
  220: PHP_ARG_ENABLE(rpath, whether to enable runpaths,
  221: [  --disable-rpath         Disable passing additional runtime library
  222:                           search paths], yes, no)
  223: 
  224: dnl check for -R, etc. switch
  225: PHP_RUNPATH_SWITCH
  226: 
  227: dnl Checks for some support/generator progs
  228: PHP_PROG_AWK
  229: PHP_PROG_BISON
  230: PHP_PROG_RE2C
  231: 
  232: dnl Check if bison generated files exist when bison does not..
  233: case $php_cv_bison_version in
  234:   ""|invalid[)]
  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!])
  237:     fi
  238:     ;;
  239: esac
  240: 
  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)
  243: 
  244: if test "$PHP_RE2C_CGOTO" = "no"; then
  245:   RE2C_FLAGS=""
  246: else
  247:   AC_MSG_CHECKING([whether re2c -g works])
  248:   AC_TRY_COMPILE([],[
  249: int main(int argc, const char **argv)
  250: {
  251:   argc = argc;
  252:   argv = argv;
  253: label1:
  254: label2:
  255:   static void *adr[] = { &&label1, &&label2};
  256:   goto *adr[0];
  257:   return 0;
  258: }
  259:   ],[
  260:     RE2C_FLAGS=""
  261:     AC_MSG_RESULT([no])
  262:   ],[
  263:     RE2C_FLAGS="-g"
  264:     AC_MSG_RESULT([yes])
  265:   ])
  266: fi
  267: PHP_SUBST(RE2C_FLAGS)
  268: 
  269: dnl Platform-specific compile settings.
  270: dnl -------------------------------------------------------------------------
  271: 
  272: dnl See bug #28605
  273: case $host_cpu in
  274:   alpha*)
  275:     if test "$GCC" = "yes"; then
  276:       CFLAGS="$CFLAGS -mieee"
  277:     else
  278:       CFLAGS="$CFLAGS -ieee"
  279:     fi
  280:     ;;
  281:   sparc*)
  282:     if test "$SUNCC" = "yes"; then
  283:       CFLAGS="$CFLAGS -xmemalign=8s"
  284:     fi
  285:     ;;
  286: esac
  287: 
  288: dnl activate some gcc specific optimizations for gcc >= 4
  289: if test "$GCC" = "yes"; then
  290:   case $host_alias in
  291:   *darwin*)
  292:     GCC_MAJOR_VERSION=`$CC -dumpversion | /usr/bin/sed -nE '1s/([[0-9]]+)\.[[0-9]]+\..*/\1/;1p'`
  293:     ;;
  294:   *)
  295:     GCC_MAJOR_VERSION=`$CC --version | $SED -n '1s/[[^0-9]]*//;1s/\..*//;1p'`
  296:     ;;
  297:   esac
  298:   if test $GCC_MAJOR_VERSION -ge 4; then
  299:     CFLAGS="$CFLAGS -fvisibility=hidden"
  300:   fi
  301: fi
  302: 
  303: case $host_alias in
  304:   *solaris*)
  305:     CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
  306:     if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then
  307:       enable_libgcc=yes
  308:     fi
  309:     ;;
  310:   *dgux*)
  311:     CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR"
  312:     ;;
  313:   *darwin*|*rhapsody*)
  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"
  318:       fi
  319:     fi
  320:     php_multiple_shlib_versions_ok=yes
  321:     ;;
  322:   *beos*)
  323:     beos_threads=1
  324:     LIBS="$LIBS -lbe -lroot"
  325:     ;;
  326:   *mips*)
  327:     CPPFLAGS="$CPPFLAGS -D_XPG_IV"
  328:     ;;
  329:   *hpux*)
  330:     if test "$GCC" = "yes"; then
  331:       CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
  332:     fi
  333:     ;;
  334:   *netware*)
  335:     PHP_BUILD_PROGRAM
  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)
  342:     ;;
  343: esac
  344: 
  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])
  348: case $host_alias in
  349:   i?86-*-linux*|i?86-*-freebsd*)
  350:     if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then
  351:       with_pic=no
  352:       AC_MSG_RESULT(yes)
  353:     else
  354:       AC_MSG_RESULT(no)
  355:     fi
  356:     ;;
  357:   *)
  358:     AC_MSG_RESULT(no)
  359:     ;;
  360: esac
  361: 
  362: 
  363: dnl Include Zend and TSRM configurations.
  364: dnl -------------------------------------------------------------------------
  365: 
  366: sinclude(Zend/Zend.m4)
  367: sinclude(TSRM/threads.m4)
  368: sinclude(TSRM/tsrm.m4)
  369: 
  370: dnl .
  371: dnl -------------------------------------------------------------------------
  372: 
  373: PHP_HELP_SEPARATOR([SAPI modules:])
  374: PHP_SHLIB_SUFFIX_NAMES
  375: PHP_BUILD_PROGRAM
  376: PHP_SAPI=none
  377: 
  378: 
  379: dnl SAPI configuration.
  380: dnl -------------------------------------------------------------------------
  381: 
  382: dnl paths to the targets are relative to the build directory
  383: SAPI_SHARED=libs/libphp[]$PHP_MAJOR_VERSION[.]$SHLIB_DL_SUFFIX_NAME
  384: SAPI_STATIC=libs/libphp[]$PHP_MAJOR_VERSION[.a]
  385: SAPI_LIBTOOL=libphp[]$PHP_MAJOR_VERSION[.la]
  386: 
  387: PHP_CONFIGURE_PART(Configuring SAPI modules)
  388: 
  389: esyscmd(./build/config-stubs sapi)
  390: 
  391: dnl Show which main SAPI was selected
  392: AC_MSG_CHECKING([for chosen SAPI module])
  393: AC_MSG_RESULT([$PHP_SAPI])
  394: 
  395: dnl Show which binaries were selected
  396: AC_MSG_CHECKING([for executable SAPI binaries])
  397: if test "$PHP_BINARIES"; then
  398:   AC_MSG_RESULT([$PHP_BINARIES])
  399: else
  400:   AC_MSG_RESULT([none])
  401: fi
  402: 
  403: dnl Exit early
  404: if test -z "$PHP_INSTALLED_SAPIS"; then
  405:   AC_MSG_ERROR([Nothing to build.])
  406: fi
  407: 
  408: dnl force ZTS
  409: if test "$enable_maintainer_zts" = "yes"; then
  410:   PTHREADS_ASSIGN_VARS
  411: fi
  412: 
  413: dnl Starting system checks.
  414: dnl -------------------------------------------------------------------------
  415: 
  416: PHP_CONFIGURE_PART(Running system checks)
  417: 
  418: dnl Find sendmail binary
  419: PHP_PROG_SENDMAIL
  420: 
  421: dnl Check whether the system uses EBCDIC (not ASCII) as its native codeset
  422: PHP_EBCDIC
  423: 
  424: dnl Check whether the system byte ordering is bigendian
  425: PHP_C_BIGENDIAN
  426: 
  427: dnl Check whether writing to stdout works
  428: PHP_TEST_WRITE_STDOUT
  429: 
  430: dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
  431: dnl and source packages.  This should be harmless on other OSs.
  432: if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
  433:    CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
  434:    LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
  435: fi
  436: test -d /usr/ucblib && PHP_ADD_LIBPATH(/usr/ucblib)
  437: 
  438: 
  439: dnl First, library checks.
  440: dnl -------------------------------------------------------------------------
  441: 
  442: dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try
  443: dnl to avoid -lnsl checks, if we already have the functions which
  444: dnl are usually in libnsl
  445: dnl Also, uClibc will bark at linking with glibc's libnsl.
  446: 
  447: PHP_CHECK_FUNC(socket, socket)
  448: PHP_CHECK_FUNC(socketpair, socket)
  449: PHP_CHECK_FUNC(htonl, socket)
  450: PHP_CHECK_FUNC(gethostname, nsl)
  451: PHP_CHECK_FUNC(gethostbyaddr, nsl)
  452: PHP_CHECK_FUNC(yp_get_default_domain, nsl)
  453: 
  454: PHP_CHECK_FUNC(dlopen, dl)
  455: if test "$ac_cv_func_dlopen" = "yes"; then
  456:   AC_DEFINE(HAVE_LIBDL, 1, [ ])
  457: fi
  458: AC_CHECK_LIB(m, sin)
  459: 
  460: dnl Check for inet_aton
  461: dnl in -lc, -lbind and -lresolv
  462: PHP_CHECK_FUNC(inet_aton, resolv, bind)
  463: 
  464: dnl Then headers.
  465: dnl -------------------------------------------------------------------------
  466: 
  467: dnl Checks for header files.
  468: AC_HEADER_STDC
  469: AC_HEADER_DIRENT
  470: 
  471: dnl QNX requires unix.h to allow functions in libunix to work properly
  472: AC_CHECK_HEADERS([ \
  473: inttypes.h \
  474: stdint.h \
  475: dirent.h \
  476: ApplicationServices/ApplicationServices.h \
  477: sys/param.h \
  478: sys/types.h \
  479: sys/time.h \
  480: netinet/in.h \
  481: alloca.h \
  482: arpa/inet.h \
  483: arpa/nameser.h \
  484: assert.h \
  485: crypt.h \
  486: dns.h \
  487: fcntl.h \
  488: grp.h \
  489: ieeefp.h \
  490: langinfo.h \
  491: limits.h \
  492: locale.h \
  493: monetary.h \
  494: netdb.h \
  495: pwd.h \
  496: resolv.h \
  497: signal.h \
  498: stdarg.h \
  499: stdlib.h \
  500: string.h \
  501: syslog.h \
  502: sysexits.h \
  503: sys/ioctl.h \
  504: sys/file.h \
  505: sys/mman.h \
  506: sys/mount.h \
  507: sys/poll.h \
  508: sys/resource.h \
  509: sys/select.h \
  510: sys/socket.h \
  511: sys/stat.h \
  512: sys/statfs.h \
  513: sys/statvfs.h \
  514: sys/vfs.h \
  515: sys/sysexits.h \
  516: sys/varargs.h \
  517: sys/wait.h \
  518: sys/loadavg.h \
  519: termios.h \
  520: unistd.h \
  521: unix.h \
  522: utime.h \
  523: sys/utsname.h \
  524: sys/ipc.h \
  525: dlfcn.h \
  526: assert.h
  527: ],[],[],[
  528: #ifdef HAVE_SYS_PARAM_H
  529: #include <sys/param.h>
  530: #endif
  531: #ifdef HAVE_SYS_TYPES_H
  532: #include <sys/types.h>
  533: #endif
  534: #ifdef HAVE_SYS_TIME_H
  535: #include <sys/time.h>
  536: #endif
  537: #ifdef HAVE_NETINET_IN_H
  538: #include <netinet/in.h>
  539: #endif
  540: #ifdef HAVE_ARPA_NAMESER_H
  541: #include <arpa/nameser.h>
  542: #endif
  543: ])
  544: 
  545: PHP_FOPENCOOKIE
  546: PHP_BROKEN_GETCWD
  547: PHP_BROKEN_GLIBC_FOPEN_APPEND
  548: 
  549: dnl Checks for typedefs, structures, and compiler characteristics.
  550: dnl -------------------------------------------------------------------------
  551: 
  552: AC_STRUCT_TM
  553: AC_STRUCT_TIMEZONE
  554: 
  555: PHP_MISSING_TIME_R_DECL
  556: PHP_MISSING_FCLOSE_DECL
  557: 
  558: PHP_TM_GMTOFF
  559: PHP_STRUCT_FLOCK
  560: PHP_SOCKLEN_T
  561: 
  562: AC_CHECK_SIZEOF(size_t, 8)
  563: AC_CHECK_SIZEOF(long long, 8)
  564: AC_CHECK_SIZEOF(long long int, 8)
  565: AC_CHECK_SIZEOF(long, 8)
  566: AC_CHECK_SIZEOF(int, 4)
  567: 
  568: dnl These are defined elsewhere than stdio.h
  569: PHP_CHECK_SIZEOF(intmax_t, 0)
  570: PHP_CHECK_SIZEOF(ssize_t, 8)
  571: PHP_CHECK_SIZEOF(ptrdiff_t, 8)
  572: 
  573: dnl Check for members of the stat structure
  574: AC_STRUCT_ST_BLKSIZE
  575: dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exists
  576: dnl The WARNING_LEVEL required because cc in QNX hates -w option without an argument
  577: if test "`uname -s 2>/dev/null`" != "QNX"; then
  578:   AC_STRUCT_ST_BLOCKS
  579: else
  580:   AC_MSG_WARN([warnings level for cc set to 0])
  581:   WARNING_LEVEL=0
  582: fi
  583: AC_STRUCT_ST_RDEV
  584: 
  585: dnl Checks for types
  586: AC_TYPE_SIZE_T
  587: AC_TYPE_UID_T
  588: 
  589: dnl Checks for sockaddr_storage and sockaddr.sa_len
  590: PHP_SOCKADDR_CHECKS
  591: 
  592: dnl Check for IPv6 support
  593: AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
  594: [AC_TRY_LINK([ #include <sys/types.h>
  595: #include <sys/socket.h>
  596: #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;],
  597:   [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
  598: 
  599: dnl Checks for library functions.
  600: dnl -------------------------------------------------------------------------
  601: 
  602: AC_FUNC_VPRINTF
  603: AC_CHECK_FUNCS(
  604: alphasort \
  605: asctime_r \
  606: chroot \
  607: ctime_r \
  608: cuserid \
  609: crypt \
  610: flock \
  611: ftok \
  612: funopen \
  613: gai_strerror \
  614: gcvt \
  615: getloadavg \
  616: getlogin \
  617: getprotobyname \
  618: getprotobynumber \
  619: getservbyname \
  620: getservbyport \
  621: gethostname \
  622: getrusage \
  623: gettimeofday \
  624: gmtime_r \
  625: getpwnam_r \
  626: getgrnam_r \
  627: getpwuid_r \
  628: grantpt \
  629: inet_ntoa \
  630: inet_ntop \
  631: inet_pton \
  632: isascii \
  633: link \
  634: localtime_r \
  635: lockf \
  636: lchown \
  637: lrand48 \
  638: memcpy \
  639: memmove \
  640: mkstemp \
  641: mmap \
  642: nl_langinfo \
  643: perror \
  644: poll \
  645: ptsname \
  646: putenv \
  647: realpath \
  648: random \
  649: rand_r \
  650: scandir \
  651: setitimer \
  652: setlocale \
  653: localeconv \
  654: setenv \
  655: setpgid \
  656: setsockopt \
  657: setvbuf \
  658: shutdown \
  659: sin \
  660: snprintf \
  661: srand48 \
  662: srandom \
  663: statfs \
  664: statvfs \
  665: std_syslog \
  666: strcasecmp \
  667: strcoll \
  668: strdup \
  669: strerror \
  670: strftime \
  671: strnlen \
  672: strptime \
  673: strstr \
  674: strtok_r \
  675: symlink \
  676: tempnam \
  677: tzset \
  678: unlockpt \
  679: unsetenv \
  680: usleep \
  681: utime \
  682: vsnprintf \
  683: vasprintf \
  684: asprintf \
  685: nanosleep \
  686: )
  687: 
  688: dnl Some systems (like OpenSolaris) do not have nanosleep in libc
  689: PHP_CHECK_FUNC(nanosleep, rt)
  690: 
  691: dnl Check for getaddrinfo, should be a better way, but...
  692: dnl Also check for working getaddrinfo
  693: AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
  694: [AC_TRY_LINK([#include <netdb.h>],
  695:                 [struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);], 
  696:   AC_TRY_RUN([
  697: #include <netdb.h>
  698: #include <sys/types.h>
  699: #ifndef AF_INET
  700: # include <sys/socket.h>
  701: #endif
  702: int main(void) {
  703:   struct addrinfo *ai, *pai, hints;
  704: 
  705:   memset(&hints, 0, sizeof(hints));
  706:   hints.ai_flags = AI_NUMERICHOST;
  707: 
  708:   if (getaddrinfo("127.0.0.1", 0, &hints, &ai) < 0) {
  709:     exit(1);
  710:   }
  711: 
  712:   if (ai == 0) {
  713:     exit(1);
  714:   }
  715: 
  716:   pai = ai;
  717:   
  718:   while (pai) {
  719:     if (pai->ai_family != AF_INET) {
  720:       /* 127.0.0.1/NUMERICHOST should only resolve ONE way */
  721:       exit(1);
  722:     }
  723:     if (pai->ai_addr->sa_family != AF_INET) {
  724:       /* 127.0.0.1/NUMERICHOST should only resolve ONE way */
  725:       exit(1);
  726:     }
  727:     pai = pai->ai_next;
  728:   }
  729:   freeaddrinfo(ai);
  730:   exit(0);
  731: }
  732:   ],ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no, ac_cv_func_getaddrinfo=no),
  733: ac_cv_func_getaddrinfo=no)])
  734: if test "$ac_cv_func_getaddrinfo" = yes; then
  735:   AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo function])
  736: fi
  737: 
  738: dnl Check for the __sync_fetch_and_add builtin
  739: AC_CACHE_CHECK([for __sync_fetch_and_add], ac_cv_func_sync_fetch_and_add,
  740: [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)])
  741: if test "$ac_cv_func_sync_fetch_and_add" = yes; then
  742:   AC_DEFINE(HAVE_SYNC_FETCH_AND_ADD,1,[Define if you have the __sync_fetch_and_add function])
  743: fi
  744: 
  745: AC_REPLACE_FUNCS(strlcat strlcpy getopt)
  746: AC_FUNC_UTIME_NULL
  747: AC_FUNC_ALLOCA
  748: dnl PHP_AC_BROKEN_SPRINTF
  749: dnl PHP_AC_BROKEN_SNPRINTF
  750: PHP_DECLARED_TIMEZONE
  751: PHP_TIME_R_TYPE
  752: PHP_READDIR_R_TYPE
  753: PHP_CHECK_IN_ADDR_T
  754: 
  755: AC_CHECK_FUNCS(crypt_r, [ php_crypt_r="1" ], [ php_crypt_r="0" ])
  756: if test "x$php_crypt_r" = "x1"; then
  757:   PHP_CRYPT_R_STYLE
  758: fi
  759: 
  760: dnl General settings.
  761: dnl -------------------------------------------------------------------------
  762: PHP_CONFIGURE_PART(General settings)
  763: 
  764: PHP_HELP_SEPARATOR([General settings:])
  765: 
  766: PHP_ARG_ENABLE(gcov,  whether to include gcov symbols,
  767: [  --enable-gcov           Enable GCOV code coverage (requires LTP) - FOR DEVELOPERS ONLY!!], no, no)
  768: 
  769: if test "$PHP_GCOV" = "yes"; then
  770: 
  771:   if test "$GCC" != "yes"; then
  772:     AC_MSG_ERROR([GCC is required for --enable-gcov])
  773:   fi
  774:   
  775:   dnl Check if ccache is being used
  776:   case `$php_shtool path $CC` in
  777:     *ccache*[)] gcc_ccache=yes;;
  778:     *[)] gcc_ccache=no;;
  779:   esac
  780: 
  781:   if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
  782:     AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
  783:   fi
  784:   
  785:   ltp_version_list="1.5 1.6 1.7"
  786: 
  787:   AC_CHECK_PROG(LTP, lcov, lcov)
  788:   AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
  789:   PHP_SUBST(LTP)
  790:   PHP_SUBST(LTP_GENHTML)
  791: 
  792:   if test "$LTP"; then
  793:     AC_CACHE_CHECK([for ltp version], php_cv_ltp_version, [
  794:       php_cv_ltp_version=invalid
  795:       ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
  796:       for ltp_check_version in $ltp_version_list; do
  797:         if test "$ltp_version" = "$ltp_check_version"; then
  798:           php_cv_ltp_version="$ltp_check_version (ok)"
  799:         fi
  800:       done
  801:     ])
  802:   else
  803:     ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list"      
  804:     AC_MSG_ERROR([$ltp_msg])
  805:   fi
  806: 
  807:   case $php_cv_ltp_version in
  808:     ""|invalid[)]
  809:       ltp_msg="You must have one of the following versions of LTP: $ltp_version_list (found: $ltp_version)."
  810:       AC_MSG_ERROR([$ltp_msg])
  811:       LTP="exit 0;"
  812:       ;;
  813:   esac
  814: 
  815:   if test -z "$LTP_GENHTML"; then
  816:     AC_MSG_ERROR([Could not find genhtml from the LTP package])
  817:   fi
  818: 
  819:   AC_DEFINE(HAVE_GCOV, 1, [Whether you have gcov])
  820:   PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.gcov, $abs_srcdir)
  821: 
  822:   dnl Remove all optimization flags from CFLAGS
  823:   changequote({,})
  824:   CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
  825:   CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
  826:   changequote([,])
  827: 
  828:   dnl Add the special gcc flags
  829:   CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
  830:   CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage"
  831: fi
  832: 
  833: PHP_ARG_ENABLE(debug, whether to include debugging symbols,
  834: [  --enable-debug          Compile with debugging symbols], no, no)
  835: 
  836: if test "$PHP_DEBUG" = "yes"; then
  837:   PHP_DEBUG=1
  838:   ZEND_DEBUG=yes
  839:   changequote({,})
  840:   CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
  841:   CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
  842:   changequote([,])
  843:   dnl add -O0 only if GCC or ICC is used
  844:   if test "$GCC" = "yes" || test "$ICC" = "yes"; then
  845:     CFLAGS="$CFLAGS -O0"
  846:     CXXFLAGS="$CXXFLAGS -g -O0"
  847:   fi
  848:   if test "$SUNCC" = "yes"; then
  849:     if test -n "$auto_cflags"; then
  850:       CFLAGS="-g"
  851:       CXXFLAGS="-g"
  852:     else
  853:       CFLAGS="$CFLAGS -g"
  854:       CXXFLAGS="$CFLAGS -g"
  855:     fi
  856:   fi
  857: else
  858:   PHP_DEBUG=0
  859:   ZEND_DEBUG=no
  860: fi
  861: 
  862: PHP_ARG_WITH(layout, layout of installed files,
  863: [  --with-layout=TYPE      Set how installed files will be laid out.  Type can
  864:                           be either PHP or GNU @<:@PHP@:>@], PHP, no)
  865: 
  866: case $PHP_LAYOUT in
  867:   GNU)
  868:     oldstyleextdir=no
  869:     ;;
  870:   *)
  871:     oldstyleextdir=yes
  872:     ;;
  873: esac
  874: 
  875: PHP_ARG_WITH(config-file-path, path to configuration file,
  876: [  --with-config-file-path=PATH
  877:                           Set the path in which to look for php.ini @<:@PREFIX/lib@:>@], DEFAULT, no)
  878: 
  879: if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then
  880:   case $PHP_LAYOUT in
  881:     GNU)
  882:       PHP_CONFIG_FILE_PATH=$sysconfdir
  883:       ;;
  884:     *)
  885:       PHP_CONFIG_FILE_PATH=$libdir
  886:       ;;
  887:   esac
  888: fi
  889: 
  890: AC_MSG_CHECKING([where to scan for configuration files])
  891: PHP_ARG_WITH(config-file-scan-dir,,
  892: [  --with-config-file-scan-dir=PATH
  893:                           Set the path where to scan for configuration files], DEFAULT, no) 
  894: if test "$PHP_CONFIG_FILE_SCAN_DIR" = "DEFAULT"; then
  895:   PHP_CONFIG_FILE_SCAN_DIR=
  896: fi
  897: AC_MSG_RESULT([$PHP_CONFIG_FILE_SCAN_DIR])
  898: 
  899: test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
  900: 
  901: PHP_ARG_ENABLE(sigchild, whether to enable PHP's own SIGCHLD handler,
  902: [  --enable-sigchild       Enable PHP's own SIGCHLD handler], no, no)
  903: 
  904: if test "$PHP_SIGCHILD" = "yes"; then
  905:   AC_DEFINE(PHP_SIGCHILD, 1, [ ])
  906: else
  907:   AC_DEFINE(PHP_SIGCHILD, 0, [ ])
  908: fi
  909: 
  910: PHP_ARG_ENABLE(libgcc, whether to explicitly link against libgcc,
  911: [  --enable-libgcc         Enable explicitly linking against libgcc], no, no)
  912: 
  913: if test "$PHP_LIBGCC" = "yes"; then
  914:   PHP_LIBGCC_LIBPATH(gcc)
  915:   if test -z "$libgcc_libpath"; then
  916:     AC_MSG_ERROR([Cannot locate libgcc. Make sure that gcc is in your path])
  917:   fi
  918:   PHP_ADD_LIBPATH($libgcc_libpath)
  919:   PHP_ADD_LIBRARY(gcc, yes)
  920: fi
  921: 
  922: PHP_ARG_ENABLE(short-tags, whether to enable short tags by default,
  923: [  --disable-short-tags    Disable the short-form <? start tag by default], yes, no)
  924: 
  925: if test "$PHP_SHORT_TAGS" = "yes"; then
  926:   AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, "1", [ ])
  927: else
  928:   AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, "0", [ ])
  929: fi
  930: 
  931: PHP_ARG_ENABLE(dmalloc, whether to enable dmalloc,
  932: [  --enable-dmalloc        Enable dmalloc], no, no)
  933: 
  934: if test "$PHP_DMALLOC" = "yes"; then
  935:   AC_CHECK_LIB(dmalloc, dmalloc_error, [
  936:     PHP_ADD_LIBRARY(dmalloc)
  937:     AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
  938:     CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
  939:   ], [
  940:     AC_MSG_ERROR([Problem with enabling dmalloc. Please check config.log for details.])
  941:   ])
  942: fi
  943: 
  944: PHP_ARG_ENABLE(ipv6, whether to enable IPv6 support,
  945: [  --disable-ipv6          Disable IPv6 support], yes, no)
  946: 
  947: if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then
  948:   AC_DEFINE(HAVE_IPV6, 1, [Whether to enable IPv6 support])
  949: fi
  950: 
  951: dnl ##
  952: dnl ## DTRACE CHECKS
  953: dnl ## Note: this has to be done after SAPI configuration!
  954: dnl ##
  955: PHP_ARG_ENABLE(dtrace, whether to enable DTrace support,
  956: [  --enable-dtrace         Enable DTrace support], no, no)
  957: 
  958: if test "$PHP_DTRACE" = "yes"; then
  959:   AC_CHECK_HEADERS([sys/sdt.h], [
  960:     PHP_INIT_DTRACE([Zend/zend_dtrace.d],[Zend/zend_dtrace_gen.h],[main/main.c Zend/zend_API.c \
  961:       Zend/zend_execute.c Zend/zend_exceptions.c \
  962:       Zend/zend_dtrace.c Zend/zend.c])
  963:     AC_DEFINE(HAVE_DTRACE, 1, [Whether to enable DTrace support])
  964:     PHP_SUBST(PHP_DTRACE_OBJS)
  965:   ], [
  966:     AC_MSG_ERROR([Cannot find sys/sdt.h which is required for DTrace support])
  967:   ])
  968: fi
  969: 
  970: AC_MSG_CHECKING([how big to make fd sets])
  971: PHP_ARG_ENABLE(fd-setsize,,
  972: [  --enable-fd-setsize     Set size of descriptor sets], no, no)
  973: 
  974: if test "$PHP_FD_SETSIZE" != "no"; then
  975:   if test "0$PHP_FD_SETSIZE" -gt 0 2>/dev/null; then
  976:     CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PHP_FD_SETSIZE"
  977:     AC_MSG_RESULT([using $PHP_FD_SETSIZE])
  978:   else
  979:     AC_MSG_ERROR([Invalid value passed to --enable-fd-setsize!])
  980:   fi
  981: else
  982:   AC_MSG_RESULT([using system default])
  983: fi
  984: 
  985: dnl Extension configuration.
  986: dnl -------------------------------------------------------------------------
  987: 
  988: PHP_HELP_SEPARATOR([Extensions:
  989: 
  990:   --with-EXTENSION=[shared[,PATH]]
  991:   
  992:     NOTE: Not all extensions can be build as 'shared'.
  993: 
  994:     Example: --with-foobar=shared,/usr/local/foobar/
  995: 
  996:       o Builds the foobar extension as shared extension.
  997:       o foobar package install prefix is /usr/local/foobar/
  998: ])
  999: 
 1000: PHP_CONFIGURE_PART(Configuring extensions)
 1001: 
 1002: dnl
 1003: dnl Check if all enabled by default extensions should be disabled
 1004: dnl
 1005: 
 1006: AC_ARG_ENABLE(all,
 1007: [ --disable-all   Disable all extensions which are enabled by default
 1008: ], [
 1009:   PHP_ENABLE_ALL=$enableval
 1010: ])
 1011: 
 1012: # reading config stubs
 1013: esyscmd(./build/config-stubs ext)
 1014: 
 1015: dnl Extensions post-config
 1016: dnl -------------------------------------------------------------------------
 1017: 
 1018: enable_shared=yes
 1019: enable_static=yes
 1020: 
 1021: case $php_sapi_module in
 1022:   shared[)]
 1023:     enable_static=no
 1024:     case $with_pic in
 1025:       yes)
 1026:         standard_libtool_flag='-prefer-pic'
 1027:         ;;
 1028:       no)
 1029:         standard_libtool_flag='-prefer-non-pic'
 1030:         ;;
 1031:     esac
 1032:     EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
 1033:     ;;
 1034:   *[)]
 1035:     standard_libtool_flag='-prefer-non-pic -static'
 1036:     if test -z "$PHP_MODULES" && test -z "$PHP_ZEND_EX"; then
 1037:       enable_shared=no
 1038:     fi
 1039:     ;;
 1040: esac
 1041: 
 1042: EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
 1043: 
 1044: dnl this has to be here to prevent the openssl crypt() from
 1045: dnl overriding the system provided crypt().
 1046: if test "$ac_cv_lib_crypt_crypt" = "yes"; then
 1047:   EXTRA_LIBS="-lcrypt $EXTRA_LIBS -lcrypt"
 1048: fi
 1049: 
 1050: unset LIBS LDFLAGS
 1051: 
 1052: dnl PEAR
 1053: dnl -------------------------------------------------------------------------
 1054: 
 1055: PHP_HELP_SEPARATOR([PEAR:])
 1056: PHP_CONFIGURE_PART(Configuring PEAR)
 1057: 
 1058: # compatibility
 1059: if test -z "$with_pear" && test "$enable_pear" = "no"; then
 1060:   with_pear=no
 1061: fi
 1062: 
 1063: # If CLI is disabled -> disable PEAR
 1064: if test "$PHP_CLI" = "no"; then
 1065:   with_pear=no
 1066: fi
 1067: 
 1068: PHP_ARG_WITH(pear, [whether to install PEAR],
 1069: [  --with-pear=DIR         Install PEAR in DIR @<:@PREFIX/lib/php@:>@
 1070:   --without-pear          Do not install PEAR], DEFAULT, yes)
 1071: 
 1072: if test "$PHP_PEAR" != "no"; then
 1073: 
 1074:   dnl
 1075:   dnl PEAR dependancies
 1076:   dnl
 1077:   if test "$PHP_XML" = "no"; then
 1078:     pear_error_msg="$pear_error_msg 
 1079:                     PEAR requires XML to be enabled.     Add --enable-xml to the configure line. (or --without-pear)"
 1080:   fi
 1081: 
 1082: dnl
 1083: dnl  if test "$PHP_XMLRPC" = "no"; then
 1084: dnl    pear_error_msg="$pear_error_msg 
 1085: dnl                    PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line. (or --without-pear)"
 1086: dnl  fi
 1087: dnl
 1088: 
 1089:   if test "$pear_error_msg"; then
 1090:     AC_MSG_ERROR([$pear_error_msg])
 1091:   fi
 1092: 
 1093:   install_pear="install-pear"
 1094:   PEAR_INSTALLDIR=$PHP_PEAR
 1095: 
 1096:   if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then
 1097:     case $PHP_LAYOUT in
 1098:       GNU) PEAR_INSTALLDIR=$datadir/pear;;
 1099:       *)   PEAR_INSTALLDIR=$libdir/php;;
 1100:     esac
 1101:   fi
 1102: 
 1103:   PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
 1104: fi
 1105: 
 1106: 
 1107: dnl Configuring Zend and TSRM.
 1108: dnl -------------------------------------------------------------------------
 1109: 
 1110: PHP_HELP_SEPARATOR([Zend:])
 1111: PHP_CONFIGURE_PART(Configuring Zend)
 1112: 
 1113: LIBZEND_BASIC_CHECKS
 1114: LIBZEND_DLSYM_CHECK
 1115: LIBZEND_OTHER_CHECKS
 1116: 
 1117: if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
 1118:   AC_DEFINE(ZTS,1,[ ])
 1119:   PHP_THREAD_SAFETY=yes
 1120: else
 1121:   PHP_THREAD_SAFETY=no
 1122: fi
 1123: 
 1124: INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM"
 1125: INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
 1126: 
 1127: if test "$abs_srcdir" != "$abs_builddir"; then
 1128:   INCLUDES="$INCLUDES -I\$(top_srcdir)/main -I\$(top_srcdir)/Zend"
 1129:   INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM -I\$(top_builddir)/"
 1130: fi
 1131: 
 1132: ZEND_EXTRA_LIBS="$LIBS"
 1133: unset LIBS LDFLAGS
 1134: 
 1135: PHP_HELP_SEPARATOR([TSRM:])
 1136: PHP_CONFIGURE_PART(Configuring TSRM)
 1137: TSRM_BASIC_CHECKS
 1138: if test "$PHP_THREAD_SAFETY" = "yes"; then
 1139:   TSRM_THREADS_CHECKS
 1140: fi
 1141: 
 1142: EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
 1143: EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $LDFLAGS"
 1144: EXTRA_LIBS="$EXTRA_LIBS $LIBS"
 1145: unset LIBS LDFLAGS
 1146: 
 1147: test "$prefix" = "NONE" && prefix=/usr/local
 1148: test "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
 1149: test "$program_prefix" = "NONE" && program_prefix=
 1150: test "$program_suffix" = "NONE" && program_suffix=
 1151: 
 1152: case $libdir in
 1153:   '${exec_prefix}/lib')
 1154:     libdir=$libdir/php
 1155:     ;;
 1156: esac
 1157: case $datadir in
 1158:   '${prefix}/share')
 1159:     datadir=$datadir/php
 1160:     ;;
 1161: esac
 1162: 
 1163: phplibdir=`pwd`/modules
 1164: $php_shtool mkdir -p $phplibdir
 1165: phptempdir=`pwd`/libs
 1166: 
 1167: old_exec_prefix=$exec_prefix
 1168: old_libdir=$libdir
 1169: old_datadir=$datadir
 1170: exec_prefix=`eval echo $exec_prefix`
 1171: libdir=`eval echo $libdir`
 1172: datadir=`eval echo $datadir`
 1173: 
 1174: dnl Build extension directory path
 1175: 
 1176: ZEND_MODULE_API_NO=`$EGREP '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|$SED 's/#define ZEND_MODULE_API_NO //'`
 1177: 
 1178: if test -z "$EXTENSION_DIR"; then
 1179:   extbasedir=$ZEND_MODULE_API_NO
 1180:   if test "$oldstyleextdir" = "yes"; then
 1181:     if test "$PHP_DEBUG" = "1"; then
 1182:       part1=debug
 1183:     else
 1184:       part1=no-debug
 1185:     fi
 1186:     if test "$enable_maintainer_zts" = "yes"; then
 1187:       part2=zts
 1188:     else
 1189:       part2=non-zts
 1190:     fi
 1191:     extbasedir=$part1-$part2-$extbasedir
 1192:     EXTENSION_DIR=$libdir/extensions/$extbasedir
 1193:   else
 1194:     if test "$enable_maintainer_zts" = "yes"; then
 1195:       extbasedir=$extbasedir-zts
 1196:     fi
 1197:     
 1198:     if test "$PHP_DEBUG" = "1"; then
 1199:       extbasedir=$extbasedir-debug
 1200:     fi
 1201:     EXTENSION_DIR=$libdir/$extbasedir
 1202:   fi
 1203: fi
 1204: 
 1205: case $PHP_LAYOUT in
 1206:   GNU)
 1207:     datarootdir=$prefix/share
 1208:     ;;
 1209:   *)
 1210:     datarootdir=$prefix/php
 1211:     ;;
 1212: esac
 1213: 
 1214: dnl Expand all directory names for use in macros/constants
 1215: EXPANDED_PEAR_INSTALLDIR=`eval echo $PEAR_INSTALLDIR`
 1216: EXPANDED_EXTENSION_DIR=`eval echo $EXTENSION_DIR`
 1217: EXPANDED_LOCALSTATEDIR=`eval echo $localstatedir`
 1218: EXPANDED_BINDIR=`eval echo $bindir`
 1219: EXPANDED_SBINDIR=`eval echo $sbindir`
 1220: EXPANDED_MANDIR=`eval echo $mandir`
 1221: EXPANDED_LIBDIR=$libdir
 1222: EXPANDED_SYSCONFDIR=`eval echo $sysconfdir`
 1223: EXPANDED_DATADIR=$datadir
 1224: EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
 1225: EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
 1226: INCLUDE_PATH=.:${prefix}/share/pear
 1227: 
 1228: exec_prefix=$old_exec_prefix
 1229: libdir=$old_libdir
 1230: datadir=$old_datadir
 1231: 
 1232: AC_SUBST(INCLUDE_PATH)
 1233: AC_SUBST(EXPANDED_PEAR_INSTALLDIR)
 1234: AC_SUBST(EXPANDED_EXTENSION_DIR)
 1235: AC_SUBST(EXPANDED_BINDIR)
 1236: AC_SUBST(EXPANDED_SBINDIR)
 1237: AC_SUBST(EXPANDED_MANDIR)
 1238: AC_SUBST(EXPANDED_LIBDIR)
 1239: AC_SUBST(EXPANDED_DATADIR)
 1240: AC_SUBST(EXPANDED_SYSCONFDIR)
 1241: AC_SUBST(EXPANDED_LOCALSTATEDIR)
 1242: AC_SUBST(EXPANDED_PHP_CONFIG_FILE_PATH)
 1243: AC_SUBST(EXPANDED_PHP_CONFIG_FILE_SCAN_DIR)
 1244: 
 1245: if test -n "$php_ldflags_add_usr_lib"; then
 1246:   PHP_RPATHS="$PHP_RPATHS /usr/lib"
 1247: fi
 1248: 
 1249: PHP_UTILIZE_RPATHS
 1250: 
 1251: if test -z "$php_ldflags_add_usr_lib"; then
 1252:   PHP_REMOVE_USR_LIB(PHP_LDFLAGS)
 1253:   PHP_REMOVE_USR_LIB(LDFLAGS)
 1254: fi
 1255: 
 1256: EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
 1257: EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
 1258: 
 1259: PHP_BUILD_DATE=`date '+%Y-%m-%d'`
 1260: AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
 1261: 
 1262: case $host_alias in
 1263: *netware*)
 1264:   PHP_OS="NetWare"
 1265:   PHP_UNAME="NetWare"
 1266:   AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[hardcode for each of the cross compiler host])
 1267:   AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[hardcode for each of the cross compiler host])
 1268:   ;;
 1269: *)
 1270:   PHP_UNAME=`uname -a | xargs`
 1271:   AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
 1272:   PHP_OS=`uname | xargs`
 1273:   AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
 1274:   ;;
 1275: esac
 1276: 
 1277: PHP_SUBST_OLD(PHP_INSTALLED_SAPIS)
 1278: 
 1279: PHP_SUBST(PHP_EXECUTABLE)
 1280: 
 1281: PHP_SUBST(PHP_SAPI_OBJS)
 1282: PHP_SUBST(PHP_BINARY_OBJS)
 1283: PHP_SUBST(PHP_GLOBAL_OBJS)
 1284: 
 1285: PHP_SUBST(PHP_BINARIES)
 1286: PHP_SUBST(PHP_MODULES)
 1287: PHP_SUBST(PHP_ZEND_EX)
 1288: 
 1289: PHP_SUBST(EXT_LIBS)
 1290: 
 1291: PHP_SUBST_OLD(abs_builddir)
 1292: PHP_SUBST_OLD(abs_srcdir)
 1293: PHP_SUBST_OLD(php_abs_top_builddir)
 1294: PHP_SUBST_OLD(php_abs_top_srcdir)
 1295: 
 1296: PHP_SUBST(bindir)
 1297: PHP_SUBST(sbindir)
 1298: PHP_SUBST(exec_prefix)
 1299: PHP_SUBST_OLD(program_prefix)
 1300: PHP_SUBST_OLD(program_suffix)
 1301: PHP_SUBST(includedir)
 1302: PHP_SUBST(libdir)
 1303: PHP_SUBST(mandir)
 1304: PHP_SUBST(phplibdir)
 1305: PHP_SUBST(phptempdir)
 1306: PHP_SUBST(prefix)
 1307: PHP_SUBST(localstatedir)
 1308: PHP_SUBST(datadir)
 1309: PHP_SUBST(datarootdir)
 1310: PHP_SUBST(sysconfdir)
 1311: 
 1312: PHP_SUBST(EXEEXT)
 1313: PHP_SUBST(CC)
 1314: PHP_SUBST(CFLAGS)
 1315: PHP_SUBST(CFLAGS_CLEAN)
 1316: PHP_SUBST(CPP)
 1317: PHP_SUBST(CPPFLAGS)
 1318: PHP_SUBST(CXX)
 1319: PHP_SUBST(CXXFLAGS)
 1320: PHP_SUBST(CXXFLAGS_CLEAN)
 1321: PHP_SUBST_OLD(DEBUG_CFLAGS)
 1322: PHP_SUBST_OLD(EXTENSION_DIR)
 1323: PHP_SUBST_OLD(EXTRA_LDFLAGS)
 1324: PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
 1325: PHP_SUBST_OLD(EXTRA_LIBS)
 1326: PHP_SUBST_OLD(ZEND_EXTRA_LIBS)
 1327: PHP_SUBST_OLD(INCLUDES)
 1328: PHP_SUBST_OLD(EXTRA_INCLUDES)
 1329: PHP_SUBST_OLD(INCLUDE_PATH)
 1330: PHP_SUBST_OLD(INSTALL_IT)
 1331: PHP_SUBST(LFLAGS)
 1332: PHP_SUBST(LIBTOOL)
 1333: PHP_SUBST(LN_S)
 1334: PHP_SUBST_OLD(NATIVE_RPATHS)
 1335: PHP_SUBST_OLD(PEAR_INSTALLDIR)
 1336: PHP_SUBST(PHP_BUILD_DATE)
 1337: PHP_SUBST_OLD(PHP_LDFLAGS)
 1338: PHP_SUBST_OLD(PHP_LIBS)
 1339: PHP_SUBST(OVERALL_TARGET)
 1340: PHP_SUBST(PHP_RPATHS)
 1341: PHP_SUBST(PHP_SAPI)
 1342: PHP_SUBST_OLD(PHP_VERSION)
 1343: PHP_SUBST_OLD(PHP_VERSION_ID)
 1344: PHP_SUBST(SHELL)
 1345: PHP_SUBST(SHARED_LIBTOOL)
 1346: PHP_SUBST(WARNING_LEVEL)
 1347: PHP_SUBST(PHP_FRAMEWORKS)
 1348: PHP_SUBST(PHP_FRAMEWORKPATH)
 1349: PHP_SUBST(INSTALL_HEADERS)
 1350: 
 1351: old_CC=$CC
 1352: 
 1353: if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then
 1354:   CXXFLAGS="$CXXFLAGS $ac_cv_pthreads_cflags"
 1355:   INLINE_CFLAGS="$INLINE_CFLAGS $ac_cv_pthreads_cflags"
 1356:   cat >meta_ccld<<EOF
 1357: #! /bin/sh
 1358: exec $CC $ac_cv_pthreads_cflags \$@
 1359: EOF
 1360:   CC="$abs_builddir/meta_ccld"
 1361:   chmod +x meta_ccld
 1362: fi
 1363: 
 1364: dnl This will go away, if we have a facility to run per-extension code
 1365: dnl after the thread_safety decision was done
 1366: if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then
 1367:   CPPFLAGS="$CPPFLAGS -DTHREAD=1"
 1368: fi
 1369: 
 1370: ZEND_EXT_TYPE="zend_extension"
 1371: PHP_SUBST(ZEND_EXT_TYPE)
 1372: 
 1373: dnl
 1374: dnl Libtool creation
 1375: dnl
 1376: 
 1377: PHP_HELP_SEPARATOR([Libtool:])
 1378: PHP_CONFIGURE_PART(Configuring libtool)
 1379: 
 1380: LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
 1381: 
 1382: dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
 1383: dnl This hack works around it. Ugly.
 1384: case $host_alias in
 1385: *darwin9*|*darwin10*)
 1386:   ac_cv_exeext=
 1387:   ;;
 1388: esac
 1389: 
 1390: dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
 1391: dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
 1392: AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
 1393:   undefine([AC_PROG_CXX])
 1394:   AC_DEFUN([AC_PROG_CXX], [])
 1395:   undefine([AC_PROG_CXXCPP])
 1396:   AC_DEFUN([AC_PROG_CXXCPP], [php_prog_cxxcpp=disabled])
 1397: ])
 1398: AC_PROG_LIBTOOL
 1399: 
 1400: if test "$enable_debug" != "yes"; then
 1401:   PHP_SET_LIBTOOL_VARIABLE([--silent])
 1402: fi
 1403: 
 1404: dnl libtool 1.4.3 needs this.
 1405: PHP_SET_LIBTOOL_VARIABLE([--preserve-dup-deps])
 1406: 
 1407: test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
 1408: test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<'
 1409: SHARED_LIBTOOL='$(LIBTOOL)'
 1410: 
 1411: CC=$old_CC
 1412: 
 1413: PHP_CONFIGURE_PART(Generating files)
 1414: 
 1415: CXXFLAGS_CLEAN=$CXXFLAGS
 1416: CFLAGS_CLEAN=$CFLAGS
 1417: CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
 1418: INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
 1419: CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
 1420: 
 1421: if test "$PHP_PHAR" != "no" && test "$PHP_CLI" != "no"; then
 1422:   pharcmd=pharcmd
 1423:   pharcmd_install=install-pharcmd
 1424: else
 1425:   pharcmd=
 1426:   pharcmd_install=
 1427: fi;
 1428: 
 1429: all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_ZEND_EX) \$(PHP_BINARIES) $pharcmd"
 1430: install_targets="$install_sapi $install_modules $install_binaries install-build install-headers install-programs $install_pear $pharcmd_install"
 1431: 
 1432: PHP_SUBST(all_targets)
 1433: PHP_SUBST(install_targets)
 1434: PHP_SUBST(install_binary_targets)
 1435: 
 1436: PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/ sapi/cli/cli.h])
 1437: 
 1438: PHP_ADD_SOURCES(TSRM, TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c)
 1439: 
 1440: PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
 1441:        fopen_wrappers.c alloca.c  php_scandir.c \
 1442:        php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
 1443:        strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
 1444:        network.c php_open_temporary_file.c php_logos.c \
 1445:        output.c getopt.c)
 1446: 
 1447: PHP_ADD_SOURCES(main/streams, streams.c cast.c memory.c filter.c \
 1448:        plain_wrapper.c userspace.c transports.c xp_socket.c mmap.c \
 1449:        glob_wrapper.c)
 1450: 
 1451: PHP_ADD_SOURCES(/main, internal_functions.c,, sapi)
 1452: 
 1453: case $host_alias in
 1454:   *netware*)
 1455:     PHP_ADD_BUILD_DIR(win32)
 1456:     PHP_ADD_BUILD_DIR(netware)
 1457:     ;;
 1458:   *)
 1459:     PHP_ADD_SOURCES_X(/main, internal_functions_cli.c,, PHP_BINARY_OBJS)
 1460:     ;;
 1461: esac
 1462: 
 1463: PHP_ADD_SOURCES(Zend, \
 1464:     zend_language_parser.c zend_language_scanner.c \
 1465:     zend_ini_parser.c zend_ini_scanner.c \
 1466:     zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c zend_dtrace.c \
 1467:     zend_execute_API.c zend_highlight.c zend_llist.c \
 1468:     zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
 1469:     zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
 1470:     zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
 1471:     zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \
 1472:     zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c zend_gc.c \
 1473:     zend_closures.c zend_float.c zend_string.c zend_signal.c)
 1474: 
 1475: if test -r "$abs_srcdir/Zend/zend_objects.c"; then
 1476:   PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c zend_default_classes.c)
 1477: fi
 1478: 
 1479: dnl Selectively disable optimization due to high RAM usage during
 1480: dnl compiling the executor.
 1481: if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
 1482:   flag=-O0
 1483: else
 1484:   flag=
 1485: fi
 1486: 
 1487: PHP_ADD_SOURCES_X(Zend, zend_execute.c,,PHP_GLOBAL_OBJS,,$flag)
 1488: 
 1489: PHP_ADD_BUILD_DIR(main main/streams)
 1490: PHP_ADD_BUILD_DIR(TSRM)
 1491: PHP_ADD_BUILD_DIR(Zend)
 1492: 
 1493: PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/scripts/Makefile.frag,$abs_srcdir/scripts,scripts)
 1494: PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend)
 1495: PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Zend/Makefile.frag,$abs_srcdir/Zend,Zend)
 1496: 
 1497: PHP_GEN_BUILD_DIRS
 1498: PHP_GEN_GLOBAL_MAKEFILE
 1499: 
 1500: AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
 1501: 
 1502: $php_shtool mkdir -p pear/scripts
 1503: $php_shtool mkdir -p scripts
 1504: $php_shtool mkdir -p scripts/man1
 1505: 
 1506: ALL_OUTPUT_FILES="php5.spec main/build-defs.h \
 1507: scripts/phpize scripts/man1/phpize.1 \
 1508: scripts/php-config scripts/man1/php-config.1 \
 1509: $PHP_OUTPUT_FILES"
 1510: 
 1511: dnl
 1512: dnl Check for unknown configure options
 1513: dnl
 1514: PHP_CHECK_CONFIGURE_OPTIONS
 1515: 
 1516: dnl
 1517: dnl Generate build files
 1518: dnl
 1519: AC_OUTPUT($ALL_OUTPUT_FILES, [], [
 1520: 
 1521: if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
 1522:   REDO_ALL=yes
 1523: fi
 1524: 
 1525: ################################################################
 1526: # Create configuration headers
 1527: #
 1528: 
 1529: test -d TSRM || $php_shtool mkdir TSRM
 1530: echo '#include <../main/php_config.h>' > TSRM/tsrm_config.h
 1531: 
 1532: test -d Zend || $php_shtool mkdir Zend
 1533: 
 1534: cat >Zend/zend_config.h <<FEO
 1535: #include <../main/php_config.h>
 1536: #if defined(APACHE) && defined(PHP_API_VERSION)
 1537: #undef HAVE_DLFCN_H
 1538: #endif
 1539: FEO
 1540: 
 1541: # run this only when generating all the files?
 1542: if test -n "\$REDO_ALL"; then
 1543:   # Hacking while airborne considered harmful.
 1544:   #
 1545:   echo "creating main/internal_functions.c"
 1546:   extensions="$EXT_STATIC"
 1547: dnl mv -f main/internal_functions.c main/internal_functions.c.old 2>/dev/null
 1548:   sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$extensions > main/internal_functions.c
 1549: 
 1550:   echo "creating main/internal_functions_cli.c"
 1551:   cli_extensions="$EXT_CLI_STATIC"
 1552:   sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$cli_extensions > main/internal_functions_cli.c
 1553: 
 1554:   if test "$UNAME" = "FreeBSD" && test "$PHP_SAPI" = "apache2filter" && test "$TSRM_PTH" != "pth-config" ; then
 1555:     echo "+--------------------------------------------------------------------+"
 1556:     echo "|                        *** WARNING ***                             |"
 1557:     echo "|                                                                    |"
 1558:     echo "| In order to build PHP as a Apache2 module on FreeBSD, you have to  |"
 1559:     echo "| add  --with-tsrm-pth to your ./configure line. Therefore you need  |"
 1560:     echo "| to install gnu-pth from /usr/ports/devel/pth.                      |"
 1561:   fi
 1562: 
 1563:   if test -n "$PHP_APXS_BROKEN"; then
 1564:     echo "+--------------------------------------------------------------------+"
 1565:     echo "| WARNING: Your $APXS script is most likely broken."
 1566:     echo "|                                                                    |"
 1567:     echo "| Please go read http://www.php.net/faq.build#faq.build.apxs         |"
 1568:     echo "| and make the changes described there and try again.                |"
 1569:   fi
 1570: 
 1571:   if test -n "$DEBUG_LOG"; then
 1572:     rm -f config.cache
 1573: cat <<X
 1574: +--------------------------------------------------------------------+
 1575: |                       *** ATTENTION ***                            |
 1576: |                                                                    |
 1577: | Something is likely to be messed up here, because the configure    |
 1578: | script was not able to detect a simple feature on your platform.   |
 1579: | This is often caused by incorrect configuration parameters. Please |
 1580: | see the file debug.log for error messages.                         |
 1581: |                                                                    |
 1582: | If you are unable to fix this, send the file debug.log to the      |
 1583: | php-install@lists.php.net mailing list and include appropiate      |
 1584: | information about your setup.                                      |
 1585: X
 1586:   fi
 1587: 
 1588:   if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
 1589:     if test "$APACHE_VERSION" -ge 2004001; then
 1590:       if test -z "$APACHE_THREADED_MPM"; then
 1591: cat <<X
 1592: +--------------------------------------------------------------------+
 1593: |                        *** WARNING ***                             |
 1594: |                                                                    |
 1595: | You have built PHP for Apache's current non-threaded MPM.          |
 1596: | If you change Apache to use a threaded MPM you must reconfigure    |
 1597: | PHP with --enable-maintainer-zts                                   |
 1598: X
 1599:       fi
 1600:     fi
 1601:   fi
 1602: 
 1603:   # Warn about linking Apache with libpthread if oci8 extension is enabled on linux.
 1604:   if test "$PHP_OCI8" != "no"; then
 1605:     if test "$PHP_SAPI" = "apache"; then
 1606:       if test `uname` = "Linux"; then
 1607: cat <<X
 1608: +--------------------------------------------------------------------+
 1609: |                        *** WARNING ***                             |
 1610: |                                                                    |
 1611: | Please check that your Apache (httpd) is linked with libpthread.   |
 1612: | If not, you have to recompile Apache with pthread. For more        |
 1613: | details, see this page: http://www.php.net/manual/ref.oci8.php     |
 1614: X
 1615:       fi
 1616:     fi
 1617: 
 1618:     if test "$PHP_SIGCHILD" != "yes"; then
 1619:       if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
 1620: cat <<X
 1621: +--------------------------------------------------------------------+
 1622: | Notice:                                                            |
 1623: | If you encounter <defunc> processes when using a local Oracle      |
 1624: | database, set the value BEQUEATH_DETACH=YES in Oracle Net's        |
 1625: | sqlnet.ora file on the PHP host, or set the environment variable   |
 1626: | BEQUEATH_DETACH to YES before starting Apache.  If the problem     |
 1627: | still occurs, then recompile PHP and specify --enable-sigchild     |
 1628: | when configuring.                                                  |
 1629: X
 1630:       fi
 1631:     fi
 1632:   fi
 1633: 
 1634: cat <<X
 1635: +--------------------------------------------------------------------+
 1636: | License:                                                           |
 1637: | This software is subject to the PHP License, available in this     |
 1638: | distribution in the file LICENSE.  By continuing this installation |
 1639: | process, you are bound by the terms of this license agreement.     |
 1640: | If you do not agree with the terms of this license, you must abort |
 1641: | the installation process at this point.                            |
 1642: +--------------------------------------------------------------------+
 1643: 
 1644: Thank you for using PHP.
 1645: 
 1646: X
 1647: 
 1648:   # Output unknown configure options
 1649:   if test "$PHP_UNKNOWN_CONFIGURE_OPTIONS"; then
 1650:     echo "Notice: Following unknown configure options were used:
 1651: $PHP_UNKNOWN_CONFIGURE_OPTIONS
 1652: 
 1653: Check '[$]0 --help' for available options
 1654: "
 1655:   fi
 1656: 
 1657: fi
 1658: ])
 1659: 
 1660: dnl ## Local Variables:
 1661: dnl ## tab-width: 4
 1662: dnl ## End:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>