configure.in 45 KB

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