1 #! /bin/sh
6 PHP_VAR_SUBST="$PHP_VAR_SUBST EXT_STATIC"
10 PHP_VAR_SUBST="$PHP_VAR_SUBST EXT_SHARED"
14 PHP_VAR_SUBST="$PHP_VAR_SUBST EXT_LIBS"
18 PHP_VAR_SUBST="$PHP_VAR_SUBST EXT_LTLIBS"
41 # serial 40 AC_PROG_LIBTOOL
46 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
49 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
52 # AC_ENABLE_SHARED - implement the --enable-shared flag
53 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
54 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
55 # `yes'.
58 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
61 # AC_ENABLE_STATIC - implement the --enable-static flag
62 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
63 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
64 # `yes'.
67 # AC_DISABLE_STATIC - set the default static flag to --disable-static
71 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
72 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
73 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
74 # `yes'.
77 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
80 # AC_PROG_LD - find the path to the GNU or non-GNU linker
85 # AC_PROG_NM - find the path to a BSD-compatible name lister
88 # AC_CHECK_LIBM - check for math library
91 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
92 # the libltdl convenience library, adds --enable-ltdl-convenience to
93 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
94 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
95 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
96 # '${top_builddir}/' (note the single quotes!) if your package is not
97 # flat, and, if you're not using automake, define top_builddir as
98 # appropriate in the Makefiles.
101 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
102 # the libltdl installable library, and adds --enable-ltdl-install to
103 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
104 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
105 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
106 # '${top_builddir}/' (note the single quotes!) if your package is not
107 # flat, and, if you're not using automake, define top_builddir as
108 # appropriate in the Makefiles.
109 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
114 # Guess values for system-dependent variables and create Makefiles.
115 # Generated automatically using autoconf version 2.13
116 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
117 #
118 # This configure script is free software; the Free Software Foundation
119 # gives unlimited permission to copy, distribute and modify it.
121 # Defaults:
122 ac_help=
123 ac_default_prefix=/usr/local
124 # Any additions from configure.in:
125 ac_help="$ac_help
126 --with-php-config=[PATH]"
127 ac_default_prefix=
128 ac_help="$ac_help
129 --with-rrdtool[=DIR] Include RRDTool support. DIR is the rrdtool
130 install directory."
131 ac_help="$ac_help
132 --enable-shared[=PKGS] build shared libraries [default=yes]"
133 ac_help="$ac_help
134 --enable-static[=PKGS] build static libraries [default=yes]"
135 ac_help="$ac_help
136 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
137 ac_help="$ac_help
138 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
139 ac_help="$ac_help
140 --disable-libtool-lock avoid locking (might break parallel builds)"
142 # Initialize some variables set by options.
143 # The variables have the same names as the options, with
144 # dashes changed to underlines.
145 build=NONE
146 cache_file=./config.cache
147 exec_prefix=NONE
148 host=NONE
149 no_create=
150 nonopt=NONE
151 no_recursion=
152 prefix=NONE
153 program_prefix=NONE
154 program_suffix=NONE
155 program_transform_name=s,x,x,
156 silent=
157 site=
158 srcdir=
159 target=NONE
160 verbose=
161 x_includes=NONE
162 x_libraries=NONE
163 bindir='${exec_prefix}/bin'
164 sbindir='${exec_prefix}/sbin'
165 libexecdir='${exec_prefix}/libexec'
166 datadir='${prefix}/share'
167 sysconfdir='${prefix}/etc'
168 sharedstatedir='${prefix}/com'
169 localstatedir='${prefix}/var'
170 libdir='${exec_prefix}/lib'
171 includedir='${prefix}/include'
172 oldincludedir='/usr/include'
173 infodir='${prefix}/info'
174 mandir='${prefix}/man'
176 # Initialize some other variables.
177 subdirs=
178 MFLAGS= MAKEFLAGS=
179 SHELL=${CONFIG_SHELL-/bin/sh}
180 # Maximum number of lines to put in a shell here document.
181 ac_max_here_lines=12
183 ac_prev=
184 for ac_option
185 do
187 # If the previous option needs an argument, assign it.
188 if test -n "$ac_prev"; then
189 eval "$ac_prev=\$ac_option"
190 ac_prev=
191 continue
192 fi
194 case "$ac_option" in
195 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
196 *) ac_optarg= ;;
197 esac
199 # Accept the important Cygnus configure options, so we can diagnose typos.
201 case "$ac_option" in
203 -bindir | --bindir | --bindi | --bind | --bin | --bi)
204 ac_prev=bindir ;;
205 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
206 bindir="$ac_optarg" ;;
208 -build | --build | --buil | --bui | --bu)
209 ac_prev=build ;;
210 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
211 build="$ac_optarg" ;;
213 -cache-file | --cache-file | --cache-fil | --cache-fi \
214 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
215 ac_prev=cache_file ;;
216 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
217 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
218 cache_file="$ac_optarg" ;;
220 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
221 ac_prev=datadir ;;
222 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
223 | --da=*)
224 datadir="$ac_optarg" ;;
226 -disable-* | --disable-*)
227 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
228 # Reject names that are not valid shell variable names.
229 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
230 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
231 fi
232 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
233 eval "enable_${ac_feature}=no" ;;
235 -enable-* | --enable-*)
236 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
237 # Reject names that are not valid shell variable names.
238 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
239 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
240 fi
241 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
242 case "$ac_option" in
243 *=*) ;;
244 *) ac_optarg=yes ;;
245 esac
246 eval "enable_${ac_feature}='$ac_optarg'" ;;
248 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
249 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
250 | --exec | --exe | --ex)
251 ac_prev=exec_prefix ;;
252 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
253 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
254 | --exec=* | --exe=* | --ex=*)
255 exec_prefix="$ac_optarg" ;;
257 -gas | --gas | --ga | --g)
258 # Obsolete; use --with-gas.
259 with_gas=yes ;;
261 -help | --help | --hel | --he)
262 # Omit some internal or obsolete options to make the list less imposing.
263 # This message is too long to be a string in the A/UX 3.1 sh.
264 cat << EOF
265 Usage: configure [options] [host]
266 Options: [defaults in brackets after descriptions]
267 Configuration:
268 --cache-file=FILE cache test results in FILE
269 --help print this message
270 --no-create do not create output files
271 --quiet, --silent do not print \`checking...' messages
272 --version print the version of autoconf that created configure
273 Directory and file names:
274 --prefix=PREFIX install architecture-independent files in PREFIX
275 [$ac_default_prefix]
276 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
277 [same as prefix]
278 --bindir=DIR user executables in DIR [EPREFIX/bin]
279 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
280 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
281 --datadir=DIR read-only architecture-independent data in DIR
282 [PREFIX/share]
283 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
284 --sharedstatedir=DIR modifiable architecture-independent data in DIR
285 [PREFIX/com]
286 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
287 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
288 --includedir=DIR C header files in DIR [PREFIX/include]
289 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
290 --infodir=DIR info documentation in DIR [PREFIX/info]
291 --mandir=DIR man documentation in DIR [PREFIX/man]
292 --srcdir=DIR find the sources in DIR [configure dir or ..]
293 --program-prefix=PREFIX prepend PREFIX to installed program names
294 --program-suffix=SUFFIX append SUFFIX to installed program names
295 --program-transform-name=PROGRAM
296 run sed PROGRAM on installed program names
297 EOF
298 cat << EOF
299 Host type:
300 --build=BUILD configure for building on BUILD [BUILD=HOST]
301 --host=HOST configure for HOST [guessed]
302 --target=TARGET configure for TARGET [TARGET=HOST]
303 Features and packages:
304 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
305 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
306 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
307 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
308 --x-includes=DIR X include files are in DIR
309 --x-libraries=DIR X library files are in DIR
310 EOF
311 if test -n "$ac_help"; then
312 echo "--enable and --with options recognized:$ac_help"
313 fi
314 exit 0 ;;
316 -host | --host | --hos | --ho)
317 ac_prev=host ;;
318 -host=* | --host=* | --hos=* | --ho=*)
319 host="$ac_optarg" ;;
321 -includedir | --includedir | --includedi | --included | --include \
322 | --includ | --inclu | --incl | --inc)
323 ac_prev=includedir ;;
324 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
325 | --includ=* | --inclu=* | --incl=* | --inc=*)
326 includedir="$ac_optarg" ;;
328 -infodir | --infodir | --infodi | --infod | --info | --inf)
329 ac_prev=infodir ;;
330 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
331 infodir="$ac_optarg" ;;
333 -libdir | --libdir | --libdi | --libd)
334 ac_prev=libdir ;;
335 -libdir=* | --libdir=* | --libdi=* | --libd=*)
336 libdir="$ac_optarg" ;;
338 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
339 | --libexe | --libex | --libe)
340 ac_prev=libexecdir ;;
341 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
342 | --libexe=* | --libex=* | --libe=*)
343 libexecdir="$ac_optarg" ;;
345 -localstatedir | --localstatedir | --localstatedi | --localstated \
346 | --localstate | --localstat | --localsta | --localst \
347 | --locals | --local | --loca | --loc | --lo)
348 ac_prev=localstatedir ;;
349 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
350 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
351 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
352 localstatedir="$ac_optarg" ;;
354 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
355 ac_prev=mandir ;;
356 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
357 mandir="$ac_optarg" ;;
359 -nfp | --nfp | --nf)
360 # Obsolete; use --without-fp.
361 with_fp=no ;;
363 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
364 | --no-cr | --no-c)
365 no_create=yes ;;
367 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
368 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
369 no_recursion=yes ;;
371 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
372 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
373 | --oldin | --oldi | --old | --ol | --o)
374 ac_prev=oldincludedir ;;
375 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
376 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
377 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
378 oldincludedir="$ac_optarg" ;;
380 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
381 ac_prev=prefix ;;
382 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
383 prefix="$ac_optarg" ;;
385 -program-prefix | --program-prefix | --program-prefi | --program-pref \
386 | --program-pre | --program-pr | --program-p)
387 ac_prev=program_prefix ;;
388 -program-prefix=* | --program-prefix=* | --program-prefi=* \
389 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
390 program_prefix="$ac_optarg" ;;
392 -program-suffix | --program-suffix | --program-suffi | --program-suff \
393 | --program-suf | --program-su | --program-s)
394 ac_prev=program_suffix ;;
395 -program-suffix=* | --program-suffix=* | --program-suffi=* \
396 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
397 program_suffix="$ac_optarg" ;;
399 -program-transform-name | --program-transform-name \
400 | --program-transform-nam | --program-transform-na \
401 | --program-transform-n | --program-transform- \
402 | --program-transform | --program-transfor \
403 | --program-transfo | --program-transf \
404 | --program-trans | --program-tran \
405 | --progr-tra | --program-tr | --program-t)
406 ac_prev=program_transform_name ;;
407 -program-transform-name=* | --program-transform-name=* \
408 | --program-transform-nam=* | --program-transform-na=* \
409 | --program-transform-n=* | --program-transform-=* \
410 | --program-transform=* | --program-transfor=* \
411 | --program-transfo=* | --program-transf=* \
412 | --program-trans=* | --program-tran=* \
413 | --progr-tra=* | --program-tr=* | --program-t=*)
414 program_transform_name="$ac_optarg" ;;
416 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
417 | -silent | --silent | --silen | --sile | --sil)
418 silent=yes ;;
420 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
421 ac_prev=sbindir ;;
422 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
423 | --sbi=* | --sb=*)
424 sbindir="$ac_optarg" ;;
426 -sharedstatedir | --sharedstatedir | --sharedstatedi \
427 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
428 | --sharedst | --shareds | --shared | --share | --shar \
429 | --sha | --sh)
430 ac_prev=sharedstatedir ;;
431 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
432 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
433 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
434 | --sha=* | --sh=*)
435 sharedstatedir="$ac_optarg" ;;
437 -site | --site | --sit)
438 ac_prev=site ;;
439 -site=* | --site=* | --sit=*)
440 site="$ac_optarg" ;;
442 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
443 ac_prev=srcdir ;;
444 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
445 srcdir="$ac_optarg" ;;
447 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
448 | --syscon | --sysco | --sysc | --sys | --sy)
449 ac_prev=sysconfdir ;;
450 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
451 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
452 sysconfdir="$ac_optarg" ;;
454 -target | --target | --targe | --targ | --tar | --ta | --t)
455 ac_prev=target ;;
456 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
457 target="$ac_optarg" ;;
459 -v | -verbose | --verbose | --verbos | --verbo | --verb)
460 verbose=yes ;;
462 -version | --version | --versio | --versi | --vers)
463 echo "configure generated by autoconf version 2.13"
464 exit 0 ;;
466 -with-* | --with-*)
467 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
468 # Reject names that are not valid shell variable names.
469 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
470 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
471 fi
472 ac_package=`echo $ac_package| sed 's/-/_/g'`
473 case "$ac_option" in
474 *=*) ;;
475 *) ac_optarg=yes ;;
476 esac
477 eval "with_${ac_package}='$ac_optarg'" ;;
479 -without-* | --without-*)
480 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
481 # Reject names that are not valid shell variable names.
482 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
483 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
484 fi
485 ac_package=`echo $ac_package| sed 's/-/_/g'`
486 eval "with_${ac_package}=no" ;;
488 --x)
489 # Obsolete; use --with-x.
490 with_x=yes ;;
492 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
493 | --x-incl | --x-inc | --x-in | --x-i)
494 ac_prev=x_includes ;;
495 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
496 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
497 x_includes="$ac_optarg" ;;
499 -x-libraries | --x-libraries | --x-librarie | --x-librari \
500 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
501 ac_prev=x_libraries ;;
502 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
503 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
504 x_libraries="$ac_optarg" ;;
506 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
507 ;;
509 *)
510 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
511 echo "configure: warning: $ac_option: invalid host type" 1>&2
512 fi
513 if test "x$nonopt" != xNONE; then
514 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
515 fi
516 nonopt="$ac_option"
517 ;;
519 esac
520 done
522 if test -n "$ac_prev"; then
523 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
524 fi
526 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
528 # File descriptor usage:
529 # 0 standard input
530 # 1 file creation
531 # 2 errors and warnings
532 # 3 some systems may open it to /dev/tty
533 # 4 used on the Kubota Titan
534 # 6 checking for... messages and results
535 # 5 compiler messages saved in config.log
536 if test "$silent" = yes; then
537 exec 6>/dev/null
538 else
539 exec 6>&1
540 fi
541 exec 5>./config.log
543 echo "\
544 This file contains any messages produced by compilers while
545 running configure, to aid debugging if configure makes a mistake.
546 " 1>&5
548 # Strip out --no-create and --no-recursion so they do not pile up.
549 # Also quote any args containing shell metacharacters.
550 ac_configure_args=
551 for ac_arg
552 do
553 case "$ac_arg" in
554 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
555 | --no-cr | --no-c) ;;
556 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
557 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
558 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
559 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
560 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
561 esac
562 done
564 # NLS nuisances.
565 # Only set these to C if already set. These must not be set unconditionally
566 # because not all systems understand e.g. LANG=C (notably SCO).
567 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
568 # Non-C LC_CTYPE values break the ctype check.
569 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
570 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
571 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
572 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
574 # confdefs.h avoids OS command line length limits that DEFS can exceed.
575 rm -rf conftest* confdefs.h
576 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
577 echo > confdefs.h
579 # A filename unique to this package, relative to the directory that
580 # configure is in, which we can look for to find out if srcdir is correct.
581 ac_unique_file=Makefile.in
583 # Find the source files, if location was not specified.
584 if test -z "$srcdir"; then
585 ac_srcdir_defaulted=yes
586 # Try the directory containing this script, then its parent.
587 ac_prog=$0
588 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
589 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
590 srcdir=$ac_confdir
591 if test ! -r $srcdir/$ac_unique_file; then
592 srcdir=..
593 fi
594 else
595 ac_srcdir_defaulted=no
596 fi
597 if test ! -r $srcdir/$ac_unique_file; then
598 if test "$ac_srcdir_defaulted" = yes; then
599 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
600 else
601 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
602 fi
603 fi
604 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
606 # Prefer explicitly selected file to automatically selected ones.
607 if test -z "$CONFIG_SITE"; then
608 if test "x$prefix" != xNONE; then
609 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
610 else
611 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
612 fi
613 fi
614 for ac_site_file in $CONFIG_SITE; do
615 if test -r "$ac_site_file"; then
616 echo "loading site script $ac_site_file"
617 . "$ac_site_file"
618 fi
619 done
621 if test -r "$cache_file"; then
622 echo "loading cache $cache_file"
623 . $cache_file
624 else
625 echo "creating cache $cache_file"
626 > $cache_file
627 fi
629 ac_ext=c
630 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
631 ac_cpp='$CPP $CPPFLAGS'
632 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
633 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
634 cross_compiling=$ac_cv_prog_cc_cross
636 ac_exeext=
637 ac_objext=o
638 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
639 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
640 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
641 ac_n= ac_c='
642 ' ac_t=' '
643 else
644 ac_n=-n ac_c= ac_t=
645 fi
646 else
647 ac_n= ac_c='\c' ac_t=
648 fi
654 abs_srcdir=`(cd $srcdir && pwd)`
656 php_always_shared=yes
658 # Extract the first word of "gcc", so it can be a program name with args.
659 set dummy gcc; ac_word=$2
660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
661 echo "configure:662: checking for $ac_word" >&5
662 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
663 echo $ac_n "(cached) $ac_c" 1>&6
664 else
665 if test -n "$CC"; then
666 ac_cv_prog_CC="$CC" # Let the user override the test.
667 else
668 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
669 ac_dummy="$PATH"
670 for ac_dir in $ac_dummy; do
671 test -z "$ac_dir" && ac_dir=.
672 if test -f $ac_dir/$ac_word; then
673 ac_cv_prog_CC="gcc"
674 break
675 fi
676 done
677 IFS="$ac_save_ifs"
678 fi
679 fi
680 CC="$ac_cv_prog_CC"
681 if test -n "$CC"; then
682 echo "$ac_t""$CC" 1>&6
683 else
684 echo "$ac_t""no" 1>&6
685 fi
687 if test -z "$CC"; then
688 # Extract the first word of "cc", so it can be a program name with args.
689 set dummy cc; ac_word=$2
690 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
691 echo "configure:692: checking for $ac_word" >&5
692 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
693 echo $ac_n "(cached) $ac_c" 1>&6
694 else
695 if test -n "$CC"; then
696 ac_cv_prog_CC="$CC" # Let the user override the test.
697 else
698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
699 ac_prog_rejected=no
700 ac_dummy="$PATH"
701 for ac_dir in $ac_dummy; do
702 test -z "$ac_dir" && ac_dir=.
703 if test -f $ac_dir/$ac_word; then
704 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
705 ac_prog_rejected=yes
706 continue
707 fi
708 ac_cv_prog_CC="cc"
709 break
710 fi
711 done
712 IFS="$ac_save_ifs"
713 if test $ac_prog_rejected = yes; then
714 # We found a bogon in the path, so make sure we never use it.
715 set dummy $ac_cv_prog_CC
716 shift
717 if test $# -gt 0; then
718 # We chose a different compiler from the bogus one.
719 # However, it has the same basename, so the bogon will be chosen
720 # first if we set CC to just the basename; use the full file name.
721 shift
722 set dummy "$ac_dir/$ac_word" "$@"
723 shift
724 ac_cv_prog_CC="$@"
725 fi
726 fi
727 fi
728 fi
729 CC="$ac_cv_prog_CC"
730 if test -n "$CC"; then
731 echo "$ac_t""$CC" 1>&6
732 else
733 echo "$ac_t""no" 1>&6
734 fi
736 if test -z "$CC"; then
737 case "`uname -s`" in
738 *win32* | *WIN32*)
739 # Extract the first word of "cl", so it can be a program name with args.
740 set dummy cl; ac_word=$2
741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
742 echo "configure:743: checking for $ac_word" >&5
743 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
744 echo $ac_n "(cached) $ac_c" 1>&6
745 else
746 if test -n "$CC"; then
747 ac_cv_prog_CC="$CC" # Let the user override the test.
748 else
749 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
750 ac_dummy="$PATH"
751 for ac_dir in $ac_dummy; do
752 test -z "$ac_dir" && ac_dir=.
753 if test -f $ac_dir/$ac_word; then
754 ac_cv_prog_CC="cl"
755 break
756 fi
757 done
758 IFS="$ac_save_ifs"
759 fi
760 fi
761 CC="$ac_cv_prog_CC"
762 if test -n "$CC"; then
763 echo "$ac_t""$CC" 1>&6
764 else
765 echo "$ac_t""no" 1>&6
766 fi
767 ;;
768 esac
769 fi
770 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
771 fi
773 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
774 echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
776 ac_ext=c
777 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
778 ac_cpp='$CPP $CPPFLAGS'
779 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
780 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
781 cross_compiling=$ac_cv_prog_cc_cross
783 cat > conftest.$ac_ext << EOF
785 #line 786 "configure"
786 #include "confdefs.h"
788 main(){return(0);}
789 EOF
790 if { (eval echo configure:791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
791 ac_cv_prog_cc_works=yes
792 # If we can't run a trivial program, we are probably using a cross compiler.
793 if (./conftest; exit) 2>/dev/null; then
794 ac_cv_prog_cc_cross=no
795 else
796 ac_cv_prog_cc_cross=yes
797 fi
798 else
799 echo "configure: failed program was:" >&5
800 cat conftest.$ac_ext >&5
801 ac_cv_prog_cc_works=no
802 fi
803 rm -fr conftest*
804 ac_ext=c
805 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
806 ac_cpp='$CPP $CPPFLAGS'
807 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
808 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
809 cross_compiling=$ac_cv_prog_cc_cross
811 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
812 if test $ac_cv_prog_cc_works = no; then
813 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
814 fi
815 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
816 echo "configure:817: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
817 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
818 cross_compiling=$ac_cv_prog_cc_cross
820 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
821 echo "configure:822: checking whether we are using GNU C" >&5
822 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
823 echo $ac_n "(cached) $ac_c" 1>&6
824 else
825 cat > conftest.c <<EOF
826 #ifdef __GNUC__
827 yes;
828 #endif
829 EOF
830 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
831 ac_cv_prog_gcc=yes
832 else
833 ac_cv_prog_gcc=no
834 fi
835 fi
837 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
839 if test $ac_cv_prog_gcc = yes; then
840 GCC=yes
841 else
842 GCC=
843 fi
845 ac_test_CFLAGS="${CFLAGS+set}"
846 ac_save_CFLAGS="$CFLAGS"
847 CFLAGS=
848 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
849 echo "configure:850: checking whether ${CC-cc} accepts -g" >&5
850 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
851 echo $ac_n "(cached) $ac_c" 1>&6
852 else
853 echo 'void f(){}' > conftest.c
854 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
855 ac_cv_prog_cc_g=yes
856 else
857 ac_cv_prog_cc_g=no
858 fi
859 rm -f conftest*
861 fi
863 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
864 if test "$ac_test_CFLAGS" = set; then
865 CFLAGS="$ac_save_CFLAGS"
866 elif test $ac_cv_prog_cc_g = yes; then
867 if test "$GCC" = yes; then
868 CFLAGS="-g -O2"
869 else
870 CFLAGS="-g"
871 fi
872 else
873 if test "$GCC" = yes; then
874 CFLAGS="-O2"
875 else
876 CFLAGS=
877 fi
878 fi
880 if test "x$CC" != xcc; then
881 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
882 echo "configure:883: checking whether $CC and cc understand -c and -o together" >&5
883 else
884 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
885 echo "configure:886: checking whether cc understands -c and -o together" >&5
886 fi
887 set dummy $CC; ac_cc="`echo $2 |
888 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
889 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
890 echo $ac_n "(cached) $ac_c" 1>&6
891 else
892 echo 'foo(){}' > conftest.c
893 # Make sure it works both with $CC and with simple cc.
894 # We do the test twice because some compilers refuse to overwrite an
895 # existing .o file with -o, though they will create one.
896 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
897 if { (eval echo configure:898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
898 test -f conftest.o && { (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
899 then
900 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
901 if test "x$CC" != xcc; then
902 # Test first that cc exists at all.
903 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
904 ac_try='cc -c conftest.c -o conftest.o 1>&5'
905 if { (eval echo configure:906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
906 test -f conftest.o && { (eval echo configure:907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
907 then
908 # cc works too.
909 :
910 else
911 # cc exists but doesn't like -o.
912 eval ac_cv_prog_cc_${ac_cc}_c_o=no
913 fi
914 fi
915 fi
916 else
917 eval ac_cv_prog_cc_${ac_cc}_c_o=no
918 fi
919 rm -f conftest*
921 fi
922 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
923 echo "$ac_t""yes" 1>&6
924 else
925 echo "$ac_t""no" 1>&6
926 cat >> confdefs.h <<\EOF
927 #define NO_MINUS_C_MINUS_O 1
928 EOF
930 fi
934 # Check whether --with-php-config or --without-php-config was given.
935 if test "${with_php_config+set}" = set; then
936 withval="$with_php_config"
938 PHP_CONFIG=$withval
940 else
942 PHP_CONFIG=php-config
944 fi
947 prefix=`$PHP_CONFIG --prefix 2>/dev/null`
948 INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
949 EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
951 if test -z "$prefix"; then
952 { echo "configure: error: Cannot find php-config. Please use --with-php-config=PATH" 1>&2; exit 1; }
953 fi
954 echo $ac_n "checking for PHP prefix""... $ac_c" 1>&6
955 echo "configure:956: checking for PHP prefix" >&5
956 echo "$ac_t""$prefix" 1>&6
957 echo $ac_n "checking for PHP includes""... $ac_c" 1>&6
958 echo "configure:959: checking for PHP includes" >&5
959 echo "$ac_t""$INCLUDES" 1>&6
960 echo $ac_n "checking for PHP extension directory""... $ac_c" 1>&6
961 echo "configure:962: checking for PHP extension directory" >&5
962 echo "$ac_t""$EXTENSION_DIR" 1>&6
970 echo $ac_n "checking for RRDTool support""... $ac_c" 1>&6
971 echo "configure:972: checking for RRDTool support" >&5
972 # Check whether --with-rrdtool or --without-rrdtool was given.
973 if test "${with_rrdtool+set}" = set; then
974 withval="$with_rrdtool"
975 PHP_RRDTOOL=$withval
976 else
977 PHP_RRDTOOL=no
978 fi
981 case "$PHP_RRDTOOL" in
982 shared,*)
983 ext_output="yes, shared"
984 ext_shared=yes
985 PHP_RRDTOOL=`echo $ac_n "$PHP_RRDTOOL$ac_c"|sed s/^shared,//`
986 ;;
987 shared)
988 ext_output="yes, shared"
989 ext_shared=yes
990 PHP_RRDTOOL=yes
991 ;;
992 no)
993 ext_output="no"
994 ext_shared=no
995 ;;
996 *)
997 ext_output="yes"
998 ext_shared=no
999 ;;
1000 esac
1002 if test "$php_always_shared" = "yes"; then
1003 ext_output="yes, shared"
1004 ext_shared=yes
1005 test "$PHP_RRDTOOL" = "no" && PHP_RRDTOOL=yes
1006 fi
1008 echo "$ac_t""$ext_output" 1>&6
1013 if test "$PHP_RRDTOOL" != "no"; then
1014 for i in /usr/local /usr /opt/rrdtool /usr/local/rrdtool $PHP_RRDTOOL; do
1015 if test -f $i/include/rrd.h; then
1016 RRDTOOL_DIR=$i
1017 fi
1018 done
1020 if test -z "$RRDTOOL_DIR"; then
1021 { echo "configure: error: Please reinstall rrdtool" 1>&2; exit 1; }
1022 fi
1024 if test "$RRDTOOL_DIR/include" != "/usr/include"; then
1026 if test -z "$RRDTOOL_DIR/include" || echo "$RRDTOOL_DIR/include" | grep '^/' >/dev/null ; then
1027 ai_p="$RRDTOOL_DIR/include"
1028 else
1030 ep_dir="`echo $RRDTOOL_DIR/include|sed 's%/*[^/][^/]*$%%'`"
1032 ep_realdir="`(cd \"$ep_dir\" && pwd)`"
1033 ai_p="$ep_realdir/`basename \"$RRDTOOL_DIR/include\"`"
1034 fi
1038 unique=`echo $ai_p|sed 's/[^a-zA-Z0-9]/_/g'`
1040 cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
1041 if test -n "$unique" && test "`eval $cmd`" = "" ; then
1042 eval "INCLUDEPATH$unique=set"
1044 INCLUDES="$INCLUDES -I$ai_p"
1046 fi
1048 fi
1052 if test "$ext_shared" = "yes"; then
1053 RRDTOOL_SHARED_LIBADD="-lrrd $RRDTOOL_SHARED_LIBADD"
1054 if test -n "$RRDTOOL_DIR/lib"; then
1056 if test "$RRDTOOL_DIR/lib" != "/usr/lib"; then
1058 if test -z "$RRDTOOL_DIR/lib" || echo "$RRDTOOL_DIR/lib" | grep '^/' >/dev/null ; then
1059 ai_p="$RRDTOOL_DIR/lib"
1060 else
1062 ep_dir="`echo $RRDTOOL_DIR/lib|sed 's%/*[^/][^/]*$%%'`"
1064 ep_realdir="`(cd \"$ep_dir\" && pwd)`"
1065 ai_p="$ep_realdir/`basename \"$RRDTOOL_DIR/lib\"`"
1066 fi
1068 if test "$ext_shared" = "yes" && test -n "RRDTOOL_SHARED_LIBADD"; then
1069 RRDTOOL_SHARED_LIBADD="-R$RRDTOOL_DIR/lib -L$RRDTOOL_DIR/lib $RRDTOOL_SHARED_LIBADD"
1070 else
1073 unique=`echo $ai_p|sed 's/[^a-zA-Z0-9]/_/g'`
1075 cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
1076 if test -n "$unique" && test "`eval $cmd`" = "" ; then
1077 eval "LIBPATH$unique=set"
1079 test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
1080 LDFLAGS="$LDFLAGS -L$ai_p"
1081 PHP_RPATHS="$PHP_RPATHS $ai_p"
1083 fi
1085 fi
1086 fi
1088 fi
1089 else
1092 if test -n "$RRDTOOL_DIR/lib"; then
1094 if test "$RRDTOOL_DIR/lib" != "/usr/lib"; then
1096 if test -z "$RRDTOOL_DIR/lib" || echo "$RRDTOOL_DIR/lib" | grep '^/' >/dev/null ; then
1097 ai_p="$RRDTOOL_DIR/lib"
1098 else
1100 ep_dir="`echo $RRDTOOL_DIR/lib|sed 's%/*[^/][^/]*$%%'`"
1102 ep_realdir="`(cd \"$ep_dir\" && pwd)`"
1103 ai_p="$ep_realdir/`basename \"$RRDTOOL_DIR/lib\"`"
1104 fi
1106 if test "$ext_shared" = "yes" && test -n ""; then
1107 ="-R$RRDTOOL_DIR/lib -L$RRDTOOL_DIR/lib $"
1108 else
1111 unique=`echo $ai_p|sed 's/[^a-zA-Z0-9]/_/g'`
1113 cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
1114 if test -n "$unique" && test "`eval $cmd`" = "" ; then
1115 eval "LIBPATH$unique=set"
1117 test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
1118 LDFLAGS="$LDFLAGS -L$ai_p"
1119 PHP_RPATHS="$PHP_RPATHS $ai_p"
1121 fi
1123 fi
1124 fi
1126 fi
1128 case "rrd" in
1129 c|c_r|pthread*) ;;
1130 *)
1134 unique=`echo rrd|sed 's/[^a-zA-Z0-9]/_/g'`
1136 cmd="echo $ac_n \"\$LIBRARY$unique$ac_c\""
1137 if test -n "$unique" && test "`eval $cmd`" = "" ; then
1138 eval "LIBRARY$unique=set"
1141 LIBS="-lrrd $LIBS"
1144 fi
1147 ;;
1148 esac
1152 fi
1156 PHP_VAR_SUBST="$PHP_VAR_SUBST RRDTOOL_SHARED_LIBADD"
1160 cat >> confdefs.h <<\EOF
1161 #define HAVE_RRDTOOL 1
1162 EOF
1166 EXT_SUBDIRS="$EXT_SUBDIRS rrdtool"
1168 if test -d "$abs_srcdir/ext/rrdtool"; then
1169 ext_builddir="ext/rrdtool"
1170 ext_srcdir="$abs_srcdir/ext/rrdtool"
1171 else
1172 ext_builddir="."
1173 ext_srcdir="$abs_srcdir"
1174 fi
1176 if test "$ext_shared" != "shared" && test "$ext_shared" != "yes"; then
1178 lib_makefile="$ext_builddir/libs.mk"
1179 lib_target=""
1181 $php_shtool mkdir -p $ext_builddir
1182 cat >$lib_makefile<<EOF
1183 LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo)
1184 LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
1185 EOF
1187 if test "" = "shared" || test "" = "yes"; then
1188 lib_build_shared=yes
1189 if test -n ""; then
1191 lib_target="\$(LTLIBRARY_NAME)"
1192 cat >>$lib_makefile<<EOF
1193 \$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1194 \$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \$@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
1196 EOF
1198 else
1200 lib_target="\$(LTLIBRARY_SHARED_NAME)"
1201 cat >>$lib_makefile<<EOF
1202 \$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1203 \$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \$@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
1204 \$(SHARED_LIBTOOL) --mode=install cp \$@ \$(phplibdir)
1206 EOF
1208 fi
1209 else
1211 lib_target="\$(LTLIBRARY_NAME)"
1212 cat >>$lib_makefile<<EOF
1213 \$(LTLIBRARY_NAME): \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1214 \$(LINK) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_LIBADD)
1216 EOF
1218 fi
1220 if test -n "$lib_target"; then
1221 cat >>$lib_makefile<<EOF
1222 targets = $lib_target
1223 EOF
1224 fi
1226 EXT_LTLIBS="$EXT_LTLIBS $ext_builddir/librrdtool.la"
1227 EXT_STATIC="$EXT_STATIC rrdtool"
1228 else
1230 lib_makefile="$ext_builddir/libs.mk"
1231 lib_target=""
1233 $php_shtool mkdir -p $ext_builddir
1234 cat >$lib_makefile<<EOF
1235 LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo)
1236 LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
1237 EOF
1239 if test "yes" = "shared" || test "yes" = "yes"; then
1240 lib_build_shared=yes
1241 if test -n ""; then
1243 lib_target="\$(LTLIBRARY_NAME)"
1244 cat >>$lib_makefile<<EOF
1245 \$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1246 \$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \$@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
1248 EOF
1250 else
1252 lib_target="\$(LTLIBRARY_SHARED_NAME)"
1253 cat >>$lib_makefile<<EOF
1254 \$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1255 \$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \$@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
1256 \$(SHARED_LIBTOOL) --mode=install cp \$@ \$(phplibdir)
1258 EOF
1260 fi
1261 else
1263 lib_target="\$(LTLIBRARY_NAME)"
1264 cat >>$lib_makefile<<EOF
1265 \$(LTLIBRARY_NAME): \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1266 \$(LINK) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_LIBADD)
1268 EOF
1270 fi
1272 if test -n "$lib_target"; then
1273 cat >>$lib_makefile<<EOF
1274 targets = $lib_target
1275 EOF
1276 fi
1278 cat >> confdefs.h <<EOF
1279 #define COMPILE_DL_RRDTOOL 1
1280 EOF
1282 fi
1285 PHP_FAST_OUTPUT_FILES="$PHP_FAST_OUTPUT_FILES $ext_builddir/Makefile"
1288 fi
1291 enable_static=no
1292 enable_shared=yes
1294 ac_aux_dir=
1295 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1296 if test -f $ac_dir/install-sh; then
1297 ac_aux_dir=$ac_dir
1298 ac_install_sh="$ac_aux_dir/install-sh -c"
1299 break
1300 elif test -f $ac_dir/install.sh; then
1301 ac_aux_dir=$ac_dir
1302 ac_install_sh="$ac_aux_dir/install.sh -c"
1303 break
1304 fi
1305 done
1306 if test -z "$ac_aux_dir"; then
1307 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1308 fi
1309 ac_config_guess=$ac_aux_dir/config.guess
1310 ac_config_sub=$ac_aux_dir/config.sub
1311 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1313 # Check whether --enable-shared or --disable-shared was given.
1314 if test "${enable_shared+set}" = set; then
1315 enableval="$enable_shared"
1316 p=${PACKAGE-default}
1317 case "$enableval" in
1318 yes) enable_shared=yes ;;
1319 no) enable_shared=no ;;
1320 *)
1321 enable_shared=no
1322 # Look at the argument we got. We use all the common list separators.
1323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1324 for pkg in $enableval; do
1325 if test "X$pkg" = "X$p"; then
1326 enable_shared=yes
1327 fi
1328 done
1329 IFS="$ac_save_ifs"
1330 ;;
1331 esac
1332 else
1333 enable_shared=yes
1334 fi
1336 # Check whether --enable-static or --disable-static was given.
1337 if test "${enable_static+set}" = set; then
1338 enableval="$enable_static"
1339 p=${PACKAGE-default}
1340 case "$enableval" in
1341 yes) enable_static=yes ;;
1342 no) enable_static=no ;;
1343 *)
1344 enable_static=no
1345 # Look at the argument we got. We use all the common list separators.
1346 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1347 for pkg in $enableval; do
1348 if test "X$pkg" = "X$p"; then
1349 enable_static=yes
1350 fi
1351 done
1352 IFS="$ac_save_ifs"
1353 ;;
1354 esac
1355 else
1356 enable_static=yes
1357 fi
1359 # Check whether --enable-fast-install or --disable-fast-install was given.
1360 if test "${enable_fast_install+set}" = set; then
1361 enableval="$enable_fast_install"
1362 p=${PACKAGE-default}
1363 case "$enableval" in
1364 yes) enable_fast_install=yes ;;
1365 no) enable_fast_install=no ;;
1366 *)
1367 enable_fast_install=no
1368 # Look at the argument we got. We use all the common list separators.
1369 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1370 for pkg in $enableval; do
1371 if test "X$pkg" = "X$p"; then
1372 enable_fast_install=yes
1373 fi
1374 done
1375 IFS="$ac_save_ifs"
1376 ;;
1377 esac
1378 else
1379 enable_fast_install=yes
1380 fi
1383 # Make sure we can run config.sub.
1384 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1385 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1386 fi
1388 echo $ac_n "checking host system type""... $ac_c" 1>&6
1389 echo "configure:1390: checking host system type" >&5
1391 host_alias=$host
1392 case "$host_alias" in
1393 NONE)
1394 case $nonopt in
1395 NONE)
1396 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1397 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1398 fi ;;
1399 *) host_alias=$nonopt ;;
1400 esac ;;
1401 esac
1403 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1404 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1405 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1406 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1407 echo "$ac_t""$host" 1>&6
1409 echo $ac_n "checking build system type""... $ac_c" 1>&6
1410 echo "configure:1411: checking build system type" >&5
1412 build_alias=$build
1413 case "$build_alias" in
1414 NONE)
1415 case $nonopt in
1416 NONE) build_alias=$host_alias ;;
1417 *) build_alias=$nonopt ;;
1418 esac ;;
1419 esac
1421 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1422 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1423 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1424 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1425 echo "$ac_t""$build" 1>&6
1427 # Extract the first word of "ranlib", so it can be a program name with args.
1428 set dummy ranlib; ac_word=$2
1429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1430 echo "configure:1431: checking for $ac_word" >&5
1431 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1432 echo $ac_n "(cached) $ac_c" 1>&6
1433 else
1434 if test -n "$RANLIB"; then
1435 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1436 else
1437 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1438 ac_dummy="$PATH"
1439 for ac_dir in $ac_dummy; do
1440 test -z "$ac_dir" && ac_dir=.
1441 if test -f $ac_dir/$ac_word; then
1442 ac_cv_prog_RANLIB="ranlib"
1443 break
1444 fi
1445 done
1446 IFS="$ac_save_ifs"
1447 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1448 fi
1449 fi
1450 RANLIB="$ac_cv_prog_RANLIB"
1451 if test -n "$RANLIB"; then
1452 echo "$ac_t""$RANLIB" 1>&6
1453 else
1454 echo "$ac_t""no" 1>&6
1455 fi
1457 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1458 if test "${with_gnu_ld+set}" = set; then
1459 withval="$with_gnu_ld"
1460 test "$withval" = no || with_gnu_ld=yes
1461 else
1462 with_gnu_ld=no
1463 fi
1465 ac_prog=ld
1466 if test "$ac_cv_prog_gcc" = yes; then
1467 # Check if gcc -print-prog-name=ld gives a path.
1468 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1469 echo "configure:1470: checking for ld used by GCC" >&5
1470 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1471 case "$ac_prog" in
1472 # Accept absolute paths.
1473 [\\/]* | [A-Za-z]:[\\/]*)
1474 re_direlt='/[^/][^/]*/\.\./'
1475 # Canonicalize the path of ld
1476 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1477 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1478 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1479 done
1480 test -z "$LD" && LD="$ac_prog"
1481 ;;
1482 "")
1483 # If it fails, then pretend we aren't using GCC.
1484 ac_prog=ld
1485 ;;
1486 *)
1487 # If it is relative, then search for the first ld in PATH.
1488 with_gnu_ld=unknown
1489 ;;
1490 esac
1491 elif test "$with_gnu_ld" = yes; then
1492 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1493 echo "configure:1494: checking for GNU ld" >&5
1494 else
1495 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1496 echo "configure:1497: checking for non-GNU ld" >&5
1497 fi
1498 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1499 echo $ac_n "(cached) $ac_c" 1>&6
1500 else
1501 if test -z "$LD"; then
1502 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1503 for ac_dir in $PATH; do
1504 test -z "$ac_dir" && ac_dir=.
1505 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1506 ac_cv_path_LD="$ac_dir/$ac_prog"
1507 # Check to see if the program is GNU ld. I'd rather use --version,
1508 # but apparently some GNU ld's only accept -v.
1509 # Break only if it was the GNU/non-GNU ld that we prefer.
1510 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1511 test "$with_gnu_ld" != no && break
1512 else
1513 test "$with_gnu_ld" != yes && break
1514 fi
1515 fi
1516 done
1517 IFS="$ac_save_ifs"
1518 else
1519 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1520 fi
1521 fi
1523 LD="$ac_cv_path_LD"
1524 if test -n "$LD"; then
1525 echo "$ac_t""$LD" 1>&6
1526 else
1527 echo "$ac_t""no" 1>&6
1528 fi
1529 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1531 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1532 echo "configure:1533: checking if the linker ($LD) is GNU ld" >&5
1533 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1534 echo $ac_n "(cached) $ac_c" 1>&6
1535 else
1536 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1537 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1538 ac_cv_prog_gnu_ld=yes
1539 else
1540 ac_cv_prog_gnu_ld=no
1541 fi
1542 fi
1544 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1547 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1548 echo "configure:1549: checking for BSD-compatible nm" >&5
1549 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1550 echo $ac_n "(cached) $ac_c" 1>&6
1551 else
1552 if test -n "$NM"; then
1553 # Let the user override the test.
1554 ac_cv_path_NM="$NM"
1555 else
1556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1557 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1558 test -z "$ac_dir" && ac_dir=.
1559 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1560 # Check to see if the nm accepts a BSD-compat flag.
1561 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1562 # nm: unknown option "B" ignored
1563 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1564 ac_cv_path_NM="$ac_dir/nm -B"
1565 break
1566 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1567 ac_cv_path_NM="$ac_dir/nm -p"
1568 break
1569 else
1570 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1571 continue # so that we can try to find one that supports BSD flags
1572 fi
1573 fi
1574 done
1575 IFS="$ac_save_ifs"
1576 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1577 fi
1578 fi
1580 NM="$ac_cv_path_NM"
1581 echo "$ac_t""$NM" 1>&6
1584 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1585 echo "configure:1586: checking whether ln -s works" >&5
1586 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1587 echo $ac_n "(cached) $ac_c" 1>&6
1588 else
1589 rm -f conftestdata
1590 if ln -s X conftestdata 2>/dev/null
1591 then
1592 rm -f conftestdata
1593 ac_cv_prog_LN_S="ln -s"
1594 else
1595 ac_cv_prog_LN_S=ln
1596 fi
1597 fi
1598 LN_S="$ac_cv_prog_LN_S"
1599 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1600 echo "$ac_t""yes" 1>&6
1601 else
1602 echo "$ac_t""no" 1>&6
1603 fi
1606 # Check for any special flags to pass to ltconfig.
1607 libtool_flags="--cache-file=$cache_file"
1608 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1609 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1610 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1611 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1612 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1615 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1616 if test "${enable_libtool_lock+set}" = set; then
1617 enableval="$enable_libtool_lock"
1618 :
1619 fi
1621 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1622 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1624 # Some flags need to be propagated to the compiler or linker for good
1625 # libtool support.
1626 case "$host" in
1627 *-*-irix6*)
1628 # Find out which ABI we are using.
1629 echo '#line 1630 "configure"' > conftest.$ac_ext
1630 if { (eval echo configure:1631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1631 case "`/usr/bin/file conftest.o`" in
1632 *32-bit*)
1633 LD="${LD-ld} -32"
1634 ;;
1635 *N32*)
1636 LD="${LD-ld} -n32"
1637 ;;
1638 *64-bit*)
1639 LD="${LD-ld} -64"
1640 ;;
1641 esac
1642 fi
1643 rm -rf conftest*
1644 ;;
1646 *-*-sco3.2v5*)
1647 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1648 SAVE_CFLAGS="$CFLAGS"
1649 CFLAGS="$CFLAGS -belf"
1650 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1651 echo "configure:1652: checking whether the C compiler needs -belf" >&5
1652 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1653 echo $ac_n "(cached) $ac_c" 1>&6
1654 else
1655 cat > conftest.$ac_ext <<EOF
1656 #line 1657 "configure"
1657 #include "confdefs.h"
1659 int main() {
1661 ; return 0; }
1662 EOF
1663 if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1664 rm -rf conftest*
1665 lt_cv_cc_needs_belf=yes
1666 else
1667 echo "configure: failed program was:" >&5
1668 cat conftest.$ac_ext >&5
1669 rm -rf conftest*
1670 lt_cv_cc_needs_belf=no
1671 fi
1672 rm -f conftest*
1673 fi
1675 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1676 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1677 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1678 CFLAGS="$SAVE_CFLAGS"
1679 fi
1680 ;;
1683 esac
1686 # Save cache, so that ltconfig can load it
1687 cat > confcache <<\EOF
1688 # This file is a shell script that caches the results of configure
1689 # tests run on this system so they can be shared between configure
1690 # scripts and configure runs. It is not useful on other systems.
1691 # If it contains results you don't want to keep, you may remove or edit it.
1692 #
1693 # By default, configure uses ./config.cache as the cache file,
1694 # creating it if it does not exist already. You can give configure
1695 # the --cache-file=FILE option to use a different cache file; that is
1696 # what configure does when it calls configure scripts in
1697 # subdirectories, so they share the cache.
1698 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1699 # config.status only pays attention to the cache file if you give it the
1700 # --recheck option to rerun configure.
1701 #
1702 EOF
1703 # The following way of writing the cache mishandles newlines in values,
1704 # but we know of no workaround that is simple, portable, and efficient.
1705 # So, don't put newlines in cache variables' values.
1706 # Ultrix sh set writes to stderr and can't be redirected directly,
1707 # and sets the high bit in the cache file unless we assign to the vars.
1708 (set) 2>&1 |
1709 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1710 *ac_space=\ *)
1711 # `set' does not quote correctly, so add quotes (double-quote substitution
1712 # turns \\\\ into \\, and sed turns \\ into \).
1713 sed -n \
1714 -e "s/'/'\\\\''/g" \
1715 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1716 ;;
1717 *)
1718 # `set' quotes correctly as required by POSIX, so do not add quotes.
1719 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1720 ;;
1721 esac >> confcache
1722 if cmp -s $cache_file confcache; then
1723 :
1724 else
1725 if test -w $cache_file; then
1726 echo "updating cache $cache_file"
1727 cat confcache > $cache_file
1728 else
1729 echo "not updating unwritable cache $cache_file"
1730 fi
1731 fi
1732 rm -f confcache
1735 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1736 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1737 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1738 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1739 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1740 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1741 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1742 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1744 # Reload cache, that may have been modified by ltconfig
1745 if test -r "$cache_file"; then
1746 echo "loading cache $cache_file"
1747 . $cache_file
1748 else
1749 echo "creating cache $cache_file"
1750 > $cache_file
1751 fi
1754 # This can be used to rebuild libtool when needed
1755 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1757 # Always use our own libtool.
1758 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1760 # Redirect the config.log output again, so that the ltconfig log is not
1761 # clobbered by the next message.
1762 exec 5>>./config.log
1765 SHARED_LIBTOOL='$(LIBTOOL)'
1766 PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
1767 phplibdir="`pwd`/modules"
1769 test "$prefix" = "NONE" && prefix="/usr/local"
1770 test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
1773 PHP_VAR_SUBST="$PHP_VAR_SUBST prefix"
1777 PHP_VAR_SUBST="$PHP_VAR_SUBST exec_prefix"
1781 PHP_VAR_SUBST="$PHP_VAR_SUBST libdir"
1785 PHP_VAR_SUBST="$PHP_VAR_SUBST prefix"
1789 PHP_VAR_SUBST="$PHP_VAR_SUBST phplibdir"
1794 PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_COMPILE"
1798 PHP_VAR_SUBST="$PHP_VAR_SUBST CC"
1802 PHP_VAR_SUBST="$PHP_VAR_SUBST CFLAGS"
1806 PHP_VAR_SUBST="$PHP_VAR_SUBST CPP"
1810 PHP_VAR_SUBST="$PHP_VAR_SUBST CPPFLAGS"
1814 PHP_VAR_SUBST="$PHP_VAR_SUBST CXX"
1818 PHP_VAR_SUBST="$PHP_VAR_SUBST DEFS"
1822 PHP_VAR_SUBST="$PHP_VAR_SUBST EXTENSION_DIR"
1826 PHP_VAR_SUBST="$PHP_VAR_SUBST EXTRA_LDFLAGS"
1830 PHP_VAR_SUBST="$PHP_VAR_SUBST EXTRA_LIBS"
1834 PHP_VAR_SUBST="$PHP_VAR_SUBST INCLUDES"
1838 PHP_VAR_SUBST="$PHP_VAR_SUBST LEX"
1842 PHP_VAR_SUBST="$PHP_VAR_SUBST LEX_OUTPUT_ROOT"
1846 PHP_VAR_SUBST="$PHP_VAR_SUBST LFLAGS"
1850 PHP_VAR_SUBST="$PHP_VAR_SUBST SHARED_LIBTOOL"
1854 PHP_VAR_SUBST="$PHP_VAR_SUBST LIBTOOL"
1858 PHP_VAR_SUBST="$PHP_VAR_SUBST SHELL"
1863 PHP_FAST_OUTPUT_FILES="$PHP_FAST_OUTPUT_FILES Makefile"
1868 echo $ac_n "checking for working mkdir -p""... $ac_c" 1>&6
1869 echo "configure:1870: checking for working mkdir -p" >&5
1870 if eval "test \"`echo '$''{'ac_cv_mkdir_p'+set}'`\" = set"; then
1871 echo $ac_n "(cached) $ac_c" 1>&6
1872 else
1874 test -d conftestdir && rm -rf conftestdir
1875 mkdir -p conftestdir/somedir >/dev/null 2>&1
1876 if test -d conftestdir/somedir; then
1877 ac_cv_mkdir_p=yes
1878 else
1879 ac_cv_mkdir_p=no
1880 fi
1881 rm -rf conftestdir
1883 fi
1885 echo "$ac_t""$ac_cv_mkdir_p" 1>&6
1887 echo creating config_vars.mk
1888 > config_vars.mk
1889 for i in $PHP_VAR_SUBST; do
1890 eval echo "$i = \$$i" >> config_vars.mk
1891 done
1894 $SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $PHP_FAST_OUTPUT_FILES
1897 test -d modules || mkdir modules
1898 touch .deps
1902 trap '' 1 2 15
1903 cat > confcache <<\EOF
1904 # This file is a shell script that caches the results of configure
1905 # tests run on this system so they can be shared between configure
1906 # scripts and configure runs. It is not useful on other systems.
1907 # If it contains results you don't want to keep, you may remove or edit it.
1908 #
1909 # By default, configure uses ./config.cache as the cache file,
1910 # creating it if it does not exist already. You can give configure
1911 # the --cache-file=FILE option to use a different cache file; that is
1912 # what configure does when it calls configure scripts in
1913 # subdirectories, so they share the cache.
1914 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1915 # config.status only pays attention to the cache file if you give it the
1916 # --recheck option to rerun configure.
1917 #
1918 EOF
1919 # The following way of writing the cache mishandles newlines in values,
1920 # but we know of no workaround that is simple, portable, and efficient.
1921 # So, don't put newlines in cache variables' values.
1922 # Ultrix sh set writes to stderr and can't be redirected directly,
1923 # and sets the high bit in the cache file unless we assign to the vars.
1924 (set) 2>&1 |
1925 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1926 *ac_space=\ *)
1927 # `set' does not quote correctly, so add quotes (double-quote substitution
1928 # turns \\\\ into \\, and sed turns \\ into \).
1929 sed -n \
1930 -e "s/'/'\\\\''/g" \
1931 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1932 ;;
1933 *)
1934 # `set' quotes correctly as required by POSIX, so do not add quotes.
1935 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1936 ;;
1937 esac >> confcache
1938 if cmp -s $cache_file confcache; then
1939 :
1940 else
1941 if test -w $cache_file; then
1942 echo "updating cache $cache_file"
1943 cat confcache > $cache_file
1944 else
1945 echo "not updating unwritable cache $cache_file"
1946 fi
1947 fi
1948 rm -f confcache
1950 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1952 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1953 # Let make expand exec_prefix.
1954 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1956 # Any assignment to VPATH causes Sun make to only execute
1957 # the first set of double-colon rules, so remove it if not needed.
1958 # If there is a colon in the path, we need to keep it.
1959 if test "x$srcdir" = x.; then
1960 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1961 fi
1963 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1965 DEFS=-DHAVE_CONFIG_H
1967 # Without the "./", some shells look in PATH for config.status.
1968 : ${CONFIG_STATUS=./config.status}
1970 echo creating $CONFIG_STATUS
1971 rm -f $CONFIG_STATUS
1972 cat > $CONFIG_STATUS <<EOF
1973 #! /bin/sh
1974 # Generated automatically by configure.
1975 # Run this file to recreate the current configuration.
1976 # This directory was configured as follows,
1977 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1978 #
1979 # $0 $ac_configure_args
1980 #
1981 # Compiler output produced by configure, useful for debugging
1982 # configure, is in ./config.log if it exists.
1984 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1985 for ac_option
1986 do
1987 case "\$ac_option" in
1988 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1989 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1990 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1991 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1992 echo "$CONFIG_STATUS generated by autoconf version 2.13"
1993 exit 0 ;;
1994 -help | --help | --hel | --he | --h)
1995 echo "\$ac_cs_usage"; exit 0 ;;
1996 *) echo "\$ac_cs_usage"; exit 1 ;;
1997 esac
1998 done
2000 ac_given_srcdir=$srcdir
2002 trap 'rm -fr `echo " php_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2003 EOF
2004 cat >> $CONFIG_STATUS <<EOF
2006 # Protect against being on the right side of a sed subst in config.status.
2007 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2008 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2009 $ac_vpsub
2010 $extrasub
2011 s%@EXT_SUBDIRS@%$EXT_SUBDIRS%g
2012 s%@EXT_STATIC@%$EXT_STATIC%g
2013 s%@EXT_SHARED@%$EXT_SHARED%g
2014 s%@EXT_LIBS@%$EXT_LIBS%g
2015 s%@EXT_LTLIBS@%$EXT_LTLIBS%g
2016 s%@SHELL@%$SHELL%g
2017 s%@CFLAGS@%$CFLAGS%g
2018 s%@CPPFLAGS@%$CPPFLAGS%g
2019 s%@CXXFLAGS@%$CXXFLAGS%g
2020 s%@FFLAGS@%$FFLAGS%g
2021 s%@DEFS@%$DEFS%g
2022 s%@LDFLAGS@%$LDFLAGS%g
2023 s%@LIBS@%$LIBS%g
2024 s%@exec_prefix@%$exec_prefix%g
2025 s%@prefix@%$prefix%g
2026 s%@program_transform_name@%$program_transform_name%g
2027 s%@bindir@%$bindir%g
2028 s%@sbindir@%$sbindir%g
2029 s%@libexecdir@%$libexecdir%g
2030 s%@datadir@%$datadir%g
2031 s%@sysconfdir@%$sysconfdir%g
2032 s%@sharedstatedir@%$sharedstatedir%g
2033 s%@localstatedir@%$localstatedir%g
2034 s%@libdir@%$libdir%g
2035 s%@includedir@%$includedir%g
2036 s%@oldincludedir@%$oldincludedir%g
2037 s%@infodir@%$infodir%g
2038 s%@mandir@%$mandir%g
2039 s%@CC@%$CC%g
2040 s%@RRDTOOL_SHARED_LIBADD@%$RRDTOOL_SHARED_LIBADD%g
2041 s%@host@%$host%g
2042 s%@host_alias@%$host_alias%g
2043 s%@host_cpu@%$host_cpu%g
2044 s%@host_vendor@%$host_vendor%g
2045 s%@host_os@%$host_os%g
2046 s%@build@%$build%g
2047 s%@build_alias@%$build_alias%g
2048 s%@build_cpu@%$build_cpu%g
2049 s%@build_vendor@%$build_vendor%g
2050 s%@build_os@%$build_os%g
2051 s%@RANLIB@%$RANLIB%g
2052 s%@LD@%$LD%g
2053 s%@NM@%$NM%g
2054 s%@LN_S@%$LN_S%g
2055 s%@LIBTOOL@%$LIBTOOL%g
2056 s%@phplibdir@%$phplibdir%g
2057 s%@PHP_COMPILE@%$PHP_COMPILE%g
2058 s%@CPP@%$CPP%g
2059 s%@CXX@%$CXX%g
2060 s%@EXTENSION_DIR@%$EXTENSION_DIR%g
2061 s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g
2062 s%@EXTRA_LIBS@%$EXTRA_LIBS%g
2063 s%@INCLUDES@%$INCLUDES%g
2064 s%@LEX@%$LEX%g
2065 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
2066 s%@LFLAGS@%$LFLAGS%g
2067 s%@SHARED_LIBTOOL@%$SHARED_LIBTOOL%g
2069 CEOF
2070 EOF
2072 cat >> $CONFIG_STATUS <<\EOF
2074 # Split the substitutions into bite-sized pieces for seds with
2075 # small command number limits, like on Digital OSF/1 and HP-UX.
2076 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2077 ac_file=1 # Number of current file.
2078 ac_beg=1 # First line for current file.
2079 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2080 ac_more_lines=:
2081 ac_sed_cmds=""
2082 while $ac_more_lines; do
2083 if test $ac_beg -gt 1; then
2084 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2085 else
2086 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2087 fi
2088 if test ! -s conftest.s$ac_file; then
2089 ac_more_lines=false
2090 rm -f conftest.s$ac_file
2091 else
2092 if test -z "$ac_sed_cmds"; then
2093 ac_sed_cmds="sed -f conftest.s$ac_file"
2094 else
2095 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2096 fi
2097 ac_file=`expr $ac_file + 1`
2098 ac_beg=$ac_end
2099 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2100 fi
2101 done
2102 if test -z "$ac_sed_cmds"; then
2103 ac_sed_cmds=cat
2104 fi
2105 EOF
2107 cat >> $CONFIG_STATUS <<EOF
2109 CONFIG_FILES=\${CONFIG_FILES-""}
2110 EOF
2111 cat >> $CONFIG_STATUS <<\EOF
2112 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2113 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2114 case "$ac_file" in
2115 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2116 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2117 *) ac_file_in="${ac_file}.in" ;;
2118 esac
2120 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2122 # Remove last slash and all that follows it. Not all systems have dirname.
2123 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2124 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2125 # The file is in a subdirectory.
2126 test ! -d "$ac_dir" && mkdir "$ac_dir"
2127 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2128 # A "../" for each directory in $ac_dir_suffix.
2129 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2130 else
2131 ac_dir_suffix= ac_dots=
2132 fi
2134 case "$ac_given_srcdir" in
2135 .) srcdir=.
2136 if test -z "$ac_dots"; then top_srcdir=.
2137 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2138 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2139 *) # Relative path.
2140 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2141 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2142 esac
2145 echo creating "$ac_file"
2146 rm -f "$ac_file"
2147 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2148 case "$ac_file" in
2149 *Makefile*) ac_comsub="1i\\
2150 # $configure_input" ;;
2151 *) ac_comsub= ;;
2152 esac
2154 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2155 sed -e "$ac_comsub
2156 s%@configure_input@%$configure_input%g
2157 s%@srcdir@%$srcdir%g
2158 s%@top_srcdir@%$top_srcdir%g
2159 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2160 fi; done
2161 rm -f conftest.s*
2163 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2164 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2165 #
2166 # ac_d sets the value in "#define NAME VALUE" lines.
2167 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2168 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2169 ac_dC='\3'
2170 ac_dD='%g'
2171 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2172 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2173 ac_uB='\([ ]\)%\1#\2define\3'
2174 ac_uC=' '
2175 ac_uD='\4%g'
2176 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2177 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2178 ac_eB='$%\1#\2define\3'
2179 ac_eC=' '
2180 ac_eD='%g'
2182 if test "${CONFIG_HEADERS+set}" != set; then
2183 EOF
2184 cat >> $CONFIG_STATUS <<EOF
2185 CONFIG_HEADERS="php_config.h"
2186 EOF
2187 cat >> $CONFIG_STATUS <<\EOF
2188 fi
2189 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2190 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2191 case "$ac_file" in
2192 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2193 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2194 *) ac_file_in="${ac_file}.in" ;;
2195 esac
2197 echo creating $ac_file
2199 rm -f conftest.frag conftest.in conftest.out
2200 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2201 cat $ac_file_inputs > conftest.in
2203 EOF
2205 # Transform confdefs.h into a sed script conftest.vals that substitutes
2206 # the proper values into config.h.in to produce config.h. And first:
2207 # Protect against being on the right side of a sed subst in config.status.
2208 # Protect against being in an unquoted here document in config.status.
2209 rm -f conftest.vals
2210 cat > conftest.hdr <<\EOF
2211 s/[\\&%]/\\&/g
2212 s%[\\$`]%\\&%g
2213 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2214 s%ac_d%ac_u%gp
2215 s%ac_u%ac_e%gp
2216 EOF
2217 sed -n -f conftest.hdr confdefs.h > conftest.vals
2218 rm -f conftest.hdr
2220 # This sed command replaces #undef with comments. This is necessary, for
2221 # example, in the case of _POSIX_SOURCE, which is predefined and required
2222 # on some systems where configure will not decide to define it.
2223 cat >> conftest.vals <<\EOF
2224 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2225 EOF
2227 # Break up conftest.vals because some shells have a limit on
2228 # the size of here documents, and old seds have small limits too.
2230 rm -f conftest.tail
2231 while :
2232 do
2233 ac_lines=`grep -c . conftest.vals`
2234 # grep -c gives empty output for an empty file on some AIX systems.
2235 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2236 # Write a limited-size here document to conftest.frag.
2237 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2238 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2239 echo 'CEOF
2240 sed -f conftest.frag conftest.in > conftest.out
2241 rm -f conftest.in
2242 mv conftest.out conftest.in
2243 ' >> $CONFIG_STATUS
2244 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2245 rm -f conftest.vals
2246 mv conftest.tail conftest.vals
2247 done
2248 rm -f conftest.vals
2250 cat >> $CONFIG_STATUS <<\EOF
2251 rm -f conftest.frag conftest.h
2252 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2253 cat conftest.in >> conftest.h
2254 rm -f conftest.in
2255 if cmp -s $ac_file conftest.h 2>/dev/null; then
2256 echo "$ac_file is unchanged"
2257 rm -f conftest.h
2258 else
2259 # Remove last slash and all that follows it. Not all systems have dirname.
2260 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2261 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2262 # The file is in a subdirectory.
2263 test ! -d "$ac_dir" && mkdir "$ac_dir"
2264 fi
2265 rm -f $ac_file
2266 mv conftest.h $ac_file
2267 fi
2268 fi; done
2270 EOF
2271 cat >> $CONFIG_STATUS <<EOF
2273 EOF
2274 cat >> $CONFIG_STATUS <<\EOF
2276 exit 0
2277 EOF
2278 chmod +x $CONFIG_STATUS
2279 rm -fr confdefs* $ac_clean_files
2280 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1