ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/configure
Revision: 1.21
Committed: 2000-08-14T14:24:51Z (24 years, 1 month ago) by cebix
Branch: MAIN
CVS Tags: HEAD
Changes since 1.20: +0 -0 lines
State: FILE REMOVED
Error occurred while calculating annotation data.
Log Message:
- removed non-source files "config.h.in" and "configure" from CVS, added
  "autogen.sh" script to regenerate them

File Contents

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