Release 950727
[wine] / configure
1 #! /bin/sh
2
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.
7 #
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Defaults:
12 ac_help=
13 ac_default_prefix=/usr/local
14 # Any additions from configure.in:
15 ac_help="$ac_help
16   --with-x                use the X Window System"
17
18 # Initialize some variables set by options.
19 # The variables have the same names as the options, with
20 # dashes changed to underlines.
21 build=NONE
22 cache_file=./config.cache
23 exec_prefix=NONE
24 host=NONE
25 no_create=
26 nonopt=NONE
27 no_recursion=
28 prefix=NONE
29 program_prefix=NONE
30 program_suffix=NONE
31 program_transform_name=s,x,x,
32 silent=
33 site=
34 srcdir=
35 target=NONE
36 verbose=
37 x_includes=NONE
38 x_libraries=NONE
39
40 # Initialize some other variables.
41 subdirs=
42
43 ac_prev=
44 for ac_option
45 do
46
47   # If the previous option needs an argument, assign it.
48   if test -n "$ac_prev"; then
49     eval "$ac_prev=\$ac_option"
50     ac_prev=
51     continue
52   fi
53
54   case "$ac_option" in
55   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
56   *) ac_optarg= ;;
57   esac
58
59   # Accept the important Cygnus configure options, so we can diagnose typos.
60
61   case "$ac_option" in
62
63   -build | --build | --buil | --bui | --bu | --b)
64     ac_prev=build ;;
65   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
66     build="$ac_optarg" ;;
67
68   -cache-file | --cache-file | --cache-fil | --cache-fi \
69   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
70     ac_prev=cache_file ;;
71   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
72   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
73     cache_file="$ac_optarg" ;;
74
75   -disable-* | --disable-*)
76     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
77     # Reject names that are not valid shell variable names.
78     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
79       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
80     fi
81     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
82     eval "enable_${ac_feature}=no" ;;
83
84   -enable-* | --enable-*)
85     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
86     # Reject names that are not valid shell variable names.
87     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
88       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
89     fi
90     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
91     case "$ac_option" in
92       *=*) ;;
93       *) ac_optarg=yes ;;
94     esac
95     eval "enable_${ac_feature}='$ac_optarg'" ;;
96
97   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
98   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
99   | --exec | --exe | --ex)
100     ac_prev=exec_prefix ;;
101   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
102   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
103   | --exec=* | --exe=* | --ex=*)
104     exec_prefix="$ac_optarg" ;;
105
106   -gas | --gas | --ga | --g)
107     # Obsolete; use --with-gas.
108     with_gas=yes ;;
109
110   -help | --help | --hel | --he)
111     # Omit some internal or obsolete options to make the list less imposing.
112     # This message is too long to be a string in the A/UX 3.1 sh.
113     cat << EOF
114 Usage: configure [options] [host]
115 Options: [defaults in brackets after descriptions]
116 Configuration:
117   --cache-file=FILE       cache test results in FILE
118   --help                  print this message
119   --no-create             do not create output files
120   --quiet, --silent       do not print \`checking...' messages
121   --version               print the version of autoconf that created configure
122 Directory and file names:
123   --prefix=PREFIX         install architecture-independent files in PREFIX
124                           [$ac_default_prefix]
125   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
126                           [same as prefix]
127   --srcdir=DIR            find the sources in DIR [configure dir or ..]
128   --program-prefix=PREFIX prepend PREFIX to installed program names
129   --program-suffix=SUFFIX append SUFFIX to installed program names
130   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
131 Host type:
132   --build=BUILD           configure for building on BUILD [BUILD=HOST]
133   --host=HOST             configure for HOST [guessed]
134   --target=TARGET         configure for TARGET [TARGET=HOST]
135 Features and packages:
136   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
137   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
138   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
139   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
140   --x-includes=DIR        X include files are in DIR
141   --x-libraries=DIR       X library files are in DIR
142 --enable and --with options recognized:$ac_help
143 EOF
144     exit 0 ;;
145
146   -host | --host | --hos | --ho)
147     ac_prev=host ;;
148   -host=* | --host=* | --hos=* | --ho=*)
149     host="$ac_optarg" ;;
150
151   -nfp | --nfp | --nf)
152     # Obsolete; use --without-fp.
153     with_fp=no ;;
154
155   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
156   | --no-cr | --no-c)
157     no_create=yes ;;
158
159   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
160   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
161     no_recursion=yes ;;
162
163   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
164     ac_prev=prefix ;;
165   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
166     prefix="$ac_optarg" ;;
167
168   -program-prefix | --program-prefix | --program-prefi | --program-pref \
169   | --program-pre | --program-pr | --program-p)
170     ac_prev=program_prefix ;;
171   -program-prefix=* | --program-prefix=* | --program-prefi=* \
172   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
173     program_prefix="$ac_optarg" ;;
174
175   -program-suffix | --program-suffix | --program-suffi | --program-suff \
176   | --program-suf | --program-su | --program-s)
177     ac_prev=program_suffix ;;
178   -program-suffix=* | --program-suffix=* | --program-suffi=* \
179   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
180     program_suffix="$ac_optarg" ;;
181
182   -program-transform-name | --program-transform-name \
183   | --program-transform-nam | --program-transform-na \
184   | --program-transform-n | --program-transform- \
185   | --program-transform | --program-transfor \
186   | --program-transfo | --program-transf \
187   | --program-trans | --program-tran \
188   | --progr-tra | --program-tr | --program-t)
189     ac_prev=program_transform_name ;;
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     program_transform_name="$ac_optarg" ;;
198
199   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
200   | -silent | --silent | --silen | --sile | --sil)
201     silent=yes ;;
202
203   -site | --site | --sit)
204     ac_prev=site ;;
205   -site=* | --site=* | --sit=*)
206     site="$ac_optarg" ;;
207
208   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
209     ac_prev=srcdir ;;
210   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
211     srcdir="$ac_optarg" ;;
212
213   -target | --target | --targe | --targ | --tar | --ta | --t)
214     ac_prev=target ;;
215   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
216     target="$ac_optarg" ;;
217
218   -v | -verbose | --verbose | --verbos | --verbo | --verb)
219     verbose=yes ;;
220
221   -version | --version | --versio | --versi | --vers)
222     echo "configure generated by autoconf version 2.4"
223     exit 0 ;;
224
225   -with-* | --with-*)
226     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
227     # Reject names that are not valid shell variable names.
228     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
229       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
230     fi
231     ac_package=`echo $ac_package| sed 's/-/_/g'`
232     case "$ac_option" in
233       *=*) ;;
234       *) ac_optarg=yes ;;
235     esac
236     eval "with_${ac_package}='$ac_optarg'" ;;
237
238   -without-* | --without-*)
239     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
240     # Reject names that are not valid shell variable names.
241     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
242       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
243     fi
244     ac_package=`echo $ac_package| sed 's/-/_/g'`
245     eval "with_${ac_package}=no" ;;
246
247   --x)
248     # Obsolete; use --with-x.
249     with_x=yes ;;
250
251   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
252   | --x-incl | --x-inc | --x-in | --x-i)
253     ac_prev=x_includes ;;
254   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
255   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
256     x_includes="$ac_optarg" ;;
257
258   -x-libraries | --x-libraries | --x-librarie | --x-librari \
259   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
260     ac_prev=x_libraries ;;
261   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
262   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
263     x_libraries="$ac_optarg" ;;
264
265   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
266     ;;
267
268   *) 
269     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
270       echo "configure: warning: $ac_option: invalid host type" 1>&2
271     fi
272     if test "x$nonopt" != xNONE; then
273       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
274     fi
275     nonopt="$ac_option"
276     ;;
277
278   esac
279 done
280
281 if test -n "$ac_prev"; then
282   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
283 fi
284
285 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
286
287 # File descriptor usage:
288 # 0 standard input
289 # 1 file creation
290 # 2 errors and warnings
291 # 3 some systems may open it to /dev/tty
292 # 4 used on the Kubota Titan
293 # 6 checking for... messages and results
294 # 5 compiler messages saved in config.log
295 if test "$silent" = yes; then
296   exec 6>/dev/null
297 else
298   exec 6>&1
299 fi
300 exec 5>./config.log
301
302 echo "\
303 This file contains any messages produced by compilers while
304 running configure, to aid debugging if configure makes a mistake.
305 " 1>&5
306
307 # Strip out --no-create and --no-recursion so they do not pile up.
308 # Also quote any args containing shell metacharacters.
309 ac_configure_args=
310 for ac_arg
311 do
312   case "$ac_arg" in
313   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
314   | --no-cr | --no-c) ;;
315   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
316   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
317   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
318   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
319   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
320   esac
321 done
322
323 # NLS nuisances.
324 # Only set LANG and LC_ALL to C if already set.
325 # These must not be set unconditionally because not all systems understand
326 # e.g. LANG=C (notably SCO).
327 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
328 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
329
330 # confdefs.h avoids OS command line length limits that DEFS can exceed.
331 rm -rf conftest* confdefs.h
332 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
333 echo > confdefs.h
334
335 # A filename unique to this package, relative to the directory that
336 # configure is in, which we can look for to find out if srcdir is correct.
337 ac_unique_file=controls/edit.c
338
339 # Find the source files, if location was not specified.
340 if test -z "$srcdir"; then
341   ac_srcdir_defaulted=yes
342   # Try the directory containing this script, then its parent.
343   ac_prog=$0
344   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
345   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
346   srcdir=$ac_confdir
347   if test ! -r $srcdir/$ac_unique_file; then
348     srcdir=..
349   fi
350 else
351   ac_srcdir_defaulted=no
352 fi
353 if test ! -r $srcdir/$ac_unique_file; then
354   if test "$ac_srcdir_defaulted" = yes; then
355     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
356   else
357     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
358   fi
359 fi
360 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
361
362 # Prefer explicitly selected file to automatically selected ones.
363 if test -z "$CONFIG_SITE"; then
364   if test "x$prefix" != xNONE; then
365     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
366   else
367     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
368   fi
369 fi
370 for ac_site_file in $CONFIG_SITE; do
371   if test -r "$ac_site_file"; then
372     echo "loading site script $ac_site_file"
373     . "$ac_site_file"
374   fi
375 done
376
377 if test -r "$cache_file"; then
378   echo "loading cache $cache_file"
379   . $cache_file
380 else
381   echo "creating cache $cache_file"
382   > $cache_file
383 fi
384
385 ac_ext=c
386 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
387 ac_cpp='$CPP $CPPFLAGS'
388 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
389 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
390
391 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
392   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
393   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
394     ac_n= ac_c='
395 ' ac_t='        '
396   else
397     ac_n=-n ac_c= ac_t=
398   fi
399 else
400   ac_n= ac_c='\c' ac_t=
401 fi
402
403                 
404
405
406 # We want these before the checks, so the checks can modify their values.
407 test -z "$CFLAGS" && CFLAGS="-g -O2 -Wall" 
408 test -z "$LDFLAGS" && LDFLAGS=-g 
409
410 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
411 set dummy ${MAKE-make}; ac_make=$2
412 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
413   echo $ac_n "(cached) $ac_c" 1>&6
414 else
415   cat > conftestmake <<\EOF
416 all:
417         @echo 'ac_maketemp="${MAKE}"'
418 EOF
419 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
420 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
421 if test -n "$ac_maketemp"; then
422   eval ac_cv_prog_make_${ac_make}_set=yes
423 else
424   eval ac_cv_prog_make_${ac_make}_set=no
425 fi
426 rm -f conftestmake
427 fi
428 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
429   echo "$ac_t""yes" 1>&6
430   SET_MAKE=
431 else
432   echo "$ac_t""no" 1>&6
433   SET_MAKE="MAKE=${MAKE-make}"
434 fi
435
436 # Extract the first word of "gcc", so it can be a program name with args.
437 set dummy gcc; ac_word=$2
438 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
439 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
440   echo $ac_n "(cached) $ac_c" 1>&6
441 else
442   if test -n "$CC"; then
443   ac_cv_prog_CC="$CC" # Let the user override the test.
444 else
445   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
446   for ac_dir in $PATH; do
447     test -z "$ac_dir" && ac_dir=.
448     if test -f $ac_dir/$ac_word; then
449       ac_cv_prog_CC="gcc"
450       break
451     fi
452   done
453   IFS="$ac_save_ifs"
454   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
455 fi
456 fi
457 CC="$ac_cv_prog_CC"
458 if test -n "$CC"; then
459   echo "$ac_t""$CC" 1>&6
460 else
461   echo "$ac_t""no" 1>&6
462 fi
463
464
465 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
466 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
467   echo $ac_n "(cached) $ac_c" 1>&6
468 else
469   cat > conftest.c <<EOF
470 #ifdef __GNUC__
471   yes;
472 #endif
473 EOF
474 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
475   ac_cv_prog_gcc=yes
476 else
477   ac_cv_prog_gcc=no
478 fi
479 fi
480 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
481 if test $ac_cv_prog_gcc = yes; then
482   GCC=yes
483   if test "${CFLAGS+set}" != set; then
484     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
485 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
486   echo $ac_n "(cached) $ac_c" 1>&6
487 else
488   echo 'void f(){}' > conftest.c
489 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
490   ac_cv_prog_gcc_g=yes
491 else
492   ac_cv_prog_gcc_g=no
493 fi
494 rm -f conftest*
495
496 fi
497     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
498     if test $ac_cv_prog_gcc_g = yes; then
499       CFLAGS="-g -O"
500     else
501       CFLAGS="-O"
502     fi
503   fi
504 else
505   GCC=
506   test "${CFLAGS+set}" = set || CFLAGS="-g"
507 fi
508
509 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
510 # On Suns, sometimes $CPP names a directory.
511 if test -n "$CPP" && test -d "$CPP"; then
512   CPP=
513 fi
514 if test -z "$CPP"; then
515 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
516   echo $ac_n "(cached) $ac_c" 1>&6
517 else
518     # This must be in double quotes, not single quotes, because CPP may get
519   # substituted into the Makefile and "${CC-cc}" will confuse make.
520   CPP="${CC-cc} -E"
521   # On the NeXT, cc -E runs the code through the compiler's parser,
522   # not just through cpp.
523   cat > conftest.$ac_ext <<EOF
524 #line 525 "configure"
525 #include "confdefs.h"
526 #include <assert.h>
527 Syntax Error
528 EOF
529 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
530 ac_err=`grep -v '^ *+' conftest.out`
531 if test -z "$ac_err"; then
532   :
533 else
534   echo "$ac_err" >&5
535   rm -rf conftest*
536   CPP="${CC-cc} -E -traditional-cpp"
537   cat > conftest.$ac_ext <<EOF
538 #line 539 "configure"
539 #include "confdefs.h"
540 #include <assert.h>
541 Syntax Error
542 EOF
543 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
544 ac_err=`grep -v '^ *+' conftest.out`
545 if test -z "$ac_err"; then
546   :
547 else
548   echo "$ac_err" >&5
549   rm -rf conftest*
550   CPP=/lib/cpp
551 fi
552 rm -f conftest*
553 fi
554 rm -f conftest*
555   ac_cv_prog_CPP="$CPP"
556 fi
557   CPP="$ac_cv_prog_CPP"
558 else
559   ac_cv_prog_CPP="$CPP"
560 fi
561 echo "$ac_t""$CPP" 1>&6
562
563 # If we find X, set shell vars x_includes and x_libraries to the
564 # paths, otherwise set no_x=yes.
565 # Uses ac_ vars as temps to allow command line to override cache and checks.
566 # --without-x overrides everything else, but does not touch the cache.
567 echo $ac_n "checking for X""... $ac_c" 1>&6
568
569 # Check whether --with-x or --without-x was given.
570 withval="$with_x"
571 if test -n "$withval"; then
572   :
573 fi
574
575 if test "x$with_x" = xno; then
576   no_x=yes
577 else
578   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
579     no_x=
580   else
581 if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
582   echo $ac_n "(cached) $ac_c" 1>&6
583 else
584   # One or both of the vars are not set, and there is no cached value.
585 no_x=yes
586 rm -fr conftestdir
587 if mkdir conftestdir; then
588   cd conftestdir
589   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
590   cat > Imakefile <<'EOF'
591 acfindx:
592         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
593 EOF
594   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
595     no_x=
596     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
597     eval `make acfindx 2>/dev/null | grep -v make`
598     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
599     for ac_extension in a so sl; do
600       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
601         test -f $ac_im_libdir/libX11.$ac_extension; then
602         ac_im_usrlibdir=$ac_im_libdir; break
603       fi
604     done
605     # Screen out bogus values from the imake configuration.
606     case "$ac_im_incroot" in
607         /usr/include) ;;
608         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
609     esac
610     case "$ac_im_usrlibdir" in
611         /usr/lib | /lib) ;;
612         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
613     esac
614   fi
615   cd ..
616   rm -fr conftestdir
617 fi
618
619 if test "$no_x" = yes; then
620 test -z "$x_direct_test_library" && x_direct_test_library=Xt
621 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
622 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
623 cat > conftest.$ac_ext <<EOF
624 #line 625 "configure"
625 #include "confdefs.h"
626 #include <$x_direct_test_include>
627 EOF
628 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
629 ac_err=`grep -v '^ *+' conftest.out`
630 if test -z "$ac_err"; then
631   rm -rf conftest*
632   no_x= ac_x_includes=
633 else
634   echo "$ac_err" >&5
635   rm -rf conftest*
636     for ac_dir in               \
637     /usr/X11R6/include        \
638     /usr/X11R5/include        \
639     /usr/X11R4/include        \
640                               \
641     /usr/include/X11R6        \
642     /usr/include/X11R5        \
643     /usr/include/X11R4        \
644                               \
645     /usr/local/X11R6/include  \
646     /usr/local/X11R5/include  \
647     /usr/local/X11R4/include  \
648                               \
649     /usr/local/include/X11R6  \
650     /usr/local/include/X11R5  \
651     /usr/local/include/X11R4  \
652                               \
653     /usr/X11/include          \
654     /usr/include/X11          \
655     /usr/local/X11/include    \
656     /usr/local/include/X11    \
657                               \
658     /usr/X386/include         \
659     /usr/x386/include         \
660     /usr/XFree86/include/X11  \
661                               \
662     /usr/include              \
663     /usr/local/include        \
664     /usr/unsupported/include  \
665     /usr/athena/include       \
666     /usr/local/x11r5/include  \
667     /usr/lpp/Xamples/include  \
668                               \
669     /usr/openwin/include      \
670     /usr/openwin/share/include \
671     ; \
672   do
673     if test -r "$ac_dir/$x_direct_test_include"; then
674       no_x= ac_x_includes=$ac_dir
675       break
676     fi
677   done
678 fi
679 rm -f conftest*
680
681 # Check for the libraries.
682 # See if we find them without any special options.
683 # Don't add to $LIBS permanently.
684 ac_save_LIBS="$LIBS"
685 LIBS="-l$x_direct_test_library $LIBS"
686 cat > conftest.$ac_ext <<EOF
687 #line 688 "configure"
688 #include "confdefs.h"
689
690 int main() { return 0; }
691 int t() {
692 ${x_direct_test_function}()
693 ; return 0; }
694 EOF
695 if eval $ac_link; then
696   rm -rf conftest*
697   LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
698 else
699   rm -rf conftest*
700   LIBS="$ac_save_LIBS"
701 # First see if replacing the include by lib works.
702 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
703     /usr/X11R6/lib        \
704     /usr/X11R5/lib        \
705     /usr/X11R4/lib        \
706                           \
707     /usr/lib/X11R6        \
708     /usr/lib/X11R5        \
709     /usr/lib/X11R4        \
710                           \
711     /usr/local/X11R6/lib  \
712     /usr/local/X11R5/lib  \
713     /usr/local/X11R4/lib  \
714                           \
715     /usr/local/lib/X11R6  \
716     /usr/local/lib/X11R5  \
717     /usr/local/lib/X11R4  \
718                           \
719     /usr/X11/lib          \
720     /usr/lib/X11          \
721     /usr/local/X11/lib    \
722     /usr/local/lib/X11    \
723                           \
724     /usr/X386/lib         \
725     /usr/x386/lib         \
726     /usr/XFree86/lib/X11  \
727                           \
728     /usr/lib              \
729     /usr/local/lib        \
730     /usr/unsupported/lib  \
731     /usr/athena/lib       \
732     /usr/local/x11r5/lib  \
733     /usr/lpp/Xamples/lib  \
734                           \
735     /usr/openwin/lib      \
736     /usr/openwin/share/lib \
737     ; \
738 do
739   for ac_extension in a so sl; do
740     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
741       no_x= ac_x_libraries=$ac_dir
742       break 2
743     fi
744   done
745 done
746 fi
747 rm -f conftest*
748
749 fi
750 if test "$no_x" = yes; then
751   ac_cv_path_x="no_x=yes"
752 else
753   ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
754 fi
755 fi
756   fi
757   eval "$ac_cv_path_x"
758 fi # $with_x != no
759
760 if test "$no_x" = yes; then
761   echo "$ac_t""no" 1>&6
762 else
763   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
764   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
765   ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
766   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
767 fi
768
769 for ac_prog in 'bison -y' byacc
770 do
771 # Extract the first word of "$ac_prog", so it can be a program name with args.
772 set dummy $ac_prog; ac_word=$2
773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
774 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
775   echo $ac_n "(cached) $ac_c" 1>&6
776 else
777   if test -n "$YACC"; then
778   ac_cv_prog_YACC="$YACC" # Let the user override the test.
779 else
780   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
781   for ac_dir in $PATH; do
782     test -z "$ac_dir" && ac_dir=.
783     if test -f $ac_dir/$ac_word; then
784       ac_cv_prog_YACC="$ac_prog"
785       break
786     fi
787   done
788   IFS="$ac_save_ifs"
789 fi
790 fi
791 YACC="$ac_cv_prog_YACC"
792 if test -n "$YACC"; then
793   echo "$ac_t""$YACC" 1>&6
794 else
795   echo "$ac_t""no" 1>&6
796 fi
797
798 test -n "$YACC" && break
799 done
800 test -n "$YACC" || YACC="yacc"
801
802 # Extract the first word of "flex", so it can be a program name with args.
803 set dummy flex; ac_word=$2
804 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
805 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
806   echo $ac_n "(cached) $ac_c" 1>&6
807 else
808   if test -n "$LEX"; then
809   ac_cv_prog_LEX="$LEX" # Let the user override the test.
810 else
811   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
812   for ac_dir in $PATH; do
813     test -z "$ac_dir" && ac_dir=.
814     if test -f $ac_dir/$ac_word; then
815       ac_cv_prog_LEX="flex"
816       break
817     fi
818   done
819   IFS="$ac_save_ifs"
820   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
821 fi
822 fi
823 LEX="$ac_cv_prog_LEX"
824 if test -n "$LEX"; then
825   echo "$ac_t""$LEX" 1>&6
826 else
827   echo "$ac_t""no" 1>&6
828 fi
829
830 if test -z "$LEXLIB"
831 then
832   case "$LEX" in
833   flex*) ac_lib=fl ;;
834   *) ac_lib=l ;;
835   esac
836   echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
837 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib'+set}'`\" = set"; then
838   echo $ac_n "(cached) $ac_c" 1>&6
839 else
840   ac_save_LIBS="$LIBS"
841 LIBS="-l$ac_lib  $LIBS"
842 cat > conftest.$ac_ext <<EOF
843 #line 844 "configure"
844 #include "confdefs.h"
845
846 int main() { return 0; }
847 int t() {
848 yywrap()
849 ; return 0; }
850 EOF
851 if eval $ac_link; then
852   rm -rf conftest*
853   eval "ac_cv_lib_$ac_lib=yes"
854 else
855   rm -rf conftest*
856   eval "ac_cv_lib_$ac_lib=no"
857 fi
858 rm -f conftest*
859 LIBS="$ac_save_LIBS"
860
861 fi
862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib`\" = yes"; then
863   echo "$ac_t""yes" 1>&6
864   LEXLIB="-l$ac_lib"
865 else
866   echo "$ac_t""no" 1>&6
867 fi
868
869 fi
870
871 if test -n "$x_includes" ; then
872   x_includes="-I$x_includes"
873 fi
874 if test -n "$x_no" ; then
875   AXFILES='AXFILES='
876 fi
877
878
879
880
881
882 LD=ld
883 LDCOMBINEFLAGS="-r"
884
885
886
887 for ac_func in tcgetattr
888 do
889 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
890 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
891   echo $ac_n "(cached) $ac_c" 1>&6
892 else
893   cat > conftest.$ac_ext <<EOF
894 #line 895 "configure"
895 #include "confdefs.h"
896 /* System header to define __stub macros and hopefully few prototypes,
897     which can conflict with char $ac_func(); below.  */
898 #include <assert.h>
899 /* Override any gcc2 internal prototype to avoid an error.  */
900 char $ac_func(); 
901
902 int main() { return 0; }
903 int t() {
904
905 /* The GNU C library defines this for functions which it implements
906     to always fail with ENOSYS.  Some functions are actually named
907     something starting with __ and the normal name is an alias.  */
908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
909 choke me
910 #else
911 $ac_func();
912 #endif
913
914 ; return 0; }
915 EOF
916 if eval $ac_link; then
917   rm -rf conftest*
918   eval "ac_cv_func_$ac_func=yes"
919 else
920   rm -rf conftest*
921   eval "ac_cv_func_$ac_func=no"
922 fi
923 rm -f conftest*
924
925 fi
926 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
927   echo "$ac_t""yes" 1>&6
928     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
929   cat >> confdefs.h <<EOF
930 #define $ac_tr_func 1
931 EOF
932  
933 else
934   echo "$ac_t""no" 1>&6
935 fi
936 done
937
938 for ac_hdr in stdlib.h
939 do
940 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
941 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
942 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
943   echo $ac_n "(cached) $ac_c" 1>&6
944 else
945   cat > conftest.$ac_ext <<EOF
946 #line 947 "configure"
947 #include "confdefs.h"
948 #include <$ac_hdr>
949 EOF
950 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
951 ac_err=`grep -v '^ *+' conftest.out`
952 if test -z "$ac_err"; then
953   rm -rf conftest*
954   eval "ac_cv_header_$ac_safe=yes"
955 else
956   echo "$ac_err" >&5
957   rm -rf conftest*
958   eval "ac_cv_header_$ac_safe=no"
959 fi
960 rm -f conftest*
961 fi
962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
963   echo "$ac_t""yes" 1>&6
964     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
965   cat >> confdefs.h <<EOF
966 #define $ac_tr_hdr 1
967 EOF
968  
969 else
970   echo "$ac_t""no" 1>&6
971 fi
972 done
973
974 ac_header_dirent=no
975 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
976 do
977 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
978 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
979 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
980   echo $ac_n "(cached) $ac_c" 1>&6
981 else
982   cat > conftest.$ac_ext <<EOF
983 #line 984 "configure"
984 #include "confdefs.h"
985 #include <sys/types.h>
986 #include <$ac_hdr>
987 int main() { return 0; }
988 int t() {
989 DIR *dirp = 0;
990 ; return 0; }
991 EOF
992 if eval $ac_compile; then
993   rm -rf conftest*
994   eval "ac_cv_header_dirent_$ac_safe=yes"
995 else
996   rm -rf conftest*
997   eval "ac_cv_header_dirent_$ac_safe=no"
998 fi
999 rm -f conftest*
1000
1001 fi
1002 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1003   echo "$ac_t""yes" 1>&6
1004     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1005   cat >> confdefs.h <<EOF
1006 #define $ac_tr_hdr 1
1007 EOF
1008  ac_header_dirent=$ac_hdr; break
1009 else
1010   echo "$ac_t""no" 1>&6
1011 fi
1012 done
1013 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1014 if test $ac_header_dirent = dirent.h; then
1015 echo $ac_n "checking for -ldir""... $ac_c" 1>&6
1016 if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then
1017   echo $ac_n "(cached) $ac_c" 1>&6
1018 else
1019   ac_save_LIBS="$LIBS"
1020 LIBS="-ldir  $LIBS"
1021 cat > conftest.$ac_ext <<EOF
1022 #line 1023 "configure"
1023 #include "confdefs.h"
1024
1025 int main() { return 0; }
1026 int t() {
1027 opendir()
1028 ; return 0; }
1029 EOF
1030 if eval $ac_link; then
1031   rm -rf conftest*
1032   eval "ac_cv_lib_dir=yes"
1033 else
1034   rm -rf conftest*
1035   eval "ac_cv_lib_dir=no"
1036 fi
1037 rm -f conftest*
1038 LIBS="$ac_save_LIBS"
1039
1040 fi
1041 if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
1042   echo "$ac_t""yes" 1>&6
1043   LIBS="$LIBS -ldir"
1044 else
1045   echo "$ac_t""no" 1>&6
1046 fi
1047
1048 else
1049 echo $ac_n "checking for -lx""... $ac_c" 1>&6
1050 if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then
1051   echo $ac_n "(cached) $ac_c" 1>&6
1052 else
1053   ac_save_LIBS="$LIBS"
1054 LIBS="-lx  $LIBS"
1055 cat > conftest.$ac_ext <<EOF
1056 #line 1057 "configure"
1057 #include "confdefs.h"
1058
1059 int main() { return 0; }
1060 int t() {
1061 opendir()
1062 ; return 0; }
1063 EOF
1064 if eval $ac_link; then
1065   rm -rf conftest*
1066   eval "ac_cv_lib_x=yes"
1067 else
1068   rm -rf conftest*
1069   eval "ac_cv_lib_x=no"
1070 fi
1071 rm -f conftest*
1072 LIBS="$ac_save_LIBS"
1073
1074 fi
1075 if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
1076   echo "$ac_t""yes" 1>&6
1077   LIBS="$LIBS -lx"
1078 else
1079   echo "$ac_t""no" 1>&6
1080 fi
1081
1082 fi
1083
1084 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1085 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1086   echo $ac_n "(cached) $ac_c" 1>&6
1087 else
1088   cat > conftest.$ac_ext <<EOF
1089 #line 1090 "configure"
1090 #include "confdefs.h"
1091 #include <sys/types.h>
1092 #include <sys/stat.h>
1093
1094 #if defined(S_ISBLK) && defined(S_IFDIR)
1095 # if S_ISBLK (S_IFDIR)
1096 You lose.
1097 # endif
1098 #endif
1099
1100 #if defined(S_ISBLK) && defined(S_IFCHR)
1101 # if S_ISBLK (S_IFCHR)
1102 You lose.
1103 # endif
1104 #endif
1105
1106 #if defined(S_ISLNK) && defined(S_IFREG)
1107 # if S_ISLNK (S_IFREG)
1108 You lose.
1109 # endif
1110 #endif
1111
1112 #if defined(S_ISSOCK) && defined(S_IFREG)
1113 # if S_ISSOCK (S_IFREG)
1114 You lose.
1115 # endif
1116 #endif
1117
1118 EOF
1119 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1120   egrep "You lose" >/dev/null 2>&1; then
1121   rm -rf conftest*
1122   ac_cv_header_stat_broken=yes
1123 else
1124   rm -rf conftest*
1125   ac_cv_header_stat_broken=no
1126 fi
1127 rm -f conftest*
1128
1129 fi
1130 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1131 if test $ac_cv_header_stat_broken = yes; then
1132   cat >> confdefs.h <<\EOF
1133 #define STAT_MACROS_BROKEN 1
1134 EOF
1135
1136 fi
1137
1138 echo $ac_n "checking for working const""... $ac_c" 1>&6
1139 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1140   echo $ac_n "(cached) $ac_c" 1>&6
1141 else
1142   cat > conftest.$ac_ext <<EOF
1143 #line 1144 "configure"
1144 #include "confdefs.h"
1145
1146 int main() { return 0; }
1147 int t() {
1148
1149 /* Ultrix mips cc rejects this.  */
1150 typedef int charset[2]; const charset x;
1151 /* SunOS 4.1.1 cc rejects this.  */
1152 char const *const *ccp;
1153 char **p;
1154 /* NEC SVR4.0.2 mips cc rejects this.  */
1155 struct point {int x, y;};
1156 static struct point const zero;
1157 /* AIX XL C 1.02.0.0 rejects this.
1158    It does not let you subtract one const X* pointer from another in an arm
1159    of an if-expression whose if-part is not a constant expression */
1160 const char *g = "string";
1161 ccp = &g + (g ? g-g : 0);
1162 /* HPUX 7.0 cc rejects these. */
1163 ++ccp;
1164 p = (char**) ccp;
1165 ccp = (char const *const *) p;
1166 { /* SCO 3.2v4 cc rejects this.  */
1167   char *t;
1168   char const *s = 0 ? (char *) 0 : (char const *) 0;
1169
1170   *t++ = 0;
1171 }
1172 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1173   int x[] = {25, 17};
1174   const int *foo = &x[0];
1175   ++foo;
1176 }
1177 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1178   typedef const int *iptr;
1179   iptr p = 0;
1180   ++p;
1181 }
1182 { /* AIX XL C 1.02.0.0 rejects this saying
1183      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1184   struct s { int j; const int *ap[3]; };
1185   struct s *b; b->j = 5;
1186 }
1187 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1188   const int foo = 10;
1189 }
1190
1191 ; return 0; }
1192 EOF
1193 if eval $ac_compile; then
1194   rm -rf conftest*
1195   ac_cv_c_const=yes
1196 else
1197   rm -rf conftest*
1198   ac_cv_c_const=no
1199 fi
1200 rm -f conftest*
1201
1202 fi
1203 echo "$ac_t""$ac_cv_c_const" 1>&6
1204 if test $ac_cv_c_const = no; then
1205   cat >> confdefs.h <<\EOF
1206 #define const 
1207 EOF
1208
1209 fi
1210
1211 # If we cannot run a trivial program, we must be cross compiling.
1212 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1213 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1214   echo $ac_n "(cached) $ac_c" 1>&6
1215 else
1216   if test "$cross_compiling" = yes; then
1217   ac_cv_c_cross=yes
1218 else
1219 cat > conftest.$ac_ext <<EOF
1220 #line 1221 "configure"
1221 #include "confdefs.h"
1222 main(){return(0);}
1223 EOF
1224 eval $ac_link
1225 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1226   ac_cv_c_cross=no
1227 else
1228   ac_cv_c_cross=yes
1229 fi
1230 fi
1231 rm -fr conftest*
1232 fi
1233 cross_compiling=$ac_cv_c_cross
1234 echo "$ac_t""$ac_cv_c_cross" 1>&6
1235
1236 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1237 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1238   echo $ac_n "(cached) $ac_c" 1>&6
1239 else
1240   cat > conftest.$ac_ext <<EOF
1241 #line 1242 "configure"
1242 #include "confdefs.h"
1243 #include <stdlib.h>
1244 #include <stdarg.h>
1245 #include <string.h>
1246 #include <float.h>
1247 EOF
1248 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1249 ac_err=`grep -v '^ *+' conftest.out`
1250 if test -z "$ac_err"; then
1251   rm -rf conftest*
1252   ac_cv_header_stdc=yes
1253 else
1254   echo "$ac_err" >&5
1255   rm -rf conftest*
1256   ac_cv_header_stdc=no
1257 fi
1258 rm -f conftest*
1259
1260 if test $ac_cv_header_stdc = yes; then
1261   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1262 cat > conftest.$ac_ext <<EOF
1263 #line 1264 "configure"
1264 #include "confdefs.h"
1265 #include <string.h>
1266 EOF
1267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1268   egrep "memchr" >/dev/null 2>&1; then
1269   :
1270 else
1271   rm -rf conftest*
1272   ac_cv_header_stdc=no
1273 fi
1274 rm -f conftest*
1275
1276 fi
1277
1278 if test $ac_cv_header_stdc = yes; then
1279   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1280 cat > conftest.$ac_ext <<EOF
1281 #line 1282 "configure"
1282 #include "confdefs.h"
1283 #include <stdlib.h>
1284 EOF
1285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1286   egrep "free" >/dev/null 2>&1; then
1287   :
1288 else
1289   rm -rf conftest*
1290   ac_cv_header_stdc=no
1291 fi
1292 rm -f conftest*
1293
1294 fi
1295
1296 if test $ac_cv_header_stdc = yes; then
1297   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1298 if test "$cross_compiling" = yes; then
1299   ac_cv_header_stdc=no
1300 else
1301 cat > conftest.$ac_ext <<EOF
1302 #line 1303 "configure"
1303 #include "confdefs.h"
1304 #include <ctype.h>
1305 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1306 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1307 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1308 int main () { int i; for (i = 0; i < 256; i++)
1309 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1310 exit (0); }
1311
1312 EOF
1313 eval $ac_link
1314 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1315   :
1316 else
1317   ac_cv_header_stdc=no
1318 fi
1319 fi
1320 rm -fr conftest*
1321 fi
1322 fi
1323 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1324 if test $ac_cv_header_stdc = yes; then
1325   cat >> confdefs.h <<\EOF
1326 #define STDC_HEADERS 1
1327 EOF
1328
1329 fi
1330
1331 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1332 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1333   echo $ac_n "(cached) $ac_c" 1>&6
1334 else
1335   cat > conftest.$ac_ext <<EOF
1336 #line 1337 "configure"
1337 #include "confdefs.h"
1338 #include <sys/types.h>
1339 #if STDC_HEADERS
1340 #include <stdlib.h>
1341 #endif
1342 EOF
1343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1344   egrep "size_t" >/dev/null 2>&1; then
1345   rm -rf conftest*
1346   ac_cv_type_size_t=yes
1347 else
1348   rm -rf conftest*
1349   ac_cv_type_size_t=no
1350 fi
1351 rm -f conftest*
1352
1353 fi
1354 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1355 if test $ac_cv_type_size_t = no; then
1356   cat >> confdefs.h <<\EOF
1357 #define size_t unsigned
1358 EOF
1359
1360 fi
1361
1362
1363 if test -z "${top_srcdir}"; then
1364 TOP_SRCDIR="."
1365 else
1366 TOP_SRCDIR="${top_srcdir}"
1367 fi
1368 echo $ac_n "checking for language in autoconf.h""... $ac_c" 1>&6
1369 if test -f ${TOP_SRCDIR}/autoconf.h; then
1370 LANG=`tr ' ' '\n' < ${TOP_SRCDIR}/autoconf.h | grep '\-ALANG' | head -1`
1371 if test -n "${LANG}"; then
1372 echo "$ac_t""`echo "${LANG}" | cut -b9-10`" 1>&6
1373 fi
1374 fi
1375 if test -z "${LANG}"; then
1376 echo "$ac_t""no" 1>&6
1377 fi
1378
1379
1380 if test -z "${LANG}"; then
1381 echo $ac_n "checking for language through domainname""... $ac_c" 1>&6
1382 DNAME=`domainname`
1383 if test `echo "${DNAME}" | grep -c "\.no"` -ne 0; then
1384 LANG="-ALANG\(No\)"
1385 echo "$ac_t""No" 1>&6
1386 fi
1387 if test `echo "${DNAME}" | grep -c "\.de"` -ne 0; then
1388 LANG="-ALANG\(De\)"
1389 echo "$ac_t""De" 1>&6
1390 fi
1391 if test `echo "${DNAME}" | grep -c "\.uk"` -ne 0; then
1392 LANG="-ALANG\(En\)"
1393 echo "$ac_t""En" 1>&6
1394 fi
1395 if test `echo "${DNAME}" | grep -c "\.com"` -ne 0; then
1396 LANG="-ALANG\(En\)"
1397 echo "$ac_t""En" 1>&6
1398 fi
1399 if test `echo "${DNAME}" | grep -c "\.edu"` -ne 0; then
1400 LANG="-ALANG\(En\)"
1401 echo "$ac_t""En" 1>&6
1402 fi
1403 if test `echo "${DNAME}" | grep -c "\.gov"` -ne 0; then
1404 LANG="-ALANG\(En\)"
1405 echo "$ac_t""En" 1>&6
1406 fi
1407 if test -z "${LANG}"; then
1408 echo "$ac_t""no" 1>&6
1409 fi
1410 fi
1411
1412 if test -z "${LANG}"; then
1413 echo $ac_n "checking for linux""... $ac_c" 1>&6
1414 cat > conftest.$ac_ext <<EOF
1415 #line 1416 "configure"
1416 #include "confdefs.h"
1417 #ifdef linux
1418    yes
1419 #endif
1420
1421 EOF
1422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1423   egrep "yes" >/dev/null 2>&1; then
1424   rm -rf conftest*
1425   echo "$ac_t""yes" 1>&6
1426 echo $ac_n "checking for language by examining keymap""... $ac_c" 1>&6
1427 if test `dumpkeys | grep "keycode *26" | tr ' ' '\n' | grep -c udiaeresis` -ne 0; then
1428 echo "$ac_t""De" 1>&6
1429 LANG='-ALANG\(De\)'
1430 else
1431 echo "$ac_t""no" 1>&6
1432 LANG='-ALANG\(En\)'
1433 fi
1434
1435 else
1436   rm -rf conftest*
1437   echo "$ac_t""no" 1>&6
1438 LANG='-ALANG\(En\)'
1439
1440 fi
1441 rm -f conftest*
1442
1443 fi
1444
1445 echo $ac_n "checking for wine.ini in autoconf.h""... $ac_c" 1>&6
1446 if test -f ${TOP_SRCDIR}/autoconf.h; then
1447 if test `grep -c WINE_INI_GLOBAL ${TOP_SRCDIR}/autoconf.h` -ne 0; then
1448 WINE_INI_GLOBAL=`grep WINE_INI_GLOBAL ${TOP_SRCDIR}/autoconf.h | tr ' ' '\n' | tail -1`
1449 echo "$ac_t""${WINE_INI_GLOBAL}" 1>&6
1450 fi
1451 fi
1452 if test -z "${WINE_INI_GLOBAL}"; then
1453 echo "$ac_t""no" 1>&6
1454 fi
1455
1456 if test -z "${WINE_INI_GLOBAL}"; then
1457 echo $ac_n "checking for /usr/local/etc/wine.conf""... $ac_c" 1>&6
1458 if test -f /usr/local/etc/wine.conf; then
1459 echo "$ac_t""yes" 1>&6
1460 WINE_INI_GLOBAL='"/usr/local/etc/wine.conf"'
1461 else
1462 echo "$ac_t""no" 1>&6
1463 WINE_INI_GLOBAL="\"${TOP_SRCDIR}/wine.ini\""
1464 fi
1465 fi
1466
1467
1468
1469 test -z "$LDFLAGS" && LDFLAGS=-g 
1470
1471
1472 trap '' 1 2 15
1473 cat > confcache <<\EOF
1474 # This file is a shell script that caches the results of configure
1475 # tests run on this system so they can be shared between configure
1476 # scripts and configure runs.  It is not useful on other systems.
1477 # If it contains results you don't want to keep, you may remove or edit it.
1478 #
1479 # By default, configure uses ./config.cache as the cache file,
1480 # creating it if it does not exist already.  You can give configure
1481 # the --cache-file=FILE option to use a different cache file; that is
1482 # what configure does when it calls configure scripts in
1483 # subdirectories, so they share the cache.
1484 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1485 # config.status only pays attention to the cache file if you give it the
1486 # --recheck option to rerun configure.
1487 #
1488 EOF
1489 # Ultrix sh set writes to stderr and can't be redirected directly,
1490 # and sets the high bit in the cache file unless we assign to the vars.
1491 (set) 2>&1 |
1492   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1493   >> confcache
1494 if cmp -s $cache_file confcache; then
1495   :
1496 else
1497   if test -w $cache_file; then
1498     echo "updating cache $cache_file"
1499     cat confcache > $cache_file
1500   else
1501     echo "not updating unwritable cache $cache_file"
1502   fi
1503 fi
1504 rm -f confcache
1505
1506 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1507
1508 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1509 # Let make expand exec_prefix.
1510 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1511
1512 # Any assignment to VPATH causes Sun make to only execute
1513 # the first set of double-colon rules, so remove it if not needed.
1514 # If there is a colon in the path, we need to keep it.
1515 if test "x$srcdir" = x.; then
1516   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1517 fi
1518
1519 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1520
1521 DEFS=-DHAVE_CONFIG_H
1522
1523 # Without the "./", some shells look in PATH for config.status.
1524 : ${CONFIG_STATUS=./config.status}
1525
1526 echo creating $CONFIG_STATUS
1527 rm -f $CONFIG_STATUS
1528 cat > $CONFIG_STATUS <<EOF
1529 #! /bin/sh
1530 # Generated automatically by configure.
1531 # Run this file to recreate the current configuration.
1532 # This directory was configured as follows,
1533 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1534 #
1535 # $0 $ac_configure_args
1536 #
1537 # Compiler output produced by configure, useful for debugging
1538 # configure, is in ./config.log if it exists.
1539
1540 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1541 for ac_option
1542 do
1543   case "\$ac_option" in
1544   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1545     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1546     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1547   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1548     echo "$CONFIG_STATUS generated by autoconf version 2.4"
1549     exit 0 ;;
1550   -help | --help | --hel | --he | --h)
1551     echo "\$ac_cs_usage"; exit 0 ;;
1552   *) echo "\$ac_cs_usage"; exit 1 ;;
1553   esac
1554 done
1555
1556 ac_given_srcdir=$srcdir
1557
1558 trap 'rm -fr `echo "controls/Makefile ipc/Makefile loader/Makefile memory/Makefile misc/Makefile miscemu/Makefile multimedia/Makefile objects/Makefile windows/Makefile rc/Makefile debugger/Makefile debugger/readline/Makefile tools/Makefile if1632/Makefile Makefile autoconf.h include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1559
1560 # Protect against being on the right side of a sed subst in config.status. 
1561 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
1562  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
1563 $ac_vpsub
1564 $extrasub
1565 s%@CFLAGS@%$CFLAGS%g
1566 s%@CPPFLAGS@%$CPPFLAGS%g
1567 s%@CXXFLAGS@%$CXXFLAGS%g
1568 s%@DEFS@%$DEFS%g
1569 s%@LDFLAGS@%$LDFLAGS%g
1570 s%@LIBS@%$LIBS%g
1571 s%@exec_prefix@%$exec_prefix%g
1572 s%@prefix@%$prefix%g
1573 s%@program_transform_name@%$program_transform_name%g
1574 s%@SET_MAKE@%$SET_MAKE%g
1575 s%@CC@%$CC%g
1576 s%@CPP@%$CPP%g
1577 s%@YACC@%$YACC%g
1578 s%@LEX@%$LEX%g
1579 s%@LEXLIB@%$LEXLIB%g
1580 s%@AXFILES@%$AXFILES%g
1581 s%@x_includes@%$x_includes%g
1582 s%@x_libraries@%$x_libraries%g
1583 s%@LIBOBJS@%$LIBOBJS%g
1584 s%@LD@%$LD%g
1585 s%@LDCOMBINEFLAGS@%$LDCOMBINEFLAGS%g
1586 s%@LANG@%$LANG%g
1587 s%@WINE_INI_GLOBAL@%$WINE_INI_GLOBAL%g
1588
1589 CEOF
1590 EOF
1591 cat >> $CONFIG_STATUS <<EOF
1592
1593 CONFIG_FILES=\${CONFIG_FILES-"controls/Makefile ipc/Makefile loader/Makefile memory/Makefile misc/Makefile miscemu/Makefile multimedia/Makefile objects/Makefile windows/Makefile rc/Makefile debugger/Makefile debugger/readline/Makefile tools/Makefile if1632/Makefile Makefile autoconf.h"}
1594 EOF
1595 cat >> $CONFIG_STATUS <<\EOF
1596 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1597   # Support "outfile[:infile]", defaulting infile="outfile.in".
1598   case "$ac_file" in
1599   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1600        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1601   *) ac_file_in="${ac_file}.in" ;;
1602   esac
1603
1604   # Adjust relative srcdir, etc. for subdirectories.
1605
1606   # Remove last slash and all that follows it.  Not all systems have dirname.
1607   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1608   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1609     # The file is in a subdirectory.
1610     test ! -d "$ac_dir" && mkdir "$ac_dir"
1611     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1612     # A "../" for each directory in $ac_dir_suffix.
1613     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1614   else
1615     ac_dir_suffix= ac_dots=
1616   fi
1617
1618   case "$ac_given_srcdir" in
1619   .)  srcdir=.
1620       if test -z "$ac_dots"; then top_srcdir=.
1621       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1622   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1623   *) # Relative path.
1624     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1625     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1626   esac
1627
1628   echo creating "$ac_file"
1629   rm -f "$ac_file"
1630   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1631   case "$ac_file" in
1632   *Makefile*) ac_comsub="1i\\
1633 # $configure_input" ;;
1634   *) ac_comsub= ;;
1635   esac
1636   sed -e "$ac_comsub
1637 s%@configure_input@%$configure_input%g
1638 s%@srcdir@%$srcdir%g
1639 s%@top_srcdir@%$top_srcdir%g
1640 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1641 fi; done
1642 rm -f conftest.subs
1643
1644 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1645 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1646 #
1647 # ac_d sets the value in "#define NAME VALUE" lines.
1648 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
1649 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
1650 ac_dC='\3'
1651 ac_dD='%g'
1652 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1653 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1654 ac_uB='\([      ]\)%\1#\2define\3'
1655 ac_uC=' '
1656 ac_uD='\4%g'
1657 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1658 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1659 ac_eB='$%\1#\2define\3'
1660 ac_eC=' '
1661 ac_eD='%g'
1662
1663 CONFIG_HEADERS=${CONFIG_HEADERS-"include/config.h"}
1664 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1665   # Support "outfile[:infile]", defaulting infile="outfile.in".
1666   case "$ac_file" in
1667   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1668        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1669   *) ac_file_in="${ac_file}.in" ;;
1670   esac
1671
1672   echo creating $ac_file
1673
1674   rm -f conftest.frag conftest.in conftest.out
1675   cp $ac_given_srcdir/$ac_file_in conftest.in
1676
1677 EOF
1678
1679 # Transform confdefs.h into a sed script conftest.vals that substitutes
1680 # the proper values into config.h.in to produce config.h.  And first:
1681 # Protect against being on the right side of a sed subst in config.status. 
1682 # Protect against being in an unquoted here document in config.status.
1683 rm -f conftest.vals
1684 cat > conftest.hdr <<\EOF
1685 s/[\\&%]/\\&/g
1686 s%[\\$`]%\\&%g
1687 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1688 s%ac_d%ac_u%gp
1689 s%ac_u%ac_e%gp
1690 EOF
1691 sed -n -f conftest.hdr confdefs.h > conftest.vals
1692 rm -f conftest.hdr
1693
1694 # This sed command replaces #undef with comments.  This is necessary, for
1695 # example, in the case of _POSIX_SOURCE, which is predefined and required
1696 # on some systems where configure will not decide to define it.
1697 cat >> conftest.vals <<\EOF
1698 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1699 EOF
1700
1701 # Break up conftest.vals because some shells have a limit on
1702 # the size of here documents, and old seds have small limits too.
1703 # Maximum number of lines to put in a single here document.
1704 ac_max_here_lines=12
1705
1706 rm -f conftest.tail
1707 while :
1708 do
1709   ac_lines=`grep -c . conftest.vals`
1710   # grep -c gives empty output for an empty file on some AIX systems.
1711   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1712   # Write a limited-size here document to conftest.frag.
1713   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1714   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1715   echo 'CEOF
1716   sed -f conftest.frag conftest.in > conftest.out
1717   rm -f conftest.in
1718   mv conftest.out conftest.in
1719 ' >> $CONFIG_STATUS
1720   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1721   rm -f conftest.vals
1722   mv conftest.tail conftest.vals
1723 done
1724 rm -f conftest.vals
1725
1726 cat >> $CONFIG_STATUS <<\EOF
1727   rm -f conftest.frag conftest.h
1728   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
1729   cat conftest.in >> conftest.h
1730   rm -f conftest.in
1731   if cmp -s $ac_file conftest.h 2>/dev/null; then
1732     echo "$ac_file is unchanged"
1733     rm -f conftest.h
1734   else
1735     rm -f $ac_file
1736     mv conftest.h $ac_file
1737   fi
1738 fi; done
1739
1740
1741 touch stamp-config
1742 exit 0
1743 EOF
1744 chmod +x $CONFIG_STATUS
1745 rm -fr confdefs* $ac_clean_files
1746 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1747
1748
1749 echo
1750 echo "Configure finished.  Do 'make depend; make' to compile Wine."
1751 echo
1752