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