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