ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/configure
Revision: 1.6
Committed: 1999-10-18T16:15:40Z (25 years ago) by cebix
Branch: MAIN
Changes since 1.5: +3 -3 lines
Log Message:
- compilation of cpuemu.cpp is now split

File Contents

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