7a31bfea8fc6eb1d198ce01c3141cfc42861bbe8
[tac_plus.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-pam            With PAM Support   "
16 ac_help="$ac_help
17   --with-ldap           With LDAP Support   "
18 ac_help="$ac_help
19   --with-db             For DB Support   "
20 ac_help="$ac_help
21   --with-mysql          With MySQL Support   "
22 ac_help="$ac_help
23   --with-mysql-prefix=PREFIX  Mysql prefix [default=/usr]"
24 ac_help="$ac_help
25   --with-pgsql          With PgSQL Support   "
26 ac_help="$ac_help
27   --with-pgsql-prefix=PREFIX  PgSQL prefix [default=/usr]"
28 ac_help="$ac_help
29   --with-tacuid=ID      If you like to run tac_plus other than root user (no default value) "
30 ac_help="$ac_help
31   --with-tacgid=GID     If you like to run tac_plus other than root group(no default value) "
32 ac_help="$ac_help
33   --enable-maxsess      Enable maxsess feature "
34 ac_help="$ac_help
35   --with-tacplus_pid=PREFIX  Tac_plus pid file location [default=/var/run] "
36 ac_help="$ac_help
37   --with-libwrap[=PATH]   Compile in libwrap (tcp_wrappers) support."
38
39 # Initialize some variables set by options.
40 # The variables have the same names as the options, with
41 # dashes changed to underlines.
42 build=NONE
43 cache_file=./config.cache
44 exec_prefix=NONE
45 host=NONE
46 no_create=
47 nonopt=NONE
48 no_recursion=
49 prefix=NONE
50 program_prefix=NONE
51 program_suffix=NONE
52 program_transform_name=s,x,x,
53 silent=
54 site=
55 srcdir=
56 target=NONE
57 verbose=
58 x_includes=NONE
59 x_libraries=NONE
60 bindir='${exec_prefix}/bin'
61 sbindir='${exec_prefix}/sbin'
62 libexecdir='${exec_prefix}/libexec'
63 datadir='${prefix}/share'
64 sysconfdir='${prefix}/etc'
65 sharedstatedir='${prefix}/com'
66 localstatedir='${prefix}/var'
67 libdir='${exec_prefix}/lib'
68 includedir='${prefix}/include'
69 oldincludedir='/usr/include'
70 infodir='${prefix}/info'
71 mandir='${prefix}/man'
72
73 # Initialize some other variables.
74 subdirs=
75 MFLAGS= MAKEFLAGS=
76 SHELL=${CONFIG_SHELL-/bin/sh}
77 # Maximum number of lines to put in a shell here document.
78 ac_max_here_lines=12
79
80 ac_prev=
81 for ac_option
82 do
83
84   # If the previous option needs an argument, assign it.
85   if test -n "$ac_prev"; then
86     eval "$ac_prev=\$ac_option"
87     ac_prev=
88     continue
89   fi
90
91   case "$ac_option" in
92   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
93   *) ac_optarg= ;;
94   esac
95
96   # Accept the important Cygnus configure options, so we can diagnose typos.
97
98   case "$ac_option" in
99
100   -bindir | --bindir | --bindi | --bind | --bin | --bi)
101     ac_prev=bindir ;;
102   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
103     bindir="$ac_optarg" ;;
104
105   -build | --build | --buil | --bui | --bu)
106     ac_prev=build ;;
107   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
108     build="$ac_optarg" ;;
109
110   -cache-file | --cache-file | --cache-fil | --cache-fi \
111   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
112     ac_prev=cache_file ;;
113   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
114   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
115     cache_file="$ac_optarg" ;;
116
117   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
118     ac_prev=datadir ;;
119   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
120   | --da=*)
121     datadir="$ac_optarg" ;;
122
123   -disable-* | --disable-*)
124     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
125     # Reject names that are not valid shell variable names.
126     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
127       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
128     fi
129     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
130     eval "enable_${ac_feature}=no" ;;
131
132   -enable-* | --enable-*)
133     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
134     # Reject names that are not valid shell variable names.
135     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
136       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
137     fi
138     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
139     case "$ac_option" in
140       *=*) ;;
141       *) ac_optarg=yes ;;
142     esac
143     eval "enable_${ac_feature}='$ac_optarg'" ;;
144
145   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
146   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
147   | --exec | --exe | --ex)
148     ac_prev=exec_prefix ;;
149   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
150   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
151   | --exec=* | --exe=* | --ex=*)
152     exec_prefix="$ac_optarg" ;;
153
154   -gas | --gas | --ga | --g)
155     # Obsolete; use --with-gas.
156     with_gas=yes ;;
157
158   -help | --help | --hel | --he)
159     # Omit some internal or obsolete options to make the list less imposing.
160     # This message is too long to be a string in the A/UX 3.1 sh.
161     cat << EOF
162 Usage: configure [options] [host]
163 Options: [defaults in brackets after descriptions]
164 Configuration:
165   --cache-file=FILE       cache test results in FILE
166   --help                  print this message
167   --no-create             do not create output files
168   --quiet, --silent       do not print \`checking...' messages
169   --version               print the version of autoconf that created configure
170 Directory and file names:
171   --prefix=PREFIX         install architecture-independent files in PREFIX
172                           [$ac_default_prefix]
173   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
174                           [same as prefix]
175   --bindir=DIR            user executables in DIR [EPREFIX/bin]
176   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
177   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
178   --datadir=DIR           read-only architecture-independent data in DIR
179                           [PREFIX/share]
180   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
181   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
182                           [PREFIX/com]
183   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
184   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
185   --includedir=DIR        C header files in DIR [PREFIX/include]
186   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
187   --infodir=DIR           info documentation in DIR [PREFIX/info]
188   --mandir=DIR            man documentation in DIR [PREFIX/man]
189   --srcdir=DIR            find the sources in DIR [configure dir or ..]
190   --program-prefix=PREFIX prepend PREFIX to installed program names
191   --program-suffix=SUFFIX append SUFFIX to installed program names
192   --program-transform-name=PROGRAM
193                           run sed PROGRAM on installed program names
194 EOF
195     cat << EOF
196 Host type:
197   --build=BUILD           configure for building on BUILD [BUILD=HOST]
198   --host=HOST             configure for HOST [guessed]
199   --target=TARGET         configure for TARGET [TARGET=HOST]
200 Features and packages:
201   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
202   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
203   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
204   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
205   --x-includes=DIR        X include files are in DIR
206   --x-libraries=DIR       X library files are in DIR
207 EOF
208     if test -n "$ac_help"; then
209       echo "--enable and --with options recognized:$ac_help"
210     fi
211     exit 0 ;;
212
213   -host | --host | --hos | --ho)
214     ac_prev=host ;;
215   -host=* | --host=* | --hos=* | --ho=*)
216     host="$ac_optarg" ;;
217
218   -includedir | --includedir | --includedi | --included | --include \
219   | --includ | --inclu | --incl | --inc)
220     ac_prev=includedir ;;
221   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
222   | --includ=* | --inclu=* | --incl=* | --inc=*)
223     includedir="$ac_optarg" ;;
224
225   -infodir | --infodir | --infodi | --infod | --info | --inf)
226     ac_prev=infodir ;;
227   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
228     infodir="$ac_optarg" ;;
229
230   -libdir | --libdir | --libdi | --libd)
231     ac_prev=libdir ;;
232   -libdir=* | --libdir=* | --libdi=* | --libd=*)
233     libdir="$ac_optarg" ;;
234
235   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
236   | --libexe | --libex | --libe)
237     ac_prev=libexecdir ;;
238   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
239   | --libexe=* | --libex=* | --libe=*)
240     libexecdir="$ac_optarg" ;;
241
242   -localstatedir | --localstatedir | --localstatedi | --localstated \
243   | --localstate | --localstat | --localsta | --localst \
244   | --locals | --local | --loca | --loc | --lo)
245     ac_prev=localstatedir ;;
246   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
247   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
248   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
249     localstatedir="$ac_optarg" ;;
250
251   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
252     ac_prev=mandir ;;
253   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
254     mandir="$ac_optarg" ;;
255
256   -nfp | --nfp | --nf)
257     # Obsolete; use --without-fp.
258     with_fp=no ;;
259
260   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
261   | --no-cr | --no-c)
262     no_create=yes ;;
263
264   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
265   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
266     no_recursion=yes ;;
267
268   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
269   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
270   | --oldin | --oldi | --old | --ol | --o)
271     ac_prev=oldincludedir ;;
272   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
273   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
274   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
275     oldincludedir="$ac_optarg" ;;
276
277   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
278     ac_prev=prefix ;;
279   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
280     prefix="$ac_optarg" ;;
281
282   -program-prefix | --program-prefix | --program-prefi | --program-pref \
283   | --program-pre | --program-pr | --program-p)
284     ac_prev=program_prefix ;;
285   -program-prefix=* | --program-prefix=* | --program-prefi=* \
286   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
287     program_prefix="$ac_optarg" ;;
288
289   -program-suffix | --program-suffix | --program-suffi | --program-suff \
290   | --program-suf | --program-su | --program-s)
291     ac_prev=program_suffix ;;
292   -program-suffix=* | --program-suffix=* | --program-suffi=* \
293   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
294     program_suffix="$ac_optarg" ;;
295
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     ac_prev=program_transform_name ;;
304   -program-transform-name=* | --program-transform-name=* \
305   | --program-transform-nam=* | --program-transform-na=* \
306   | --program-transform-n=* | --program-transform-=* \
307   | --program-transform=* | --program-transfor=* \
308   | --program-transfo=* | --program-transf=* \
309   | --program-trans=* | --program-tran=* \
310   | --progr-tra=* | --program-tr=* | --program-t=*)
311     program_transform_name="$ac_optarg" ;;
312
313   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
314   | -silent | --silent | --silen | --sile | --sil)
315     silent=yes ;;
316
317   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
318     ac_prev=sbindir ;;
319   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
320   | --sbi=* | --sb=*)
321     sbindir="$ac_optarg" ;;
322
323   -sharedstatedir | --sharedstatedir | --sharedstatedi \
324   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
325   | --sharedst | --shareds | --shared | --share | --shar \
326   | --sha | --sh)
327     ac_prev=sharedstatedir ;;
328   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
329   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
330   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
331   | --sha=* | --sh=*)
332     sharedstatedir="$ac_optarg" ;;
333
334   -site | --site | --sit)
335     ac_prev=site ;;
336   -site=* | --site=* | --sit=*)
337     site="$ac_optarg" ;;
338
339   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
340     ac_prev=srcdir ;;
341   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
342     srcdir="$ac_optarg" ;;
343
344   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
345   | --syscon | --sysco | --sysc | --sys | --sy)
346     ac_prev=sysconfdir ;;
347   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
348   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
349     sysconfdir="$ac_optarg" ;;
350
351   -target | --target | --targe | --targ | --tar | --ta | --t)
352     ac_prev=target ;;
353   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
354     target="$ac_optarg" ;;
355
356   -v | -verbose | --verbose | --verbos | --verbo | --verb)
357     verbose=yes ;;
358
359   -version | --version | --versio | --versi | --vers)
360     echo "configure generated by autoconf version 2.13"
361     exit 0 ;;
362
363   -with-* | --with-*)
364     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
365     # Reject names that are not valid shell variable names.
366     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
367       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
368     fi
369     ac_package=`echo $ac_package| sed 's/-/_/g'`
370     case "$ac_option" in
371       *=*) ;;
372       *) ac_optarg=yes ;;
373     esac
374     eval "with_${ac_package}='$ac_optarg'" ;;
375
376   -without-* | --without-*)
377     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
378     # Reject names that are not valid shell variable names.
379     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
380       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
381     fi
382     ac_package=`echo $ac_package| sed 's/-/_/g'`
383     eval "with_${ac_package}=no" ;;
384
385   --x)
386     # Obsolete; use --with-x.
387     with_x=yes ;;
388
389   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
390   | --x-incl | --x-inc | --x-in | --x-i)
391     ac_prev=x_includes ;;
392   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
393   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
394     x_includes="$ac_optarg" ;;
395
396   -x-libraries | --x-libraries | --x-librarie | --x-librari \
397   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
398     ac_prev=x_libraries ;;
399   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
400   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
401     x_libraries="$ac_optarg" ;;
402
403   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
404     ;;
405
406   *)
407     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
408       echo "configure: warning: $ac_option: invalid host type" 1>&2
409     fi
410     if test "x$nonopt" != xNONE; then
411       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
412     fi
413     nonopt="$ac_option"
414     ;;
415
416   esac
417 done
418
419 if test -n "$ac_prev"; then
420   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
421 fi
422
423 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
424
425 # File descriptor usage:
426 # 0 standard input
427 # 1 file creation
428 # 2 errors and warnings
429 # 3 some systems may open it to /dev/tty
430 # 4 used on the Kubota Titan
431 # 6 checking for... messages and results
432 # 5 compiler messages saved in config.log
433 if test "$silent" = yes; then
434   exec 6>/dev/null
435 else
436   exec 6>&1
437 fi
438 exec 5>./config.log
439
440 echo "\
441 This file contains any messages produced by compilers while
442 running configure, to aid debugging if configure makes a mistake.
443 " 1>&5
444
445 # Strip out --no-create and --no-recursion so they do not pile up.
446 # Also quote any args containing shell metacharacters.
447 ac_configure_args=
448 for ac_arg
449 do
450   case "$ac_arg" in
451   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
452   | --no-cr | --no-c) ;;
453   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
454   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
455   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
456   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
457   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
458   esac
459 done
460
461 # NLS nuisances.
462 # Only set these to C if already set.  These must not be set unconditionally
463 # because not all systems understand e.g. LANG=C (notably SCO).
464 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
465 # Non-C LC_CTYPE values break the ctype check.
466 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
467 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
468 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
469 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
470
471 # confdefs.h avoids OS command line length limits that DEFS can exceed.
472 rm -rf conftest* confdefs.h
473 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
474 echo > confdefs.h
475
476 # A filename unique to this package, relative to the directory that
477 # configure is in, which we can look for to find out if srcdir is correct.
478 ac_unique_file=
479
480 # Find the source files, if location was not specified.
481 if test -z "$srcdir"; then
482   ac_srcdir_defaulted=yes
483   # Try the directory containing this script, then its parent.
484   ac_prog=$0
485   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
486   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
487   srcdir=$ac_confdir
488   if test ! -r $srcdir/$ac_unique_file; then
489     srcdir=..
490   fi
491 else
492   ac_srcdir_defaulted=no
493 fi
494 if test ! -r $srcdir/$ac_unique_file; then
495   if test "$ac_srcdir_defaulted" = yes; then
496     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
497   else
498     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
499   fi
500 fi
501 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
502
503 # Prefer explicitly selected file to automatically selected ones.
504 if test -z "$CONFIG_SITE"; then
505   if test "x$prefix" != xNONE; then
506     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
507   else
508     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
509   fi
510 fi
511 for ac_site_file in $CONFIG_SITE; do
512   if test -r "$ac_site_file"; then
513     echo "loading site script $ac_site_file"
514     . "$ac_site_file"
515   fi
516 done
517
518 if test -r "$cache_file"; then
519   echo "loading cache $cache_file"
520   . $cache_file
521 else
522   echo "creating cache $cache_file"
523   > $cache_file
524 fi
525
526 ac_ext=c
527 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
528 ac_cpp='$CPP $CPPFLAGS'
529 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
530 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
531 cross_compiling=$ac_cv_prog_cc_cross
532
533 ac_exeext=
534 ac_objext=o
535 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
536   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
537   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
538     ac_n= ac_c='
539 ' ac_t='        '
540   else
541     ac_n=-n ac_c= ac_t=
542   fi
543 else
544   ac_n= ac_c='\c' ac_t=
545 fi
546
547
548
549 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
550 echo "configure:551: checking whether ${MAKE-make} sets \${MAKE}" >&5
551 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
552 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
553   echo $ac_n "(cached) $ac_c" 1>&6
554 else
555   cat > conftestmake <<\EOF
556 all:
557         @echo 'ac_maketemp="${MAKE}"'
558 EOF
559 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
560 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
561 if test -n "$ac_maketemp"; then
562   eval ac_cv_prog_make_${ac_make}_set=yes
563 else
564   eval ac_cv_prog_make_${ac_make}_set=no
565 fi
566 rm -f conftestmake
567 fi
568 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
569   echo "$ac_t""yes" 1>&6
570   SET_MAKE=
571 else
572   echo "$ac_t""no" 1>&6
573   SET_MAKE="MAKE=${MAKE-make}"
574 fi
575
576 # Extract the first word of "gcc", so it can be a program name with args.
577 set dummy gcc; ac_word=$2
578 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
579 echo "configure:580: checking for $ac_word" >&5
580 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
581   echo $ac_n "(cached) $ac_c" 1>&6
582 else
583   if test -n "$CC"; then
584   ac_cv_prog_CC="$CC" # Let the user override the test.
585 else
586   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
587   ac_dummy="$PATH"
588   for ac_dir in $ac_dummy; do
589     test -z "$ac_dir" && ac_dir=.
590     if test -f $ac_dir/$ac_word; then
591       ac_cv_prog_CC="gcc"
592       break
593     fi
594   done
595   IFS="$ac_save_ifs"
596 fi
597 fi
598 CC="$ac_cv_prog_CC"
599 if test -n "$CC"; then
600   echo "$ac_t""$CC" 1>&6
601 else
602   echo "$ac_t""no" 1>&6
603 fi
604
605 if test -z "$CC"; then
606   # Extract the first word of "cc", so it can be a program name with args.
607 set dummy cc; ac_word=$2
608 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
609 echo "configure:610: checking for $ac_word" >&5
610 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
611   echo $ac_n "(cached) $ac_c" 1>&6
612 else
613   if test -n "$CC"; then
614   ac_cv_prog_CC="$CC" # Let the user override the test.
615 else
616   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
617   ac_prog_rejected=no
618   ac_dummy="$PATH"
619   for ac_dir in $ac_dummy; do
620     test -z "$ac_dir" && ac_dir=.
621     if test -f $ac_dir/$ac_word; then
622       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
623         ac_prog_rejected=yes
624         continue
625       fi
626       ac_cv_prog_CC="cc"
627       break
628     fi
629   done
630   IFS="$ac_save_ifs"
631 if test $ac_prog_rejected = yes; then
632   # We found a bogon in the path, so make sure we never use it.
633   set dummy $ac_cv_prog_CC
634   shift
635   if test $# -gt 0; then
636     # We chose a different compiler from the bogus one.
637     # However, it has the same basename, so the bogon will be chosen
638     # first if we set CC to just the basename; use the full file name.
639     shift
640     set dummy "$ac_dir/$ac_word" "$@"
641     shift
642     ac_cv_prog_CC="$@"
643   fi
644 fi
645 fi
646 fi
647 CC="$ac_cv_prog_CC"
648 if test -n "$CC"; then
649   echo "$ac_t""$CC" 1>&6
650 else
651   echo "$ac_t""no" 1>&6
652 fi
653
654   if test -z "$CC"; then
655     case "`uname -s`" in
656     *win32* | *WIN32*)
657       # Extract the first word of "cl", so it can be a program name with args.
658 set dummy cl; ac_word=$2
659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
660 echo "configure:661: checking for $ac_word" >&5
661 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
662   echo $ac_n "(cached) $ac_c" 1>&6
663 else
664   if test -n "$CC"; then
665   ac_cv_prog_CC="$CC" # Let the user override the test.
666 else
667   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
668   ac_dummy="$PATH"
669   for ac_dir in $ac_dummy; do
670     test -z "$ac_dir" && ac_dir=.
671     if test -f $ac_dir/$ac_word; then
672       ac_cv_prog_CC="cl"
673       break
674     fi
675   done
676   IFS="$ac_save_ifs"
677 fi
678 fi
679 CC="$ac_cv_prog_CC"
680 if test -n "$CC"; then
681   echo "$ac_t""$CC" 1>&6
682 else
683   echo "$ac_t""no" 1>&6
684 fi
685  ;;
686     esac
687   fi
688   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
689 fi
690
691 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
692 echo "configure:693: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
693
694 ac_ext=c
695 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
696 ac_cpp='$CPP $CPPFLAGS'
697 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
698 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
699 cross_compiling=$ac_cv_prog_cc_cross
700
701 cat > conftest.$ac_ext << EOF
702
703 #line 704 "configure"
704 #include "confdefs.h"
705
706 main(){return(0);}
707 EOF
708 if { (eval echo configure:709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
709   ac_cv_prog_cc_works=yes
710   # If we can't run a trivial program, we are probably using a cross compiler.
711   if (./conftest; exit) 2>/dev/null; then
712     ac_cv_prog_cc_cross=no
713   else
714     ac_cv_prog_cc_cross=yes
715   fi
716 else
717   echo "configure: failed program was:" >&5
718   cat conftest.$ac_ext >&5
719   ac_cv_prog_cc_works=no
720 fi
721 rm -fr conftest*
722 ac_ext=c
723 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
724 ac_cpp='$CPP $CPPFLAGS'
725 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
726 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
727 cross_compiling=$ac_cv_prog_cc_cross
728
729 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
730 if test $ac_cv_prog_cc_works = no; then
731   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
732 fi
733 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
734 echo "configure:735: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
735 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
736 cross_compiling=$ac_cv_prog_cc_cross
737
738 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
739 echo "configure:740: checking whether we are using GNU C" >&5
740 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
741   echo $ac_n "(cached) $ac_c" 1>&6
742 else
743   cat > conftest.c <<EOF
744 #ifdef __GNUC__
745   yes;
746 #endif
747 EOF
748 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
749   ac_cv_prog_gcc=yes
750 else
751   ac_cv_prog_gcc=no
752 fi
753 fi
754
755 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
756
757 if test $ac_cv_prog_gcc = yes; then
758   GCC=yes
759 else
760   GCC=
761 fi
762
763 ac_test_CFLAGS="${CFLAGS+set}"
764 ac_save_CFLAGS="$CFLAGS"
765 CFLAGS=
766 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
767 echo "configure:768: checking whether ${CC-cc} accepts -g" >&5
768 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
769   echo $ac_n "(cached) $ac_c" 1>&6
770 else
771   echo 'void f(){}' > conftest.c
772 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
773   ac_cv_prog_cc_g=yes
774 else
775   ac_cv_prog_cc_g=no
776 fi
777 rm -f conftest*
778
779 fi
780
781 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
782 if test "$ac_test_CFLAGS" = set; then
783   CFLAGS="$ac_save_CFLAGS"
784 elif test $ac_cv_prog_cc_g = yes; then
785   if test "$GCC" = yes; then
786     CFLAGS="-g -O2"
787   else
788     CFLAGS="-g"
789   fi
790 else
791   if test "$GCC" = yes; then
792     CFLAGS="-O2"
793   else
794     CFLAGS=
795   fi
796 fi
797
798
799 ac_aux_dir=
800 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
801   if test -f $ac_dir/install-sh; then
802     ac_aux_dir=$ac_dir
803     ac_install_sh="$ac_aux_dir/install-sh -c"
804     break
805   elif test -f $ac_dir/install.sh; then
806     ac_aux_dir=$ac_dir
807     ac_install_sh="$ac_aux_dir/install.sh -c"
808     break
809   fi
810 done
811 if test -z "$ac_aux_dir"; then
812   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
813 fi
814 ac_config_guess=$ac_aux_dir/config.guess
815 ac_config_sub=$ac_aux_dir/config.sub
816 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
817
818
819 # Do some error checking and defaulting for the host and target type.
820 # The inputs are:
821 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
822 #
823 # The rules are:
824 # 1. You are not allowed to specify --host, --target, and nonopt at the
825 #    same time.
826 # 2. Host defaults to nonopt.
827 # 3. If nonopt is not specified, then host defaults to the current host,
828 #    as determined by config.guess.
829 # 4. Target and build default to nonopt.
830 # 5. If nonopt is not specified, then target and build default to host.
831
832 # The aliases save the names the user supplied, while $host etc.
833 # will get canonicalized.
834 case $host---$target---$nonopt in
835 NONE---*---* | *---NONE---* | *---*---NONE) ;;
836 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
837 esac
838
839
840 # Make sure we can run config.sub.
841 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
842 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
843 fi
844
845 echo $ac_n "checking host system type""... $ac_c" 1>&6
846 echo "configure:847: checking host system type" >&5
847
848 host_alias=$host
849 case "$host_alias" in
850 NONE)
851   case $nonopt in
852   NONE)
853     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
854     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
855     fi ;;
856   *) host_alias=$nonopt ;;
857   esac ;;
858 esac
859
860 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
861 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
862 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
863 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
864 echo "$ac_t""$host" 1>&6
865
866 echo $ac_n "checking target system type""... $ac_c" 1>&6
867 echo "configure:868: checking target system type" >&5
868
869 target_alias=$target
870 case "$target_alias" in
871 NONE)
872   case $nonopt in
873   NONE) target_alias=$host_alias ;;
874   *) target_alias=$nonopt ;;
875   esac ;;
876 esac
877
878 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
879 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
880 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
881 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
882 echo "$ac_t""$target" 1>&6
883
884 echo $ac_n "checking build system type""... $ac_c" 1>&6
885 echo "configure:886: checking build system type" >&5
886
887 build_alias=$build
888 case "$build_alias" in
889 NONE)
890   case $nonopt in
891   NONE) build_alias=$host_alias ;;
892   *) build_alias=$nonopt ;;
893   esac ;;
894 esac
895
896 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
897 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
898 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
899 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
900 echo "$ac_t""$build" 1>&6
901
902 test "$host_alias" != "$target_alias" &&
903   test "$program_prefix$program_suffix$program_transform_name" = \
904     NONENONEs,x,x, &&
905   program_prefix=${target_alias}-
906
907
908 case $host_os in 
909         *linux-gnu)
910         OS="-DLINUX -DGLIBC"
911         ;;
912         *solaris)
913         OS="-DSOLARIS"
914         ;;
915         *freebsd)
916         OS="-DFREEBSD"
917         ;;
918         *hpux)
919         OS="-DHPUX"
920         ;;
921         *aix)
922         OS="-DAIX"
923         ;;
924         *)
925         ;;
926 esac
927         
928 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
929 echo "configure:930: checking for main in -lnsl" >&5
930 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
931 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
932   echo $ac_n "(cached) $ac_c" 1>&6
933 else
934   ac_save_LIBS="$LIBS"
935 LIBS="-lnsl  $LIBS"
936 cat > conftest.$ac_ext <<EOF
937 #line 938 "configure"
938 #include "confdefs.h"
939
940 int main() {
941 main()
942 ; return 0; }
943 EOF
944 if { (eval echo configure:945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
945   rm -rf conftest*
946   eval "ac_cv_lib_$ac_lib_var=yes"
947 else
948   echo "configure: failed program was:" >&5
949   cat conftest.$ac_ext >&5
950   rm -rf conftest*
951   eval "ac_cv_lib_$ac_lib_var=no"
952 fi
953 rm -f conftest*
954 LIBS="$ac_save_LIBS"
955
956 fi
957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
958   echo "$ac_t""yes" 1>&6
959     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
960     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
961   cat >> confdefs.h <<EOF
962 #define $ac_tr_lib 1
963 EOF
964
965   LIBS="-lnsl $LIBS"
966
967 else
968   echo "$ac_t""no" 1>&6
969 fi
970
971 echo $ac_n "checking for main in -log""... $ac_c" 1>&6
972 echo "configure:973: checking for main in -log" >&5
973 ac_lib_var=`echo og'_'main | sed 'y%./+-%__p_%'`
974 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
975   echo $ac_n "(cached) $ac_c" 1>&6
976 else
977   ac_save_LIBS="$LIBS"
978 LIBS="-log  $LIBS"
979 cat > conftest.$ac_ext <<EOF
980 #line 981 "configure"
981 #include "confdefs.h"
982
983 int main() {
984 main()
985 ; return 0; }
986 EOF
987 if { (eval echo configure:988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
988   rm -rf conftest*
989   eval "ac_cv_lib_$ac_lib_var=yes"
990 else
991   echo "configure: failed program was:" >&5
992   cat conftest.$ac_ext >&5
993   rm -rf conftest*
994   eval "ac_cv_lib_$ac_lib_var=no"
995 fi
996 rm -f conftest*
997 LIBS="$ac_save_LIBS"
998
999 fi
1000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1001   echo "$ac_t""yes" 1>&6
1002     ac_tr_lib=HAVE_LIB`echo og | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1003     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1004   cat >> confdefs.h <<EOF
1005 #define $ac_tr_lib 1
1006 EOF
1007
1008   LIBS="-log $LIBS"
1009
1010 else
1011   echo "$ac_t""no" 1>&6
1012 fi
1013
1014 echo $ac_n "checking for main in -lldap""... $ac_c" 1>&6
1015 echo "configure:1016: checking for main in -lldap" >&5
1016 ac_lib_var=`echo ldap'_'main | sed 'y%./+-%__p_%'`
1017 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1018   echo $ac_n "(cached) $ac_c" 1>&6
1019 else
1020   ac_save_LIBS="$LIBS"
1021 LIBS="-lldap  $LIBS"
1022 cat > conftest.$ac_ext <<EOF
1023 #line 1024 "configure"
1024 #include "confdefs.h"
1025
1026 int main() {
1027 main()
1028 ; return 0; }
1029 EOF
1030 if { (eval echo configure:1031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1031   rm -rf conftest*
1032   eval "ac_cv_lib_$ac_lib_var=yes"
1033 else
1034   echo "configure: failed program was:" >&5
1035   cat conftest.$ac_ext >&5
1036   rm -rf conftest*
1037   eval "ac_cv_lib_$ac_lib_var=no"
1038 fi
1039 rm -f conftest*
1040 LIBS="$ac_save_LIBS"
1041
1042 fi
1043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1044   echo "$ac_t""yes" 1>&6
1045     ac_tr_lib=HAVE_LIB`echo ldap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1046     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1047   cat >> confdefs.h <<EOF
1048 #define $ac_tr_lib 1
1049 EOF
1050
1051   LIBS="-lldap $LIBS"
1052
1053 else
1054   echo "$ac_t""no" 1>&6
1055 fi
1056
1057 echo $ac_n "checking for main in -llber""... $ac_c" 1>&6
1058 echo "configure:1059: checking for main in -llber" >&5
1059 ac_lib_var=`echo lber'_'main | sed 'y%./+-%__p_%'`
1060 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1061   echo $ac_n "(cached) $ac_c" 1>&6
1062 else
1063   ac_save_LIBS="$LIBS"
1064 LIBS="-llber  $LIBS"
1065 cat > conftest.$ac_ext <<EOF
1066 #line 1067 "configure"
1067 #include "confdefs.h"
1068
1069 int main() {
1070 main()
1071 ; return 0; }
1072 EOF
1073 if { (eval echo configure:1074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1074   rm -rf conftest*
1075   eval "ac_cv_lib_$ac_lib_var=yes"
1076 else
1077   echo "configure: failed program was:" >&5
1078   cat conftest.$ac_ext >&5
1079   rm -rf conftest*
1080   eval "ac_cv_lib_$ac_lib_var=no"
1081 fi
1082 rm -f conftest*
1083 LIBS="$ac_save_LIBS"
1084
1085 fi
1086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1087   echo "$ac_t""yes" 1>&6
1088     ac_tr_lib=HAVE_LIB`echo lber | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1089     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1090   cat >> confdefs.h <<EOF
1091 #define $ac_tr_lib 1
1092 EOF
1093
1094   LIBS="-llber $LIBS"
1095
1096 else
1097   echo "$ac_t""no" 1>&6
1098 fi
1099
1100 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1101 echo "configure:1102: checking for main in -lsocket" >&5
1102 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1104   echo $ac_n "(cached) $ac_c" 1>&6
1105 else
1106   ac_save_LIBS="$LIBS"
1107 LIBS="-lsocket  $LIBS"
1108 cat > conftest.$ac_ext <<EOF
1109 #line 1110 "configure"
1110 #include "confdefs.h"
1111
1112 int main() {
1113 main()
1114 ; return 0; }
1115 EOF
1116 if { (eval echo configure:1117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1117   rm -rf conftest*
1118   eval "ac_cv_lib_$ac_lib_var=yes"
1119 else
1120   echo "configure: failed program was:" >&5
1121   cat conftest.$ac_ext >&5
1122   rm -rf conftest*
1123   eval "ac_cv_lib_$ac_lib_var=no"
1124 fi
1125 rm -f conftest*
1126 LIBS="$ac_save_LIBS"
1127
1128 fi
1129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1130   echo "$ac_t""yes" 1>&6
1131     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1132     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1133   cat >> confdefs.h <<EOF
1134 #define $ac_tr_lib 1
1135 EOF
1136
1137   LIBS="-lsocket $LIBS"
1138
1139 else
1140   echo "$ac_t""no" 1>&6
1141 fi
1142
1143 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
1144 echo "configure:1145: checking for crypt in -lcrypt" >&5
1145 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
1146 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1147   echo $ac_n "(cached) $ac_c" 1>&6
1148 else
1149   ac_save_LIBS="$LIBS"
1150 LIBS="-lcrypt  $LIBS"
1151 cat > conftest.$ac_ext <<EOF
1152 #line 1153 "configure"
1153 #include "confdefs.h"
1154 /* Override any gcc2 internal prototype to avoid an error.  */
1155 /* We use char because int might match the return type of a gcc2
1156     builtin and then its argument prototype would still apply.  */
1157 char crypt();
1158
1159 int main() {
1160 crypt()
1161 ; return 0; }
1162 EOF
1163 if { (eval echo configure:1164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1164   rm -rf conftest*
1165   eval "ac_cv_lib_$ac_lib_var=yes"
1166 else
1167   echo "configure: failed program was:" >&5
1168   cat conftest.$ac_ext >&5
1169   rm -rf conftest*
1170   eval "ac_cv_lib_$ac_lib_var=no"
1171 fi
1172 rm -f conftest*
1173 LIBS="$ac_save_LIBS"
1174
1175 fi
1176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1177   echo "$ac_t""yes" 1>&6
1178     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1179     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1180   cat >> confdefs.h <<EOF
1181 #define $ac_tr_lib 1
1182 EOF
1183
1184   LIBS="-lcrypt $LIBS"
1185
1186 else
1187   echo "$ac_t""no" 1>&6
1188 fi
1189
1190 echo $ac_n "checking for printf in -lc""... $ac_c" 1>&6
1191 echo "configure:1192: checking for printf in -lc" >&5
1192 ac_lib_var=`echo c'_'printf | sed 'y%./+-%__p_%'`
1193 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1194   echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196   ac_save_LIBS="$LIBS"
1197 LIBS="-lc  $LIBS"
1198 cat > conftest.$ac_ext <<EOF
1199 #line 1200 "configure"
1200 #include "confdefs.h"
1201 /* Override any gcc2 internal prototype to avoid an error.  */
1202 /* We use char because int might match the return type of a gcc2
1203     builtin and then its argument prototype would still apply.  */
1204 char printf();
1205
1206 int main() {
1207 printf()
1208 ; return 0; }
1209 EOF
1210 if { (eval echo configure:1211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1211   rm -rf conftest*
1212   eval "ac_cv_lib_$ac_lib_var=yes"
1213 else
1214   echo "configure: failed program was:" >&5
1215   cat conftest.$ac_ext >&5
1216   rm -rf conftest*
1217   eval "ac_cv_lib_$ac_lib_var=no"
1218 fi
1219 rm -f conftest*
1220 LIBS="$ac_save_LIBS"
1221
1222 fi
1223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1224   echo "$ac_t""yes" 1>&6
1225     ac_tr_lib=HAVE_LIB`echo c | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1226     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1227   cat >> confdefs.h <<EOF
1228 #define $ac_tr_lib 1
1229 EOF
1230
1231   LIBS="-lc $LIBS"
1232
1233 else
1234   echo "$ac_t""no" 1>&6
1235 fi
1236
1237
1238
1239
1240
1241 echo $ac_n "checking for PAM support:""... $ac_c" 1>&6
1242 echo "configure:1243: checking for PAM support:" >&5
1243 echo
1244 # Check whether --with-pam or --without-pam was given.
1245 if test "${with_pam+set}" = set; then
1246   withval="$with_pam"
1247   :
1248 fi
1249
1250 if test "x$with_pam" = "xyes";then
1251         echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1252 echo "configure:1253: checking for dlopen in -ldl" >&5
1253 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1255   echo $ac_n "(cached) $ac_c" 1>&6
1256 else
1257   ac_save_LIBS="$LIBS"
1258 LIBS="-ldl  $LIBS"
1259 cat > conftest.$ac_ext <<EOF
1260 #line 1261 "configure"
1261 #include "confdefs.h"
1262 /* Override any gcc2 internal prototype to avoid an error.  */
1263 /* We use char because int might match the return type of a gcc2
1264     builtin and then its argument prototype would still apply.  */
1265 char dlopen();
1266
1267 int main() {
1268 dlopen()
1269 ; return 0; }
1270 EOF
1271 if { (eval echo configure:1272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1272   rm -rf conftest*
1273   eval "ac_cv_lib_$ac_lib_var=yes"
1274 else
1275   echo "configure: failed program was:" >&5
1276   cat conftest.$ac_ext >&5
1277   rm -rf conftest*
1278   eval "ac_cv_lib_$ac_lib_var=no"
1279 fi
1280 rm -f conftest*
1281 LIBS="$ac_save_LIBS"
1282
1283 fi
1284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1285   echo "$ac_t""yes" 1>&6
1286     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1287     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1288   cat >> confdefs.h <<EOF
1289 #define $ac_tr_lib 1
1290 EOF
1291
1292   LIBS="-ldl $LIBS"
1293
1294 else
1295   echo "$ac_t""no" 1>&6
1296 fi
1297
1298         echo $ac_n "checking for pam_start in -lpam""... $ac_c" 1>&6
1299 echo "configure:1300: checking for pam_start in -lpam" >&5
1300 ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'`
1301 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1302   echo $ac_n "(cached) $ac_c" 1>&6
1303 else
1304   ac_save_LIBS="$LIBS"
1305 LIBS="-lpam  $LIBS"
1306 cat > conftest.$ac_ext <<EOF
1307 #line 1308 "configure"
1308 #include "confdefs.h"
1309 /* Override any gcc2 internal prototype to avoid an error.  */
1310 /* We use char because int might match the return type of a gcc2
1311     builtin and then its argument prototype would still apply.  */
1312 char pam_start();
1313
1314 int main() {
1315 pam_start()
1316 ; return 0; }
1317 EOF
1318 if { (eval echo configure:1319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1319   rm -rf conftest*
1320   eval "ac_cv_lib_$ac_lib_var=yes"
1321 else
1322   echo "configure: failed program was:" >&5
1323   cat conftest.$ac_ext >&5
1324   rm -rf conftest*
1325   eval "ac_cv_lib_$ac_lib_var=no"
1326 fi
1327 rm -f conftest*
1328 LIBS="$ac_save_LIBS"
1329
1330 fi
1331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1332   echo "$ac_t""yes" 1>&6
1333     ac_tr_lib=HAVE_LIB`echo pam | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1334     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1335   cat >> confdefs.h <<EOF
1336 #define $ac_tr_lib 1
1337 EOF
1338
1339   LIBS="-lpam $LIBS"
1340
1341 else
1342   echo "$ac_t""no" 1>&6
1343 fi
1344
1345         DEFINES="-DUSE_PAM $DEFINES";
1346         echo "$ac_t""Pam support... yes" 1>&6
1347 else
1348         echo "$ac_t""Pam support... no" 1>&6
1349 fi
1350
1351 echo $ac_n "checking for LDAP support""... $ac_c" 1>&6
1352 echo "configure:1353: checking for LDAP support" >&5
1353 echo
1354 # Check whether --with-ldap or --without-ldap was given.
1355 if test "${with_ldap+set}" = set; then
1356   withval="$with_ldap"
1357   :
1358 fi
1359
1360
1361 if test "x$with_ldap" = "xyes";then
1362    echo $ac_n "checking for ldap_simple_bind_s in -lldap""... $ac_c" 1>&6
1363 echo "configure:1364: checking for ldap_simple_bind_s in -lldap" >&5
1364 ac_lib_var=`echo ldap'_'ldap_simple_bind_s | sed 'y%./+-%__p_%'`
1365 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1366   echo $ac_n "(cached) $ac_c" 1>&6
1367 else
1368   ac_save_LIBS="$LIBS"
1369 LIBS="-lldap  $LIBS"
1370 cat > conftest.$ac_ext <<EOF
1371 #line 1372 "configure"
1372 #include "confdefs.h"
1373 /* Override any gcc2 internal prototype to avoid an error.  */
1374 /* We use char because int might match the return type of a gcc2
1375     builtin and then its argument prototype would still apply.  */
1376 char ldap_simple_bind_s();
1377
1378 int main() {
1379 ldap_simple_bind_s()
1380 ; return 0; }
1381 EOF
1382 if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1383   rm -rf conftest*
1384   eval "ac_cv_lib_$ac_lib_var=yes"
1385 else
1386   echo "configure: failed program was:" >&5
1387   cat conftest.$ac_ext >&5
1388   rm -rf conftest*
1389   eval "ac_cv_lib_$ac_lib_var=no"
1390 fi
1391 rm -f conftest*
1392 LIBS="$ac_save_LIBS"
1393
1394 fi
1395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1396   echo "$ac_t""yes" 1>&6
1397     ac_tr_lib=HAVE_LIB`echo ldap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1398     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1399   cat >> confdefs.h <<EOF
1400 #define $ac_tr_lib 1
1401 EOF
1402
1403   LIBS="-lldap $LIBS"
1404
1405 else
1406   echo "$ac_t""no" 1>&6
1407 fi
1408
1409    echo $ac_n "checking for ldap_init in -lldap""... $ac_c" 1>&6
1410 echo "configure:1411: checking for ldap_init in -lldap" >&5
1411 ac_lib_var=`echo ldap'_'ldap_init | sed 'y%./+-%__p_%'`
1412 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1413   echo $ac_n "(cached) $ac_c" 1>&6
1414 else
1415   ac_save_LIBS="$LIBS"
1416 LIBS="-lldap  $LIBS"
1417 cat > conftest.$ac_ext <<EOF
1418 #line 1419 "configure"
1419 #include "confdefs.h"
1420 /* Override any gcc2 internal prototype to avoid an error.  */
1421 /* We use char because int might match the return type of a gcc2
1422     builtin and then its argument prototype would still apply.  */
1423 char ldap_init();
1424
1425 int main() {
1426 ldap_init()
1427 ; return 0; }
1428 EOF
1429 if { (eval echo configure:1430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1430   rm -rf conftest*
1431   eval "ac_cv_lib_$ac_lib_var=yes"
1432 else
1433   echo "configure: failed program was:" >&5
1434   cat conftest.$ac_ext >&5
1435   rm -rf conftest*
1436   eval "ac_cv_lib_$ac_lib_var=no"
1437 fi
1438 rm -f conftest*
1439 LIBS="$ac_save_LIBS"
1440
1441 fi
1442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1443   echo "$ac_t""yes" 1>&6
1444     ac_tr_lib=HAVE_LIB`echo ldap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1445     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1446   cat >> confdefs.h <<EOF
1447 #define $ac_tr_lib 1
1448 EOF
1449
1450   LIBS="-lldap $LIBS"
1451
1452 else
1453   echo "$ac_t""no" 1>&6
1454 fi
1455
1456  
1457    DEFINES="-DUSE_LDAP $DEFINES"
1458         echo "$ac_t""LDAP support... yes" 1>&6
1459 else
1460         echo "$ac_t""LDAP support... no" 1>&6
1461 fi
1462
1463 echo $ac_n "checking for DB support""... $ac_c" 1>&6
1464 echo "configure:1465: checking for DB support" >&5
1465 echo 
1466 # Check whether --with-db or --without-db was given.
1467 if test "${with_db+set}" = set; then
1468   withval="$with_db"
1469   :
1470 fi
1471
1472 if test "x$with_db" = "xyes";then
1473         DB="$DB -DDB -DDB_NULL" 
1474         echo "$ac_t""DB support... yes" 1>&6
1475 else
1476         echo "$ac_t""DB support... no" 1>&6
1477 fi
1478
1479 if test "x$with_db" = "xyes";then
1480
1481 echo "Check for MySQL support:"
1482
1483 # Check whether --with-mysql or --without-mysql was given.
1484 if test "${with_mysql+set}" = set; then
1485   withval="$with_mysql"
1486   :
1487 fi
1488
1489
1490 # Check whether --with-mysql-prefix or --without-mysql-prefix was given.
1491 if test "${with_mysql_prefix+set}" = set; then
1492   withval="$with_mysql_prefix"
1493   MYSQL_PREFIX=$withval
1494 else
1495   MYSQL_PREFIX=/usr
1496
1497 fi
1498
1499
1500
1501 if test "x$with_mysql" = "xyes";then
1502         
1503         LDFLAGS="-L$MYSQL_PREFIX/lib/mysql $LDFLAGS"
1504         LDFLAGS="-I$MYSQL_PREFIX/include/mysql $LDFLAGS"
1505         echo $ac_n "checking for mysql_init in -lmysqlclient""... $ac_c" 1>&6
1506 echo "configure:1507: checking for mysql_init in -lmysqlclient" >&5
1507 ac_lib_var=`echo mysqlclient'_'mysql_init | sed 'y%./+-%__p_%'`
1508 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1509   echo $ac_n "(cached) $ac_c" 1>&6
1510 else
1511   ac_save_LIBS="$LIBS"
1512 LIBS="-lmysqlclient -lm $LIBS"
1513 cat > conftest.$ac_ext <<EOF
1514 #line 1515 "configure"
1515 #include "confdefs.h"
1516 /* Override any gcc2 internal prototype to avoid an error.  */
1517 /* We use char because int might match the return type of a gcc2
1518     builtin and then its argument prototype would still apply.  */
1519 char mysql_init();
1520
1521 int main() {
1522 mysql_init()
1523 ; return 0; }
1524 EOF
1525 if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1526   rm -rf conftest*
1527   eval "ac_cv_lib_$ac_lib_var=yes"
1528 else
1529   echo "configure: failed program was:" >&5
1530   cat conftest.$ac_ext >&5
1531   rm -rf conftest*
1532   eval "ac_cv_lib_$ac_lib_var=no"
1533 fi
1534 rm -f conftest*
1535 LIBS="$ac_save_LIBS"
1536
1537 fi
1538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1539   echo "$ac_t""yes" 1>&6
1540   LIBS="-lmysqlclient -lm $LIBS"
1541 else
1542   echo "$ac_t""no" 1>&6
1543 { echo "configure: error: *** couldn't find libmysqlclient" 1>&2; exit 1; }
1544 fi
1545
1546
1547         DB="$DB -DDB_MYSQL";
1548         echo "$ac_t""Mysql support... yes" 1>&6
1549 else
1550         echo "$ac_t""Mysql support... no" 1>&6
1551 fi
1552
1553 fi
1554
1555 if test "x$with_db" = "xyes";then
1556
1557 echo "Check for PgSQL support:"
1558
1559 # Check whether --with-pgsql or --without-pgsql was given.
1560 if test "${with_pgsql+set}" = set; then
1561   withval="$with_pgsql"
1562   :
1563 fi
1564
1565
1566 # Check whether --with-pgsql-prefix or --without-pgsql-prefix was given.
1567 if test "${with_pgsql_prefix+set}" = set; then
1568   withval="$with_pgsql_prefix"
1569   PGSQL_PREFIX=$withval
1570 else
1571   PGSQL_PREFIX=/usr
1572
1573 fi
1574
1575
1576
1577 if test "x$with_pgsql" = "xyes";then
1578         
1579         LDFLAGS="-L$PGSQL_PREFIX/lib/pgsql $LDFLAGS"
1580         LDFLAGS="-I$PGSQL_PREFIX/include/pgsql $LDFLAGS"
1581         echo $ac_n "checking for PQconnectdb  in -lpq""... $ac_c" 1>&6
1582 echo "configure:1583: checking for PQconnectdb  in -lpq" >&5
1583 ac_lib_var=`echo pq'_'PQconnectdb  | sed 'y%./+-%__p_%'`
1584 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1585   echo $ac_n "(cached) $ac_c" 1>&6
1586 else
1587   ac_save_LIBS="$LIBS"
1588 LIBS="-lpq  $LIBS"
1589 cat > conftest.$ac_ext <<EOF
1590 #line 1591 "configure"
1591 #include "confdefs.h"
1592 /* Override any gcc2 internal prototype to avoid an error.  */
1593 /* We use char because int might match the return type of a gcc2
1594     builtin and then its argument prototype would still apply.  */
1595 char PQconnectdb ();
1596
1597 int main() {
1598 PQconnectdb ()
1599 ; return 0; }
1600 EOF
1601 if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1602   rm -rf conftest*
1603   eval "ac_cv_lib_$ac_lib_var=yes"
1604 else
1605   echo "configure: failed program was:" >&5
1606   cat conftest.$ac_ext >&5
1607   rm -rf conftest*
1608   eval "ac_cv_lib_$ac_lib_var=no"
1609 fi
1610 rm -f conftest*
1611 LIBS="$ac_save_LIBS"
1612
1613 fi
1614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1615   echo "$ac_t""yes" 1>&6
1616   LIBS="-lpq $LIBS"
1617 else
1618   echo "$ac_t""no" 1>&6
1619 { echo "configure: error: *** couldn't find libpq" 1>&2; exit 1; }
1620 fi
1621
1622
1623         DB="$DB -DDB_PGSQL";
1624         echo "$ac_t""Pgsql support... yes" 1>&6
1625 else
1626         echo "$ac_t""Pgsql support... no" 1>&6
1627 fi
1628
1629 fi
1630
1631
1632 # Check whether --with-tacuid or --without-tacuid was given.
1633 if test "${with_tacuid+set}" = set; then
1634   withval="$with_tacuid"
1635   :
1636 fi
1637
1638 # Check whether --with-tacgid or --without-tacgid was given.
1639 if test "${with_tacgid+set}" = set; then
1640   withval="$with_tacgid"
1641   :
1642 fi
1643
1644
1645
1646 if (test "x$with_tacuid" != "x" && test "x$with_tacgid" != "x" && test "x$with_tacuid" != "xyes" && test "x$with_tacgid" != "xyes");then
1647
1648         DEFINES="-DTACPLUS_USERID=$with_tacuid -DTACPLUS_GROUPID=$with_tacgid $DEFINES";        
1649         echo "$ac_t""tacacs+ work with given user and group id" 1>&6 
1650 fi
1651
1652 echo $ac_n "checking whether to enable the maxsess feature""... $ac_c" 1>&6
1653 echo "configure:1654: checking whether to enable the maxsess feature" >&5
1654 # Check whether --enable-maxsess or --disable-maxsess was given.
1655 if test "${enable_maxsess+set}" = set; then
1656   enableval="$enable_maxsess"
1657   
1658 if test "$enableval" = "yes";then
1659         DEFINES="-DMAXSESS $DEFINES";
1660         echo "$ac_t""yes" 1>&6
1661 else 
1662         echo "$ac_t""no" 1>&6
1663 fi
1664
1665 else
1666   
1667         echo "$ac_t""no" 1>&6
1668
1669 fi
1670
1671
1672
1673 # Check whether --with-tacplus_pid or --without-tacplus_pid was given.
1674 if test "${with_tacplus_pid+set}" = set; then
1675   withval="$with_tacplus_pid"
1676   PIDFILE="-DTACPLUS_PIDFILE=\\\"$withval/tac_plus.pid\\\""
1677 else
1678   PIDFILE="-DTACPLUS_PIDFILE=\\\"/var/run/tac_plus.pid\\\""
1679
1680 fi
1681
1682
1683 echo $ac_n "checking whether to enable the libwrap feture""... $ac_c" 1>&6
1684 echo "configure:1685: checking whether to enable the libwrap feture" >&5
1685
1686 # Check whether --with-libwrap or --without-libwrap was given.
1687 if test "${with_libwrap+set}" = set; then
1688   withval="$with_libwrap"
1689    case "$withval" in
1690   no)
1691     echo "$ac_t""no" 1>&6
1692     ;;
1693   yes)
1694     echo "$ac_t""yes" 1>&6
1695     echo $ac_n "checking for request_init in -lwrap""... $ac_c" 1>&6
1696 echo "configure:1697: checking for request_init in -lwrap" >&5
1697 ac_lib_var=`echo wrap'_'request_init | sed 'y%./+-%__p_%'`
1698 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1699   echo $ac_n "(cached) $ac_c" 1>&6
1700 else
1701   ac_save_LIBS="$LIBS"
1702 LIBS="-lwrap  $LIBS"
1703 cat > conftest.$ac_ext <<EOF
1704 #line 1705 "configure"
1705 #include "confdefs.h"
1706 /* Override any gcc2 internal prototype to avoid an error.  */
1707 /* We use char because int might match the return type of a gcc2
1708     builtin and then its argument prototype would still apply.  */
1709 char request_init();
1710
1711 int main() {
1712 request_init()
1713 ; return 0; }
1714 EOF
1715 if { (eval echo configure:1716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1716   rm -rf conftest*
1717   eval "ac_cv_lib_$ac_lib_var=yes"
1718 else
1719   echo "configure: failed program was:" >&5
1720   cat conftest.$ac_ext >&5
1721   rm -rf conftest*
1722   eval "ac_cv_lib_$ac_lib_var=no"
1723 fi
1724 rm -f conftest*
1725 LIBS="$ac_save_LIBS"
1726
1727 fi
1728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1729   echo "$ac_t""yes" 1>&6
1730   
1731         LIBS="-lwrap $LIBS"
1732         DEFINES="-DTCPWRAPPER $DEFINES"
1733 else
1734   echo "$ac_t""no" 1>&6
1735 fi
1736
1737     ;;
1738   *)
1739     echo "$ac_t""yes" 1>&6
1740     if test -d "$withval"; then
1741         LDFLAGS="-L$withval $LDFLAGS"
1742         DEFINES="-DTCPWRAPPER $DEFINES"
1743     fi
1744     cat > conftest.$ac_ext <<EOF
1745 #line 1746 "configure"
1746 #include "confdefs.h"
1747  int allow_severity; int deny_severity; 
1748 int main() {
1749  hosts_access(); 
1750 ; return 0; }
1751 EOF
1752 if { (eval echo configure:1753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1753   :
1754 else
1755   echo "configure: failed program was:" >&5
1756   cat conftest.$ac_ext >&5
1757   rm -rf conftest*
1758    { echo "configure: error: Could not find the $withval library.  You must first install tcp_wrappers." 1>&2; exit 1; } 
1759 fi
1760 rm -f conftest*
1761     ;;
1762   esac 
1763 else
1764   echo "$ac_t""no" 1>&6
1765
1766 fi
1767
1768
1769
1770
1771
1772
1773
1774 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1775 echo "configure:1776: checking how to run the C preprocessor" >&5
1776 # On Suns, sometimes $CPP names a directory.
1777 if test -n "$CPP" && test -d "$CPP"; then
1778   CPP=
1779 fi
1780 if test -z "$CPP"; then
1781 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1782   echo $ac_n "(cached) $ac_c" 1>&6
1783 else
1784     # This must be in double quotes, not single quotes, because CPP may get
1785   # substituted into the Makefile and "${CC-cc}" will confuse make.
1786   CPP="${CC-cc} -E"
1787   # On the NeXT, cc -E runs the code through the compiler's parser,
1788   # not just through cpp.
1789   cat > conftest.$ac_ext <<EOF
1790 #line 1791 "configure"
1791 #include "confdefs.h"
1792 #include <assert.h>
1793 Syntax Error
1794 EOF
1795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1796 { (eval echo configure:1797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1798 if test -z "$ac_err"; then
1799   :
1800 else
1801   echo "$ac_err" >&5
1802   echo "configure: failed program was:" >&5
1803   cat conftest.$ac_ext >&5
1804   rm -rf conftest*
1805   CPP="${CC-cc} -E -traditional-cpp"
1806   cat > conftest.$ac_ext <<EOF
1807 #line 1808 "configure"
1808 #include "confdefs.h"
1809 #include <assert.h>
1810 Syntax Error
1811 EOF
1812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1813 { (eval echo configure:1814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1815 if test -z "$ac_err"; then
1816   :
1817 else
1818   echo "$ac_err" >&5
1819   echo "configure: failed program was:" >&5
1820   cat conftest.$ac_ext >&5
1821   rm -rf conftest*
1822   CPP="${CC-cc} -nologo -E"
1823   cat > conftest.$ac_ext <<EOF
1824 #line 1825 "configure"
1825 #include "confdefs.h"
1826 #include <assert.h>
1827 Syntax Error
1828 EOF
1829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1830 { (eval echo configure:1831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1832 if test -z "$ac_err"; then
1833   :
1834 else
1835   echo "$ac_err" >&5
1836   echo "configure: failed program was:" >&5
1837   cat conftest.$ac_ext >&5
1838   rm -rf conftest*
1839   CPP=/lib/cpp
1840 fi
1841 rm -f conftest*
1842 fi
1843 rm -f conftest*
1844 fi
1845 rm -f conftest*
1846   ac_cv_prog_CPP="$CPP"
1847 fi
1848   CPP="$ac_cv_prog_CPP"
1849 else
1850   ac_cv_prog_CPP="$CPP"
1851 fi
1852 echo "$ac_t""$CPP" 1>&6
1853
1854 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1855 echo "configure:1856: checking for ANSI C header files" >&5
1856 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1857   echo $ac_n "(cached) $ac_c" 1>&6
1858 else
1859   cat > conftest.$ac_ext <<EOF
1860 #line 1861 "configure"
1861 #include "confdefs.h"
1862 #include <stdlib.h>
1863 #include <stdarg.h>
1864 #include <string.h>
1865 #include <float.h>
1866 EOF
1867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1868 { (eval echo configure:1869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1870 if test -z "$ac_err"; then
1871   rm -rf conftest*
1872   ac_cv_header_stdc=yes
1873 else
1874   echo "$ac_err" >&5
1875   echo "configure: failed program was:" >&5
1876   cat conftest.$ac_ext >&5
1877   rm -rf conftest*
1878   ac_cv_header_stdc=no
1879 fi
1880 rm -f conftest*
1881
1882 if test $ac_cv_header_stdc = yes; then
1883   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1884 cat > conftest.$ac_ext <<EOF
1885 #line 1886 "configure"
1886 #include "confdefs.h"
1887 #include <string.h>
1888 EOF
1889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1890   egrep "memchr" >/dev/null 2>&1; then
1891   :
1892 else
1893   rm -rf conftest*
1894   ac_cv_header_stdc=no
1895 fi
1896 rm -f conftest*
1897
1898 fi
1899
1900 if test $ac_cv_header_stdc = yes; then
1901   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1902 cat > conftest.$ac_ext <<EOF
1903 #line 1904 "configure"
1904 #include "confdefs.h"
1905 #include <stdlib.h>
1906 EOF
1907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1908   egrep "free" >/dev/null 2>&1; then
1909   :
1910 else
1911   rm -rf conftest*
1912   ac_cv_header_stdc=no
1913 fi
1914 rm -f conftest*
1915
1916 fi
1917
1918 if test $ac_cv_header_stdc = yes; then
1919   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1920 if test "$cross_compiling" = yes; then
1921   :
1922 else
1923   cat > conftest.$ac_ext <<EOF
1924 #line 1925 "configure"
1925 #include "confdefs.h"
1926 #include <ctype.h>
1927 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1928 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1929 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1930 int main () { int i; for (i = 0; i < 256; i++)
1931 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1932 exit (0); }
1933
1934 EOF
1935 if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1936 then
1937   :
1938 else
1939   echo "configure: failed program was:" >&5
1940   cat conftest.$ac_ext >&5
1941   rm -fr conftest*
1942   ac_cv_header_stdc=no
1943 fi
1944 rm -fr conftest*
1945 fi
1946
1947 fi
1948 fi
1949
1950 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1951 if test $ac_cv_header_stdc = yes; then
1952   cat >> confdefs.h <<\EOF
1953 #define STDC_HEADERS 1
1954 EOF
1955
1956 fi
1957
1958 for ac_hdr in fcntl.h malloc.h strings.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h
1959 do
1960 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1961 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1962 echo "configure:1963: checking for $ac_hdr" >&5
1963 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1964   echo $ac_n "(cached) $ac_c" 1>&6
1965 else
1966   cat > conftest.$ac_ext <<EOF
1967 #line 1968 "configure"
1968 #include "confdefs.h"
1969 #include <$ac_hdr>
1970 EOF
1971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1972 { (eval echo configure:1973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1974 if test -z "$ac_err"; then
1975   rm -rf conftest*
1976   eval "ac_cv_header_$ac_safe=yes"
1977 else
1978   echo "$ac_err" >&5
1979   echo "configure: failed program was:" >&5
1980   cat conftest.$ac_ext >&5
1981   rm -rf conftest*
1982   eval "ac_cv_header_$ac_safe=no"
1983 fi
1984 rm -f conftest*
1985 fi
1986 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1987   echo "$ac_t""yes" 1>&6
1988     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1989   cat >> confdefs.h <<EOF
1990 #define $ac_tr_hdr 1
1991 EOF
1992  
1993 else
1994   echo "$ac_t""no" 1>&6
1995 fi
1996 done
1997
1998 for ac_hdr in shadow.h
1999 do
2000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2002 echo "configure:2003: checking for $ac_hdr" >&5
2003 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2004   echo $ac_n "(cached) $ac_c" 1>&6
2005 else
2006   cat > conftest.$ac_ext <<EOF
2007 #line 2008 "configure"
2008 #include "confdefs.h"
2009 #include <$ac_hdr>
2010 EOF
2011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2012 { (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2014 if test -z "$ac_err"; then
2015   rm -rf conftest*
2016   eval "ac_cv_header_$ac_safe=yes"
2017 else
2018   echo "$ac_err" >&5
2019   echo "configure: failed program was:" >&5
2020   cat conftest.$ac_ext >&5
2021   rm -rf conftest*
2022   eval "ac_cv_header_$ac_safe=no"
2023 fi
2024 rm -f conftest*
2025 fi
2026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2027   echo "$ac_t""yes" 1>&6
2028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2029   cat >> confdefs.h <<EOF
2030 #define $ac_tr_hdr 1
2031 EOF
2032  
2033                 if test -f /etc/shadow ; then
2034                   cat >> confdefs.h <<\EOF
2035 #define SHADOW_PASSWORDS 1
2036 EOF
2037                 
2038                 fi 
2039                 
2040 else
2041   echo "$ac_t""no" 1>&6
2042 fi
2043 done
2044
2045 echo $ac_n "checking for working const""... $ac_c" 1>&6
2046 echo "configure:2047: checking for working const" >&5
2047 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2048   echo $ac_n "(cached) $ac_c" 1>&6
2049 else
2050   cat > conftest.$ac_ext <<EOF
2051 #line 2052 "configure"
2052 #include "confdefs.h"
2053
2054 int main() {
2055
2056 /* Ultrix mips cc rejects this.  */
2057 typedef int charset[2]; const charset x;
2058 /* SunOS 4.1.1 cc rejects this.  */
2059 char const *const *ccp;
2060 char **p;
2061 /* NEC SVR4.0.2 mips cc rejects this.  */
2062 struct point {int x, y;};
2063 static struct point const zero = {0,0};
2064 /* AIX XL C 1.02.0.0 rejects this.
2065    It does not let you subtract one const X* pointer from another in an arm
2066    of an if-expression whose if-part is not a constant expression */
2067 const char *g = "string";
2068 ccp = &g + (g ? g-g : 0);
2069 /* HPUX 7.0 cc rejects these. */
2070 ++ccp;
2071 p = (char**) ccp;
2072 ccp = (char const *const *) p;
2073 { /* SCO 3.2v4 cc rejects this.  */
2074   char *t;
2075   char const *s = 0 ? (char *) 0 : (char const *) 0;
2076
2077   *t++ = 0;
2078 }
2079 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2080   int x[] = {25, 17};
2081   const int *foo = &x[0];
2082   ++foo;
2083 }
2084 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2085   typedef const int *iptr;
2086   iptr p = 0;
2087   ++p;
2088 }
2089 { /* AIX XL C 1.02.0.0 rejects this saying
2090      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2091   struct s { int j; const int *ap[3]; };
2092   struct s *b; b->j = 5;
2093 }
2094 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2095   const int foo = 10;
2096 }
2097
2098 ; return 0; }
2099 EOF
2100 if { (eval echo configure:2101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2101   rm -rf conftest*
2102   ac_cv_c_const=yes
2103 else
2104   echo "configure: failed program was:" >&5
2105   cat conftest.$ac_ext >&5
2106   rm -rf conftest*
2107   ac_cv_c_const=no
2108 fi
2109 rm -f conftest*
2110 fi
2111
2112 echo "$ac_t""$ac_cv_c_const" 1>&6
2113 if test $ac_cv_c_const = no; then
2114   cat >> confdefs.h <<\EOF
2115 #define const 
2116 EOF
2117
2118 fi
2119
2120 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2121 echo "configure:2122: checking whether time.h and sys/time.h may both be included" >&5
2122 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2123   echo $ac_n "(cached) $ac_c" 1>&6
2124 else
2125   cat > conftest.$ac_ext <<EOF
2126 #line 2127 "configure"
2127 #include "confdefs.h"
2128 #include <sys/types.h>
2129 #include <sys/time.h>
2130 #include <time.h>
2131 int main() {
2132 struct tm *tp;
2133 ; return 0; }
2134 EOF
2135 if { (eval echo configure:2136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2136   rm -rf conftest*
2137   ac_cv_header_time=yes
2138 else
2139   echo "configure: failed program was:" >&5
2140   cat conftest.$ac_ext >&5
2141   rm -rf conftest*
2142   ac_cv_header_time=no
2143 fi
2144 rm -f conftest*
2145 fi
2146
2147 echo "$ac_t""$ac_cv_header_time" 1>&6
2148 if test $ac_cv_header_time = yes; then
2149   cat >> confdefs.h <<\EOF
2150 #define TIME_WITH_SYS_TIME 1
2151 EOF
2152
2153 fi
2154
2155
2156 if test $ac_cv_prog_gcc = yes; then
2157     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
2158 echo "configure:2159: checking whether ${CC-cc} needs -traditional" >&5
2159 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
2160   echo $ac_n "(cached) $ac_c" 1>&6
2161 else
2162     ac_pattern="Autoconf.*'x'"
2163   cat > conftest.$ac_ext <<EOF
2164 #line 2165 "configure"
2165 #include "confdefs.h"
2166 #include <sgtty.h>
2167 Autoconf TIOCGETP
2168 EOF
2169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2170   egrep "$ac_pattern" >/dev/null 2>&1; then
2171   rm -rf conftest*
2172   ac_cv_prog_gcc_traditional=yes
2173 else
2174   rm -rf conftest*
2175   ac_cv_prog_gcc_traditional=no
2176 fi
2177 rm -f conftest*
2178
2179
2180   if test $ac_cv_prog_gcc_traditional = no; then
2181     cat > conftest.$ac_ext <<EOF
2182 #line 2183 "configure"
2183 #include "confdefs.h"
2184 #include <termio.h>
2185 Autoconf TCGETA
2186 EOF
2187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2188   egrep "$ac_pattern" >/dev/null 2>&1; then
2189   rm -rf conftest*
2190   ac_cv_prog_gcc_traditional=yes
2191 fi
2192 rm -f conftest*
2193
2194   fi
2195 fi
2196
2197 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
2198   if test $ac_cv_prog_gcc_traditional = yes; then
2199     CC="$CC -traditional"
2200   fi
2201 fi
2202
2203 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
2204 echo "configure:2205: checking whether setpgrp takes no argument" >&5
2205 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
2206   echo $ac_n "(cached) $ac_c" 1>&6
2207 else
2208   if test "$cross_compiling" = yes; then
2209   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
2210 else
2211   cat > conftest.$ac_ext <<EOF
2212 #line 2213 "configure"
2213 #include "confdefs.h"
2214
2215 #ifdef HAVE_UNISTD_H
2216 #include <unistd.h>
2217 #endif
2218
2219 /*
2220  * If this system has a BSD-style setpgrp, which takes arguments, exit
2221  * successfully.
2222  */
2223 main()
2224 {
2225     if (setpgrp(1,1) == -1)
2226         exit(0);
2227     else
2228         exit(1);
2229 }
2230
2231 EOF
2232 if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2233 then
2234   ac_cv_func_setpgrp_void=no
2235 else
2236   echo "configure: failed program was:" >&5
2237   cat conftest.$ac_ext >&5
2238   rm -fr conftest*
2239   ac_cv_func_setpgrp_void=yes
2240 fi
2241 rm -fr conftest*
2242 fi
2243
2244
2245 fi
2246
2247 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
2248 if test $ac_cv_func_setpgrp_void = yes; then
2249   cat >> confdefs.h <<\EOF
2250 #define SETPGRP_VOID 1
2251 EOF
2252
2253 fi
2254
2255 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2256 echo "configure:2257: checking return type of signal handlers" >&5
2257 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2258   echo $ac_n "(cached) $ac_c" 1>&6
2259 else
2260   cat > conftest.$ac_ext <<EOF
2261 #line 2262 "configure"
2262 #include "confdefs.h"
2263 #include <sys/types.h>
2264 #include <signal.h>
2265 #ifdef signal
2266 #undef signal
2267 #endif
2268 #ifdef __cplusplus
2269 extern "C" void (*signal (int, void (*)(int)))(int);
2270 #else
2271 void (*signal ()) ();
2272 #endif
2273
2274 int main() {
2275 int i;
2276 ; return 0; }
2277 EOF
2278 if { (eval echo configure:2279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2279   rm -rf conftest*
2280   ac_cv_type_signal=void
2281 else
2282   echo "configure: failed program was:" >&5
2283   cat conftest.$ac_ext >&5
2284   rm -rf conftest*
2285   ac_cv_type_signal=int
2286 fi
2287 rm -f conftest*
2288 fi
2289
2290 echo "$ac_t""$ac_cv_type_signal" 1>&6
2291 cat >> confdefs.h <<EOF
2292 #define RETSIGTYPE $ac_cv_type_signal
2293 EOF
2294
2295
2296 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2297 echo "configure:2298: checking for vprintf" >&5
2298 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2299   echo $ac_n "(cached) $ac_c" 1>&6
2300 else
2301   cat > conftest.$ac_ext <<EOF
2302 #line 2303 "configure"
2303 #include "confdefs.h"
2304 /* System header to define __stub macros and hopefully few prototypes,
2305     which can conflict with char vprintf(); below.  */
2306 #include <assert.h>
2307 /* Override any gcc2 internal prototype to avoid an error.  */
2308 /* We use char because int might match the return type of a gcc2
2309     builtin and then its argument prototype would still apply.  */
2310 char vprintf();
2311
2312 int main() {
2313
2314 /* The GNU C library defines this for functions which it implements
2315     to always fail with ENOSYS.  Some functions are actually named
2316     something starting with __ and the normal name is an alias.  */
2317 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2318 choke me
2319 #else
2320 vprintf();
2321 #endif
2322
2323 ; return 0; }
2324 EOF
2325 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2326   rm -rf conftest*
2327   eval "ac_cv_func_vprintf=yes"
2328 else
2329   echo "configure: failed program was:" >&5
2330   cat conftest.$ac_ext >&5
2331   rm -rf conftest*
2332   eval "ac_cv_func_vprintf=no"
2333 fi
2334 rm -f conftest*
2335 fi
2336
2337 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2338   echo "$ac_t""yes" 1>&6
2339   cat >> confdefs.h <<\EOF
2340 #define HAVE_VPRINTF 1
2341 EOF
2342
2343 else
2344   echo "$ac_t""no" 1>&6
2345 fi
2346
2347 if test "$ac_cv_func_vprintf" != yes; then
2348 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2349 echo "configure:2350: checking for _doprnt" >&5
2350 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2351   echo $ac_n "(cached) $ac_c" 1>&6
2352 else
2353   cat > conftest.$ac_ext <<EOF
2354 #line 2355 "configure"
2355 #include "confdefs.h"
2356 /* System header to define __stub macros and hopefully few prototypes,
2357     which can conflict with char _doprnt(); below.  */
2358 #include <assert.h>
2359 /* Override any gcc2 internal prototype to avoid an error.  */
2360 /* We use char because int might match the return type of a gcc2
2361     builtin and then its argument prototype would still apply.  */
2362 char _doprnt();
2363
2364 int main() {
2365
2366 /* The GNU C library defines this for functions which it implements
2367     to always fail with ENOSYS.  Some functions are actually named
2368     something starting with __ and the normal name is an alias.  */
2369 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2370 choke me
2371 #else
2372 _doprnt();
2373 #endif
2374
2375 ; return 0; }
2376 EOF
2377 if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2378   rm -rf conftest*
2379   eval "ac_cv_func__doprnt=yes"
2380 else
2381   echo "configure: failed program was:" >&5
2382   cat conftest.$ac_ext >&5
2383   rm -rf conftest*
2384   eval "ac_cv_func__doprnt=no"
2385 fi
2386 rm -f conftest*
2387 fi
2388
2389 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2390   echo "$ac_t""yes" 1>&6
2391   cat >> confdefs.h <<\EOF
2392 #define HAVE_DOPRNT 1
2393 EOF
2394
2395 else
2396   echo "$ac_t""no" 1>&6
2397 fi
2398
2399 fi
2400
2401 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
2402 echo "configure:2403: checking for wait3 that fills in rusage" >&5
2403 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
2404   echo $ac_n "(cached) $ac_c" 1>&6
2405 else
2406   if test "$cross_compiling" = yes; then
2407   ac_cv_func_wait3_rusage=no
2408 else
2409   cat > conftest.$ac_ext <<EOF
2410 #line 2411 "configure"
2411 #include "confdefs.h"
2412 #include <sys/types.h>
2413 #include <sys/time.h>
2414 #include <sys/resource.h>
2415 #include <stdio.h>
2416 /* HP-UX has wait3 but does not fill in rusage at all.  */
2417 main() {
2418   struct rusage r;
2419   int i;
2420   /* Use a field that we can force nonzero --
2421      voluntary context switches.
2422      For systems like NeXT and OSF/1 that don't set it,
2423      also use the system CPU time.  And page faults (I/O) for Linux.  */
2424   r.ru_nvcsw = 0;
2425   r.ru_stime.tv_sec = 0;
2426   r.ru_stime.tv_usec = 0;
2427   r.ru_majflt = r.ru_minflt = 0;
2428   switch (fork()) {
2429   case 0: /* Child.  */
2430     sleep(1); /* Give up the CPU.  */
2431     _exit(0);
2432   case -1: _exit(0); /* What can we do?  */
2433   default: /* Parent.  */
2434     wait3(&i, 0, &r);
2435     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
2436     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
2437          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
2438   }
2439 }
2440 EOF
2441 if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2442 then
2443   ac_cv_func_wait3_rusage=yes
2444 else
2445   echo "configure: failed program was:" >&5
2446   cat conftest.$ac_ext >&5
2447   rm -fr conftest*
2448   ac_cv_func_wait3_rusage=no
2449 fi
2450 rm -fr conftest*
2451 fi
2452
2453 fi
2454
2455 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
2456 if test $ac_cv_func_wait3_rusage = yes; then
2457   cat >> confdefs.h <<\EOF
2458 #define HAVE_WAIT3 1
2459 EOF
2460
2461 fi
2462
2463 for ac_func in regcomp select socket strcspn strdup strtol
2464 do
2465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2466 echo "configure:2467: checking for $ac_func" >&5
2467 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2468   echo $ac_n "(cached) $ac_c" 1>&6
2469 else
2470   cat > conftest.$ac_ext <<EOF
2471 #line 2472 "configure"
2472 #include "confdefs.h"
2473 /* System header to define __stub macros and hopefully few prototypes,
2474     which can conflict with char $ac_func(); below.  */
2475 #include <assert.h>
2476 /* Override any gcc2 internal prototype to avoid an error.  */
2477 /* We use char because int might match the return type of a gcc2
2478     builtin and then its argument prototype would still apply.  */
2479 char $ac_func();
2480
2481 int main() {
2482
2483 /* The GNU C library defines this for functions which it implements
2484     to always fail with ENOSYS.  Some functions are actually named
2485     something starting with __ and the normal name is an alias.  */
2486 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2487 choke me
2488 #else
2489 $ac_func();
2490 #endif
2491
2492 ; return 0; }
2493 EOF
2494 if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2495   rm -rf conftest*
2496   eval "ac_cv_func_$ac_func=yes"
2497 else
2498   echo "configure: failed program was:" >&5
2499   cat conftest.$ac_ext >&5
2500   rm -rf conftest*
2501   eval "ac_cv_func_$ac_func=no"
2502 fi
2503 rm -f conftest*
2504 fi
2505
2506 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2507   echo "$ac_t""yes" 1>&6
2508     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2509   cat >> confdefs.h <<EOF
2510 #define $ac_tr_func 1
2511 EOF
2512  
2513 else
2514   echo "$ac_t""no" 1>&6
2515 fi
2516 done
2517
2518
2519 trap '' 1 2 15
2520 cat > confcache <<\EOF
2521 # This file is a shell script that caches the results of configure
2522 # tests run on this system so they can be shared between configure
2523 # scripts and configure runs.  It is not useful on other systems.
2524 # If it contains results you don't want to keep, you may remove or edit it.
2525 #
2526 # By default, configure uses ./config.cache as the cache file,
2527 # creating it if it does not exist already.  You can give configure
2528 # the --cache-file=FILE option to use a different cache file; that is
2529 # what configure does when it calls configure scripts in
2530 # subdirectories, so they share the cache.
2531 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2532 # config.status only pays attention to the cache file if you give it the
2533 # --recheck option to rerun configure.
2534 #
2535 EOF
2536 # The following way of writing the cache mishandles newlines in values,
2537 # but we know of no workaround that is simple, portable, and efficient.
2538 # So, don't put newlines in cache variables' values.
2539 # Ultrix sh set writes to stderr and can't be redirected directly,
2540 # and sets the high bit in the cache file unless we assign to the vars.
2541 (set) 2>&1 |
2542   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2543   *ac_space=\ *)
2544     # `set' does not quote correctly, so add quotes (double-quote substitution
2545     # turns \\\\ into \\, and sed turns \\ into \).
2546     sed -n \
2547       -e "s/'/'\\\\''/g" \
2548       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2549     ;;
2550   *)
2551     # `set' quotes correctly as required by POSIX, so do not add quotes.
2552     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2553     ;;
2554   esac >> confcache
2555 if cmp -s $cache_file confcache; then
2556   :
2557 else
2558   if test -w $cache_file; then
2559     echo "updating cache $cache_file"
2560     cat confcache > $cache_file
2561   else
2562     echo "not updating unwritable cache $cache_file"
2563   fi
2564 fi
2565 rm -f confcache
2566
2567 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2568
2569 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2570 # Let make expand exec_prefix.
2571 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2572
2573 # Any assignment to VPATH causes Sun make to only execute
2574 # the first set of double-colon rules, so remove it if not needed.
2575 # If there is a colon in the path, we need to keep it.
2576 if test "x$srcdir" = x.; then
2577   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2578 fi
2579
2580 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2581
2582 DEFS=-DHAVE_CONFIG_H
2583
2584 # Without the "./", some shells look in PATH for config.status.
2585 : ${CONFIG_STATUS=./config.status}
2586
2587 echo creating $CONFIG_STATUS
2588 rm -f $CONFIG_STATUS
2589 cat > $CONFIG_STATUS <<EOF
2590 #! /bin/sh
2591 # Generated automatically by configure.
2592 # Run this file to recreate the current configuration.
2593 # This directory was configured as follows,
2594 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2595 #
2596 # $0 $ac_configure_args
2597 #
2598 # Compiler output produced by configure, useful for debugging
2599 # configure, is in ./config.log if it exists.
2600
2601 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2602 for ac_option
2603 do
2604   case "\$ac_option" in
2605   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2606     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2607     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2608   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2609     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2610     exit 0 ;;
2611   -help | --help | --hel | --he | --h)
2612     echo "\$ac_cs_usage"; exit 0 ;;
2613   *) echo "\$ac_cs_usage"; exit 1 ;;
2614   esac
2615 done
2616
2617 ac_given_srcdir=$srcdir
2618
2619 trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2620 EOF
2621 cat >> $CONFIG_STATUS <<EOF
2622
2623 # Protect against being on the right side of a sed subst in config.status.
2624 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2625  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2626 $ac_vpsub
2627 $extrasub
2628 s%@SHELL@%$SHELL%g
2629 s%@CFLAGS@%$CFLAGS%g
2630 s%@CPPFLAGS@%$CPPFLAGS%g
2631 s%@CXXFLAGS@%$CXXFLAGS%g
2632 s%@FFLAGS@%$FFLAGS%g
2633 s%@DEFS@%$DEFS%g
2634 s%@LDFLAGS@%$LDFLAGS%g
2635 s%@LIBS@%$LIBS%g
2636 s%@exec_prefix@%$exec_prefix%g
2637 s%@prefix@%$prefix%g
2638 s%@program_transform_name@%$program_transform_name%g
2639 s%@bindir@%$bindir%g
2640 s%@sbindir@%$sbindir%g
2641 s%@libexecdir@%$libexecdir%g
2642 s%@datadir@%$datadir%g
2643 s%@sysconfdir@%$sysconfdir%g
2644 s%@sharedstatedir@%$sharedstatedir%g
2645 s%@localstatedir@%$localstatedir%g
2646 s%@libdir@%$libdir%g
2647 s%@includedir@%$includedir%g
2648 s%@oldincludedir@%$oldincludedir%g
2649 s%@infodir@%$infodir%g
2650 s%@mandir@%$mandir%g
2651 s%@SET_MAKE@%$SET_MAKE%g
2652 s%@CC@%$CC%g
2653 s%@host@%$host%g
2654 s%@host_alias@%$host_alias%g
2655 s%@host_cpu@%$host_cpu%g
2656 s%@host_vendor@%$host_vendor%g
2657 s%@host_os@%$host_os%g
2658 s%@target@%$target%g
2659 s%@target_alias@%$target_alias%g
2660 s%@target_cpu@%$target_cpu%g
2661 s%@target_vendor@%$target_vendor%g
2662 s%@target_os@%$target_os%g
2663 s%@build@%$build%g
2664 s%@build_alias@%$build_alias%g
2665 s%@build_cpu@%$build_cpu%g
2666 s%@build_vendor@%$build_vendor%g
2667 s%@build_os@%$build_os%g
2668 s%@DEFINES@%$DEFINES%g
2669 s%@PIDFILE@%$PIDFILE%g
2670 s%@DB@%$DB%g
2671 s%@OS@%$OS%g
2672 s%@CPP@%$CPP%g
2673
2674 CEOF
2675 EOF
2676
2677 cat >> $CONFIG_STATUS <<\EOF
2678
2679 # Split the substitutions into bite-sized pieces for seds with
2680 # small command number limits, like on Digital OSF/1 and HP-UX.
2681 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2682 ac_file=1 # Number of current file.
2683 ac_beg=1 # First line for current file.
2684 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2685 ac_more_lines=:
2686 ac_sed_cmds=""
2687 while $ac_more_lines; do
2688   if test $ac_beg -gt 1; then
2689     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2690   else
2691     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2692   fi
2693   if test ! -s conftest.s$ac_file; then
2694     ac_more_lines=false
2695     rm -f conftest.s$ac_file
2696   else
2697     if test -z "$ac_sed_cmds"; then
2698       ac_sed_cmds="sed -f conftest.s$ac_file"
2699     else
2700       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2701     fi
2702     ac_file=`expr $ac_file + 1`
2703     ac_beg=$ac_end
2704     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2705   fi
2706 done
2707 if test -z "$ac_sed_cmds"; then
2708   ac_sed_cmds=cat
2709 fi
2710 EOF
2711
2712 cat >> $CONFIG_STATUS <<EOF
2713
2714 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2715 EOF
2716 cat >> $CONFIG_STATUS <<\EOF
2717 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2718   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2719   case "$ac_file" in
2720   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2721        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2722   *) ac_file_in="${ac_file}.in" ;;
2723   esac
2724
2725   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2726
2727   # Remove last slash and all that follows it.  Not all systems have dirname.
2728   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2729   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2730     # The file is in a subdirectory.
2731     test ! -d "$ac_dir" && mkdir "$ac_dir"
2732     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2733     # A "../" for each directory in $ac_dir_suffix.
2734     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2735   else
2736     ac_dir_suffix= ac_dots=
2737   fi
2738
2739   case "$ac_given_srcdir" in
2740   .)  srcdir=.
2741       if test -z "$ac_dots"; then top_srcdir=.
2742       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2743   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2744   *) # Relative path.
2745     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2746     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2747   esac
2748
2749
2750   echo creating "$ac_file"
2751   rm -f "$ac_file"
2752   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2753   case "$ac_file" in
2754   *Makefile*) ac_comsub="1i\\
2755 # $configure_input" ;;
2756   *) ac_comsub= ;;
2757   esac
2758
2759   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2760   sed -e "$ac_comsub
2761 s%@configure_input@%$configure_input%g
2762 s%@srcdir@%$srcdir%g
2763 s%@top_srcdir@%$top_srcdir%g
2764 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2765 fi; done
2766 rm -f conftest.s*
2767
2768 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2769 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2770 #
2771 # ac_d sets the value in "#define NAME VALUE" lines.
2772 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2773 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2774 ac_dC='\3'
2775 ac_dD='%g'
2776 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2777 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2778 ac_uB='\([      ]\)%\1#\2define\3'
2779 ac_uC=' '
2780 ac_uD='\4%g'
2781 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2782 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2783 ac_eB='$%\1#\2define\3'
2784 ac_eC=' '
2785 ac_eD='%g'
2786
2787 if test "${CONFIG_HEADERS+set}" != set; then
2788 EOF
2789 cat >> $CONFIG_STATUS <<EOF
2790   CONFIG_HEADERS="config.h"
2791 EOF
2792 cat >> $CONFIG_STATUS <<\EOF
2793 fi
2794 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2795   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2796   case "$ac_file" in
2797   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2798        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2799   *) ac_file_in="${ac_file}.in" ;;
2800   esac
2801
2802   echo creating $ac_file
2803
2804   rm -f conftest.frag conftest.in conftest.out
2805   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2806   cat $ac_file_inputs > conftest.in
2807
2808 EOF
2809
2810 # Transform confdefs.h into a sed script conftest.vals that substitutes
2811 # the proper values into config.h.in to produce config.h.  And first:
2812 # Protect against being on the right side of a sed subst in config.status.
2813 # Protect against being in an unquoted here document in config.status.
2814 rm -f conftest.vals
2815 cat > conftest.hdr <<\EOF
2816 s/[\\&%]/\\&/g
2817 s%[\\$`]%\\&%g
2818 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2819 s%ac_d%ac_u%gp
2820 s%ac_u%ac_e%gp
2821 EOF
2822 sed -n -f conftest.hdr confdefs.h > conftest.vals
2823 rm -f conftest.hdr
2824
2825 # This sed command replaces #undef with comments.  This is necessary, for
2826 # example, in the case of _POSIX_SOURCE, which is predefined and required
2827 # on some systems where configure will not decide to define it.
2828 cat >> conftest.vals <<\EOF
2829 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2830 EOF
2831
2832 # Break up conftest.vals because some shells have a limit on
2833 # the size of here documents, and old seds have small limits too.
2834
2835 rm -f conftest.tail
2836 while :
2837 do
2838   ac_lines=`grep -c . conftest.vals`
2839   # grep -c gives empty output for an empty file on some AIX systems.
2840   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2841   # Write a limited-size here document to conftest.frag.
2842   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2843   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2844   echo 'CEOF
2845   sed -f conftest.frag conftest.in > conftest.out
2846   rm -f conftest.in
2847   mv conftest.out conftest.in
2848 ' >> $CONFIG_STATUS
2849   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2850   rm -f conftest.vals
2851   mv conftest.tail conftest.vals
2852 done
2853 rm -f conftest.vals
2854
2855 cat >> $CONFIG_STATUS <<\EOF
2856   rm -f conftest.frag conftest.h
2857   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2858   cat conftest.in >> conftest.h
2859   rm -f conftest.in
2860   if cmp -s $ac_file conftest.h 2>/dev/null; then
2861     echo "$ac_file is unchanged"
2862     rm -f conftest.h
2863   else
2864     # Remove last slash and all that follows it.  Not all systems have dirname.
2865       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2866       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2867       # The file is in a subdirectory.
2868       test ! -d "$ac_dir" && mkdir "$ac_dir"
2869     fi
2870     rm -f $ac_file
2871     mv conftest.h $ac_file
2872   fi
2873 fi; done
2874
2875 EOF
2876 cat >> $CONFIG_STATUS <<EOF
2877
2878 EOF
2879 cat >> $CONFIG_STATUS <<\EOF
2880 echo timestamp > stamp-h
2881 exit 0
2882 EOF
2883 chmod +x $CONFIG_STATUS
2884 rm -fr confdefs* $ac_clean_files
2885 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2886