|
|
1.1 root 1: #! /bin/sh
2:
3: # Guess values for system-dependent variables and create Makefiles.
4: # Generated automatically using autoconf version 2.10
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: --with-x use the X Window System"
16:
17: # Initialize some variables set by options.
18: # The variables have the same names as the options, with
19: # dashes changed to underlines.
20: build=NONE
21: cache_file=./config.cache
22: exec_prefix=NONE
23: host=NONE
24: no_create=
25: nonopt=NONE
26: no_recursion=
27: prefix=NONE
28: program_prefix=NONE
29: program_suffix=NONE
30: program_transform_name=s,x,x,
31: silent=
32: site=
33: srcdir=
34: target=NONE
35: verbose=
36: x_includes=NONE
37: x_libraries=NONE
38: bindir='${exec_prefix}/bin'
39: sbindir='${exec_prefix}/sbin'
40: libexecdir='${exec_prefix}/libexec'
41: datadir='${prefix}/share'
42: sysconfdir='${prefix}/etc'
43: sharedstatedir='${prefix}/com'
44: localstatedir='${prefix}/var'
45: libdir='${exec_prefix}/lib'
46: includedir='${prefix}/include'
47: oldincludedir='/usr/include'
48: infodir='${prefix}/info'
49: mandir='${prefix}/man'
50:
51: # Initialize some other variables.
52: subdirs=
53: MFLAGS= MAKEFLAGS=
54:
55: ac_prev=
56: for ac_option
57: do
58:
59: # If the previous option needs an argument, assign it.
60: if test -n "$ac_prev"; then
61: eval "$ac_prev=\$ac_option"
62: ac_prev=
63: continue
64: fi
65:
66: case "$ac_option" in
67: -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
68: *) ac_optarg= ;;
69: esac
70:
71: # Accept the important Cygnus configure options, so we can diagnose typos.
72:
73: case "$ac_option" in
74:
75: -bindir | --bindir | --bindi | --bind | --bin | --bi)
76: ac_prev=bindir ;;
77: -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
78: bindir="$ac_optarg" ;;
79:
80: -build | --build | --buil | --bui | --bu)
81: ac_prev=build ;;
82: -build=* | --build=* | --buil=* | --bui=* | --bu=*)
83: build="$ac_optarg" ;;
84:
85: -cache-file | --cache-file | --cache-fil | --cache-fi \
86: | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
87: ac_prev=cache_file ;;
88: -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
89: | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
90: cache_file="$ac_optarg" ;;
91:
92: -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
93: ac_prev=datadir ;;
94: -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
95: | --da=*)
96: datadir="$ac_optarg" ;;
97:
98: -disable-* | --disable-*)
99: ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
100: # Reject names that are not valid shell variable names.
101: if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
102: { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
103: fi
104: ac_feature=`echo $ac_feature| sed 's/-/_/g'`
105: eval "enable_${ac_feature}=no" ;;
106:
107: -enable-* | --enable-*)
108: ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
109: # Reject names that are not valid shell variable names.
110: if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
111: { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
112: fi
113: ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114: case "$ac_option" in
115: *=*) ;;
116: *) ac_optarg=yes ;;
117: esac
118: eval "enable_${ac_feature}='$ac_optarg'" ;;
119:
120: -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
121: | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
122: | --exec | --exe | --ex)
123: ac_prev=exec_prefix ;;
124: -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
125: | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
126: | --exec=* | --exe=* | --ex=*)
127: exec_prefix="$ac_optarg" ;;
128:
129: -gas | --gas | --ga | --g)
130: # Obsolete; use --with-gas.
131: with_gas=yes ;;
132:
133: -help | --help | --hel | --he)
134: # Omit some internal or obsolete options to make the list less imposing.
135: # This message is too long to be a string in the A/UX 3.1 sh.
136: cat << EOF
137: Usage: configure [options] [host]
138: Options: [defaults in brackets after descriptions]
139: Configuration:
140: --cache-file=FILE cache test results in FILE
141: --help print this message
142: --no-create do not create output files
143: --quiet, --silent do not print \`checking...' messages
144: --version print the version of autoconf that created configure
145: Directory and file names:
146: --prefix=PREFIX install architecture-independent files in PREFIX
147: [$ac_default_prefix]
148: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
149: [same as prefix]
150: --bindir=DIR user executables in DIR [EPREFIX/bin]
151: --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
152: --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
153: --datadir=DIR read-only architecture-independent data in DIR
154: [PREFIX/share]
155: --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
156: --sharedstatedir=DIR modifiable architecture-independent data in DIR
157: [PREFIX/com]
158: --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
159: --libdir=DIR object code libraries in DIR [EPREFIX/lib]
160: --includedir=DIR C header files in DIR [PREFIX/include]
161: --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
162: --infodir=DIR info documentation in DIR [PREFIX/info]
163: --mandir=DIR man documentation in DIR [PREFIX/man]
164: --srcdir=DIR find the sources in DIR [configure dir or ..]
165: --program-prefix=PREFIX prepend PREFIX to installed program names
166: --program-suffix=SUFFIX append SUFFIX to installed program names
167: --program-transform-name=PROGRAM
168: run sed PROGRAM on installed program names
169: EOF
170: cat << EOF
171: Host type:
172: --build=BUILD configure for building on BUILD [BUILD=HOST]
173: --host=HOST configure for HOST [guessed]
174: --target=TARGET configure for TARGET [TARGET=HOST]
175: Features and packages:
176: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
177: --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
178: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
179: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
180: --x-includes=DIR X include files are in DIR
181: --x-libraries=DIR X library files are in DIR
182: EOF
183: if test -n "$ac_help"; then
184: echo "--enable and --with options recognized:$ac_help"
185: fi
186: exit 0 ;;
187:
188: -host | --host | --hos | --ho)
189: ac_prev=host ;;
190: -host=* | --host=* | --hos=* | --ho=*)
191: host="$ac_optarg" ;;
192:
193: -includedir | --includedir | --includedi | --included | --include \
194: | --includ | --inclu | --incl | --inc)
195: ac_prev=includedir ;;
196: -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
197: | --includ=* | --inclu=* | --incl=* | --inc=*)
198: includedir="$ac_optarg" ;;
199:
200: -infodir | --infodir | --infodi | --infod | --info | --inf)
201: ac_prev=infodir ;;
202: -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
203: infodir="$ac_optarg" ;;
204:
205: -libdir | --libdir | --libdi | --libd)
206: ac_prev=libdir ;;
207: -libdir=* | --libdir=* | --libdi=* | --libd=*)
208: libdir="$ac_optarg" ;;
209:
210: -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
211: | --libexe | --libex | --libe)
212: ac_prev=libexecdir ;;
213: -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
214: | --libexe=* | --libex=* | --libe=*)
215: libexecdir="$ac_optarg" ;;
216:
217: -localstatedir | --localstatedir | --localstatedi | --localstated \
218: | --localstate | --localstat | --localsta | --localst \
219: | --locals | --local | --loca | --loc | --lo)
220: ac_prev=localstatedir ;;
221: -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
222: | --localstate=* | --localstat=* | --localsta=* | --localst=* \
223: | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
224: localstatedir="$ac_optarg" ;;
225:
226: -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
227: ac_prev=mandir ;;
228: -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
229: mandir="$ac_optarg" ;;
230:
231: -nfp | --nfp | --nf)
232: # Obsolete; use --without-fp.
233: with_fp=no ;;
234:
235: -no-create | --no-create | --no-creat | --no-crea | --no-cre \
236: | --no-cr | --no-c)
237: no_create=yes ;;
238:
239: -no-recursion | --no-recursion | --no-recursio | --no-recursi \
240: | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
241: no_recursion=yes ;;
242:
243: -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
244: | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
245: | --oldin | --oldi | --old | --ol | --o)
246: ac_prev=oldincludedir ;;
247: -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
248: | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
249: | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
250: oldincludedir="$ac_optarg" ;;
251:
252: -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
253: ac_prev=prefix ;;
254: -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
255: prefix="$ac_optarg" ;;
256:
257: -program-prefix | --program-prefix | --program-prefi | --program-pref \
258: | --program-pre | --program-pr | --program-p)
259: ac_prev=program_prefix ;;
260: -program-prefix=* | --program-prefix=* | --program-prefi=* \
261: | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
262: program_prefix="$ac_optarg" ;;
263:
264: -program-suffix | --program-suffix | --program-suffi | --program-suff \
265: | --program-suf | --program-su | --program-s)
266: ac_prev=program_suffix ;;
267: -program-suffix=* | --program-suffix=* | --program-suffi=* \
268: | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
269: program_suffix="$ac_optarg" ;;
270:
271: -program-transform-name | --program-transform-name \
272: | --program-transform-nam | --program-transform-na \
273: | --program-transform-n | --program-transform- \
274: | --program-transform | --program-transfor \
275: | --program-transfo | --program-transf \
276: | --program-trans | --program-tran \
277: | --progr-tra | --program-tr | --program-t)
278: ac_prev=program_transform_name ;;
279: -program-transform-name=* | --program-transform-name=* \
280: | --program-transform-nam=* | --program-transform-na=* \
281: | --program-transform-n=* | --program-transform-=* \
282: | --program-transform=* | --program-transfor=* \
283: | --program-transfo=* | --program-transf=* \
284: | --program-trans=* | --program-tran=* \
285: | --progr-tra=* | --program-tr=* | --program-t=*)
286: program_transform_name="$ac_optarg" ;;
287:
288: -q | -quiet | --quiet | --quie | --qui | --qu | --q \
289: | -silent | --silent | --silen | --sile | --sil)
290: silent=yes ;;
291:
292: -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
293: ac_prev=sbindir ;;
294: -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
295: | --sbi=* | --sb=*)
296: sbindir="$ac_optarg" ;;
297:
298: -sharedstatedir | --sharedstatedir | --sharedstatedi \
299: | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
300: | --sharedst | --shareds | --shared | --share | --shar \
301: | --sha | --sh)
302: ac_prev=sharedstatedir ;;
303: -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
304: | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
305: | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
306: | --sha=* | --sh=*)
307: sharedstatedir="$ac_optarg" ;;
308:
309: -site | --site | --sit)
310: ac_prev=site ;;
311: -site=* | --site=* | --sit=*)
312: site="$ac_optarg" ;;
313:
314: -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
315: ac_prev=srcdir ;;
316: -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
317: srcdir="$ac_optarg" ;;
318:
319: -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
320: | --syscon | --sysco | --sysc | --sys | --sy)
321: ac_prev=sysconfdir ;;
322: -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
323: | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
324: sysconfdir="$ac_optarg" ;;
325:
326: -target | --target | --targe | --targ | --tar | --ta | --t)
327: ac_prev=target ;;
328: -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
329: target="$ac_optarg" ;;
330:
331: -v | -verbose | --verbose | --verbos | --verbo | --verb)
332: verbose=yes ;;
333:
334: -version | --version | --versio | --versi | --vers)
335: echo "configure generated by autoconf version 2.10"
336: exit 0 ;;
337:
338: -with-* | --with-*)
339: ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
340: # Reject names that are not valid shell variable names.
341: if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
342: { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
343: fi
344: ac_package=`echo $ac_package| sed 's/-/_/g'`
345: case "$ac_option" in
346: *=*) ;;
347: *) ac_optarg=yes ;;
348: esac
349: eval "with_${ac_package}='$ac_optarg'" ;;
350:
351: -without-* | --without-*)
352: ac_package=`echo $ac_option|sed -e 's/-*without-//'`
353: # Reject names that are not valid shell variable names.
354: if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
355: { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356: fi
357: ac_package=`echo $ac_package| sed 's/-/_/g'`
358: eval "with_${ac_package}=no" ;;
359:
360: --x)
361: # Obsolete; use --with-x.
362: with_x=yes ;;
363:
364: -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
365: | --x-incl | --x-inc | --x-in | --x-i)
366: ac_prev=x_includes ;;
367: -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
368: | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
369: x_includes="$ac_optarg" ;;
370:
371: -x-libraries | --x-libraries | --x-librarie | --x-librari \
372: | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
373: ac_prev=x_libraries ;;
374: -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
375: | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
376: x_libraries="$ac_optarg" ;;
377:
378: -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
379: ;;
380:
381: *)
382: if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
383: echo "configure: warning: $ac_option: invalid host type" 1>&2
384: fi
385: if test "x$nonopt" != xNONE; then
386: { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
387: fi
388: nonopt="$ac_option"
389: ;;
390:
391: esac
392: done
393:
394: if test -n "$ac_prev"; then
395: { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
396: fi
397:
398: trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
399:
400: # File descriptor usage:
401: # 0 standard input
402: # 1 file creation
403: # 2 errors and warnings
404: # 3 some systems may open it to /dev/tty
405: # 4 used on the Kubota Titan
406: # 6 checking for... messages and results
407: # 5 compiler messages saved in config.log
408: if test "$silent" = yes; then
409: exec 6>/dev/null
410: else
411: exec 6>&1
412: fi
413: exec 5>./config.log
414:
415: echo "\
416: This file contains any messages produced by compilers while
417: running configure, to aid debugging if configure makes a mistake.
418: " 1>&5
419:
420: # Strip out --no-create and --no-recursion so they do not pile up.
421: # Also quote any args containing shell metacharacters.
422: ac_configure_args=
423: for ac_arg
424: do
425: case "$ac_arg" in
426: -no-create | --no-create | --no-creat | --no-crea | --no-cre \
427: | --no-cr | --no-c) ;;
428: -no-recursion | --no-recursion | --no-recursio | --no-recursi \
429: | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
430: *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
431: ac_configure_args="$ac_configure_args '$ac_arg'" ;;
432: *) ac_configure_args="$ac_configure_args $ac_arg" ;;
433: esac
434: done
435:
436: # NLS nuisances.
437: # Only set LANG and LC_ALL to C if already set.
438: # These must not be set unconditionally because not all systems understand
439: # e.g. LANG=C (notably SCO).
440: if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
441: if test "${LANG+set}" = set; then LANG=C; export LANG; fi
442:
443: # confdefs.h avoids OS command line length limits that DEFS can exceed.
444: rm -rf conftest* confdefs.h
445: # AIX cpp loses on an empty file, so make sure it contains at least a newline.
446: echo > confdefs.h
447:
448: # A filename unique to this package, relative to the directory that
449: # configure is in, which we can look for to find out if srcdir is correct.
450: ac_unique_file=amiga/transdisk.c
451:
452: # Find the source files, if location was not specified.
453: if test -z "$srcdir"; then
454: ac_srcdir_defaulted=yes
455: # Try the directory containing this script, then its parent.
456: ac_prog=$0
457: ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
458: test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
459: srcdir=$ac_confdir
460: if test ! -r $srcdir/$ac_unique_file; then
461: srcdir=..
462: fi
463: else
464: ac_srcdir_defaulted=no
465: fi
466: if test ! -r $srcdir/$ac_unique_file; then
467: if test "$ac_srcdir_defaulted" = yes; then
468: { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
469: else
470: { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
471: fi
472: fi
473: srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
474:
475: # Prefer explicitly selected file to automatically selected ones.
476: if test -z "$CONFIG_SITE"; then
477: if test "x$prefix" != xNONE; then
478: CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
479: else
480: CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
481: fi
482: fi
483: for ac_site_file in $CONFIG_SITE; do
484: if test -r "$ac_site_file"; then
485: echo "loading site script $ac_site_file"
486: . "$ac_site_file"
487: fi
488: done
489:
490: if test -r "$cache_file"; then
491: echo "loading cache $cache_file"
492: . $cache_file
493: else
494: echo "creating cache $cache_file"
495: > $cache_file
496: fi
497:
498: ac_ext=c
499: # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
500: ac_cpp='$CPP $CPPFLAGS'
501: ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
502: ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
503:
504: if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
505: # Stardent Vistra SVR4 grep lacks -e, says [email protected].
506: if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
507: ac_n= ac_c='
508: ' ac_t=' '
509: else
510: ac_n=-n ac_c= ac_t=
511: fi
512: else
513: ac_n= ac_c='\c' ac_t=
514: fi
515:
516:
517:
518: # Extract the first word of "gcc", so it can be a program name with args.
519: set dummy gcc; ac_word=$2
520: echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
521: if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
522: echo $ac_n "(cached) $ac_c" 1>&6
523: else
524: if test -n "$CC"; then
525: ac_cv_prog_CC="$CC" # Let the user override the test.
526: else
527: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
528: for ac_dir in $PATH; do
529: test -z "$ac_dir" && ac_dir=.
530: if test -f $ac_dir/$ac_word; then
531: ac_cv_prog_CC="gcc"
532: break
533: fi
534: done
535: IFS="$ac_save_ifs"
536: fi
537: fi
538: CC="$ac_cv_prog_CC"
539: if test -n "$CC"; then
540: echo "$ac_t""$CC" 1>&6
541: else
542: echo "$ac_t""no" 1>&6
543: fi
544:
545: if test -z "$CC"; then
546: # Extract the first word of "cc", so it can be a program name with args.
547: set dummy cc; ac_word=$2
548: echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
549: if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
550: echo $ac_n "(cached) $ac_c" 1>&6
551: else
552: if test -n "$CC"; then
553: ac_cv_prog_CC="$CC" # Let the user override the test.
554: else
555: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
556: ac_prog_rejected=no
557: for ac_dir in $PATH; do
558: test -z "$ac_dir" && ac_dir=.
559: if test -f $ac_dir/$ac_word; then
560: if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
561: ac_prog_rejected=yes
562: continue
563: fi
564: ac_cv_prog_CC="cc"
565: break
566: fi
567: done
568: IFS="$ac_save_ifs"
569: if test $ac_prog_rejected = yes; then
570: # We found a bogon in the path, so make sure we never use it.
571: set dummy $ac_cv_prog_CC
572: shift
573: if test $# -gt 0; then
574: # We chose a different compiler from the bogus one.
575: # However, it has the same basename, so the bogon will be chosen
576: # first if we set CC to just the basename; use the full file name.
577: shift
578: set dummy "$ac_dir/$ac_word" "$@"
579: shift
580: ac_cv_prog_CC="$@"
581: fi
582: fi
583: fi
584: fi
585: CC="$ac_cv_prog_CC"
586: if test -n "$CC"; then
587: echo "$ac_t""$CC" 1>&6
588: else
589: echo "$ac_t""no" 1>&6
590: fi
591:
592: test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
593: fi
594:
595: echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
596: if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
597: echo $ac_n "(cached) $ac_c" 1>&6
598: else
599: cat > conftest.c <<EOF
600: #ifdef __GNUC__
601: yes;
602: #endif
603: EOF
604: if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
605: ac_cv_prog_gcc=yes
606: else
607: ac_cv_prog_gcc=no
608: fi
609: fi
610:
611: echo "$ac_t""$ac_cv_prog_gcc" 1>&6
612: if test $ac_cv_prog_gcc = yes; then
613: GCC=yes
614: if test "${CFLAGS+set}" != set; then
615: echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
616: if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
617: echo $ac_n "(cached) $ac_c" 1>&6
618: else
619: echo 'void f(){}' > conftest.c
620: if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
621: ac_cv_prog_gcc_g=yes
622: else
623: ac_cv_prog_gcc_g=no
624: fi
625: rm -f conftest*
626:
627: fi
628:
629: echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
630: if test $ac_cv_prog_gcc_g = yes; then
631: CFLAGS="-g -O"
632: else
633: CFLAGS="-O"
634: fi
635: fi
636: else
637: GCC=
638: test "${CFLAGS+set}" = set || CFLAGS="-g"
639: fi
640:
641:
642: echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
643: # On Suns, sometimes $CPP names a directory.
644: if test -n "$CPP" && test -d "$CPP"; then
645: CPP=
646: fi
647: if test -z "$CPP"; then
648: if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
649: echo $ac_n "(cached) $ac_c" 1>&6
650: else
651: # This must be in double quotes, not single quotes, because CPP may get
652: # substituted into the Makefile and "${CC-cc}" will confuse make.
653: CPP="${CC-cc} -E"
654: # On the NeXT, cc -E runs the code through the compiler's parser,
655: # not just through cpp.
656: cat > conftest.$ac_ext <<EOF
657: #line 658 "configure"
658: #include "confdefs.h"
659: #include <assert.h>
660: Syntax Error
661: EOF
662: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
663: { (eval echo configure:664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
664: ac_err=`grep -v '^ *+' conftest.out`
665: if test -z "$ac_err"; then
666: :
667: else
668: echo "$ac_err" >&5
669: rm -rf conftest*
670: CPP="${CC-cc} -E -traditional-cpp"
671: cat > conftest.$ac_ext <<EOF
672: #line 673 "configure"
673: #include "confdefs.h"
674: #include <assert.h>
675: Syntax Error
676: EOF
677: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
678: { (eval echo configure:679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
679: ac_err=`grep -v '^ *+' conftest.out`
680: if test -z "$ac_err"; then
681: :
682: else
683: echo "$ac_err" >&5
684: rm -rf conftest*
685: CPP=/lib/cpp
686: fi
687: rm -f conftest*
688: fi
689: rm -f conftest*
690: ac_cv_prog_CPP="$CPP"
691: fi
692: CPP="$ac_cv_prog_CPP"
693: else
694: ac_cv_prog_CPP="$CPP"
695: fi
696: echo "$ac_t""$CPP" 1>&6
697:
698: echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
699: set dummy ${MAKE-make}; ac_make=$2
700: if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
701: echo $ac_n "(cached) $ac_c" 1>&6
702: else
703: cat > conftestmake <<\EOF
704: all:
705: @echo 'ac_maketemp="${MAKE}"'
706: EOF
707: # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
708: eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
709: if test -n "$ac_maketemp"; then
710: eval ac_cv_prog_make_${ac_make}_set=yes
711: else
712: eval ac_cv_prog_make_${ac_make}_set=no
713: fi
714: rm -f conftestmake
715: fi
716: if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
717: echo "$ac_t""yes" 1>&6
718: SET_MAKE=
719: else
720: echo "$ac_t""no" 1>&6
721: SET_MAKE="MAKE=${MAKE-make}"
722: fi
723:
724:
725: echo $ac_n "checking for AIX""... $ac_c" 1>&6
726: cat > conftest.$ac_ext <<EOF
727: #line 728 "configure"
728: #include "confdefs.h"
729: #ifdef _AIX
730: yes
731: #endif
732:
733: EOF
734: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
735: egrep "yes" >/dev/null 2>&1; then
736: rm -rf conftest*
737: echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
738: #define _ALL_SOURCE 1
739: EOF
740:
741: else
742: rm -rf conftest*
743: echo "$ac_t""no" 1>&6
744: fi
745: rm -f conftest*
746:
747:
748: echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
749: if test -d /etc/conf/kconfig.d &&
750: grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
751: then
752: echo "$ac_t""yes" 1>&6
753: ISC=yes # If later tests want to check for ISC.
754: cat >> confdefs.h <<\EOF
755: #define _POSIX_SOURCE 1
756: EOF
757:
758: if test "$GCC" = yes; then
759: CC="$CC -posix"
760: else
761: CC="$CC -Xp"
762: fi
763: else
764: echo "$ac_t""no" 1>&6
765: ISC=
766: fi
767:
768:
769: HAVE_BEBOX=n
770: echo $ac_n "checking for -lMedia_s""... $ac_c" 1>&6
771: ac_lib_var=`echo Media_s'_'main | tr './+\055' '__p_'`
772: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
773: echo $ac_n "(cached) $ac_c" 1>&6
774: else
775: ac_save_LIBS="$LIBS"
776: LIBS="-lMedia_s $LIBS"
777: cat > conftest.$ac_ext <<EOF
778: #line 779 "configure"
779: #include "confdefs.h"
780:
781: int main() { return 0; }
782: int t() {
783: main()
784: ; return 0; }
785: EOF
786: if { (eval echo configure:787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
787: rm -rf conftest*
788: eval "ac_cv_lib_$ac_lib_var=yes"
789: else
790: rm -rf conftest*
791: eval "ac_cv_lib_$ac_lib_var=no"
792: fi
793: rm -f conftest*
794: LIBS="$ac_save_LIBS"
795:
796: fi
797: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
798: echo "$ac_t""yes" 1>&6
799: HAVE_MEDIA_LIB=y
800: else
801: echo "$ac_t""no" 1>&6
802: HAVE_MEDIA_LIB=n
803: fi
804:
805: echo $ac_n "checking for -lNeXT_s""... $ac_c" 1>&6
806: ac_lib_var=`echo NeXT_s'_'main | tr './+\055' '__p_'`
807: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
808: echo $ac_n "(cached) $ac_c" 1>&6
809: else
810: ac_save_LIBS="$LIBS"
811: LIBS="-lNeXT_s $LIBS"
812: cat > conftest.$ac_ext <<EOF
813: #line 814 "configure"
814: #include "confdefs.h"
815:
816: int main() { return 0; }
817: int t() {
818: main()
819: ; return 0; }
820: EOF
821: if { (eval echo configure:822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
822: rm -rf conftest*
823: eval "ac_cv_lib_$ac_lib_var=yes"
824: else
825: rm -rf conftest*
826: eval "ac_cv_lib_$ac_lib_var=no"
827: fi
828: rm -f conftest*
829: LIBS="$ac_save_LIBS"
830:
831: fi
832: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
833: echo "$ac_t""yes" 1>&6
834: HAVE_NEXT_LIB=y
835: else
836: echo "$ac_t""no" 1>&6
837: HAVE_NEXT_LIB=n
838: fi
839:
840: echo $ac_n "checking for -lvga""... $ac_c" 1>&6
841: ac_lib_var=`echo vga'_'vga_setmode | tr './+\055' '__p_'`
842: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
843: echo $ac_n "(cached) $ac_c" 1>&6
844: else
845: ac_save_LIBS="$LIBS"
846: LIBS="-lvga $LIBS"
847: cat > conftest.$ac_ext <<EOF
848: #line 849 "configure"
849: #include "confdefs.h"
850: /* Override any gcc2 internal prototype to avoid an error. */
851: /* We use char because int might match the return type of a gcc2
852: builtin and then its argument prototype would still apply. */
853: char vga_setmode();
854:
855: int main() { return 0; }
856: int t() {
857: vga_setmode()
858: ; return 0; }
859: EOF
860: if { (eval echo configure:861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
861: rm -rf conftest*
862: eval "ac_cv_lib_$ac_lib_var=yes"
863: else
864: rm -rf conftest*
865: eval "ac_cv_lib_$ac_lib_var=no"
866: fi
867: rm -f conftest*
868: LIBS="$ac_save_LIBS"
869:
870: fi
871: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
872: echo "$ac_t""yes" 1>&6
873: HAVE_SVGA_LIB=y
874: else
875: echo "$ac_t""no" 1>&6
876: HAVE_SVGA_LIB=n
877: fi
878:
879: echo $ac_n "checking for -lAF""... $ac_c" 1>&6
880: ac_lib_var=`echo AF'_'AFOpenAudioConn | tr './+\055' '__p_'`
881: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
882: echo $ac_n "(cached) $ac_c" 1>&6
883: else
884: ac_save_LIBS="$LIBS"
885: LIBS="-lAF $LIBS"
886: cat > conftest.$ac_ext <<EOF
887: #line 888 "configure"
888: #include "confdefs.h"
889: /* Override any gcc2 internal prototype to avoid an error. */
890: /* We use char because int might match the return type of a gcc2
891: builtin and then its argument prototype would still apply. */
892: char AFOpenAudioConn();
893:
894: int main() { return 0; }
895: int t() {
896: AFOpenAudioConn()
897: ; return 0; }
898: EOF
899: if { (eval echo configure:900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
900: rm -rf conftest*
901: eval "ac_cv_lib_$ac_lib_var=yes"
902: else
903: rm -rf conftest*
904: eval "ac_cv_lib_$ac_lib_var=no"
905: fi
906: rm -f conftest*
907: LIBS="$ac_save_LIBS"
908:
909: fi
910: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
911: echo "$ac_t""yes" 1>&6
912: HAVE_AF_LIB=y
913: else
914: echo "$ac_t""no" 1>&6
915: HAVE_AF_LIB=n
916: fi
917:
918:
919: # If we find X, set shell vars x_includes and x_libraries to the
920: # paths, otherwise set no_x=yes.
921: # Uses ac_ vars as temps to allow command line to override cache and checks.
922: # --without-x overrides everything else, but does not touch the cache.
923: echo $ac_n "checking for X""... $ac_c" 1>&6
924:
925: # Check whether --with-x or --without-x was given.
926: if test "${with_x+set}" = set; then
927: withval="$with_x"
928: :
929: fi
930:
931: # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
932: if test "x$with_x" = xno; then
933: # The user explicitly disabled X.
934: have_x=disabled
935: else
936: if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
937: # Both variables are already set.
938: have_x=yes
939: else
940: if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
941: echo $ac_n "(cached) $ac_c" 1>&6
942: else
943: # One or both of the vars are not set, and there is no cached value.
944: ac_x_includes=NO ac_x_libraries=NO
945: rm -fr conftestdir
946: if mkdir conftestdir; then
947: cd conftestdir
948: # Make sure to not put "make" in the Imakefile rules, since we grep it out.
949: cat > Imakefile <<'EOF'
950: acfindx:
951: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
952: EOF
953: if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
954: # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
955: eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
956: # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
957: for ac_extension in a so sl; do
958: if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
959: test -f $ac_im_libdir/libX11.$ac_extension; then
960: ac_im_usrlibdir=$ac_im_libdir; break
961: fi
962: done
963: # Screen out bogus values from the imake configuration.
964: case "$ac_im_incroot" in
965: /usr/include) ;;
966: *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
967: esac
968: case "$ac_im_usrlibdir" in
969: /usr/lib | /lib) ;;
970: *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
971: esac
972: fi
973: cd ..
974: rm -fr conftestdir
975: fi
976:
977: if test "$ac_x_includes" = NO; then
978: # Guess where to find include files, by looking for this one X11 .h file.
979: test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
980:
981: # First, try using that file with no special directory specified.
982: cat > conftest.$ac_ext <<EOF
983: #line 984 "configure"
984: #include "confdefs.h"
985: #include <$x_direct_test_include>
986: EOF
987: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
988: { (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
989: ac_err=`grep -v '^ *+' conftest.out`
990: if test -z "$ac_err"; then
991: rm -rf conftest*
992: # We can compile using X headers with no special include directory.
993: ac_x_includes=
994: else
995: echo "$ac_err" >&5
996: rm -rf conftest*
997: # Look for the header file in a standard set of common directories.
998: for ac_dir in \
999: /usr/X11R6/include \
1000: /usr/X11R5/include \
1001: /usr/X11R4/include \
1002: \
1003: /usr/include/X11R6 \
1004: /usr/include/X11R5 \
1005: /usr/include/X11R4 \
1006: \
1007: /usr/local/X11R6/include \
1008: /usr/local/X11R5/include \
1009: /usr/local/X11R4/include \
1010: \
1011: /usr/local/include/X11R6 \
1012: /usr/local/include/X11R5 \
1013: /usr/local/include/X11R4 \
1014: \
1015: /usr/X11/include \
1016: /usr/include/X11 \
1017: /usr/local/X11/include \
1018: /usr/local/include/X11 \
1019: \
1020: /usr/X386/include \
1021: /usr/x386/include \
1022: /usr/XFree86/include/X11 \
1023: \
1024: /usr/include \
1025: /usr/local/include \
1026: /usr/unsupported/include \
1027: /usr/athena/include \
1028: /usr/local/x11r5/include \
1029: /usr/lpp/Xamples/include \
1030: \
1031: /usr/openwin/include \
1032: /usr/openwin/share/include \
1033: ; \
1034: do
1035: if test -r "$ac_dir/$x_direct_test_include"; then
1036: ac_x_includes=$ac_dir
1037: break
1038: fi
1039: done
1040: fi
1041: rm -f conftest*
1042: fi # $ac_x_includes = NO
1043:
1044: if test "$ac_x_libraries" = NO; then
1045: # Check for the libraries.
1046:
1047: test -z "$x_direct_test_library" && x_direct_test_library=Xt
1048: test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1049:
1050: # See if we find them without any special options.
1051: # Don't add to $LIBS permanently.
1052: ac_save_LIBS="$LIBS"
1053: LIBS="-l$x_direct_test_library $LIBS"
1054: cat > conftest.$ac_ext <<EOF
1055: #line 1056 "configure"
1056: #include "confdefs.h"
1057:
1058: int main() { return 0; }
1059: int t() {
1060: ${x_direct_test_function}()
1061: ; return 0; }
1062: EOF
1063: if { (eval echo configure:1064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1064: rm -rf conftest*
1065: LIBS="$ac_save_LIBS"
1066: # We can link X programs with no special library path.
1067: ac_x_libraries=
1068: else
1069: rm -rf conftest*
1070: LIBS="$ac_save_LIBS"
1071: # First see if replacing the include by lib works.
1072: for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1073: /usr/X11R6/lib \
1074: /usr/X11R5/lib \
1075: /usr/X11R4/lib \
1076: \
1077: /usr/lib/X11R6 \
1078: /usr/lib/X11R5 \
1079: /usr/lib/X11R4 \
1080: \
1081: /usr/local/X11R6/lib \
1082: /usr/local/X11R5/lib \
1083: /usr/local/X11R4/lib \
1084: \
1085: /usr/local/lib/X11R6 \
1086: /usr/local/lib/X11R5 \
1087: /usr/local/lib/X11R4 \
1088: \
1089: /usr/X11/lib \
1090: /usr/lib/X11 \
1091: /usr/local/X11/lib \
1092: /usr/local/lib/X11 \
1093: \
1094: /usr/X386/lib \
1095: /usr/x386/lib \
1096: /usr/XFree86/lib/X11 \
1097: \
1098: /usr/lib \
1099: /usr/local/lib \
1100: /usr/unsupported/lib \
1101: /usr/athena/lib \
1102: /usr/local/x11r5/lib \
1103: /usr/lpp/Xamples/lib \
1104: \
1105: /usr/openwin/lib \
1106: /usr/openwin/share/lib \
1107: ; \
1108: do
1109: for ac_extension in a so sl; do
1110: if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1111: ac_x_libraries=$ac_dir
1112: break 2
1113: fi
1114: done
1115: done
1116: fi
1117: rm -f conftest*
1118:
1119: fi # $ac_x_libraries = NO
1120:
1121: if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1122: # Didn't find X anywhere. Cache the known absence of X.
1123: ac_cv_have_x="have_x=no"
1124: else
1125: # Record where we found X for the cache.
1126: ac_cv_have_x="have_x=yes \
1127: ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1128: fi
1129: fi
1130: fi
1131: eval "$ac_cv_have_x"
1132: fi # $with_x != no
1133:
1134: if test "$have_x" != yes; then
1135: echo "$ac_t""$have_x" 1>&6
1136: no_x=yes
1137: else
1138: # If each of the values was on the command line, it overrides each guess.
1139: test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1140: test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1141: # Update the cache value to reflect the command line values.
1142: ac_cv_have_x="have_x=yes \
1143: ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1144: echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1145: fi
1146:
1147: if test "$no_x" = yes; then
1148: # Not all programs may use this symbol, but it does not hurt to define it.
1149: X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
1150: else
1151: if test -n "$x_includes"; then
1152: X_CFLAGS="$X_CFLAGS -I$x_includes"
1153: fi
1154:
1155: # It would be nice to have a more robust check for the -R ld option than
1156: # just checking for Solaris.
1157: # It would also be nice to do this for all -L options, not just this one.
1158: if test -n "$x_libraries"; then
1159: X_LIBS="$X_LIBS -L$x_libraries"
1160: if test "`(uname) 2>/dev/null`" = SunOS &&
1161: uname -r | grep '^5' >/dev/null; then
1162: X_LIBS="$X_LIBS -R $x_libraries"
1163: fi
1164: fi
1165:
1166: # Check for libraries that X11R6 Xt/Xaw programs need.
1167:
1168: ac_save_LDFLAGS="$LDFLAGS"
1169: LDFLAGS="$LDFLAGS -L$x_libraries"
1170: # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1171: # check for ICE first), but we must link in the order -lSM -lICE or
1172: # we get undefined symbols. So assume we have SM if we have ICE.
1173: # These have to be linked with before -lX11, unlike the other
1174: # libraries we check for below, so use a different variable.
1175: # [email protected], [email protected].
1176: echo $ac_n "checking for -lICE""... $ac_c" 1>&6
1177: ac_lib_var=`echo ICE'_'IceConnectionNumber | tr './+\055' '__p_'`
1178: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1179: echo $ac_n "(cached) $ac_c" 1>&6
1180: else
1181: ac_save_LIBS="$LIBS"
1182: LIBS="-lICE $LIBS"
1183: cat > conftest.$ac_ext <<EOF
1184: #line 1185 "configure"
1185: #include "confdefs.h"
1186: /* Override any gcc2 internal prototype to avoid an error. */
1187: /* We use char because int might match the return type of a gcc2
1188: builtin and then its argument prototype would still apply. */
1189: char IceConnectionNumber();
1190:
1191: int main() { return 0; }
1192: int t() {
1193: IceConnectionNumber()
1194: ; return 0; }
1195: EOF
1196: if { (eval echo configure:1197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1197: rm -rf conftest*
1198: eval "ac_cv_lib_$ac_lib_var=yes"
1199: else
1200: rm -rf conftest*
1201: eval "ac_cv_lib_$ac_lib_var=no"
1202: fi
1203: rm -f conftest*
1204: LIBS="$ac_save_LIBS"
1205:
1206: fi
1207: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1208: echo "$ac_t""yes" 1>&6
1209: X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1210: else
1211: echo "$ac_t""no" 1>&6
1212: fi
1213:
1214: LDFLAGS="$ac_save_LDFLAGS"
1215:
1216: # Check for system-dependent libraries X programs must link with.
1217:
1218: if test "$ISC" = yes; then
1219: X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1220: else
1221: # [email protected] says this is needed for Ultrix, if the X
1222: # libraries were built with DECnet support. And [email protected] says
1223: # the Alpha needs dnet_stub (dnet does not exist).
1224: echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
1225: ac_lib_var=`echo dnet'_'dnet_ntoa | tr './+\055' '__p_'`
1226: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1227: echo $ac_n "(cached) $ac_c" 1>&6
1228: else
1229: ac_save_LIBS="$LIBS"
1230: LIBS="-ldnet $LIBS"
1231: cat > conftest.$ac_ext <<EOF
1232: #line 1233 "configure"
1233: #include "confdefs.h"
1234: /* Override any gcc2 internal prototype to avoid an error. */
1235: /* We use char because int might match the return type of a gcc2
1236: builtin and then its argument prototype would still apply. */
1237: char dnet_ntoa();
1238:
1239: int main() { return 0; }
1240: int t() {
1241: dnet_ntoa()
1242: ; return 0; }
1243: EOF
1244: if { (eval echo configure:1245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1245: rm -rf conftest*
1246: eval "ac_cv_lib_$ac_lib_var=yes"
1247: else
1248: rm -rf conftest*
1249: eval "ac_cv_lib_$ac_lib_var=no"
1250: fi
1251: rm -f conftest*
1252: LIBS="$ac_save_LIBS"
1253:
1254: fi
1255: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1256: echo "$ac_t""yes" 1>&6
1257: X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1258: else
1259: echo "$ac_t""no" 1>&6
1260: fi
1261:
1262: if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1263: echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
1264: ac_lib_var=`echo dnet_stub'_'dnet_ntoa | tr './+\055' '__p_'`
1265: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1266: echo $ac_n "(cached) $ac_c" 1>&6
1267: else
1268: ac_save_LIBS="$LIBS"
1269: LIBS="-ldnet_stub $LIBS"
1270: cat > conftest.$ac_ext <<EOF
1271: #line 1272 "configure"
1272: #include "confdefs.h"
1273: /* Override any gcc2 internal prototype to avoid an error. */
1274: /* We use char because int might match the return type of a gcc2
1275: builtin and then its argument prototype would still apply. */
1276: char dnet_ntoa();
1277:
1278: int main() { return 0; }
1279: int t() {
1280: dnet_ntoa()
1281: ; return 0; }
1282: EOF
1283: if { (eval echo configure:1284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1284: rm -rf conftest*
1285: eval "ac_cv_lib_$ac_lib_var=yes"
1286: else
1287: rm -rf conftest*
1288: eval "ac_cv_lib_$ac_lib_var=no"
1289: fi
1290: rm -f conftest*
1291: LIBS="$ac_save_LIBS"
1292:
1293: fi
1294: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1295: echo "$ac_t""yes" 1>&6
1296: X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1297: else
1298: echo "$ac_t""no" 1>&6
1299: fi
1300:
1301: fi
1302:
1303: # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
1304: # to get the SysV transport functions.
1305: # Not sure which flavor of 386 UNIX this is, but it seems harmless to
1306: # check for it.
1307: echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
1308: ac_lib_var=`echo nsl'_'t_accept | tr './+\055' '__p_'`
1309: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1310: echo $ac_n "(cached) $ac_c" 1>&6
1311: else
1312: ac_save_LIBS="$LIBS"
1313: LIBS="-lnsl $LIBS"
1314: cat > conftest.$ac_ext <<EOF
1315: #line 1316 "configure"
1316: #include "confdefs.h"
1317: /* Override any gcc2 internal prototype to avoid an error. */
1318: /* We use char because int might match the return type of a gcc2
1319: builtin and then its argument prototype would still apply. */
1320: char t_accept();
1321:
1322: int main() { return 0; }
1323: int t() {
1324: t_accept()
1325: ; return 0; }
1326: EOF
1327: if { (eval echo configure:1328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1328: rm -rf conftest*
1329: eval "ac_cv_lib_$ac_lib_var=yes"
1330: else
1331: rm -rf conftest*
1332: eval "ac_cv_lib_$ac_lib_var=no"
1333: fi
1334: rm -f conftest*
1335: LIBS="$ac_save_LIBS"
1336:
1337: fi
1338: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1339: echo "$ac_t""yes" 1>&6
1340: X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1341: else
1342: echo "$ac_t""no" 1>&6
1343: fi
1344:
1345:
1346: # [email protected] says without -lsocket,
1347: # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
1348: # But -lsocket is broken on IRIX, according to [email protected].
1349: if test "`(uname) 2>/dev/null`" != IRIX; then
1350: echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
1351: ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
1352: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1353: echo $ac_n "(cached) $ac_c" 1>&6
1354: else
1355: ac_save_LIBS="$LIBS"
1356: LIBS="-lsocket $LIBS"
1357: cat > conftest.$ac_ext <<EOF
1358: #line 1359 "configure"
1359: #include "confdefs.h"
1360: /* Override any gcc2 internal prototype to avoid an error. */
1361: /* We use char because int might match the return type of a gcc2
1362: builtin and then its argument prototype would still apply. */
1363: char socket();
1364:
1365: int main() { return 0; }
1366: int t() {
1367: socket()
1368: ; return 0; }
1369: EOF
1370: if { (eval echo configure:1371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1371: rm -rf conftest*
1372: eval "ac_cv_lib_$ac_lib_var=yes"
1373: else
1374: rm -rf conftest*
1375: eval "ac_cv_lib_$ac_lib_var=no"
1376: fi
1377: rm -f conftest*
1378: LIBS="$ac_save_LIBS"
1379:
1380: fi
1381: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1382: echo "$ac_t""yes" 1>&6
1383: X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
1384: else
1385: echo "$ac_t""no" 1>&6
1386: fi
1387:
1388: fi
1389: fi
1390: fi
1391:
1392:
1393:
1394: ac_header_dirent=no
1395: for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1396: do
1397: ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1398: echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1399: if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1400: echo $ac_n "(cached) $ac_c" 1>&6
1401: else
1402: cat > conftest.$ac_ext <<EOF
1403: #line 1404 "configure"
1404: #include "confdefs.h"
1405: #include <sys/types.h>
1406: #include <$ac_hdr>
1407: int main() { return 0; }
1408: int t() {
1409: DIR *dirp = 0;
1410: ; return 0; }
1411: EOF
1412: if { (eval echo configure:1413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1413: rm -rf conftest*
1414: eval "ac_cv_header_dirent_$ac_safe=yes"
1415: else
1416: rm -rf conftest*
1417: eval "ac_cv_header_dirent_$ac_safe=no"
1418: fi
1419: rm -f conftest*
1420:
1421: fi
1422: if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1423: echo "$ac_t""yes" 1>&6
1424: ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
1425: cat >> confdefs.h <<EOF
1426: #define $ac_tr_hdr 1
1427: EOF
1428: ac_header_dirent=$ac_hdr; break
1429: else
1430: echo "$ac_t""no" 1>&6
1431: fi
1432: done
1433: # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1434: if test $ac_header_dirent = dirent.h; then
1435: echo $ac_n "checking for -ldir""... $ac_c" 1>&6
1436: ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
1437: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1438: echo $ac_n "(cached) $ac_c" 1>&6
1439: else
1440: ac_save_LIBS="$LIBS"
1441: LIBS="-ldir $LIBS"
1442: cat > conftest.$ac_ext <<EOF
1443: #line 1444 "configure"
1444: #include "confdefs.h"
1445: /* Override any gcc2 internal prototype to avoid an error. */
1446: /* We use char because int might match the return type of a gcc2
1447: builtin and then its argument prototype would still apply. */
1448: char opendir();
1449:
1450: int main() { return 0; }
1451: int t() {
1452: opendir()
1453: ; return 0; }
1454: EOF
1455: if { (eval echo configure:1456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1456: rm -rf conftest*
1457: eval "ac_cv_lib_$ac_lib_var=yes"
1458: else
1459: rm -rf conftest*
1460: eval "ac_cv_lib_$ac_lib_var=no"
1461: fi
1462: rm -f conftest*
1463: LIBS="$ac_save_LIBS"
1464:
1465: fi
1466: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1467: echo "$ac_t""yes" 1>&6
1468: LIBS="$LIBS -ldir"
1469: else
1470: echo "$ac_t""no" 1>&6
1471: fi
1472:
1473: else
1474: echo $ac_n "checking for -lx""... $ac_c" 1>&6
1475: ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
1476: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1477: echo $ac_n "(cached) $ac_c" 1>&6
1478: else
1479: ac_save_LIBS="$LIBS"
1480: LIBS="-lx $LIBS"
1481: cat > conftest.$ac_ext <<EOF
1482: #line 1483 "configure"
1483: #include "confdefs.h"
1484: /* Override any gcc2 internal prototype to avoid an error. */
1485: /* We use char because int might match the return type of a gcc2
1486: builtin and then its argument prototype would still apply. */
1487: char opendir();
1488:
1489: int main() { return 0; }
1490: int t() {
1491: opendir()
1492: ; return 0; }
1493: EOF
1494: if { (eval echo configure:1495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1495: rm -rf conftest*
1496: eval "ac_cv_lib_$ac_lib_var=yes"
1497: else
1498: rm -rf conftest*
1499: eval "ac_cv_lib_$ac_lib_var=no"
1500: fi
1501: rm -f conftest*
1502: LIBS="$ac_save_LIBS"
1503:
1504: fi
1505: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1506: echo "$ac_t""yes" 1>&6
1507: LIBS="$LIBS -lx"
1508: else
1509: echo "$ac_t""no" 1>&6
1510: fi
1511:
1512: fi
1513:
1514: # If we cannot run a trivial program, we must be cross compiling.
1515: echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1516: if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1517: echo $ac_n "(cached) $ac_c" 1>&6
1518: else
1519: if test "$cross_compiling" = yes; then
1520: ac_cv_c_cross=yes
1521: else
1522: cat > conftest.$ac_ext <<EOF
1523: #line 1524 "configure"
1524: #include "confdefs.h"
1525: main(){return(0);}
1526: EOF
1527: { (eval echo configure:1528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1528: if test -s conftest && (./conftest; exit) 2>/dev/null; then
1529: ac_cv_c_cross=no
1530: else
1531: ac_cv_c_cross=yes
1532: fi
1533: fi
1534: rm -fr conftest*
1535: fi
1536:
1537: echo "$ac_t""$ac_cv_c_cross" 1>&6
1538: cross_compiling=$ac_cv_c_cross
1539:
1540: echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1541: if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1542: echo $ac_n "(cached) $ac_c" 1>&6
1543: else
1544: cat > conftest.$ac_ext <<EOF
1545: #line 1546 "configure"
1546: #include "confdefs.h"
1547: #include <stdlib.h>
1548: #include <stdarg.h>
1549: #include <string.h>
1550: #include <float.h>
1551: EOF
1552: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1553: { (eval echo configure:1554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1554: ac_err=`grep -v '^ *+' conftest.out`
1555: if test -z "$ac_err"; then
1556: rm -rf conftest*
1557: ac_cv_header_stdc=yes
1558: else
1559: echo "$ac_err" >&5
1560: rm -rf conftest*
1561: ac_cv_header_stdc=no
1562: fi
1563: rm -f conftest*
1564:
1565: if test $ac_cv_header_stdc = yes; then
1566: # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1567: cat > conftest.$ac_ext <<EOF
1568: #line 1569 "configure"
1569: #include "confdefs.h"
1570: #include <string.h>
1571: EOF
1572: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1573: egrep "memchr" >/dev/null 2>&1; then
1574: :
1575: else
1576: rm -rf conftest*
1577: ac_cv_header_stdc=no
1578: fi
1579: rm -f conftest*
1580:
1581: fi
1582:
1583: if test $ac_cv_header_stdc = yes; then
1584: # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1585: cat > conftest.$ac_ext <<EOF
1586: #line 1587 "configure"
1587: #include "confdefs.h"
1588: #include <stdlib.h>
1589: EOF
1590: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1591: egrep "free" >/dev/null 2>&1; then
1592: :
1593: else
1594: rm -rf conftest*
1595: ac_cv_header_stdc=no
1596: fi
1597: rm -f conftest*
1598:
1599: fi
1600:
1601: if test $ac_cv_header_stdc = yes; then
1602: # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1603: if test "$cross_compiling" = yes; then
1604: :
1605: else
1606: cat > conftest.$ac_ext <<EOF
1607: #line 1608 "configure"
1608: #include "confdefs.h"
1609: #include <ctype.h>
1610: #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1611: #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1612: #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1613: int main () { int i; for (i = 0; i < 256; i++)
1614: if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1615: exit (0); }
1616:
1617: EOF
1618: { (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1619: if test -s conftest && (./conftest; exit) 2>/dev/null; then
1620: :
1621: else
1622: ac_cv_header_stdc=no
1623: fi
1624: fi
1625: rm -fr conftest*
1626: fi
1627: fi
1628:
1629: echo "$ac_t""$ac_cv_header_stdc" 1>&6
1630: if test $ac_cv_header_stdc = yes; then
1631: cat >> confdefs.h <<\EOF
1632: #define STDC_HEADERS 1
1633: EOF
1634:
1635: fi
1636:
1637: for ac_hdr in unistd.h fcntl.h sys/time.h sys/types.h utime.h string.h strings.h values.h
1638: do
1639: ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1640: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1641: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1642: echo $ac_n "(cached) $ac_c" 1>&6
1643: else
1644: cat > conftest.$ac_ext <<EOF
1645: #line 1646 "configure"
1646: #include "confdefs.h"
1647: #include <$ac_hdr>
1648: EOF
1649: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1650: { (eval echo configure:1651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1651: ac_err=`grep -v '^ *+' conftest.out`
1652: if test -z "$ac_err"; then
1653: rm -rf conftest*
1654: eval "ac_cv_header_$ac_safe=yes"
1655: else
1656: echo "$ac_err" >&5
1657: rm -rf conftest*
1658: eval "ac_cv_header_$ac_safe=no"
1659: fi
1660: rm -f conftest*
1661: fi
1662: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1663: echo "$ac_t""yes" 1>&6
1664: ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1665: cat >> confdefs.h <<EOF
1666: #define $ac_tr_hdr 1
1667: EOF
1668:
1669: else
1670: echo "$ac_t""no" 1>&6
1671: fi
1672: done
1673:
1674: for ac_hdr in sys/vfs.h sys/mount.h sys/param.h sys/statfs.h sys/statvfs.h sys/stat.h linux/joystick.h
1675: do
1676: ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1677: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1678: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1679: echo $ac_n "(cached) $ac_c" 1>&6
1680: else
1681: cat > conftest.$ac_ext <<EOF
1682: #line 1683 "configure"
1683: #include "confdefs.h"
1684: #include <$ac_hdr>
1685: EOF
1686: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1687: { (eval echo configure:1688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1688: ac_err=`grep -v '^ *+' conftest.out`
1689: if test -z "$ac_err"; then
1690: rm -rf conftest*
1691: eval "ac_cv_header_$ac_safe=yes"
1692: else
1693: echo "$ac_err" >&5
1694: rm -rf conftest*
1695: eval "ac_cv_header_$ac_safe=no"
1696: fi
1697: rm -f conftest*
1698: fi
1699: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1700: echo "$ac_t""yes" 1>&6
1701: ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1702: cat >> confdefs.h <<EOF
1703: #define $ac_tr_hdr 1
1704: EOF
1705:
1706: else
1707: echo "$ac_t""no" 1>&6
1708: fi
1709: done
1710:
1711:
1712: if [ $ac_cv_header_linux_joystick_h = "yes" ]; then
1713: echo $ac_n "checking whether linux/joystick.h is broken""... $ac_c" 1>&6
1714: if grep "#include" /usr/include/linux/joystick.h >/dev/null; then
1715: echo "$ac_t""yes" 1>&6
1716: BROKEN_JOYSTICK_H=1
1717: grep -v "#include" /usr/include/linux/joystick.h >include/joystick.h
1718: else
1719: echo "$ac_t""no" 1>&6
1720: BROKEN_JOYSTICK_H=0
1721: fi
1722: fi
1723:
1724: echo $ac_n "checking size of char""... $ac_c" 1>&6
1725: if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
1726: echo $ac_n "(cached) $ac_c" 1>&6
1727: else
1728: if test "$cross_compiling" = yes; then
1729: { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1730: else
1731: cat > conftest.$ac_ext <<EOF
1732: #line 1733 "configure"
1733: #include "confdefs.h"
1734: #include <stdio.h>
1735: main()
1736: {
1737: FILE *f=fopen("conftestval", "w");
1738: if (!f) exit(1);
1739: fprintf(f, "%d\n", sizeof(char));
1740: exit(0);
1741: }
1742: EOF
1743: { (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1744: if test -s conftest && (./conftest; exit) 2>/dev/null; then
1745: ac_cv_sizeof_char=`cat conftestval`
1746: else
1747: ac_cv_sizeof_char=0
1748: fi
1749: fi
1750: rm -fr conftest*
1751: fi
1752: echo "$ac_t""$ac_cv_sizeof_char" 1>&6
1753: cat >> confdefs.h <<EOF
1754: #define SIZEOF_CHAR $ac_cv_sizeof_char
1755: EOF
1756:
1757:
1758: echo $ac_n "checking size of short""... $ac_c" 1>&6
1759: if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1760: echo $ac_n "(cached) $ac_c" 1>&6
1761: else
1762: if test "$cross_compiling" = yes; then
1763: { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1764: else
1765: cat > conftest.$ac_ext <<EOF
1766: #line 1767 "configure"
1767: #include "confdefs.h"
1768: #include <stdio.h>
1769: main()
1770: {
1771: FILE *f=fopen("conftestval", "w");
1772: if (!f) exit(1);
1773: fprintf(f, "%d\n", sizeof(short));
1774: exit(0);
1775: }
1776: EOF
1777: { (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1778: if test -s conftest && (./conftest; exit) 2>/dev/null; then
1779: ac_cv_sizeof_short=`cat conftestval`
1780: else
1781: ac_cv_sizeof_short=0
1782: fi
1783: fi
1784: rm -fr conftest*
1785: fi
1786: echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1787: cat >> confdefs.h <<EOF
1788: #define SIZEOF_SHORT $ac_cv_sizeof_short
1789: EOF
1790:
1791:
1792: echo $ac_n "checking size of int""... $ac_c" 1>&6
1793: if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1794: echo $ac_n "(cached) $ac_c" 1>&6
1795: else
1796: if test "$cross_compiling" = yes; then
1797: { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1798: else
1799: cat > conftest.$ac_ext <<EOF
1800: #line 1801 "configure"
1801: #include "confdefs.h"
1802: #include <stdio.h>
1803: main()
1804: {
1805: FILE *f=fopen("conftestval", "w");
1806: if (!f) exit(1);
1807: fprintf(f, "%d\n", sizeof(int));
1808: exit(0);
1809: }
1810: EOF
1811: { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1812: if test -s conftest && (./conftest; exit) 2>/dev/null; then
1813: ac_cv_sizeof_int=`cat conftestval`
1814: else
1815: ac_cv_sizeof_int=0
1816: fi
1817: fi
1818: rm -fr conftest*
1819: fi
1820: echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1821: cat >> confdefs.h <<EOF
1822: #define SIZEOF_INT $ac_cv_sizeof_int
1823: EOF
1824:
1825:
1826: echo $ac_n "checking size of long""... $ac_c" 1>&6
1827: if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1828: echo $ac_n "(cached) $ac_c" 1>&6
1829: else
1830: if test "$cross_compiling" = yes; then
1831: { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1832: else
1833: cat > conftest.$ac_ext <<EOF
1834: #line 1835 "configure"
1835: #include "confdefs.h"
1836: #include <stdio.h>
1837: main()
1838: {
1839: FILE *f=fopen("conftestval", "w");
1840: if (!f) exit(1);
1841: fprintf(f, "%d\n", sizeof(long));
1842: exit(0);
1843: }
1844: EOF
1845: { (eval echo configure:1846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1846: if test -s conftest && (./conftest; exit) 2>/dev/null; then
1847: ac_cv_sizeof_long=`cat conftestval`
1848: else
1849: ac_cv_sizeof_long=0
1850: fi
1851: fi
1852: rm -fr conftest*
1853: fi
1854: echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1855: cat >> confdefs.h <<EOF
1856: #define SIZEOF_LONG $ac_cv_sizeof_long
1857: EOF
1858:
1859:
1860: echo $ac_n "checking size of long long""... $ac_c" 1>&6
1861: if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1862: echo $ac_n "(cached) $ac_c" 1>&6
1863: else
1864: if test "$cross_compiling" = yes; then
1865: { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1866: else
1867: cat > conftest.$ac_ext <<EOF
1868: #line 1869 "configure"
1869: #include "confdefs.h"
1870: #include <stdio.h>
1871: main()
1872: {
1873: FILE *f=fopen("conftestval", "w");
1874: if (!f) exit(1);
1875: fprintf(f, "%d\n", sizeof(long long));
1876: exit(0);
1877: }
1878: EOF
1879: { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1880: if test -s conftest && (./conftest; exit) 2>/dev/null; then
1881: ac_cv_sizeof_long_long=`cat conftestval`
1882: else
1883: ac_cv_sizeof_long_long=0
1884: fi
1885: fi
1886: rm -fr conftest*
1887: fi
1888: echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1889: cat >> confdefs.h <<EOF
1890: #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1891: EOF
1892:
1893:
1894:
1895: echo $ac_n "checking for working const""... $ac_c" 1>&6
1896: if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1897: echo $ac_n "(cached) $ac_c" 1>&6
1898: else
1899: cat > conftest.$ac_ext <<EOF
1900: #line 1901 "configure"
1901: #include "confdefs.h"
1902:
1903: int main() { return 0; }
1904: int t() {
1905:
1906: /* Ultrix mips cc rejects this. */
1907: typedef int charset[2]; const charset x;
1908: /* SunOS 4.1.1 cc rejects this. */
1909: char const *const *ccp;
1910: char **p;
1911: /* NEC SVR4.0.2 mips cc rejects this. */
1912: struct point {int x, y;};
1913: static struct point const zero = {0,0};
1914: /* AIX XL C 1.02.0.0 rejects this.
1915: It does not let you subtract one const X* pointer from another in an arm
1916: of an if-expression whose if-part is not a constant expression */
1917: const char *g = "string";
1918: ccp = &g + (g ? g-g : 0);
1919: /* HPUX 7.0 cc rejects these. */
1920: ++ccp;
1921: p = (char**) ccp;
1922: ccp = (char const *const *) p;
1923: { /* SCO 3.2v4 cc rejects this. */
1924: char *t;
1925: char const *s = 0 ? (char *) 0 : (char const *) 0;
1926:
1927: *t++ = 0;
1928: }
1929: { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1930: int x[] = {25, 17};
1931: const int *foo = &x[0];
1932: ++foo;
1933: }
1934: { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1935: typedef const int *iptr;
1936: iptr p = 0;
1937: ++p;
1938: }
1939: { /* AIX XL C 1.02.0.0 rejects this saying
1940: "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1941: struct s { int j; const int *ap[3]; };
1942: struct s *b; b->j = 5;
1943: }
1944: { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1945: const int foo = 10;
1946: }
1947:
1948: ; return 0; }
1949: EOF
1950: if { (eval echo configure:1951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1951: rm -rf conftest*
1952: ac_cv_c_const=yes
1953: else
1954: rm -rf conftest*
1955: ac_cv_c_const=no
1956: fi
1957: rm -f conftest*
1958:
1959: fi
1960:
1961: echo "$ac_t""$ac_cv_c_const" 1>&6
1962: if test $ac_cv_c_const = no; then
1963: cat >> confdefs.h <<\EOF
1964: #define const
1965: EOF
1966:
1967: fi
1968:
1969: echo $ac_n "checking for inline""... $ac_c" 1>&6
1970: if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1971: echo $ac_n "(cached) $ac_c" 1>&6
1972: else
1973: ac_cv_c_inline=no
1974: for ac_kw in inline __inline__ __inline; do
1975: cat > conftest.$ac_ext <<EOF
1976: #line 1977 "configure"
1977: #include "confdefs.h"
1978:
1979: int main() { return 0; }
1980: int t() {
1981: } $ac_kw foo() {
1982: ; return 0; }
1983: EOF
1984: if { (eval echo configure:1985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1985: rm -rf conftest*
1986: ac_cv_c_inline=$ac_kw; break
1987: fi
1988: rm -f conftest*
1989:
1990: done
1991:
1992: fi
1993:
1994: echo "$ac_t""$ac_cv_c_inline" 1>&6
1995: case "$ac_cv_c_inline" in
1996: inline | yes) ;;
1997: no) cat >> confdefs.h <<\EOF
1998: #define inline
1999: EOF
2000: ;;
2001: *) cat >> confdefs.h <<EOF
2002: #define inline $ac_cv_c_inline
2003: EOF
2004: ;;
2005: esac
2006:
2007: echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2008: if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2009: echo $ac_n "(cached) $ac_c" 1>&6
2010: else
2011: cat > conftest.$ac_ext <<EOF
2012: #line 2013 "configure"
2013: #include "confdefs.h"
2014: #include <sys/types.h>
2015: #if STDC_HEADERS
2016: #include <stdlib.h>
2017: #endif
2018: EOF
2019: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2020: egrep "mode_t" >/dev/null 2>&1; then
2021: rm -rf conftest*
2022: ac_cv_type_mode_t=yes
2023: else
2024: rm -rf conftest*
2025: ac_cv_type_mode_t=no
2026: fi
2027: rm -f conftest*
2028:
2029: fi
2030: echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2031: if test $ac_cv_type_mode_t = no; then
2032: cat >> confdefs.h <<\EOF
2033: #define mode_t int
2034: EOF
2035:
2036: fi
2037:
2038: echo $ac_n "checking for off_t""... $ac_c" 1>&6
2039: if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2040: echo $ac_n "(cached) $ac_c" 1>&6
2041: else
2042: cat > conftest.$ac_ext <<EOF
2043: #line 2044 "configure"
2044: #include "confdefs.h"
2045: #include <sys/types.h>
2046: #if STDC_HEADERS
2047: #include <stdlib.h>
2048: #endif
2049: EOF
2050: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2051: egrep "off_t" >/dev/null 2>&1; then
2052: rm -rf conftest*
2053: ac_cv_type_off_t=yes
2054: else
2055: rm -rf conftest*
2056: ac_cv_type_off_t=no
2057: fi
2058: rm -f conftest*
2059:
2060: fi
2061: echo "$ac_t""$ac_cv_type_off_t" 1>&6
2062: if test $ac_cv_type_off_t = no; then
2063: cat >> confdefs.h <<\EOF
2064: #define off_t long
2065: EOF
2066:
2067: fi
2068:
2069: echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2070: if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2071: echo $ac_n "(cached) $ac_c" 1>&6
2072: else
2073: cat > conftest.$ac_ext <<EOF
2074: #line 2075 "configure"
2075: #include "confdefs.h"
2076: #include <sys/types.h>
2077: #if STDC_HEADERS
2078: #include <stdlib.h>
2079: #endif
2080: EOF
2081: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2082: egrep "pid_t" >/dev/null 2>&1; then
2083: rm -rf conftest*
2084: ac_cv_type_pid_t=yes
2085: else
2086: rm -rf conftest*
2087: ac_cv_type_pid_t=no
2088: fi
2089: rm -f conftest*
2090:
2091: fi
2092: echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2093: if test $ac_cv_type_pid_t = no; then
2094: cat >> confdefs.h <<\EOF
2095: #define pid_t int
2096: EOF
2097:
2098: fi
2099:
2100: echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
2101: if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
2102: echo $ac_n "(cached) $ac_c" 1>&6
2103: else
2104: cat > conftest.$ac_ext <<EOF
2105: #line 2106 "configure"
2106: #include "confdefs.h"
2107: #include <sys/types.h>
2108: #include <sys/stat.h>
2109: int main() { return 0; }
2110: int t() {
2111: struct stat s; s.st_blocks;
2112: ; return 0; }
2113: EOF
2114: if { (eval echo configure:2115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2115: rm -rf conftest*
2116: ac_cv_struct_st_blocks=yes
2117: else
2118: rm -rf conftest*
2119: ac_cv_struct_st_blocks=no
2120: fi
2121: rm -f conftest*
2122:
2123: fi
2124:
2125: echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
2126: if test $ac_cv_struct_st_blocks = yes; then
2127: cat >> confdefs.h <<\EOF
2128: #define HAVE_ST_BLOCKS 1
2129: EOF
2130:
2131: else
2132: LIBOBJS="$LIBOBJS fileblocks.o"
2133: fi
2134:
2135: echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2136: if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2137: echo $ac_n "(cached) $ac_c" 1>&6
2138: else
2139: cat > conftest.$ac_ext <<EOF
2140: #line 2141 "configure"
2141: #include "confdefs.h"
2142: #include <sys/types.h>
2143: #include <sys/time.h>
2144: #include <time.h>
2145: int main() { return 0; }
2146: int t() {
2147: struct tm *tp;
2148: ; return 0; }
2149: EOF
2150: if { (eval echo configure:2151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2151: rm -rf conftest*
2152: ac_cv_header_time=yes
2153: else
2154: rm -rf conftest*
2155: ac_cv_header_time=no
2156: fi
2157: rm -f conftest*
2158:
2159: fi
2160:
2161: echo "$ac_t""$ac_cv_header_time" 1>&6
2162: if test $ac_cv_header_time = yes; then
2163: cat >> confdefs.h <<\EOF
2164: #define TIME_WITH_SYS_TIME 1
2165: EOF
2166:
2167: fi
2168:
2169: echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2170: if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2171: echo $ac_n "(cached) $ac_c" 1>&6
2172: else
2173: cat > conftest.$ac_ext <<EOF
2174: #line 2175 "configure"
2175: #include "confdefs.h"
2176: #include <sys/types.h>
2177: #include <time.h>
2178: int main() { return 0; }
2179: int t() {
2180: struct tm *tp; tp->tm_sec;
2181: ; return 0; }
2182: EOF
2183: if { (eval echo configure:2184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2184: rm -rf conftest*
2185: ac_cv_struct_tm=time.h
2186: else
2187: rm -rf conftest*
2188: ac_cv_struct_tm=sys/time.h
2189: fi
2190: rm -f conftest*
2191:
2192: fi
2193:
2194: echo "$ac_t""$ac_cv_struct_tm" 1>&6
2195: if test $ac_cv_struct_tm = sys/time.h; then
2196: cat >> confdefs.h <<\EOF
2197: #define TM_IN_SYS_TIME 1
2198: EOF
2199:
2200: fi
2201:
2202:
2203: if test $ac_cv_prog_gcc = yes; then
2204: echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
2205: if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
2206: echo $ac_n "(cached) $ac_c" 1>&6
2207: else
2208: ac_pattern="Autoconf.*'x'"
2209: cat > conftest.$ac_ext <<EOF
2210: #line 2211 "configure"
2211: #include "confdefs.h"
2212: #include <sgtty.h>
2213: Autoconf TIOCGETP
2214: EOF
2215: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2216: egrep "$ac_pattern" >/dev/null 2>&1; then
2217: rm -rf conftest*
2218: ac_cv_prog_gcc_traditional=yes
2219: else
2220: rm -rf conftest*
2221: ac_cv_prog_gcc_traditional=no
2222: fi
2223: rm -f conftest*
2224:
2225:
2226: if test $ac_cv_prog_gcc_traditional = no; then
2227: cat > conftest.$ac_ext <<EOF
2228: #line 2229 "configure"
2229: #include "confdefs.h"
2230: #include <termio.h>
2231: Autoconf TCGETA
2232: EOF
2233: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2234: egrep "$ac_pattern" >/dev/null 2>&1; then
2235: rm -rf conftest*
2236: ac_cv_prog_gcc_traditional=yes
2237: fi
2238: rm -f conftest*
2239:
2240: fi
2241: fi
2242:
2243: echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
2244: if test $ac_cv_prog_gcc_traditional = yes; then
2245: CC="$CC -traditional"
2246: fi
2247: fi
2248:
2249: echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2250: if eval "test \"`echo '$''{'ac_cv_func_memcmp'+set}'`\" = set"; then
2251: echo $ac_n "(cached) $ac_c" 1>&6
2252: else
2253: if test "$cross_compiling" = yes; then
2254: ac_cv_func_memcmp=no
2255: else
2256: cat > conftest.$ac_ext <<EOF
2257: #line 2258 "configure"
2258: #include "confdefs.h"
2259:
2260: main()
2261: {
2262: char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2263: exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2264: }
2265:
2266: EOF
2267: { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2268: if test -s conftest && (./conftest; exit) 2>/dev/null; then
2269: ac_cv_func_memcmp=yes
2270: else
2271: ac_cv_func_memcmp=no
2272: fi
2273: fi
2274: rm -fr conftest*
2275: fi
2276:
2277: echo "$ac_t""$ac_cv_func_memcmp" 1>&6
2278: test $ac_cv_func_memcmp = no && LIBOBJS="$LIBOBJS memcmp.o"
2279:
2280: echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2281: if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2282: echo $ac_n "(cached) $ac_c" 1>&6
2283: else
2284: cat > conftest.$ac_ext <<EOF
2285: #line 2286 "configure"
2286: #include "confdefs.h"
2287: #include <sys/types.h>
2288: #include <signal.h>
2289: #ifdef signal
2290: #undef signal
2291: #endif
2292: #ifdef __cplusplus
2293: extern "C" void (*signal (int, void (*)(int)))(int);
2294: #else
2295: void (*signal ()) ();
2296: #endif
2297:
2298: int main() { return 0; }
2299: int t() {
2300: int i;
2301: ; return 0; }
2302: EOF
2303: if { (eval echo configure:2304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2304: rm -rf conftest*
2305: ac_cv_type_signal=void
2306: else
2307: rm -rf conftest*
2308: ac_cv_type_signal=int
2309: fi
2310: rm -f conftest*
2311:
2312: fi
2313:
2314: echo "$ac_t""$ac_cv_type_signal" 1>&6
2315: cat >> confdefs.h <<EOF
2316: #define RETSIGTYPE $ac_cv_type_signal
2317: EOF
2318:
2319:
2320: echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
2321: if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
2322: echo $ac_n "(cached) $ac_c" 1>&6
2323: else
2324: rm -f conftestdata; > conftestdata
2325: # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
2326: if test "$cross_compiling" = yes; then
2327: ac_cv_func_utime_null=no
2328: else
2329: cat > conftest.$ac_ext <<EOF
2330: #line 2331 "configure"
2331: #include "confdefs.h"
2332: #include <sys/types.h>
2333: #include <sys/stat.h>
2334: main() {
2335: struct stat s, t;
2336: exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
2337: && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
2338: && t.st_mtime - s.st_mtime < 120));
2339: }
2340: EOF
2341: { (eval echo configure:2342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2342: if test -s conftest && (./conftest; exit) 2>/dev/null; then
2343: ac_cv_func_utime_null=yes
2344: else
2345: ac_cv_func_utime_null=no
2346: fi
2347: fi
2348: rm -fr conftest*
2349: rm -f core core.* *.core
2350: fi
2351:
2352: echo "$ac_t""$ac_cv_func_utime_null" 1>&6
2353: if test $ac_cv_func_utime_null = yes; then
2354: cat >> confdefs.h <<\EOF
2355: #define HAVE_UTIME_NULL 1
2356: EOF
2357:
2358: fi
2359:
2360: for ac_func in gettimeofday mkdir rmdir select strerror strstr statfs
2361: do
2362: echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2363: if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2364: echo $ac_n "(cached) $ac_c" 1>&6
2365: else
2366: cat > conftest.$ac_ext <<EOF
2367: #line 2368 "configure"
2368: #include "confdefs.h"
2369: /* System header to define __stub macros and hopefully few prototypes,
2370: which can conflict with char $ac_func(); below. */
2371: #include <assert.h>
2372: /* Override any gcc2 internal prototype to avoid an error. */
2373: /* We use char because int might match the return type of a gcc2
2374: builtin and then its argument prototype would still apply. */
2375: char $ac_func();
2376:
2377: int main() { return 0; }
2378: int t() {
2379:
2380: /* The GNU C library defines this for functions which it implements
2381: to always fail with ENOSYS. Some functions are actually named
2382: something starting with __ and the normal name is an alias. */
2383: #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2384: choke me
2385: #else
2386: $ac_func();
2387: #endif
2388:
2389: ; return 0; }
2390: EOF
2391: if { (eval echo configure:2392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2392: rm -rf conftest*
2393: eval "ac_cv_func_$ac_func=yes"
2394: else
2395: rm -rf conftest*
2396: eval "ac_cv_func_$ac_func=no"
2397: fi
2398: rm -f conftest*
2399:
2400: fi
2401: if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2402: echo "$ac_t""yes" 1>&6
2403: ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2404: cat >> confdefs.h <<EOF
2405: #define $ac_tr_func 1
2406: EOF
2407:
2408: else
2409: echo "$ac_t""no" 1>&6
2410: fi
2411: done
2412:
2413:
2414: echo $ac_n "checking how many args statfs takes""... $ac_c" 1>&6
2415: if [ $ac_cv_func_statfs = "yes" ]; then
2416: cat > conftest.$ac_ext <<EOF
2417: #line 2418 "configure"
2418: #include "confdefs.h"
2419:
2420: #include "confdefs.h"
2421: #ifdef HAVE_SYS_MOUNT_H
2422: #include <sys/mount.h>
2423: #endif
2424: #ifdef HAVE_SYS_VFS_H
2425: #include <sys/vfs.h>
2426: #endif
2427: #ifdef HAVE_SYS_PARAM_H
2428: #include <sys/param.h>
2429: #endif
2430: #ifdef HAVE_SYS_STATFS_H
2431: #include <sys/statfs.h>
2432: #endif
2433: #ifdef HAVE_SYS_STATVFS_H
2434: #include <sys/statvfs.h>
2435: #endif
2436: int main() { return 0; }
2437: int t() {
2438: struct statfs statbuf;statfs("/",&statbuf);
2439: ; return 0; }
2440: EOF
2441: if { (eval echo configure:2442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2442: rm -rf conftest*
2443: echo "$ac_t""2" 1>&6
2444: STATFS_NO_ARGS=2
2445: else
2446: rm -rf conftest*
2447: echo "$ac_t""4" 1>&6
2448: STATFS_NO_ARGS=4
2449: fi
2450: rm -f conftest*
2451:
2452: fi
2453:
2454: echo $ac_n "checking whether to use f_bavail or f_bfree""... $ac_c" 1>&6
2455: if [ $ac_cv_func_statfs = "yes" ]; then
2456: cat > conftest.$ac_ext <<EOF
2457: #line 2458 "configure"
2458: #include "confdefs.h"
2459:
2460: #include "confdefs.h"
2461: #ifdef HAVE_SYS_MOUNT_H
2462: #include <sys/mount.h>
2463: #endif
2464: #ifdef HAVE_SYS_VFS_H
2465: #include <sys/vfs.h>
2466: #endif
2467: #ifdef HAVE_SYS_PARAM_H
2468: #include <sys/param.h>
2469: #endif
2470: #ifdef HAVE_SYS_STATFS_H
2471: #include <sys/statfs.h>
2472: #endif
2473: #ifdef HAVE_SYS_STATVFS_H
2474: #include <sys/statvfs.h>
2475: #endif
2476: int main() { return 0; }
2477: int t() {
2478: struct statfs statbuf;statbuf.f_bavail;
2479: ; return 0; }
2480: EOF
2481: if { (eval echo configure:2482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2482: rm -rf conftest*
2483: echo "$ac_t""f_bavail" 1>&6
2484: STATBUF_BAVAIL=f_bavail
2485: else
2486: rm -rf conftest*
2487: echo "$ac_t""f_bfree" 1>&6
2488: STATBUF_BAVAIL=f_bfree
2489: fi
2490: rm -f conftest*
2491:
2492: fi
2493:
2494: echo $ac_n "checking which target to use""... $ac_c" 1>&6
2495: if [ $HAVE_BEBOX = "y" ]; then
2496: echo "$ac_t""BeBox" 1>&6
2497: TARGET=be
2498: GFXOBJS="bebox.o nogui.o"
2499: ac_cv_c_inline=
2500: else
2501: if [ $HAVE_NEXT_LIB = "y" ]; then
2502: echo "$ac_t""NeXTStep" 1>&6
2503: TARGET=next
2504: GFXOBJS="NeXTwin.o"
2505: LIBRARIES="-sectcreate __ICON __header Uae.app/Uae.iconheader -segprot __ICON r r -sectcreate __ICON app Uae.app/Uae.tiff -lMedia_s -lNeXT_s"
2506: else
2507: if [ x$no_x = "xyes" ]; then
2508: if [ $HAVE_SVGA_LIB = "n" ]; then
2509: echo "$ac_t""Ummm...." 1>&6
2510: echo "Neither X nor SVGAlib found, don't know what target to use."
2511: exit 1
2512: else
2513: echo "$ac_t""SVGAlib" 1>&6
2514: TARGET=svgalib
2515: GFXOBJS="svga.o nogui.o"
2516: LIBRARIES=-lvga
2517: fi
2518: else
2519: echo "$ac_t""X Window System" 1>&6
2520: TARGET=x11
2521: LIBRARIES="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS"
2522: # Extract the first word of "wish4.0", so it can be a program name with args.
2523: set dummy wish4.0; ac_word=$2
2524: echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2525: if eval "test \"`echo '$''{'ac_cv_prog_TCLGUI'+set}'`\" = set"; then
2526: echo $ac_n "(cached) $ac_c" 1>&6
2527: else
2528: if test -n "$TCLGUI"; then
2529: ac_cv_prog_TCLGUI="$TCLGUI" # Let the user override the test.
2530: else
2531: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2532: for ac_dir in $PATH; do
2533: test -z "$ac_dir" && ac_dir=.
2534: if test -f $ac_dir/$ac_word; then
2535: ac_cv_prog_TCLGUI="yes"
2536: break
2537: fi
2538: done
2539: IFS="$ac_save_ifs"
2540: test -z "$ac_cv_prog_TCLGUI" && ac_cv_prog_TCLGUI="no"
2541: fi
2542: fi
2543: TCLGUI="$ac_cv_prog_TCLGUI"
2544: if test -n "$TCLGUI"; then
2545: echo "$ac_t""$TCLGUI" 1>&6
2546: else
2547: echo "$ac_t""no" 1>&6
2548: fi
2549:
2550: if [ $TCLGUI = "yes" ]; then
2551: GFXOBJS="xwin.o xui.o"
2552: else
2553: GFXOBJS="xwin.o nogui.o"
2554: fi
2555: fi
2556: fi
2557: fi
2558:
2559: ASMOBJS=
2560:
2561: if [ "$CC" = "gcc" ]; then
2562: CFLAGS="-O3 -fomit-frame-pointer -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes"
2563: echo $ac_n "checking whether we are on a Linux/i386 ELF system""... $ac_c" 1>&6
2564: LINUXELF=n
2565: if MACHINE=`uname -a 2>/dev/null`; then
2566: cat >conftest.c << EOF
2567: int main() { return 0; }
2568: EOF
2569: case $MACHINE in
2570: Linux*i*86)
2571: gcc conftest.c -o conftest
2572: file conftest >conftest.file
2573: if grep ELF conftest.file >/dev/null; then
2574: LINUXELF=y
2575: fi
2576: ;;
2577: esac
2578: rm -f conftest*
2579: fi
2580: if [ $LINUXELF = "n" ]; then
2581: echo "$ac_t""no" 1>&6
2582: else
2583: echo "$ac_t""yes" 1>&6
2584: ASMOBJS=X86.o
2585: CFLAGS="$CFLAGS -DX86_ASSEMBLY"
2586: fi
2587: else
2588: echo "GCC wasn't found. UAE may or may not compile and run correctly."
2589: fi
2590:
2591:
2592:
2593:
2594:
2595:
2596:
2597:
2598:
2599:
2600: trap '' 1 2 15
2601: cat > confcache <<\EOF
2602: # This file is a shell script that caches the results of configure
2603: # tests run on this system so they can be shared between configure
2604: # scripts and configure runs. It is not useful on other systems.
2605: # If it contains results you don't want to keep, you may remove or edit it.
2606: #
2607: # By default, configure uses ./config.cache as the cache file,
2608: # creating it if it does not exist already. You can give configure
2609: # the --cache-file=FILE option to use a different cache file; that is
2610: # what configure does when it calls configure scripts in
2611: # subdirectories, so they share the cache.
2612: # Giving --cache-file=/dev/null disables caching, for debugging configure.
2613: # config.status only pays attention to the cache file if you give it the
2614: # --recheck option to rerun configure.
2615: #
2616: EOF
2617: # Ultrix sh set writes to stderr and can't be redirected directly,
2618: # and sets the high bit in the cache file unless we assign to the vars.
2619: (set) 2>&1 |
2620: sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2621: >> confcache
2622: if cmp -s $cache_file confcache; then
2623: :
2624: else
2625: if test -w $cache_file; then
2626: echo "updating cache $cache_file"
2627: cat confcache > $cache_file
2628: else
2629: echo "not updating unwritable cache $cache_file"
2630: fi
2631: fi
2632: rm -f confcache
2633:
2634: trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2635:
2636: test "x$prefix" = xNONE && prefix=$ac_default_prefix
2637: # Let make expand exec_prefix.
2638: test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2639:
2640: # Any assignment to VPATH causes Sun make to only execute
2641: # the first set of double-colon rules, so remove it if not needed.
2642: # If there is a colon in the path, we need to keep it.
2643: if test "x$srcdir" = x.; then
2644: ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2645: fi
2646:
2647: trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2648:
2649: DEFS=-DHAVE_CONFIG_H
2650:
2651: # Without the "./", some shells look in PATH for config.status.
2652: : ${CONFIG_STATUS=./config.status}
2653:
2654: echo creating $CONFIG_STATUS
2655: rm -f $CONFIG_STATUS
2656: cat > $CONFIG_STATUS <<EOF
2657: #! /bin/sh
2658: # Generated automatically by configure.
2659: # Run this file to recreate the current configuration.
2660: # This directory was configured as follows,
2661: # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2662: #
2663: # $0 $ac_configure_args
2664: #
2665: # Compiler output produced by configure, useful for debugging
2666: # configure, is in ./config.log if it exists.
2667:
2668: ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2669: for ac_option
2670: do
2671: case "\$ac_option" in
2672: -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2673: echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2674: exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2675: -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2676: echo "$CONFIG_STATUS generated by autoconf version 2.10"
2677: exit 0 ;;
2678: -help | --help | --hel | --he | --h)
2679: echo "\$ac_cs_usage"; exit 0 ;;
2680: *) echo "\$ac_cs_usage"; exit 1 ;;
2681: esac
2682: done
2683:
2684: ac_given_srcdir=$srcdir
2685:
2686: trap 'rm -fr `echo "Makefile sysconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2687: EOF
2688: cat >> $CONFIG_STATUS <<EOF
2689:
2690: # Protect against being on the right side of a sed subst in config.status.
2691: sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2692: s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2693: $ac_vpsub
2694: $extrasub
2695: s%@CFLAGS@%$CFLAGS%g
2696: s%@CPPFLAGS@%$CPPFLAGS%g
2697: s%@CXXFLAGS@%$CXXFLAGS%g
2698: s%@DEFS@%$DEFS%g
2699: s%@LDFLAGS@%$LDFLAGS%g
2700: s%@LIBS@%$LIBS%g
2701: s%@exec_prefix@%$exec_prefix%g
2702: s%@prefix@%$prefix%g
2703: s%@program_transform_name@%$program_transform_name%g
2704: s%@bindir@%$bindir%g
2705: s%@sbindir@%$sbindir%g
2706: s%@libexecdir@%$libexecdir%g
2707: s%@datadir@%$datadir%g
2708: s%@sysconfdir@%$sysconfdir%g
2709: s%@sharedstatedir@%$sharedstatedir%g
2710: s%@localstatedir@%$localstatedir%g
2711: s%@libdir@%$libdir%g
2712: s%@includedir@%$includedir%g
2713: s%@oldincludedir@%$oldincludedir%g
2714: s%@infodir@%$infodir%g
2715: s%@mandir@%$mandir%g
2716: s%@CC@%$CC%g
2717: s%@CPP@%$CPP%g
2718: s%@SET_MAKE@%$SET_MAKE%g
2719: s%@X_CFLAGS@%$X_CFLAGS%g
2720: s%@X_PRE_LIBS@%$X_PRE_LIBS%g
2721: s%@X_LIBS@%$X_LIBS%g
2722: s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
2723: s%@LIBOBJS@%$LIBOBJS%g
2724: s%@TCLGUI@%$TCLGUI%g
2725: s%@ac_cv_c_inline@%$ac_cv_c_inline%g
2726: s%@STATFS_NO_ARGS@%$STATFS_NO_ARGS%g
2727: s%@BROKEN_JOYSTICK_H@%$BROKEN_JOYSTICK_H%g
2728: s%@STATBUF_BAVAIL@%$STATBUF_BAVAIL%g
2729: s%@LIBRARIES@%$LIBRARIES%g
2730: s%@TARGET@%$TARGET%g
2731: s%@GFXOBJS@%$GFXOBJS%g
2732: s%@ASMOBJS@%$ASMOBJS%g
2733:
2734: CEOF
2735: EOF
2736: cat >> $CONFIG_STATUS <<EOF
2737:
2738: CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2739: EOF
2740: cat >> $CONFIG_STATUS <<\EOF
2741: for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2742: # Support "outfile[:infile]", defaulting infile="outfile.in".
2743: case "$ac_file" in
2744: *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2745: ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2746: *) ac_file_in="${ac_file}.in" ;;
2747: esac
2748:
2749: # Adjust relative srcdir, etc. for subdirectories.
2750:
2751: # Remove last slash and all that follows it. Not all systems have dirname.
2752: ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2753: if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2754: # The file is in a subdirectory.
2755: test ! -d "$ac_dir" && mkdir "$ac_dir"
2756: ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2757: # A "../" for each directory in $ac_dir_suffix.
2758: ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2759: else
2760: ac_dir_suffix= ac_dots=
2761: fi
2762:
2763: case "$ac_given_srcdir" in
2764: .) srcdir=.
2765: if test -z "$ac_dots"; then top_srcdir=.
2766: else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2767: /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2768: *) # Relative path.
2769: srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2770: top_srcdir="$ac_dots$ac_given_srcdir" ;;
2771: esac
2772:
2773: echo creating "$ac_file"
2774: rm -f "$ac_file"
2775: configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2776: case "$ac_file" in
2777: *Makefile*) ac_comsub="1i\\
2778: # $configure_input" ;;
2779: *) ac_comsub= ;;
2780: esac
2781: sed -e "$ac_comsub
2782: s%@configure_input@%$configure_input%g
2783: s%@srcdir@%$srcdir%g
2784: s%@top_srcdir@%$top_srcdir%g
2785: " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2786: fi; done
2787: rm -f conftest.subs
2788:
2789: # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2790: # NAME is the cpp macro being defined and VALUE is the value it is being given.
2791: #
2792: # ac_d sets the value in "#define NAME VALUE" lines.
2793: ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2794: ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2795: ac_dC='\3'
2796: ac_dD='%g'
2797: # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2798: ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2799: ac_uB='\([ ]\)%\1#\2define\3'
2800: ac_uC=' '
2801: ac_uD='\4%g'
2802: # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2803: ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2804: ac_eB='$%\1#\2define\3'
2805: ac_eC=' '
2806: ac_eD='%g'
2807:
2808: CONFIG_HEADERS=${CONFIG_HEADERS-"sysconfig.h"}
2809: for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2810: # Support "outfile[:infile]", defaulting infile="outfile.in".
2811: case "$ac_file" in
2812: *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2813: ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2814: *) ac_file_in="${ac_file}.in" ;;
2815: esac
2816:
2817: echo creating $ac_file
2818:
2819: rm -f conftest.frag conftest.in conftest.out
2820: cp $ac_given_srcdir/$ac_file_in conftest.in
2821:
2822: EOF
2823:
2824: # Transform confdefs.h into a sed script conftest.vals that substitutes
2825: # the proper values into config.h.in to produce config.h. And first:
2826: # Protect against being on the right side of a sed subst in config.status.
2827: # Protect against being in an unquoted here document in config.status.
2828: rm -f conftest.vals
2829: cat > conftest.hdr <<\EOF
2830: s/[\\&%]/\\&/g
2831: s%[\\$`]%\\&%g
2832: s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2833: s%ac_d%ac_u%gp
2834: s%ac_u%ac_e%gp
2835: EOF
2836: sed -n -f conftest.hdr confdefs.h > conftest.vals
2837: rm -f conftest.hdr
2838:
2839: # This sed command replaces #undef with comments. This is necessary, for
2840: # example, in the case of _POSIX_SOURCE, which is predefined and required
2841: # on some systems where configure will not decide to define it.
2842: cat >> conftest.vals <<\EOF
2843: s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2844: EOF
2845:
2846: # Break up conftest.vals because some shells have a limit on
2847: # the size of here documents, and old seds have small limits too.
2848: # Maximum number of lines to put in a single here document.
2849: ac_max_here_lines=12
2850:
2851: rm -f conftest.tail
2852: while :
2853: do
2854: ac_lines=`grep -c . conftest.vals`
2855: # grep -c gives empty output for an empty file on some AIX systems.
2856: if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2857: # Write a limited-size here document to conftest.frag.
2858: echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2859: sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2860: echo 'CEOF
2861: sed -f conftest.frag conftest.in > conftest.out
2862: rm -f conftest.in
2863: mv conftest.out conftest.in
2864: ' >> $CONFIG_STATUS
2865: sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2866: rm -f conftest.vals
2867: mv conftest.tail conftest.vals
2868: done
2869: rm -f conftest.vals
2870:
2871: cat >> $CONFIG_STATUS <<\EOF
2872: rm -f conftest.frag conftest.h
2873: echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2874: cat conftest.in >> conftest.h
2875: rm -f conftest.in
2876: if cmp -s $ac_file conftest.h 2>/dev/null; then
2877: echo "$ac_file is unchanged"
2878: rm -f conftest.h
2879: else
2880: # Remove last slash and all that follows it. Not all systems have dirname.
2881: ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2882: if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2883: # The file is in a subdirectory.
2884: test ! -d "$ac_dir" && mkdir "$ac_dir"
2885: fi
2886: rm -f $ac_file
2887: mv conftest.h $ac_file
2888: fi
2889: fi; done
2890:
2891:
2892:
2893: exit 0
2894: EOF
2895: chmod +x $CONFIG_STATUS
2896: rm -fr confdefs* $ac_clean_files
2897: test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2898:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.