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 #define HAVE_RRD_12X 1
1163 EOF
1167 EXT_SUBDIRS="$EXT_SUBDIRS rrdtool"
1169 if test -d "$abs_srcdir/ext/rrdtool"; then
1170 ext_builddir="ext/rrdtool"
1171 ext_srcdir="$abs_srcdir/ext/rrdtool"
1172 else
1173 ext_builddir="."
1174 ext_srcdir="$abs_srcdir"
1175 fi
1177 if test "$ext_shared" != "shared" && test "$ext_shared" != "yes"; then
1179 lib_makefile="$ext_builddir/libs.mk"
1180 lib_target=""
1182 $php_shtool mkdir -p $ext_builddir
1183 cat >$lib_makefile<<EOF
1184 LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo)
1185 LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
1186 EOF
1188 if test "" = "shared" || test "" = "yes"; then
1189 lib_build_shared=yes
1190 if test -n ""; then
1192 lib_target="\$(LTLIBRARY_NAME)"
1193 cat >>$lib_makefile<<EOF
1194 \$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1195 \$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \$@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
1197 EOF
1199 else
1201 lib_target="\$(LTLIBRARY_SHARED_NAME)"
1202 cat >>$lib_makefile<<EOF
1203 \$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1204 \$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \$@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
1205 \$(SHARED_LIBTOOL) --mode=install cp \$@ \$(phplibdir)
1207 EOF
1209 fi
1210 else
1212 lib_target="\$(LTLIBRARY_NAME)"
1213 cat >>$lib_makefile<<EOF
1214 \$(LTLIBRARY_NAME): \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1215 \$(LINK) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_LIBADD)
1217 EOF
1219 fi
1221 if test -n "$lib_target"; then
1222 cat >>$lib_makefile<<EOF
1223 targets = $lib_target
1224 EOF
1225 fi
1227 EXT_LTLIBS="$EXT_LTLIBS $ext_builddir/librrdtool.la"
1228 EXT_STATIC="$EXT_STATIC rrdtool"
1229 else
1231 lib_makefile="$ext_builddir/libs.mk"
1232 lib_target=""
1234 $php_shtool mkdir -p $ext_builddir
1235 cat >$lib_makefile<<EOF
1236 LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo)
1237 LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
1238 EOF
1240 if test "yes" = "shared" || test "yes" = "yes"; then
1241 lib_build_shared=yes
1242 if test -n ""; then
1244 lib_target="\$(LTLIBRARY_NAME)"
1245 cat >>$lib_makefile<<EOF
1246 \$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1247 \$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \$@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
1249 EOF
1251 else
1253 lib_target="\$(LTLIBRARY_SHARED_NAME)"
1254 cat >>$lib_makefile<<EOF
1255 \$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1256 \$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \$@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
1257 \$(SHARED_LIBTOOL) --mode=install cp \$@ \$(phplibdir)
1259 EOF
1261 fi
1262 else
1264 lib_target="\$(LTLIBRARY_NAME)"
1265 cat >>$lib_makefile<<EOF
1266 \$(LTLIBRARY_NAME): \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
1267 \$(LINK) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_LIBADD)
1269 EOF
1271 fi
1273 if test -n "$lib_target"; then
1274 cat >>$lib_makefile<<EOF
1275 targets = $lib_target
1276 EOF
1277 fi
1279 cat >> confdefs.h <<EOF
1280 #define COMPILE_DL_RRDTOOL 1
1281 EOF
1283 fi
1286 PHP_FAST_OUTPUT_FILES="$PHP_FAST_OUTPUT_FILES $ext_builddir/Makefile"
1289 fi
1292 enable_static=no
1293 enable_shared=yes
1295 ac_aux_dir=
1296 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1297 if test -f $ac_dir/install-sh; then
1298 ac_aux_dir=$ac_dir
1299 ac_install_sh="$ac_aux_dir/install-sh -c"
1300 break
1301 elif test -f $ac_dir/install.sh; then
1302 ac_aux_dir=$ac_dir
1303 ac_install_sh="$ac_aux_dir/install.sh -c"
1304 break
1305 fi
1306 done
1307 if test -z "$ac_aux_dir"; then
1308 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1309 fi
1310 ac_config_guess=$ac_aux_dir/config.guess
1311 ac_config_sub=$ac_aux_dir/config.sub
1312 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1314 # Check whether --enable-shared or --disable-shared was given.
1315 if test "${enable_shared+set}" = set; then
1316 enableval="$enable_shared"
1317 p=${PACKAGE-default}
1318 case "$enableval" in
1319 yes) enable_shared=yes ;;
1320 no) enable_shared=no ;;
1321 *)
1322 enable_shared=no
1323 # Look at the argument we got. We use all the common list separators.
1324 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1325 for pkg in $enableval; do
1326 if test "X$pkg" = "X$p"; then
1327 enable_shared=yes
1328 fi
1329 done
1330 IFS="$ac_save_ifs"
1331 ;;
1332 esac
1333 else
1334 enable_shared=yes
1335 fi
1337 # Check whether --enable-static or --disable-static was given.
1338 if test "${enable_static+set}" = set; then
1339 enableval="$enable_static"
1340 p=${PACKAGE-default}
1341 case "$enableval" in
1342 yes) enable_static=yes ;;
1343 no) enable_static=no ;;
1344 *)
1345 enable_static=no
1346 # Look at the argument we got. We use all the common list separators.
1347 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1348 for pkg in $enableval; do
1349 if test "X$pkg" = "X$p"; then
1350 enable_static=yes
1351 fi
1352 done
1353 IFS="$ac_save_ifs"
1354 ;;
1355 esac
1356 else
1357 enable_static=yes
1358 fi
1360 # Check whether --enable-fast-install or --disable-fast-install was given.
1361 if test "${enable_fast_install+set}" = set; then
1362 enableval="$enable_fast_install"
1363 p=${PACKAGE-default}
1364 case "$enableval" in
1365 yes) enable_fast_install=yes ;;
1366 no) enable_fast_install=no ;;
1367 *)
1368 enable_fast_install=no
1369 # Look at the argument we got. We use all the common list separators.
1370 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1371 for pkg in $enableval; do
1372 if test "X$pkg" = "X$p"; then
1373 enable_fast_install=yes
1374 fi
1375 done
1376 IFS="$ac_save_ifs"
1377 ;;
1378 esac
1379 else
1380 enable_fast_install=yes
1381 fi
1384 # Make sure we can run config.sub.
1385 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1386 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1387 fi
1389 echo $ac_n "checking host system type""... $ac_c" 1>&6
1390 echo "configure:1390: checking host system type" >&5
1392 host_alias=$host
1393 case "$host_alias" in
1394 NONE)
1395 case $nonopt in
1396 NONE)
1397 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1398 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1399 fi ;;
1400 *) host_alias=$nonopt ;;
1401 esac ;;
1402 esac
1404 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1405 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1406 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1407 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1408 echo "$ac_t""$host" 1>&6
1410 echo $ac_n "checking build system type""... $ac_c" 1>&6
1411 echo "configure:1411: checking build system type" >&5
1413 build_alias=$build
1414 case "$build_alias" in
1415 NONE)
1416 case $nonopt in
1417 NONE) build_alias=$host_alias ;;
1418 *) build_alias=$nonopt ;;
1419 esac ;;
1420 esac
1422 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1423 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1424 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1425 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1426 echo "$ac_t""$build" 1>&6
1428 # Extract the first word of "ranlib", so it can be a program name with args.
1429 set dummy ranlib; ac_word=$2
1430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1431 echo "configure:1431: checking for $ac_word" >&5
1432 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1433 echo $ac_n "(cached) $ac_c" 1>&6
1434 else
1435 if test -n "$RANLIB"; then
1436 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1437 else
1438 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1439 ac_dummy="$PATH"
1440 for ac_dir in $ac_dummy; do
1441 test -z "$ac_dir" && ac_dir=.
1442 if test -f $ac_dir/$ac_word; then
1443 ac_cv_prog_RANLIB="ranlib"
1444 break
1445 fi
1446 done
1447 IFS="$ac_save_ifs"
1448 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1449 fi
1450 fi
1451 RANLIB="$ac_cv_prog_RANLIB"
1452 if test -n "$RANLIB"; then
1453 echo "$ac_t""$RANLIB" 1>&6
1454 else
1455 echo "$ac_t""no" 1>&6
1456 fi
1458 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1459 if test "${with_gnu_ld+set}" = set; then
1460 withval="$with_gnu_ld"
1461 test "$withval" = no || with_gnu_ld=yes
1462 else
1463 with_gnu_ld=no
1464 fi
1466 ac_prog=ld
1467 if test "$ac_cv_prog_gcc" = yes; then
1468 # Check if gcc -print-prog-name=ld gives a path.
1469 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1470 echo "configure:1470: checking for ld used by GCC" >&5
1471 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1472 case "$ac_prog" in
1473 # Accept absolute paths.
1474 [\\/]* | [A-Za-z]:[\\/]*)
1475 re_direlt='/[^/][^/]*/\.\./'
1476 # Canonicalize the path of ld
1477 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1478 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1479 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1480 done
1481 test -z "$LD" && LD="$ac_prog"
1482 ;;
1483 "")
1484 # If it fails, then pretend we aren't using GCC.
1485 ac_prog=ld
1486 ;;
1487 *)
1488 # If it is relative, then search for the first ld in PATH.
1489 with_gnu_ld=unknown
1490 ;;
1491 esac
1492 elif test "$with_gnu_ld" = yes; then
1493 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1494 echo "configure:1494: checking for GNU ld" >&5
1495 else
1496 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1497 echo "configure:1497: checking for non-GNU ld" >&5
1498 fi
1499 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1500 echo $ac_n "(cached) $ac_c" 1>&6
1501 else
1502 if test -z "$LD"; then
1503 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1504 for ac_dir in $PATH; do
1505 test -z "$ac_dir" && ac_dir=.
1506 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1507 ac_cv_path_LD="$ac_dir/$ac_prog"
1508 # Check to see if the program is GNU ld. I'd rather use --version,
1509 # but apparently some GNU ld's only accept -v.
1510 # Break only if it was the GNU/non-GNU ld that we prefer.
1511 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1512 test "$with_gnu_ld" != no && break
1513 else
1514 test "$with_gnu_ld" != yes && break
1515 fi
1516 fi
1517 done
1518 IFS="$ac_save_ifs"
1519 else
1520 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1521 fi
1522 fi
1524 LD="$ac_cv_path_LD"
1525 if test -n "$LD"; then
1526 echo "$ac_t""$LD" 1>&6
1527 else
1528 echo "$ac_t""no" 1>&6
1529 fi
1530 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1532 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1533 echo "configure:1533: checking if the linker ($LD) is GNU ld" >&5
1534 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1535 echo $ac_n "(cached) $ac_c" 1>&6
1536 else
1537 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1538 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1539 ac_cv_prog_gnu_ld=yes
1540 else
1541 ac_cv_prog_gnu_ld=no
1542 fi
1543 fi
1545 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1548 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1549 echo "configure:1549: checking for BSD-compatible nm" >&5
1550 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1551 echo $ac_n "(cached) $ac_c" 1>&6
1552 else
1553 if test -n "$NM"; then
1554 # Let the user override the test.
1555 ac_cv_path_NM="$NM"
1556 else
1557 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1558 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1559 test -z "$ac_dir" && ac_dir=.
1560 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1561 # Check to see if the nm accepts a BSD-compat flag.
1562 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1563 # nm: unknown option "B" ignored
1564 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1565 ac_cv_path_NM="$ac_dir/nm -B"
1566 break
1567 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1568 ac_cv_path_NM="$ac_dir/nm -p"
1569 break
1570 else
1571 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1572 continue # so that we can try to find one that supports BSD flags
1573 fi
1574 fi
1575 done
1576 IFS="$ac_save_ifs"
1577 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1578 fi
1579 fi
1581 NM="$ac_cv_path_NM"
1582 echo "$ac_t""$NM" 1>&6
1585 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1586 echo "configure:1586: checking whether ln -s works" >&5
1587 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1588 echo $ac_n "(cached) $ac_c" 1>&6
1589 else
1590 rm -f conftestdata
1591 if ln -s X conftestdata 2>/dev/null
1592 then
1593 rm -f conftestdata
1594 ac_cv_prog_LN_S="ln -s"
1595 else
1596 ac_cv_prog_LN_S=ln
1597 fi
1598 fi
1599 LN_S="$ac_cv_prog_LN_S"
1600 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1601 echo "$ac_t""yes" 1>&6
1602 else
1603 echo "$ac_t""no" 1>&6
1604 fi
1607 # Check for any special flags to pass to ltconfig.
1608 libtool_flags="--cache-file=$cache_file"
1609 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1610 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1611 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1612 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1613 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1616 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1617 if test "${enable_libtool_lock+set}" = set; then
1618 enableval="$enable_libtool_lock"
1619 :
1620 fi
1622 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1623 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1625 # Some flags need to be propagated to the compiler or linker for good
1626 # libtool support.
1627 case "$host" in
1628 *-*-irix6*)
1629 # Find out which ABI we are using.
1630 echo '#line 1630 "configure"' > conftest.$ac_ext
1631 if { (eval echo configure:1631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1632 case "`/usr/bin/file conftest.o`" in
1633 *32-bit*)
1634 LD="${LD-ld} -32"
1635 ;;
1636 *N32*)
1637 LD="${LD-ld} -n32"
1638 ;;
1639 *64-bit*)
1640 LD="${LD-ld} -64"
1641 ;;
1642 esac
1643 fi
1644 rm -rf conftest*
1645 ;;
1647 *-*-sco3.2v5*)
1648 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1649 SAVE_CFLAGS="$CFLAGS"
1650 CFLAGS="$CFLAGS -belf"
1651 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1652 echo "configure:1652: checking whether the C compiler needs -belf" >&5
1653 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1654 echo $ac_n "(cached) $ac_c" 1>&6
1655 else
1656 cat > conftest.$ac_ext <<EOF
1657 #line 1657 "configure"
1658 #include "confdefs.h"
1660 int main() {
1662 ; return 0; }
1663 EOF
1664 if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1665 rm -rf conftest*
1666 lt_cv_cc_needs_belf=yes
1667 else
1668 echo "configure: failed program was:" >&5
1669 cat conftest.$ac_ext >&5
1670 rm -rf conftest*
1671 lt_cv_cc_needs_belf=no
1672 fi
1673 rm -f conftest*
1674 fi
1676 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1677 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1678 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1679 CFLAGS="$SAVE_CFLAGS"
1680 fi
1681 ;;
1684 esac
1687 # Save cache, so that ltconfig can load it
1688 cat > confcache <<\EOF
1689 # This file is a shell script that caches the results of configure
1690 # tests run on this system so they can be shared between configure
1691 # scripts and configure runs. It is not useful on other systems.
1692 # If it contains results you don't want to keep, you may remove or edit it.
1693 #
1694 # By default, configure uses ./config.cache as the cache file,
1695 # creating it if it does not exist already. You can give configure
1696 # the --cache-file=FILE option to use a different cache file; that is
1697 # what configure does when it calls configure scripts in
1698 # subdirectories, so they share the cache.
1699 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1700 # config.status only pays attention to the cache file if you give it the
1701 # --recheck option to rerun configure.
1702 #
1703 EOF
1704 # The following way of writing the cache mishandles newlines in values,
1705 # but we know of no workaround that is simple, portable, and efficient.
1706 # So, don't put newlines in cache variables' values.
1707 # Ultrix sh set writes to stderr and can't be redirected directly,
1708 # and sets the high bit in the cache file unless we assign to the vars.
1709 (set) 2>&1 |
1710 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1711 *ac_space=\ *)
1712 # `set' does not quote correctly, so add quotes (double-quote substitution
1713 # turns \\\\ into \\, and sed turns \\ into \).
1714 sed -n \
1715 -e "s/'/'\\\\''/g" \
1716 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1717 ;;
1718 *)
1719 # `set' quotes correctly as required by POSIX, so do not add quotes.
1720 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1721 ;;
1722 esac >> confcache
1723 if cmp -s $cache_file confcache; then
1724 :
1725 else
1726 if test -w $cache_file; then
1727 echo "updating cache $cache_file"
1728 cat confcache > $cache_file
1729 else
1730 echo "not updating unwritable cache $cache_file"
1731 fi
1732 fi
1733 rm -f confcache
1736 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1737 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1738 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1739 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1740 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1741 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1742 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1743 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1745 # Reload cache, that may have been modified by ltconfig
1746 if test -r "$cache_file"; then
1747 echo "loading cache $cache_file"
1748 . $cache_file
1749 else
1750 echo "creating cache $cache_file"
1751 > $cache_file
1752 fi
1755 # This can be used to rebuild libtool when needed
1756 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1758 # Always use our own libtool.
1759 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1761 # Redirect the config.log output again, so that the ltconfig log is not
1762 # clobbered by the next message.
1763 exec 5>>./config.log
1766 SHARED_LIBTOOL='$(LIBTOOL)'
1767 PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
1768 phplibdir="`pwd`/modules"
1770 test "$prefix" = "NONE" && prefix="/usr/local"
1771 test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
1774 PHP_VAR_SUBST="$PHP_VAR_SUBST prefix"
1778 PHP_VAR_SUBST="$PHP_VAR_SUBST exec_prefix"
1782 PHP_VAR_SUBST="$PHP_VAR_SUBST libdir"
1786 PHP_VAR_SUBST="$PHP_VAR_SUBST prefix"
1790 PHP_VAR_SUBST="$PHP_VAR_SUBST phplibdir"
1795 PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_COMPILE"
1799 PHP_VAR_SUBST="$PHP_VAR_SUBST CC"
1803 PHP_VAR_SUBST="$PHP_VAR_SUBST CFLAGS"
1807 PHP_VAR_SUBST="$PHP_VAR_SUBST CPP"
1811 PHP_VAR_SUBST="$PHP_VAR_SUBST CPPFLAGS"
1815 PHP_VAR_SUBST="$PHP_VAR_SUBST CXX"
1819 PHP_VAR_SUBST="$PHP_VAR_SUBST DEFS"
1823 PHP_VAR_SUBST="$PHP_VAR_SUBST EXTENSION_DIR"
1827 PHP_VAR_SUBST="$PHP_VAR_SUBST EXTRA_LDFLAGS"
1831 PHP_VAR_SUBST="$PHP_VAR_SUBST EXTRA_LIBS"
1835 PHP_VAR_SUBST="$PHP_VAR_SUBST INCLUDES"
1839 PHP_VAR_SUBST="$PHP_VAR_SUBST LEX"
1843 PHP_VAR_SUBST="$PHP_VAR_SUBST LEX_OUTPUT_ROOT"
1847 PHP_VAR_SUBST="$PHP_VAR_SUBST LFLAGS"
1851 PHP_VAR_SUBST="$PHP_VAR_SUBST SHARED_LIBTOOL"
1855 PHP_VAR_SUBST="$PHP_VAR_SUBST LIBTOOL"
1859 PHP_VAR_SUBST="$PHP_VAR_SUBST SHELL"
1864 PHP_FAST_OUTPUT_FILES="$PHP_FAST_OUTPUT_FILES Makefile"
1869 echo $ac_n "checking for working mkdir -p""... $ac_c" 1>&6
1870 echo "configure:1870: checking for working mkdir -p" >&5
1871 if eval "test \"`echo '$''{'ac_cv_mkdir_p'+set}'`\" = set"; then
1872 echo $ac_n "(cached) $ac_c" 1>&6
1873 else
1875 test -d conftestdir && rm -rf conftestdir
1876 mkdir -p conftestdir/somedir >/dev/null 2>&1
1877 if test -d conftestdir/somedir; then
1878 ac_cv_mkdir_p=yes
1879 else
1880 ac_cv_mkdir_p=no
1881 fi
1882 rm -rf conftestdir
1884 fi
1886 echo "$ac_t""$ac_cv_mkdir_p" 1>&6
1888 echo creating config_vars.mk
1889 > config_vars.mk
1890 for i in $PHP_VAR_SUBST; do
1891 eval echo "$i = \$$i" >> config_vars.mk
1892 done
1895 $SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $PHP_FAST_OUTPUT_FILES
1898 test -d modules || mkdir modules
1899 touch .deps
1903 trap '' 1 2 15
1904 cat > confcache <<\EOF
1905 # This file is a shell script that caches the results of configure
1906 # tests run on this system so they can be shared between configure
1907 # scripts and configure runs. It is not useful on other systems.
1908 # If it contains results you don't want to keep, you may remove or edit it.
1909 #
1910 # By default, configure uses ./config.cache as the cache file,
1911 # creating it if it does not exist already. You can give configure
1912 # the --cache-file=FILE option to use a different cache file; that is
1913 # what configure does when it calls configure scripts in
1914 # subdirectories, so they share the cache.
1915 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1916 # config.status only pays attention to the cache file if you give it the
1917 # --recheck option to rerun configure.
1918 #
1919 EOF
1920 # The following way of writing the cache mishandles newlines in values,
1921 # but we know of no workaround that is simple, portable, and efficient.
1922 # So, don't put newlines in cache variables' values.
1923 # Ultrix sh set writes to stderr and can't be redirected directly,
1924 # and sets the high bit in the cache file unless we assign to the vars.
1925 (set) 2>&1 |
1926 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1927 *ac_space=\ *)
1928 # `set' does not quote correctly, so add quotes (double-quote substitution
1929 # turns \\\\ into \\, and sed turns \\ into \).
1930 sed -n \
1931 -e "s/'/'\\\\''/g" \
1932 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1933 ;;
1934 *)
1935 # `set' quotes correctly as required by POSIX, so do not add quotes.
1936 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1937 ;;
1938 esac >> confcache
1939 if cmp -s $cache_file confcache; then
1940 :
1941 else
1942 if test -w $cache_file; then
1943 echo "updating cache $cache_file"
1944 cat confcache > $cache_file
1945 else
1946 echo "not updating unwritable cache $cache_file"
1947 fi
1948 fi
1949 rm -f confcache
1951 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1953 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1954 # Let make expand exec_prefix.
1955 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1957 # Any assignment to VPATH causes Sun make to only execute
1958 # the first set of double-colon rules, so remove it if not needed.
1959 # If there is a colon in the path, we need to keep it.
1960 if test "x$srcdir" = x.; then
1961 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1962 fi
1964 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1966 DEFS=-DHAVE_CONFIG_H
1968 # Without the "./", some shells look in PATH for config.status.
1969 : ${CONFIG_STATUS=./config.status}
1971 echo creating $CONFIG_STATUS
1972 rm -f $CONFIG_STATUS
1973 cat > $CONFIG_STATUS <<EOF
1974 #! /bin/sh
1975 # Generated automatically by configure.
1976 # Run this file to recreate the current configuration.
1977 # This directory was configured as follows,
1978 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1979 #
1980 # $0 $ac_configure_args
1981 #
1982 # Compiler output produced by configure, useful for debugging
1983 # configure, is in ./config.log if it exists.
1985 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1986 for ac_option
1987 do
1988 case "\$ac_option" in
1989 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1990 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1991 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1992 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1993 echo "$CONFIG_STATUS generated by autoconf version 2.13"
1994 exit 0 ;;
1995 -help | --help | --hel | --he | --h)
1996 echo "\$ac_cs_usage"; exit 0 ;;
1997 *) echo "\$ac_cs_usage"; exit 1 ;;
1998 esac
1999 done
2001 ac_given_srcdir=$srcdir
2003 trap 'rm -fr `echo " php_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2004 EOF
2005 cat >> $CONFIG_STATUS <<EOF
2007 # Protect against being on the right side of a sed subst in config.status.
2008 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2009 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2010 $ac_vpsub
2011 $extrasub
2012 s%@EXT_SUBDIRS@%$EXT_SUBDIRS%g
2013 s%@EXT_STATIC@%$EXT_STATIC%g
2014 s%@EXT_SHARED@%$EXT_SHARED%g
2015 s%@EXT_LIBS@%$EXT_LIBS%g
2016 s%@EXT_LTLIBS@%$EXT_LTLIBS%g
2017 s%@SHELL@%$SHELL%g
2018 s%@CFLAGS@%$CFLAGS%g
2019 s%@CPPFLAGS@%$CPPFLAGS%g
2020 s%@CXXFLAGS@%$CXXFLAGS%g
2021 s%@FFLAGS@%$FFLAGS%g
2022 s%@DEFS@%$DEFS%g
2023 s%@LDFLAGS@%$LDFLAGS%g
2024 s%@LIBS@%$LIBS%g
2025 s%@exec_prefix@%$exec_prefix%g
2026 s%@prefix@%$prefix%g
2027 s%@program_transform_name@%$program_transform_name%g
2028 s%@bindir@%$bindir%g
2029 s%@sbindir@%$sbindir%g
2030 s%@libexecdir@%$libexecdir%g
2031 s%@datadir@%$datadir%g
2032 s%@sysconfdir@%$sysconfdir%g
2033 s%@sharedstatedir@%$sharedstatedir%g
2034 s%@localstatedir@%$localstatedir%g
2035 s%@libdir@%$libdir%g
2036 s%@includedir@%$includedir%g
2037 s%@oldincludedir@%$oldincludedir%g
2038 s%@infodir@%$infodir%g
2039 s%@mandir@%$mandir%g
2040 s%@CC@%$CC%g
2041 s%@RRDTOOL_SHARED_LIBADD@%$RRDTOOL_SHARED_LIBADD%g
2042 s%@host@%$host%g
2043 s%@host_alias@%$host_alias%g
2044 s%@host_cpu@%$host_cpu%g
2045 s%@host_vendor@%$host_vendor%g
2046 s%@host_os@%$host_os%g
2047 s%@build@%$build%g
2048 s%@build_alias@%$build_alias%g
2049 s%@build_cpu@%$build_cpu%g
2050 s%@build_vendor@%$build_vendor%g
2051 s%@build_os@%$build_os%g
2052 s%@RANLIB@%$RANLIB%g
2053 s%@LD@%$LD%g
2054 s%@NM@%$NM%g
2055 s%@LN_S@%$LN_S%g
2056 s%@LIBTOOL@%$LIBTOOL%g
2057 s%@phplibdir@%$phplibdir%g
2058 s%@PHP_COMPILE@%$PHP_COMPILE%g
2059 s%@CPP@%$CPP%g
2060 s%@CXX@%$CXX%g
2061 s%@EXTENSION_DIR@%$EXTENSION_DIR%g
2062 s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g
2063 s%@EXTRA_LIBS@%$EXTRA_LIBS%g
2064 s%@INCLUDES@%$INCLUDES%g
2065 s%@LEX@%$LEX%g
2066 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
2067 s%@LFLAGS@%$LFLAGS%g
2068 s%@SHARED_LIBTOOL@%$SHARED_LIBTOOL%g
2070 CEOF
2071 EOF
2073 cat >> $CONFIG_STATUS <<\EOF
2075 # Split the substitutions into bite-sized pieces for seds with
2076 # small command number limits, like on Digital OSF/1 and HP-UX.
2077 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2078 ac_file=1 # Number of current file.
2079 ac_beg=1 # First line for current file.
2080 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2081 ac_more_lines=:
2082 ac_sed_cmds=""
2083 while $ac_more_lines; do
2084 if test $ac_beg -gt 1; then
2085 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2086 else
2087 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2088 fi
2089 if test ! -s conftest.s$ac_file; then
2090 ac_more_lines=false
2091 rm -f conftest.s$ac_file
2092 else
2093 if test -z "$ac_sed_cmds"; then
2094 ac_sed_cmds="sed -f conftest.s$ac_file"
2095 else
2096 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2097 fi
2098 ac_file=`expr $ac_file + 1`
2099 ac_beg=$ac_end
2100 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2101 fi
2102 done
2103 if test -z "$ac_sed_cmds"; then
2104 ac_sed_cmds=cat
2105 fi
2106 EOF
2108 cat >> $CONFIG_STATUS <<EOF
2110 CONFIG_FILES=\${CONFIG_FILES-""}
2111 EOF
2112 cat >> $CONFIG_STATUS <<\EOF
2113 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2114 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2115 case "$ac_file" in
2116 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2117 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2118 *) ac_file_in="${ac_file}.in" ;;
2119 esac
2121 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2123 # Remove last slash and all that follows it. Not all systems have dirname.
2124 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2125 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2126 # The file is in a subdirectory.
2127 test ! -d "$ac_dir" && mkdir "$ac_dir"
2128 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2129 # A "../" for each directory in $ac_dir_suffix.
2130 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2131 else
2132 ac_dir_suffix= ac_dots=
2133 fi
2135 case "$ac_given_srcdir" in
2136 .) srcdir=.
2137 if test -z "$ac_dots"; then top_srcdir=.
2138 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2139 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2140 *) # Relative path.
2141 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2142 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2143 esac
2146 echo creating "$ac_file"
2147 rm -f "$ac_file"
2148 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2149 case "$ac_file" in
2150 *Makefile*) ac_comsub="1i\\
2151 # $configure_input" ;;
2152 *) ac_comsub= ;;
2153 esac
2155 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2156 sed -e "$ac_comsub
2157 s%@configure_input@%$configure_input%g
2158 s%@srcdir@%$srcdir%g
2159 s%@top_srcdir@%$top_srcdir%g
2160 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2161 fi; done
2162 rm -f conftest.s*
2164 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2165 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2166 #
2167 # ac_d sets the value in "#define NAME VALUE" lines.
2168 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2169 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2170 ac_dC='\3'
2171 ac_dD='%g'
2172 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2173 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2174 ac_uB='\([ ]\)%\1#\2define\3'
2175 ac_uC=' '
2176 ac_uD='\4%g'
2177 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2178 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2179 ac_eB='$%\1#\2define\3'
2180 ac_eC=' '
2181 ac_eD='%g'
2183 if test "${CONFIG_HEADERS+set}" != set; then
2184 EOF
2185 cat >> $CONFIG_STATUS <<EOF
2186 CONFIG_HEADERS="php_config.h"
2187 EOF
2188 cat >> $CONFIG_STATUS <<\EOF
2189 fi
2190 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2191 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2192 case "$ac_file" in
2193 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2194 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2195 *) ac_file_in="${ac_file}.in" ;;
2196 esac
2198 echo creating $ac_file
2200 rm -f conftest.frag conftest.in conftest.out
2201 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2202 cat $ac_file_inputs > conftest.in
2204 EOF
2206 # Transform confdefs.h into a sed script conftest.vals that substitutes
2207 # the proper values into config.h.in to produce config.h. And first:
2208 # Protect against being on the right side of a sed subst in config.status.
2209 # Protect against being in an unquoted here document in config.status.
2210 rm -f conftest.vals
2211 cat > conftest.hdr <<\EOF
2212 s/[\\&%]/\\&/g
2213 s%[\\$`]%\\&%g
2214 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2215 s%ac_d%ac_u%gp
2216 s%ac_u%ac_e%gp
2217 EOF
2218 sed -n -f conftest.hdr confdefs.h > conftest.vals
2219 rm -f conftest.hdr
2221 # This sed command replaces #undef with comments. This is necessary, for
2222 # example, in the case of _POSIX_SOURCE, which is predefined and required
2223 # on some systems where configure will not decide to define it.
2224 cat >> conftest.vals <<\EOF
2225 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2226 EOF
2228 # Break up conftest.vals because some shells have a limit on
2229 # the size of here documents, and old seds have small limits too.
2231 rm -f conftest.tail
2232 while :
2233 do
2234 ac_lines=`grep -c . conftest.vals`
2235 # grep -c gives empty output for an empty file on some AIX systems.
2236 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2237 # Write a limited-size here document to conftest.frag.
2238 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2239 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2240 echo 'CEOF
2241 sed -f conftest.frag conftest.in > conftest.out
2242 rm -f conftest.in
2243 mv conftest.out conftest.in
2244 ' >> $CONFIG_STATUS
2245 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2246 rm -f conftest.vals
2247 mv conftest.tail conftest.vals
2248 done
2249 rm -f conftest.vals
2251 cat >> $CONFIG_STATUS <<\EOF
2252 rm -f conftest.frag conftest.h
2253 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2254 cat conftest.in >> conftest.h
2255 rm -f conftest.in
2256 if cmp -s $ac_file conftest.h 2>/dev/null; then
2257 echo "$ac_file is unchanged"
2258 rm -f conftest.h
2259 else
2260 # Remove last slash and all that follows it. Not all systems have dirname.
2261 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2262 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2263 # The file is in a subdirectory.
2264 test ! -d "$ac_dir" && mkdir "$ac_dir"
2265 fi
2266 rm -f $ac_file
2267 mv conftest.h $ac_file
2268 fi
2269 fi; done
2271 EOF
2272 cat >> $CONFIG_STATUS <<EOF
2274 EOF
2275 cat >> $CONFIG_STATUS <<\EOF
2277 exit 0
2278 EOF
2279 chmod +x $CONFIG_STATUS
2280 rm -fr confdefs* $ac_clean_files
2281 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1