Check for Xpm headers and add /usr/local/lib to /etc/ld.so.conf if
[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.13 
6 # Copyright (C) 1992, 93, 94, 95, 96 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   --disable-emulator      build only the Wine library, not the emulator"
17 ac_help="$ac_help
18   --disable-dll           build static libraries instead of DLLs"
19 ac_help="$ac_help
20   --disable-debug         compile out all debugging messages"
21 ac_help="$ac_help
22   --disable-trace         compile out TRACE messages"
23 ac_help="$ac_help
24   --without-reentrant-x   compile for use with non-reentrant X libraries"
25 ac_help="$ac_help
26   --with-x                use the X Window System"
27
28 # Initialize some variables set by options.
29 # The variables have the same names as the options, with
30 # dashes changed to underlines.
31 build=NONE
32 cache_file=./config.cache
33 exec_prefix=NONE
34 host=NONE
35 no_create=
36 nonopt=NONE
37 no_recursion=
38 prefix=NONE
39 program_prefix=NONE
40 program_suffix=NONE
41 program_transform_name=s,x,x,
42 silent=
43 site=
44 srcdir=
45 target=NONE
46 verbose=
47 x_includes=NONE
48 x_libraries=NONE
49 bindir='${exec_prefix}/bin'
50 sbindir='${exec_prefix}/sbin'
51 libexecdir='${exec_prefix}/libexec'
52 datadir='${prefix}/share'
53 sysconfdir='${prefix}/etc'
54 sharedstatedir='${prefix}/com'
55 localstatedir='${prefix}/var'
56 libdir='${exec_prefix}/lib'
57 includedir='${prefix}/include'
58 oldincludedir='/usr/include'
59 infodir='${prefix}/info'
60 mandir='${prefix}/man'
61
62 # Initialize some other variables.
63 subdirs=
64 MFLAGS= MAKEFLAGS=
65 SHELL=${CONFIG_SHELL-/bin/sh}
66 # Maximum number of lines to put in a shell here document.
67 ac_max_here_lines=12
68
69 ac_prev=
70 for ac_option
71 do
72
73   # If the previous option needs an argument, assign it.
74   if test -n "$ac_prev"; then
75     eval "$ac_prev=\$ac_option"
76     ac_prev=
77     continue
78   fi
79
80   case "$ac_option" in
81   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
82   *) ac_optarg= ;;
83   esac
84
85   # Accept the important Cygnus configure options, so we can diagnose typos.
86
87   case "$ac_option" in
88
89   -bindir | --bindir | --bindi | --bind | --bin | --bi)
90     ac_prev=bindir ;;
91   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
92     bindir="$ac_optarg" ;;
93
94   -build | --build | --buil | --bui | --bu)
95     ac_prev=build ;;
96   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
97     build="$ac_optarg" ;;
98
99   -cache-file | --cache-file | --cache-fil | --cache-fi \
100   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
101     ac_prev=cache_file ;;
102   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
103   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
104     cache_file="$ac_optarg" ;;
105
106   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
107     ac_prev=datadir ;;
108   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
109   | --da=*)
110     datadir="$ac_optarg" ;;
111
112   -disable-* | --disable-*)
113     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
114     # Reject names that are not valid shell variable names.
115     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
116       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
117     fi
118     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119     eval "enable_${ac_feature}=no" ;;
120
121   -enable-* | --enable-*)
122     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
123     # Reject names that are not valid shell variable names.
124     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
125       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
126     fi
127     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
128     case "$ac_option" in
129       *=*) ;;
130       *) ac_optarg=yes ;;
131     esac
132     eval "enable_${ac_feature}='$ac_optarg'" ;;
133
134   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
135   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
136   | --exec | --exe | --ex)
137     ac_prev=exec_prefix ;;
138   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
139   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
140   | --exec=* | --exe=* | --ex=*)
141     exec_prefix="$ac_optarg" ;;
142
143   -gas | --gas | --ga | --g)
144     # Obsolete; use --with-gas.
145     with_gas=yes ;;
146
147   -help | --help | --hel | --he)
148     # Omit some internal or obsolete options to make the list less imposing.
149     # This message is too long to be a string in the A/UX 3.1 sh.
150     cat << EOF
151 Usage: configure [options] [host]
152 Options: [defaults in brackets after descriptions]
153 Configuration:
154   --cache-file=FILE       cache test results in FILE
155   --help                  print this message
156   --no-create             do not create output files
157   --quiet, --silent       do not print \`checking...' messages
158   --version               print the version of autoconf that created configure
159 Directory and file names:
160   --prefix=PREFIX         install architecture-independent files in PREFIX
161                           [$ac_default_prefix]
162   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
163                           [same as prefix]
164   --bindir=DIR            user executables in DIR [EPREFIX/bin]
165   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
166   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
167   --datadir=DIR           read-only architecture-independent data in DIR
168                           [PREFIX/share]
169   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
170   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
171                           [PREFIX/com]
172   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
173   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
174   --includedir=DIR        C header files in DIR [PREFIX/include]
175   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
176   --infodir=DIR           info documentation in DIR [PREFIX/info]
177   --mandir=DIR            man documentation in DIR [PREFIX/man]
178   --srcdir=DIR            find the sources in DIR [configure dir or ..]
179   --program-prefix=PREFIX prepend PREFIX to installed program names
180   --program-suffix=SUFFIX append SUFFIX to installed program names
181   --program-transform-name=PROGRAM
182                           run sed PROGRAM on installed program names
183 EOF
184     cat << EOF
185 Host type:
186   --build=BUILD           configure for building on BUILD [BUILD=HOST]
187   --host=HOST             configure for HOST [guessed]
188   --target=TARGET         configure for TARGET [TARGET=HOST]
189 Features and packages:
190   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
191   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
192   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
193   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
194   --x-includes=DIR        X include files are in DIR
195   --x-libraries=DIR       X library files are in DIR
196 EOF
197     if test -n "$ac_help"; then
198       echo "--enable and --with options recognized:$ac_help"
199     fi
200     exit 0 ;;
201
202   -host | --host | --hos | --ho)
203     ac_prev=host ;;
204   -host=* | --host=* | --hos=* | --ho=*)
205     host="$ac_optarg" ;;
206
207   -includedir | --includedir | --includedi | --included | --include \
208   | --includ | --inclu | --incl | --inc)
209     ac_prev=includedir ;;
210   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
211   | --includ=* | --inclu=* | --incl=* | --inc=*)
212     includedir="$ac_optarg" ;;
213
214   -infodir | --infodir | --infodi | --infod | --info | --inf)
215     ac_prev=infodir ;;
216   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
217     infodir="$ac_optarg" ;;
218
219   -libdir | --libdir | --libdi | --libd)
220     ac_prev=libdir ;;
221   -libdir=* | --libdir=* | --libdi=* | --libd=*)
222     libdir="$ac_optarg" ;;
223
224   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
225   | --libexe | --libex | --libe)
226     ac_prev=libexecdir ;;
227   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
228   | --libexe=* | --libex=* | --libe=*)
229     libexecdir="$ac_optarg" ;;
230
231   -localstatedir | --localstatedir | --localstatedi | --localstated \
232   | --localstate | --localstat | --localsta | --localst \
233   | --locals | --local | --loca | --loc | --lo)
234     ac_prev=localstatedir ;;
235   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
236   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
237   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
238     localstatedir="$ac_optarg" ;;
239
240   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
241     ac_prev=mandir ;;
242   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
243     mandir="$ac_optarg" ;;
244
245   -nfp | --nfp | --nf)
246     # Obsolete; use --without-fp.
247     with_fp=no ;;
248
249   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
250   | --no-cr | --no-c)
251     no_create=yes ;;
252
253   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
254   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
255     no_recursion=yes ;;
256
257   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
258   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
259   | --oldin | --oldi | --old | --ol | --o)
260     ac_prev=oldincludedir ;;
261   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
262   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
263   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
264     oldincludedir="$ac_optarg" ;;
265
266   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
267     ac_prev=prefix ;;
268   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
269     prefix="$ac_optarg" ;;
270
271   -program-prefix | --program-prefix | --program-prefi | --program-pref \
272   | --program-pre | --program-pr | --program-p)
273     ac_prev=program_prefix ;;
274   -program-prefix=* | --program-prefix=* | --program-prefi=* \
275   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
276     program_prefix="$ac_optarg" ;;
277
278   -program-suffix | --program-suffix | --program-suffi | --program-suff \
279   | --program-suf | --program-su | --program-s)
280     ac_prev=program_suffix ;;
281   -program-suffix=* | --program-suffix=* | --program-suffi=* \
282   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
283     program_suffix="$ac_optarg" ;;
284
285   -program-transform-name | --program-transform-name \
286   | --program-transform-nam | --program-transform-na \
287   | --program-transform-n | --program-transform- \
288   | --program-transform | --program-transfor \
289   | --program-transfo | --program-transf \
290   | --program-trans | --program-tran \
291   | --progr-tra | --program-tr | --program-t)
292     ac_prev=program_transform_name ;;
293   -program-transform-name=* | --program-transform-name=* \
294   | --program-transform-nam=* | --program-transform-na=* \
295   | --program-transform-n=* | --program-transform-=* \
296   | --program-transform=* | --program-transfor=* \
297   | --program-transfo=* | --program-transf=* \
298   | --program-trans=* | --program-tran=* \
299   | --progr-tra=* | --program-tr=* | --program-t=*)
300     program_transform_name="$ac_optarg" ;;
301
302   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
303   | -silent | --silent | --silen | --sile | --sil)
304     silent=yes ;;
305
306   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
307     ac_prev=sbindir ;;
308   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
309   | --sbi=* | --sb=*)
310     sbindir="$ac_optarg" ;;
311
312   -sharedstatedir | --sharedstatedir | --sharedstatedi \
313   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
314   | --sharedst | --shareds | --shared | --share | --shar \
315   | --sha | --sh)
316     ac_prev=sharedstatedir ;;
317   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
318   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
319   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
320   | --sha=* | --sh=*)
321     sharedstatedir="$ac_optarg" ;;
322
323   -site | --site | --sit)
324     ac_prev=site ;;
325   -site=* | --site=* | --sit=*)
326     site="$ac_optarg" ;;
327
328   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
329     ac_prev=srcdir ;;
330   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
331     srcdir="$ac_optarg" ;;
332
333   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
334   | --syscon | --sysco | --sysc | --sys | --sy)
335     ac_prev=sysconfdir ;;
336   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
337   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
338     sysconfdir="$ac_optarg" ;;
339
340   -target | --target | --targe | --targ | --tar | --ta | --t)
341     ac_prev=target ;;
342   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
343     target="$ac_optarg" ;;
344
345   -v | -verbose | --verbose | --verbos | --verbo | --verb)
346     verbose=yes ;;
347
348   -version | --version | --versio | --versi | --vers)
349     echo "configure generated by autoconf version 2.13"
350     exit 0 ;;
351
352   -with-* | --with-*)
353     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
354     # Reject names that are not valid shell variable names.
355     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
356       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357     fi
358     ac_package=`echo $ac_package| sed 's/-/_/g'`
359     case "$ac_option" in
360       *=*) ;;
361       *) ac_optarg=yes ;;
362     esac
363     eval "with_${ac_package}='$ac_optarg'" ;;
364
365   -without-* | --without-*)
366     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
367     # Reject names that are not valid shell variable names.
368     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
369       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
370     fi
371     ac_package=`echo $ac_package| sed 's/-/_/g'`
372     eval "with_${ac_package}=no" ;;
373
374   --x)
375     # Obsolete; use --with-x.
376     with_x=yes ;;
377
378   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
379   | --x-incl | --x-inc | --x-in | --x-i)
380     ac_prev=x_includes ;;
381   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
382   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
383     x_includes="$ac_optarg" ;;
384
385   -x-libraries | --x-libraries | --x-librarie | --x-librari \
386   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
387     ac_prev=x_libraries ;;
388   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
389   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
390     x_libraries="$ac_optarg" ;;
391
392   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
393     ;;
394
395   *)
396     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
397       echo "configure: warning: $ac_option: invalid host type" 1>&2
398     fi
399     if test "x$nonopt" != xNONE; then
400       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
401     fi
402     nonopt="$ac_option"
403     ;;
404
405   esac
406 done
407
408 if test -n "$ac_prev"; then
409   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
410 fi
411
412 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
413
414 # File descriptor usage:
415 # 0 standard input
416 # 1 file creation
417 # 2 errors and warnings
418 # 3 some systems may open it to /dev/tty
419 # 4 used on the Kubota Titan
420 # 6 checking for... messages and results
421 # 5 compiler messages saved in config.log
422 if test "$silent" = yes; then
423   exec 6>/dev/null
424 else
425   exec 6>&1
426 fi
427 exec 5>./config.log
428
429 echo "\
430 This file contains any messages produced by compilers while
431 running configure, to aid debugging if configure makes a mistake.
432 " 1>&5
433
434 # Strip out --no-create and --no-recursion so they do not pile up.
435 # Also quote any args containing shell metacharacters.
436 ac_configure_args=
437 for ac_arg
438 do
439   case "$ac_arg" in
440   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
441   | --no-cr | --no-c) ;;
442   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
443   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
444   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
445   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
446   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
447   esac
448 done
449
450 # NLS nuisances.
451 # Only set these to C if already set.  These must not be set unconditionally
452 # because not all systems understand e.g. LANG=C (notably SCO).
453 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
454 # Non-C LC_CTYPE values break the ctype check.
455 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
456 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
457 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
458 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
459
460 # confdefs.h avoids OS command line length limits that DEFS can exceed.
461 rm -rf conftest* confdefs.h
462 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
463 echo > confdefs.h
464
465 # A filename unique to this package, relative to the directory that
466 # configure is in, which we can look for to find out if srcdir is correct.
467 ac_unique_file=controls/edit.c
468
469 # Find the source files, if location was not specified.
470 if test -z "$srcdir"; then
471   ac_srcdir_defaulted=yes
472   # Try the directory containing this script, then its parent.
473   ac_prog=$0
474   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
475   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
476   srcdir=$ac_confdir
477   if test ! -r $srcdir/$ac_unique_file; then
478     srcdir=..
479   fi
480 else
481   ac_srcdir_defaulted=no
482 fi
483 if test ! -r $srcdir/$ac_unique_file; then
484   if test "$ac_srcdir_defaulted" = yes; then
485     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
486   else
487     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
488   fi
489 fi
490 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
491
492 # Prefer explicitly selected file to automatically selected ones.
493 if test -z "$CONFIG_SITE"; then
494   if test "x$prefix" != xNONE; then
495     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
496   else
497     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
498   fi
499 fi
500 for ac_site_file in $CONFIG_SITE; do
501   if test -r "$ac_site_file"; then
502     echo "loading site script $ac_site_file"
503     . "$ac_site_file"
504   fi
505 done
506
507 if test -r "$cache_file"; then
508   echo "loading cache $cache_file"
509   . $cache_file
510 else
511   echo "creating cache $cache_file"
512   > $cache_file
513 fi
514
515 ac_ext=c
516 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
517 ac_cpp='$CPP $CPPFLAGS'
518 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
519 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
520 cross_compiling=$ac_cv_prog_cc_cross
521
522 ac_exeext=
523 ac_objext=o
524 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
525   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
526   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
527     ac_n= ac_c='
528 ' ac_t='        '
529   else
530     ac_n=-n ac_c= ac_t=
531   fi
532 else
533   ac_n= ac_c='\c' ac_t=
534 fi
535
536                 
537
538 ac_aux_dir=
539 for ac_dir in tools $srcdir/tools; do
540   if test -f $ac_dir/install-sh; then
541     ac_aux_dir=$ac_dir
542     ac_install_sh="$ac_aux_dir/install-sh -c"
543     break
544   elif test -f $ac_dir/install.sh; then
545     ac_aux_dir=$ac_dir
546     ac_install_sh="$ac_aux_dir/install.sh -c"
547     break
548   fi
549 done
550 if test -z "$ac_aux_dir"; then
551   { echo "configure: error: can not find install-sh or install.sh in tools $srcdir/tools" 1>&2; exit 1; }
552 fi
553 ac_config_guess=$ac_aux_dir/config.guess
554 ac_config_sub=$ac_aux_dir/config.sub
555 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
556
557
558 # We want these before the checks, so the checks can modify their values.
559
560 test -z "$PROGEXT" && PROGEXT="" 
561
562
563 EMU_TARGET=wine
564 LIBEXT=so       # library type .so or .a
565 TRACE_MSGS=yes  # the TRACE() macro
566 DEBUG_MSGS=yes  # the TRACE(), WARN(), and FIXME() macros.
567
568 # Check whether --enable-emulator or --disable-emulator was given.
569 if test "${enable_emulator+set}" = set; then
570   enableval="$enable_emulator"
571   if test "$enableval" = "no"; then EMU_TARGET=""; fi
572 fi
573
574
575 # Check whether --enable-dll or --disable-dll was given.
576 if test "${enable_dll+set}" = set; then
577   enableval="$enable_dll"
578   if test "$enableval" = "no"; then LIBEXT="a"; fi
579 fi
580
581
582 # Check whether --enable-debug or --disable-debug was given.
583 if test "${enable_debug+set}" = set; then
584   enableval="$enable_debug"
585   if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi
586 fi
587
588
589 # Check whether --enable-trace or --disable-trace was given.
590 if test "${enable_trace+set}" = set; then
591   enableval="$enable_trace"
592   if test "$enableval" = "no"; then TRACE_MSGS="no"; fi
593 fi
594
595
596 # Check whether --with-reentrant-x or --without-reentrant-x was given.
597 if test "${with_reentrant_x+set}" = set; then
598   withval="$with_reentrant_x"
599   :
600 fi
601
602
603
604
605
606 if test "$DEBUG_MSGS" = "no"
607 then
608     cat >> confdefs.h <<\EOF
609 #define NO_DEBUG_MSGS 1
610 EOF
611
612     cat >> confdefs.h <<\EOF
613 #define NO_TRACE_MSGS 1
614 EOF
615
616 else
617     if test "$TRACE_MSGS" = "no"
618     then
619         cat >> confdefs.h <<\EOF
620 #define NO_TRACE_MSGS 1
621 EOF
622
623     fi
624 fi
625
626
627 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
628 echo "configure:629: checking whether ${MAKE-make} sets \${MAKE}" >&5
629 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
630 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
631   echo $ac_n "(cached) $ac_c" 1>&6
632 else
633   cat > conftestmake <<\EOF
634 all:
635         @echo 'ac_maketemp="${MAKE}"'
636 EOF
637 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
638 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
639 if test -n "$ac_maketemp"; then
640   eval ac_cv_prog_make_${ac_make}_set=yes
641 else
642   eval ac_cv_prog_make_${ac_make}_set=no
643 fi
644 rm -f conftestmake
645 fi
646 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
647   echo "$ac_t""yes" 1>&6
648   SET_MAKE=
649 else
650   echo "$ac_t""no" 1>&6
651   SET_MAKE="MAKE=${MAKE-make}"
652 fi
653
654 # Extract the first word of "gcc", so it can be a program name with args.
655 set dummy gcc; ac_word=$2
656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
657 echo "configure:658: checking for $ac_word" >&5
658 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
659   echo $ac_n "(cached) $ac_c" 1>&6
660 else
661   if test -n "$CC"; then
662   ac_cv_prog_CC="$CC" # Let the user override the test.
663 else
664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
665   ac_dummy="$PATH"
666   for ac_dir in $ac_dummy; do
667     test -z "$ac_dir" && ac_dir=.
668     if test -f $ac_dir/$ac_word; then
669       ac_cv_prog_CC="gcc"
670       break
671     fi
672   done
673   IFS="$ac_save_ifs"
674 fi
675 fi
676 CC="$ac_cv_prog_CC"
677 if test -n "$CC"; then
678   echo "$ac_t""$CC" 1>&6
679 else
680   echo "$ac_t""no" 1>&6
681 fi
682
683 if test -z "$CC"; then
684   # Extract the first word of "cc", so it can be a program name with args.
685 set dummy cc; ac_word=$2
686 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
687 echo "configure:688: checking for $ac_word" >&5
688 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
689   echo $ac_n "(cached) $ac_c" 1>&6
690 else
691   if test -n "$CC"; then
692   ac_cv_prog_CC="$CC" # Let the user override the test.
693 else
694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
695   ac_prog_rejected=no
696   ac_dummy="$PATH"
697   for ac_dir in $ac_dummy; do
698     test -z "$ac_dir" && ac_dir=.
699     if test -f $ac_dir/$ac_word; then
700       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
701         ac_prog_rejected=yes
702         continue
703       fi
704       ac_cv_prog_CC="cc"
705       break
706     fi
707   done
708   IFS="$ac_save_ifs"
709 if test $ac_prog_rejected = yes; then
710   # We found a bogon in the path, so make sure we never use it.
711   set dummy $ac_cv_prog_CC
712   shift
713   if test $# -gt 0; then
714     # We chose a different compiler from the bogus one.
715     # However, it has the same basename, so the bogon will be chosen
716     # first if we set CC to just the basename; use the full file name.
717     shift
718     set dummy "$ac_dir/$ac_word" "$@"
719     shift
720     ac_cv_prog_CC="$@"
721   fi
722 fi
723 fi
724 fi
725 CC="$ac_cv_prog_CC"
726 if test -n "$CC"; then
727   echo "$ac_t""$CC" 1>&6
728 else
729   echo "$ac_t""no" 1>&6
730 fi
731
732   if test -z "$CC"; then
733     case "`uname -s`" in
734     *win32* | *WIN32*)
735       # Extract the first word of "cl", so it can be a program name with args.
736 set dummy cl; ac_word=$2
737 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
738 echo "configure:739: checking for $ac_word" >&5
739 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
740   echo $ac_n "(cached) $ac_c" 1>&6
741 else
742   if test -n "$CC"; then
743   ac_cv_prog_CC="$CC" # Let the user override the test.
744 else
745   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
746   ac_dummy="$PATH"
747   for ac_dir in $ac_dummy; do
748     test -z "$ac_dir" && ac_dir=.
749     if test -f $ac_dir/$ac_word; then
750       ac_cv_prog_CC="cl"
751       break
752     fi
753   done
754   IFS="$ac_save_ifs"
755 fi
756 fi
757 CC="$ac_cv_prog_CC"
758 if test -n "$CC"; then
759   echo "$ac_t""$CC" 1>&6
760 else
761   echo "$ac_t""no" 1>&6
762 fi
763  ;;
764     esac
765   fi
766   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
767 fi
768
769 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
770 echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
771
772 ac_ext=c
773 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
774 ac_cpp='$CPP $CPPFLAGS'
775 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
776 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
777 cross_compiling=$ac_cv_prog_cc_cross
778
779 cat > conftest.$ac_ext << EOF
780
781 #line 782 "configure"
782 #include "confdefs.h"
783
784 main(){return(0);}
785 EOF
786 if { (eval echo configure:787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
787   ac_cv_prog_cc_works=yes
788   # If we can't run a trivial program, we are probably using a cross compiler.
789   if (./conftest; exit) 2>/dev/null; then
790     ac_cv_prog_cc_cross=no
791   else
792     ac_cv_prog_cc_cross=yes
793   fi
794 else
795   echo "configure: failed program was:" >&5
796   cat conftest.$ac_ext >&5
797   ac_cv_prog_cc_works=no
798 fi
799 rm -fr conftest*
800 ac_ext=c
801 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
802 ac_cpp='$CPP $CPPFLAGS'
803 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805 cross_compiling=$ac_cv_prog_cc_cross
806
807 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
808 if test $ac_cv_prog_cc_works = no; then
809   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
810 fi
811 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
812 echo "configure:813: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
813 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
814 cross_compiling=$ac_cv_prog_cc_cross
815
816 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
817 echo "configure:818: checking whether we are using GNU C" >&5
818 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
819   echo $ac_n "(cached) $ac_c" 1>&6
820 else
821   cat > conftest.c <<EOF
822 #ifdef __GNUC__
823   yes;
824 #endif
825 EOF
826 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
827   ac_cv_prog_gcc=yes
828 else
829   ac_cv_prog_gcc=no
830 fi
831 fi
832
833 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
834
835 if test $ac_cv_prog_gcc = yes; then
836   GCC=yes
837 else
838   GCC=
839 fi
840
841 ac_test_CFLAGS="${CFLAGS+set}"
842 ac_save_CFLAGS="$CFLAGS"
843 CFLAGS=
844 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
845 echo "configure:846: checking whether ${CC-cc} accepts -g" >&5
846 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
847   echo $ac_n "(cached) $ac_c" 1>&6
848 else
849   echo 'void f(){}' > conftest.c
850 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
851   ac_cv_prog_cc_g=yes
852 else
853   ac_cv_prog_cc_g=no
854 fi
855 rm -f conftest*
856
857 fi
858
859 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
860 if test "$ac_test_CFLAGS" = set; then
861   CFLAGS="$ac_save_CFLAGS"
862 elif test $ac_cv_prog_cc_g = yes; then
863   if test "$GCC" = yes; then
864     CFLAGS="-g -O2"
865   else
866     CFLAGS="-g"
867   fi
868 else
869   if test "$GCC" = yes; then
870     CFLAGS="-O2"
871   else
872     CFLAGS=
873   fi
874 fi
875
876 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
877 echo "configure:878: checking how to run the C preprocessor" >&5
878 # On Suns, sometimes $CPP names a directory.
879 if test -n "$CPP" && test -d "$CPP"; then
880   CPP=
881 fi
882 if test -z "$CPP"; then
883 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
884   echo $ac_n "(cached) $ac_c" 1>&6
885 else
886     # This must be in double quotes, not single quotes, because CPP may get
887   # substituted into the Makefile and "${CC-cc}" will confuse make.
888   CPP="${CC-cc} -E"
889   # On the NeXT, cc -E runs the code through the compiler's parser,
890   # not just through cpp.
891   cat > conftest.$ac_ext <<EOF
892 #line 893 "configure"
893 #include "confdefs.h"
894 #include <assert.h>
895 Syntax Error
896 EOF
897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
898 { (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
900 if test -z "$ac_err"; then
901   :
902 else
903   echo "$ac_err" >&5
904   echo "configure: failed program was:" >&5
905   cat conftest.$ac_ext >&5
906   rm -rf conftest*
907   CPP="${CC-cc} -E -traditional-cpp"
908   cat > conftest.$ac_ext <<EOF
909 #line 910 "configure"
910 #include "confdefs.h"
911 #include <assert.h>
912 Syntax Error
913 EOF
914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
915 { (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
917 if test -z "$ac_err"; then
918   :
919 else
920   echo "$ac_err" >&5
921   echo "configure: failed program was:" >&5
922   cat conftest.$ac_ext >&5
923   rm -rf conftest*
924   CPP="${CC-cc} -nologo -E"
925   cat > conftest.$ac_ext <<EOF
926 #line 927 "configure"
927 #include "confdefs.h"
928 #include <assert.h>
929 Syntax Error
930 EOF
931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
932 { (eval echo configure:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
934 if test -z "$ac_err"; then
935   :
936 else
937   echo "$ac_err" >&5
938   echo "configure: failed program was:" >&5
939   cat conftest.$ac_ext >&5
940   rm -rf conftest*
941   CPP=/lib/cpp
942 fi
943 rm -f conftest*
944 fi
945 rm -f conftest*
946 fi
947 rm -f conftest*
948   ac_cv_prog_CPP="$CPP"
949 fi
950   CPP="$ac_cv_prog_CPP"
951 else
952   ac_cv_prog_CPP="$CPP"
953 fi
954 echo "$ac_t""$CPP" 1>&6
955
956 # If we find X, set shell vars x_includes and x_libraries to the
957 # paths, otherwise set no_x=yes.
958 # Uses ac_ vars as temps to allow command line to override cache and checks.
959 # --without-x overrides everything else, but does not touch the cache.
960 echo $ac_n "checking for X""... $ac_c" 1>&6
961 echo "configure:962: checking for X" >&5
962
963 # Check whether --with-x or --without-x was given.
964 if test "${with_x+set}" = set; then
965   withval="$with_x"
966   :
967 fi
968
969 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
970 if test "x$with_x" = xno; then
971   # The user explicitly disabled X.
972   have_x=disabled
973 else
974   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
975     # Both variables are already set.
976     have_x=yes
977   else
978 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
979   echo $ac_n "(cached) $ac_c" 1>&6
980 else
981   # One or both of the vars are not set, and there is no cached value.
982 ac_x_includes=NO ac_x_libraries=NO
983 rm -fr conftestdir
984 if mkdir conftestdir; then
985   cd conftestdir
986   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
987   cat > Imakefile <<'EOF'
988 acfindx:
989         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
990 EOF
991   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
992     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
993     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
994     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
995     for ac_extension in a so sl; do
996       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
997         test -f $ac_im_libdir/libX11.$ac_extension; then
998         ac_im_usrlibdir=$ac_im_libdir; break
999       fi
1000     done
1001     # Screen out bogus values from the imake configuration.  They are
1002     # bogus both because they are the default anyway, and because
1003     # using them would break gcc on systems where it needs fixed includes.
1004     case "$ac_im_incroot" in
1005         /usr/include) ;;
1006         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1007     esac
1008     case "$ac_im_usrlibdir" in
1009         /usr/lib | /lib) ;;
1010         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1011     esac
1012   fi
1013   cd ..
1014   rm -fr conftestdir
1015 fi
1016
1017 if test "$ac_x_includes" = NO; then
1018   # Guess where to find include files, by looking for this one X11 .h file.
1019   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1020
1021   # First, try using that file with no special directory specified.
1022 cat > conftest.$ac_ext <<EOF
1023 #line 1024 "configure"
1024 #include "confdefs.h"
1025 #include <$x_direct_test_include>
1026 EOF
1027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1028 { (eval echo configure:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1030 if test -z "$ac_err"; then
1031   rm -rf conftest*
1032   # We can compile using X headers with no special include directory.
1033 ac_x_includes=
1034 else
1035   echo "$ac_err" >&5
1036   echo "configure: failed program was:" >&5
1037   cat conftest.$ac_ext >&5
1038   rm -rf conftest*
1039   # Look for the header file in a standard set of common directories.
1040 # Check X11 before X11Rn because it is often a symlink to the current release.
1041   for ac_dir in               \
1042     /usr/X11/include          \
1043     /usr/X11R6/include        \
1044     /usr/X11R5/include        \
1045     /usr/X11R4/include        \
1046                               \
1047     /usr/include/X11          \
1048     /usr/include/X11R6        \
1049     /usr/include/X11R5        \
1050     /usr/include/X11R4        \
1051                               \
1052     /usr/local/X11/include    \
1053     /usr/local/X11R6/include  \
1054     /usr/local/X11R5/include  \
1055     /usr/local/X11R4/include  \
1056                               \
1057     /usr/local/include/X11    \
1058     /usr/local/include/X11R6  \
1059     /usr/local/include/X11R5  \
1060     /usr/local/include/X11R4  \
1061                               \
1062     /usr/X386/include         \
1063     /usr/x386/include         \
1064     /usr/XFree86/include/X11  \
1065                               \
1066     /usr/include              \
1067     /usr/local/include        \
1068     /usr/unsupported/include  \
1069     /usr/athena/include       \
1070     /usr/local/x11r5/include  \
1071     /usr/lpp/Xamples/include  \
1072                               \
1073     /usr/openwin/include      \
1074     /usr/openwin/share/include \
1075     ; \
1076   do
1077     if test -r "$ac_dir/$x_direct_test_include"; then
1078       ac_x_includes=$ac_dir
1079       break
1080     fi
1081   done
1082 fi
1083 rm -f conftest*
1084 fi # $ac_x_includes = NO
1085
1086 if test "$ac_x_libraries" = NO; then
1087   # Check for the libraries.
1088
1089   test -z "$x_direct_test_library" && x_direct_test_library=Xt
1090   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1091
1092   # See if we find them without any special options.
1093   # Don't add to $LIBS permanently.
1094   ac_save_LIBS="$LIBS"
1095   LIBS="-l$x_direct_test_library $LIBS"
1096 cat > conftest.$ac_ext <<EOF
1097 #line 1098 "configure"
1098 #include "confdefs.h"
1099
1100 int main() {
1101 ${x_direct_test_function}()
1102 ; return 0; }
1103 EOF
1104 if { (eval echo configure:1105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1105   rm -rf conftest*
1106   LIBS="$ac_save_LIBS"
1107 # We can link X programs with no special library path.
1108 ac_x_libraries=
1109 else
1110   echo "configure: failed program was:" >&5
1111   cat conftest.$ac_ext >&5
1112   rm -rf conftest*
1113   LIBS="$ac_save_LIBS"
1114 # First see if replacing the include by lib works.
1115 # Check X11 before X11Rn because it is often a symlink to the current release.
1116 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1117     /usr/X11/lib          \
1118     /usr/X11R6/lib        \
1119     /usr/X11R5/lib        \
1120     /usr/X11R4/lib        \
1121                           \
1122     /usr/lib/X11          \
1123     /usr/lib/X11R6        \
1124     /usr/lib/X11R5        \
1125     /usr/lib/X11R4        \
1126                           \
1127     /usr/local/X11/lib    \
1128     /usr/local/X11R6/lib  \
1129     /usr/local/X11R5/lib  \
1130     /usr/local/X11R4/lib  \
1131                           \
1132     /usr/local/lib/X11    \
1133     /usr/local/lib/X11R6  \
1134     /usr/local/lib/X11R5  \
1135     /usr/local/lib/X11R4  \
1136                           \
1137     /usr/X386/lib         \
1138     /usr/x386/lib         \
1139     /usr/XFree86/lib/X11  \
1140                           \
1141     /usr/lib              \
1142     /usr/local/lib        \
1143     /usr/unsupported/lib  \
1144     /usr/athena/lib       \
1145     /usr/local/x11r5/lib  \
1146     /usr/lpp/Xamples/lib  \
1147     /lib/usr/lib/X11      \
1148                           \
1149     /usr/openwin/lib      \
1150     /usr/openwin/share/lib \
1151     ; \
1152 do
1153   for ac_extension in a so sl; do
1154     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1155       ac_x_libraries=$ac_dir
1156       break 2
1157     fi
1158   done
1159 done
1160 fi
1161 rm -f conftest*
1162 fi # $ac_x_libraries = NO
1163
1164 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1165   # Didn't find X anywhere.  Cache the known absence of X.
1166   ac_cv_have_x="have_x=no"
1167 else
1168   # Record where we found X for the cache.
1169   ac_cv_have_x="have_x=yes \
1170                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1171 fi
1172 fi
1173   fi
1174   eval "$ac_cv_have_x"
1175 fi # $with_x != no
1176
1177 if test "$have_x" != yes; then
1178   echo "$ac_t""$have_x" 1>&6
1179   no_x=yes
1180 else
1181   # If each of the values was on the command line, it overrides each guess.
1182   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1183   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1184   # Update the cache value to reflect the command line values.
1185   ac_cv_have_x="have_x=yes \
1186                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1187   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1188 fi
1189
1190 if test "$no_x" = yes; then
1191   # Not all programs may use this symbol, but it does not hurt to define it.
1192   cat >> confdefs.h <<\EOF
1193 #define X_DISPLAY_MISSING 1
1194 EOF
1195
1196   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
1197 else
1198   if test -n "$x_includes"; then
1199     X_CFLAGS="$X_CFLAGS -I$x_includes"
1200   fi
1201
1202   # It would also be nice to do this for all -L options, not just this one.
1203   if test -n "$x_libraries"; then
1204     X_LIBS="$X_LIBS -L$x_libraries"
1205     # For Solaris; some versions of Sun CC require a space after -R and
1206     # others require no space.  Words are not sufficient . . . .
1207     case "`(uname -sr) 2>/dev/null`" in
1208     "SunOS 5"*)
1209       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
1210 echo "configure:1211: checking whether -R must be followed by a space" >&5
1211       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
1212       cat > conftest.$ac_ext <<EOF
1213 #line 1214 "configure"
1214 #include "confdefs.h"
1215
1216 int main() {
1217
1218 ; return 0; }
1219 EOF
1220 if { (eval echo configure:1221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1221   rm -rf conftest*
1222   ac_R_nospace=yes
1223 else
1224   echo "configure: failed program was:" >&5
1225   cat conftest.$ac_ext >&5
1226   rm -rf conftest*
1227   ac_R_nospace=no
1228 fi
1229 rm -f conftest*
1230       if test $ac_R_nospace = yes; then
1231         echo "$ac_t""no" 1>&6
1232         X_LIBS="$X_LIBS -R$x_libraries"
1233       else
1234         LIBS="$ac_xsave_LIBS -R $x_libraries"
1235         cat > conftest.$ac_ext <<EOF
1236 #line 1237 "configure"
1237 #include "confdefs.h"
1238
1239 int main() {
1240
1241 ; return 0; }
1242 EOF
1243 if { (eval echo configure:1244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1244   rm -rf conftest*
1245   ac_R_space=yes
1246 else
1247   echo "configure: failed program was:" >&5
1248   cat conftest.$ac_ext >&5
1249   rm -rf conftest*
1250   ac_R_space=no
1251 fi
1252 rm -f conftest*
1253         if test $ac_R_space = yes; then
1254           echo "$ac_t""yes" 1>&6
1255           X_LIBS="$X_LIBS -R $x_libraries"
1256         else
1257           echo "$ac_t""neither works" 1>&6
1258         fi
1259       fi
1260       LIBS="$ac_xsave_LIBS"
1261     esac
1262   fi
1263
1264   # Check for system-dependent libraries X programs must link with.
1265   # Do this before checking for the system-independent R6 libraries
1266   # (-lICE), since we may need -lsocket or whatever for X linking.
1267
1268   if test "$ISC" = yes; then
1269     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1270   else
1271     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1272     # libraries were built with DECnet support.  And karl@cs.umb.edu says
1273     # the Alpha needs dnet_stub (dnet does not exist).
1274     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
1275 echo "configure:1276: checking for dnet_ntoa in -ldnet" >&5
1276 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1277 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1278   echo $ac_n "(cached) $ac_c" 1>&6
1279 else
1280   ac_save_LIBS="$LIBS"
1281 LIBS="-ldnet  $LIBS"
1282 cat > conftest.$ac_ext <<EOF
1283 #line 1284 "configure"
1284 #include "confdefs.h"
1285 /* Override any gcc2 internal prototype to avoid an error.  */
1286 /* We use char because int might match the return type of a gcc2
1287     builtin and then its argument prototype would still apply.  */
1288 char dnet_ntoa();
1289
1290 int main() {
1291 dnet_ntoa()
1292 ; return 0; }
1293 EOF
1294 if { (eval echo configure:1295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1295   rm -rf conftest*
1296   eval "ac_cv_lib_$ac_lib_var=yes"
1297 else
1298   echo "configure: failed program was:" >&5
1299   cat conftest.$ac_ext >&5
1300   rm -rf conftest*
1301   eval "ac_cv_lib_$ac_lib_var=no"
1302 fi
1303 rm -f conftest*
1304 LIBS="$ac_save_LIBS"
1305
1306 fi
1307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1308   echo "$ac_t""yes" 1>&6
1309   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1310 else
1311   echo "$ac_t""no" 1>&6
1312 fi
1313
1314     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1315       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
1316 echo "configure:1317: checking for dnet_ntoa in -ldnet_stub" >&5
1317 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1318 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1319   echo $ac_n "(cached) $ac_c" 1>&6
1320 else
1321   ac_save_LIBS="$LIBS"
1322 LIBS="-ldnet_stub  $LIBS"
1323 cat > conftest.$ac_ext <<EOF
1324 #line 1325 "configure"
1325 #include "confdefs.h"
1326 /* Override any gcc2 internal prototype to avoid an error.  */
1327 /* We use char because int might match the return type of a gcc2
1328     builtin and then its argument prototype would still apply.  */
1329 char dnet_ntoa();
1330
1331 int main() {
1332 dnet_ntoa()
1333 ; return 0; }
1334 EOF
1335 if { (eval echo configure:1336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1336   rm -rf conftest*
1337   eval "ac_cv_lib_$ac_lib_var=yes"
1338 else
1339   echo "configure: failed program was:" >&5
1340   cat conftest.$ac_ext >&5
1341   rm -rf conftest*
1342   eval "ac_cv_lib_$ac_lib_var=no"
1343 fi
1344 rm -f conftest*
1345 LIBS="$ac_save_LIBS"
1346
1347 fi
1348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1349   echo "$ac_t""yes" 1>&6
1350   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1351 else
1352   echo "$ac_t""no" 1>&6
1353 fi
1354
1355     fi
1356
1357     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1358     # to get the SysV transport functions.
1359     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
1360     # needs -lnsl.
1361     # The nsl library prevents programs from opening the X display
1362     # on Irix 5.2, according to dickey@clark.net.
1363     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1364 echo "configure:1365: checking for gethostbyname" >&5
1365 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1366   echo $ac_n "(cached) $ac_c" 1>&6
1367 else
1368   cat > conftest.$ac_ext <<EOF
1369 #line 1370 "configure"
1370 #include "confdefs.h"
1371 /* System header to define __stub macros and hopefully few prototypes,
1372     which can conflict with char gethostbyname(); below.  */
1373 #include <assert.h>
1374 /* Override any gcc2 internal prototype to avoid an error.  */
1375 /* We use char because int might match the return type of a gcc2
1376     builtin and then its argument prototype would still apply.  */
1377 char gethostbyname();
1378
1379 int main() {
1380
1381 /* The GNU C library defines this for functions which it implements
1382     to always fail with ENOSYS.  Some functions are actually named
1383     something starting with __ and the normal name is an alias.  */
1384 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1385 choke me
1386 #else
1387 gethostbyname();
1388 #endif
1389
1390 ; return 0; }
1391 EOF
1392 if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1393   rm -rf conftest*
1394   eval "ac_cv_func_gethostbyname=yes"
1395 else
1396   echo "configure: failed program was:" >&5
1397   cat conftest.$ac_ext >&5
1398   rm -rf conftest*
1399   eval "ac_cv_func_gethostbyname=no"
1400 fi
1401 rm -f conftest*
1402 fi
1403
1404 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1405   echo "$ac_t""yes" 1>&6
1406   :
1407 else
1408   echo "$ac_t""no" 1>&6
1409 fi
1410
1411     if test $ac_cv_func_gethostbyname = no; then
1412       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1413 echo "configure:1414: checking for gethostbyname in -lnsl" >&5
1414 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1415 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1416   echo $ac_n "(cached) $ac_c" 1>&6
1417 else
1418   ac_save_LIBS="$LIBS"
1419 LIBS="-lnsl  $LIBS"
1420 cat > conftest.$ac_ext <<EOF
1421 #line 1422 "configure"
1422 #include "confdefs.h"
1423 /* Override any gcc2 internal prototype to avoid an error.  */
1424 /* We use char because int might match the return type of a gcc2
1425     builtin and then its argument prototype would still apply.  */
1426 char gethostbyname();
1427
1428 int main() {
1429 gethostbyname()
1430 ; return 0; }
1431 EOF
1432 if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1433   rm -rf conftest*
1434   eval "ac_cv_lib_$ac_lib_var=yes"
1435 else
1436   echo "configure: failed program was:" >&5
1437   cat conftest.$ac_ext >&5
1438   rm -rf conftest*
1439   eval "ac_cv_lib_$ac_lib_var=no"
1440 fi
1441 rm -f conftest*
1442 LIBS="$ac_save_LIBS"
1443
1444 fi
1445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1446   echo "$ac_t""yes" 1>&6
1447   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1448 else
1449   echo "$ac_t""no" 1>&6
1450 fi
1451
1452     fi
1453
1454     # lieder@skyler.mavd.honeywell.com says without -lsocket,
1455     # socket/setsockopt and other routines are undefined under SCO ODT
1456     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
1457     # on later versions), says simon@lia.di.epfl.ch: it contains
1458     # gethostby* variants that don't use the nameserver (or something).
1459     # -lsocket must be given before -lnsl if both are needed.
1460     # We assume that if connect needs -lnsl, so does gethostbyname.
1461     echo $ac_n "checking for connect""... $ac_c" 1>&6
1462 echo "configure:1463: checking for connect" >&5
1463 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1464   echo $ac_n "(cached) $ac_c" 1>&6
1465 else
1466   cat > conftest.$ac_ext <<EOF
1467 #line 1468 "configure"
1468 #include "confdefs.h"
1469 /* System header to define __stub macros and hopefully few prototypes,
1470     which can conflict with char connect(); below.  */
1471 #include <assert.h>
1472 /* Override any gcc2 internal prototype to avoid an error.  */
1473 /* We use char because int might match the return type of a gcc2
1474     builtin and then its argument prototype would still apply.  */
1475 char connect();
1476
1477 int main() {
1478
1479 /* The GNU C library defines this for functions which it implements
1480     to always fail with ENOSYS.  Some functions are actually named
1481     something starting with __ and the normal name is an alias.  */
1482 #if defined (__stub_connect) || defined (__stub___connect)
1483 choke me
1484 #else
1485 connect();
1486 #endif
1487
1488 ; return 0; }
1489 EOF
1490 if { (eval echo configure:1491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1491   rm -rf conftest*
1492   eval "ac_cv_func_connect=yes"
1493 else
1494   echo "configure: failed program was:" >&5
1495   cat conftest.$ac_ext >&5
1496   rm -rf conftest*
1497   eval "ac_cv_func_connect=no"
1498 fi
1499 rm -f conftest*
1500 fi
1501
1502 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1503   echo "$ac_t""yes" 1>&6
1504   :
1505 else
1506   echo "$ac_t""no" 1>&6
1507 fi
1508
1509     if test $ac_cv_func_connect = no; then
1510       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1511 echo "configure:1512: checking for connect in -lsocket" >&5
1512 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
1513 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1514   echo $ac_n "(cached) $ac_c" 1>&6
1515 else
1516   ac_save_LIBS="$LIBS"
1517 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
1518 cat > conftest.$ac_ext <<EOF
1519 #line 1520 "configure"
1520 #include "confdefs.h"
1521 /* Override any gcc2 internal prototype to avoid an error.  */
1522 /* We use char because int might match the return type of a gcc2
1523     builtin and then its argument prototype would still apply.  */
1524 char connect();
1525
1526 int main() {
1527 connect()
1528 ; return 0; }
1529 EOF
1530 if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1531   rm -rf conftest*
1532   eval "ac_cv_lib_$ac_lib_var=yes"
1533 else
1534   echo "configure: failed program was:" >&5
1535   cat conftest.$ac_ext >&5
1536   rm -rf conftest*
1537   eval "ac_cv_lib_$ac_lib_var=no"
1538 fi
1539 rm -f conftest*
1540 LIBS="$ac_save_LIBS"
1541
1542 fi
1543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1544   echo "$ac_t""yes" 1>&6
1545   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
1546 else
1547   echo "$ac_t""no" 1>&6
1548 fi
1549
1550     fi
1551
1552     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
1553     echo $ac_n "checking for remove""... $ac_c" 1>&6
1554 echo "configure:1555: checking for remove" >&5
1555 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
1556   echo $ac_n "(cached) $ac_c" 1>&6
1557 else
1558   cat > conftest.$ac_ext <<EOF
1559 #line 1560 "configure"
1560 #include "confdefs.h"
1561 /* System header to define __stub macros and hopefully few prototypes,
1562     which can conflict with char remove(); below.  */
1563 #include <assert.h>
1564 /* Override any gcc2 internal prototype to avoid an error.  */
1565 /* We use char because int might match the return type of a gcc2
1566     builtin and then its argument prototype would still apply.  */
1567 char remove();
1568
1569 int main() {
1570
1571 /* The GNU C library defines this for functions which it implements
1572     to always fail with ENOSYS.  Some functions are actually named
1573     something starting with __ and the normal name is an alias.  */
1574 #if defined (__stub_remove) || defined (__stub___remove)
1575 choke me
1576 #else
1577 remove();
1578 #endif
1579
1580 ; return 0; }
1581 EOF
1582 if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1583   rm -rf conftest*
1584   eval "ac_cv_func_remove=yes"
1585 else
1586   echo "configure: failed program was:" >&5
1587   cat conftest.$ac_ext >&5
1588   rm -rf conftest*
1589   eval "ac_cv_func_remove=no"
1590 fi
1591 rm -f conftest*
1592 fi
1593
1594 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
1595   echo "$ac_t""yes" 1>&6
1596   :
1597 else
1598   echo "$ac_t""no" 1>&6
1599 fi
1600
1601     if test $ac_cv_func_remove = no; then
1602       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
1603 echo "configure:1604: checking for remove in -lposix" >&5
1604 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
1605 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1606   echo $ac_n "(cached) $ac_c" 1>&6
1607 else
1608   ac_save_LIBS="$LIBS"
1609 LIBS="-lposix  $LIBS"
1610 cat > conftest.$ac_ext <<EOF
1611 #line 1612 "configure"
1612 #include "confdefs.h"
1613 /* Override any gcc2 internal prototype to avoid an error.  */
1614 /* We use char because int might match the return type of a gcc2
1615     builtin and then its argument prototype would still apply.  */
1616 char remove();
1617
1618 int main() {
1619 remove()
1620 ; return 0; }
1621 EOF
1622 if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1623   rm -rf conftest*
1624   eval "ac_cv_lib_$ac_lib_var=yes"
1625 else
1626   echo "configure: failed program was:" >&5
1627   cat conftest.$ac_ext >&5
1628   rm -rf conftest*
1629   eval "ac_cv_lib_$ac_lib_var=no"
1630 fi
1631 rm -f conftest*
1632 LIBS="$ac_save_LIBS"
1633
1634 fi
1635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1636   echo "$ac_t""yes" 1>&6
1637   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
1638 else
1639   echo "$ac_t""no" 1>&6
1640 fi
1641
1642     fi
1643
1644     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
1645     echo $ac_n "checking for shmat""... $ac_c" 1>&6
1646 echo "configure:1647: checking for shmat" >&5
1647 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
1648   echo $ac_n "(cached) $ac_c" 1>&6
1649 else
1650   cat > conftest.$ac_ext <<EOF
1651 #line 1652 "configure"
1652 #include "confdefs.h"
1653 /* System header to define __stub macros and hopefully few prototypes,
1654     which can conflict with char shmat(); below.  */
1655 #include <assert.h>
1656 /* Override any gcc2 internal prototype to avoid an error.  */
1657 /* We use char because int might match the return type of a gcc2
1658     builtin and then its argument prototype would still apply.  */
1659 char shmat();
1660
1661 int main() {
1662
1663 /* The GNU C library defines this for functions which it implements
1664     to always fail with ENOSYS.  Some functions are actually named
1665     something starting with __ and the normal name is an alias.  */
1666 #if defined (__stub_shmat) || defined (__stub___shmat)
1667 choke me
1668 #else
1669 shmat();
1670 #endif
1671
1672 ; return 0; }
1673 EOF
1674 if { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1675   rm -rf conftest*
1676   eval "ac_cv_func_shmat=yes"
1677 else
1678   echo "configure: failed program was:" >&5
1679   cat conftest.$ac_ext >&5
1680   rm -rf conftest*
1681   eval "ac_cv_func_shmat=no"
1682 fi
1683 rm -f conftest*
1684 fi
1685
1686 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
1687   echo "$ac_t""yes" 1>&6
1688   :
1689 else
1690   echo "$ac_t""no" 1>&6
1691 fi
1692
1693     if test $ac_cv_func_shmat = no; then
1694       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
1695 echo "configure:1696: checking for shmat in -lipc" >&5
1696 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
1697 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1698   echo $ac_n "(cached) $ac_c" 1>&6
1699 else
1700   ac_save_LIBS="$LIBS"
1701 LIBS="-lipc  $LIBS"
1702 cat > conftest.$ac_ext <<EOF
1703 #line 1704 "configure"
1704 #include "confdefs.h"
1705 /* Override any gcc2 internal prototype to avoid an error.  */
1706 /* We use char because int might match the return type of a gcc2
1707     builtin and then its argument prototype would still apply.  */
1708 char shmat();
1709
1710 int main() {
1711 shmat()
1712 ; return 0; }
1713 EOF
1714 if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1715   rm -rf conftest*
1716   eval "ac_cv_lib_$ac_lib_var=yes"
1717 else
1718   echo "configure: failed program was:" >&5
1719   cat conftest.$ac_ext >&5
1720   rm -rf conftest*
1721   eval "ac_cv_lib_$ac_lib_var=no"
1722 fi
1723 rm -f conftest*
1724 LIBS="$ac_save_LIBS"
1725
1726 fi
1727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1728   echo "$ac_t""yes" 1>&6
1729   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
1730 else
1731   echo "$ac_t""no" 1>&6
1732 fi
1733
1734     fi
1735   fi
1736
1737   # Check for libraries that X11R6 Xt/Xaw programs need.
1738   ac_save_LDFLAGS="$LDFLAGS"
1739   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
1740   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1741   # check for ICE first), but we must link in the order -lSM -lICE or
1742   # we get undefined symbols.  So assume we have SM if we have ICE.
1743   # These have to be linked with before -lX11, unlike the other
1744   # libraries we check for below, so use a different variable.
1745   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1746   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
1747 echo "configure:1748: checking for IceConnectionNumber in -lICE" >&5
1748 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
1749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1750   echo $ac_n "(cached) $ac_c" 1>&6
1751 else
1752   ac_save_LIBS="$LIBS"
1753 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
1754 cat > conftest.$ac_ext <<EOF
1755 #line 1756 "configure"
1756 #include "confdefs.h"
1757 /* Override any gcc2 internal prototype to avoid an error.  */
1758 /* We use char because int might match the return type of a gcc2
1759     builtin and then its argument prototype would still apply.  */
1760 char IceConnectionNumber();
1761
1762 int main() {
1763 IceConnectionNumber()
1764 ; return 0; }
1765 EOF
1766 if { (eval echo configure:1767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1767   rm -rf conftest*
1768   eval "ac_cv_lib_$ac_lib_var=yes"
1769 else
1770   echo "configure: failed program was:" >&5
1771   cat conftest.$ac_ext >&5
1772   rm -rf conftest*
1773   eval "ac_cv_lib_$ac_lib_var=no"
1774 fi
1775 rm -f conftest*
1776 LIBS="$ac_save_LIBS"
1777
1778 fi
1779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1780   echo "$ac_t""yes" 1>&6
1781   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1782 else
1783   echo "$ac_t""no" 1>&6
1784 fi
1785
1786   LDFLAGS="$ac_save_LDFLAGS"
1787
1788 fi
1789
1790 for ac_prog in 'bison -y' byacc
1791 do
1792 # Extract the first word of "$ac_prog", so it can be a program name with args.
1793 set dummy $ac_prog; ac_word=$2
1794 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1795 echo "configure:1796: checking for $ac_word" >&5
1796 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1797   echo $ac_n "(cached) $ac_c" 1>&6
1798 else
1799   if test -n "$YACC"; then
1800   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1801 else
1802   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1803   ac_dummy="$PATH"
1804   for ac_dir in $ac_dummy; do
1805     test -z "$ac_dir" && ac_dir=.
1806     if test -f $ac_dir/$ac_word; then
1807       ac_cv_prog_YACC="$ac_prog"
1808       break
1809     fi
1810   done
1811   IFS="$ac_save_ifs"
1812 fi
1813 fi
1814 YACC="$ac_cv_prog_YACC"
1815 if test -n "$YACC"; then
1816   echo "$ac_t""$YACC" 1>&6
1817 else
1818   echo "$ac_t""no" 1>&6
1819 fi
1820
1821 test -n "$YACC" && break
1822 done
1823 test -n "$YACC" || YACC="yacc"
1824
1825 # Extract the first word of "flex", so it can be a program name with args.
1826 set dummy flex; ac_word=$2
1827 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1828 echo "configure:1829: checking for $ac_word" >&5
1829 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1830   echo $ac_n "(cached) $ac_c" 1>&6
1831 else
1832   if test -n "$LEX"; then
1833   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1834 else
1835   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1836   ac_dummy="$PATH"
1837   for ac_dir in $ac_dummy; do
1838     test -z "$ac_dir" && ac_dir=.
1839     if test -f $ac_dir/$ac_word; then
1840       ac_cv_prog_LEX="flex"
1841       break
1842     fi
1843   done
1844   IFS="$ac_save_ifs"
1845   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1846 fi
1847 fi
1848 LEX="$ac_cv_prog_LEX"
1849 if test -n "$LEX"; then
1850   echo "$ac_t""$LEX" 1>&6
1851 else
1852   echo "$ac_t""no" 1>&6
1853 fi
1854
1855 if test -z "$LEXLIB"
1856 then
1857   case "$LEX" in
1858   flex*) ac_lib=fl ;;
1859   *) ac_lib=l ;;
1860   esac
1861   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1862 echo "configure:1863: checking for yywrap in -l$ac_lib" >&5
1863 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1864 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1865   echo $ac_n "(cached) $ac_c" 1>&6
1866 else
1867   ac_save_LIBS="$LIBS"
1868 LIBS="-l$ac_lib  $LIBS"
1869 cat > conftest.$ac_ext <<EOF
1870 #line 1871 "configure"
1871 #include "confdefs.h"
1872 /* Override any gcc2 internal prototype to avoid an error.  */
1873 /* We use char because int might match the return type of a gcc2
1874     builtin and then its argument prototype would still apply.  */
1875 char yywrap();
1876
1877 int main() {
1878 yywrap()
1879 ; return 0; }
1880 EOF
1881 if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1882   rm -rf conftest*
1883   eval "ac_cv_lib_$ac_lib_var=yes"
1884 else
1885   echo "configure: failed program was:" >&5
1886   cat conftest.$ac_ext >&5
1887   rm -rf conftest*
1888   eval "ac_cv_lib_$ac_lib_var=no"
1889 fi
1890 rm -f conftest*
1891 LIBS="$ac_save_LIBS"
1892
1893 fi
1894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1895   echo "$ac_t""yes" 1>&6
1896   LEXLIB="-l$ac_lib"
1897 else
1898   echo "$ac_t""no" 1>&6
1899 fi
1900
1901 fi
1902
1903 # Extract the first word of "ranlib", so it can be a program name with args.
1904 set dummy ranlib; ac_word=$2
1905 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1906 echo "configure:1907: checking for $ac_word" >&5
1907 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1908   echo $ac_n "(cached) $ac_c" 1>&6
1909 else
1910   if test -n "$RANLIB"; then
1911   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1912 else
1913   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1914   ac_dummy="$PATH"
1915   for ac_dir in $ac_dummy; do
1916     test -z "$ac_dir" && ac_dir=.
1917     if test -f $ac_dir/$ac_word; then
1918       ac_cv_prog_RANLIB="ranlib"
1919       break
1920     fi
1921   done
1922   IFS="$ac_save_ifs"
1923   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1924 fi
1925 fi
1926 RANLIB="$ac_cv_prog_RANLIB"
1927 if test -n "$RANLIB"; then
1928   echo "$ac_t""$RANLIB" 1>&6
1929 else
1930   echo "$ac_t""no" 1>&6
1931 fi
1932
1933 # Find a good install program.  We prefer a C program (faster),
1934 # so one script is as good as another.  But avoid the broken or
1935 # incompatible versions:
1936 # SysV /etc/install, /usr/sbin/install
1937 # SunOS /usr/etc/install
1938 # IRIX /sbin/install
1939 # AIX /bin/install
1940 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1941 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1942 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1943 # ./install, which can be erroneously created by make from ./install.sh.
1944 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1945 echo "configure:1946: checking for a BSD compatible install" >&5
1946 if test -z "$INSTALL"; then
1947 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1948   echo $ac_n "(cached) $ac_c" 1>&6
1949 else
1950     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1951   for ac_dir in $PATH; do
1952     # Account for people who put trailing slashes in PATH elements.
1953     case "$ac_dir/" in
1954     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1955     *)
1956       # OSF1 and SCO ODT 3.0 have their own names for install.
1957       # Don't use installbsd from OSF since it installs stuff as root
1958       # by default.
1959       for ac_prog in ginstall scoinst install; do
1960         if test -f $ac_dir/$ac_prog; then
1961           if test $ac_prog = install &&
1962             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1963             # AIX install.  It has an incompatible calling convention.
1964             :
1965           else
1966             ac_cv_path_install="$ac_dir/$ac_prog -c"
1967             break 2
1968           fi
1969         fi
1970       done
1971       ;;
1972     esac
1973   done
1974   IFS="$ac_save_IFS"
1975
1976 fi
1977   if test "${ac_cv_path_install+set}" = set; then
1978     INSTALL="$ac_cv_path_install"
1979   else
1980     # As a last resort, use the slow shell script.  We don't cache a
1981     # path for INSTALL within a source directory, because that will
1982     # break other packages using the cache if that directory is
1983     # removed, or if the path is relative.
1984     INSTALL="$ac_install_sh"
1985   fi
1986 fi
1987 echo "$ac_t""$INSTALL" 1>&6
1988
1989 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1990 # It thinks the first close brace ends the variable substitution.
1991 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1992
1993 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1994
1995 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1996
1997 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1998 echo "configure:1999: checking whether ln -s works" >&5
1999 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2000   echo $ac_n "(cached) $ac_c" 1>&6
2001 else
2002   rm -f conftestdata
2003 if ln -s X conftestdata 2>/dev/null
2004 then
2005   rm -f conftestdata
2006   ac_cv_prog_LN_S="ln -s"
2007 else
2008   ac_cv_prog_LN_S=ln
2009 fi
2010 fi
2011 LN_S="$ac_cv_prog_LN_S"
2012 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2013   echo "$ac_t""yes" 1>&6
2014 else
2015   echo "$ac_t""no" 1>&6
2016 fi
2017
2018 # Extract the first word of "c2man", so it can be a program name with args.
2019 set dummy c2man; ac_word=$2
2020 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2021 echo "configure:2022: checking for $ac_word" >&5
2022 if eval "test \"`echo '$''{'ac_cv_prog_C2MAN'+set}'`\" = set"; then
2023   echo $ac_n "(cached) $ac_c" 1>&6
2024 else
2025   if test -n "$C2MAN"; then
2026   ac_cv_prog_C2MAN="$C2MAN" # Let the user override the test.
2027 else
2028   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2029   ac_dummy="$PATH"
2030   for ac_dir in $ac_dummy; do
2031     test -z "$ac_dir" && ac_dir=.
2032     if test -f $ac_dir/$ac_word; then
2033       ac_cv_prog_C2MAN="c2man"
2034       break
2035     fi
2036   done
2037   IFS="$ac_save_ifs"
2038   test -z "$ac_cv_prog_C2MAN" && ac_cv_prog_C2MAN="true"
2039 fi
2040 fi
2041 C2MAN="$ac_cv_prog_C2MAN"
2042 if test -n "$C2MAN"; then
2043   echo "$ac_t""$C2MAN" 1>&6
2044 else
2045   echo "$ac_t""no" 1>&6
2046 fi
2047
2048 # Extract the first word of "ldconfig", so it can be a program name with args.
2049 set dummy ldconfig; ac_word=$2
2050 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2051 echo "configure:2052: checking for $ac_word" >&5
2052 if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then
2053   echo $ac_n "(cached) $ac_c" 1>&6
2054 else
2055   case "$LDCONFIG" in
2056   /*)
2057   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2058   ;;
2059   ?:/*)                  
2060   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a dos path.
2061   ;;
2062   *)
2063   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2064   ac_dummy="/sbin:/usr/sbin:$PATH"
2065   for ac_dir in $ac_dummy; do 
2066     test -z "$ac_dir" && ac_dir=.
2067     if test -f $ac_dir/$ac_word; then
2068       ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2069       break
2070     fi
2071   done
2072   IFS="$ac_save_ifs"
2073   test -z "$ac_cv_path_LDCONFIG" && ac_cv_path_LDCONFIG="true"
2074   ;;
2075 esac
2076 fi
2077 LDCONFIG="$ac_cv_path_LDCONFIG"
2078 if test -n "$LDCONFIG"; then
2079   echo "$ac_t""$LDCONFIG" 1>&6
2080 else
2081   echo "$ac_t""no" 1>&6
2082 fi
2083
2084
2085 for ac_prog in lclint lint
2086 do
2087 # Extract the first word of "$ac_prog", so it can be a program name with args.
2088 set dummy $ac_prog; ac_word=$2
2089 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2090 echo "configure:2091: checking for $ac_word" >&5
2091 if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
2092   echo $ac_n "(cached) $ac_c" 1>&6
2093 else
2094   if test -n "$LINT"; then
2095   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2096 else
2097   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2098   ac_dummy="$PATH"
2099   for ac_dir in $ac_dummy; do
2100     test -z "$ac_dir" && ac_dir=.
2101     if test -f $ac_dir/$ac_word; then
2102       ac_cv_prog_LINT="$ac_prog"
2103       break
2104     fi
2105   done
2106   IFS="$ac_save_ifs"
2107 fi
2108 fi
2109 LINT="$ac_cv_prog_LINT"
2110 if test -n "$LINT"; then
2111   echo "$ac_t""$LINT" 1>&6
2112 else
2113   echo "$ac_t""no" 1>&6
2114 fi
2115
2116 test -n "$LINT" && break
2117 done
2118
2119 if test "$LINT" = "lint"
2120 then
2121   LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
2122   fi
2123
2124
2125
2126
2127 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
2128 echo "configure:2129: checking for sqrt in -lm" >&5
2129 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
2130 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2131   echo $ac_n "(cached) $ac_c" 1>&6
2132 else
2133   ac_save_LIBS="$LIBS"
2134 LIBS="-lm  $LIBS"
2135 cat > conftest.$ac_ext <<EOF
2136 #line 2137 "configure"
2137 #include "confdefs.h"
2138 /* Override any gcc2 internal prototype to avoid an error.  */
2139 /* We use char because int might match the return type of a gcc2
2140     builtin and then its argument prototype would still apply.  */
2141 char sqrt();
2142
2143 int main() {
2144 sqrt()
2145 ; return 0; }
2146 EOF
2147 if { (eval echo configure:2148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2148   rm -rf conftest*
2149   eval "ac_cv_lib_$ac_lib_var=yes"
2150 else
2151   echo "configure: failed program was:" >&5
2152   cat conftest.$ac_ext >&5
2153   rm -rf conftest*
2154   eval "ac_cv_lib_$ac_lib_var=no"
2155 fi
2156 rm -f conftest*
2157 LIBS="$ac_save_LIBS"
2158
2159 fi
2160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2161   echo "$ac_t""yes" 1>&6
2162     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2163     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2164   cat >> confdefs.h <<EOF
2165 #define $ac_tr_lib 1
2166 EOF
2167
2168   LIBS="-lm $LIBS"
2169
2170 else
2171   echo "$ac_t""no" 1>&6
2172 fi
2173
2174 echo $ac_n "checking for i386_set_ldt in -li386""... $ac_c" 1>&6
2175 echo "configure:2176: checking for i386_set_ldt in -li386" >&5
2176 ac_lib_var=`echo i386'_'i386_set_ldt | sed 'y%./+-%__p_%'`
2177 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2178   echo $ac_n "(cached) $ac_c" 1>&6
2179 else
2180   ac_save_LIBS="$LIBS"
2181 LIBS="-li386  $LIBS"
2182 cat > conftest.$ac_ext <<EOF
2183 #line 2184 "configure"
2184 #include "confdefs.h"
2185 /* Override any gcc2 internal prototype to avoid an error.  */
2186 /* We use char because int might match the return type of a gcc2
2187     builtin and then its argument prototype would still apply.  */
2188 char i386_set_ldt();
2189
2190 int main() {
2191 i386_set_ldt()
2192 ; return 0; }
2193 EOF
2194 if { (eval echo configure:2195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2195   rm -rf conftest*
2196   eval "ac_cv_lib_$ac_lib_var=yes"
2197 else
2198   echo "configure: failed program was:" >&5
2199   cat conftest.$ac_ext >&5
2200   rm -rf conftest*
2201   eval "ac_cv_lib_$ac_lib_var=no"
2202 fi
2203 rm -f conftest*
2204 LIBS="$ac_save_LIBS"
2205
2206 fi
2207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2208   echo "$ac_t""yes" 1>&6
2209     ac_tr_lib=HAVE_LIB`echo i386 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2210     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2211   cat >> confdefs.h <<EOF
2212 #define $ac_tr_lib 1
2213 EOF
2214
2215   LIBS="-li386 $LIBS"
2216
2217 else
2218   echo "$ac_t""no" 1>&6
2219 fi
2220
2221 echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
2222 echo "configure:2223: checking for _oss_ioctl in -lossaudio" >&5
2223 ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
2224 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2225   echo $ac_n "(cached) $ac_c" 1>&6
2226 else
2227   ac_save_LIBS="$LIBS"
2228 LIBS="-lossaudio  $LIBS"
2229 cat > conftest.$ac_ext <<EOF
2230 #line 2231 "configure"
2231 #include "confdefs.h"
2232 /* Override any gcc2 internal prototype to avoid an error.  */
2233 /* We use char because int might match the return type of a gcc2
2234     builtin and then its argument prototype would still apply.  */
2235 char _oss_ioctl();
2236
2237 int main() {
2238 _oss_ioctl()
2239 ; return 0; }
2240 EOF
2241 if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2242   rm -rf conftest*
2243   eval "ac_cv_lib_$ac_lib_var=yes"
2244 else
2245   echo "configure: failed program was:" >&5
2246   cat conftest.$ac_ext >&5
2247   rm -rf conftest*
2248   eval "ac_cv_lib_$ac_lib_var=no"
2249 fi
2250 rm -f conftest*
2251 LIBS="$ac_save_LIBS"
2252
2253 fi
2254 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2255   echo "$ac_t""yes" 1>&6
2256     ac_tr_lib=HAVE_LIB`echo ossaudio | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2257     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2258   cat >> confdefs.h <<EOF
2259 #define $ac_tr_lib 1
2260 EOF
2261
2262   LIBS="-lossaudio $LIBS"
2263
2264 else
2265   echo "$ac_t""no" 1>&6
2266 fi
2267
2268 echo $ac_n "checking for iswalnum in -lw""... $ac_c" 1>&6
2269 echo "configure:2270: checking for iswalnum in -lw" >&5
2270 ac_lib_var=`echo w'_'iswalnum | sed 'y%./+-%__p_%'`
2271 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2272   echo $ac_n "(cached) $ac_c" 1>&6
2273 else
2274   ac_save_LIBS="$LIBS"
2275 LIBS="-lw  $LIBS"
2276 cat > conftest.$ac_ext <<EOF
2277 #line 2278 "configure"
2278 #include "confdefs.h"
2279 /* Override any gcc2 internal prototype to avoid an error.  */
2280 /* We use char because int might match the return type of a gcc2
2281     builtin and then its argument prototype would still apply.  */
2282 char iswalnum();
2283
2284 int main() {
2285 iswalnum()
2286 ; return 0; }
2287 EOF
2288 if { (eval echo configure:2289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2289   rm -rf conftest*
2290   eval "ac_cv_lib_$ac_lib_var=yes"
2291 else
2292   echo "configure: failed program was:" >&5
2293   cat conftest.$ac_ext >&5
2294   rm -rf conftest*
2295   eval "ac_cv_lib_$ac_lib_var=no"
2296 fi
2297 rm -f conftest*
2298 LIBS="$ac_save_LIBS"
2299
2300 fi
2301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2302   echo "$ac_t""yes" 1>&6
2303     ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2304     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2305   cat >> confdefs.h <<EOF
2306 #define $ac_tr_lib 1
2307 EOF
2308
2309   LIBS="-lw $LIBS"
2310
2311 else
2312   echo "$ac_t""no" 1>&6
2313 fi
2314
2315 for ac_func in gethostbyname
2316 do
2317 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2318 echo "configure:2319: checking for $ac_func" >&5
2319 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2320   echo $ac_n "(cached) $ac_c" 1>&6
2321 else
2322   cat > conftest.$ac_ext <<EOF
2323 #line 2324 "configure"
2324 #include "confdefs.h"
2325 /* System header to define __stub macros and hopefully few prototypes,
2326     which can conflict with char $ac_func(); below.  */
2327 #include <assert.h>
2328 /* Override any gcc2 internal prototype to avoid an error.  */
2329 /* We use char because int might match the return type of a gcc2
2330     builtin and then its argument prototype would still apply.  */
2331 char $ac_func();
2332
2333 int main() {
2334
2335 /* The GNU C library defines this for functions which it implements
2336     to always fail with ENOSYS.  Some functions are actually named
2337     something starting with __ and the normal name is an alias.  */
2338 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2339 choke me
2340 #else
2341 $ac_func();
2342 #endif
2343
2344 ; return 0; }
2345 EOF
2346 if { (eval echo configure:2347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2347   rm -rf conftest*
2348   eval "ac_cv_func_$ac_func=yes"
2349 else
2350   echo "configure: failed program was:" >&5
2351   cat conftest.$ac_ext >&5
2352   rm -rf conftest*
2353   eval "ac_cv_func_$ac_func=no"
2354 fi
2355 rm -f conftest*
2356 fi
2357
2358 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2359   echo "$ac_t""yes" 1>&6
2360     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2361   cat >> confdefs.h <<EOF
2362 #define $ac_tr_func 1
2363 EOF
2364  
2365 else
2366   echo "$ac_t""no" 1>&6
2367 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2368 echo "configure:2369: checking for gethostbyname in -lnsl" >&5
2369 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2371   echo $ac_n "(cached) $ac_c" 1>&6
2372 else
2373   ac_save_LIBS="$LIBS"
2374 LIBS="-lnsl -lsocket $LIBS"
2375 cat > conftest.$ac_ext <<EOF
2376 #line 2377 "configure"
2377 #include "confdefs.h"
2378 /* Override any gcc2 internal prototype to avoid an error.  */
2379 /* We use char because int might match the return type of a gcc2
2380     builtin and then its argument prototype would still apply.  */
2381 char gethostbyname();
2382
2383 int main() {
2384 gethostbyname()
2385 ; return 0; }
2386 EOF
2387 if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2388   rm -rf conftest*
2389   eval "ac_cv_lib_$ac_lib_var=yes"
2390 else
2391   echo "configure: failed program was:" >&5
2392   cat conftest.$ac_ext >&5
2393   rm -rf conftest*
2394   eval "ac_cv_lib_$ac_lib_var=no"
2395 fi
2396 rm -f conftest*
2397 LIBS="$ac_save_LIBS"
2398
2399 fi
2400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2401   echo "$ac_t""yes" 1>&6
2402   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2403 else
2404   echo "$ac_t""no" 1>&6
2405 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
2406 echo "configure:2407: checking for gethostbyname in -lsocket" >&5
2407 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
2408 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2409   echo $ac_n "(cached) $ac_c" 1>&6
2410 else
2411   ac_save_LIBS="$LIBS"
2412 LIBS="-lsocket -lnsl $LIBS"
2413 cat > conftest.$ac_ext <<EOF
2414 #line 2415 "configure"
2415 #include "confdefs.h"
2416 /* Override any gcc2 internal prototype to avoid an error.  */
2417 /* We use char because int might match the return type of a gcc2
2418     builtin and then its argument prototype would still apply.  */
2419 char gethostbyname();
2420
2421 int main() {
2422 gethostbyname()
2423 ; return 0; }
2424 EOF
2425 if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2426   rm -rf conftest*
2427   eval "ac_cv_lib_$ac_lib_var=yes"
2428 else
2429   echo "configure: failed program was:" >&5
2430   cat conftest.$ac_ext >&5
2431   rm -rf conftest*
2432   eval "ac_cv_lib_$ac_lib_var=no"
2433 fi
2434 rm -f conftest*
2435 LIBS="$ac_save_LIBS"
2436
2437 fi
2438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2439   echo "$ac_t""yes" 1>&6
2440   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2441 else
2442   echo "$ac_t""no" 1>&6
2443 fi
2444
2445 fi
2446
2447 fi
2448 done
2449
2450 for ac_func in connect
2451 do
2452 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2453 echo "configure:2454: checking for $ac_func" >&5
2454 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2455   echo $ac_n "(cached) $ac_c" 1>&6
2456 else
2457   cat > conftest.$ac_ext <<EOF
2458 #line 2459 "configure"
2459 #include "confdefs.h"
2460 /* System header to define __stub macros and hopefully few prototypes,
2461     which can conflict with char $ac_func(); below.  */
2462 #include <assert.h>
2463 /* Override any gcc2 internal prototype to avoid an error.  */
2464 /* We use char because int might match the return type of a gcc2
2465     builtin and then its argument prototype would still apply.  */
2466 char $ac_func();
2467
2468 int main() {
2469
2470 /* The GNU C library defines this for functions which it implements
2471     to always fail with ENOSYS.  Some functions are actually named
2472     something starting with __ and the normal name is an alias.  */
2473 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2474 choke me
2475 #else
2476 $ac_func();
2477 #endif
2478
2479 ; return 0; }
2480 EOF
2481 if { (eval echo configure:2482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2482   rm -rf conftest*
2483   eval "ac_cv_func_$ac_func=yes"
2484 else
2485   echo "configure: failed program was:" >&5
2486   cat conftest.$ac_ext >&5
2487   rm -rf conftest*
2488   eval "ac_cv_func_$ac_func=no"
2489 fi
2490 rm -f conftest*
2491 fi
2492
2493 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2494   echo "$ac_t""yes" 1>&6
2495     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2496   cat >> confdefs.h <<EOF
2497 #define $ac_tr_func 1
2498 EOF
2499  
2500 else
2501   echo "$ac_t""no" 1>&6
2502 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2503 echo "configure:2504: checking for connect in -lsocket" >&5
2504 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2505 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2506   echo $ac_n "(cached) $ac_c" 1>&6
2507 else
2508   ac_save_LIBS="$LIBS"
2509 LIBS="-lsocket  $LIBS"
2510 cat > conftest.$ac_ext <<EOF
2511 #line 2512 "configure"
2512 #include "confdefs.h"
2513 /* Override any gcc2 internal prototype to avoid an error.  */
2514 /* We use char because int might match the return type of a gcc2
2515     builtin and then its argument prototype would still apply.  */
2516 char connect();
2517
2518 int main() {
2519 connect()
2520 ; return 0; }
2521 EOF
2522 if { (eval echo configure:2523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2523   rm -rf conftest*
2524   eval "ac_cv_lib_$ac_lib_var=yes"
2525 else
2526   echo "configure: failed program was:" >&5
2527   cat conftest.$ac_ext >&5
2528   rm -rf conftest*
2529   eval "ac_cv_lib_$ac_lib_var=no"
2530 fi
2531 rm -f conftest*
2532 LIBS="$ac_save_LIBS"
2533
2534 fi
2535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2536   echo "$ac_t""yes" 1>&6
2537     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
2538     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2539   cat >> confdefs.h <<EOF
2540 #define $ac_tr_lib 1
2541 EOF
2542
2543   LIBS="-lsocket $LIBS"
2544
2545 else
2546   echo "$ac_t""no" 1>&6
2547 fi
2548
2549 fi
2550 done
2551
2552 echo $ac_n "checking for setrunelocale in -lxpg4""... $ac_c" 1>&6
2553 echo "configure:2554: checking for setrunelocale in -lxpg4" >&5
2554 ac_lib_var=`echo xpg4'_'setrunelocale | sed 'y%./+-%__p_%'`
2555 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2556   echo $ac_n "(cached) $ac_c" 1>&6
2557 else
2558   ac_save_LIBS="$LIBS"
2559 LIBS="-lxpg4  $LIBS"
2560 cat > conftest.$ac_ext <<EOF
2561 #line 2562 "configure"
2562 #include "confdefs.h"
2563 /* Override any gcc2 internal prototype to avoid an error.  */
2564 /* We use char because int might match the return type of a gcc2
2565     builtin and then its argument prototype would still apply.  */
2566 char setrunelocale();
2567
2568 int main() {
2569 setrunelocale()
2570 ; return 0; }
2571 EOF
2572 if { (eval echo configure:2573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2573   rm -rf conftest*
2574   eval "ac_cv_lib_$ac_lib_var=yes"
2575 else
2576   echo "configure: failed program was:" >&5
2577   cat conftest.$ac_ext >&5
2578   rm -rf conftest*
2579   eval "ac_cv_lib_$ac_lib_var=no"
2580 fi
2581 rm -f conftest*
2582 LIBS="$ac_save_LIBS"
2583
2584 fi
2585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2586   echo "$ac_t""yes" 1>&6
2587     ac_tr_lib=HAVE_LIB`echo xpg4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2588     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2589   cat >> confdefs.h <<EOF
2590 #define $ac_tr_lib 1
2591 EOF
2592
2593   LIBS="-lxpg4 $LIBS"
2594
2595 else
2596   echo "$ac_t""no" 1>&6
2597 fi
2598
2599 echo $ac_n "checking for mmap in -lmmap""... $ac_c" 1>&6
2600 echo "configure:2601: checking for mmap in -lmmap" >&5
2601 ac_lib_var=`echo mmap'_'mmap | sed 'y%./+-%__p_%'`
2602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2603   echo $ac_n "(cached) $ac_c" 1>&6
2604 else
2605   ac_save_LIBS="$LIBS"
2606 LIBS="-lmmap  $LIBS"
2607 cat > conftest.$ac_ext <<EOF
2608 #line 2609 "configure"
2609 #include "confdefs.h"
2610 /* Override any gcc2 internal prototype to avoid an error.  */
2611 /* We use char because int might match the return type of a gcc2
2612     builtin and then its argument prototype would still apply.  */
2613 char mmap();
2614
2615 int main() {
2616 mmap()
2617 ; return 0; }
2618 EOF
2619 if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2620   rm -rf conftest*
2621   eval "ac_cv_lib_$ac_lib_var=yes"
2622 else
2623   echo "configure: failed program was:" >&5
2624   cat conftest.$ac_ext >&5
2625   rm -rf conftest*
2626   eval "ac_cv_lib_$ac_lib_var=no"
2627 fi
2628 rm -f conftest*
2629 LIBS="$ac_save_LIBS"
2630
2631 fi
2632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2633   echo "$ac_t""yes" 1>&6
2634     ac_tr_lib=HAVE_LIB`echo mmap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2635     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2636   cat >> confdefs.h <<EOF
2637 #define $ac_tr_lib 1
2638 EOF
2639
2640   LIBS="-lmmap $LIBS"
2641
2642 else
2643   echo "$ac_t""no" 1>&6
2644 fi
2645
2646 for ac_func in openpty
2647 do
2648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2649 echo "configure:2650: checking for $ac_func" >&5
2650 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2651   echo $ac_n "(cached) $ac_c" 1>&6
2652 else
2653   cat > conftest.$ac_ext <<EOF
2654 #line 2655 "configure"
2655 #include "confdefs.h"
2656 /* System header to define __stub macros and hopefully few prototypes,
2657     which can conflict with char $ac_func(); below.  */
2658 #include <assert.h>
2659 /* Override any gcc2 internal prototype to avoid an error.  */
2660 /* We use char because int might match the return type of a gcc2
2661     builtin and then its argument prototype would still apply.  */
2662 char $ac_func();
2663
2664 int main() {
2665
2666 /* The GNU C library defines this for functions which it implements
2667     to always fail with ENOSYS.  Some functions are actually named
2668     something starting with __ and the normal name is an alias.  */
2669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2670 choke me
2671 #else
2672 $ac_func();
2673 #endif
2674
2675 ; return 0; }
2676 EOF
2677 if { (eval echo configure:2678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2678   rm -rf conftest*
2679   eval "ac_cv_func_$ac_func=yes"
2680 else
2681   echo "configure: failed program was:" >&5
2682   cat conftest.$ac_ext >&5
2683   rm -rf conftest*
2684   eval "ac_cv_func_$ac_func=no"
2685 fi
2686 rm -f conftest*
2687 fi
2688
2689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2690   echo "$ac_t""yes" 1>&6
2691     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2692   cat >> confdefs.h <<EOF
2693 #define $ac_tr_func 1
2694 EOF
2695  
2696 else
2697   echo "$ac_t""no" 1>&6
2698 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
2699 echo "configure:2700: checking for openpty in -lutil" >&5
2700 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
2701 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2702   echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704   ac_save_LIBS="$LIBS"
2705 LIBS="-lutil  $LIBS"
2706 cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709 /* Override any gcc2 internal prototype to avoid an error.  */
2710 /* We use char because int might match the return type of a gcc2
2711     builtin and then its argument prototype would still apply.  */
2712 char openpty();
2713
2714 int main() {
2715 openpty()
2716 ; return 0; }
2717 EOF
2718 if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2719   rm -rf conftest*
2720   eval "ac_cv_lib_$ac_lib_var=yes"
2721 else
2722   echo "configure: failed program was:" >&5
2723   cat conftest.$ac_ext >&5
2724   rm -rf conftest*
2725   eval "ac_cv_lib_$ac_lib_var=no"
2726 fi
2727 rm -f conftest*
2728 LIBS="$ac_save_LIBS"
2729
2730 fi
2731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2732   echo "$ac_t""yes" 1>&6
2733   cat >> confdefs.h <<\EOF
2734 #define HAVE_OPENPTY 1
2735 EOF
2736
2737                 LIBS="$LIBS -lutil"
2738         
2739 else
2740   echo "$ac_t""no" 1>&6
2741 fi
2742
2743 fi
2744 done
2745
2746
2747 for ac_hdr in dlfcn.h
2748 do
2749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2751 echo "configure:2752: checking for $ac_hdr" >&5
2752 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2753   echo $ac_n "(cached) $ac_c" 1>&6
2754 else
2755   cat > conftest.$ac_ext <<EOF
2756 #line 2757 "configure"
2757 #include "confdefs.h"
2758 #include <$ac_hdr>
2759 EOF
2760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2761 { (eval echo configure:2762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2763 if test -z "$ac_err"; then
2764   rm -rf conftest*
2765   eval "ac_cv_header_$ac_safe=yes"
2766 else
2767   echo "$ac_err" >&5
2768   echo "configure: failed program was:" >&5
2769   cat conftest.$ac_ext >&5
2770   rm -rf conftest*
2771   eval "ac_cv_header_$ac_safe=no"
2772 fi
2773 rm -f conftest*
2774 fi
2775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2776   echo "$ac_t""yes" 1>&6
2777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2778   cat >> confdefs.h <<EOF
2779 #define $ac_tr_hdr 1
2780 EOF
2781  for ac_func in dlopen
2782 do
2783 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2784 echo "configure:2785: checking for $ac_func" >&5
2785 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2786   echo $ac_n "(cached) $ac_c" 1>&6
2787 else
2788   cat > conftest.$ac_ext <<EOF
2789 #line 2790 "configure"
2790 #include "confdefs.h"
2791 /* System header to define __stub macros and hopefully few prototypes,
2792     which can conflict with char $ac_func(); below.  */
2793 #include <assert.h>
2794 /* Override any gcc2 internal prototype to avoid an error.  */
2795 /* We use char because int might match the return type of a gcc2
2796     builtin and then its argument prototype would still apply.  */
2797 char $ac_func();
2798
2799 int main() {
2800
2801 /* The GNU C library defines this for functions which it implements
2802     to always fail with ENOSYS.  Some functions are actually named
2803     something starting with __ and the normal name is an alias.  */
2804 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2805 choke me
2806 #else
2807 $ac_func();
2808 #endif
2809
2810 ; return 0; }
2811 EOF
2812 if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2813   rm -rf conftest*
2814   eval "ac_cv_func_$ac_func=yes"
2815 else
2816   echo "configure: failed program was:" >&5
2817   cat conftest.$ac_ext >&5
2818   rm -rf conftest*
2819   eval "ac_cv_func_$ac_func=no"
2820 fi
2821 rm -f conftest*
2822 fi
2823
2824 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2825   echo "$ac_t""yes" 1>&6
2826     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2827   cat >> confdefs.h <<EOF
2828 #define $ac_tr_func 1
2829 EOF
2830  cat >> confdefs.h <<\EOF
2831 #define HAVE_DL_API 1
2832 EOF
2833
2834 else
2835   echo "$ac_t""no" 1>&6
2836 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2837 echo "configure:2838: checking for dlopen in -ldl" >&5
2838 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2839 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2840   echo $ac_n "(cached) $ac_c" 1>&6
2841 else
2842   ac_save_LIBS="$LIBS"
2843 LIBS="-ldl  $LIBS"
2844 cat > conftest.$ac_ext <<EOF
2845 #line 2846 "configure"
2846 #include "confdefs.h"
2847 /* Override any gcc2 internal prototype to avoid an error.  */
2848 /* We use char because int might match the return type of a gcc2
2849     builtin and then its argument prototype would still apply.  */
2850 char dlopen();
2851
2852 int main() {
2853 dlopen()
2854 ; return 0; }
2855 EOF
2856 if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2857   rm -rf conftest*
2858   eval "ac_cv_lib_$ac_lib_var=yes"
2859 else
2860   echo "configure: failed program was:" >&5
2861   cat conftest.$ac_ext >&5
2862   rm -rf conftest*
2863   eval "ac_cv_lib_$ac_lib_var=no"
2864 fi
2865 rm -f conftest*
2866 LIBS="$ac_save_LIBS"
2867
2868 fi
2869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2870   echo "$ac_t""yes" 1>&6
2871   cat >> confdefs.h <<\EOF
2872 #define HAVE_DL_API 1
2873 EOF
2874
2875                         LIBS="$LIBS -ldl"
2876                 
2877 else
2878   echo "$ac_t""no" 1>&6
2879 fi
2880
2881         
2882 fi
2883 done
2884
2885
2886 else
2887   echo "$ac_t""no" 1>&6
2888 fi
2889 done
2890
2891
2892 if test "$have_x" = "yes"
2893 then
2894     XLIB="-lXext -lX11"
2895     ac_save_CPPFLAGS="$CPPFLAGS"
2896     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2897
2898         for ac_hdr in X11/xpm.h
2899 do
2900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2902 echo "configure:2903: checking for $ac_hdr" >&5
2903 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2904   echo $ac_n "(cached) $ac_c" 1>&6
2905 else
2906   cat > conftest.$ac_ext <<EOF
2907 #line 2908 "configure"
2908 #include "confdefs.h"
2909 #include <$ac_hdr>
2910 EOF
2911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2912 { (eval echo configure:2913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2914 if test -z "$ac_err"; then
2915   rm -rf conftest*
2916   eval "ac_cv_header_$ac_safe=yes"
2917 else
2918   echo "$ac_err" >&5
2919   echo "configure: failed program was:" >&5
2920   cat conftest.$ac_ext >&5
2921   rm -rf conftest*
2922   eval "ac_cv_header_$ac_safe=no"
2923 fi
2924 rm -f conftest*
2925 fi
2926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2927   echo "$ac_t""yes" 1>&6
2928     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2929   cat >> confdefs.h <<EOF
2930 #define $ac_tr_hdr 1
2931 EOF
2932  
2933 else
2934   echo "$ac_t""no" 1>&6
2935 fi
2936 done
2937
2938     if test "$ac_cv_header_X11_xpm_h" = "yes"
2939     then 
2940         echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6
2941 echo "configure:2942: checking for XpmCreatePixmapFromData in -lXpm" >&5
2942 ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'`
2943 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2944   echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946   ac_save_LIBS="$LIBS"
2947 LIBS="-lXpm $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
2948 cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2951 /* Override any gcc2 internal prototype to avoid an error.  */
2952 /* We use char because int might match the return type of a gcc2
2953     builtin and then its argument prototype would still apply.  */
2954 char XpmCreatePixmapFromData();
2955
2956 int main() {
2957 XpmCreatePixmapFromData()
2958 ; return 0; }
2959 EOF
2960 if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2961   rm -rf conftest*
2962   eval "ac_cv_lib_$ac_lib_var=yes"
2963 else
2964   echo "configure: failed program was:" >&5
2965   cat conftest.$ac_ext >&5
2966   rm -rf conftest*
2967   eval "ac_cv_lib_$ac_lib_var=no"
2968 fi
2969 rm -f conftest*
2970 LIBS="$ac_save_LIBS"
2971
2972 fi
2973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2974   echo "$ac_t""yes" 1>&6
2975   cat >> confdefs.h <<\EOF
2976 #define HAVE_LIBXXPM 1
2977 EOF
2978  X_PRE_LIBS="$X_PRE_LIBS -lXpm"
2979 else
2980   echo "$ac_t""no" 1>&6
2981 fi
2982
2983     else
2984         echo "When compiling with X support, you need the Xpm library, or"
2985         echo "WINE will not work. This Xpm library is within the following RPM,"
2986         echo "which you need to install:"
2987         echo "Redhat            :       xpm, xpm-devel"
2988         echo "Caldera OpenLinux :       xpm, xpm-devel, xpm-devel-static"
2989         echo "SuSE:                     xpm"
2990         echo
2991         echo "Or get the sources from ftp.x.org and all its mirror sites from "
2992         echo "the directory /contrib/libraries."
2993         echo
2994         exit 1
2995     fi
2996
2997
2998         for ac_hdr in X11/Xlib.h X11/extensions/XShm.h
2999 do
3000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3002 echo "configure:3003: checking for $ac_hdr" >&5
3003 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3004   echo $ac_n "(cached) $ac_c" 1>&6
3005 else
3006   cat > conftest.$ac_ext <<EOF
3007 #line 3008 "configure"
3008 #include "confdefs.h"
3009 #include <$ac_hdr>
3010 EOF
3011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3012 { (eval echo configure:3013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3014 if test -z "$ac_err"; then
3015   rm -rf conftest*
3016   eval "ac_cv_header_$ac_safe=yes"
3017 else
3018   echo "$ac_err" >&5
3019   echo "configure: failed program was:" >&5
3020   cat conftest.$ac_ext >&5
3021   rm -rf conftest*
3022   eval "ac_cv_header_$ac_safe=no"
3023 fi
3024 rm -f conftest*
3025 fi
3026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3027   echo "$ac_t""yes" 1>&6
3028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3029   cat >> confdefs.h <<EOF
3030 #define $ac_tr_hdr 1
3031 EOF
3032  
3033 else
3034   echo "$ac_t""no" 1>&6
3035 fi
3036 done
3037
3038     if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
3039     then 
3040         echo $ac_n "checking for XShmQueryExtension in -lXext""... $ac_c" 1>&6
3041 echo "configure:3042: checking for XShmQueryExtension in -lXext" >&5
3042 ac_lib_var=`echo Xext'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
3043 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3044   echo $ac_n "(cached) $ac_c" 1>&6
3045 else
3046   ac_save_LIBS="$LIBS"
3047 LIBS="-lXext $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3048 cat > conftest.$ac_ext <<EOF
3049 #line 3050 "configure"
3050 #include "confdefs.h"
3051 /* Override any gcc2 internal prototype to avoid an error.  */
3052 /* We use char because int might match the return type of a gcc2
3053     builtin and then its argument prototype would still apply.  */
3054 char XShmQueryExtension();
3055
3056 int main() {
3057 XShmQueryExtension()
3058 ; return 0; }
3059 EOF
3060 if { (eval echo configure:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3061   rm -rf conftest*
3062   eval "ac_cv_lib_$ac_lib_var=yes"
3063 else
3064   echo "configure: failed program was:" >&5
3065   cat conftest.$ac_ext >&5
3066   rm -rf conftest*
3067   eval "ac_cv_lib_$ac_lib_var=no"
3068 fi
3069 rm -f conftest*
3070 LIBS="$ac_save_LIBS"
3071
3072 fi
3073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3074   echo "$ac_t""yes" 1>&6
3075   cat >> confdefs.h <<\EOF
3076 #define HAVE_LIBXXSHM 1
3077 EOF
3078
3079 else
3080   echo "$ac_t""no" 1>&6
3081 fi
3082
3083     fi
3084         for ac_hdr in X11/Xlib.h X11/extensions/xf86dga.h
3085 do
3086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3088 echo "configure:3089: checking for $ac_hdr" >&5
3089 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3090   echo $ac_n "(cached) $ac_c" 1>&6
3091 else
3092   cat > conftest.$ac_ext <<EOF
3093 #line 3094 "configure"
3094 #include "confdefs.h"
3095 #include <$ac_hdr>
3096 EOF
3097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3098 { (eval echo configure:3099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3100 if test -z "$ac_err"; then
3101   rm -rf conftest*
3102   eval "ac_cv_header_$ac_safe=yes"
3103 else
3104   echo "$ac_err" >&5
3105   echo "configure: failed program was:" >&5
3106   cat conftest.$ac_ext >&5
3107   rm -rf conftest*
3108   eval "ac_cv_header_$ac_safe=no"
3109 fi
3110 rm -f conftest*
3111 fi
3112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3113   echo "$ac_t""yes" 1>&6
3114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3115   cat >> confdefs.h <<EOF
3116 #define $ac_tr_hdr 1
3117 EOF
3118  
3119 else
3120   echo "$ac_t""no" 1>&6
3121 fi
3122 done
3123
3124     if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
3125     then 
3126          echo $ac_n "checking for XDGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
3127 echo "configure:3128: checking for XDGAQueryExtension in -lXxf86dga" >&5
3128 ac_lib_var=`echo Xxf86dga'_'XDGAQueryExtension | sed 'y%./+-%__p_%'`
3129 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3130   echo $ac_n "(cached) $ac_c" 1>&6
3131 else
3132   ac_save_LIBS="$LIBS"
3133 LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3134 cat > conftest.$ac_ext <<EOF
3135 #line 3136 "configure"
3136 #include "confdefs.h"
3137 /* Override any gcc2 internal prototype to avoid an error.  */
3138 /* We use char because int might match the return type of a gcc2
3139     builtin and then its argument prototype would still apply.  */
3140 char XDGAQueryExtension();
3141
3142 int main() {
3143 XDGAQueryExtension()
3144 ; return 0; }
3145 EOF
3146 if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3147   rm -rf conftest*
3148   eval "ac_cv_lib_$ac_lib_var=yes"
3149 else
3150   echo "configure: failed program was:" >&5
3151   cat conftest.$ac_ext >&5
3152   rm -rf conftest*
3153   eval "ac_cv_lib_$ac_lib_var=no"
3154 fi
3155 rm -f conftest*
3156 LIBS="$ac_save_LIBS"
3157
3158 fi
3159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3160   echo "$ac_t""yes" 1>&6
3161   cat >> confdefs.h <<\EOF
3162 #define HAVE_LIBXXF86DGA2 1
3163 EOF
3164  cat >> confdefs.h <<\EOF
3165 #define HAVE_LIBXXF86DGA 1
3166 EOF
3167  X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
3168 else
3169   echo "$ac_t""no" 1>&6
3170 fi
3171
3172          if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
3173          then
3174            echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
3175 echo "configure:3176: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
3176 ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
3177 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   ac_save_LIBS="$LIBS"
3181 LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3182 cat > conftest.$ac_ext <<EOF
3183 #line 3184 "configure"
3184 #include "confdefs.h"
3185 /* Override any gcc2 internal prototype to avoid an error.  */
3186 /* We use char because int might match the return type of a gcc2
3187     builtin and then its argument prototype would still apply.  */
3188 char XF86DGAQueryExtension();
3189
3190 int main() {
3191 XF86DGAQueryExtension()
3192 ; return 0; }
3193 EOF
3194 if { (eval echo configure:3195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3195   rm -rf conftest*
3196   eval "ac_cv_lib_$ac_lib_var=yes"
3197 else
3198   echo "configure: failed program was:" >&5
3199   cat conftest.$ac_ext >&5
3200   rm -rf conftest*
3201   eval "ac_cv_lib_$ac_lib_var=no"
3202 fi
3203 rm -f conftest*
3204 LIBS="$ac_save_LIBS"
3205
3206 fi
3207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3208   echo "$ac_t""yes" 1>&6
3209   cat >> confdefs.h <<\EOF
3210 #define HAVE_LIBXXF86DGA 1
3211 EOF
3212  X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
3213 else
3214   echo "$ac_t""no" 1>&6
3215 fi
3216
3217          fi
3218     fi
3219
3220         for ac_hdr in X11/Xlib.h X11/extensions/xf86vmode.h
3221 do
3222 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3223 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3224 echo "configure:3225: checking for $ac_hdr" >&5
3225 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   cat > conftest.$ac_ext <<EOF
3229 #line 3230 "configure"
3230 #include "confdefs.h"
3231 #include <$ac_hdr>
3232 EOF
3233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3234 { (eval echo configure:3235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3236 if test -z "$ac_err"; then
3237   rm -rf conftest*
3238   eval "ac_cv_header_$ac_safe=yes"
3239 else
3240   echo "$ac_err" >&5
3241   echo "configure: failed program was:" >&5
3242   cat conftest.$ac_ext >&5
3243   rm -rf conftest*
3244   eval "ac_cv_header_$ac_safe=no"
3245 fi
3246 rm -f conftest*
3247 fi
3248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3249   echo "$ac_t""yes" 1>&6
3250     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3251   cat >> confdefs.h <<EOF
3252 #define $ac_tr_hdr 1
3253 EOF
3254  
3255 else
3256   echo "$ac_t""no" 1>&6
3257 fi
3258 done
3259
3260     if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
3261     then 
3262         echo $ac_n "checking for XF86VidModeQueryExtension in -lXxf86vm""... $ac_c" 1>&6
3263 echo "configure:3264: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5
3264 ac_lib_var=`echo Xxf86vm'_'XF86VidModeQueryExtension | sed 'y%./+-%__p_%'`
3265 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3266   echo $ac_n "(cached) $ac_c" 1>&6
3267 else
3268   ac_save_LIBS="$LIBS"
3269 LIBS="-lXxf86vm $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3270 cat > conftest.$ac_ext <<EOF
3271 #line 3272 "configure"
3272 #include "confdefs.h"
3273 /* Override any gcc2 internal prototype to avoid an error.  */
3274 /* We use char because int might match the return type of a gcc2
3275     builtin and then its argument prototype would still apply.  */
3276 char XF86VidModeQueryExtension();
3277
3278 int main() {
3279 XF86VidModeQueryExtension()
3280 ; return 0; }
3281 EOF
3282 if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3283   rm -rf conftest*
3284   eval "ac_cv_lib_$ac_lib_var=yes"
3285 else
3286   echo "configure: failed program was:" >&5
3287   cat conftest.$ac_ext >&5
3288   rm -rf conftest*
3289   eval "ac_cv_lib_$ac_lib_var=no"
3290 fi
3291 rm -f conftest*
3292 LIBS="$ac_save_LIBS"
3293
3294 fi
3295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3296   echo "$ac_t""yes" 1>&6
3297   cat >> confdefs.h <<\EOF
3298 #define HAVE_LIBXXF86VM 1
3299 EOF
3300  X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
3301 else
3302   echo "$ac_t""no" 1>&6
3303 fi
3304
3305     fi
3306
3307         for ac_hdr in GL/gl.h GL/glx.h GL/osmesa.h
3308 do
3309 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3310 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3311 echo "configure:3312: checking for $ac_hdr" >&5
3312 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3313   echo $ac_n "(cached) $ac_c" 1>&6
3314 else
3315   cat > conftest.$ac_ext <<EOF
3316 #line 3317 "configure"
3317 #include "confdefs.h"
3318 #include <$ac_hdr>
3319 EOF
3320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3321 { (eval echo configure:3322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3323 if test -z "$ac_err"; then
3324   rm -rf conftest*
3325   eval "ac_cv_header_$ac_safe=yes"
3326 else
3327   echo "$ac_err" >&5
3328   echo "configure: failed program was:" >&5
3329   cat conftest.$ac_ext >&5
3330   rm -rf conftest*
3331   eval "ac_cv_header_$ac_safe=no"
3332 fi
3333 rm -f conftest*
3334 fi
3335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3336   echo "$ac_t""yes" 1>&6
3337     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3338   cat >> confdefs.h <<EOF
3339 #define $ac_tr_hdr 1
3340 EOF
3341  
3342 else
3343   echo "$ac_t""no" 1>&6
3344 fi
3345 done
3346
3347     if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
3348     then
3349                 echo $ac_n "checking "for up-to-date Mesa version"""... $ac_c" 1>&6
3350 echo "configure:3351: checking "for up-to-date Mesa version"" >&5
3351 if eval "test \"`echo '$''{'wine_cv_mesa_version_OK'+set}'`\" = set"; then
3352   echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354   cat > conftest.$ac_ext <<EOF
3355 #line 3356 "configure"
3356 #include "confdefs.h"
3357 #include <GL/gl.h>
3358 int main() {
3359 GLenum test = GL_UNSIGNED_SHORT_5_6_5;
3360 ; return 0; }
3361 EOF
3362 if { (eval echo configure:3363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3363   rm -rf conftest*
3364   wine_cv_mesa_version_OK="yes"
3365 else
3366   echo "configure: failed program was:" >&5
3367   cat conftest.$ac_ext >&5
3368   rm -rf conftest*
3369   wine_cv_mesa_version_OK="no"
3370           
3371 fi
3372 rm -f conftest*
3373         
3374 fi
3375
3376 echo "$ac_t""$wine_cv_mesa_version_OK" 1>&6
3377
3378         if test "$wine_cv_mesa_version_OK" = "yes"
3379         then
3380                         echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
3381 echo "configure:3382: checking for glXCreateContext in -lGL" >&5
3382 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
3383 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3384   echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386   ac_save_LIBS="$LIBS"
3387 LIBS="-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
3388 cat > conftest.$ac_ext <<EOF
3389 #line 3390 "configure"
3390 #include "confdefs.h"
3391 /* Override any gcc2 internal prototype to avoid an error.  */
3392 /* We use char because int might match the return type of a gcc2
3393     builtin and then its argument prototype would still apply.  */
3394 char glXCreateContext();
3395
3396 int main() {
3397 glXCreateContext()
3398 ; return 0; }
3399 EOF
3400 if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3401   rm -rf conftest*
3402   eval "ac_cv_lib_$ac_lib_var=yes"
3403 else
3404   echo "configure: failed program was:" >&5
3405   cat conftest.$ac_ext >&5
3406   rm -rf conftest*
3407   eval "ac_cv_lib_$ac_lib_var=no"
3408 fi
3409 rm -f conftest*
3410 LIBS="$ac_save_LIBS"
3411
3412 fi
3413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3414   echo "$ac_t""yes" 1>&6
3415   cat >> confdefs.h <<\EOF
3416 #define HAVE_LIBMESAGL 1
3417 EOF
3418  X_PRE_LIBS="$X_PRE_LIBS -lGL"
3419 else
3420   echo "$ac_t""no" 1>&6
3421 fi
3422
3423             if test "$ac_cv_lib_GL_glXCreateContext" = "no"
3424             then
3425                 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
3426 echo "configure:3427: checking for glXCreateContext in -lMesaGL" >&5
3427 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
3428 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3429   echo $ac_n "(cached) $ac_c" 1>&6
3430 else
3431   ac_save_LIBS="$LIBS"
3432 LIBS="-lMesaGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
3433 cat > conftest.$ac_ext <<EOF
3434 #line 3435 "configure"
3435 #include "confdefs.h"
3436 /* Override any gcc2 internal prototype to avoid an error.  */
3437 /* We use char because int might match the return type of a gcc2
3438     builtin and then its argument prototype would still apply.  */
3439 char glXCreateContext();
3440
3441 int main() {
3442 glXCreateContext()
3443 ; return 0; }
3444 EOF
3445 if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3446   rm -rf conftest*
3447   eval "ac_cv_lib_$ac_lib_var=yes"
3448 else
3449   echo "configure: failed program was:" >&5
3450   cat conftest.$ac_ext >&5
3451   rm -rf conftest*
3452   eval "ac_cv_lib_$ac_lib_var=no"
3453 fi
3454 rm -f conftest*
3455 LIBS="$ac_save_LIBS"
3456
3457 fi
3458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3459   echo "$ac_t""yes" 1>&6
3460   cat >> confdefs.h <<\EOF
3461 #define HAVE_LIBMESAGL 1
3462 EOF
3463  X_PRE_LIBS="$X_PRE_LIBS -lMesaGL"
3464 else
3465   echo "$ac_t""no" 1>&6
3466 fi
3467
3468             fi
3469
3470                     echo $ac_n "checking "for the OpenGL Color Index extension"""... $ac_c" 1>&6
3471 echo "configure:3472: checking "for the OpenGL Color Index extension"" >&5
3472 if eval "test \"`echo '$''{'dummy'+set}'`\" = set"; then
3473   echo $ac_n "(cached) $ac_c" 1>&6
3474 else
3475   cat > conftest.$ac_ext <<EOF
3476 #line 3477 "configure"
3477 #include "confdefs.h"
3478 #include <GL/gl.h>
3479 int main() {
3480 GLenum test = GL_COLOR_INDEX8_EXT;
3481 ; return 0; }
3482 EOF
3483 if { (eval echo configure:3484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3484   rm -rf conftest*
3485   cat >> confdefs.h <<\EOF
3486 #define HAVE_GL_COLOR_TABLE 1
3487 EOF
3488
3489 else
3490   echo "configure: failed program was:" >&5
3491   cat conftest.$ac_ext >&5
3492 fi
3493 rm -f conftest*
3494             
3495 fi
3496
3497 echo "$ac_t""$dummy" 1>&6
3498             if test "$ac_cv_lib_GL_glXCreateContext" = "no"
3499             then
3500                 echo $ac_n "checking for glColorTableEXT in -lMesaGL""... $ac_c" 1>&6
3501 echo "configure:3502: checking for glColorTableEXT in -lMesaGL" >&5
3502 ac_lib_var=`echo MesaGL'_'glColorTableEXT | sed 'y%./+-%__p_%'`
3503 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3504   echo $ac_n "(cached) $ac_c" 1>&6
3505 else
3506   ac_save_LIBS="$LIBS"
3507 LIBS="-lMesaGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
3508 cat > conftest.$ac_ext <<EOF
3509 #line 3510 "configure"
3510 #include "confdefs.h"
3511 /* Override any gcc2 internal prototype to avoid an error.  */
3512 /* We use char because int might match the return type of a gcc2
3513     builtin and then its argument prototype would still apply.  */
3514 char glColorTableEXT();
3515
3516 int main() {
3517 glColorTableEXT()
3518 ; return 0; }
3519 EOF
3520 if { (eval echo configure:3521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3521   rm -rf conftest*
3522   eval "ac_cv_lib_$ac_lib_var=yes"
3523 else
3524   echo "configure: failed program was:" >&5
3525   cat conftest.$ac_ext >&5
3526   rm -rf conftest*
3527   eval "ac_cv_lib_$ac_lib_var=no"
3528 fi
3529 rm -f conftest*
3530 LIBS="$ac_save_LIBS"
3531
3532 fi
3533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3534   echo "$ac_t""yes" 1>&6
3535   cat >> confdefs.h <<\EOF
3536 #define HAVE_GL_PALETTED_TEXTURE 1
3537 EOF
3538
3539 else
3540   echo "$ac_t""no" 1>&6
3541 fi
3542
3543             else
3544                 echo $ac_n "checking for glColorTableEXT in -lGL""... $ac_c" 1>&6
3545 echo "configure:3546: checking for glColorTableEXT in -lGL" >&5
3546 ac_lib_var=`echo GL'_'glColorTableEXT | sed 'y%./+-%__p_%'`
3547 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3548   echo $ac_n "(cached) $ac_c" 1>&6
3549 else
3550   ac_save_LIBS="$LIBS"
3551 LIBS="-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
3552 cat > conftest.$ac_ext <<EOF
3553 #line 3554 "configure"
3554 #include "confdefs.h"
3555 /* Override any gcc2 internal prototype to avoid an error.  */
3556 /* We use char because int might match the return type of a gcc2
3557     builtin and then its argument prototype would still apply.  */
3558 char glColorTableEXT();
3559
3560 int main() {
3561 glColorTableEXT()
3562 ; return 0; }
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3565   rm -rf conftest*
3566   eval "ac_cv_lib_$ac_lib_var=yes"
3567 else
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   eval "ac_cv_lib_$ac_lib_var=no"
3572 fi
3573 rm -f conftest*
3574 LIBS="$ac_save_LIBS"
3575
3576 fi
3577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3578   echo "$ac_t""yes" 1>&6
3579   cat >> confdefs.h <<\EOF
3580 #define HAVE_GL_PALETTED_TEXTURE 1
3581 EOF
3582
3583 else
3584   echo "$ac_t""no" 1>&6
3585 fi
3586
3587             fi
3588         fi
3589     fi
3590
3591     CPPFLAGS="$ac_save_CPPFLAGS"
3592 else
3593     XLIB=""
3594     X_CFLAGS=""
3595     X_LIBS=""
3596 fi
3597
3598 for ac_hdr in ncurses.h
3599 do
3600 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3601 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3602 echo "configure:3603: checking for $ac_hdr" >&5
3603 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   cat > conftest.$ac_ext <<EOF
3607 #line 3608 "configure"
3608 #include "confdefs.h"
3609 #include <$ac_hdr>
3610 EOF
3611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3612 { (eval echo configure:3613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3614 if test -z "$ac_err"; then
3615   rm -rf conftest*
3616   eval "ac_cv_header_$ac_safe=yes"
3617 else
3618   echo "$ac_err" >&5
3619   echo "configure: failed program was:" >&5
3620   cat conftest.$ac_ext >&5
3621   rm -rf conftest*
3622   eval "ac_cv_header_$ac_safe=no"
3623 fi
3624 rm -f conftest*
3625 fi
3626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3627   echo "$ac_t""yes" 1>&6
3628     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3629   cat >> confdefs.h <<EOF
3630 #define $ac_tr_hdr 1
3631 EOF
3632  
3633 else
3634   echo "$ac_t""no" 1>&6
3635 fi
3636 done
3637
3638 if test "$ac_cv_header_ncurses_h" = "yes"
3639 then 
3640     echo $ac_n "checking for waddch in -lncurses""... $ac_c" 1>&6
3641 echo "configure:3642: checking for waddch in -lncurses" >&5
3642 ac_lib_var=`echo ncurses'_'waddch | sed 'y%./+-%__p_%'`
3643 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   ac_save_LIBS="$LIBS"
3647 LIBS="-lncurses  $LIBS"
3648 cat > conftest.$ac_ext <<EOF
3649 #line 3650 "configure"
3650 #include "confdefs.h"
3651 /* Override any gcc2 internal prototype to avoid an error.  */
3652 /* We use char because int might match the return type of a gcc2
3653     builtin and then its argument prototype would still apply.  */
3654 char waddch();
3655
3656 int main() {
3657 waddch()
3658 ; return 0; }
3659 EOF
3660 if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3661   rm -rf conftest*
3662   eval "ac_cv_lib_$ac_lib_var=yes"
3663 else
3664   echo "configure: failed program was:" >&5
3665   cat conftest.$ac_ext >&5
3666   rm -rf conftest*
3667   eval "ac_cv_lib_$ac_lib_var=no"
3668 fi
3669 rm -f conftest*
3670 LIBS="$ac_save_LIBS"
3671
3672 fi
3673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3674   echo "$ac_t""yes" 1>&6
3675     ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3676     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3677   cat >> confdefs.h <<EOF
3678 #define $ac_tr_lib 1
3679 EOF
3680
3681   LIBS="-lncurses $LIBS"
3682
3683 else
3684   echo "$ac_t""no" 1>&6
3685 fi
3686
3687 fi
3688 if test "$ac_cv_lib_ncurses_waddch" = "yes"
3689 then
3690     echo $ac_n "checking for resizeterm in -lncurses""... $ac_c" 1>&6
3691 echo "configure:3692: checking for resizeterm in -lncurses" >&5
3692 ac_lib_var=`echo ncurses'_'resizeterm | sed 'y%./+-%__p_%'`
3693 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3694   echo $ac_n "(cached) $ac_c" 1>&6
3695 else
3696   ac_save_LIBS="$LIBS"
3697 LIBS="-lncurses  $LIBS"
3698 cat > conftest.$ac_ext <<EOF
3699 #line 3700 "configure"
3700 #include "confdefs.h"
3701 /* Override any gcc2 internal prototype to avoid an error.  */
3702 /* We use char because int might match the return type of a gcc2
3703     builtin and then its argument prototype would still apply.  */
3704 char resizeterm();
3705
3706 int main() {
3707 resizeterm()
3708 ; return 0; }
3709 EOF
3710 if { (eval echo configure:3711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3711   rm -rf conftest*
3712   eval "ac_cv_lib_$ac_lib_var=yes"
3713 else
3714   echo "configure: failed program was:" >&5
3715   cat conftest.$ac_ext >&5
3716   rm -rf conftest*
3717   eval "ac_cv_lib_$ac_lib_var=no"
3718 fi
3719 rm -f conftest*
3720 LIBS="$ac_save_LIBS"
3721
3722 fi
3723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3724   echo "$ac_t""yes" 1>&6
3725   cat >> confdefs.h <<\EOF
3726 #define HAVE_RESIZETERM 1
3727 EOF
3728
3729 else
3730   echo "$ac_t""no" 1>&6
3731 fi
3732
3733     echo $ac_n "checking for getbkgd in -lncurses""... $ac_c" 1>&6
3734 echo "configure:3735: checking for getbkgd in -lncurses" >&5
3735 ac_lib_var=`echo ncurses'_'getbkgd | sed 'y%./+-%__p_%'`
3736 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3737   echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739   ac_save_LIBS="$LIBS"
3740 LIBS="-lncurses  $LIBS"
3741 cat > conftest.$ac_ext <<EOF
3742 #line 3743 "configure"
3743 #include "confdefs.h"
3744 /* Override any gcc2 internal prototype to avoid an error.  */
3745 /* We use char because int might match the return type of a gcc2
3746     builtin and then its argument prototype would still apply.  */
3747 char getbkgd();
3748
3749 int main() {
3750 getbkgd()
3751 ; return 0; }
3752 EOF
3753 if { (eval echo configure:3754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3754   rm -rf conftest*
3755   eval "ac_cv_lib_$ac_lib_var=yes"
3756 else
3757   echo "configure: failed program was:" >&5
3758   cat conftest.$ac_ext >&5
3759   rm -rf conftest*
3760   eval "ac_cv_lib_$ac_lib_var=no"
3761 fi
3762 rm -f conftest*
3763 LIBS="$ac_save_LIBS"
3764
3765 fi
3766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3767   echo "$ac_t""yes" 1>&6
3768   cat >> confdefs.h <<\EOF
3769 #define HAVE_GETBKGD 1
3770 EOF
3771
3772 else
3773   echo "$ac_t""no" 1>&6
3774 fi
3775
3776 else
3777     for ac_hdr in curses.h
3778 do
3779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3781 echo "configure:3782: checking for $ac_hdr" >&5
3782 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785   cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788 #include <$ac_hdr>
3789 EOF
3790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3791 { (eval echo configure:3792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3793 if test -z "$ac_err"; then
3794   rm -rf conftest*
3795   eval "ac_cv_header_$ac_safe=yes"
3796 else
3797   echo "$ac_err" >&5
3798   echo "configure: failed program was:" >&5
3799   cat conftest.$ac_ext >&5
3800   rm -rf conftest*
3801   eval "ac_cv_header_$ac_safe=no"
3802 fi
3803 rm -f conftest*
3804 fi
3805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3806   echo "$ac_t""yes" 1>&6
3807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3808   cat >> confdefs.h <<EOF
3809 #define $ac_tr_hdr 1
3810 EOF
3811  
3812 else
3813   echo "$ac_t""no" 1>&6
3814 fi
3815 done
3816
3817     if test "$ac_cv_header_curses_h" = "yes"
3818     then    
3819        echo $ac_n "checking for waddch in -lcurses""... $ac_c" 1>&6
3820 echo "configure:3821: checking for waddch in -lcurses" >&5
3821 ac_lib_var=`echo curses'_'waddch | sed 'y%./+-%__p_%'`
3822 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3823   echo $ac_n "(cached) $ac_c" 1>&6
3824 else
3825   ac_save_LIBS="$LIBS"
3826 LIBS="-lcurses  $LIBS"
3827 cat > conftest.$ac_ext <<EOF
3828 #line 3829 "configure"
3829 #include "confdefs.h"
3830 /* Override any gcc2 internal prototype to avoid an error.  */
3831 /* We use char because int might match the return type of a gcc2
3832     builtin and then its argument prototype would still apply.  */
3833 char waddch();
3834
3835 int main() {
3836 waddch()
3837 ; return 0; }
3838 EOF
3839 if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3840   rm -rf conftest*
3841   eval "ac_cv_lib_$ac_lib_var=yes"
3842 else
3843   echo "configure: failed program was:" >&5
3844   cat conftest.$ac_ext >&5
3845   rm -rf conftest*
3846   eval "ac_cv_lib_$ac_lib_var=no"
3847 fi
3848 rm -f conftest*
3849 LIBS="$ac_save_LIBS"
3850
3851 fi
3852 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3853   echo "$ac_t""yes" 1>&6
3854     ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3855     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3856   cat >> confdefs.h <<EOF
3857 #define $ac_tr_lib 1
3858 EOF
3859
3860   LIBS="-lcurses $LIBS"
3861
3862 else
3863   echo "$ac_t""no" 1>&6
3864 fi
3865
3866        echo $ac_n "checking for resizeterm in -lcurses""... $ac_c" 1>&6
3867 echo "configure:3868: checking for resizeterm in -lcurses" >&5
3868 ac_lib_var=`echo curses'_'resizeterm | sed 'y%./+-%__p_%'`
3869 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3870   echo $ac_n "(cached) $ac_c" 1>&6
3871 else
3872   ac_save_LIBS="$LIBS"
3873 LIBS="-lcurses  $LIBS"
3874 cat > conftest.$ac_ext <<EOF
3875 #line 3876 "configure"
3876 #include "confdefs.h"
3877 /* Override any gcc2 internal prototype to avoid an error.  */
3878 /* We use char because int might match the return type of a gcc2
3879     builtin and then its argument prototype would still apply.  */
3880 char resizeterm();
3881
3882 int main() {
3883 resizeterm()
3884 ; return 0; }
3885 EOF
3886 if { (eval echo configure:3887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3887   rm -rf conftest*
3888   eval "ac_cv_lib_$ac_lib_var=yes"
3889 else
3890   echo "configure: failed program was:" >&5
3891   cat conftest.$ac_ext >&5
3892   rm -rf conftest*
3893   eval "ac_cv_lib_$ac_lib_var=no"
3894 fi
3895 rm -f conftest*
3896 LIBS="$ac_save_LIBS"
3897
3898 fi
3899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3900   echo "$ac_t""yes" 1>&6
3901   cat >> confdefs.h <<\EOF
3902 #define HAVE_RESIZETERM 1
3903 EOF
3904
3905 else
3906   echo "$ac_t""no" 1>&6
3907 fi
3908
3909        echo $ac_n "checking for getbkgd in -lcurses""... $ac_c" 1>&6
3910 echo "configure:3911: checking for getbkgd in -lcurses" >&5
3911 ac_lib_var=`echo curses'_'getbkgd | sed 'y%./+-%__p_%'`
3912 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3913   echo $ac_n "(cached) $ac_c" 1>&6
3914 else
3915   ac_save_LIBS="$LIBS"
3916 LIBS="-lcurses  $LIBS"
3917 cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 /* Override any gcc2 internal prototype to avoid an error.  */
3921 /* We use char because int might match the return type of a gcc2
3922     builtin and then its argument prototype would still apply.  */
3923 char getbkgd();
3924
3925 int main() {
3926 getbkgd()
3927 ; return 0; }
3928 EOF
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3930   rm -rf conftest*
3931   eval "ac_cv_lib_$ac_lib_var=yes"
3932 else
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -rf conftest*
3936   eval "ac_cv_lib_$ac_lib_var=no"
3937 fi
3938 rm -f conftest*
3939 LIBS="$ac_save_LIBS"
3940
3941 fi
3942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3943   echo "$ac_t""yes" 1>&6
3944   cat >> confdefs.h <<\EOF
3945 #define HAVE_GETBKGD 1
3946 EOF
3947
3948 else
3949   echo "$ac_t""no" 1>&6
3950 fi
3951
3952     fi
3953 fi
3954
3955 echo $ac_n "checking "for GNU style IPX support"""... $ac_c" 1>&6
3956 echo "configure:3957: checking "for GNU style IPX support"" >&5
3957 if eval "test \"`echo '$''{'ac_cv_c_ipx_gnu'+set}'`\" = set"; then
3958   echo $ac_n "(cached) $ac_c" 1>&6
3959 else
3960   cat > conftest.$ac_ext <<EOF
3961 #line 3962 "configure"
3962 #include "confdefs.h"
3963 #include <sys/socket.h>
3964     #include <netipx/ipx.h>
3965 int main() {
3966 ((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
3967 ; return 0; }
3968 EOF
3969 if { (eval echo configure:3970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3970   rm -rf conftest*
3971   ac_cv_c_ipx_gnu="yes"
3972 else
3973   echo "configure: failed program was:" >&5
3974   cat conftest.$ac_ext >&5
3975   rm -rf conftest*
3976   ac_cv_c_ipx_gnu="no"
3977 fi
3978 rm -f conftest*
3979  
3980 fi
3981
3982 echo "$ac_t""$ac_cv_c_ipx_gnu" 1>&6
3983 if test "$ac_cv_c_ipx_gnu" = "yes"
3984 then
3985     cat >> confdefs.h <<\EOF
3986 #define HAVE_IPX_GNU 1
3987 EOF
3988
3989 fi
3990
3991 if test "$ac_cv_c_ipx_gnu" = "no"
3992 then
3993  echo $ac_n "checking "for linux style IPX support"""... $ac_c" 1>&6
3994 echo "configure:3995: checking "for linux style IPX support"" >&5
3995 if eval "test \"`echo '$''{'ac_cv_c_ipx_linux'+set}'`\" = set"; then
3996   echo $ac_n "(cached) $ac_c" 1>&6
3997 else
3998   cat > conftest.$ac_ext <<EOF
3999 #line 4000 "configure"
4000 #include "confdefs.h"
4001 #include <sys/socket.h>
4002      #include <asm/types.h>
4003      #include <linux/ipx.h>
4004 int main() {
4005 ((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
4006 ; return 0; }
4007 EOF
4008 if { (eval echo configure:4009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4009   rm -rf conftest*
4010   ac_cv_c_ipx_linux="yes"
4011 else
4012   echo "configure: failed program was:" >&5
4013   cat conftest.$ac_ext >&5
4014   rm -rf conftest*
4015   ac_cv_c_ipx_linux="no"
4016 fi
4017 rm -f conftest*
4018   
4019 fi
4020
4021 echo "$ac_t""$ac_cv_c_ipx_linux" 1>&6
4022   if test "$ac_cv_c_ipx_linux" = "yes"
4023   then
4024       cat >> confdefs.h <<\EOF
4025 #define HAVE_IPX_LINUX 1
4026 EOF
4027
4028   fi
4029 fi
4030
4031 for ac_hdr in sys/soundcard.h machine/soundcard.h soundcard.h
4032 do
4033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4035 echo "configure:4036: checking for $ac_hdr" >&5
4036 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4037   echo $ac_n "(cached) $ac_c" 1>&6
4038 else
4039   cat > conftest.$ac_ext <<EOF
4040 #line 4041 "configure"
4041 #include "confdefs.h"
4042 #include <$ac_hdr>
4043 EOF
4044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4045 { (eval echo configure:4046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4047 if test -z "$ac_err"; then
4048   rm -rf conftest*
4049   eval "ac_cv_header_$ac_safe=yes"
4050 else
4051   echo "$ac_err" >&5
4052   echo "configure: failed program was:" >&5
4053   cat conftest.$ac_ext >&5
4054   rm -rf conftest*
4055   eval "ac_cv_header_$ac_safe=no"
4056 fi
4057 rm -f conftest*
4058 fi
4059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4060   echo "$ac_t""yes" 1>&6
4061     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4062   cat >> confdefs.h <<EOF
4063 #define $ac_tr_hdr 1
4064 EOF
4065  break
4066 else
4067   echo "$ac_t""no" 1>&6
4068 fi
4069 done
4070
4071
4072 echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6
4073 echo "configure:4074: checking "for Open Sound System"" >&5
4074 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then
4075   echo $ac_n "(cached) $ac_c" 1>&6
4076 else
4077   cat > conftest.$ac_ext <<EOF
4078 #line 4079 "configure"
4079 #include "confdefs.h"
4080
4081         #if defined(HAVE_SYS_SOUNDCARD_H)
4082                 #include <sys/soundcard.h>
4083         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
4084                 #include <machine/soundcard.h>
4085         #elif defined(HAVE_SOUNDCARD_H)
4086                 #include <soundcard.h>
4087         #endif
4088         
4089 int main() {
4090
4091
4092 /* check for one of the Open Sound System specific SNDCTL_ defines */
4093 #if !defined(SNDCTL_DSP_STEREO)
4094 #error No open sound system
4095 #endif
4096
4097 ; return 0; }
4098 EOF
4099 if { (eval echo configure:4100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4100   rm -rf conftest*
4101   ac_cv_c_opensoundsystem="yes"
4102 else
4103   echo "configure: failed program was:" >&5
4104   cat conftest.$ac_ext >&5
4105   rm -rf conftest*
4106   ac_cv_c_opensoundsystem="no"
4107 fi
4108 rm -f conftest*
4109 fi
4110
4111 echo "$ac_t""$ac_cv_c_opensoundsystem" 1>&6
4112
4113 if test "$ac_cv_c_opensoundsystem" = "yes"
4114 then
4115     cat >> confdefs.h <<\EOF
4116 #define HAVE_OSS 1
4117 EOF
4118
4119 fi
4120
4121 echo $ac_n "checking "for Open Sound System/MIDI interface"""... $ac_c" 1>&6
4122 echo "configure:4123: checking "for Open Sound System/MIDI interface"" >&5
4123 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem_midi'+set}'`\" = set"; then
4124   echo $ac_n "(cached) $ac_c" 1>&6
4125 else
4126   cat > conftest.$ac_ext <<EOF
4127 #line 4128 "configure"
4128 #include "confdefs.h"
4129
4130         #if defined(HAVE_SYS_SOUNDCARD_H)
4131                 #include <sys/soundcard.h>
4132         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
4133                 #include <machine/soundcard.h>
4134         #elif defined(HAVE_SOUNDCARD_H)
4135                 #include <soundcard.h>
4136         #endif
4137         
4138 int main() {
4139
4140
4141 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
4142 #if !defined(SNDCTL_SEQ_SYNC)
4143 #error No open sound system MIDI interface
4144 #endif
4145
4146 ; return 0; }
4147 EOF
4148 if { (eval echo configure:4149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4149   rm -rf conftest*
4150   ac_cv_c_opensoundsystem_midi="yes"
4151 else
4152   echo "configure: failed program was:" >&5
4153   cat conftest.$ac_ext >&5
4154   rm -rf conftest*
4155   ac_cv_c_opensoundsystem_midi="no"
4156 fi
4157 rm -f conftest*
4158 fi
4159
4160 echo "$ac_t""$ac_cv_c_opensoundsystem_midi" 1>&6
4161
4162 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
4163 then
4164     cat >> confdefs.h <<\EOF
4165 #define HAVE_OSS_MIDI 1
4166 EOF
4167
4168 fi
4169
4170 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
4171
4172
4173 if test "x${GCC}" = "xyes"
4174 then
4175   CFLAGS="$CFLAGS -Wall"
4176   echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
4177 echo "configure:4178: checking "for gcc strength-reduce bug"" >&5
4178 if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
4179   echo $ac_n "(cached) $ac_c" 1>&6
4180 else
4181   if test "$cross_compiling" = yes; then
4182   ac_cv_c_gcc_strength_bug="yes"
4183 else
4184   cat > conftest.$ac_ext <<EOF
4185 #line 4186 "configure"
4186 #include "confdefs.h"
4187
4188 int main(void) {
4189   static int Array[3];
4190   unsigned int B = 3;
4191   int i;
4192   for(i=0; i<B; i++) Array[i] = i - 3;
4193   exit( Array[1] != -2 );
4194 }
4195 EOF
4196 if { (eval echo configure:4197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4197 then
4198   ac_cv_c_gcc_strength_bug="no"
4199 else
4200   echo "configure: failed program was:" >&5
4201   cat conftest.$ac_ext >&5
4202   rm -fr conftest*
4203   ac_cv_c_gcc_strength_bug="yes"
4204 fi
4205 rm -fr conftest*
4206 fi
4207  
4208 fi
4209
4210 echo "$ac_t""$ac_cv_c_gcc_strength_bug" 1>&6
4211   if test "$ac_cv_c_gcc_strength_bug" = "yes"
4212   then
4213     CFLAGS="$CFLAGS -fno-strength-reduce"
4214   fi
4215 fi
4216
4217
4218 echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6
4219 echo "configure:4220: checking "whether external symbols need an underscore prefix"" >&5
4220 if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then
4221   echo $ac_n "(cached) $ac_c" 1>&6
4222 else
4223   saved_libs=$LIBS
4224 LIBS="conftest_asm.s $LIBS"
4225 cat > conftest_asm.s <<EOF
4226         .globl _ac_test
4227 _ac_test:
4228         .long 0
4229 EOF
4230 cat > conftest.$ac_ext <<EOF
4231 #line 4232 "configure"
4232 #include "confdefs.h"
4233 extern int ac_test;
4234 int main() {
4235 if (ac_test) return 1
4236 ; return 0; }
4237 EOF
4238 if { (eval echo configure:4239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4239   rm -rf conftest*
4240   ac_cv_c_extern_prefix="yes"
4241 else
4242   echo "configure: failed program was:" >&5
4243   cat conftest.$ac_ext >&5
4244   rm -rf conftest*
4245   ac_cv_c_extern_prefix="no"
4246 fi
4247 rm -f conftest*
4248 LIBS=$saved_libs
4249 fi
4250
4251 echo "$ac_t""$ac_cv_c_extern_prefix" 1>&6
4252 if test "$ac_cv_c_extern_prefix" = "yes"
4253 then
4254   cat >> confdefs.h <<\EOF
4255 #define NEED_UNDERSCORE_PREFIX 1
4256 EOF
4257
4258 fi
4259
4260
4261 echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6
4262 echo "configure:4263: checking "whether assembler accepts .string"" >&5
4263 if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then
4264   echo $ac_n "(cached) $ac_c" 1>&6
4265 else
4266   saved_libs=$LIBS
4267 LIBS="conftest_asm.s $LIBS"
4268 cat > conftest_asm.s <<EOF
4269         .string "test"
4270 EOF
4271 cat > conftest.$ac_ext <<EOF
4272 #line 4273 "configure"
4273 #include "confdefs.h"
4274
4275 int main() {
4276
4277 ; return 0; }
4278 EOF
4279 if { (eval echo configure:4280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4280   rm -rf conftest*
4281   ac_cv_c_asm_string="yes"
4282 else
4283   echo "configure: failed program was:" >&5
4284   cat conftest.$ac_ext >&5
4285   rm -rf conftest*
4286   ac_cv_c_asm_string="no"
4287 fi
4288 rm -f conftest*
4289 LIBS=$saved_libs
4290 fi
4291
4292 echo "$ac_t""$ac_cv_c_asm_string" 1>&6
4293 if test "$ac_cv_c_asm_string" = "yes"
4294 then
4295   cat >> confdefs.h <<\EOF
4296 #define HAVE_ASM_STRING 1
4297 EOF
4298
4299 fi
4300
4301
4302 LDSHARED=""
4303 if test "$LIBEXT" = "so"
4304 then
4305   echo $ac_n "checking "whether we can build a Linux dll"""... $ac_c" 1>&6
4306 echo "configure:4307: checking "whether we can build a Linux dll"" >&5
4307 if eval "test \"`echo '$''{'ac_cv_c_dll_linux'+set}'`\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   saved_cflags=$CFLAGS
4311   CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
4312   cat > conftest.$ac_ext <<EOF
4313 #line 4314 "configure"
4314 #include "confdefs.h"
4315
4316 int main() {
4317 return 1
4318 ; return 0; }
4319 EOF
4320 if { (eval echo configure:4321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4321   rm -rf conftest*
4322   ac_cv_c_dll_linux="yes"
4323 else
4324   echo "configure: failed program was:" >&5
4325   cat conftest.$ac_ext >&5
4326   rm -rf conftest*
4327   ac_cv_c_dll_linux="no"
4328 fi
4329 rm -f conftest*
4330   CFLAGS=$saved_cflags
4331   
4332 fi
4333
4334 echo "$ac_t""$ac_cv_c_dll_linux" 1>&6
4335   if test "$ac_cv_c_dll_linux" = "yes"
4336   then
4337     LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
4338   else
4339     echo $ac_n "checking whether we can build a UnixWare (Solaris) dll""... $ac_c" 1>&6
4340 echo "configure:4341: checking whether we can build a UnixWare (Solaris) dll" >&5
4341 if eval "test \"`echo '$''{'ac_cv_c_dll_unixware'+set}'`\" = set"; then
4342   echo $ac_n "(cached) $ac_c" 1>&6
4343 else
4344   saved_cflags=$CFLAGS
4345     CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
4346     cat > conftest.$ac_ext <<EOF
4347 #line 4348 "configure"
4348 #include "confdefs.h"
4349
4350 int main() {
4351 return 1
4352 ; return 0; }
4353 EOF
4354 if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4355   rm -rf conftest*
4356   ac_cv_c_dll_unixware="yes"
4357 else
4358   echo "configure: failed program was:" >&5
4359   cat conftest.$ac_ext >&5
4360   rm -rf conftest*
4361   ac_cv_c_dll_unixware="no"
4362 fi
4363 rm -f conftest*
4364     CFLAGS=$saved_cflags
4365     
4366 fi
4367
4368 echo "$ac_t""$ac_cv_c_dll_unixware" 1>&6
4369     if test "$ac_cv_c_dll_unixware" = "yes"
4370     then
4371       LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
4372     else
4373       echo $ac_n "checking "whether we can build a NetBSD dll"""... $ac_c" 1>&6
4374 echo "configure:4375: checking "whether we can build a NetBSD dll"" >&5
4375 if eval "test \"`echo '$''{'ac_cv_c_dll_netbsd'+set}'`\" = set"; then
4376   echo $ac_n "(cached) $ac_c" 1>&6
4377 else
4378   saved_cflags=$CFLAGS
4379       CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
4380       cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4383
4384 int main() {
4385 return 1
4386 ; return 0; }
4387 EOF
4388 if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4389   rm -rf conftest*
4390   ac_cv_c_dll_netbsd="yes"
4391 else
4392   echo "configure: failed program was:" >&5
4393   cat conftest.$ac_ext >&5
4394   rm -rf conftest*
4395   ac_cv_c_dll_netbsd="no"
4396 fi
4397 rm -f conftest*
4398       CFLAGS=$saved_cflags
4399       
4400 fi
4401
4402 echo "$ac_t""$ac_cv_c_dll_netbsd" 1>&6
4403       if test "$ac_cv_c_dll_netbsd" = "yes"
4404       then
4405         LDSHARED="ld -Bshareable -Bforcearchive"
4406       fi
4407     fi
4408   fi
4409   if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
4410   then
4411     LIBEXT="a"
4412   fi
4413 fi
4414
4415 DLLFLAGS=""
4416 BUILDFLAGS=""
4417 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine"
4418
4419 if test "$LIBEXT" = "so"; then
4420     BUILDFLAGS="-pic"
4421     DLLFLAGS="-fPIC"
4422 else
4423     echo $ac_n "checking whether the linker supports --[no]-whole-archive (Linux)""... $ac_c" 1>&6
4424 echo "configure:4425: checking whether the linker supports --[no]-whole-archive (Linux)" >&5
4425 if eval "test \"`echo '$''{'ac_cv_c_whole_archive'+set}'`\" = set"; then
4426   echo $ac_n "(cached) $ac_c" 1>&6
4427 else
4428   saved_cflags=$CFLAGS
4429             CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
4430             cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433
4434 int main() {
4435 return 1
4436 ; return 0; }
4437 EOF
4438 if { (eval echo configure:4439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4439   rm -rf conftest*
4440   ac_cv_c_whole_archive="yes"
4441 else
4442   echo "configure: failed program was:" >&5
4443   cat conftest.$ac_ext >&5
4444   rm -rf conftest*
4445   ac_cv_c_whole_archive="no"
4446 fi
4447 rm -f conftest*
4448             CFLAGS=$saved_cflags
4449             
4450 fi
4451
4452 echo "$ac_t""$ac_cv_c_whole_archive" 1>&6
4453     if test "$ac_cv_c_whole_archive" = "yes"
4454     then
4455         DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
4456     else
4457         echo $ac_n "checking whether the linker supports -z {all,default}extract (Linux)""... $ac_c" 1>&6
4458 echo "configure:4459: checking whether the linker supports -z {all,default}extract (Linux)" >&5
4459 if eval "test \"`echo '$''{'ac_cv_c_allextract'+set}'`\" = set"; then
4460   echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462   saved_cflags=$CFLAGS
4463                 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
4464                 cat > conftest.$ac_ext <<EOF
4465 #line 4466 "configure"
4466 #include "confdefs.h"
4467
4468 int main() {
4469 return 1
4470 ; return 0; }
4471 EOF
4472 if { (eval echo configure:4473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4473   rm -rf conftest*
4474   ac_cv_c_allextract="yes"
4475 else
4476   echo "configure: failed program was:" >&5
4477   cat conftest.$ac_ext >&5
4478   rm -rf conftest*
4479   ac_cv_c_allextract="no"
4480 fi
4481 rm -f conftest*
4482                 CFLAGS=$saved_cflags
4483                 
4484 fi
4485
4486 echo "$ac_t""$ac_cv_c_allextract" 1>&6
4487         if test "$ac_cv_c_allextract" = "yes"
4488         then
4489             DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
4490         fi
4491     fi
4492 fi
4493
4494
4495
4496
4497
4498
4499
4500
4501 wine_cv_libc_reentrant=no 
4502 echo $ac_n "checking "for reentrant libc: __errno_location"""... $ac_c" 1>&6
4503 echo "configure:4504: checking "for reentrant libc: __errno_location"" >&5
4504 if eval "test \"`echo '$''{'wine_cv_libc_r__errno_location'+set}'`\" = set"; then
4505   echo $ac_n "(cached) $ac_c" 1>&6
4506 else
4507   if test "$cross_compiling" = yes; then
4508   wine_cv_libc_r__errno_location=yes 
4509 else
4510   cat > conftest.$ac_ext <<EOF
4511 #line 4512 "configure"
4512 #include "confdefs.h"
4513 int myerrno = 0;
4514 char buf[256];
4515 int *__errno_location(){return &myerrno;}
4516 main(){connect(0,buf,255); exit(!myerrno);}
4517 EOF
4518 if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4519 then
4520   wine_cv_libc_r__errno_location=yes
4521 else
4522   echo "configure: failed program was:" >&5
4523   cat conftest.$ac_ext >&5
4524   rm -fr conftest*
4525   wine_cv_libc_r__errno_location=no
4526 fi
4527 rm -fr conftest*
4528 fi
4529
4530
4531 fi
4532
4533 echo "$ac_t""$wine_cv_libc_r__errno_location" 1>&6
4534 if test "$wine_cv_libc_r__errno_location" = "yes"
4535 then
4536     cat >> confdefs.h <<\EOF
4537 #define HAVE__ERRNO_LOCATION 1
4538 EOF
4539
4540     wine_cv_libc_reentrant=__errno_location 
4541 fi
4542 echo $ac_n "checking "for reentrant libc: __error"""... $ac_c" 1>&6
4543 echo "configure:4544: checking "for reentrant libc: __error"" >&5
4544 if eval "test \"`echo '$''{'wine_cv_libc_r__error'+set}'`\" = set"; then
4545   echo $ac_n "(cached) $ac_c" 1>&6
4546 else
4547   if test "$cross_compiling" = yes; then
4548   wine_cv_libc_r__error=yes 
4549 else
4550   cat > conftest.$ac_ext <<EOF
4551 #line 4552 "configure"
4552 #include "confdefs.h"
4553 int myerrno = 0;
4554 char buf[256];
4555 int *__error(){return &myerrno;}
4556 main(){connect(0,buf,255); exit(!myerrno);}
4557 EOF
4558 if { (eval echo configure:4559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4559 then
4560   wine_cv_libc_r__error=yes
4561 else
4562   echo "configure: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564   rm -fr conftest*
4565   wine_cv_libc_r__error=no
4566 fi
4567 rm -fr conftest*
4568 fi
4569
4570
4571 fi
4572
4573 echo "$ac_t""$wine_cv_libc_r__error" 1>&6
4574 if test "$wine_cv_libc_r__error" = "yes"
4575 then
4576     cat >> confdefs.h <<\EOF
4577 #define HAVE__ERROR 1
4578 EOF
4579
4580     wine_cv_libc_reentrant=__error 
4581 fi
4582 echo $ac_n "checking "for reentrant libc: ___errno"""... $ac_c" 1>&6
4583 echo "configure:4584: checking "for reentrant libc: ___errno"" >&5
4584 if eval "test \"`echo '$''{'wine_cv_libc_r___errno'+set}'`\" = set"; then
4585   echo $ac_n "(cached) $ac_c" 1>&6
4586 else
4587   if test "$cross_compiling" = yes; then
4588   wine_cv_libc_r___errno=yes 
4589 else
4590   cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 int myerrno = 0;
4594 char buf[256];
4595 int *___errno(){return &myerrno;}
4596 main(){connect(0,buf,255); exit(!myerrno);}
4597 EOF
4598 if { (eval echo configure:4599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4599 then
4600   wine_cv_libc_r___errno=yes
4601 else
4602   echo "configure: failed program was:" >&5
4603   cat conftest.$ac_ext >&5
4604   rm -fr conftest*
4605   wine_cv_libc_r___errno=no
4606 fi
4607 rm -fr conftest*
4608 fi
4609
4610
4611 fi
4612
4613 echo "$ac_t""$wine_cv_libc_r___errno" 1>&6
4614 if test "$wine_cv_libc_r___errno" = "yes"
4615 then
4616     cat >> confdefs.h <<\EOF
4617 #define HAVE___ERRNO 1
4618 EOF
4619
4620     wine_cv_libc_reentrant=___errno 
4621 fi
4622 echo $ac_n "checking "for reentrant libc: __thr_errno"""... $ac_c" 1>&6
4623 echo "configure:4624: checking "for reentrant libc: __thr_errno"" >&5
4624 if eval "test \"`echo '$''{'wine_cv_libc_r__thr_errno'+set}'`\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627   if test "$cross_compiling" = yes; then
4628   wine_cv_libc_r__thr_errno=yes 
4629 else
4630   cat > conftest.$ac_ext <<EOF
4631 #line 4632 "configure"
4632 #include "confdefs.h"
4633 int myerrno = 0;
4634 char buf[256];
4635 int *__thr_errno(){return &myerrno;}
4636 main(){connect(0,buf,255); exit(!myerrno);}
4637 EOF
4638 if { (eval echo configure:4639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4639 then
4640   wine_cv_libc_r__thr_errno=yes
4641 else
4642   echo "configure: failed program was:" >&5
4643   cat conftest.$ac_ext >&5
4644   rm -fr conftest*
4645   wine_cv_libc_r__thr_errno=no
4646 fi
4647 rm -fr conftest*
4648 fi
4649
4650
4651 fi
4652
4653 echo "$ac_t""$wine_cv_libc_r__thr_errno" 1>&6
4654 if test "$wine_cv_libc_r__thr_errno" = "yes"
4655 then
4656     cat >> confdefs.h <<\EOF
4657 #define HAVE__THR_ERRNO 1
4658 EOF
4659
4660     wine_cv_libc_reentrant=__thr_errno 
4661 fi
4662 if test "$wine_cv_libc_reentrant" = "no" 
4663 then
4664   cat >> confdefs.h <<\EOF
4665 #define NO_REENTRANT_LIBC 1
4666 EOF
4667
4668 fi
4669
4670
4671 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
4672 then
4673 echo $ac_n "checking "for reentrant X libraries"""... $ac_c" 1>&6
4674 echo "configure:4675: checking "for reentrant X libraries"" >&5
4675 if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then
4676   echo $ac_n "(cached) $ac_c" 1>&6
4677 else
4678    if test "x$with_reentrant_x" = "xno" 
4679     then
4680         wine_cv_x_reentrant=no
4681     else
4682         libX11_check=none
4683         for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
4684             if test -r $dir/libX11.so; then
4685                 libX11_check="-D $dir/libX11.so"
4686                 break 1
4687             fi
4688             if test -r $dir/libX11.a; then
4689                 libX11_check="$dir/libX11.a"
4690                 break 1
4691             fi
4692         done
4693         if test "$libX11_check" != "none"; then
4694             if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
4695             then
4696                 wine_cv_x_reentrant=yes
4697             else
4698                 wine_cv_x_reentrant=no
4699             fi
4700         else
4701             wine_cv_x_reentrant=unknown
4702         fi
4703     fi  
4704 fi
4705
4706 echo "$ac_t""$wine_cv_x_reentrant" 1>&6
4707 else
4708     wine_cv_x_reentrant=no
4709 fi
4710 if test "$wine_cv_x_reentrant" = "no"
4711 then
4712   cat >> confdefs.h <<\EOF
4713 #define NO_REENTRANT_X11 1
4714 EOF
4715
4716 fi
4717
4718
4719 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4720 echo "configure:4721: checking whether byte ordering is bigendian" >&5
4721 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
4722   echo $ac_n "(cached) $ac_c" 1>&6
4723 else
4724   ac_cv_c_bigendian=unknown
4725 # See if sys/param.h defines the BYTE_ORDER macro.
4726 cat > conftest.$ac_ext <<EOF
4727 #line 4728 "configure"
4728 #include "confdefs.h"
4729 #include <sys/types.h>
4730 #include <sys/param.h>
4731 int main() {
4732
4733 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4734  bogus endian macros
4735 #endif
4736 ; return 0; }
4737 EOF
4738 if { (eval echo configure:4739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4739   rm -rf conftest*
4740   # It does; now see whether it defined to BIG_ENDIAN or not.
4741 cat > conftest.$ac_ext <<EOF
4742 #line 4743 "configure"
4743 #include "confdefs.h"
4744 #include <sys/types.h>
4745 #include <sys/param.h>
4746 int main() {
4747
4748 #if BYTE_ORDER != BIG_ENDIAN
4749  not big endian
4750 #endif
4751 ; return 0; }
4752 EOF
4753 if { (eval echo configure:4754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4754   rm -rf conftest*
4755   ac_cv_c_bigendian=yes
4756 else
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   ac_cv_c_bigendian=no
4761 fi
4762 rm -f conftest*
4763 else
4764   echo "configure: failed program was:" >&5
4765   cat conftest.$ac_ext >&5
4766 fi
4767 rm -f conftest*
4768 if test $ac_cv_c_bigendian = unknown; then
4769 if test "$cross_compiling" = yes; then
4770     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4771 else
4772   cat > conftest.$ac_ext <<EOF
4773 #line 4774 "configure"
4774 #include "confdefs.h"
4775 main () {
4776   /* Are we little or big endian?  From Harbison&Steele.  */
4777   union
4778   {
4779     long l;
4780     char c[sizeof (long)];
4781   } u;
4782   u.l = 1;
4783   exit (u.c[sizeof (long) - 1] == 1);
4784 }
4785 EOF
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4787 then
4788   ac_cv_c_bigendian=no
4789 else
4790   echo "configure: failed program was:" >&5
4791   cat conftest.$ac_ext >&5
4792   rm -fr conftest*
4793   ac_cv_c_bigendian=yes
4794 fi
4795 rm -fr conftest*
4796 fi
4797
4798 fi
4799 fi
4800
4801 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4802 if test $ac_cv_c_bigendian = yes; then
4803   cat >> confdefs.h <<\EOF
4804 #define WORDS_BIGENDIAN 1
4805 EOF
4806
4807 fi
4808
4809
4810
4811 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4812 # for constant arguments.  Useless!
4813 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4814 echo "configure:4815: checking for working alloca.h" >&5
4815 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4816   echo $ac_n "(cached) $ac_c" 1>&6
4817 else
4818   cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821 #include <alloca.h>
4822 int main() {
4823 void *p = alloca(2 * sizeof(int));
4824 ; return 0; }
4825 EOF
4826 if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4827   rm -rf conftest*
4828   ac_cv_header_alloca_h=yes
4829 else
4830   echo "configure: failed program was:" >&5
4831   cat conftest.$ac_ext >&5
4832   rm -rf conftest*
4833   ac_cv_header_alloca_h=no
4834 fi
4835 rm -f conftest*
4836 fi
4837
4838 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4839 if test $ac_cv_header_alloca_h = yes; then
4840   cat >> confdefs.h <<\EOF
4841 #define HAVE_ALLOCA_H 1
4842 EOF
4843
4844 fi
4845
4846 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4847 echo "configure:4848: checking for alloca" >&5
4848 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4849   echo $ac_n "(cached) $ac_c" 1>&6
4850 else
4851   cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854
4855 #ifdef __GNUC__
4856 # define alloca __builtin_alloca
4857 #else
4858 # ifdef _MSC_VER
4859 #  include <malloc.h>
4860 #  define alloca _alloca
4861 # else
4862 #  if HAVE_ALLOCA_H
4863 #   include <alloca.h>
4864 #  else
4865 #   ifdef _AIX
4866  #pragma alloca
4867 #   else
4868 #    ifndef alloca /* predefined by HP cc +Olibcalls */
4869 char *alloca ();
4870 #    endif
4871 #   endif
4872 #  endif
4873 # endif
4874 #endif
4875
4876 int main() {
4877 char *p = (char *) alloca(1);
4878 ; return 0; }
4879 EOF
4880 if { (eval echo configure:4881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4881   rm -rf conftest*
4882   ac_cv_func_alloca_works=yes
4883 else
4884   echo "configure: failed program was:" >&5
4885   cat conftest.$ac_ext >&5
4886   rm -rf conftest*
4887   ac_cv_func_alloca_works=no
4888 fi
4889 rm -f conftest*
4890 fi
4891
4892 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4893 if test $ac_cv_func_alloca_works = yes; then
4894   cat >> confdefs.h <<\EOF
4895 #define HAVE_ALLOCA 1
4896 EOF
4897
4898 fi
4899
4900 if test $ac_cv_func_alloca_works = no; then
4901   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4902   # that cause trouble.  Some versions do not even contain alloca or
4903   # contain a buggy version.  If you still want to use their alloca,
4904   # use ar to extract alloca.o from them instead of compiling alloca.c.
4905   ALLOCA=alloca.${ac_objext}
4906   cat >> confdefs.h <<\EOF
4907 #define C_ALLOCA 1
4908 EOF
4909
4910
4911 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4912 echo "configure:4913: checking whether alloca needs Cray hooks" >&5
4913 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916   cat > conftest.$ac_ext <<EOF
4917 #line 4918 "configure"
4918 #include "confdefs.h"
4919 #if defined(CRAY) && ! defined(CRAY2)
4920 webecray
4921 #else
4922 wenotbecray
4923 #endif
4924
4925 EOF
4926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4927   egrep "webecray" >/dev/null 2>&1; then
4928   rm -rf conftest*
4929   ac_cv_os_cray=yes
4930 else
4931   rm -rf conftest*
4932   ac_cv_os_cray=no
4933 fi
4934 rm -f conftest*
4935
4936 fi
4937
4938 echo "$ac_t""$ac_cv_os_cray" 1>&6
4939 if test $ac_cv_os_cray = yes; then
4940 for ac_func in _getb67 GETB67 getb67; do
4941   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4942 echo "configure:4943: checking for $ac_func" >&5
4943 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4944   echo $ac_n "(cached) $ac_c" 1>&6
4945 else
4946   cat > conftest.$ac_ext <<EOF
4947 #line 4948 "configure"
4948 #include "confdefs.h"
4949 /* System header to define __stub macros and hopefully few prototypes,
4950     which can conflict with char $ac_func(); below.  */
4951 #include <assert.h>
4952 /* Override any gcc2 internal prototype to avoid an error.  */
4953 /* We use char because int might match the return type of a gcc2
4954     builtin and then its argument prototype would still apply.  */
4955 char $ac_func();
4956
4957 int main() {
4958
4959 /* The GNU C library defines this for functions which it implements
4960     to always fail with ENOSYS.  Some functions are actually named
4961     something starting with __ and the normal name is an alias.  */
4962 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4963 choke me
4964 #else
4965 $ac_func();
4966 #endif
4967
4968 ; return 0; }
4969 EOF
4970 if { (eval echo configure:4971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4971   rm -rf conftest*
4972   eval "ac_cv_func_$ac_func=yes"
4973 else
4974   echo "configure: failed program was:" >&5
4975   cat conftest.$ac_ext >&5
4976   rm -rf conftest*
4977   eval "ac_cv_func_$ac_func=no"
4978 fi
4979 rm -f conftest*
4980 fi
4981
4982 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4983   echo "$ac_t""yes" 1>&6
4984   cat >> confdefs.h <<EOF
4985 #define CRAY_STACKSEG_END $ac_func
4986 EOF
4987
4988   break
4989 else
4990   echo "$ac_t""no" 1>&6
4991 fi
4992
4993 done
4994 fi
4995
4996 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4997 echo "configure:4998: checking stack direction for C alloca" >&5
4998 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4999   echo $ac_n "(cached) $ac_c" 1>&6
5000 else
5001   if test "$cross_compiling" = yes; then
5002   ac_cv_c_stack_direction=0
5003 else
5004   cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 find_stack_direction ()
5008 {
5009   static char *addr = 0;
5010   auto char dummy;
5011   if (addr == 0)
5012     {
5013       addr = &dummy;
5014       return find_stack_direction ();
5015     }
5016   else
5017     return (&dummy > addr) ? 1 : -1;
5018 }
5019 main ()
5020 {
5021   exit (find_stack_direction() < 0);
5022 }
5023 EOF
5024 if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5025 then
5026   ac_cv_c_stack_direction=1
5027 else
5028   echo "configure: failed program was:" >&5
5029   cat conftest.$ac_ext >&5
5030   rm -fr conftest*
5031   ac_cv_c_stack_direction=-1
5032 fi
5033 rm -fr conftest*
5034 fi
5035
5036 fi
5037
5038 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5039 cat >> confdefs.h <<EOF
5040 #define STACK_DIRECTION $ac_cv_c_stack_direction
5041 EOF
5042
5043 fi
5044
5045 for ac_func in \
5046         _lwp_create \
5047         clone \
5048         getnetbyaddr \
5049         getnetbyname \
5050         getpagesize \
5051         getprotobyname \
5052         getprotobynumber \
5053         getservbyport \
5054         getsockopt \
5055         inet_network \
5056         memmove \
5057         rfork \
5058         select \
5059         sendmsg \
5060         settimeofday \
5061         sigaltstack \
5062         statfs \
5063         strcasecmp \
5064         strerror \
5065         strncasecmp \
5066         tcgetattr \
5067         timegm \
5068         usleep \
5069         vfscanf \
5070         wait4 \
5071         waitpid \
5072
5073 do
5074 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5075 echo "configure:5076: checking for $ac_func" >&5
5076 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5077   echo $ac_n "(cached) $ac_c" 1>&6
5078 else
5079   cat > conftest.$ac_ext <<EOF
5080 #line 5081 "configure"
5081 #include "confdefs.h"
5082 /* System header to define __stub macros and hopefully few prototypes,
5083     which can conflict with char $ac_func(); below.  */
5084 #include <assert.h>
5085 /* Override any gcc2 internal prototype to avoid an error.  */
5086 /* We use char because int might match the return type of a gcc2
5087     builtin and then its argument prototype would still apply.  */
5088 char $ac_func();
5089
5090 int main() {
5091
5092 /* The GNU C library defines this for functions which it implements
5093     to always fail with ENOSYS.  Some functions are actually named
5094     something starting with __ and the normal name is an alias.  */
5095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5096 choke me
5097 #else
5098 $ac_func();
5099 #endif
5100
5101 ; return 0; }
5102 EOF
5103 if { (eval echo configure:5104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5104   rm -rf conftest*
5105   eval "ac_cv_func_$ac_func=yes"
5106 else
5107   echo "configure: failed program was:" >&5
5108   cat conftest.$ac_ext >&5
5109   rm -rf conftest*
5110   eval "ac_cv_func_$ac_func=no"
5111 fi
5112 rm -f conftest*
5113 fi
5114
5115 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5116   echo "$ac_t""yes" 1>&6
5117     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5118   cat >> confdefs.h <<EOF
5119 #define $ac_tr_func 1
5120 EOF
5121  
5122 else
5123   echo "$ac_t""no" 1>&6
5124 fi
5125 done
5126
5127
5128
5129 for ac_hdr in \
5130         a.out.h \
5131         a_out.h \
5132         arpa/inet.h \
5133         arpa/nameser.h \
5134         curses.h \
5135         elf.h \
5136         float.h \
5137         libio.h \
5138         link.h \
5139         linux/cdrom.h \
5140         linux/joystick.h \
5141         linux/ucdrom.h \
5142         ncurses.h \
5143         net/if.h \
5144         netinet/in.h \
5145         netinet/tcp.h \
5146         pty.h \
5147         resolv.h \
5148         sched.h \
5149         socket.h \
5150         strings.h \
5151         sys/cdio.h \
5152         sys/errno.h \
5153         sys/file.h \
5154         sys/filio.h \
5155         sys/ipc.h \
5156         sys/lwp.h \
5157         sys/mman.h \
5158         sys/modem.h \
5159         sys/mount.h \
5160         sys/msg.h \
5161         sys/param.h \
5162         sys/reg.h \
5163         sys/signal.h \
5164         sys/shm.h \
5165         sys/socket.h \
5166         sys/sockio.h \
5167         sys/statfs.h \
5168         sys/strtio.h \
5169         sys/syscall.h \
5170         sys/wait.h \
5171         sys/v86.h \
5172         sys/v86intr.h \
5173         sys/vfs.h \
5174         sys/vm86.h \
5175         syscall.h \
5176         ucontext.h \
5177         wctype.h \
5178
5179 do
5180 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5181 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5182 echo "configure:5183: checking for $ac_hdr" >&5
5183 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5184   echo $ac_n "(cached) $ac_c" 1>&6
5185 else
5186   cat > conftest.$ac_ext <<EOF
5187 #line 5188 "configure"
5188 #include "confdefs.h"
5189 #include <$ac_hdr>
5190 EOF
5191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5192 { (eval echo configure:5193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5194 if test -z "$ac_err"; then
5195   rm -rf conftest*
5196   eval "ac_cv_header_$ac_safe=yes"
5197 else
5198   echo "$ac_err" >&5
5199   echo "configure: failed program was:" >&5
5200   cat conftest.$ac_ext >&5
5201   rm -rf conftest*
5202   eval "ac_cv_header_$ac_safe=no"
5203 fi
5204 rm -f conftest*
5205 fi
5206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5207   echo "$ac_t""yes" 1>&6
5208     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5209   cat >> confdefs.h <<EOF
5210 #define $ac_tr_hdr 1
5211 EOF
5212  
5213 else
5214   echo "$ac_t""no" 1>&6
5215 fi
5216 done
5217
5218 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
5219 echo "configure:5220: checking whether stat file-mode macros are broken" >&5
5220 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
5221   echo $ac_n "(cached) $ac_c" 1>&6
5222 else
5223   cat > conftest.$ac_ext <<EOF
5224 #line 5225 "configure"
5225 #include "confdefs.h"
5226 #include <sys/types.h>
5227 #include <sys/stat.h>
5228
5229 #if defined(S_ISBLK) && defined(S_IFDIR)
5230 # if S_ISBLK (S_IFDIR)
5231 You lose.
5232 # endif
5233 #endif
5234
5235 #if defined(S_ISBLK) && defined(S_IFCHR)
5236 # if S_ISBLK (S_IFCHR)
5237 You lose.
5238 # endif
5239 #endif
5240
5241 #if defined(S_ISLNK) && defined(S_IFREG)
5242 # if S_ISLNK (S_IFREG)
5243 You lose.
5244 # endif
5245 #endif
5246
5247 #if defined(S_ISSOCK) && defined(S_IFREG)
5248 # if S_ISSOCK (S_IFREG)
5249 You lose.
5250 # endif
5251 #endif
5252
5253 EOF
5254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5255   egrep "You lose" >/dev/null 2>&1; then
5256   rm -rf conftest*
5257   ac_cv_header_stat_broken=yes
5258 else
5259   rm -rf conftest*
5260   ac_cv_header_stat_broken=no
5261 fi
5262 rm -f conftest*
5263
5264 fi
5265
5266 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
5267 if test $ac_cv_header_stat_broken = yes; then
5268   cat >> confdefs.h <<\EOF
5269 #define STAT_MACROS_BROKEN 1
5270 EOF
5271
5272 fi
5273
5274
5275
5276 echo $ac_n "checking for working const""... $ac_c" 1>&6
5277 echo "configure:5278: checking for working const" >&5
5278 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5279   echo $ac_n "(cached) $ac_c" 1>&6
5280 else
5281   cat > conftest.$ac_ext <<EOF
5282 #line 5283 "configure"
5283 #include "confdefs.h"
5284
5285 int main() {
5286
5287 /* Ultrix mips cc rejects this.  */
5288 typedef int charset[2]; const charset x = {0,0};
5289 /* SunOS 4.1.1 cc rejects this.  */
5290 char const *const *ccp;
5291 char **p;
5292 /* NEC SVR4.0.2 mips cc rejects this.  */
5293 struct point {int x, y;};
5294 static struct point const zero = {0,0};
5295 /* AIX XL C 1.02.0.0 rejects this.
5296    It does not let you subtract one const X* pointer from another in an arm
5297    of an if-expression whose if-part is not a constant expression */
5298 const char *g = "string";
5299 ccp = &g + (g ? g-g : 0);
5300 /* HPUX 7.0 cc rejects these. */
5301 ++ccp;
5302 p = (char**) ccp;
5303 ccp = (char const *const *) p;
5304 { /* SCO 3.2v4 cc rejects this.  */
5305   char *t;
5306   char const *s = 0 ? (char *) 0 : (char const *) 0;
5307
5308   *t++ = 0;
5309 }
5310 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5311   int x[] = {25, 17};
5312   const int *foo = &x[0];
5313   ++foo;
5314 }
5315 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5316   typedef const int *iptr;
5317   iptr p = 0;
5318   ++p;
5319 }
5320 { /* AIX XL C 1.02.0.0 rejects this saying
5321      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5322   struct s { int j; const int *ap[3]; };
5323   struct s *b; b->j = 5;
5324 }
5325 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5326   const int foo = 10;
5327 }
5328
5329 ; return 0; }
5330 EOF
5331 if { (eval echo configure:5332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5332   rm -rf conftest*
5333   ac_cv_c_const=yes
5334 else
5335   echo "configure: failed program was:" >&5
5336   cat conftest.$ac_ext >&5
5337   rm -rf conftest*
5338   ac_cv_c_const=no
5339 fi
5340 rm -f conftest*
5341 fi
5342
5343 echo "$ac_t""$ac_cv_c_const" 1>&6
5344 if test $ac_cv_c_const = no; then
5345   cat >> confdefs.h <<\EOF
5346 #define const 
5347 EOF
5348
5349 fi
5350
5351 echo $ac_n "checking for inline""... $ac_c" 1>&6
5352 echo "configure:5353: checking for inline" >&5
5353 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5354   echo $ac_n "(cached) $ac_c" 1>&6
5355 else
5356   ac_cv_c_inline=no
5357 for ac_kw in inline __inline__ __inline; do
5358   cat > conftest.$ac_ext <<EOF
5359 #line 5360 "configure"
5360 #include "confdefs.h"
5361
5362 int main() {
5363 } int $ac_kw foo() {
5364 ; return 0; }
5365 EOF
5366 if { (eval echo configure:5367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5367   rm -rf conftest*
5368   ac_cv_c_inline=$ac_kw; break
5369 else
5370   echo "configure: failed program was:" >&5
5371   cat conftest.$ac_ext >&5
5372 fi
5373 rm -f conftest*
5374 done
5375
5376 fi
5377
5378 echo "$ac_t""$ac_cv_c_inline" 1>&6
5379 case "$ac_cv_c_inline" in
5380   inline | yes) ;;
5381   no) cat >> confdefs.h <<\EOF
5382 #define inline 
5383 EOF
5384  ;;
5385   *)  cat >> confdefs.h <<EOF
5386 #define inline $ac_cv_c_inline
5387 EOF
5388  ;;
5389 esac
5390
5391 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5392 echo "configure:5393: checking for ANSI C header files" >&5
5393 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5394   echo $ac_n "(cached) $ac_c" 1>&6
5395 else
5396   cat > conftest.$ac_ext <<EOF
5397 #line 5398 "configure"
5398 #include "confdefs.h"
5399 #include <stdlib.h>
5400 #include <stdarg.h>
5401 #include <string.h>
5402 #include <float.h>
5403 EOF
5404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5405 { (eval echo configure:5406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5407 if test -z "$ac_err"; then
5408   rm -rf conftest*
5409   ac_cv_header_stdc=yes
5410 else
5411   echo "$ac_err" >&5
5412   echo "configure: failed program was:" >&5
5413   cat conftest.$ac_ext >&5
5414   rm -rf conftest*
5415   ac_cv_header_stdc=no
5416 fi
5417 rm -f conftest*
5418
5419 if test $ac_cv_header_stdc = yes; then
5420   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5421 cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424 #include <string.h>
5425 EOF
5426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5427   egrep "memchr" >/dev/null 2>&1; then
5428   :
5429 else
5430   rm -rf conftest*
5431   ac_cv_header_stdc=no
5432 fi
5433 rm -f conftest*
5434
5435 fi
5436
5437 if test $ac_cv_header_stdc = yes; then
5438   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5439 cat > conftest.$ac_ext <<EOF
5440 #line 5441 "configure"
5441 #include "confdefs.h"
5442 #include <stdlib.h>
5443 EOF
5444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5445   egrep "free" >/dev/null 2>&1; then
5446   :
5447 else
5448   rm -rf conftest*
5449   ac_cv_header_stdc=no
5450 fi
5451 rm -f conftest*
5452
5453 fi
5454
5455 if test $ac_cv_header_stdc = yes; then
5456   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5457 if test "$cross_compiling" = yes; then
5458   :
5459 else
5460   cat > conftest.$ac_ext <<EOF
5461 #line 5462 "configure"
5462 #include "confdefs.h"
5463 #include <ctype.h>
5464 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5465 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5466 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5467 int main () { int i; for (i = 0; i < 256; i++)
5468 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5469 exit (0); }
5470
5471 EOF
5472 if { (eval echo configure:5473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5473 then
5474   :
5475 else
5476   echo "configure: failed program was:" >&5
5477   cat conftest.$ac_ext >&5
5478   rm -fr conftest*
5479   ac_cv_header_stdc=no
5480 fi
5481 rm -fr conftest*
5482 fi
5483
5484 fi
5485 fi
5486
5487 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5488 if test $ac_cv_header_stdc = yes; then
5489   cat >> confdefs.h <<\EOF
5490 #define STDC_HEADERS 1
5491 EOF
5492
5493 fi
5494
5495 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5496 echo "configure:5497: checking for size_t" >&5
5497 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5498   echo $ac_n "(cached) $ac_c" 1>&6
5499 else
5500   cat > conftest.$ac_ext <<EOF
5501 #line 5502 "configure"
5502 #include "confdefs.h"
5503 #include <sys/types.h>
5504 #if STDC_HEADERS
5505 #include <stdlib.h>
5506 #include <stddef.h>
5507 #endif
5508 EOF
5509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5510   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5511   rm -rf conftest*
5512   ac_cv_type_size_t=yes
5513 else
5514   rm -rf conftest*
5515   ac_cv_type_size_t=no
5516 fi
5517 rm -f conftest*
5518
5519 fi
5520 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5521 if test $ac_cv_type_size_t = no; then
5522   cat >> confdefs.h <<\EOF
5523 #define size_t unsigned
5524 EOF
5525
5526 fi
5527
5528 echo $ac_n "checking size of long long""... $ac_c" 1>&6
5529 echo "configure:5530: checking size of long long" >&5
5530 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
5531   echo $ac_n "(cached) $ac_c" 1>&6
5532 else
5533   if test "$cross_compiling" = yes; then
5534   ac_cv_sizeof_long_long=0
5535 else
5536   cat > conftest.$ac_ext <<EOF
5537 #line 5538 "configure"
5538 #include "confdefs.h"
5539 #include <stdio.h>
5540 main()
5541 {
5542   FILE *f=fopen("conftestval", "w");
5543   if (!f) exit(1);
5544   fprintf(f, "%d\n", sizeof(long long));
5545   exit(0);
5546 }
5547 EOF
5548 if { (eval echo configure:5549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5549 then
5550   ac_cv_sizeof_long_long=`cat conftestval`
5551 else
5552   echo "configure: failed program was:" >&5
5553   cat conftest.$ac_ext >&5
5554   rm -fr conftest*
5555   ac_cv_sizeof_long_long=0
5556 fi
5557 rm -fr conftest*
5558 fi
5559
5560 fi
5561 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
5562 cat >> confdefs.h <<EOF
5563 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5564 EOF
5565
5566
5567
5568 if test "$ac_cv_header_linux_joystick_h" = "yes"
5569 then
5570    echo $ac_n "checking "whether linux/joystick.h uses the Linux 2.2+ API"""... $ac_c" 1>&6
5571 echo "configure:5572: checking "whether linux/joystick.h uses the Linux 2.2+ API"" >&5
5572 if eval "test \"`echo '$''{'wine_cv_linux_joystick_22_api'+set}'`\" = set"; then
5573   echo $ac_n "(cached) $ac_c" 1>&6
5574 else
5575   cat > conftest.$ac_ext <<EOF
5576 #line 5577 "configure"
5577 #include "confdefs.h"
5578
5579         #include <sys/ioctl.h>
5580         #include <linux/joystick.h>
5581
5582         struct js_event blub;
5583         #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
5584         #error "no 2.2 header"
5585         #endif
5586         
5587 int main() {
5588 /*empty*/
5589 ; return 0; }
5590 EOF
5591 if { (eval echo configure:5592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5592   rm -rf conftest*
5593   wine_cv_linux_joystick_22_api=yes
5594 else
5595   echo "configure: failed program was:" >&5
5596   cat conftest.$ac_ext >&5
5597   rm -rf conftest*
5598   wine_cv_linux_joystick_22_api=no
5599 fi
5600 rm -f conftest*
5601    
5602 fi
5603
5604 echo "$ac_t""$wine_cv_linux_joystick_22_api" 1>&6
5605    if test "$wine_cv_linux_joystick_22_api"
5606    then
5607       cat >> confdefs.h <<\EOF
5608 #define HAVE_LINUX_22_JOYSTICK_API 1
5609 EOF
5610
5611    fi
5612 fi
5613
5614
5615 if test "$ac_cv_header_sys_vfs_h" = "yes"
5616 then
5617     echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6
5618 echo "configure:5619: checking "whether sys/vfs.h defines statfs"" >&5
5619 if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then
5620   echo $ac_n "(cached) $ac_c" 1>&6
5621 else
5622   cat > conftest.$ac_ext <<EOF
5623 #line 5624 "configure"
5624 #include "confdefs.h"
5625
5626         #include <sys/types.h>
5627         #ifdef HAVE_SYS_PARAM_H
5628         # include <sys/param.h>
5629         #endif
5630         #include <sys/vfs.h>
5631         
5632 int main() {
5633
5634                 struct statfs stfs;
5635
5636                 memset(&stfs,0,sizeof(stfs));
5637         
5638 ; return 0; }
5639 EOF
5640 if { (eval echo configure:5641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5641   rm -rf conftest*
5642   wine_cv_sys_vfs_has_statfs=yes
5643 else
5644   echo "configure: failed program was:" >&5
5645   cat conftest.$ac_ext >&5
5646   rm -rf conftest*
5647   wine_cv_sys_vfs_has_statfs=no
5648         
5649 fi
5650 rm -f conftest*
5651     
5652 fi
5653
5654 echo "$ac_t""$wine_cv_sys_vfs_has_statfs" 1>&6
5655     if test "$wine_cv_sys_vfs_has_statfs" = "yes"
5656     then
5657       cat >> confdefs.h <<\EOF
5658 #define STATFS_DEFINED_BY_SYS_VFS 1
5659 EOF
5660
5661     fi
5662 fi
5663
5664 if test "$ac_cv_header_sys_statfs_h" = "yes"
5665 then
5666     echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6
5667 echo "configure:5668: checking "whether sys/statfs.h defines statfs"" >&5
5668 if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then
5669   echo $ac_n "(cached) $ac_c" 1>&6
5670 else
5671   cat > conftest.$ac_ext <<EOF
5672 #line 5673 "configure"
5673 #include "confdefs.h"
5674
5675         #include <sys/types.h>
5676         #ifdef HAVE_SYS_PARAM_H
5677         # include <sys/param.h>
5678         #endif
5679         #include <sys/statfs.h>
5680         
5681 int main() {
5682
5683                 struct statfs stfs;
5684         
5685 ; return 0; }
5686 EOF
5687 if { (eval echo configure:5688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5688   rm -rf conftest*
5689   wine_cv_sys_statfs_has_statfs=yes
5690 else
5691   echo "configure: failed program was:" >&5
5692   cat conftest.$ac_ext >&5
5693   rm -rf conftest*
5694   wine_cv_sys_statfs_has_statfs=no
5695         
5696 fi
5697 rm -f conftest*
5698     
5699 fi
5700
5701 echo "$ac_t""$wine_cv_sys_statfs_has_statfs" 1>&6
5702     if test "$wine_cv_sys_statfs_has_statfs" = "yes"
5703     then
5704       cat >> confdefs.h <<\EOF
5705 #define STATFS_DEFINED_BY_SYS_STATFS 1
5706 EOF
5707
5708     fi
5709 fi
5710
5711 if test "$ac_cv_header_sys_mount_h" = "yes"
5712 then
5713     echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6
5714 echo "configure:5715: checking "whether sys/mount.h defines statfs"" >&5
5715 if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then
5716   echo $ac_n "(cached) $ac_c" 1>&6
5717 else
5718   cat > conftest.$ac_ext <<EOF
5719 #line 5720 "configure"
5720 #include "confdefs.h"
5721
5722         #include <sys/types.h>
5723         #ifdef HAVE_SYS_PARAM_H
5724         # include <sys/param.h>
5725         #endif
5726         #include <sys/mount.h>
5727         
5728 int main() {
5729
5730                 struct statfs stfs;
5731         
5732 ; return 0; }
5733 EOF
5734 if { (eval echo configure:5735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5735   rm -rf conftest*
5736   wine_cv_sys_mount_has_statfs=yes
5737 else
5738   echo "configure: failed program was:" >&5
5739   cat conftest.$ac_ext >&5
5740   rm -rf conftest*
5741   wine_cv_sys_mount_has_statfs=no
5742         
5743 fi
5744 rm -f conftest*
5745     
5746 fi
5747
5748 echo "$ac_t""$wine_cv_sys_mount_has_statfs" 1>&6
5749     if test "$wine_cv_sys_mount_has_statfs" = "yes"
5750     then
5751       cat >> confdefs.h <<\EOF
5752 #define STATFS_DEFINED_BY_SYS_MOUNT 1
5753 EOF
5754
5755     fi
5756 fi
5757
5758
5759 echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6
5760 echo "configure:5761: checking "for statfs.f_bfree"" >&5
5761 if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then
5762   echo $ac_n "(cached) $ac_c" 1>&6
5763 else
5764    if test "x$statfs_bfree" = "xno"
5765     then
5766         wine_cv_statfs_bfree=no
5767     else
5768         cat > conftest.$ac_ext <<EOF
5769 #line 5770 "configure"
5770 #include "confdefs.h"
5771
5772         #include <sys/types.h>
5773         #ifdef HAVE_SYS_PARAM_H
5774         # include <sys/param.h>
5775         #endif
5776         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
5777         # include <sys/mount.h>
5778         #else
5779         # ifdef STATFS_DEFINED_BY_SYS_VFS
5780         #  include <sys/vfs.h>
5781         # else
5782         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
5783         #   include <sys/statfs.h>
5784         #  endif
5785         # endif
5786         #endif
5787         
5788 int main() {
5789
5790                 struct statfs stfs;
5791
5792                 stfs.f_bfree++;
5793         
5794 ; return 0; }
5795 EOF
5796 if { (eval echo configure:5797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5797   rm -rf conftest*
5798   wine_cv_statfs_bfree=yes
5799 else
5800   echo "configure: failed program was:" >&5
5801   cat conftest.$ac_ext >&5
5802   rm -rf conftest*
5803   wine_cv_statfs_bfree=no
5804         
5805 fi
5806 rm -f conftest*
5807     fi  
5808 fi
5809
5810 echo "$ac_t""$wine_cv_statfs_bfree" 1>&6
5811 if test "$wine_cv_statfs_bfree" = "yes"
5812 then
5813   cat >> confdefs.h <<\EOF
5814 #define STATFS_HAS_BFREE 1
5815 EOF
5816
5817 fi
5818
5819 echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6
5820 echo "configure:5821: checking "for statfs.f_bavail"" >&5
5821 if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then
5822   echo $ac_n "(cached) $ac_c" 1>&6
5823 else
5824    if test "x$statfs_bavail" = "xno"
5825     then
5826         wine_cv_statfs_bavail=no
5827     else
5828         cat > conftest.$ac_ext <<EOF
5829 #line 5830 "configure"
5830 #include "confdefs.h"
5831
5832         #include <sys/types.h>
5833         #ifdef HAVE_SYS_PARAM_H
5834         # include <sys/param.h>
5835         #endif
5836         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
5837         # include <sys/mount.h>
5838         #else
5839         # ifdef STATFS_DEFINED_BY_SYS_VFS
5840         #  include <sys/vfs.h>
5841         # else
5842         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
5843         #   include <sys/statfs.h>
5844         #  endif
5845         # endif
5846         #endif
5847         
5848 int main() {
5849
5850                 struct statfs stfs;
5851
5852                 stfs.f_bavail++;
5853         
5854 ; return 0; }
5855 EOF
5856 if { (eval echo configure:5857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5857   rm -rf conftest*
5858   wine_cv_statfs_bavail=yes
5859 else
5860   echo "configure: failed program was:" >&5
5861   cat conftest.$ac_ext >&5
5862   rm -rf conftest*
5863   wine_cv_statfs_bavail=no
5864         
5865 fi
5866 rm -f conftest*
5867     fi  
5868 fi
5869
5870 echo "$ac_t""$wine_cv_statfs_bavail" 1>&6
5871 if test "$wine_cv_statfs_bavail" = "yes"
5872 then
5873   cat >> confdefs.h <<\EOF
5874 #define STATFS_HAS_BAVAIL 1
5875 EOF
5876
5877 fi
5878
5879
5880 echo $ac_n "checking "for working sigaltstack"""... $ac_c" 1>&6
5881 echo "configure:5882: checking "for working sigaltstack"" >&5
5882 if eval "test \"`echo '$''{'ac_cv_c_working_sigaltstack'+set}'`\" = set"; then
5883   echo $ac_n "(cached) $ac_c" 1>&6
5884 else
5885   if test "$cross_compiling" = yes; then
5886   ac_cv_c_working_sigaltstack="no"
5887
5888 else
5889   cat > conftest.$ac_ext <<EOF
5890 #line 5891 "configure"
5891 #include "confdefs.h"
5892
5893         #include <stdio.h>
5894         #include <time.h> /* <sys/time.h> ? bad magic without end */
5895         #include <sys/types.h>
5896         #include <sys/signal.h>
5897         #ifdef HAVE_SYS_PARAM_H
5898         # include <sys/param.h>
5899         #endif
5900         #ifdef HAVE_SYSCALL_H
5901         # include <syscall.h>
5902         #else
5903         # ifdef HAVE_SYS_SYSCALL_H
5904         #  include <sys/syscall.h>
5905         # endif
5906         #endif
5907         
5908         unsigned char *xaltstack;
5909
5910         int
5911         main(int argc,char **argv) {
5912             struct sigaltstack  ss;
5913
5914             xaltstack = malloc(16384);
5915             ss.ss_sp    = xaltstack;
5916             ss.ss_size  = 16384;
5917             ss.ss_flags = 0;
5918             if (sigaltstack(&ss, NULL) < 0) {
5919                 /* this catches the glibc case */
5920                 perror("sigaltstack");
5921                 return (1); /* aka exit(1) aka fail */
5922             }
5923             /* assume it works. */
5924             return 0; /* OK */
5925         }
5926         
5927 EOF
5928 if { (eval echo configure:5929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5929 then
5930   ac_cv_c_working_sigaltstack="yes"
5931 else
5932   echo "configure: failed program was:" >&5
5933   cat conftest.$ac_ext >&5
5934   rm -fr conftest*
5935   ac_cv_c_working_sigaltstack="no"
5936 fi
5937 rm -fr conftest*
5938 fi
5939
5940 fi
5941
5942 echo "$ac_t""$ac_cv_c_working_sigaltstack" 1>&6
5943
5944 if test "$ac_cv_c_working_sigaltstack" = "yes"
5945 then
5946     cat >> confdefs.h <<\EOF
5947 #define HAVE_WORKING_SIGALTSTACK 1
5948 EOF
5949
5950 fi
5951
5952
5953
5954 echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6
5955 echo "configure:5956: checking "for msg_accrights in struct msghdr"" >&5
5956 if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then
5957   echo $ac_n "(cached) $ac_c" 1>&6
5958 else
5959   cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962 #include <sys/types.h>
5963 #include <sys/socket.h>
5964 int main() {
5965 struct msghdr hdr; hdr.msg_accrights=0
5966 ; return 0; }
5967 EOF
5968 if { (eval echo configure:5969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5969   rm -rf conftest*
5970   ac_cv_c_msg_accrights="yes"
5971 else
5972   echo "configure: failed program was:" >&5
5973   cat conftest.$ac_ext >&5
5974   rm -rf conftest*
5975   ac_cv_c_msg_accrights="no"
5976 fi
5977 rm -f conftest*
5978 fi
5979
5980 echo "$ac_t""$ac_cv_c_msg_accrights" 1>&6
5981 if test "$ac_cv_c_msg_accrights" = "yes"
5982 then
5983     cat >> confdefs.h <<\EOF
5984 #define HAVE_MSGHDR_ACCRIGHTS 1
5985 EOF
5986
5987 fi
5988
5989
5990 echo $ac_n "checking "for sun_len in struct sockaddr_un"""... $ac_c" 1>&6
5991 echo "configure:5992: checking "for sun_len in struct sockaddr_un"" >&5
5992 if eval "test \"`echo '$''{'ac_cv_c_sun_len'+set}'`\" = set"; then
5993   echo $ac_n "(cached) $ac_c" 1>&6
5994 else
5995   cat > conftest.$ac_ext <<EOF
5996 #line 5997 "configure"
5997 #include "confdefs.h"
5998 #include <sys/types.h>
5999 #include <sys/socket.h>
6000 #include <sys/un.h>
6001 int main() {
6002 static struct sockaddr_un addr; addr.sun_len = 1
6003 ; return 0; }
6004 EOF
6005 if { (eval echo configure:6006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6006   rm -rf conftest*
6007   ac_cv_c_sun_len="yes"
6008 else
6009   echo "configure: failed program was:" >&5
6010   cat conftest.$ac_ext >&5
6011   rm -rf conftest*
6012   ac_cv_c_sun_len="no"
6013 fi
6014 rm -f conftest*
6015 fi
6016
6017 echo "$ac_t""$ac_cv_c_sun_len" 1>&6
6018 if test "$ac_cv_c_sun_len" = "yes"
6019 then
6020     cat >> confdefs.h <<\EOF
6021 #define HAVE_SOCKADDR_SUN_LEN 1
6022 EOF
6023
6024 fi
6025
6026
6027 echo $ac_n "checking "whether we need to define __i386__"""... $ac_c" 1>&6
6028 echo "configure:6029: checking "whether we need to define __i386__"" >&5
6029 if eval "test \"`echo '$''{'ac_cv_cpp_def_i386'+set}'`\" = set"; then
6030   echo $ac_n "(cached) $ac_c" 1>&6
6031 else
6032   cat > conftest.$ac_ext <<EOF
6033 #line 6034 "configure"
6034 #include "confdefs.h"
6035 #if (defined(i386) || defined(__i386)) && !defined(__i386__)
6036 yes
6037 #endif
6038 EOF
6039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6040   egrep "yes" >/dev/null 2>&1; then
6041   rm -rf conftest*
6042   ac_cv_cpp_def_i386="yes"
6043 else
6044   rm -rf conftest*
6045   ac_cv_cpp_def_i386="no"
6046 fi
6047 rm -f conftest*
6048
6049 fi
6050
6051 echo "$ac_t""$ac_cv_cpp_def_i386" 1>&6
6052 if test "$ac_cv_cpp_def_i386" = "yes"
6053 then
6054     CFLAGS="$CFLAGS -D__i386__"
6055     LINTFLAGS="$LINTFLAGS -D__i386__"
6056 fi
6057
6058 GCC_NO_BUILTIN=""
6059 if test "$GCC" = "yes"
6060 then
6061     GCC_NO_BUILTIN="-fno-builtin"
6062 fi
6063
6064
6065
6066 MAKE_RULES=Make.rules
6067
6068
6069 trap '' 1 2 15
6070 cat > confcache <<\EOF
6071 # This file is a shell script that caches the results of configure
6072 # tests run on this system so they can be shared between configure
6073 # scripts and configure runs.  It is not useful on other systems.
6074 # If it contains results you don't want to keep, you may remove or edit it.
6075 #
6076 # By default, configure uses ./config.cache as the cache file,
6077 # creating it if it does not exist already.  You can give configure
6078 # the --cache-file=FILE option to use a different cache file; that is
6079 # what configure does when it calls configure scripts in
6080 # subdirectories, so they share the cache.
6081 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6082 # config.status only pays attention to the cache file if you give it the
6083 # --recheck option to rerun configure.
6084 #
6085 EOF
6086 # The following way of writing the cache mishandles newlines in values,
6087 # but we know of no workaround that is simple, portable, and efficient.
6088 # So, don't put newlines in cache variables' values.
6089 # Ultrix sh set writes to stderr and can't be redirected directly,
6090 # and sets the high bit in the cache file unless we assign to the vars.
6091 (set) 2>&1 |
6092   case `(ac_space=' '; set | grep ac_space) 2>&1` in
6093   *ac_space=\ *)
6094     # `set' does not quote correctly, so add quotes (double-quote substitution
6095     # turns \\\\ into \\, and sed turns \\ into \).
6096     sed -n \
6097       -e "s/'/'\\\\''/g" \
6098       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6099     ;;
6100   *)
6101     # `set' quotes correctly as required by POSIX, so do not add quotes.
6102     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6103     ;;
6104   esac >> confcache
6105 if cmp -s $cache_file confcache; then
6106   :
6107 else
6108   if test -w $cache_file; then
6109     echo "updating cache $cache_file"
6110     cat confcache > $cache_file
6111   else
6112     echo "not updating unwritable cache $cache_file"
6113   fi
6114 fi
6115 rm -f confcache
6116
6117 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6118
6119 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6120 # Let make expand exec_prefix.
6121 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6122
6123 # Any assignment to VPATH causes Sun make to only execute
6124 # the first set of double-colon rules, so remove it if not needed.
6125 # If there is a colon in the path, we need to keep it.
6126 if test "x$srcdir" = x.; then
6127   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6128 fi
6129
6130 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6131
6132 DEFS=-DHAVE_CONFIG_H
6133
6134 # Without the "./", some shells look in PATH for config.status.
6135 : ${CONFIG_STATUS=./config.status}
6136
6137 echo creating $CONFIG_STATUS
6138 rm -f $CONFIG_STATUS
6139 cat > $CONFIG_STATUS <<EOF
6140 #! /bin/sh
6141 # Generated automatically by configure.
6142 # Run this file to recreate the current configuration.
6143 # This directory was configured as follows,
6144 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6145 #
6146 # $0 $ac_configure_args
6147 #
6148 # Compiler output produced by configure, useful for debugging
6149 # configure, is in ./config.log if it exists.
6150
6151 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6152 for ac_option
6153 do
6154   case "\$ac_option" in
6155   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6156     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6157     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6158   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6159     echo "$CONFIG_STATUS generated by autoconf version 2.13"
6160     exit 0 ;;
6161   -help | --help | --hel | --he | --h)
6162     echo "\$ac_cs_usage"; exit 0 ;;
6163   *) echo "\$ac_cs_usage"; exit 1 ;;
6164   esac
6165 done
6166
6167 ac_given_srcdir=$srcdir
6168 ac_given_INSTALL="$INSTALL"
6169
6170 trap 'rm -fr `echo "
6171 Make.rules
6172 Makefile
6173 console/Makefile
6174 controls/Makefile
6175 debugger/Makefile
6176 dlls/Makefile
6177 dlls/advapi32/Makefile
6178 dlls/avifil32/Makefile
6179 dlls/comctl32/Makefile
6180 dlls/commdlg/Makefile
6181 dlls/crtdll/Makefile
6182 dlls/dciman32/Makefile
6183 dlls/display/Makefile
6184 dlls/dplayx/Makefile
6185 dlls/dsound/Makefile
6186 dlls/icmp/Makefile
6187 dlls/imagehlp/Makefile
6188 dlls/imm32/Makefile
6189 dlls/lzexpand/Makefile
6190 dlls/mouse/Makefile
6191 dlls/mpr/Makefile
6192 dlls/msacm/Makefile
6193 dlls/msacm32/Makefile
6194 dlls/msnet32/Makefile
6195 dlls/msvideo/Makefile
6196 dlls/ntdll/Makefile
6197 dlls/odbc32/Makefile
6198 dlls/ole32/Makefile
6199 dlls/oleaut32/Makefile
6200 dlls/olecli/Makefile
6201 dlls/oledlg/Makefile
6202 dlls/olepro32/Makefile
6203 dlls/olesvr/Makefile
6204 dlls/psapi/Makefile
6205 dlls/rasapi32/Makefile
6206 dlls/setupx/Makefile
6207 dlls/shell32/Makefile
6208 dlls/sound/Makefile
6209 dlls/stress/Makefile
6210 dlls/tapi32/Makefile
6211 dlls/version/Makefile
6212 dlls/win32s/Makefile
6213 dlls/win87em/Makefile
6214 dlls/winaspi/Makefile
6215 dlls/windebug/Makefile
6216 dlls/wing/Makefile
6217 dlls/winmm/Makefile
6218 dlls/winmm/mcianim/Makefile
6219 dlls/winmm/mciavi/Makefile
6220 dlls/winmm/mcicda/Makefile
6221 dlls/winmm/mciseq/Makefile
6222 dlls/winmm/mciwave/Makefile
6223 dlls/winmm/midimap/Makefile
6224 dlls/winmm/wavemap/Makefile
6225 dlls/winmm/wineoss/Makefile
6226 dlls/winsock/Makefile
6227 dlls/winspool/Makefile
6228 dlls/wnaspi32/Makefile
6229 documentation/Makefile
6230 documentation/wine.conf.man
6231 documentation/wine.man
6232 files/Makefile
6233 graphics/Makefile
6234 graphics/enhmetafiledrv/Makefile
6235 graphics/metafiledrv/Makefile
6236 graphics/psdrv/Makefile
6237 graphics/ttydrv/Makefile
6238 graphics/win16drv/Makefile
6239 graphics/x11drv/Makefile
6240 if1632/Makefile
6241 include/Makefile
6242 library/Makefile
6243 libtest/Makefile
6244 loader/Makefile
6245 loader/ne/Makefile
6246 loader/dos/Makefile
6247 memory/Makefile
6248 misc/Makefile
6249 miscemu/Makefile
6250 msdos/Makefile
6251 objects/Makefile
6252 ole/Makefile
6253 programs/Makefile
6254 programs/clock/Makefile
6255 programs/cmdlgtst/Makefile
6256 programs/control/Makefile
6257 programs/avitools/Makefile
6258 programs/osversioncheck/Makefile
6259 programs/notepad/Makefile
6260 programs/progman/Makefile
6261 programs/regtest/Makefile
6262 programs/regapi/Makefile
6263 programs/view/Makefile
6264 programs/wcmd/Makefile
6265 programs/winhelp/Makefile
6266 programs/winver/Makefile
6267 rc/Makefile
6268 relay32/Makefile
6269 resources/Makefile
6270 scheduler/Makefile
6271 server/Makefile
6272 tools/Makefile
6273 tools/wrc/Makefile
6274 tsx11/Makefile
6275 win32/Makefile
6276 windows/Makefile
6277 windows/ttydrv/Makefile
6278 windows/x11drv/Makefile  include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6279 EOF
6280 cat >> $CONFIG_STATUS <<EOF
6281
6282 # Protect against being on the right side of a sed subst in config.status.
6283 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6284  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6285 $ac_vpsub
6286 $extrasub
6287 s%@SHELL@%$SHELL%g
6288 s%@CFLAGS@%$CFLAGS%g
6289 s%@CPPFLAGS@%$CPPFLAGS%g
6290 s%@CXXFLAGS@%$CXXFLAGS%g
6291 s%@FFLAGS@%$FFLAGS%g
6292 s%@DEFS@%$DEFS%g
6293 s%@LDFLAGS@%$LDFLAGS%g
6294 s%@LIBS@%$LIBS%g
6295 s%@exec_prefix@%$exec_prefix%g
6296 s%@prefix@%$prefix%g
6297 s%@program_transform_name@%$program_transform_name%g
6298 s%@bindir@%$bindir%g
6299 s%@sbindir@%$sbindir%g
6300 s%@libexecdir@%$libexecdir%g
6301 s%@datadir@%$datadir%g
6302 s%@sysconfdir@%$sysconfdir%g
6303 s%@sharedstatedir@%$sharedstatedir%g
6304 s%@localstatedir@%$localstatedir%g
6305 s%@libdir@%$libdir%g
6306 s%@includedir@%$includedir%g
6307 s%@oldincludedir@%$oldincludedir%g
6308 s%@infodir@%$infodir%g
6309 s%@mandir@%$mandir%g
6310 s%@PROGEXT@%$PROGEXT%g
6311 s%@EMU_TARGET@%$EMU_TARGET%g
6312 s%@OPTIONS@%$OPTIONS%g
6313 s%@SET_MAKE@%$SET_MAKE%g
6314 s%@CC@%$CC%g
6315 s%@CPP@%$CPP%g
6316 s%@X_CFLAGS@%$X_CFLAGS%g
6317 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
6318 s%@X_LIBS@%$X_LIBS%g
6319 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
6320 s%@YACC@%$YACC%g
6321 s%@LEX@%$LEX%g
6322 s%@LEXLIB@%$LEXLIB%g
6323 s%@RANLIB@%$RANLIB%g
6324 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6325 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6326 s%@INSTALL_DATA@%$INSTALL_DATA%g
6327 s%@LN_S@%$LN_S%g
6328 s%@C2MAN@%$C2MAN%g
6329 s%@LDCONFIG@%$LDCONFIG%g
6330 s%@LINT@%$LINT%g
6331 s%@LINTFLAGS@%$LINTFLAGS%g
6332 s%@XLIB@%$XLIB%g
6333 s%@DLL_LINK@%$DLL_LINK%g
6334 s%@BUILDFLAGS@%$BUILDFLAGS%g
6335 s%@DLLFLAGS@%$DLLFLAGS%g
6336 s%@LDSHARED@%$LDSHARED%g
6337 s%@LIBEXT@%$LIBEXT%g
6338 s%@ALLOCA@%$ALLOCA%g
6339 s%@GCC_NO_BUILTIN@%$GCC_NO_BUILTIN%g
6340 /@MAKE_RULES@/r $MAKE_RULES
6341 s%@MAKE_RULES@%%g
6342
6343 CEOF
6344 EOF
6345
6346 cat >> $CONFIG_STATUS <<\EOF
6347
6348 # Split the substitutions into bite-sized pieces for seds with
6349 # small command number limits, like on Digital OSF/1 and HP-UX.
6350 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6351 ac_file=1 # Number of current file.
6352 ac_beg=1 # First line for current file.
6353 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6354 ac_more_lines=:
6355 ac_sed_cmds=""
6356 while $ac_more_lines; do
6357   if test $ac_beg -gt 1; then
6358     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6359   else
6360     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6361   fi
6362   if test ! -s conftest.s$ac_file; then
6363     ac_more_lines=false
6364     rm -f conftest.s$ac_file
6365   else
6366     if test -z "$ac_sed_cmds"; then
6367       ac_sed_cmds="sed -f conftest.s$ac_file"
6368     else
6369       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6370     fi
6371     ac_file=`expr $ac_file + 1`
6372     ac_beg=$ac_end
6373     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6374   fi
6375 done
6376 if test -z "$ac_sed_cmds"; then
6377   ac_sed_cmds=cat
6378 fi
6379 EOF
6380
6381 cat >> $CONFIG_STATUS <<EOF
6382
6383 CONFIG_FILES=\${CONFIG_FILES-"Make.rules
6384 Makefile
6385 console/Makefile
6386 controls/Makefile
6387 debugger/Makefile
6388 dlls/Makefile
6389 dlls/advapi32/Makefile
6390 dlls/avifil32/Makefile
6391 dlls/comctl32/Makefile
6392 dlls/commdlg/Makefile
6393 dlls/crtdll/Makefile
6394 dlls/dciman32/Makefile
6395 dlls/display/Makefile
6396 dlls/dplayx/Makefile
6397 dlls/dsound/Makefile
6398 dlls/icmp/Makefile
6399 dlls/imagehlp/Makefile
6400 dlls/imm32/Makefile
6401 dlls/lzexpand/Makefile
6402 dlls/mouse/Makefile
6403 dlls/mpr/Makefile
6404 dlls/msacm/Makefile
6405 dlls/msacm32/Makefile
6406 dlls/msnet32/Makefile
6407 dlls/msvideo/Makefile
6408 dlls/ntdll/Makefile
6409 dlls/odbc32/Makefile
6410 dlls/ole32/Makefile
6411 dlls/oleaut32/Makefile
6412 dlls/olecli/Makefile
6413 dlls/oledlg/Makefile
6414 dlls/olepro32/Makefile
6415 dlls/olesvr/Makefile
6416 dlls/psapi/Makefile
6417 dlls/rasapi32/Makefile
6418 dlls/setupx/Makefile
6419 dlls/shell32/Makefile
6420 dlls/sound/Makefile
6421 dlls/stress/Makefile
6422 dlls/tapi32/Makefile
6423 dlls/version/Makefile
6424 dlls/win32s/Makefile
6425 dlls/win87em/Makefile
6426 dlls/winaspi/Makefile
6427 dlls/windebug/Makefile
6428 dlls/wing/Makefile
6429 dlls/winmm/Makefile
6430 dlls/winmm/mcianim/Makefile
6431 dlls/winmm/mciavi/Makefile
6432 dlls/winmm/mcicda/Makefile
6433 dlls/winmm/mciseq/Makefile
6434 dlls/winmm/mciwave/Makefile
6435 dlls/winmm/midimap/Makefile
6436 dlls/winmm/wavemap/Makefile
6437 dlls/winmm/wineoss/Makefile
6438 dlls/winsock/Makefile
6439 dlls/winspool/Makefile
6440 dlls/wnaspi32/Makefile
6441 documentation/Makefile
6442 documentation/wine.conf.man
6443 documentation/wine.man
6444 files/Makefile
6445 graphics/Makefile
6446 graphics/enhmetafiledrv/Makefile
6447 graphics/metafiledrv/Makefile
6448 graphics/psdrv/Makefile
6449 graphics/ttydrv/Makefile
6450 graphics/win16drv/Makefile
6451 graphics/x11drv/Makefile
6452 if1632/Makefile
6453 include/Makefile
6454 library/Makefile
6455 libtest/Makefile
6456 loader/Makefile
6457 loader/ne/Makefile
6458 loader/dos/Makefile
6459 memory/Makefile
6460 misc/Makefile
6461 miscemu/Makefile
6462 msdos/Makefile
6463 objects/Makefile
6464 ole/Makefile
6465 programs/Makefile
6466 programs/clock/Makefile
6467 programs/cmdlgtst/Makefile
6468 programs/control/Makefile
6469 programs/avitools/Makefile
6470 programs/osversioncheck/Makefile
6471 programs/notepad/Makefile
6472 programs/progman/Makefile
6473 programs/regtest/Makefile
6474 programs/regapi/Makefile
6475 programs/view/Makefile
6476 programs/wcmd/Makefile
6477 programs/winhelp/Makefile
6478 programs/winver/Makefile
6479 rc/Makefile
6480 relay32/Makefile
6481 resources/Makefile
6482 scheduler/Makefile
6483 server/Makefile
6484 tools/Makefile
6485 tools/wrc/Makefile
6486 tsx11/Makefile
6487 win32/Makefile
6488 windows/Makefile
6489 windows/ttydrv/Makefile
6490 windows/x11drv/Makefile "}
6491 EOF
6492 cat >> $CONFIG_STATUS <<\EOF
6493 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6494   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6495   case "$ac_file" in
6496   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6497        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6498   *) ac_file_in="${ac_file}.in" ;;
6499   esac
6500
6501   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6502
6503   # Remove last slash and all that follows it.  Not all systems have dirname.
6504   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6505   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6506     # The file is in a subdirectory.
6507     test ! -d "$ac_dir" && mkdir "$ac_dir"
6508     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6509     # A "../" for each directory in $ac_dir_suffix.
6510     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6511   else
6512     ac_dir_suffix= ac_dots=
6513   fi
6514
6515   case "$ac_given_srcdir" in
6516   .)  srcdir=.
6517       if test -z "$ac_dots"; then top_srcdir=.
6518       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6519   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6520   *) # Relative path.
6521     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6522     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6523   esac
6524
6525   case "$ac_given_INSTALL" in
6526   [/$]*) INSTALL="$ac_given_INSTALL" ;;
6527   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6528   esac
6529
6530   echo creating "$ac_file"
6531   rm -f "$ac_file"
6532   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6533   case "$ac_file" in
6534   *Makefile*) ac_comsub="1i\\
6535 # $configure_input" ;;
6536   *) ac_comsub= ;;
6537   esac
6538
6539   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6540   sed -e "$ac_comsub
6541 s%@configure_input@%$configure_input%g
6542 s%@srcdir@%$srcdir%g
6543 s%@top_srcdir@%$top_srcdir%g
6544 s%@INSTALL@%$INSTALL%g
6545 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6546 fi; done
6547 rm -f conftest.s*
6548
6549 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6550 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6551 #
6552 # ac_d sets the value in "#define NAME VALUE" lines.
6553 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6554 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6555 ac_dC='\3'
6556 ac_dD='%g'
6557 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6558 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6559 ac_uB='\([      ]\)%\1#\2define\3'
6560 ac_uC=' '
6561 ac_uD='\4%g'
6562 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6563 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6564 ac_eB='$%\1#\2define\3'
6565 ac_eC=' '
6566 ac_eD='%g'
6567
6568 if test "${CONFIG_HEADERS+set}" != set; then
6569 EOF
6570 cat >> $CONFIG_STATUS <<EOF
6571   CONFIG_HEADERS="include/config.h"
6572 EOF
6573 cat >> $CONFIG_STATUS <<\EOF
6574 fi
6575 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6576   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6577   case "$ac_file" in
6578   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6579        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6580   *) ac_file_in="${ac_file}.in" ;;
6581   esac
6582
6583   echo creating $ac_file
6584
6585   rm -f conftest.frag conftest.in conftest.out
6586   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6587   cat $ac_file_inputs > conftest.in
6588
6589 EOF
6590
6591 # Transform confdefs.h into a sed script conftest.vals that substitutes
6592 # the proper values into config.h.in to produce config.h.  And first:
6593 # Protect against being on the right side of a sed subst in config.status.
6594 # Protect against being in an unquoted here document in config.status.
6595 rm -f conftest.vals
6596 cat > conftest.hdr <<\EOF
6597 s/[\\&%]/\\&/g
6598 s%[\\$`]%\\&%g
6599 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6600 s%ac_d%ac_u%gp
6601 s%ac_u%ac_e%gp
6602 EOF
6603 sed -n -f conftest.hdr confdefs.h > conftest.vals
6604 rm -f conftest.hdr
6605
6606 # This sed command replaces #undef with comments.  This is necessary, for
6607 # example, in the case of _POSIX_SOURCE, which is predefined and required
6608 # on some systems where configure will not decide to define it.
6609 cat >> conftest.vals <<\EOF
6610 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6611 EOF
6612
6613 # Break up conftest.vals because some shells have a limit on
6614 # the size of here documents, and old seds have small limits too.
6615
6616 rm -f conftest.tail
6617 while :
6618 do
6619   ac_lines=`grep -c . conftest.vals`
6620   # grep -c gives empty output for an empty file on some AIX systems.
6621   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6622   # Write a limited-size here document to conftest.frag.
6623   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6624   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6625   echo 'CEOF
6626   sed -f conftest.frag conftest.in > conftest.out
6627   rm -f conftest.in
6628   mv conftest.out conftest.in
6629 ' >> $CONFIG_STATUS
6630   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6631   rm -f conftest.vals
6632   mv conftest.tail conftest.vals
6633 done
6634 rm -f conftest.vals
6635
6636 cat >> $CONFIG_STATUS <<\EOF
6637   rm -f conftest.frag conftest.h
6638   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6639   cat conftest.in >> conftest.h
6640   rm -f conftest.in
6641   if cmp -s $ac_file conftest.h 2>/dev/null; then
6642     echo "$ac_file is unchanged"
6643     rm -f conftest.h
6644   else
6645     # Remove last slash and all that follows it.  Not all systems have dirname.
6646       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6647       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6648       # The file is in a subdirectory.
6649       test ! -d "$ac_dir" && mkdir "$ac_dir"
6650     fi
6651     rm -f $ac_file
6652     mv conftest.h $ac_file
6653   fi
6654 fi; done
6655
6656 EOF
6657 cat >> $CONFIG_STATUS <<EOF
6658
6659 EOF
6660 cat >> $CONFIG_STATUS <<\EOF
6661
6662 exit 0
6663 EOF
6664 chmod +x $CONFIG_STATUS
6665 rm -fr confdefs* $ac_clean_files
6666 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6667
6668
6669 if test "$have_x" = "no"
6670 then
6671   echo
6672   echo "*** Warning: X development files not found. Wine will be built without"
6673   echo "*** X support, which currently does not work, and would probably not be"
6674   echo "*** what you want anyway. You will need to install devel packages of"
6675   echo "*** Xlib/Xfree86 and Xpm at the very least."
6676 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
6677 then
6678   echo
6679   echo "*** Warning: Xpm development files not found. Wine will be built without"
6680   echo "*** Xpm support, which currently does not work. You will need to install"
6681   echo "*** devel packages of Xpm."
6682 fi
6683
6684 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
6685 then
6686   echo
6687   echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
6688   echo "*** terminal resize support. Consider upgrading ncurses."
6689 fi
6690
6691 if test "$wine_cv_libc_reentrant" = "no" 
6692 then
6693   echo
6694   echo "*** Warning: non-reentrant libc detected. Wine will be build without"
6695   echo "*** thread support. Consider upgrading libc to a more recent"
6696   echo "*** reentrant version of libc."
6697 fi
6698
6699 if test "$wine_cv_mesa_version_OK" = "no"
6700 then
6701   echo
6702   echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
6703   echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)"
6704 fi
6705
6706 echo
6707 echo "Configure finished.  Do 'make depend && make' to compile Wine."
6708 echo
6709