ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/configure
Revision: 1.4
Committed: 1999-10-15T12:27:18Z (24 years, 11 months ago) by cebix
Branch: MAIN
Changes since 1.3: +71 -130 lines
Log Message:
- removed unnecessary test for semget()

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     { echo "configure: error: You need libpthreads to run Basilisk II." 1>&2; exit 1; }
2038     else
2039     LIBS="$LIBS -lc_r"
2040     fi
2041     else
2042     LIBS="$LIBS -lpthread"
2043     fi
2044     for ac_func in pthread_cancel
2045     do
2046     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2047     echo "configure:2048: checking for $ac_func" >&5
2048     if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2049     echo $ac_n "(cached) $ac_c" 1>&6
2050     else
2051     cat > conftest.$ac_ext <<EOF
2052     #line 2053 "configure"
2053     #include "confdefs.h"
2054     /* System header to define __stub macros and hopefully few prototypes,
2055     which can conflict with char $ac_func(); below. */
2056     #include <assert.h>
2057     /* Override any gcc2 internal prototype to avoid an error. */
2058     /* We use char because int might match the return type of a gcc2
2059     builtin and then its argument prototype would still apply. */
2060     char $ac_func();
2061    
2062     int main() {
2063    
2064     /* The GNU C library defines this for functions which it implements
2065     to always fail with ENOSYS. Some functions are actually named
2066     something starting with __ and the normal name is an alias. */
2067     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2068     choke me
2069     #else
2070     $ac_func();
2071     #endif
2072    
2073     ; return 0; }
2074     EOF
2075     if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2076     rm -rf conftest*
2077     eval "ac_cv_func_$ac_func=yes"
2078     else
2079     echo "configure: failed program was:" >&5
2080     cat conftest.$ac_ext >&5
2081     rm -rf conftest*
2082     eval "ac_cv_func_$ac_func=no"
2083     fi
2084     rm -f conftest*
2085     fi
2086    
2087     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2088     echo "$ac_t""yes" 1>&6
2089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2090     cat >> confdefs.h <<EOF
2091     #define $ac_tr_func 1
2092     EOF
2093    
2094     else
2095     echo "$ac_t""no" 1>&6
2096     fi
2097     done
2098    
2099    
2100     if [ "x$WANT_DGA" = "xyes" ]; then
2101     echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
2102     echo "configure:2103: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
2103     ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
2104     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2105     echo $ac_n "(cached) $ac_c" 1>&6
2106     else
2107     ac_save_LIBS="$LIBS"
2108     LIBS="-lXxf86dga $LIBS"
2109     cat > conftest.$ac_ext <<EOF
2110     #line 2111 "configure"
2111     #include "confdefs.h"
2112     /* Override any gcc2 internal prototype to avoid an error. */
2113     /* We use char because int might match the return type of a gcc2
2114     builtin and then its argument prototype would still apply. */
2115     char XF86DGAQueryExtension();
2116    
2117     int main() {
2118     XF86DGAQueryExtension()
2119     ; return 0; }
2120     EOF
2121     if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2122     rm -rf conftest*
2123     eval "ac_cv_lib_$ac_lib_var=yes"
2124     else
2125     echo "configure: failed program was:" >&5
2126     cat conftest.$ac_ext >&5
2127     rm -rf conftest*
2128     eval "ac_cv_lib_$ac_lib_var=no"
2129     fi
2130     rm -f conftest*
2131     LIBS="$ac_save_LIBS"
2132    
2133     fi
2134     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2135     echo "$ac_t""yes" 1>&6
2136     HAVE_DGA=yes
2137     else
2138     echo "$ac_t""no" 1>&6
2139     HAVE_DGA=no
2140     fi
2141    
2142     if [ "x$HAVE_DGA" = "xno" ]; then
2143     echo "configure: warning: Could not find DGA extension, ignoring --enable-dga." 1>&2
2144     else
2145     DEFINES="$DEFINES -DENABLE_DGA=1"
2146     LIBS="$LIBS -lXxf86dga"
2147     fi
2148     fi
2149    
2150     if [ "x$WANT_UI" = "xyes" ]; then
2151     # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
2152     if test "${with_gtk_prefix+set}" = set; then
2153     withval="$with_gtk_prefix"
2154     gtk_config_prefix="$withval"
2155     else
2156     gtk_config_prefix=""
2157     fi
2158    
2159     # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
2160     if test "${with_gtk_exec_prefix+set}" = set; then
2161     withval="$with_gtk_exec_prefix"
2162     gtk_config_exec_prefix="$withval"
2163     else
2164     gtk_config_exec_prefix=""
2165     fi
2166    
2167     # Check whether --enable-gtktest or --disable-gtktest was given.
2168     if test "${enable_gtktest+set}" = set; then
2169     enableval="$enable_gtktest"
2170     :
2171     else
2172     enable_gtktest=yes
2173     fi
2174    
2175    
2176     if test x$gtk_config_exec_prefix != x ; then
2177     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
2178     if test x${GTK_CONFIG+set} != xset ; then
2179     GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
2180     fi
2181     fi
2182     if test x$gtk_config_prefix != x ; then
2183     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
2184     if test x${GTK_CONFIG+set} != xset ; then
2185     GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
2186     fi
2187     fi
2188    
2189     # Extract the first word of "gtk-config", so it can be a program name with args.
2190     set dummy gtk-config; ac_word=$2
2191     echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2192     echo "configure:2193: checking for $ac_word" >&5
2193     if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
2194     echo $ac_n "(cached) $ac_c" 1>&6
2195     else
2196     case "$GTK_CONFIG" in
2197     /*)
2198     ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
2199     ;;
2200     ?:/*)
2201     ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
2202     ;;
2203     *)
2204     IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2205     ac_dummy="$PATH"
2206     for ac_dir in $ac_dummy; do
2207     test -z "$ac_dir" && ac_dir=.
2208     if test -f $ac_dir/$ac_word; then
2209     ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
2210     break
2211     fi
2212     done
2213     IFS="$ac_save_ifs"
2214     test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
2215     ;;
2216     esac
2217     fi
2218     GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
2219     if test -n "$GTK_CONFIG"; then
2220     echo "$ac_t""$GTK_CONFIG" 1>&6
2221     else
2222     echo "$ac_t""no" 1>&6
2223     fi
2224    
2225     min_gtk_version=1.2.0
2226     echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
2227     echo "configure:2228: checking for GTK - version >= $min_gtk_version" >&5
2228     no_gtk=""
2229     if test "$GTK_CONFIG" = "no" ; then
2230     no_gtk=yes
2231     else
2232     GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
2233     GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
2234     gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
2235     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
2236     gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
2237     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
2238     gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
2239     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
2240     if test "x$enable_gtktest" = "xyes" ; then
2241     ac_save_CFLAGS="$CFLAGS"
2242     ac_save_LIBS="$LIBS"
2243     CFLAGS="$CFLAGS $GTK_CFLAGS"
2244     LIBS="$LIBS $GTK_LIBS"
2245     rm -f conf.gtktest
2246     if test "$cross_compiling" = yes; then
2247     echo $ac_n "cross compiling; assumed OK... $ac_c"
2248     else
2249     cat > conftest.$ac_ext <<EOF
2250     #line 2251 "configure"
2251     #include "confdefs.h"
2252    
2253     #include <gtk/gtk.h>
2254     #include <stdio.h>
2255    
2256     int
2257     main ()
2258     {
2259     int major, minor, micro;
2260    
2261     system ("touch conf.gtktest");
2262    
2263     if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
2264     printf("%s, bad version string\n", "$min_gtk_version");
2265     exit(1);
2266     }
2267    
2268     if ((gtk_major_version != $gtk_config_major_version) ||
2269     (gtk_minor_version != $gtk_config_minor_version) ||
2270     (gtk_micro_version != $gtk_config_micro_version))
2271     {
2272     printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
2273     $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
2274     gtk_major_version, gtk_minor_version, gtk_micro_version);
2275     printf ("*** was found! If gtk-config was correct, then it is best\n");
2276     printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
2277     printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
2278     printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
2279     printf("*** required on your system.\n");
2280     printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
2281     printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
2282     printf("*** before re-running configure\n");
2283     }
2284     else
2285     {
2286     if ((gtk_major_version > major) ||
2287     ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
2288     ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
2289     {
2290     return 0;
2291     }
2292     else
2293     {
2294     printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
2295     gtk_major_version, gtk_minor_version, gtk_micro_version);
2296     printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
2297     major, minor, micro);
2298     printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
2299     printf("***\n");
2300     printf("*** If you have already installed a sufficiently new version, this error\n");
2301     printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
2302     printf("*** being found. The easiest way to fix this is to remove the old version\n");
2303     printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
2304     printf("*** correct copy of gtk-config. (In this case, you will have to\n");
2305     printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
2306     printf("*** so that the correct libraries are found at run-time))\n");
2307     }
2308     }
2309     return 1;
2310     }
2311    
2312     EOF
2313     if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2314     then
2315     :
2316     else
2317     echo "configure: failed program was:" >&5
2318     cat conftest.$ac_ext >&5
2319     rm -fr conftest*
2320     no_gtk=yes
2321     fi
2322     rm -fr conftest*
2323     fi
2324    
2325     CFLAGS="$ac_save_CFLAGS"
2326     LIBS="$ac_save_LIBS"
2327     fi
2328     fi
2329     if test "x$no_gtk" = x ; then
2330     echo "$ac_t""yes" 1>&6
2331     :
2332     else
2333     echo "$ac_t""no" 1>&6
2334     if test "$GTK_CONFIG" = "no" ; then
2335     echo "*** The gtk-config script installed by GTK could not be found"
2336     echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
2337     echo "*** your path, or set the GTK_CONFIG environment variable to the"
2338     echo "*** full path to gtk-config."
2339     else
2340     if test -f conf.gtktest ; then
2341     :
2342     else
2343     echo "*** Could not run GTK test program, checking why..."
2344     CFLAGS="$CFLAGS $GTK_CFLAGS"
2345     LIBS="$LIBS $GTK_LIBS"
2346     cat > conftest.$ac_ext <<EOF
2347     #line 2348 "configure"
2348     #include "confdefs.h"
2349    
2350     #include <gtk/gtk.h>
2351     #include <stdio.h>
2352    
2353     int main() {
2354     return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
2355     ; return 0; }
2356     EOF
2357     if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2358     rm -rf conftest*
2359     echo "*** The test program compiled, but did not run. This usually means"
2360     echo "*** that the run-time linker is not finding GTK or finding the wrong"
2361     echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
2362     echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2363     echo "*** to the installed location Also, make sure you have run ldconfig if that"
2364     echo "*** is required on your system"
2365     echo "***"
2366     echo "*** If you have an old version installed, it is best to remove it, although"
2367     echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
2368     echo "***"
2369     echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
2370     echo "*** came with the system with the command"
2371     echo "***"
2372     echo "*** rpm --erase --nodeps gtk gtk-devel"
2373     else
2374     echo "configure: failed program was:" >&5
2375     cat conftest.$ac_ext >&5
2376     rm -rf conftest*
2377     echo "*** The test program failed to compile or link. See the file config.log for the"
2378     echo "*** exact error that occured. This usually means GTK was incorrectly installed"
2379     echo "*** or that you have moved GTK since it was installed. In the latter case, you"
2380     echo "*** may want to edit the gtk-config script: $GTK_CONFIG"
2381     fi
2382     rm -f conftest*
2383     CFLAGS="$ac_save_CFLAGS"
2384     LIBS="$ac_save_LIBS"
2385     fi
2386     fi
2387     GTK_CFLAGS=""
2388     GTK_LIBS=""
2389     :
2390     fi
2391    
2392    
2393     rm -f conf.gtktest
2394    
2395     if [ "x$no_gtk" = "xyes" ]; then
2396     echo "Did not find gtk+, disabling user interface."
2397     WANT_UI=no
2398     GTK_CFLAGS=
2399     GTK_LIBS=
2400     else
2401     DEFINES="$DEFINES -DENABLE_GTK=1"
2402     fi
2403     CFLAGS="$CFLAGS $GTK_CFLAGS"
2404     CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
2405     LIBS="$LIBS $GTK_LIBS"
2406     fi
2407    
2408     SEMSRCS=
2409     for ac_func in sem_init
2410     do
2411     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2412     echo "configure:2413: checking for $ac_func" >&5
2413     if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2414     echo $ac_n "(cached) $ac_c" 1>&6
2415     else
2416     cat > conftest.$ac_ext <<EOF
2417     #line 2418 "configure"
2418     #include "confdefs.h"
2419     /* System header to define __stub macros and hopefully few prototypes,
2420     which can conflict with char $ac_func(); below. */
2421     #include <assert.h>
2422     /* Override any gcc2 internal prototype to avoid an error. */
2423     /* We use char because int might match the return type of a gcc2
2424     builtin and then its argument prototype would still apply. */
2425     char $ac_func();
2426    
2427     int main() {
2428    
2429     /* The GNU C library defines this for functions which it implements
2430     to always fail with ENOSYS. Some functions are actually named
2431     something starting with __ and the normal name is an alias. */
2432     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2433     choke me
2434     #else
2435     $ac_func();
2436     #endif
2437    
2438     ; return 0; }
2439     EOF
2440     if { (eval echo configure:2441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2441     rm -rf conftest*
2442     eval "ac_cv_func_$ac_func=yes"
2443     else
2444     echo "configure: failed program was:" >&5
2445     cat conftest.$ac_ext >&5
2446     rm -rf conftest*
2447     eval "ac_cv_func_$ac_func=no"
2448     fi
2449     rm -f conftest*
2450     fi
2451    
2452     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2453     echo "$ac_t""yes" 1>&6
2454     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2455     cat >> confdefs.h <<EOF
2456     #define $ac_tr_func 1
2457     EOF
2458    
2459     else
2460     echo "$ac_t""no" 1>&6
2461     fi
2462     done
2463    
2464     if [ "x$ac_cv_func_sem_init" = "xno" ]; then
2465     echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6
2466     echo "configure:2467: checking for sem_init in -lposix4" >&5
2467     ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'`
2468     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2469     echo $ac_n "(cached) $ac_c" 1>&6
2470     else
2471     ac_save_LIBS="$LIBS"
2472     LIBS="-lposix4 $LIBS"
2473     cat > conftest.$ac_ext <<EOF
2474     #line 2475 "configure"
2475     #include "confdefs.h"
2476     /* Override any gcc2 internal prototype to avoid an error. */
2477     /* We use char because int might match the return type of a gcc2
2478     builtin and then its argument prototype would still apply. */
2479     char sem_init();
2480    
2481     int main() {
2482     sem_init()
2483     ; return 0; }
2484     EOF
2485     if { (eval echo configure:2486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2486     rm -rf conftest*
2487     eval "ac_cv_lib_$ac_lib_var=yes"
2488     else
2489     echo "configure: failed program was:" >&5
2490     cat conftest.$ac_ext >&5
2491     rm -rf conftest*
2492     eval "ac_cv_lib_$ac_lib_var=no"
2493     fi
2494     rm -f conftest*
2495     LIBS="$ac_save_LIBS"
2496    
2497     fi
2498     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2499     echo "$ac_t""yes" 1>&6
2500     HAVE_LIBPOSIX4=yes
2501     else
2502     echo "$ac_t""no" 1>&6
2503     HAVE_LIBPOSIX4=no
2504     fi
2505    
2506     if [ "x$HAVE_LIBPOSIX4" = "xno" ]; then
2507 cebix 1.4 SEMSRCS="posix_sem.cpp"
2508 cebix 1.1 else
2509     LIBS="$LIBS -lposix4"
2510     fi
2511     fi
2512    
2513     echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2514 cebix 1.4 echo "configure:2515: checking for ANSI C header files" >&5
2515 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2516     echo $ac_n "(cached) $ac_c" 1>&6
2517     else
2518     cat > conftest.$ac_ext <<EOF
2519 cebix 1.4 #line 2520 "configure"
2520 cebix 1.1 #include "confdefs.h"
2521     #include <stdlib.h>
2522     #include <stdarg.h>
2523     #include <string.h>
2524     #include <float.h>
2525     EOF
2526     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2527 cebix 1.4 { (eval echo configure:2528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2528 cebix 1.1 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2529     if test -z "$ac_err"; then
2530     rm -rf conftest*
2531     ac_cv_header_stdc=yes
2532     else
2533     echo "$ac_err" >&5
2534     echo "configure: failed program was:" >&5
2535     cat conftest.$ac_ext >&5
2536     rm -rf conftest*
2537     ac_cv_header_stdc=no
2538     fi
2539     rm -f conftest*
2540    
2541     if test $ac_cv_header_stdc = yes; then
2542     # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2543     cat > conftest.$ac_ext <<EOF
2544 cebix 1.4 #line 2545 "configure"
2545 cebix 1.1 #include "confdefs.h"
2546     #include <string.h>
2547     EOF
2548     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2549     egrep "memchr" >/dev/null 2>&1; then
2550     :
2551     else
2552     rm -rf conftest*
2553     ac_cv_header_stdc=no
2554     fi
2555     rm -f conftest*
2556    
2557     fi
2558    
2559     if test $ac_cv_header_stdc = yes; then
2560     # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2561     cat > conftest.$ac_ext <<EOF
2562 cebix 1.4 #line 2563 "configure"
2563 cebix 1.1 #include "confdefs.h"
2564     #include <stdlib.h>
2565     EOF
2566     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2567     egrep "free" >/dev/null 2>&1; then
2568     :
2569     else
2570     rm -rf conftest*
2571     ac_cv_header_stdc=no
2572     fi
2573     rm -f conftest*
2574    
2575     fi
2576    
2577     if test $ac_cv_header_stdc = yes; then
2578     # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2579     if test "$cross_compiling" = yes; then
2580     :
2581     else
2582     cat > conftest.$ac_ext <<EOF
2583 cebix 1.4 #line 2584 "configure"
2584 cebix 1.1 #include "confdefs.h"
2585     #include <ctype.h>
2586     #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2587     #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2588     #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2589     int main () { int i; for (i = 0; i < 256; i++)
2590     if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2591     exit (0); }
2592    
2593     EOF
2594 cebix 1.4 if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2595 cebix 1.1 then
2596     :
2597     else
2598     echo "configure: failed program was:" >&5
2599     cat conftest.$ac_ext >&5
2600     rm -fr conftest*
2601     ac_cv_header_stdc=no
2602     fi
2603     rm -fr conftest*
2604     fi
2605    
2606     fi
2607     fi
2608    
2609     echo "$ac_t""$ac_cv_header_stdc" 1>&6
2610     if test $ac_cv_header_stdc = yes; then
2611     cat >> confdefs.h <<\EOF
2612     #define STDC_HEADERS 1
2613     EOF
2614    
2615     fi
2616    
2617     for ac_hdr in unistd.h fcntl.h sys/time.h
2618     do
2619     ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2620     echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2621 cebix 1.4 echo "configure:2622: checking for $ac_hdr" >&5
2622 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2623     echo $ac_n "(cached) $ac_c" 1>&6
2624     else
2625     cat > conftest.$ac_ext <<EOF
2626 cebix 1.4 #line 2627 "configure"
2627 cebix 1.1 #include "confdefs.h"
2628     #include <$ac_hdr>
2629     EOF
2630     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2631 cebix 1.4 { (eval echo configure:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2632 cebix 1.1 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2633     if test -z "$ac_err"; then
2634     rm -rf conftest*
2635     eval "ac_cv_header_$ac_safe=yes"
2636     else
2637     echo "$ac_err" >&5
2638     echo "configure: failed program was:" >&5
2639     cat conftest.$ac_ext >&5
2640     rm -rf conftest*
2641     eval "ac_cv_header_$ac_safe=no"
2642     fi
2643     rm -f conftest*
2644     fi
2645     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2646     echo "$ac_t""yes" 1>&6
2647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2648     cat >> confdefs.h <<EOF
2649     #define $ac_tr_hdr 1
2650     EOF
2651    
2652     else
2653     echo "$ac_t""no" 1>&6
2654     fi
2655     done
2656    
2657    
2658     echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2659 cebix 1.4 echo "configure:2660: checking whether byte ordering is bigendian" >&5
2660 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2661     echo $ac_n "(cached) $ac_c" 1>&6
2662     else
2663     ac_cv_c_bigendian=unknown
2664     # See if sys/param.h defines the BYTE_ORDER macro.
2665     cat > conftest.$ac_ext <<EOF
2666 cebix 1.4 #line 2667 "configure"
2667 cebix 1.1 #include "confdefs.h"
2668     #include <sys/types.h>
2669     #include <sys/param.h>
2670     int main() {
2671    
2672     #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2673     bogus endian macros
2674     #endif
2675     ; return 0; }
2676     EOF
2677 cebix 1.4 if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2678 cebix 1.1 rm -rf conftest*
2679     # It does; now see whether it defined to BIG_ENDIAN or not.
2680     cat > conftest.$ac_ext <<EOF
2681 cebix 1.4 #line 2682 "configure"
2682 cebix 1.1 #include "confdefs.h"
2683     #include <sys/types.h>
2684     #include <sys/param.h>
2685     int main() {
2686    
2687     #if BYTE_ORDER != BIG_ENDIAN
2688     not big endian
2689     #endif
2690     ; return 0; }
2691     EOF
2692 cebix 1.4 if { (eval echo configure:2693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2693 cebix 1.1 rm -rf conftest*
2694     ac_cv_c_bigendian=yes
2695     else
2696     echo "configure: failed program was:" >&5
2697     cat conftest.$ac_ext >&5
2698     rm -rf conftest*
2699     ac_cv_c_bigendian=no
2700     fi
2701     rm -f conftest*
2702     else
2703     echo "configure: failed program was:" >&5
2704     cat conftest.$ac_ext >&5
2705     fi
2706     rm -f conftest*
2707     if test $ac_cv_c_bigendian = unknown; then
2708     if test "$cross_compiling" = yes; then
2709     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2710     else
2711     cat > conftest.$ac_ext <<EOF
2712 cebix 1.4 #line 2713 "configure"
2713 cebix 1.1 #include "confdefs.h"
2714     main () {
2715     /* Are we little or big endian? From Harbison&Steele. */
2716     union
2717     {
2718     long l;
2719     char c[sizeof (long)];
2720     } u;
2721     u.l = 1;
2722     exit (u.c[sizeof (long) - 1] == 1);
2723     }
2724     EOF
2725 cebix 1.4 if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2726 cebix 1.1 then
2727     ac_cv_c_bigendian=no
2728     else
2729     echo "configure: failed program was:" >&5
2730     cat conftest.$ac_ext >&5
2731     rm -fr conftest*
2732     ac_cv_c_bigendian=yes
2733     fi
2734     rm -fr conftest*
2735     fi
2736    
2737     fi
2738     fi
2739    
2740     echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2741     if test $ac_cv_c_bigendian = yes; then
2742     cat >> confdefs.h <<\EOF
2743     #define WORDS_BIGENDIAN 1
2744     EOF
2745    
2746     fi
2747    
2748     echo $ac_n "checking for working const""... $ac_c" 1>&6
2749 cebix 1.4 echo "configure:2750: checking for working const" >&5
2750 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2751     echo $ac_n "(cached) $ac_c" 1>&6
2752     else
2753     cat > conftest.$ac_ext <<EOF
2754 cebix 1.4 #line 2755 "configure"
2755 cebix 1.1 #include "confdefs.h"
2756    
2757     int main() {
2758    
2759     /* Ultrix mips cc rejects this. */
2760     typedef int charset[2]; const charset x;
2761     /* SunOS 4.1.1 cc rejects this. */
2762     char const *const *ccp;
2763     char **p;
2764     /* NEC SVR4.0.2 mips cc rejects this. */
2765     struct point {int x, y;};
2766     static struct point const zero = {0,0};
2767     /* AIX XL C 1.02.0.0 rejects this.
2768     It does not let you subtract one const X* pointer from another in an arm
2769     of an if-expression whose if-part is not a constant expression */
2770     const char *g = "string";
2771     ccp = &g + (g ? g-g : 0);
2772     /* HPUX 7.0 cc rejects these. */
2773     ++ccp;
2774     p = (char**) ccp;
2775     ccp = (char const *const *) p;
2776     { /* SCO 3.2v4 cc rejects this. */
2777     char *t;
2778     char const *s = 0 ? (char *) 0 : (char const *) 0;
2779    
2780     *t++ = 0;
2781     }
2782     { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2783     int x[] = {25, 17};
2784     const int *foo = &x[0];
2785     ++foo;
2786     }
2787     { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2788     typedef const int *iptr;
2789     iptr p = 0;
2790     ++p;
2791     }
2792     { /* AIX XL C 1.02.0.0 rejects this saying
2793     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2794     struct s { int j; const int *ap[3]; };
2795     struct s *b; b->j = 5;
2796     }
2797     { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2798     const int foo = 10;
2799     }
2800    
2801     ; return 0; }
2802     EOF
2803 cebix 1.4 if { (eval echo configure:2804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2804 cebix 1.1 rm -rf conftest*
2805     ac_cv_c_const=yes
2806     else
2807     echo "configure: failed program was:" >&5
2808     cat conftest.$ac_ext >&5
2809     rm -rf conftest*
2810     ac_cv_c_const=no
2811     fi
2812     rm -f conftest*
2813     fi
2814    
2815     echo "$ac_t""$ac_cv_c_const" 1>&6
2816     if test $ac_cv_c_const = no; then
2817     cat >> confdefs.h <<\EOF
2818     #define const
2819     EOF
2820    
2821     fi
2822    
2823     echo $ac_n "checking for inline""... $ac_c" 1>&6
2824 cebix 1.4 echo "configure:2825: checking for inline" >&5
2825 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2826     echo $ac_n "(cached) $ac_c" 1>&6
2827     else
2828     ac_cv_c_inline=no
2829     for ac_kw in inline __inline__ __inline; do
2830     cat > conftest.$ac_ext <<EOF
2831 cebix 1.4 #line 2832 "configure"
2832 cebix 1.1 #include "confdefs.h"
2833    
2834     int main() {
2835     } $ac_kw foo() {
2836     ; return 0; }
2837     EOF
2838 cebix 1.4 if { (eval echo configure:2839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2839 cebix 1.1 rm -rf conftest*
2840     ac_cv_c_inline=$ac_kw; break
2841     else
2842     echo "configure: failed program was:" >&5
2843     cat conftest.$ac_ext >&5
2844     fi
2845     rm -f conftest*
2846     done
2847    
2848     fi
2849    
2850     echo "$ac_t""$ac_cv_c_inline" 1>&6
2851     case "$ac_cv_c_inline" in
2852     inline | yes) ;;
2853     no) cat >> confdefs.h <<\EOF
2854     #define inline
2855     EOF
2856     ;;
2857     *) cat >> confdefs.h <<EOF
2858     #define inline $ac_cv_c_inline
2859     EOF
2860     ;;
2861     esac
2862    
2863     echo $ac_n "checking size of short""... $ac_c" 1>&6
2864 cebix 1.4 echo "configure:2865: checking size of short" >&5
2865 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2866     echo $ac_n "(cached) $ac_c" 1>&6
2867     else
2868     if test "$cross_compiling" = yes; then
2869     ac_cv_sizeof_short=2
2870     else
2871     cat > conftest.$ac_ext <<EOF
2872 cebix 1.4 #line 2873 "configure"
2873 cebix 1.1 #include "confdefs.h"
2874     #include <stdio.h>
2875     main()
2876     {
2877     FILE *f=fopen("conftestval", "w");
2878     if (!f) exit(1);
2879     fprintf(f, "%d\n", sizeof(short));
2880     exit(0);
2881     }
2882     EOF
2883 cebix 1.4 if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2884 cebix 1.1 then
2885     ac_cv_sizeof_short=`cat conftestval`
2886     else
2887     echo "configure: failed program was:" >&5
2888     cat conftest.$ac_ext >&5
2889     rm -fr conftest*
2890     ac_cv_sizeof_short=0
2891     fi
2892     rm -fr conftest*
2893     fi
2894    
2895     fi
2896     echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2897     cat >> confdefs.h <<EOF
2898     #define SIZEOF_SHORT $ac_cv_sizeof_short
2899     EOF
2900    
2901    
2902     echo $ac_n "checking size of int""... $ac_c" 1>&6
2903 cebix 1.4 echo "configure:2904: checking size of int" >&5
2904 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2905     echo $ac_n "(cached) $ac_c" 1>&6
2906     else
2907     if test "$cross_compiling" = yes; then
2908     ac_cv_sizeof_int=4
2909     else
2910     cat > conftest.$ac_ext <<EOF
2911 cebix 1.4 #line 2912 "configure"
2912 cebix 1.1 #include "confdefs.h"
2913     #include <stdio.h>
2914     main()
2915     {
2916     FILE *f=fopen("conftestval", "w");
2917     if (!f) exit(1);
2918     fprintf(f, "%d\n", sizeof(int));
2919     exit(0);
2920     }
2921     EOF
2922 cebix 1.4 if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2923 cebix 1.1 then
2924     ac_cv_sizeof_int=`cat conftestval`
2925     else
2926     echo "configure: failed program was:" >&5
2927     cat conftest.$ac_ext >&5
2928     rm -fr conftest*
2929     ac_cv_sizeof_int=0
2930     fi
2931     rm -fr conftest*
2932     fi
2933    
2934     fi
2935     echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2936     cat >> confdefs.h <<EOF
2937     #define SIZEOF_INT $ac_cv_sizeof_int
2938     EOF
2939    
2940    
2941     echo $ac_n "checking size of long""... $ac_c" 1>&6
2942 cebix 1.4 echo "configure:2943: checking size of long" >&5
2943 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2944     echo $ac_n "(cached) $ac_c" 1>&6
2945     else
2946     if test "$cross_compiling" = yes; then
2947     ac_cv_sizeof_long=4
2948     else
2949     cat > conftest.$ac_ext <<EOF
2950 cebix 1.4 #line 2951 "configure"
2951 cebix 1.1 #include "confdefs.h"
2952     #include <stdio.h>
2953     main()
2954     {
2955     FILE *f=fopen("conftestval", "w");
2956     if (!f) exit(1);
2957     fprintf(f, "%d\n", sizeof(long));
2958     exit(0);
2959     }
2960     EOF
2961 cebix 1.4 if { (eval echo configure:2962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2962 cebix 1.1 then
2963     ac_cv_sizeof_long=`cat conftestval`
2964     else
2965     echo "configure: failed program was:" >&5
2966     cat conftest.$ac_ext >&5
2967     rm -fr conftest*
2968     ac_cv_sizeof_long=0
2969     fi
2970     rm -fr conftest*
2971     fi
2972    
2973     fi
2974     echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2975     cat >> confdefs.h <<EOF
2976     #define SIZEOF_LONG $ac_cv_sizeof_long
2977     EOF
2978    
2979    
2980     echo $ac_n "checking size of long long""... $ac_c" 1>&6
2981 cebix 1.4 echo "configure:2982: checking size of long long" >&5
2982 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2983     echo $ac_n "(cached) $ac_c" 1>&6
2984     else
2985     if test "$cross_compiling" = yes; then
2986     ac_cv_sizeof_long_long=8
2987     else
2988     cat > conftest.$ac_ext <<EOF
2989 cebix 1.4 #line 2990 "configure"
2990 cebix 1.1 #include "confdefs.h"
2991     #include <stdio.h>
2992     main()
2993     {
2994     FILE *f=fopen("conftestval", "w");
2995     if (!f) exit(1);
2996     fprintf(f, "%d\n", sizeof(long long));
2997     exit(0);
2998     }
2999     EOF
3000 cebix 1.4 if { (eval echo configure:3001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3001 cebix 1.1 then
3002     ac_cv_sizeof_long_long=`cat conftestval`
3003     else
3004     echo "configure: failed program was:" >&5
3005     cat conftest.$ac_ext >&5
3006     rm -fr conftest*
3007     ac_cv_sizeof_long_long=0
3008     fi
3009     rm -fr conftest*
3010     fi
3011    
3012     fi
3013     echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
3014     cat >> confdefs.h <<EOF
3015     #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
3016     EOF
3017    
3018    
3019     echo $ac_n "checking for off_t""... $ac_c" 1>&6
3020 cebix 1.4 echo "configure:3021: checking for off_t" >&5
3021 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3022     echo $ac_n "(cached) $ac_c" 1>&6
3023     else
3024     cat > conftest.$ac_ext <<EOF
3025 cebix 1.4 #line 3026 "configure"
3026 cebix 1.1 #include "confdefs.h"
3027     #include <sys/types.h>
3028     #if STDC_HEADERS
3029     #include <stdlib.h>
3030     #include <stddef.h>
3031     #endif
3032     EOF
3033     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3034     egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3035     rm -rf conftest*
3036     ac_cv_type_off_t=yes
3037     else
3038     rm -rf conftest*
3039     ac_cv_type_off_t=no
3040     fi
3041     rm -f conftest*
3042    
3043     fi
3044     echo "$ac_t""$ac_cv_type_off_t" 1>&6
3045     if test $ac_cv_type_off_t = no; then
3046     cat >> confdefs.h <<\EOF
3047     #define off_t long
3048     EOF
3049    
3050     fi
3051    
3052     echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3053 cebix 1.4 echo "configure:3054: checking for loff_t" >&5
3054 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3055     echo $ac_n "(cached) $ac_c" 1>&6
3056     else
3057     cat > conftest.$ac_ext <<EOF
3058 cebix 1.4 #line 3059 "configure"
3059 cebix 1.1 #include "confdefs.h"
3060     #include <sys/types.h>
3061     #if STDC_HEADERS
3062     #include <stdlib.h>
3063     #include <stddef.h>
3064     #endif
3065     EOF
3066     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3067     egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3068     rm -rf conftest*
3069     ac_cv_type_loff_t=yes
3070     else
3071     rm -rf conftest*
3072     ac_cv_type_loff_t=no
3073     fi
3074     rm -f conftest*
3075    
3076     fi
3077     echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3078     if test $ac_cv_type_loff_t = no; then
3079     cat >> confdefs.h <<\EOF
3080     #define loff_t off_t
3081     EOF
3082    
3083     fi
3084    
3085     echo $ac_n "checking for size_t""... $ac_c" 1>&6
3086 cebix 1.4 echo "configure:3087: checking for size_t" >&5
3087 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3088     echo $ac_n "(cached) $ac_c" 1>&6
3089     else
3090     cat > conftest.$ac_ext <<EOF
3091 cebix 1.4 #line 3092 "configure"
3092 cebix 1.1 #include "confdefs.h"
3093     #include <sys/types.h>
3094     #if STDC_HEADERS
3095     #include <stdlib.h>
3096     #include <stddef.h>
3097     #endif
3098     EOF
3099     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3100     egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3101     rm -rf conftest*
3102     ac_cv_type_size_t=yes
3103     else
3104     rm -rf conftest*
3105     ac_cv_type_size_t=no
3106     fi
3107     rm -f conftest*
3108    
3109     fi
3110     echo "$ac_t""$ac_cv_type_size_t" 1>&6
3111     if test $ac_cv_type_size_t = no; then
3112     cat >> confdefs.h <<\EOF
3113     #define size_t unsigned
3114     EOF
3115    
3116     fi
3117    
3118     echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3119 cebix 1.4 echo "configure:3120: checking whether time.h and sys/time.h may both be included" >&5
3120 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3121     echo $ac_n "(cached) $ac_c" 1>&6
3122     else
3123     cat > conftest.$ac_ext <<EOF
3124 cebix 1.4 #line 3125 "configure"
3125 cebix 1.1 #include "confdefs.h"
3126     #include <sys/types.h>
3127     #include <sys/time.h>
3128     #include <time.h>
3129     int main() {
3130     struct tm *tp;
3131     ; return 0; }
3132     EOF
3133 cebix 1.4 if { (eval echo configure:3134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3134 cebix 1.1 rm -rf conftest*
3135     ac_cv_header_time=yes
3136     else
3137     echo "configure: failed program was:" >&5
3138     cat conftest.$ac_ext >&5
3139     rm -rf conftest*
3140     ac_cv_header_time=no
3141     fi
3142     rm -f conftest*
3143     fi
3144    
3145     echo "$ac_t""$ac_cv_header_time" 1>&6
3146     if test $ac_cv_header_time = yes; then
3147     cat >> confdefs.h <<\EOF
3148     #define TIME_WITH_SYS_TIME 1
3149     EOF
3150    
3151     fi
3152    
3153     echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3154 cebix 1.4 echo "configure:3155: checking whether struct tm is in sys/time.h or time.h" >&5
3155 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3156     echo $ac_n "(cached) $ac_c" 1>&6
3157     else
3158     cat > conftest.$ac_ext <<EOF
3159 cebix 1.4 #line 3160 "configure"
3160 cebix 1.1 #include "confdefs.h"
3161     #include <sys/types.h>
3162     #include <time.h>
3163     int main() {
3164     struct tm *tp; tp->tm_sec;
3165     ; return 0; }
3166     EOF
3167 cebix 1.4 if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3168 cebix 1.1 rm -rf conftest*
3169     ac_cv_struct_tm=time.h
3170     else
3171     echo "configure: failed program was:" >&5
3172     cat conftest.$ac_ext >&5
3173     rm -rf conftest*
3174     ac_cv_struct_tm=sys/time.h
3175     fi
3176     rm -f conftest*
3177     fi
3178    
3179     echo "$ac_t""$ac_cv_struct_tm" 1>&6
3180     if test $ac_cv_struct_tm = sys/time.h; then
3181     cat >> confdefs.h <<\EOF
3182     #define TM_IN_SYS_TIME 1
3183     EOF
3184    
3185     fi
3186    
3187    
3188     for ac_func in strdup cfmakeraw
3189     do
3190     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3191 cebix 1.4 echo "configure:3192: checking for $ac_func" >&5
3192 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3193     echo $ac_n "(cached) $ac_c" 1>&6
3194     else
3195     cat > conftest.$ac_ext <<EOF
3196 cebix 1.4 #line 3197 "configure"
3197 cebix 1.1 #include "confdefs.h"
3198     /* System header to define __stub macros and hopefully few prototypes,
3199     which can conflict with char $ac_func(); below. */
3200     #include <assert.h>
3201     /* Override any gcc2 internal prototype to avoid an error. */
3202     /* We use char because int might match the return type of a gcc2
3203     builtin and then its argument prototype would still apply. */
3204     char $ac_func();
3205    
3206     int main() {
3207    
3208     /* The GNU C library defines this for functions which it implements
3209     to always fail with ENOSYS. Some functions are actually named
3210     something starting with __ and the normal name is an alias. */
3211     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3212     choke me
3213     #else
3214     $ac_func();
3215     #endif
3216    
3217     ; return 0; }
3218     EOF
3219 cebix 1.4 if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3220 cebix 1.1 rm -rf conftest*
3221     eval "ac_cv_func_$ac_func=yes"
3222     else
3223     echo "configure: failed program was:" >&5
3224     cat conftest.$ac_ext >&5
3225     rm -rf conftest*
3226     eval "ac_cv_func_$ac_func=no"
3227     fi
3228     rm -f conftest*
3229     fi
3230    
3231     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3232     echo "$ac_t""yes" 1>&6
3233     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3234     cat >> confdefs.h <<EOF
3235     #define $ac_tr_func 1
3236     EOF
3237    
3238     else
3239     echo "$ac_t""no" 1>&6
3240     fi
3241     done
3242    
3243     for ac_func in nanosleep clock_gettime timer_create
3244     do
3245     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3246 cebix 1.4 echo "configure:3247: checking for $ac_func" >&5
3247 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3248     echo $ac_n "(cached) $ac_c" 1>&6
3249     else
3250     cat > conftest.$ac_ext <<EOF
3251 cebix 1.4 #line 3252 "configure"
3252 cebix 1.1 #include "confdefs.h"
3253     /* System header to define __stub macros and hopefully few prototypes,
3254     which can conflict with char $ac_func(); below. */
3255     #include <assert.h>
3256     /* Override any gcc2 internal prototype to avoid an error. */
3257     /* We use char because int might match the return type of a gcc2
3258     builtin and then its argument prototype would still apply. */
3259     char $ac_func();
3260    
3261     int main() {
3262    
3263     /* The GNU C library defines this for functions which it implements
3264     to always fail with ENOSYS. Some functions are actually named
3265     something starting with __ and the normal name is an alias. */
3266     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3267     choke me
3268     #else
3269     $ac_func();
3270     #endif
3271    
3272     ; return 0; }
3273     EOF
3274 cebix 1.4 if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3275 cebix 1.1 rm -rf conftest*
3276     eval "ac_cv_func_$ac_func=yes"
3277     else
3278     echo "configure: failed program was:" >&5
3279     cat conftest.$ac_ext >&5
3280     rm -rf conftest*
3281     eval "ac_cv_func_$ac_func=no"
3282     fi
3283     rm -f conftest*
3284     fi
3285    
3286     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3287     echo "$ac_t""yes" 1>&6
3288     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3289     cat >> confdefs.h <<EOF
3290     #define $ac_tr_func 1
3291     EOF
3292    
3293     else
3294     echo "$ac_t""no" 1>&6
3295     fi
3296     done
3297    
3298    
3299     SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp ../dummy/audio_dummy.cpp"
3300     if MACHINE=`uname -a 2>/dev/null`; then
3301     case "$MACHINE" in
3302     Linux*)
3303     SYSSRCS="Linux/ether_linux.cpp Linux/scsi_linux.cpp Linux/audio_linux.cpp"
3304     ;;
3305     FreeBSD*3.*)
3306     echo $ac_n "checking for cam_open_btl in -lcam""... $ac_c" 1>&6
3307 cebix 1.4 echo "configure:3308: checking for cam_open_btl in -lcam" >&5
3308 cebix 1.1 ac_lib_var=`echo cam'_'cam_open_btl | sed 'y%./+-%__p_%'`
3309     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3310     echo $ac_n "(cached) $ac_c" 1>&6
3311     else
3312     ac_save_LIBS="$LIBS"
3313     LIBS="-lcam $LIBS"
3314     cat > conftest.$ac_ext <<EOF
3315 cebix 1.4 #line 3316 "configure"
3316 cebix 1.1 #include "confdefs.h"
3317     /* Override any gcc2 internal prototype to avoid an error. */
3318     /* We use char because int might match the return type of a gcc2
3319     builtin and then its argument prototype would still apply. */
3320     char cam_open_btl();
3321    
3322     int main() {
3323     cam_open_btl()
3324     ; return 0; }
3325     EOF
3326 cebix 1.4 if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3327 cebix 1.1 rm -rf conftest*
3328     eval "ac_cv_lib_$ac_lib_var=yes"
3329     else
3330     echo "configure: failed program was:" >&5
3331     cat conftest.$ac_ext >&5
3332     rm -rf conftest*
3333     eval "ac_cv_lib_$ac_lib_var=no"
3334     fi
3335     rm -f conftest*
3336     LIBS="$ac_save_LIBS"
3337    
3338     fi
3339     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3340     echo "$ac_t""yes" 1>&6
3341     HAVE_LIBCAM=yes
3342     else
3343     echo "$ac_t""no" 1>&6
3344     HAVE_LIBCAM=no
3345     fi
3346    
3347     if [ "x$HAVE_LIBCAM" = "xno" ]; then
3348     { echo "configure: error: Cannot find libcam for SCSI management." 1>&2; exit 1; }
3349     else
3350     ac_safe=`echo "/sys/cam/cam.h" | sed 'y%./+-%__p_%'`
3351     echo $ac_n "checking for /sys/cam/cam.h""... $ac_c" 1>&6
3352 cebix 1.4 echo "configure:3353: checking for /sys/cam/cam.h" >&5
3353 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3354     echo $ac_n "(cached) $ac_c" 1>&6
3355     else
3356     cat > conftest.$ac_ext <<EOF
3357 cebix 1.4 #line 3358 "configure"
3358 cebix 1.1 #include "confdefs.h"
3359     #include </sys/cam/cam.h>
3360     EOF
3361     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3362 cebix 1.4 { (eval echo configure:3363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3363 cebix 1.1 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3364     if test -z "$ac_err"; then
3365     rm -rf conftest*
3366     eval "ac_cv_header_$ac_safe=yes"
3367     else
3368     echo "$ac_err" >&5
3369     echo "configure: failed program was:" >&5
3370     cat conftest.$ac_ext >&5
3371     rm -rf conftest*
3372     eval "ac_cv_header_$ac_safe=no"
3373     fi
3374     rm -f conftest*
3375     fi
3376     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3377     echo "$ac_t""yes" 1>&6
3378     :
3379     else
3380     echo "$ac_t""no" 1>&6
3381     fi
3382    
3383     if [ "x$ac_cv_header__sys_cam_cam_h" = "xno" ]; then
3384     { echo "configure: error: Cannot find kernel includes for CAM library." 1>&2; exit 1; }
3385     fi
3386     SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp ../dummy/audio_dummy.cpp"
3387     CXXFLAGS="$CXXFLAGS -I/sys"
3388     CFLAGS="$CFLAGS -I/sys"
3389     LIBS="$LIBS -lcam"
3390     DEFINES="$DEFINES -DBSD_COMP -DCAM"
3391     fi
3392     ;;
3393     FreeBSD*)
3394     echo $ac_n "checking for scsi_open in -lscsi""... $ac_c" 1>&6
3395 cebix 1.4 echo "configure:3396: checking for scsi_open in -lscsi" >&5
3396 cebix 1.1 ac_lib_var=`echo scsi'_'scsi_open | sed 'y%./+-%__p_%'`
3397     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3398     echo $ac_n "(cached) $ac_c" 1>&6
3399     else
3400     ac_save_LIBS="$LIBS"
3401     LIBS="-lscsi $LIBS"
3402     cat > conftest.$ac_ext <<EOF
3403 cebix 1.4 #line 3404 "configure"
3404 cebix 1.1 #include "confdefs.h"
3405     /* Override any gcc2 internal prototype to avoid an error. */
3406     /* We use char because int might match the return type of a gcc2
3407     builtin and then its argument prototype would still apply. */
3408     char scsi_open();
3409    
3410     int main() {
3411     scsi_open()
3412     ; return 0; }
3413     EOF
3414 cebix 1.4 if { (eval echo configure:3415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3415 cebix 1.1 rm -rf conftest*
3416     eval "ac_cv_lib_$ac_lib_var=yes"
3417     else
3418     echo "configure: failed program was:" >&5
3419     cat conftest.$ac_ext >&5
3420     rm -rf conftest*
3421     eval "ac_cv_lib_$ac_lib_var=no"
3422     fi
3423     rm -f conftest*
3424     LIBS="$ac_save_LIBS"
3425    
3426     fi
3427     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3428     echo "$ac_t""yes" 1>&6
3429     HAVE_LIBSCSI=yes
3430     else
3431     echo "$ac_t""no" 1>&6
3432     HAVE_LIBSCSI=no
3433     fi
3434    
3435     if [ "x$HAVE_LIBSCSI" = "xno" ]; then
3436     { echo "configure: error: Cannot find libscsi for SCSI management." 1>&2; exit 1; }
3437     else
3438     ac_safe=`echo "scsi.h sys/scsiio.h" | sed 'y%./+-%__p_%'`
3439     echo $ac_n "checking for scsi.h sys/scsiio.h""... $ac_c" 1>&6
3440 cebix 1.4 echo "configure:3441: checking for scsi.h sys/scsiio.h" >&5
3441 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3442     echo $ac_n "(cached) $ac_c" 1>&6
3443     else
3444     cat > conftest.$ac_ext <<EOF
3445 cebix 1.4 #line 3446 "configure"
3446 cebix 1.1 #include "confdefs.h"
3447     #include <scsi.h sys/scsiio.h>
3448     EOF
3449     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3450 cebix 1.4 { (eval echo configure:3451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3451 cebix 1.1 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3452     if test -z "$ac_err"; then
3453     rm -rf conftest*
3454     eval "ac_cv_header_$ac_safe=yes"
3455     else
3456     echo "$ac_err" >&5
3457     echo "configure: failed program was:" >&5
3458     cat conftest.$ac_ext >&5
3459     rm -rf conftest*
3460     eval "ac_cv_header_$ac_safe=no"
3461     fi
3462     rm -f conftest*
3463     fi
3464     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3465     echo "$ac_t""yes" 1>&6
3466     :
3467     else
3468     echo "$ac_t""no" 1>&6
3469     fi
3470    
3471     if [ "x$ac_cv_header_scsi_h" = "xno" ]; then
3472     { echo "configure: error: Cannot find includes for the SCSI library." 1>&2; exit 1; }
3473     fi
3474     SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp ../dummy/audio_dummy.cpp"
3475     LIBS="$LIBS -lscsi"
3476     DEFINES="$DEFINES -DBSD_COMP"
3477     fi
3478     ;;
3479     SunOS*)
3480     SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp Solaris/audio_solaris.cpp"
3481     DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
3482     ;;
3483     IRIX*)
3484     SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp ../dummy/audio_dummy.cpp Irix/unaligned.c"
3485     DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200"
3486     LIBS="$LIBS -lm"
3487     ;;
3488     esac
3489     if [ "x$WANT_UI" = "xyes" ]; then
3490     SYSSRCS="$SYSSRCS prefs_editor_gtk.cpp"
3491     else
3492     SYSSRCS="$SYSSRCS ../dummy/prefs_editor_dummy.cpp"
3493     fi
3494     fi
3495     if [ "x$SEMSRCS" != "x" ]; then
3496     SYSSRCS="$SYSSRCS $SEMSRCS"
3497     fi
3498    
3499     CPUINCLUDES="-I../uae_cpu"
3500     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"
3501    
3502     HAVE_I386=no
3503     echo $ac_n "checking for x86 target CPU""... $ac_c" 1>&6
3504 cebix 1.4 echo "configure:3505: checking for x86 target CPU" >&5
3505 cebix 1.1 cat > conftest.$ac_ext <<EOF
3506 cebix 1.4 #line 3507 "configure"
3507 cebix 1.1 #include "confdefs.h"
3508    
3509     #ifdef __i386__
3510     yes
3511     #endif
3512    
3513     EOF
3514     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3515     egrep "yes" >/dev/null 2>&1; then
3516     rm -rf conftest*
3517     echo "$ac_t""yes" 1>&6; HAVE_I386=yes
3518     else
3519     rm -rf conftest*
3520     echo "$ac_t""no" 1>&6
3521     fi
3522     rm -f conftest*
3523    
3524    
3525     HAVE_GAS=no
3526     echo $ac_n "checking for GAS .p2align feature""... $ac_c" 1>&6
3527 cebix 1.4 echo "configure:3528: checking for GAS .p2align feature" >&5
3528 cebix 1.1 cat >conftest.S << EOF
3529     .text
3530     .p2align 5
3531     EOF
3532     if $CC conftest.S -c -o conftest.o >/dev/null 2>&1 ; then HAVE_GAS=yes; fi
3533     echo "$ac_t""$HAVE_GAS" 1>&6
3534    
3535     HAVE_GCC27=no
3536     echo $ac_n "checking for GCC 2.7 or higher""... $ac_c" 1>&6
3537 cebix 1.4 echo "configure:3538: checking for GCC 2.7 or higher" >&5
3538 cebix 1.1 cat > conftest.$ac_ext <<EOF
3539 cebix 1.4 #line 3540 "configure"
3540 cebix 1.1 #include "confdefs.h"
3541     #if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
3542     yes
3543     #endif
3544    
3545     EOF
3546     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3547     egrep "yes" >/dev/null 2>&1; then
3548     rm -rf conftest*
3549     echo "$ac_t""yes" 1>&6; HAVE_GCC27=yes
3550     else
3551     rm -rf conftest*
3552     echo "$ac_t""no" 1>&6
3553     fi
3554     rm -f conftest*
3555    
3556    
3557     if [ "x$HAVE_GCC27" = "xyes" ]; then
3558     CFLAGS="$CFLAGS -fomit-frame-pointer"
3559     CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
3560     fi
3561    
3562     if [ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]; then
3563     DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
3564     if [ "x$HAVE_GAS" = "xyes" ]; then
3565     DEFINES="$DEFINES -DX86_ASSEMBLY"
3566     CPUSRCS="$CPUSRCS cpufast.s"
3567     else
3568     CPUSRCS="$CPUSRCS cpuemu.cpp"
3569     fi
3570     else
3571     CPUSRCS="$CPUSRCS cpuemu.cpp"
3572     fi
3573    
3574    
3575    
3576    
3577    
3578    
3579     trap '' 1 2 15
3580     cat > confcache <<\EOF
3581     # This file is a shell script that caches the results of configure
3582     # tests run on this system so they can be shared between configure
3583     # scripts and configure runs. It is not useful on other systems.
3584     # If it contains results you don't want to keep, you may remove or edit it.
3585     #
3586     # By default, configure uses ./config.cache as the cache file,
3587     # creating it if it does not exist already. You can give configure
3588     # the --cache-file=FILE option to use a different cache file; that is
3589     # what configure does when it calls configure scripts in
3590     # subdirectories, so they share the cache.
3591     # Giving --cache-file=/dev/null disables caching, for debugging configure.
3592     # config.status only pays attention to the cache file if you give it the
3593     # --recheck option to rerun configure.
3594     #
3595     EOF
3596     # The following way of writing the cache mishandles newlines in values,
3597     # but we know of no workaround that is simple, portable, and efficient.
3598     # So, don't put newlines in cache variables' values.
3599     # Ultrix sh set writes to stderr and can't be redirected directly,
3600     # and sets the high bit in the cache file unless we assign to the vars.
3601     (set) 2>&1 |
3602     case `(ac_space=' '; set | grep ac_space) 2>&1` in
3603     *ac_space=\ *)
3604     # `set' does not quote correctly, so add quotes (double-quote substitution
3605     # turns \\\\ into \\, and sed turns \\ into \).
3606     sed -n \
3607     -e "s/'/'\\\\''/g" \
3608     -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3609     ;;
3610     *)
3611     # `set' quotes correctly as required by POSIX, so do not add quotes.
3612     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3613     ;;
3614     esac >> confcache
3615     if cmp -s $cache_file confcache; then
3616     :
3617     else
3618     if test -w $cache_file; then
3619     echo "updating cache $cache_file"
3620     cat confcache > $cache_file
3621     else
3622     echo "not updating unwritable cache $cache_file"
3623     fi
3624     fi
3625     rm -f confcache
3626    
3627     trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3628    
3629     test "x$prefix" = xNONE && prefix=$ac_default_prefix
3630     # Let make expand exec_prefix.
3631     test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3632    
3633     # Any assignment to VPATH causes Sun make to only execute
3634     # the first set of double-colon rules, so remove it if not needed.
3635     # If there is a colon in the path, we need to keep it.
3636     if test "x$srcdir" = x.; then
3637     ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3638     fi
3639    
3640     trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3641    
3642     DEFS=-DHAVE_CONFIG_H
3643    
3644     # Without the "./", some shells look in PATH for config.status.
3645     : ${CONFIG_STATUS=./config.status}
3646    
3647     echo creating $CONFIG_STATUS
3648     rm -f $CONFIG_STATUS
3649     cat > $CONFIG_STATUS <<EOF
3650     #! /bin/sh
3651     # Generated automatically by configure.
3652     # Run this file to recreate the current configuration.
3653     # This directory was configured as follows,
3654     # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3655     #
3656     # $0 $ac_configure_args
3657     #
3658     # Compiler output produced by configure, useful for debugging
3659     # configure, is in ./config.log if it exists.
3660    
3661     ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3662     for ac_option
3663     do
3664     case "\$ac_option" in
3665     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3666     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3667     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3668     -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3669     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3670     exit 0 ;;
3671     -help | --help | --hel | --he | --h)
3672     echo "\$ac_cs_usage"; exit 0 ;;
3673     *) echo "\$ac_cs_usage"; exit 1 ;;
3674     esac
3675     done
3676    
3677     ac_given_srcdir=$srcdir
3678     ac_given_INSTALL="$INSTALL"
3679    
3680     trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3681     EOF
3682     cat >> $CONFIG_STATUS <<EOF
3683    
3684     # Protect against being on the right side of a sed subst in config.status.
3685     sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3686     s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3687     $ac_vpsub
3688     $extrasub
3689     s%@SHELL@%$SHELL%g
3690     s%@CFLAGS@%$CFLAGS%g
3691     s%@CPPFLAGS@%$CPPFLAGS%g
3692     s%@CXXFLAGS@%$CXXFLAGS%g
3693     s%@FFLAGS@%$FFLAGS%g
3694     s%@DEFS@%$DEFS%g
3695     s%@LDFLAGS@%$LDFLAGS%g
3696     s%@LIBS@%$LIBS%g
3697     s%@exec_prefix@%$exec_prefix%g
3698     s%@prefix@%$prefix%g
3699     s%@program_transform_name@%$program_transform_name%g
3700     s%@bindir@%$bindir%g
3701     s%@sbindir@%$sbindir%g
3702     s%@libexecdir@%$libexecdir%g
3703     s%@datadir@%$datadir%g
3704     s%@sysconfdir@%$sysconfdir%g
3705     s%@sharedstatedir@%$sharedstatedir%g
3706     s%@localstatedir@%$localstatedir%g
3707     s%@libdir@%$libdir%g
3708     s%@includedir@%$includedir%g
3709     s%@oldincludedir@%$oldincludedir%g
3710     s%@infodir@%$infodir%g
3711     s%@mandir@%$mandir%g
3712     s%@CC@%$CC%g
3713 cebix 1.3 s%@CPP@%$CPP%g
3714 cebix 1.1 s%@CXX@%$CXX%g
3715     s%@SET_MAKE@%$SET_MAKE%g
3716     s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3717     s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3718     s%@INSTALL_DATA@%$INSTALL_DATA%g
3719     s%@X_CFLAGS@%$X_CFLAGS%g
3720     s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3721     s%@X_LIBS@%$X_LIBS%g
3722     s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
3723     s%@GTK_CONFIG@%$GTK_CONFIG%g
3724     s%@GTK_CFLAGS@%$GTK_CFLAGS%g
3725     s%@GTK_LIBS@%$GTK_LIBS%g
3726     s%@DEFINES@%$DEFINES%g
3727     s%@STATICLIBS@%$STATICLIBS%g
3728     s%@SYSSRCS@%$SYSSRCS%g
3729     s%@CPUINCLUDES@%$CPUINCLUDES%g
3730     s%@CPUSRCS@%$CPUSRCS%g
3731    
3732     CEOF
3733     EOF
3734    
3735     cat >> $CONFIG_STATUS <<\EOF
3736    
3737     # Split the substitutions into bite-sized pieces for seds with
3738     # small command number limits, like on Digital OSF/1 and HP-UX.
3739     ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3740     ac_file=1 # Number of current file.
3741     ac_beg=1 # First line for current file.
3742     ac_end=$ac_max_sed_cmds # Line after last line for current file.
3743     ac_more_lines=:
3744     ac_sed_cmds=""
3745     while $ac_more_lines; do
3746     if test $ac_beg -gt 1; then
3747     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3748     else
3749     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3750     fi
3751     if test ! -s conftest.s$ac_file; then
3752     ac_more_lines=false
3753     rm -f conftest.s$ac_file
3754     else
3755     if test -z "$ac_sed_cmds"; then
3756     ac_sed_cmds="sed -f conftest.s$ac_file"
3757     else
3758     ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3759     fi
3760     ac_file=`expr $ac_file + 1`
3761     ac_beg=$ac_end
3762     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3763     fi
3764     done
3765     if test -z "$ac_sed_cmds"; then
3766     ac_sed_cmds=cat
3767     fi
3768     EOF
3769    
3770     cat >> $CONFIG_STATUS <<EOF
3771    
3772     CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3773     EOF
3774     cat >> $CONFIG_STATUS <<\EOF
3775     for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3776     # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3777     case "$ac_file" in
3778     *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3779     ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3780     *) ac_file_in="${ac_file}.in" ;;
3781     esac
3782    
3783     # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3784    
3785     # Remove last slash and all that follows it. Not all systems have dirname.
3786     ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3787     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3788     # The file is in a subdirectory.
3789     test ! -d "$ac_dir" && mkdir "$ac_dir"
3790     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3791     # A "../" for each directory in $ac_dir_suffix.
3792     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3793     else
3794     ac_dir_suffix= ac_dots=
3795     fi
3796    
3797     case "$ac_given_srcdir" in
3798     .) srcdir=.
3799     if test -z "$ac_dots"; then top_srcdir=.
3800     else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3801     /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3802     *) # Relative path.
3803     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3804     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3805     esac
3806    
3807     case "$ac_given_INSTALL" in
3808     [/$]*) INSTALL="$ac_given_INSTALL" ;;
3809     *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3810     esac
3811    
3812     echo creating "$ac_file"
3813     rm -f "$ac_file"
3814     configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3815     case "$ac_file" in
3816     *Makefile*) ac_comsub="1i\\
3817     # $configure_input" ;;
3818     *) ac_comsub= ;;
3819     esac
3820    
3821     ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3822     sed -e "$ac_comsub
3823     s%@configure_input@%$configure_input%g
3824     s%@srcdir@%$srcdir%g
3825     s%@top_srcdir@%$top_srcdir%g
3826     s%@INSTALL@%$INSTALL%g
3827     " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3828     fi; done
3829     rm -f conftest.s*
3830    
3831     # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3832     # NAME is the cpp macro being defined and VALUE is the value it is being given.
3833     #
3834     # ac_d sets the value in "#define NAME VALUE" lines.
3835     ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3836     ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3837     ac_dC='\3'
3838     ac_dD='%g'
3839     # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3840     ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3841     ac_uB='\([ ]\)%\1#\2define\3'
3842     ac_uC=' '
3843     ac_uD='\4%g'
3844     # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3845     ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3846     ac_eB='$%\1#\2define\3'
3847     ac_eC=' '
3848     ac_eD='%g'
3849    
3850     if test "${CONFIG_HEADERS+set}" != set; then
3851     EOF
3852     cat >> $CONFIG_STATUS <<EOF
3853     CONFIG_HEADERS="config.h"
3854     EOF
3855     cat >> $CONFIG_STATUS <<\EOF
3856     fi
3857     for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3858     # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3859     case "$ac_file" in
3860     *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3861     ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3862     *) ac_file_in="${ac_file}.in" ;;
3863     esac
3864    
3865     echo creating $ac_file
3866    
3867     rm -f conftest.frag conftest.in conftest.out
3868     ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3869     cat $ac_file_inputs > conftest.in
3870    
3871     EOF
3872    
3873     # Transform confdefs.h into a sed script conftest.vals that substitutes
3874     # the proper values into config.h.in to produce config.h. And first:
3875     # Protect against being on the right side of a sed subst in config.status.
3876     # Protect against being in an unquoted here document in config.status.
3877     rm -f conftest.vals
3878     cat > conftest.hdr <<\EOF
3879     s/[\\&%]/\\&/g
3880     s%[\\$`]%\\&%g
3881     s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3882     s%ac_d%ac_u%gp
3883     s%ac_u%ac_e%gp
3884     EOF
3885     sed -n -f conftest.hdr confdefs.h > conftest.vals
3886     rm -f conftest.hdr
3887    
3888     # This sed command replaces #undef with comments. This is necessary, for
3889     # example, in the case of _POSIX_SOURCE, which is predefined and required
3890     # on some systems where configure will not decide to define it.
3891     cat >> conftest.vals <<\EOF
3892     s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3893     EOF
3894    
3895     # Break up conftest.vals because some shells have a limit on
3896     # the size of here documents, and old seds have small limits too.
3897    
3898     rm -f conftest.tail
3899     while :
3900     do
3901     ac_lines=`grep -c . conftest.vals`
3902     # grep -c gives empty output for an empty file on some AIX systems.
3903     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3904     # Write a limited-size here document to conftest.frag.
3905     echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3906     sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3907     echo 'CEOF
3908     sed -f conftest.frag conftest.in > conftest.out
3909     rm -f conftest.in
3910     mv conftest.out conftest.in
3911     ' >> $CONFIG_STATUS
3912     sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3913     rm -f conftest.vals
3914     mv conftest.tail conftest.vals
3915     done
3916     rm -f conftest.vals
3917    
3918     cat >> $CONFIG_STATUS <<\EOF
3919     rm -f conftest.frag conftest.h
3920     echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3921     cat conftest.in >> conftest.h
3922     rm -f conftest.in
3923     if cmp -s $ac_file conftest.h 2>/dev/null; then
3924     echo "$ac_file is unchanged"
3925     rm -f conftest.h
3926     else
3927     # Remove last slash and all that follows it. Not all systems have dirname.
3928     ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3929     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3930     # The file is in a subdirectory.
3931     test ! -d "$ac_dir" && mkdir "$ac_dir"
3932     fi
3933     rm -f $ac_file
3934     mv conftest.h $ac_file
3935     fi
3936     fi; done
3937    
3938     EOF
3939     cat >> $CONFIG_STATUS <<EOF
3940    
3941     EOF
3942     cat >> $CONFIG_STATUS <<\EOF
3943    
3944     exit 0
3945     EOF
3946     chmod +x $CONFIG_STATUS
3947     rm -fr confdefs* $ac_clean_files
3948     test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3949    
3950     echo "Configuration done. Now type \"make\"."