Release 951003
[wine/testsucceed.git] / configure
blob73944bc87983fadde0e2358144f1c5a09e1ea138
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
418 # Check whether --with-library or --without-library was given.
419 withval="$with_library"
420 if test -n "$withval"; then
421 cat >> confdefs.h <<\EOF
422 #define WINELIB 1
424 MAIN_TARGET="winelib.a"
425 else
426 MAIN_TARGET="wine"
431 # Check whether --with-language or --without-language was given.
432 withval="$with_language"
433 if test -n "$withval"; then
434 LANG="$withval"
435 else
436 LANG=En
441 # Check whether --with-ipc or --without-ipc was given.
442 withval="$with_ipc"
443 if test -n "$withval"; then
444 cat >> confdefs.h <<\EOF
445 #define CONFIG_IPC 1
451 # Check whether --with-malloc-debug or --without-malloc-debug was given.
452 withval="$with_malloc_debug"
453 if test -n "$withval"; then
454 cat >> confdefs.h <<\EOF
455 #define MALLOC_DEBUGGING 1
462 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
463 set dummy ${MAKE-make}; ac_make=$2
464 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
465 echo $ac_n "(cached) $ac_c" 1>&6
466 else
467 cat > conftestmake <<\EOF
468 all:
469 @echo 'ac_maketemp="${MAKE}"'
471 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
472 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
473 if test -n "$ac_maketemp"; then
474 eval ac_cv_prog_make_${ac_make}_set=yes
475 else
476 eval ac_cv_prog_make_${ac_make}_set=no
478 rm -f conftestmake
480 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
481 echo "$ac_t""yes" 1>&6
482 SET_MAKE=
483 else
484 echo "$ac_t""no" 1>&6
485 SET_MAKE="MAKE=${MAKE-make}"
488 # Extract the first word of "gcc", so it can be a program name with args.
489 set dummy gcc; ac_word=$2
490 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
491 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
492 echo $ac_n "(cached) $ac_c" 1>&6
493 else
494 if test -n "$CC"; then
495 ac_cv_prog_CC="$CC" # Let the user override the test.
496 else
497 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
498 for ac_dir in $PATH; do
499 test -z "$ac_dir" && ac_dir=.
500 if test -f $ac_dir/$ac_word; then
501 ac_cv_prog_CC="gcc"
502 break
504 done
505 IFS="$ac_save_ifs"
506 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
509 CC="$ac_cv_prog_CC"
510 if test -n "$CC"; then
511 echo "$ac_t""$CC" 1>&6
512 else
513 echo "$ac_t""no" 1>&6
517 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
518 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
519 echo $ac_n "(cached) $ac_c" 1>&6
520 else
521 cat > conftest.c <<EOF
522 #ifdef __GNUC__
523 yes;
524 #endif
526 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
527 ac_cv_prog_gcc=yes
528 else
529 ac_cv_prog_gcc=no
532 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
533 if test $ac_cv_prog_gcc = yes; then
534 GCC=yes
535 if test "${CFLAGS+set}" != set; then
536 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
537 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
538 echo $ac_n "(cached) $ac_c" 1>&6
539 else
540 echo 'void f(){}' > conftest.c
541 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
542 ac_cv_prog_gcc_g=yes
543 else
544 ac_cv_prog_gcc_g=no
546 rm -f conftest*
549 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
550 if test $ac_cv_prog_gcc_g = yes; then
551 CFLAGS="-g -O"
552 else
553 CFLAGS="-O"
556 else
557 GCC=
558 test "${CFLAGS+set}" = set || CFLAGS="-g"
561 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
562 # On Suns, sometimes $CPP names a directory.
563 if test -n "$CPP" && test -d "$CPP"; then
564 CPP=
566 if test -z "$CPP"; then
567 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
568 echo $ac_n "(cached) $ac_c" 1>&6
569 else
570 # This must be in double quotes, not single quotes, because CPP may get
571 # substituted into the Makefile and "${CC-cc}" will confuse make.
572 CPP="${CC-cc} -E"
573 # On the NeXT, cc -E runs the code through the compiler's parser,
574 # not just through cpp.
575 cat > conftest.$ac_ext <<EOF
576 #line 577 "configure"
577 #include "confdefs.h"
578 #include <assert.h>
579 Syntax Error
581 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
582 ac_err=`grep -v '^ *+' conftest.out`
583 if test -z "$ac_err"; then
585 else
586 echo "$ac_err" >&5
587 rm -rf conftest*
588 CPP="${CC-cc} -E -traditional-cpp"
589 cat > conftest.$ac_ext <<EOF
590 #line 591 "configure"
591 #include "confdefs.h"
592 #include <assert.h>
593 Syntax Error
595 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
596 ac_err=`grep -v '^ *+' conftest.out`
597 if test -z "$ac_err"; then
599 else
600 echo "$ac_err" >&5
601 rm -rf conftest*
602 CPP=/lib/cpp
604 rm -f conftest*
606 rm -f conftest*
607 ac_cv_prog_CPP="$CPP"
609 CPP="$ac_cv_prog_CPP"
610 else
611 ac_cv_prog_CPP="$CPP"
613 echo "$ac_t""$CPP" 1>&6
615 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
616 if test -d /etc/conf/kconfig.d &&
617 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
618 then
619 echo "$ac_t""yes" 1>&6
620 ISC=yes # If later tests want to check for ISC.
621 cat >> confdefs.h <<\EOF
622 #define _POSIX_SOURCE 1
625 if test "$GCC" = yes; then
626 CC="$CC -posix"
627 else
628 CC="$CC -Xp"
630 else
631 echo "$ac_t""no" 1>&6
632 ISC=
635 # If we find X, set shell vars x_includes and x_libraries to the
636 # paths, otherwise set no_x=yes.
637 # Uses ac_ vars as temps to allow command line to override cache and checks.
638 # --without-x overrides everything else, but does not touch the cache.
639 echo $ac_n "checking for X""... $ac_c" 1>&6
641 # Check whether --with-x or --without-x was given.
642 withval="$with_x"
643 if test -n "$withval"; then
647 if test "x$with_x" = xno; then
648 no_x=yes
649 else
650 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
651 no_x=
652 else
653 if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
654 echo $ac_n "(cached) $ac_c" 1>&6
655 else
656 # One or both of the vars are not set, and there is no cached value.
657 no_x=yes
658 rm -fr conftestdir
659 if mkdir conftestdir; then
660 cd conftestdir
661 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
662 cat > Imakefile <<'EOF'
663 acfindx:
664 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
666 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
667 no_x=
668 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
669 eval `make acfindx 2>/dev/null | grep -v make`
670 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
671 for ac_extension in a so sl; do
672 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
673 test -f $ac_im_libdir/libX11.$ac_extension; then
674 ac_im_usrlibdir=$ac_im_libdir; break
676 done
677 # Screen out bogus values from the imake configuration.
678 case "$ac_im_incroot" in
679 /usr/include) ;;
680 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
681 esac
682 case "$ac_im_usrlibdir" in
683 /usr/lib | /lib) ;;
684 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
685 esac
687 cd ..
688 rm -fr conftestdir
691 if test "$no_x" = yes; then
692 test -z "$x_direct_test_library" && x_direct_test_library=Xt
693 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
694 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
695 cat > conftest.$ac_ext <<EOF
696 #line 697 "configure"
697 #include "confdefs.h"
698 #include <$x_direct_test_include>
700 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
701 ac_err=`grep -v '^ *+' conftest.out`
702 if test -z "$ac_err"; then
703 rm -rf conftest*
704 no_x= ac_x_includes=
705 else
706 echo "$ac_err" >&5
707 rm -rf conftest*
708 for ac_dir in \
709 /usr/X11R6/include \
710 /usr/X11R5/include \
711 /usr/X11R4/include \
713 /usr/include/X11R6 \
714 /usr/include/X11R5 \
715 /usr/include/X11R4 \
717 /usr/local/X11R6/include \
718 /usr/local/X11R5/include \
719 /usr/local/X11R4/include \
721 /usr/local/include/X11R6 \
722 /usr/local/include/X11R5 \
723 /usr/local/include/X11R4 \
725 /usr/X11/include \
726 /usr/include/X11 \
727 /usr/local/X11/include \
728 /usr/local/include/X11 \
730 /usr/X386/include \
731 /usr/x386/include \
732 /usr/XFree86/include/X11 \
734 /usr/include \
735 /usr/local/include \
736 /usr/unsupported/include \
737 /usr/athena/include \
738 /usr/local/x11r5/include \
739 /usr/lpp/Xamples/include \
741 /usr/openwin/include \
742 /usr/openwin/share/include \
745 if test -r "$ac_dir/$x_direct_test_include"; then
746 no_x= ac_x_includes=$ac_dir
747 break
749 done
751 rm -f conftest*
753 # Check for the libraries.
754 # See if we find them without any special options.
755 # Don't add to $LIBS permanently.
756 ac_save_LIBS="$LIBS"
757 LIBS="-l$x_direct_test_library $LIBS"
758 cat > conftest.$ac_ext <<EOF
759 #line 760 "configure"
760 #include "confdefs.h"
762 int main() { return 0; }
763 int t() {
764 ${x_direct_test_function}()
765 ; return 0; }
767 if eval $ac_link; then
768 rm -rf conftest*
769 LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
770 else
771 rm -rf conftest*
772 LIBS="$ac_save_LIBS"
773 # First see if replacing the include by lib works.
774 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
775 /usr/X11R6/lib \
776 /usr/X11R5/lib \
777 /usr/X11R4/lib \
779 /usr/lib/X11R6 \
780 /usr/lib/X11R5 \
781 /usr/lib/X11R4 \
783 /usr/local/X11R6/lib \
784 /usr/local/X11R5/lib \
785 /usr/local/X11R4/lib \
787 /usr/local/lib/X11R6 \
788 /usr/local/lib/X11R5 \
789 /usr/local/lib/X11R4 \
791 /usr/X11/lib \
792 /usr/lib/X11 \
793 /usr/local/X11/lib \
794 /usr/local/lib/X11 \
796 /usr/X386/lib \
797 /usr/x386/lib \
798 /usr/XFree86/lib/X11 \
800 /usr/lib \
801 /usr/local/lib \
802 /usr/unsupported/lib \
803 /usr/athena/lib \
804 /usr/local/x11r5/lib \
805 /usr/lpp/Xamples/lib \
807 /usr/openwin/lib \
808 /usr/openwin/share/lib \
811 for ac_extension in a so sl; do
812 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
813 no_x= ac_x_libraries=$ac_dir
814 break 2
816 done
817 done
819 rm -f conftest*
822 if test "$no_x" = yes; then
823 ac_cv_path_x="no_x=yes"
824 else
825 ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
829 eval "$ac_cv_path_x"
830 fi # $with_x != no
832 if test "$no_x" = yes; then
833 echo "$ac_t""no" 1>&6
834 else
835 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
836 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
837 ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
838 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
841 if test "$no_x" = yes; then
842 # Not all programs may use this symbol, but it does not hurt to define it.
843 X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
844 else
845 if test -n "$x_includes"; then
846 X_CFLAGS="$X_CFLAGS -I$x_includes"
849 # It would be nice to have a more robust check for the -R ld option than
850 # just checking for Solaris.
851 # It would also be nice to do this for all -L options, not just this one.
852 if test -n "$x_libraries"; then
853 X_LIBS="$X_LIBS -L$x_libraries"
854 if test "`(uname) 2>/dev/null`" = SunOS &&
855 uname -r | grep '^5' >/dev/null; then
856 X_LIBS="$X_LIBS -R$x_libraries"
860 # Check for libraries that X11R6 Xt/Xaw programs need.
862 ac_save_LDFLAGS="$LDFLAGS"
863 LDFLAGS="$LDFLAGS -L$x_libraries"
864 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
865 # check for ICE first), but we must link in the order -lSM -lICE or
866 # we get undefined symbols. So assume we have SM if we have ICE.
867 # These have to be linked with before -lX11, unlike the other
868 # libraries we check for below, so use a different variable.
869 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
870 echo $ac_n "checking for -lICE""... $ac_c" 1>&6
871 if eval "test \"`echo '$''{'ac_cv_lib_ICE'+set}'`\" = set"; then
872 echo $ac_n "(cached) $ac_c" 1>&6
873 else
874 ac_save_LIBS="$LIBS"
875 LIBS="-lICE $LIBS"
876 cat > conftest.$ac_ext <<EOF
877 #line 878 "configure"
878 #include "confdefs.h"
880 int main() { return 0; }
881 int t() {
882 IceConnectionNumber()
883 ; return 0; }
885 if eval $ac_link; then
886 rm -rf conftest*
887 eval "ac_cv_lib_ICE=yes"
888 else
889 rm -rf conftest*
890 eval "ac_cv_lib_ICE=no"
892 rm -f conftest*
893 LIBS="$ac_save_LIBS"
896 if eval "test \"`echo '$ac_cv_lib_'ICE`\" = yes"; then
897 echo "$ac_t""yes" 1>&6
898 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
899 else
900 echo "$ac_t""no" 1>&6
903 LDFLAGS="$ac_save_LDFLAGS"
905 # Check for system-dependent libraries X programs must link with.
907 if test "$ISC" = yes; then
908 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
909 else
910 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
911 # libraries were built with DECnet support. And karl@cs.umb.edu says
912 # the Alpha needs dnet_stub (dnet does not exist).
913 echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
914 if eval "test \"`echo '$''{'ac_cv_lib_dnet'+set}'`\" = set"; then
915 echo $ac_n "(cached) $ac_c" 1>&6
916 else
917 ac_save_LIBS="$LIBS"
918 LIBS="-ldnet $LIBS"
919 cat > conftest.$ac_ext <<EOF
920 #line 921 "configure"
921 #include "confdefs.h"
923 int main() { return 0; }
924 int t() {
925 dnet_ntoa()
926 ; return 0; }
928 if eval $ac_link; then
929 rm -rf conftest*
930 eval "ac_cv_lib_dnet=yes"
931 else
932 rm -rf conftest*
933 eval "ac_cv_lib_dnet=no"
935 rm -f conftest*
936 LIBS="$ac_save_LIBS"
939 if eval "test \"`echo '$ac_cv_lib_'dnet`\" = yes"; then
940 echo "$ac_t""yes" 1>&6
941 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
942 else
943 echo "$ac_t""no" 1>&6
946 if test $ac_cv_lib_dnet = no; then
947 echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
948 if eval "test \"`echo '$''{'ac_cv_lib_dnet_stub'+set}'`\" = set"; then
949 echo $ac_n "(cached) $ac_c" 1>&6
950 else
951 ac_save_LIBS="$LIBS"
952 LIBS="-ldnet_stub $LIBS"
953 cat > conftest.$ac_ext <<EOF
954 #line 955 "configure"
955 #include "confdefs.h"
957 int main() { return 0; }
958 int t() {
959 dnet_ntoa()
960 ; return 0; }
962 if eval $ac_link; then
963 rm -rf conftest*
964 eval "ac_cv_lib_dnet_stub=yes"
965 else
966 rm -rf conftest*
967 eval "ac_cv_lib_dnet_stub=no"
969 rm -f conftest*
970 LIBS="$ac_save_LIBS"
973 if eval "test \"`echo '$ac_cv_lib_'dnet_stub`\" = yes"; then
974 echo "$ac_t""yes" 1>&6
975 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
976 else
977 echo "$ac_t""no" 1>&6
982 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
983 # to get the SysV transport functions.
984 # Not sure which flavor of 386 UNIX this is, but it seems harmless to
985 # check for it.
986 echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
987 if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
988 echo $ac_n "(cached) $ac_c" 1>&6
989 else
990 ac_save_LIBS="$LIBS"
991 LIBS="-lnsl $LIBS"
992 cat > conftest.$ac_ext <<EOF
993 #line 994 "configure"
994 #include "confdefs.h"
996 int main() { return 0; }
997 int t() {
998 t_accept()
999 ; return 0; }
1001 if eval $ac_link; then
1002 rm -rf conftest*
1003 eval "ac_cv_lib_nsl=yes"
1004 else
1005 rm -rf conftest*
1006 eval "ac_cv_lib_nsl=no"
1008 rm -f conftest*
1009 LIBS="$ac_save_LIBS"
1012 if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
1013 echo "$ac_t""yes" 1>&6
1014 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1015 else
1016 echo "$ac_t""no" 1>&6
1020 # lieder@skyler.mavd.honeywell.com says without -lsocket,
1021 # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
1022 # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
1023 if test "`(uname) 2>/dev/null`" != IRIX; then
1024 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
1025 if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
1026 echo $ac_n "(cached) $ac_c" 1>&6
1027 else
1028 ac_save_LIBS="$LIBS"
1029 LIBS="-lsocket $LIBS"
1030 cat > conftest.$ac_ext <<EOF
1031 #line 1032 "configure"
1032 #include "confdefs.h"
1034 int main() { return 0; }
1035 int t() {
1036 socket()
1037 ; return 0; }
1039 if eval $ac_link; then
1040 rm -rf conftest*
1041 eval "ac_cv_lib_socket=yes"
1042 else
1043 rm -rf conftest*
1044 eval "ac_cv_lib_socket=no"
1046 rm -f conftest*
1047 LIBS="$ac_save_LIBS"
1050 if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
1051 echo "$ac_t""yes" 1>&6
1052 X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
1053 else
1054 echo "$ac_t""no" 1>&6
1061 for ac_prog in 'bison -y' byacc
1063 # Extract the first word of "$ac_prog", so it can be a program name with args.
1064 set dummy $ac_prog; ac_word=$2
1065 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1066 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1067 echo $ac_n "(cached) $ac_c" 1>&6
1068 else
1069 if test -n "$YACC"; then
1070 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1071 else
1072 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1073 for ac_dir in $PATH; do
1074 test -z "$ac_dir" && ac_dir=.
1075 if test -f $ac_dir/$ac_word; then
1076 ac_cv_prog_YACC="$ac_prog"
1077 break
1079 done
1080 IFS="$ac_save_ifs"
1083 YACC="$ac_cv_prog_YACC"
1084 if test -n "$YACC"; then
1085 echo "$ac_t""$YACC" 1>&6
1086 else
1087 echo "$ac_t""no" 1>&6
1090 test -n "$YACC" && break
1091 done
1092 test -n "$YACC" || YACC="yacc"
1094 # Extract the first word of "flex", so it can be a program name with args.
1095 set dummy flex; ac_word=$2
1096 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1097 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1098 echo $ac_n "(cached) $ac_c" 1>&6
1099 else
1100 if test -n "$LEX"; then
1101 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1102 else
1103 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1104 for ac_dir in $PATH; do
1105 test -z "$ac_dir" && ac_dir=.
1106 if test -f $ac_dir/$ac_word; then
1107 ac_cv_prog_LEX="flex"
1108 break
1110 done
1111 IFS="$ac_save_ifs"
1112 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1115 LEX="$ac_cv_prog_LEX"
1116 if test -n "$LEX"; then
1117 echo "$ac_t""$LEX" 1>&6
1118 else
1119 echo "$ac_t""no" 1>&6
1122 if test -z "$LEXLIB"
1123 then
1124 case "$LEX" in
1125 flex*) ac_lib=fl ;;
1126 *) ac_lib=l ;;
1127 esac
1128 echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
1129 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib'+set}'`\" = set"; then
1130 echo $ac_n "(cached) $ac_c" 1>&6
1131 else
1132 ac_save_LIBS="$LIBS"
1133 LIBS="-l$ac_lib $LIBS"
1134 cat > conftest.$ac_ext <<EOF
1135 #line 1136 "configure"
1136 #include "confdefs.h"
1138 int main() { return 0; }
1139 int t() {
1140 yywrap()
1141 ; return 0; }
1143 if eval $ac_link; then
1144 rm -rf conftest*
1145 eval "ac_cv_lib_$ac_lib=yes"
1146 else
1147 rm -rf conftest*
1148 eval "ac_cv_lib_$ac_lib=no"
1150 rm -f conftest*
1151 LIBS="$ac_save_LIBS"
1154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib`\" = yes"; then
1155 echo "$ac_t""yes" 1>&6
1156 LEXLIB="-l$ac_lib"
1157 else
1158 echo "$ac_t""no" 1>&6
1163 # Extract the first word of "ranlib", so it can be a program name with args.
1164 set dummy ranlib; ac_word=$2
1165 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1166 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1167 echo $ac_n "(cached) $ac_c" 1>&6
1168 else
1169 if test -n "$RANLIB"; then
1170 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1171 else
1172 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1173 for ac_dir in $PATH; do
1174 test -z "$ac_dir" && ac_dir=.
1175 if test -f $ac_dir/$ac_word; then
1176 ac_cv_prog_RANLIB="ranlib"
1177 break
1179 done
1180 IFS="$ac_save_ifs"
1181 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1184 RANLIB="$ac_cv_prog_RANLIB"
1185 if test -n "$RANLIB"; then
1186 echo "$ac_t""$RANLIB" 1>&6
1187 else
1188 echo "$ac_t""no" 1>&6
1192 for ac_func in tcgetattr
1194 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1196 echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198 cat > conftest.$ac_ext <<EOF
1199 #line 1200 "configure"
1200 #include "confdefs.h"
1201 /* System header to define __stub macros and hopefully few prototypes,
1202 which can conflict with char $ac_func(); below. */
1203 #include <assert.h>
1204 /* Override any gcc2 internal prototype to avoid an error. */
1205 char $ac_func();
1207 int main() { return 0; }
1208 int t() {
1210 /* The GNU C library defines this for functions which it implements
1211 to always fail with ENOSYS. Some functions are actually named
1212 something starting with __ and the normal name is an alias. */
1213 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1214 choke me
1215 #else
1216 $ac_func();
1217 #endif
1219 ; return 0; }
1221 if eval $ac_link; then
1222 rm -rf conftest*
1223 eval "ac_cv_func_$ac_func=yes"
1224 else
1225 rm -rf conftest*
1226 eval "ac_cv_func_$ac_func=no"
1228 rm -f conftest*
1231 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1232 echo "$ac_t""yes" 1>&6
1233 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1234 cat >> confdefs.h <<EOF
1235 #define $ac_tr_func 1
1238 else
1239 echo "$ac_t""no" 1>&6
1241 done
1243 for ac_hdr in stdlib.h
1245 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1247 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1248 echo $ac_n "(cached) $ac_c" 1>&6
1249 else
1250 cat > conftest.$ac_ext <<EOF
1251 #line 1252 "configure"
1252 #include "confdefs.h"
1253 #include <$ac_hdr>
1255 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1256 ac_err=`grep -v '^ *+' conftest.out`
1257 if test -z "$ac_err"; then
1258 rm -rf conftest*
1259 eval "ac_cv_header_$ac_safe=yes"
1260 else
1261 echo "$ac_err" >&5
1262 rm -rf conftest*
1263 eval "ac_cv_header_$ac_safe=no"
1265 rm -f conftest*
1267 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1268 echo "$ac_t""yes" 1>&6
1269 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1270 cat >> confdefs.h <<EOF
1271 #define $ac_tr_hdr 1
1274 else
1275 echo "$ac_t""no" 1>&6
1277 done
1279 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1280 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1281 echo $ac_n "(cached) $ac_c" 1>&6
1282 else
1283 cat > conftest.$ac_ext <<EOF
1284 #line 1285 "configure"
1285 #include "confdefs.h"
1286 #include <sys/types.h>
1287 #include <sys/stat.h>
1289 #if defined(S_ISBLK) && defined(S_IFDIR)
1290 # if S_ISBLK (S_IFDIR)
1291 You lose.
1292 # endif
1293 #endif
1295 #if defined(S_ISBLK) && defined(S_IFCHR)
1296 # if S_ISBLK (S_IFCHR)
1297 You lose.
1298 # endif
1299 #endif
1301 #if defined(S_ISLNK) && defined(S_IFREG)
1302 # if S_ISLNK (S_IFREG)
1303 You lose.
1304 # endif
1305 #endif
1307 #if defined(S_ISSOCK) && defined(S_IFREG)
1308 # if S_ISSOCK (S_IFREG)
1309 You lose.
1310 # endif
1311 #endif
1314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1315 egrep "You lose" >/dev/null 2>&1; then
1316 rm -rf conftest*
1317 ac_cv_header_stat_broken=yes
1318 else
1319 rm -rf conftest*
1320 ac_cv_header_stat_broken=no
1322 rm -f conftest*
1325 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1326 if test $ac_cv_header_stat_broken = yes; then
1327 cat >> confdefs.h <<\EOF
1328 #define STAT_MACROS_BROKEN 1
1333 echo $ac_n "checking for working const""... $ac_c" 1>&6
1334 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1335 echo $ac_n "(cached) $ac_c" 1>&6
1336 else
1337 cat > conftest.$ac_ext <<EOF
1338 #line 1339 "configure"
1339 #include "confdefs.h"
1341 int main() { return 0; }
1342 int t() {
1344 /* Ultrix mips cc rejects this. */
1345 typedef int charset[2]; const charset x;
1346 /* SunOS 4.1.1 cc rejects this. */
1347 char const *const *ccp;
1348 char **p;
1349 /* NEC SVR4.0.2 mips cc rejects this. */
1350 struct point {int x, y;};
1351 static struct point const zero;
1352 /* AIX XL C 1.02.0.0 rejects this.
1353 It does not let you subtract one const X* pointer from another in an arm
1354 of an if-expression whose if-part is not a constant expression */
1355 const char *g = "string";
1356 ccp = &g + (g ? g-g : 0);
1357 /* HPUX 7.0 cc rejects these. */
1358 ++ccp;
1359 p = (char**) ccp;
1360 ccp = (char const *const *) p;
1361 { /* SCO 3.2v4 cc rejects this. */
1362 char *t;
1363 char const *s = 0 ? (char *) 0 : (char const *) 0;
1365 *t++ = 0;
1367 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1368 int x[] = {25, 17};
1369 const int *foo = &x[0];
1370 ++foo;
1372 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1373 typedef const int *iptr;
1374 iptr p = 0;
1375 ++p;
1377 { /* AIX XL C 1.02.0.0 rejects this saying
1378 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1379 struct s { int j; const int *ap[3]; };
1380 struct s *b; b->j = 5;
1382 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1383 const int foo = 10;
1386 ; return 0; }
1388 if eval $ac_compile; then
1389 rm -rf conftest*
1390 ac_cv_c_const=yes
1391 else
1392 rm -rf conftest*
1393 ac_cv_c_const=no
1395 rm -f conftest*
1398 echo "$ac_t""$ac_cv_c_const" 1>&6
1399 if test $ac_cv_c_const = no; then
1400 cat >> confdefs.h <<\EOF
1401 #define const
1406 # If we cannot run a trivial program, we must be cross compiling.
1407 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1408 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1409 echo $ac_n "(cached) $ac_c" 1>&6
1410 else
1411 if test "$cross_compiling" = yes; then
1412 ac_cv_c_cross=yes
1413 else
1414 cat > conftest.$ac_ext <<EOF
1415 #line 1416 "configure"
1416 #include "confdefs.h"
1417 main(){return(0);}
1419 eval $ac_link
1420 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1421 ac_cv_c_cross=no
1422 else
1423 ac_cv_c_cross=yes
1426 rm -fr conftest*
1428 cross_compiling=$ac_cv_c_cross
1429 echo "$ac_t""$ac_cv_c_cross" 1>&6
1431 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1432 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1433 echo $ac_n "(cached) $ac_c" 1>&6
1434 else
1435 cat > conftest.$ac_ext <<EOF
1436 #line 1437 "configure"
1437 #include "confdefs.h"
1438 #include <stdlib.h>
1439 #include <stdarg.h>
1440 #include <string.h>
1441 #include <float.h>
1443 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1444 ac_err=`grep -v '^ *+' conftest.out`
1445 if test -z "$ac_err"; then
1446 rm -rf conftest*
1447 ac_cv_header_stdc=yes
1448 else
1449 echo "$ac_err" >&5
1450 rm -rf conftest*
1451 ac_cv_header_stdc=no
1453 rm -f conftest*
1455 if test $ac_cv_header_stdc = yes; then
1456 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1457 cat > conftest.$ac_ext <<EOF
1458 #line 1459 "configure"
1459 #include "confdefs.h"
1460 #include <string.h>
1462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1463 egrep "memchr" >/dev/null 2>&1; then
1465 else
1466 rm -rf conftest*
1467 ac_cv_header_stdc=no
1469 rm -f conftest*
1473 if test $ac_cv_header_stdc = yes; then
1474 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1475 cat > conftest.$ac_ext <<EOF
1476 #line 1477 "configure"
1477 #include "confdefs.h"
1478 #include <stdlib.h>
1480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1481 egrep "free" >/dev/null 2>&1; then
1483 else
1484 rm -rf conftest*
1485 ac_cv_header_stdc=no
1487 rm -f conftest*
1491 if test $ac_cv_header_stdc = yes; then
1492 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1493 if test "$cross_compiling" = yes; then
1494 ac_cv_header_stdc=no
1495 else
1496 cat > conftest.$ac_ext <<EOF
1497 #line 1498 "configure"
1498 #include "confdefs.h"
1499 #include <ctype.h>
1500 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1501 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1502 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1503 int main () { int i; for (i = 0; i < 256; i++)
1504 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1505 exit (0); }
1508 eval $ac_link
1509 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1511 else
1512 ac_cv_header_stdc=no
1515 rm -fr conftest*
1518 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1519 if test $ac_cv_header_stdc = yes; then
1520 cat >> confdefs.h <<\EOF
1521 #define STDC_HEADERS 1
1526 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1527 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1528 echo $ac_n "(cached) $ac_c" 1>&6
1529 else
1530 cat > conftest.$ac_ext <<EOF
1531 #line 1532 "configure"
1532 #include "confdefs.h"
1533 #include <sys/types.h>
1534 #if STDC_HEADERS
1535 #include <stdlib.h>
1536 #endif
1538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1539 egrep "size_t" >/dev/null 2>&1; then
1540 rm -rf conftest*
1541 ac_cv_type_size_t=yes
1542 else
1543 rm -rf conftest*
1544 ac_cv_type_size_t=no
1546 rm -f conftest*
1549 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1550 if test $ac_cv_type_size_t = no; then
1551 cat >> confdefs.h <<\EOF
1552 #define size_t unsigned
1558 if test -z "${top_srcdir}"; then
1559 TOP_SRCDIR=`pwd`
1560 else
1561 TOP_SRCDIR="${top_srcdir}"
1564 echo $ac_n "checking for wine.ini in autoconf.h""... $ac_c" 1>&6
1565 if test -f ${TOP_SRCDIR}/autoconf.h; then
1566 if test `grep -c WINE_INI_GLOBAL ${TOP_SRCDIR}/autoconf.h` -ne 0; then
1567 WINE_INI_GLOBAL=`grep WINE_INI_GLOBAL ${TOP_SRCDIR}/autoconf.h | tr ' ' '\n' | tail -1`
1568 echo "$ac_t""${WINE_INI_GLOBAL}" 1>&6
1571 if test -z "${WINE_INI_GLOBAL}"; then
1572 echo "$ac_t""no" 1>&6
1575 if test -z "${WINE_INI_GLOBAL}"; then
1576 echo $ac_n "checking for /usr/local/etc/wine.conf""... $ac_c" 1>&6
1577 if test -f /usr/local/etc/wine.conf; then
1578 echo "$ac_t""yes" 1>&6
1579 WINE_INI_GLOBAL='"/usr/local/etc/wine.conf"'
1580 else
1581 echo "$ac_t""no" 1>&6
1582 WINE_INI_GLOBAL="\"${TOP_SRCDIR}/wine.ini\""
1586 cat >> confdefs.h <<EOF
1587 #define WINE_INI_GLOBAL $WINE_INI_GLOBAL
1591 MAKE_RULES=$TOP_SRCDIR/Make.rules
1594 trap '' 1 2 15
1595 cat > confcache <<\EOF
1596 # This file is a shell script that caches the results of configure
1597 # tests run on this system so they can be shared between configure
1598 # scripts and configure runs. It is not useful on other systems.
1599 # If it contains results you don't want to keep, you may remove or edit it.
1601 # By default, configure uses ./config.cache as the cache file,
1602 # creating it if it does not exist already. You can give configure
1603 # the --cache-file=FILE option to use a different cache file; that is
1604 # what configure does when it calls configure scripts in
1605 # subdirectories, so they share the cache.
1606 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1607 # config.status only pays attention to the cache file if you give it the
1608 # --recheck option to rerun configure.
1611 # Ultrix sh set writes to stderr and can't be redirected directly,
1612 # and sets the high bit in the cache file unless we assign to the vars.
1613 (set) 2>&1 |
1614 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1615 >> confcache
1616 if cmp -s $cache_file confcache; then
1618 else
1619 if test -w $cache_file; then
1620 echo "updating cache $cache_file"
1621 cat confcache > $cache_file
1622 else
1623 echo "not updating unwritable cache $cache_file"
1626 rm -f confcache
1628 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1630 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1631 # Let make expand exec_prefix.
1632 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1634 # Any assignment to VPATH causes Sun make to only execute
1635 # the first set of double-colon rules, so remove it if not needed.
1636 # If there is a colon in the path, we need to keep it.
1637 if test "x$srcdir" = x.; then
1638 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1641 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1643 # Transform confdefs.h into DEFS.
1644 # Protect against shell expansion while executing Makefile rules.
1645 # Protect against Makefile macro expansion.
1646 cat > conftest.defs <<\EOF
1647 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
1648 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
1649 s%\[%\\&%g
1650 s%\]%\\&%g
1651 s%\$%$$%g
1653 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1654 rm -f conftest.defs
1657 # Without the "./", some shells look in PATH for config.status.
1658 : ${CONFIG_STATUS=./config.status}
1660 echo creating $CONFIG_STATUS
1661 rm -f $CONFIG_STATUS
1662 cat > $CONFIG_STATUS <<EOF
1663 #! /bin/sh
1664 # Generated automatically by configure.
1665 # Run this file to recreate the current configuration.
1666 # This directory was configured as follows,
1667 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1669 # $0 $ac_configure_args
1671 # Compiler output produced by configure, useful for debugging
1672 # configure, is in ./config.log if it exists.
1674 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1675 for ac_option
1677 case "\$ac_option" in
1678 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1679 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1680 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1681 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1682 echo "$CONFIG_STATUS generated by autoconf version 2.4"
1683 exit 0 ;;
1684 -help | --help | --hel | --he | --h)
1685 echo "\$ac_cs_usage"; exit 0 ;;
1686 *) echo "\$ac_cs_usage"; exit 1 ;;
1687 esac
1688 done
1690 ac_given_srcdir=$srcdir
1692 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
1694 # Protect against being on the right side of a sed subst in config.status.
1695 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
1696 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
1697 $ac_vpsub
1698 $extrasub
1699 s%@CFLAGS@%$CFLAGS%g
1700 s%@CPPFLAGS@%$CPPFLAGS%g
1701 s%@CXXFLAGS@%$CXXFLAGS%g
1702 s%@DEFS@%$DEFS%g
1703 s%@LDFLAGS@%$LDFLAGS%g
1704 s%@LIBS@%$LIBS%g
1705 s%@exec_prefix@%$exec_prefix%g
1706 s%@prefix@%$prefix%g
1707 s%@program_transform_name@%$program_transform_name%g
1708 s%@MAIN_TARGET@%$MAIN_TARGET%g
1709 s%@LANG@%$LANG%g
1710 s%@SET_MAKE@%$SET_MAKE%g
1711 s%@CC@%$CC%g
1712 s%@CPP@%$CPP%g
1713 s%@X_CFLAGS@%$X_CFLAGS%g
1714 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
1715 s%@X_LIBS@%$X_LIBS%g
1716 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
1717 s%@YACC@%$YACC%g
1718 s%@LEX@%$LEX%g
1719 s%@LEXLIB@%$LEXLIB%g
1720 s%@RANLIB@%$RANLIB%g
1721 s%@WINE_INI_GLOBAL@%$WINE_INI_GLOBAL%g
1722 /@MAKE_RULES@/r $MAKE_RULES
1723 s%@MAKE_RULES@%%g
1725 CEOF
1727 cat >> $CONFIG_STATUS <<EOF
1729 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"}
1731 cat >> $CONFIG_STATUS <<\EOF
1732 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1733 # Support "outfile[:infile]", defaulting infile="outfile.in".
1734 case "$ac_file" in
1735 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1736 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1737 *) ac_file_in="${ac_file}.in" ;;
1738 esac
1740 # Adjust relative srcdir, etc. for subdirectories.
1742 # Remove last slash and all that follows it. Not all systems have dirname.
1743 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1744 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1745 # The file is in a subdirectory.
1746 test ! -d "$ac_dir" && mkdir "$ac_dir"
1747 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1748 # A "../" for each directory in $ac_dir_suffix.
1749 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1750 else
1751 ac_dir_suffix= ac_dots=
1754 case "$ac_given_srcdir" in
1755 .) srcdir=.
1756 if test -z "$ac_dots"; then top_srcdir=.
1757 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1758 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1759 *) # Relative path.
1760 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1761 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1762 esac
1764 echo creating "$ac_file"
1765 rm -f "$ac_file"
1766 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1767 case "$ac_file" in
1768 *Makefile*) ac_comsub="1i\\
1769 # $configure_input" ;;
1770 *) ac_comsub= ;;
1771 esac
1772 sed -e "$ac_comsub
1773 s%@configure_input@%$configure_input%g
1774 s%@srcdir@%$srcdir%g
1775 s%@top_srcdir@%$top_srcdir%g
1776 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1777 fi; done
1778 rm -f conftest.subs
1782 exit 0
1784 chmod +x $CONFIG_STATUS
1785 rm -fr confdefs* $ac_clean_files
1786 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1789 echo
1790 echo "Configure finished. Do 'make depend; make' to compile Wine."
1791 echo