]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/configure
7a697fcb87c0d940653d7133ae66e4d005f2ba7c
[openldap] / contrib / ldapc++ / 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   --enable-shared[=PKGS]  build shared libraries [default=yes]"
16 ac_help="$ac_help
17   --enable-static[=PKGS]  build static libraries [default=yes]"
18 ac_help="$ac_help
19   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
20 ac_help="$ac_help
21   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
22 ac_help="$ac_help
23   --disable-libtool-lock  avoid locking (might break parallel builds)"
24 ac_help="$ac_help
25 --enable-debug"
26 ac_help="$ac_help
27   --with-libldap=DIR          Path to the libldap library [/usr/local/lib]"
28 ac_help="$ac_help
29   --with-ldap-includes=DIR    Path to the libldap include files [/usr/local/include]"
30
31 # Initialize some variables set by options.
32 # The variables have the same names as the options, with
33 # dashes changed to underlines.
34 build=NONE
35 cache_file=./config.cache
36 exec_prefix=NONE
37 host=NONE
38 no_create=
39 nonopt=NONE
40 no_recursion=
41 prefix=NONE
42 program_prefix=NONE
43 program_suffix=NONE
44 program_transform_name=s,x,x,
45 silent=
46 site=
47 srcdir=
48 target=NONE
49 verbose=
50 x_includes=NONE
51 x_libraries=NONE
52 bindir='${exec_prefix}/bin'
53 sbindir='${exec_prefix}/sbin'
54 libexecdir='${exec_prefix}/libexec'
55 datadir='${prefix}/share'
56 sysconfdir='${prefix}/etc'
57 sharedstatedir='${prefix}/com'
58 localstatedir='${prefix}/var'
59 libdir='${exec_prefix}/lib'
60 includedir='${prefix}/include'
61 oldincludedir='/usr/include'
62 infodir='${prefix}/info'
63 mandir='${prefix}/man'
64
65 # Initialize some other variables.
66 subdirs=
67 MFLAGS= MAKEFLAGS=
68 SHELL=${CONFIG_SHELL-/bin/sh}
69 # Maximum number of lines to put in a shell here document.
70 ac_max_here_lines=12
71
72 ac_prev=
73 for ac_option
74 do
75
76   # If the previous option needs an argument, assign it.
77   if test -n "$ac_prev"; then
78     eval "$ac_prev=\$ac_option"
79     ac_prev=
80     continue
81   fi
82
83   case "$ac_option" in
84   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
85   *) ac_optarg= ;;
86   esac
87
88   # Accept the important Cygnus configure options, so we can diagnose typos.
89
90   case "$ac_option" in
91
92   -bindir | --bindir | --bindi | --bind | --bin | --bi)
93     ac_prev=bindir ;;
94   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
95     bindir="$ac_optarg" ;;
96
97   -build | --build | --buil | --bui | --bu)
98     ac_prev=build ;;
99   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
100     build="$ac_optarg" ;;
101
102   -cache-file | --cache-file | --cache-fil | --cache-fi \
103   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
104     ac_prev=cache_file ;;
105   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
106   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
107     cache_file="$ac_optarg" ;;
108
109   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
110     ac_prev=datadir ;;
111   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
112   | --da=*)
113     datadir="$ac_optarg" ;;
114
115   -disable-* | --disable-*)
116     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
117     # Reject names that are not valid shell variable names.
118     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
119       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
120     fi
121     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
122     eval "enable_${ac_feature}=no" ;;
123
124   -enable-* | --enable-*)
125     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
126     # Reject names that are not valid shell variable names.
127     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
128       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129     fi
130     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131     case "$ac_option" in
132       *=*) ;;
133       *) ac_optarg=yes ;;
134     esac
135     eval "enable_${ac_feature}='$ac_optarg'" ;;
136
137   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
138   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
139   | --exec | --exe | --ex)
140     ac_prev=exec_prefix ;;
141   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
142   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
143   | --exec=* | --exe=* | --ex=*)
144     exec_prefix="$ac_optarg" ;;
145
146   -gas | --gas | --ga | --g)
147     # Obsolete; use --with-gas.
148     with_gas=yes ;;
149
150   -help | --help | --hel | --he)
151     # Omit some internal or obsolete options to make the list less imposing.
152     # This message is too long to be a string in the A/UX 3.1 sh.
153     cat << EOF
154 Usage: configure [options] [host]
155 Options: [defaults in brackets after descriptions]
156 Configuration:
157   --cache-file=FILE       cache test results in FILE
158   --help                  print this message
159   --no-create             do not create output files
160   --quiet, --silent       do not print \`checking...' messages
161   --version               print the version of autoconf that created configure
162 Directory and file names:
163   --prefix=PREFIX         install architecture-independent files in PREFIX
164                           [$ac_default_prefix]
165   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
166                           [same as prefix]
167   --bindir=DIR            user executables in DIR [EPREFIX/bin]
168   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
169   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
170   --datadir=DIR           read-only architecture-independent data in DIR
171                           [PREFIX/share]
172   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
173   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
174                           [PREFIX/com]
175   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
176   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
177   --includedir=DIR        C header files in DIR [PREFIX/include]
178   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
179   --infodir=DIR           info documentation in DIR [PREFIX/info]
180   --mandir=DIR            man documentation in DIR [PREFIX/man]
181   --srcdir=DIR            find the sources in DIR [configure dir or ..]
182   --program-prefix=PREFIX prepend PREFIX to installed program names
183   --program-suffix=SUFFIX append SUFFIX to installed program names
184   --program-transform-name=PROGRAM
185                           run sed PROGRAM on installed program names
186 EOF
187     cat << EOF
188 Host type:
189   --build=BUILD           configure for building on BUILD [BUILD=HOST]
190   --host=HOST             configure for HOST [guessed]
191   --target=TARGET         configure for TARGET [TARGET=HOST]
192 Features and packages:
193   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
194   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
195   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
196   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
197   --x-includes=DIR        X include files are in DIR
198   --x-libraries=DIR       X library files are in DIR
199 EOF
200     if test -n "$ac_help"; then
201       echo "--enable and --with options recognized:$ac_help"
202     fi
203     exit 0 ;;
204
205   -host | --host | --hos | --ho)
206     ac_prev=host ;;
207   -host=* | --host=* | --hos=* | --ho=*)
208     host="$ac_optarg" ;;
209
210   -includedir | --includedir | --includedi | --included | --include \
211   | --includ | --inclu | --incl | --inc)
212     ac_prev=includedir ;;
213   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
214   | --includ=* | --inclu=* | --incl=* | --inc=*)
215     includedir="$ac_optarg" ;;
216
217   -infodir | --infodir | --infodi | --infod | --info | --inf)
218     ac_prev=infodir ;;
219   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
220     infodir="$ac_optarg" ;;
221
222   -libdir | --libdir | --libdi | --libd)
223     ac_prev=libdir ;;
224   -libdir=* | --libdir=* | --libdi=* | --libd=*)
225     libdir="$ac_optarg" ;;
226
227   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
228   | --libexe | --libex | --libe)
229     ac_prev=libexecdir ;;
230   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
231   | --libexe=* | --libex=* | --libe=*)
232     libexecdir="$ac_optarg" ;;
233
234   -localstatedir | --localstatedir | --localstatedi | --localstated \
235   | --localstate | --localstat | --localsta | --localst \
236   | --locals | --local | --loca | --loc | --lo)
237     ac_prev=localstatedir ;;
238   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
239   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
240   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
241     localstatedir="$ac_optarg" ;;
242
243   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
244     ac_prev=mandir ;;
245   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
246     mandir="$ac_optarg" ;;
247
248   -nfp | --nfp | --nf)
249     # Obsolete; use --without-fp.
250     with_fp=no ;;
251
252   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
253   | --no-cr | --no-c)
254     no_create=yes ;;
255
256   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
257   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
258     no_recursion=yes ;;
259
260   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
261   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
262   | --oldin | --oldi | --old | --ol | --o)
263     ac_prev=oldincludedir ;;
264   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
265   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
266   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
267     oldincludedir="$ac_optarg" ;;
268
269   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
270     ac_prev=prefix ;;
271   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
272     prefix="$ac_optarg" ;;
273
274   -program-prefix | --program-prefix | --program-prefi | --program-pref \
275   | --program-pre | --program-pr | --program-p)
276     ac_prev=program_prefix ;;
277   -program-prefix=* | --program-prefix=* | --program-prefi=* \
278   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
279     program_prefix="$ac_optarg" ;;
280
281   -program-suffix | --program-suffix | --program-suffi | --program-suff \
282   | --program-suf | --program-su | --program-s)
283     ac_prev=program_suffix ;;
284   -program-suffix=* | --program-suffix=* | --program-suffi=* \
285   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
286     program_suffix="$ac_optarg" ;;
287
288   -program-transform-name | --program-transform-name \
289   | --program-transform-nam | --program-transform-na \
290   | --program-transform-n | --program-transform- \
291   | --program-transform | --program-transfor \
292   | --program-transfo | --program-transf \
293   | --program-trans | --program-tran \
294   | --progr-tra | --program-tr | --program-t)
295     ac_prev=program_transform_name ;;
296   -program-transform-name=* | --program-transform-name=* \
297   | --program-transform-nam=* | --program-transform-na=* \
298   | --program-transform-n=* | --program-transform-=* \
299   | --program-transform=* | --program-transfor=* \
300   | --program-transfo=* | --program-transf=* \
301   | --program-trans=* | --program-tran=* \
302   | --progr-tra=* | --program-tr=* | --program-t=*)
303     program_transform_name="$ac_optarg" ;;
304
305   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
306   | -silent | --silent | --silen | --sile | --sil)
307     silent=yes ;;
308
309   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
310     ac_prev=sbindir ;;
311   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
312   | --sbi=* | --sb=*)
313     sbindir="$ac_optarg" ;;
314
315   -sharedstatedir | --sharedstatedir | --sharedstatedi \
316   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
317   | --sharedst | --shareds | --shared | --share | --shar \
318   | --sha | --sh)
319     ac_prev=sharedstatedir ;;
320   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
321   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
322   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
323   | --sha=* | --sh=*)
324     sharedstatedir="$ac_optarg" ;;
325
326   -site | --site | --sit)
327     ac_prev=site ;;
328   -site=* | --site=* | --sit=*)
329     site="$ac_optarg" ;;
330
331   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
332     ac_prev=srcdir ;;
333   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
334     srcdir="$ac_optarg" ;;
335
336   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
337   | --syscon | --sysco | --sysc | --sys | --sy)
338     ac_prev=sysconfdir ;;
339   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
340   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
341     sysconfdir="$ac_optarg" ;;
342
343   -target | --target | --targe | --targ | --tar | --ta | --t)
344     ac_prev=target ;;
345   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
346     target="$ac_optarg" ;;
347
348   -v | -verbose | --verbose | --verbos | --verbo | --verb)
349     verbose=yes ;;
350
351   -version | --version | --versio | --versi | --vers)
352     echo "configure generated by autoconf version 2.13"
353     exit 0 ;;
354
355   -with-* | --with-*)
356     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
357     # Reject names that are not valid shell variable names.
358     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
359       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360     fi
361     ac_package=`echo $ac_package| sed 's/-/_/g'`
362     case "$ac_option" in
363       *=*) ;;
364       *) ac_optarg=yes ;;
365     esac
366     eval "with_${ac_package}='$ac_optarg'" ;;
367
368   -without-* | --without-*)
369     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
370     # Reject names that are not valid shell variable names.
371     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
372       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373     fi
374     ac_package=`echo $ac_package| sed 's/-/_/g'`
375     eval "with_${ac_package}=no" ;;
376
377   --x)
378     # Obsolete; use --with-x.
379     with_x=yes ;;
380
381   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
382   | --x-incl | --x-inc | --x-in | --x-i)
383     ac_prev=x_includes ;;
384   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
385   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
386     x_includes="$ac_optarg" ;;
387
388   -x-libraries | --x-libraries | --x-librarie | --x-librari \
389   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
390     ac_prev=x_libraries ;;
391   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
392   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
393     x_libraries="$ac_optarg" ;;
394
395   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
396     ;;
397
398   *)
399     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
400       echo "configure: warning: $ac_option: invalid host type" 1>&2
401     fi
402     if test "x$nonopt" != xNONE; then
403       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
404     fi
405     nonopt="$ac_option"
406     ;;
407
408   esac
409 done
410
411 if test -n "$ac_prev"; then
412   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
413 fi
414
415 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
416
417 # File descriptor usage:
418 # 0 standard input
419 # 1 file creation
420 # 2 errors and warnings
421 # 3 some systems may open it to /dev/tty
422 # 4 used on the Kubota Titan
423 # 6 checking for... messages and results
424 # 5 compiler messages saved in config.log
425 if test "$silent" = yes; then
426   exec 6>/dev/null
427 else
428   exec 6>&1
429 fi
430 exec 5>./config.log
431
432 echo "\
433 This file contains any messages produced by compilers while
434 running configure, to aid debugging if configure makes a mistake.
435 " 1>&5
436
437 # Strip out --no-create and --no-recursion so they do not pile up.
438 # Also quote any args containing shell metacharacters.
439 ac_configure_args=
440 for ac_arg
441 do
442   case "$ac_arg" in
443   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
444   | --no-cr | --no-c) ;;
445   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
446   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
447   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
448   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
449   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
450   esac
451 done
452
453 # NLS nuisances.
454 # Only set these to C if already set.  These must not be set unconditionally
455 # because not all systems understand e.g. LANG=C (notably SCO).
456 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
457 # Non-C LC_CTYPE values break the ctype check.
458 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
459 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
460 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
461 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
462
463 # confdefs.h avoids OS command line length limits that DEFS can exceed.
464 rm -rf conftest* confdefs.h
465 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
466 echo > confdefs.h
467
468 # A filename unique to this package, relative to the directory that
469 # configure is in, which we can look for to find out if srcdir is correct.
470 ac_unique_file=src/main.cpp
471
472 # Find the source files, if location was not specified.
473 if test -z "$srcdir"; then
474   ac_srcdir_defaulted=yes
475   # Try the directory containing this script, then its parent.
476   ac_prog=$0
477   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
478   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
479   srcdir=$ac_confdir
480   if test ! -r $srcdir/$ac_unique_file; then
481     srcdir=..
482   fi
483 else
484   ac_srcdir_defaulted=no
485 fi
486 if test ! -r $srcdir/$ac_unique_file; then
487   if test "$ac_srcdir_defaulted" = yes; then
488     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
489   else
490     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
491   fi
492 fi
493 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
494
495 # Prefer explicitly selected file to automatically selected ones.
496 if test -z "$CONFIG_SITE"; then
497   if test "x$prefix" != xNONE; then
498     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
499   else
500     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
501   fi
502 fi
503 for ac_site_file in $CONFIG_SITE; do
504   if test -r "$ac_site_file"; then
505     echo "loading site script $ac_site_file"
506     . "$ac_site_file"
507   fi
508 done
509
510
511 ac_ext=c
512 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
513 ac_cpp='$CPP $CPPFLAGS'
514 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
515 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
516 cross_compiling=$ac_cv_prog_cc_cross
517
518 ac_exeext=
519 ac_objext=o
520 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
521   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
522   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
523     ac_n= ac_c='
524 ' ac_t='        '
525   else
526     ac_n=-n ac_c= ac_t=
527   fi
528 else
529   ac_n= ac_c='\c' ac_t=
530 fi
531
532
533 ac_aux_dir=
534 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
535   if test -f $ac_dir/install-sh; then
536     ac_aux_dir=$ac_dir
537     ac_install_sh="$ac_aux_dir/install-sh -c"
538     break
539   elif test -f $ac_dir/install.sh; then
540     ac_aux_dir=$ac_dir
541     ac_install_sh="$ac_aux_dir/install.sh -c"
542     break
543   fi
544 done
545 if test -z "$ac_aux_dir"; then
546   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
547 fi
548 ac_config_guess=$ac_aux_dir/config.guess
549 ac_config_sub=$ac_aux_dir/config.sub
550 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
551
552 # Find a good install program.  We prefer a C program (faster),
553 # so one script is as good as another.  But avoid the broken or
554 # incompatible versions:
555 # SysV /etc/install, /usr/sbin/install
556 # SunOS /usr/etc/install
557 # IRIX /sbin/install
558 # AIX /bin/install
559 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
560 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
561 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
562 # ./install, which can be erroneously created by make from ./install.sh.
563 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
564 echo "configure:565: checking for a BSD compatible install" >&5
565 if test -z "$INSTALL"; then
566 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
567   echo $ac_n "(cached) $ac_c" 1>&6
568 else
569     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
570   for ac_dir in $PATH; do
571     # Account for people who put trailing slashes in PATH elements.
572     case "$ac_dir/" in
573     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
574     *)
575       # OSF1 and SCO ODT 3.0 have their own names for install.
576       # Don't use installbsd from OSF since it installs stuff as root
577       # by default.
578       for ac_prog in ginstall scoinst install; do
579         if test -f $ac_dir/$ac_prog; then
580           if test $ac_prog = install &&
581             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
582             # AIX install.  It has an incompatible calling convention.
583             :
584           else
585             ac_cv_path_install="$ac_dir/$ac_prog -c"
586             break 2
587           fi
588         fi
589       done
590       ;;
591     esac
592   done
593   IFS="$ac_save_IFS"
594
595 fi
596   if test "${ac_cv_path_install+set}" = set; then
597     INSTALL="$ac_cv_path_install"
598   else
599     # As a last resort, use the slow shell script.  We don't cache a
600     # path for INSTALL within a source directory, because that will
601     # break other packages using the cache if that directory is
602     # removed, or if the path is relative.
603     INSTALL="$ac_install_sh"
604   fi
605 fi
606 echo "$ac_t""$INSTALL" 1>&6
607
608 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
609 # It thinks the first close brace ends the variable substitution.
610 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
611
612 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
613
614 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
615
616 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
617 echo "configure:618: checking whether build environment is sane" >&5
618 # Just in case
619 sleep 1
620 echo timestamp > conftestfile
621 # Do `set' in a subshell so we don't clobber the current shell's
622 # arguments.  Must try -L first in case configure is actually a
623 # symlink; some systems play weird games with the mod time of symlinks
624 # (eg FreeBSD returns the mod time of the symlink's containing
625 # directory).
626 if (
627    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
628    if test "$*" = "X"; then
629       # -L didn't work.
630       set X `ls -t $srcdir/configure conftestfile`
631    fi
632    if test "$*" != "X $srcdir/configure conftestfile" \
633       && test "$*" != "X conftestfile $srcdir/configure"; then
634
635       # If neither matched, then we have a broken ls.  This can happen
636       # if, for instance, CONFIG_SHELL is bash and it inherits a
637       # broken ls alias from the environment.  This has actually
638       # happened.  Such a system could not be considered "sane".
639       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
640 alias in your environment" 1>&2; exit 1; }
641    fi
642
643    test "$2" = conftestfile
644    )
645 then
646    # Ok.
647    :
648 else
649    { echo "configure: error: newly created file is older than distributed files!
650 Check your system clock" 1>&2; exit 1; }
651 fi
652 rm -f conftest*
653 echo "$ac_t""yes" 1>&6
654 if test "$program_transform_name" = s,x,x,; then
655   program_transform_name=
656 else
657   # Double any \ or $.  echo might interpret backslashes.
658   cat <<\EOF_SED > conftestsed
659 s,\\,\\\\,g; s,\$,$$,g
660 EOF_SED
661   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
662   rm -f conftestsed
663 fi
664 test "$program_prefix" != NONE &&
665   program_transform_name="s,^,${program_prefix},; $program_transform_name"
666 # Use a double $ so make ignores it.
667 test "$program_suffix" != NONE &&
668   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
669
670 # sed with no file args requires a program.
671 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
672
673 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
674 echo "configure:675: checking whether ${MAKE-make} sets \${MAKE}" >&5
675 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
676 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
677   echo $ac_n "(cached) $ac_c" 1>&6
678 else
679   cat > conftestmake <<\EOF
680 all:
681         @echo 'ac_maketemp="${MAKE}"'
682 EOF
683 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
684 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
685 if test -n "$ac_maketemp"; then
686   eval ac_cv_prog_make_${ac_make}_set=yes
687 else
688   eval ac_cv_prog_make_${ac_make}_set=no
689 fi
690 rm -f conftestmake
691 fi
692 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
693   echo "$ac_t""yes" 1>&6
694   SET_MAKE=
695 else
696   echo "$ac_t""no" 1>&6
697   SET_MAKE="MAKE=${MAKE-make}"
698 fi
699
700
701 PACKAGE=main
702
703 VERSION=0.0.1
704
705 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
706   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
707 fi
708 cat >> confdefs.h <<EOF
709 #define PACKAGE "$PACKAGE"
710 EOF
711
712 cat >> confdefs.h <<EOF
713 #define VERSION "$VERSION"
714 EOF
715
716
717
718 missing_dir=`cd $ac_aux_dir && pwd`
719 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
720 echo "configure:721: checking for working aclocal" >&5
721 # Run test in a subshell; some versions of sh will print an error if
722 # an executable is not found, even if stderr is redirected.
723 # Redirect stdin to placate older versions of autoconf.  Sigh.
724 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
725    ACLOCAL=aclocal
726    echo "$ac_t""found" 1>&6
727 else
728    ACLOCAL="$missing_dir/missing aclocal"
729    echo "$ac_t""missing" 1>&6
730 fi
731
732 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
733 echo "configure:734: checking for working autoconf" >&5
734 # Run test in a subshell; some versions of sh will print an error if
735 # an executable is not found, even if stderr is redirected.
736 # Redirect stdin to placate older versions of autoconf.  Sigh.
737 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
738    AUTOCONF=autoconf
739    echo "$ac_t""found" 1>&6
740 else
741    AUTOCONF="$missing_dir/missing autoconf"
742    echo "$ac_t""missing" 1>&6
743 fi
744
745 echo $ac_n "checking for working automake""... $ac_c" 1>&6
746 echo "configure:747: checking for working automake" >&5
747 # Run test in a subshell; some versions of sh will print an error if
748 # an executable is not found, even if stderr is redirected.
749 # Redirect stdin to placate older versions of autoconf.  Sigh.
750 if (automake --version) < /dev/null > /dev/null 2>&1; then
751    AUTOMAKE=automake
752    echo "$ac_t""found" 1>&6
753 else
754    AUTOMAKE="$missing_dir/missing automake"
755    echo "$ac_t""missing" 1>&6
756 fi
757
758 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
759 echo "configure:760: checking for working autoheader" >&5
760 # Run test in a subshell; some versions of sh will print an error if
761 # an executable is not found, even if stderr is redirected.
762 # Redirect stdin to placate older versions of autoconf.  Sigh.
763 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
764    AUTOHEADER=autoheader
765    echo "$ac_t""found" 1>&6
766 else
767    AUTOHEADER="$missing_dir/missing autoheader"
768    echo "$ac_t""missing" 1>&6
769 fi
770
771 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
772 echo "configure:773: checking for working makeinfo" >&5
773 # Run test in a subshell; some versions of sh will print an error if
774 # an executable is not found, even if stderr is redirected.
775 # Redirect stdin to placate older versions of autoconf.  Sigh.
776 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
777    MAKEINFO=makeinfo
778    echo "$ac_t""found" 1>&6
779 else
780    MAKEINFO="$missing_dir/missing makeinfo"
781    echo "$ac_t""missing" 1>&6
782 fi
783
784
785
786
787
788
789
790 # Find a good install program.  We prefer a C program (faster),
791 # so one script is as good as another.  But avoid the broken or
792 # incompatible versions:
793 # SysV /etc/install, /usr/sbin/install
794 # SunOS /usr/etc/install
795 # IRIX /sbin/install
796 # AIX /bin/install
797 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
798 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
799 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
800 # ./install, which can be erroneously created by make from ./install.sh.
801 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
802 echo "configure:803: checking for a BSD compatible install" >&5
803 if test -z "$INSTALL"; then
804 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
805   echo $ac_n "(cached) $ac_c" 1>&6
806 else
807     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
808   for ac_dir in $PATH; do
809     # Account for people who put trailing slashes in PATH elements.
810     case "$ac_dir/" in
811     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
812     *)
813       # OSF1 and SCO ODT 3.0 have their own names for install.
814       # Don't use installbsd from OSF since it installs stuff as root
815       # by default.
816       for ac_prog in ginstall scoinst install; do
817         if test -f $ac_dir/$ac_prog; then
818           if test $ac_prog = install &&
819             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
820             # AIX install.  It has an incompatible calling convention.
821             :
822           else
823             ac_cv_path_install="$ac_dir/$ac_prog -c"
824             break 2
825           fi
826         fi
827       done
828       ;;
829     esac
830   done
831   IFS="$ac_save_IFS"
832
833 fi
834   if test "${ac_cv_path_install+set}" = set; then
835     INSTALL="$ac_cv_path_install"
836   else
837     # As a last resort, use the slow shell script.  We don't cache a
838     # path for INSTALL within a source directory, because that will
839     # break other packages using the cache if that directory is
840     # removed, or if the path is relative.
841     INSTALL="$ac_install_sh"
842   fi
843 fi
844 echo "$ac_t""$INSTALL" 1>&6
845
846 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
847 # It thinks the first close brace ends the variable substitution.
848 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
849
850 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
851
852 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
853
854 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
855 do
856 # Extract the first word of "$ac_prog", so it can be a program name with args.
857 set dummy $ac_prog; ac_word=$2
858 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
859 echo "configure:860: checking for $ac_word" >&5
860 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
861   echo $ac_n "(cached) $ac_c" 1>&6
862 else
863   if test -n "$CXX"; then
864   ac_cv_prog_CXX="$CXX" # Let the user override the test.
865 else
866   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
867   ac_dummy="$PATH"
868   for ac_dir in $ac_dummy; do
869     test -z "$ac_dir" && ac_dir=.
870     if test -f $ac_dir/$ac_word; then
871       ac_cv_prog_CXX="$ac_prog"
872       break
873     fi
874   done
875   IFS="$ac_save_ifs"
876 fi
877 fi
878 CXX="$ac_cv_prog_CXX"
879 if test -n "$CXX"; then
880   echo "$ac_t""$CXX" 1>&6
881 else
882   echo "$ac_t""no" 1>&6
883 fi
884
885 test -n "$CXX" && break
886 done
887 test -n "$CXX" || CXX="gcc"
888
889
890 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
891 echo "configure:892: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
892
893 ac_ext=C
894 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
895 ac_cpp='$CXXCPP $CPPFLAGS'
896 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
897 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
898 cross_compiling=$ac_cv_prog_cxx_cross
899
900 cat > conftest.$ac_ext << EOF
901
902 #line 903 "configure"
903 #include "confdefs.h"
904
905 int main(){return(0);}
906 EOF
907 if { (eval echo configure:908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
908   ac_cv_prog_cxx_works=yes
909   # If we can't run a trivial program, we are probably using a cross compiler.
910   if (./conftest; exit) 2>/dev/null; then
911     ac_cv_prog_cxx_cross=no
912   else
913     ac_cv_prog_cxx_cross=yes
914   fi
915 else
916   echo "configure: failed program was:" >&5
917   cat conftest.$ac_ext >&5
918   ac_cv_prog_cxx_works=no
919 fi
920 rm -fr conftest*
921 ac_ext=c
922 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
923 ac_cpp='$CPP $CPPFLAGS'
924 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
925 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
926 cross_compiling=$ac_cv_prog_cc_cross
927
928 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
929 if test $ac_cv_prog_cxx_works = no; then
930   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
931 fi
932 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
933 echo "configure:934: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
934 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
935 cross_compiling=$ac_cv_prog_cxx_cross
936
937 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
938 echo "configure:939: checking whether we are using GNU C++" >&5
939 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
940   echo $ac_n "(cached) $ac_c" 1>&6
941 else
942   cat > conftest.C <<EOF
943 #ifdef __GNUC__
944   yes;
945 #endif
946 EOF
947 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
948   ac_cv_prog_gxx=yes
949 else
950   ac_cv_prog_gxx=no
951 fi
952 fi
953
954 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
955
956 if test $ac_cv_prog_gxx = yes; then
957   GXX=yes
958 else
959   GXX=
960 fi
961
962 ac_test_CXXFLAGS="${CXXFLAGS+set}"
963 ac_save_CXXFLAGS="$CXXFLAGS"
964 CXXFLAGS=
965 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
966 echo "configure:967: checking whether ${CXX-g++} accepts -g" >&5
967 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
968   echo $ac_n "(cached) $ac_c" 1>&6
969 else
970   echo 'void f(){}' > conftest.cc
971 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
972   ac_cv_prog_cxx_g=yes
973 else
974   ac_cv_prog_cxx_g=no
975 fi
976 rm -f conftest*
977
978 fi
979
980 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
981 if test "$ac_test_CXXFLAGS" = set; then
982   CXXFLAGS="$ac_save_CXXFLAGS"
983 elif test $ac_cv_prog_cxx_g = yes; then
984   if test "$GXX" = yes; then
985     CXXFLAGS="-g -O2"
986   else
987     CXXFLAGS="-g"
988   fi
989 else
990   if test "$GXX" = yes; then
991     CXXFLAGS="-O2"
992   else
993     CXXFLAGS=
994   fi
995 fi
996
997 # Extract the first word of "ranlib", so it can be a program name with args.
998 set dummy ranlib; ac_word=$2
999 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1000 echo "configure:1001: checking for $ac_word" >&5
1001 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1002   echo $ac_n "(cached) $ac_c" 1>&6
1003 else
1004   if test -n "$RANLIB"; then
1005   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1006 else
1007   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1008   ac_dummy="$PATH"
1009   for ac_dir in $ac_dummy; do
1010     test -z "$ac_dir" && ac_dir=.
1011     if test -f $ac_dir/$ac_word; then
1012       ac_cv_prog_RANLIB="ranlib"
1013       break
1014     fi
1015   done
1016   IFS="$ac_save_ifs"
1017   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1018 fi
1019 fi
1020 RANLIB="$ac_cv_prog_RANLIB"
1021 if test -n "$RANLIB"; then
1022   echo "$ac_t""$RANLIB" 1>&6
1023 else
1024   echo "$ac_t""no" 1>&6
1025 fi
1026
1027 # Check whether --enable-shared or --disable-shared was given.
1028 if test "${enable_shared+set}" = set; then
1029   enableval="$enable_shared"
1030   p=${PACKAGE-default}
1031 case "$enableval" in
1032 yes) enable_shared=yes ;;
1033 no) enable_shared=no ;;
1034 *)
1035   enable_shared=no
1036   # Look at the argument we got.  We use all the common list separators.
1037   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1038   for pkg in $enableval; do
1039     if test "X$pkg" = "X$p"; then
1040       enable_shared=yes
1041     fi
1042   done
1043   IFS="$ac_save_ifs"
1044   ;;
1045 esac
1046 else
1047   enable_shared=yes
1048 fi
1049
1050 # Check whether --enable-static or --disable-static was given.
1051 if test "${enable_static+set}" = set; then
1052   enableval="$enable_static"
1053   p=${PACKAGE-default}
1054 case "$enableval" in
1055 yes) enable_static=yes ;;
1056 no) enable_static=no ;;
1057 *)
1058   enable_static=no
1059   # Look at the argument we got.  We use all the common list separators.
1060   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1061   for pkg in $enableval; do
1062     if test "X$pkg" = "X$p"; then
1063       enable_static=yes
1064     fi
1065   done
1066   IFS="$ac_save_ifs"
1067   ;;
1068 esac
1069 else
1070   enable_static=yes
1071 fi
1072
1073 # Check whether --enable-fast-install or --disable-fast-install was given.
1074 if test "${enable_fast_install+set}" = set; then
1075   enableval="$enable_fast_install"
1076   p=${PACKAGE-default}
1077 case "$enableval" in
1078 yes) enable_fast_install=yes ;;
1079 no) enable_fast_install=no ;;
1080 *)
1081   enable_fast_install=no
1082   # Look at the argument we got.  We use all the common list separators.
1083   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1084   for pkg in $enableval; do
1085     if test "X$pkg" = "X$p"; then
1086       enable_fast_install=yes
1087     fi
1088   done
1089   IFS="$ac_save_ifs"
1090   ;;
1091 esac
1092 else
1093   enable_fast_install=yes
1094 fi
1095
1096
1097 # Make sure we can run config.sub.
1098 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1099 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1100 fi
1101
1102 echo $ac_n "checking host system type""... $ac_c" 1>&6
1103 echo "configure:1104: checking host system type" >&5
1104
1105 host_alias=$host
1106 case "$host_alias" in
1107 NONE)
1108   case $nonopt in
1109   NONE)
1110     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1111     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1112     fi ;;
1113   *) host_alias=$nonopt ;;
1114   esac ;;
1115 esac
1116
1117 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1118 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1119 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1120 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1121 echo "$ac_t""$host" 1>&6
1122
1123 echo $ac_n "checking build system type""... $ac_c" 1>&6
1124 echo "configure:1125: checking build system type" >&5
1125
1126 build_alias=$build
1127 case "$build_alias" in
1128 NONE)
1129   case $nonopt in
1130   NONE) build_alias=$host_alias ;;
1131   *) build_alias=$nonopt ;;
1132   esac ;;
1133 esac
1134
1135 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1136 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1137 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1138 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1139 echo "$ac_t""$build" 1>&6
1140
1141 # Extract the first word of "gcc", so it can be a program name with args.
1142 set dummy gcc; ac_word=$2
1143 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1144 echo "configure:1145: checking for $ac_word" >&5
1145 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1146   echo $ac_n "(cached) $ac_c" 1>&6
1147 else
1148   if test -n "$CC"; then
1149   ac_cv_prog_CC="$CC" # Let the user override the test.
1150 else
1151   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1152   ac_dummy="$PATH"
1153   for ac_dir in $ac_dummy; do
1154     test -z "$ac_dir" && ac_dir=.
1155     if test -f $ac_dir/$ac_word; then
1156       ac_cv_prog_CC="gcc"
1157       break
1158     fi
1159   done
1160   IFS="$ac_save_ifs"
1161 fi
1162 fi
1163 CC="$ac_cv_prog_CC"
1164 if test -n "$CC"; then
1165   echo "$ac_t""$CC" 1>&6
1166 else
1167   echo "$ac_t""no" 1>&6
1168 fi
1169
1170 if test -z "$CC"; then
1171   # Extract the first word of "cc", so it can be a program name with args.
1172 set dummy cc; ac_word=$2
1173 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1174 echo "configure:1175: checking for $ac_word" >&5
1175 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1176   echo $ac_n "(cached) $ac_c" 1>&6
1177 else
1178   if test -n "$CC"; then
1179   ac_cv_prog_CC="$CC" # Let the user override the test.
1180 else
1181   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1182   ac_prog_rejected=no
1183   ac_dummy="$PATH"
1184   for ac_dir in $ac_dummy; do
1185     test -z "$ac_dir" && ac_dir=.
1186     if test -f $ac_dir/$ac_word; then
1187       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1188         ac_prog_rejected=yes
1189         continue
1190       fi
1191       ac_cv_prog_CC="cc"
1192       break
1193     fi
1194   done
1195   IFS="$ac_save_ifs"
1196 if test $ac_prog_rejected = yes; then
1197   # We found a bogon in the path, so make sure we never use it.
1198   set dummy $ac_cv_prog_CC
1199   shift
1200   if test $# -gt 0; then
1201     # We chose a different compiler from the bogus one.
1202     # However, it has the same basename, so the bogon will be chosen
1203     # first if we set CC to just the basename; use the full file name.
1204     shift
1205     set dummy "$ac_dir/$ac_word" "$@"
1206     shift
1207     ac_cv_prog_CC="$@"
1208   fi
1209 fi
1210 fi
1211 fi
1212 CC="$ac_cv_prog_CC"
1213 if test -n "$CC"; then
1214   echo "$ac_t""$CC" 1>&6
1215 else
1216   echo "$ac_t""no" 1>&6
1217 fi
1218
1219   if test -z "$CC"; then
1220     case "`uname -s`" in
1221     *win32* | *WIN32*)
1222       # Extract the first word of "cl", so it can be a program name with args.
1223 set dummy cl; ac_word=$2
1224 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1225 echo "configure:1226: checking for $ac_word" >&5
1226 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1227   echo $ac_n "(cached) $ac_c" 1>&6
1228 else
1229   if test -n "$CC"; then
1230   ac_cv_prog_CC="$CC" # Let the user override the test.
1231 else
1232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1233   ac_dummy="$PATH"
1234   for ac_dir in $ac_dummy; do
1235     test -z "$ac_dir" && ac_dir=.
1236     if test -f $ac_dir/$ac_word; then
1237       ac_cv_prog_CC="cl"
1238       break
1239     fi
1240   done
1241   IFS="$ac_save_ifs"
1242 fi
1243 fi
1244 CC="$ac_cv_prog_CC"
1245 if test -n "$CC"; then
1246   echo "$ac_t""$CC" 1>&6
1247 else
1248   echo "$ac_t""no" 1>&6
1249 fi
1250  ;;
1251     esac
1252   fi
1253   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1254 fi
1255
1256 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1257 echo "configure:1258: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1258
1259 ac_ext=c
1260 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1261 ac_cpp='$CPP $CPPFLAGS'
1262 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1263 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1264 cross_compiling=$ac_cv_prog_cc_cross
1265
1266 cat > conftest.$ac_ext << EOF
1267
1268 #line 1269 "configure"
1269 #include "confdefs.h"
1270
1271 main(){return(0);}
1272 EOF
1273 if { (eval echo configure:1274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1274   ac_cv_prog_cc_works=yes
1275   # If we can't run a trivial program, we are probably using a cross compiler.
1276   if (./conftest; exit) 2>/dev/null; then
1277     ac_cv_prog_cc_cross=no
1278   else
1279     ac_cv_prog_cc_cross=yes
1280   fi
1281 else
1282   echo "configure: failed program was:" >&5
1283   cat conftest.$ac_ext >&5
1284   ac_cv_prog_cc_works=no
1285 fi
1286 rm -fr conftest*
1287 ac_ext=c
1288 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1289 ac_cpp='$CPP $CPPFLAGS'
1290 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1291 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1292 cross_compiling=$ac_cv_prog_cc_cross
1293
1294 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1295 if test $ac_cv_prog_cc_works = no; then
1296   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1297 fi
1298 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1299 echo "configure:1300: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1300 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1301 cross_compiling=$ac_cv_prog_cc_cross
1302
1303 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1304 echo "configure:1305: checking whether we are using GNU C" >&5
1305 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1306   echo $ac_n "(cached) $ac_c" 1>&6
1307 else
1308   cat > conftest.c <<EOF
1309 #ifdef __GNUC__
1310   yes;
1311 #endif
1312 EOF
1313 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1314   ac_cv_prog_gcc=yes
1315 else
1316   ac_cv_prog_gcc=no
1317 fi
1318 fi
1319
1320 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1321
1322 if test $ac_cv_prog_gcc = yes; then
1323   GCC=yes
1324 else
1325   GCC=
1326 fi
1327
1328 ac_test_CFLAGS="${CFLAGS+set}"
1329 ac_save_CFLAGS="$CFLAGS"
1330 CFLAGS=
1331 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1332 echo "configure:1333: checking whether ${CC-cc} accepts -g" >&5
1333 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1334   echo $ac_n "(cached) $ac_c" 1>&6
1335 else
1336   echo 'void f(){}' > conftest.c
1337 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1338   ac_cv_prog_cc_g=yes
1339 else
1340   ac_cv_prog_cc_g=no
1341 fi
1342 rm -f conftest*
1343
1344 fi
1345
1346 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1347 if test "$ac_test_CFLAGS" = set; then
1348   CFLAGS="$ac_save_CFLAGS"
1349 elif test $ac_cv_prog_cc_g = yes; then
1350   if test "$GCC" = yes; then
1351     CFLAGS="-g -O2"
1352   else
1353     CFLAGS="-g"
1354   fi
1355 else
1356   if test "$GCC" = yes; then
1357     CFLAGS="-O2"
1358   else
1359     CFLAGS=
1360   fi
1361 fi
1362
1363 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1364 if test "${with_gnu_ld+set}" = set; then
1365   withval="$with_gnu_ld"
1366   test "$withval" = no || with_gnu_ld=yes
1367 else
1368   with_gnu_ld=no
1369 fi
1370
1371 ac_prog=ld
1372 if test "$ac_cv_prog_gcc" = yes; then
1373   # Check if gcc -print-prog-name=ld gives a path.
1374   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1375 echo "configure:1376: checking for ld used by GCC" >&5
1376   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1377   case "$ac_prog" in
1378     # Accept absolute paths.
1379     [\\/]* | [A-Za-z]:[\\/]*)
1380       re_direlt='/[^/][^/]*/\.\./'
1381       # Canonicalize the path of ld
1382       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1383       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1384         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1385       done
1386       test -z "$LD" && LD="$ac_prog"
1387       ;;
1388   "")
1389     # If it fails, then pretend we aren't using GCC.
1390     ac_prog=ld
1391     ;;
1392   *)
1393     # If it is relative, then search for the first ld in PATH.
1394     with_gnu_ld=unknown
1395     ;;
1396   esac
1397 elif test "$with_gnu_ld" = yes; then
1398   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1399 echo "configure:1400: checking for GNU ld" >&5
1400 else
1401   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1402 echo "configure:1403: checking for non-GNU ld" >&5
1403 fi
1404 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1405   echo $ac_n "(cached) $ac_c" 1>&6
1406 else
1407   if test -z "$LD"; then
1408   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1409   for ac_dir in $PATH; do
1410     test -z "$ac_dir" && ac_dir=.
1411     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1412       ac_cv_path_LD="$ac_dir/$ac_prog"
1413       # Check to see if the program is GNU ld.  I'd rather use --version,
1414       # but apparently some GNU ld's only accept -v.
1415       # Break only if it was the GNU/non-GNU ld that we prefer.
1416       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1417         test "$with_gnu_ld" != no && break
1418       else
1419         test "$with_gnu_ld" != yes && break
1420       fi
1421     fi
1422   done
1423   IFS="$ac_save_ifs"
1424 else
1425   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1426 fi
1427 fi
1428
1429 LD="$ac_cv_path_LD"
1430 if test -n "$LD"; then
1431   echo "$ac_t""$LD" 1>&6
1432 else
1433   echo "$ac_t""no" 1>&6
1434 fi
1435 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1436 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1437 echo "configure:1438: checking if the linker ($LD) is GNU ld" >&5
1438 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1439   echo $ac_n "(cached) $ac_c" 1>&6
1440 else
1441   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1442 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1443   ac_cv_prog_gnu_ld=yes
1444 else
1445   ac_cv_prog_gnu_ld=no
1446 fi
1447 fi
1448
1449 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1450
1451
1452 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1453 echo "configure:1454: checking for BSD-compatible nm" >&5
1454 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1455   echo $ac_n "(cached) $ac_c" 1>&6
1456 else
1457   if test -n "$NM"; then
1458   # Let the user override the test.
1459   ac_cv_path_NM="$NM"
1460 else
1461   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1462   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1463     test -z "$ac_dir" && ac_dir=.
1464     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1465       # Check to see if the nm accepts a BSD-compat flag.
1466       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1467       #   nm: unknown option "B" ignored
1468       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1469         ac_cv_path_NM="$ac_dir/nm -B"
1470         break
1471       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1472         ac_cv_path_NM="$ac_dir/nm -p"
1473         break
1474       else
1475         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1476         continue # so that we can try to find one that supports BSD flags
1477       fi
1478     fi
1479   done
1480   IFS="$ac_save_ifs"
1481   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1482 fi
1483 fi
1484
1485 NM="$ac_cv_path_NM"
1486 echo "$ac_t""$NM" 1>&6
1487
1488 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1489 echo "configure:1490: checking whether ln -s works" >&5
1490 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1491   echo $ac_n "(cached) $ac_c" 1>&6
1492 else
1493   rm -f conftestdata
1494 if ln -s X conftestdata 2>/dev/null
1495 then
1496   rm -f conftestdata
1497   ac_cv_prog_LN_S="ln -s"
1498 else
1499   ac_cv_prog_LN_S=ln
1500 fi
1501 fi
1502 LN_S="$ac_cv_prog_LN_S"
1503 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1504   echo "$ac_t""yes" 1>&6
1505 else
1506   echo "$ac_t""no" 1>&6
1507 fi
1508
1509
1510 case "$target" in
1511 NONE) lt_target="$host" ;;
1512 *) lt_target="$target" ;;
1513 esac
1514
1515 # Check for any special flags to pass to ltconfig.
1516 libtool_flags="--cache-file=$cache_file"
1517 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1518 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1519 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1520 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1521 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1522
1523
1524 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1525 if test "${enable_libtool_lock+set}" = set; then
1526   enableval="$enable_libtool_lock"
1527   :
1528 fi
1529
1530 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1531 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1532
1533 # Some flags need to be propagated to the compiler or linker for good
1534 # libtool support.
1535 case "$lt_target" in
1536 *-*-irix6*)
1537   # Find out which ABI we are using.
1538   echo '#line 1539 "configure"' > conftest.$ac_ext
1539   if { (eval echo configure:1540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1540     case "`/usr/bin/file conftest.o`" in
1541     *32-bit*)
1542       LD="${LD-ld} -32"
1543       ;;
1544     *N32*)
1545       LD="${LD-ld} -n32"
1546       ;;
1547     *64-bit*)
1548       LD="${LD-ld} -64"
1549       ;;
1550     esac
1551   fi
1552   rm -rf conftest*
1553   ;;
1554
1555 *-*-sco3.2v5*)
1556   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1557   SAVE_CFLAGS="$CFLAGS"
1558   CFLAGS="$CFLAGS -belf"
1559   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1560 echo "configure:1561: checking whether the C compiler needs -belf" >&5
1561 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1562   echo $ac_n "(cached) $ac_c" 1>&6
1563 else
1564   cat > conftest.$ac_ext <<EOF
1565 #line 1566 "configure"
1566 #include "confdefs.h"
1567
1568 int main() {
1569
1570 ; return 0; }
1571 EOF
1572 if { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1573   rm -rf conftest*
1574   lt_cv_cc_needs_belf=yes
1575 else
1576   echo "configure: failed program was:" >&5
1577   cat conftest.$ac_ext >&5
1578   rm -rf conftest*
1579   lt_cv_cc_needs_belf=no
1580 fi
1581 rm -f conftest*
1582 fi
1583
1584 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1585   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1586     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1587     CFLAGS="$SAVE_CFLAGS"
1588   fi
1589   ;;
1590
1591
1592 esac
1593
1594
1595 # Save cache, so that ltconfig can load it
1596
1597
1598 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1599 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1600 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1601 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1602 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1603 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1604 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1605 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1606
1607 # Reload cache, that may have been modified by ltconfig
1608
1609
1610 # This can be used to rebuild libtool when needed
1611 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1612
1613 # Always use our own libtool.
1614 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1615
1616 # Redirect the config.log output again, so that the ltconfig log is not
1617 # clobbered by the next message.
1618 exec 5>>./config.log
1619
1620 # Check whether --enable-debug or --disable-debug was given.
1621 if test "${enable_debug+set}" = set; then
1622   enableval="$enable_debug"
1623   
1624         CXXFLAGS="-g -O0 -Wall"
1625     cat >> confdefs.h <<\EOF
1626 #define WITH_DEBUG 1
1627 EOF
1628
1629         
1630
1631 fi
1632
1633
1634 # Check whether --with-libldap or --without-libldap was given.
1635 if test "${with_libldap+set}" = set; then
1636   withval="$with_libldap"
1637   
1638         LIBS="-L$with_libldap $LIBS "   
1639         
1640 else
1641   
1642         LIBS="-L/usr/local/lib $LIBS "  
1643         
1644
1645 fi
1646
1647
1648 # Check whether --with-ldap-includes or --without-ldap-includes was given.
1649 if test "${with_ldap_includes+set}" = set; then
1650   withval="$with_ldap_includes"
1651   
1652         CPPFLAGS="-I$with_ldap_includes $CPPFLAGS "     
1653         
1654 else
1655   
1656         CPPFLAGS="-I/usr/local/include $CPPFLAGS "
1657         
1658
1659 fi
1660
1661 echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
1662 echo "configure:1663: checking for main in -lresolv" >&5
1663 ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
1664 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1665   echo $ac_n "(cached) $ac_c" 1>&6
1666 else
1667   ac_save_LIBS="$LIBS"
1668 LIBS="-lresolv  $LIBS"
1669 cat > conftest.$ac_ext <<EOF
1670 #line 1671 "configure"
1671 #include "confdefs.h"
1672
1673 int main() {
1674 main()
1675 ; return 0; }
1676 EOF
1677 if { (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1678   rm -rf conftest*
1679   eval "ac_cv_lib_$ac_lib_var=yes"
1680 else
1681   echo "configure: failed program was:" >&5
1682   cat conftest.$ac_ext >&5
1683   rm -rf conftest*
1684   eval "ac_cv_lib_$ac_lib_var=no"
1685 fi
1686 rm -f conftest*
1687 LIBS="$ac_save_LIBS"
1688
1689 fi
1690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1691   echo "$ac_t""yes" 1>&6
1692     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1693     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1694   cat >> confdefs.h <<EOF
1695 #define $ac_tr_lib 1
1696 EOF
1697
1698   LIBS="-lresolv $LIBS"
1699
1700 else
1701   echo "$ac_t""no" 1>&6
1702 fi
1703
1704 echo $ac_n "checking for ber_strdup in -llber""... $ac_c" 1>&6
1705 echo "configure:1706: checking for ber_strdup in -llber" >&5
1706 ac_lib_var=`echo lber'_'ber_strdup | sed 'y%./+-%__p_%'`
1707 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1708   echo $ac_n "(cached) $ac_c" 1>&6
1709 else
1710   ac_save_LIBS="$LIBS"
1711 LIBS="-llber  $LIBS"
1712 cat > conftest.$ac_ext <<EOF
1713 #line 1714 "configure"
1714 #include "confdefs.h"
1715 /* Override any gcc2 internal prototype to avoid an error.  */
1716 /* We use char because int might match the return type of a gcc2
1717     builtin and then its argument prototype would still apply.  */
1718 char ber_strdup();
1719
1720 int main() {
1721 ber_strdup()
1722 ; return 0; }
1723 EOF
1724 if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1725   rm -rf conftest*
1726   eval "ac_cv_lib_$ac_lib_var=yes"
1727 else
1728   echo "configure: failed program was:" >&5
1729   cat conftest.$ac_ext >&5
1730   rm -rf conftest*
1731   eval "ac_cv_lib_$ac_lib_var=no"
1732 fi
1733 rm -f conftest*
1734 LIBS="$ac_save_LIBS"
1735
1736 fi
1737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1738   echo "$ac_t""yes" 1>&6
1739   
1740     
1741 else
1742   echo "$ac_t""no" 1>&6
1743
1744         echo "        didn't find ber_strdup in liblber !";
1745         echo "        Check for the right version (>= 2.0) of the OpenLDAP libraries";
1746         echo "        or try the --with-libldap option.";
1747         exit
1748     
1749 fi
1750
1751 echo $ac_n "checking for ldap_add_ext in -lldap""... $ac_c" 1>&6
1752 echo "configure:1753: checking for ldap_add_ext in -lldap" >&5
1753 ac_lib_var=`echo ldap'_'ldap_add_ext | sed 'y%./+-%__p_%'`
1754 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1755   echo $ac_n "(cached) $ac_c" 1>&6
1756 else
1757   ac_save_LIBS="$LIBS"
1758 LIBS="-lldap 
1759     -llber
1760      $LIBS"
1761 cat > conftest.$ac_ext <<EOF
1762 #line 1763 "configure"
1763 #include "confdefs.h"
1764 /* Override any gcc2 internal prototype to avoid an error.  */
1765 /* We use char because int might match the return type of a gcc2
1766     builtin and then its argument prototype would still apply.  */
1767 char ldap_add_ext();
1768
1769 int main() {
1770 ldap_add_ext()
1771 ; return 0; }
1772 EOF
1773 if { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1774   rm -rf conftest*
1775   eval "ac_cv_lib_$ac_lib_var=yes"
1776 else
1777   echo "configure: failed program was:" >&5
1778   cat conftest.$ac_ext >&5
1779   rm -rf conftest*
1780   eval "ac_cv_lib_$ac_lib_var=no"
1781 fi
1782 rm -f conftest*
1783 LIBS="$ac_save_LIBS"
1784
1785 fi
1786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1787   echo "$ac_t""yes" 1>&6
1788   
1789     
1790 else
1791   echo "$ac_t""no" 1>&6
1792
1793         echo "        didn't find ldap_add_ext in libldap !";
1794         echo "        Check for the right version (>= 2.0) of the OpenLDAP libraries";
1795         echo "        or try the --with-libldap option.";
1796         exit
1797     
1798 fi
1799
1800 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1801 echo "configure:1802: checking whether time.h and sys/time.h may both be included" >&5
1802 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1803   echo $ac_n "(cached) $ac_c" 1>&6
1804 else
1805   cat > conftest.$ac_ext <<EOF
1806 #line 1807 "configure"
1807 #include "confdefs.h"
1808 #include <sys/types.h>
1809 #include <sys/time.h>
1810 #include <time.h>
1811 int main() {
1812 struct tm *tp;
1813 ; return 0; }
1814 EOF
1815 if { (eval echo configure:1816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1816   rm -rf conftest*
1817   ac_cv_header_time=yes
1818 else
1819   echo "configure: failed program was:" >&5
1820   cat conftest.$ac_ext >&5
1821   rm -rf conftest*
1822   ac_cv_header_time=no
1823 fi
1824 rm -f conftest*
1825 fi
1826
1827 echo "$ac_t""$ac_cv_header_time" 1>&6
1828 if test $ac_cv_header_time = yes; then
1829   cat >> confdefs.h <<\EOF
1830 #define TIME_WITH_SYS_TIME 1
1831 EOF
1832
1833 fi
1834
1835 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1836 echo "configure:1837: checking how to run the C preprocessor" >&5
1837 # On Suns, sometimes $CPP names a directory.
1838 if test -n "$CPP" && test -d "$CPP"; then
1839   CPP=
1840 fi
1841 if test -z "$CPP"; then
1842 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1843   echo $ac_n "(cached) $ac_c" 1>&6
1844 else
1845     # This must be in double quotes, not single quotes, because CPP may get
1846   # substituted into the Makefile and "${CC-cc}" will confuse make.
1847   CPP="${CC-cc} -E"
1848   # On the NeXT, cc -E runs the code through the compiler's parser,
1849   # not just through cpp.
1850   cat > conftest.$ac_ext <<EOF
1851 #line 1852 "configure"
1852 #include "confdefs.h"
1853 #include <assert.h>
1854 Syntax Error
1855 EOF
1856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1857 { (eval echo configure:1858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1858 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1859 if test -z "$ac_err"; then
1860   :
1861 else
1862   echo "$ac_err" >&5
1863   echo "configure: failed program was:" >&5
1864   cat conftest.$ac_ext >&5
1865   rm -rf conftest*
1866   CPP="${CC-cc} -E -traditional-cpp"
1867   cat > conftest.$ac_ext <<EOF
1868 #line 1869 "configure"
1869 #include "confdefs.h"
1870 #include <assert.h>
1871 Syntax Error
1872 EOF
1873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1874 { (eval echo configure:1875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1876 if test -z "$ac_err"; then
1877   :
1878 else
1879   echo "$ac_err" >&5
1880   echo "configure: failed program was:" >&5
1881   cat conftest.$ac_ext >&5
1882   rm -rf conftest*
1883   CPP="${CC-cc} -nologo -E"
1884   cat > conftest.$ac_ext <<EOF
1885 #line 1886 "configure"
1886 #include "confdefs.h"
1887 #include <assert.h>
1888 Syntax Error
1889 EOF
1890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1891 { (eval echo configure:1892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1893 if test -z "$ac_err"; then
1894   :
1895 else
1896   echo "$ac_err" >&5
1897   echo "configure: failed program was:" >&5
1898   cat conftest.$ac_ext >&5
1899   rm -rf conftest*
1900   CPP=/lib/cpp
1901 fi
1902 rm -f conftest*
1903 fi
1904 rm -f conftest*
1905 fi
1906 rm -f conftest*
1907   ac_cv_prog_CPP="$CPP"
1908 fi
1909   CPP="$ac_cv_prog_CPP"
1910 else
1911   ac_cv_prog_CPP="$CPP"
1912 fi
1913 echo "$ac_t""$CPP" 1>&6
1914
1915 ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
1916 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
1917 echo "configure:1918: checking for ldap.h" >&5
1918 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1919   echo $ac_n "(cached) $ac_c" 1>&6
1920 else
1921   cat > conftest.$ac_ext <<EOF
1922 #line 1923 "configure"
1923 #include "confdefs.h"
1924 #include <ldap.h>
1925 EOF
1926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1927 { (eval echo configure:1928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1929 if test -z "$ac_err"; then
1930   rm -rf conftest*
1931   eval "ac_cv_header_$ac_safe=yes"
1932 else
1933   echo "$ac_err" >&5
1934   echo "configure: failed program was:" >&5
1935   cat conftest.$ac_ext >&5
1936   rm -rf conftest*
1937   eval "ac_cv_header_$ac_safe=no"
1938 fi
1939 rm -f conftest*
1940 fi
1941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1942   echo "$ac_t""yes" 1>&6
1943   :
1944 else
1945   echo "$ac_t""no" 1>&6
1946 fi
1947
1948 cat > conftest.$ac_ext <<EOF
1949 #line 1950 "configure"
1950 #include "confdefs.h"
1951 #include <ldap.h>
1952 EOF
1953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1954   egrep "ldap_add_ext" >/dev/null 2>&1; then
1955   rm -rf conftest*
1956   
1957     
1958 else
1959   rm -rf conftest*
1960   
1961         echo "        didn't find ldap_add_ext in ldap.h!";
1962         echo "        Check for the right version (>= 2.0) of the OpenLDAP includes";
1963         echo "        or try --with-ldap-includes option.";
1964         exit
1965     
1966 fi
1967 rm -f conftest*
1968
1969 ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
1970 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
1971 echo "configure:1972: checking for lber.h" >&5
1972 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1973   echo $ac_n "(cached) $ac_c" 1>&6
1974 else
1975   cat > conftest.$ac_ext <<EOF
1976 #line 1977 "configure"
1977 #include "confdefs.h"
1978 #include <lber.h>
1979 EOF
1980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1981 { (eval echo configure:1982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1983 if test -z "$ac_err"; then
1984   rm -rf conftest*
1985   eval "ac_cv_header_$ac_safe=yes"
1986 else
1987   echo "$ac_err" >&5
1988   echo "configure: failed program was:" >&5
1989   cat conftest.$ac_ext >&5
1990   rm -rf conftest*
1991   eval "ac_cv_header_$ac_safe=no"
1992 fi
1993 rm -f conftest*
1994 fi
1995 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1996   echo "$ac_t""yes" 1>&6
1997   :
1998 else
1999   echo "$ac_t""no" 1>&6
2000 fi
2001
2002 cat > conftest.$ac_ext <<EOF
2003 #line 2004 "configure"
2004 #include "confdefs.h"
2005 #include <lber.h>
2006 EOF
2007 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2008   egrep "ber_strdup" >/dev/null 2>&1; then
2009   rm -rf conftest*
2010   
2011     
2012 else
2013   rm -rf conftest*
2014   
2015         echo "        didn't find ber_strdup in lber.h!";
2016         echo "        Check for the right version (>= 2.0) of the OpenLDAP includes";
2017         echo "        or try --with-ldap-includes option.";
2018         exit
2019     
2020 fi
2021 rm -f conftest*
2022
2023
2024
2025
2026 trap '' 1 2 15
2027
2028 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2029
2030 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2031 # Let make expand exec_prefix.
2032 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2033
2034 # Any assignment to VPATH causes Sun make to only execute
2035 # the first set of double-colon rules, so remove it if not needed.
2036 # If there is a colon in the path, we need to keep it.
2037 if test "x$srcdir" = x.; then
2038   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2039 fi
2040
2041 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2042
2043 DEFS=-DHAVE_CONFIG_H
2044
2045 # Without the "./", some shells look in PATH for config.status.
2046 : ${CONFIG_STATUS=./config.status}
2047
2048 echo creating $CONFIG_STATUS
2049 rm -f $CONFIG_STATUS
2050 cat > $CONFIG_STATUS <<EOF
2051 #! /bin/sh
2052 # Generated automatically by configure.
2053 # Run this file to recreate the current configuration.
2054 # This directory was configured as follows,
2055 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2056 #
2057 # $0 $ac_configure_args
2058 #
2059 # Compiler output produced by configure, useful for debugging
2060 # configure, is in ./config.log if it exists.
2061
2062 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2063 for ac_option
2064 do
2065   case "\$ac_option" in
2066   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2067     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2068     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2069   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2070     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2071     exit 0 ;;
2072   -help | --help | --hel | --he | --h)
2073     echo "\$ac_cs_usage"; exit 0 ;;
2074   *) echo "\$ac_cs_usage"; exit 1 ;;
2075   esac
2076 done
2077
2078 ac_given_srcdir=$srcdir
2079 ac_given_INSTALL="$INSTALL"
2080
2081 trap 'rm -fr `echo "Makefile src/Makefile src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2082 EOF
2083 cat >> $CONFIG_STATUS <<EOF
2084
2085 # Protect against being on the right side of a sed subst in config.status.
2086 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2087  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2088 $ac_vpsub
2089 $extrasub
2090 s%@SHELL@%$SHELL%g
2091 s%@CFLAGS@%$CFLAGS%g
2092 s%@CPPFLAGS@%$CPPFLAGS%g
2093 s%@CXXFLAGS@%$CXXFLAGS%g
2094 s%@FFLAGS@%$FFLAGS%g
2095 s%@DEFS@%$DEFS%g
2096 s%@LDFLAGS@%$LDFLAGS%g
2097 s%@LIBS@%$LIBS%g
2098 s%@exec_prefix@%$exec_prefix%g
2099 s%@prefix@%$prefix%g
2100 s%@program_transform_name@%$program_transform_name%g
2101 s%@bindir@%$bindir%g
2102 s%@sbindir@%$sbindir%g
2103 s%@libexecdir@%$libexecdir%g
2104 s%@datadir@%$datadir%g
2105 s%@sysconfdir@%$sysconfdir%g
2106 s%@sharedstatedir@%$sharedstatedir%g
2107 s%@localstatedir@%$localstatedir%g
2108 s%@libdir@%$libdir%g
2109 s%@includedir@%$includedir%g
2110 s%@oldincludedir@%$oldincludedir%g
2111 s%@infodir@%$infodir%g
2112 s%@mandir@%$mandir%g
2113 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2114 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2115 s%@INSTALL_DATA@%$INSTALL_DATA%g
2116 s%@PACKAGE@%$PACKAGE%g
2117 s%@VERSION@%$VERSION%g
2118 s%@ACLOCAL@%$ACLOCAL%g
2119 s%@AUTOCONF@%$AUTOCONF%g
2120 s%@AUTOMAKE@%$AUTOMAKE%g
2121 s%@AUTOHEADER@%$AUTOHEADER%g
2122 s%@MAKEINFO@%$MAKEINFO%g
2123 s%@SET_MAKE@%$SET_MAKE%g
2124 s%@CXX@%$CXX%g
2125 s%@RANLIB@%$RANLIB%g
2126 s%@host@%$host%g
2127 s%@host_alias@%$host_alias%g
2128 s%@host_cpu@%$host_cpu%g
2129 s%@host_vendor@%$host_vendor%g
2130 s%@host_os@%$host_os%g
2131 s%@build@%$build%g
2132 s%@build_alias@%$build_alias%g
2133 s%@build_cpu@%$build_cpu%g
2134 s%@build_vendor@%$build_vendor%g
2135 s%@build_os@%$build_os%g
2136 s%@CC@%$CC%g
2137 s%@LN_S@%$LN_S%g
2138 s%@LIBTOOL@%$LIBTOOL%g
2139 s%@CPP@%$CPP%g
2140
2141 CEOF
2142 EOF
2143
2144 cat >> $CONFIG_STATUS <<\EOF
2145
2146 # Split the substitutions into bite-sized pieces for seds with
2147 # small command number limits, like on Digital OSF/1 and HP-UX.
2148 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2149 ac_file=1 # Number of current file.
2150 ac_beg=1 # First line for current file.
2151 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2152 ac_more_lines=:
2153 ac_sed_cmds=""
2154 while $ac_more_lines; do
2155   if test $ac_beg -gt 1; then
2156     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2157   else
2158     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2159   fi
2160   if test ! -s conftest.s$ac_file; then
2161     ac_more_lines=false
2162     rm -f conftest.s$ac_file
2163   else
2164     if test -z "$ac_sed_cmds"; then
2165       ac_sed_cmds="sed -f conftest.s$ac_file"
2166     else
2167       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2168     fi
2169     ac_file=`expr $ac_file + 1`
2170     ac_beg=$ac_end
2171     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2172   fi
2173 done
2174 if test -z "$ac_sed_cmds"; then
2175   ac_sed_cmds=cat
2176 fi
2177 EOF
2178
2179 cat >> $CONFIG_STATUS <<EOF
2180
2181 CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile"}
2182 EOF
2183 cat >> $CONFIG_STATUS <<\EOF
2184 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2185   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2186   case "$ac_file" in
2187   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2188        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2189   *) ac_file_in="${ac_file}.in" ;;
2190   esac
2191
2192   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2193
2194   # Remove last slash and all that follows it.  Not all systems have dirname.
2195   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2196   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2197     # The file is in a subdirectory.
2198     test ! -d "$ac_dir" && mkdir "$ac_dir"
2199     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2200     # A "../" for each directory in $ac_dir_suffix.
2201     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2202   else
2203     ac_dir_suffix= ac_dots=
2204   fi
2205
2206   case "$ac_given_srcdir" in
2207   .)  srcdir=.
2208       if test -z "$ac_dots"; then top_srcdir=.
2209       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2210   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2211   *) # Relative path.
2212     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2213     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2214   esac
2215
2216   case "$ac_given_INSTALL" in
2217   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2218   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2219   esac
2220
2221   echo creating "$ac_file"
2222   rm -f "$ac_file"
2223   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2224   case "$ac_file" in
2225   *Makefile*) ac_comsub="1i\\
2226 # $configure_input" ;;
2227   *) ac_comsub= ;;
2228   esac
2229
2230   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2231   sed -e "$ac_comsub
2232 s%@configure_input@%$configure_input%g
2233 s%@srcdir@%$srcdir%g
2234 s%@top_srcdir@%$top_srcdir%g
2235 s%@INSTALL@%$INSTALL%g
2236 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2237 fi; done
2238 rm -f conftest.s*
2239
2240 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2241 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2242 #
2243 # ac_d sets the value in "#define NAME VALUE" lines.
2244 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2245 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2246 ac_dC='\3'
2247 ac_dD='%g'
2248 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2249 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2250 ac_uB='\([      ]\)%\1#\2define\3'
2251 ac_uC=' '
2252 ac_uD='\4%g'
2253 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2254 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2255 ac_eB='$%\1#\2define\3'
2256 ac_eC=' '
2257 ac_eD='%g'
2258
2259 if test "${CONFIG_HEADERS+set}" != set; then
2260 EOF
2261 cat >> $CONFIG_STATUS <<EOF
2262   CONFIG_HEADERS="src/config.h"
2263 EOF
2264 cat >> $CONFIG_STATUS <<\EOF
2265 fi
2266 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2267   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2268   case "$ac_file" in
2269   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2270        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2271   *) ac_file_in="${ac_file}.in" ;;
2272   esac
2273
2274   echo creating $ac_file
2275
2276   rm -f conftest.frag conftest.in conftest.out
2277   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2278   cat $ac_file_inputs > conftest.in
2279
2280 EOF
2281
2282 # Transform confdefs.h into a sed script conftest.vals that substitutes
2283 # the proper values into config.h.in to produce config.h.  And first:
2284 # Protect against being on the right side of a sed subst in config.status.
2285 # Protect against being in an unquoted here document in config.status.
2286 rm -f conftest.vals
2287 cat > conftest.hdr <<\EOF
2288 s/[\\&%]/\\&/g
2289 s%[\\$`]%\\&%g
2290 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2291 s%ac_d%ac_u%gp
2292 s%ac_u%ac_e%gp
2293 EOF
2294 sed -n -f conftest.hdr confdefs.h > conftest.vals
2295 rm -f conftest.hdr
2296
2297 # This sed command replaces #undef with comments.  This is necessary, for
2298 # example, in the case of _POSIX_SOURCE, which is predefined and required
2299 # on some systems where configure will not decide to define it.
2300 cat >> conftest.vals <<\EOF
2301 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2302 EOF
2303
2304 # Break up conftest.vals because some shells have a limit on
2305 # the size of here documents, and old seds have small limits too.
2306
2307 rm -f conftest.tail
2308 while :
2309 do
2310   ac_lines=`grep -c . conftest.vals`
2311   # grep -c gives empty output for an empty file on some AIX systems.
2312   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2313   # Write a limited-size here document to conftest.frag.
2314   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2315   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2316   echo 'CEOF
2317   sed -f conftest.frag conftest.in > conftest.out
2318   rm -f conftest.in
2319   mv conftest.out conftest.in
2320 ' >> $CONFIG_STATUS
2321   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2322   rm -f conftest.vals
2323   mv conftest.tail conftest.vals
2324 done
2325 rm -f conftest.vals
2326
2327 cat >> $CONFIG_STATUS <<\EOF
2328   rm -f conftest.frag conftest.h
2329   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2330   cat conftest.in >> conftest.h
2331   rm -f conftest.in
2332   if cmp -s $ac_file conftest.h 2>/dev/null; then
2333     echo "$ac_file is unchanged"
2334     rm -f conftest.h
2335   else
2336     # Remove last slash and all that follows it.  Not all systems have dirname.
2337       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2338       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2339       # The file is in a subdirectory.
2340       test ! -d "$ac_dir" && mkdir "$ac_dir"
2341     fi
2342     rm -f $ac_file
2343     mv conftest.h $ac_file
2344   fi
2345 fi; done
2346
2347 EOF
2348 cat >> $CONFIG_STATUS <<EOF
2349
2350
2351 EOF
2352 cat >> $CONFIG_STATUS <<\EOF
2353 test -z "$CONFIG_HEADERS" || echo timestamp > src/stamp-h
2354
2355 exit 0
2356 EOF
2357 chmod +x $CONFIG_STATUS
2358 rm -fr confdefs* $ac_clean_files
2359 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2360