ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/configure
Revision: 1.2
Committed: 1999-10-04T21:07:17Z (25 years, 1 month ago) by cebix
Branch: MAIN
Changes since 1.1: +83 -83 lines
Log Message:
- improved configuration and installation

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     for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
777     do
778     # Extract the first word of "$ac_prog", so it can be a program name with args.
779     set dummy $ac_prog; ac_word=$2
780     echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
781     echo "configure:782: checking for $ac_word" >&5
782     if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
783     echo $ac_n "(cached) $ac_c" 1>&6
784     else
785     if test -n "$CXX"; then
786     ac_cv_prog_CXX="$CXX" # Let the user override the test.
787     else
788     IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
789     ac_dummy="$PATH"
790     for ac_dir in $ac_dummy; do
791     test -z "$ac_dir" && ac_dir=.
792     if test -f $ac_dir/$ac_word; then
793     ac_cv_prog_CXX="$ac_prog"
794     break
795     fi
796     done
797     IFS="$ac_save_ifs"
798     fi
799     fi
800     CXX="$ac_cv_prog_CXX"
801     if test -n "$CXX"; then
802     echo "$ac_t""$CXX" 1>&6
803     else
804     echo "$ac_t""no" 1>&6
805     fi
806    
807     test -n "$CXX" && break
808     done
809     test -n "$CXX" || CXX="gcc"
810    
811    
812     echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
813     echo "configure:814: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
814    
815     ac_ext=C
816     # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
817     ac_cpp='$CXXCPP $CPPFLAGS'
818     ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
819     ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
820     cross_compiling=$ac_cv_prog_cxx_cross
821    
822     cat > conftest.$ac_ext << EOF
823    
824     #line 825 "configure"
825     #include "confdefs.h"
826    
827     int main(){return(0);}
828     EOF
829     if { (eval echo configure:830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
830     ac_cv_prog_cxx_works=yes
831     # If we can't run a trivial program, we are probably using a cross compiler.
832     if (./conftest; exit) 2>/dev/null; then
833     ac_cv_prog_cxx_cross=no
834     else
835     ac_cv_prog_cxx_cross=yes
836     fi
837     else
838     echo "configure: failed program was:" >&5
839     cat conftest.$ac_ext >&5
840     ac_cv_prog_cxx_works=no
841     fi
842     rm -fr conftest*
843     ac_ext=c
844     # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
845     ac_cpp='$CPP $CPPFLAGS'
846     ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
847     ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
848     cross_compiling=$ac_cv_prog_cc_cross
849    
850     echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
851     if test $ac_cv_prog_cxx_works = no; then
852     { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
853     fi
854     echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
855     echo "configure:856: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
856     echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
857     cross_compiling=$ac_cv_prog_cxx_cross
858    
859     echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
860     echo "configure:861: checking whether we are using GNU C++" >&5
861     if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
862     echo $ac_n "(cached) $ac_c" 1>&6
863     else
864     cat > conftest.C <<EOF
865     #ifdef __GNUC__
866     yes;
867     #endif
868     EOF
869     if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
870     ac_cv_prog_gxx=yes
871     else
872     ac_cv_prog_gxx=no
873     fi
874     fi
875    
876     echo "$ac_t""$ac_cv_prog_gxx" 1>&6
877    
878     if test $ac_cv_prog_gxx = yes; then
879     GXX=yes
880     else
881     GXX=
882     fi
883    
884     ac_test_CXXFLAGS="${CXXFLAGS+set}"
885     ac_save_CXXFLAGS="$CXXFLAGS"
886     CXXFLAGS=
887     echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
888     echo "configure:889: checking whether ${CXX-g++} accepts -g" >&5
889     if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
890     echo $ac_n "(cached) $ac_c" 1>&6
891     else
892     echo 'void f(){}' > conftest.cc
893     if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
894     ac_cv_prog_cxx_g=yes
895     else
896     ac_cv_prog_cxx_g=no
897     fi
898     rm -f conftest*
899    
900     fi
901    
902     echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
903     if test "$ac_test_CXXFLAGS" = set; then
904     CXXFLAGS="$ac_save_CXXFLAGS"
905     elif test $ac_cv_prog_cxx_g = yes; then
906     if test "$GXX" = yes; then
907     CXXFLAGS="-g -O2"
908     else
909     CXXFLAGS="-g"
910     fi
911     else
912     if test "$GXX" = yes; then
913     CXXFLAGS="-O2"
914     else
915     CXXFLAGS=
916     fi
917     fi
918    
919     echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
920 cebix 1.2 echo "configure:921: checking whether ${MAKE-make} sets \${MAKE}" >&5
921 cebix 1.1 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
922     if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
923     echo $ac_n "(cached) $ac_c" 1>&6
924     else
925     cat > conftestmake <<\EOF
926     all:
927     @echo 'ac_maketemp="${MAKE}"'
928     EOF
929     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
930     eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
931     if test -n "$ac_maketemp"; then
932     eval ac_cv_prog_make_${ac_make}_set=yes
933     else
934     eval ac_cv_prog_make_${ac_make}_set=no
935     fi
936     rm -f conftestmake
937     fi
938     if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
939     echo "$ac_t""yes" 1>&6
940     SET_MAKE=
941     else
942     echo "$ac_t""no" 1>&6
943     SET_MAKE="MAKE=${MAKE-make}"
944     fi
945    
946     ac_aux_dir=
947     for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
948     if test -f $ac_dir/install-sh; then
949     ac_aux_dir=$ac_dir
950     ac_install_sh="$ac_aux_dir/install-sh -c"
951     break
952     elif test -f $ac_dir/install.sh; then
953     ac_aux_dir=$ac_dir
954     ac_install_sh="$ac_aux_dir/install.sh -c"
955     break
956     fi
957     done
958     if test -z "$ac_aux_dir"; then
959     { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
960     fi
961     ac_config_guess=$ac_aux_dir/config.guess
962     ac_config_sub=$ac_aux_dir/config.sub
963     ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
964    
965     # Find a good install program. We prefer a C program (faster),
966     # so one script is as good as another. But avoid the broken or
967     # incompatible versions:
968     # SysV /etc/install, /usr/sbin/install
969     # SunOS /usr/etc/install
970     # IRIX /sbin/install
971     # AIX /bin/install
972     # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
973     # AFS /usr/afsws/bin/install, which mishandles nonexistent args
974     # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
975     # ./install, which can be erroneously created by make from ./install.sh.
976     echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
977 cebix 1.2 echo "configure:978: checking for a BSD compatible install" >&5
978 cebix 1.1 if test -z "$INSTALL"; then
979     if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
980     echo $ac_n "(cached) $ac_c" 1>&6
981     else
982     IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
983     for ac_dir in $PATH; do
984     # Account for people who put trailing slashes in PATH elements.
985     case "$ac_dir/" in
986     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
987     *)
988     # OSF1 and SCO ODT 3.0 have their own names for install.
989     # Don't use installbsd from OSF since it installs stuff as root
990     # by default.
991     for ac_prog in ginstall scoinst install; do
992     if test -f $ac_dir/$ac_prog; then
993     if test $ac_prog = install &&
994     grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
995     # AIX install. It has an incompatible calling convention.
996     :
997     else
998     ac_cv_path_install="$ac_dir/$ac_prog -c"
999     break 2
1000     fi
1001     fi
1002     done
1003     ;;
1004     esac
1005     done
1006     IFS="$ac_save_IFS"
1007    
1008     fi
1009     if test "${ac_cv_path_install+set}" = set; then
1010     INSTALL="$ac_cv_path_install"
1011     else
1012     # As a last resort, use the slow shell script. We don't cache a
1013     # path for INSTALL within a source directory, because that will
1014     # break other packages using the cache if that directory is
1015     # removed, or if the path is relative.
1016     INSTALL="$ac_install_sh"
1017     fi
1018     fi
1019     echo "$ac_t""$INSTALL" 1>&6
1020    
1021     # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1022     # It thinks the first close brace ends the variable substitution.
1023     test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1024    
1025     test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1026    
1027     test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1028    
1029    
1030 cebix 1.2 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1031     echo "configure:1032: checking how to run the C preprocessor" >&5
1032     # On Suns, sometimes $CPP names a directory.
1033     if test -n "$CPP" && test -d "$CPP"; then
1034     CPP=
1035     fi
1036     if test -z "$CPP"; then
1037     if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1038     echo $ac_n "(cached) $ac_c" 1>&6
1039     else
1040     # This must be in double quotes, not single quotes, because CPP may get
1041     # substituted into the Makefile and "${CC-cc}" will confuse make.
1042     CPP="${CC-cc} -E"
1043     # On the NeXT, cc -E runs the code through the compiler's parser,
1044     # not just through cpp.
1045     cat > conftest.$ac_ext <<EOF
1046     #line 1047 "configure"
1047     #include "confdefs.h"
1048     #include <assert.h>
1049     Syntax Error
1050     EOF
1051     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1052     { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1053     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1054     if test -z "$ac_err"; then
1055     :
1056     else
1057     echo "$ac_err" >&5
1058     echo "configure: failed program was:" >&5
1059     cat conftest.$ac_ext >&5
1060     rm -rf conftest*
1061     CPP="${CC-cc} -E -traditional-cpp"
1062     cat > conftest.$ac_ext <<EOF
1063     #line 1064 "configure"
1064     #include "confdefs.h"
1065     #include <assert.h>
1066     Syntax Error
1067     EOF
1068     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1069     { (eval echo configure:1070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1070     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1071     if test -z "$ac_err"; then
1072     :
1073     else
1074     echo "$ac_err" >&5
1075     echo "configure: failed program was:" >&5
1076     cat conftest.$ac_ext >&5
1077     rm -rf conftest*
1078     CPP="${CC-cc} -nologo -E"
1079     cat > conftest.$ac_ext <<EOF
1080     #line 1081 "configure"
1081     #include "confdefs.h"
1082     #include <assert.h>
1083     Syntax Error
1084     EOF
1085     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1086     { (eval echo configure:1087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1087     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1088     if test -z "$ac_err"; then
1089     :
1090     else
1091     echo "$ac_err" >&5
1092     echo "configure: failed program was:" >&5
1093     cat conftest.$ac_ext >&5
1094     rm -rf conftest*
1095     CPP=/lib/cpp
1096     fi
1097     rm -f conftest*
1098     fi
1099     rm -f conftest*
1100     fi
1101     rm -f conftest*
1102     ac_cv_prog_CPP="$CPP"
1103     fi
1104     CPP="$ac_cv_prog_CPP"
1105     else
1106     ac_cv_prog_CPP="$CPP"
1107     fi
1108     echo "$ac_t""$CPP" 1>&6
1109    
1110 cebix 1.1 # 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     for ac_func in semget
2508     do
2509     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2510     echo "configure:2511: checking for $ac_func" >&5
2511     if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2512     echo $ac_n "(cached) $ac_c" 1>&6
2513     else
2514     cat > conftest.$ac_ext <<EOF
2515     #line 2516 "configure"
2516     #include "confdefs.h"
2517     /* System header to define __stub macros and hopefully few prototypes,
2518     which can conflict with char $ac_func(); below. */
2519     #include <assert.h>
2520     /* Override any gcc2 internal prototype to avoid an error. */
2521     /* We use char because int might match the return type of a gcc2
2522     builtin and then its argument prototype would still apply. */
2523     char $ac_func();
2524    
2525     int main() {
2526    
2527     /* The GNU C library defines this for functions which it implements
2528     to always fail with ENOSYS. Some functions are actually named
2529     something starting with __ and the normal name is an alias. */
2530     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2531     choke me
2532     #else
2533     $ac_func();
2534     #endif
2535    
2536     ; return 0; }
2537     EOF
2538     if { (eval echo configure:2539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2539     rm -rf conftest*
2540     eval "ac_cv_func_$ac_func=yes"
2541     else
2542     echo "configure: failed program was:" >&5
2543     cat conftest.$ac_ext >&5
2544     rm -rf conftest*
2545     eval "ac_cv_func_$ac_func=no"
2546     fi
2547     rm -f conftest*
2548     fi
2549    
2550     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2551     echo "$ac_t""yes" 1>&6
2552     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2553     cat >> confdefs.h <<EOF
2554     #define $ac_tr_func 1
2555     EOF
2556    
2557     else
2558     echo "$ac_t""no" 1>&6
2559     fi
2560     done
2561    
2562     if [ "x$ac_cv_func_semget" = "xno" ]; then
2563     { echo "configure: error: You need POSIX.4 semaphores to run Basilisk II." 1>&2; exit 1; }
2564     else
2565     SEMSRCS="posix_sem.cpp"
2566     fi
2567     else
2568     LIBS="$LIBS -lposix4"
2569     fi
2570     fi
2571    
2572     echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2573     echo "configure:2574: checking for ANSI C header files" >&5
2574     if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2575     echo $ac_n "(cached) $ac_c" 1>&6
2576     else
2577     cat > conftest.$ac_ext <<EOF
2578     #line 2579 "configure"
2579     #include "confdefs.h"
2580     #include <stdlib.h>
2581     #include <stdarg.h>
2582     #include <string.h>
2583     #include <float.h>
2584     EOF
2585     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2586     { (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2587     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2588     if test -z "$ac_err"; then
2589     rm -rf conftest*
2590     ac_cv_header_stdc=yes
2591     else
2592     echo "$ac_err" >&5
2593     echo "configure: failed program was:" >&5
2594     cat conftest.$ac_ext >&5
2595     rm -rf conftest*
2596     ac_cv_header_stdc=no
2597     fi
2598     rm -f conftest*
2599    
2600     if test $ac_cv_header_stdc = yes; then
2601     # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2602     cat > conftest.$ac_ext <<EOF
2603     #line 2604 "configure"
2604     #include "confdefs.h"
2605     #include <string.h>
2606     EOF
2607     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2608     egrep "memchr" >/dev/null 2>&1; then
2609     :
2610     else
2611     rm -rf conftest*
2612     ac_cv_header_stdc=no
2613     fi
2614     rm -f conftest*
2615    
2616     fi
2617    
2618     if test $ac_cv_header_stdc = yes; then
2619     # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2620     cat > conftest.$ac_ext <<EOF
2621     #line 2622 "configure"
2622     #include "confdefs.h"
2623     #include <stdlib.h>
2624     EOF
2625     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2626     egrep "free" >/dev/null 2>&1; then
2627     :
2628     else
2629     rm -rf conftest*
2630     ac_cv_header_stdc=no
2631     fi
2632     rm -f conftest*
2633    
2634     fi
2635    
2636     if test $ac_cv_header_stdc = yes; then
2637     # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2638     if test "$cross_compiling" = yes; then
2639     :
2640     else
2641     cat > conftest.$ac_ext <<EOF
2642     #line 2643 "configure"
2643     #include "confdefs.h"
2644     #include <ctype.h>
2645     #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2646     #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2647     #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2648     int main () { int i; for (i = 0; i < 256; i++)
2649     if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2650     exit (0); }
2651    
2652     EOF
2653     if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2654     then
2655     :
2656     else
2657     echo "configure: failed program was:" >&5
2658     cat conftest.$ac_ext >&5
2659     rm -fr conftest*
2660     ac_cv_header_stdc=no
2661     fi
2662     rm -fr conftest*
2663     fi
2664    
2665     fi
2666     fi
2667    
2668     echo "$ac_t""$ac_cv_header_stdc" 1>&6
2669     if test $ac_cv_header_stdc = yes; then
2670     cat >> confdefs.h <<\EOF
2671     #define STDC_HEADERS 1
2672     EOF
2673    
2674     fi
2675    
2676     for ac_hdr in unistd.h fcntl.h sys/time.h
2677     do
2678     ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2679     echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2680     echo "configure:2681: checking for $ac_hdr" >&5
2681     if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2682     echo $ac_n "(cached) $ac_c" 1>&6
2683     else
2684     cat > conftest.$ac_ext <<EOF
2685     #line 2686 "configure"
2686     #include "confdefs.h"
2687     #include <$ac_hdr>
2688     EOF
2689     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2690     { (eval echo configure:2691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2691     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2692     if test -z "$ac_err"; then
2693     rm -rf conftest*
2694     eval "ac_cv_header_$ac_safe=yes"
2695     else
2696     echo "$ac_err" >&5
2697     echo "configure: failed program was:" >&5
2698     cat conftest.$ac_ext >&5
2699     rm -rf conftest*
2700     eval "ac_cv_header_$ac_safe=no"
2701     fi
2702     rm -f conftest*
2703     fi
2704     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2705     echo "$ac_t""yes" 1>&6
2706     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2707     cat >> confdefs.h <<EOF
2708     #define $ac_tr_hdr 1
2709     EOF
2710    
2711     else
2712     echo "$ac_t""no" 1>&6
2713     fi
2714     done
2715    
2716    
2717     echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2718     echo "configure:2719: checking whether byte ordering is bigendian" >&5
2719     if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2720     echo $ac_n "(cached) $ac_c" 1>&6
2721     else
2722     ac_cv_c_bigendian=unknown
2723     # See if sys/param.h defines the BYTE_ORDER macro.
2724     cat > conftest.$ac_ext <<EOF
2725     #line 2726 "configure"
2726     #include "confdefs.h"
2727     #include <sys/types.h>
2728     #include <sys/param.h>
2729     int main() {
2730    
2731     #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2732     bogus endian macros
2733     #endif
2734     ; return 0; }
2735     EOF
2736     if { (eval echo configure:2737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2737     rm -rf conftest*
2738     # It does; now see whether it defined to BIG_ENDIAN or not.
2739     cat > conftest.$ac_ext <<EOF
2740     #line 2741 "configure"
2741     #include "confdefs.h"
2742     #include <sys/types.h>
2743     #include <sys/param.h>
2744     int main() {
2745    
2746     #if BYTE_ORDER != BIG_ENDIAN
2747     not big endian
2748     #endif
2749     ; return 0; }
2750     EOF
2751     if { (eval echo configure:2752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2752     rm -rf conftest*
2753     ac_cv_c_bigendian=yes
2754     else
2755     echo "configure: failed program was:" >&5
2756     cat conftest.$ac_ext >&5
2757     rm -rf conftest*
2758     ac_cv_c_bigendian=no
2759     fi
2760     rm -f conftest*
2761     else
2762     echo "configure: failed program was:" >&5
2763     cat conftest.$ac_ext >&5
2764     fi
2765     rm -f conftest*
2766     if test $ac_cv_c_bigendian = unknown; then
2767     if test "$cross_compiling" = yes; then
2768     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2769     else
2770     cat > conftest.$ac_ext <<EOF
2771     #line 2772 "configure"
2772     #include "confdefs.h"
2773     main () {
2774     /* Are we little or big endian? From Harbison&Steele. */
2775     union
2776     {
2777     long l;
2778     char c[sizeof (long)];
2779     } u;
2780     u.l = 1;
2781     exit (u.c[sizeof (long) - 1] == 1);
2782     }
2783     EOF
2784     if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2785     then
2786     ac_cv_c_bigendian=no
2787     else
2788     echo "configure: failed program was:" >&5
2789     cat conftest.$ac_ext >&5
2790     rm -fr conftest*
2791     ac_cv_c_bigendian=yes
2792     fi
2793     rm -fr conftest*
2794     fi
2795    
2796     fi
2797     fi
2798    
2799     echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2800     if test $ac_cv_c_bigendian = yes; then
2801     cat >> confdefs.h <<\EOF
2802     #define WORDS_BIGENDIAN 1
2803     EOF
2804    
2805     fi
2806    
2807     echo $ac_n "checking for working const""... $ac_c" 1>&6
2808     echo "configure:2809: checking for working const" >&5
2809     if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2810     echo $ac_n "(cached) $ac_c" 1>&6
2811     else
2812     cat > conftest.$ac_ext <<EOF
2813     #line 2814 "configure"
2814     #include "confdefs.h"
2815    
2816     int main() {
2817    
2818     /* Ultrix mips cc rejects this. */
2819     typedef int charset[2]; const charset x;
2820     /* SunOS 4.1.1 cc rejects this. */
2821     char const *const *ccp;
2822     char **p;
2823     /* NEC SVR4.0.2 mips cc rejects this. */
2824     struct point {int x, y;};
2825     static struct point const zero = {0,0};
2826     /* AIX XL C 1.02.0.0 rejects this.
2827     It does not let you subtract one const X* pointer from another in an arm
2828     of an if-expression whose if-part is not a constant expression */
2829     const char *g = "string";
2830     ccp = &g + (g ? g-g : 0);
2831     /* HPUX 7.0 cc rejects these. */
2832     ++ccp;
2833     p = (char**) ccp;
2834     ccp = (char const *const *) p;
2835     { /* SCO 3.2v4 cc rejects this. */
2836     char *t;
2837     char const *s = 0 ? (char *) 0 : (char const *) 0;
2838    
2839     *t++ = 0;
2840     }
2841     { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2842     int x[] = {25, 17};
2843     const int *foo = &x[0];
2844     ++foo;
2845     }
2846     { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2847     typedef const int *iptr;
2848     iptr p = 0;
2849     ++p;
2850     }
2851     { /* AIX XL C 1.02.0.0 rejects this saying
2852     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2853     struct s { int j; const int *ap[3]; };
2854     struct s *b; b->j = 5;
2855     }
2856     { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2857     const int foo = 10;
2858     }
2859    
2860     ; return 0; }
2861     EOF
2862     if { (eval echo configure:2863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2863     rm -rf conftest*
2864     ac_cv_c_const=yes
2865     else
2866     echo "configure: failed program was:" >&5
2867     cat conftest.$ac_ext >&5
2868     rm -rf conftest*
2869     ac_cv_c_const=no
2870     fi
2871     rm -f conftest*
2872     fi
2873    
2874     echo "$ac_t""$ac_cv_c_const" 1>&6
2875     if test $ac_cv_c_const = no; then
2876     cat >> confdefs.h <<\EOF
2877     #define const
2878     EOF
2879    
2880     fi
2881    
2882     echo $ac_n "checking for inline""... $ac_c" 1>&6
2883     echo "configure:2884: checking for inline" >&5
2884     if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2885     echo $ac_n "(cached) $ac_c" 1>&6
2886     else
2887     ac_cv_c_inline=no
2888     for ac_kw in inline __inline__ __inline; do
2889     cat > conftest.$ac_ext <<EOF
2890     #line 2891 "configure"
2891     #include "confdefs.h"
2892    
2893     int main() {
2894     } $ac_kw foo() {
2895     ; return 0; }
2896     EOF
2897     if { (eval echo configure:2898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2898     rm -rf conftest*
2899     ac_cv_c_inline=$ac_kw; break
2900     else
2901     echo "configure: failed program was:" >&5
2902     cat conftest.$ac_ext >&5
2903     fi
2904     rm -f conftest*
2905     done
2906    
2907     fi
2908    
2909     echo "$ac_t""$ac_cv_c_inline" 1>&6
2910     case "$ac_cv_c_inline" in
2911     inline | yes) ;;
2912     no) cat >> confdefs.h <<\EOF
2913     #define inline
2914     EOF
2915     ;;
2916     *) cat >> confdefs.h <<EOF
2917     #define inline $ac_cv_c_inline
2918     EOF
2919     ;;
2920     esac
2921    
2922     echo $ac_n "checking size of short""... $ac_c" 1>&6
2923     echo "configure:2924: checking size of short" >&5
2924     if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2925     echo $ac_n "(cached) $ac_c" 1>&6
2926     else
2927     if test "$cross_compiling" = yes; then
2928     ac_cv_sizeof_short=2
2929     else
2930     cat > conftest.$ac_ext <<EOF
2931     #line 2932 "configure"
2932     #include "confdefs.h"
2933     #include <stdio.h>
2934     main()
2935     {
2936     FILE *f=fopen("conftestval", "w");
2937     if (!f) exit(1);
2938     fprintf(f, "%d\n", sizeof(short));
2939     exit(0);
2940     }
2941     EOF
2942     if { (eval echo configure:2943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2943     then
2944     ac_cv_sizeof_short=`cat conftestval`
2945     else
2946     echo "configure: failed program was:" >&5
2947     cat conftest.$ac_ext >&5
2948     rm -fr conftest*
2949     ac_cv_sizeof_short=0
2950     fi
2951     rm -fr conftest*
2952     fi
2953    
2954     fi
2955     echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2956     cat >> confdefs.h <<EOF
2957     #define SIZEOF_SHORT $ac_cv_sizeof_short
2958     EOF
2959    
2960    
2961     echo $ac_n "checking size of int""... $ac_c" 1>&6
2962     echo "configure:2963: checking size of int" >&5
2963     if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2964     echo $ac_n "(cached) $ac_c" 1>&6
2965     else
2966     if test "$cross_compiling" = yes; then
2967     ac_cv_sizeof_int=4
2968     else
2969     cat > conftest.$ac_ext <<EOF
2970     #line 2971 "configure"
2971     #include "confdefs.h"
2972     #include <stdio.h>
2973     main()
2974     {
2975     FILE *f=fopen("conftestval", "w");
2976     if (!f) exit(1);
2977     fprintf(f, "%d\n", sizeof(int));
2978     exit(0);
2979     }
2980     EOF
2981     if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2982     then
2983     ac_cv_sizeof_int=`cat conftestval`
2984     else
2985     echo "configure: failed program was:" >&5
2986     cat conftest.$ac_ext >&5
2987     rm -fr conftest*
2988     ac_cv_sizeof_int=0
2989     fi
2990     rm -fr conftest*
2991     fi
2992    
2993     fi
2994     echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2995     cat >> confdefs.h <<EOF
2996     #define SIZEOF_INT $ac_cv_sizeof_int
2997     EOF
2998    
2999    
3000     echo $ac_n "checking size of long""... $ac_c" 1>&6
3001     echo "configure:3002: checking size of long" >&5
3002     if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3003     echo $ac_n "(cached) $ac_c" 1>&6
3004     else
3005     if test "$cross_compiling" = yes; then
3006     ac_cv_sizeof_long=4
3007     else
3008     cat > conftest.$ac_ext <<EOF
3009     #line 3010 "configure"
3010     #include "confdefs.h"
3011     #include <stdio.h>
3012     main()
3013     {
3014     FILE *f=fopen("conftestval", "w");
3015     if (!f) exit(1);
3016     fprintf(f, "%d\n", sizeof(long));
3017     exit(0);
3018     }
3019     EOF
3020     if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3021     then
3022     ac_cv_sizeof_long=`cat conftestval`
3023     else
3024     echo "configure: failed program was:" >&5
3025     cat conftest.$ac_ext >&5
3026     rm -fr conftest*
3027     ac_cv_sizeof_long=0
3028     fi
3029     rm -fr conftest*
3030     fi
3031    
3032     fi
3033     echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3034     cat >> confdefs.h <<EOF
3035     #define SIZEOF_LONG $ac_cv_sizeof_long
3036     EOF
3037    
3038    
3039     echo $ac_n "checking size of long long""... $ac_c" 1>&6
3040     echo "configure:3041: checking size of long long" >&5
3041     if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
3042     echo $ac_n "(cached) $ac_c" 1>&6
3043     else
3044     if test "$cross_compiling" = yes; then
3045     ac_cv_sizeof_long_long=8
3046     else
3047     cat > conftest.$ac_ext <<EOF
3048     #line 3049 "configure"
3049     #include "confdefs.h"
3050     #include <stdio.h>
3051     main()
3052     {
3053     FILE *f=fopen("conftestval", "w");
3054     if (!f) exit(1);
3055     fprintf(f, "%d\n", sizeof(long long));
3056     exit(0);
3057     }
3058     EOF
3059     if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3060     then
3061     ac_cv_sizeof_long_long=`cat conftestval`
3062     else
3063     echo "configure: failed program was:" >&5
3064     cat conftest.$ac_ext >&5
3065     rm -fr conftest*
3066     ac_cv_sizeof_long_long=0
3067     fi
3068     rm -fr conftest*
3069     fi
3070    
3071     fi
3072     echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
3073     cat >> confdefs.h <<EOF
3074     #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
3075     EOF
3076    
3077    
3078     echo $ac_n "checking for off_t""... $ac_c" 1>&6
3079     echo "configure:3080: checking for off_t" >&5
3080     if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3081     echo $ac_n "(cached) $ac_c" 1>&6
3082     else
3083     cat > conftest.$ac_ext <<EOF
3084     #line 3085 "configure"
3085     #include "confdefs.h"
3086     #include <sys/types.h>
3087     #if STDC_HEADERS
3088     #include <stdlib.h>
3089     #include <stddef.h>
3090     #endif
3091     EOF
3092     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3093     egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3094     rm -rf conftest*
3095     ac_cv_type_off_t=yes
3096     else
3097     rm -rf conftest*
3098     ac_cv_type_off_t=no
3099     fi
3100     rm -f conftest*
3101    
3102     fi
3103     echo "$ac_t""$ac_cv_type_off_t" 1>&6
3104     if test $ac_cv_type_off_t = no; then
3105     cat >> confdefs.h <<\EOF
3106     #define off_t long
3107     EOF
3108    
3109     fi
3110    
3111     echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3112     echo "configure:3113: checking for loff_t" >&5
3113     if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3114     echo $ac_n "(cached) $ac_c" 1>&6
3115     else
3116     cat > conftest.$ac_ext <<EOF
3117     #line 3118 "configure"
3118     #include "confdefs.h"
3119     #include <sys/types.h>
3120     #if STDC_HEADERS
3121     #include <stdlib.h>
3122     #include <stddef.h>
3123     #endif
3124     EOF
3125     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3126     egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3127     rm -rf conftest*
3128     ac_cv_type_loff_t=yes
3129     else
3130     rm -rf conftest*
3131     ac_cv_type_loff_t=no
3132     fi
3133     rm -f conftest*
3134    
3135     fi
3136     echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3137     if test $ac_cv_type_loff_t = no; then
3138     cat >> confdefs.h <<\EOF
3139     #define loff_t off_t
3140     EOF
3141    
3142     fi
3143    
3144     echo $ac_n "checking for size_t""... $ac_c" 1>&6
3145     echo "configure:3146: checking for size_t" >&5
3146     if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3147     echo $ac_n "(cached) $ac_c" 1>&6
3148     else
3149     cat > conftest.$ac_ext <<EOF
3150     #line 3151 "configure"
3151     #include "confdefs.h"
3152     #include <sys/types.h>
3153     #if STDC_HEADERS
3154     #include <stdlib.h>
3155     #include <stddef.h>
3156     #endif
3157     EOF
3158     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3159     egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3160     rm -rf conftest*
3161     ac_cv_type_size_t=yes
3162     else
3163     rm -rf conftest*
3164     ac_cv_type_size_t=no
3165     fi
3166     rm -f conftest*
3167    
3168     fi
3169     echo "$ac_t""$ac_cv_type_size_t" 1>&6
3170     if test $ac_cv_type_size_t = no; then
3171     cat >> confdefs.h <<\EOF
3172     #define size_t unsigned
3173     EOF
3174    
3175     fi
3176    
3177     echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3178     echo "configure:3179: checking whether time.h and sys/time.h may both be included" >&5
3179     if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3180     echo $ac_n "(cached) $ac_c" 1>&6
3181     else
3182     cat > conftest.$ac_ext <<EOF
3183     #line 3184 "configure"
3184     #include "confdefs.h"
3185     #include <sys/types.h>
3186     #include <sys/time.h>
3187     #include <time.h>
3188     int main() {
3189     struct tm *tp;
3190     ; return 0; }
3191     EOF
3192     if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3193     rm -rf conftest*
3194     ac_cv_header_time=yes
3195     else
3196     echo "configure: failed program was:" >&5
3197     cat conftest.$ac_ext >&5
3198     rm -rf conftest*
3199     ac_cv_header_time=no
3200     fi
3201     rm -f conftest*
3202     fi
3203    
3204     echo "$ac_t""$ac_cv_header_time" 1>&6
3205     if test $ac_cv_header_time = yes; then
3206     cat >> confdefs.h <<\EOF
3207     #define TIME_WITH_SYS_TIME 1
3208     EOF
3209    
3210     fi
3211    
3212     echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3213     echo "configure:3214: checking whether struct tm is in sys/time.h or time.h" >&5
3214     if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3215     echo $ac_n "(cached) $ac_c" 1>&6
3216     else
3217     cat > conftest.$ac_ext <<EOF
3218     #line 3219 "configure"
3219     #include "confdefs.h"
3220     #include <sys/types.h>
3221     #include <time.h>
3222     int main() {
3223     struct tm *tp; tp->tm_sec;
3224     ; return 0; }
3225     EOF
3226     if { (eval echo configure:3227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3227     rm -rf conftest*
3228     ac_cv_struct_tm=time.h
3229     else
3230     echo "configure: failed program was:" >&5
3231     cat conftest.$ac_ext >&5
3232     rm -rf conftest*
3233     ac_cv_struct_tm=sys/time.h
3234     fi
3235     rm -f conftest*
3236     fi
3237    
3238     echo "$ac_t""$ac_cv_struct_tm" 1>&6
3239     if test $ac_cv_struct_tm = sys/time.h; then
3240     cat >> confdefs.h <<\EOF
3241     #define TM_IN_SYS_TIME 1
3242     EOF
3243    
3244     fi
3245    
3246    
3247     for ac_func in strdup cfmakeraw
3248     do
3249     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3250     echo "configure:3251: checking for $ac_func" >&5
3251     if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3252     echo $ac_n "(cached) $ac_c" 1>&6
3253     else
3254     cat > conftest.$ac_ext <<EOF
3255     #line 3256 "configure"
3256     #include "confdefs.h"
3257     /* System header to define __stub macros and hopefully few prototypes,
3258     which can conflict with char $ac_func(); below. */
3259     #include <assert.h>
3260     /* Override any gcc2 internal prototype to avoid an error. */
3261     /* We use char because int might match the return type of a gcc2
3262     builtin and then its argument prototype would still apply. */
3263     char $ac_func();
3264    
3265     int main() {
3266    
3267     /* The GNU C library defines this for functions which it implements
3268     to always fail with ENOSYS. Some functions are actually named
3269     something starting with __ and the normal name is an alias. */
3270     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3271     choke me
3272     #else
3273     $ac_func();
3274     #endif
3275    
3276     ; return 0; }
3277     EOF
3278     if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3279     rm -rf conftest*
3280     eval "ac_cv_func_$ac_func=yes"
3281     else
3282     echo "configure: failed program was:" >&5
3283     cat conftest.$ac_ext >&5
3284     rm -rf conftest*
3285     eval "ac_cv_func_$ac_func=no"
3286     fi
3287     rm -f conftest*
3288     fi
3289    
3290     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3291     echo "$ac_t""yes" 1>&6
3292     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3293     cat >> confdefs.h <<EOF
3294     #define $ac_tr_func 1
3295     EOF
3296    
3297     else
3298     echo "$ac_t""no" 1>&6
3299     fi
3300     done
3301    
3302     for ac_func in nanosleep clock_gettime timer_create
3303     do
3304     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3305     echo "configure:3306: checking for $ac_func" >&5
3306     if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3307     echo $ac_n "(cached) $ac_c" 1>&6
3308     else
3309     cat > conftest.$ac_ext <<EOF
3310     #line 3311 "configure"
3311     #include "confdefs.h"
3312     /* System header to define __stub macros and hopefully few prototypes,
3313     which can conflict with char $ac_func(); below. */
3314     #include <assert.h>
3315     /* Override any gcc2 internal prototype to avoid an error. */
3316     /* We use char because int might match the return type of a gcc2
3317     builtin and then its argument prototype would still apply. */
3318     char $ac_func();
3319    
3320     int main() {
3321    
3322     /* The GNU C library defines this for functions which it implements
3323     to always fail with ENOSYS. Some functions are actually named
3324     something starting with __ and the normal name is an alias. */
3325     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3326     choke me
3327     #else
3328     $ac_func();
3329     #endif
3330    
3331     ; return 0; }
3332     EOF
3333     if { (eval echo configure:3334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3334     rm -rf conftest*
3335     eval "ac_cv_func_$ac_func=yes"
3336     else
3337     echo "configure: failed program was:" >&5
3338     cat conftest.$ac_ext >&5
3339     rm -rf conftest*
3340     eval "ac_cv_func_$ac_func=no"
3341     fi
3342     rm -f conftest*
3343     fi
3344    
3345     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3346     echo "$ac_t""yes" 1>&6
3347     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3348     cat >> confdefs.h <<EOF
3349     #define $ac_tr_func 1
3350     EOF
3351    
3352     else
3353     echo "$ac_t""no" 1>&6
3354     fi
3355     done
3356    
3357    
3358     SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp ../dummy/audio_dummy.cpp"
3359     if MACHINE=`uname -a 2>/dev/null`; then
3360     case "$MACHINE" in
3361     Linux*)
3362     SYSSRCS="Linux/ether_linux.cpp Linux/scsi_linux.cpp Linux/audio_linux.cpp"
3363     ;;
3364     FreeBSD*3.*)
3365     echo $ac_n "checking for cam_open_btl in -lcam""... $ac_c" 1>&6
3366     echo "configure:3367: checking for cam_open_btl in -lcam" >&5
3367     ac_lib_var=`echo cam'_'cam_open_btl | sed 'y%./+-%__p_%'`
3368     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3369     echo $ac_n "(cached) $ac_c" 1>&6
3370     else
3371     ac_save_LIBS="$LIBS"
3372     LIBS="-lcam $LIBS"
3373     cat > conftest.$ac_ext <<EOF
3374     #line 3375 "configure"
3375     #include "confdefs.h"
3376     /* Override any gcc2 internal prototype to avoid an error. */
3377     /* We use char because int might match the return type of a gcc2
3378     builtin and then its argument prototype would still apply. */
3379     char cam_open_btl();
3380    
3381     int main() {
3382     cam_open_btl()
3383     ; return 0; }
3384     EOF
3385     if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3386     rm -rf conftest*
3387     eval "ac_cv_lib_$ac_lib_var=yes"
3388     else
3389     echo "configure: failed program was:" >&5
3390     cat conftest.$ac_ext >&5
3391     rm -rf conftest*
3392     eval "ac_cv_lib_$ac_lib_var=no"
3393     fi
3394     rm -f conftest*
3395     LIBS="$ac_save_LIBS"
3396    
3397     fi
3398     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3399     echo "$ac_t""yes" 1>&6
3400     HAVE_LIBCAM=yes
3401     else
3402     echo "$ac_t""no" 1>&6
3403     HAVE_LIBCAM=no
3404     fi
3405    
3406     if [ "x$HAVE_LIBCAM" = "xno" ]; then
3407     { echo "configure: error: Cannot find libcam for SCSI management." 1>&2; exit 1; }
3408     else
3409     ac_safe=`echo "/sys/cam/cam.h" | sed 'y%./+-%__p_%'`
3410     echo $ac_n "checking for /sys/cam/cam.h""... $ac_c" 1>&6
3411     echo "configure:3412: checking for /sys/cam/cam.h" >&5
3412     if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3413     echo $ac_n "(cached) $ac_c" 1>&6
3414     else
3415     cat > conftest.$ac_ext <<EOF
3416     #line 3417 "configure"
3417     #include "confdefs.h"
3418     #include </sys/cam/cam.h>
3419     EOF
3420     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3421     { (eval echo configure:3422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3422     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3423     if test -z "$ac_err"; then
3424     rm -rf conftest*
3425     eval "ac_cv_header_$ac_safe=yes"
3426     else
3427     echo "$ac_err" >&5
3428     echo "configure: failed program was:" >&5
3429     cat conftest.$ac_ext >&5
3430     rm -rf conftest*
3431     eval "ac_cv_header_$ac_safe=no"
3432     fi
3433     rm -f conftest*
3434     fi
3435     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3436     echo "$ac_t""yes" 1>&6
3437     :
3438     else
3439     echo "$ac_t""no" 1>&6
3440     fi
3441    
3442     if [ "x$ac_cv_header__sys_cam_cam_h" = "xno" ]; then
3443     { echo "configure: error: Cannot find kernel includes for CAM library." 1>&2; exit 1; }
3444     fi
3445     SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp ../dummy/audio_dummy.cpp"
3446     CXXFLAGS="$CXXFLAGS -I/sys"
3447     CFLAGS="$CFLAGS -I/sys"
3448     LIBS="$LIBS -lcam"
3449     DEFINES="$DEFINES -DBSD_COMP -DCAM"
3450     fi
3451     ;;
3452     FreeBSD*)
3453     echo $ac_n "checking for scsi_open in -lscsi""... $ac_c" 1>&6
3454     echo "configure:3455: checking for scsi_open in -lscsi" >&5
3455     ac_lib_var=`echo scsi'_'scsi_open | sed 'y%./+-%__p_%'`
3456     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3457     echo $ac_n "(cached) $ac_c" 1>&6
3458     else
3459     ac_save_LIBS="$LIBS"
3460     LIBS="-lscsi $LIBS"
3461     cat > conftest.$ac_ext <<EOF
3462     #line 3463 "configure"
3463     #include "confdefs.h"
3464     /* Override any gcc2 internal prototype to avoid an error. */
3465     /* We use char because int might match the return type of a gcc2
3466     builtin and then its argument prototype would still apply. */
3467     char scsi_open();
3468    
3469     int main() {
3470     scsi_open()
3471     ; return 0; }
3472     EOF
3473     if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3474     rm -rf conftest*
3475     eval "ac_cv_lib_$ac_lib_var=yes"
3476     else
3477     echo "configure: failed program was:" >&5
3478     cat conftest.$ac_ext >&5
3479     rm -rf conftest*
3480     eval "ac_cv_lib_$ac_lib_var=no"
3481     fi
3482     rm -f conftest*
3483     LIBS="$ac_save_LIBS"
3484    
3485     fi
3486     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3487     echo "$ac_t""yes" 1>&6
3488     HAVE_LIBSCSI=yes
3489     else
3490     echo "$ac_t""no" 1>&6
3491     HAVE_LIBSCSI=no
3492     fi
3493    
3494     if [ "x$HAVE_LIBSCSI" = "xno" ]; then
3495     { echo "configure: error: Cannot find libscsi for SCSI management." 1>&2; exit 1; }
3496     else
3497     ac_safe=`echo "scsi.h sys/scsiio.h" | sed 'y%./+-%__p_%'`
3498     echo $ac_n "checking for scsi.h sys/scsiio.h""... $ac_c" 1>&6
3499     echo "configure:3500: checking for scsi.h sys/scsiio.h" >&5
3500     if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3501     echo $ac_n "(cached) $ac_c" 1>&6
3502     else
3503     cat > conftest.$ac_ext <<EOF
3504     #line 3505 "configure"
3505     #include "confdefs.h"
3506     #include <scsi.h sys/scsiio.h>
3507     EOF
3508     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3509     { (eval echo configure:3510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3510     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3511     if test -z "$ac_err"; then
3512     rm -rf conftest*
3513     eval "ac_cv_header_$ac_safe=yes"
3514     else
3515     echo "$ac_err" >&5
3516     echo "configure: failed program was:" >&5
3517     cat conftest.$ac_ext >&5
3518     rm -rf conftest*
3519     eval "ac_cv_header_$ac_safe=no"
3520     fi
3521     rm -f conftest*
3522     fi
3523     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3524     echo "$ac_t""yes" 1>&6
3525     :
3526     else
3527     echo "$ac_t""no" 1>&6
3528     fi
3529    
3530     if [ "x$ac_cv_header_scsi_h" = "xno" ]; then
3531     { echo "configure: error: Cannot find includes for the SCSI library." 1>&2; exit 1; }
3532     fi
3533     SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp ../dummy/audio_dummy.cpp"
3534     LIBS="$LIBS -lscsi"
3535     DEFINES="$DEFINES -DBSD_COMP"
3536     fi
3537     ;;
3538     SunOS*)
3539     SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp Solaris/audio_solaris.cpp"
3540     DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
3541     ;;
3542     IRIX*)
3543     SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp ../dummy/audio_dummy.cpp Irix/unaligned.c"
3544     DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200"
3545     LIBS="$LIBS -lm"
3546     ;;
3547     esac
3548     if [ "x$WANT_UI" = "xyes" ]; then
3549     SYSSRCS="$SYSSRCS prefs_editor_gtk.cpp"
3550     else
3551     SYSSRCS="$SYSSRCS ../dummy/prefs_editor_dummy.cpp"
3552     fi
3553     fi
3554     if [ "x$SEMSRCS" != "x" ]; then
3555     SYSSRCS="$SYSSRCS $SEMSRCS"
3556     fi
3557    
3558     CPUINCLUDES="-I../uae_cpu"
3559     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"
3560    
3561     HAVE_I386=no
3562     echo $ac_n "checking for x86 target CPU""... $ac_c" 1>&6
3563     echo "configure:3564: checking for x86 target CPU" >&5
3564     cat > conftest.$ac_ext <<EOF
3565     #line 3566 "configure"
3566     #include "confdefs.h"
3567    
3568     #ifdef __i386__
3569     yes
3570     #endif
3571    
3572     EOF
3573     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3574     egrep "yes" >/dev/null 2>&1; then
3575     rm -rf conftest*
3576     echo "$ac_t""yes" 1>&6; HAVE_I386=yes
3577     else
3578     rm -rf conftest*
3579     echo "$ac_t""no" 1>&6
3580     fi
3581     rm -f conftest*
3582    
3583    
3584     HAVE_GAS=no
3585     echo $ac_n "checking for GAS .p2align feature""... $ac_c" 1>&6
3586     echo "configure:3587: checking for GAS .p2align feature" >&5
3587     cat >conftest.S << EOF
3588     .text
3589     .p2align 5
3590     EOF
3591     if $CC conftest.S -c -o conftest.o >/dev/null 2>&1 ; then HAVE_GAS=yes; fi
3592     echo "$ac_t""$HAVE_GAS" 1>&6
3593    
3594     HAVE_GCC27=no
3595     echo $ac_n "checking for GCC 2.7 or higher""... $ac_c" 1>&6
3596     echo "configure:3597: checking for GCC 2.7 or higher" >&5
3597     cat > conftest.$ac_ext <<EOF
3598     #line 3599 "configure"
3599     #include "confdefs.h"
3600     #if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
3601     yes
3602     #endif
3603    
3604     EOF
3605     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3606     egrep "yes" >/dev/null 2>&1; then
3607     rm -rf conftest*
3608     echo "$ac_t""yes" 1>&6; HAVE_GCC27=yes
3609     else
3610     rm -rf conftest*
3611     echo "$ac_t""no" 1>&6
3612     fi
3613     rm -f conftest*
3614    
3615    
3616     if [ "x$HAVE_GCC27" = "xyes" ]; then
3617     CFLAGS="$CFLAGS -fomit-frame-pointer"
3618     CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
3619     fi
3620    
3621     if [ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]; then
3622     DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
3623     if [ "x$HAVE_GAS" = "xyes" ]; then
3624     DEFINES="$DEFINES -DX86_ASSEMBLY"
3625     CPUSRCS="$CPUSRCS cpufast.s"
3626     else
3627     CPUSRCS="$CPUSRCS cpuemu.cpp"
3628     fi
3629     else
3630     CPUSRCS="$CPUSRCS cpuemu.cpp"
3631     fi
3632    
3633    
3634    
3635    
3636    
3637    
3638     trap '' 1 2 15
3639     cat > confcache <<\EOF
3640     # This file is a shell script that caches the results of configure
3641     # tests run on this system so they can be shared between configure
3642     # scripts and configure runs. It is not useful on other systems.
3643     # If it contains results you don't want to keep, you may remove or edit it.
3644     #
3645     # By default, configure uses ./config.cache as the cache file,
3646     # creating it if it does not exist already. You can give configure
3647     # the --cache-file=FILE option to use a different cache file; that is
3648     # what configure does when it calls configure scripts in
3649     # subdirectories, so they share the cache.
3650     # Giving --cache-file=/dev/null disables caching, for debugging configure.
3651     # config.status only pays attention to the cache file if you give it the
3652     # --recheck option to rerun configure.
3653     #
3654     EOF
3655     # The following way of writing the cache mishandles newlines in values,
3656     # but we know of no workaround that is simple, portable, and efficient.
3657     # So, don't put newlines in cache variables' values.
3658     # Ultrix sh set writes to stderr and can't be redirected directly,
3659     # and sets the high bit in the cache file unless we assign to the vars.
3660     (set) 2>&1 |
3661     case `(ac_space=' '; set | grep ac_space) 2>&1` in
3662     *ac_space=\ *)
3663     # `set' does not quote correctly, so add quotes (double-quote substitution
3664     # turns \\\\ into \\, and sed turns \\ into \).
3665     sed -n \
3666     -e "s/'/'\\\\''/g" \
3667     -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3668     ;;
3669     *)
3670     # `set' quotes correctly as required by POSIX, so do not add quotes.
3671     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3672     ;;
3673     esac >> confcache
3674     if cmp -s $cache_file confcache; then
3675     :
3676     else
3677     if test -w $cache_file; then
3678     echo "updating cache $cache_file"
3679     cat confcache > $cache_file
3680     else
3681     echo "not updating unwritable cache $cache_file"
3682     fi
3683     fi
3684     rm -f confcache
3685    
3686     trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3687    
3688     test "x$prefix" = xNONE && prefix=$ac_default_prefix
3689     # Let make expand exec_prefix.
3690     test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3691    
3692     # Any assignment to VPATH causes Sun make to only execute
3693     # the first set of double-colon rules, so remove it if not needed.
3694     # If there is a colon in the path, we need to keep it.
3695     if test "x$srcdir" = x.; then
3696     ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3697     fi
3698    
3699     trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3700    
3701     DEFS=-DHAVE_CONFIG_H
3702    
3703     # Without the "./", some shells look in PATH for config.status.
3704     : ${CONFIG_STATUS=./config.status}
3705    
3706     echo creating $CONFIG_STATUS
3707     rm -f $CONFIG_STATUS
3708     cat > $CONFIG_STATUS <<EOF
3709     #! /bin/sh
3710     # Generated automatically by configure.
3711     # Run this file to recreate the current configuration.
3712     # This directory was configured as follows,
3713     # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3714     #
3715     # $0 $ac_configure_args
3716     #
3717     # Compiler output produced by configure, useful for debugging
3718     # configure, is in ./config.log if it exists.
3719    
3720     ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3721     for ac_option
3722     do
3723     case "\$ac_option" in
3724     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3725     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3726     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3727     -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3728     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3729     exit 0 ;;
3730     -help | --help | --hel | --he | --h)
3731     echo "\$ac_cs_usage"; exit 0 ;;
3732     *) echo "\$ac_cs_usage"; exit 1 ;;
3733     esac
3734     done
3735    
3736     ac_given_srcdir=$srcdir
3737     ac_given_INSTALL="$INSTALL"
3738    
3739     trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3740     EOF
3741     cat >> $CONFIG_STATUS <<EOF
3742    
3743     # Protect against being on the right side of a sed subst in config.status.
3744     sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3745     s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3746     $ac_vpsub
3747     $extrasub
3748     s%@SHELL@%$SHELL%g
3749     s%@CFLAGS@%$CFLAGS%g
3750     s%@CPPFLAGS@%$CPPFLAGS%g
3751     s%@CXXFLAGS@%$CXXFLAGS%g
3752     s%@FFLAGS@%$FFLAGS%g
3753     s%@DEFS@%$DEFS%g
3754     s%@LDFLAGS@%$LDFLAGS%g
3755     s%@LIBS@%$LIBS%g
3756     s%@exec_prefix@%$exec_prefix%g
3757     s%@prefix@%$prefix%g
3758     s%@program_transform_name@%$program_transform_name%g
3759     s%@bindir@%$bindir%g
3760     s%@sbindir@%$sbindir%g
3761     s%@libexecdir@%$libexecdir%g
3762     s%@datadir@%$datadir%g
3763     s%@sysconfdir@%$sysconfdir%g
3764     s%@sharedstatedir@%$sharedstatedir%g
3765     s%@localstatedir@%$localstatedir%g
3766     s%@libdir@%$libdir%g
3767     s%@includedir@%$includedir%g
3768     s%@oldincludedir@%$oldincludedir%g
3769     s%@infodir@%$infodir%g
3770     s%@mandir@%$mandir%g
3771     s%@CC@%$CC%g
3772     s%@CXX@%$CXX%g
3773     s%@SET_MAKE@%$SET_MAKE%g
3774     s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3775     s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3776     s%@INSTALL_DATA@%$INSTALL_DATA%g
3777 cebix 1.2 s%@CPP@%$CPP%g
3778 cebix 1.1 s%@X_CFLAGS@%$X_CFLAGS%g
3779     s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3780     s%@X_LIBS@%$X_LIBS%g
3781     s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
3782     s%@GTK_CONFIG@%$GTK_CONFIG%g
3783     s%@GTK_CFLAGS@%$GTK_CFLAGS%g
3784     s%@GTK_LIBS@%$GTK_LIBS%g
3785     s%@DEFINES@%$DEFINES%g
3786     s%@STATICLIBS@%$STATICLIBS%g
3787     s%@SYSSRCS@%$SYSSRCS%g
3788     s%@CPUINCLUDES@%$CPUINCLUDES%g
3789     s%@CPUSRCS@%$CPUSRCS%g
3790    
3791     CEOF
3792     EOF
3793    
3794     cat >> $CONFIG_STATUS <<\EOF
3795    
3796     # Split the substitutions into bite-sized pieces for seds with
3797     # small command number limits, like on Digital OSF/1 and HP-UX.
3798     ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3799     ac_file=1 # Number of current file.
3800     ac_beg=1 # First line for current file.
3801     ac_end=$ac_max_sed_cmds # Line after last line for current file.
3802     ac_more_lines=:
3803     ac_sed_cmds=""
3804     while $ac_more_lines; do
3805     if test $ac_beg -gt 1; then
3806     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3807     else
3808     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3809     fi
3810     if test ! -s conftest.s$ac_file; then
3811     ac_more_lines=false
3812     rm -f conftest.s$ac_file
3813     else
3814     if test -z "$ac_sed_cmds"; then
3815     ac_sed_cmds="sed -f conftest.s$ac_file"
3816     else
3817     ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3818     fi
3819     ac_file=`expr $ac_file + 1`
3820     ac_beg=$ac_end
3821     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3822     fi
3823     done
3824     if test -z "$ac_sed_cmds"; then
3825     ac_sed_cmds=cat
3826     fi
3827     EOF
3828    
3829     cat >> $CONFIG_STATUS <<EOF
3830    
3831     CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3832     EOF
3833     cat >> $CONFIG_STATUS <<\EOF
3834     for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3835     # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3836     case "$ac_file" in
3837     *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3838     ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3839     *) ac_file_in="${ac_file}.in" ;;
3840     esac
3841    
3842     # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3843    
3844     # Remove last slash and all that follows it. Not all systems have dirname.
3845     ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3846     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3847     # The file is in a subdirectory.
3848     test ! -d "$ac_dir" && mkdir "$ac_dir"
3849     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3850     # A "../" for each directory in $ac_dir_suffix.
3851     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3852     else
3853     ac_dir_suffix= ac_dots=
3854     fi
3855    
3856     case "$ac_given_srcdir" in
3857     .) srcdir=.
3858     if test -z "$ac_dots"; then top_srcdir=.
3859     else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3860     /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3861     *) # Relative path.
3862     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3863     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3864     esac
3865    
3866     case "$ac_given_INSTALL" in
3867     [/$]*) INSTALL="$ac_given_INSTALL" ;;
3868     *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3869     esac
3870    
3871     echo creating "$ac_file"
3872     rm -f "$ac_file"
3873     configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3874     case "$ac_file" in
3875     *Makefile*) ac_comsub="1i\\
3876     # $configure_input" ;;
3877     *) ac_comsub= ;;
3878     esac
3879    
3880     ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3881     sed -e "$ac_comsub
3882     s%@configure_input@%$configure_input%g
3883     s%@srcdir@%$srcdir%g
3884     s%@top_srcdir@%$top_srcdir%g
3885     s%@INSTALL@%$INSTALL%g
3886     " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3887     fi; done
3888     rm -f conftest.s*
3889    
3890     # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3891     # NAME is the cpp macro being defined and VALUE is the value it is being given.
3892     #
3893     # ac_d sets the value in "#define NAME VALUE" lines.
3894     ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3895     ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3896     ac_dC='\3'
3897     ac_dD='%g'
3898     # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3899     ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3900     ac_uB='\([ ]\)%\1#\2define\3'
3901     ac_uC=' '
3902     ac_uD='\4%g'
3903     # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3904     ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3905     ac_eB='$%\1#\2define\3'
3906     ac_eC=' '
3907     ac_eD='%g'
3908    
3909     if test "${CONFIG_HEADERS+set}" != set; then
3910     EOF
3911     cat >> $CONFIG_STATUS <<EOF
3912     CONFIG_HEADERS="config.h"
3913     EOF
3914     cat >> $CONFIG_STATUS <<\EOF
3915     fi
3916     for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3917     # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3918     case "$ac_file" in
3919     *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3920     ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3921     *) ac_file_in="${ac_file}.in" ;;
3922     esac
3923    
3924     echo creating $ac_file
3925    
3926     rm -f conftest.frag conftest.in conftest.out
3927     ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3928     cat $ac_file_inputs > conftest.in
3929    
3930     EOF
3931    
3932     # Transform confdefs.h into a sed script conftest.vals that substitutes
3933     # the proper values into config.h.in to produce config.h. And first:
3934     # Protect against being on the right side of a sed subst in config.status.
3935     # Protect against being in an unquoted here document in config.status.
3936     rm -f conftest.vals
3937     cat > conftest.hdr <<\EOF
3938     s/[\\&%]/\\&/g
3939     s%[\\$`]%\\&%g
3940     s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3941     s%ac_d%ac_u%gp
3942     s%ac_u%ac_e%gp
3943     EOF
3944     sed -n -f conftest.hdr confdefs.h > conftest.vals
3945     rm -f conftest.hdr
3946    
3947     # This sed command replaces #undef with comments. This is necessary, for
3948     # example, in the case of _POSIX_SOURCE, which is predefined and required
3949     # on some systems where configure will not decide to define it.
3950     cat >> conftest.vals <<\EOF
3951     s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3952     EOF
3953    
3954     # Break up conftest.vals because some shells have a limit on
3955     # the size of here documents, and old seds have small limits too.
3956    
3957     rm -f conftest.tail
3958     while :
3959     do
3960     ac_lines=`grep -c . conftest.vals`
3961     # grep -c gives empty output for an empty file on some AIX systems.
3962     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3963     # Write a limited-size here document to conftest.frag.
3964     echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3965     sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3966     echo 'CEOF
3967     sed -f conftest.frag conftest.in > conftest.out
3968     rm -f conftest.in
3969     mv conftest.out conftest.in
3970     ' >> $CONFIG_STATUS
3971     sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3972     rm -f conftest.vals
3973     mv conftest.tail conftest.vals
3974     done
3975     rm -f conftest.vals
3976    
3977     cat >> $CONFIG_STATUS <<\EOF
3978     rm -f conftest.frag conftest.h
3979     echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3980     cat conftest.in >> conftest.h
3981     rm -f conftest.in
3982     if cmp -s $ac_file conftest.h 2>/dev/null; then
3983     echo "$ac_file is unchanged"
3984     rm -f conftest.h
3985     else
3986     # Remove last slash and all that follows it. Not all systems have dirname.
3987     ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3988     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3989     # The file is in a subdirectory.
3990     test ! -d "$ac_dir" && mkdir "$ac_dir"
3991     fi
3992     rm -f $ac_file
3993     mv conftest.h $ac_file
3994     fi
3995     fi; done
3996    
3997     EOF
3998     cat >> $CONFIG_STATUS <<EOF
3999    
4000     EOF
4001     cat >> $CONFIG_STATUS <<\EOF
4002    
4003     exit 0
4004     EOF
4005     chmod +x $CONFIG_STATUS
4006     rm -fr confdefs* $ac_clean_files
4007     test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4008    
4009     echo "Configuration done. Now type \"make\"."