Improved method for finding PostgreSQL libraries in configure script.
[gnucomo.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-x                use the X Window System"
16 ac_help="$ac_help
17 --with-postgres-include  PostgreSQL headers directory
18         
19         "
20 ac_help="$ac_help
21 --with-postgres-lib      PostgreSQL library directory containing libpq
22         "
23 ac_help="$ac_help
24 --with-postgres  PostgreSQL common directory. Use this to specify libs & includes rooted at one place
25         "
26
27 # Initialize some variables set by options.
28 # The variables have the same names as the options, with
29 # dashes changed to underlines.
30 build=NONE
31 cache_file=./config.cache
32 exec_prefix=NONE
33 host=NONE
34 no_create=
35 nonopt=NONE
36 no_recursion=
37 prefix=NONE
38 program_prefix=NONE
39 program_suffix=NONE
40 program_transform_name=s,x,x,
41 silent=
42 site=
43 srcdir=
44 target=NONE
45 verbose=
46 x_includes=NONE
47 x_libraries=NONE
48 bindir='${exec_prefix}/bin'
49 sbindir='${exec_prefix}/sbin'
50 libexecdir='${exec_prefix}/libexec'
51 datadir='${prefix}/share'
52 sysconfdir='${prefix}/etc'
53 sharedstatedir='${prefix}/com'
54 localstatedir='${prefix}/var'
55 libdir='${exec_prefix}/lib'
56 includedir='${prefix}/include'
57 oldincludedir='/usr/include'
58 infodir='${prefix}/info'
59 mandir='${prefix}/man'
60
61 # Initialize some other variables.
62 subdirs=
63 MFLAGS= MAKEFLAGS=
64 SHELL=${CONFIG_SHELL-/bin/sh}
65 # Maximum number of lines to put in a shell here document.
66 ac_max_here_lines=12
67
68 ac_prev=
69 for ac_option
70 do
71
72   # If the previous option needs an argument, assign it.
73   if test -n "$ac_prev"; then
74     eval "$ac_prev=\$ac_option"
75     ac_prev=
76     continue
77   fi
78
79   case "$ac_option" in
80   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81   *) ac_optarg= ;;
82   esac
83
84   # Accept the important Cygnus configure options, so we can diagnose typos.
85
86   case "$ac_option" in
87
88   -bindir | --bindir | --bindi | --bind | --bin | --bi)
89     ac_prev=bindir ;;
90   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
91     bindir="$ac_optarg" ;;
92
93   -build | --build | --buil | --bui | --bu)
94     ac_prev=build ;;
95   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
96     build="$ac_optarg" ;;
97
98   -cache-file | --cache-file | --cache-fil | --cache-fi \
99   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
100     ac_prev=cache_file ;;
101   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
102   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
103     cache_file="$ac_optarg" ;;
104
105   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
106     ac_prev=datadir ;;
107   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
108   | --da=*)
109     datadir="$ac_optarg" ;;
110
111   -disable-* | --disable-*)
112     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
113     # Reject names that are not valid shell variable names.
114     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
115       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116     fi
117     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118     eval "enable_${ac_feature}=no" ;;
119
120   -enable-* | --enable-*)
121     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
122     # Reject names that are not valid shell variable names.
123     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
124       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125     fi
126     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127     case "$ac_option" in
128       *=*) ;;
129       *) ac_optarg=yes ;;
130     esac
131     eval "enable_${ac_feature}='$ac_optarg'" ;;
132
133   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
134   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
135   | --exec | --exe | --ex)
136     ac_prev=exec_prefix ;;
137   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
138   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
139   | --exec=* | --exe=* | --ex=*)
140     exec_prefix="$ac_optarg" ;;
141
142   -gas | --gas | --ga | --g)
143     # Obsolete; use --with-gas.
144     with_gas=yes ;;
145
146   -help | --help | --hel | --he)
147     # Omit some internal or obsolete options to make the list less imposing.
148     # This message is too long to be a string in the A/UX 3.1 sh.
149     cat << EOF
150 Usage: configure [options] [host]
151 Options: [defaults in brackets after descriptions]
152 Configuration:
153   --cache-file=FILE       cache test results in FILE
154   --help                  print this message
155   --no-create             do not create output files
156   --quiet, --silent       do not print \`checking...' messages
157   --version               print the version of autoconf that created configure
158 Directory and file names:
159   --prefix=PREFIX         install architecture-independent files in PREFIX
160                           [$ac_default_prefix]
161   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
162                           [same as prefix]
163   --bindir=DIR            user executables in DIR [EPREFIX/bin]
164   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
165   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
166   --datadir=DIR           read-only architecture-independent data in DIR
167                           [PREFIX/share]
168   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
169   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
170                           [PREFIX/com]
171   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
172   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
173   --includedir=DIR        C header files in DIR [PREFIX/include]
174   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
175   --infodir=DIR           info documentation in DIR [PREFIX/info]
176   --mandir=DIR            man documentation in DIR [PREFIX/man]
177   --srcdir=DIR            find the sources in DIR [configure dir or ..]
178   --program-prefix=PREFIX prepend PREFIX to installed program names
179   --program-suffix=SUFFIX append SUFFIX to installed program names
180   --program-transform-name=PROGRAM
181                           run sed PROGRAM on installed program names
182 EOF
183     cat << EOF
184 Host type:
185   --build=BUILD           configure for building on BUILD [BUILD=HOST]
186   --host=HOST             configure for HOST [guessed]
187   --target=TARGET         configure for TARGET [TARGET=HOST]
188 Features and packages:
189   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
190   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
191   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
192   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
193   --x-includes=DIR        X include files are in DIR
194   --x-libraries=DIR       X library files are in DIR
195 EOF
196     if test -n "$ac_help"; then
197       echo "--enable and --with options recognized:$ac_help"
198     fi
199     exit 0 ;;
200
201   -host | --host | --hos | --ho)
202     ac_prev=host ;;
203   -host=* | --host=* | --hos=* | --ho=*)
204     host="$ac_optarg" ;;
205
206   -includedir | --includedir | --includedi | --included | --include \
207   | --includ | --inclu | --incl | --inc)
208     ac_prev=includedir ;;
209   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210   | --includ=* | --inclu=* | --incl=* | --inc=*)
211     includedir="$ac_optarg" ;;
212
213   -infodir | --infodir | --infodi | --infod | --info | --inf)
214     ac_prev=infodir ;;
215   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216     infodir="$ac_optarg" ;;
217
218   -libdir | --libdir | --libdi | --libd)
219     ac_prev=libdir ;;
220   -libdir=* | --libdir=* | --libdi=* | --libd=*)
221     libdir="$ac_optarg" ;;
222
223   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224   | --libexe | --libex | --libe)
225     ac_prev=libexecdir ;;
226   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227   | --libexe=* | --libex=* | --libe=*)
228     libexecdir="$ac_optarg" ;;
229
230   -localstatedir | --localstatedir | --localstatedi | --localstated \
231   | --localstate | --localstat | --localsta | --localst \
232   | --locals | --local | --loca | --loc | --lo)
233     ac_prev=localstatedir ;;
234   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237     localstatedir="$ac_optarg" ;;
238
239   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240     ac_prev=mandir ;;
241   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242     mandir="$ac_optarg" ;;
243
244   -nfp | --nfp | --nf)
245     # Obsolete; use --without-fp.
246     with_fp=no ;;
247
248   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
249   | --no-cr | --no-c)
250     no_create=yes ;;
251
252   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254     no_recursion=yes ;;
255
256   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258   | --oldin | --oldi | --old | --ol | --o)
259     ac_prev=oldincludedir ;;
260   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263     oldincludedir="$ac_optarg" ;;
264
265   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266     ac_prev=prefix ;;
267   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268     prefix="$ac_optarg" ;;
269
270   -program-prefix | --program-prefix | --program-prefi | --program-pref \
271   | --program-pre | --program-pr | --program-p)
272     ac_prev=program_prefix ;;
273   -program-prefix=* | --program-prefix=* | --program-prefi=* \
274   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275     program_prefix="$ac_optarg" ;;
276
277   -program-suffix | --program-suffix | --program-suffi | --program-suff \
278   | --program-suf | --program-su | --program-s)
279     ac_prev=program_suffix ;;
280   -program-suffix=* | --program-suffix=* | --program-suffi=* \
281   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282     program_suffix="$ac_optarg" ;;
283
284   -program-transform-name | --program-transform-name \
285   | --program-transform-nam | --program-transform-na \
286   | --program-transform-n | --program-transform- \
287   | --program-transform | --program-transfor \
288   | --program-transfo | --program-transf \
289   | --program-trans | --program-tran \
290   | --progr-tra | --program-tr | --program-t)
291     ac_prev=program_transform_name ;;
292   -program-transform-name=* | --program-transform-name=* \
293   | --program-transform-nam=* | --program-transform-na=* \
294   | --program-transform-n=* | --program-transform-=* \
295   | --program-transform=* | --program-transfor=* \
296   | --program-transfo=* | --program-transf=* \
297   | --program-trans=* | --program-tran=* \
298   | --progr-tra=* | --program-tr=* | --program-t=*)
299     program_transform_name="$ac_optarg" ;;
300
301   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302   | -silent | --silent | --silen | --sile | --sil)
303     silent=yes ;;
304
305   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306     ac_prev=sbindir ;;
307   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308   | --sbi=* | --sb=*)
309     sbindir="$ac_optarg" ;;
310
311   -sharedstatedir | --sharedstatedir | --sharedstatedi \
312   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313   | --sharedst | --shareds | --shared | --share | --shar \
314   | --sha | --sh)
315     ac_prev=sharedstatedir ;;
316   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319   | --sha=* | --sh=*)
320     sharedstatedir="$ac_optarg" ;;
321
322   -site | --site | --sit)
323     ac_prev=site ;;
324   -site=* | --site=* | --sit=*)
325     site="$ac_optarg" ;;
326
327   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328     ac_prev=srcdir ;;
329   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330     srcdir="$ac_optarg" ;;
331
332   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333   | --syscon | --sysco | --sysc | --sys | --sy)
334     ac_prev=sysconfdir ;;
335   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337     sysconfdir="$ac_optarg" ;;
338
339   -target | --target | --targe | --targ | --tar | --ta | --t)
340     ac_prev=target ;;
341   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342     target="$ac_optarg" ;;
343
344   -v | -verbose | --verbose | --verbos | --verbo | --verb)
345     verbose=yes ;;
346
347   -version | --version | --versio | --versi | --vers)
348     echo "configure generated by autoconf version 2.13"
349     exit 0 ;;
350
351   -with-* | --with-*)
352     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353     # Reject names that are not valid shell variable names.
354     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356     fi
357     ac_package=`echo $ac_package| sed 's/-/_/g'`
358     case "$ac_option" in
359       *=*) ;;
360       *) ac_optarg=yes ;;
361     esac
362     eval "with_${ac_package}='$ac_optarg'" ;;
363
364   -without-* | --without-*)
365     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366     # Reject names that are not valid shell variable names.
367     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369     fi
370     ac_package=`echo $ac_package| sed 's/-/_/g'`
371     eval "with_${ac_package}=no" ;;
372
373   --x)
374     # Obsolete; use --with-x.
375     with_x=yes ;;
376
377   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378   | --x-incl | --x-inc | --x-in | --x-i)
379     ac_prev=x_includes ;;
380   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382     x_includes="$ac_optarg" ;;
383
384   -x-libraries | --x-libraries | --x-librarie | --x-librari \
385   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386     ac_prev=x_libraries ;;
387   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389     x_libraries="$ac_optarg" ;;
390
391   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
392     ;;
393
394   *)
395     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396       echo "configure: warning: $ac_option: invalid host type" 1>&2
397     fi
398     if test "x$nonopt" != xNONE; then
399       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
400     fi
401     nonopt="$ac_option"
402     ;;
403
404   esac
405 done
406
407 if test -n "$ac_prev"; then
408   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409 fi
410
411 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
412
413 # File descriptor usage:
414 # 0 standard input
415 # 1 file creation
416 # 2 errors and warnings
417 # 3 some systems may open it to /dev/tty
418 # 4 used on the Kubota Titan
419 # 6 checking for... messages and results
420 # 5 compiler messages saved in config.log
421 if test "$silent" = yes; then
422   exec 6>/dev/null
423 else
424   exec 6>&1
425 fi
426 exec 5>./config.log
427
428 echo "\
429 This file contains any messages produced by compilers while
430 running configure, to aid debugging if configure makes a mistake.
431 " 1>&5
432
433 # Strip out --no-create and --no-recursion so they do not pile up.
434 # Also quote any args containing shell metacharacters.
435 ac_configure_args=
436 for ac_arg
437 do
438   case "$ac_arg" in
439   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440   | --no-cr | --no-c) ;;
441   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446   esac
447 done
448
449 # NLS nuisances.
450 # Only set these to C if already set.  These must not be set unconditionally
451 # because not all systems understand e.g. LANG=C (notably SCO).
452 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453 # Non-C LC_CTYPE values break the ctype check.
454 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
455 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
458
459 # confdefs.h avoids OS command line length limits that DEFS can exceed.
460 rm -rf conftest* confdefs.h
461 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
462 echo > confdefs.h
463
464 # A filename unique to this package, relative to the directory that
465 # configure is in, which we can look for to find out if srcdir is correct.
466 ac_unique_file=src/gcm_input/message.h
467
468 # Find the source files, if location was not specified.
469 if test -z "$srcdir"; then
470   ac_srcdir_defaulted=yes
471   # Try the directory containing this script, then its parent.
472   ac_prog=$0
473   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475   srcdir=$ac_confdir
476   if test ! -r $srcdir/$ac_unique_file; then
477     srcdir=..
478   fi
479 else
480   ac_srcdir_defaulted=no
481 fi
482 if test ! -r $srcdir/$ac_unique_file; then
483   if test "$ac_srcdir_defaulted" = yes; then
484     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485   else
486     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487   fi
488 fi
489 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490
491 # Prefer explicitly selected file to automatically selected ones.
492 if test -z "$CONFIG_SITE"; then
493   if test "x$prefix" != xNONE; then
494     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495   else
496     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497   fi
498 fi
499 for ac_site_file in $CONFIG_SITE; do
500   if test -r "$ac_site_file"; then
501     echo "loading site script $ac_site_file"
502     . "$ac_site_file"
503   fi
504 done
505
506 if test -r "$cache_file"; then
507   echo "loading cache $cache_file"
508   . $cache_file
509 else
510   echo "creating cache $cache_file"
511   > $cache_file
512 fi
513
514 ac_ext=c
515 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516 ac_cpp='$CPP $CPPFLAGS'
517 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519 cross_compiling=$ac_cv_prog_cc_cross
520
521 ac_exeext=
522 ac_objext=o
523 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
526     ac_n= ac_c='
527 ' ac_t='        '
528   else
529     ac_n=-n ac_c= ac_t=
530   fi
531 else
532   ac_n= ac_c='\c' ac_t=
533 fi
534
535
536 ac_aux_dir=
537 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
538   if test -f $ac_dir/install-sh; then
539     ac_aux_dir=$ac_dir
540     ac_install_sh="$ac_aux_dir/install-sh -c"
541     break
542   elif test -f $ac_dir/install.sh; then
543     ac_aux_dir=$ac_dir
544     ac_install_sh="$ac_aux_dir/install.sh -c"
545     break
546   fi
547 done
548 if test -z "$ac_aux_dir"; then
549   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
550 fi
551 ac_config_guess=$ac_aux_dir/config.guess
552 ac_config_sub=$ac_aux_dir/config.sub
553 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
554
555 # Find a good install program.  We prefer a C program (faster),
556 # so one script is as good as another.  But avoid the broken or
557 # incompatible versions:
558 # SysV /etc/install, /usr/sbin/install
559 # SunOS /usr/etc/install
560 # IRIX /sbin/install
561 # AIX /bin/install
562 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
563 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
564 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
565 # ./install, which can be erroneously created by make from ./install.sh.
566 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
567 echo "configure:568: checking for a BSD compatible install" >&5
568 if test -z "$INSTALL"; then
569 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
570   echo $ac_n "(cached) $ac_c" 1>&6
571 else
572     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
573   for ac_dir in $PATH; do
574     # Account for people who put trailing slashes in PATH elements.
575     case "$ac_dir/" in
576     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
577     *)
578       # OSF1 and SCO ODT 3.0 have their own names for install.
579       # Don't use installbsd from OSF since it installs stuff as root
580       # by default.
581       for ac_prog in ginstall scoinst install; do
582         if test -f $ac_dir/$ac_prog; then
583           if test $ac_prog = install &&
584             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
585             # AIX install.  It has an incompatible calling convention.
586             :
587           else
588             ac_cv_path_install="$ac_dir/$ac_prog -c"
589             break 2
590           fi
591         fi
592       done
593       ;;
594     esac
595   done
596   IFS="$ac_save_IFS"
597
598 fi
599   if test "${ac_cv_path_install+set}" = set; then
600     INSTALL="$ac_cv_path_install"
601   else
602     # As a last resort, use the slow shell script.  We don't cache a
603     # path for INSTALL within a source directory, because that will
604     # break other packages using the cache if that directory is
605     # removed, or if the path is relative.
606     INSTALL="$ac_install_sh"
607   fi
608 fi
609 echo "$ac_t""$INSTALL" 1>&6
610
611 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
612 # It thinks the first close brace ends the variable substitution.
613 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
614
615 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
616
617 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
618
619 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
620 echo "configure:621: checking whether build environment is sane" >&5
621 # Just in case
622 sleep 1
623 echo timestamp > conftestfile
624 # Do `set' in a subshell so we don't clobber the current shell's
625 # arguments.  Must try -L first in case configure is actually a
626 # symlink; some systems play weird games with the mod time of symlinks
627 # (eg FreeBSD returns the mod time of the symlink's containing
628 # directory).
629 if (
630    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
631    if test "$*" = "X"; then
632       # -L didn't work.
633       set X `ls -t $srcdir/configure conftestfile`
634    fi
635    if test "$*" != "X $srcdir/configure conftestfile" \
636       && test "$*" != "X conftestfile $srcdir/configure"; then
637
638       # If neither matched, then we have a broken ls.  This can happen
639       # if, for instance, CONFIG_SHELL is bash and it inherits a
640       # broken ls alias from the environment.  This has actually
641       # happened.  Such a system could not be considered "sane".
642       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
643 alias in your environment" 1>&2; exit 1; }
644    fi
645
646    test "$2" = conftestfile
647    )
648 then
649    # Ok.
650    :
651 else
652    { echo "configure: error: newly created file is older than distributed files!
653 Check your system clock" 1>&2; exit 1; }
654 fi
655 rm -f conftest*
656 echo "$ac_t""yes" 1>&6
657 if test "$program_transform_name" = s,x,x,; then
658   program_transform_name=
659 else
660   # Double any \ or $.  echo might interpret backslashes.
661   cat <<\EOF_SED > conftestsed
662 s,\\,\\\\,g; s,\$,$$,g
663 EOF_SED
664   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
665   rm -f conftestsed
666 fi
667 test "$program_prefix" != NONE &&
668   program_transform_name="s,^,${program_prefix},; $program_transform_name"
669 # Use a double $ so make ignores it.
670 test "$program_suffix" != NONE &&
671   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
672
673 # sed with no file args requires a program.
674 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
675
676 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
677 echo "configure:678: checking whether ${MAKE-make} sets \${MAKE}" >&5
678 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
679 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
680   echo $ac_n "(cached) $ac_c" 1>&6
681 else
682   cat > conftestmake <<\EOF
683 all:
684         @echo 'ac_maketemp="${MAKE}"'
685 EOF
686 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
687 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
688 if test -n "$ac_maketemp"; then
689   eval ac_cv_prog_make_${ac_make}_set=yes
690 else
691   eval ac_cv_prog_make_${ac_make}_set=no
692 fi
693 rm -f conftestmake
694 fi
695 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
696   echo "$ac_t""yes" 1>&6
697   SET_MAKE=
698 else
699   echo "$ac_t""no" 1>&6
700   SET_MAKE="MAKE=${MAKE-make}"
701 fi
702
703
704 PACKAGE=GnuCoMo
705
706 VERSION=0.0.9
707
708 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
709   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
710 fi
711 cat >> confdefs.h <<EOF
712 #define PACKAGE "$PACKAGE"
713 EOF
714
715 cat >> confdefs.h <<EOF
716 #define VERSION "$VERSION"
717 EOF
718
719
720
721 missing_dir=`cd $ac_aux_dir && pwd`
722 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
723 echo "configure:724: checking for working aclocal" >&5
724 # Run test in a subshell; some versions of sh will print an error if
725 # an executable is not found, even if stderr is redirected.
726 # Redirect stdin to placate older versions of autoconf.  Sigh.
727 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
728    ACLOCAL=aclocal
729    echo "$ac_t""found" 1>&6
730 else
731    ACLOCAL="$missing_dir/missing aclocal"
732    echo "$ac_t""missing" 1>&6
733 fi
734
735 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
736 echo "configure:737: checking for working autoconf" >&5
737 # Run test in a subshell; some versions of sh will print an error if
738 # an executable is not found, even if stderr is redirected.
739 # Redirect stdin to placate older versions of autoconf.  Sigh.
740 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
741    AUTOCONF=autoconf
742    echo "$ac_t""found" 1>&6
743 else
744    AUTOCONF="$missing_dir/missing autoconf"
745    echo "$ac_t""missing" 1>&6
746 fi
747
748 echo $ac_n "checking for working automake""... $ac_c" 1>&6
749 echo "configure:750: checking for working automake" >&5
750 # Run test in a subshell; some versions of sh will print an error if
751 # an executable is not found, even if stderr is redirected.
752 # Redirect stdin to placate older versions of autoconf.  Sigh.
753 if (automake --version) < /dev/null > /dev/null 2>&1; then
754    AUTOMAKE=automake
755    echo "$ac_t""found" 1>&6
756 else
757    AUTOMAKE="$missing_dir/missing automake"
758    echo "$ac_t""missing" 1>&6
759 fi
760
761 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
762 echo "configure:763: checking for working autoheader" >&5
763 # Run test in a subshell; some versions of sh will print an error if
764 # an executable is not found, even if stderr is redirected.
765 # Redirect stdin to placate older versions of autoconf.  Sigh.
766 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
767    AUTOHEADER=autoheader
768    echo "$ac_t""found" 1>&6
769 else
770    AUTOHEADER="$missing_dir/missing autoheader"
771    echo "$ac_t""missing" 1>&6
772 fi
773
774 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
775 echo "configure:776: checking for working makeinfo" >&5
776 # Run test in a subshell; some versions of sh will print an error if
777 # an executable is not found, even if stderr is redirected.
778 # Redirect stdin to placate older versions of autoconf.  Sigh.
779 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
780    MAKEINFO=makeinfo
781    echo "$ac_t""found" 1>&6
782 else
783    MAKEINFO="$missing_dir/missing makeinfo"
784    echo "$ac_t""missing" 1>&6
785 fi
786
787
788
789
790 # Extract the first word of "gcc", so it can be a program name with args.
791 set dummy gcc; ac_word=$2
792 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
793 echo "configure:794: checking for $ac_word" >&5
794 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
795   echo $ac_n "(cached) $ac_c" 1>&6
796 else
797   if test -n "$CC"; then
798   ac_cv_prog_CC="$CC" # Let the user override the test.
799 else
800   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
801   ac_dummy="$PATH"
802   for ac_dir in $ac_dummy; do
803     test -z "$ac_dir" && ac_dir=.
804     if test -f $ac_dir/$ac_word; then
805       ac_cv_prog_CC="gcc"
806       break
807     fi
808   done
809   IFS="$ac_save_ifs"
810 fi
811 fi
812 CC="$ac_cv_prog_CC"
813 if test -n "$CC"; then
814   echo "$ac_t""$CC" 1>&6
815 else
816   echo "$ac_t""no" 1>&6
817 fi
818
819 if test -z "$CC"; then
820   # Extract the first word of "cc", so it can be a program name with args.
821 set dummy cc; ac_word=$2
822 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
823 echo "configure:824: checking for $ac_word" >&5
824 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
825   echo $ac_n "(cached) $ac_c" 1>&6
826 else
827   if test -n "$CC"; then
828   ac_cv_prog_CC="$CC" # Let the user override the test.
829 else
830   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
831   ac_prog_rejected=no
832   ac_dummy="$PATH"
833   for ac_dir in $ac_dummy; do
834     test -z "$ac_dir" && ac_dir=.
835     if test -f $ac_dir/$ac_word; then
836       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
837         ac_prog_rejected=yes
838         continue
839       fi
840       ac_cv_prog_CC="cc"
841       break
842     fi
843   done
844   IFS="$ac_save_ifs"
845 if test $ac_prog_rejected = yes; then
846   # We found a bogon in the path, so make sure we never use it.
847   set dummy $ac_cv_prog_CC
848   shift
849   if test $# -gt 0; then
850     # We chose a different compiler from the bogus one.
851     # However, it has the same basename, so the bogon will be chosen
852     # first if we set CC to just the basename; use the full file name.
853     shift
854     set dummy "$ac_dir/$ac_word" "$@"
855     shift
856     ac_cv_prog_CC="$@"
857   fi
858 fi
859 fi
860 fi
861 CC="$ac_cv_prog_CC"
862 if test -n "$CC"; then
863   echo "$ac_t""$CC" 1>&6
864 else
865   echo "$ac_t""no" 1>&6
866 fi
867
868   if test -z "$CC"; then
869     case "`uname -s`" in
870     *win32* | *WIN32*)
871       # Extract the first word of "cl", so it can be a program name with args.
872 set dummy cl; ac_word=$2
873 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
874 echo "configure:875: checking for $ac_word" >&5
875 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
876   echo $ac_n "(cached) $ac_c" 1>&6
877 else
878   if test -n "$CC"; then
879   ac_cv_prog_CC="$CC" # Let the user override the test.
880 else
881   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
882   ac_dummy="$PATH"
883   for ac_dir in $ac_dummy; do
884     test -z "$ac_dir" && ac_dir=.
885     if test -f $ac_dir/$ac_word; then
886       ac_cv_prog_CC="cl"
887       break
888     fi
889   done
890   IFS="$ac_save_ifs"
891 fi
892 fi
893 CC="$ac_cv_prog_CC"
894 if test -n "$CC"; then
895   echo "$ac_t""$CC" 1>&6
896 else
897   echo "$ac_t""no" 1>&6
898 fi
899  ;;
900     esac
901   fi
902   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
903 fi
904
905 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
906 echo "configure:907: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
907
908 ac_ext=c
909 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
910 ac_cpp='$CPP $CPPFLAGS'
911 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
912 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
913 cross_compiling=$ac_cv_prog_cc_cross
914
915 cat > conftest.$ac_ext << EOF
916
917 #line 918 "configure"
918 #include "confdefs.h"
919
920 main(){return(0);}
921 EOF
922 if { (eval echo configure:923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
923   ac_cv_prog_cc_works=yes
924   # If we can't run a trivial program, we are probably using a cross compiler.
925   if (./conftest; exit) 2>/dev/null; then
926     ac_cv_prog_cc_cross=no
927   else
928     ac_cv_prog_cc_cross=yes
929   fi
930 else
931   echo "configure: failed program was:" >&5
932   cat conftest.$ac_ext >&5
933   ac_cv_prog_cc_works=no
934 fi
935 rm -fr conftest*
936 ac_ext=c
937 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
938 ac_cpp='$CPP $CPPFLAGS'
939 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
940 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
941 cross_compiling=$ac_cv_prog_cc_cross
942
943 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
944 if test $ac_cv_prog_cc_works = no; then
945   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
946 fi
947 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
948 echo "configure:949: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
949 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
950 cross_compiling=$ac_cv_prog_cc_cross
951
952 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
953 echo "configure:954: checking whether we are using GNU C" >&5
954 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
955   echo $ac_n "(cached) $ac_c" 1>&6
956 else
957   cat > conftest.c <<EOF
958 #ifdef __GNUC__
959   yes;
960 #endif
961 EOF
962 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
963   ac_cv_prog_gcc=yes
964 else
965   ac_cv_prog_gcc=no
966 fi
967 fi
968
969 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
970
971 if test $ac_cv_prog_gcc = yes; then
972   GCC=yes
973 else
974   GCC=
975 fi
976
977 ac_test_CFLAGS="${CFLAGS+set}"
978 ac_save_CFLAGS="$CFLAGS"
979 CFLAGS=
980 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
981 echo "configure:982: checking whether ${CC-cc} accepts -g" >&5
982 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
983   echo $ac_n "(cached) $ac_c" 1>&6
984 else
985   echo 'void f(){}' > conftest.c
986 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
987   ac_cv_prog_cc_g=yes
988 else
989   ac_cv_prog_cc_g=no
990 fi
991 rm -f conftest*
992
993 fi
994
995 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
996 if test "$ac_test_CFLAGS" = set; then
997   CFLAGS="$ac_save_CFLAGS"
998 elif test $ac_cv_prog_cc_g = yes; then
999   if test "$GCC" = yes; then
1000     CFLAGS="-g -O2"
1001   else
1002     CFLAGS="-g"
1003   fi
1004 else
1005   if test "$GCC" = yes; then
1006     CFLAGS="-O2"
1007   else
1008     CFLAGS=
1009   fi
1010 fi
1011
1012 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1013 do
1014 # Extract the first word of "$ac_prog", so it can be a program name with args.
1015 set dummy $ac_prog; ac_word=$2
1016 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1017 echo "configure:1018: checking for $ac_word" >&5
1018 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1019   echo $ac_n "(cached) $ac_c" 1>&6
1020 else
1021   if test -n "$CXX"; then
1022   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1023 else
1024   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1025   ac_dummy="$PATH"
1026   for ac_dir in $ac_dummy; do
1027     test -z "$ac_dir" && ac_dir=.
1028     if test -f $ac_dir/$ac_word; then
1029       ac_cv_prog_CXX="$ac_prog"
1030       break
1031     fi
1032   done
1033   IFS="$ac_save_ifs"
1034 fi
1035 fi
1036 CXX="$ac_cv_prog_CXX"
1037 if test -n "$CXX"; then
1038   echo "$ac_t""$CXX" 1>&6
1039 else
1040   echo "$ac_t""no" 1>&6
1041 fi
1042
1043 test -n "$CXX" && break
1044 done
1045 test -n "$CXX" || CXX="gcc"
1046
1047
1048 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1049 echo "configure:1050: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1050
1051 ac_ext=C
1052 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1053 ac_cpp='$CXXCPP $CPPFLAGS'
1054 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1055 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1056 cross_compiling=$ac_cv_prog_cxx_cross
1057
1058 cat > conftest.$ac_ext << EOF
1059
1060 #line 1061 "configure"
1061 #include "confdefs.h"
1062
1063 int main(){return(0);}
1064 EOF
1065 if { (eval echo configure:1066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1066   ac_cv_prog_cxx_works=yes
1067   # If we can't run a trivial program, we are probably using a cross compiler.
1068   if (./conftest; exit) 2>/dev/null; then
1069     ac_cv_prog_cxx_cross=no
1070   else
1071     ac_cv_prog_cxx_cross=yes
1072   fi
1073 else
1074   echo "configure: failed program was:" >&5
1075   cat conftest.$ac_ext >&5
1076   ac_cv_prog_cxx_works=no
1077 fi
1078 rm -fr conftest*
1079 ac_ext=c
1080 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1081 ac_cpp='$CPP $CPPFLAGS'
1082 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1083 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1084 cross_compiling=$ac_cv_prog_cc_cross
1085
1086 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1087 if test $ac_cv_prog_cxx_works = no; then
1088   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1089 fi
1090 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1091 echo "configure:1092: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1092 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1093 cross_compiling=$ac_cv_prog_cxx_cross
1094
1095 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1096 echo "configure:1097: checking whether we are using GNU C++" >&5
1097 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1098   echo $ac_n "(cached) $ac_c" 1>&6
1099 else
1100   cat > conftest.C <<EOF
1101 #ifdef __GNUC__
1102   yes;
1103 #endif
1104 EOF
1105 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1106   ac_cv_prog_gxx=yes
1107 else
1108   ac_cv_prog_gxx=no
1109 fi
1110 fi
1111
1112 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1113
1114 if test $ac_cv_prog_gxx = yes; then
1115   GXX=yes
1116 else
1117   GXX=
1118 fi
1119
1120 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1121 ac_save_CXXFLAGS="$CXXFLAGS"
1122 CXXFLAGS=
1123 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1124 echo "configure:1125: checking whether ${CXX-g++} accepts -g" >&5
1125 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1126   echo $ac_n "(cached) $ac_c" 1>&6
1127 else
1128   echo 'void f(){}' > conftest.cc
1129 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1130   ac_cv_prog_cxx_g=yes
1131 else
1132   ac_cv_prog_cxx_g=no
1133 fi
1134 rm -f conftest*
1135
1136 fi
1137
1138 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1139 if test "$ac_test_CXXFLAGS" = set; then
1140   CXXFLAGS="$ac_save_CXXFLAGS"
1141 elif test $ac_cv_prog_cxx_g = yes; then
1142   if test "$GXX" = yes; then
1143     CXXFLAGS="-g -O2"
1144   else
1145     CXXFLAGS="-g"
1146   fi
1147 else
1148   if test "$GXX" = yes; then
1149     CXXFLAGS="-O2"
1150   else
1151     CXXFLAGS=
1152   fi
1153 fi
1154
1155 for ac_declaration in \
1156    ''\
1157    '#include <stdlib.h>' \
1158    'extern "C" void std::exit (int) throw (); using std::exit;' \
1159    'extern "C" void std::exit (int); using std::exit;' \
1160    'extern "C" void exit (int) throw ();' \
1161    'extern "C" void exit (int);' \
1162    'void exit (int);'
1163 do
1164   cat > conftest.$ac_ext <<EOF
1165 #line 1166 "configure"
1166 #include "confdefs.h"
1167 #include <stdlib.h>
1168 $ac_declaration
1169 int main() {
1170 exit (42);
1171 ; return 0; }
1172 EOF
1173 if { (eval echo configure:1174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1174   :
1175 else
1176   echo "configure: failed program was:" >&5
1177   cat conftest.$ac_ext >&5
1178   rm -rf conftest*
1179   continue
1180 fi
1181 rm -f conftest*
1182   cat > conftest.$ac_ext <<EOF
1183 #line 1184 "configure"
1184 #include "confdefs.h"
1185 $ac_declaration
1186 int main() {
1187 exit (42);
1188 ; return 0; }
1189 EOF
1190 if { (eval echo configure:1191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1191   rm -rf conftest*
1192   break
1193 else
1194   echo "configure: failed program was:" >&5
1195   cat conftest.$ac_ext >&5
1196 fi
1197 rm -f conftest*
1198 done
1199 if test -n "$ac_declaration"; then
1200   echo '#ifdef __cplusplus' >>confdefs.h
1201   echo $ac_declaration      >>confdefs.h
1202   echo '#endif'             >>confdefs.h
1203 fi
1204
1205
1206 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1207 echo "configure:1208: checking how to run the C preprocessor" >&5
1208 # On Suns, sometimes $CPP names a directory.
1209 if test -n "$CPP" && test -d "$CPP"; then
1210   CPP=
1211 fi
1212 if test -z "$CPP"; then
1213 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1214   echo $ac_n "(cached) $ac_c" 1>&6
1215 else
1216     # This must be in double quotes, not single quotes, because CPP may get
1217   # substituted into the Makefile and "${CC-cc}" will confuse make.
1218   CPP="${CC-cc} -E"
1219   # On the NeXT, cc -E runs the code through the compiler's parser,
1220   # not just through cpp.
1221   cat > conftest.$ac_ext <<EOF
1222 #line 1223 "configure"
1223 #include "confdefs.h"
1224 #include <assert.h>
1225 Syntax Error
1226 EOF
1227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1228 { (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1230 if test -z "$ac_err"; then
1231   :
1232 else
1233   echo "$ac_err" >&5
1234   echo "configure: failed program was:" >&5
1235   cat conftest.$ac_ext >&5
1236   rm -rf conftest*
1237   CPP="${CC-cc} -E -traditional-cpp"
1238   cat > conftest.$ac_ext <<EOF
1239 #line 1240 "configure"
1240 #include "confdefs.h"
1241 #include <assert.h>
1242 Syntax Error
1243 EOF
1244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1245 { (eval echo configure:1246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1247 if test -z "$ac_err"; then
1248   :
1249 else
1250   echo "$ac_err" >&5
1251   echo "configure: failed program was:" >&5
1252   cat conftest.$ac_ext >&5
1253   rm -rf conftest*
1254   CPP="${CC-cc} -nologo -E"
1255   cat > conftest.$ac_ext <<EOF
1256 #line 1257 "configure"
1257 #include "confdefs.h"
1258 #include <assert.h>
1259 Syntax Error
1260 EOF
1261 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1262 { (eval echo configure:1263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1264 if test -z "$ac_err"; then
1265   :
1266 else
1267   echo "$ac_err" >&5
1268   echo "configure: failed program was:" >&5
1269   cat conftest.$ac_ext >&5
1270   rm -rf conftest*
1271   CPP=/lib/cpp
1272 fi
1273 rm -f conftest*
1274 fi
1275 rm -f conftest*
1276 fi
1277 rm -f conftest*
1278   ac_cv_prog_CPP="$CPP"
1279 fi
1280   CPP="$ac_cv_prog_CPP"
1281 else
1282   ac_cv_prog_CPP="$CPP"
1283 fi
1284 echo "$ac_t""$CPP" 1>&6
1285
1286 missing_dir=`cd $ac_aux_dir && pwd`
1287 for ac_prog in flex lex
1288 do
1289 # Extract the first word of "$ac_prog", so it can be a program name with args.
1290 set dummy $ac_prog; ac_word=$2
1291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1292 echo "configure:1293: checking for $ac_word" >&5
1293 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1294   echo $ac_n "(cached) $ac_c" 1>&6
1295 else
1296   if test -n "$LEX"; then
1297   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1298 else
1299   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1300   ac_dummy="$PATH"
1301   for ac_dir in $ac_dummy; do
1302     test -z "$ac_dir" && ac_dir=.
1303     if test -f $ac_dir/$ac_word; then
1304       ac_cv_prog_LEX="$ac_prog"
1305       break
1306     fi
1307   done
1308   IFS="$ac_save_ifs"
1309 fi
1310 fi
1311 LEX="$ac_cv_prog_LEX"
1312 if test -n "$LEX"; then
1313   echo "$ac_t""$LEX" 1>&6
1314 else
1315   echo "$ac_t""no" 1>&6
1316 fi
1317
1318 test -n "$LEX" && break
1319 done
1320 test -n "$LEX" || LEX=""$missing_dir/missing flex""
1321
1322 # Extract the first word of "flex", so it can be a program name with args.
1323 set dummy flex; ac_word=$2
1324 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1325 echo "configure:1326: checking for $ac_word" >&5
1326 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1327   echo $ac_n "(cached) $ac_c" 1>&6
1328 else
1329   if test -n "$LEX"; then
1330   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1331 else
1332   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1333   ac_dummy="$PATH"
1334   for ac_dir in $ac_dummy; do
1335     test -z "$ac_dir" && ac_dir=.
1336     if test -f $ac_dir/$ac_word; then
1337       ac_cv_prog_LEX="flex"
1338       break
1339     fi
1340   done
1341   IFS="$ac_save_ifs"
1342   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1343 fi
1344 fi
1345 LEX="$ac_cv_prog_LEX"
1346 if test -n "$LEX"; then
1347   echo "$ac_t""$LEX" 1>&6
1348 else
1349   echo "$ac_t""no" 1>&6
1350 fi
1351
1352 if test -z "$LEXLIB"
1353 then
1354   case "$LEX" in
1355   flex*) ac_lib=fl ;;
1356   *) ac_lib=l ;;
1357   esac
1358   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1359 echo "configure:1360: checking for yywrap in -l$ac_lib" >&5
1360 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1361 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1362   echo $ac_n "(cached) $ac_c" 1>&6
1363 else
1364   ac_save_LIBS="$LIBS"
1365 LIBS="-l$ac_lib  $LIBS"
1366 cat > conftest.$ac_ext <<EOF
1367 #line 1368 "configure"
1368 #include "confdefs.h"
1369 /* Override any gcc2 internal prototype to avoid an error.  */
1370 /* We use char because int might match the return type of a gcc2
1371     builtin and then its argument prototype would still apply.  */
1372 char yywrap();
1373
1374 int main() {
1375 yywrap()
1376 ; return 0; }
1377 EOF
1378 if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1379   rm -rf conftest*
1380   eval "ac_cv_lib_$ac_lib_var=yes"
1381 else
1382   echo "configure: failed program was:" >&5
1383   cat conftest.$ac_ext >&5
1384   rm -rf conftest*
1385   eval "ac_cv_lib_$ac_lib_var=no"
1386 fi
1387 rm -f conftest*
1388 LIBS="$ac_save_LIBS"
1389
1390 fi
1391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1392   echo "$ac_t""yes" 1>&6
1393   LEXLIB="-l$ac_lib"
1394 else
1395   echo "$ac_t""no" 1>&6
1396 fi
1397
1398 fi
1399
1400 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
1401 echo "configure:1402: checking lex output file root" >&5
1402 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1403   echo $ac_n "(cached) $ac_c" 1>&6
1404 else
1405   # The minimal lex program is just a single line: %%.  But some broken lexes
1406 # (Solaris, I think it was) want two %% lines, so accommodate them.
1407 echo '%%
1408 %%' | $LEX
1409 if test -f lex.yy.c; then
1410   ac_cv_prog_lex_root=lex.yy
1411 elif test -f lexyy.c; then
1412   ac_cv_prog_lex_root=lexyy
1413 else
1414   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1415 fi
1416 fi
1417
1418 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1419 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1420
1421 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
1422 echo "configure:1423: checking whether yytext is a pointer" >&5
1423 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1424   echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426   # POSIX says lex can declare yytext either as a pointer or an array; the
1427 # default is implementation-dependent. Figure out which it is, since
1428 # not all implementations provide the %pointer and %array declarations.
1429 ac_cv_prog_lex_yytext_pointer=no
1430 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1431 ac_save_LIBS="$LIBS"
1432 LIBS="$LIBS $LEXLIB"
1433 cat > conftest.$ac_ext <<EOF
1434 #line 1435 "configure"
1435 #include "confdefs.h"
1436 `cat $LEX_OUTPUT_ROOT.c`
1437 int main() {
1438
1439 ; return 0; }
1440 EOF
1441 if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1442   rm -rf conftest*
1443   ac_cv_prog_lex_yytext_pointer=yes
1444 else
1445   echo "configure: failed program was:" >&5
1446   cat conftest.$ac_ext >&5
1447 fi
1448 rm -f conftest*
1449 LIBS="$ac_save_LIBS"
1450 rm -f "${LEX_OUTPUT_ROOT}.c"
1451
1452 fi
1453
1454 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1455 if test $ac_cv_prog_lex_yytext_pointer = yes; then
1456   cat >> confdefs.h <<\EOF
1457 #define YYTEXT_POINTER 1
1458 EOF
1459
1460 fi
1461
1462 # Find a good install program.  We prefer a C program (faster),
1463 # so one script is as good as another.  But avoid the broken or
1464 # incompatible versions:
1465 # SysV /etc/install, /usr/sbin/install
1466 # SunOS /usr/etc/install
1467 # IRIX /sbin/install
1468 # AIX /bin/install
1469 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1470 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1471 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1472 # ./install, which can be erroneously created by make from ./install.sh.
1473 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1474 echo "configure:1475: checking for a BSD compatible install" >&5
1475 if test -z "$INSTALL"; then
1476 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1477   echo $ac_n "(cached) $ac_c" 1>&6
1478 else
1479     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1480   for ac_dir in $PATH; do
1481     # Account for people who put trailing slashes in PATH elements.
1482     case "$ac_dir/" in
1483     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1484     *)
1485       # OSF1 and SCO ODT 3.0 have their own names for install.
1486       # Don't use installbsd from OSF since it installs stuff as root
1487       # by default.
1488       for ac_prog in ginstall scoinst install; do
1489         if test -f $ac_dir/$ac_prog; then
1490           if test $ac_prog = install &&
1491             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1492             # AIX install.  It has an incompatible calling convention.
1493             :
1494           else
1495             ac_cv_path_install="$ac_dir/$ac_prog -c"
1496             break 2
1497           fi
1498         fi
1499       done
1500       ;;
1501     esac
1502   done
1503   IFS="$ac_save_IFS"
1504
1505 fi
1506   if test "${ac_cv_path_install+set}" = set; then
1507     INSTALL="$ac_cv_path_install"
1508   else
1509     # As a last resort, use the slow shell script.  We don't cache a
1510     # path for INSTALL within a source directory, because that will
1511     # break other packages using the cache if that directory is
1512     # removed, or if the path is relative.
1513     INSTALL="$ac_install_sh"
1514   fi
1515 fi
1516 echo "$ac_t""$INSTALL" 1>&6
1517
1518 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1519 # It thinks the first close brace ends the variable substitution.
1520 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1521
1522 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1523
1524 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1525
1526 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1527 echo "configure:1528: checking whether ln -s works" >&5
1528 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1529   echo $ac_n "(cached) $ac_c" 1>&6
1530 else
1531   rm -f conftestdata
1532 if ln -s X conftestdata 2>/dev/null
1533 then
1534   rm -f conftestdata
1535   ac_cv_prog_LN_S="ln -s"
1536 else
1537   ac_cv_prog_LN_S=ln
1538 fi
1539 fi
1540 LN_S="$ac_cv_prog_LN_S"
1541 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1542   echo "$ac_t""yes" 1>&6
1543 else
1544   echo "$ac_t""no" 1>&6
1545 fi
1546
1547 # Extract the first word of "ranlib", so it can be a program name with args.
1548 set dummy ranlib; ac_word=$2
1549 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1550 echo "configure:1551: checking for $ac_word" >&5
1551 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1552   echo $ac_n "(cached) $ac_c" 1>&6
1553 else
1554   if test -n "$RANLIB"; then
1555   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1556 else
1557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1558   ac_dummy="$PATH"
1559   for ac_dir in $ac_dummy; do
1560     test -z "$ac_dir" && ac_dir=.
1561     if test -f $ac_dir/$ac_word; then
1562       ac_cv_prog_RANLIB="ranlib"
1563       break
1564     fi
1565   done
1566   IFS="$ac_save_ifs"
1567   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1568 fi
1569 fi
1570 RANLIB="$ac_cv_prog_RANLIB"
1571 if test -n "$RANLIB"; then
1572   echo "$ac_t""$RANLIB" 1>&6
1573 else
1574   echo "$ac_t""no" 1>&6
1575 fi
1576
1577 for ac_prog in 'bison -y' byacc
1578 do
1579 # Extract the first word of "$ac_prog", so it can be a program name with args.
1580 set dummy $ac_prog; ac_word=$2
1581 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1582 echo "configure:1583: checking for $ac_word" >&5
1583 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1584   echo $ac_n "(cached) $ac_c" 1>&6
1585 else
1586   if test -n "$YACC"; then
1587   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1588 else
1589   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1590   ac_dummy="$PATH"
1591   for ac_dir in $ac_dummy; do
1592     test -z "$ac_dir" && ac_dir=.
1593     if test -f $ac_dir/$ac_word; then
1594       ac_cv_prog_YACC="$ac_prog"
1595       break
1596     fi
1597   done
1598   IFS="$ac_save_ifs"
1599 fi
1600 fi
1601 YACC="$ac_cv_prog_YACC"
1602 if test -n "$YACC"; then
1603   echo "$ac_t""$YACC" 1>&6
1604 else
1605   echo "$ac_t""no" 1>&6
1606 fi
1607
1608 test -n "$YACC" && break
1609 done
1610 test -n "$YACC" || YACC="yacc"
1611
1612 for ac_prog in gawk mawk nawk awk
1613 do
1614 # Extract the first word of "$ac_prog", so it can be a program name with args.
1615 set dummy $ac_prog; ac_word=$2
1616 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1617 echo "configure:1618: checking for $ac_word" >&5
1618 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1619   echo $ac_n "(cached) $ac_c" 1>&6
1620 else
1621   if test -n "$AWK"; then
1622   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1623 else
1624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1625   ac_dummy="$PATH"
1626   for ac_dir in $ac_dummy; do
1627     test -z "$ac_dir" && ac_dir=.
1628     if test -f $ac_dir/$ac_word; then
1629       ac_cv_prog_AWK="$ac_prog"
1630       break
1631     fi
1632   done
1633   IFS="$ac_save_ifs"
1634 fi
1635 fi
1636 AWK="$ac_cv_prog_AWK"
1637 if test -n "$AWK"; then
1638   echo "$ac_t""$AWK" 1>&6
1639 else
1640   echo "$ac_t""no" 1>&6
1641 fi
1642
1643 test -n "$AWK" && break
1644 done
1645
1646
1647 # Extract the first word of "xml2-config", so it can be a program name with args.
1648 set dummy xml2-config; ac_word=$2
1649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1650 echo "configure:1651: checking for $ac_word" >&5
1651 if eval "test \"`echo '$''{'ac_cv_path_XML_CONFIG'+set}'`\" = set"; then
1652   echo $ac_n "(cached) $ac_c" 1>&6
1653 else
1654   case "$XML_CONFIG" in
1655   /*)
1656   ac_cv_path_XML_CONFIG="$XML_CONFIG" # Let the user override the test with a path.
1657   ;;
1658   ?:/*)                  
1659   ac_cv_path_XML_CONFIG="$XML_CONFIG" # Let the user override the test with a dos path.
1660   ;;
1661   *)
1662   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1663   ac_dummy="$PATH"
1664   for ac_dir in $ac_dummy; do 
1665     test -z "$ac_dir" && ac_dir=.
1666     if test -f $ac_dir/$ac_word; then
1667       ac_cv_path_XML_CONFIG="$ac_dir/$ac_word"
1668       break
1669     fi
1670   done
1671   IFS="$ac_save_ifs"
1672   test -z "$ac_cv_path_XML_CONFIG" && ac_cv_path_XML_CONFIG="no"
1673   ;;
1674 esac
1675 fi
1676 XML_CONFIG="$ac_cv_path_XML_CONFIG"
1677 if test -n "$XML_CONFIG"; then
1678   echo "$ac_t""$XML_CONFIG" 1>&6
1679 else
1680   echo "$ac_t""no" 1>&6
1681 fi
1682
1683
1684 if test $XML_CONFIG = "no"
1685 then
1686    echo "XML library not found (see http://xmlsoft.org/)."
1687    exit 1;
1688 fi
1689
1690
1691 # If we find X, set shell vars x_includes and x_libraries to the
1692 # paths, otherwise set no_x=yes.
1693 # Uses ac_ vars as temps to allow command line to override cache and checks.
1694 # --without-x overrides everything else, but does not touch the cache.
1695 echo $ac_n "checking for X""... $ac_c" 1>&6
1696 echo "configure:1697: checking for X" >&5
1697
1698 # Check whether --with-x or --without-x was given.
1699 if test "${with_x+set}" = set; then
1700   withval="$with_x"
1701   :
1702 fi
1703
1704 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1705 if test "x$with_x" = xno; then
1706   # The user explicitly disabled X.
1707   have_x=disabled
1708 else
1709   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1710     # Both variables are already set.
1711     have_x=yes
1712   else
1713 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1714   echo $ac_n "(cached) $ac_c" 1>&6
1715 else
1716   # One or both of the vars are not set, and there is no cached value.
1717 ac_x_includes=NO ac_x_libraries=NO
1718 rm -fr conftestdir
1719 if mkdir conftestdir; then
1720   cd conftestdir
1721   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1722   cat > Imakefile <<'EOF'
1723 acfindx:
1724         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1725 EOF
1726   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1727     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1728     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1729     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1730     for ac_extension in a so sl; do
1731       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1732         test -f $ac_im_libdir/libX11.$ac_extension; then
1733         ac_im_usrlibdir=$ac_im_libdir; break
1734       fi
1735     done
1736     # Screen out bogus values from the imake configuration.  They are
1737     # bogus both because they are the default anyway, and because
1738     # using them would break gcc on systems where it needs fixed includes.
1739     case "$ac_im_incroot" in
1740         /usr/include) ;;
1741         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1742     esac
1743     case "$ac_im_usrlibdir" in
1744         /usr/lib | /lib) ;;
1745         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1746     esac
1747   fi
1748   cd ..
1749   rm -fr conftestdir
1750 fi
1751
1752 if test "$ac_x_includes" = NO; then
1753   # Guess where to find include files, by looking for this one X11 .h file.
1754   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1755
1756   # First, try using that file with no special directory specified.
1757 cat > conftest.$ac_ext <<EOF
1758 #line 1759 "configure"
1759 #include "confdefs.h"
1760 #include <$x_direct_test_include>
1761 EOF
1762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1763 { (eval echo configure:1764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1765 if test -z "$ac_err"; then
1766   rm -rf conftest*
1767   # We can compile using X headers with no special include directory.
1768 ac_x_includes=
1769 else
1770   echo "$ac_err" >&5
1771   echo "configure: failed program was:" >&5
1772   cat conftest.$ac_ext >&5
1773   rm -rf conftest*
1774   # Look for the header file in a standard set of common directories.
1775 # Check X11 before X11Rn because it is often a symlink to the current release.
1776   for ac_dir in               \
1777     /usr/X11/include          \
1778     /usr/X11R6/include        \
1779     /usr/X11R5/include        \
1780     /usr/X11R4/include        \
1781                               \
1782     /usr/include/X11          \
1783     /usr/include/X11R6        \
1784     /usr/include/X11R5        \
1785     /usr/include/X11R4        \
1786                               \
1787     /usr/local/X11/include    \
1788     /usr/local/X11R6/include  \
1789     /usr/local/X11R5/include  \
1790     /usr/local/X11R4/include  \
1791                               \
1792     /usr/local/include/X11    \
1793     /usr/local/include/X11R6  \
1794     /usr/local/include/X11R5  \
1795     /usr/local/include/X11R4  \
1796                               \
1797     /usr/X386/include         \
1798     /usr/x386/include         \
1799     /usr/XFree86/include/X11  \
1800                               \
1801     /usr/include              \
1802     /usr/local/include        \
1803     /usr/unsupported/include  \
1804     /usr/athena/include       \
1805     /usr/local/x11r5/include  \
1806     /usr/lpp/Xamples/include  \
1807                               \
1808     /usr/openwin/include      \
1809     /usr/openwin/share/include \
1810     ; \
1811   do
1812     if test -r "$ac_dir/$x_direct_test_include"; then
1813       ac_x_includes=$ac_dir
1814       break
1815     fi
1816   done
1817 fi
1818 rm -f conftest*
1819 fi # $ac_x_includes = NO
1820
1821 if test "$ac_x_libraries" = NO; then
1822   # Check for the libraries.
1823
1824   test -z "$x_direct_test_library" && x_direct_test_library=Xt
1825   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1826
1827   # See if we find them without any special options.
1828   # Don't add to $LIBS permanently.
1829   ac_save_LIBS="$LIBS"
1830   LIBS="-l$x_direct_test_library $LIBS"
1831 cat > conftest.$ac_ext <<EOF
1832 #line 1833 "configure"
1833 #include "confdefs.h"
1834
1835 int main() {
1836 ${x_direct_test_function}()
1837 ; return 0; }
1838 EOF
1839 if { (eval echo configure:1840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1840   rm -rf conftest*
1841   LIBS="$ac_save_LIBS"
1842 # We can link X programs with no special library path.
1843 ac_x_libraries=
1844 else
1845   echo "configure: failed program was:" >&5
1846   cat conftest.$ac_ext >&5
1847   rm -rf conftest*
1848   LIBS="$ac_save_LIBS"
1849 # First see if replacing the include by lib works.
1850 # Check X11 before X11Rn because it is often a symlink to the current release.
1851 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1852     /usr/X11/lib          \
1853     /usr/X11R6/lib        \
1854     /usr/X11R5/lib        \
1855     /usr/X11R4/lib        \
1856                           \
1857     /usr/lib/X11          \
1858     /usr/lib/X11R6        \
1859     /usr/lib/X11R5        \
1860     /usr/lib/X11R4        \
1861                           \
1862     /usr/local/X11/lib    \
1863     /usr/local/X11R6/lib  \
1864     /usr/local/X11R5/lib  \
1865     /usr/local/X11R4/lib  \
1866                           \
1867     /usr/local/lib/X11    \
1868     /usr/local/lib/X11R6  \
1869     /usr/local/lib/X11R5  \
1870     /usr/local/lib/X11R4  \
1871                           \
1872     /usr/X386/lib         \
1873     /usr/x386/lib         \
1874     /usr/XFree86/lib/X11  \
1875                           \
1876     /usr/lib              \
1877     /usr/local/lib        \
1878     /usr/unsupported/lib  \
1879     /usr/athena/lib       \
1880     /usr/local/x11r5/lib  \
1881     /usr/lpp/Xamples/lib  \
1882     /lib/usr/lib/X11      \
1883                           \
1884     /usr/openwin/lib      \
1885     /usr/openwin/share/lib \
1886     ; \
1887 do
1888   for ac_extension in a so sl; do
1889     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1890       ac_x_libraries=$ac_dir
1891       break 2
1892     fi
1893   done
1894 done
1895 fi
1896 rm -f conftest*
1897 fi # $ac_x_libraries = NO
1898
1899 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1900   # Didn't find X anywhere.  Cache the known absence of X.
1901   ac_cv_have_x="have_x=no"
1902 else
1903   # Record where we found X for the cache.
1904   ac_cv_have_x="have_x=yes \
1905                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1906 fi
1907 fi
1908   fi
1909   eval "$ac_cv_have_x"
1910 fi # $with_x != no
1911
1912 if test "$have_x" != yes; then
1913   echo "$ac_t""$have_x" 1>&6
1914   no_x=yes
1915 else
1916   # If each of the values was on the command line, it overrides each guess.
1917   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1918   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1919   # Update the cache value to reflect the command line values.
1920   ac_cv_have_x="have_x=yes \
1921                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1922   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1923 fi
1924
1925 if test "$no_x" = yes; then
1926   # Not all programs may use this symbol, but it does not hurt to define it.
1927   cat >> confdefs.h <<\EOF
1928 #define X_DISPLAY_MISSING 1
1929 EOF
1930
1931   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
1932 else
1933   if test -n "$x_includes"; then
1934     X_CFLAGS="$X_CFLAGS -I$x_includes"
1935   fi
1936
1937   # It would also be nice to do this for all -L options, not just this one.
1938   if test -n "$x_libraries"; then
1939     X_LIBS="$X_LIBS -L$x_libraries"
1940     # For Solaris; some versions of Sun CC require a space after -R and
1941     # others require no space.  Words are not sufficient . . . .
1942     case "`(uname -sr) 2>/dev/null`" in
1943     "SunOS 5"*)
1944       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
1945 echo "configure:1946: checking whether -R must be followed by a space" >&5
1946       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
1947       cat > conftest.$ac_ext <<EOF
1948 #line 1949 "configure"
1949 #include "confdefs.h"
1950
1951 int main() {
1952
1953 ; return 0; }
1954 EOF
1955 if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1956   rm -rf conftest*
1957   ac_R_nospace=yes
1958 else
1959   echo "configure: failed program was:" >&5
1960   cat conftest.$ac_ext >&5
1961   rm -rf conftest*
1962   ac_R_nospace=no
1963 fi
1964 rm -f conftest*
1965       if test $ac_R_nospace = yes; then
1966         echo "$ac_t""no" 1>&6
1967         X_LIBS="$X_LIBS -R$x_libraries"
1968       else
1969         LIBS="$ac_xsave_LIBS -R $x_libraries"
1970         cat > conftest.$ac_ext <<EOF
1971 #line 1972 "configure"
1972 #include "confdefs.h"
1973
1974 int main() {
1975
1976 ; return 0; }
1977 EOF
1978 if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1979   rm -rf conftest*
1980   ac_R_space=yes
1981 else
1982   echo "configure: failed program was:" >&5
1983   cat conftest.$ac_ext >&5
1984   rm -rf conftest*
1985   ac_R_space=no
1986 fi
1987 rm -f conftest*
1988         if test $ac_R_space = yes; then
1989           echo "$ac_t""yes" 1>&6
1990           X_LIBS="$X_LIBS -R $x_libraries"
1991         else
1992           echo "$ac_t""neither works" 1>&6
1993         fi
1994       fi
1995       LIBS="$ac_xsave_LIBS"
1996     esac
1997   fi
1998
1999   # Check for system-dependent libraries X programs must link with.
2000   # Do this before checking for the system-independent R6 libraries
2001   # (-lICE), since we may need -lsocket or whatever for X linking.
2002
2003   if test "$ISC" = yes; then
2004     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2005   else
2006     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2007     # libraries were built with DECnet support.  And karl@cs.umb.edu says
2008     # the Alpha needs dnet_stub (dnet does not exist).
2009     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2010 echo "configure:2011: checking for dnet_ntoa in -ldnet" >&5
2011 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2012 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2013   echo $ac_n "(cached) $ac_c" 1>&6
2014 else
2015   ac_save_LIBS="$LIBS"
2016 LIBS="-ldnet  $LIBS"
2017 cat > conftest.$ac_ext <<EOF
2018 #line 2019 "configure"
2019 #include "confdefs.h"
2020 /* Override any gcc2 internal prototype to avoid an error.  */
2021 /* We use char because int might match the return type of a gcc2
2022     builtin and then its argument prototype would still apply.  */
2023 char dnet_ntoa();
2024
2025 int main() {
2026 dnet_ntoa()
2027 ; return 0; }
2028 EOF
2029 if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2030   rm -rf conftest*
2031   eval "ac_cv_lib_$ac_lib_var=yes"
2032 else
2033   echo "configure: failed program was:" >&5
2034   cat conftest.$ac_ext >&5
2035   rm -rf conftest*
2036   eval "ac_cv_lib_$ac_lib_var=no"
2037 fi
2038 rm -f conftest*
2039 LIBS="$ac_save_LIBS"
2040
2041 fi
2042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2043   echo "$ac_t""yes" 1>&6
2044   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2045 else
2046   echo "$ac_t""no" 1>&6
2047 fi
2048
2049     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2050       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2051 echo "configure:2052: checking for dnet_ntoa in -ldnet_stub" >&5
2052 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2053 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2054   echo $ac_n "(cached) $ac_c" 1>&6
2055 else
2056   ac_save_LIBS="$LIBS"
2057 LIBS="-ldnet_stub  $LIBS"
2058 cat > conftest.$ac_ext <<EOF
2059 #line 2060 "configure"
2060 #include "confdefs.h"
2061 /* Override any gcc2 internal prototype to avoid an error.  */
2062 /* We use char because int might match the return type of a gcc2
2063     builtin and then its argument prototype would still apply.  */
2064 char dnet_ntoa();
2065
2066 int main() {
2067 dnet_ntoa()
2068 ; return 0; }
2069 EOF
2070 if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2071   rm -rf conftest*
2072   eval "ac_cv_lib_$ac_lib_var=yes"
2073 else
2074   echo "configure: failed program was:" >&5
2075   cat conftest.$ac_ext >&5
2076   rm -rf conftest*
2077   eval "ac_cv_lib_$ac_lib_var=no"
2078 fi
2079 rm -f conftest*
2080 LIBS="$ac_save_LIBS"
2081
2082 fi
2083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2084   echo "$ac_t""yes" 1>&6
2085   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2086 else
2087   echo "$ac_t""no" 1>&6
2088 fi
2089
2090     fi
2091
2092     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2093     # to get the SysV transport functions.
2094     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2095     # needs -lnsl.
2096     # The nsl library prevents programs from opening the X display
2097     # on Irix 5.2, according to dickey@clark.net.
2098     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2099 echo "configure:2100: checking for gethostbyname" >&5
2100 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2101   echo $ac_n "(cached) $ac_c" 1>&6
2102 else
2103   cat > conftest.$ac_ext <<EOF
2104 #line 2105 "configure"
2105 #include "confdefs.h"
2106 /* System header to define __stub macros and hopefully few prototypes,
2107     which can conflict with char gethostbyname(); below.  */
2108 #include <assert.h>
2109 /* Override any gcc2 internal prototype to avoid an error.  */
2110 /* We use char because int might match the return type of a gcc2
2111     builtin and then its argument prototype would still apply.  */
2112 char gethostbyname();
2113
2114 int main() {
2115
2116 /* The GNU C library defines this for functions which it implements
2117     to always fail with ENOSYS.  Some functions are actually named
2118     something starting with __ and the normal name is an alias.  */
2119 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2120 choke me
2121 #else
2122 gethostbyname();
2123 #endif
2124
2125 ; return 0; }
2126 EOF
2127 if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2128   rm -rf conftest*
2129   eval "ac_cv_func_gethostbyname=yes"
2130 else
2131   echo "configure: failed program was:" >&5
2132   cat conftest.$ac_ext >&5
2133   rm -rf conftest*
2134   eval "ac_cv_func_gethostbyname=no"
2135 fi
2136 rm -f conftest*
2137 fi
2138
2139 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2140   echo "$ac_t""yes" 1>&6
2141   :
2142 else
2143   echo "$ac_t""no" 1>&6
2144 fi
2145
2146     if test $ac_cv_func_gethostbyname = no; then
2147       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2148 echo "configure:2149: checking for gethostbyname in -lnsl" >&5
2149 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2150 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2151   echo $ac_n "(cached) $ac_c" 1>&6
2152 else
2153   ac_save_LIBS="$LIBS"
2154 LIBS="-lnsl  $LIBS"
2155 cat > conftest.$ac_ext <<EOF
2156 #line 2157 "configure"
2157 #include "confdefs.h"
2158 /* Override any gcc2 internal prototype to avoid an error.  */
2159 /* We use char because int might match the return type of a gcc2
2160     builtin and then its argument prototype would still apply.  */
2161 char gethostbyname();
2162
2163 int main() {
2164 gethostbyname()
2165 ; return 0; }
2166 EOF
2167 if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2168   rm -rf conftest*
2169   eval "ac_cv_lib_$ac_lib_var=yes"
2170 else
2171   echo "configure: failed program was:" >&5
2172   cat conftest.$ac_ext >&5
2173   rm -rf conftest*
2174   eval "ac_cv_lib_$ac_lib_var=no"
2175 fi
2176 rm -f conftest*
2177 LIBS="$ac_save_LIBS"
2178
2179 fi
2180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2181   echo "$ac_t""yes" 1>&6
2182   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2183 else
2184   echo "$ac_t""no" 1>&6
2185 fi
2186
2187     fi
2188
2189     # lieder@skyler.mavd.honeywell.com says without -lsocket,
2190     # socket/setsockopt and other routines are undefined under SCO ODT
2191     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
2192     # on later versions), says simon@lia.di.epfl.ch: it contains
2193     # gethostby* variants that don't use the nameserver (or something).
2194     # -lsocket must be given before -lnsl if both are needed.
2195     # We assume that if connect needs -lnsl, so does gethostbyname.
2196     echo $ac_n "checking for connect""... $ac_c" 1>&6
2197 echo "configure:2198: checking for connect" >&5
2198 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2199   echo $ac_n "(cached) $ac_c" 1>&6
2200 else
2201   cat > conftest.$ac_ext <<EOF
2202 #line 2203 "configure"
2203 #include "confdefs.h"
2204 /* System header to define __stub macros and hopefully few prototypes,
2205     which can conflict with char connect(); below.  */
2206 #include <assert.h>
2207 /* Override any gcc2 internal prototype to avoid an error.  */
2208 /* We use char because int might match the return type of a gcc2
2209     builtin and then its argument prototype would still apply.  */
2210 char connect();
2211
2212 int main() {
2213
2214 /* The GNU C library defines this for functions which it implements
2215     to always fail with ENOSYS.  Some functions are actually named
2216     something starting with __ and the normal name is an alias.  */
2217 #if defined (__stub_connect) || defined (__stub___connect)
2218 choke me
2219 #else
2220 connect();
2221 #endif
2222
2223 ; return 0; }
2224 EOF
2225 if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2226   rm -rf conftest*
2227   eval "ac_cv_func_connect=yes"
2228 else
2229   echo "configure: failed program was:" >&5
2230   cat conftest.$ac_ext >&5
2231   rm -rf conftest*
2232   eval "ac_cv_func_connect=no"
2233 fi
2234 rm -f conftest*
2235 fi
2236
2237 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2238   echo "$ac_t""yes" 1>&6
2239   :
2240 else
2241   echo "$ac_t""no" 1>&6
2242 fi
2243
2244     if test $ac_cv_func_connect = no; then
2245       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2246 echo "configure:2247: checking for connect in -lsocket" >&5
2247 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2248 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2249   echo $ac_n "(cached) $ac_c" 1>&6
2250 else
2251   ac_save_LIBS="$LIBS"
2252 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2253 cat > conftest.$ac_ext <<EOF
2254 #line 2255 "configure"
2255 #include "confdefs.h"
2256 /* Override any gcc2 internal prototype to avoid an error.  */
2257 /* We use char because int might match the return type of a gcc2
2258     builtin and then its argument prototype would still apply.  */
2259 char connect();
2260
2261 int main() {
2262 connect()
2263 ; return 0; }
2264 EOF
2265 if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2266   rm -rf conftest*
2267   eval "ac_cv_lib_$ac_lib_var=yes"
2268 else
2269   echo "configure: failed program was:" >&5
2270   cat conftest.$ac_ext >&5
2271   rm -rf conftest*
2272   eval "ac_cv_lib_$ac_lib_var=no"
2273 fi
2274 rm -f conftest*
2275 LIBS="$ac_save_LIBS"
2276
2277 fi
2278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2279   echo "$ac_t""yes" 1>&6
2280   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2281 else
2282   echo "$ac_t""no" 1>&6
2283 fi
2284
2285     fi
2286
2287     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2288     echo $ac_n "checking for remove""... $ac_c" 1>&6
2289 echo "configure:2290: checking for remove" >&5
2290 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2291   echo $ac_n "(cached) $ac_c" 1>&6
2292 else
2293   cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2296 /* System header to define __stub macros and hopefully few prototypes,
2297     which can conflict with char remove(); below.  */
2298 #include <assert.h>
2299 /* Override any gcc2 internal prototype to avoid an error.  */
2300 /* We use char because int might match the return type of a gcc2
2301     builtin and then its argument prototype would still apply.  */
2302 char remove();
2303
2304 int main() {
2305
2306 /* The GNU C library defines this for functions which it implements
2307     to always fail with ENOSYS.  Some functions are actually named
2308     something starting with __ and the normal name is an alias.  */
2309 #if defined (__stub_remove) || defined (__stub___remove)
2310 choke me
2311 #else
2312 remove();
2313 #endif
2314
2315 ; return 0; }
2316 EOF
2317 if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2318   rm -rf conftest*
2319   eval "ac_cv_func_remove=yes"
2320 else
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   eval "ac_cv_func_remove=no"
2325 fi
2326 rm -f conftest*
2327 fi
2328
2329 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2330   echo "$ac_t""yes" 1>&6
2331   :
2332 else
2333   echo "$ac_t""no" 1>&6
2334 fi
2335
2336     if test $ac_cv_func_remove = no; then
2337       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2338 echo "configure:2339: checking for remove in -lposix" >&5
2339 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2340 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2341   echo $ac_n "(cached) $ac_c" 1>&6
2342 else
2343   ac_save_LIBS="$LIBS"
2344 LIBS="-lposix  $LIBS"
2345 cat > conftest.$ac_ext <<EOF
2346 #line 2347 "configure"
2347 #include "confdefs.h"
2348 /* Override any gcc2 internal prototype to avoid an error.  */
2349 /* We use char because int might match the return type of a gcc2
2350     builtin and then its argument prototype would still apply.  */
2351 char remove();
2352
2353 int main() {
2354 remove()
2355 ; return 0; }
2356 EOF
2357 if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2358   rm -rf conftest*
2359   eval "ac_cv_lib_$ac_lib_var=yes"
2360 else
2361   echo "configure: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -rf conftest*
2364   eval "ac_cv_lib_$ac_lib_var=no"
2365 fi
2366 rm -f conftest*
2367 LIBS="$ac_save_LIBS"
2368
2369 fi
2370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2371   echo "$ac_t""yes" 1>&6
2372   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2373 else
2374   echo "$ac_t""no" 1>&6
2375 fi
2376
2377     fi
2378
2379     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2380     echo $ac_n "checking for shmat""... $ac_c" 1>&6
2381 echo "configure:2382: checking for shmat" >&5
2382 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2383   echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385   cat > conftest.$ac_ext <<EOF
2386 #line 2387 "configure"
2387 #include "confdefs.h"
2388 /* System header to define __stub macros and hopefully few prototypes,
2389     which can conflict with char shmat(); below.  */
2390 #include <assert.h>
2391 /* Override any gcc2 internal prototype to avoid an error.  */
2392 /* We use char because int might match the return type of a gcc2
2393     builtin and then its argument prototype would still apply.  */
2394 char shmat();
2395
2396 int main() {
2397
2398 /* The GNU C library defines this for functions which it implements
2399     to always fail with ENOSYS.  Some functions are actually named
2400     something starting with __ and the normal name is an alias.  */
2401 #if defined (__stub_shmat) || defined (__stub___shmat)
2402 choke me
2403 #else
2404 shmat();
2405 #endif
2406
2407 ; return 0; }
2408 EOF
2409 if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2410   rm -rf conftest*
2411   eval "ac_cv_func_shmat=yes"
2412 else
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   rm -rf conftest*
2416   eval "ac_cv_func_shmat=no"
2417 fi
2418 rm -f conftest*
2419 fi
2420
2421 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2422   echo "$ac_t""yes" 1>&6
2423   :
2424 else
2425   echo "$ac_t""no" 1>&6
2426 fi
2427
2428     if test $ac_cv_func_shmat = no; then
2429       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2430 echo "configure:2431: checking for shmat in -lipc" >&5
2431 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2432 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2433   echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435   ac_save_LIBS="$LIBS"
2436 LIBS="-lipc  $LIBS"
2437 cat > conftest.$ac_ext <<EOF
2438 #line 2439 "configure"
2439 #include "confdefs.h"
2440 /* Override any gcc2 internal prototype to avoid an error.  */
2441 /* We use char because int might match the return type of a gcc2
2442     builtin and then its argument prototype would still apply.  */
2443 char shmat();
2444
2445 int main() {
2446 shmat()
2447 ; return 0; }
2448 EOF
2449 if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2450   rm -rf conftest*
2451   eval "ac_cv_lib_$ac_lib_var=yes"
2452 else
2453   echo "configure: failed program was:" >&5
2454   cat conftest.$ac_ext >&5
2455   rm -rf conftest*
2456   eval "ac_cv_lib_$ac_lib_var=no"
2457 fi
2458 rm -f conftest*
2459 LIBS="$ac_save_LIBS"
2460
2461 fi
2462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2463   echo "$ac_t""yes" 1>&6
2464   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2465 else
2466   echo "$ac_t""no" 1>&6
2467 fi
2468
2469     fi
2470   fi
2471
2472   # Check for libraries that X11R6 Xt/Xaw programs need.
2473   ac_save_LDFLAGS="$LDFLAGS"
2474   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2475   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2476   # check for ICE first), but we must link in the order -lSM -lICE or
2477   # we get undefined symbols.  So assume we have SM if we have ICE.
2478   # These have to be linked with before -lX11, unlike the other
2479   # libraries we check for below, so use a different variable.
2480   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2481   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2482 echo "configure:2483: checking for IceConnectionNumber in -lICE" >&5
2483 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2484 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2485   echo $ac_n "(cached) $ac_c" 1>&6
2486 else
2487   ac_save_LIBS="$LIBS"
2488 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
2489 cat > conftest.$ac_ext <<EOF
2490 #line 2491 "configure"
2491 #include "confdefs.h"
2492 /* Override any gcc2 internal prototype to avoid an error.  */
2493 /* We use char because int might match the return type of a gcc2
2494     builtin and then its argument prototype would still apply.  */
2495 char IceConnectionNumber();
2496
2497 int main() {
2498 IceConnectionNumber()
2499 ; return 0; }
2500 EOF
2501 if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2502   rm -rf conftest*
2503   eval "ac_cv_lib_$ac_lib_var=yes"
2504 else
2505   echo "configure: failed program was:" >&5
2506   cat conftest.$ac_ext >&5
2507   rm -rf conftest*
2508   eval "ac_cv_lib_$ac_lib_var=no"
2509 fi
2510 rm -f conftest*
2511 LIBS="$ac_save_LIBS"
2512
2513 fi
2514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2515   echo "$ac_t""yes" 1>&6
2516   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2517 else
2518   echo "$ac_t""no" 1>&6
2519 fi
2520
2521   LDFLAGS="$ac_save_LDFLAGS"
2522
2523 fi
2524
2525
2526 XML_CFLAGS=`$XML_CONFIG --cflags`
2527 XML_LFLAGS=`$XML_CONFIG --libs`
2528
2529 LIBS="$LIBS $X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
2530 LIBS="$LIBS -L/usr/local/lib $XML_LFLAGS"
2531 CFLAGS="$CFLAGS $X_CFLAGS $XML_CFLAGS "
2532 CXXFLAGS="$CXXFLAGS  -Wno-deprecated $X_CFLAGS $XML_CFLAGS"
2533
2534 echo $ac_n "checking for main in -lAXE""... $ac_c" 1>&6
2535 echo "configure:2536: checking for main in -lAXE" >&5
2536 ac_lib_var=`echo AXE'_'main | sed 'y%./+-%__p_%'`
2537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2538   echo $ac_n "(cached) $ac_c" 1>&6
2539 else
2540   ac_save_LIBS="$LIBS"
2541 LIBS="-lAXE  $LIBS"
2542 cat > conftest.$ac_ext <<EOF
2543 #line 2544 "configure"
2544 #include "confdefs.h"
2545
2546 int main() {
2547 main()
2548 ; return 0; }
2549 EOF
2550 if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2551   rm -rf conftest*
2552   eval "ac_cv_lib_$ac_lib_var=yes"
2553 else
2554   echo "configure: failed program was:" >&5
2555   cat conftest.$ac_ext >&5
2556   rm -rf conftest*
2557   eval "ac_cv_lib_$ac_lib_var=no"
2558 fi
2559 rm -f conftest*
2560 LIBS="$ac_save_LIBS"
2561
2562 fi
2563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2564   echo "$ac_t""yes" 1>&6
2565     ac_tr_lib=HAVE_LIB`echo AXE | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2566     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2567   cat >> confdefs.h <<EOF
2568 #define $ac_tr_lib 1
2569 EOF
2570
2571   LIBS="-lAXE $LIBS"
2572
2573 else
2574   echo "$ac_t""no" 1>&6
2575 { echo "configure: error: AXE Library is not installed" 1>&2; exit 1; }
2576 fi
2577
2578 #AC_CHECK_LIB(X11, XOpenDisplay)
2579 #AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData)
2580 #AC_CHECK_LIB(pthread, pthread_create)
2581 echo $ac_n "checking for xmlParseFile in -lxml2""... $ac_c" 1>&6
2582 echo "configure:2583: checking for xmlParseFile in -lxml2" >&5
2583 ac_lib_var=`echo xml2'_'xmlParseFile | sed 'y%./+-%__p_%'`
2584 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2585   echo $ac_n "(cached) $ac_c" 1>&6
2586 else
2587   ac_save_LIBS="$LIBS"
2588 LIBS="-lxml2  $LIBS"
2589 cat > conftest.$ac_ext <<EOF
2590 #line 2591 "configure"
2591 #include "confdefs.h"
2592 /* Override any gcc2 internal prototype to avoid an error.  */
2593 /* We use char because int might match the return type of a gcc2
2594     builtin and then its argument prototype would still apply.  */
2595 char xmlParseFile();
2596
2597 int main() {
2598 xmlParseFile()
2599 ; return 0; }
2600 EOF
2601 if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2602   rm -rf conftest*
2603   eval "ac_cv_lib_$ac_lib_var=yes"
2604 else
2605   echo "configure: failed program was:" >&5
2606   cat conftest.$ac_ext >&5
2607   rm -rf conftest*
2608   eval "ac_cv_lib_$ac_lib_var=no"
2609 fi
2610 rm -f conftest*
2611 LIBS="$ac_save_LIBS"
2612
2613 fi
2614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2615   echo "$ac_t""yes" 1>&6
2616     ac_tr_lib=HAVE_LIB`echo xml2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2617     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2618   cat >> confdefs.h <<EOF
2619 #define $ac_tr_lib 1
2620 EOF
2621
2622   LIBS="-lxml2 $LIBS"
2623
2624 else
2625   echo "$ac_t""no" 1>&6
2626 fi
2627
2628
2629 # Where are the postgres includes...
2630 postgres_include_default=
2631 for usual_suspect in \
2632         /usr/local/include/postgresql \
2633         /usr/local/include/pgsql \
2634         /usr/local/pgsql/include \
2635         /usr/local/include \
2636         /usr/include/postgresql \
2637         /usr/include/pgsql \
2638         /usr/include \
2639         /opt/postgresql/include \
2640         /opt/pgsql/include \
2641         /usr/freeware/include \
2642 ; do
2643
2644 ac_safe=`echo "$usual_suspect/libpq-fe.h" | sed 'y%./+-%__p_%'`
2645 echo $ac_n "checking for $usual_suspect/libpq-fe.h""... $ac_c" 1>&6
2646 echo "configure:2647: checking for $usual_suspect/libpq-fe.h" >&5
2647 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
2648   echo $ac_n "(cached) $ac_c" 1>&6
2649 else
2650   if test "$cross_compiling" = yes; then
2651     { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
2652 else
2653   if test -r $usual_suspect/libpq-fe.h; then
2654     eval "ac_cv_file_$ac_safe=yes"
2655   else
2656     eval "ac_cv_file_$ac_safe=no"
2657   fi
2658 fi
2659 fi
2660 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
2661   echo "$ac_t""yes" 1>&6
2662   postgres_include_default=$usual_suspect
2663 else
2664   echo "$ac_t""no" 1>&6
2665
2666 fi
2667
2668         if test -n "$postgres_include_default" ; then
2669                 break
2670         fi
2671 done
2672
2673 # Check whether --with-postgres-include or --without-postgres-include was given.
2674 if test "${with_postgres_include+set}" = set; then
2675   withval="$with_postgres_include"
2676   test "$withval" = no || with_postgres_include=$withval
2677         
2678 else
2679   with_postgres_include=$postgres_include_default
2680
2681 fi
2682
2683
2684 # ..and libraries?
2685 postgres_lib_default=
2686 for usual_suspect in \
2687         /usr/local/lib/postgresql \
2688         /usr/local/lib/pgsql \
2689         /usr/local/pgsql/lib \
2690         /usr/local/lib \
2691         /usr/lib/postgresql \
2692         /usr/lib/pgsql \
2693         /usr/lib \
2694         /opt/postgresql/lib \
2695         /opt/pgsql/lib \
2696         /usr/freeware/lib32 \
2697 ; do
2698         for library_extension in so a sa ; do
2699
2700 ac_safe=`echo "$usual_suspect/libpq.$library_extension" | sed 'y%./+-%__p_%'`
2701 echo $ac_n "checking for $usual_suspect/libpq.$library_extension""... $ac_c" 1>&6
2702 echo "configure:2703: checking for $usual_suspect/libpq.$library_extension" >&5
2703 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
2704   echo $ac_n "(cached) $ac_c" 1>&6
2705 else
2706   if test "$cross_compiling" = yes; then
2707     { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
2708 else
2709   if test -r $usual_suspect/libpq.$library_extension; then
2710     eval "ac_cv_file_$ac_safe=yes"
2711   else
2712     eval "ac_cv_file_$ac_safe=no"
2713   fi
2714 fi
2715 fi
2716 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
2717   echo "$ac_t""yes" 1>&6
2718   postgres_lib_default=$usual_suspect
2719 else
2720   echo "$ac_t""no" 1>&6
2721
2722 fi
2723
2724         done
2725         if test -n "$postgres_lib_default" ; then
2726                 break
2727         fi
2728 done
2729
2730 # Check whether --with-postgres-lib or --without-postgres-lib was given.
2731 if test "${with_postgres_lib+set}" = set; then
2732   withval="$with_postgres_lib"
2733   test "$withval" = no || with_postgres_lib=$withval
2734         
2735 else
2736   with_postgres_lib=$postgres_lib_default
2737
2738 fi
2739
2740
2741 # provide one way to specify both include and lib
2742 # Check whether --with-postgres or --without-postgres was given.
2743 if test "${with_postgres+set}" = set; then
2744   withval="$with_postgres"
2745   test "$withval" = no || with_postgres=$withval
2746                 with_postgres_lib=${with_postgres}/lib
2747                 with_postgres_include=${with_postgres}/include
2748         
2749 else
2750   with_postgres=no
2751
2752 fi
2753
2754
2755
2756
2757 POSTGRES_LIB="-L${with_postgres_lib} -R${with_postgres_lib} -lpq"
2758
2759 POSTGRES_INCLUDE="-I${with_postgres_include}"
2760
2761
2762 # Checks for libraries.
2763 echo $ac_n "checking for PQexec in -lpq""... $ac_c" 1>&6
2764 echo "configure:2765: checking for PQexec in -lpq" >&5
2765 ac_lib_var=`echo pq'_'PQexec | sed 'y%./+-%__p_%'`
2766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2767   echo $ac_n "(cached) $ac_c" 1>&6
2768 else
2769   ac_save_LIBS="$LIBS"
2770 LIBS="-lpq -L${with_postgres_lib} $LIBS"
2771 cat > conftest.$ac_ext <<EOF
2772 #line 2773 "configure"
2773 #include "confdefs.h"
2774 /* Override any gcc2 internal prototype to avoid an error.  */
2775 /* We use char because int might match the return type of a gcc2
2776     builtin and then its argument prototype would still apply.  */
2777 char PQexec();
2778
2779 int main() {
2780 PQexec()
2781 ; return 0; }
2782 EOF
2783 if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2784   rm -rf conftest*
2785   eval "ac_cv_lib_$ac_lib_var=yes"
2786 else
2787   echo "configure: failed program was:" >&5
2788   cat conftest.$ac_ext >&5
2789   rm -rf conftest*
2790   eval "ac_cv_lib_$ac_lib_var=no"
2791 fi
2792 rm -f conftest*
2793 LIBS="$ac_save_LIBS"
2794
2795 fi
2796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2797   echo "$ac_t""yes" 1>&6
2798     ac_tr_lib=HAVE_LIB`echo pq | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2799     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2800   cat >> confdefs.h <<EOF
2801 #define $ac_tr_lib 1
2802 EOF
2803
2804   LIBS="-lpq $LIBS"
2805
2806 else
2807   echo "$ac_t""no" 1>&6
2808 { echo "configure: error: Failed to find a suitable libpq.
2809
2810 PostgreSQL's libpq needs to be installed.
2811 Perhaps you need to specify --with-postgres-lib?
2812 " 1>&2; exit 1; }
2813 fi
2814
2815
2816 # Checks for header files.
2817 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2818 echo "configure:2819: checking for ANSI C header files" >&5
2819 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2820   echo $ac_n "(cached) $ac_c" 1>&6
2821 else
2822   cat > conftest.$ac_ext <<EOF
2823 #line 2824 "configure"
2824 #include "confdefs.h"
2825 #include <stdlib.h>
2826 #include <stdarg.h>
2827 #include <string.h>
2828 #include <float.h>
2829 EOF
2830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2831 { (eval echo configure:2832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2833 if test -z "$ac_err"; then
2834   rm -rf conftest*
2835   ac_cv_header_stdc=yes
2836 else
2837   echo "$ac_err" >&5
2838   echo "configure: failed program was:" >&5
2839   cat conftest.$ac_ext >&5
2840   rm -rf conftest*
2841   ac_cv_header_stdc=no
2842 fi
2843 rm -f conftest*
2844
2845 if test $ac_cv_header_stdc = yes; then
2846   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2847 cat > conftest.$ac_ext <<EOF
2848 #line 2849 "configure"
2849 #include "confdefs.h"
2850 #include <string.h>
2851 EOF
2852 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2853   egrep "memchr" >/dev/null 2>&1; then
2854   :
2855 else
2856   rm -rf conftest*
2857   ac_cv_header_stdc=no
2858 fi
2859 rm -f conftest*
2860
2861 fi
2862
2863 if test $ac_cv_header_stdc = yes; then
2864   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2865 cat > conftest.$ac_ext <<EOF
2866 #line 2867 "configure"
2867 #include "confdefs.h"
2868 #include <stdlib.h>
2869 EOF
2870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2871   egrep "free" >/dev/null 2>&1; then
2872   :
2873 else
2874   rm -rf conftest*
2875   ac_cv_header_stdc=no
2876 fi
2877 rm -f conftest*
2878
2879 fi
2880
2881 if test $ac_cv_header_stdc = yes; then
2882   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2883 if test "$cross_compiling" = yes; then
2884   :
2885 else
2886   cat > conftest.$ac_ext <<EOF
2887 #line 2888 "configure"
2888 #include "confdefs.h"
2889 #include <ctype.h>
2890 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2891 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2892 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2893 int main () { int i; for (i = 0; i < 256; i++)
2894 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2895 exit (0); }
2896
2897 EOF
2898 if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2899 then
2900   :
2901 else
2902   echo "configure: failed program was:" >&5
2903   cat conftest.$ac_ext >&5
2904   rm -fr conftest*
2905   ac_cv_header_stdc=no
2906 fi
2907 rm -fr conftest*
2908 fi
2909
2910 fi
2911 fi
2912
2913 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2914 if test $ac_cv_header_stdc = yes; then
2915   cat >> confdefs.h <<\EOF
2916 #define STDC_HEADERS 1
2917 EOF
2918
2919 fi
2920
2921 ac_safe=`echo "${with_postgres_include}/libpq-fe.h" | sed 'y%./+-%__p_%'`
2922 echo $ac_n "checking for ${with_postgres_include}/libpq-fe.h""... $ac_c" 1>&6
2923 echo "configure:2924: checking for ${with_postgres_include}/libpq-fe.h" >&5
2924 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2925   echo $ac_n "(cached) $ac_c" 1>&6
2926 else
2927   cat > conftest.$ac_ext <<EOF
2928 #line 2929 "configure"
2929 #include "confdefs.h"
2930 #include <${with_postgres_include}/libpq-fe.h>
2931 EOF
2932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2933 { (eval echo configure:2934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2935 if test -z "$ac_err"; then
2936   rm -rf conftest*
2937   eval "ac_cv_header_$ac_safe=yes"
2938 else
2939   echo "$ac_err" >&5
2940   echo "configure: failed program was:" >&5
2941   cat conftest.$ac_ext >&5
2942   rm -rf conftest*
2943   eval "ac_cv_header_$ac_safe=no"
2944 fi
2945 rm -f conftest*
2946 fi
2947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2948   echo "$ac_t""yes" 1>&6
2949   :
2950 else
2951   echo "$ac_t""no" 1>&6
2952 { echo "configure: error: Can't find libpq-fe.h in ${with_postgres_include}.
2953 Please specify the location of the PostgreSQL include files with
2954 --with-postgres-include=... or --with-postgres=...
2955 " 1>&2; exit 1; }
2956 fi
2957
2958
2959 ac_safe=`echo "${with_postgres_include}/libpq/libpq-fs.h" | sed 'y%./+-%__p_%'`
2960 echo $ac_n "checking for ${with_postgres_include}/libpq/libpq-fs.h""... $ac_c" 1>&6
2961 echo "configure:2962: checking for ${with_postgres_include}/libpq/libpq-fs.h" >&5
2962 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2963   echo $ac_n "(cached) $ac_c" 1>&6
2964 else
2965   cat > conftest.$ac_ext <<EOF
2966 #line 2967 "configure"
2967 #include "confdefs.h"
2968 #include <${with_postgres_include}/libpq/libpq-fs.h>
2969 EOF
2970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2971 { (eval echo configure:2972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2973 if test -z "$ac_err"; then
2974   rm -rf conftest*
2975   eval "ac_cv_header_$ac_safe=yes"
2976 else
2977   echo "$ac_err" >&5
2978   echo "configure: failed program was:" >&5
2979   cat conftest.$ac_ext >&5
2980   rm -rf conftest*
2981   eval "ac_cv_header_$ac_safe=no"
2982 fi
2983 rm -f conftest*
2984 fi
2985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2986   echo "$ac_t""yes" 1>&6
2987   :
2988 else
2989   echo "$ac_t""no" 1>&6
2990 { echo "configure: error: Can't find libpq-fs.h in ${with_postgres_include}/libpq.
2991 Please locate it and report your findings so this script can be corrected.
2992 " 1>&2; exit 1; }
2993 fi
2994
2995
2996 CXXFLAGS="$CXXFLAGS $POSTGRES_INCLUDE"
2997 LIBS="$LIBS $POSTGRES_LIB"
2998
2999 #
3000 #  There is no convenient way to detect libpqxx, so we'll
3001 #  use fixed paths for the time being.
3002
3003 CXXFLAGS="$CXXFLAGS -I/usr/local/pqxx/include"
3004 LIBS="$LIBS -L/usr/local/pqxx/lib -lpqxx"
3005
3006 ac_header_dirent=no
3007 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3008 do
3009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3010 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3011 echo "configure:3012: checking for $ac_hdr that defines DIR" >&5
3012 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3013   echo $ac_n "(cached) $ac_c" 1>&6
3014 else
3015   cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018 #include <sys/types.h>
3019 #include <$ac_hdr>
3020 int main() {
3021 DIR *dirp = 0;
3022 ; return 0; }
3023 EOF
3024 if { (eval echo configure:3025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3025   rm -rf conftest*
3026   eval "ac_cv_header_dirent_$ac_safe=yes"
3027 else
3028   echo "configure: failed program was:" >&5
3029   cat conftest.$ac_ext >&5
3030   rm -rf conftest*
3031   eval "ac_cv_header_dirent_$ac_safe=no"
3032 fi
3033 rm -f conftest*
3034 fi
3035 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3036   echo "$ac_t""yes" 1>&6
3037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3038   cat >> confdefs.h <<EOF
3039 #define $ac_tr_hdr 1
3040 EOF
3041  ac_header_dirent=$ac_hdr; break
3042 else
3043   echo "$ac_t""no" 1>&6
3044 fi
3045 done
3046 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3047 if test $ac_header_dirent = dirent.h; then
3048 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3049 echo "configure:3050: checking for opendir in -ldir" >&5
3050 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3052   echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054   ac_save_LIBS="$LIBS"
3055 LIBS="-ldir  $LIBS"
3056 cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059 /* Override any gcc2 internal prototype to avoid an error.  */
3060 /* We use char because int might match the return type of a gcc2
3061     builtin and then its argument prototype would still apply.  */
3062 char opendir();
3063
3064 int main() {
3065 opendir()
3066 ; return 0; }
3067 EOF
3068 if { (eval echo configure:3069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3069   rm -rf conftest*
3070   eval "ac_cv_lib_$ac_lib_var=yes"
3071 else
3072   echo "configure: failed program was:" >&5
3073   cat conftest.$ac_ext >&5
3074   rm -rf conftest*
3075   eval "ac_cv_lib_$ac_lib_var=no"
3076 fi
3077 rm -f conftest*
3078 LIBS="$ac_save_LIBS"
3079
3080 fi
3081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3082   echo "$ac_t""yes" 1>&6
3083   LIBS="$LIBS -ldir"
3084 else
3085   echo "$ac_t""no" 1>&6
3086 fi
3087
3088 else
3089 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3090 echo "configure:3091: checking for opendir in -lx" >&5
3091 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3093   echo $ac_n "(cached) $ac_c" 1>&6
3094 else
3095   ac_save_LIBS="$LIBS"
3096 LIBS="-lx  $LIBS"
3097 cat > conftest.$ac_ext <<EOF
3098 #line 3099 "configure"
3099 #include "confdefs.h"
3100 /* Override any gcc2 internal prototype to avoid an error.  */
3101 /* We use char because int might match the return type of a gcc2
3102     builtin and then its argument prototype would still apply.  */
3103 char opendir();
3104
3105 int main() {
3106 opendir()
3107 ; return 0; }
3108 EOF
3109 if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3110   rm -rf conftest*
3111   eval "ac_cv_lib_$ac_lib_var=yes"
3112 else
3113   echo "configure: failed program was:" >&5
3114   cat conftest.$ac_ext >&5
3115   rm -rf conftest*
3116   eval "ac_cv_lib_$ac_lib_var=no"
3117 fi
3118 rm -f conftest*
3119 LIBS="$ac_save_LIBS"
3120
3121 fi
3122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3123   echo "$ac_t""yes" 1>&6
3124   LIBS="$LIBS -lx"
3125 else
3126   echo "$ac_t""no" 1>&6
3127 fi
3128
3129 fi
3130
3131 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3132 echo "configure:3133: checking for ANSI C header files" >&5
3133 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139 #include <stdlib.h>
3140 #include <stdarg.h>
3141 #include <string.h>
3142 #include <float.h>
3143 EOF
3144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3145 { (eval echo configure:3146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3147 if test -z "$ac_err"; then
3148   rm -rf conftest*
3149   ac_cv_header_stdc=yes
3150 else
3151   echo "$ac_err" >&5
3152   echo "configure: failed program was:" >&5
3153   cat conftest.$ac_ext >&5
3154   rm -rf conftest*
3155   ac_cv_header_stdc=no
3156 fi
3157 rm -f conftest*
3158
3159 if test $ac_cv_header_stdc = yes; then
3160   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3161 cat > conftest.$ac_ext <<EOF
3162 #line 3163 "configure"
3163 #include "confdefs.h"
3164 #include <string.h>
3165 EOF
3166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3167   egrep "memchr" >/dev/null 2>&1; then
3168   :
3169 else
3170   rm -rf conftest*
3171   ac_cv_header_stdc=no
3172 fi
3173 rm -f conftest*
3174
3175 fi
3176
3177 if test $ac_cv_header_stdc = yes; then
3178   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3179 cat > conftest.$ac_ext <<EOF
3180 #line 3181 "configure"
3181 #include "confdefs.h"
3182 #include <stdlib.h>
3183 EOF
3184 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3185   egrep "free" >/dev/null 2>&1; then
3186   :
3187 else
3188   rm -rf conftest*
3189   ac_cv_header_stdc=no
3190 fi
3191 rm -f conftest*
3192
3193 fi
3194
3195 if test $ac_cv_header_stdc = yes; then
3196   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3197 if test "$cross_compiling" = yes; then
3198   :
3199 else
3200   cat > conftest.$ac_ext <<EOF
3201 #line 3202 "configure"
3202 #include "confdefs.h"
3203 #include <ctype.h>
3204 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3205 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3206 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3207 int main () { int i; for (i = 0; i < 256; i++)
3208 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3209 exit (0); }
3210
3211 EOF
3212 if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3213 then
3214   :
3215 else
3216   echo "configure: failed program was:" >&5
3217   cat conftest.$ac_ext >&5
3218   rm -fr conftest*
3219   ac_cv_header_stdc=no
3220 fi
3221 rm -fr conftest*
3222 fi
3223
3224 fi
3225 fi
3226
3227 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3228 if test $ac_cv_header_stdc = yes; then
3229   cat >> confdefs.h <<\EOF
3230 #define STDC_HEADERS 1
3231 EOF
3232
3233 fi
3234
3235 for ac_hdr in unistd.h
3236 do
3237 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3238 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3239 echo "configure:3240: checking for $ac_hdr" >&5
3240 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3241   echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243   cat > conftest.$ac_ext <<EOF
3244 #line 3245 "configure"
3245 #include "confdefs.h"
3246 #include <$ac_hdr>
3247 EOF
3248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3249 { (eval echo configure:3250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3251 if test -z "$ac_err"; then
3252   rm -rf conftest*
3253   eval "ac_cv_header_$ac_safe=yes"
3254 else
3255   echo "$ac_err" >&5
3256   echo "configure: failed program was:" >&5
3257   cat conftest.$ac_ext >&5
3258   rm -rf conftest*
3259   eval "ac_cv_header_$ac_safe=no"
3260 fi
3261 rm -f conftest*
3262 fi
3263 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3264   echo "$ac_t""yes" 1>&6
3265     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3266   cat >> confdefs.h <<EOF
3267 #define $ac_tr_hdr 1
3268 EOF
3269  
3270 else
3271   echo "$ac_t""no" 1>&6
3272 fi
3273 done
3274
3275
3276 echo $ac_n "checking for working const""... $ac_c" 1>&6
3277 echo "configure:3278: checking for working const" >&5
3278 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3279   echo $ac_n "(cached) $ac_c" 1>&6
3280 else
3281   cat > conftest.$ac_ext <<EOF
3282 #line 3283 "configure"
3283 #include "confdefs.h"
3284
3285 int main() {
3286
3287 /* Ultrix mips cc rejects this.  */
3288 typedef int charset[2]; const charset x;
3289 /* SunOS 4.1.1 cc rejects this.  */
3290 char const *const *ccp;
3291 char **p;
3292 /* NEC SVR4.0.2 mips cc rejects this.  */
3293 struct point {int x, y;};
3294 static struct point const zero = {0,0};
3295 /* AIX XL C 1.02.0.0 rejects this.
3296    It does not let you subtract one const X* pointer from another in an arm
3297    of an if-expression whose if-part is not a constant expression */
3298 const char *g = "string";
3299 ccp = &g + (g ? g-g : 0);
3300 /* HPUX 7.0 cc rejects these. */
3301 ++ccp;
3302 p = (char**) ccp;
3303 ccp = (char const *const *) p;
3304 { /* SCO 3.2v4 cc rejects this.  */
3305   char *t;
3306   char const *s = 0 ? (char *) 0 : (char const *) 0;
3307
3308   *t++ = 0;
3309 }
3310 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3311   int x[] = {25, 17};
3312   const int *foo = &x[0];
3313   ++foo;
3314 }
3315 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3316   typedef const int *iptr;
3317   iptr p = 0;
3318   ++p;
3319 }
3320 { /* AIX XL C 1.02.0.0 rejects this saying
3321      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3322   struct s { int j; const int *ap[3]; };
3323   struct s *b; b->j = 5;
3324 }
3325 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3326   const int foo = 10;
3327 }
3328
3329 ; return 0; }
3330 EOF
3331 if { (eval echo configure:3332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3332   rm -rf conftest*
3333   ac_cv_c_const=yes
3334 else
3335   echo "configure: failed program was:" >&5
3336   cat conftest.$ac_ext >&5
3337   rm -rf conftest*
3338   ac_cv_c_const=no
3339 fi
3340 rm -f conftest*
3341 fi
3342
3343 echo "$ac_t""$ac_cv_c_const" 1>&6
3344 if test $ac_cv_c_const = no; then
3345   cat >> confdefs.h <<\EOF
3346 #define const 
3347 EOF
3348
3349 fi
3350
3351
3352 for ac_func in strtod strtol strtoul
3353 do
3354 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3355 echo "configure:3356: checking for $ac_func" >&5
3356 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3357   echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359   cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 /* System header to define __stub macros and hopefully few prototypes,
3363     which can conflict with char $ac_func(); below.  */
3364 #include <assert.h>
3365 /* Override any gcc2 internal prototype to avoid an error.  */
3366 /* We use char because int might match the return type of a gcc2
3367     builtin and then its argument prototype would still apply.  */
3368 char $ac_func();
3369
3370 int main() {
3371
3372 /* The GNU C library defines this for functions which it implements
3373     to always fail with ENOSYS.  Some functions are actually named
3374     something starting with __ and the normal name is an alias.  */
3375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3376 choke me
3377 #else
3378 $ac_func();
3379 #endif
3380
3381 ; return 0; }
3382 EOF
3383 if { (eval echo configure:3384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3384   rm -rf conftest*
3385   eval "ac_cv_func_$ac_func=yes"
3386 else
3387   echo "configure: failed program was:" >&5
3388   cat conftest.$ac_ext >&5
3389   rm -rf conftest*
3390   eval "ac_cv_func_$ac_func=no"
3391 fi
3392 rm -f conftest*
3393 fi
3394
3395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3396   echo "$ac_t""yes" 1>&6
3397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3398   cat >> confdefs.h <<EOF
3399 #define $ac_tr_func 1
3400 EOF
3401  
3402 else
3403   echo "$ac_t""no" 1>&6
3404 fi
3405 done
3406
3407
3408
3409 DocumentRoot=/var/www/html
3410
3411 #AC_OUTPUT(Makefile src/Makefile src/lib/Makefile src/gcm_input/Makefile src/web/Makefile)
3412 trap '' 1 2 15
3413 cat > confcache <<\EOF
3414 # This file is a shell script that caches the results of configure
3415 # tests run on this system so they can be shared between configure
3416 # scripts and configure runs.  It is not useful on other systems.
3417 # If it contains results you don't want to keep, you may remove or edit it.
3418 #
3419 # By default, configure uses ./config.cache as the cache file,
3420 # creating it if it does not exist already.  You can give configure
3421 # the --cache-file=FILE option to use a different cache file; that is
3422 # what configure does when it calls configure scripts in
3423 # subdirectories, so they share the cache.
3424 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3425 # config.status only pays attention to the cache file if you give it the
3426 # --recheck option to rerun configure.
3427 #
3428 EOF
3429 # The following way of writing the cache mishandles newlines in values,
3430 # but we know of no workaround that is simple, portable, and efficient.
3431 # So, don't put newlines in cache variables' values.
3432 # Ultrix sh set writes to stderr and can't be redirected directly,
3433 # and sets the high bit in the cache file unless we assign to the vars.
3434 (set) 2>&1 |
3435   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3436   *ac_space=\ *)
3437     # `set' does not quote correctly, so add quotes (double-quote substitution
3438     # turns \\\\ into \\, and sed turns \\ into \).
3439     sed -n \
3440       -e "s/'/'\\\\''/g" \
3441       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3442     ;;
3443   *)
3444     # `set' quotes correctly as required by POSIX, so do not add quotes.
3445     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3446     ;;
3447   esac >> confcache
3448 if cmp -s $cache_file confcache; then
3449   :
3450 else
3451   if test -w $cache_file; then
3452     echo "updating cache $cache_file"
3453     cat confcache > $cache_file
3454   else
3455     echo "not updating unwritable cache $cache_file"
3456   fi
3457 fi
3458 rm -f confcache
3459
3460 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3461
3462 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3463 # Let make expand exec_prefix.
3464 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3465
3466 # Any assignment to VPATH causes Sun make to only execute
3467 # the first set of double-colon rules, so remove it if not needed.
3468 # If there is a colon in the path, we need to keep it.
3469 if test "x$srcdir" = x.; then
3470   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3471 fi
3472
3473 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3474
3475 # Transform confdefs.h into DEFS.
3476 # Protect against shell expansion while executing Makefile rules.
3477 # Protect against Makefile macro expansion.
3478 cat > conftest.defs <<\EOF
3479 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
3480 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
3481 s%\[%\\&%g
3482 s%\]%\\&%g
3483 s%\$%$$%g
3484 EOF
3485 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
3486 rm -f conftest.defs
3487
3488
3489 # Without the "./", some shells look in PATH for config.status.
3490 : ${CONFIG_STATUS=./config.status}
3491
3492 echo creating $CONFIG_STATUS
3493 rm -f $CONFIG_STATUS
3494 cat > $CONFIG_STATUS <<EOF
3495 #! /bin/sh
3496 # Generated automatically by configure.
3497 # Run this file to recreate the current configuration.
3498 # This directory was configured as follows,
3499 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3500 #
3501 # $0 $ac_configure_args
3502 #
3503 # Compiler output produced by configure, useful for debugging
3504 # configure, is in ./config.log if it exists.
3505
3506 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3507 for ac_option
3508 do
3509   case "\$ac_option" in
3510   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3511     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3512     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3513   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3514     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3515     exit 0 ;;
3516   -help | --help | --hel | --he | --h)
3517     echo "\$ac_cs_usage"; exit 0 ;;
3518   *) echo "\$ac_cs_usage"; exit 1 ;;
3519   esac
3520 done
3521
3522 ac_given_srcdir=$srcdir
3523 ac_given_INSTALL="$INSTALL"
3524
3525 trap 'rm -fr `echo "Makefile src/Makefile src/lib/Makefile src/gcm_input/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3526 EOF
3527 cat >> $CONFIG_STATUS <<EOF
3528
3529 # Protect against being on the right side of a sed subst in config.status.
3530 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3531  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3532 $ac_vpsub
3533 $extrasub
3534 s%@SHELL@%$SHELL%g
3535 s%@CFLAGS@%$CFLAGS%g
3536 s%@CPPFLAGS@%$CPPFLAGS%g
3537 s%@CXXFLAGS@%$CXXFLAGS%g
3538 s%@FFLAGS@%$FFLAGS%g
3539 s%@DEFS@%$DEFS%g
3540 s%@LDFLAGS@%$LDFLAGS%g
3541 s%@LIBS@%$LIBS%g
3542 s%@exec_prefix@%$exec_prefix%g
3543 s%@prefix@%$prefix%g
3544 s%@program_transform_name@%$program_transform_name%g
3545 s%@bindir@%$bindir%g
3546 s%@sbindir@%$sbindir%g
3547 s%@libexecdir@%$libexecdir%g
3548 s%@datadir@%$datadir%g
3549 s%@sysconfdir@%$sysconfdir%g
3550 s%@sharedstatedir@%$sharedstatedir%g
3551 s%@localstatedir@%$localstatedir%g
3552 s%@libdir@%$libdir%g
3553 s%@includedir@%$includedir%g
3554 s%@oldincludedir@%$oldincludedir%g
3555 s%@infodir@%$infodir%g
3556 s%@mandir@%$mandir%g
3557 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3558 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3559 s%@INSTALL_DATA@%$INSTALL_DATA%g
3560 s%@PACKAGE@%$PACKAGE%g
3561 s%@VERSION@%$VERSION%g
3562 s%@ACLOCAL@%$ACLOCAL%g
3563 s%@AUTOCONF@%$AUTOCONF%g
3564 s%@AUTOMAKE@%$AUTOMAKE%g
3565 s%@AUTOHEADER@%$AUTOHEADER%g
3566 s%@MAKEINFO@%$MAKEINFO%g
3567 s%@SET_MAKE@%$SET_MAKE%g
3568 s%@CC@%$CC%g
3569 s%@CXX@%$CXX%g
3570 s%@CPP@%$CPP%g
3571 s%@LEX@%$LEX%g
3572 s%@LEXLIB@%$LEXLIB%g
3573 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
3574 s%@LN_S@%$LN_S%g
3575 s%@RANLIB@%$RANLIB%g
3576 s%@YACC@%$YACC%g
3577 s%@AWK@%$AWK%g
3578 s%@XML_CONFIG@%$XML_CONFIG%g
3579 s%@X_CFLAGS@%$X_CFLAGS%g
3580 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3581 s%@X_LIBS@%$X_LIBS%g
3582 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
3583 s%@with_postgres_lib@%$with_postgres_lib%g
3584 s%@with_postgres_include@%$with_postgres_include%g
3585 s%@POSTGRES_LIB@%$POSTGRES_LIB%g
3586 s%@POSTGRES_INCLUDE@%$POSTGRES_INCLUDE%g
3587
3588 CEOF
3589 EOF
3590
3591 cat >> $CONFIG_STATUS <<\EOF
3592
3593 # Split the substitutions into bite-sized pieces for seds with
3594 # small command number limits, like on Digital OSF/1 and HP-UX.
3595 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3596 ac_file=1 # Number of current file.
3597 ac_beg=1 # First line for current file.
3598 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3599 ac_more_lines=:
3600 ac_sed_cmds=""
3601 while $ac_more_lines; do
3602   if test $ac_beg -gt 1; then
3603     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3604   else
3605     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3606   fi
3607   if test ! -s conftest.s$ac_file; then
3608     ac_more_lines=false
3609     rm -f conftest.s$ac_file
3610   else
3611     if test -z "$ac_sed_cmds"; then
3612       ac_sed_cmds="sed -f conftest.s$ac_file"
3613     else
3614       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3615     fi
3616     ac_file=`expr $ac_file + 1`
3617     ac_beg=$ac_end
3618     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3619   fi
3620 done
3621 if test -z "$ac_sed_cmds"; then
3622   ac_sed_cmds=cat
3623 fi
3624 EOF
3625
3626 cat >> $CONFIG_STATUS <<EOF
3627
3628 CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile src/lib/Makefile src/gcm_input/Makefile"}
3629 EOF
3630 cat >> $CONFIG_STATUS <<\EOF
3631 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3632   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3633   case "$ac_file" in
3634   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3635        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3636   *) ac_file_in="${ac_file}.in" ;;
3637   esac
3638
3639   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3640
3641   # Remove last slash and all that follows it.  Not all systems have dirname.
3642   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3643   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3644     # The file is in a subdirectory.
3645     test ! -d "$ac_dir" && mkdir "$ac_dir"
3646     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3647     # A "../" for each directory in $ac_dir_suffix.
3648     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3649   else
3650     ac_dir_suffix= ac_dots=
3651   fi
3652
3653   case "$ac_given_srcdir" in
3654   .)  srcdir=.
3655       if test -z "$ac_dots"; then top_srcdir=.
3656       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3657   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3658   *) # Relative path.
3659     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3660     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3661   esac
3662
3663   case "$ac_given_INSTALL" in
3664   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3665   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3666   esac
3667
3668   echo creating "$ac_file"
3669   rm -f "$ac_file"
3670   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3671   case "$ac_file" in
3672   *Makefile*) ac_comsub="1i\\
3673 # $configure_input" ;;
3674   *) ac_comsub= ;;
3675   esac
3676
3677   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3678   sed -e "$ac_comsub
3679 s%@configure_input@%$configure_input%g
3680 s%@srcdir@%$srcdir%g
3681 s%@top_srcdir@%$top_srcdir%g
3682 s%@INSTALL@%$INSTALL%g
3683 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3684 fi; done
3685 rm -f conftest.s*
3686
3687 EOF
3688 cat >> $CONFIG_STATUS <<EOF
3689
3690 EOF
3691 cat >> $CONFIG_STATUS <<\EOF
3692
3693 exit 0
3694 EOF
3695 chmod +x $CONFIG_STATUS
3696 rm -fr confdefs* $ac_clean_files
3697 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3698