ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/configure
Revision: 1.9
Committed: 1999-10-23T17:57:46Z (25 years ago) by cebix
Branch: MAIN
Changes since 1.8: +569 -304 lines
Log Message:
- audio_linux.cpp renamed to audio_oss_esd.cpp (now also used under FreeBSD)
  and added support for ESD
- medium removal is allowed for CD-ROM on exit
- added mkinstalldirs to "make install" target

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.9 echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6
1135     echo "configure:1136: checking for sem_init in -lposix4" >&5
1136     ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'`
1137     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1138     echo $ac_n "(cached) $ac_c" 1>&6
1139     else
1140     ac_save_LIBS="$LIBS"
1141     LIBS="-lposix4 $LIBS"
1142     cat > conftest.$ac_ext <<EOF
1143     #line 1144 "configure"
1144     #include "confdefs.h"
1145     /* Override any gcc2 internal prototype to avoid an error. */
1146     /* We use char because int might match the return type of a gcc2
1147     builtin and then its argument prototype would still apply. */
1148     char sem_init();
1149    
1150     int main() {
1151     sem_init()
1152     ; return 0; }
1153     EOF
1154     if { (eval echo configure:1155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1155     rm -rf conftest*
1156     eval "ac_cv_lib_$ac_lib_var=yes"
1157     else
1158     echo "configure: failed program was:" >&5
1159     cat conftest.$ac_ext >&5
1160     rm -rf conftest*
1161     eval "ac_cv_lib_$ac_lib_var=no"
1162     fi
1163     rm -f conftest*
1164     LIBS="$ac_save_LIBS"
1165    
1166     fi
1167     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1168     echo "$ac_t""yes" 1>&6
1169     ac_tr_lib=HAVE_LIB`echo posix4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1171     cat >> confdefs.h <<EOF
1172     #define $ac_tr_lib 1
1173     EOF
1174    
1175     LIBS="-lposix4 $LIBS"
1176    
1177     else
1178     echo "$ac_t""no" 1>&6
1179     fi
1180    
1181    
1182 cebix 1.1 # If we find X, set shell vars x_includes and x_libraries to the
1183     # paths, otherwise set no_x=yes.
1184     # Uses ac_ vars as temps to allow command line to override cache and checks.
1185     # --without-x overrides everything else, but does not touch the cache.
1186     echo $ac_n "checking for X""... $ac_c" 1>&6
1187 cebix 1.9 echo "configure:1188: checking for X" >&5
1188 cebix 1.1
1189     # Check whether --with-x or --without-x was given.
1190     if test "${with_x+set}" = set; then
1191     withval="$with_x"
1192     :
1193     fi
1194    
1195     # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1196     if test "x$with_x" = xno; then
1197     # The user explicitly disabled X.
1198     have_x=disabled
1199     else
1200     if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1201     # Both variables are already set.
1202     have_x=yes
1203     else
1204     if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1205     echo $ac_n "(cached) $ac_c" 1>&6
1206     else
1207     # One or both of the vars are not set, and there is no cached value.
1208     ac_x_includes=NO ac_x_libraries=NO
1209     rm -fr conftestdir
1210     if mkdir conftestdir; then
1211     cd conftestdir
1212     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1213     cat > Imakefile <<'EOF'
1214     acfindx:
1215     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1216     EOF
1217     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1218     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1219     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1220     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1221     for ac_extension in a so sl; do
1222     if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1223     test -f $ac_im_libdir/libX11.$ac_extension; then
1224     ac_im_usrlibdir=$ac_im_libdir; break
1225     fi
1226     done
1227     # Screen out bogus values from the imake configuration. They are
1228     # bogus both because they are the default anyway, and because
1229     # using them would break gcc on systems where it needs fixed includes.
1230     case "$ac_im_incroot" in
1231     /usr/include) ;;
1232     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1233     esac
1234     case "$ac_im_usrlibdir" in
1235     /usr/lib | /lib) ;;
1236     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1237     esac
1238     fi
1239     cd ..
1240     rm -fr conftestdir
1241     fi
1242    
1243     if test "$ac_x_includes" = NO; then
1244     # Guess where to find include files, by looking for this one X11 .h file.
1245     test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1246    
1247     # First, try using that file with no special directory specified.
1248     cat > conftest.$ac_ext <<EOF
1249 cebix 1.9 #line 1250 "configure"
1250 cebix 1.1 #include "confdefs.h"
1251     #include <$x_direct_test_include>
1252     EOF
1253     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1254 cebix 1.9 { (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1255 cebix 1.1 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1256     if test -z "$ac_err"; then
1257     rm -rf conftest*
1258     # We can compile using X headers with no special include directory.
1259     ac_x_includes=
1260     else
1261     echo "$ac_err" >&5
1262     echo "configure: failed program was:" >&5
1263     cat conftest.$ac_ext >&5
1264     rm -rf conftest*
1265     # Look for the header file in a standard set of common directories.
1266     # Check X11 before X11Rn because it is often a symlink to the current release.
1267     for ac_dir in \
1268     /usr/X11/include \
1269     /usr/X11R6/include \
1270     /usr/X11R5/include \
1271     /usr/X11R4/include \
1272     \
1273     /usr/include/X11 \
1274     /usr/include/X11R6 \
1275     /usr/include/X11R5 \
1276     /usr/include/X11R4 \
1277     \
1278     /usr/local/X11/include \
1279     /usr/local/X11R6/include \
1280     /usr/local/X11R5/include \
1281     /usr/local/X11R4/include \
1282     \
1283     /usr/local/include/X11 \
1284     /usr/local/include/X11R6 \
1285     /usr/local/include/X11R5 \
1286     /usr/local/include/X11R4 \
1287     \
1288     /usr/X386/include \
1289     /usr/x386/include \
1290     /usr/XFree86/include/X11 \
1291     \
1292     /usr/include \
1293     /usr/local/include \
1294     /usr/unsupported/include \
1295     /usr/athena/include \
1296     /usr/local/x11r5/include \
1297     /usr/lpp/Xamples/include \
1298     \
1299     /usr/openwin/include \
1300     /usr/openwin/share/include \
1301     ; \
1302     do
1303     if test -r "$ac_dir/$x_direct_test_include"; then
1304     ac_x_includes=$ac_dir
1305     break
1306     fi
1307     done
1308     fi
1309     rm -f conftest*
1310     fi # $ac_x_includes = NO
1311    
1312     if test "$ac_x_libraries" = NO; then
1313     # Check for the libraries.
1314    
1315     test -z "$x_direct_test_library" && x_direct_test_library=Xt
1316     test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1317    
1318     # See if we find them without any special options.
1319     # Don't add to $LIBS permanently.
1320     ac_save_LIBS="$LIBS"
1321     LIBS="-l$x_direct_test_library $LIBS"
1322     cat > conftest.$ac_ext <<EOF
1323 cebix 1.9 #line 1324 "configure"
1324 cebix 1.1 #include "confdefs.h"
1325    
1326     int main() {
1327     ${x_direct_test_function}()
1328     ; return 0; }
1329     EOF
1330 cebix 1.9 if { (eval echo configure:1331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1331 cebix 1.1 rm -rf conftest*
1332     LIBS="$ac_save_LIBS"
1333     # We can link X programs with no special library path.
1334     ac_x_libraries=
1335     else
1336     echo "configure: failed program was:" >&5
1337     cat conftest.$ac_ext >&5
1338     rm -rf conftest*
1339     LIBS="$ac_save_LIBS"
1340     # First see if replacing the include by lib works.
1341     # Check X11 before X11Rn because it is often a symlink to the current release.
1342     for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1343     /usr/X11/lib \
1344     /usr/X11R6/lib \
1345     /usr/X11R5/lib \
1346     /usr/X11R4/lib \
1347     \
1348     /usr/lib/X11 \
1349     /usr/lib/X11R6 \
1350     /usr/lib/X11R5 \
1351     /usr/lib/X11R4 \
1352     \
1353     /usr/local/X11/lib \
1354     /usr/local/X11R6/lib \
1355     /usr/local/X11R5/lib \
1356     /usr/local/X11R4/lib \
1357     \
1358     /usr/local/lib/X11 \
1359     /usr/local/lib/X11R6 \
1360     /usr/local/lib/X11R5 \
1361     /usr/local/lib/X11R4 \
1362     \
1363     /usr/X386/lib \
1364     /usr/x386/lib \
1365     /usr/XFree86/lib/X11 \
1366     \
1367     /usr/lib \
1368     /usr/local/lib \
1369     /usr/unsupported/lib \
1370     /usr/athena/lib \
1371     /usr/local/x11r5/lib \
1372     /usr/lpp/Xamples/lib \
1373     /lib/usr/lib/X11 \
1374     \
1375     /usr/openwin/lib \
1376     /usr/openwin/share/lib \
1377     ; \
1378     do
1379     for ac_extension in a so sl; do
1380     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1381     ac_x_libraries=$ac_dir
1382     break 2
1383     fi
1384     done
1385     done
1386     fi
1387     rm -f conftest*
1388     fi # $ac_x_libraries = NO
1389    
1390     if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1391     # Didn't find X anywhere. Cache the known absence of X.
1392     ac_cv_have_x="have_x=no"
1393     else
1394     # Record where we found X for the cache.
1395     ac_cv_have_x="have_x=yes \
1396     ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1397     fi
1398     fi
1399     fi
1400     eval "$ac_cv_have_x"
1401     fi # $with_x != no
1402    
1403     if test "$have_x" != yes; then
1404     echo "$ac_t""$have_x" 1>&6
1405     no_x=yes
1406     else
1407     # If each of the values was on the command line, it overrides each guess.
1408     test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1409     test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1410     # Update the cache value to reflect the command line values.
1411     ac_cv_have_x="have_x=yes \
1412     ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1413     echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1414     fi
1415    
1416     if test "$no_x" = yes; then
1417     # Not all programs may use this symbol, but it does not hurt to define it.
1418     cat >> confdefs.h <<\EOF
1419     #define X_DISPLAY_MISSING 1
1420     EOF
1421    
1422     X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
1423     else
1424     if test -n "$x_includes"; then
1425     X_CFLAGS="$X_CFLAGS -I$x_includes"
1426     fi
1427    
1428     # It would also be nice to do this for all -L options, not just this one.
1429     if test -n "$x_libraries"; then
1430     X_LIBS="$X_LIBS -L$x_libraries"
1431     # For Solaris; some versions of Sun CC require a space after -R and
1432     # others require no space. Words are not sufficient . . . .
1433     case "`(uname -sr) 2>/dev/null`" in
1434     "SunOS 5"*)
1435     echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
1436 cebix 1.9 echo "configure:1437: checking whether -R must be followed by a space" >&5
1437 cebix 1.1 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
1438     cat > conftest.$ac_ext <<EOF
1439 cebix 1.9 #line 1440 "configure"
1440 cebix 1.1 #include "confdefs.h"
1441    
1442     int main() {
1443    
1444     ; return 0; }
1445     EOF
1446 cebix 1.9 if { (eval echo configure:1447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1447 cebix 1.1 rm -rf conftest*
1448     ac_R_nospace=yes
1449     else
1450     echo "configure: failed program was:" >&5
1451     cat conftest.$ac_ext >&5
1452     rm -rf conftest*
1453     ac_R_nospace=no
1454     fi
1455     rm -f conftest*
1456     if test $ac_R_nospace = yes; then
1457     echo "$ac_t""no" 1>&6
1458     X_LIBS="$X_LIBS -R$x_libraries"
1459     else
1460     LIBS="$ac_xsave_LIBS -R $x_libraries"
1461     cat > conftest.$ac_ext <<EOF
1462 cebix 1.9 #line 1463 "configure"
1463 cebix 1.1 #include "confdefs.h"
1464    
1465     int main() {
1466    
1467     ; return 0; }
1468     EOF
1469 cebix 1.9 if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1470 cebix 1.1 rm -rf conftest*
1471     ac_R_space=yes
1472     else
1473     echo "configure: failed program was:" >&5
1474     cat conftest.$ac_ext >&5
1475     rm -rf conftest*
1476     ac_R_space=no
1477     fi
1478     rm -f conftest*
1479     if test $ac_R_space = yes; then
1480     echo "$ac_t""yes" 1>&6
1481     X_LIBS="$X_LIBS -R $x_libraries"
1482     else
1483     echo "$ac_t""neither works" 1>&6
1484     fi
1485     fi
1486     LIBS="$ac_xsave_LIBS"
1487     esac
1488     fi
1489    
1490     # Check for system-dependent libraries X programs must link with.
1491     # Do this before checking for the system-independent R6 libraries
1492     # (-lICE), since we may need -lsocket or whatever for X linking.
1493    
1494     if test "$ISC" = yes; then
1495     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1496     else
1497     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1498     # libraries were built with DECnet support. And karl@cs.umb.edu says
1499     # the Alpha needs dnet_stub (dnet does not exist).
1500     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
1501 cebix 1.9 echo "configure:1502: checking for dnet_ntoa in -ldnet" >&5
1502 cebix 1.1 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1503     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1504     echo $ac_n "(cached) $ac_c" 1>&6
1505     else
1506     ac_save_LIBS="$LIBS"
1507     LIBS="-ldnet $LIBS"
1508     cat > conftest.$ac_ext <<EOF
1509 cebix 1.9 #line 1510 "configure"
1510 cebix 1.1 #include "confdefs.h"
1511     /* Override any gcc2 internal prototype to avoid an error. */
1512     /* We use char because int might match the return type of a gcc2
1513     builtin and then its argument prototype would still apply. */
1514     char dnet_ntoa();
1515    
1516     int main() {
1517     dnet_ntoa()
1518     ; return 0; }
1519     EOF
1520 cebix 1.9 if { (eval echo configure:1521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1521 cebix 1.1 rm -rf conftest*
1522     eval "ac_cv_lib_$ac_lib_var=yes"
1523     else
1524     echo "configure: failed program was:" >&5
1525     cat conftest.$ac_ext >&5
1526     rm -rf conftest*
1527     eval "ac_cv_lib_$ac_lib_var=no"
1528     fi
1529     rm -f conftest*
1530     LIBS="$ac_save_LIBS"
1531    
1532     fi
1533     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1534     echo "$ac_t""yes" 1>&6
1535     X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1536     else
1537     echo "$ac_t""no" 1>&6
1538     fi
1539    
1540     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1541     echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
1542 cebix 1.9 echo "configure:1543: checking for dnet_ntoa in -ldnet_stub" >&5
1543 cebix 1.1 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1544     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1545     echo $ac_n "(cached) $ac_c" 1>&6
1546     else
1547     ac_save_LIBS="$LIBS"
1548     LIBS="-ldnet_stub $LIBS"
1549     cat > conftest.$ac_ext <<EOF
1550 cebix 1.9 #line 1551 "configure"
1551 cebix 1.1 #include "confdefs.h"
1552     /* Override any gcc2 internal prototype to avoid an error. */
1553     /* We use char because int might match the return type of a gcc2
1554     builtin and then its argument prototype would still apply. */
1555     char dnet_ntoa();
1556    
1557     int main() {
1558     dnet_ntoa()
1559     ; return 0; }
1560     EOF
1561 cebix 1.9 if { (eval echo configure:1562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1562 cebix 1.1 rm -rf conftest*
1563     eval "ac_cv_lib_$ac_lib_var=yes"
1564     else
1565     echo "configure: failed program was:" >&5
1566     cat conftest.$ac_ext >&5
1567     rm -rf conftest*
1568     eval "ac_cv_lib_$ac_lib_var=no"
1569     fi
1570     rm -f conftest*
1571     LIBS="$ac_save_LIBS"
1572    
1573     fi
1574     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1575     echo "$ac_t""yes" 1>&6
1576     X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1577     else
1578     echo "$ac_t""no" 1>&6
1579     fi
1580    
1581     fi
1582    
1583     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1584     # to get the SysV transport functions.
1585     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
1586     # needs -lnsl.
1587     # The nsl library prevents programs from opening the X display
1588     # on Irix 5.2, according to dickey@clark.net.
1589     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1590 cebix 1.9 echo "configure:1591: checking for gethostbyname" >&5
1591 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1592     echo $ac_n "(cached) $ac_c" 1>&6
1593     else
1594     cat > conftest.$ac_ext <<EOF
1595 cebix 1.9 #line 1596 "configure"
1596 cebix 1.1 #include "confdefs.h"
1597     /* System header to define __stub macros and hopefully few prototypes,
1598     which can conflict with char gethostbyname(); below. */
1599     #include <assert.h>
1600     /* Override any gcc2 internal prototype to avoid an error. */
1601     /* We use char because int might match the return type of a gcc2
1602     builtin and then its argument prototype would still apply. */
1603     char gethostbyname();
1604    
1605     int main() {
1606    
1607     /* The GNU C library defines this for functions which it implements
1608     to always fail with ENOSYS. Some functions are actually named
1609     something starting with __ and the normal name is an alias. */
1610     #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1611     choke me
1612     #else
1613     gethostbyname();
1614     #endif
1615    
1616     ; return 0; }
1617     EOF
1618 cebix 1.9 if { (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1619 cebix 1.1 rm -rf conftest*
1620     eval "ac_cv_func_gethostbyname=yes"
1621     else
1622     echo "configure: failed program was:" >&5
1623     cat conftest.$ac_ext >&5
1624     rm -rf conftest*
1625     eval "ac_cv_func_gethostbyname=no"
1626     fi
1627     rm -f conftest*
1628     fi
1629    
1630     if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1631     echo "$ac_t""yes" 1>&6
1632     :
1633     else
1634     echo "$ac_t""no" 1>&6
1635     fi
1636    
1637     if test $ac_cv_func_gethostbyname = no; then
1638     echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1639 cebix 1.9 echo "configure:1640: checking for gethostbyname in -lnsl" >&5
1640 cebix 1.1 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1641     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1642     echo $ac_n "(cached) $ac_c" 1>&6
1643     else
1644     ac_save_LIBS="$LIBS"
1645     LIBS="-lnsl $LIBS"
1646     cat > conftest.$ac_ext <<EOF
1647 cebix 1.9 #line 1648 "configure"
1648 cebix 1.1 #include "confdefs.h"
1649     /* Override any gcc2 internal prototype to avoid an error. */
1650     /* We use char because int might match the return type of a gcc2
1651     builtin and then its argument prototype would still apply. */
1652     char gethostbyname();
1653    
1654     int main() {
1655     gethostbyname()
1656     ; return 0; }
1657     EOF
1658 cebix 1.9 if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1659 cebix 1.1 rm -rf conftest*
1660     eval "ac_cv_lib_$ac_lib_var=yes"
1661     else
1662     echo "configure: failed program was:" >&5
1663     cat conftest.$ac_ext >&5
1664     rm -rf conftest*
1665     eval "ac_cv_lib_$ac_lib_var=no"
1666     fi
1667     rm -f conftest*
1668     LIBS="$ac_save_LIBS"
1669    
1670     fi
1671     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1672     echo "$ac_t""yes" 1>&6
1673     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1674     else
1675     echo "$ac_t""no" 1>&6
1676     fi
1677    
1678     fi
1679    
1680     # lieder@skyler.mavd.honeywell.com says without -lsocket,
1681     # socket/setsockopt and other routines are undefined under SCO ODT
1682     # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
1683     # on later versions), says simon@lia.di.epfl.ch: it contains
1684     # gethostby* variants that don't use the nameserver (or something).
1685     # -lsocket must be given before -lnsl if both are needed.
1686     # We assume that if connect needs -lnsl, so does gethostbyname.
1687     echo $ac_n "checking for connect""... $ac_c" 1>&6
1688 cebix 1.9 echo "configure:1689: checking for connect" >&5
1689 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1690     echo $ac_n "(cached) $ac_c" 1>&6
1691     else
1692     cat > conftest.$ac_ext <<EOF
1693 cebix 1.9 #line 1694 "configure"
1694 cebix 1.1 #include "confdefs.h"
1695     /* System header to define __stub macros and hopefully few prototypes,
1696     which can conflict with char connect(); below. */
1697     #include <assert.h>
1698     /* Override any gcc2 internal prototype to avoid an error. */
1699     /* We use char because int might match the return type of a gcc2
1700     builtin and then its argument prototype would still apply. */
1701     char connect();
1702    
1703     int main() {
1704    
1705     /* The GNU C library defines this for functions which it implements
1706     to always fail with ENOSYS. Some functions are actually named
1707     something starting with __ and the normal name is an alias. */
1708     #if defined (__stub_connect) || defined (__stub___connect)
1709     choke me
1710     #else
1711     connect();
1712     #endif
1713    
1714     ; return 0; }
1715     EOF
1716 cebix 1.9 if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1717 cebix 1.1 rm -rf conftest*
1718     eval "ac_cv_func_connect=yes"
1719     else
1720     echo "configure: failed program was:" >&5
1721     cat conftest.$ac_ext >&5
1722     rm -rf conftest*
1723     eval "ac_cv_func_connect=no"
1724     fi
1725     rm -f conftest*
1726     fi
1727    
1728     if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1729     echo "$ac_t""yes" 1>&6
1730     :
1731     else
1732     echo "$ac_t""no" 1>&6
1733     fi
1734    
1735     if test $ac_cv_func_connect = no; then
1736     echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1737 cebix 1.9 echo "configure:1738: checking for connect in -lsocket" >&5
1738 cebix 1.1 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
1739     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1740     echo $ac_n "(cached) $ac_c" 1>&6
1741     else
1742     ac_save_LIBS="$LIBS"
1743     LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
1744     cat > conftest.$ac_ext <<EOF
1745 cebix 1.9 #line 1746 "configure"
1746 cebix 1.1 #include "confdefs.h"
1747     /* Override any gcc2 internal prototype to avoid an error. */
1748     /* We use char because int might match the return type of a gcc2
1749     builtin and then its argument prototype would still apply. */
1750     char connect();
1751    
1752     int main() {
1753     connect()
1754     ; return 0; }
1755     EOF
1756 cebix 1.9 if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1757 cebix 1.1 rm -rf conftest*
1758     eval "ac_cv_lib_$ac_lib_var=yes"
1759     else
1760     echo "configure: failed program was:" >&5
1761     cat conftest.$ac_ext >&5
1762     rm -rf conftest*
1763     eval "ac_cv_lib_$ac_lib_var=no"
1764     fi
1765     rm -f conftest*
1766     LIBS="$ac_save_LIBS"
1767    
1768     fi
1769     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1770     echo "$ac_t""yes" 1>&6
1771     X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
1772     else
1773     echo "$ac_t""no" 1>&6
1774     fi
1775    
1776     fi
1777    
1778     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
1779     echo $ac_n "checking for remove""... $ac_c" 1>&6
1780 cebix 1.9 echo "configure:1781: checking for remove" >&5
1781 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
1782     echo $ac_n "(cached) $ac_c" 1>&6
1783     else
1784     cat > conftest.$ac_ext <<EOF
1785 cebix 1.9 #line 1786 "configure"
1786 cebix 1.1 #include "confdefs.h"
1787     /* System header to define __stub macros and hopefully few prototypes,
1788     which can conflict with char remove(); below. */
1789     #include <assert.h>
1790     /* Override any gcc2 internal prototype to avoid an error. */
1791     /* We use char because int might match the return type of a gcc2
1792     builtin and then its argument prototype would still apply. */
1793     char remove();
1794    
1795     int main() {
1796    
1797     /* The GNU C library defines this for functions which it implements
1798     to always fail with ENOSYS. Some functions are actually named
1799     something starting with __ and the normal name is an alias. */
1800     #if defined (__stub_remove) || defined (__stub___remove)
1801     choke me
1802     #else
1803     remove();
1804     #endif
1805    
1806     ; return 0; }
1807     EOF
1808 cebix 1.9 if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1809 cebix 1.1 rm -rf conftest*
1810     eval "ac_cv_func_remove=yes"
1811     else
1812     echo "configure: failed program was:" >&5
1813     cat conftest.$ac_ext >&5
1814     rm -rf conftest*
1815     eval "ac_cv_func_remove=no"
1816     fi
1817     rm -f conftest*
1818     fi
1819    
1820     if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
1821     echo "$ac_t""yes" 1>&6
1822     :
1823     else
1824     echo "$ac_t""no" 1>&6
1825     fi
1826    
1827     if test $ac_cv_func_remove = no; then
1828     echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
1829 cebix 1.9 echo "configure:1830: checking for remove in -lposix" >&5
1830 cebix 1.1 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
1831     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1832     echo $ac_n "(cached) $ac_c" 1>&6
1833     else
1834     ac_save_LIBS="$LIBS"
1835     LIBS="-lposix $LIBS"
1836     cat > conftest.$ac_ext <<EOF
1837 cebix 1.9 #line 1838 "configure"
1838 cebix 1.1 #include "confdefs.h"
1839     /* Override any gcc2 internal prototype to avoid an error. */
1840     /* We use char because int might match the return type of a gcc2
1841     builtin and then its argument prototype would still apply. */
1842     char remove();
1843    
1844     int main() {
1845     remove()
1846     ; return 0; }
1847     EOF
1848 cebix 1.9 if { (eval echo configure:1849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1849 cebix 1.1 rm -rf conftest*
1850     eval "ac_cv_lib_$ac_lib_var=yes"
1851     else
1852     echo "configure: failed program was:" >&5
1853     cat conftest.$ac_ext >&5
1854     rm -rf conftest*
1855     eval "ac_cv_lib_$ac_lib_var=no"
1856     fi
1857     rm -f conftest*
1858     LIBS="$ac_save_LIBS"
1859    
1860     fi
1861     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1862     echo "$ac_t""yes" 1>&6
1863     X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
1864     else
1865     echo "$ac_t""no" 1>&6
1866     fi
1867    
1868     fi
1869    
1870     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
1871     echo $ac_n "checking for shmat""... $ac_c" 1>&6
1872 cebix 1.9 echo "configure:1873: checking for shmat" >&5
1873 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
1874     echo $ac_n "(cached) $ac_c" 1>&6
1875     else
1876     cat > conftest.$ac_ext <<EOF
1877 cebix 1.9 #line 1878 "configure"
1878 cebix 1.1 #include "confdefs.h"
1879     /* System header to define __stub macros and hopefully few prototypes,
1880     which can conflict with char shmat(); below. */
1881     #include <assert.h>
1882     /* Override any gcc2 internal prototype to avoid an error. */
1883     /* We use char because int might match the return type of a gcc2
1884     builtin and then its argument prototype would still apply. */
1885     char shmat();
1886    
1887     int main() {
1888    
1889     /* The GNU C library defines this for functions which it implements
1890     to always fail with ENOSYS. Some functions are actually named
1891     something starting with __ and the normal name is an alias. */
1892     #if defined (__stub_shmat) || defined (__stub___shmat)
1893     choke me
1894     #else
1895     shmat();
1896     #endif
1897    
1898     ; return 0; }
1899     EOF
1900 cebix 1.9 if { (eval echo configure:1901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1901 cebix 1.1 rm -rf conftest*
1902     eval "ac_cv_func_shmat=yes"
1903     else
1904     echo "configure: failed program was:" >&5
1905     cat conftest.$ac_ext >&5
1906     rm -rf conftest*
1907     eval "ac_cv_func_shmat=no"
1908     fi
1909     rm -f conftest*
1910     fi
1911    
1912     if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
1913     echo "$ac_t""yes" 1>&6
1914     :
1915     else
1916     echo "$ac_t""no" 1>&6
1917     fi
1918    
1919     if test $ac_cv_func_shmat = no; then
1920     echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
1921 cebix 1.9 echo "configure:1922: checking for shmat in -lipc" >&5
1922 cebix 1.1 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
1923     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1924     echo $ac_n "(cached) $ac_c" 1>&6
1925     else
1926     ac_save_LIBS="$LIBS"
1927     LIBS="-lipc $LIBS"
1928     cat > conftest.$ac_ext <<EOF
1929 cebix 1.9 #line 1930 "configure"
1930 cebix 1.1 #include "confdefs.h"
1931     /* Override any gcc2 internal prototype to avoid an error. */
1932     /* We use char because int might match the return type of a gcc2
1933     builtin and then its argument prototype would still apply. */
1934     char shmat();
1935    
1936     int main() {
1937     shmat()
1938     ; return 0; }
1939     EOF
1940 cebix 1.9 if { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1941 cebix 1.1 rm -rf conftest*
1942     eval "ac_cv_lib_$ac_lib_var=yes"
1943     else
1944     echo "configure: failed program was:" >&5
1945     cat conftest.$ac_ext >&5
1946     rm -rf conftest*
1947     eval "ac_cv_lib_$ac_lib_var=no"
1948     fi
1949     rm -f conftest*
1950     LIBS="$ac_save_LIBS"
1951    
1952     fi
1953     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1954     echo "$ac_t""yes" 1>&6
1955     X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
1956     else
1957     echo "$ac_t""no" 1>&6
1958     fi
1959    
1960     fi
1961     fi
1962    
1963     # Check for libraries that X11R6 Xt/Xaw programs need.
1964     ac_save_LDFLAGS="$LDFLAGS"
1965     test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
1966     # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1967     # check for ICE first), but we must link in the order -lSM -lICE or
1968     # we get undefined symbols. So assume we have SM if we have ICE.
1969     # These have to be linked with before -lX11, unlike the other
1970     # libraries we check for below, so use a different variable.
1971     # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1972     echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
1973 cebix 1.9 echo "configure:1974: checking for IceConnectionNumber in -lICE" >&5
1974 cebix 1.1 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
1975     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1976     echo $ac_n "(cached) $ac_c" 1>&6
1977     else
1978     ac_save_LIBS="$LIBS"
1979     LIBS="-lICE $X_EXTRA_LIBS $LIBS"
1980     cat > conftest.$ac_ext <<EOF
1981 cebix 1.9 #line 1982 "configure"
1982 cebix 1.1 #include "confdefs.h"
1983     /* Override any gcc2 internal prototype to avoid an error. */
1984     /* We use char because int might match the return type of a gcc2
1985     builtin and then its argument prototype would still apply. */
1986     char IceConnectionNumber();
1987    
1988     int main() {
1989     IceConnectionNumber()
1990     ; return 0; }
1991     EOF
1992 cebix 1.9 if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1993 cebix 1.1 rm -rf conftest*
1994     eval "ac_cv_lib_$ac_lib_var=yes"
1995     else
1996     echo "configure: failed program was:" >&5
1997     cat conftest.$ac_ext >&5
1998     rm -rf conftest*
1999     eval "ac_cv_lib_$ac_lib_var=no"
2000     fi
2001     rm -f conftest*
2002     LIBS="$ac_save_LIBS"
2003    
2004     fi
2005     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2006     echo "$ac_t""yes" 1>&6
2007     X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2008     else
2009     echo "$ac_t""no" 1>&6
2010     fi
2011    
2012     LDFLAGS="$ac_save_LDFLAGS"
2013    
2014     fi
2015    
2016     if [ "x$no_x" = "xyes" ]; then
2017     { echo "configure: error: You need X11 to run Basilisk II." 1>&2; exit 1; }
2018     fi
2019     CFLAGS="$CFLAGS $X_CFLAGS"
2020     CXXFLAGS="$CXXFLAGS $X_CFLAGS"
2021     LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
2022    
2023     echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
2024 cebix 1.9 echo "configure:2025: checking for pthread_create in -lpthread" >&5
2025 cebix 1.1 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
2026     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2027     echo $ac_n "(cached) $ac_c" 1>&6
2028     else
2029     ac_save_LIBS="$LIBS"
2030     LIBS="-lpthread $LIBS"
2031     cat > conftest.$ac_ext <<EOF
2032 cebix 1.9 #line 2033 "configure"
2033 cebix 1.1 #include "confdefs.h"
2034     /* Override any gcc2 internal prototype to avoid an error. */
2035     /* We use char because int might match the return type of a gcc2
2036     builtin and then its argument prototype would still apply. */
2037     char pthread_create();
2038    
2039     int main() {
2040     pthread_create()
2041     ; return 0; }
2042     EOF
2043 cebix 1.9 if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2044 cebix 1.1 rm -rf conftest*
2045     eval "ac_cv_lib_$ac_lib_var=yes"
2046     else
2047     echo "configure: failed program was:" >&5
2048     cat conftest.$ac_ext >&5
2049     rm -rf conftest*
2050     eval "ac_cv_lib_$ac_lib_var=no"
2051     fi
2052     rm -f conftest*
2053     LIBS="$ac_save_LIBS"
2054    
2055     fi
2056     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2057     echo "$ac_t""yes" 1>&6
2058 cebix 1.9 ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2059     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2060     cat >> confdefs.h <<EOF
2061     #define $ac_tr_lib 1
2062     EOF
2063    
2064     LIBS="-lpthread $LIBS"
2065    
2066 cebix 1.1 else
2067     echo "$ac_t""no" 1>&6
2068    
2069 cebix 1.9 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
2070     echo "configure:2071: checking for pthread_create in -lc_r" >&5
2071 cebix 1.1 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2072     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2073     echo $ac_n "(cached) $ac_c" 1>&6
2074     else
2075     ac_save_LIBS="$LIBS"
2076     LIBS="-lc_r $LIBS"
2077     cat > conftest.$ac_ext <<EOF
2078 cebix 1.9 #line 2079 "configure"
2079 cebix 1.1 #include "confdefs.h"
2080     /* Override any gcc2 internal prototype to avoid an error. */
2081     /* We use char because int might match the return type of a gcc2
2082     builtin and then its argument prototype would still apply. */
2083     char pthread_create();
2084    
2085     int main() {
2086     pthread_create()
2087     ; return 0; }
2088     EOF
2089 cebix 1.9 if { (eval echo configure:2090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2090 cebix 1.1 rm -rf conftest*
2091     eval "ac_cv_lib_$ac_lib_var=yes"
2092     else
2093     echo "configure: failed program was:" >&5
2094     cat conftest.$ac_ext >&5
2095     rm -rf conftest*
2096     eval "ac_cv_lib_$ac_lib_var=no"
2097     fi
2098     rm -f conftest*
2099     LIBS="$ac_save_LIBS"
2100    
2101     fi
2102     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2103     echo "$ac_t""yes" 1>&6
2104 cebix 1.9 ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2105     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2106     cat >> confdefs.h <<EOF
2107     #define $ac_tr_lib 1
2108     EOF
2109    
2110     LIBS="-lc_r $LIBS"
2111    
2112 cebix 1.1 else
2113     echo "$ac_t""no" 1>&6
2114    
2115 cebix 1.9 echo $ac_n "checking for pthread_create in -lPTL""... $ac_c" 1>&6
2116     echo "configure:2117: checking for pthread_create in -lPTL" >&5
2117 cebix 1.5 ac_lib_var=`echo PTL'_'pthread_create | sed 'y%./+-%__p_%'`
2118     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2119     echo $ac_n "(cached) $ac_c" 1>&6
2120     else
2121     ac_save_LIBS="$LIBS"
2122     LIBS="-lPTL $LIBS"
2123     cat > conftest.$ac_ext <<EOF
2124 cebix 1.9 #line 2125 "configure"
2125 cebix 1.5 #include "confdefs.h"
2126     /* Override any gcc2 internal prototype to avoid an error. */
2127     /* We use char because int might match the return type of a gcc2
2128     builtin and then its argument prototype would still apply. */
2129     char pthread_create();
2130    
2131     int main() {
2132     pthread_create()
2133     ; return 0; }
2134     EOF
2135 cebix 1.9 if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2136 cebix 1.5 rm -rf conftest*
2137     eval "ac_cv_lib_$ac_lib_var=yes"
2138     else
2139     echo "configure: failed program was:" >&5
2140     cat conftest.$ac_ext >&5
2141     rm -rf conftest*
2142     eval "ac_cv_lib_$ac_lib_var=no"
2143     fi
2144     rm -f conftest*
2145     LIBS="$ac_save_LIBS"
2146    
2147     fi
2148     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2149     echo "$ac_t""yes" 1>&6
2150 cebix 1.9 ac_tr_lib=HAVE_LIB`echo PTL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2151     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2152     cat >> confdefs.h <<EOF
2153     #define $ac_tr_lib 1
2154     EOF
2155    
2156     LIBS="-lPTL $LIBS"
2157    
2158 cebix 1.5 else
2159     echo "$ac_t""no" 1>&6
2160 cebix 1.9
2161     { echo "configure: error: You need pthreads to run Basilisk II." 1>&2; exit 1; }
2162    
2163 cebix 1.5 fi
2164    
2165 cebix 1.9
2166     fi
2167    
2168    
2169 cebix 1.1 fi
2170 cebix 1.9
2171    
2172     SEMSRCS=
2173     for ac_func in sem_init
2174 cebix 1.1 do
2175     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2176 cebix 1.9 echo "configure:2177: checking for $ac_func" >&5
2177 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2178     echo $ac_n "(cached) $ac_c" 1>&6
2179     else
2180     cat > conftest.$ac_ext <<EOF
2181 cebix 1.9 #line 2182 "configure"
2182 cebix 1.1 #include "confdefs.h"
2183     /* System header to define __stub macros and hopefully few prototypes,
2184     which can conflict with char $ac_func(); below. */
2185     #include <assert.h>
2186     /* Override any gcc2 internal prototype to avoid an error. */
2187     /* We use char because int might match the return type of a gcc2
2188     builtin and then its argument prototype would still apply. */
2189     char $ac_func();
2190    
2191     int main() {
2192    
2193     /* The GNU C library defines this for functions which it implements
2194     to always fail with ENOSYS. Some functions are actually named
2195     something starting with __ and the normal name is an alias. */
2196     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2197     choke me
2198     #else
2199     $ac_func();
2200     #endif
2201    
2202     ; return 0; }
2203     EOF
2204 cebix 1.9 if { (eval echo configure:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2205 cebix 1.1 rm -rf conftest*
2206     eval "ac_cv_func_$ac_func=yes"
2207     else
2208     echo "configure: failed program was:" >&5
2209     cat conftest.$ac_ext >&5
2210     rm -rf conftest*
2211     eval "ac_cv_func_$ac_func=no"
2212     fi
2213     rm -f conftest*
2214     fi
2215    
2216     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2217     echo "$ac_t""yes" 1>&6
2218     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2219     cat >> confdefs.h <<EOF
2220     #define $ac_tr_func 1
2221     EOF
2222    
2223     else
2224     echo "$ac_t""no" 1>&6
2225 cebix 1.9 SEMSRCS=posix_sem.cpp
2226    
2227 cebix 1.1 fi
2228     done
2229    
2230    
2231 cebix 1.7 if [ "x$WANT_XF86_DGA" = "xyes" ]; then
2232 cebix 1.1 echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
2233 cebix 1.9 echo "configure:2234: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
2234 cebix 1.1 ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
2235     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2236     echo $ac_n "(cached) $ac_c" 1>&6
2237     else
2238     ac_save_LIBS="$LIBS"
2239     LIBS="-lXxf86dga $LIBS"
2240     cat > conftest.$ac_ext <<EOF
2241 cebix 1.9 #line 2242 "configure"
2242 cebix 1.1 #include "confdefs.h"
2243     /* Override any gcc2 internal prototype to avoid an error. */
2244     /* We use char because int might match the return type of a gcc2
2245     builtin and then its argument prototype would still apply. */
2246     char XF86DGAQueryExtension();
2247    
2248     int main() {
2249     XF86DGAQueryExtension()
2250     ; return 0; }
2251     EOF
2252 cebix 1.9 if { (eval echo configure:2253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2253 cebix 1.1 rm -rf conftest*
2254     eval "ac_cv_lib_$ac_lib_var=yes"
2255     else
2256     echo "configure: failed program was:" >&5
2257     cat conftest.$ac_ext >&5
2258     rm -rf conftest*
2259     eval "ac_cv_lib_$ac_lib_var=no"
2260     fi
2261     rm -f conftest*
2262     LIBS="$ac_save_LIBS"
2263    
2264     fi
2265     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2266     echo "$ac_t""yes" 1>&6
2267 cebix 1.9
2268 cebix 1.7 DEFINES="$DEFINES -DENABLE_XF86_DGA=1"
2269 cebix 1.1 LIBS="$LIBS -lXxf86dga"
2270 cebix 1.7 if [ "x$WANT_FBDEV_DGA" = "xyes" ]; then
2271     echo "configure: warning: Cannot have both --enable-xf86-dga and --enable-fbdev-dga, ignoring --enable-fbdev-dga." 1>&2
2272     WANT_FBDEV_DGA=no
2273     fi
2274 cebix 1.9
2275     else
2276     echo "$ac_t""no" 1>&6
2277    
2278     echo "configure: warning: Could not find XFree86 DGA extension, ignoring --enable-xf86-dga." 1>&2
2279     DEFINES="$DEFINES -DENABLE_XF86_DGA=0"
2280    
2281     fi
2282    
2283 cebix 1.7 else
2284     DEFINES="$DEFINES -DENABLE_XF86_DGA=0"
2285     fi
2286     if [ "x$WANT_FBDEV_DGA" = "xyes" ]; then
2287     DEFINES="$DEFINES -DENABLE_FBDEV_DGA=1"
2288     else
2289     DEFINES="$DEFINES -DENABLE_FBDEV_DGA=0"
2290 cebix 1.1 fi
2291    
2292 cebix 1.9 UISRCS=../dummy/prefs_editor_dummy.cpp
2293 cebix 1.1 if [ "x$WANT_UI" = "xyes" ]; then
2294     # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
2295     if test "${with_gtk_prefix+set}" = set; then
2296     withval="$with_gtk_prefix"
2297     gtk_config_prefix="$withval"
2298     else
2299     gtk_config_prefix=""
2300     fi
2301    
2302     # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
2303     if test "${with_gtk_exec_prefix+set}" = set; then
2304     withval="$with_gtk_exec_prefix"
2305     gtk_config_exec_prefix="$withval"
2306     else
2307     gtk_config_exec_prefix=""
2308     fi
2309    
2310     # Check whether --enable-gtktest or --disable-gtktest was given.
2311     if test "${enable_gtktest+set}" = set; then
2312     enableval="$enable_gtktest"
2313     :
2314     else
2315     enable_gtktest=yes
2316     fi
2317    
2318    
2319     if test x$gtk_config_exec_prefix != x ; then
2320     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
2321     if test x${GTK_CONFIG+set} != xset ; then
2322     GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
2323     fi
2324     fi
2325     if test x$gtk_config_prefix != x ; then
2326     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
2327     if test x${GTK_CONFIG+set} != xset ; then
2328     GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
2329     fi
2330     fi
2331    
2332     # Extract the first word of "gtk-config", so it can be a program name with args.
2333     set dummy gtk-config; ac_word=$2
2334     echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2335 cebix 1.9 echo "configure:2336: checking for $ac_word" >&5
2336 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
2337     echo $ac_n "(cached) $ac_c" 1>&6
2338     else
2339     case "$GTK_CONFIG" in
2340     /*)
2341     ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
2342     ;;
2343     ?:/*)
2344     ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
2345     ;;
2346     *)
2347     IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2348     ac_dummy="$PATH"
2349     for ac_dir in $ac_dummy; do
2350     test -z "$ac_dir" && ac_dir=.
2351     if test -f $ac_dir/$ac_word; then
2352     ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
2353     break
2354     fi
2355     done
2356     IFS="$ac_save_ifs"
2357     test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
2358     ;;
2359     esac
2360     fi
2361     GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
2362     if test -n "$GTK_CONFIG"; then
2363     echo "$ac_t""$GTK_CONFIG" 1>&6
2364     else
2365     echo "$ac_t""no" 1>&6
2366     fi
2367    
2368     min_gtk_version=1.2.0
2369     echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
2370 cebix 1.9 echo "configure:2371: checking for GTK - version >= $min_gtk_version" >&5
2371 cebix 1.1 no_gtk=""
2372     if test "$GTK_CONFIG" = "no" ; then
2373     no_gtk=yes
2374     else
2375     GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
2376     GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
2377     gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
2378     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
2379     gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
2380     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
2381     gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
2382     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
2383     if test "x$enable_gtktest" = "xyes" ; then
2384     ac_save_CFLAGS="$CFLAGS"
2385     ac_save_LIBS="$LIBS"
2386     CFLAGS="$CFLAGS $GTK_CFLAGS"
2387     LIBS="$LIBS $GTK_LIBS"
2388     rm -f conf.gtktest
2389     if test "$cross_compiling" = yes; then
2390     echo $ac_n "cross compiling; assumed OK... $ac_c"
2391     else
2392     cat > conftest.$ac_ext <<EOF
2393 cebix 1.9 #line 2394 "configure"
2394 cebix 1.1 #include "confdefs.h"
2395    
2396     #include <gtk/gtk.h>
2397     #include <stdio.h>
2398    
2399     int
2400     main ()
2401     {
2402     int major, minor, micro;
2403    
2404     system ("touch conf.gtktest");
2405    
2406     if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
2407     printf("%s, bad version string\n", "$min_gtk_version");
2408     exit(1);
2409     }
2410    
2411     if ((gtk_major_version != $gtk_config_major_version) ||
2412     (gtk_minor_version != $gtk_config_minor_version) ||
2413     (gtk_micro_version != $gtk_config_micro_version))
2414     {
2415     printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
2416     $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
2417     gtk_major_version, gtk_minor_version, gtk_micro_version);
2418     printf ("*** was found! If gtk-config was correct, then it is best\n");
2419     printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
2420     printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
2421     printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
2422     printf("*** required on your system.\n");
2423     printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
2424     printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
2425     printf("*** before re-running configure\n");
2426     }
2427     else
2428     {
2429     if ((gtk_major_version > major) ||
2430     ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
2431     ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
2432     {
2433     return 0;
2434     }
2435     else
2436     {
2437     printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
2438     gtk_major_version, gtk_minor_version, gtk_micro_version);
2439     printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
2440     major, minor, micro);
2441     printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
2442     printf("***\n");
2443     printf("*** If you have already installed a sufficiently new version, this error\n");
2444     printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
2445     printf("*** being found. The easiest way to fix this is to remove the old version\n");
2446     printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
2447     printf("*** correct copy of gtk-config. (In this case, you will have to\n");
2448     printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
2449     printf("*** so that the correct libraries are found at run-time))\n");
2450     }
2451     }
2452     return 1;
2453     }
2454    
2455     EOF
2456 cebix 1.9 if { (eval echo configure:2457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2457 cebix 1.1 then
2458     :
2459     else
2460     echo "configure: failed program was:" >&5
2461     cat conftest.$ac_ext >&5
2462     rm -fr conftest*
2463     no_gtk=yes
2464     fi
2465     rm -fr conftest*
2466     fi
2467    
2468     CFLAGS="$ac_save_CFLAGS"
2469     LIBS="$ac_save_LIBS"
2470     fi
2471     fi
2472     if test "x$no_gtk" = x ; then
2473     echo "$ac_t""yes" 1>&6
2474 cebix 1.9
2475     DEFINES="$DEFINES -DENABLE_GTK=1"
2476     CFLAGS="$CFLAGS $GTK_CFLAGS"
2477     CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
2478     LIBS="$LIBS $GTK_LIBS"
2479     UISRCS=prefs_editor_gtk.cpp
2480    
2481 cebix 1.1 else
2482     echo "$ac_t""no" 1>&6
2483     if test "$GTK_CONFIG" = "no" ; then
2484     echo "*** The gtk-config script installed by GTK could not be found"
2485     echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
2486     echo "*** your path, or set the GTK_CONFIG environment variable to the"
2487     echo "*** full path to gtk-config."
2488     else
2489     if test -f conf.gtktest ; then
2490     :
2491     else
2492     echo "*** Could not run GTK test program, checking why..."
2493     CFLAGS="$CFLAGS $GTK_CFLAGS"
2494     LIBS="$LIBS $GTK_LIBS"
2495     cat > conftest.$ac_ext <<EOF
2496 cebix 1.9 #line 2497 "configure"
2497 cebix 1.1 #include "confdefs.h"
2498    
2499     #include <gtk/gtk.h>
2500     #include <stdio.h>
2501    
2502     int main() {
2503     return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
2504     ; return 0; }
2505     EOF
2506 cebix 1.9 if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2507 cebix 1.1 rm -rf conftest*
2508     echo "*** The test program compiled, but did not run. This usually means"
2509     echo "*** that the run-time linker is not finding GTK or finding the wrong"
2510     echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
2511     echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2512     echo "*** to the installed location Also, make sure you have run ldconfig if that"
2513     echo "*** is required on your system"
2514     echo "***"
2515     echo "*** If you have an old version installed, it is best to remove it, although"
2516     echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
2517     echo "***"
2518     echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
2519     echo "*** came with the system with the command"
2520     echo "***"
2521     echo "*** rpm --erase --nodeps gtk gtk-devel"
2522     else
2523     echo "configure: failed program was:" >&5
2524     cat conftest.$ac_ext >&5
2525     rm -rf conftest*
2526     echo "*** The test program failed to compile or link. See the file config.log for the"
2527     echo "*** exact error that occured. This usually means GTK was incorrectly installed"
2528     echo "*** or that you have moved GTK since it was installed. In the latter case, you"
2529     echo "*** may want to edit the gtk-config script: $GTK_CONFIG"
2530     fi
2531     rm -f conftest*
2532     CFLAGS="$ac_save_CFLAGS"
2533     LIBS="$ac_save_LIBS"
2534     fi
2535     fi
2536     GTK_CFLAGS=""
2537     GTK_LIBS=""
2538 cebix 1.9
2539     echo "configure: warning: Could not find GTK+, disabling user interface." 1>&2
2540     WANT_UI=no
2541    
2542 cebix 1.1 fi
2543    
2544    
2545     rm -f conf.gtktest
2546    
2547 cebix 1.9 fi
2548    
2549     if [ "x$WANT_ESD" = "xyes" ]; then
2550     # Check whether --with-esd-prefix or --without-esd-prefix was given.
2551     if test "${with_esd_prefix+set}" = set; then
2552     withval="$with_esd_prefix"
2553     esd_prefix="$withval"
2554     else
2555     esd_prefix=""
2556     fi
2557    
2558     # Check whether --with-esd-exec-prefix or --without-esd-exec-prefix was given.
2559     if test "${with_esd_exec_prefix+set}" = set; then
2560     withval="$with_esd_exec_prefix"
2561     esd_exec_prefix="$withval"
2562     else
2563     esd_exec_prefix=""
2564     fi
2565    
2566     # Check whether --enable-esdtest or --disable-esdtest was given.
2567     if test "${enable_esdtest+set}" = set; then
2568     enableval="$enable_esdtest"
2569     :
2570     else
2571     enable_esdtest=yes
2572     fi
2573    
2574    
2575     if test x$esd_exec_prefix != x ; then
2576     esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
2577     if test x${ESD_CONFIG+set} != xset ; then
2578     ESD_CONFIG=$esd_exec_prefix/bin/esd-config
2579     fi
2580     fi
2581     if test x$esd_prefix != x ; then
2582     esd_args="$esd_args --prefix=$esd_prefix"
2583     if test x${ESD_CONFIG+set} != xset ; then
2584     ESD_CONFIG=$esd_prefix/bin/esd-config
2585     fi
2586 cebix 1.1 fi
2587 cebix 1.9
2588     # Extract the first word of "esd-config", so it can be a program name with args.
2589     set dummy esd-config; ac_word=$2
2590     echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2591     echo "configure:2592: checking for $ac_word" >&5
2592     if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
2593     echo $ac_n "(cached) $ac_c" 1>&6
2594     else
2595     case "$ESD_CONFIG" in
2596     /*)
2597     ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
2598     ;;
2599     ?:/*)
2600     ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
2601     ;;
2602     *)
2603     IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2604     ac_dummy="$PATH"
2605     for ac_dir in $ac_dummy; do
2606     test -z "$ac_dir" && ac_dir=.
2607     if test -f $ac_dir/$ac_word; then
2608     ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
2609     break
2610     fi
2611     done
2612     IFS="$ac_save_ifs"
2613     test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
2614     ;;
2615     esac
2616     fi
2617     ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
2618     if test -n "$ESD_CONFIG"; then
2619     echo "$ac_t""$ESD_CONFIG" 1>&6
2620     else
2621     echo "$ac_t""no" 1>&6
2622 cebix 1.1 fi
2623    
2624 cebix 1.9 min_esd_version=0.2.8
2625     echo $ac_n "checking for ESD - version >= $min_esd_version""... $ac_c" 1>&6
2626     echo "configure:2627: checking for ESD - version >= $min_esd_version" >&5
2627     no_esd=""
2628     if test "$ESD_CONFIG" = "no" ; then
2629     no_esd=yes
2630     else
2631     ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
2632     ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
2633    
2634     esd_major_version=`$ESD_CONFIG $esd_args --version | \
2635     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
2636     esd_minor_version=`$ESD_CONFIG $esd_args --version | \
2637     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
2638     esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
2639     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
2640     if test "x$enable_esdtest" = "xyes" ; then
2641     ac_save_CFLAGS="$CFLAGS"
2642     ac_save_LIBS="$LIBS"
2643     CFLAGS="$CFLAGS $ESD_CFLAGS"
2644     LIBS="$LIBS $ESD_LIBS"
2645     rm -f conf.esdtest
2646     if test "$cross_compiling" = yes; then
2647     echo $ac_n "cross compiling; assumed OK... $ac_c"
2648 cebix 1.1 else
2649     cat > conftest.$ac_ext <<EOF
2650 cebix 1.9 #line 2651 "configure"
2651 cebix 1.1 #include "confdefs.h"
2652    
2653 cebix 1.9 #include <stdio.h>
2654     #include <stdlib.h>
2655     #include <string.h>
2656     #include <esd.h>
2657    
2658     char*
2659     my_strdup (char *str)
2660     {
2661     char *new_str;
2662    
2663     if (str)
2664     {
2665     new_str = malloc ((strlen (str) + 1) * sizeof(char));
2666     strcpy (new_str, str);
2667     }
2668     else
2669     new_str = NULL;
2670    
2671     return new_str;
2672     }
2673    
2674     int main ()
2675     {
2676     int major, minor, micro;
2677     char *tmp_version;
2678    
2679     system ("touch conf.esdtest");
2680    
2681     /* HP/UX 9 (%@#!) writes to sscanf strings */
2682     tmp_version = my_strdup("$min_esd_version");
2683     if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
2684     printf("%s, bad version string\n", "$min_esd_version");
2685     exit(1);
2686     }
2687    
2688     if (($esd_major_version > major) ||
2689     (($esd_major_version == major) && ($esd_minor_version > minor)) ||
2690     (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
2691     {
2692     return 0;
2693     }
2694     else
2695     {
2696     printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
2697     printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
2698     printf("*** best to upgrade to the required version.\n");
2699     printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
2700     printf("*** to point to the correct copy of esd-config, and remove the file\n");
2701     printf("*** config.cache before re-running configure\n");
2702     return 1;
2703     }
2704     }
2705 cebix 1.1
2706    
2707     EOF
2708 cebix 1.9 if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2709     then
2710     :
2711 cebix 1.1 else
2712     echo "configure: failed program was:" >&5
2713     cat conftest.$ac_ext >&5
2714 cebix 1.9 rm -fr conftest*
2715     no_esd=yes
2716 cebix 1.1 fi
2717 cebix 1.9 rm -fr conftest*
2718 cebix 1.1 fi
2719    
2720 cebix 1.9 CFLAGS="$ac_save_CFLAGS"
2721     LIBS="$ac_save_LIBS"
2722     fi
2723     fi
2724     if test "x$no_esd" = x ; then
2725     echo "$ac_t""yes" 1>&6
2726    
2727     DEFINES="$DEFINES -DENABLE_ESD=1"
2728     CFLAGS="$CFLAGS $ESD_CFLAGS"
2729     CXXFLAGS="$CXXFLAGS $ESD_CFLAGS"
2730     LIBS="$LIBS $ESD_LIBS"
2731    
2732     else
2733     echo "$ac_t""no" 1>&6
2734     if test "$ESD_CONFIG" = "no" ; then
2735     echo "*** The esd-config script installed by ESD could not be found"
2736     echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
2737     echo "*** your path, or set the ESD_CONFIG environment variable to the"
2738     echo "*** full path to esd-config."
2739     else
2740     if test -f conf.esdtest ; then
2741     :
2742     else
2743     echo "*** Could not run ESD test program, checking why..."
2744     CFLAGS="$CFLAGS $ESD_CFLAGS"
2745     LIBS="$LIBS $ESD_LIBS"
2746     cat > conftest.$ac_ext <<EOF
2747     #line 2748 "configure"
2748     #include "confdefs.h"
2749 cebix 1.1
2750 cebix 1.9 #include <stdio.h>
2751     #include <esd.h>
2752 cebix 1.1
2753     int main() {
2754 cebix 1.9 return 0;
2755 cebix 1.1 ; return 0; }
2756     EOF
2757 cebix 1.9 if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2758 cebix 1.1 rm -rf conftest*
2759 cebix 1.9 echo "*** The test program compiled, but did not run. This usually means"
2760     echo "*** that the run-time linker is not finding ESD or finding the wrong"
2761     echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
2762     echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2763     echo "*** to the installed location Also, make sure you have run ldconfig if that"
2764     echo "*** is required on your system"
2765     echo "***"
2766     echo "*** If you have an old version installed, it is best to remove it, although"
2767     echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
2768 cebix 1.1 else
2769     echo "configure: failed program was:" >&5
2770     cat conftest.$ac_ext >&5
2771     rm -rf conftest*
2772 cebix 1.9 echo "*** The test program failed to compile or link. See the file config.log for the"
2773     echo "*** exact error that occured. This usually means ESD was incorrectly installed"
2774     echo "*** or that you have moved ESD since it was installed. In the latter case, you"
2775     echo "*** may want to edit the esd-config script: $ESD_CONFIG"
2776 cebix 1.1 fi
2777     rm -f conftest*
2778 cebix 1.9 CFLAGS="$ac_save_CFLAGS"
2779     LIBS="$ac_save_LIBS"
2780     fi
2781     fi
2782     ESD_CFLAGS=""
2783     ESD_LIBS=""
2784    
2785     echo "configure: warning: Could not find ESD, disabling ESD support." 1>&2
2786     WANT_ESD=no
2787    
2788     fi
2789    
2790    
2791     rm -f conf.esdtest
2792 cebix 1.1
2793     fi
2794    
2795     echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2796 cebix 1.9 echo "configure:2797: checking for ANSI C header files" >&5
2797 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2798     echo $ac_n "(cached) $ac_c" 1>&6
2799     else
2800     cat > conftest.$ac_ext <<EOF
2801 cebix 1.9 #line 2802 "configure"
2802 cebix 1.1 #include "confdefs.h"
2803     #include <stdlib.h>
2804     #include <stdarg.h>
2805     #include <string.h>
2806     #include <float.h>
2807     EOF
2808     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2809 cebix 1.9 { (eval echo configure:2810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2810 cebix 1.1 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2811     if test -z "$ac_err"; then
2812     rm -rf conftest*
2813     ac_cv_header_stdc=yes
2814     else
2815     echo "$ac_err" >&5
2816     echo "configure: failed program was:" >&5
2817     cat conftest.$ac_ext >&5
2818     rm -rf conftest*
2819     ac_cv_header_stdc=no
2820     fi
2821     rm -f conftest*
2822    
2823     if test $ac_cv_header_stdc = yes; then
2824     # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2825     cat > conftest.$ac_ext <<EOF
2826 cebix 1.9 #line 2827 "configure"
2827 cebix 1.1 #include "confdefs.h"
2828     #include <string.h>
2829     EOF
2830     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2831     egrep "memchr" >/dev/null 2>&1; then
2832     :
2833     else
2834     rm -rf conftest*
2835     ac_cv_header_stdc=no
2836     fi
2837     rm -f conftest*
2838    
2839     fi
2840    
2841     if test $ac_cv_header_stdc = yes; then
2842     # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2843     cat > conftest.$ac_ext <<EOF
2844 cebix 1.9 #line 2845 "configure"
2845 cebix 1.1 #include "confdefs.h"
2846     #include <stdlib.h>
2847     EOF
2848     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2849     egrep "free" >/dev/null 2>&1; then
2850     :
2851     else
2852     rm -rf conftest*
2853     ac_cv_header_stdc=no
2854     fi
2855     rm -f conftest*
2856    
2857     fi
2858    
2859     if test $ac_cv_header_stdc = yes; then
2860     # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2861     if test "$cross_compiling" = yes; then
2862     :
2863     else
2864     cat > conftest.$ac_ext <<EOF
2865 cebix 1.9 #line 2866 "configure"
2866 cebix 1.1 #include "confdefs.h"
2867     #include <ctype.h>
2868     #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2869     #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2870     #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2871     int main () { int i; for (i = 0; i < 256; i++)
2872     if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2873     exit (0); }
2874    
2875     EOF
2876 cebix 1.9 if { (eval echo configure:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2877 cebix 1.1 then
2878     :
2879     else
2880     echo "configure: failed program was:" >&5
2881     cat conftest.$ac_ext >&5
2882     rm -fr conftest*
2883     ac_cv_header_stdc=no
2884     fi
2885     rm -fr conftest*
2886     fi
2887    
2888     fi
2889     fi
2890    
2891     echo "$ac_t""$ac_cv_header_stdc" 1>&6
2892     if test $ac_cv_header_stdc = yes; then
2893     cat >> confdefs.h <<\EOF
2894     #define STDC_HEADERS 1
2895     EOF
2896    
2897     fi
2898    
2899     for ac_hdr in unistd.h fcntl.h sys/time.h
2900     do
2901     ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2902     echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2903 cebix 1.9 echo "configure:2904: checking for $ac_hdr" >&5
2904 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2905     echo $ac_n "(cached) $ac_c" 1>&6
2906     else
2907     cat > conftest.$ac_ext <<EOF
2908 cebix 1.9 #line 2909 "configure"
2909 cebix 1.1 #include "confdefs.h"
2910     #include <$ac_hdr>
2911     EOF
2912     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2913 cebix 1.9 { (eval echo configure:2914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2914 cebix 1.1 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2915     if test -z "$ac_err"; then
2916     rm -rf conftest*
2917     eval "ac_cv_header_$ac_safe=yes"
2918     else
2919     echo "$ac_err" >&5
2920     echo "configure: failed program was:" >&5
2921     cat conftest.$ac_ext >&5
2922     rm -rf conftest*
2923     eval "ac_cv_header_$ac_safe=no"
2924     fi
2925     rm -f conftest*
2926     fi
2927     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2928     echo "$ac_t""yes" 1>&6
2929     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2930     cat >> confdefs.h <<EOF
2931     #define $ac_tr_hdr 1
2932     EOF
2933    
2934     else
2935     echo "$ac_t""no" 1>&6
2936     fi
2937     done
2938    
2939    
2940     echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2941 cebix 1.9 echo "configure:2942: checking whether byte ordering is bigendian" >&5
2942 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2943     echo $ac_n "(cached) $ac_c" 1>&6
2944     else
2945     ac_cv_c_bigendian=unknown
2946     # See if sys/param.h defines the BYTE_ORDER macro.
2947     cat > conftest.$ac_ext <<EOF
2948 cebix 1.9 #line 2949 "configure"
2949 cebix 1.1 #include "confdefs.h"
2950     #include <sys/types.h>
2951     #include <sys/param.h>
2952     int main() {
2953    
2954     #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2955     bogus endian macros
2956     #endif
2957     ; return 0; }
2958     EOF
2959 cebix 1.9 if { (eval echo configure:2960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2960 cebix 1.1 rm -rf conftest*
2961     # It does; now see whether it defined to BIG_ENDIAN or not.
2962     cat > conftest.$ac_ext <<EOF
2963 cebix 1.9 #line 2964 "configure"
2964 cebix 1.1 #include "confdefs.h"
2965     #include <sys/types.h>
2966     #include <sys/param.h>
2967     int main() {
2968    
2969     #if BYTE_ORDER != BIG_ENDIAN
2970     not big endian
2971     #endif
2972     ; return 0; }
2973     EOF
2974 cebix 1.9 if { (eval echo configure:2975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2975 cebix 1.1 rm -rf conftest*
2976     ac_cv_c_bigendian=yes
2977     else
2978     echo "configure: failed program was:" >&5
2979     cat conftest.$ac_ext >&5
2980     rm -rf conftest*
2981     ac_cv_c_bigendian=no
2982     fi
2983     rm -f conftest*
2984     else
2985     echo "configure: failed program was:" >&5
2986     cat conftest.$ac_ext >&5
2987     fi
2988     rm -f conftest*
2989     if test $ac_cv_c_bigendian = unknown; then
2990     if test "$cross_compiling" = yes; then
2991     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2992     else
2993     cat > conftest.$ac_ext <<EOF
2994 cebix 1.9 #line 2995 "configure"
2995 cebix 1.1 #include "confdefs.h"
2996     main () {
2997     /* Are we little or big endian? From Harbison&Steele. */
2998     union
2999     {
3000     long l;
3001     char c[sizeof (long)];
3002     } u;
3003     u.l = 1;
3004     exit (u.c[sizeof (long) - 1] == 1);
3005     }
3006     EOF
3007 cebix 1.9 if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3008 cebix 1.1 then
3009     ac_cv_c_bigendian=no
3010     else
3011     echo "configure: failed program was:" >&5
3012     cat conftest.$ac_ext >&5
3013     rm -fr conftest*
3014     ac_cv_c_bigendian=yes
3015     fi
3016     rm -fr conftest*
3017     fi
3018    
3019     fi
3020     fi
3021    
3022     echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3023     if test $ac_cv_c_bigendian = yes; then
3024     cat >> confdefs.h <<\EOF
3025     #define WORDS_BIGENDIAN 1
3026     EOF
3027    
3028     fi
3029    
3030     echo $ac_n "checking for working const""... $ac_c" 1>&6
3031 cebix 1.9 echo "configure:3032: checking for working const" >&5
3032 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3033     echo $ac_n "(cached) $ac_c" 1>&6
3034     else
3035     cat > conftest.$ac_ext <<EOF
3036 cebix 1.9 #line 3037 "configure"
3037 cebix 1.1 #include "confdefs.h"
3038    
3039     int main() {
3040    
3041     /* Ultrix mips cc rejects this. */
3042     typedef int charset[2]; const charset x;
3043     /* SunOS 4.1.1 cc rejects this. */
3044     char const *const *ccp;
3045     char **p;
3046     /* NEC SVR4.0.2 mips cc rejects this. */
3047     struct point {int x, y;};
3048     static struct point const zero = {0,0};
3049     /* AIX XL C 1.02.0.0 rejects this.
3050     It does not let you subtract one const X* pointer from another in an arm
3051     of an if-expression whose if-part is not a constant expression */
3052     const char *g = "string";
3053     ccp = &g + (g ? g-g : 0);
3054     /* HPUX 7.0 cc rejects these. */
3055     ++ccp;
3056     p = (char**) ccp;
3057     ccp = (char const *const *) p;
3058     { /* SCO 3.2v4 cc rejects this. */
3059     char *t;
3060     char const *s = 0 ? (char *) 0 : (char const *) 0;
3061    
3062     *t++ = 0;
3063     }
3064     { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3065     int x[] = {25, 17};
3066     const int *foo = &x[0];
3067     ++foo;
3068     }
3069     { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3070     typedef const int *iptr;
3071     iptr p = 0;
3072     ++p;
3073     }
3074     { /* AIX XL C 1.02.0.0 rejects this saying
3075     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3076     struct s { int j; const int *ap[3]; };
3077     struct s *b; b->j = 5;
3078     }
3079     { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3080     const int foo = 10;
3081     }
3082    
3083     ; return 0; }
3084     EOF
3085 cebix 1.9 if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3086 cebix 1.1 rm -rf conftest*
3087     ac_cv_c_const=yes
3088     else
3089     echo "configure: failed program was:" >&5
3090     cat conftest.$ac_ext >&5
3091     rm -rf conftest*
3092     ac_cv_c_const=no
3093     fi
3094     rm -f conftest*
3095     fi
3096    
3097     echo "$ac_t""$ac_cv_c_const" 1>&6
3098     if test $ac_cv_c_const = no; then
3099     cat >> confdefs.h <<\EOF
3100     #define const
3101     EOF
3102    
3103     fi
3104    
3105     echo $ac_n "checking for inline""... $ac_c" 1>&6
3106 cebix 1.9 echo "configure:3107: checking for inline" >&5
3107 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3108     echo $ac_n "(cached) $ac_c" 1>&6
3109     else
3110     ac_cv_c_inline=no
3111     for ac_kw in inline __inline__ __inline; do
3112     cat > conftest.$ac_ext <<EOF
3113 cebix 1.9 #line 3114 "configure"
3114 cebix 1.1 #include "confdefs.h"
3115    
3116     int main() {
3117     } $ac_kw foo() {
3118     ; return 0; }
3119     EOF
3120 cebix 1.9 if { (eval echo configure:3121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3121 cebix 1.1 rm -rf conftest*
3122     ac_cv_c_inline=$ac_kw; break
3123     else
3124     echo "configure: failed program was:" >&5
3125     cat conftest.$ac_ext >&5
3126     fi
3127     rm -f conftest*
3128     done
3129    
3130     fi
3131    
3132     echo "$ac_t""$ac_cv_c_inline" 1>&6
3133     case "$ac_cv_c_inline" in
3134     inline | yes) ;;
3135     no) cat >> confdefs.h <<\EOF
3136     #define inline
3137     EOF
3138     ;;
3139     *) cat >> confdefs.h <<EOF
3140     #define inline $ac_cv_c_inline
3141     EOF
3142     ;;
3143     esac
3144    
3145     echo $ac_n "checking size of short""... $ac_c" 1>&6
3146 cebix 1.9 echo "configure:3147: checking size of short" >&5
3147 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3148     echo $ac_n "(cached) $ac_c" 1>&6
3149     else
3150     if test "$cross_compiling" = yes; then
3151     ac_cv_sizeof_short=2
3152     else
3153     cat > conftest.$ac_ext <<EOF
3154 cebix 1.9 #line 3155 "configure"
3155 cebix 1.1 #include "confdefs.h"
3156     #include <stdio.h>
3157     main()
3158     {
3159     FILE *f=fopen("conftestval", "w");
3160     if (!f) exit(1);
3161     fprintf(f, "%d\n", sizeof(short));
3162     exit(0);
3163     }
3164     EOF
3165 cebix 1.9 if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3166 cebix 1.1 then
3167     ac_cv_sizeof_short=`cat conftestval`
3168     else
3169     echo "configure: failed program was:" >&5
3170     cat conftest.$ac_ext >&5
3171     rm -fr conftest*
3172     ac_cv_sizeof_short=0
3173     fi
3174     rm -fr conftest*
3175     fi
3176    
3177     fi
3178     echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3179     cat >> confdefs.h <<EOF
3180     #define SIZEOF_SHORT $ac_cv_sizeof_short
3181     EOF
3182    
3183    
3184     echo $ac_n "checking size of int""... $ac_c" 1>&6
3185 cebix 1.9 echo "configure:3186: checking size of int" >&5
3186 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3187     echo $ac_n "(cached) $ac_c" 1>&6
3188     else
3189     if test "$cross_compiling" = yes; then
3190     ac_cv_sizeof_int=4
3191     else
3192     cat > conftest.$ac_ext <<EOF
3193 cebix 1.9 #line 3194 "configure"
3194 cebix 1.1 #include "confdefs.h"
3195     #include <stdio.h>
3196     main()
3197     {
3198     FILE *f=fopen("conftestval", "w");
3199     if (!f) exit(1);
3200     fprintf(f, "%d\n", sizeof(int));
3201     exit(0);
3202     }
3203     EOF
3204 cebix 1.9 if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3205 cebix 1.1 then
3206     ac_cv_sizeof_int=`cat conftestval`
3207     else
3208     echo "configure: failed program was:" >&5
3209     cat conftest.$ac_ext >&5
3210     rm -fr conftest*
3211     ac_cv_sizeof_int=0
3212     fi
3213     rm -fr conftest*
3214     fi
3215    
3216     fi
3217     echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3218     cat >> confdefs.h <<EOF
3219     #define SIZEOF_INT $ac_cv_sizeof_int
3220     EOF
3221    
3222    
3223     echo $ac_n "checking size of long""... $ac_c" 1>&6
3224 cebix 1.9 echo "configure:3225: checking size of long" >&5
3225 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3226     echo $ac_n "(cached) $ac_c" 1>&6
3227     else
3228     if test "$cross_compiling" = yes; then
3229     ac_cv_sizeof_long=4
3230     else
3231     cat > conftest.$ac_ext <<EOF
3232 cebix 1.9 #line 3233 "configure"
3233 cebix 1.1 #include "confdefs.h"
3234     #include <stdio.h>
3235     main()
3236     {
3237     FILE *f=fopen("conftestval", "w");
3238     if (!f) exit(1);
3239     fprintf(f, "%d\n", sizeof(long));
3240     exit(0);
3241     }
3242     EOF
3243 cebix 1.9 if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3244 cebix 1.1 then
3245     ac_cv_sizeof_long=`cat conftestval`
3246     else
3247     echo "configure: failed program was:" >&5
3248     cat conftest.$ac_ext >&5
3249     rm -fr conftest*
3250     ac_cv_sizeof_long=0
3251     fi
3252     rm -fr conftest*
3253     fi
3254    
3255     fi
3256     echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3257     cat >> confdefs.h <<EOF
3258     #define SIZEOF_LONG $ac_cv_sizeof_long
3259     EOF
3260    
3261    
3262     echo $ac_n "checking size of long long""... $ac_c" 1>&6
3263 cebix 1.9 echo "configure:3264: checking size of long long" >&5
3264 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
3265     echo $ac_n "(cached) $ac_c" 1>&6
3266     else
3267     if test "$cross_compiling" = yes; then
3268     ac_cv_sizeof_long_long=8
3269     else
3270     cat > conftest.$ac_ext <<EOF
3271 cebix 1.9 #line 3272 "configure"
3272 cebix 1.1 #include "confdefs.h"
3273     #include <stdio.h>
3274     main()
3275     {
3276     FILE *f=fopen("conftestval", "w");
3277     if (!f) exit(1);
3278     fprintf(f, "%d\n", sizeof(long long));
3279     exit(0);
3280     }
3281     EOF
3282 cebix 1.9 if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3283 cebix 1.1 then
3284     ac_cv_sizeof_long_long=`cat conftestval`
3285     else
3286     echo "configure: failed program was:" >&5
3287     cat conftest.$ac_ext >&5
3288     rm -fr conftest*
3289     ac_cv_sizeof_long_long=0
3290     fi
3291     rm -fr conftest*
3292     fi
3293    
3294     fi
3295     echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
3296     cat >> confdefs.h <<EOF
3297     #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
3298     EOF
3299    
3300    
3301     echo $ac_n "checking for off_t""... $ac_c" 1>&6
3302 cebix 1.9 echo "configure:3303: checking for off_t" >&5
3303 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3304     echo $ac_n "(cached) $ac_c" 1>&6
3305     else
3306     cat > conftest.$ac_ext <<EOF
3307 cebix 1.9 #line 3308 "configure"
3308 cebix 1.1 #include "confdefs.h"
3309     #include <sys/types.h>
3310     #if STDC_HEADERS
3311     #include <stdlib.h>
3312     #include <stddef.h>
3313     #endif
3314     EOF
3315     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3316     egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3317     rm -rf conftest*
3318     ac_cv_type_off_t=yes
3319     else
3320     rm -rf conftest*
3321     ac_cv_type_off_t=no
3322     fi
3323     rm -f conftest*
3324    
3325     fi
3326     echo "$ac_t""$ac_cv_type_off_t" 1>&6
3327     if test $ac_cv_type_off_t = no; then
3328     cat >> confdefs.h <<\EOF
3329     #define off_t long
3330     EOF
3331    
3332     fi
3333    
3334     echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3335 cebix 1.9 echo "configure:3336: checking for loff_t" >&5
3336 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3337     echo $ac_n "(cached) $ac_c" 1>&6
3338     else
3339     cat > conftest.$ac_ext <<EOF
3340 cebix 1.9 #line 3341 "configure"
3341 cebix 1.1 #include "confdefs.h"
3342     #include <sys/types.h>
3343     #if STDC_HEADERS
3344     #include <stdlib.h>
3345     #include <stddef.h>
3346     #endif
3347     EOF
3348     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3349     egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3350     rm -rf conftest*
3351     ac_cv_type_loff_t=yes
3352     else
3353     rm -rf conftest*
3354     ac_cv_type_loff_t=no
3355     fi
3356     rm -f conftest*
3357    
3358     fi
3359     echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3360     if test $ac_cv_type_loff_t = no; then
3361     cat >> confdefs.h <<\EOF
3362     #define loff_t off_t
3363     EOF
3364    
3365     fi
3366    
3367     echo $ac_n "checking for size_t""... $ac_c" 1>&6
3368 cebix 1.9 echo "configure:3369: checking for size_t" >&5
3369 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3370     echo $ac_n "(cached) $ac_c" 1>&6
3371     else
3372     cat > conftest.$ac_ext <<EOF
3373 cebix 1.9 #line 3374 "configure"
3374 cebix 1.1 #include "confdefs.h"
3375     #include <sys/types.h>
3376     #if STDC_HEADERS
3377     #include <stdlib.h>
3378     #include <stddef.h>
3379     #endif
3380     EOF
3381     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3382     egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3383     rm -rf conftest*
3384     ac_cv_type_size_t=yes
3385     else
3386     rm -rf conftest*
3387     ac_cv_type_size_t=no
3388     fi
3389     rm -f conftest*
3390    
3391     fi
3392     echo "$ac_t""$ac_cv_type_size_t" 1>&6
3393     if test $ac_cv_type_size_t = no; then
3394     cat >> confdefs.h <<\EOF
3395     #define size_t unsigned
3396     EOF
3397    
3398     fi
3399    
3400     echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3401 cebix 1.9 echo "configure:3402: checking whether time.h and sys/time.h may both be included" >&5
3402 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3403     echo $ac_n "(cached) $ac_c" 1>&6
3404     else
3405     cat > conftest.$ac_ext <<EOF
3406 cebix 1.9 #line 3407 "configure"
3407 cebix 1.1 #include "confdefs.h"
3408     #include <sys/types.h>
3409     #include <sys/time.h>
3410     #include <time.h>
3411     int main() {
3412     struct tm *tp;
3413     ; return 0; }
3414     EOF
3415 cebix 1.9 if { (eval echo configure:3416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3416 cebix 1.1 rm -rf conftest*
3417     ac_cv_header_time=yes
3418     else
3419     echo "configure: failed program was:" >&5
3420     cat conftest.$ac_ext >&5
3421     rm -rf conftest*
3422     ac_cv_header_time=no
3423     fi
3424     rm -f conftest*
3425     fi
3426    
3427     echo "$ac_t""$ac_cv_header_time" 1>&6
3428     if test $ac_cv_header_time = yes; then
3429     cat >> confdefs.h <<\EOF
3430     #define TIME_WITH_SYS_TIME 1
3431     EOF
3432    
3433     fi
3434    
3435     echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3436 cebix 1.9 echo "configure:3437: checking whether struct tm is in sys/time.h or time.h" >&5
3437 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3438     echo $ac_n "(cached) $ac_c" 1>&6
3439     else
3440     cat > conftest.$ac_ext <<EOF
3441 cebix 1.9 #line 3442 "configure"
3442 cebix 1.1 #include "confdefs.h"
3443     #include <sys/types.h>
3444     #include <time.h>
3445     int main() {
3446     struct tm *tp; tp->tm_sec;
3447     ; return 0; }
3448     EOF
3449 cebix 1.9 if { (eval echo configure:3450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3450 cebix 1.1 rm -rf conftest*
3451     ac_cv_struct_tm=time.h
3452     else
3453     echo "configure: failed program was:" >&5
3454     cat conftest.$ac_ext >&5
3455     rm -rf conftest*
3456     ac_cv_struct_tm=sys/time.h
3457     fi
3458     rm -f conftest*
3459     fi
3460    
3461     echo "$ac_t""$ac_cv_struct_tm" 1>&6
3462     if test $ac_cv_struct_tm = sys/time.h; then
3463     cat >> confdefs.h <<\EOF
3464     #define TM_IN_SYS_TIME 1
3465     EOF
3466    
3467     fi
3468    
3469    
3470     for ac_func in strdup cfmakeraw
3471     do
3472     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3473 cebix 1.9 echo "configure:3474: checking for $ac_func" >&5
3474 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3475     echo $ac_n "(cached) $ac_c" 1>&6
3476     else
3477     cat > conftest.$ac_ext <<EOF
3478 cebix 1.9 #line 3479 "configure"
3479 cebix 1.1 #include "confdefs.h"
3480     /* System header to define __stub macros and hopefully few prototypes,
3481     which can conflict with char $ac_func(); below. */
3482     #include <assert.h>
3483     /* Override any gcc2 internal prototype to avoid an error. */
3484     /* We use char because int might match the return type of a gcc2
3485     builtin and then its argument prototype would still apply. */
3486     char $ac_func();
3487    
3488     int main() {
3489    
3490     /* The GNU C library defines this for functions which it implements
3491     to always fail with ENOSYS. Some functions are actually named
3492     something starting with __ and the normal name is an alias. */
3493     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3494     choke me
3495     #else
3496     $ac_func();
3497     #endif
3498    
3499     ; return 0; }
3500     EOF
3501 cebix 1.9 if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3502 cebix 1.1 rm -rf conftest*
3503     eval "ac_cv_func_$ac_func=yes"
3504     else
3505     echo "configure: failed program was:" >&5
3506     cat conftest.$ac_ext >&5
3507     rm -rf conftest*
3508     eval "ac_cv_func_$ac_func=no"
3509     fi
3510     rm -f conftest*
3511     fi
3512    
3513     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3514     echo "$ac_t""yes" 1>&6
3515     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3516     cat >> confdefs.h <<EOF
3517     #define $ac_tr_func 1
3518     EOF
3519    
3520     else
3521     echo "$ac_t""no" 1>&6
3522     fi
3523     done
3524    
3525     for ac_func in nanosleep clock_gettime timer_create
3526     do
3527     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3528 cebix 1.9 echo "configure:3529: checking for $ac_func" >&5
3529 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3530     echo $ac_n "(cached) $ac_c" 1>&6
3531     else
3532     cat > conftest.$ac_ext <<EOF
3533 cebix 1.9 #line 3534 "configure"
3534 cebix 1.1 #include "confdefs.h"
3535     /* System header to define __stub macros and hopefully few prototypes,
3536     which can conflict with char $ac_func(); below. */
3537     #include <assert.h>
3538     /* Override any gcc2 internal prototype to avoid an error. */
3539     /* We use char because int might match the return type of a gcc2
3540     builtin and then its argument prototype would still apply. */
3541     char $ac_func();
3542    
3543     int main() {
3544    
3545     /* The GNU C library defines this for functions which it implements
3546     to always fail with ENOSYS. Some functions are actually named
3547     something starting with __ and the normal name is an alias. */
3548     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3549     choke me
3550     #else
3551     $ac_func();
3552     #endif
3553    
3554     ; return 0; }
3555     EOF
3556 cebix 1.9 if { (eval echo configure:3557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3557     rm -rf conftest*
3558     eval "ac_cv_func_$ac_func=yes"
3559     else
3560     echo "configure: failed program was:" >&5
3561     cat conftest.$ac_ext >&5
3562     rm -rf conftest*
3563     eval "ac_cv_func_$ac_func=no"
3564     fi
3565     rm -f conftest*
3566     fi
3567    
3568     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3569     echo "$ac_t""yes" 1>&6
3570     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3571     cat >> confdefs.h <<EOF
3572     #define $ac_tr_func 1
3573     EOF
3574    
3575     else
3576     echo "$ac_t""no" 1>&6
3577     fi
3578     done
3579    
3580     for ac_func in pthread_cancel
3581     do
3582     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3583     echo "configure:3584: checking for $ac_func" >&5
3584     if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3585     echo $ac_n "(cached) $ac_c" 1>&6
3586     else
3587     cat > conftest.$ac_ext <<EOF
3588     #line 3589 "configure"
3589     #include "confdefs.h"
3590     /* System header to define __stub macros and hopefully few prototypes,
3591     which can conflict with char $ac_func(); below. */
3592     #include <assert.h>
3593     /* Override any gcc2 internal prototype to avoid an error. */
3594     /* We use char because int might match the return type of a gcc2
3595     builtin and then its argument prototype would still apply. */
3596     char $ac_func();
3597    
3598     int main() {
3599    
3600     /* The GNU C library defines this for functions which it implements
3601     to always fail with ENOSYS. Some functions are actually named
3602     something starting with __ and the normal name is an alias. */
3603     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3604     choke me
3605     #else
3606     $ac_func();
3607     #endif
3608    
3609     ; return 0; }
3610     EOF
3611     if { (eval echo configure:3612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3612 cebix 1.1 rm -rf conftest*
3613     eval "ac_cv_func_$ac_func=yes"
3614     else
3615     echo "configure: failed program was:" >&5
3616     cat conftest.$ac_ext >&5
3617     rm -rf conftest*
3618     eval "ac_cv_func_$ac_func=no"
3619     fi
3620     rm -f conftest*
3621     fi
3622    
3623     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3624     echo "$ac_t""yes" 1>&6
3625     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3626     cat >> confdefs.h <<EOF
3627     #define $ac_tr_func 1
3628     EOF
3629    
3630     else
3631     echo "$ac_t""no" 1>&6
3632     fi
3633     done
3634    
3635    
3636     SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp ../dummy/audio_dummy.cpp"
3637     if MACHINE=`uname -a 2>/dev/null`; then
3638     case "$MACHINE" in
3639     Linux*)
3640 cebix 1.9 SYSSRCS="Linux/ether_linux.cpp Linux/scsi_linux.cpp audio_oss_esd.cpp"
3641 cebix 1.1 ;;
3642     FreeBSD*3.*)
3643     echo $ac_n "checking for cam_open_btl in -lcam""... $ac_c" 1>&6
3644 cebix 1.9 echo "configure:3645: checking for cam_open_btl in -lcam" >&5
3645 cebix 1.1 ac_lib_var=`echo cam'_'cam_open_btl | sed 'y%./+-%__p_%'`
3646     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3647     echo $ac_n "(cached) $ac_c" 1>&6
3648     else
3649     ac_save_LIBS="$LIBS"
3650     LIBS="-lcam $LIBS"
3651     cat > conftest.$ac_ext <<EOF
3652 cebix 1.9 #line 3653 "configure"
3653 cebix 1.1 #include "confdefs.h"
3654     /* Override any gcc2 internal prototype to avoid an error. */
3655     /* We use char because int might match the return type of a gcc2
3656     builtin and then its argument prototype would still apply. */
3657     char cam_open_btl();
3658    
3659     int main() {
3660     cam_open_btl()
3661     ; return 0; }
3662     EOF
3663 cebix 1.9 if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3664 cebix 1.1 rm -rf conftest*
3665     eval "ac_cv_lib_$ac_lib_var=yes"
3666     else
3667     echo "configure: failed program was:" >&5
3668     cat conftest.$ac_ext >&5
3669     rm -rf conftest*
3670     eval "ac_cv_lib_$ac_lib_var=no"
3671     fi
3672     rm -f conftest*
3673     LIBS="$ac_save_LIBS"
3674    
3675     fi
3676     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3677     echo "$ac_t""yes" 1>&6
3678     HAVE_LIBCAM=yes
3679     else
3680     echo "$ac_t""no" 1>&6
3681     HAVE_LIBCAM=no
3682     fi
3683    
3684     if [ "x$HAVE_LIBCAM" = "xno" ]; then
3685     { echo "configure: error: Cannot find libcam for SCSI management." 1>&2; exit 1; }
3686     else
3687     ac_safe=`echo "/sys/cam/cam.h" | sed 'y%./+-%__p_%'`
3688     echo $ac_n "checking for /sys/cam/cam.h""... $ac_c" 1>&6
3689 cebix 1.9 echo "configure:3690: checking for /sys/cam/cam.h" >&5
3690 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3691     echo $ac_n "(cached) $ac_c" 1>&6
3692     else
3693     cat > conftest.$ac_ext <<EOF
3694 cebix 1.9 #line 3695 "configure"
3695 cebix 1.1 #include "confdefs.h"
3696     #include </sys/cam/cam.h>
3697     EOF
3698     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3699 cebix 1.9 { (eval echo configure:3700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3700 cebix 1.1 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3701     if test -z "$ac_err"; then
3702     rm -rf conftest*
3703     eval "ac_cv_header_$ac_safe=yes"
3704     else
3705     echo "$ac_err" >&5
3706     echo "configure: failed program was:" >&5
3707     cat conftest.$ac_ext >&5
3708     rm -rf conftest*
3709     eval "ac_cv_header_$ac_safe=no"
3710     fi
3711     rm -f conftest*
3712     fi
3713     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3714     echo "$ac_t""yes" 1>&6
3715     :
3716     else
3717     echo "$ac_t""no" 1>&6
3718     fi
3719    
3720     if [ "x$ac_cv_header__sys_cam_cam_h" = "xno" ]; then
3721     { echo "configure: error: Cannot find kernel includes for CAM library." 1>&2; exit 1; }
3722     fi
3723 cebix 1.9 SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp audio_oss_esd.cpp"
3724 cebix 1.1 CXXFLAGS="$CXXFLAGS -I/sys"
3725     CFLAGS="$CFLAGS -I/sys"
3726     LIBS="$LIBS -lcam"
3727     DEFINES="$DEFINES -DBSD_COMP -DCAM"
3728     fi
3729     ;;
3730     FreeBSD*)
3731     echo $ac_n "checking for scsi_open in -lscsi""... $ac_c" 1>&6
3732 cebix 1.9 echo "configure:3733: checking for scsi_open in -lscsi" >&5
3733 cebix 1.1 ac_lib_var=`echo scsi'_'scsi_open | sed 'y%./+-%__p_%'`
3734     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3735     echo $ac_n "(cached) $ac_c" 1>&6
3736     else
3737     ac_save_LIBS="$LIBS"
3738     LIBS="-lscsi $LIBS"
3739     cat > conftest.$ac_ext <<EOF
3740 cebix 1.9 #line 3741 "configure"
3741 cebix 1.1 #include "confdefs.h"
3742     /* Override any gcc2 internal prototype to avoid an error. */
3743     /* We use char because int might match the return type of a gcc2
3744     builtin and then its argument prototype would still apply. */
3745     char scsi_open();
3746    
3747     int main() {
3748     scsi_open()
3749     ; return 0; }
3750     EOF
3751 cebix 1.9 if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3752 cebix 1.1 rm -rf conftest*
3753     eval "ac_cv_lib_$ac_lib_var=yes"
3754     else
3755     echo "configure: failed program was:" >&5
3756     cat conftest.$ac_ext >&5
3757     rm -rf conftest*
3758     eval "ac_cv_lib_$ac_lib_var=no"
3759     fi
3760     rm -f conftest*
3761     LIBS="$ac_save_LIBS"
3762    
3763     fi
3764     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3765     echo "$ac_t""yes" 1>&6
3766     HAVE_LIBSCSI=yes
3767     else
3768     echo "$ac_t""no" 1>&6
3769     HAVE_LIBSCSI=no
3770     fi
3771    
3772     if [ "x$HAVE_LIBSCSI" = "xno" ]; then
3773     { echo "configure: error: Cannot find libscsi for SCSI management." 1>&2; exit 1; }
3774     else
3775     ac_safe=`echo "scsi.h sys/scsiio.h" | sed 'y%./+-%__p_%'`
3776     echo $ac_n "checking for scsi.h sys/scsiio.h""... $ac_c" 1>&6
3777 cebix 1.9 echo "configure:3778: checking for scsi.h sys/scsiio.h" >&5
3778 cebix 1.1 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3779     echo $ac_n "(cached) $ac_c" 1>&6
3780     else
3781     cat > conftest.$ac_ext <<EOF
3782 cebix 1.9 #line 3783 "configure"
3783 cebix 1.1 #include "confdefs.h"
3784     #include <scsi.h sys/scsiio.h>
3785     EOF
3786     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3787 cebix 1.9 { (eval echo configure:3788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3788 cebix 1.1 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3789     if test -z "$ac_err"; then
3790     rm -rf conftest*
3791     eval "ac_cv_header_$ac_safe=yes"
3792     else
3793     echo "$ac_err" >&5
3794     echo "configure: failed program was:" >&5
3795     cat conftest.$ac_ext >&5
3796     rm -rf conftest*
3797     eval "ac_cv_header_$ac_safe=no"
3798     fi
3799     rm -f conftest*
3800     fi
3801     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3802     echo "$ac_t""yes" 1>&6
3803     :
3804     else
3805     echo "$ac_t""no" 1>&6
3806     fi
3807    
3808     if [ "x$ac_cv_header_scsi_h" = "xno" ]; then
3809     { echo "configure: error: Cannot find includes for the SCSI library." 1>&2; exit 1; }
3810     fi
3811     SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp ../dummy/audio_dummy.cpp"
3812     LIBS="$LIBS -lscsi"
3813     DEFINES="$DEFINES -DBSD_COMP"
3814     fi
3815     ;;
3816     SunOS*)
3817     SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp Solaris/audio_solaris.cpp"
3818     DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
3819     ;;
3820     IRIX*)
3821     SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp ../dummy/audio_dummy.cpp Irix/unaligned.c"
3822     DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200"
3823     LIBS="$LIBS -lm"
3824     ;;
3825     esac
3826 cebix 1.7 fi
3827 cebix 1.9 SYSSRCS="$SYSSRCS $SEMSRCS $UISRCS"
3828 cebix 1.1
3829     HAVE_I386=no
3830     echo $ac_n "checking for x86 target CPU""... $ac_c" 1>&6
3831 cebix 1.9 echo "configure:3832: checking for x86 target CPU" >&5
3832 cebix 1.1 cat > conftest.$ac_ext <<EOF
3833 cebix 1.9 #line 3834 "configure"
3834 cebix 1.1 #include "confdefs.h"
3835    
3836     #ifdef __i386__
3837     yes
3838     #endif
3839    
3840     EOF
3841     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3842     egrep "yes" >/dev/null 2>&1; then
3843     rm -rf conftest*
3844     echo "$ac_t""yes" 1>&6; HAVE_I386=yes
3845     else
3846     rm -rf conftest*
3847     echo "$ac_t""no" 1>&6
3848     fi
3849     rm -f conftest*
3850    
3851    
3852 cebix 1.8 HAVE_SPARC=no
3853     echo $ac_n "checking for SPARC target CPU""... $ac_c" 1>&6
3854 cebix 1.9 echo "configure:3855: checking for SPARC target CPU" >&5
3855 cebix 1.8 cat > conftest.$ac_ext <<EOF
3856 cebix 1.9 #line 3857 "configure"
3857 cebix 1.8 #include "confdefs.h"
3858    
3859     #ifdef __sparc__
3860     yes
3861     #endif
3862    
3863     EOF
3864     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3865     egrep "yes" >/dev/null 2>&1; then
3866     rm -rf conftest*
3867     echo "$ac_t""yes" 1>&6; HAVE_SPARC=yes
3868     else
3869     rm -rf conftest*
3870     echo "$ac_t""no" 1>&6
3871     fi
3872     rm -f conftest*
3873    
3874    
3875 cebix 1.1 HAVE_GAS=no
3876     echo $ac_n "checking for GAS .p2align feature""... $ac_c" 1>&6
3877 cebix 1.9 echo "configure:3878: checking for GAS .p2align feature" >&5
3878 cebix 1.1 cat >conftest.S << EOF
3879     .text
3880     .p2align 5
3881     EOF
3882     if $CC conftest.S -c -o conftest.o >/dev/null 2>&1 ; then HAVE_GAS=yes; fi
3883     echo "$ac_t""$HAVE_GAS" 1>&6
3884    
3885     HAVE_GCC27=no
3886     echo $ac_n "checking for GCC 2.7 or higher""... $ac_c" 1>&6
3887 cebix 1.9 echo "configure:3888: checking for GCC 2.7 or higher" >&5
3888 cebix 1.1 cat > conftest.$ac_ext <<EOF
3889 cebix 1.9 #line 3890 "configure"
3890 cebix 1.1 #include "confdefs.h"
3891     #if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
3892     yes
3893     #endif
3894    
3895     EOF
3896     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3897     egrep "yes" >/dev/null 2>&1; then
3898     rm -rf conftest*
3899     echo "$ac_t""yes" 1>&6; HAVE_GCC27=yes
3900     else
3901     rm -rf conftest*
3902     echo "$ac_t""no" 1>&6
3903     fi
3904     rm -f conftest*
3905    
3906    
3907     if [ "x$HAVE_GCC27" = "xyes" ]; then
3908     CFLAGS="$CFLAGS -fomit-frame-pointer"
3909     CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
3910     fi
3911    
3912 cebix 1.8 CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
3913 cebix 1.1 if [ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]; then
3914 cebix 1.8 DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
3915 cebix 1.1 if [ "x$HAVE_GAS" = "xyes" ]; then
3916     DEFINES="$DEFINES -DX86_ASSEMBLY"
3917 cebix 1.8 CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
3918 cebix 1.1 fi
3919 cebix 1.8 elif [ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]; then
3920     case "$MACHINE" in
3921     SunOS*)
3922     echo $ac_n "checking SPARC CPU architecture""... $ac_c" 1>&6
3923 cebix 1.9 echo "configure:3924: checking SPARC CPU architecture" >&5
3924 cebix 1.8 SPARC_TYPE=`Solaris/which_sparc`
3925     echo "$ac_t""$SPARC_TYPE" 1>&6
3926     case "$SPARC_TYPE" in
3927     SPARC_V8)
3928     DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY"
3929     CFLAGS="$CFLAGS -Wa,-Av8"
3930     CXXFLAGS="$CXXFLAGS -Wa,-Av8"
3931     ;;
3932     SPARC_V9)
3933     DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY"
3934     CFLAGS="$CFLAGS -Wa,-Av9"
3935     CXXFLAGS="$CXXFLAGS -Wa,-Av9"
3936     ;;
3937     esac
3938     ;;
3939     esac
3940 cebix 1.1 fi
3941 cebix 1.8
3942     CPUINCLUDES="-I../uae_cpu"
3943     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"
3944 cebix 1.1
3945    
3946    
3947    
3948    
3949     trap '' 1 2 15
3950     cat > confcache <<\EOF
3951     # This file is a shell script that caches the results of configure
3952     # tests run on this system so they can be shared between configure
3953     # scripts and configure runs. It is not useful on other systems.
3954     # If it contains results you don't want to keep, you may remove or edit it.
3955     #
3956     # By default, configure uses ./config.cache as the cache file,
3957     # creating it if it does not exist already. You can give configure
3958     # the --cache-file=FILE option to use a different cache file; that is
3959     # what configure does when it calls configure scripts in
3960     # subdirectories, so they share the cache.
3961     # Giving --cache-file=/dev/null disables caching, for debugging configure.
3962     # config.status only pays attention to the cache file if you give it the
3963     # --recheck option to rerun configure.
3964     #
3965     EOF
3966     # The following way of writing the cache mishandles newlines in values,
3967     # but we know of no workaround that is simple, portable, and efficient.
3968     # So, don't put newlines in cache variables' values.
3969     # Ultrix sh set writes to stderr and can't be redirected directly,
3970     # and sets the high bit in the cache file unless we assign to the vars.
3971     (set) 2>&1 |
3972     case `(ac_space=' '; set | grep ac_space) 2>&1` in
3973     *ac_space=\ *)
3974     # `set' does not quote correctly, so add quotes (double-quote substitution
3975     # turns \\\\ into \\, and sed turns \\ into \).
3976     sed -n \
3977     -e "s/'/'\\\\''/g" \
3978     -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3979     ;;
3980     *)
3981     # `set' quotes correctly as required by POSIX, so do not add quotes.
3982     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3983     ;;
3984     esac >> confcache
3985     if cmp -s $cache_file confcache; then
3986     :
3987     else
3988     if test -w $cache_file; then
3989     echo "updating cache $cache_file"
3990     cat confcache > $cache_file
3991     else
3992     echo "not updating unwritable cache $cache_file"
3993     fi
3994     fi
3995     rm -f confcache
3996    
3997     trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3998    
3999     test "x$prefix" = xNONE && prefix=$ac_default_prefix
4000     # Let make expand exec_prefix.
4001     test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4002    
4003     # Any assignment to VPATH causes Sun make to only execute
4004     # the first set of double-colon rules, so remove it if not needed.
4005     # If there is a colon in the path, we need to keep it.
4006     if test "x$srcdir" = x.; then
4007     ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4008     fi
4009    
4010     trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4011    
4012     DEFS=-DHAVE_CONFIG_H
4013    
4014     # Without the "./", some shells look in PATH for config.status.
4015     : ${CONFIG_STATUS=./config.status}
4016    
4017     echo creating $CONFIG_STATUS
4018     rm -f $CONFIG_STATUS
4019     cat > $CONFIG_STATUS <<EOF
4020     #! /bin/sh
4021     # Generated automatically by configure.
4022     # Run this file to recreate the current configuration.
4023     # This directory was configured as follows,
4024     # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4025     #
4026     # $0 $ac_configure_args
4027     #
4028     # Compiler output produced by configure, useful for debugging
4029     # configure, is in ./config.log if it exists.
4030    
4031     ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4032     for ac_option
4033     do
4034     case "\$ac_option" in
4035     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4036     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4037     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4038     -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4039     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4040     exit 0 ;;
4041     -help | --help | --hel | --he | --h)
4042     echo "\$ac_cs_usage"; exit 0 ;;
4043     *) echo "\$ac_cs_usage"; exit 1 ;;
4044     esac
4045     done
4046    
4047     ac_given_srcdir=$srcdir
4048     ac_given_INSTALL="$INSTALL"
4049    
4050     trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4051     EOF
4052     cat >> $CONFIG_STATUS <<EOF
4053    
4054     # Protect against being on the right side of a sed subst in config.status.
4055     sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4056     s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4057     $ac_vpsub
4058     $extrasub
4059     s%@SHELL@%$SHELL%g
4060     s%@CFLAGS@%$CFLAGS%g
4061     s%@CPPFLAGS@%$CPPFLAGS%g
4062     s%@CXXFLAGS@%$CXXFLAGS%g
4063     s%@FFLAGS@%$FFLAGS%g
4064     s%@DEFS@%$DEFS%g
4065     s%@LDFLAGS@%$LDFLAGS%g
4066     s%@LIBS@%$LIBS%g
4067     s%@exec_prefix@%$exec_prefix%g
4068     s%@prefix@%$prefix%g
4069     s%@program_transform_name@%$program_transform_name%g
4070     s%@bindir@%$bindir%g
4071     s%@sbindir@%$sbindir%g
4072     s%@libexecdir@%$libexecdir%g
4073     s%@datadir@%$datadir%g
4074     s%@sysconfdir@%$sysconfdir%g
4075     s%@sharedstatedir@%$sharedstatedir%g
4076     s%@localstatedir@%$localstatedir%g
4077     s%@libdir@%$libdir%g
4078     s%@includedir@%$includedir%g
4079     s%@oldincludedir@%$oldincludedir%g
4080     s%@infodir@%$infodir%g
4081     s%@mandir@%$mandir%g
4082     s%@CC@%$CC%g
4083 cebix 1.3 s%@CPP@%$CPP%g
4084 cebix 1.1 s%@CXX@%$CXX%g
4085     s%@SET_MAKE@%$SET_MAKE%g
4086     s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4087     s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4088     s%@INSTALL_DATA@%$INSTALL_DATA%g
4089     s%@X_CFLAGS@%$X_CFLAGS%g
4090     s%@X_PRE_LIBS@%$X_PRE_LIBS%g
4091     s%@X_LIBS@%$X_LIBS%g
4092     s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4093     s%@GTK_CONFIG@%$GTK_CONFIG%g
4094     s%@GTK_CFLAGS@%$GTK_CFLAGS%g
4095     s%@GTK_LIBS@%$GTK_LIBS%g
4096 cebix 1.9 s%@ESD_CONFIG@%$ESD_CONFIG%g
4097     s%@ESD_CFLAGS@%$ESD_CFLAGS%g
4098     s%@ESD_LIBS@%$ESD_LIBS%g
4099 cebix 1.1 s%@DEFINES@%$DEFINES%g
4100     s%@SYSSRCS@%$SYSSRCS%g
4101     s%@CPUINCLUDES@%$CPUINCLUDES%g
4102     s%@CPUSRCS@%$CPUSRCS%g
4103    
4104     CEOF
4105     EOF
4106    
4107     cat >> $CONFIG_STATUS <<\EOF
4108    
4109     # Split the substitutions into bite-sized pieces for seds with
4110     # small command number limits, like on Digital OSF/1 and HP-UX.
4111     ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4112     ac_file=1 # Number of current file.
4113     ac_beg=1 # First line for current file.
4114     ac_end=$ac_max_sed_cmds # Line after last line for current file.
4115     ac_more_lines=:
4116     ac_sed_cmds=""
4117     while $ac_more_lines; do
4118     if test $ac_beg -gt 1; then
4119     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4120     else
4121     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4122     fi
4123     if test ! -s conftest.s$ac_file; then
4124     ac_more_lines=false
4125     rm -f conftest.s$ac_file
4126     else
4127     if test -z "$ac_sed_cmds"; then
4128     ac_sed_cmds="sed -f conftest.s$ac_file"
4129     else
4130     ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4131     fi
4132     ac_file=`expr $ac_file + 1`
4133     ac_beg=$ac_end
4134     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4135     fi
4136     done
4137     if test -z "$ac_sed_cmds"; then
4138     ac_sed_cmds=cat
4139     fi
4140     EOF
4141    
4142     cat >> $CONFIG_STATUS <<EOF
4143    
4144     CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
4145     EOF
4146     cat >> $CONFIG_STATUS <<\EOF
4147     for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4148     # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4149     case "$ac_file" in
4150     *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4151     ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4152     *) ac_file_in="${ac_file}.in" ;;
4153     esac
4154    
4155     # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4156    
4157     # Remove last slash and all that follows it. Not all systems have dirname.
4158     ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4159     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4160     # The file is in a subdirectory.
4161     test ! -d "$ac_dir" && mkdir "$ac_dir"
4162     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4163     # A "../" for each directory in $ac_dir_suffix.
4164     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4165     else
4166     ac_dir_suffix= ac_dots=
4167     fi
4168    
4169     case "$ac_given_srcdir" in
4170     .) srcdir=.
4171     if test -z "$ac_dots"; then top_srcdir=.
4172     else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4173     /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4174     *) # Relative path.
4175     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4176     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4177     esac
4178    
4179     case "$ac_given_INSTALL" in
4180     [/$]*) INSTALL="$ac_given_INSTALL" ;;
4181     *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4182     esac
4183    
4184     echo creating "$ac_file"
4185     rm -f "$ac_file"
4186     configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4187     case "$ac_file" in
4188     *Makefile*) ac_comsub="1i\\
4189     # $configure_input" ;;
4190     *) ac_comsub= ;;
4191     esac
4192    
4193     ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4194     sed -e "$ac_comsub
4195     s%@configure_input@%$configure_input%g
4196     s%@srcdir@%$srcdir%g
4197     s%@top_srcdir@%$top_srcdir%g
4198     s%@INSTALL@%$INSTALL%g
4199     " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4200     fi; done
4201     rm -f conftest.s*
4202    
4203     # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4204     # NAME is the cpp macro being defined and VALUE is the value it is being given.
4205     #
4206     # ac_d sets the value in "#define NAME VALUE" lines.
4207     ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4208     ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4209     ac_dC='\3'
4210     ac_dD='%g'
4211     # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4212     ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4213     ac_uB='\([ ]\)%\1#\2define\3'
4214     ac_uC=' '
4215     ac_uD='\4%g'
4216     # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4217     ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4218     ac_eB='$%\1#\2define\3'
4219     ac_eC=' '
4220     ac_eD='%g'
4221    
4222     if test "${CONFIG_HEADERS+set}" != set; then
4223     EOF
4224     cat >> $CONFIG_STATUS <<EOF
4225     CONFIG_HEADERS="config.h"
4226     EOF
4227     cat >> $CONFIG_STATUS <<\EOF
4228     fi
4229     for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4230     # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4231     case "$ac_file" in
4232     *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4233     ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4234     *) ac_file_in="${ac_file}.in" ;;
4235     esac
4236    
4237     echo creating $ac_file
4238    
4239     rm -f conftest.frag conftest.in conftest.out
4240     ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4241     cat $ac_file_inputs > conftest.in
4242    
4243     EOF
4244    
4245     # Transform confdefs.h into a sed script conftest.vals that substitutes
4246     # the proper values into config.h.in to produce config.h. And first:
4247     # Protect against being on the right side of a sed subst in config.status.
4248     # Protect against being in an unquoted here document in config.status.
4249     rm -f conftest.vals
4250     cat > conftest.hdr <<\EOF
4251     s/[\\&%]/\\&/g
4252     s%[\\$`]%\\&%g
4253     s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4254     s%ac_d%ac_u%gp
4255     s%ac_u%ac_e%gp
4256     EOF
4257     sed -n -f conftest.hdr confdefs.h > conftest.vals
4258     rm -f conftest.hdr
4259    
4260     # This sed command replaces #undef with comments. This is necessary, for
4261     # example, in the case of _POSIX_SOURCE, which is predefined and required
4262     # on some systems where configure will not decide to define it.
4263     cat >> conftest.vals <<\EOF
4264     s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4265     EOF
4266    
4267     # Break up conftest.vals because some shells have a limit on
4268     # the size of here documents, and old seds have small limits too.
4269    
4270     rm -f conftest.tail
4271     while :
4272     do
4273     ac_lines=`grep -c . conftest.vals`
4274     # grep -c gives empty output for an empty file on some AIX systems.
4275     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4276     # Write a limited-size here document to conftest.frag.
4277     echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4278     sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4279     echo 'CEOF
4280     sed -f conftest.frag conftest.in > conftest.out
4281     rm -f conftest.in
4282     mv conftest.out conftest.in
4283     ' >> $CONFIG_STATUS
4284     sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4285     rm -f conftest.vals
4286     mv conftest.tail conftest.vals
4287     done
4288     rm -f conftest.vals
4289    
4290     cat >> $CONFIG_STATUS <<\EOF
4291     rm -f conftest.frag conftest.h
4292     echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4293     cat conftest.in >> conftest.h
4294     rm -f conftest.in
4295     if cmp -s $ac_file conftest.h 2>/dev/null; then
4296     echo "$ac_file is unchanged"
4297     rm -f conftest.h
4298     else
4299     # Remove last slash and all that follows it. Not all systems have dirname.
4300     ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4301     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4302     # The file is in a subdirectory.
4303     test ! -d "$ac_dir" && mkdir "$ac_dir"
4304     fi
4305     rm -f $ac_file
4306     mv conftest.h $ac_file
4307     fi
4308     fi; done
4309    
4310     EOF
4311     cat >> $CONFIG_STATUS <<EOF
4312    
4313     EOF
4314     cat >> $CONFIG_STATUS <<\EOF
4315    
4316     exit 0
4317     EOF
4318     chmod +x $CONFIG_STATUS
4319     rm -fr confdefs* $ac_clean_files
4320     test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4321    
4322     echo "Configuration done. Now type \"make\"."