ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/configure
Revision: 1.10
Committed: 1999-10-25T08:07:50Z (25 years ago) by cebix
Branch: MAIN
Changes since 1.9: +163 -150 lines
Log Message:
- now uses "mon" if present (currently on breakpoints only)

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