root/tags/gsdl-2_30d-distribution/gsdl/configure @ 2308

Revision 1938, 106.1 KB (checked in by jrm21, 19 years ago)

z39.50 is no longer compiled by default. Use the --enable-z3950 option to
configure to include.

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