No longer directly accessing debuggee memory.
[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 "Debian/Corel Linux:       xpm4g, xpm4g-dev"
2991         echo
2992         echo "Or get the sources from ftp.x.org and all its mirror sites from "
2993         echo "the directory /contrib/libraries."
2994         echo
2995         exit 1
2996     fi
2997
2998
2999         for ac_hdr in X11/Xlib.h X11/extensions/XShm.h
3000 do
3001 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3002 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3003 echo "configure:3004: checking for $ac_hdr" >&5
3004 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3005   echo $ac_n "(cached) $ac_c" 1>&6
3006 else
3007   cat > conftest.$ac_ext <<EOF
3008 #line 3009 "configure"
3009 #include "confdefs.h"
3010 #include <$ac_hdr>
3011 EOF
3012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3013 { (eval echo configure:3014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3015 if test -z "$ac_err"; then
3016   rm -rf conftest*
3017   eval "ac_cv_header_$ac_safe=yes"
3018 else
3019   echo "$ac_err" >&5
3020   echo "configure: failed program was:" >&5
3021   cat conftest.$ac_ext >&5
3022   rm -rf conftest*
3023   eval "ac_cv_header_$ac_safe=no"
3024 fi
3025 rm -f conftest*
3026 fi
3027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3028   echo "$ac_t""yes" 1>&6
3029     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3030   cat >> confdefs.h <<EOF
3031 #define $ac_tr_hdr 1
3032 EOF
3033  
3034 else
3035   echo "$ac_t""no" 1>&6
3036 fi
3037 done
3038
3039     if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
3040     then 
3041         echo $ac_n "checking for XShmQueryExtension in -lXext""... $ac_c" 1>&6
3042 echo "configure:3043: checking for XShmQueryExtension in -lXext" >&5
3043 ac_lib_var=`echo Xext'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
3044 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3045   echo $ac_n "(cached) $ac_c" 1>&6
3046 else
3047   ac_save_LIBS="$LIBS"
3048 LIBS="-lXext $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3049 cat > conftest.$ac_ext <<EOF
3050 #line 3051 "configure"
3051 #include "confdefs.h"
3052 /* Override any gcc2 internal prototype to avoid an error.  */
3053 /* We use char because int might match the return type of a gcc2
3054     builtin and then its argument prototype would still apply.  */
3055 char XShmQueryExtension();
3056
3057 int main() {
3058 XShmQueryExtension()
3059 ; return 0; }
3060 EOF
3061 if { (eval echo configure:3062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3062   rm -rf conftest*
3063   eval "ac_cv_lib_$ac_lib_var=yes"
3064 else
3065   echo "configure: failed program was:" >&5
3066   cat conftest.$ac_ext >&5
3067   rm -rf conftest*
3068   eval "ac_cv_lib_$ac_lib_var=no"
3069 fi
3070 rm -f conftest*
3071 LIBS="$ac_save_LIBS"
3072
3073 fi
3074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3075   echo "$ac_t""yes" 1>&6
3076   cat >> confdefs.h <<\EOF
3077 #define HAVE_LIBXXSHM 1
3078 EOF
3079
3080 else
3081   echo "$ac_t""no" 1>&6
3082 fi
3083
3084     fi
3085         for ac_hdr in X11/Xlib.h X11/extensions/xf86dga.h
3086 do
3087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3089 echo "configure:3090: checking for $ac_hdr" >&5
3090 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3091   echo $ac_n "(cached) $ac_c" 1>&6
3092 else
3093   cat > conftest.$ac_ext <<EOF
3094 #line 3095 "configure"
3095 #include "confdefs.h"
3096 #include <$ac_hdr>
3097 EOF
3098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3099 { (eval echo configure:3100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3101 if test -z "$ac_err"; then
3102   rm -rf conftest*
3103   eval "ac_cv_header_$ac_safe=yes"
3104 else
3105   echo "$ac_err" >&5
3106   echo "configure: failed program was:" >&5
3107   cat conftest.$ac_ext >&5
3108   rm -rf conftest*
3109   eval "ac_cv_header_$ac_safe=no"
3110 fi
3111 rm -f conftest*
3112 fi
3113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3114   echo "$ac_t""yes" 1>&6
3115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3116   cat >> confdefs.h <<EOF
3117 #define $ac_tr_hdr 1
3118 EOF
3119  
3120 else
3121   echo "$ac_t""no" 1>&6
3122 fi
3123 done
3124
3125     if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
3126     then 
3127          echo $ac_n "checking for XDGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
3128 echo "configure:3129: checking for XDGAQueryExtension in -lXxf86dga" >&5
3129 ac_lib_var=`echo Xxf86dga'_'XDGAQueryExtension | sed 'y%./+-%__p_%'`
3130 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3131   echo $ac_n "(cached) $ac_c" 1>&6
3132 else
3133   ac_save_LIBS="$LIBS"
3134 LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3135 cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138 /* Override any gcc2 internal prototype to avoid an error.  */
3139 /* We use char because int might match the return type of a gcc2
3140     builtin and then its argument prototype would still apply.  */
3141 char XDGAQueryExtension();
3142
3143 int main() {
3144 XDGAQueryExtension()
3145 ; return 0; }
3146 EOF
3147 if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3148   rm -rf conftest*
3149   eval "ac_cv_lib_$ac_lib_var=yes"
3150 else
3151   echo "configure: failed program was:" >&5
3152   cat conftest.$ac_ext >&5
3153   rm -rf conftest*
3154   eval "ac_cv_lib_$ac_lib_var=no"
3155 fi
3156 rm -f conftest*
3157 LIBS="$ac_save_LIBS"
3158
3159 fi
3160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3161   echo "$ac_t""yes" 1>&6
3162   cat >> confdefs.h <<\EOF
3163 #define HAVE_LIBXXF86DGA2 1
3164 EOF
3165  cat >> confdefs.h <<\EOF
3166 #define HAVE_LIBXXF86DGA 1
3167 EOF
3168  X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
3169 else
3170   echo "$ac_t""no" 1>&6
3171 fi
3172
3173          if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
3174          then
3175            echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
3176 echo "configure:3177: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
3177 ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
3178 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3179   echo $ac_n "(cached) $ac_c" 1>&6
3180 else
3181   ac_save_LIBS="$LIBS"
3182 LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3183 cat > conftest.$ac_ext <<EOF
3184 #line 3185 "configure"
3185 #include "confdefs.h"
3186 /* Override any gcc2 internal prototype to avoid an error.  */
3187 /* We use char because int might match the return type of a gcc2
3188     builtin and then its argument prototype would still apply.  */
3189 char XF86DGAQueryExtension();
3190
3191 int main() {
3192 XF86DGAQueryExtension()
3193 ; return 0; }
3194 EOF
3195 if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3196   rm -rf conftest*
3197   eval "ac_cv_lib_$ac_lib_var=yes"
3198 else
3199   echo "configure: failed program was:" >&5
3200   cat conftest.$ac_ext >&5
3201   rm -rf conftest*
3202   eval "ac_cv_lib_$ac_lib_var=no"
3203 fi
3204 rm -f conftest*
3205 LIBS="$ac_save_LIBS"
3206
3207 fi
3208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3209   echo "$ac_t""yes" 1>&6
3210   cat >> confdefs.h <<\EOF
3211 #define HAVE_LIBXXF86DGA 1
3212 EOF
3213  X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
3214 else
3215   echo "$ac_t""no" 1>&6
3216 fi
3217
3218          fi
3219     fi
3220
3221         for ac_hdr in X11/Xlib.h X11/extensions/xf86vmode.h
3222 do
3223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3225 echo "configure:3226: checking for $ac_hdr" >&5
3226 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229   cat > conftest.$ac_ext <<EOF
3230 #line 3231 "configure"
3231 #include "confdefs.h"
3232 #include <$ac_hdr>
3233 EOF
3234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3235 { (eval echo configure:3236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3237 if test -z "$ac_err"; then
3238   rm -rf conftest*
3239   eval "ac_cv_header_$ac_safe=yes"
3240 else
3241   echo "$ac_err" >&5
3242   echo "configure: failed program was:" >&5
3243   cat conftest.$ac_ext >&5
3244   rm -rf conftest*
3245   eval "ac_cv_header_$ac_safe=no"
3246 fi
3247 rm -f conftest*
3248 fi
3249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3250   echo "$ac_t""yes" 1>&6
3251     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3252   cat >> confdefs.h <<EOF
3253 #define $ac_tr_hdr 1
3254 EOF
3255  
3256 else
3257   echo "$ac_t""no" 1>&6
3258 fi
3259 done
3260
3261     if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
3262     then 
3263         echo $ac_n "checking for XF86VidModeQueryExtension in -lXxf86vm""... $ac_c" 1>&6
3264 echo "configure:3265: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5
3265 ac_lib_var=`echo Xxf86vm'_'XF86VidModeQueryExtension | sed 'y%./+-%__p_%'`
3266 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269   ac_save_LIBS="$LIBS"
3270 LIBS="-lXxf86vm $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3271 cat > conftest.$ac_ext <<EOF
3272 #line 3273 "configure"
3273 #include "confdefs.h"
3274 /* Override any gcc2 internal prototype to avoid an error.  */
3275 /* We use char because int might match the return type of a gcc2
3276     builtin and then its argument prototype would still apply.  */
3277 char XF86VidModeQueryExtension();
3278
3279 int main() {
3280 XF86VidModeQueryExtension()
3281 ; return 0; }
3282 EOF
3283 if { (eval echo configure:3284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3284   rm -rf conftest*
3285   eval "ac_cv_lib_$ac_lib_var=yes"
3286 else
3287   echo "configure: failed program was:" >&5
3288   cat conftest.$ac_ext >&5
3289   rm -rf conftest*
3290   eval "ac_cv_lib_$ac_lib_var=no"
3291 fi
3292 rm -f conftest*
3293 LIBS="$ac_save_LIBS"
3294
3295 fi
3296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3297   echo "$ac_t""yes" 1>&6
3298   cat >> confdefs.h <<\EOF
3299 #define HAVE_LIBXXF86VM 1
3300 EOF
3301  X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
3302 else
3303   echo "$ac_t""no" 1>&6
3304 fi
3305
3306     fi
3307
3308         for ac_hdr in GL/gl.h GL/glx.h GL/osmesa.h
3309 do
3310 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3311 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3312 echo "configure:3313: checking for $ac_hdr" >&5
3313 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3314   echo $ac_n "(cached) $ac_c" 1>&6
3315 else
3316   cat > conftest.$ac_ext <<EOF
3317 #line 3318 "configure"
3318 #include "confdefs.h"
3319 #include <$ac_hdr>
3320 EOF
3321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3322 { (eval echo configure:3323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3324 if test -z "$ac_err"; then
3325   rm -rf conftest*
3326   eval "ac_cv_header_$ac_safe=yes"
3327 else
3328   echo "$ac_err" >&5
3329   echo "configure: failed program was:" >&5
3330   cat conftest.$ac_ext >&5
3331   rm -rf conftest*
3332   eval "ac_cv_header_$ac_safe=no"
3333 fi
3334 rm -f conftest*
3335 fi
3336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3337   echo "$ac_t""yes" 1>&6
3338     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3339   cat >> confdefs.h <<EOF
3340 #define $ac_tr_hdr 1
3341 EOF
3342  
3343 else
3344   echo "$ac_t""no" 1>&6
3345 fi
3346 done
3347
3348     if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
3349     then
3350                 echo $ac_n "checking "for up-to-date Mesa version"""... $ac_c" 1>&6
3351 echo "configure:3352: checking "for up-to-date Mesa version"" >&5
3352 if eval "test \"`echo '$''{'wine_cv_mesa_version_OK'+set}'`\" = set"; then
3353   echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355   cat > conftest.$ac_ext <<EOF
3356 #line 3357 "configure"
3357 #include "confdefs.h"
3358 #include <GL/gl.h>
3359 int main() {
3360 GLenum test = GL_UNSIGNED_SHORT_5_6_5;
3361 ; return 0; }
3362 EOF
3363 if { (eval echo configure:3364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3364   rm -rf conftest*
3365   wine_cv_mesa_version_OK="yes"
3366 else
3367   echo "configure: failed program was:" >&5
3368   cat conftest.$ac_ext >&5
3369   rm -rf conftest*
3370   wine_cv_mesa_version_OK="no"
3371           
3372 fi
3373 rm -f conftest*
3374         
3375 fi
3376
3377 echo "$ac_t""$wine_cv_mesa_version_OK" 1>&6
3378
3379         if test "$wine_cv_mesa_version_OK" = "yes"
3380         then
3381                         echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
3382 echo "configure:3383: checking for glXCreateContext in -lGL" >&5
3383 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
3384 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3385   echo $ac_n "(cached) $ac_c" 1>&6
3386 else
3387   ac_save_LIBS="$LIBS"
3388 LIBS="-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
3389 cat > conftest.$ac_ext <<EOF
3390 #line 3391 "configure"
3391 #include "confdefs.h"
3392 /* Override any gcc2 internal prototype to avoid an error.  */
3393 /* We use char because int might match the return type of a gcc2
3394     builtin and then its argument prototype would still apply.  */
3395 char glXCreateContext();
3396
3397 int main() {
3398 glXCreateContext()
3399 ; return 0; }
3400 EOF
3401 if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3402   rm -rf conftest*
3403   eval "ac_cv_lib_$ac_lib_var=yes"
3404 else
3405   echo "configure: failed program was:" >&5
3406   cat conftest.$ac_ext >&5
3407   rm -rf conftest*
3408   eval "ac_cv_lib_$ac_lib_var=no"
3409 fi
3410 rm -f conftest*
3411 LIBS="$ac_save_LIBS"
3412
3413 fi
3414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3415   echo "$ac_t""yes" 1>&6
3416   cat >> confdefs.h <<\EOF
3417 #define HAVE_LIBMESAGL 1
3418 EOF
3419  X_PRE_LIBS="$X_PRE_LIBS -lGL"
3420 else
3421   echo "$ac_t""no" 1>&6
3422 fi
3423
3424             if test "$ac_cv_lib_GL_glXCreateContext" = "no"
3425             then
3426                 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
3427 echo "configure:3428: checking for glXCreateContext in -lMesaGL" >&5
3428 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
3429 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3430   echo $ac_n "(cached) $ac_c" 1>&6
3431 else
3432   ac_save_LIBS="$LIBS"
3433 LIBS="-lMesaGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
3434 cat > conftest.$ac_ext <<EOF
3435 #line 3436 "configure"
3436 #include "confdefs.h"
3437 /* Override any gcc2 internal prototype to avoid an error.  */
3438 /* We use char because int might match the return type of a gcc2
3439     builtin and then its argument prototype would still apply.  */
3440 char glXCreateContext();
3441
3442 int main() {
3443 glXCreateContext()
3444 ; return 0; }
3445 EOF
3446 if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3447   rm -rf conftest*
3448   eval "ac_cv_lib_$ac_lib_var=yes"
3449 else
3450   echo "configure: failed program was:" >&5
3451   cat conftest.$ac_ext >&5
3452   rm -rf conftest*
3453   eval "ac_cv_lib_$ac_lib_var=no"
3454 fi
3455 rm -f conftest*
3456 LIBS="$ac_save_LIBS"
3457
3458 fi
3459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3460   echo "$ac_t""yes" 1>&6
3461   cat >> confdefs.h <<\EOF
3462 #define HAVE_LIBMESAGL 1
3463 EOF
3464  X_PRE_LIBS="$X_PRE_LIBS -lMesaGL"
3465 else
3466   echo "$ac_t""no" 1>&6
3467 fi
3468
3469             fi
3470
3471                     echo $ac_n "checking "for the OpenGL Color Index extension"""... $ac_c" 1>&6
3472 echo "configure:3473: checking "for the OpenGL Color Index extension"" >&5
3473 if eval "test \"`echo '$''{'dummy'+set}'`\" = set"; then
3474   echo $ac_n "(cached) $ac_c" 1>&6
3475 else
3476   cat > conftest.$ac_ext <<EOF
3477 #line 3478 "configure"
3478 #include "confdefs.h"
3479 #include <GL/gl.h>
3480 int main() {
3481 GLenum test = GL_COLOR_INDEX8_EXT;
3482 ; return 0; }
3483 EOF
3484 if { (eval echo configure:3485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3485   rm -rf conftest*
3486   cat >> confdefs.h <<\EOF
3487 #define HAVE_GL_COLOR_TABLE 1
3488 EOF
3489
3490 else
3491   echo "configure: failed program was:" >&5
3492   cat conftest.$ac_ext >&5
3493 fi
3494 rm -f conftest*
3495             
3496 fi
3497
3498 echo "$ac_t""$dummy" 1>&6
3499             if test "$ac_cv_lib_GL_glXCreateContext" = "no"
3500             then
3501                 echo $ac_n "checking for glColorTableEXT in -lMesaGL""... $ac_c" 1>&6
3502 echo "configure:3503: checking for glColorTableEXT in -lMesaGL" >&5
3503 ac_lib_var=`echo MesaGL'_'glColorTableEXT | sed 'y%./+-%__p_%'`
3504 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3505   echo $ac_n "(cached) $ac_c" 1>&6
3506 else
3507   ac_save_LIBS="$LIBS"
3508 LIBS="-lMesaGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
3509 cat > conftest.$ac_ext <<EOF
3510 #line 3511 "configure"
3511 #include "confdefs.h"
3512 /* Override any gcc2 internal prototype to avoid an error.  */
3513 /* We use char because int might match the return type of a gcc2
3514     builtin and then its argument prototype would still apply.  */
3515 char glColorTableEXT();
3516
3517 int main() {
3518 glColorTableEXT()
3519 ; return 0; }
3520 EOF
3521 if { (eval echo configure:3522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3522   rm -rf conftest*
3523   eval "ac_cv_lib_$ac_lib_var=yes"
3524 else
3525   echo "configure: failed program was:" >&5
3526   cat conftest.$ac_ext >&5
3527   rm -rf conftest*
3528   eval "ac_cv_lib_$ac_lib_var=no"
3529 fi
3530 rm -f conftest*
3531 LIBS="$ac_save_LIBS"
3532
3533 fi
3534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3535   echo "$ac_t""yes" 1>&6
3536   cat >> confdefs.h <<\EOF
3537 #define HAVE_GL_PALETTED_TEXTURE 1
3538 EOF
3539
3540 else
3541   echo "$ac_t""no" 1>&6
3542 fi
3543
3544             else
3545                 echo $ac_n "checking for glColorTableEXT in -lGL""... $ac_c" 1>&6
3546 echo "configure:3547: checking for glColorTableEXT in -lGL" >&5
3547 ac_lib_var=`echo GL'_'glColorTableEXT | sed 'y%./+-%__p_%'`
3548 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3549   echo $ac_n "(cached) $ac_c" 1>&6
3550 else
3551   ac_save_LIBS="$LIBS"
3552 LIBS="-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
3553 cat > conftest.$ac_ext <<EOF
3554 #line 3555 "configure"
3555 #include "confdefs.h"
3556 /* Override any gcc2 internal prototype to avoid an error.  */
3557 /* We use char because int might match the return type of a gcc2
3558     builtin and then its argument prototype would still apply.  */
3559 char glColorTableEXT();
3560
3561 int main() {
3562 glColorTableEXT()
3563 ; return 0; }
3564 EOF
3565 if { (eval echo configure:3566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3566   rm -rf conftest*
3567   eval "ac_cv_lib_$ac_lib_var=yes"
3568 else
3569   echo "configure: failed program was:" >&5
3570   cat conftest.$ac_ext >&5
3571   rm -rf conftest*
3572   eval "ac_cv_lib_$ac_lib_var=no"
3573 fi
3574 rm -f conftest*
3575 LIBS="$ac_save_LIBS"
3576
3577 fi
3578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3579   echo "$ac_t""yes" 1>&6
3580   cat >> confdefs.h <<\EOF
3581 #define HAVE_GL_PALETTED_TEXTURE 1
3582 EOF
3583
3584 else
3585   echo "$ac_t""no" 1>&6
3586 fi
3587
3588             fi
3589         fi
3590     fi
3591
3592     CPPFLAGS="$ac_save_CPPFLAGS"
3593 else
3594     XLIB=""
3595     X_CFLAGS=""
3596     X_LIBS=""
3597 fi
3598
3599 for ac_hdr in ncurses.h
3600 do
3601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3602 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3603 echo "configure:3604: checking for $ac_hdr" >&5
3604 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   cat > conftest.$ac_ext <<EOF
3608 #line 3609 "configure"
3609 #include "confdefs.h"
3610 #include <$ac_hdr>
3611 EOF
3612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3613 { (eval echo configure:3614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3615 if test -z "$ac_err"; then
3616   rm -rf conftest*
3617   eval "ac_cv_header_$ac_safe=yes"
3618 else
3619   echo "$ac_err" >&5
3620   echo "configure: failed program was:" >&5
3621   cat conftest.$ac_ext >&5
3622   rm -rf conftest*
3623   eval "ac_cv_header_$ac_safe=no"
3624 fi
3625 rm -f conftest*
3626 fi
3627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3628   echo "$ac_t""yes" 1>&6
3629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3630   cat >> confdefs.h <<EOF
3631 #define $ac_tr_hdr 1
3632 EOF
3633  
3634 else
3635   echo "$ac_t""no" 1>&6
3636 fi
3637 done
3638
3639 if test "$ac_cv_header_ncurses_h" = "yes"
3640 then 
3641     echo $ac_n "checking for waddch in -lncurses""... $ac_c" 1>&6
3642 echo "configure:3643: checking for waddch in -lncurses" >&5
3643 ac_lib_var=`echo ncurses'_'waddch | sed 'y%./+-%__p_%'`
3644 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3645   echo $ac_n "(cached) $ac_c" 1>&6
3646 else
3647   ac_save_LIBS="$LIBS"
3648 LIBS="-lncurses  $LIBS"
3649 cat > conftest.$ac_ext <<EOF
3650 #line 3651 "configure"
3651 #include "confdefs.h"
3652 /* Override any gcc2 internal prototype to avoid an error.  */
3653 /* We use char because int might match the return type of a gcc2
3654     builtin and then its argument prototype would still apply.  */
3655 char waddch();
3656
3657 int main() {
3658 waddch()
3659 ; return 0; }
3660 EOF
3661 if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3662   rm -rf conftest*
3663   eval "ac_cv_lib_$ac_lib_var=yes"
3664 else
3665   echo "configure: failed program was:" >&5
3666   cat conftest.$ac_ext >&5
3667   rm -rf conftest*
3668   eval "ac_cv_lib_$ac_lib_var=no"
3669 fi
3670 rm -f conftest*
3671 LIBS="$ac_save_LIBS"
3672
3673 fi
3674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3675   echo "$ac_t""yes" 1>&6
3676     ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3677     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3678   cat >> confdefs.h <<EOF
3679 #define $ac_tr_lib 1
3680 EOF
3681
3682   LIBS="-lncurses $LIBS"
3683
3684 else
3685   echo "$ac_t""no" 1>&6
3686 fi
3687
3688 fi
3689 if test "$ac_cv_lib_ncurses_waddch" = "yes"
3690 then
3691     echo $ac_n "checking for resizeterm in -lncurses""... $ac_c" 1>&6
3692 echo "configure:3693: checking for resizeterm in -lncurses" >&5
3693 ac_lib_var=`echo ncurses'_'resizeterm | sed 'y%./+-%__p_%'`
3694 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697   ac_save_LIBS="$LIBS"
3698 LIBS="-lncurses  $LIBS"
3699 cat > conftest.$ac_ext <<EOF
3700 #line 3701 "configure"
3701 #include "confdefs.h"
3702 /* Override any gcc2 internal prototype to avoid an error.  */
3703 /* We use char because int might match the return type of a gcc2
3704     builtin and then its argument prototype would still apply.  */
3705 char resizeterm();
3706
3707 int main() {
3708 resizeterm()
3709 ; return 0; }
3710 EOF
3711 if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3712   rm -rf conftest*
3713   eval "ac_cv_lib_$ac_lib_var=yes"
3714 else
3715   echo "configure: failed program was:" >&5
3716   cat conftest.$ac_ext >&5
3717   rm -rf conftest*
3718   eval "ac_cv_lib_$ac_lib_var=no"
3719 fi
3720 rm -f conftest*
3721 LIBS="$ac_save_LIBS"
3722
3723 fi
3724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3725   echo "$ac_t""yes" 1>&6
3726   cat >> confdefs.h <<\EOF
3727 #define HAVE_RESIZETERM 1
3728 EOF
3729
3730 else
3731   echo "$ac_t""no" 1>&6
3732 fi
3733
3734     echo $ac_n "checking for getbkgd in -lncurses""... $ac_c" 1>&6
3735 echo "configure:3736: checking for getbkgd in -lncurses" >&5
3736 ac_lib_var=`echo ncurses'_'getbkgd | sed 'y%./+-%__p_%'`
3737 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3738   echo $ac_n "(cached) $ac_c" 1>&6
3739 else
3740   ac_save_LIBS="$LIBS"
3741 LIBS="-lncurses  $LIBS"
3742 cat > conftest.$ac_ext <<EOF
3743 #line 3744 "configure"
3744 #include "confdefs.h"
3745 /* Override any gcc2 internal prototype to avoid an error.  */
3746 /* We use char because int might match the return type of a gcc2
3747     builtin and then its argument prototype would still apply.  */
3748 char getbkgd();
3749
3750 int main() {
3751 getbkgd()
3752 ; return 0; }
3753 EOF
3754 if { (eval echo configure:3755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3755   rm -rf conftest*
3756   eval "ac_cv_lib_$ac_lib_var=yes"
3757 else
3758   echo "configure: failed program was:" >&5
3759   cat conftest.$ac_ext >&5
3760   rm -rf conftest*
3761   eval "ac_cv_lib_$ac_lib_var=no"
3762 fi
3763 rm -f conftest*
3764 LIBS="$ac_save_LIBS"
3765
3766 fi
3767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3768   echo "$ac_t""yes" 1>&6
3769   cat >> confdefs.h <<\EOF
3770 #define HAVE_GETBKGD 1
3771 EOF
3772
3773 else
3774   echo "$ac_t""no" 1>&6
3775 fi
3776
3777 else
3778     for ac_hdr in curses.h
3779 do
3780 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3781 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3782 echo "configure:3783: checking for $ac_hdr" >&5
3783 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3784   echo $ac_n "(cached) $ac_c" 1>&6
3785 else
3786   cat > conftest.$ac_ext <<EOF
3787 #line 3788 "configure"
3788 #include "confdefs.h"
3789 #include <$ac_hdr>
3790 EOF
3791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3792 { (eval echo configure:3793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3794 if test -z "$ac_err"; then
3795   rm -rf conftest*
3796   eval "ac_cv_header_$ac_safe=yes"
3797 else
3798   echo "$ac_err" >&5
3799   echo "configure: failed program was:" >&5
3800   cat conftest.$ac_ext >&5
3801   rm -rf conftest*
3802   eval "ac_cv_header_$ac_safe=no"
3803 fi
3804 rm -f conftest*
3805 fi
3806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3807   echo "$ac_t""yes" 1>&6
3808     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3809   cat >> confdefs.h <<EOF
3810 #define $ac_tr_hdr 1
3811 EOF
3812  
3813 else
3814   echo "$ac_t""no" 1>&6
3815 fi
3816 done
3817
3818     if test "$ac_cv_header_curses_h" = "yes"
3819     then    
3820        echo $ac_n "checking for waddch in -lcurses""... $ac_c" 1>&6
3821 echo "configure:3822: checking for waddch in -lcurses" >&5
3822 ac_lib_var=`echo curses'_'waddch | sed 'y%./+-%__p_%'`
3823 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   ac_save_LIBS="$LIBS"
3827 LIBS="-lcurses  $LIBS"
3828 cat > conftest.$ac_ext <<EOF
3829 #line 3830 "configure"
3830 #include "confdefs.h"
3831 /* Override any gcc2 internal prototype to avoid an error.  */
3832 /* We use char because int might match the return type of a gcc2
3833     builtin and then its argument prototype would still apply.  */
3834 char waddch();
3835
3836 int main() {
3837 waddch()
3838 ; return 0; }
3839 EOF
3840 if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3841   rm -rf conftest*
3842   eval "ac_cv_lib_$ac_lib_var=yes"
3843 else
3844   echo "configure: failed program was:" >&5
3845   cat conftest.$ac_ext >&5
3846   rm -rf conftest*
3847   eval "ac_cv_lib_$ac_lib_var=no"
3848 fi
3849 rm -f conftest*
3850 LIBS="$ac_save_LIBS"
3851
3852 fi
3853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3854   echo "$ac_t""yes" 1>&6
3855     ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3856     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3857   cat >> confdefs.h <<EOF
3858 #define $ac_tr_lib 1
3859 EOF
3860
3861   LIBS="-lcurses $LIBS"
3862
3863 else
3864   echo "$ac_t""no" 1>&6
3865 fi
3866
3867        echo $ac_n "checking for resizeterm in -lcurses""... $ac_c" 1>&6
3868 echo "configure:3869: checking for resizeterm in -lcurses" >&5
3869 ac_lib_var=`echo curses'_'resizeterm | sed 'y%./+-%__p_%'`
3870 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3871   echo $ac_n "(cached) $ac_c" 1>&6
3872 else
3873   ac_save_LIBS="$LIBS"
3874 LIBS="-lcurses  $LIBS"
3875 cat > conftest.$ac_ext <<EOF
3876 #line 3877 "configure"
3877 #include "confdefs.h"
3878 /* Override any gcc2 internal prototype to avoid an error.  */
3879 /* We use char because int might match the return type of a gcc2
3880     builtin and then its argument prototype would still apply.  */
3881 char resizeterm();
3882
3883 int main() {
3884 resizeterm()
3885 ; return 0; }
3886 EOF
3887 if { (eval echo configure:3888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3888   rm -rf conftest*
3889   eval "ac_cv_lib_$ac_lib_var=yes"
3890 else
3891   echo "configure: failed program was:" >&5
3892   cat conftest.$ac_ext >&5
3893   rm -rf conftest*
3894   eval "ac_cv_lib_$ac_lib_var=no"
3895 fi
3896 rm -f conftest*
3897 LIBS="$ac_save_LIBS"
3898
3899 fi
3900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3901   echo "$ac_t""yes" 1>&6
3902   cat >> confdefs.h <<\EOF
3903 #define HAVE_RESIZETERM 1
3904 EOF
3905
3906 else
3907   echo "$ac_t""no" 1>&6
3908 fi
3909
3910        echo $ac_n "checking for getbkgd in -lcurses""... $ac_c" 1>&6
3911 echo "configure:3912: checking for getbkgd in -lcurses" >&5
3912 ac_lib_var=`echo curses'_'getbkgd | sed 'y%./+-%__p_%'`
3913 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3914   echo $ac_n "(cached) $ac_c" 1>&6
3915 else
3916   ac_save_LIBS="$LIBS"
3917 LIBS="-lcurses  $LIBS"
3918 cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921 /* Override any gcc2 internal prototype to avoid an error.  */
3922 /* We use char because int might match the return type of a gcc2
3923     builtin and then its argument prototype would still apply.  */
3924 char getbkgd();
3925
3926 int main() {
3927 getbkgd()
3928 ; return 0; }
3929 EOF
3930 if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3931   rm -rf conftest*
3932   eval "ac_cv_lib_$ac_lib_var=yes"
3933 else
3934   echo "configure: failed program was:" >&5
3935   cat conftest.$ac_ext >&5
3936   rm -rf conftest*
3937   eval "ac_cv_lib_$ac_lib_var=no"
3938 fi
3939 rm -f conftest*
3940 LIBS="$ac_save_LIBS"
3941
3942 fi
3943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3944   echo "$ac_t""yes" 1>&6
3945   cat >> confdefs.h <<\EOF
3946 #define HAVE_GETBKGD 1
3947 EOF
3948
3949 else
3950   echo "$ac_t""no" 1>&6
3951 fi
3952
3953     fi
3954 fi
3955
3956 echo $ac_n "checking "for GNU style IPX support"""... $ac_c" 1>&6
3957 echo "configure:3958: checking "for GNU style IPX support"" >&5
3958 if eval "test \"`echo '$''{'ac_cv_c_ipx_gnu'+set}'`\" = set"; then
3959   echo $ac_n "(cached) $ac_c" 1>&6
3960 else
3961   cat > conftest.$ac_ext <<EOF
3962 #line 3963 "configure"
3963 #include "confdefs.h"
3964 #include <sys/socket.h>
3965     #include <netipx/ipx.h>
3966 int main() {
3967 ((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
3968 ; return 0; }
3969 EOF
3970 if { (eval echo configure:3971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3971   rm -rf conftest*
3972   ac_cv_c_ipx_gnu="yes"
3973 else
3974   echo "configure: failed program was:" >&5
3975   cat conftest.$ac_ext >&5
3976   rm -rf conftest*
3977   ac_cv_c_ipx_gnu="no"
3978 fi
3979 rm -f conftest*
3980  
3981 fi
3982
3983 echo "$ac_t""$ac_cv_c_ipx_gnu" 1>&6
3984 if test "$ac_cv_c_ipx_gnu" = "yes"
3985 then
3986     cat >> confdefs.h <<\EOF
3987 #define HAVE_IPX_GNU 1
3988 EOF
3989
3990 fi
3991
3992 if test "$ac_cv_c_ipx_gnu" = "no"
3993 then
3994  echo $ac_n "checking "for linux style IPX support"""... $ac_c" 1>&6
3995 echo "configure:3996: checking "for linux style IPX support"" >&5
3996 if eval "test \"`echo '$''{'ac_cv_c_ipx_linux'+set}'`\" = set"; then
3997   echo $ac_n "(cached) $ac_c" 1>&6
3998 else
3999   cat > conftest.$ac_ext <<EOF
4000 #line 4001 "configure"
4001 #include "confdefs.h"
4002 #include <sys/socket.h>
4003      #include <asm/types.h>
4004      #include <linux/ipx.h>
4005 int main() {
4006 ((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
4007 ; return 0; }
4008 EOF
4009 if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4010   rm -rf conftest*
4011   ac_cv_c_ipx_linux="yes"
4012 else
4013   echo "configure: failed program was:" >&5
4014   cat conftest.$ac_ext >&5
4015   rm -rf conftest*
4016   ac_cv_c_ipx_linux="no"
4017 fi
4018 rm -f conftest*
4019   
4020 fi
4021
4022 echo "$ac_t""$ac_cv_c_ipx_linux" 1>&6
4023   if test "$ac_cv_c_ipx_linux" = "yes"
4024   then
4025       cat >> confdefs.h <<\EOF
4026 #define HAVE_IPX_LINUX 1
4027 EOF
4028
4029   fi
4030 fi
4031
4032 for ac_hdr in sys/soundcard.h machine/soundcard.h soundcard.h
4033 do
4034 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4035 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4036 echo "configure:4037: checking for $ac_hdr" >&5
4037 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4038   echo $ac_n "(cached) $ac_c" 1>&6
4039 else
4040   cat > conftest.$ac_ext <<EOF
4041 #line 4042 "configure"
4042 #include "confdefs.h"
4043 #include <$ac_hdr>
4044 EOF
4045 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4046 { (eval echo configure:4047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4047 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4048 if test -z "$ac_err"; then
4049   rm -rf conftest*
4050   eval "ac_cv_header_$ac_safe=yes"
4051 else
4052   echo "$ac_err" >&5
4053   echo "configure: failed program was:" >&5
4054   cat conftest.$ac_ext >&5
4055   rm -rf conftest*
4056   eval "ac_cv_header_$ac_safe=no"
4057 fi
4058 rm -f conftest*
4059 fi
4060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4061   echo "$ac_t""yes" 1>&6
4062     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4063   cat >> confdefs.h <<EOF
4064 #define $ac_tr_hdr 1
4065 EOF
4066  break
4067 else
4068   echo "$ac_t""no" 1>&6
4069 fi
4070 done
4071
4072
4073 echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6
4074 echo "configure:4075: checking "for Open Sound System"" >&5
4075 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then
4076   echo $ac_n "(cached) $ac_c" 1>&6
4077 else
4078   cat > conftest.$ac_ext <<EOF
4079 #line 4080 "configure"
4080 #include "confdefs.h"
4081
4082         #if defined(HAVE_SYS_SOUNDCARD_H)
4083                 #include <sys/soundcard.h>
4084         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
4085                 #include <machine/soundcard.h>
4086         #elif defined(HAVE_SOUNDCARD_H)
4087                 #include <soundcard.h>
4088         #endif
4089         
4090 int main() {
4091
4092
4093 /* check for one of the Open Sound System specific SNDCTL_ defines */
4094 #if !defined(SNDCTL_DSP_STEREO)
4095 #error No open sound system
4096 #endif
4097
4098 ; return 0; }
4099 EOF
4100 if { (eval echo configure:4101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4101   rm -rf conftest*
4102   ac_cv_c_opensoundsystem="yes"
4103 else
4104   echo "configure: failed program was:" >&5
4105   cat conftest.$ac_ext >&5
4106   rm -rf conftest*
4107   ac_cv_c_opensoundsystem="no"
4108 fi
4109 rm -f conftest*
4110 fi
4111
4112 echo "$ac_t""$ac_cv_c_opensoundsystem" 1>&6
4113
4114 if test "$ac_cv_c_opensoundsystem" = "yes"
4115 then
4116     cat >> confdefs.h <<\EOF
4117 #define HAVE_OSS 1
4118 EOF
4119
4120 fi
4121
4122 echo $ac_n "checking "for Open Sound System/MIDI interface"""... $ac_c" 1>&6
4123 echo "configure:4124: checking "for Open Sound System/MIDI interface"" >&5
4124 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem_midi'+set}'`\" = set"; then
4125   echo $ac_n "(cached) $ac_c" 1>&6
4126 else
4127   cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130
4131         #if defined(HAVE_SYS_SOUNDCARD_H)
4132                 #include <sys/soundcard.h>
4133         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
4134                 #include <machine/soundcard.h>
4135         #elif defined(HAVE_SOUNDCARD_H)
4136                 #include <soundcard.h>
4137         #endif
4138         
4139 int main() {
4140
4141
4142 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
4143 #if !defined(SNDCTL_SEQ_SYNC)
4144 #error No open sound system MIDI interface
4145 #endif
4146
4147 ; return 0; }
4148 EOF
4149 if { (eval echo configure:4150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4150   rm -rf conftest*
4151   ac_cv_c_opensoundsystem_midi="yes"
4152 else
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -rf conftest*
4156   ac_cv_c_opensoundsystem_midi="no"
4157 fi
4158 rm -f conftest*
4159 fi
4160
4161 echo "$ac_t""$ac_cv_c_opensoundsystem_midi" 1>&6
4162
4163 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
4164 then
4165     cat >> confdefs.h <<\EOF
4166 #define HAVE_OSS_MIDI 1
4167 EOF
4168
4169 fi
4170
4171 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
4172
4173
4174 if test "x${GCC}" = "xyes"
4175 then
4176   CFLAGS="$CFLAGS -Wall"
4177   echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
4178 echo "configure:4179: checking "for gcc strength-reduce bug"" >&5
4179 if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
4180   echo $ac_n "(cached) $ac_c" 1>&6
4181 else
4182   if test "$cross_compiling" = yes; then
4183   ac_cv_c_gcc_strength_bug="yes"
4184 else
4185   cat > conftest.$ac_ext <<EOF
4186 #line 4187 "configure"
4187 #include "confdefs.h"
4188
4189 int main(void) {
4190   static int Array[3];
4191   unsigned int B = 3;
4192   int i;
4193   for(i=0; i<B; i++) Array[i] = i - 3;
4194   exit( Array[1] != -2 );
4195 }
4196 EOF
4197 if { (eval echo configure:4198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4198 then
4199   ac_cv_c_gcc_strength_bug="no"
4200 else
4201   echo "configure: failed program was:" >&5
4202   cat conftest.$ac_ext >&5
4203   rm -fr conftest*
4204   ac_cv_c_gcc_strength_bug="yes"
4205 fi
4206 rm -fr conftest*
4207 fi
4208  
4209 fi
4210
4211 echo "$ac_t""$ac_cv_c_gcc_strength_bug" 1>&6
4212   if test "$ac_cv_c_gcc_strength_bug" = "yes"
4213   then
4214     CFLAGS="$CFLAGS -fno-strength-reduce"
4215   fi
4216 fi
4217
4218
4219 echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6
4220 echo "configure:4221: checking "whether external symbols need an underscore prefix"" >&5
4221 if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   saved_libs=$LIBS
4225 LIBS="conftest_asm.s $LIBS"
4226 cat > conftest_asm.s <<EOF
4227         .globl _ac_test
4228 _ac_test:
4229         .long 0
4230 EOF
4231 cat > conftest.$ac_ext <<EOF
4232 #line 4233 "configure"
4233 #include "confdefs.h"
4234 extern int ac_test;
4235 int main() {
4236 if (ac_test) return 1
4237 ; return 0; }
4238 EOF
4239 if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4240   rm -rf conftest*
4241   ac_cv_c_extern_prefix="yes"
4242 else
4243   echo "configure: failed program was:" >&5
4244   cat conftest.$ac_ext >&5
4245   rm -rf conftest*
4246   ac_cv_c_extern_prefix="no"
4247 fi
4248 rm -f conftest*
4249 LIBS=$saved_libs
4250 fi
4251
4252 echo "$ac_t""$ac_cv_c_extern_prefix" 1>&6
4253 if test "$ac_cv_c_extern_prefix" = "yes"
4254 then
4255   cat >> confdefs.h <<\EOF
4256 #define NEED_UNDERSCORE_PREFIX 1
4257 EOF
4258
4259 fi
4260
4261
4262 echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6
4263 echo "configure:4264: checking "whether assembler accepts .string"" >&5
4264 if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   saved_libs=$LIBS
4268 LIBS="conftest_asm.s $LIBS"
4269 cat > conftest_asm.s <<EOF
4270         .string "test"
4271 EOF
4272 cat > conftest.$ac_ext <<EOF
4273 #line 4274 "configure"
4274 #include "confdefs.h"
4275
4276 int main() {
4277
4278 ; return 0; }
4279 EOF
4280 if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4281   rm -rf conftest*
4282   ac_cv_c_asm_string="yes"
4283 else
4284   echo "configure: failed program was:" >&5
4285   cat conftest.$ac_ext >&5
4286   rm -rf conftest*
4287   ac_cv_c_asm_string="no"
4288 fi
4289 rm -f conftest*
4290 LIBS=$saved_libs
4291 fi
4292
4293 echo "$ac_t""$ac_cv_c_asm_string" 1>&6
4294 if test "$ac_cv_c_asm_string" = "yes"
4295 then
4296   cat >> confdefs.h <<\EOF
4297 #define HAVE_ASM_STRING 1
4298 EOF
4299
4300 fi
4301
4302
4303 LDSHARED=""
4304 if test "$LIBEXT" = "so"
4305 then
4306   echo $ac_n "checking "whether we can build a Linux dll"""... $ac_c" 1>&6
4307 echo "configure:4308: checking "whether we can build a Linux dll"" >&5
4308 if eval "test \"`echo '$''{'ac_cv_c_dll_linux'+set}'`\" = set"; then
4309   echo $ac_n "(cached) $ac_c" 1>&6
4310 else
4311   saved_cflags=$CFLAGS
4312   CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
4313   cat > conftest.$ac_ext <<EOF
4314 #line 4315 "configure"
4315 #include "confdefs.h"
4316
4317 int main() {
4318 return 1
4319 ; return 0; }
4320 EOF
4321 if { (eval echo configure:4322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4322   rm -rf conftest*
4323   ac_cv_c_dll_linux="yes"
4324 else
4325   echo "configure: failed program was:" >&5
4326   cat conftest.$ac_ext >&5
4327   rm -rf conftest*
4328   ac_cv_c_dll_linux="no"
4329 fi
4330 rm -f conftest*
4331   CFLAGS=$saved_cflags
4332   
4333 fi
4334
4335 echo "$ac_t""$ac_cv_c_dll_linux" 1>&6
4336   if test "$ac_cv_c_dll_linux" = "yes"
4337   then
4338     LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
4339   else
4340     echo $ac_n "checking whether we can build a UnixWare (Solaris) dll""... $ac_c" 1>&6
4341 echo "configure:4342: checking whether we can build a UnixWare (Solaris) dll" >&5
4342 if eval "test \"`echo '$''{'ac_cv_c_dll_unixware'+set}'`\" = set"; then
4343   echo $ac_n "(cached) $ac_c" 1>&6
4344 else
4345   saved_cflags=$CFLAGS
4346     CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
4347     cat > conftest.$ac_ext <<EOF
4348 #line 4349 "configure"
4349 #include "confdefs.h"
4350
4351 int main() {
4352 return 1
4353 ; return 0; }
4354 EOF
4355 if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4356   rm -rf conftest*
4357   ac_cv_c_dll_unixware="yes"
4358 else
4359   echo "configure: failed program was:" >&5
4360   cat conftest.$ac_ext >&5
4361   rm -rf conftest*
4362   ac_cv_c_dll_unixware="no"
4363 fi
4364 rm -f conftest*
4365     CFLAGS=$saved_cflags
4366     
4367 fi
4368
4369 echo "$ac_t""$ac_cv_c_dll_unixware" 1>&6
4370     if test "$ac_cv_c_dll_unixware" = "yes"
4371     then
4372       LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
4373     else
4374       echo $ac_n "checking "whether we can build a NetBSD dll"""... $ac_c" 1>&6
4375 echo "configure:4376: checking "whether we can build a NetBSD dll"" >&5
4376 if eval "test \"`echo '$''{'ac_cv_c_dll_netbsd'+set}'`\" = set"; then
4377   echo $ac_n "(cached) $ac_c" 1>&6
4378 else
4379   saved_cflags=$CFLAGS
4380       CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
4381       cat > conftest.$ac_ext <<EOF
4382 #line 4383 "configure"
4383 #include "confdefs.h"
4384
4385 int main() {
4386 return 1
4387 ; return 0; }
4388 EOF
4389 if { (eval echo configure:4390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4390   rm -rf conftest*
4391   ac_cv_c_dll_netbsd="yes"
4392 else
4393   echo "configure: failed program was:" >&5
4394   cat conftest.$ac_ext >&5
4395   rm -rf conftest*
4396   ac_cv_c_dll_netbsd="no"
4397 fi
4398 rm -f conftest*
4399       CFLAGS=$saved_cflags
4400       
4401 fi
4402
4403 echo "$ac_t""$ac_cv_c_dll_netbsd" 1>&6
4404       if test "$ac_cv_c_dll_netbsd" = "yes"
4405       then
4406         LDSHARED="ld -Bshareable -Bforcearchive"
4407       fi
4408     fi
4409   fi
4410   if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
4411   then
4412     LIBEXT="a"
4413   fi
4414 fi
4415
4416 DLLFLAGS=""
4417 BUILDFLAGS=""
4418 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine"
4419
4420 if test "$LIBEXT" = "so"; then
4421     BUILDFLAGS="-pic"
4422     DLLFLAGS="-fPIC"
4423 else
4424     echo $ac_n "checking whether the linker supports --[no]-whole-archive (Linux)""... $ac_c" 1>&6
4425 echo "configure:4426: checking whether the linker supports --[no]-whole-archive (Linux)" >&5
4426 if eval "test \"`echo '$''{'ac_cv_c_whole_archive'+set}'`\" = set"; then
4427   echo $ac_n "(cached) $ac_c" 1>&6
4428 else
4429   saved_cflags=$CFLAGS
4430             CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
4431             cat > conftest.$ac_ext <<EOF
4432 #line 4433 "configure"
4433 #include "confdefs.h"
4434
4435 int main() {
4436 return 1
4437 ; return 0; }
4438 EOF
4439 if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4440   rm -rf conftest*
4441   ac_cv_c_whole_archive="yes"
4442 else
4443   echo "configure: failed program was:" >&5
4444   cat conftest.$ac_ext >&5
4445   rm -rf conftest*
4446   ac_cv_c_whole_archive="no"
4447 fi
4448 rm -f conftest*
4449             CFLAGS=$saved_cflags
4450             
4451 fi
4452
4453 echo "$ac_t""$ac_cv_c_whole_archive" 1>&6
4454     if test "$ac_cv_c_whole_archive" = "yes"
4455     then
4456         DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
4457     else
4458         echo $ac_n "checking whether the linker supports -z {all,default}extract (Linux)""... $ac_c" 1>&6
4459 echo "configure:4460: checking whether the linker supports -z {all,default}extract (Linux)" >&5
4460 if eval "test \"`echo '$''{'ac_cv_c_allextract'+set}'`\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463   saved_cflags=$CFLAGS
4464                 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
4465                 cat > conftest.$ac_ext <<EOF
4466 #line 4467 "configure"
4467 #include "confdefs.h"
4468
4469 int main() {
4470 return 1
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4474   rm -rf conftest*
4475   ac_cv_c_allextract="yes"
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -rf conftest*
4480   ac_cv_c_allextract="no"
4481 fi
4482 rm -f conftest*
4483                 CFLAGS=$saved_cflags
4484                 
4485 fi
4486
4487 echo "$ac_t""$ac_cv_c_allextract" 1>&6
4488         if test "$ac_cv_c_allextract" = "yes"
4489         then
4490             DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
4491         fi
4492     fi
4493 fi
4494
4495
4496
4497
4498
4499
4500
4501
4502 wine_cv_libc_reentrant=no 
4503 echo $ac_n "checking "for reentrant libc: __errno_location"""... $ac_c" 1>&6
4504 echo "configure:4505: checking "for reentrant libc: __errno_location"" >&5
4505 if eval "test \"`echo '$''{'wine_cv_libc_r__errno_location'+set}'`\" = set"; then
4506   echo $ac_n "(cached) $ac_c" 1>&6
4507 else
4508   if test "$cross_compiling" = yes; then
4509   wine_cv_libc_r__errno_location=yes 
4510 else
4511   cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 int myerrno = 0;
4515 char buf[256];
4516 int *__errno_location(){return &myerrno;}
4517 main(){connect(0,buf,255); exit(!myerrno);}
4518 EOF
4519 if { (eval echo configure:4520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4520 then
4521   wine_cv_libc_r__errno_location=yes
4522 else
4523   echo "configure: failed program was:" >&5
4524   cat conftest.$ac_ext >&5
4525   rm -fr conftest*
4526   wine_cv_libc_r__errno_location=no
4527 fi
4528 rm -fr conftest*
4529 fi
4530
4531
4532 fi
4533
4534 echo "$ac_t""$wine_cv_libc_r__errno_location" 1>&6
4535 if test "$wine_cv_libc_r__errno_location" = "yes"
4536 then
4537     cat >> confdefs.h <<\EOF
4538 #define HAVE__ERRNO_LOCATION 1
4539 EOF
4540
4541     wine_cv_libc_reentrant=__errno_location 
4542 fi
4543 echo $ac_n "checking "for reentrant libc: __error"""... $ac_c" 1>&6
4544 echo "configure:4545: checking "for reentrant libc: __error"" >&5
4545 if eval "test \"`echo '$''{'wine_cv_libc_r__error'+set}'`\" = set"; then
4546   echo $ac_n "(cached) $ac_c" 1>&6
4547 else
4548   if test "$cross_compiling" = yes; then
4549   wine_cv_libc_r__error=yes 
4550 else
4551   cat > conftest.$ac_ext <<EOF
4552 #line 4553 "configure"
4553 #include "confdefs.h"
4554 int myerrno = 0;
4555 char buf[256];
4556 int *__error(){return &myerrno;}
4557 main(){connect(0,buf,255); exit(!myerrno);}
4558 EOF
4559 if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4560 then
4561   wine_cv_libc_r__error=yes
4562 else
4563   echo "configure: failed program was:" >&5
4564   cat conftest.$ac_ext >&5
4565   rm -fr conftest*
4566   wine_cv_libc_r__error=no
4567 fi
4568 rm -fr conftest*
4569 fi
4570
4571
4572 fi
4573
4574 echo "$ac_t""$wine_cv_libc_r__error" 1>&6
4575 if test "$wine_cv_libc_r__error" = "yes"
4576 then
4577     cat >> confdefs.h <<\EOF
4578 #define HAVE__ERROR 1
4579 EOF
4580
4581     wine_cv_libc_reentrant=__error 
4582 fi
4583 echo $ac_n "checking "for reentrant libc: ___errno"""... $ac_c" 1>&6
4584 echo "configure:4585: checking "for reentrant libc: ___errno"" >&5
4585 if eval "test \"`echo '$''{'wine_cv_libc_r___errno'+set}'`\" = set"; then
4586   echo $ac_n "(cached) $ac_c" 1>&6
4587 else
4588   if test "$cross_compiling" = yes; then
4589   wine_cv_libc_r___errno=yes 
4590 else
4591   cat > conftest.$ac_ext <<EOF
4592 #line 4593 "configure"
4593 #include "confdefs.h"
4594 int myerrno = 0;
4595 char buf[256];
4596 int *___errno(){return &myerrno;}
4597 main(){connect(0,buf,255); exit(!myerrno);}
4598 EOF
4599 if { (eval echo configure:4600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4600 then
4601   wine_cv_libc_r___errno=yes
4602 else
4603   echo "configure: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   rm -fr conftest*
4606   wine_cv_libc_r___errno=no
4607 fi
4608 rm -fr conftest*
4609 fi
4610
4611
4612 fi
4613
4614 echo "$ac_t""$wine_cv_libc_r___errno" 1>&6
4615 if test "$wine_cv_libc_r___errno" = "yes"
4616 then
4617     cat >> confdefs.h <<\EOF
4618 #define HAVE___ERRNO 1
4619 EOF
4620
4621     wine_cv_libc_reentrant=___errno 
4622 fi
4623 echo $ac_n "checking "for reentrant libc: __thr_errno"""... $ac_c" 1>&6
4624 echo "configure:4625: checking "for reentrant libc: __thr_errno"" >&5
4625 if eval "test \"`echo '$''{'wine_cv_libc_r__thr_errno'+set}'`\" = set"; then
4626   echo $ac_n "(cached) $ac_c" 1>&6
4627 else
4628   if test "$cross_compiling" = yes; then
4629   wine_cv_libc_r__thr_errno=yes 
4630 else
4631   cat > conftest.$ac_ext <<EOF
4632 #line 4633 "configure"
4633 #include "confdefs.h"
4634 int myerrno = 0;
4635 char buf[256];
4636 int *__thr_errno(){return &myerrno;}
4637 main(){connect(0,buf,255); exit(!myerrno);}
4638 EOF
4639 if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4640 then
4641   wine_cv_libc_r__thr_errno=yes
4642 else
4643   echo "configure: failed program was:" >&5
4644   cat conftest.$ac_ext >&5
4645   rm -fr conftest*
4646   wine_cv_libc_r__thr_errno=no
4647 fi
4648 rm -fr conftest*
4649 fi
4650
4651
4652 fi
4653
4654 echo "$ac_t""$wine_cv_libc_r__thr_errno" 1>&6
4655 if test "$wine_cv_libc_r__thr_errno" = "yes"
4656 then
4657     cat >> confdefs.h <<\EOF
4658 #define HAVE__THR_ERRNO 1
4659 EOF
4660
4661     wine_cv_libc_reentrant=__thr_errno 
4662 fi
4663 if test "$wine_cv_libc_reentrant" = "no" 
4664 then
4665   cat >> confdefs.h <<\EOF
4666 #define NO_REENTRANT_LIBC 1
4667 EOF
4668
4669 fi
4670
4671
4672 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
4673 then
4674 echo $ac_n "checking "for reentrant X libraries"""... $ac_c" 1>&6
4675 echo "configure:4676: checking "for reentrant X libraries"" >&5
4676 if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then
4677   echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679    if test "x$with_reentrant_x" = "xno" 
4680     then
4681         wine_cv_x_reentrant=no
4682     else
4683         libX11_check=none
4684         for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
4685             if test -r $dir/libX11.so; then
4686                 libX11_check="-D $dir/libX11.so"
4687                 break 1
4688             fi
4689             if test -r $dir/libX11.a; then
4690                 libX11_check="$dir/libX11.a"
4691                 break 1
4692             fi
4693         done
4694         if test "$libX11_check" != "none"; then
4695             if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
4696             then
4697                 wine_cv_x_reentrant=yes
4698             else
4699                 wine_cv_x_reentrant=no
4700             fi
4701         else
4702             wine_cv_x_reentrant=unknown
4703         fi
4704     fi  
4705 fi
4706
4707 echo "$ac_t""$wine_cv_x_reentrant" 1>&6
4708 else
4709     wine_cv_x_reentrant=no
4710 fi
4711 if test "$wine_cv_x_reentrant" = "no"
4712 then
4713   cat >> confdefs.h <<\EOF
4714 #define NO_REENTRANT_X11 1
4715 EOF
4716
4717 fi
4718
4719
4720 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4721 echo "configure:4722: checking whether byte ordering is bigendian" >&5
4722 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
4723   echo $ac_n "(cached) $ac_c" 1>&6
4724 else
4725   ac_cv_c_bigendian=unknown
4726 # See if sys/param.h defines the BYTE_ORDER macro.
4727 cat > conftest.$ac_ext <<EOF
4728 #line 4729 "configure"
4729 #include "confdefs.h"
4730 #include <sys/types.h>
4731 #include <sys/param.h>
4732 int main() {
4733
4734 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4735  bogus endian macros
4736 #endif
4737 ; return 0; }
4738 EOF
4739 if { (eval echo configure:4740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4740   rm -rf conftest*
4741   # It does; now see whether it defined to BIG_ENDIAN or not.
4742 cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4745 #include <sys/types.h>
4746 #include <sys/param.h>
4747 int main() {
4748
4749 #if BYTE_ORDER != BIG_ENDIAN
4750  not big endian
4751 #endif
4752 ; return 0; }
4753 EOF
4754 if { (eval echo configure:4755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4755   rm -rf conftest*
4756   ac_cv_c_bigendian=yes
4757 else
4758   echo "configure: failed program was:" >&5
4759   cat conftest.$ac_ext >&5
4760   rm -rf conftest*
4761   ac_cv_c_bigendian=no
4762 fi
4763 rm -f conftest*
4764 else
4765   echo "configure: failed program was:" >&5
4766   cat conftest.$ac_ext >&5
4767 fi
4768 rm -f conftest*
4769 if test $ac_cv_c_bigendian = unknown; then
4770 if test "$cross_compiling" = yes; then
4771     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4772 else
4773   cat > conftest.$ac_ext <<EOF
4774 #line 4775 "configure"
4775 #include "confdefs.h"
4776 main () {
4777   /* Are we little or big endian?  From Harbison&Steele.  */
4778   union
4779   {
4780     long l;
4781     char c[sizeof (long)];
4782   } u;
4783   u.l = 1;
4784   exit (u.c[sizeof (long) - 1] == 1);
4785 }
4786 EOF
4787 if { (eval echo configure:4788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4788 then
4789   ac_cv_c_bigendian=no
4790 else
4791   echo "configure: failed program was:" >&5
4792   cat conftest.$ac_ext >&5
4793   rm -fr conftest*
4794   ac_cv_c_bigendian=yes
4795 fi
4796 rm -fr conftest*
4797 fi
4798
4799 fi
4800 fi
4801
4802 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4803 if test $ac_cv_c_bigendian = yes; then
4804   cat >> confdefs.h <<\EOF
4805 #define WORDS_BIGENDIAN 1
4806 EOF
4807
4808 fi
4809
4810
4811
4812 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4813 # for constant arguments.  Useless!
4814 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4815 echo "configure:4816: checking for working alloca.h" >&5
4816 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 #include <alloca.h>
4823 int main() {
4824 void *p = alloca(2 * sizeof(int));
4825 ; return 0; }
4826 EOF
4827 if { (eval echo configure:4828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4828   rm -rf conftest*
4829   ac_cv_header_alloca_h=yes
4830 else
4831   echo "configure: failed program was:" >&5
4832   cat conftest.$ac_ext >&5
4833   rm -rf conftest*
4834   ac_cv_header_alloca_h=no
4835 fi
4836 rm -f conftest*
4837 fi
4838
4839 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4840 if test $ac_cv_header_alloca_h = yes; then
4841   cat >> confdefs.h <<\EOF
4842 #define HAVE_ALLOCA_H 1
4843 EOF
4844
4845 fi
4846
4847 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4848 echo "configure:4849: checking for alloca" >&5
4849 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4850   echo $ac_n "(cached) $ac_c" 1>&6
4851 else
4852   cat > conftest.$ac_ext <<EOF
4853 #line 4854 "configure"
4854 #include "confdefs.h"
4855
4856 #ifdef __GNUC__
4857 # define alloca __builtin_alloca
4858 #else
4859 # ifdef _MSC_VER
4860 #  include <malloc.h>
4861 #  define alloca _alloca
4862 # else
4863 #  if HAVE_ALLOCA_H
4864 #   include <alloca.h>
4865 #  else
4866 #   ifdef _AIX
4867  #pragma alloca
4868 #   else
4869 #    ifndef alloca /* predefined by HP cc +Olibcalls */
4870 char *alloca ();
4871 #    endif
4872 #   endif
4873 #  endif
4874 # endif
4875 #endif
4876
4877 int main() {
4878 char *p = (char *) alloca(1);
4879 ; return 0; }
4880 EOF
4881 if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4882   rm -rf conftest*
4883   ac_cv_func_alloca_works=yes
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -rf conftest*
4888   ac_cv_func_alloca_works=no
4889 fi
4890 rm -f conftest*
4891 fi
4892
4893 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4894 if test $ac_cv_func_alloca_works = yes; then
4895   cat >> confdefs.h <<\EOF
4896 #define HAVE_ALLOCA 1
4897 EOF
4898
4899 fi
4900
4901 if test $ac_cv_func_alloca_works = no; then
4902   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4903   # that cause trouble.  Some versions do not even contain alloca or
4904   # contain a buggy version.  If you still want to use their alloca,
4905   # use ar to extract alloca.o from them instead of compiling alloca.c.
4906   ALLOCA=alloca.${ac_objext}
4907   cat >> confdefs.h <<\EOF
4908 #define C_ALLOCA 1
4909 EOF
4910
4911
4912 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4913 echo "configure:4914: checking whether alloca needs Cray hooks" >&5
4914 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4915   echo $ac_n "(cached) $ac_c" 1>&6
4916 else
4917   cat > conftest.$ac_ext <<EOF
4918 #line 4919 "configure"
4919 #include "confdefs.h"
4920 #if defined(CRAY) && ! defined(CRAY2)
4921 webecray
4922 #else
4923 wenotbecray
4924 #endif
4925
4926 EOF
4927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4928   egrep "webecray" >/dev/null 2>&1; then
4929   rm -rf conftest*
4930   ac_cv_os_cray=yes
4931 else
4932   rm -rf conftest*
4933   ac_cv_os_cray=no
4934 fi
4935 rm -f conftest*
4936
4937 fi
4938
4939 echo "$ac_t""$ac_cv_os_cray" 1>&6
4940 if test $ac_cv_os_cray = yes; then
4941 for ac_func in _getb67 GETB67 getb67; do
4942   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4943 echo "configure:4944: checking for $ac_func" >&5
4944 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4945   echo $ac_n "(cached) $ac_c" 1>&6
4946 else
4947   cat > conftest.$ac_ext <<EOF
4948 #line 4949 "configure"
4949 #include "confdefs.h"
4950 /* System header to define __stub macros and hopefully few prototypes,
4951     which can conflict with char $ac_func(); below.  */
4952 #include <assert.h>
4953 /* Override any gcc2 internal prototype to avoid an error.  */
4954 /* We use char because int might match the return type of a gcc2
4955     builtin and then its argument prototype would still apply.  */
4956 char $ac_func();
4957
4958 int main() {
4959
4960 /* The GNU C library defines this for functions which it implements
4961     to always fail with ENOSYS.  Some functions are actually named
4962     something starting with __ and the normal name is an alias.  */
4963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4964 choke me
4965 #else
4966 $ac_func();
4967 #endif
4968
4969 ; return 0; }
4970 EOF
4971 if { (eval echo configure:4972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4972   rm -rf conftest*
4973   eval "ac_cv_func_$ac_func=yes"
4974 else
4975   echo "configure: failed program was:" >&5
4976   cat conftest.$ac_ext >&5
4977   rm -rf conftest*
4978   eval "ac_cv_func_$ac_func=no"
4979 fi
4980 rm -f conftest*
4981 fi
4982
4983 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4984   echo "$ac_t""yes" 1>&6
4985   cat >> confdefs.h <<EOF
4986 #define CRAY_STACKSEG_END $ac_func
4987 EOF
4988
4989   break
4990 else
4991   echo "$ac_t""no" 1>&6
4992 fi
4993
4994 done
4995 fi
4996
4997 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4998 echo "configure:4999: checking stack direction for C alloca" >&5
4999 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5000   echo $ac_n "(cached) $ac_c" 1>&6
5001 else
5002   if test "$cross_compiling" = yes; then
5003   ac_cv_c_stack_direction=0
5004 else
5005   cat > conftest.$ac_ext <<EOF
5006 #line 5007 "configure"
5007 #include "confdefs.h"
5008 find_stack_direction ()
5009 {
5010   static char *addr = 0;
5011   auto char dummy;
5012   if (addr == 0)
5013     {
5014       addr = &dummy;
5015       return find_stack_direction ();
5016     }
5017   else
5018     return (&dummy > addr) ? 1 : -1;
5019 }
5020 main ()
5021 {
5022   exit (find_stack_direction() < 0);
5023 }
5024 EOF
5025 if { (eval echo configure:5026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5026 then
5027   ac_cv_c_stack_direction=1
5028 else
5029   echo "configure: failed program was:" >&5
5030   cat conftest.$ac_ext >&5
5031   rm -fr conftest*
5032   ac_cv_c_stack_direction=-1
5033 fi
5034 rm -fr conftest*
5035 fi
5036
5037 fi
5038
5039 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5040 cat >> confdefs.h <<EOF
5041 #define STACK_DIRECTION $ac_cv_c_stack_direction
5042 EOF
5043
5044 fi
5045
5046 for ac_func in \
5047         _lwp_create \
5048         clone \
5049         getnetbyaddr \
5050         getnetbyname \
5051         getpagesize \
5052         getprotobyname \
5053         getprotobynumber \
5054         getservbyport \
5055         getsockopt \
5056         inet_network \
5057         memmove \
5058         rfork \
5059         select \
5060         sendmsg \
5061         settimeofday \
5062         sigaltstack \
5063         statfs \
5064         strcasecmp \
5065         strerror \
5066         strncasecmp \
5067         tcgetattr \
5068         timegm \
5069         usleep \
5070         vfscanf \
5071         wait4 \
5072         waitpid \
5073
5074 do
5075 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5076 echo "configure:5077: checking for $ac_func" >&5
5077 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5078   echo $ac_n "(cached) $ac_c" 1>&6
5079 else
5080   cat > conftest.$ac_ext <<EOF
5081 #line 5082 "configure"
5082 #include "confdefs.h"
5083 /* System header to define __stub macros and hopefully few prototypes,
5084     which can conflict with char $ac_func(); below.  */
5085 #include <assert.h>
5086 /* Override any gcc2 internal prototype to avoid an error.  */
5087 /* We use char because int might match the return type of a gcc2
5088     builtin and then its argument prototype would still apply.  */
5089 char $ac_func();
5090
5091 int main() {
5092
5093 /* The GNU C library defines this for functions which it implements
5094     to always fail with ENOSYS.  Some functions are actually named
5095     something starting with __ and the normal name is an alias.  */
5096 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5097 choke me
5098 #else
5099 $ac_func();
5100 #endif
5101
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5105   rm -rf conftest*
5106   eval "ac_cv_func_$ac_func=yes"
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   eval "ac_cv_func_$ac_func=no"
5112 fi
5113 rm -f conftest*
5114 fi
5115
5116 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5117   echo "$ac_t""yes" 1>&6
5118     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5119   cat >> confdefs.h <<EOF
5120 #define $ac_tr_func 1
5121 EOF
5122  
5123 else
5124   echo "$ac_t""no" 1>&6
5125 fi
5126 done
5127
5128
5129
5130 for ac_hdr in \
5131         a.out.h \
5132         a_out.h \
5133         arpa/inet.h \
5134         arpa/nameser.h \
5135         curses.h \
5136         elf.h \
5137         float.h \
5138         libio.h \
5139         link.h \
5140         linux/cdrom.h \
5141         linux/joystick.h \
5142         linux/ucdrom.h \
5143         ncurses.h \
5144         net/if.h \
5145         netinet/in.h \
5146         netinet/tcp.h \
5147         pty.h \
5148         resolv.h \
5149         sched.h \
5150         socket.h \
5151         strings.h \
5152         sys/cdio.h \
5153         sys/errno.h \
5154         sys/file.h \
5155         sys/filio.h \
5156         sys/ipc.h \
5157         sys/lwp.h \
5158         sys/mman.h \
5159         sys/modem.h \
5160         sys/mount.h \
5161         sys/msg.h \
5162         sys/param.h \
5163         sys/reg.h \
5164         sys/signal.h \
5165         sys/shm.h \
5166         sys/socket.h \
5167         sys/sockio.h \
5168         sys/statfs.h \
5169         sys/strtio.h \
5170         sys/syscall.h \
5171         sys/wait.h \
5172         sys/v86.h \
5173         sys/v86intr.h \
5174         sys/vfs.h \
5175         sys/vm86.h \
5176         syscall.h \
5177         ucontext.h \
5178         wctype.h \
5179
5180 do
5181 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5182 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5183 echo "configure:5184: checking for $ac_hdr" >&5
5184 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5185   echo $ac_n "(cached) $ac_c" 1>&6
5186 else
5187   cat > conftest.$ac_ext <<EOF
5188 #line 5189 "configure"
5189 #include "confdefs.h"
5190 #include <$ac_hdr>
5191 EOF
5192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5193 { (eval echo configure:5194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5195 if test -z "$ac_err"; then
5196   rm -rf conftest*
5197   eval "ac_cv_header_$ac_safe=yes"
5198 else
5199   echo "$ac_err" >&5
5200   echo "configure: failed program was:" >&5
5201   cat conftest.$ac_ext >&5
5202   rm -rf conftest*
5203   eval "ac_cv_header_$ac_safe=no"
5204 fi
5205 rm -f conftest*
5206 fi
5207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5208   echo "$ac_t""yes" 1>&6
5209     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5210   cat >> confdefs.h <<EOF
5211 #define $ac_tr_hdr 1
5212 EOF
5213  
5214 else
5215   echo "$ac_t""no" 1>&6
5216 fi
5217 done
5218
5219 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
5220 echo "configure:5221: checking whether stat file-mode macros are broken" >&5
5221 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
5222   echo $ac_n "(cached) $ac_c" 1>&6
5223 else
5224   cat > conftest.$ac_ext <<EOF
5225 #line 5226 "configure"
5226 #include "confdefs.h"
5227 #include <sys/types.h>
5228 #include <sys/stat.h>
5229
5230 #if defined(S_ISBLK) && defined(S_IFDIR)
5231 # if S_ISBLK (S_IFDIR)
5232 You lose.
5233 # endif
5234 #endif
5235
5236 #if defined(S_ISBLK) && defined(S_IFCHR)
5237 # if S_ISBLK (S_IFCHR)
5238 You lose.
5239 # endif
5240 #endif
5241
5242 #if defined(S_ISLNK) && defined(S_IFREG)
5243 # if S_ISLNK (S_IFREG)
5244 You lose.
5245 # endif
5246 #endif
5247
5248 #if defined(S_ISSOCK) && defined(S_IFREG)
5249 # if S_ISSOCK (S_IFREG)
5250 You lose.
5251 # endif
5252 #endif
5253
5254 EOF
5255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5256   egrep "You lose" >/dev/null 2>&1; then
5257   rm -rf conftest*
5258   ac_cv_header_stat_broken=yes
5259 else
5260   rm -rf conftest*
5261   ac_cv_header_stat_broken=no
5262 fi
5263 rm -f conftest*
5264
5265 fi
5266
5267 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
5268 if test $ac_cv_header_stat_broken = yes; then
5269   cat >> confdefs.h <<\EOF
5270 #define STAT_MACROS_BROKEN 1
5271 EOF
5272
5273 fi
5274
5275
5276
5277 echo $ac_n "checking for working const""... $ac_c" 1>&6
5278 echo "configure:5279: checking for working const" >&5
5279 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5280   echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5282   cat > conftest.$ac_ext <<EOF
5283 #line 5284 "configure"
5284 #include "confdefs.h"
5285
5286 int main() {
5287
5288 /* Ultrix mips cc rejects this.  */
5289 typedef int charset[2]; const charset x = {0,0};
5290 /* SunOS 4.1.1 cc rejects this.  */
5291 char const *const *ccp;
5292 char **p;
5293 /* NEC SVR4.0.2 mips cc rejects this.  */
5294 struct point {int x, y;};
5295 static struct point const zero = {0,0};
5296 /* AIX XL C 1.02.0.0 rejects this.
5297    It does not let you subtract one const X* pointer from another in an arm
5298    of an if-expression whose if-part is not a constant expression */
5299 const char *g = "string";
5300 ccp = &g + (g ? g-g : 0);
5301 /* HPUX 7.0 cc rejects these. */
5302 ++ccp;
5303 p = (char**) ccp;
5304 ccp = (char const *const *) p;
5305 { /* SCO 3.2v4 cc rejects this.  */
5306   char *t;
5307   char const *s = 0 ? (char *) 0 : (char const *) 0;
5308
5309   *t++ = 0;
5310 }
5311 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5312   int x[] = {25, 17};
5313   const int *foo = &x[0];
5314   ++foo;
5315 }
5316 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5317   typedef const int *iptr;
5318   iptr p = 0;
5319   ++p;
5320 }
5321 { /* AIX XL C 1.02.0.0 rejects this saying
5322      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5323   struct s { int j; const int *ap[3]; };
5324   struct s *b; b->j = 5;
5325 }
5326 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5327   const int foo = 10;
5328 }
5329
5330 ; return 0; }
5331 EOF
5332 if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5333   rm -rf conftest*
5334   ac_cv_c_const=yes
5335 else
5336   echo "configure: failed program was:" >&5
5337   cat conftest.$ac_ext >&5
5338   rm -rf conftest*
5339   ac_cv_c_const=no
5340 fi
5341 rm -f conftest*
5342 fi
5343
5344 echo "$ac_t""$ac_cv_c_const" 1>&6
5345 if test $ac_cv_c_const = no; then
5346   cat >> confdefs.h <<\EOF
5347 #define const 
5348 EOF
5349
5350 fi
5351
5352 echo $ac_n "checking for inline""... $ac_c" 1>&6
5353 echo "configure:5354: checking for inline" >&5
5354 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5355   echo $ac_n "(cached) $ac_c" 1>&6
5356 else
5357   ac_cv_c_inline=no
5358 for ac_kw in inline __inline__ __inline; do
5359   cat > conftest.$ac_ext <<EOF
5360 #line 5361 "configure"
5361 #include "confdefs.h"
5362
5363 int main() {
5364 } int $ac_kw foo() {
5365 ; return 0; }
5366 EOF
5367 if { (eval echo configure:5368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5368   rm -rf conftest*
5369   ac_cv_c_inline=$ac_kw; break
5370 else
5371   echo "configure: failed program was:" >&5
5372   cat conftest.$ac_ext >&5
5373 fi
5374 rm -f conftest*
5375 done
5376
5377 fi
5378
5379 echo "$ac_t""$ac_cv_c_inline" 1>&6
5380 case "$ac_cv_c_inline" in
5381   inline | yes) ;;
5382   no) cat >> confdefs.h <<\EOF
5383 #define inline 
5384 EOF
5385  ;;
5386   *)  cat >> confdefs.h <<EOF
5387 #define inline $ac_cv_c_inline
5388 EOF
5389  ;;
5390 esac
5391
5392 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5393 echo "configure:5394: checking for ANSI C header files" >&5
5394 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5395   echo $ac_n "(cached) $ac_c" 1>&6
5396 else
5397   cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5400 #include <stdlib.h>
5401 #include <stdarg.h>
5402 #include <string.h>
5403 #include <float.h>
5404 EOF
5405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5406 { (eval echo configure:5407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5408 if test -z "$ac_err"; then
5409   rm -rf conftest*
5410   ac_cv_header_stdc=yes
5411 else
5412   echo "$ac_err" >&5
5413   echo "configure: failed program was:" >&5
5414   cat conftest.$ac_ext >&5
5415   rm -rf conftest*
5416   ac_cv_header_stdc=no
5417 fi
5418 rm -f conftest*
5419
5420 if test $ac_cv_header_stdc = yes; then
5421   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5422 cat > conftest.$ac_ext <<EOF
5423 #line 5424 "configure"
5424 #include "confdefs.h"
5425 #include <string.h>
5426 EOF
5427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5428   egrep "memchr" >/dev/null 2>&1; then
5429   :
5430 else
5431   rm -rf conftest*
5432   ac_cv_header_stdc=no
5433 fi
5434 rm -f conftest*
5435
5436 fi
5437
5438 if test $ac_cv_header_stdc = yes; then
5439   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5440 cat > conftest.$ac_ext <<EOF
5441 #line 5442 "configure"
5442 #include "confdefs.h"
5443 #include <stdlib.h>
5444 EOF
5445 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5446   egrep "free" >/dev/null 2>&1; then
5447   :
5448 else
5449   rm -rf conftest*
5450   ac_cv_header_stdc=no
5451 fi
5452 rm -f conftest*
5453
5454 fi
5455
5456 if test $ac_cv_header_stdc = yes; then
5457   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5458 if test "$cross_compiling" = yes; then
5459   :
5460 else
5461   cat > conftest.$ac_ext <<EOF
5462 #line 5463 "configure"
5463 #include "confdefs.h"
5464 #include <ctype.h>
5465 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5466 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5467 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5468 int main () { int i; for (i = 0; i < 256; i++)
5469 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5470 exit (0); }
5471
5472 EOF
5473 if { (eval echo configure:5474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5474 then
5475   :
5476 else
5477   echo "configure: failed program was:" >&5
5478   cat conftest.$ac_ext >&5
5479   rm -fr conftest*
5480   ac_cv_header_stdc=no
5481 fi
5482 rm -fr conftest*
5483 fi
5484
5485 fi
5486 fi
5487
5488 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5489 if test $ac_cv_header_stdc = yes; then
5490   cat >> confdefs.h <<\EOF
5491 #define STDC_HEADERS 1
5492 EOF
5493
5494 fi
5495
5496 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5497 echo "configure:5498: checking for size_t" >&5
5498 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5499   echo $ac_n "(cached) $ac_c" 1>&6
5500 else
5501   cat > conftest.$ac_ext <<EOF
5502 #line 5503 "configure"
5503 #include "confdefs.h"
5504 #include <sys/types.h>
5505 #if STDC_HEADERS
5506 #include <stdlib.h>
5507 #include <stddef.h>
5508 #endif
5509 EOF
5510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5511   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5512   rm -rf conftest*
5513   ac_cv_type_size_t=yes
5514 else
5515   rm -rf conftest*
5516   ac_cv_type_size_t=no
5517 fi
5518 rm -f conftest*
5519
5520 fi
5521 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5522 if test $ac_cv_type_size_t = no; then
5523   cat >> confdefs.h <<\EOF
5524 #define size_t unsigned
5525 EOF
5526
5527 fi
5528
5529 echo $ac_n "checking size of long long""... $ac_c" 1>&6
5530 echo "configure:5531: checking size of long long" >&5
5531 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
5532   echo $ac_n "(cached) $ac_c" 1>&6
5533 else
5534   if test "$cross_compiling" = yes; then
5535   ac_cv_sizeof_long_long=0
5536 else
5537   cat > conftest.$ac_ext <<EOF
5538 #line 5539 "configure"
5539 #include "confdefs.h"
5540 #include <stdio.h>
5541 main()
5542 {
5543   FILE *f=fopen("conftestval", "w");
5544   if (!f) exit(1);
5545   fprintf(f, "%d\n", sizeof(long long));
5546   exit(0);
5547 }
5548 EOF
5549 if { (eval echo configure:5550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5550 then
5551   ac_cv_sizeof_long_long=`cat conftestval`
5552 else
5553   echo "configure: failed program was:" >&5
5554   cat conftest.$ac_ext >&5
5555   rm -fr conftest*
5556   ac_cv_sizeof_long_long=0
5557 fi
5558 rm -fr conftest*
5559 fi
5560
5561 fi
5562 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
5563 cat >> confdefs.h <<EOF
5564 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5565 EOF
5566
5567
5568
5569 if test "$ac_cv_header_linux_joystick_h" = "yes"
5570 then
5571    echo $ac_n "checking "whether linux/joystick.h uses the Linux 2.2+ API"""... $ac_c" 1>&6
5572 echo "configure:5573: checking "whether linux/joystick.h uses the Linux 2.2+ API"" >&5
5573 if eval "test \"`echo '$''{'wine_cv_linux_joystick_22_api'+set}'`\" = set"; then
5574   echo $ac_n "(cached) $ac_c" 1>&6
5575 else
5576   cat > conftest.$ac_ext <<EOF
5577 #line 5578 "configure"
5578 #include "confdefs.h"
5579
5580         #include <sys/ioctl.h>
5581         #include <linux/joystick.h>
5582
5583         struct js_event blub;
5584         #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
5585         #error "no 2.2 header"
5586         #endif
5587         
5588 int main() {
5589 /*empty*/
5590 ; return 0; }
5591 EOF
5592 if { (eval echo configure:5593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5593   rm -rf conftest*
5594   wine_cv_linux_joystick_22_api=yes
5595 else
5596   echo "configure: failed program was:" >&5
5597   cat conftest.$ac_ext >&5
5598   rm -rf conftest*
5599   wine_cv_linux_joystick_22_api=no
5600 fi
5601 rm -f conftest*
5602    
5603 fi
5604
5605 echo "$ac_t""$wine_cv_linux_joystick_22_api" 1>&6
5606    if test "$wine_cv_linux_joystick_22_api"
5607    then
5608       cat >> confdefs.h <<\EOF
5609 #define HAVE_LINUX_22_JOYSTICK_API 1
5610 EOF
5611
5612    fi
5613 fi
5614
5615
5616 if test "$ac_cv_header_sys_vfs_h" = "yes"
5617 then
5618     echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6
5619 echo "configure:5620: checking "whether sys/vfs.h defines statfs"" >&5
5620 if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then
5621   echo $ac_n "(cached) $ac_c" 1>&6
5622 else
5623   cat > conftest.$ac_ext <<EOF
5624 #line 5625 "configure"
5625 #include "confdefs.h"
5626
5627         #include <sys/types.h>
5628         #ifdef HAVE_SYS_PARAM_H
5629         # include <sys/param.h>
5630         #endif
5631         #include <sys/vfs.h>
5632         
5633 int main() {
5634
5635                 struct statfs stfs;
5636
5637                 memset(&stfs,0,sizeof(stfs));
5638         
5639 ; return 0; }
5640 EOF
5641 if { (eval echo configure:5642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5642   rm -rf conftest*
5643   wine_cv_sys_vfs_has_statfs=yes
5644 else
5645   echo "configure: failed program was:" >&5
5646   cat conftest.$ac_ext >&5
5647   rm -rf conftest*
5648   wine_cv_sys_vfs_has_statfs=no
5649         
5650 fi
5651 rm -f conftest*
5652     
5653 fi
5654
5655 echo "$ac_t""$wine_cv_sys_vfs_has_statfs" 1>&6
5656     if test "$wine_cv_sys_vfs_has_statfs" = "yes"
5657     then
5658       cat >> confdefs.h <<\EOF
5659 #define STATFS_DEFINED_BY_SYS_VFS 1
5660 EOF
5661
5662     fi
5663 fi
5664
5665 if test "$ac_cv_header_sys_statfs_h" = "yes"
5666 then
5667     echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6
5668 echo "configure:5669: checking "whether sys/statfs.h defines statfs"" >&5
5669 if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then
5670   echo $ac_n "(cached) $ac_c" 1>&6
5671 else
5672   cat > conftest.$ac_ext <<EOF
5673 #line 5674 "configure"
5674 #include "confdefs.h"
5675
5676         #include <sys/types.h>
5677         #ifdef HAVE_SYS_PARAM_H
5678         # include <sys/param.h>
5679         #endif
5680         #include <sys/statfs.h>
5681         
5682 int main() {
5683
5684                 struct statfs stfs;
5685         
5686 ; return 0; }
5687 EOF
5688 if { (eval echo configure:5689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5689   rm -rf conftest*
5690   wine_cv_sys_statfs_has_statfs=yes
5691 else
5692   echo "configure: failed program was:" >&5
5693   cat conftest.$ac_ext >&5
5694   rm -rf conftest*
5695   wine_cv_sys_statfs_has_statfs=no
5696         
5697 fi
5698 rm -f conftest*
5699     
5700 fi
5701
5702 echo "$ac_t""$wine_cv_sys_statfs_has_statfs" 1>&6
5703     if test "$wine_cv_sys_statfs_has_statfs" = "yes"
5704     then
5705       cat >> confdefs.h <<\EOF
5706 #define STATFS_DEFINED_BY_SYS_STATFS 1
5707 EOF
5708
5709     fi
5710 fi
5711
5712 if test "$ac_cv_header_sys_mount_h" = "yes"
5713 then
5714     echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6
5715 echo "configure:5716: checking "whether sys/mount.h defines statfs"" >&5
5716 if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then
5717   echo $ac_n "(cached) $ac_c" 1>&6
5718 else
5719   cat > conftest.$ac_ext <<EOF
5720 #line 5721 "configure"
5721 #include "confdefs.h"
5722
5723         #include <sys/types.h>
5724         #ifdef HAVE_SYS_PARAM_H
5725         # include <sys/param.h>
5726         #endif
5727         #include <sys/mount.h>
5728         
5729 int main() {
5730
5731                 struct statfs stfs;
5732         
5733 ; return 0; }
5734 EOF
5735 if { (eval echo configure:5736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5736   rm -rf conftest*
5737   wine_cv_sys_mount_has_statfs=yes
5738 else
5739   echo "configure: failed program was:" >&5
5740   cat conftest.$ac_ext >&5
5741   rm -rf conftest*
5742   wine_cv_sys_mount_has_statfs=no
5743         
5744 fi
5745 rm -f conftest*
5746     
5747 fi
5748
5749 echo "$ac_t""$wine_cv_sys_mount_has_statfs" 1>&6
5750     if test "$wine_cv_sys_mount_has_statfs" = "yes"
5751     then
5752       cat >> confdefs.h <<\EOF
5753 #define STATFS_DEFINED_BY_SYS_MOUNT 1
5754 EOF
5755
5756     fi
5757 fi
5758
5759
5760 echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6
5761 echo "configure:5762: checking "for statfs.f_bfree"" >&5
5762 if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then
5763   echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765    if test "x$statfs_bfree" = "xno"
5766     then
5767         wine_cv_statfs_bfree=no
5768     else
5769         cat > conftest.$ac_ext <<EOF
5770 #line 5771 "configure"
5771 #include "confdefs.h"
5772
5773         #include <sys/types.h>
5774         #ifdef HAVE_SYS_PARAM_H
5775         # include <sys/param.h>
5776         #endif
5777         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
5778         # include <sys/mount.h>
5779         #else
5780         # ifdef STATFS_DEFINED_BY_SYS_VFS
5781         #  include <sys/vfs.h>
5782         # else
5783         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
5784         #   include <sys/statfs.h>
5785         #  endif
5786         # endif
5787         #endif
5788         
5789 int main() {
5790
5791                 struct statfs stfs;
5792
5793                 stfs.f_bfree++;
5794         
5795 ; return 0; }
5796 EOF
5797 if { (eval echo configure:5798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5798   rm -rf conftest*
5799   wine_cv_statfs_bfree=yes
5800 else
5801   echo "configure: failed program was:" >&5
5802   cat conftest.$ac_ext >&5
5803   rm -rf conftest*
5804   wine_cv_statfs_bfree=no
5805         
5806 fi
5807 rm -f conftest*
5808     fi  
5809 fi
5810
5811 echo "$ac_t""$wine_cv_statfs_bfree" 1>&6
5812 if test "$wine_cv_statfs_bfree" = "yes"
5813 then
5814   cat >> confdefs.h <<\EOF
5815 #define STATFS_HAS_BFREE 1
5816 EOF
5817
5818 fi
5819
5820 echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6
5821 echo "configure:5822: checking "for statfs.f_bavail"" >&5
5822 if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then
5823   echo $ac_n "(cached) $ac_c" 1>&6
5824 else
5825    if test "x$statfs_bavail" = "xno"
5826     then
5827         wine_cv_statfs_bavail=no
5828     else
5829         cat > conftest.$ac_ext <<EOF
5830 #line 5831 "configure"
5831 #include "confdefs.h"
5832
5833         #include <sys/types.h>
5834         #ifdef HAVE_SYS_PARAM_H
5835         # include <sys/param.h>
5836         #endif
5837         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
5838         # include <sys/mount.h>
5839         #else
5840         # ifdef STATFS_DEFINED_BY_SYS_VFS
5841         #  include <sys/vfs.h>
5842         # else
5843         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
5844         #   include <sys/statfs.h>
5845         #  endif
5846         # endif
5847         #endif
5848         
5849 int main() {
5850
5851                 struct statfs stfs;
5852
5853                 stfs.f_bavail++;
5854         
5855 ; return 0; }
5856 EOF
5857 if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5858   rm -rf conftest*
5859   wine_cv_statfs_bavail=yes
5860 else
5861   echo "configure: failed program was:" >&5
5862   cat conftest.$ac_ext >&5
5863   rm -rf conftest*
5864   wine_cv_statfs_bavail=no
5865         
5866 fi
5867 rm -f conftest*
5868     fi  
5869 fi
5870
5871 echo "$ac_t""$wine_cv_statfs_bavail" 1>&6
5872 if test "$wine_cv_statfs_bavail" = "yes"
5873 then
5874   cat >> confdefs.h <<\EOF
5875 #define STATFS_HAS_BAVAIL 1
5876 EOF
5877
5878 fi
5879
5880
5881 echo $ac_n "checking "for working sigaltstack"""... $ac_c" 1>&6
5882 echo "configure:5883: checking "for working sigaltstack"" >&5
5883 if eval "test \"`echo '$''{'ac_cv_c_working_sigaltstack'+set}'`\" = set"; then
5884   echo $ac_n "(cached) $ac_c" 1>&6
5885 else
5886   if test "$cross_compiling" = yes; then
5887   ac_cv_c_working_sigaltstack="no"
5888
5889 else
5890   cat > conftest.$ac_ext <<EOF
5891 #line 5892 "configure"
5892 #include "confdefs.h"
5893
5894         #include <stdio.h>
5895         #include <time.h> /* <sys/time.h> ? bad magic without end */
5896         #include <sys/types.h>
5897         #include <sys/signal.h>
5898         #ifdef HAVE_SYS_PARAM_H
5899         # include <sys/param.h>
5900         #endif
5901         #ifdef HAVE_SYSCALL_H
5902         # include <syscall.h>
5903         #else
5904         # ifdef HAVE_SYS_SYSCALL_H
5905         #  include <sys/syscall.h>
5906         # endif
5907         #endif
5908         
5909         unsigned char *xaltstack;
5910
5911         int
5912         main(int argc,char **argv) {
5913             struct sigaltstack  ss;
5914
5915             xaltstack = malloc(16384);
5916             ss.ss_sp    = xaltstack;
5917             ss.ss_size  = 16384;
5918             ss.ss_flags = 0;
5919             if (sigaltstack(&ss, NULL) < 0) {
5920                 /* this catches the glibc case */
5921                 perror("sigaltstack");
5922                 return (1); /* aka exit(1) aka fail */
5923             }
5924             /* assume it works. */
5925             return 0; /* OK */
5926         }
5927         
5928 EOF
5929 if { (eval echo configure:5930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5930 then
5931   ac_cv_c_working_sigaltstack="yes"
5932 else
5933   echo "configure: failed program was:" >&5
5934   cat conftest.$ac_ext >&5
5935   rm -fr conftest*
5936   ac_cv_c_working_sigaltstack="no"
5937 fi
5938 rm -fr conftest*
5939 fi
5940
5941 fi
5942
5943 echo "$ac_t""$ac_cv_c_working_sigaltstack" 1>&6
5944
5945 if test "$ac_cv_c_working_sigaltstack" = "yes"
5946 then
5947     cat >> confdefs.h <<\EOF
5948 #define HAVE_WORKING_SIGALTSTACK 1
5949 EOF
5950
5951 fi
5952
5953
5954
5955 echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6
5956 echo "configure:5957: checking "for msg_accrights in struct msghdr"" >&5
5957 if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then
5958   echo $ac_n "(cached) $ac_c" 1>&6
5959 else
5960   cat > conftest.$ac_ext <<EOF
5961 #line 5962 "configure"
5962 #include "confdefs.h"
5963 #include <sys/types.h>
5964 #include <sys/socket.h>
5965 int main() {
5966 struct msghdr hdr; hdr.msg_accrights=0
5967 ; return 0; }
5968 EOF
5969 if { (eval echo configure:5970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5970   rm -rf conftest*
5971   ac_cv_c_msg_accrights="yes"
5972 else
5973   echo "configure: failed program was:" >&5
5974   cat conftest.$ac_ext >&5
5975   rm -rf conftest*
5976   ac_cv_c_msg_accrights="no"
5977 fi
5978 rm -f conftest*
5979 fi
5980
5981 echo "$ac_t""$ac_cv_c_msg_accrights" 1>&6
5982 if test "$ac_cv_c_msg_accrights" = "yes"
5983 then
5984     cat >> confdefs.h <<\EOF
5985 #define HAVE_MSGHDR_ACCRIGHTS 1
5986 EOF
5987
5988 fi
5989
5990
5991 echo $ac_n "checking "for sun_len in struct sockaddr_un"""... $ac_c" 1>&6
5992 echo "configure:5993: checking "for sun_len in struct sockaddr_un"" >&5
5993 if eval "test \"`echo '$''{'ac_cv_c_sun_len'+set}'`\" = set"; then
5994   echo $ac_n "(cached) $ac_c" 1>&6
5995 else
5996   cat > conftest.$ac_ext <<EOF
5997 #line 5998 "configure"
5998 #include "confdefs.h"
5999 #include <sys/types.h>
6000 #include <sys/socket.h>
6001 #include <sys/un.h>
6002 int main() {
6003 static struct sockaddr_un addr; addr.sun_len = 1
6004 ; return 0; }
6005 EOF
6006 if { (eval echo configure:6007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6007   rm -rf conftest*
6008   ac_cv_c_sun_len="yes"
6009 else
6010   echo "configure: failed program was:" >&5
6011   cat conftest.$ac_ext >&5
6012   rm -rf conftest*
6013   ac_cv_c_sun_len="no"
6014 fi
6015 rm -f conftest*
6016 fi
6017
6018 echo "$ac_t""$ac_cv_c_sun_len" 1>&6
6019 if test "$ac_cv_c_sun_len" = "yes"
6020 then
6021     cat >> confdefs.h <<\EOF
6022 #define HAVE_SOCKADDR_SUN_LEN 1
6023 EOF
6024
6025 fi
6026
6027
6028 echo $ac_n "checking "whether we need to define __i386__"""... $ac_c" 1>&6
6029 echo "configure:6030: checking "whether we need to define __i386__"" >&5
6030 if eval "test \"`echo '$''{'ac_cv_cpp_def_i386'+set}'`\" = set"; then
6031   echo $ac_n "(cached) $ac_c" 1>&6
6032 else
6033   cat > conftest.$ac_ext <<EOF
6034 #line 6035 "configure"
6035 #include "confdefs.h"
6036 #if (defined(i386) || defined(__i386)) && !defined(__i386__)
6037 yes
6038 #endif
6039 EOF
6040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6041   egrep "yes" >/dev/null 2>&1; then
6042   rm -rf conftest*
6043   ac_cv_cpp_def_i386="yes"
6044 else
6045   rm -rf conftest*
6046   ac_cv_cpp_def_i386="no"
6047 fi
6048 rm -f conftest*
6049
6050 fi
6051
6052 echo "$ac_t""$ac_cv_cpp_def_i386" 1>&6
6053 if test "$ac_cv_cpp_def_i386" = "yes"
6054 then
6055     CFLAGS="$CFLAGS -D__i386__"
6056     LINTFLAGS="$LINTFLAGS -D__i386__"
6057 fi
6058
6059 GCC_NO_BUILTIN=""
6060 if test "$GCC" = "yes"
6061 then
6062     GCC_NO_BUILTIN="-fno-builtin"
6063 fi
6064
6065
6066
6067 MAKE_RULES=Make.rules
6068
6069
6070 MAKE_DLL_RULES=dlls/Makedll.rules
6071
6072
6073 trap '' 1 2 15
6074 cat > confcache <<\EOF
6075 # This file is a shell script that caches the results of configure
6076 # tests run on this system so they can be shared between configure
6077 # scripts and configure runs.  It is not useful on other systems.
6078 # If it contains results you don't want to keep, you may remove or edit it.
6079 #
6080 # By default, configure uses ./config.cache as the cache file,
6081 # creating it if it does not exist already.  You can give configure
6082 # the --cache-file=FILE option to use a different cache file; that is
6083 # what configure does when it calls configure scripts in
6084 # subdirectories, so they share the cache.
6085 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6086 # config.status only pays attention to the cache file if you give it the
6087 # --recheck option to rerun configure.
6088 #
6089 EOF
6090 # The following way of writing the cache mishandles newlines in values,
6091 # but we know of no workaround that is simple, portable, and efficient.
6092 # So, don't put newlines in cache variables' values.
6093 # Ultrix sh set writes to stderr and can't be redirected directly,
6094 # and sets the high bit in the cache file unless we assign to the vars.
6095 (set) 2>&1 |
6096   case `(ac_space=' '; set | grep ac_space) 2>&1` in
6097   *ac_space=\ *)
6098     # `set' does not quote correctly, so add quotes (double-quote substitution
6099     # turns \\\\ into \\, and sed turns \\ into \).
6100     sed -n \
6101       -e "s/'/'\\\\''/g" \
6102       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6103     ;;
6104   *)
6105     # `set' quotes correctly as required by POSIX, so do not add quotes.
6106     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6107     ;;
6108   esac >> confcache
6109 if cmp -s $cache_file confcache; then
6110   :
6111 else
6112   if test -w $cache_file; then
6113     echo "updating cache $cache_file"
6114     cat confcache > $cache_file
6115   else
6116     echo "not updating unwritable cache $cache_file"
6117   fi
6118 fi
6119 rm -f confcache
6120
6121 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6122
6123 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6124 # Let make expand exec_prefix.
6125 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6126
6127 # Any assignment to VPATH causes Sun make to only execute
6128 # the first set of double-colon rules, so remove it if not needed.
6129 # If there is a colon in the path, we need to keep it.
6130 if test "x$srcdir" = x.; then
6131   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6132 fi
6133
6134 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6135
6136 DEFS=-DHAVE_CONFIG_H
6137
6138 # Without the "./", some shells look in PATH for config.status.
6139 : ${CONFIG_STATUS=./config.status}
6140
6141 echo creating $CONFIG_STATUS
6142 rm -f $CONFIG_STATUS
6143 cat > $CONFIG_STATUS <<EOF
6144 #! /bin/sh
6145 # Generated automatically by configure.
6146 # Run this file to recreate the current configuration.
6147 # This directory was configured as follows,
6148 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6149 #
6150 # $0 $ac_configure_args
6151 #
6152 # Compiler output produced by configure, useful for debugging
6153 # configure, is in ./config.log if it exists.
6154
6155 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6156 for ac_option
6157 do
6158   case "\$ac_option" in
6159   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6160     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6161     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6162   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6163     echo "$CONFIG_STATUS generated by autoconf version 2.13"
6164     exit 0 ;;
6165   -help | --help | --hel | --he | --h)
6166     echo "\$ac_cs_usage"; exit 0 ;;
6167   *) echo "\$ac_cs_usage"; exit 1 ;;
6168   esac
6169 done
6170
6171 ac_given_srcdir=$srcdir
6172 ac_given_INSTALL="$INSTALL"
6173
6174 trap 'rm -fr `echo "
6175 Make.rules
6176 Makefile
6177 console/Makefile
6178 controls/Makefile
6179 debugger/Makefile
6180 dlls/Makedll.rules
6181 dlls/Makefile
6182 dlls/advapi32/Makefile
6183 dlls/avifil32/Makefile
6184 dlls/comctl32/Makefile
6185 dlls/commdlg/Makefile
6186 dlls/crtdll/Makefile
6187 dlls/dciman32/Makefile
6188 dlls/display/Makefile
6189 dlls/dplayx/Makefile
6190 dlls/dsound/Makefile
6191 dlls/icmp/Makefile
6192 dlls/imagehlp/Makefile
6193 dlls/imm32/Makefile
6194 dlls/lzexpand/Makefile
6195 dlls/mouse/Makefile
6196 dlls/mpr/Makefile
6197 dlls/msacm/Makefile
6198 dlls/msacm32/Makefile
6199 dlls/msnet32/Makefile
6200 dlls/msvideo/Makefile
6201 dlls/ntdll/Makefile
6202 dlls/odbc32/Makefile
6203 dlls/ole32/Makefile
6204 dlls/oleaut32/Makefile
6205 dlls/olecli/Makefile
6206 dlls/oledlg/Makefile
6207 dlls/olepro32/Makefile
6208 dlls/olesvr/Makefile
6209 dlls/psapi/Makefile
6210 dlls/rasapi32/Makefile
6211 dlls/setupx/Makefile
6212 dlls/shell32/Makefile
6213 dlls/sound/Makefile
6214 dlls/stress/Makefile
6215 dlls/tapi32/Makefile
6216 dlls/version/Makefile
6217 dlls/win32s/Makefile
6218 dlls/win87em/Makefile
6219 dlls/winaspi/Makefile
6220 dlls/windebug/Makefile
6221 dlls/wing/Makefile
6222 dlls/winmm/Makefile
6223 dlls/winmm/joystick/Makefile
6224 dlls/winmm/mcianim/Makefile
6225 dlls/winmm/mciavi/Makefile
6226 dlls/winmm/mcicda/Makefile
6227 dlls/winmm/mciseq/Makefile
6228 dlls/winmm/mciwave/Makefile
6229 dlls/winmm/midimap/Makefile
6230 dlls/winmm/wavemap/Makefile
6231 dlls/winmm/wineoss/Makefile
6232 dlls/winsock/Makefile
6233 dlls/winspool/Makefile
6234 dlls/wnaspi32/Makefile
6235 documentation/Makefile
6236 documentation/wine.conf.man
6237 documentation/wine.man
6238 files/Makefile
6239 graphics/Makefile
6240 graphics/enhmetafiledrv/Makefile
6241 graphics/metafiledrv/Makefile
6242 graphics/psdrv/Makefile
6243 graphics/ttydrv/Makefile
6244 graphics/win16drv/Makefile
6245 graphics/x11drv/Makefile
6246 if1632/Makefile
6247 include/Makefile
6248 library/Makefile
6249 libtest/Makefile
6250 loader/Makefile
6251 loader/ne/Makefile
6252 loader/dos/Makefile
6253 memory/Makefile
6254 misc/Makefile
6255 miscemu/Makefile
6256 msdos/Makefile
6257 objects/Makefile
6258 ole/Makefile
6259 programs/Makefile
6260 programs/clock/Makefile
6261 programs/cmdlgtst/Makefile
6262 programs/control/Makefile
6263 programs/avitools/Makefile
6264 programs/osversioncheck/Makefile
6265 programs/notepad/Makefile
6266 programs/progman/Makefile
6267 programs/regtest/Makefile
6268 programs/regapi/Makefile
6269 programs/view/Makefile
6270 programs/wcmd/Makefile
6271 programs/winhelp/Makefile
6272 programs/winver/Makefile
6273 rc/Makefile
6274 relay32/Makefile
6275 resources/Makefile
6276 scheduler/Makefile
6277 server/Makefile
6278 tools/Makefile
6279 tools/wrc/Makefile
6280 tsx11/Makefile
6281 win32/Makefile
6282 windows/Makefile
6283 windows/ttydrv/Makefile
6284 windows/x11drv/Makefile  include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6285 EOF
6286 cat >> $CONFIG_STATUS <<EOF
6287
6288 # Protect against being on the right side of a sed subst in config.status.
6289 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6290  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6291 $ac_vpsub
6292 $extrasub
6293 s%@SHELL@%$SHELL%g
6294 s%@CFLAGS@%$CFLAGS%g
6295 s%@CPPFLAGS@%$CPPFLAGS%g
6296 s%@CXXFLAGS@%$CXXFLAGS%g
6297 s%@FFLAGS@%$FFLAGS%g
6298 s%@DEFS@%$DEFS%g
6299 s%@LDFLAGS@%$LDFLAGS%g
6300 s%@LIBS@%$LIBS%g
6301 s%@exec_prefix@%$exec_prefix%g
6302 s%@prefix@%$prefix%g
6303 s%@program_transform_name@%$program_transform_name%g
6304 s%@bindir@%$bindir%g
6305 s%@sbindir@%$sbindir%g
6306 s%@libexecdir@%$libexecdir%g
6307 s%@datadir@%$datadir%g
6308 s%@sysconfdir@%$sysconfdir%g
6309 s%@sharedstatedir@%$sharedstatedir%g
6310 s%@localstatedir@%$localstatedir%g
6311 s%@libdir@%$libdir%g
6312 s%@includedir@%$includedir%g
6313 s%@oldincludedir@%$oldincludedir%g
6314 s%@infodir@%$infodir%g
6315 s%@mandir@%$mandir%g
6316 s%@PROGEXT@%$PROGEXT%g
6317 s%@EMU_TARGET@%$EMU_TARGET%g
6318 s%@OPTIONS@%$OPTIONS%g
6319 s%@SET_MAKE@%$SET_MAKE%g
6320 s%@CC@%$CC%g
6321 s%@CPP@%$CPP%g
6322 s%@X_CFLAGS@%$X_CFLAGS%g
6323 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
6324 s%@X_LIBS@%$X_LIBS%g
6325 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
6326 s%@YACC@%$YACC%g
6327 s%@LEX@%$LEX%g
6328 s%@LEXLIB@%$LEXLIB%g
6329 s%@RANLIB@%$RANLIB%g
6330 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6331 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6332 s%@INSTALL_DATA@%$INSTALL_DATA%g
6333 s%@LN_S@%$LN_S%g
6334 s%@C2MAN@%$C2MAN%g
6335 s%@LDCONFIG@%$LDCONFIG%g
6336 s%@LINT@%$LINT%g
6337 s%@LINTFLAGS@%$LINTFLAGS%g
6338 s%@XLIB@%$XLIB%g
6339 s%@DLL_LINK@%$DLL_LINK%g
6340 s%@BUILDFLAGS@%$BUILDFLAGS%g
6341 s%@DLLFLAGS@%$DLLFLAGS%g
6342 s%@LDSHARED@%$LDSHARED%g
6343 s%@LIBEXT@%$LIBEXT%g
6344 s%@ALLOCA@%$ALLOCA%g
6345 s%@GCC_NO_BUILTIN@%$GCC_NO_BUILTIN%g
6346 /@MAKE_RULES@/r $MAKE_RULES
6347 s%@MAKE_RULES@%%g
6348 /@MAKE_DLL_RULES@/r $MAKE_DLL_RULES
6349 s%@MAKE_DLL_RULES@%%g
6350
6351 CEOF
6352 EOF
6353
6354 cat >> $CONFIG_STATUS <<\EOF
6355
6356 # Split the substitutions into bite-sized pieces for seds with
6357 # small command number limits, like on Digital OSF/1 and HP-UX.
6358 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6359 ac_file=1 # Number of current file.
6360 ac_beg=1 # First line for current file.
6361 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6362 ac_more_lines=:
6363 ac_sed_cmds=""
6364 while $ac_more_lines; do
6365   if test $ac_beg -gt 1; then
6366     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6367   else
6368     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6369   fi
6370   if test ! -s conftest.s$ac_file; then
6371     ac_more_lines=false
6372     rm -f conftest.s$ac_file
6373   else
6374     if test -z "$ac_sed_cmds"; then
6375       ac_sed_cmds="sed -f conftest.s$ac_file"
6376     else
6377       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6378     fi
6379     ac_file=`expr $ac_file + 1`
6380     ac_beg=$ac_end
6381     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6382   fi
6383 done
6384 if test -z "$ac_sed_cmds"; then
6385   ac_sed_cmds=cat
6386 fi
6387 EOF
6388
6389 cat >> $CONFIG_STATUS <<EOF
6390
6391 CONFIG_FILES=\${CONFIG_FILES-"Make.rules
6392 Makefile
6393 console/Makefile
6394 controls/Makefile
6395 debugger/Makefile
6396 dlls/Makedll.rules
6397 dlls/Makefile
6398 dlls/advapi32/Makefile
6399 dlls/avifil32/Makefile
6400 dlls/comctl32/Makefile
6401 dlls/commdlg/Makefile
6402 dlls/crtdll/Makefile
6403 dlls/dciman32/Makefile
6404 dlls/display/Makefile
6405 dlls/dplayx/Makefile
6406 dlls/dsound/Makefile
6407 dlls/icmp/Makefile
6408 dlls/imagehlp/Makefile
6409 dlls/imm32/Makefile
6410 dlls/lzexpand/Makefile
6411 dlls/mouse/Makefile
6412 dlls/mpr/Makefile
6413 dlls/msacm/Makefile
6414 dlls/msacm32/Makefile
6415 dlls/msnet32/Makefile
6416 dlls/msvideo/Makefile
6417 dlls/ntdll/Makefile
6418 dlls/odbc32/Makefile
6419 dlls/ole32/Makefile
6420 dlls/oleaut32/Makefile
6421 dlls/olecli/Makefile
6422 dlls/oledlg/Makefile
6423 dlls/olepro32/Makefile
6424 dlls/olesvr/Makefile
6425 dlls/psapi/Makefile
6426 dlls/rasapi32/Makefile
6427 dlls/setupx/Makefile
6428 dlls/shell32/Makefile
6429 dlls/sound/Makefile
6430 dlls/stress/Makefile
6431 dlls/tapi32/Makefile
6432 dlls/version/Makefile
6433 dlls/win32s/Makefile
6434 dlls/win87em/Makefile
6435 dlls/winaspi/Makefile
6436 dlls/windebug/Makefile
6437 dlls/wing/Makefile
6438 dlls/winmm/Makefile
6439 dlls/winmm/joystick/Makefile
6440 dlls/winmm/mcianim/Makefile
6441 dlls/winmm/mciavi/Makefile
6442 dlls/winmm/mcicda/Makefile
6443 dlls/winmm/mciseq/Makefile
6444 dlls/winmm/mciwave/Makefile
6445 dlls/winmm/midimap/Makefile
6446 dlls/winmm/wavemap/Makefile
6447 dlls/winmm/wineoss/Makefile
6448 dlls/winsock/Makefile
6449 dlls/winspool/Makefile
6450 dlls/wnaspi32/Makefile
6451 documentation/Makefile
6452 documentation/wine.conf.man
6453 documentation/wine.man
6454 files/Makefile
6455 graphics/Makefile
6456 graphics/enhmetafiledrv/Makefile
6457 graphics/metafiledrv/Makefile
6458 graphics/psdrv/Makefile
6459 graphics/ttydrv/Makefile
6460 graphics/win16drv/Makefile
6461 graphics/x11drv/Makefile
6462 if1632/Makefile
6463 include/Makefile
6464 library/Makefile
6465 libtest/Makefile
6466 loader/Makefile
6467 loader/ne/Makefile
6468 loader/dos/Makefile
6469 memory/Makefile
6470 misc/Makefile
6471 miscemu/Makefile
6472 msdos/Makefile
6473 objects/Makefile
6474 ole/Makefile
6475 programs/Makefile
6476 programs/clock/Makefile
6477 programs/cmdlgtst/Makefile
6478 programs/control/Makefile
6479 programs/avitools/Makefile
6480 programs/osversioncheck/Makefile
6481 programs/notepad/Makefile
6482 programs/progman/Makefile
6483 programs/regtest/Makefile
6484 programs/regapi/Makefile
6485 programs/view/Makefile
6486 programs/wcmd/Makefile
6487 programs/winhelp/Makefile
6488 programs/winver/Makefile
6489 rc/Makefile
6490 relay32/Makefile
6491 resources/Makefile
6492 scheduler/Makefile
6493 server/Makefile
6494 tools/Makefile
6495 tools/wrc/Makefile
6496 tsx11/Makefile
6497 win32/Makefile
6498 windows/Makefile
6499 windows/ttydrv/Makefile
6500 windows/x11drv/Makefile "}
6501 EOF
6502 cat >> $CONFIG_STATUS <<\EOF
6503 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6504   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6505   case "$ac_file" in
6506   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6507        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6508   *) ac_file_in="${ac_file}.in" ;;
6509   esac
6510
6511   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6512
6513   # Remove last slash and all that follows it.  Not all systems have dirname.
6514   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6515   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6516     # The file is in a subdirectory.
6517     test ! -d "$ac_dir" && mkdir "$ac_dir"
6518     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6519     # A "../" for each directory in $ac_dir_suffix.
6520     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6521   else
6522     ac_dir_suffix= ac_dots=
6523   fi
6524
6525   case "$ac_given_srcdir" in
6526   .)  srcdir=.
6527       if test -z "$ac_dots"; then top_srcdir=.
6528       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6529   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6530   *) # Relative path.
6531     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6532     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6533   esac
6534
6535   case "$ac_given_INSTALL" in
6536   [/$]*) INSTALL="$ac_given_INSTALL" ;;
6537   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6538   esac
6539
6540   echo creating "$ac_file"
6541   rm -f "$ac_file"
6542   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6543   case "$ac_file" in
6544   *Makefile*) ac_comsub="1i\\
6545 # $configure_input" ;;
6546   *) ac_comsub= ;;
6547   esac
6548
6549   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6550   sed -e "$ac_comsub
6551 s%@configure_input@%$configure_input%g
6552 s%@srcdir@%$srcdir%g
6553 s%@top_srcdir@%$top_srcdir%g
6554 s%@INSTALL@%$INSTALL%g
6555 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6556 fi; done
6557 rm -f conftest.s*
6558
6559 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6560 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6561 #
6562 # ac_d sets the value in "#define NAME VALUE" lines.
6563 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6564 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6565 ac_dC='\3'
6566 ac_dD='%g'
6567 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6568 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6569 ac_uB='\([      ]\)%\1#\2define\3'
6570 ac_uC=' '
6571 ac_uD='\4%g'
6572 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6573 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6574 ac_eB='$%\1#\2define\3'
6575 ac_eC=' '
6576 ac_eD='%g'
6577
6578 if test "${CONFIG_HEADERS+set}" != set; then
6579 EOF
6580 cat >> $CONFIG_STATUS <<EOF
6581   CONFIG_HEADERS="include/config.h"
6582 EOF
6583 cat >> $CONFIG_STATUS <<\EOF
6584 fi
6585 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6586   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6587   case "$ac_file" in
6588   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6589        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6590   *) ac_file_in="${ac_file}.in" ;;
6591   esac
6592
6593   echo creating $ac_file
6594
6595   rm -f conftest.frag conftest.in conftest.out
6596   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6597   cat $ac_file_inputs > conftest.in
6598
6599 EOF
6600
6601 # Transform confdefs.h into a sed script conftest.vals that substitutes
6602 # the proper values into config.h.in to produce config.h.  And first:
6603 # Protect against being on the right side of a sed subst in config.status.
6604 # Protect against being in an unquoted here document in config.status.
6605 rm -f conftest.vals
6606 cat > conftest.hdr <<\EOF
6607 s/[\\&%]/\\&/g
6608 s%[\\$`]%\\&%g
6609 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6610 s%ac_d%ac_u%gp
6611 s%ac_u%ac_e%gp
6612 EOF
6613 sed -n -f conftest.hdr confdefs.h > conftest.vals
6614 rm -f conftest.hdr
6615
6616 # This sed command replaces #undef with comments.  This is necessary, for
6617 # example, in the case of _POSIX_SOURCE, which is predefined and required
6618 # on some systems where configure will not decide to define it.
6619 cat >> conftest.vals <<\EOF
6620 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6621 EOF
6622
6623 # Break up conftest.vals because some shells have a limit on
6624 # the size of here documents, and old seds have small limits too.
6625
6626 rm -f conftest.tail
6627 while :
6628 do
6629   ac_lines=`grep -c . conftest.vals`
6630   # grep -c gives empty output for an empty file on some AIX systems.
6631   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6632   # Write a limited-size here document to conftest.frag.
6633   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6634   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6635   echo 'CEOF
6636   sed -f conftest.frag conftest.in > conftest.out
6637   rm -f conftest.in
6638   mv conftest.out conftest.in
6639 ' >> $CONFIG_STATUS
6640   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6641   rm -f conftest.vals
6642   mv conftest.tail conftest.vals
6643 done
6644 rm -f conftest.vals
6645
6646 cat >> $CONFIG_STATUS <<\EOF
6647   rm -f conftest.frag conftest.h
6648   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6649   cat conftest.in >> conftest.h
6650   rm -f conftest.in
6651   if cmp -s $ac_file conftest.h 2>/dev/null; then
6652     echo "$ac_file is unchanged"
6653     rm -f conftest.h
6654   else
6655     # Remove last slash and all that follows it.  Not all systems have dirname.
6656       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6657       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6658       # The file is in a subdirectory.
6659       test ! -d "$ac_dir" && mkdir "$ac_dir"
6660     fi
6661     rm -f $ac_file
6662     mv conftest.h $ac_file
6663   fi
6664 fi; done
6665
6666 EOF
6667 cat >> $CONFIG_STATUS <<EOF
6668
6669 EOF
6670 cat >> $CONFIG_STATUS <<\EOF
6671
6672 exit 0
6673 EOF
6674 chmod +x $CONFIG_STATUS
6675 rm -fr confdefs* $ac_clean_files
6676 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6677
6678
6679 if test "$have_x" = "no"
6680 then
6681   echo
6682   echo "*** Warning: X development files not found. Wine will be built without"
6683   echo "*** X support, which currently does not work, and would probably not be"
6684   echo "*** what you want anyway. You will need to install devel packages of"
6685   echo "*** Xlib/Xfree86 and Xpm at the very least."
6686 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
6687 then
6688   echo
6689   echo "*** Warning: Xpm development files not found. Wine will be built without"
6690   echo "*** Xpm support, which currently does not work. You will need to install"
6691   echo "*** devel packages of Xpm."
6692 fi
6693
6694 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
6695 then
6696   echo
6697   echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
6698   echo "*** terminal resize support. Consider upgrading ncurses."
6699 fi
6700
6701 if test "$wine_cv_libc_reentrant" = "no" 
6702 then
6703   echo
6704   echo "*** Warning: non-reentrant libc detected. Wine will be build without"
6705   echo "*** thread support. Consider upgrading libc to a more recent"
6706   echo "*** reentrant version of libc."
6707 fi
6708
6709 if test "$wine_cv_mesa_version_OK" = "no"
6710 then
6711   echo
6712   echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
6713   echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)"
6714 fi
6715
6716 echo
6717 echo "Configure finished.  Do 'make depend && make' to compile Wine."
6718 echo
6719