Release 951124
[wine/multimedia.git] / configure
blob3223ea75dcda489dd10076870f5555631d5f9489
1 #! /bin/sh
3 # From configure.in configure.in 1.00
4 # Guess values for system-dependent variables and create Makefiles.
5 # Generated automatically using autoconf version 2.4
6 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Defaults:
12 ac_help=
13 ac_default_prefix=/usr/local
14 # Any additions from configure.in:
15 ac_help="$ac_help
16 --with-library build Wine as a library instead of an emulator"
17 ac_help="$ac_help
18 --with-language=LANG change the language (LANG=En/De/Fr/Es/No/Fi/Da)"
19 ac_help="$ac_help
20 --with-ipc use inter-process communication for DDE"
21 ac_help="$ac_help
22 --with-malloc-debug enable malloc() debugging"
23 ac_help="$ac_help
24 --with-x use the X Window System"
26 # Initialize some variables set by options.
27 # The variables have the same names as the options, with
28 # dashes changed to underlines.
29 build=NONE
30 cache_file=./config.cache
31 exec_prefix=NONE
32 host=NONE
33 no_create=
34 nonopt=NONE
35 no_recursion=
36 prefix=NONE
37 program_prefix=NONE
38 program_suffix=NONE
39 program_transform_name=s,x,x,
40 silent=
41 site=
42 srcdir=
43 target=NONE
44 verbose=
45 x_includes=NONE
46 x_libraries=NONE
48 # Initialize some other variables.
49 subdirs=
51 ac_prev=
52 for ac_option
55 # If the previous option needs an argument, assign it.
56 if test -n "$ac_prev"; then
57 eval "$ac_prev=\$ac_option"
58 ac_prev=
59 continue
62 case "$ac_option" in
63 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
64 *) ac_optarg= ;;
65 esac
67 # Accept the important Cygnus configure options, so we can diagnose typos.
69 case "$ac_option" in
71 -build | --build | --buil | --bui | --bu | --b)
72 ac_prev=build ;;
73 -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
74 build="$ac_optarg" ;;
76 -cache-file | --cache-file | --cache-fil | --cache-fi \
77 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
78 ac_prev=cache_file ;;
79 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
80 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
81 cache_file="$ac_optarg" ;;
83 -disable-* | --disable-*)
84 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
85 # Reject names that are not valid shell variable names.
86 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
87 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
89 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
90 eval "enable_${ac_feature}=no" ;;
92 -enable-* | --enable-*)
93 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
94 # Reject names that are not valid shell variable names.
95 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
96 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
98 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
99 case "$ac_option" in
100 *=*) ;;
101 *) ac_optarg=yes ;;
102 esac
103 eval "enable_${ac_feature}='$ac_optarg'" ;;
105 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
106 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
107 | --exec | --exe | --ex)
108 ac_prev=exec_prefix ;;
109 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
110 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
111 | --exec=* | --exe=* | --ex=*)
112 exec_prefix="$ac_optarg" ;;
114 -gas | --gas | --ga | --g)
115 # Obsolete; use --with-gas.
116 with_gas=yes ;;
118 -help | --help | --hel | --he)
119 # Omit some internal or obsolete options to make the list less imposing.
120 # This message is too long to be a string in the A/UX 3.1 sh.
121 cat << EOF
122 Usage: configure [options] [host]
123 Options: [defaults in brackets after descriptions]
124 Configuration:
125 --cache-file=FILE cache test results in FILE
126 --help print this message
127 --no-create do not create output files
128 --quiet, --silent do not print \`checking...' messages
129 --version print the version of autoconf that created configure
130 Directory and file names:
131 --prefix=PREFIX install architecture-independent files in PREFIX
132 [$ac_default_prefix]
133 --exec-prefix=PREFIX install architecture-dependent files in PREFIX
134 [same as prefix]
135 --srcdir=DIR find the sources in DIR [configure dir or ..]
136 --program-prefix=PREFIX prepend PREFIX to installed program names
137 --program-suffix=SUFFIX append SUFFIX to installed program names
138 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
139 Host type:
140 --build=BUILD configure for building on BUILD [BUILD=HOST]
141 --host=HOST configure for HOST [guessed]
142 --target=TARGET configure for TARGET [TARGET=HOST]
143 Features and packages:
144 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
145 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
146 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
147 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
148 --x-includes=DIR X include files are in DIR
149 --x-libraries=DIR X library files are in DIR
150 --enable and --with options recognized:$ac_help
152 exit 0 ;;
154 -host | --host | --hos | --ho)
155 ac_prev=host ;;
156 -host=* | --host=* | --hos=* | --ho=*)
157 host="$ac_optarg" ;;
159 -nfp | --nfp | --nf)
160 # Obsolete; use --without-fp.
161 with_fp=no ;;
163 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
164 | --no-cr | --no-c)
165 no_create=yes ;;
167 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
168 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
169 no_recursion=yes ;;
171 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
172 ac_prev=prefix ;;
173 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
174 prefix="$ac_optarg" ;;
176 -program-prefix | --program-prefix | --program-prefi | --program-pref \
177 | --program-pre | --program-pr | --program-p)
178 ac_prev=program_prefix ;;
179 -program-prefix=* | --program-prefix=* | --program-prefi=* \
180 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
181 program_prefix="$ac_optarg" ;;
183 -program-suffix | --program-suffix | --program-suffi | --program-suff \
184 | --program-suf | --program-su | --program-s)
185 ac_prev=program_suffix ;;
186 -program-suffix=* | --program-suffix=* | --program-suffi=* \
187 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
188 program_suffix="$ac_optarg" ;;
190 -program-transform-name | --program-transform-name \
191 | --program-transform-nam | --program-transform-na \
192 | --program-transform-n | --program-transform- \
193 | --program-transform | --program-transfor \
194 | --program-transfo | --program-transf \
195 | --program-trans | --program-tran \
196 | --progr-tra | --program-tr | --program-t)
197 ac_prev=program_transform_name ;;
198 -program-transform-name=* | --program-transform-name=* \
199 | --program-transform-nam=* | --program-transform-na=* \
200 | --program-transform-n=* | --program-transform-=* \
201 | --program-transform=* | --program-transfor=* \
202 | --program-transfo=* | --program-transf=* \
203 | --program-trans=* | --program-tran=* \
204 | --progr-tra=* | --program-tr=* | --program-t=*)
205 program_transform_name="$ac_optarg" ;;
207 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
208 | -silent | --silent | --silen | --sile | --sil)
209 silent=yes ;;
211 -site | --site | --sit)
212 ac_prev=site ;;
213 -site=* | --site=* | --sit=*)
214 site="$ac_optarg" ;;
216 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
217 ac_prev=srcdir ;;
218 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
219 srcdir="$ac_optarg" ;;
221 -target | --target | --targe | --targ | --tar | --ta | --t)
222 ac_prev=target ;;
223 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
224 target="$ac_optarg" ;;
226 -v | -verbose | --verbose | --verbos | --verbo | --verb)
227 verbose=yes ;;
229 -version | --version | --versio | --versi | --vers)
230 echo "configure generated by autoconf version 2.4"
231 exit 0 ;;
233 -with-* | --with-*)
234 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
235 # Reject names that are not valid shell variable names.
236 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
237 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
239 ac_package=`echo $ac_package| sed 's/-/_/g'`
240 case "$ac_option" in
241 *=*) ;;
242 *) ac_optarg=yes ;;
243 esac
244 eval "with_${ac_package}='$ac_optarg'" ;;
246 -without-* | --without-*)
247 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
248 # Reject names that are not valid shell variable names.
249 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
250 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
252 ac_package=`echo $ac_package| sed 's/-/_/g'`
253 eval "with_${ac_package}=no" ;;
255 --x)
256 # Obsolete; use --with-x.
257 with_x=yes ;;
259 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
260 | --x-incl | --x-inc | --x-in | --x-i)
261 ac_prev=x_includes ;;
262 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
263 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
264 x_includes="$ac_optarg" ;;
266 -x-libraries | --x-libraries | --x-librarie | --x-librari \
267 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
268 ac_prev=x_libraries ;;
269 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
270 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
271 x_libraries="$ac_optarg" ;;
273 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
277 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
278 echo "configure: warning: $ac_option: invalid host type" 1>&2
280 if test "x$nonopt" != xNONE; then
281 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
283 nonopt="$ac_option"
286 esac
287 done
289 if test -n "$ac_prev"; then
290 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
293 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
295 # File descriptor usage:
296 # 0 standard input
297 # 1 file creation
298 # 2 errors and warnings
299 # 3 some systems may open it to /dev/tty
300 # 4 used on the Kubota Titan
301 # 6 checking for... messages and results
302 # 5 compiler messages saved in config.log
303 if test "$silent" = yes; then
304 exec 6>/dev/null
305 else
306 exec 6>&1
308 exec 5>./config.log
310 echo "\
311 This file contains any messages produced by compilers while
312 running configure, to aid debugging if configure makes a mistake.
313 " 1>&5
315 # Strip out --no-create and --no-recursion so they do not pile up.
316 # Also quote any args containing shell metacharacters.
317 ac_configure_args=
318 for ac_arg
320 case "$ac_arg" in
321 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322 | --no-cr | --no-c) ;;
323 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
324 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
325 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
326 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
327 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
328 esac
329 done
331 # NLS nuisances.
332 # Only set LANG and LC_ALL to C if already set.
333 # These must not be set unconditionally because not all systems understand
334 # e.g. LANG=C (notably SCO).
335 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
336 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
338 # confdefs.h avoids OS command line length limits that DEFS can exceed.
339 rm -rf conftest* confdefs.h
340 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
341 echo > confdefs.h
343 # A filename unique to this package, relative to the directory that
344 # configure is in, which we can look for to find out if srcdir is correct.
345 ac_unique_file=controls/edit.c
347 # Find the source files, if location was not specified.
348 if test -z "$srcdir"; then
349 ac_srcdir_defaulted=yes
350 # Try the directory containing this script, then its parent.
351 ac_prog=$0
352 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
353 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
354 srcdir=$ac_confdir
355 if test ! -r $srcdir/$ac_unique_file; then
356 srcdir=..
358 else
359 ac_srcdir_defaulted=no
361 if test ! -r $srcdir/$ac_unique_file; then
362 if test "$ac_srcdir_defaulted" = yes; then
363 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
364 else
365 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
368 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
370 # Prefer explicitly selected file to automatically selected ones.
371 if test -z "$CONFIG_SITE"; then
372 if test "x$prefix" != xNONE; then
373 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
374 else
375 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
378 for ac_site_file in $CONFIG_SITE; do
379 if test -r "$ac_site_file"; then
380 echo "loading site script $ac_site_file"
381 . "$ac_site_file"
383 done
385 if test -r "$cache_file"; then
386 echo "loading cache $cache_file"
387 . $cache_file
388 else
389 echo "creating cache $cache_file"
390 > $cache_file
393 ac_ext=c
394 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
395 ac_cpp='$CPP $CPPFLAGS'
396 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
397 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
399 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
400 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
401 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
402 ac_n= ac_c='
403 ' ac_t=' '
404 else
405 ac_n=-n ac_c= ac_t=
407 else
408 ac_n= ac_c='\c' ac_t=
413 # We want these before the checks, so the checks can modify their values.
414 test -z "$CFLAGS" && CFLAGS="-g -O2 -Wall"
415 test -z "$LDFLAGS" && LDFLAGS=-g
416 test -z "$LDLIBS" && LDLIBS=-lm
419 # Check whether --with-library or --without-library was given.
420 withval="$with_library"
421 if test -n "$withval"; then
422 cat >> confdefs.h <<\EOF
423 #define WINELIB 1
425 MAIN_TARGET="winelib.a"
426 else
427 MAIN_TARGET="wine"
432 # Check whether --with-language or --without-language was given.
433 withval="$with_language"
434 if test -n "$withval"; then
435 LANG="$withval"
436 else
437 LANG=En
442 # Check whether --with-ipc or --without-ipc was given.
443 withval="$with_ipc"
444 if test -n "$withval"; then
445 cat >> confdefs.h <<\EOF
446 #define CONFIG_IPC 1
452 # Check whether --with-malloc-debug or --without-malloc-debug was given.
453 withval="$with_malloc_debug"
454 if test -n "$withval"; then
455 cat >> confdefs.h <<\EOF
456 #define MALLOC_DEBUGGING 1
463 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
464 set dummy ${MAKE-make}; ac_make=$2
465 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
466 echo $ac_n "(cached) $ac_c" 1>&6
467 else
468 cat > conftestmake <<\EOF
469 all:
470 @echo 'ac_maketemp="${MAKE}"'
472 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
473 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
474 if test -n "$ac_maketemp"; then
475 eval ac_cv_prog_make_${ac_make}_set=yes
476 else
477 eval ac_cv_prog_make_${ac_make}_set=no
479 rm -f conftestmake
481 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
482 echo "$ac_t""yes" 1>&6
483 SET_MAKE=
484 else
485 echo "$ac_t""no" 1>&6
486 SET_MAKE="MAKE=${MAKE-make}"
489 # Extract the first word of "gcc", so it can be a program name with args.
490 set dummy gcc; ac_word=$2
491 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
492 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
493 echo $ac_n "(cached) $ac_c" 1>&6
494 else
495 if test -n "$CC"; then
496 ac_cv_prog_CC="$CC" # Let the user override the test.
497 else
498 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
499 for ac_dir in $PATH; do
500 test -z "$ac_dir" && ac_dir=.
501 if test -f $ac_dir/$ac_word; then
502 ac_cv_prog_CC="gcc"
503 break
505 done
506 IFS="$ac_save_ifs"
507 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
510 CC="$ac_cv_prog_CC"
511 if test -n "$CC"; then
512 echo "$ac_t""$CC" 1>&6
513 else
514 echo "$ac_t""no" 1>&6
518 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
519 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
520 echo $ac_n "(cached) $ac_c" 1>&6
521 else
522 cat > conftest.c <<EOF
523 #ifdef __GNUC__
524 yes;
525 #endif
527 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
528 ac_cv_prog_gcc=yes
529 else
530 ac_cv_prog_gcc=no
533 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
534 if test $ac_cv_prog_gcc = yes; then
535 GCC=yes
536 if test "${CFLAGS+set}" != set; then
537 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
538 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
539 echo $ac_n "(cached) $ac_c" 1>&6
540 else
541 echo 'void f(){}' > conftest.c
542 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
543 ac_cv_prog_gcc_g=yes
544 else
545 ac_cv_prog_gcc_g=no
547 rm -f conftest*
550 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
551 if test $ac_cv_prog_gcc_g = yes; then
552 CFLAGS="-g -O"
553 else
554 CFLAGS="-O"
557 else
558 GCC=
559 test "${CFLAGS+set}" = set || CFLAGS="-g"
562 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
563 # On Suns, sometimes $CPP names a directory.
564 if test -n "$CPP" && test -d "$CPP"; then
565 CPP=
567 if test -z "$CPP"; then
568 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
569 echo $ac_n "(cached) $ac_c" 1>&6
570 else
571 # This must be in double quotes, not single quotes, because CPP may get
572 # substituted into the Makefile and "${CC-cc}" will confuse make.
573 CPP="${CC-cc} -E"
574 # On the NeXT, cc -E runs the code through the compiler's parser,
575 # not just through cpp.
576 cat > conftest.$ac_ext <<EOF
577 #line 578 "configure"
578 #include "confdefs.h"
579 #include <assert.h>
580 Syntax Error
582 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
583 ac_err=`grep -v '^ *+' conftest.out`
584 if test -z "$ac_err"; then
586 else
587 echo "$ac_err" >&5
588 rm -rf conftest*
589 CPP="${CC-cc} -E -traditional-cpp"
590 cat > conftest.$ac_ext <<EOF
591 #line 592 "configure"
592 #include "confdefs.h"
593 #include <assert.h>
594 Syntax Error
596 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
597 ac_err=`grep -v '^ *+' conftest.out`
598 if test -z "$ac_err"; then
600 else
601 echo "$ac_err" >&5
602 rm -rf conftest*
603 CPP=/lib/cpp
605 rm -f conftest*
607 rm -f conftest*
608 ac_cv_prog_CPP="$CPP"
610 CPP="$ac_cv_prog_CPP"
611 else
612 ac_cv_prog_CPP="$CPP"
614 echo "$ac_t""$CPP" 1>&6
616 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
617 if test -d /etc/conf/kconfig.d &&
618 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
619 then
620 echo "$ac_t""yes" 1>&6
621 ISC=yes # If later tests want to check for ISC.
622 cat >> confdefs.h <<\EOF
623 #define _POSIX_SOURCE 1
626 if test "$GCC" = yes; then
627 CC="$CC -posix"
628 else
629 CC="$CC -Xp"
631 else
632 echo "$ac_t""no" 1>&6
633 ISC=
636 # If we find X, set shell vars x_includes and x_libraries to the
637 # paths, otherwise set no_x=yes.
638 # Uses ac_ vars as temps to allow command line to override cache and checks.
639 # --without-x overrides everything else, but does not touch the cache.
640 echo $ac_n "checking for X""... $ac_c" 1>&6
642 # Check whether --with-x or --without-x was given.
643 withval="$with_x"
644 if test -n "$withval"; then
648 if test "x$with_x" = xno; then
649 no_x=yes
650 else
651 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
652 no_x=
653 else
654 if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
655 echo $ac_n "(cached) $ac_c" 1>&6
656 else
657 # One or both of the vars are not set, and there is no cached value.
658 no_x=yes
659 rm -fr conftestdir
660 if mkdir conftestdir; then
661 cd conftestdir
662 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
663 cat > Imakefile <<'EOF'
664 acfindx:
665 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
667 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
668 no_x=
669 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
670 eval `make acfindx 2>/dev/null | grep -v make`
671 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
672 for ac_extension in a so sl; do
673 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
674 test -f $ac_im_libdir/libX11.$ac_extension; then
675 ac_im_usrlibdir=$ac_im_libdir; break
677 done
678 # Screen out bogus values from the imake configuration.
679 case "$ac_im_incroot" in
680 /usr/include) ;;
681 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
682 esac
683 case "$ac_im_usrlibdir" in
684 /usr/lib | /lib) ;;
685 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
686 esac
688 cd ..
689 rm -fr conftestdir
692 if test "$no_x" = yes; then
693 test -z "$x_direct_test_library" && x_direct_test_library=Xt
694 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
695 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
696 cat > conftest.$ac_ext <<EOF
697 #line 698 "configure"
698 #include "confdefs.h"
699 #include <$x_direct_test_include>
701 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
702 ac_err=`grep -v '^ *+' conftest.out`
703 if test -z "$ac_err"; then
704 rm -rf conftest*
705 no_x= ac_x_includes=
706 else
707 echo "$ac_err" >&5
708 rm -rf conftest*
709 for ac_dir in \
710 /usr/X11R6/include \
711 /usr/X11R5/include \
712 /usr/X11R4/include \
714 /usr/include/X11R6 \
715 /usr/include/X11R5 \
716 /usr/include/X11R4 \
718 /usr/local/X11R6/include \
719 /usr/local/X11R5/include \
720 /usr/local/X11R4/include \
722 /usr/local/include/X11R6 \
723 /usr/local/include/X11R5 \
724 /usr/local/include/X11R4 \
726 /usr/X11/include \
727 /usr/include/X11 \
728 /usr/local/X11/include \
729 /usr/local/include/X11 \
731 /usr/X386/include \
732 /usr/x386/include \
733 /usr/XFree86/include/X11 \
735 /usr/include \
736 /usr/local/include \
737 /usr/unsupported/include \
738 /usr/athena/include \
739 /usr/local/x11r5/include \
740 /usr/lpp/Xamples/include \
742 /usr/openwin/include \
743 /usr/openwin/share/include \
746 if test -r "$ac_dir/$x_direct_test_include"; then
747 no_x= ac_x_includes=$ac_dir
748 break
750 done
752 rm -f conftest*
754 # Check for the libraries.
755 # See if we find them without any special options.
756 # Don't add to $LIBS permanently.
757 ac_save_LIBS="$LIBS"
758 LIBS="-l$x_direct_test_library $LIBS"
759 cat > conftest.$ac_ext <<EOF
760 #line 761 "configure"
761 #include "confdefs.h"
763 int main() { return 0; }
764 int t() {
765 ${x_direct_test_function}()
766 ; return 0; }
768 if eval $ac_link; then
769 rm -rf conftest*
770 LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
771 else
772 rm -rf conftest*
773 LIBS="$ac_save_LIBS"
774 # First see if replacing the include by lib works.
775 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
776 /usr/X11R6/lib \
777 /usr/X11R5/lib \
778 /usr/X11R4/lib \
780 /usr/lib/X11R6 \
781 /usr/lib/X11R5 \
782 /usr/lib/X11R4 \
784 /usr/local/X11R6/lib \
785 /usr/local/X11R5/lib \
786 /usr/local/X11R4/lib \
788 /usr/local/lib/X11R6 \
789 /usr/local/lib/X11R5 \
790 /usr/local/lib/X11R4 \
792 /usr/X11/lib \
793 /usr/lib/X11 \
794 /usr/local/X11/lib \
795 /usr/local/lib/X11 \
797 /usr/X386/lib \
798 /usr/x386/lib \
799 /usr/XFree86/lib/X11 \
801 /usr/lib \
802 /usr/local/lib \
803 /usr/unsupported/lib \
804 /usr/athena/lib \
805 /usr/local/x11r5/lib \
806 /usr/lpp/Xamples/lib \
808 /usr/openwin/lib \
809 /usr/openwin/share/lib \
812 for ac_extension in a so sl; do
813 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
814 no_x= ac_x_libraries=$ac_dir
815 break 2
817 done
818 done
820 rm -f conftest*
823 if test "$no_x" = yes; then
824 ac_cv_path_x="no_x=yes"
825 else
826 ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
830 eval "$ac_cv_path_x"
831 fi # $with_x != no
833 if test "$no_x" = yes; then
834 echo "$ac_t""no" 1>&6
835 else
836 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
837 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
838 ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
839 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
842 if test "$no_x" = yes; then
843 # Not all programs may use this symbol, but it does not hurt to define it.
844 X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
845 else
846 if test -n "$x_includes"; then
847 X_CFLAGS="$X_CFLAGS -I$x_includes"
850 # It would be nice to have a more robust check for the -R ld option than
851 # just checking for Solaris.
852 # It would also be nice to do this for all -L options, not just this one.
853 if test -n "$x_libraries"; then
854 X_LIBS="$X_LIBS -L$x_libraries"
855 if test "`(uname) 2>/dev/null`" = SunOS &&
856 uname -r | grep '^5' >/dev/null; then
857 X_LIBS="$X_LIBS -R$x_libraries"
861 # Check for libraries that X11R6 Xt/Xaw programs need.
863 ac_save_LDFLAGS="$LDFLAGS"
864 LDFLAGS="$LDFLAGS -L$x_libraries"
865 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
866 # check for ICE first), but we must link in the order -lSM -lICE or
867 # we get undefined symbols. So assume we have SM if we have ICE.
868 # These have to be linked with before -lX11, unlike the other
869 # libraries we check for below, so use a different variable.
870 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
871 echo $ac_n "checking for -lICE""... $ac_c" 1>&6
872 if eval "test \"`echo '$''{'ac_cv_lib_ICE'+set}'`\" = set"; then
873 echo $ac_n "(cached) $ac_c" 1>&6
874 else
875 ac_save_LIBS="$LIBS"
876 LIBS="-lICE $LIBS"
877 cat > conftest.$ac_ext <<EOF
878 #line 879 "configure"
879 #include "confdefs.h"
881 int main() { return 0; }
882 int t() {
883 IceConnectionNumber()
884 ; return 0; }
886 if eval $ac_link; then
887 rm -rf conftest*
888 eval "ac_cv_lib_ICE=yes"
889 else
890 rm -rf conftest*
891 eval "ac_cv_lib_ICE=no"
893 rm -f conftest*
894 LIBS="$ac_save_LIBS"
897 if eval "test \"`echo '$ac_cv_lib_'ICE`\" = yes"; then
898 echo "$ac_t""yes" 1>&6
899 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
900 else
901 echo "$ac_t""no" 1>&6
904 LDFLAGS="$ac_save_LDFLAGS"
906 # Check for system-dependent libraries X programs must link with.
908 if test "$ISC" = yes; then
909 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
910 else
911 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
912 # libraries were built with DECnet support. And karl@cs.umb.edu says
913 # the Alpha needs dnet_stub (dnet does not exist).
914 echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
915 if eval "test \"`echo '$''{'ac_cv_lib_dnet'+set}'`\" = set"; then
916 echo $ac_n "(cached) $ac_c" 1>&6
917 else
918 ac_save_LIBS="$LIBS"
919 LIBS="-ldnet $LIBS"
920 cat > conftest.$ac_ext <<EOF
921 #line 922 "configure"
922 #include "confdefs.h"
924 int main() { return 0; }
925 int t() {
926 dnet_ntoa()
927 ; return 0; }
929 if eval $ac_link; then
930 rm -rf conftest*
931 eval "ac_cv_lib_dnet=yes"
932 else
933 rm -rf conftest*
934 eval "ac_cv_lib_dnet=no"
936 rm -f conftest*
937 LIBS="$ac_save_LIBS"
940 if eval "test \"`echo '$ac_cv_lib_'dnet`\" = yes"; then
941 echo "$ac_t""yes" 1>&6
942 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
943 else
944 echo "$ac_t""no" 1>&6
947 if test $ac_cv_lib_dnet = no; then
948 echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
949 if eval "test \"`echo '$''{'ac_cv_lib_dnet_stub'+set}'`\" = set"; then
950 echo $ac_n "(cached) $ac_c" 1>&6
951 else
952 ac_save_LIBS="$LIBS"
953 LIBS="-ldnet_stub $LIBS"
954 cat > conftest.$ac_ext <<EOF
955 #line 956 "configure"
956 #include "confdefs.h"
958 int main() { return 0; }
959 int t() {
960 dnet_ntoa()
961 ; return 0; }
963 if eval $ac_link; then
964 rm -rf conftest*
965 eval "ac_cv_lib_dnet_stub=yes"
966 else
967 rm -rf conftest*
968 eval "ac_cv_lib_dnet_stub=no"
970 rm -f conftest*
971 LIBS="$ac_save_LIBS"
974 if eval "test \"`echo '$ac_cv_lib_'dnet_stub`\" = yes"; then
975 echo "$ac_t""yes" 1>&6
976 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
977 else
978 echo "$ac_t""no" 1>&6
983 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
984 # to get the SysV transport functions.
985 # Not sure which flavor of 386 UNIX this is, but it seems harmless to
986 # check for it.
987 echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
988 if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
989 echo $ac_n "(cached) $ac_c" 1>&6
990 else
991 ac_save_LIBS="$LIBS"
992 LIBS="-lnsl $LIBS"
993 cat > conftest.$ac_ext <<EOF
994 #line 995 "configure"
995 #include "confdefs.h"
997 int main() { return 0; }
998 int t() {
999 t_accept()
1000 ; return 0; }
1002 if eval $ac_link; then
1003 rm -rf conftest*
1004 eval "ac_cv_lib_nsl=yes"
1005 else
1006 rm -rf conftest*
1007 eval "ac_cv_lib_nsl=no"
1009 rm -f conftest*
1010 LIBS="$ac_save_LIBS"
1013 if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
1014 echo "$ac_t""yes" 1>&6
1015 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1016 else
1017 echo "$ac_t""no" 1>&6
1021 # lieder@skyler.mavd.honeywell.com says without -lsocket,
1022 # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
1023 # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
1024 if test "`(uname) 2>/dev/null`" != IRIX; then
1025 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
1026 if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
1027 echo $ac_n "(cached) $ac_c" 1>&6
1028 else
1029 ac_save_LIBS="$LIBS"
1030 LIBS="-lsocket $LIBS"
1031 cat > conftest.$ac_ext <<EOF
1032 #line 1033 "configure"
1033 #include "confdefs.h"
1035 int main() { return 0; }
1036 int t() {
1037 socket()
1038 ; return 0; }
1040 if eval $ac_link; then
1041 rm -rf conftest*
1042 eval "ac_cv_lib_socket=yes"
1043 else
1044 rm -rf conftest*
1045 eval "ac_cv_lib_socket=no"
1047 rm -f conftest*
1048 LIBS="$ac_save_LIBS"
1051 if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
1052 echo "$ac_t""yes" 1>&6
1053 X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
1054 else
1055 echo "$ac_t""no" 1>&6
1062 for ac_prog in 'bison -y' byacc
1064 # Extract the first word of "$ac_prog", so it can be a program name with args.
1065 set dummy $ac_prog; ac_word=$2
1066 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1067 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1068 echo $ac_n "(cached) $ac_c" 1>&6
1069 else
1070 if test -n "$YACC"; then
1071 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1072 else
1073 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1074 for ac_dir in $PATH; do
1075 test -z "$ac_dir" && ac_dir=.
1076 if test -f $ac_dir/$ac_word; then
1077 ac_cv_prog_YACC="$ac_prog"
1078 break
1080 done
1081 IFS="$ac_save_ifs"
1084 YACC="$ac_cv_prog_YACC"
1085 if test -n "$YACC"; then
1086 echo "$ac_t""$YACC" 1>&6
1087 else
1088 echo "$ac_t""no" 1>&6
1091 test -n "$YACC" && break
1092 done
1093 test -n "$YACC" || YACC="yacc"
1095 # Extract the first word of "flex", so it can be a program name with args.
1096 set dummy flex; ac_word=$2
1097 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1098 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1099 echo $ac_n "(cached) $ac_c" 1>&6
1100 else
1101 if test -n "$LEX"; then
1102 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1103 else
1104 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1105 for ac_dir in $PATH; do
1106 test -z "$ac_dir" && ac_dir=.
1107 if test -f $ac_dir/$ac_word; then
1108 ac_cv_prog_LEX="flex"
1109 break
1111 done
1112 IFS="$ac_save_ifs"
1113 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1116 LEX="$ac_cv_prog_LEX"
1117 if test -n "$LEX"; then
1118 echo "$ac_t""$LEX" 1>&6
1119 else
1120 echo "$ac_t""no" 1>&6
1123 if test -z "$LEXLIB"
1124 then
1125 case "$LEX" in
1126 flex*) ac_lib=fl ;;
1127 *) ac_lib=l ;;
1128 esac
1129 echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
1130 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib'+set}'`\" = set"; then
1131 echo $ac_n "(cached) $ac_c" 1>&6
1132 else
1133 ac_save_LIBS="$LIBS"
1134 LIBS="-l$ac_lib $LIBS"
1135 cat > conftest.$ac_ext <<EOF
1136 #line 1137 "configure"
1137 #include "confdefs.h"
1139 int main() { return 0; }
1140 int t() {
1141 yywrap()
1142 ; return 0; }
1144 if eval $ac_link; then
1145 rm -rf conftest*
1146 eval "ac_cv_lib_$ac_lib=yes"
1147 else
1148 rm -rf conftest*
1149 eval "ac_cv_lib_$ac_lib=no"
1151 rm -f conftest*
1152 LIBS="$ac_save_LIBS"
1155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib`\" = yes"; then
1156 echo "$ac_t""yes" 1>&6
1157 LEXLIB="-l$ac_lib"
1158 else
1159 echo "$ac_t""no" 1>&6
1164 # Extract the first word of "ranlib", so it can be a program name with args.
1165 set dummy ranlib; ac_word=$2
1166 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1167 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1168 echo $ac_n "(cached) $ac_c" 1>&6
1169 else
1170 if test -n "$RANLIB"; then
1171 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1172 else
1173 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1174 for ac_dir in $PATH; do
1175 test -z "$ac_dir" && ac_dir=.
1176 if test -f $ac_dir/$ac_word; then
1177 ac_cv_prog_RANLIB="ranlib"
1178 break
1180 done
1181 IFS="$ac_save_ifs"
1182 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1185 RANLIB="$ac_cv_prog_RANLIB"
1186 if test -n "$RANLIB"; then
1187 echo "$ac_t""$RANLIB" 1>&6
1188 else
1189 echo "$ac_t""no" 1>&6
1192 echo $ac_n "checking for -li386""... $ac_c" 1>&6
1193 if eval "test \"`echo '$''{'ac_cv_lib_i386'+set}'`\" = set"; then
1194 echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196 ac_save_LIBS="$LIBS"
1197 LIBS="-li386 $LIBS"
1198 cat > conftest.$ac_ext <<EOF
1199 #line 1200 "configure"
1200 #include "confdefs.h"
1202 int main() { return 0; }
1203 int t() {
1204 i386_set_ldt()
1205 ; return 0; }
1207 if eval $ac_link; then
1208 rm -rf conftest*
1209 eval "ac_cv_lib_i386=yes"
1210 else
1211 rm -rf conftest*
1212 eval "ac_cv_lib_i386=no"
1214 rm -f conftest*
1215 LIBS="$ac_save_LIBS"
1218 if eval "test \"`echo '$ac_cv_lib_'i386`\" = yes"; then
1219 echo "$ac_t""yes" 1>&6
1220 LDLIBS="$LDLIBS -li386"
1221 else
1222 echo "$ac_t""no" 1>&6
1227 for ac_func in tcgetattr
1229 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1230 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1231 echo $ac_n "(cached) $ac_c" 1>&6
1232 else
1233 cat > conftest.$ac_ext <<EOF
1234 #line 1235 "configure"
1235 #include "confdefs.h"
1236 /* System header to define __stub macros and hopefully few prototypes,
1237 which can conflict with char $ac_func(); below. */
1238 #include <assert.h>
1239 /* Override any gcc2 internal prototype to avoid an error. */
1240 char $ac_func();
1242 int main() { return 0; }
1243 int t() {
1245 /* The GNU C library defines this for functions which it implements
1246 to always fail with ENOSYS. Some functions are actually named
1247 something starting with __ and the normal name is an alias. */
1248 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1249 choke me
1250 #else
1251 $ac_func();
1252 #endif
1254 ; return 0; }
1256 if eval $ac_link; then
1257 rm -rf conftest*
1258 eval "ac_cv_func_$ac_func=yes"
1259 else
1260 rm -rf conftest*
1261 eval "ac_cv_func_$ac_func=no"
1263 rm -f conftest*
1266 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1267 echo "$ac_t""yes" 1>&6
1268 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1269 cat >> confdefs.h <<EOF
1270 #define $ac_tr_func 1
1273 else
1274 echo "$ac_t""no" 1>&6
1276 done
1278 for ac_hdr in stdlib.h
1280 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1281 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1282 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1283 echo $ac_n "(cached) $ac_c" 1>&6
1284 else
1285 cat > conftest.$ac_ext <<EOF
1286 #line 1287 "configure"
1287 #include "confdefs.h"
1288 #include <$ac_hdr>
1290 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1291 ac_err=`grep -v '^ *+' conftest.out`
1292 if test -z "$ac_err"; then
1293 rm -rf conftest*
1294 eval "ac_cv_header_$ac_safe=yes"
1295 else
1296 echo "$ac_err" >&5
1297 rm -rf conftest*
1298 eval "ac_cv_header_$ac_safe=no"
1300 rm -f conftest*
1302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1303 echo "$ac_t""yes" 1>&6
1304 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1305 cat >> confdefs.h <<EOF
1306 #define $ac_tr_hdr 1
1309 else
1310 echo "$ac_t""no" 1>&6
1312 done
1314 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1315 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1316 echo $ac_n "(cached) $ac_c" 1>&6
1317 else
1318 cat > conftest.$ac_ext <<EOF
1319 #line 1320 "configure"
1320 #include "confdefs.h"
1321 #include <sys/types.h>
1322 #include <sys/stat.h>
1324 #if defined(S_ISBLK) && defined(S_IFDIR)
1325 # if S_ISBLK (S_IFDIR)
1326 You lose.
1327 # endif
1328 #endif
1330 #if defined(S_ISBLK) && defined(S_IFCHR)
1331 # if S_ISBLK (S_IFCHR)
1332 You lose.
1333 # endif
1334 #endif
1336 #if defined(S_ISLNK) && defined(S_IFREG)
1337 # if S_ISLNK (S_IFREG)
1338 You lose.
1339 # endif
1340 #endif
1342 #if defined(S_ISSOCK) && defined(S_IFREG)
1343 # if S_ISSOCK (S_IFREG)
1344 You lose.
1345 # endif
1346 #endif
1349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1350 egrep "You lose" >/dev/null 2>&1; then
1351 rm -rf conftest*
1352 ac_cv_header_stat_broken=yes
1353 else
1354 rm -rf conftest*
1355 ac_cv_header_stat_broken=no
1357 rm -f conftest*
1360 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1361 if test $ac_cv_header_stat_broken = yes; then
1362 cat >> confdefs.h <<\EOF
1363 #define STAT_MACROS_BROKEN 1
1368 echo $ac_n "checking for working const""... $ac_c" 1>&6
1369 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
1371 else
1372 cat > conftest.$ac_ext <<EOF
1373 #line 1374 "configure"
1374 #include "confdefs.h"
1376 int main() { return 0; }
1377 int t() {
1379 /* Ultrix mips cc rejects this. */
1380 typedef int charset[2]; const charset x;
1381 /* SunOS 4.1.1 cc rejects this. */
1382 char const *const *ccp;
1383 char **p;
1384 /* NEC SVR4.0.2 mips cc rejects this. */
1385 struct point {int x, y;};
1386 static struct point const zero;
1387 /* AIX XL C 1.02.0.0 rejects this.
1388 It does not let you subtract one const X* pointer from another in an arm
1389 of an if-expression whose if-part is not a constant expression */
1390 const char *g = "string";
1391 ccp = &g + (g ? g-g : 0);
1392 /* HPUX 7.0 cc rejects these. */
1393 ++ccp;
1394 p = (char**) ccp;
1395 ccp = (char const *const *) p;
1396 { /* SCO 3.2v4 cc rejects this. */
1397 char *t;
1398 char const *s = 0 ? (char *) 0 : (char const *) 0;
1400 *t++ = 0;
1402 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1403 int x[] = {25, 17};
1404 const int *foo = &x[0];
1405 ++foo;
1407 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1408 typedef const int *iptr;
1409 iptr p = 0;
1410 ++p;
1412 { /* AIX XL C 1.02.0.0 rejects this saying
1413 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1414 struct s { int j; const int *ap[3]; };
1415 struct s *b; b->j = 5;
1417 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1418 const int foo = 10;
1421 ; return 0; }
1423 if eval $ac_compile; then
1424 rm -rf conftest*
1425 ac_cv_c_const=yes
1426 else
1427 rm -rf conftest*
1428 ac_cv_c_const=no
1430 rm -f conftest*
1433 echo "$ac_t""$ac_cv_c_const" 1>&6
1434 if test $ac_cv_c_const = no; then
1435 cat >> confdefs.h <<\EOF
1436 #define const
1441 # If we cannot run a trivial program, we must be cross compiling.
1442 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1443 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1444 echo $ac_n "(cached) $ac_c" 1>&6
1445 else
1446 if test "$cross_compiling" = yes; then
1447 ac_cv_c_cross=yes
1448 else
1449 cat > conftest.$ac_ext <<EOF
1450 #line 1451 "configure"
1451 #include "confdefs.h"
1452 main(){return(0);}
1454 eval $ac_link
1455 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1456 ac_cv_c_cross=no
1457 else
1458 ac_cv_c_cross=yes
1461 rm -fr conftest*
1463 cross_compiling=$ac_cv_c_cross
1464 echo "$ac_t""$ac_cv_c_cross" 1>&6
1466 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1467 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1468 echo $ac_n "(cached) $ac_c" 1>&6
1469 else
1470 cat > conftest.$ac_ext <<EOF
1471 #line 1472 "configure"
1472 #include "confdefs.h"
1473 #include <stdlib.h>
1474 #include <stdarg.h>
1475 #include <string.h>
1476 #include <float.h>
1478 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1479 ac_err=`grep -v '^ *+' conftest.out`
1480 if test -z "$ac_err"; then
1481 rm -rf conftest*
1482 ac_cv_header_stdc=yes
1483 else
1484 echo "$ac_err" >&5
1485 rm -rf conftest*
1486 ac_cv_header_stdc=no
1488 rm -f conftest*
1490 if test $ac_cv_header_stdc = yes; then
1491 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1492 cat > conftest.$ac_ext <<EOF
1493 #line 1494 "configure"
1494 #include "confdefs.h"
1495 #include <string.h>
1497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1498 egrep "memchr" >/dev/null 2>&1; then
1500 else
1501 rm -rf conftest*
1502 ac_cv_header_stdc=no
1504 rm -f conftest*
1508 if test $ac_cv_header_stdc = yes; then
1509 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1510 cat > conftest.$ac_ext <<EOF
1511 #line 1512 "configure"
1512 #include "confdefs.h"
1513 #include <stdlib.h>
1515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1516 egrep "free" >/dev/null 2>&1; then
1518 else
1519 rm -rf conftest*
1520 ac_cv_header_stdc=no
1522 rm -f conftest*
1526 if test $ac_cv_header_stdc = yes; then
1527 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1528 if test "$cross_compiling" = yes; then
1529 ac_cv_header_stdc=no
1530 else
1531 cat > conftest.$ac_ext <<EOF
1532 #line 1533 "configure"
1533 #include "confdefs.h"
1534 #include <ctype.h>
1535 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1536 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1537 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1538 int main () { int i; for (i = 0; i < 256; i++)
1539 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1540 exit (0); }
1543 eval $ac_link
1544 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1546 else
1547 ac_cv_header_stdc=no
1550 rm -fr conftest*
1553 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1554 if test $ac_cv_header_stdc = yes; then
1555 cat >> confdefs.h <<\EOF
1556 #define STDC_HEADERS 1
1561 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1562 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1563 echo $ac_n "(cached) $ac_c" 1>&6
1564 else
1565 cat > conftest.$ac_ext <<EOF
1566 #line 1567 "configure"
1567 #include "confdefs.h"
1568 #include <sys/types.h>
1569 #if STDC_HEADERS
1570 #include <stdlib.h>
1571 #endif
1573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1574 egrep "size_t" >/dev/null 2>&1; then
1575 rm -rf conftest*
1576 ac_cv_type_size_t=yes
1577 else
1578 rm -rf conftest*
1579 ac_cv_type_size_t=no
1581 rm -f conftest*
1584 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1585 if test $ac_cv_type_size_t = no; then
1586 cat >> confdefs.h <<\EOF
1587 #define size_t unsigned
1593 if test -z "${top_srcdir}"; then
1594 TOP_SRCDIR=`pwd`
1595 else
1596 TOP_SRCDIR="${top_srcdir}"
1599 echo $ac_n "checking for /usr/local/etc/wine.conf""... $ac_c" 1>&6
1600 if test -f /usr/local/etc/wine.conf; then
1601 echo "$ac_t""yes" 1>&6
1602 WINE_INI_GLOBAL='"/usr/local/etc/wine.conf"'
1603 else
1604 echo "$ac_t""no" 1>&6
1605 WINE_INI_GLOBAL="\"${TOP_SRCDIR}/wine.ini\""
1608 cat >> confdefs.h <<EOF
1609 #define WINE_INI_GLOBAL $WINE_INI_GLOBAL
1613 MAKE_RULES=$TOP_SRCDIR/Make.rules
1616 trap '' 1 2 15
1617 cat > confcache <<\EOF
1618 # This file is a shell script that caches the results of configure
1619 # tests run on this system so they can be shared between configure
1620 # scripts and configure runs. It is not useful on other systems.
1621 # If it contains results you don't want to keep, you may remove or edit it.
1623 # By default, configure uses ./config.cache as the cache file,
1624 # creating it if it does not exist already. You can give configure
1625 # the --cache-file=FILE option to use a different cache file; that is
1626 # what configure does when it calls configure scripts in
1627 # subdirectories, so they share the cache.
1628 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1629 # config.status only pays attention to the cache file if you give it the
1630 # --recheck option to rerun configure.
1633 # Ultrix sh set writes to stderr and can't be redirected directly,
1634 # and sets the high bit in the cache file unless we assign to the vars.
1635 (set) 2>&1 |
1636 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1637 >> confcache
1638 if cmp -s $cache_file confcache; then
1640 else
1641 if test -w $cache_file; then
1642 echo "updating cache $cache_file"
1643 cat confcache > $cache_file
1644 else
1645 echo "not updating unwritable cache $cache_file"
1648 rm -f confcache
1650 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1652 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1653 # Let make expand exec_prefix.
1654 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1656 # Any assignment to VPATH causes Sun make to only execute
1657 # the first set of double-colon rules, so remove it if not needed.
1658 # If there is a colon in the path, we need to keep it.
1659 if test "x$srcdir" = x.; then
1660 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1663 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1665 # Transform confdefs.h into DEFS.
1666 # Protect against shell expansion while executing Makefile rules.
1667 # Protect against Makefile macro expansion.
1668 cat > conftest.defs <<\EOF
1669 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
1670 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
1671 s%\[%\\&%g
1672 s%\]%\\&%g
1673 s%\$%$$%g
1675 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1676 rm -f conftest.defs
1679 # Without the "./", some shells look in PATH for config.status.
1680 : ${CONFIG_STATUS=./config.status}
1682 echo creating $CONFIG_STATUS
1683 rm -f $CONFIG_STATUS
1684 cat > $CONFIG_STATUS <<EOF
1685 #! /bin/sh
1686 # Generated automatically by configure.
1687 # Run this file to recreate the current configuration.
1688 # This directory was configured as follows,
1689 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1691 # $0 $ac_configure_args
1693 # Compiler output produced by configure, useful for debugging
1694 # configure, is in ./config.log if it exists.
1696 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1697 for ac_option
1699 case "\$ac_option" in
1700 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1701 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1702 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1703 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1704 echo "$CONFIG_STATUS generated by autoconf version 2.4"
1705 exit 0 ;;
1706 -help | --help | --hel | --he | --h)
1707 echo "\$ac_cs_usage"; exit 0 ;;
1708 *) echo "\$ac_cs_usage"; exit 1 ;;
1709 esac
1710 done
1712 ac_given_srcdir=$srcdir
1714 trap 'rm -fr `echo "Make.rules controls/Makefile ipc/Makefile loader/Makefile memory/Makefile misc/Makefile miscemu/Makefile multimedia/Makefile objects/Makefile win32/Makefile windows/Makefile rc/Makefile debugger/Makefile debugger/readline/Makefile tools/Makefile if1632/Makefile toolkit/Makefile Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1716 # Protect against being on the right side of a sed subst in config.status.
1717 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
1718 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
1719 $ac_vpsub
1720 $extrasub
1721 s%@CFLAGS@%$CFLAGS%g
1722 s%@CPPFLAGS@%$CPPFLAGS%g
1723 s%@CXXFLAGS@%$CXXFLAGS%g
1724 s%@DEFS@%$DEFS%g
1725 s%@LDFLAGS@%$LDFLAGS%g
1726 s%@LIBS@%$LIBS%g
1727 s%@exec_prefix@%$exec_prefix%g
1728 s%@prefix@%$prefix%g
1729 s%@program_transform_name@%$program_transform_name%g
1730 s%@LDLIBS@%$LDLIBS%g
1731 s%@MAIN_TARGET@%$MAIN_TARGET%g
1732 s%@LANG@%$LANG%g
1733 s%@SET_MAKE@%$SET_MAKE%g
1734 s%@CC@%$CC%g
1735 s%@CPP@%$CPP%g
1736 s%@X_CFLAGS@%$X_CFLAGS%g
1737 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
1738 s%@X_LIBS@%$X_LIBS%g
1739 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
1740 s%@YACC@%$YACC%g
1741 s%@LEX@%$LEX%g
1742 s%@LEXLIB@%$LEXLIB%g
1743 s%@RANLIB@%$RANLIB%g
1744 s%@WINE_INI_GLOBAL@%$WINE_INI_GLOBAL%g
1745 /@MAKE_RULES@/r $MAKE_RULES
1746 s%@MAKE_RULES@%%g
1748 CEOF
1750 cat >> $CONFIG_STATUS <<EOF
1752 CONFIG_FILES=\${CONFIG_FILES-"Make.rules controls/Makefile ipc/Makefile loader/Makefile memory/Makefile misc/Makefile miscemu/Makefile multimedia/Makefile objects/Makefile win32/Makefile windows/Makefile rc/Makefile debugger/Makefile debugger/readline/Makefile tools/Makefile if1632/Makefile toolkit/Makefile Makefile"}
1754 cat >> $CONFIG_STATUS <<\EOF
1755 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1756 # Support "outfile[:infile]", defaulting infile="outfile.in".
1757 case "$ac_file" in
1758 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1759 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1760 *) ac_file_in="${ac_file}.in" ;;
1761 esac
1763 # Adjust relative srcdir, etc. for subdirectories.
1765 # Remove last slash and all that follows it. Not all systems have dirname.
1766 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1767 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1768 # The file is in a subdirectory.
1769 test ! -d "$ac_dir" && mkdir "$ac_dir"
1770 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1771 # A "../" for each directory in $ac_dir_suffix.
1772 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1773 else
1774 ac_dir_suffix= ac_dots=
1777 case "$ac_given_srcdir" in
1778 .) srcdir=.
1779 if test -z "$ac_dots"; then top_srcdir=.
1780 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1781 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1782 *) # Relative path.
1783 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1784 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1785 esac
1787 echo creating "$ac_file"
1788 rm -f "$ac_file"
1789 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1790 case "$ac_file" in
1791 *Makefile*) ac_comsub="1i\\
1792 # $configure_input" ;;
1793 *) ac_comsub= ;;
1794 esac
1795 sed -e "$ac_comsub
1796 s%@configure_input@%$configure_input%g
1797 s%@srcdir@%$srcdir%g
1798 s%@top_srcdir@%$top_srcdir%g
1799 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1800 fi; done
1801 rm -f conftest.subs
1805 exit 0
1807 chmod +x $CONFIG_STATUS
1808 rm -fr confdefs* $ac_clean_files
1809 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1812 echo
1813 echo "Configure finished. Do 'make depend; make' to compile Wine."
1814 echo