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