Annotation of embedaddon/php/configure.in, revision 1.1.1.5

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

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