Release 960114
[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.7 
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-library          build Wine as a library instead of an emulator"
17 ac_help="$ac_help
18   --with-ipc              use inter-process communication for DDE"
19 ac_help="$ac_help
20   --with-malloc-debug     enable malloc() debugging"
21 ac_help="$ac_help
22   --with-x                use the X Window System"
23
24 # Initialize some variables set by options.
25 # The variables have the same names as the options, with
26 # dashes changed to underlines.
27 build=NONE
28 cache_file=./config.cache
29 exec_prefix=NONE
30 host=NONE
31 no_create=
32 nonopt=NONE
33 no_recursion=
34 prefix=NONE
35 program_prefix=NONE
36 program_suffix=NONE
37 program_transform_name=s,x,x,
38 silent=
39 site=
40 srcdir=
41 target=NONE
42 verbose=
43 x_includes=NONE
44 x_libraries=NONE
45 bindir='${exec_prefix}/bin'
46 sbindir='${exec_prefix}/sbin'
47 libexecdir='${exec_prefix}/libexec'
48 datadir='${prefix}/share'
49 sysconfdir='${prefix}/etc'
50 sharedstatedir='${prefix}/com'
51 localstatedir='${prefix}/var'
52 libdir='${exec_prefix}/lib'
53 includedir='${prefix}/include'
54 oldincludedir='/usr/include'
55 infodir='${prefix}/info'
56 mandir='${prefix}/man'
57
58 # Initialize some other variables.
59 subdirs=
60 MFLAGS= MAKEFLAGS=
61
62 ac_prev=
63 for ac_option
64 do
65
66   # If the previous option needs an argument, assign it.
67   if test -n "$ac_prev"; then
68     eval "$ac_prev=\$ac_option"
69     ac_prev=
70     continue
71   fi
72
73   case "$ac_option" in
74   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
75   *) ac_optarg= ;;
76   esac
77
78   # Accept the important Cygnus configure options, so we can diagnose typos.
79
80   case "$ac_option" in
81
82   -bindir | --bindir | --bindi | --bind | --bin | --bi)
83     ac_prev=bindir ;;
84   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
85     bindir="$ac_optarg" ;;
86
87   -build | --build | --buil | --bui | --bu)
88     ac_prev=build ;;
89   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
90     build="$ac_optarg" ;;
91
92   -cache-file | --cache-file | --cache-fil | --cache-fi \
93   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
94     ac_prev=cache_file ;;
95   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
96   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
97     cache_file="$ac_optarg" ;;
98
99   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
100     ac_prev=datadir ;;
101   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
102   | --da=*)
103     datadir="$ac_optarg" ;;
104
105   -disable-* | --disable-*)
106     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
107     # Reject names that are not valid shell variable names.
108     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
109       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
110     fi
111     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
112     eval "enable_${ac_feature}=no" ;;
113
114   -enable-* | --enable-*)
115     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
116     # Reject names that are not valid shell variable names.
117     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
118       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
119     fi
120     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
121     case "$ac_option" in
122       *=*) ;;
123       *) ac_optarg=yes ;;
124     esac
125     eval "enable_${ac_feature}='$ac_optarg'" ;;
126
127   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
128   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
129   | --exec | --exe | --ex)
130     ac_prev=exec_prefix ;;
131   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
132   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
133   | --exec=* | --exe=* | --ex=*)
134     exec_prefix="$ac_optarg" ;;
135
136   -gas | --gas | --ga | --g)
137     # Obsolete; use --with-gas.
138     with_gas=yes ;;
139
140   -help | --help | --hel | --he)
141     # Omit some internal or obsolete options to make the list less imposing.
142     # This message is too long to be a string in the A/UX 3.1 sh.
143     cat << EOF
144 Usage: configure [options] [host]
145 Options: [defaults in brackets after descriptions]
146 Configuration:
147   --cache-file=FILE       cache test results in FILE
148   --help                  print this message
149   --no-create             do not create output files
150   --quiet, --silent       do not print \`checking...' messages
151   --version               print the version of autoconf that created configure
152 Directory and file names:
153   --prefix=PREFIX         install architecture-independent files in PREFIX
154                           [$ac_default_prefix]
155   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
156                           [same as prefix]
157   --bindir=DIR            user executables in DIR [EPREFIX/bin]
158   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
159   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
160   --datadir=DIR           read-only architecture-independent data in DIR
161                           [PREFIX/share]
162   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
163   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
164                           [PREFIX/com]
165   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
166   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
167   --includedir=DIR        C header files in DIR [PREFIX/include]
168   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
169   --infodir=DIR           info documentation in DIR [PREFIX/info]
170   --mandir=DIR            man documentation in DIR [PREFIX/man]
171   --srcdir=DIR            find the sources in DIR [configure dir or ..]
172   --program-prefix=PREFIX prepend PREFIX to installed program names
173   --program-suffix=SUFFIX append SUFFIX to installed program names
174   --program-transform-name=PROGRAM
175                           run sed PROGRAM on installed program names
176 EOF
177     cat << EOF
178 Host type:
179   --build=BUILD           configure for building on BUILD [BUILD=HOST]
180   --host=HOST             configure for HOST [guessed]
181   --target=TARGET         configure for TARGET [TARGET=HOST]
182 Features and packages:
183   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
184   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
185   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
186   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
187   --x-includes=DIR        X include files are in DIR
188   --x-libraries=DIR       X library files are in DIR
189 EOF
190     if test -n "$ac_help"; then
191       echo "--enable and --with options recognized:$ac_help"
192     fi
193     exit 0 ;;
194
195   -host | --host | --hos | --ho)
196     ac_prev=host ;;
197   -host=* | --host=* | --hos=* | --ho=*)
198     host="$ac_optarg" ;;
199
200   -includedir | --includedir | --includedi | --included | --include \
201   | --includ | --inclu | --incl | --inc)
202     ac_prev=includedir ;;
203   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
204   | --includ=* | --inclu=* | --incl=* | --inc=*)
205     includedir="$ac_optarg" ;;
206
207   -infodir | --infodir | --infodi | --infod | --info | --inf)
208     ac_prev=infodir ;;
209   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
210     infodir="$ac_optarg" ;;
211
212   -libdir | --libdir | --libdi | --libd)
213     ac_prev=libdir ;;
214   -libdir=* | --libdir=* | --libdi=* | --libd=*)
215     libdir="$ac_optarg" ;;
216
217   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
218   | --libexe | --libex | --libe)
219     ac_prev=libexecdir ;;
220   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
221   | --libexe=* | --libex=* | --libe=*)
222     libexecdir="$ac_optarg" ;;
223
224   -localstatedir | --localstatedir | --localstatedi | --localstated \
225   | --localstate | --localstat | --localsta | --localst \
226   | --locals | --local | --loca | --loc | --lo)
227     ac_prev=localstatedir ;;
228   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
229   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
230   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
231     localstatedir="$ac_optarg" ;;
232
233   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
234     ac_prev=mandir ;;
235   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
236     mandir="$ac_optarg" ;;
237
238   -nfp | --nfp | --nf)
239     # Obsolete; use --without-fp.
240     with_fp=no ;;
241
242   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
243   | --no-cr | --no-c)
244     no_create=yes ;;
245
246   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
247   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
248     no_recursion=yes ;;
249
250   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
251   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
252   | --oldin | --oldi | --old | --ol | --o)
253     ac_prev=oldincludedir ;;
254   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
255   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
256   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
257     oldincludedir="$ac_optarg" ;;
258
259   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
260     ac_prev=prefix ;;
261   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
262     prefix="$ac_optarg" ;;
263
264   -program-prefix | --program-prefix | --program-prefi | --program-pref \
265   | --program-pre | --program-pr | --program-p)
266     ac_prev=program_prefix ;;
267   -program-prefix=* | --program-prefix=* | --program-prefi=* \
268   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
269     program_prefix="$ac_optarg" ;;
270
271   -program-suffix | --program-suffix | --program-suffi | --program-suff \
272   | --program-suf | --program-su | --program-s)
273     ac_prev=program_suffix ;;
274   -program-suffix=* | --program-suffix=* | --program-suffi=* \
275   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
276     program_suffix="$ac_optarg" ;;
277
278   -program-transform-name | --program-transform-name \
279   | --program-transform-nam | --program-transform-na \
280   | --program-transform-n | --program-transform- \
281   | --program-transform | --program-transfor \
282   | --program-transfo | --program-transf \
283   | --program-trans | --program-tran \
284   | --progr-tra | --program-tr | --program-t)
285     ac_prev=program_transform_name ;;
286   -program-transform-name=* | --program-transform-name=* \
287   | --program-transform-nam=* | --program-transform-na=* \
288   | --program-transform-n=* | --program-transform-=* \
289   | --program-transform=* | --program-transfor=* \
290   | --program-transfo=* | --program-transf=* \
291   | --program-trans=* | --program-tran=* \
292   | --progr-tra=* | --program-tr=* | --program-t=*)
293     program_transform_name="$ac_optarg" ;;
294
295   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
296   | -silent | --silent | --silen | --sile | --sil)
297     silent=yes ;;
298
299   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
300     ac_prev=sbindir ;;
301   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
302   | --sbi=* | --sb=*)
303     sbindir="$ac_optarg" ;;
304
305   -sharedstatedir | --sharedstatedir | --sharedstatedi \
306   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
307   | --sharedst | --shareds | --shared | --share | --shar \
308   | --sha | --sh)
309     ac_prev=sharedstatedir ;;
310   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
311   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
312   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
313   | --sha=* | --sh=*)
314     sharedstatedir="$ac_optarg" ;;
315
316   -site | --site | --sit)
317     ac_prev=site ;;
318   -site=* | --site=* | --sit=*)
319     site="$ac_optarg" ;;
320
321   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
322     ac_prev=srcdir ;;
323   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
324     srcdir="$ac_optarg" ;;
325
326   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
327   | --syscon | --sysco | --sysc | --sys | --sy)
328     ac_prev=sysconfdir ;;
329   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
330   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
331     sysconfdir="$ac_optarg" ;;
332
333   -target | --target | --targe | --targ | --tar | --ta | --t)
334     ac_prev=target ;;
335   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
336     target="$ac_optarg" ;;
337
338   -v | -verbose | --verbose | --verbos | --verbo | --verb)
339     verbose=yes ;;
340
341   -version | --version | --versio | --versi | --vers)
342     echo "configure generated by autoconf version 2.7"
343     exit 0 ;;
344
345   -with-* | --with-*)
346     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
347     # Reject names that are not valid shell variable names.
348     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
349       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
350     fi
351     ac_package=`echo $ac_package| sed 's/-/_/g'`
352     case "$ac_option" in
353       *=*) ;;
354       *) ac_optarg=yes ;;
355     esac
356     eval "with_${ac_package}='$ac_optarg'" ;;
357
358   -without-* | --without-*)
359     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
360     # Reject names that are not valid shell variable names.
361     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
362       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
363     fi
364     ac_package=`echo $ac_package| sed 's/-/_/g'`
365     eval "with_${ac_package}=no" ;;
366
367   --x)
368     # Obsolete; use --with-x.
369     with_x=yes ;;
370
371   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
372   | --x-incl | --x-inc | --x-in | --x-i)
373     ac_prev=x_includes ;;
374   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
375   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
376     x_includes="$ac_optarg" ;;
377
378   -x-libraries | --x-libraries | --x-librarie | --x-librari \
379   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
380     ac_prev=x_libraries ;;
381   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
382   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
383     x_libraries="$ac_optarg" ;;
384
385   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
386     ;;
387
388   *)
389     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
390       echo "configure: warning: $ac_option: invalid host type" 1>&2
391     fi
392     if test "x$nonopt" != xNONE; then
393       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
394     fi
395     nonopt="$ac_option"
396     ;;
397
398   esac
399 done
400
401 if test -n "$ac_prev"; then
402   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
403 fi
404
405 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
406
407 # File descriptor usage:
408 # 0 standard input
409 # 1 file creation
410 # 2 errors and warnings
411 # 3 some systems may open it to /dev/tty
412 # 4 used on the Kubota Titan
413 # 6 checking for... messages and results
414 # 5 compiler messages saved in config.log
415 if test "$silent" = yes; then
416   exec 6>/dev/null
417 else
418   exec 6>&1
419 fi
420 exec 5>./config.log
421
422 echo "\
423 This file contains any messages produced by compilers while
424 running configure, to aid debugging if configure makes a mistake.
425 " 1>&5
426
427 # Strip out --no-create and --no-recursion so they do not pile up.
428 # Also quote any args containing shell metacharacters.
429 ac_configure_args=
430 for ac_arg
431 do
432   case "$ac_arg" in
433   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
434   | --no-cr | --no-c) ;;
435   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
436   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
437   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
438   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
439   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
440   esac
441 done
442
443 # NLS nuisances.
444 # Only set LANG and LC_ALL to C if already set.
445 # These must not be set unconditionally because not all systems understand
446 # e.g. LANG=C (notably SCO).
447 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
448 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
449
450 # confdefs.h avoids OS command line length limits that DEFS can exceed.
451 rm -rf conftest* confdefs.h
452 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
453 echo > confdefs.h
454
455 # A filename unique to this package, relative to the directory that
456 # configure is in, which we can look for to find out if srcdir is correct.
457 ac_unique_file=controls/edit.c
458
459 # Find the source files, if location was not specified.
460 if test -z "$srcdir"; then
461   ac_srcdir_defaulted=yes
462   # Try the directory containing this script, then its parent.
463   ac_prog=$0
464   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
465   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
466   srcdir=$ac_confdir
467   if test ! -r $srcdir/$ac_unique_file; then
468     srcdir=..
469   fi
470 else
471   ac_srcdir_defaulted=no
472 fi
473 if test ! -r $srcdir/$ac_unique_file; then
474   if test "$ac_srcdir_defaulted" = yes; then
475     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
476   else
477     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
478   fi
479 fi
480 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
481
482 # Prefer explicitly selected file to automatically selected ones.
483 if test -z "$CONFIG_SITE"; then
484   if test "x$prefix" != xNONE; then
485     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
486   else
487     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
488   fi
489 fi
490 for ac_site_file in $CONFIG_SITE; do
491   if test -r "$ac_site_file"; then
492     echo "loading site script $ac_site_file"
493     . "$ac_site_file"
494   fi
495 done
496
497 if test -r "$cache_file"; then
498   echo "loading cache $cache_file"
499   . $cache_file
500 else
501   echo "creating cache $cache_file"
502   > $cache_file
503 fi
504
505 ac_ext=c
506 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
507 ac_cpp='echo $CPP $CPPFLAGS 1>&5;
508 $CPP $CPPFLAGS'
509 ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
510 ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
511 ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
512 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
513
514 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
515   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
516   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
517     ac_n= ac_c='
518 ' ac_t='        '
519   else
520     ac_n=-n ac_c= ac_t=
521   fi
522 else
523   ac_n= ac_c='\c' ac_t=
524 fi
525
526                 
527 ac_aux_dir=
528 for ac_dir in tools $srcdir/tools; do
529   if test -f $ac_dir/install-sh; then
530     ac_aux_dir=$ac_dir
531     ac_install_sh="$ac_aux_dir/install-sh -c"
532     break
533   elif test -f $ac_dir/install.sh; then
534     ac_aux_dir=$ac_dir
535     ac_install_sh="$ac_aux_dir/install.sh -c"
536     break
537   fi
538 done
539 if test -z "$ac_aux_dir"; then
540   { echo "configure: error: can not find install-sh or install.sh in tools $srcdir/tools" 1>&2; exit 1; }
541 fi
542 ac_config_guess=$ac_aux_dir/config.guess
543 ac_config_sub=$ac_aux_dir/config.sub
544 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
545
546
547 # We want these before the checks, so the checks can modify their values.
548 test -z "$CFLAGS" && CFLAGS="-g -O2" 
549 test -z "$LDFLAGS" && LDFLAGS=-g 
550 test -z "$LDLIBS" && LDLIBS=-lm 
551
552
553 # Check whether --with-library or --without-library was given.
554 if test "${with_library+set}" = set; then
555   withval="$with_library"
556   cat >> confdefs.h <<\EOF
557 #define WINELIB 1
558 EOF
559  MAIN_TARGET="libwine.a"
560 else
561   MAIN_TARGET="wine"
562 fi
563
564
565
566 # Check whether --with-ipc or --without-ipc was given.
567 if test "${with_ipc+set}" = set; then
568   withval="$with_ipc"
569   cat >> confdefs.h <<\EOF
570 #define CONFIG_IPC 1
571 EOF
572
573 fi
574
575
576 # Check whether --with-malloc-debug or --without-malloc-debug was given.
577 if test "${with_malloc_debug+set}" = set; then
578   withval="$with_malloc_debug"
579   cat >> confdefs.h <<\EOF
580 #define MALLOC_DEBUGGING 1
581 EOF
582
583 fi
584
585
586
587 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
588 set dummy ${MAKE-make}; ac_make=$2
589 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
590   echo $ac_n "(cached) $ac_c" 1>&6
591 else
592   cat > conftestmake <<\EOF
593 all:
594         @echo 'ac_maketemp="${MAKE}"'
595 EOF
596 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
597 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
598 if test -n "$ac_maketemp"; then
599   eval ac_cv_prog_make_${ac_make}_set=yes
600 else
601   eval ac_cv_prog_make_${ac_make}_set=no
602 fi
603 rm -f conftestmake
604 fi
605 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
606   echo "$ac_t""yes" 1>&6
607   SET_MAKE=
608 else
609   echo "$ac_t""no" 1>&6
610   SET_MAKE="MAKE=${MAKE-make}"
611 fi
612
613 # Extract the first word of "gcc", so it can be a program name with args.
614 set dummy gcc; ac_word=$2
615 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
616 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
617   echo $ac_n "(cached) $ac_c" 1>&6
618 else
619   if test -n "$CC"; then
620   ac_cv_prog_CC="$CC" # Let the user override the test.
621 else
622   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
623   for ac_dir in $PATH; do
624     test -z "$ac_dir" && ac_dir=.
625     if test -f $ac_dir/$ac_word; then
626       ac_cv_prog_CC="gcc"
627       break
628     fi
629   done
630   IFS="$ac_save_ifs"
631   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
632 fi
633 fi
634 CC="$ac_cv_prog_CC"
635 if test -n "$CC"; then
636   echo "$ac_t""$CC" 1>&6
637 else
638   echo "$ac_t""no" 1>&6
639 fi
640
641
642 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
643 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
644   echo $ac_n "(cached) $ac_c" 1>&6
645 else
646   cat > conftest.c <<EOF
647 #ifdef __GNUC__
648   yes;
649 #endif
650 EOF
651 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
652   ac_cv_prog_gcc=yes
653 else
654   ac_cv_prog_gcc=no
655 fi
656 fi
657
658 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
659 if test $ac_cv_prog_gcc = yes; then
660   GCC=yes
661   if test "${CFLAGS+set}" != set; then
662     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
663 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
664   echo $ac_n "(cached) $ac_c" 1>&6
665 else
666   echo 'void f(){}' > conftest.c
667 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
668   ac_cv_prog_gcc_g=yes
669 else
670   ac_cv_prog_gcc_g=no
671 fi
672 rm -f conftest*
673
674 fi
675
676 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
677     if test $ac_cv_prog_gcc_g = yes; then
678       CFLAGS="-g -O"
679     else
680       CFLAGS="-O"
681     fi
682   fi
683 else
684   GCC=
685   test "${CFLAGS+set}" = set || CFLAGS="-g"
686 fi
687
688 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
689 # On Suns, sometimes $CPP names a directory.
690 if test -n "$CPP" && test -d "$CPP"; then
691   CPP=
692 fi
693 if test -z "$CPP"; then
694 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
695   echo $ac_n "(cached) $ac_c" 1>&6
696 else
697     # This must be in double quotes, not single quotes, because CPP may get
698   # substituted into the Makefile and "${CC-cc}" will confuse make.
699   CPP="${CC-cc} -E"
700   # On the NeXT, cc -E runs the code through the compiler's parser,
701   # not just through cpp.
702   cat > conftest.$ac_ext <<EOF
703 #line 704 "configure"
704 #include "confdefs.h"
705 #include <assert.h>
706 Syntax Error
707 EOF
708 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
709 ac_err=`grep -v '^ *+' conftest.out`
710 if test -z "$ac_err"; then
711   :
712 else
713   echo "$ac_err" >&5
714   rm -rf conftest*
715   CPP="${CC-cc} -E -traditional-cpp"
716   cat > conftest.$ac_ext <<EOF
717 #line 718 "configure"
718 #include "confdefs.h"
719 #include <assert.h>
720 Syntax Error
721 EOF
722 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
723 ac_err=`grep -v '^ *+' conftest.out`
724 if test -z "$ac_err"; then
725   :
726 else
727   echo "$ac_err" >&5
728   rm -rf conftest*
729   CPP=/lib/cpp
730 fi
731 rm -f conftest*
732 fi
733 rm -f conftest*
734   ac_cv_prog_CPP="$CPP"
735 fi
736   CPP="$ac_cv_prog_CPP"
737 else
738   ac_cv_prog_CPP="$CPP"
739 fi
740 echo "$ac_t""$CPP" 1>&6
741
742 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
743 if test -d /etc/conf/kconfig.d &&
744   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
745 then
746   echo "$ac_t""yes" 1>&6
747   ISC=yes # If later tests want to check for ISC.
748   cat >> confdefs.h <<\EOF
749 #define _POSIX_SOURCE 1
750 EOF
751
752   if test "$GCC" = yes; then
753     CC="$CC -posix"
754   else
755     CC="$CC -Xp"
756   fi
757 else
758   echo "$ac_t""no" 1>&6
759   ISC=
760 fi
761
762 # If we find X, set shell vars x_includes and x_libraries to the
763 # paths, otherwise set no_x=yes.
764 # Uses ac_ vars as temps to allow command line to override cache and checks.
765 # --without-x overrides everything else, but does not touch the cache.
766 echo $ac_n "checking for X""... $ac_c" 1>&6
767
768 # Check whether --with-x or --without-x was given.
769 if test "${with_x+set}" = set; then
770   withval="$with_x"
771   :
772 fi
773
774 if test "x$with_x" = xno; then
775   no_x=yes
776 else
777   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
778     no_x=
779   else
780 if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
781   echo $ac_n "(cached) $ac_c" 1>&6
782 else
783   # One or both of the vars are not set, and there is no cached value.
784 no_x=yes
785 rm -fr conftestdir
786 if mkdir conftestdir; then
787   cd conftestdir
788   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
789   cat > Imakefile <<'EOF'
790 acfindx:
791         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
792 EOF
793   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
794     no_x=
795     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
796     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
797     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
798     for ac_extension in a so sl; do
799       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
800         test -f $ac_im_libdir/libX11.$ac_extension; then
801         ac_im_usrlibdir=$ac_im_libdir; break
802       fi
803     done
804     # Screen out bogus values from the imake configuration.
805     case "$ac_im_incroot" in
806         /usr/include) ;;
807         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
808     esac
809     case "$ac_im_usrlibdir" in
810         /usr/lib | /lib) ;;
811         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
812     esac
813   fi
814   cd ..
815   rm -fr conftestdir
816 fi
817
818 if test "$no_x" = yes; then
819 test -z "$x_direct_test_library" && x_direct_test_library=Xt
820 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
821 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
822 cat > conftest.$ac_ext <<EOF
823 #line 824 "configure"
824 #include "confdefs.h"
825 #include <$x_direct_test_include>
826 EOF
827 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
828 ac_err=`grep -v '^ *+' conftest.out`
829 if test -z "$ac_err"; then
830   rm -rf conftest*
831   no_x= ac_x_includes=
832 else
833   echo "$ac_err" >&5
834   rm -rf conftest*
835     for ac_dir in               \
836     /usr/X11R6/include        \
837     /usr/X11R5/include        \
838     /usr/X11R4/include        \
839                               \
840     /usr/include/X11R6        \
841     /usr/include/X11R5        \
842     /usr/include/X11R4        \
843                               \
844     /usr/local/X11R6/include  \
845     /usr/local/X11R5/include  \
846     /usr/local/X11R4/include  \
847                               \
848     /usr/local/include/X11R6  \
849     /usr/local/include/X11R5  \
850     /usr/local/include/X11R4  \
851                               \
852     /usr/X11/include          \
853     /usr/include/X11          \
854     /usr/local/X11/include    \
855     /usr/local/include/X11    \
856                               \
857     /usr/X386/include         \
858     /usr/x386/include         \
859     /usr/XFree86/include/X11  \
860                               \
861     /usr/include              \
862     /usr/local/include        \
863     /usr/unsupported/include  \
864     /usr/athena/include       \
865     /usr/local/x11r5/include  \
866     /usr/lpp/Xamples/include  \
867                               \
868     /usr/openwin/include      \
869     /usr/openwin/share/include \
870     ; \
871   do
872     if test -r "$ac_dir/$x_direct_test_include"; then
873       no_x= ac_x_includes=$ac_dir
874       break
875     fi
876   done
877 fi
878 rm -f conftest*
879
880 # Check for the libraries.
881 # See if we find them without any special options.
882 # Don't add to $LIBS permanently.
883 ac_save_LIBS="$LIBS"
884 LIBS="-l$x_direct_test_library $LIBS"
885 cat > conftest.$ac_ext <<EOF
886 #line 887 "configure"
887 #include "confdefs.h"
888
889 int main() { return 0; }
890 int t() {
891 ${x_direct_test_function}()
892 ; return 0; }
893 EOF
894 if eval $ac_link; then
895   rm -rf conftest*
896   LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
897 else
898   rm -rf conftest*
899   LIBS="$ac_save_LIBS"
900 # First see if replacing the include by lib works.
901 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
902     /usr/X11R6/lib        \
903     /usr/X11R5/lib        \
904     /usr/X11R4/lib        \
905                           \
906     /usr/lib/X11R6        \
907     /usr/lib/X11R5        \
908     /usr/lib/X11R4        \
909                           \
910     /usr/local/X11R6/lib  \
911     /usr/local/X11R5/lib  \
912     /usr/local/X11R4/lib  \
913                           \
914     /usr/local/lib/X11R6  \
915     /usr/local/lib/X11R5  \
916     /usr/local/lib/X11R4  \
917                           \
918     /usr/X11/lib          \
919     /usr/lib/X11          \
920     /usr/local/X11/lib    \
921     /usr/local/lib/X11    \
922                           \
923     /usr/X386/lib         \
924     /usr/x386/lib         \
925     /usr/XFree86/lib/X11  \
926                           \
927     /usr/lib              \
928     /usr/local/lib        \
929     /usr/unsupported/lib  \
930     /usr/athena/lib       \
931     /usr/local/x11r5/lib  \
932     /usr/lpp/Xamples/lib  \
933                           \
934     /usr/openwin/lib      \
935     /usr/openwin/share/lib \
936     ; \
937 do
938   for ac_extension in a so sl; do
939     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
940       no_x= ac_x_libraries=$ac_dir
941       break 2
942     fi
943   done
944 done
945 fi
946 rm -f conftest*
947
948 fi
949 if test "$no_x" = yes; then
950   ac_cv_path_x="no_x=yes"
951 else
952   ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
953 fi
954 fi
955   fi
956   eval "$ac_cv_path_x"
957 fi # $with_x != no
958
959 if test "$no_x" = yes; then
960   echo "$ac_t""no" 1>&6
961 else
962   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
963   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
964   ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
965   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
966 fi
967
968 if test "$no_x" = yes; then 
969   # Not all programs may use this symbol, but it does not hurt to define it.
970   X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
971 else
972   if test -n "$x_includes"; then
973     X_CFLAGS="$X_CFLAGS -I$x_includes"
974   fi
975
976   # It would be nice to have a more robust check for the -R ld option than
977   # just checking for Solaris.
978   # It would also be nice to do this for all -L options, not just this one.
979   if test -n "$x_libraries"; then
980     X_LIBS="$X_LIBS -L$x_libraries"
981     if test "`(uname) 2>/dev/null`" = SunOS &&
982       uname -r | grep '^5' >/dev/null; then
983       X_LIBS="$X_LIBS -R $x_libraries"
984     fi
985   fi
986
987   # Check for libraries that X11R6 Xt/Xaw programs need.
988
989   ac_save_LDFLAGS="$LDFLAGS"
990   LDFLAGS="$LDFLAGS -L$x_libraries"
991   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
992   # check for ICE first), but we must link in the order -lSM -lICE or
993   # we get undefined symbols.  So assume we have SM if we have ICE.
994   # These have to be linked with before -lX11, unlike the other
995   # libraries we check for below, so use a different variable.
996   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
997   echo $ac_n "checking for -lICE""... $ac_c" 1>&6
998 ac_lib_var=`echo ICE | tr '.-/+' '___p'`
999 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1000   echo $ac_n "(cached) $ac_c" 1>&6
1001 else
1002   ac_save_LIBS="$LIBS"
1003 LIBS="-lICE  $LIBS"
1004 cat > conftest.$ac_ext <<EOF
1005 #line 1006 "configure"
1006 #include "confdefs.h"
1007
1008 int main() { return 0; }
1009 int t() {
1010 IceConnectionNumber()
1011 ; return 0; }
1012 EOF
1013 if eval $ac_link; then
1014   rm -rf conftest*
1015   eval "ac_cv_lib_$ac_lib_var=yes"
1016 else
1017   rm -rf conftest*
1018   eval "ac_cv_lib_$ac_lib_var=no"
1019 fi
1020 rm -f conftest*
1021 LIBS="$ac_save_LIBS"
1022
1023 fi
1024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1025   echo "$ac_t""yes" 1>&6
1026   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1027 else
1028   echo "$ac_t""no" 1>&6
1029 fi
1030
1031   LDFLAGS="$ac_save_LDFLAGS"
1032
1033   # Check for system-dependent libraries X programs must link with.
1034
1035   if test "$ISC" = yes; then
1036     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1037   else
1038     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1039     # libraries were built with DECnet support.  And karl@cs.umb.edu says
1040     # the Alpha needs dnet_stub (dnet does not exist).
1041     echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
1042 ac_lib_var=`echo dnet | tr '.-/+' '___p'`
1043 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1044   echo $ac_n "(cached) $ac_c" 1>&6
1045 else
1046   ac_save_LIBS="$LIBS"
1047 LIBS="-ldnet  $LIBS"
1048 cat > conftest.$ac_ext <<EOF
1049 #line 1050 "configure"
1050 #include "confdefs.h"
1051
1052 int main() { return 0; }
1053 int t() {
1054 dnet_ntoa()
1055 ; return 0; }
1056 EOF
1057 if eval $ac_link; then
1058   rm -rf conftest*
1059   eval "ac_cv_lib_$ac_lib_var=yes"
1060 else
1061   rm -rf conftest*
1062   eval "ac_cv_lib_$ac_lib_var=no"
1063 fi
1064 rm -f conftest*
1065 LIBS="$ac_save_LIBS"
1066
1067 fi
1068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1069   echo "$ac_t""yes" 1>&6
1070   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1071 else
1072   echo "$ac_t""no" 1>&6
1073 fi
1074
1075     if test $ac_cv_lib_dnet = no; then
1076       echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
1077 ac_lib_var=`echo dnet_stub | tr '.-/+' '___p'`
1078 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1079   echo $ac_n "(cached) $ac_c" 1>&6
1080 else
1081   ac_save_LIBS="$LIBS"
1082 LIBS="-ldnet_stub  $LIBS"
1083 cat > conftest.$ac_ext <<EOF
1084 #line 1085 "configure"
1085 #include "confdefs.h"
1086
1087 int main() { return 0; }
1088 int t() {
1089 dnet_ntoa()
1090 ; return 0; }
1091 EOF
1092 if eval $ac_link; then
1093   rm -rf conftest*
1094   eval "ac_cv_lib_$ac_lib_var=yes"
1095 else
1096   rm -rf conftest*
1097   eval "ac_cv_lib_$ac_lib_var=no"
1098 fi
1099 rm -f conftest*
1100 LIBS="$ac_save_LIBS"
1101
1102 fi
1103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1104   echo "$ac_t""yes" 1>&6
1105   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1106 else
1107   echo "$ac_t""no" 1>&6
1108 fi
1109
1110     fi
1111
1112     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1113     # to get the SysV transport functions.
1114     # Not sure which flavor of 386 UNIX this is, but it seems harmless to
1115     # check for it.
1116     echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
1117 ac_lib_var=`echo nsl | tr '.-/+' '___p'`
1118 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1119   echo $ac_n "(cached) $ac_c" 1>&6
1120 else
1121   ac_save_LIBS="$LIBS"
1122 LIBS="-lnsl  $LIBS"
1123 cat > conftest.$ac_ext <<EOF
1124 #line 1125 "configure"
1125 #include "confdefs.h"
1126
1127 int main() { return 0; }
1128 int t() {
1129 t_accept()
1130 ; return 0; }
1131 EOF
1132 if eval $ac_link; then
1133   rm -rf conftest*
1134   eval "ac_cv_lib_$ac_lib_var=yes"
1135 else
1136   rm -rf conftest*
1137   eval "ac_cv_lib_$ac_lib_var=no"
1138 fi
1139 rm -f conftest*
1140 LIBS="$ac_save_LIBS"
1141
1142 fi
1143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1144   echo "$ac_t""yes" 1>&6
1145   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1146 else
1147   echo "$ac_t""no" 1>&6
1148 fi
1149
1150
1151     # lieder@skyler.mavd.honeywell.com says without -lsocket,
1152     # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
1153     # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
1154     if test "`(uname) 2>/dev/null`" != IRIX; then
1155       echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
1156 ac_lib_var=`echo socket | tr '.-/+' '___p'`
1157 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1158   echo $ac_n "(cached) $ac_c" 1>&6
1159 else
1160   ac_save_LIBS="$LIBS"
1161 LIBS="-lsocket  $LIBS"
1162 cat > conftest.$ac_ext <<EOF
1163 #line 1164 "configure"
1164 #include "confdefs.h"
1165
1166 int main() { return 0; }
1167 int t() {
1168 socket()
1169 ; return 0; }
1170 EOF
1171 if eval $ac_link; then
1172   rm -rf conftest*
1173   eval "ac_cv_lib_$ac_lib_var=yes"
1174 else
1175   rm -rf conftest*
1176   eval "ac_cv_lib_$ac_lib_var=no"
1177 fi
1178 rm -f conftest*
1179 LIBS="$ac_save_LIBS"
1180
1181 fi
1182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1183   echo "$ac_t""yes" 1>&6
1184   X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
1185 else
1186   echo "$ac_t""no" 1>&6
1187 fi
1188
1189     fi
1190   fi
1191 fi
1192
1193 for ac_prog in 'bison -y' byacc
1194 do
1195 # Extract the first word of "$ac_prog", so it can be a program name with args.
1196 set dummy $ac_prog; ac_word=$2
1197 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1198 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1199   echo $ac_n "(cached) $ac_c" 1>&6
1200 else
1201   if test -n "$YACC"; then
1202   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1203 else
1204   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1205   for ac_dir in $PATH; do
1206     test -z "$ac_dir" && ac_dir=.
1207     if test -f $ac_dir/$ac_word; then
1208       ac_cv_prog_YACC="$ac_prog"
1209       break
1210     fi
1211   done
1212   IFS="$ac_save_ifs"
1213 fi
1214 fi
1215 YACC="$ac_cv_prog_YACC"
1216 if test -n "$YACC"; then
1217   echo "$ac_t""$YACC" 1>&6
1218 else
1219   echo "$ac_t""no" 1>&6
1220 fi
1221
1222 test -n "$YACC" && break
1223 done
1224 test -n "$YACC" || YACC="yacc"
1225
1226 # Extract the first word of "flex", so it can be a program name with args.
1227 set dummy flex; ac_word=$2
1228 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1229 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1230   echo $ac_n "(cached) $ac_c" 1>&6
1231 else
1232   if test -n "$LEX"; then
1233   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1234 else
1235   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1236   for ac_dir in $PATH; do
1237     test -z "$ac_dir" && ac_dir=.
1238     if test -f $ac_dir/$ac_word; then
1239       ac_cv_prog_LEX="flex"
1240       break
1241     fi
1242   done
1243   IFS="$ac_save_ifs"
1244   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1245 fi
1246 fi
1247 LEX="$ac_cv_prog_LEX"
1248 if test -n "$LEX"; then
1249   echo "$ac_t""$LEX" 1>&6
1250 else
1251   echo "$ac_t""no" 1>&6
1252 fi
1253
1254 if test -z "$LEXLIB"
1255 then
1256   case "$LEX" in
1257   flex*) ac_lib=fl ;;
1258   *) ac_lib=l ;;
1259   esac
1260   echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
1261 ac_lib_var=`echo $ac_lib | tr '.-/+' '___p'`
1262 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1263   echo $ac_n "(cached) $ac_c" 1>&6
1264 else
1265   ac_save_LIBS="$LIBS"
1266 LIBS="-l$ac_lib  $LIBS"
1267 cat > conftest.$ac_ext <<EOF
1268 #line 1269 "configure"
1269 #include "confdefs.h"
1270
1271 int main() { return 0; }
1272 int t() {
1273 yywrap()
1274 ; return 0; }
1275 EOF
1276 if eval $ac_link; then
1277   rm -rf conftest*
1278   eval "ac_cv_lib_$ac_lib_var=yes"
1279 else
1280   rm -rf conftest*
1281   eval "ac_cv_lib_$ac_lib_var=no"
1282 fi
1283 rm -f conftest*
1284 LIBS="$ac_save_LIBS"
1285
1286 fi
1287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1288   echo "$ac_t""yes" 1>&6
1289   LEXLIB="-l$ac_lib"
1290 else
1291   echo "$ac_t""no" 1>&6
1292 fi
1293
1294 fi
1295
1296 # Extract the first word of "ranlib", so it can be a program name with args.
1297 set dummy ranlib; ac_word=$2
1298 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1299 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1300   echo $ac_n "(cached) $ac_c" 1>&6
1301 else
1302   if test -n "$RANLIB"; then
1303   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1304 else
1305   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1306   for ac_dir in $PATH; do
1307     test -z "$ac_dir" && ac_dir=.
1308     if test -f $ac_dir/$ac_word; then
1309       ac_cv_prog_RANLIB="ranlib"
1310       break
1311     fi
1312   done
1313   IFS="$ac_save_ifs"
1314   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1315 fi
1316 fi
1317 RANLIB="$ac_cv_prog_RANLIB"
1318 if test -n "$RANLIB"; then
1319   echo "$ac_t""$RANLIB" 1>&6
1320 else
1321   echo "$ac_t""no" 1>&6
1322 fi
1323
1324 # Find a good install program.  We prefer a C program (faster),
1325 # so one script is as good as another.  But avoid the broken or
1326 # incompatible versions:
1327 # SysV /etc/install, /usr/sbin/install
1328 # SunOS /usr/etc/install
1329 # IRIX /sbin/install
1330 # AIX /bin/install
1331 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1332 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1333 # ./install, which can be erroneously created by make from ./install.sh.
1334 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1335 if test -z "$INSTALL"; then
1336 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1337   echo $ac_n "(cached) $ac_c" 1>&6
1338 else
1339     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1340   for ac_dir in $PATH; do
1341     # Account for people who put trailing slashes in PATH elements.
1342     case "$ac_dir/" in
1343     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1344     *)
1345       # OSF1 and SCO ODT 3.0 have their own names for install.
1346       for ac_prog in ginstall installbsd scoinst install; do
1347         if test -f $ac_dir/$ac_prog; then
1348           if test $ac_prog = install &&
1349             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1350             # AIX install.  It has an incompatible calling convention.
1351             # OSF/1 installbsd also uses dspmsg, but is usable.
1352             :
1353           else
1354             ac_cv_path_install="$ac_dir/$ac_prog -c"
1355             break 2
1356           fi
1357         fi
1358       done
1359       ;;
1360     esac
1361   done
1362   IFS="$ac_save_ifs"
1363
1364 fi
1365   if test "${ac_cv_path_install+set}" = set; then
1366     INSTALL="$ac_cv_path_install"
1367   else
1368     # As a last resort, use the slow shell script.  We don't cache a
1369     # path for INSTALL within a source directory, because that will
1370     # break other packages using the cache if that directory is
1371     # removed, or if the path is relative.
1372     INSTALL="$ac_install_sh"
1373   fi
1374 fi
1375 echo "$ac_t""$INSTALL" 1>&6
1376
1377 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1378 # It thinks the first close brace ends the variable substitution.
1379 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1380
1381 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1382
1383 echo $ac_n "checking for -li386""... $ac_c" 1>&6
1384 ac_lib_var=`echo i386 | tr '.-/+' '___p'`
1385 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1386   echo $ac_n "(cached) $ac_c" 1>&6
1387 else
1388   ac_save_LIBS="$LIBS"
1389 LIBS="-li386  $LIBS"
1390 cat > conftest.$ac_ext <<EOF
1391 #line 1392 "configure"
1392 #include "confdefs.h"
1393
1394 int main() { return 0; }
1395 int t() {
1396 i386_set_ldt()
1397 ; return 0; }
1398 EOF
1399 if eval $ac_link; then
1400   rm -rf conftest*
1401   eval "ac_cv_lib_$ac_lib_var=yes"
1402 else
1403   rm -rf conftest*
1404   eval "ac_cv_lib_$ac_lib_var=no"
1405 fi
1406 rm -f conftest*
1407 LIBS="$ac_save_LIBS"
1408
1409 fi
1410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1411   echo "$ac_t""yes" 1>&6
1412   LDLIBS="$LDLIBS -li386"
1413 else
1414   echo "$ac_t""no" 1>&6
1415 fi
1416
1417
1418
1419 if test "x${GCC}" = "xyes"
1420 then
1421   CFLAGS="$CFLAGS -Wall"
1422   # If we cannot run a trivial program, we must be cross compiling.
1423 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1424 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1425   echo $ac_n "(cached) $ac_c" 1>&6
1426 else
1427   if test "$cross_compiling" = yes; then
1428   ac_cv_c_cross=yes
1429 else
1430 cat > conftest.$ac_ext <<EOF
1431 #line 1432 "configure"
1432 #include "confdefs.h"
1433 main(){return(0);}
1434 EOF
1435 eval $ac_link
1436 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1437   ac_cv_c_cross=no
1438 else
1439   ac_cv_c_cross=yes
1440 fi
1441 fi
1442 rm -fr conftest*
1443 fi
1444
1445 echo "$ac_t""$ac_cv_c_cross" 1>&6
1446 cross_compiling=$ac_cv_c_cross
1447
1448   echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
1449 if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
1450   echo $ac_n "(cached) $ac_c" 1>&6
1451 else
1452   if test "$cross_compiling" = yes; then
1453   ac_cv_c_gcc_strength_bug="yes"
1454 else
1455 cat > conftest.$ac_ext <<EOF
1456 #line 1457 "configure"
1457 #include "confdefs.h"
1458
1459 int main(void) {
1460   static int Array3;
1461   unsigned int B = 3;
1462   int i;
1463   for(i=0; i<B; i++) Arrayi = i - 3;
1464   exit( Array1 != -2 );
1465 }
1466 EOF
1467 eval $ac_link
1468 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1469   ac_cv_c_gcc_strength_bug="no"
1470 else
1471   ac_cv_c_gcc_strength_bug="yes"
1472 fi
1473 fi
1474 rm -fr conftest* 
1475 fi
1476
1477 echo "$ac_t""$ac_cv_c_gcc_strength_bug" 1>&6
1478   if test "$ac_cv_c_gcc_strength_bug" = "yes"
1479   then
1480     CFLAGS="$CFLAGS -fno-strength-reduce"
1481   fi
1482 fi
1483
1484
1485 for ac_func in tcgetattr usleep
1486 do
1487 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1488 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1489   echo $ac_n "(cached) $ac_c" 1>&6
1490 else
1491   cat > conftest.$ac_ext <<EOF
1492 #line 1493 "configure"
1493 #include "confdefs.h"
1494 /* System header to define __stub macros and hopefully few prototypes,
1495     which can conflict with char $ac_func(); below.  */
1496 #include <assert.h>
1497 /* Override any gcc2 internal prototype to avoid an error.  */
1498 char $ac_func();
1499
1500 int main() { return 0; }
1501 int t() {
1502
1503 /* The GNU C library defines this for functions which it implements
1504     to always fail with ENOSYS.  Some functions are actually named
1505     something starting with __ and the normal name is an alias.  */
1506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1507 choke me
1508 #else
1509 $ac_func();
1510 #endif
1511
1512 ; return 0; }
1513 EOF
1514 if eval $ac_link; then
1515   rm -rf conftest*
1516   eval "ac_cv_func_$ac_func=yes"
1517 else
1518   rm -rf conftest*
1519   eval "ac_cv_func_$ac_func=no"
1520 fi
1521 rm -f conftest*
1522
1523 fi
1524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1525   echo "$ac_t""yes" 1>&6
1526     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1527   cat >> confdefs.h <<EOF
1528 #define $ac_tr_func 1
1529 EOF
1530  
1531 else
1532   echo "$ac_t""no" 1>&6
1533 fi
1534 done
1535
1536 for ac_hdr in stdlib.h
1537 do
1538 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1540 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1541   echo $ac_n "(cached) $ac_c" 1>&6
1542 else
1543   cat > conftest.$ac_ext <<EOF
1544 #line 1545 "configure"
1545 #include "confdefs.h"
1546 #include <$ac_hdr>
1547 EOF
1548 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1549 ac_err=`grep -v '^ *+' conftest.out`
1550 if test -z "$ac_err"; then
1551   rm -rf conftest*
1552   eval "ac_cv_header_$ac_safe=yes"
1553 else
1554   echo "$ac_err" >&5
1555   rm -rf conftest*
1556   eval "ac_cv_header_$ac_safe=no"
1557 fi
1558 rm -f conftest*
1559 fi
1560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1561   echo "$ac_t""yes" 1>&6
1562     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1563   cat >> confdefs.h <<EOF
1564 #define $ac_tr_hdr 1
1565 EOF
1566  
1567 else
1568   echo "$ac_t""no" 1>&6
1569 fi
1570 done
1571
1572 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1573 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1574   echo $ac_n "(cached) $ac_c" 1>&6
1575 else
1576   cat > conftest.$ac_ext <<EOF
1577 #line 1578 "configure"
1578 #include "confdefs.h"
1579 #include <sys/types.h>
1580 #include <sys/stat.h>
1581
1582 #if defined(S_ISBLK) && defined(S_IFDIR)
1583 # if S_ISBLK (S_IFDIR)
1584 You lose.
1585 # endif
1586 #endif
1587
1588 #if defined(S_ISBLK) && defined(S_IFCHR)
1589 # if S_ISBLK (S_IFCHR)
1590 You lose.
1591 # endif
1592 #endif
1593
1594 #if defined(S_ISLNK) && defined(S_IFREG)
1595 # if S_ISLNK (S_IFREG)
1596 You lose.
1597 # endif
1598 #endif
1599
1600 #if defined(S_ISSOCK) && defined(S_IFREG)
1601 # if S_ISSOCK (S_IFREG)
1602 You lose.
1603 # endif
1604 #endif
1605
1606 EOF
1607 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1608   egrep "You lose" >/dev/null 2>&1; then
1609   rm -rf conftest*
1610   ac_cv_header_stat_broken=yes
1611 else
1612   rm -rf conftest*
1613   ac_cv_header_stat_broken=no
1614 fi
1615 rm -f conftest*
1616
1617 fi
1618
1619 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1620 if test $ac_cv_header_stat_broken = yes; then
1621   cat >> confdefs.h <<\EOF
1622 #define STAT_MACROS_BROKEN 1
1623 EOF
1624
1625 fi
1626
1627 echo $ac_n "checking for working const""... $ac_c" 1>&6
1628 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1629   echo $ac_n "(cached) $ac_c" 1>&6
1630 else
1631   cat > conftest.$ac_ext <<EOF
1632 #line 1633 "configure"
1633 #include "confdefs.h"
1634
1635 int main() { return 0; }
1636 int t() {
1637
1638 /* Ultrix mips cc rejects this.  */
1639 typedef int charset[2]; const charset x;
1640 /* SunOS 4.1.1 cc rejects this.  */
1641 char const *const *ccp;
1642 char **p;
1643 /* NEC SVR4.0.2 mips cc rejects this.  */
1644 struct point {int x, y;};
1645 static struct point const zero = {0,0};
1646 /* AIX XL C 1.02.0.0 rejects this.
1647    It does not let you subtract one const X* pointer from another in an arm
1648    of an if-expression whose if-part is not a constant expression */
1649 const char *g = "string";
1650 ccp = &g + (g ? g-g : 0);
1651 /* HPUX 7.0 cc rejects these. */
1652 ++ccp;
1653 p = (char**) ccp;
1654 ccp = (char const *const *) p;
1655 { /* SCO 3.2v4 cc rejects this.  */
1656   char *t;
1657   char const *s = 0 ? (char *) 0 : (char const *) 0;
1658
1659   *t++ = 0;
1660 }
1661 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1662   int x[] = {25, 17};
1663   const int *foo = &x[0];
1664   ++foo;
1665 }
1666 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1667   typedef const int *iptr;
1668   iptr p = 0;
1669   ++p;
1670 }
1671 { /* AIX XL C 1.02.0.0 rejects this saying
1672      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1673   struct s { int j; const int *ap[3]; };
1674   struct s *b; b->j = 5;
1675 }
1676 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1677   const int foo = 10;
1678 }
1679
1680 ; return 0; }
1681 EOF
1682 if eval $ac_compile; then
1683   rm -rf conftest*
1684   ac_cv_c_const=yes
1685 else
1686   rm -rf conftest*
1687   ac_cv_c_const=no
1688 fi
1689 rm -f conftest*
1690
1691 fi
1692
1693 echo "$ac_t""$ac_cv_c_const" 1>&6
1694 if test $ac_cv_c_const = no; then
1695   cat >> confdefs.h <<\EOF
1696 #define const 
1697 EOF
1698
1699 fi
1700
1701 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1702 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1703   echo $ac_n "(cached) $ac_c" 1>&6
1704 else
1705   cat > conftest.$ac_ext <<EOF
1706 #line 1707 "configure"
1707 #include "confdefs.h"
1708 #include <stdlib.h>
1709 #include <stdarg.h>
1710 #include <string.h>
1711 #include <float.h>
1712 EOF
1713 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1714 ac_err=`grep -v '^ *+' conftest.out`
1715 if test -z "$ac_err"; then
1716   rm -rf conftest*
1717   ac_cv_header_stdc=yes
1718 else
1719   echo "$ac_err" >&5
1720   rm -rf conftest*
1721   ac_cv_header_stdc=no
1722 fi
1723 rm -f conftest*
1724
1725 if test $ac_cv_header_stdc = yes; then
1726   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1727 cat > conftest.$ac_ext <<EOF
1728 #line 1729 "configure"
1729 #include "confdefs.h"
1730 #include <string.h>
1731 EOF
1732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1733   egrep "memchr" >/dev/null 2>&1; then
1734   :
1735 else
1736   rm -rf conftest*
1737   ac_cv_header_stdc=no
1738 fi
1739 rm -f conftest*
1740
1741 fi
1742
1743 if test $ac_cv_header_stdc = yes; then
1744   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1745 cat > conftest.$ac_ext <<EOF
1746 #line 1747 "configure"
1747 #include "confdefs.h"
1748 #include <stdlib.h>
1749 EOF
1750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1751   egrep "free" >/dev/null 2>&1; then
1752   :
1753 else
1754   rm -rf conftest*
1755   ac_cv_header_stdc=no
1756 fi
1757 rm -f conftest*
1758
1759 fi
1760
1761 if test $ac_cv_header_stdc = yes; then
1762   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1763 if test "$cross_compiling" = yes; then
1764   :
1765 else
1766 cat > conftest.$ac_ext <<EOF
1767 #line 1768 "configure"
1768 #include "confdefs.h"
1769 #include <ctype.h>
1770 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1771 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1772 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1773 int main () { int i; for (i = 0; i < 256; i++)
1774 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1775 exit (0); }
1776
1777 EOF
1778 eval $ac_link
1779 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1780   :
1781 else
1782   ac_cv_header_stdc=no
1783 fi
1784 fi
1785 rm -fr conftest*
1786 fi
1787 fi
1788
1789 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1790 if test $ac_cv_header_stdc = yes; then
1791   cat >> confdefs.h <<\EOF
1792 #define STDC_HEADERS 1
1793 EOF
1794
1795 fi
1796
1797 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1798 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1799   echo $ac_n "(cached) $ac_c" 1>&6
1800 else
1801   cat > conftest.$ac_ext <<EOF
1802 #line 1803 "configure"
1803 #include "confdefs.h"
1804 #include <sys/types.h>
1805 #if STDC_HEADERS
1806 #include <stdlib.h>
1807 #endif
1808 EOF
1809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1810   egrep "size_t" >/dev/null 2>&1; then
1811   rm -rf conftest*
1812   ac_cv_type_size_t=yes
1813 else
1814   rm -rf conftest*
1815   ac_cv_type_size_t=no
1816 fi
1817 rm -f conftest*
1818
1819 fi
1820 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1821 if test $ac_cv_type_size_t = no; then
1822   cat >> confdefs.h <<\EOF
1823 #define size_t unsigned
1824 EOF
1825
1826 fi
1827
1828
1829
1830 MAKE_RULES=Make.rules
1831
1832
1833 trap '' 1 2 15
1834 cat > confcache <<\EOF
1835 # This file is a shell script that caches the results of configure
1836 # tests run on this system so they can be shared between configure
1837 # scripts and configure runs.  It is not useful on other systems.
1838 # If it contains results you don't want to keep, you may remove or edit it.
1839 #
1840 # By default, configure uses ./config.cache as the cache file,
1841 # creating it if it does not exist already.  You can give configure
1842 # the --cache-file=FILE option to use a different cache file; that is
1843 # what configure does when it calls configure scripts in
1844 # subdirectories, so they share the cache.
1845 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1846 # config.status only pays attention to the cache file if you give it the
1847 # --recheck option to rerun configure.
1848 #
1849 EOF
1850 # Ultrix sh set writes to stderr and can't be redirected directly,
1851 # and sets the high bit in the cache file unless we assign to the vars.
1852 (set) 2>&1 |
1853   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1854   >> confcache
1855 if cmp -s $cache_file confcache; then
1856   :
1857 else
1858   if test -w $cache_file; then
1859     echo "updating cache $cache_file"
1860     cat confcache > $cache_file
1861   else
1862     echo "not updating unwritable cache $cache_file"
1863   fi
1864 fi
1865 rm -f confcache
1866
1867 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1868
1869 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1870 # Let make expand exec_prefix.
1871 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1872
1873 # Any assignment to VPATH causes Sun make to only execute
1874 # the first set of double-colon rules, so remove it if not needed.
1875 # If there is a colon in the path, we need to keep it.
1876 if test "x$srcdir" = x.; then
1877   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1878 fi
1879
1880 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1881
1882 # Transform confdefs.h into DEFS.
1883 # Protect against shell expansion while executing Makefile rules.
1884 # Protect against Makefile macro expansion.
1885 cat > conftest.defs <<\EOF
1886 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
1887 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1888 s%\[%\\&%g
1889 s%\]%\\&%g
1890 s%\$%$$%g
1891 EOF
1892 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1893 rm -f conftest.defs
1894
1895
1896 # Without the "./", some shells look in PATH for config.status.
1897 : ${CONFIG_STATUS=./config.status}
1898
1899 echo creating $CONFIG_STATUS
1900 rm -f $CONFIG_STATUS
1901 cat > $CONFIG_STATUS <<EOF
1902 #! /bin/sh
1903 # Generated automatically by configure.
1904 # Run this file to recreate the current configuration.
1905 # This directory was configured as follows,
1906 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1907 #
1908 # $0 $ac_configure_args
1909 #
1910 # Compiler output produced by configure, useful for debugging
1911 # configure, is in ./config.log if it exists.
1912
1913 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1914 for ac_option
1915 do
1916   case "\$ac_option" in
1917   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1918     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1919     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1920   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1921     echo "$CONFIG_STATUS generated by autoconf version 2.7"
1922     exit 0 ;;
1923   -help | --help | --hel | --he | --h)
1924     echo "\$ac_cs_usage"; exit 0 ;;
1925   *) echo "\$ac_cs_usage"; exit 1 ;;
1926   esac
1927 done
1928
1929 ac_given_srcdir=$srcdir
1930 ac_given_INSTALL="$INSTALL"
1931
1932 trap 'rm -fr `echo "
1933 Make.rules
1934 Makefile
1935 controls/Makefile
1936 debugger/Makefile
1937 debugger/readline/Makefile
1938 files/Makefile
1939 if1632/Makefile
1940 ipc/Makefile
1941 library/Makefile
1942 libtest/Makefile
1943 loader/Makefile
1944 memory/Makefile
1945 misc/Makefile
1946 miscemu/Makefile
1947 multimedia/Makefile
1948 objects/Makefile
1949 rc/Makefile
1950 resources/Makefile
1951 tools/Makefile
1952 win32/Makefile
1953 windows/Makefile " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1954 EOF
1955 cat >> $CONFIG_STATUS <<EOF
1956
1957 # Protect against being on the right side of a sed subst in config.status.
1958 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1959  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1960 $ac_vpsub
1961 $extrasub
1962 s%@CFLAGS@%$CFLAGS%g
1963 s%@CPPFLAGS@%$CPPFLAGS%g
1964 s%@CXXFLAGS@%$CXXFLAGS%g
1965 s%@DEFS@%$DEFS%g
1966 s%@LDFLAGS@%$LDFLAGS%g
1967 s%@LIBS@%$LIBS%g
1968 s%@exec_prefix@%$exec_prefix%g
1969 s%@prefix@%$prefix%g
1970 s%@program_transform_name@%$program_transform_name%g
1971 s%@bindir@%$bindir%g
1972 s%@sbindir@%$sbindir%g
1973 s%@libexecdir@%$libexecdir%g
1974 s%@datadir@%$datadir%g
1975 s%@sysconfdir@%$sysconfdir%g
1976 s%@sharedstatedir@%$sharedstatedir%g
1977 s%@localstatedir@%$localstatedir%g
1978 s%@libdir@%$libdir%g
1979 s%@includedir@%$includedir%g
1980 s%@oldincludedir@%$oldincludedir%g
1981 s%@infodir@%$infodir%g
1982 s%@mandir@%$mandir%g
1983 s%@LDLIBS@%$LDLIBS%g
1984 s%@MAIN_TARGET@%$MAIN_TARGET%g
1985 s%@SET_MAKE@%$SET_MAKE%g
1986 s%@CC@%$CC%g
1987 s%@CPP@%$CPP%g
1988 s%@X_CFLAGS@%$X_CFLAGS%g
1989 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
1990 s%@X_LIBS@%$X_LIBS%g
1991 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
1992 s%@YACC@%$YACC%g
1993 s%@LEX@%$LEX%g
1994 s%@LEXLIB@%$LEXLIB%g
1995 s%@RANLIB@%$RANLIB%g
1996 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1997 s%@INSTALL_DATA@%$INSTALL_DATA%g
1998 /@MAKE_RULES@/r $MAKE_RULES
1999 s%@MAKE_RULES@%%g
2000
2001 CEOF
2002 EOF
2003 cat >> $CONFIG_STATUS <<EOF
2004
2005 CONFIG_FILES=\${CONFIG_FILES-"Make.rules
2006 Makefile
2007 controls/Makefile
2008 debugger/Makefile
2009 debugger/readline/Makefile
2010 files/Makefile
2011 if1632/Makefile
2012 ipc/Makefile
2013 library/Makefile
2014 libtest/Makefile
2015 loader/Makefile
2016 memory/Makefile
2017 misc/Makefile
2018 miscemu/Makefile
2019 multimedia/Makefile
2020 objects/Makefile
2021 rc/Makefile
2022 resources/Makefile
2023 tools/Makefile
2024 win32/Makefile
2025 windows/Makefile "}
2026 EOF
2027 cat >> $CONFIG_STATUS <<\EOF
2028 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2029   # Support "outfile[:infile]", defaulting infile="outfile.in".
2030   case "$ac_file" in
2031   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2032        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2033   *) ac_file_in="${ac_file}.in" ;;
2034   esac
2035
2036   # Adjust relative srcdir, etc. for subdirectories.
2037
2038   # Remove last slash and all that follows it.  Not all systems have dirname.
2039   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2040   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2041     # The file is in a subdirectory.
2042     test ! -d "$ac_dir" && mkdir "$ac_dir"
2043     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2044     # A "../" for each directory in $ac_dir_suffix.
2045     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2046   else
2047     ac_dir_suffix= ac_dots=
2048   fi
2049
2050   case "$ac_given_srcdir" in
2051   .)  srcdir=.
2052       if test -z "$ac_dots"; then top_srcdir=.
2053       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2054   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2055   *) # Relative path.
2056     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2057     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2058   esac
2059
2060   case "$ac_given_INSTALL" in
2061   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2062   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2063   esac
2064   echo creating "$ac_file"
2065   rm -f "$ac_file"
2066   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2067   case "$ac_file" in
2068   *Makefile*) ac_comsub="1i\\
2069 # $configure_input" ;;
2070   *) ac_comsub= ;;
2071   esac
2072   sed -e "$ac_comsub
2073 s%@configure_input@%$configure_input%g
2074 s%@srcdir@%$srcdir%g
2075 s%@top_srcdir@%$top_srcdir%g
2076 s%@INSTALL@%$INSTALL%g
2077 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2078 fi; done
2079 rm -f conftest.subs
2080
2081
2082
2083 exit 0
2084 EOF
2085 chmod +x $CONFIG_STATUS
2086 rm -fr confdefs* $ac_clean_files
2087 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2088
2089
2090 echo
2091 echo "Configure finished.  Do 'make depend; make' to compile Wine."
2092 echo
2093