Moved standard syslevel APIs declaration to winbase.h.
[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
2184 for ac_prog in lclint lint
2185 do
2186 # Extract the first word of "$ac_prog", so it can be a program name with args.
2187 set dummy $ac_prog; ac_word=$2
2188 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2189 echo "configure:2190: checking for $ac_word" >&5
2190 if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
2191   echo $ac_n "(cached) $ac_c" 1>&6
2192 else
2193   if test -n "$LINT"; then
2194   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2195 else
2196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2197   ac_dummy="$PATH"
2198   for ac_dir in $ac_dummy; do
2199     test -z "$ac_dir" && ac_dir=.
2200     if test -f $ac_dir/$ac_word; then
2201       ac_cv_prog_LINT="$ac_prog"
2202       break
2203     fi
2204   done
2205   IFS="$ac_save_ifs"
2206 fi
2207 fi
2208 LINT="$ac_cv_prog_LINT"
2209 if test -n "$LINT"; then
2210   echo "$ac_t""$LINT" 1>&6
2211 else
2212   echo "$ac_t""no" 1>&6
2213 fi
2214
2215 test -n "$LINT" && break
2216 done
2217
2218 if test "$LINT" = "lint"
2219 then
2220   LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
2221   fi
2222
2223
2224
2225
2226 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
2227 echo "configure:2228: checking for sqrt in -lm" >&5
2228 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
2229 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2230   echo $ac_n "(cached) $ac_c" 1>&6
2231 else
2232   ac_save_LIBS="$LIBS"
2233 LIBS="-lm  $LIBS"
2234 cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2237 /* Override any gcc2 internal prototype to avoid an error.  */
2238 /* We use char because int might match the return type of a gcc2
2239     builtin and then its argument prototype would still apply.  */
2240 char sqrt();
2241
2242 int main() {
2243 sqrt()
2244 ; return 0; }
2245 EOF
2246 if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2247   rm -rf conftest*
2248   eval "ac_cv_lib_$ac_lib_var=yes"
2249 else
2250   echo "configure: failed program was:" >&5
2251   cat conftest.$ac_ext >&5
2252   rm -rf conftest*
2253   eval "ac_cv_lib_$ac_lib_var=no"
2254 fi
2255 rm -f conftest*
2256 LIBS="$ac_save_LIBS"
2257
2258 fi
2259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2260   echo "$ac_t""yes" 1>&6
2261     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2262     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2263   cat >> confdefs.h <<EOF
2264 #define $ac_tr_lib 1
2265 EOF
2266
2267   LIBS="-lm $LIBS"
2268
2269 else
2270   echo "$ac_t""no" 1>&6
2271 fi
2272
2273 echo $ac_n "checking for i386_set_ldt in -li386""... $ac_c" 1>&6
2274 echo "configure:2275: checking for i386_set_ldt in -li386" >&5
2275 ac_lib_var=`echo i386'_'i386_set_ldt | sed 'y%./+-%__p_%'`
2276 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2277   echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279   ac_save_LIBS="$LIBS"
2280 LIBS="-li386  $LIBS"
2281 cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284 /* Override any gcc2 internal prototype to avoid an error.  */
2285 /* We use char because int might match the return type of a gcc2
2286     builtin and then its argument prototype would still apply.  */
2287 char i386_set_ldt();
2288
2289 int main() {
2290 i386_set_ldt()
2291 ; return 0; }
2292 EOF
2293 if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2294   rm -rf conftest*
2295   eval "ac_cv_lib_$ac_lib_var=yes"
2296 else
2297   echo "configure: failed program was:" >&5
2298   cat conftest.$ac_ext >&5
2299   rm -rf conftest*
2300   eval "ac_cv_lib_$ac_lib_var=no"
2301 fi
2302 rm -f conftest*
2303 LIBS="$ac_save_LIBS"
2304
2305 fi
2306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2307   echo "$ac_t""yes" 1>&6
2308     ac_tr_lib=HAVE_LIB`echo i386 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2309     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2310   cat >> confdefs.h <<EOF
2311 #define $ac_tr_lib 1
2312 EOF
2313
2314   LIBS="-li386 $LIBS"
2315
2316 else
2317   echo "$ac_t""no" 1>&6
2318 fi
2319
2320 echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
2321 echo "configure:2322: checking for _oss_ioctl in -lossaudio" >&5
2322 ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
2323 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2324   echo $ac_n "(cached) $ac_c" 1>&6
2325 else
2326   ac_save_LIBS="$LIBS"
2327 LIBS="-lossaudio  $LIBS"
2328 cat > conftest.$ac_ext <<EOF
2329 #line 2330 "configure"
2330 #include "confdefs.h"
2331 /* Override any gcc2 internal prototype to avoid an error.  */
2332 /* We use char because int might match the return type of a gcc2
2333     builtin and then its argument prototype would still apply.  */
2334 char _oss_ioctl();
2335
2336 int main() {
2337 _oss_ioctl()
2338 ; return 0; }
2339 EOF
2340 if { (eval echo configure:2341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2341   rm -rf conftest*
2342   eval "ac_cv_lib_$ac_lib_var=yes"
2343 else
2344   echo "configure: failed program was:" >&5
2345   cat conftest.$ac_ext >&5
2346   rm -rf conftest*
2347   eval "ac_cv_lib_$ac_lib_var=no"
2348 fi
2349 rm -f conftest*
2350 LIBS="$ac_save_LIBS"
2351
2352 fi
2353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2354   echo "$ac_t""yes" 1>&6
2355     ac_tr_lib=HAVE_LIB`echo ossaudio | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2356     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2357   cat >> confdefs.h <<EOF
2358 #define $ac_tr_lib 1
2359 EOF
2360
2361   LIBS="-lossaudio $LIBS"
2362
2363 else
2364   echo "$ac_t""no" 1>&6
2365 fi
2366
2367 echo $ac_n "checking for iswalnum in -lw""... $ac_c" 1>&6
2368 echo "configure:2369: checking for iswalnum in -lw" >&5
2369 ac_lib_var=`echo w'_'iswalnum | sed 'y%./+-%__p_%'`
2370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2371   echo $ac_n "(cached) $ac_c" 1>&6
2372 else
2373   ac_save_LIBS="$LIBS"
2374 LIBS="-lw  $LIBS"
2375 cat > conftest.$ac_ext <<EOF
2376 #line 2377 "configure"
2377 #include "confdefs.h"
2378 /* Override any gcc2 internal prototype to avoid an error.  */
2379 /* We use char because int might match the return type of a gcc2
2380     builtin and then its argument prototype would still apply.  */
2381 char iswalnum();
2382
2383 int main() {
2384 iswalnum()
2385 ; return 0; }
2386 EOF
2387 if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2388   rm -rf conftest*
2389   eval "ac_cv_lib_$ac_lib_var=yes"
2390 else
2391   echo "configure: failed program was:" >&5
2392   cat conftest.$ac_ext >&5
2393   rm -rf conftest*
2394   eval "ac_cv_lib_$ac_lib_var=no"
2395 fi
2396 rm -f conftest*
2397 LIBS="$ac_save_LIBS"
2398
2399 fi
2400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2401   echo "$ac_t""yes" 1>&6
2402     ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2403     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2404   cat >> confdefs.h <<EOF
2405 #define $ac_tr_lib 1
2406 EOF
2407
2408   LIBS="-lw $LIBS"
2409
2410 else
2411   echo "$ac_t""no" 1>&6
2412 fi
2413
2414 for ac_func in gethostbyname
2415 do
2416 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2417 echo "configure:2418: checking for $ac_func" >&5
2418 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2419   echo $ac_n "(cached) $ac_c" 1>&6
2420 else
2421   cat > conftest.$ac_ext <<EOF
2422 #line 2423 "configure"
2423 #include "confdefs.h"
2424 /* System header to define __stub macros and hopefully few prototypes,
2425     which can conflict with char $ac_func(); below.  */
2426 #include <assert.h>
2427 /* Override any gcc2 internal prototype to avoid an error.  */
2428 /* We use char because int might match the return type of a gcc2
2429     builtin and then its argument prototype would still apply.  */
2430 char $ac_func();
2431
2432 int main() {
2433
2434 /* The GNU C library defines this for functions which it implements
2435     to always fail with ENOSYS.  Some functions are actually named
2436     something starting with __ and the normal name is an alias.  */
2437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2438 choke me
2439 #else
2440 $ac_func();
2441 #endif
2442
2443 ; return 0; }
2444 EOF
2445 if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2446   rm -rf conftest*
2447   eval "ac_cv_func_$ac_func=yes"
2448 else
2449   echo "configure: failed program was:" >&5
2450   cat conftest.$ac_ext >&5
2451   rm -rf conftest*
2452   eval "ac_cv_func_$ac_func=no"
2453 fi
2454 rm -f conftest*
2455 fi
2456
2457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2458   echo "$ac_t""yes" 1>&6
2459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2460   cat >> confdefs.h <<EOF
2461 #define $ac_tr_func 1
2462 EOF
2463  
2464 else
2465   echo "$ac_t""no" 1>&6
2466 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2467 echo "configure:2468: checking for gethostbyname in -lnsl" >&5
2468 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2469 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2470   echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472   ac_save_LIBS="$LIBS"
2473 LIBS="-lnsl -lsocket $LIBS"
2474 cat > conftest.$ac_ext <<EOF
2475 #line 2476 "configure"
2476 #include "confdefs.h"
2477 /* Override any gcc2 internal prototype to avoid an error.  */
2478 /* We use char because int might match the return type of a gcc2
2479     builtin and then its argument prototype would still apply.  */
2480 char gethostbyname();
2481
2482 int main() {
2483 gethostbyname()
2484 ; return 0; }
2485 EOF
2486 if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2487   rm -rf conftest*
2488   eval "ac_cv_lib_$ac_lib_var=yes"
2489 else
2490   echo "configure: failed program was:" >&5
2491   cat conftest.$ac_ext >&5
2492   rm -rf conftest*
2493   eval "ac_cv_lib_$ac_lib_var=no"
2494 fi
2495 rm -f conftest*
2496 LIBS="$ac_save_LIBS"
2497
2498 fi
2499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2500   echo "$ac_t""yes" 1>&6
2501   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2502 else
2503   echo "$ac_t""no" 1>&6
2504 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
2505 echo "configure:2506: checking for gethostbyname in -lsocket" >&5
2506 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
2507 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2508   echo $ac_n "(cached) $ac_c" 1>&6
2509 else
2510   ac_save_LIBS="$LIBS"
2511 LIBS="-lsocket -lnsl $LIBS"
2512 cat > conftest.$ac_ext <<EOF
2513 #line 2514 "configure"
2514 #include "confdefs.h"
2515 /* Override any gcc2 internal prototype to avoid an error.  */
2516 /* We use char because int might match the return type of a gcc2
2517     builtin and then its argument prototype would still apply.  */
2518 char gethostbyname();
2519
2520 int main() {
2521 gethostbyname()
2522 ; return 0; }
2523 EOF
2524 if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2525   rm -rf conftest*
2526   eval "ac_cv_lib_$ac_lib_var=yes"
2527 else
2528   echo "configure: failed program was:" >&5
2529   cat conftest.$ac_ext >&5
2530   rm -rf conftest*
2531   eval "ac_cv_lib_$ac_lib_var=no"
2532 fi
2533 rm -f conftest*
2534 LIBS="$ac_save_LIBS"
2535
2536 fi
2537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2538   echo "$ac_t""yes" 1>&6
2539   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2540 else
2541   echo "$ac_t""no" 1>&6
2542 fi
2543
2544 fi
2545
2546 fi
2547 done
2548
2549 for ac_func in connect
2550 do
2551 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2552 echo "configure:2553: checking for $ac_func" >&5
2553 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2554   echo $ac_n "(cached) $ac_c" 1>&6
2555 else
2556   cat > conftest.$ac_ext <<EOF
2557 #line 2558 "configure"
2558 #include "confdefs.h"
2559 /* System header to define __stub macros and hopefully few prototypes,
2560     which can conflict with char $ac_func(); below.  */
2561 #include <assert.h>
2562 /* Override any gcc2 internal prototype to avoid an error.  */
2563 /* We use char because int might match the return type of a gcc2
2564     builtin and then its argument prototype would still apply.  */
2565 char $ac_func();
2566
2567 int main() {
2568
2569 /* The GNU C library defines this for functions which it implements
2570     to always fail with ENOSYS.  Some functions are actually named
2571     something starting with __ and the normal name is an alias.  */
2572 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2573 choke me
2574 #else
2575 $ac_func();
2576 #endif
2577
2578 ; return 0; }
2579 EOF
2580 if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2581   rm -rf conftest*
2582   eval "ac_cv_func_$ac_func=yes"
2583 else
2584   echo "configure: failed program was:" >&5
2585   cat conftest.$ac_ext >&5
2586   rm -rf conftest*
2587   eval "ac_cv_func_$ac_func=no"
2588 fi
2589 rm -f conftest*
2590 fi
2591
2592 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2593   echo "$ac_t""yes" 1>&6
2594     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2595   cat >> confdefs.h <<EOF
2596 #define $ac_tr_func 1
2597 EOF
2598  
2599 else
2600   echo "$ac_t""no" 1>&6
2601 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2602 echo "configure:2603: checking for connect in -lsocket" >&5
2603 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2604 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2605   echo $ac_n "(cached) $ac_c" 1>&6
2606 else
2607   ac_save_LIBS="$LIBS"
2608 LIBS="-lsocket  $LIBS"
2609 cat > conftest.$ac_ext <<EOF
2610 #line 2611 "configure"
2611 #include "confdefs.h"
2612 /* Override any gcc2 internal prototype to avoid an error.  */
2613 /* We use char because int might match the return type of a gcc2
2614     builtin and then its argument prototype would still apply.  */
2615 char connect();
2616
2617 int main() {
2618 connect()
2619 ; return 0; }
2620 EOF
2621 if { (eval echo configure:2622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2622   rm -rf conftest*
2623   eval "ac_cv_lib_$ac_lib_var=yes"
2624 else
2625   echo "configure: failed program was:" >&5
2626   cat conftest.$ac_ext >&5
2627   rm -rf conftest*
2628   eval "ac_cv_lib_$ac_lib_var=no"
2629 fi
2630 rm -f conftest*
2631 LIBS="$ac_save_LIBS"
2632
2633 fi
2634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2635   echo "$ac_t""yes" 1>&6
2636     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
2637     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2638   cat >> confdefs.h <<EOF
2639 #define $ac_tr_lib 1
2640 EOF
2641
2642   LIBS="-lsocket $LIBS"
2643
2644 else
2645   echo "$ac_t""no" 1>&6
2646 fi
2647
2648 fi
2649 done
2650
2651 echo $ac_n "checking for setrunelocale in -lxpg4""... $ac_c" 1>&6
2652 echo "configure:2653: checking for setrunelocale in -lxpg4" >&5
2653 ac_lib_var=`echo xpg4'_'setrunelocale | sed 'y%./+-%__p_%'`
2654 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2655   echo $ac_n "(cached) $ac_c" 1>&6
2656 else
2657   ac_save_LIBS="$LIBS"
2658 LIBS="-lxpg4  $LIBS"
2659 cat > conftest.$ac_ext <<EOF
2660 #line 2661 "configure"
2661 #include "confdefs.h"
2662 /* Override any gcc2 internal prototype to avoid an error.  */
2663 /* We use char because int might match the return type of a gcc2
2664     builtin and then its argument prototype would still apply.  */
2665 char setrunelocale();
2666
2667 int main() {
2668 setrunelocale()
2669 ; return 0; }
2670 EOF
2671 if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2672   rm -rf conftest*
2673   eval "ac_cv_lib_$ac_lib_var=yes"
2674 else
2675   echo "configure: failed program was:" >&5
2676   cat conftest.$ac_ext >&5
2677   rm -rf conftest*
2678   eval "ac_cv_lib_$ac_lib_var=no"
2679 fi
2680 rm -f conftest*
2681 LIBS="$ac_save_LIBS"
2682
2683 fi
2684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2685   echo "$ac_t""yes" 1>&6
2686     ac_tr_lib=HAVE_LIB`echo xpg4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2687     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2688   cat >> confdefs.h <<EOF
2689 #define $ac_tr_lib 1
2690 EOF
2691
2692   LIBS="-lxpg4 $LIBS"
2693
2694 else
2695   echo "$ac_t""no" 1>&6
2696 fi
2697
2698 echo $ac_n "checking for mmap in -lmmap""... $ac_c" 1>&6
2699 echo "configure:2700: checking for mmap in -lmmap" >&5
2700 ac_lib_var=`echo mmap'_'mmap | sed 'y%./+-%__p_%'`
2701 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2702   echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704   ac_save_LIBS="$LIBS"
2705 LIBS="-lmmap  $LIBS"
2706 cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709 /* Override any gcc2 internal prototype to avoid an error.  */
2710 /* We use char because int might match the return type of a gcc2
2711     builtin and then its argument prototype would still apply.  */
2712 char mmap();
2713
2714 int main() {
2715 mmap()
2716 ; return 0; }
2717 EOF
2718 if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2719   rm -rf conftest*
2720   eval "ac_cv_lib_$ac_lib_var=yes"
2721 else
2722   echo "configure: failed program was:" >&5
2723   cat conftest.$ac_ext >&5
2724   rm -rf conftest*
2725   eval "ac_cv_lib_$ac_lib_var=no"
2726 fi
2727 rm -f conftest*
2728 LIBS="$ac_save_LIBS"
2729
2730 fi
2731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2732   echo "$ac_t""yes" 1>&6
2733     ac_tr_lib=HAVE_LIB`echo mmap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2734     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2735   cat >> confdefs.h <<EOF
2736 #define $ac_tr_lib 1
2737 EOF
2738
2739   LIBS="-lmmap $LIBS"
2740
2741 else
2742   echo "$ac_t""no" 1>&6
2743 fi
2744
2745 for ac_func in openpty
2746 do
2747 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2748 echo "configure:2749: checking for $ac_func" >&5
2749 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2750   echo $ac_n "(cached) $ac_c" 1>&6
2751 else
2752   cat > conftest.$ac_ext <<EOF
2753 #line 2754 "configure"
2754 #include "confdefs.h"
2755 /* System header to define __stub macros and hopefully few prototypes,
2756     which can conflict with char $ac_func(); below.  */
2757 #include <assert.h>
2758 /* Override any gcc2 internal prototype to avoid an error.  */
2759 /* We use char because int might match the return type of a gcc2
2760     builtin and then its argument prototype would still apply.  */
2761 char $ac_func();
2762
2763 int main() {
2764
2765 /* The GNU C library defines this for functions which it implements
2766     to always fail with ENOSYS.  Some functions are actually named
2767     something starting with __ and the normal name is an alias.  */
2768 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2769 choke me
2770 #else
2771 $ac_func();
2772 #endif
2773
2774 ; return 0; }
2775 EOF
2776 if { (eval echo configure:2777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2777   rm -rf conftest*
2778   eval "ac_cv_func_$ac_func=yes"
2779 else
2780   echo "configure: failed program was:" >&5
2781   cat conftest.$ac_ext >&5
2782   rm -rf conftest*
2783   eval "ac_cv_func_$ac_func=no"
2784 fi
2785 rm -f conftest*
2786 fi
2787
2788 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2789   echo "$ac_t""yes" 1>&6
2790     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2791   cat >> confdefs.h <<EOF
2792 #define $ac_tr_func 1
2793 EOF
2794  
2795 else
2796   echo "$ac_t""no" 1>&6
2797 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
2798 echo "configure:2799: checking for openpty in -lutil" >&5
2799 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
2800 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2801   echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803   ac_save_LIBS="$LIBS"
2804 LIBS="-lutil  $LIBS"
2805 cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808 /* Override any gcc2 internal prototype to avoid an error.  */
2809 /* We use char because int might match the return type of a gcc2
2810     builtin and then its argument prototype would still apply.  */
2811 char openpty();
2812
2813 int main() {
2814 openpty()
2815 ; return 0; }
2816 EOF
2817 if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2818   rm -rf conftest*
2819   eval "ac_cv_lib_$ac_lib_var=yes"
2820 else
2821   echo "configure: failed program was:" >&5
2822   cat conftest.$ac_ext >&5
2823   rm -rf conftest*
2824   eval "ac_cv_lib_$ac_lib_var=no"
2825 fi
2826 rm -f conftest*
2827 LIBS="$ac_save_LIBS"
2828
2829 fi
2830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2831   echo "$ac_t""yes" 1>&6
2832   cat >> confdefs.h <<\EOF
2833 #define HAVE_OPENPTY 1
2834 EOF
2835
2836                 LIBS="$LIBS -lutil"
2837         
2838 else
2839   echo "$ac_t""no" 1>&6
2840 fi
2841
2842 fi
2843 done
2844
2845
2846 for ac_hdr in dlfcn.h
2847 do
2848 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2849 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2850 echo "configure:2851: checking for $ac_hdr" >&5
2851 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2852   echo $ac_n "(cached) $ac_c" 1>&6
2853 else
2854   cat > conftest.$ac_ext <<EOF
2855 #line 2856 "configure"
2856 #include "confdefs.h"
2857 #include <$ac_hdr>
2858 EOF
2859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2860 { (eval echo configure:2861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2862 if test -z "$ac_err"; then
2863   rm -rf conftest*
2864   eval "ac_cv_header_$ac_safe=yes"
2865 else
2866   echo "$ac_err" >&5
2867   echo "configure: failed program was:" >&5
2868   cat conftest.$ac_ext >&5
2869   rm -rf conftest*
2870   eval "ac_cv_header_$ac_safe=no"
2871 fi
2872 rm -f conftest*
2873 fi
2874 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2875   echo "$ac_t""yes" 1>&6
2876     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2877   cat >> confdefs.h <<EOF
2878 #define $ac_tr_hdr 1
2879 EOF
2880  for ac_func in dlopen
2881 do
2882 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2883 echo "configure:2884: checking for $ac_func" >&5
2884 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2885   echo $ac_n "(cached) $ac_c" 1>&6
2886 else
2887   cat > conftest.$ac_ext <<EOF
2888 #line 2889 "configure"
2889 #include "confdefs.h"
2890 /* System header to define __stub macros and hopefully few prototypes,
2891     which can conflict with char $ac_func(); below.  */
2892 #include <assert.h>
2893 /* Override any gcc2 internal prototype to avoid an error.  */
2894 /* We use char because int might match the return type of a gcc2
2895     builtin and then its argument prototype would still apply.  */
2896 char $ac_func();
2897
2898 int main() {
2899
2900 /* The GNU C library defines this for functions which it implements
2901     to always fail with ENOSYS.  Some functions are actually named
2902     something starting with __ and the normal name is an alias.  */
2903 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2904 choke me
2905 #else
2906 $ac_func();
2907 #endif
2908
2909 ; return 0; }
2910 EOF
2911 if { (eval echo configure:2912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2912   rm -rf conftest*
2913   eval "ac_cv_func_$ac_func=yes"
2914 else
2915   echo "configure: failed program was:" >&5
2916   cat conftest.$ac_ext >&5
2917   rm -rf conftest*
2918   eval "ac_cv_func_$ac_func=no"
2919 fi
2920 rm -f conftest*
2921 fi
2922
2923 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2924   echo "$ac_t""yes" 1>&6
2925     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2926   cat >> confdefs.h <<EOF
2927 #define $ac_tr_func 1
2928 EOF
2929  cat >> confdefs.h <<\EOF
2930 #define HAVE_DL_API 1
2931 EOF
2932
2933 else
2934   echo "$ac_t""no" 1>&6
2935 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2936 echo "configure:2937: checking for dlopen in -ldl" >&5
2937 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2938 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2939   echo $ac_n "(cached) $ac_c" 1>&6
2940 else
2941   ac_save_LIBS="$LIBS"
2942 LIBS="-ldl  $LIBS"
2943 cat > conftest.$ac_ext <<EOF
2944 #line 2945 "configure"
2945 #include "confdefs.h"
2946 /* Override any gcc2 internal prototype to avoid an error.  */
2947 /* We use char because int might match the return type of a gcc2
2948     builtin and then its argument prototype would still apply.  */
2949 char dlopen();
2950
2951 int main() {
2952 dlopen()
2953 ; return 0; }
2954 EOF
2955 if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2956   rm -rf conftest*
2957   eval "ac_cv_lib_$ac_lib_var=yes"
2958 else
2959   echo "configure: failed program was:" >&5
2960   cat conftest.$ac_ext >&5
2961   rm -rf conftest*
2962   eval "ac_cv_lib_$ac_lib_var=no"
2963 fi
2964 rm -f conftest*
2965 LIBS="$ac_save_LIBS"
2966
2967 fi
2968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2969   echo "$ac_t""yes" 1>&6
2970   cat >> confdefs.h <<\EOF
2971 #define HAVE_DL_API 1
2972 EOF
2973
2974                         LIBS="$LIBS -ldl"
2975 else
2976   echo "$ac_t""no" 1>&6
2977 LIBEXT="a"
2978                 
2979 fi
2980
2981         
2982 fi
2983 done
2984
2985 else
2986   echo "$ac_t""no" 1>&6
2987 LIBEXT="a"
2988
2989 fi
2990 done
2991
2992
2993
2994 X_DLLS=""
2995
2996 XFILES=""
2997
2998 OPENGLFILES=""
2999
3000 OPENGL32_DLL=""
3001
3002 DGA_SRCS=""
3003
3004 DGA2_SRCS=""
3005
3006 MESA_SRCS=""
3007 if test "$have_x" = "yes"
3008 then
3009     XLIB="-lXext -lX11"
3010     ac_save_CPPFLAGS="$CPPFLAGS"
3011     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3012
3013         for ac_hdr in X11/xpm.h
3014 do
3015 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3016 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3017 echo "configure:3018: checking for $ac_hdr" >&5
3018 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3019   echo $ac_n "(cached) $ac_c" 1>&6
3020 else
3021   cat > conftest.$ac_ext <<EOF
3022 #line 3023 "configure"
3023 #include "confdefs.h"
3024 #include <$ac_hdr>
3025 EOF
3026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3027 { (eval echo configure:3028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3029 if test -z "$ac_err"; then
3030   rm -rf conftest*
3031   eval "ac_cv_header_$ac_safe=yes"
3032 else
3033   echo "$ac_err" >&5
3034   echo "configure: failed program was:" >&5
3035   cat conftest.$ac_ext >&5
3036   rm -rf conftest*
3037   eval "ac_cv_header_$ac_safe=no"
3038 fi
3039 rm -f conftest*
3040 fi
3041 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3042   echo "$ac_t""yes" 1>&6
3043     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3044   cat >> confdefs.h <<EOF
3045 #define $ac_tr_hdr 1
3046 EOF
3047           echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6
3048 echo "configure:3049: checking for XpmCreatePixmapFromData in -lXpm" >&5
3049 ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'`
3050 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3051   echo $ac_n "(cached) $ac_c" 1>&6
3052 else
3053   ac_save_LIBS="$LIBS"
3054 LIBS="-lXpm $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3055          $LIBS"
3056 cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059 /* Override any gcc2 internal prototype to avoid an error.  */
3060 /* We use char because int might match the return type of a gcc2
3061     builtin and then its argument prototype would still apply.  */
3062 char XpmCreatePixmapFromData();
3063
3064 int main() {
3065 XpmCreatePixmapFromData()
3066 ; return 0; }
3067 EOF
3068 if { (eval echo configure:3069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3069   rm -rf conftest*
3070   eval "ac_cv_lib_$ac_lib_var=yes"
3071 else
3072   echo "configure: failed program was:" >&5
3073   cat conftest.$ac_ext >&5
3074   rm -rf conftest*
3075   eval "ac_cv_lib_$ac_lib_var=no"
3076 fi
3077 rm -f conftest*
3078 LIBS="$ac_save_LIBS"
3079
3080 fi
3081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3082   echo "$ac_t""yes" 1>&6
3083    cat >> confdefs.h <<\EOF
3084 #define HAVE_LIBXXPM 1
3085 EOF
3086  X_PRE_LIBS="$X_PRE_LIBS -lXpm"
3087 else
3088   echo "$ac_t""no" 1>&6
3089 fi
3090
3091       
3092 else
3093   echo "$ac_t""no" 1>&6
3094                                 echo "Redhat            :       xpm xpm-devel"
3095         echo "Caldera OpenLinux :       xpm xpm-devel xpm-devel-static"
3096         echo "SuSE              :       xpm"
3097         echo "Debian/Corel Linux:       xpm4g xpm4g-dev"
3098         echo
3099         echo "Or get the sources from ftp.x.org and all its mirror sites from "
3100         echo "the directory /contrib/libraries."
3101         echo
3102         exit 1
3103       
3104     
3105 fi
3106 done
3107
3108
3109         for ac_hdr in X11/Xlib.h
3110 do
3111 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3112 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3113 echo "configure:3114: checking for $ac_hdr" >&5
3114 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3115   echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117   cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 #include <$ac_hdr>
3121 EOF
3122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3123 { (eval echo configure:3124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3125 if test -z "$ac_err"; then
3126   rm -rf conftest*
3127   eval "ac_cv_header_$ac_safe=yes"
3128 else
3129   echo "$ac_err" >&5
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133   eval "ac_cv_header_$ac_safe=no"
3134 fi
3135 rm -f conftest*
3136 fi
3137 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3138   echo "$ac_t""yes" 1>&6
3139     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3140   cat >> confdefs.h <<EOF
3141 #define $ac_tr_hdr 1
3142 EOF
3143  
3144                 for ac_hdr in X11/extensions/XShm.h
3145 do
3146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3148 echo "configure:3149: checking for $ac_hdr" >&5
3149 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3150   echo $ac_n "(cached) $ac_c" 1>&6
3151 else
3152   cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 #include <$ac_hdr>
3156 EOF
3157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3158 { (eval echo configure:3159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3160 if test -z "$ac_err"; then
3161   rm -rf conftest*
3162   eval "ac_cv_header_$ac_safe=yes"
3163 else
3164   echo "$ac_err" >&5
3165   echo "configure: failed program was:" >&5
3166   cat conftest.$ac_ext >&5
3167   rm -rf conftest*
3168   eval "ac_cv_header_$ac_safe=no"
3169 fi
3170 rm -f conftest*
3171 fi
3172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3173   echo "$ac_t""yes" 1>&6
3174     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3175   cat >> confdefs.h <<EOF
3176 #define $ac_tr_hdr 1
3177 EOF
3178                 echo $ac_n "checking for XShmQueryExtension in -lXext""... $ac_c" 1>&6
3179 echo "configure:3180: checking for XShmQueryExtension in -lXext" >&5
3180 ac_lib_var=`echo Xext'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
3181 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3182   echo $ac_n "(cached) $ac_c" 1>&6
3183 else
3184   ac_save_LIBS="$LIBS"
3185 LIBS="-lXext $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3186 cat > conftest.$ac_ext <<EOF
3187 #line 3188 "configure"
3188 #include "confdefs.h"
3189 /* Override any gcc2 internal prototype to avoid an error.  */
3190 /* We use char because int might match the return type of a gcc2
3191     builtin and then its argument prototype would still apply.  */
3192 char XShmQueryExtension();
3193
3194 int main() {
3195 XShmQueryExtension()
3196 ; return 0; }
3197 EOF
3198 if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3199   rm -rf conftest*
3200   eval "ac_cv_lib_$ac_lib_var=yes"
3201 else
3202   echo "configure: failed program was:" >&5
3203   cat conftest.$ac_ext >&5
3204   rm -rf conftest*
3205   eval "ac_cv_lib_$ac_lib_var=no"
3206 fi
3207 rm -f conftest*
3208 LIBS="$ac_save_LIBS"
3209
3210 fi
3211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3212   echo "$ac_t""yes" 1>&6
3213   cat >> confdefs.h <<\EOF
3214 #define HAVE_LIBXXSHM 1
3215 EOF
3216
3217 else
3218   echo "$ac_t""no" 1>&6
3219 fi
3220
3221             
3222 else
3223   echo "$ac_t""no" 1>&6
3224 echo "configure: warning: Xshm extension not found!!" 1>&2
3225         
3226 fi
3227 done
3228
3229
3230                 for ac_hdr in X11/Xlib.h X11/extensions/shape.h
3231 do
3232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3234 echo "configure:3235: checking for $ac_hdr" >&5
3235 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3236   echo $ac_n "(cached) $ac_c" 1>&6
3237 else
3238   cat > conftest.$ac_ext <<EOF
3239 #line 3240 "configure"
3240 #include "confdefs.h"
3241 #include <$ac_hdr>
3242 EOF
3243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3244 { (eval echo configure:3245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3246 if test -z "$ac_err"; then
3247   rm -rf conftest*
3248   eval "ac_cv_header_$ac_safe=yes"
3249 else
3250   echo "$ac_err" >&5
3251   echo "configure: failed program was:" >&5
3252   cat conftest.$ac_ext >&5
3253   rm -rf conftest*
3254   eval "ac_cv_header_$ac_safe=no"
3255 fi
3256 rm -f conftest*
3257 fi
3258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3259   echo "$ac_t""yes" 1>&6
3260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3261   cat >> confdefs.h <<EOF
3262 #define $ac_tr_hdr 1
3263 EOF
3264                 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
3265 echo "configure:3266: checking for XShapeQueryExtension in -lXext" >&5
3266 ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
3267 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3268   echo $ac_n "(cached) $ac_c" 1>&6
3269 else
3270   ac_save_LIBS="$LIBS"
3271 LIBS="-lXext $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3272 cat > conftest.$ac_ext <<EOF
3273 #line 3274 "configure"
3274 #include "confdefs.h"
3275 /* Override any gcc2 internal prototype to avoid an error.  */
3276 /* We use char because int might match the return type of a gcc2
3277     builtin and then its argument prototype would still apply.  */
3278 char XShapeQueryExtension();
3279
3280 int main() {
3281 XShapeQueryExtension()
3282 ; return 0; }
3283 EOF
3284 if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3285   rm -rf conftest*
3286   eval "ac_cv_lib_$ac_lib_var=yes"
3287 else
3288   echo "configure: failed program was:" >&5
3289   cat conftest.$ac_ext >&5
3290   rm -rf conftest*
3291   eval "ac_cv_lib_$ac_lib_var=no"
3292 fi
3293 rm -f conftest*
3294 LIBS="$ac_save_LIBS"
3295
3296 fi
3297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3298   echo "$ac_t""yes" 1>&6
3299   cat >> confdefs.h <<\EOF
3300 #define HAVE_LIBXSHAPE 1
3301 EOF
3302
3303 else
3304   echo "$ac_t""no" 1>&6
3305 fi
3306
3307             
3308 else
3309   echo "$ac_t""no" 1>&6
3310 echo "configure: warning: XShape extension found!!" 1>&2
3311         
3312 fi
3313 done
3314
3315         
3316                 for ac_hdr in X11/extensions/xf86dga.h
3317 do
3318 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3319 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3320 echo "configure:3321: checking for $ac_hdr" >&5
3321 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3322   echo $ac_n "(cached) $ac_c" 1>&6
3323 else
3324   cat > conftest.$ac_ext <<EOF
3325 #line 3326 "configure"
3326 #include "confdefs.h"
3327 #include <$ac_hdr>
3328 EOF
3329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3330 { (eval echo configure:3331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3332 if test -z "$ac_err"; then
3333   rm -rf conftest*
3334   eval "ac_cv_header_$ac_safe=yes"
3335 else
3336   echo "$ac_err" >&5
3337   echo "configure: failed program was:" >&5
3338   cat conftest.$ac_ext >&5
3339   rm -rf conftest*
3340   eval "ac_cv_header_$ac_safe=no"
3341 fi
3342 rm -f conftest*
3343 fi
3344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3345   echo "$ac_t""yes" 1>&6
3346     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3347   cat >> confdefs.h <<EOF
3348 #define $ac_tr_hdr 1
3349 EOF
3350                               echo $ac_n "checking for XDGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
3351 echo "configure:3352: checking for XDGAQueryExtension in -lXxf86dga" >&5
3352 ac_lib_var=`echo Xxf86dga'_'XDGAQueryExtension | sed 'y%./+-%__p_%'`
3353 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3354   echo $ac_n "(cached) $ac_c" 1>&6
3355 else
3356   ac_save_LIBS="$LIBS"
3357 LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3358                $LIBS"
3359 cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 /* Override any gcc2 internal prototype to avoid an error.  */
3363 /* We use char because int might match the return type of a gcc2
3364     builtin and then its argument prototype would still apply.  */
3365 char XDGAQueryExtension();
3366
3367 int main() {
3368 XDGAQueryExtension()
3369 ; return 0; }
3370 EOF
3371 if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3372   rm -rf conftest*
3373   eval "ac_cv_lib_$ac_lib_var=yes"
3374 else
3375   echo "configure: failed program was:" >&5
3376   cat conftest.$ac_ext >&5
3377   rm -rf conftest*
3378   eval "ac_cv_lib_$ac_lib_var=no"
3379 fi
3380 rm -f conftest*
3381 LIBS="$ac_save_LIBS"
3382
3383 fi
3384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3385   echo "$ac_t""yes" 1>&6
3386                      cat >> confdefs.h <<\EOF
3387 #define HAVE_LIBXXF86DGA2 1
3388 EOF
3389
3390                   cat >> confdefs.h <<\EOF
3391 #define HAVE_LIBXXF86DGA 1
3392 EOF
3393
3394                   X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
3395                   DGA_SRCS='$(DGA_SRCS)'
3396                   DGA2_SRCS='$(DGA2_SRCS)'
3397                
3398 else
3399   echo "$ac_t""no" 1>&6
3400                                      echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
3401 echo "configure:3402: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
3402 ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
3403 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3404   echo $ac_n "(cached) $ac_c" 1>&6
3405 else
3406   ac_save_LIBS="$LIBS"
3407 LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3408                    $LIBS"
3409 cat > conftest.$ac_ext <<EOF
3410 #line 3411 "configure"
3411 #include "confdefs.h"
3412 /* Override any gcc2 internal prototype to avoid an error.  */
3413 /* We use char because int might match the return type of a gcc2
3414     builtin and then its argument prototype would still apply.  */
3415 char XF86DGAQueryExtension();
3416
3417 int main() {
3418 XF86DGAQueryExtension()
3419 ; return 0; }
3420 EOF
3421 if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3422   rm -rf conftest*
3423   eval "ac_cv_lib_$ac_lib_var=yes"
3424 else
3425   echo "configure: failed program was:" >&5
3426   cat conftest.$ac_ext >&5
3427   rm -rf conftest*
3428   eval "ac_cv_lib_$ac_lib_var=no"
3429 fi
3430 rm -f conftest*
3431 LIBS="$ac_save_LIBS"
3432
3433 fi
3434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3435   echo "$ac_t""yes" 1>&6
3436    cat >> confdefs.h <<\EOF
3437 #define HAVE_LIBXXF86DGA 1
3438 EOF
3439
3440                       X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
3441                       DGA_SRCS='$(DGA_SRCS)'
3442                     
3443 else
3444   echo "$ac_t""no" 1>&6
3445 fi
3446
3447                 
3448 fi
3449
3450             
3451 else
3452   echo "$ac_t""no" 1>&6
3453 echo "configure: warning: DGA extension not found!!" 1>&2
3454         
3455 fi
3456 done
3457
3458
3459                 for ac_hdr in X11/extensions/xf86vmode.h
3460 do
3461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3463 echo "configure:3464: checking for $ac_hdr" >&5
3464 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3465   echo $ac_n "(cached) $ac_c" 1>&6
3466 else
3467   cat > conftest.$ac_ext <<EOF
3468 #line 3469 "configure"
3469 #include "confdefs.h"
3470 #include <$ac_hdr>
3471 EOF
3472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3473 { (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3475 if test -z "$ac_err"; then
3476   rm -rf conftest*
3477   eval "ac_cv_header_$ac_safe=yes"
3478 else
3479   echo "$ac_err" >&5
3480   echo "configure: failed program was:" >&5
3481   cat conftest.$ac_ext >&5
3482   rm -rf conftest*
3483   eval "ac_cv_header_$ac_safe=no"
3484 fi
3485 rm -f conftest*
3486 fi
3487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3488   echo "$ac_t""yes" 1>&6
3489     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3490   cat >> confdefs.h <<EOF
3491 #define $ac_tr_hdr 1
3492 EOF
3493                   echo $ac_n "checking for XF86VidModeQueryExtension in -lXxf86vm""... $ac_c" 1>&6
3494 echo "configure:3495: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5
3495 ac_lib_var=`echo Xxf86vm'_'XF86VidModeQueryExtension | sed 'y%./+-%__p_%'`
3496 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   ac_save_LIBS="$LIBS"
3500 LIBS="-lXxf86vm $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3501                  $LIBS"
3502 cat > conftest.$ac_ext <<EOF
3503 #line 3504 "configure"
3504 #include "confdefs.h"
3505 /* Override any gcc2 internal prototype to avoid an error.  */
3506 /* We use char because int might match the return type of a gcc2
3507     builtin and then its argument prototype would still apply.  */
3508 char XF86VidModeQueryExtension();
3509
3510 int main() {
3511 XF86VidModeQueryExtension()
3512 ; return 0; }
3513 EOF
3514 if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3515   rm -rf conftest*
3516   eval "ac_cv_lib_$ac_lib_var=yes"
3517 else
3518   echo "configure: failed program was:" >&5
3519   cat conftest.$ac_ext >&5
3520   rm -rf conftest*
3521   eval "ac_cv_lib_$ac_lib_var=no"
3522 fi
3523 rm -f conftest*
3524 LIBS="$ac_save_LIBS"
3525
3526 fi
3527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3528   echo "$ac_t""yes" 1>&6
3529    cat >> confdefs.h <<\EOF
3530 #define HAVE_LIBXXF86VM 1
3531 EOF
3532
3533                      X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
3534                   
3535 else
3536   echo "$ac_t""no" 1>&6
3537 fi
3538
3539             
3540 else
3541   echo "$ac_t""no" 1>&6
3542 echo "configure: warning: XFree86 VMODE extension not found!!" 1>&2
3543         
3544 fi
3545 done
3546
3547
3548                 for ac_hdr in X11/extensions/Xvlib.h
3549 do
3550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3552 echo "configure:3553: checking for $ac_hdr" >&5
3553 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3554   echo $ac_n "(cached) $ac_c" 1>&6
3555 else
3556   cat > conftest.$ac_ext <<EOF
3557 #line 3558 "configure"
3558 #include "confdefs.h"
3559 #include <$ac_hdr>
3560 EOF
3561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3562 { (eval echo configure:3563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3564 if test -z "$ac_err"; then
3565   rm -rf conftest*
3566   eval "ac_cv_header_$ac_safe=yes"
3567 else
3568   echo "$ac_err" >&5
3569   echo "configure: failed program was:" >&5
3570   cat conftest.$ac_ext >&5
3571   rm -rf conftest*
3572   eval "ac_cv_header_$ac_safe=no"
3573 fi
3574 rm -f conftest*
3575 fi
3576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3577   echo "$ac_t""yes" 1>&6
3578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3579   cat >> confdefs.h <<EOF
3580 #define $ac_tr_hdr 1
3581 EOF
3582                   echo $ac_n "checking for XvShmCreateImage in -lXv""... $ac_c" 1>&6
3583 echo "configure:3584: checking for XvShmCreateImage in -lXv" >&5
3584 ac_lib_var=`echo Xv'_'XvShmCreateImage | sed 'y%./+-%__p_%'`
3585 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3586   echo $ac_n "(cached) $ac_c" 1>&6
3587 else
3588   ac_save_LIBS="$LIBS"
3589 LIBS="-lXv $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3590                  $LIBS"
3591 cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594 /* Override any gcc2 internal prototype to avoid an error.  */
3595 /* We use char because int might match the return type of a gcc2
3596     builtin and then its argument prototype would still apply.  */
3597 char XvShmCreateImage();
3598
3599 int main() {
3600 XvShmCreateImage()
3601 ; return 0; }
3602 EOF
3603 if { (eval echo configure:3604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3604   rm -rf conftest*
3605   eval "ac_cv_lib_$ac_lib_var=yes"
3606 else
3607   echo "configure: failed program was:" >&5
3608   cat conftest.$ac_ext >&5
3609   rm -rf conftest*
3610   eval "ac_cv_lib_$ac_lib_var=no"
3611 fi
3612 rm -f conftest*
3613 LIBS="$ac_save_LIBS"
3614
3615 fi
3616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3617   echo "$ac_t""yes" 1>&6
3618    cat >> confdefs.h <<\EOF
3619 #define HAVE_XVIDEO 1
3620 EOF
3621
3622                      X_PRE_LIBS="$X_PRE_LIBS -lXv"
3623                   
3624 else
3625   echo "$ac_t""no" 1>&6
3626 fi
3627
3628             
3629 else
3630   echo "$ac_t""no" 1>&6
3631 echo "configure: warning: XVideo extension not found !!" 1>&2
3632         
3633 fi
3634 done
3635
3636
3637       
3638     
3639 else
3640   echo "$ac_t""no" 1>&6
3641 fi
3642 done
3643  
3644         if test $OPENGL = "yes" -o $OPENGL = "normal"
3645     then
3646         for ac_hdr in GL/gl.h GL/glx.h GL/glext.h
3647 do
3648 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3649 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3650 echo "configure:3651: checking for $ac_hdr" >&5
3651 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3652   echo $ac_n "(cached) $ac_c" 1>&6
3653 else
3654   cat > conftest.$ac_ext <<EOF
3655 #line 3656 "configure"
3656 #include "confdefs.h"
3657 #include <$ac_hdr>
3658 EOF
3659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3660 { (eval echo configure:3661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3662 if test -z "$ac_err"; then
3663   rm -rf conftest*
3664   eval "ac_cv_header_$ac_safe=yes"
3665 else
3666   echo "$ac_err" >&5
3667   echo "configure: failed program was:" >&5
3668   cat conftest.$ac_ext >&5
3669   rm -rf conftest*
3670   eval "ac_cv_header_$ac_safe=no"
3671 fi
3672 rm -f conftest*
3673 fi
3674 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3675   echo "$ac_t""yes" 1>&6
3676     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3677   cat >> confdefs.h <<EOF
3678 #define $ac_tr_hdr 1
3679 EOF
3680  
3681 else
3682   echo "$ac_t""no" 1>&6
3683 fi
3684 done
3685
3686         if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
3687         then
3688                     echo $ac_n "checking "for up-to-date OpenGL version"""... $ac_c" 1>&6
3689 echo "configure:3690: checking "for up-to-date OpenGL version"" >&5
3690 if eval "test \"`echo '$''{'wine_cv_opengl_version_OK'+set}'`\" = set"; then
3691   echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693   cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <GL/gl.h>
3697 int main() {
3698 GLenum test = GL_UNSIGNED_SHORT_5_6_5;
3699 ; return 0; }
3700 EOF
3701 if { (eval echo configure:3702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3702   rm -rf conftest*
3703   wine_cv_opengl_version_OK="yes"
3704 else
3705   echo "configure: failed program was:" >&5
3706   cat conftest.$ac_ext >&5
3707   rm -rf conftest*
3708   wine_cv_opengl_version_OK="no"
3709               
3710 fi
3711 rm -f conftest*
3712             
3713 fi
3714
3715 echo "$ac_t""$wine_cv_opengl_version_OK" 1>&6
3716
3717                     echo $ac_n "checking "for thread-safe OpenGL version"""... $ac_c" 1>&6
3718 echo "configure:3719: checking "for thread-safe OpenGL version"" >&5
3719 if eval "test \"`echo '$''{'wine_cv_opengl_version_threadsafe'+set}'`\" = set"; then
3720   echo $ac_n "(cached) $ac_c" 1>&6
3721 else
3722   saved_libs=$LIBS
3723                LIBS="$X_LIBS -lGL"
3724                cat > conftest.$ac_ext <<EOF
3725 #line 3726 "configure"
3726 #include "confdefs.h"
3727
3728 int main() {
3729 pthread_getspecific();
3730 ; return 0; }
3731 EOF
3732 if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3733   rm -rf conftest*
3734   wine_cv_opengl_version_threadsafe="yes"
3735 else
3736   echo "configure: failed program was:" >&5
3737   cat conftest.$ac_ext >&5
3738   rm -rf conftest*
3739   wine_cv_opengl_version_threadsafe="no"
3740 fi
3741 rm -f conftest*
3742                LIBS=$saved_libs
3743             
3744 fi
3745
3746 echo "$ac_t""$wine_cv_opengl_version_threadsafe" 1>&6
3747
3748             if test "$wine_cv_opengl_version_OK" = "yes" -a \( "$wine_cv_opengl_version_threadsafe" = "no" -o $OPENGL = "yes" \)
3749             then
3750                                 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
3751 echo "configure:3752: checking for glXCreateContext in -lGL" >&5
3752 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
3753 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3754   echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756   ac_save_LIBS="$LIBS"
3757 LIBS="-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
3758 cat > conftest.$ac_ext <<EOF
3759 #line 3760 "configure"
3760 #include "confdefs.h"
3761 /* Override any gcc2 internal prototype to avoid an error.  */
3762 /* We use char because int might match the return type of a gcc2
3763     builtin and then its argument prototype would still apply.  */
3764 char glXCreateContext();
3765
3766 int main() {
3767 glXCreateContext()
3768 ; return 0; }
3769 EOF
3770 if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3771   rm -rf conftest*
3772   eval "ac_cv_lib_$ac_lib_var=yes"
3773 else
3774   echo "configure: failed program was:" >&5
3775   cat conftest.$ac_ext >&5
3776   rm -rf conftest*
3777   eval "ac_cv_lib_$ac_lib_var=no"
3778 fi
3779 rm -f conftest*
3780 LIBS="$ac_save_LIBS"
3781
3782 fi
3783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3784   echo "$ac_t""yes" 1>&6
3785   X_PRE_LIBS="$X_PRE_LIBS -lGL"
3786                              MESA_SRCS='$(MESA_SRCS)'
3787                              
3788 else
3789   echo "$ac_t""no" 1>&6
3790 fi
3791
3792
3793                 if test $ac_cv_lib_GL_glXCreateContext = "yes"
3794                 then
3795
3796                         OPENGLFILES='$(OPENGLFILES)'
3797                         cat >> confdefs.h <<\EOF
3798 #define HAVE_OPENGL 1
3799 EOF
3800
3801
3802                         echo $ac_n "checking for glXGetProcAddressARB in -lGL""... $ac_c" 1>&6
3803 echo "configure:3804: checking for glXGetProcAddressARB in -lGL" >&5
3804 ac_lib_var=`echo GL'_'glXGetProcAddressARB | sed 'y%./+-%__p_%'`
3805 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3806   echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808   ac_save_LIBS="$LIBS"
3809 LIBS="-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
3810 cat > conftest.$ac_ext <<EOF
3811 #line 3812 "configure"
3812 #include "confdefs.h"
3813 /* Override any gcc2 internal prototype to avoid an error.  */
3814 /* We use char because int might match the return type of a gcc2
3815     builtin and then its argument prototype would still apply.  */
3816 char glXGetProcAddressARB();
3817
3818 int main() {
3819 glXGetProcAddressARB()
3820 ; return 0; }
3821 EOF
3822 if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3823   rm -rf conftest*
3824   eval "ac_cv_lib_$ac_lib_var=yes"
3825 else
3826   echo "configure: failed program was:" >&5
3827   cat conftest.$ac_ext >&5
3828   rm -rf conftest*
3829   eval "ac_cv_lib_$ac_lib_var=no"
3830 fi
3831 rm -f conftest*
3832 LIBS="$ac_save_LIBS"
3833
3834 fi
3835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3836   echo "$ac_t""yes" 1>&6
3837   cat >> confdefs.h <<\EOF
3838 #define HAVE_GLX_GETPROCADDRESS 1
3839 EOF
3840
3841 else
3842   echo "$ac_t""no" 1>&6
3843 fi
3844
3845
3846                         if test $ac_cv_lib_GL_glXGetProcAddressARB = "yes"
3847                         then
3848                                echo $ac_n "checking "for OpenGL extension functions prototypes"""... $ac_c" 1>&6
3849 echo "configure:3850: checking "for OpenGL extension functions prototypes"" >&5
3850 if eval "test \"`echo '$''{'wine_cv_extension_prototypes'+set}'`\" = set"; then
3851   echo $ac_n "(cached) $ac_c" 1>&6
3852 else
3853   cat > conftest.$ac_ext <<EOF
3854 #line 3855 "configure"
3855 #include "confdefs.h"
3856 #include <GL/gl.h>
3857                                                   #ifdef HAVE_GL_GLEXT_H
3858                                                   # include <GL/glext.h>
3859                                                   #endif
3860                                                   
3861 int main() {
3862 PFNGLCOLORTABLEEXTPROC test_proc;
3863 ; return 0; }
3864 EOF
3865 if { (eval echo configure:3866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3866   rm -rf conftest*
3867   wine_cv_extension_prototypes="yes"
3868 else
3869   echo "configure: failed program was:" >&5
3870   cat conftest.$ac_ext >&5
3871   rm -rf conftest*
3872   wine_cv_extension_prototypes="no"
3873                                   
3874 fi
3875 rm -f conftest*
3876                                 
3877 fi
3878
3879 echo "$ac_t""$wine_cv_extension_prototypes" 1>&6
3880                                 if test $wine_cv_extension_prototypes = "yes"
3881                                 then
3882                                         cat >> confdefs.h <<\EOF
3883 #define HAVE_GLEXT_PROTOTYPES 1
3884 EOF
3885
3886                                 fi
3887
3888                                 OPENGL32_DLL=opengl32
3889                         fi
3890                 fi
3891              fi
3892          fi
3893     fi
3894
3895     CPPFLAGS="$ac_save_CPPFLAGS"
3896     X_DLLS='$(X_DLLS)'
3897     XFILES='$(XFILES)'
3898 else
3899     XLIB=""
3900     X_CFLAGS=""
3901     X_LIBS=""
3902 fi
3903
3904 if test "$CURSES" = "yes"
3905 then
3906     for ac_hdr in ncurses.h
3907 do
3908 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3909 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3910 echo "configure:3911: checking for $ac_hdr" >&5
3911 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3917 #include <$ac_hdr>
3918 EOF
3919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3920 { (eval echo configure:3921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3921 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3922 if test -z "$ac_err"; then
3923   rm -rf conftest*
3924   eval "ac_cv_header_$ac_safe=yes"
3925 else
3926   echo "$ac_err" >&5
3927   echo "configure: failed program was:" >&5
3928   cat conftest.$ac_ext >&5
3929   rm -rf conftest*
3930   eval "ac_cv_header_$ac_safe=no"
3931 fi
3932 rm -f conftest*
3933 fi
3934 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3935   echo "$ac_t""yes" 1>&6
3936     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3937   cat >> confdefs.h <<EOF
3938 #define $ac_tr_hdr 1
3939 EOF
3940  
3941 else
3942   echo "$ac_t""no" 1>&6
3943 fi
3944 done
3945
3946     if test "$ac_cv_header_ncurses_h" = "yes"
3947     then 
3948         echo $ac_n "checking for waddch in -lncurses""... $ac_c" 1>&6
3949 echo "configure:3950: checking for waddch in -lncurses" >&5
3950 ac_lib_var=`echo ncurses'_'waddch | sed 'y%./+-%__p_%'`
3951 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3952   echo $ac_n "(cached) $ac_c" 1>&6
3953 else
3954   ac_save_LIBS="$LIBS"
3955 LIBS="-lncurses  $LIBS"
3956 cat > conftest.$ac_ext <<EOF
3957 #line 3958 "configure"
3958 #include "confdefs.h"
3959 /* Override any gcc2 internal prototype to avoid an error.  */
3960 /* We use char because int might match the return type of a gcc2
3961     builtin and then its argument prototype would still apply.  */
3962 char waddch();
3963
3964 int main() {
3965 waddch()
3966 ; return 0; }
3967 EOF
3968 if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3969   rm -rf conftest*
3970   eval "ac_cv_lib_$ac_lib_var=yes"
3971 else
3972   echo "configure: failed program was:" >&5
3973   cat conftest.$ac_ext >&5
3974   rm -rf conftest*
3975   eval "ac_cv_lib_$ac_lib_var=no"
3976 fi
3977 rm -f conftest*
3978 LIBS="$ac_save_LIBS"
3979
3980 fi
3981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3982   echo "$ac_t""yes" 1>&6
3983     ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3984     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3985   cat >> confdefs.h <<EOF
3986 #define $ac_tr_lib 1
3987 EOF
3988
3989   LIBS="-lncurses $LIBS"
3990
3991 else
3992   echo "$ac_t""no" 1>&6
3993 fi
3994
3995     fi
3996     if test "$ac_cv_lib_ncurses_waddch" = "yes"
3997     then
3998         echo $ac_n "checking for resizeterm in -lncurses""... $ac_c" 1>&6
3999 echo "configure:4000: checking for resizeterm in -lncurses" >&5
4000 ac_lib_var=`echo ncurses'_'resizeterm | sed 'y%./+-%__p_%'`
4001 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4002   echo $ac_n "(cached) $ac_c" 1>&6
4003 else
4004   ac_save_LIBS="$LIBS"
4005 LIBS="-lncurses  $LIBS"
4006 cat > conftest.$ac_ext <<EOF
4007 #line 4008 "configure"
4008 #include "confdefs.h"
4009 /* Override any gcc2 internal prototype to avoid an error.  */
4010 /* We use char because int might match the return type of a gcc2
4011     builtin and then its argument prototype would still apply.  */
4012 char resizeterm();
4013
4014 int main() {
4015 resizeterm()
4016 ; return 0; }
4017 EOF
4018 if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4019   rm -rf conftest*
4020   eval "ac_cv_lib_$ac_lib_var=yes"
4021 else
4022   echo "configure: failed program was:" >&5
4023   cat conftest.$ac_ext >&5
4024   rm -rf conftest*
4025   eval "ac_cv_lib_$ac_lib_var=no"
4026 fi
4027 rm -f conftest*
4028 LIBS="$ac_save_LIBS"
4029
4030 fi
4031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4032   echo "$ac_t""yes" 1>&6
4033   cat >> confdefs.h <<\EOF
4034 #define HAVE_RESIZETERM 1
4035 EOF
4036
4037 else
4038   echo "$ac_t""no" 1>&6
4039 fi
4040
4041         echo $ac_n "checking for getbkgd in -lncurses""... $ac_c" 1>&6
4042 echo "configure:4043: checking for getbkgd in -lncurses" >&5
4043 ac_lib_var=`echo ncurses'_'getbkgd | sed 'y%./+-%__p_%'`
4044 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4045   echo $ac_n "(cached) $ac_c" 1>&6
4046 else
4047   ac_save_LIBS="$LIBS"
4048 LIBS="-lncurses  $LIBS"
4049 cat > conftest.$ac_ext <<EOF
4050 #line 4051 "configure"
4051 #include "confdefs.h"
4052 /* Override any gcc2 internal prototype to avoid an error.  */
4053 /* We use char because int might match the return type of a gcc2
4054     builtin and then its argument prototype would still apply.  */
4055 char getbkgd();
4056
4057 int main() {
4058 getbkgd()
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4062   rm -rf conftest*
4063   eval "ac_cv_lib_$ac_lib_var=yes"
4064 else
4065   echo "configure: failed program was:" >&5
4066   cat conftest.$ac_ext >&5
4067   rm -rf conftest*
4068   eval "ac_cv_lib_$ac_lib_var=no"
4069 fi
4070 rm -f conftest*
4071 LIBS="$ac_save_LIBS"
4072
4073 fi
4074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4075   echo "$ac_t""yes" 1>&6
4076   cat >> confdefs.h <<\EOF
4077 #define HAVE_GETBKGD 1
4078 EOF
4079
4080 else
4081   echo "$ac_t""no" 1>&6
4082 fi
4083
4084     else
4085         for ac_hdr in curses.h
4086 do
4087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4089 echo "configure:4090: checking for $ac_hdr" >&5
4090 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4091   echo $ac_n "(cached) $ac_c" 1>&6
4092 else
4093   cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.h"
4096 #include <$ac_hdr>
4097 EOF
4098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4099 { (eval echo configure:4100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4101 if test -z "$ac_err"; then
4102   rm -rf conftest*
4103   eval "ac_cv_header_$ac_safe=yes"
4104 else
4105   echo "$ac_err" >&5
4106   echo "configure: failed program was:" >&5
4107   cat conftest.$ac_ext >&5
4108   rm -rf conftest*
4109   eval "ac_cv_header_$ac_safe=no"
4110 fi
4111 rm -f conftest*
4112 fi
4113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4114   echo "$ac_t""yes" 1>&6
4115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4116   cat >> confdefs.h <<EOF
4117 #define $ac_tr_hdr 1
4118 EOF
4119  
4120 else
4121   echo "$ac_t""no" 1>&6
4122 fi
4123 done
4124
4125         if test "$ac_cv_header_curses_h" = "yes"
4126         then    
4127             echo $ac_n "checking for waddch in -lcurses""... $ac_c" 1>&6
4128 echo "configure:4129: checking for waddch in -lcurses" >&5
4129 ac_lib_var=`echo curses'_'waddch | sed 'y%./+-%__p_%'`
4130 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4131   echo $ac_n "(cached) $ac_c" 1>&6
4132 else
4133   ac_save_LIBS="$LIBS"
4134 LIBS="-lcurses  $LIBS"
4135 cat > conftest.$ac_ext <<EOF
4136 #line 4137 "configure"
4137 #include "confdefs.h"
4138 /* Override any gcc2 internal prototype to avoid an error.  */
4139 /* We use char because int might match the return type of a gcc2
4140     builtin and then its argument prototype would still apply.  */
4141 char waddch();
4142
4143 int main() {
4144 waddch()
4145 ; return 0; }
4146 EOF
4147 if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4148   rm -rf conftest*
4149   eval "ac_cv_lib_$ac_lib_var=yes"
4150 else
4151   echo "configure: failed program was:" >&5
4152   cat conftest.$ac_ext >&5
4153   rm -rf conftest*
4154   eval "ac_cv_lib_$ac_lib_var=no"
4155 fi
4156 rm -f conftest*
4157 LIBS="$ac_save_LIBS"
4158
4159 fi
4160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4161   echo "$ac_t""yes" 1>&6
4162     ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4163     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4164   cat >> confdefs.h <<EOF
4165 #define $ac_tr_lib 1
4166 EOF
4167
4168   LIBS="-lcurses $LIBS"
4169
4170 else
4171   echo "$ac_t""no" 1>&6
4172 fi
4173
4174             if test "$ac_cv_lib_curses_waddch" = "yes"
4175             then
4176                 echo $ac_n "checking for resizeterm in -lcurses""... $ac_c" 1>&6
4177 echo "configure:4178: checking for resizeterm in -lcurses" >&5
4178 ac_lib_var=`echo curses'_'resizeterm | sed 'y%./+-%__p_%'`
4179 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4180   echo $ac_n "(cached) $ac_c" 1>&6
4181 else
4182   ac_save_LIBS="$LIBS"
4183 LIBS="-lcurses  $LIBS"
4184 cat > conftest.$ac_ext <<EOF
4185 #line 4186 "configure"
4186 #include "confdefs.h"
4187 /* Override any gcc2 internal prototype to avoid an error.  */
4188 /* We use char because int might match the return type of a gcc2
4189     builtin and then its argument prototype would still apply.  */
4190 char resizeterm();
4191
4192 int main() {
4193 resizeterm()
4194 ; return 0; }
4195 EOF
4196 if { (eval echo configure:4197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4197   rm -rf conftest*
4198   eval "ac_cv_lib_$ac_lib_var=yes"
4199 else
4200   echo "configure: failed program was:" >&5
4201   cat conftest.$ac_ext >&5
4202   rm -rf conftest*
4203   eval "ac_cv_lib_$ac_lib_var=no"
4204 fi
4205 rm -f conftest*
4206 LIBS="$ac_save_LIBS"
4207
4208 fi
4209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4210   echo "$ac_t""yes" 1>&6
4211   cat >> confdefs.h <<\EOF
4212 #define HAVE_RESIZETERM 1
4213 EOF
4214
4215 else
4216   echo "$ac_t""no" 1>&6
4217 fi
4218
4219                 echo $ac_n "checking for getbkgd in -lcurses""... $ac_c" 1>&6
4220 echo "configure:4221: checking for getbkgd in -lcurses" >&5
4221 ac_lib_var=`echo curses'_'getbkgd | sed 'y%./+-%__p_%'`
4222 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4223   echo $ac_n "(cached) $ac_c" 1>&6
4224 else
4225   ac_save_LIBS="$LIBS"
4226 LIBS="-lcurses  $LIBS"
4227 cat > conftest.$ac_ext <<EOF
4228 #line 4229 "configure"
4229 #include "confdefs.h"
4230 /* Override any gcc2 internal prototype to avoid an error.  */
4231 /* We use char because int might match the return type of a gcc2
4232     builtin and then its argument prototype would still apply.  */
4233 char getbkgd();
4234
4235 int main() {
4236 getbkgd()
4237 ; return 0; }
4238 EOF
4239 if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4240   rm -rf conftest*
4241   eval "ac_cv_lib_$ac_lib_var=yes"
4242 else
4243   echo "configure: failed program was:" >&5
4244   cat conftest.$ac_ext >&5
4245   rm -rf conftest*
4246   eval "ac_cv_lib_$ac_lib_var=no"
4247 fi
4248 rm -f conftest*
4249 LIBS="$ac_save_LIBS"
4250
4251 fi
4252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4253   echo "$ac_t""yes" 1>&6
4254   cat >> confdefs.h <<\EOF
4255 #define HAVE_GETBKGD 1
4256 EOF
4257
4258 else
4259   echo "$ac_t""no" 1>&6
4260 fi
4261
4262             fi
4263         fi
4264     fi
4265 fi
4266
4267 echo $ac_n "checking "for GNU style IPX support"""... $ac_c" 1>&6
4268 echo "configure:4269: checking "for GNU style IPX support"" >&5
4269 if eval "test \"`echo '$''{'ac_cv_c_ipx_gnu'+set}'`\" = set"; then
4270   echo $ac_n "(cached) $ac_c" 1>&6
4271 else
4272   cat > conftest.$ac_ext <<EOF
4273 #line 4274 "configure"
4274 #include "confdefs.h"
4275 #include <sys/socket.h>
4276     #include <netipx/ipx.h>
4277 int main() {
4278 ((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
4279 ; return 0; }
4280 EOF
4281 if { (eval echo configure:4282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4282   rm -rf conftest*
4283   ac_cv_c_ipx_gnu="yes"
4284 else
4285   echo "configure: failed program was:" >&5
4286   cat conftest.$ac_ext >&5
4287   rm -rf conftest*
4288   ac_cv_c_ipx_gnu="no"
4289 fi
4290 rm -f conftest*
4291  
4292 fi
4293
4294 echo "$ac_t""$ac_cv_c_ipx_gnu" 1>&6
4295 if test "$ac_cv_c_ipx_gnu" = "yes"
4296 then
4297     cat >> confdefs.h <<\EOF
4298 #define HAVE_IPX_GNU 1
4299 EOF
4300
4301 fi
4302
4303 if test "$ac_cv_c_ipx_gnu" = "no"
4304 then
4305  echo $ac_n "checking "for linux style IPX support"""... $ac_c" 1>&6
4306 echo "configure:4307: checking "for linux style IPX support"" >&5
4307 if eval "test \"`echo '$''{'ac_cv_c_ipx_linux'+set}'`\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313 #include <sys/socket.h>
4314      #include <asm/types.h>
4315      #include <linux/ipx.h>
4316 int main() {
4317 ((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
4318 ; return 0; }
4319 EOF
4320 if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4321   rm -rf conftest*
4322   ac_cv_c_ipx_linux="yes"
4323 else
4324   echo "configure: failed program was:" >&5
4325   cat conftest.$ac_ext >&5
4326   rm -rf conftest*
4327   ac_cv_c_ipx_linux="no"
4328 fi
4329 rm -f conftest*
4330   
4331 fi
4332
4333 echo "$ac_t""$ac_cv_c_ipx_linux" 1>&6
4334   if test "$ac_cv_c_ipx_linux" = "yes"
4335   then
4336       cat >> confdefs.h <<\EOF
4337 #define HAVE_IPX_LINUX 1
4338 EOF
4339
4340   fi
4341 fi
4342
4343 for ac_hdr in sys/soundcard.h machine/soundcard.h soundcard.h
4344 do
4345 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4346 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4347 echo "configure:4348: checking for $ac_hdr" >&5
4348 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4349   echo $ac_n "(cached) $ac_c" 1>&6
4350 else
4351   cat > conftest.$ac_ext <<EOF
4352 #line 4353 "configure"
4353 #include "confdefs.h"
4354 #include <$ac_hdr>
4355 EOF
4356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4357 { (eval echo configure:4358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4359 if test -z "$ac_err"; then
4360   rm -rf conftest*
4361   eval "ac_cv_header_$ac_safe=yes"
4362 else
4363   echo "$ac_err" >&5
4364   echo "configure: failed program was:" >&5
4365   cat conftest.$ac_ext >&5
4366   rm -rf conftest*
4367   eval "ac_cv_header_$ac_safe=no"
4368 fi
4369 rm -f conftest*
4370 fi
4371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4372   echo "$ac_t""yes" 1>&6
4373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4374   cat >> confdefs.h <<EOF
4375 #define $ac_tr_hdr 1
4376 EOF
4377  break
4378 else
4379   echo "$ac_t""no" 1>&6
4380 fi
4381 done
4382
4383
4384 echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6
4385 echo "configure:4386: checking "for Open Sound System"" >&5
4386 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then
4387   echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389   cat > conftest.$ac_ext <<EOF
4390 #line 4391 "configure"
4391 #include "confdefs.h"
4392
4393         #if defined(HAVE_SYS_SOUNDCARD_H)
4394                 #include <sys/soundcard.h>
4395         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
4396                 #include <machine/soundcard.h>
4397         #elif defined(HAVE_SOUNDCARD_H)
4398                 #include <soundcard.h>
4399         #endif
4400         
4401 int main() {
4402
4403
4404 /* check for one of the Open Sound System specific SNDCTL_ defines */
4405 #if !defined(SNDCTL_DSP_STEREO)
4406 #error No open sound system
4407 #endif
4408
4409 ; return 0; }
4410 EOF
4411 if { (eval echo configure:4412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4412   rm -rf conftest*
4413   ac_cv_c_opensoundsystem="yes"
4414 else
4415   echo "configure: failed program was:" >&5
4416   cat conftest.$ac_ext >&5
4417   rm -rf conftest*
4418   ac_cv_c_opensoundsystem="no"
4419 fi
4420 rm -f conftest*
4421 fi
4422
4423 echo "$ac_t""$ac_cv_c_opensoundsystem" 1>&6
4424
4425 if test "$ac_cv_c_opensoundsystem" = "yes"
4426 then
4427     cat >> confdefs.h <<\EOF
4428 #define HAVE_OSS 1
4429 EOF
4430
4431 fi
4432
4433 echo $ac_n "checking "for Open Sound System/MIDI interface"""... $ac_c" 1>&6
4434 echo "configure:4435: checking "for Open Sound System/MIDI interface"" >&5
4435 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem_midi'+set}'`\" = set"; then
4436   echo $ac_n "(cached) $ac_c" 1>&6
4437 else
4438   cat > conftest.$ac_ext <<EOF
4439 #line 4440 "configure"
4440 #include "confdefs.h"
4441
4442         #if defined(HAVE_SYS_SOUNDCARD_H)
4443                 #include <sys/soundcard.h>
4444         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
4445                 #include <machine/soundcard.h>
4446         #elif defined(HAVE_SOUNDCARD_H)
4447                 #include <soundcard.h>
4448         #endif
4449         
4450 int main() {
4451
4452
4453 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
4454 #if !defined(SNDCTL_SEQ_SYNC)
4455 #error No open sound system MIDI interface
4456 #endif
4457
4458 ; return 0; }
4459 EOF
4460 if { (eval echo configure:4461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4461   rm -rf conftest*
4462   ac_cv_c_opensoundsystem_midi="yes"
4463 else
4464   echo "configure: failed program was:" >&5
4465   cat conftest.$ac_ext >&5
4466   rm -rf conftest*
4467   ac_cv_c_opensoundsystem_midi="no"
4468 fi
4469 rm -f conftest*
4470 fi
4471
4472 echo "$ac_t""$ac_cv_c_opensoundsystem_midi" 1>&6
4473
4474 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
4475 then
4476     cat >> confdefs.h <<\EOF
4477 #define HAVE_OSS_MIDI 1
4478 EOF
4479
4480 fi
4481
4482 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
4483
4484
4485 if test "x${GCC}" = "xyes"
4486 then
4487   CFLAGS="$CFLAGS -Wall"
4488   echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
4489 echo "configure:4490: checking "for gcc strength-reduce bug"" >&5
4490 if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
4491   echo $ac_n "(cached) $ac_c" 1>&6
4492 else
4493   if test "$cross_compiling" = yes; then
4494   ac_cv_c_gcc_strength_bug="yes"
4495 else
4496   cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499
4500 int     L[4] = {0,1,2,3};
4501 int main(void) {
4502   static int Array[3];
4503   unsigned int B = 3;
4504   int i;
4505   for(i=0; i<B; i++) Array[i] = i - 3;
4506   for(i=0; i<4 - 1; i++) L[i] = L[i + 1];
4507   L[i] = 4;
4508   
4509   exit( Array[1] != -2 || L[2] != 3);
4510 }
4511 EOF
4512 if { (eval echo configure:4513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4513 then
4514   ac_cv_c_gcc_strength_bug="no"
4515 else
4516   echo "configure: failed program was:" >&5
4517   cat conftest.$ac_ext >&5
4518   rm -fr conftest*
4519   ac_cv_c_gcc_strength_bug="yes"
4520 fi
4521 rm -fr conftest*
4522 fi
4523  
4524 fi
4525
4526 echo "$ac_t""$ac_cv_c_gcc_strength_bug" 1>&6
4527   if test "$ac_cv_c_gcc_strength_bug" = "yes"
4528   then
4529     CFLAGS="$CFLAGS -fno-strength-reduce"
4530   fi
4531 fi
4532
4533
4534 echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6
4535 echo "configure:4536: checking "whether external symbols need an underscore prefix"" >&5
4536 if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then
4537   echo $ac_n "(cached) $ac_c" 1>&6
4538 else
4539   saved_libs=$LIBS
4540 LIBS="conftest_asm.s $LIBS"
4541 cat > conftest_asm.s <<EOF
4542         .globl _ac_test
4543 _ac_test:
4544         .long 0
4545 EOF
4546 cat > conftest.$ac_ext <<EOF
4547 #line 4548 "configure"
4548 #include "confdefs.h"
4549 extern int ac_test;
4550 int main() {
4551 if (ac_test) return 1
4552 ; return 0; }
4553 EOF
4554 if { (eval echo configure:4555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4555   rm -rf conftest*
4556   ac_cv_c_extern_prefix="yes"
4557 else
4558   echo "configure: failed program was:" >&5
4559   cat conftest.$ac_ext >&5
4560   rm -rf conftest*
4561   ac_cv_c_extern_prefix="no"
4562 fi
4563 rm -f conftest*
4564 LIBS=$saved_libs
4565 fi
4566
4567 echo "$ac_t""$ac_cv_c_extern_prefix" 1>&6
4568 if test "$ac_cv_c_extern_prefix" = "yes"
4569 then
4570   cat >> confdefs.h <<\EOF
4571 #define NEED_UNDERSCORE_PREFIX 1
4572 EOF
4573
4574 fi
4575
4576
4577 echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6
4578 echo "configure:4579: checking "whether assembler accepts .string"" >&5
4579 if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   saved_libs=$LIBS
4583 LIBS="conftest_asm.s $LIBS"
4584 cat > conftest_asm.s <<EOF
4585         .string "test"
4586 EOF
4587 cat > conftest.$ac_ext <<EOF
4588 #line 4589 "configure"
4589 #include "confdefs.h"
4590
4591 int main() {
4592
4593 ; return 0; }
4594 EOF
4595 if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4596   rm -rf conftest*
4597   ac_cv_c_asm_string="yes"
4598 else
4599   echo "configure: failed program was:" >&5
4600   cat conftest.$ac_ext >&5
4601   rm -rf conftest*
4602   ac_cv_c_asm_string="no"
4603 fi
4604 rm -f conftest*
4605 LIBS=$saved_libs
4606 fi
4607
4608 echo "$ac_t""$ac_cv_c_asm_string" 1>&6
4609 if test "$ac_cv_c_asm_string" = "yes"
4610 then
4611   cat >> confdefs.h <<\EOF
4612 #define HAVE_ASM_STRING 1
4613 EOF
4614
4615 fi
4616
4617
4618 LDSHARED=""
4619 LDDLLFLAGS=""
4620 if test "$LIBEXT" = "so"
4621 then
4622   echo $ac_n "checking "whether we can build a Linux dll"""... $ac_c" 1>&6
4623 echo "configure:4624: checking "whether we can build a Linux dll"" >&5
4624 if eval "test \"`echo '$''{'ac_cv_c_dll_linux'+set}'`\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627   saved_cflags=$CFLAGS
4628   CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
4629   cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632
4633 int main() {
4634 return 1
4635 ; return 0; }
4636 EOF
4637 if { (eval echo configure:4638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4638   rm -rf conftest*
4639   ac_cv_c_dll_linux="yes"
4640 else
4641   echo "configure: failed program was:" >&5
4642   cat conftest.$ac_ext >&5
4643   rm -rf conftest*
4644   ac_cv_c_dll_linux="no"
4645 fi
4646 rm -f conftest*
4647   CFLAGS=$saved_cflags
4648   
4649 fi
4650
4651 echo "$ac_t""$ac_cv_c_dll_linux" 1>&6
4652   if test "$ac_cv_c_dll_linux" = "yes"
4653   then
4654     LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%) -Wl,-rpath,\$(libdir)"
4655     LDDLLFLAGS="-Wl,-Bsymbolic"
4656   else
4657     echo $ac_n "checking whether we can build a UnixWare (Solaris) dll""... $ac_c" 1>&6
4658 echo "configure:4659: checking whether we can build a UnixWare (Solaris) dll" >&5
4659 if eval "test \"`echo '$''{'ac_cv_c_dll_unixware'+set}'`\" = set"; then
4660   echo $ac_n "(cached) $ac_c" 1>&6
4661 else
4662   saved_cflags=$CFLAGS
4663     CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
4664     cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4667
4668 int main() {
4669 return 1
4670 ; return 0; }
4671 EOF
4672 if { (eval echo configure:4673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4673   rm -rf conftest*
4674   ac_cv_c_dll_unixware="yes"
4675 else
4676   echo "configure: failed program was:" >&5
4677   cat conftest.$ac_ext >&5
4678   rm -rf conftest*
4679   ac_cv_c_dll_unixware="no"
4680 fi
4681 rm -f conftest*
4682     CFLAGS=$saved_cflags
4683     
4684 fi
4685
4686 echo "$ac_t""$ac_cv_c_dll_unixware" 1>&6
4687     if test "$ac_cv_c_dll_unixware" = "yes"
4688     then
4689       LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,h,\$(libdir)/%)"
4690       LDDLLFLAGS="-Wl,-B,symbolic"
4691     else
4692       echo $ac_n "checking "whether we can build a NetBSD dll"""... $ac_c" 1>&6
4693 echo "configure:4694: checking "whether we can build a NetBSD dll"" >&5
4694 if eval "test \"`echo '$''{'ac_cv_c_dll_netbsd'+set}'`\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   saved_cflags=$CFLAGS
4698       CFLAGS="$CFLAGS -fPIC -Wl,-Bshareable,-Bforcearchive"
4699       cat > conftest.$ac_ext <<EOF
4700 #line 4701 "configure"
4701 #include "confdefs.h"
4702
4703 int main() {
4704 return 1
4705 ; return 0; }
4706 EOF
4707 if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4708   rm -rf conftest*
4709   ac_cv_c_dll_netbsd="yes"
4710 else
4711   echo "configure: failed program was:" >&5
4712   cat conftest.$ac_ext >&5
4713   rm -rf conftest*
4714   ac_cv_c_dll_netbsd="no"
4715 fi
4716 rm -f conftest*
4717       CFLAGS=$saved_cflags
4718       
4719 fi
4720
4721 echo "$ac_t""$ac_cv_c_dll_netbsd" 1>&6
4722       if test "$ac_cv_c_dll_netbsd" = "yes"
4723       then
4724         LDSHARED="\$(CC) -Wl,-Bshareable,-Bforcearchive"
4725         LDDLLFLAGS="" #FIXME
4726       fi
4727     fi
4728   fi
4729   if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
4730   then
4731     echo "*** It is currently not possible to build WINE without shared"
4732     echo "*** library (.so) support to allow transparent switch between .so"
4733     echo "*** and .dll files."
4734     echo "*** If you are using Linux, you will need a newer binutils."
4735     exit 1
4736   fi
4737 fi
4738
4739 DLLFLAGS=""
4740
4741 if test "$LIBEXT" = "so"; then
4742     DLLFLAGS="-fPIC"
4743     DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) -L\$(TOPOBJDIR) -lwine -lwine_unicode"
4744 else
4745     DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine -lwine_unicode \$(X_LIBS) \$(XLIB)"
4746     echo $ac_n "checking whether the linker supports --[no]-whole-archive (Linux)""... $ac_c" 1>&6
4747 echo "configure:4748: checking whether the linker supports --[no]-whole-archive (Linux)" >&5
4748 if eval "test \"`echo '$''{'ac_cv_c_whole_archive'+set}'`\" = set"; then
4749   echo $ac_n "(cached) $ac_c" 1>&6
4750 else
4751   saved_cflags=$CFLAGS
4752             CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
4753             cat > conftest.$ac_ext <<EOF
4754 #line 4755 "configure"
4755 #include "confdefs.h"
4756
4757 int main() {
4758 return 1
4759 ; return 0; }
4760 EOF
4761 if { (eval echo configure:4762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4762   rm -rf conftest*
4763   ac_cv_c_whole_archive="yes"
4764 else
4765   echo "configure: failed program was:" >&5
4766   cat conftest.$ac_ext >&5
4767   rm -rf conftest*
4768   ac_cv_c_whole_archive="no"
4769 fi
4770 rm -f conftest*
4771             CFLAGS=$saved_cflags
4772             
4773 fi
4774
4775 echo "$ac_t""$ac_cv_c_whole_archive" 1>&6
4776     if test "$ac_cv_c_whole_archive" = "yes"
4777     then
4778         DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
4779     else
4780         echo $ac_n "checking whether the linker supports -z {all,default}extract (Linux)""... $ac_c" 1>&6
4781 echo "configure:4782: checking whether the linker supports -z {all,default}extract (Linux)" >&5
4782 if eval "test \"`echo '$''{'ac_cv_c_allextract'+set}'`\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   saved_cflags=$CFLAGS
4786                 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
4787                 cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790
4791 int main() {
4792 return 1
4793 ; return 0; }
4794 EOF
4795 if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4796   rm -rf conftest*
4797   ac_cv_c_allextract="yes"
4798 else
4799   echo "configure: failed program was:" >&5
4800   cat conftest.$ac_ext >&5
4801   rm -rf conftest*
4802   ac_cv_c_allextract="no"
4803 fi
4804 rm -f conftest*
4805                 CFLAGS=$saved_cflags
4806                 
4807 fi
4808
4809 echo "$ac_t""$ac_cv_c_allextract" 1>&6
4810         if test "$ac_cv_c_allextract" = "yes"
4811         then
4812             DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
4813         fi
4814     fi
4815 fi
4816
4817
4818
4819
4820
4821
4822
4823
4824 wine_cv_libc_reentrant=no 
4825 echo $ac_n "checking "for reentrant libc: __errno_location"""... $ac_c" 1>&6
4826 echo "configure:4827: checking "for reentrant libc: __errno_location"" >&5
4827 if eval "test \"`echo '$''{'wine_cv_libc_r__errno_location'+set}'`\" = set"; then
4828   echo $ac_n "(cached) $ac_c" 1>&6
4829 else
4830   if test "$cross_compiling" = yes; then
4831   wine_cv_libc_r__errno_location=yes 
4832 else
4833   cat > conftest.$ac_ext <<EOF
4834 #line 4835 "configure"
4835 #include "confdefs.h"
4836 int myerrno = 0;
4837 char buf[256];
4838 int *__errno_location(){return &myerrno;}
4839 main(){connect(0,buf,255); exit(!myerrno);}
4840 EOF
4841 if { (eval echo configure:4842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4842 then
4843   wine_cv_libc_r__errno_location=yes
4844 else
4845   echo "configure: failed program was:" >&5
4846   cat conftest.$ac_ext >&5
4847   rm -fr conftest*
4848   wine_cv_libc_r__errno_location=no
4849 fi
4850 rm -fr conftest*
4851 fi
4852
4853
4854 fi
4855
4856 echo "$ac_t""$wine_cv_libc_r__errno_location" 1>&6
4857 if test "$wine_cv_libc_r__errno_location" = "yes"
4858 then
4859     cat >> confdefs.h <<\EOF
4860 #define HAVE__ERRNO_LOCATION 1
4861 EOF
4862
4863     wine_cv_libc_reentrant=__errno_location 
4864 fi
4865 echo $ac_n "checking "for reentrant libc: __error"""... $ac_c" 1>&6
4866 echo "configure:4867: checking "for reentrant libc: __error"" >&5
4867 if eval "test \"`echo '$''{'wine_cv_libc_r__error'+set}'`\" = set"; then
4868   echo $ac_n "(cached) $ac_c" 1>&6
4869 else
4870   if test "$cross_compiling" = yes; then
4871   wine_cv_libc_r__error=yes 
4872 else
4873   cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876 int myerrno = 0;
4877 char buf[256];
4878 int *__error(){return &myerrno;}
4879 main(){connect(0,buf,255); exit(!myerrno);}
4880 EOF
4881 if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4882 then
4883   wine_cv_libc_r__error=yes
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -fr conftest*
4888   wine_cv_libc_r__error=no
4889 fi
4890 rm -fr conftest*
4891 fi
4892
4893
4894 fi
4895
4896 echo "$ac_t""$wine_cv_libc_r__error" 1>&6
4897 if test "$wine_cv_libc_r__error" = "yes"
4898 then
4899     cat >> confdefs.h <<\EOF
4900 #define HAVE__ERROR 1
4901 EOF
4902
4903     wine_cv_libc_reentrant=__error 
4904 fi
4905 echo $ac_n "checking "for reentrant libc: ___errno"""... $ac_c" 1>&6
4906 echo "configure:4907: checking "for reentrant libc: ___errno"" >&5
4907 if eval "test \"`echo '$''{'wine_cv_libc_r___errno'+set}'`\" = set"; then
4908   echo $ac_n "(cached) $ac_c" 1>&6
4909 else
4910   if test "$cross_compiling" = yes; then
4911   wine_cv_libc_r___errno=yes 
4912 else
4913   cat > conftest.$ac_ext <<EOF
4914 #line 4915 "configure"
4915 #include "confdefs.h"
4916 int myerrno = 0;
4917 char buf[256];
4918 int *___errno(){return &myerrno;}
4919 main(){connect(0,buf,255); exit(!myerrno);}
4920 EOF
4921 if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4922 then
4923   wine_cv_libc_r___errno=yes
4924 else
4925   echo "configure: failed program was:" >&5
4926   cat conftest.$ac_ext >&5
4927   rm -fr conftest*
4928   wine_cv_libc_r___errno=no
4929 fi
4930 rm -fr conftest*
4931 fi
4932
4933
4934 fi
4935
4936 echo "$ac_t""$wine_cv_libc_r___errno" 1>&6
4937 if test "$wine_cv_libc_r___errno" = "yes"
4938 then
4939     cat >> confdefs.h <<\EOF
4940 #define HAVE___ERRNO 1
4941 EOF
4942
4943     wine_cv_libc_reentrant=___errno 
4944 fi
4945 echo $ac_n "checking "for reentrant libc: __thr_errno"""... $ac_c" 1>&6
4946 echo "configure:4947: checking "for reentrant libc: __thr_errno"" >&5
4947 if eval "test \"`echo '$''{'wine_cv_libc_r__thr_errno'+set}'`\" = set"; then
4948   echo $ac_n "(cached) $ac_c" 1>&6
4949 else
4950   if test "$cross_compiling" = yes; then
4951   wine_cv_libc_r__thr_errno=yes 
4952 else
4953   cat > conftest.$ac_ext <<EOF
4954 #line 4955 "configure"
4955 #include "confdefs.h"
4956 int myerrno = 0;
4957 char buf[256];
4958 int *__thr_errno(){return &myerrno;}
4959 main(){connect(0,buf,255); exit(!myerrno);}
4960 EOF
4961 if { (eval echo configure:4962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4962 then
4963   wine_cv_libc_r__thr_errno=yes
4964 else
4965   echo "configure: failed program was:" >&5
4966   cat conftest.$ac_ext >&5
4967   rm -fr conftest*
4968   wine_cv_libc_r__thr_errno=no
4969 fi
4970 rm -fr conftest*
4971 fi
4972
4973
4974 fi
4975
4976 echo "$ac_t""$wine_cv_libc_r__thr_errno" 1>&6
4977 if test "$wine_cv_libc_r__thr_errno" = "yes"
4978 then
4979     cat >> confdefs.h <<\EOF
4980 #define HAVE__THR_ERRNO 1
4981 EOF
4982
4983     wine_cv_libc_reentrant=__thr_errno 
4984 fi
4985 if test "$wine_cv_libc_reentrant" = "no" 
4986 then
4987   cat >> confdefs.h <<\EOF
4988 #define NO_REENTRANT_LIBC 1
4989 EOF
4990
4991 fi
4992
4993
4994 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
4995 then
4996 echo $ac_n "checking "for reentrant X libraries"""... $ac_c" 1>&6
4997 echo "configure:4998: checking "for reentrant X libraries"" >&5
4998 if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then
4999   echo $ac_n "(cached) $ac_c" 1>&6
5000 else
5001    if test "x$with_reentrant_x" = "xno" 
5002     then
5003         wine_cv_x_reentrant=no
5004     else
5005         libX11_check=none
5006         for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
5007             if test -r $dir/libX11.so; then
5008                 libX11_check="-D $dir/libX11.so"
5009                 break 1
5010             fi
5011             if test -r $dir/libX11.a; then
5012                 libX11_check="$dir/libX11.a"
5013                 break 1
5014             fi
5015         done
5016         if test "$libX11_check" != "none"; then
5017             if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
5018             then
5019                 wine_cv_x_reentrant=yes
5020             else
5021                 wine_cv_x_reentrant=no
5022             fi
5023         else
5024             wine_cv_x_reentrant=unknown
5025         fi
5026     fi  
5027 fi
5028
5029 echo "$ac_t""$wine_cv_x_reentrant" 1>&6
5030 else
5031     wine_cv_x_reentrant=no
5032 fi
5033 if test "$wine_cv_x_reentrant" = "no"
5034 then
5035   cat >> confdefs.h <<\EOF
5036 #define NO_REENTRANT_X11 1
5037 EOF
5038
5039 fi
5040
5041
5042 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
5043 echo "configure:5044: checking whether byte ordering is bigendian" >&5
5044 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
5045   echo $ac_n "(cached) $ac_c" 1>&6
5046 else
5047   ac_cv_c_bigendian=unknown
5048 # See if sys/param.h defines the BYTE_ORDER macro.
5049 cat > conftest.$ac_ext <<EOF
5050 #line 5051 "configure"
5051 #include "confdefs.h"
5052 #include <sys/types.h>
5053 #include <sys/param.h>
5054 int main() {
5055
5056 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5057  bogus endian macros
5058 #endif
5059 ; return 0; }
5060 EOF
5061 if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5062   rm -rf conftest*
5063   # It does; now see whether it defined to BIG_ENDIAN or not.
5064 cat > conftest.$ac_ext <<EOF
5065 #line 5066 "configure"
5066 #include "confdefs.h"
5067 #include <sys/types.h>
5068 #include <sys/param.h>
5069 int main() {
5070
5071 #if BYTE_ORDER != BIG_ENDIAN
5072  not big endian
5073 #endif
5074 ; return 0; }
5075 EOF
5076 if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5077   rm -rf conftest*
5078   ac_cv_c_bigendian=yes
5079 else
5080   echo "configure: failed program was:" >&5
5081   cat conftest.$ac_ext >&5
5082   rm -rf conftest*
5083   ac_cv_c_bigendian=no
5084 fi
5085 rm -f conftest*
5086 else
5087   echo "configure: failed program was:" >&5
5088   cat conftest.$ac_ext >&5
5089 fi
5090 rm -f conftest*
5091 if test $ac_cv_c_bigendian = unknown; then
5092 if test "$cross_compiling" = yes; then
5093     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5094 else
5095   cat > conftest.$ac_ext <<EOF
5096 #line 5097 "configure"
5097 #include "confdefs.h"
5098 main () {
5099   /* Are we little or big endian?  From Harbison&Steele.  */
5100   union
5101   {
5102     long l;
5103     char c[sizeof (long)];
5104   } u;
5105   u.l = 1;
5106   exit (u.c[sizeof (long) - 1] == 1);
5107 }
5108 EOF
5109 if { (eval echo configure:5110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5110 then
5111   ac_cv_c_bigendian=no
5112 else
5113   echo "configure: failed program was:" >&5
5114   cat conftest.$ac_ext >&5
5115   rm -fr conftest*
5116   ac_cv_c_bigendian=yes
5117 fi
5118 rm -fr conftest*
5119 fi
5120
5121 fi
5122 fi
5123
5124 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5125 if test $ac_cv_c_bigendian = yes; then
5126   cat >> confdefs.h <<\EOF
5127 #define WORDS_BIGENDIAN 1
5128 EOF
5129
5130 fi
5131
5132
5133
5134 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5135 # for constant arguments.  Useless!
5136 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5137 echo "configure:5138: checking for working alloca.h" >&5
5138 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5139   echo $ac_n "(cached) $ac_c" 1>&6
5140 else
5141   cat > conftest.$ac_ext <<EOF
5142 #line 5143 "configure"
5143 #include "confdefs.h"
5144 #include <alloca.h>
5145 int main() {
5146 void *p = alloca(2 * sizeof(int));
5147 ; return 0; }
5148 EOF
5149 if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5150   rm -rf conftest*
5151   ac_cv_header_alloca_h=yes
5152 else
5153   echo "configure: failed program was:" >&5
5154   cat conftest.$ac_ext >&5
5155   rm -rf conftest*
5156   ac_cv_header_alloca_h=no
5157 fi
5158 rm -f conftest*
5159 fi
5160
5161 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5162 if test $ac_cv_header_alloca_h = yes; then
5163   cat >> confdefs.h <<\EOF
5164 #define HAVE_ALLOCA_H 1
5165 EOF
5166
5167 fi
5168
5169 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5170 echo "configure:5171: checking for alloca" >&5
5171 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5172   echo $ac_n "(cached) $ac_c" 1>&6
5173 else
5174   cat > conftest.$ac_ext <<EOF
5175 #line 5176 "configure"
5176 #include "confdefs.h"
5177
5178 #ifdef __GNUC__
5179 # define alloca __builtin_alloca
5180 #else
5181 # ifdef _MSC_VER
5182 #  include <malloc.h>
5183 #  define alloca _alloca
5184 # else
5185 #  if HAVE_ALLOCA_H
5186 #   include <alloca.h>
5187 #  else
5188 #   ifdef _AIX
5189  #pragma alloca
5190 #   else
5191 #    ifndef alloca /* predefined by HP cc +Olibcalls */
5192 char *alloca ();
5193 #    endif
5194 #   endif
5195 #  endif
5196 # endif
5197 #endif
5198
5199 int main() {
5200 char *p = (char *) alloca(1);
5201 ; return 0; }
5202 EOF
5203 if { (eval echo configure:5204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5204   rm -rf conftest*
5205   ac_cv_func_alloca_works=yes
5206 else
5207   echo "configure: failed program was:" >&5
5208   cat conftest.$ac_ext >&5
5209   rm -rf conftest*
5210   ac_cv_func_alloca_works=no
5211 fi
5212 rm -f conftest*
5213 fi
5214
5215 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5216 if test $ac_cv_func_alloca_works = yes; then
5217   cat >> confdefs.h <<\EOF
5218 #define HAVE_ALLOCA 1
5219 EOF
5220
5221 fi
5222
5223 if test $ac_cv_func_alloca_works = no; then
5224   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5225   # that cause trouble.  Some versions do not even contain alloca or
5226   # contain a buggy version.  If you still want to use their alloca,
5227   # use ar to extract alloca.o from them instead of compiling alloca.c.
5228   ALLOCA=alloca.${ac_objext}
5229   cat >> confdefs.h <<\EOF
5230 #define C_ALLOCA 1
5231 EOF
5232
5233
5234 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5235 echo "configure:5236: checking whether alloca needs Cray hooks" >&5
5236 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5237   echo $ac_n "(cached) $ac_c" 1>&6
5238 else
5239   cat > conftest.$ac_ext <<EOF
5240 #line 5241 "configure"
5241 #include "confdefs.h"
5242 #if defined(CRAY) && ! defined(CRAY2)
5243 webecray
5244 #else
5245 wenotbecray
5246 #endif
5247
5248 EOF
5249 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5250   egrep "webecray" >/dev/null 2>&1; then
5251   rm -rf conftest*
5252   ac_cv_os_cray=yes
5253 else
5254   rm -rf conftest*
5255   ac_cv_os_cray=no
5256 fi
5257 rm -f conftest*
5258
5259 fi
5260
5261 echo "$ac_t""$ac_cv_os_cray" 1>&6
5262 if test $ac_cv_os_cray = yes; then
5263 for ac_func in _getb67 GETB67 getb67; do
5264   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5265 echo "configure:5266: checking for $ac_func" >&5
5266 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5267   echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269   cat > conftest.$ac_ext <<EOF
5270 #line 5271 "configure"
5271 #include "confdefs.h"
5272 /* System header to define __stub macros and hopefully few prototypes,
5273     which can conflict with char $ac_func(); below.  */
5274 #include <assert.h>
5275 /* Override any gcc2 internal prototype to avoid an error.  */
5276 /* We use char because int might match the return type of a gcc2
5277     builtin and then its argument prototype would still apply.  */
5278 char $ac_func();
5279
5280 int main() {
5281
5282 /* The GNU C library defines this for functions which it implements
5283     to always fail with ENOSYS.  Some functions are actually named
5284     something starting with __ and the normal name is an alias.  */
5285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5286 choke me
5287 #else
5288 $ac_func();
5289 #endif
5290
5291 ; return 0; }
5292 EOF
5293 if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5294   rm -rf conftest*
5295   eval "ac_cv_func_$ac_func=yes"
5296 else
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299   rm -rf conftest*
5300   eval "ac_cv_func_$ac_func=no"
5301 fi
5302 rm -f conftest*
5303 fi
5304
5305 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5306   echo "$ac_t""yes" 1>&6
5307   cat >> confdefs.h <<EOF
5308 #define CRAY_STACKSEG_END $ac_func
5309 EOF
5310
5311   break
5312 else
5313   echo "$ac_t""no" 1>&6
5314 fi
5315
5316 done
5317 fi
5318
5319 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5320 echo "configure:5321: checking stack direction for C alloca" >&5
5321 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5322   echo $ac_n "(cached) $ac_c" 1>&6
5323 else
5324   if test "$cross_compiling" = yes; then
5325   ac_cv_c_stack_direction=0
5326 else
5327   cat > conftest.$ac_ext <<EOF
5328 #line 5329 "configure"
5329 #include "confdefs.h"
5330 find_stack_direction ()
5331 {
5332   static char *addr = 0;
5333   auto char dummy;
5334   if (addr == 0)
5335     {
5336       addr = &dummy;
5337       return find_stack_direction ();
5338     }
5339   else
5340     return (&dummy > addr) ? 1 : -1;
5341 }
5342 main ()
5343 {
5344   exit (find_stack_direction() < 0);
5345 }
5346 EOF
5347 if { (eval echo configure:5348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5348 then
5349   ac_cv_c_stack_direction=1
5350 else
5351   echo "configure: failed program was:" >&5
5352   cat conftest.$ac_ext >&5
5353   rm -fr conftest*
5354   ac_cv_c_stack_direction=-1
5355 fi
5356 rm -fr conftest*
5357 fi
5358
5359 fi
5360
5361 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5362 cat >> confdefs.h <<EOF
5363 #define STACK_DIRECTION $ac_cv_c_stack_direction
5364 EOF
5365
5366 fi
5367
5368 for ac_func in \
5369         __libc_fork \
5370         _lwp_create \
5371         clone \
5372         getnetbyaddr \
5373         getnetbyname \
5374         getpagesize \
5375         getprotobyname \
5376         getprotobynumber \
5377         getservbyport \
5378         getsockopt \
5379         inet_network \
5380         memmove \
5381         rfork \
5382         select \
5383         sendmsg \
5384         settimeofday \
5385         sigaltstack \
5386         statfs \
5387         strcasecmp \
5388         strerror \
5389         strncasecmp \
5390         tcgetattr \
5391         timegm \
5392         usleep \
5393         vfscanf \
5394         wait4 \
5395         waitpid \
5396
5397 do
5398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5399 echo "configure:5400: checking for $ac_func" >&5
5400 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5401   echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403   cat > conftest.$ac_ext <<EOF
5404 #line 5405 "configure"
5405 #include "confdefs.h"
5406 /* System header to define __stub macros and hopefully few prototypes,
5407     which can conflict with char $ac_func(); below.  */
5408 #include <assert.h>
5409 /* Override any gcc2 internal prototype to avoid an error.  */
5410 /* We use char because int might match the return type of a gcc2
5411     builtin and then its argument prototype would still apply.  */
5412 char $ac_func();
5413
5414 int main() {
5415
5416 /* The GNU C library defines this for functions which it implements
5417     to always fail with ENOSYS.  Some functions are actually named
5418     something starting with __ and the normal name is an alias.  */
5419 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5420 choke me
5421 #else
5422 $ac_func();
5423 #endif
5424
5425 ; return 0; }
5426 EOF
5427 if { (eval echo configure:5428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5428   rm -rf conftest*
5429   eval "ac_cv_func_$ac_func=yes"
5430 else
5431   echo "configure: failed program was:" >&5
5432   cat conftest.$ac_ext >&5
5433   rm -rf conftest*
5434   eval "ac_cv_func_$ac_func=no"
5435 fi
5436 rm -f conftest*
5437 fi
5438
5439 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5440   echo "$ac_t""yes" 1>&6
5441     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5442   cat >> confdefs.h <<EOF
5443 #define $ac_tr_func 1
5444 EOF
5445  
5446 else
5447   echo "$ac_t""no" 1>&6
5448 fi
5449 done
5450
5451
5452
5453 for ac_hdr in \
5454         a.out.h \
5455         a_out.h \
5456         arpa/inet.h \
5457         arpa/nameser.h \
5458         elf.h \
5459         float.h \
5460         libio.h \
5461         libutil.h \
5462         link.h \
5463         linux/cdrom.h \
5464         linux/joystick.h \
5465         linux/ucdrom.h \
5466         net/if.h \
5467         netinet/in.h \
5468         netinet/tcp.h \
5469         pty.h \
5470         resolv.h \
5471         sched.h \
5472         socket.h \
5473         strings.h \
5474         sys/cdio.h \
5475         sys/errno.h \
5476         sys/file.h \
5477         sys/filio.h \
5478         sys/ipc.h \
5479         sys/lwp.h \
5480         sys/mman.h \
5481         sys/modem.h \
5482         sys/mount.h \
5483         sys/msg.h \
5484         sys/param.h \
5485         sys/reg.h \
5486         sys/signal.h \
5487         sys/shm.h \
5488         sys/socket.h \
5489         sys/sockio.h \
5490         sys/statfs.h \
5491         sys/strtio.h \
5492         sys/syscall.h \
5493         sys/wait.h \
5494         sys/v86.h \
5495         sys/v86intr.h \
5496         sys/vfs.h \
5497         sys/vm86.h \
5498         syscall.h \
5499         ucontext.h
5500
5501 do
5502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5504 echo "configure:5505: checking for $ac_hdr" >&5
5505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5506   echo $ac_n "(cached) $ac_c" 1>&6
5507 else
5508   cat > conftest.$ac_ext <<EOF
5509 #line 5510 "configure"
5510 #include "confdefs.h"
5511 #include <$ac_hdr>
5512 EOF
5513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5514 { (eval echo configure:5515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5516 if test -z "$ac_err"; then
5517   rm -rf conftest*
5518   eval "ac_cv_header_$ac_safe=yes"
5519 else
5520   echo "$ac_err" >&5
5521   echo "configure: failed program was:" >&5
5522   cat conftest.$ac_ext >&5
5523   rm -rf conftest*
5524   eval "ac_cv_header_$ac_safe=no"
5525 fi
5526 rm -f conftest*
5527 fi
5528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5529   echo "$ac_t""yes" 1>&6
5530     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5531   cat >> confdefs.h <<EOF
5532 #define $ac_tr_hdr 1
5533 EOF
5534  
5535 else
5536   echo "$ac_t""no" 1>&6
5537 fi
5538 done
5539
5540 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
5541 echo "configure:5542: checking whether stat file-mode macros are broken" >&5
5542 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
5543   echo $ac_n "(cached) $ac_c" 1>&6
5544 else
5545   cat > conftest.$ac_ext <<EOF
5546 #line 5547 "configure"
5547 #include "confdefs.h"
5548 #include <sys/types.h>
5549 #include <sys/stat.h>
5550
5551 #if defined(S_ISBLK) && defined(S_IFDIR)
5552 # if S_ISBLK (S_IFDIR)
5553 You lose.
5554 # endif
5555 #endif
5556
5557 #if defined(S_ISBLK) && defined(S_IFCHR)
5558 # if S_ISBLK (S_IFCHR)
5559 You lose.
5560 # endif
5561 #endif
5562
5563 #if defined(S_ISLNK) && defined(S_IFREG)
5564 # if S_ISLNK (S_IFREG)
5565 You lose.
5566 # endif
5567 #endif
5568
5569 #if defined(S_ISSOCK) && defined(S_IFREG)
5570 # if S_ISSOCK (S_IFREG)
5571 You lose.
5572 # endif
5573 #endif
5574
5575 EOF
5576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5577   egrep "You lose" >/dev/null 2>&1; then
5578   rm -rf conftest*
5579   ac_cv_header_stat_broken=yes
5580 else
5581   rm -rf conftest*
5582   ac_cv_header_stat_broken=no
5583 fi
5584 rm -f conftest*
5585
5586 fi
5587
5588 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
5589 if test $ac_cv_header_stat_broken = yes; then
5590   cat >> confdefs.h <<\EOF
5591 #define STAT_MACROS_BROKEN 1
5592 EOF
5593
5594 fi
5595
5596
5597
5598 echo $ac_n "checking for working const""... $ac_c" 1>&6
5599 echo "configure:5600: checking for working const" >&5
5600 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5601   echo $ac_n "(cached) $ac_c" 1>&6
5602 else
5603   cat > conftest.$ac_ext <<EOF
5604 #line 5605 "configure"
5605 #include "confdefs.h"
5606
5607 int main() {
5608
5609 /* Ultrix mips cc rejects this.  */
5610 typedef int charset[2]; const charset x = {0,0};
5611 /* SunOS 4.1.1 cc rejects this.  */
5612 char const *const *ccp;
5613 char **p;
5614 /* NEC SVR4.0.2 mips cc rejects this.  */
5615 struct point {int x, y;};
5616 static struct point const zero = {0,0};
5617 /* AIX XL C 1.02.0.0 rejects this.
5618    It does not let you subtract one const X* pointer from another in an arm
5619    of an if-expression whose if-part is not a constant expression */
5620 const char *g = "string";
5621 ccp = &g + (g ? g-g : 0);
5622 /* HPUX 7.0 cc rejects these. */
5623 ++ccp;
5624 p = (char**) ccp;
5625 ccp = (char const *const *) p;
5626 { /* SCO 3.2v4 cc rejects this.  */
5627   char *t;
5628   char const *s = 0 ? (char *) 0 : (char const *) 0;
5629
5630   *t++ = 0;
5631 }
5632 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5633   int x[] = {25, 17};
5634   const int *foo = &x[0];
5635   ++foo;
5636 }
5637 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5638   typedef const int *iptr;
5639   iptr p = 0;
5640   ++p;
5641 }
5642 { /* AIX XL C 1.02.0.0 rejects this saying
5643      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5644   struct s { int j; const int *ap[3]; };
5645   struct s *b; b->j = 5;
5646 }
5647 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5648   const int foo = 10;
5649 }
5650
5651 ; return 0; }
5652 EOF
5653 if { (eval echo configure:5654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5654   rm -rf conftest*
5655   ac_cv_c_const=yes
5656 else
5657   echo "configure: failed program was:" >&5
5658   cat conftest.$ac_ext >&5
5659   rm -rf conftest*
5660   ac_cv_c_const=no
5661 fi
5662 rm -f conftest*
5663 fi
5664
5665 echo "$ac_t""$ac_cv_c_const" 1>&6
5666 if test $ac_cv_c_const = no; then
5667   cat >> confdefs.h <<\EOF
5668 #define const 
5669 EOF
5670
5671 fi
5672
5673 echo $ac_n "checking for inline""... $ac_c" 1>&6
5674 echo "configure:5675: checking for inline" >&5
5675 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5676   echo $ac_n "(cached) $ac_c" 1>&6
5677 else
5678   ac_cv_c_inline=no
5679 for ac_kw in inline __inline__ __inline; do
5680   cat > conftest.$ac_ext <<EOF
5681 #line 5682 "configure"
5682 #include "confdefs.h"
5683
5684 int main() {
5685 } int $ac_kw foo() {
5686 ; return 0; }
5687 EOF
5688 if { (eval echo configure:5689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5689   rm -rf conftest*
5690   ac_cv_c_inline=$ac_kw; break
5691 else
5692   echo "configure: failed program was:" >&5
5693   cat conftest.$ac_ext >&5
5694 fi
5695 rm -f conftest*
5696 done
5697
5698 fi
5699
5700 echo "$ac_t""$ac_cv_c_inline" 1>&6
5701 case "$ac_cv_c_inline" in
5702   inline | yes) ;;
5703   no) cat >> confdefs.h <<\EOF
5704 #define inline 
5705 EOF
5706  ;;
5707   *)  cat >> confdefs.h <<EOF
5708 #define inline $ac_cv_c_inline
5709 EOF
5710  ;;
5711 esac
5712
5713 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5714 echo "configure:5715: checking for ANSI C header files" >&5
5715 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5716   echo $ac_n "(cached) $ac_c" 1>&6
5717 else
5718   cat > conftest.$ac_ext <<EOF
5719 #line 5720 "configure"
5720 #include "confdefs.h"
5721 #include <stdlib.h>
5722 #include <stdarg.h>
5723 #include <string.h>
5724 #include <float.h>
5725 EOF
5726 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5727 { (eval echo configure:5728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5728 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5729 if test -z "$ac_err"; then
5730   rm -rf conftest*
5731   ac_cv_header_stdc=yes
5732 else
5733   echo "$ac_err" >&5
5734   echo "configure: failed program was:" >&5
5735   cat conftest.$ac_ext >&5
5736   rm -rf conftest*
5737   ac_cv_header_stdc=no
5738 fi
5739 rm -f conftest*
5740
5741 if test $ac_cv_header_stdc = yes; then
5742   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5743 cat > conftest.$ac_ext <<EOF
5744 #line 5745 "configure"
5745 #include "confdefs.h"
5746 #include <string.h>
5747 EOF
5748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5749   egrep "memchr" >/dev/null 2>&1; then
5750   :
5751 else
5752   rm -rf conftest*
5753   ac_cv_header_stdc=no
5754 fi
5755 rm -f conftest*
5756
5757 fi
5758
5759 if test $ac_cv_header_stdc = yes; then
5760   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5761 cat > conftest.$ac_ext <<EOF
5762 #line 5763 "configure"
5763 #include "confdefs.h"
5764 #include <stdlib.h>
5765 EOF
5766 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5767   egrep "free" >/dev/null 2>&1; then
5768   :
5769 else
5770   rm -rf conftest*
5771   ac_cv_header_stdc=no
5772 fi
5773 rm -f conftest*
5774
5775 fi
5776
5777 if test $ac_cv_header_stdc = yes; then
5778   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5779 if test "$cross_compiling" = yes; then
5780   :
5781 else
5782   cat > conftest.$ac_ext <<EOF
5783 #line 5784 "configure"
5784 #include "confdefs.h"
5785 #include <ctype.h>
5786 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5787 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5788 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5789 int main () { int i; for (i = 0; i < 256; i++)
5790 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5791 exit (0); }
5792
5793 EOF
5794 if { (eval echo configure:5795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5795 then
5796   :
5797 else
5798   echo "configure: failed program was:" >&5
5799   cat conftest.$ac_ext >&5
5800   rm -fr conftest*
5801   ac_cv_header_stdc=no
5802 fi
5803 rm -fr conftest*
5804 fi
5805
5806 fi
5807 fi
5808
5809 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5810 if test $ac_cv_header_stdc = yes; then
5811   cat >> confdefs.h <<\EOF
5812 #define STDC_HEADERS 1
5813 EOF
5814
5815 fi
5816
5817 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5818 echo "configure:5819: checking for size_t" >&5
5819 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5820   echo $ac_n "(cached) $ac_c" 1>&6
5821 else
5822   cat > conftest.$ac_ext <<EOF
5823 #line 5824 "configure"
5824 #include "confdefs.h"
5825 #include <sys/types.h>
5826 #if STDC_HEADERS
5827 #include <stdlib.h>
5828 #include <stddef.h>
5829 #endif
5830 EOF
5831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5832   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5833   rm -rf conftest*
5834   ac_cv_type_size_t=yes
5835 else
5836   rm -rf conftest*
5837   ac_cv_type_size_t=no
5838 fi
5839 rm -f conftest*
5840
5841 fi
5842 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5843 if test $ac_cv_type_size_t = no; then
5844   cat >> confdefs.h <<\EOF
5845 #define size_t unsigned
5846 EOF
5847
5848 fi
5849
5850 echo $ac_n "checking size of long long""... $ac_c" 1>&6
5851 echo "configure:5852: checking size of long long" >&5
5852 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
5853   echo $ac_n "(cached) $ac_c" 1>&6
5854 else
5855   if test "$cross_compiling" = yes; then
5856   ac_cv_sizeof_long_long=0
5857 else
5858   cat > conftest.$ac_ext <<EOF
5859 #line 5860 "configure"
5860 #include "confdefs.h"
5861 #include <stdio.h>
5862 main()
5863 {
5864   FILE *f=fopen("conftestval", "w");
5865   if (!f) exit(1);
5866   fprintf(f, "%d\n", sizeof(long long));
5867   exit(0);
5868 }
5869 EOF
5870 if { (eval echo configure:5871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5871 then
5872   ac_cv_sizeof_long_long=`cat conftestval`
5873 else
5874   echo "configure: failed program was:" >&5
5875   cat conftest.$ac_ext >&5
5876   rm -fr conftest*
5877   ac_cv_sizeof_long_long=0
5878 fi
5879 rm -fr conftest*
5880 fi
5881
5882 fi
5883 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
5884 cat >> confdefs.h <<EOF
5885 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5886 EOF
5887
5888
5889
5890    
5891 echo $ac_n "checking "whether we can use re-entrant gethostbyname_r Linux style"""... $ac_c" 1>&6
5892 echo "configure:5893: checking "whether we can use re-entrant gethostbyname_r Linux style"" >&5
5893 if eval "test \"`echo '$''{'wine_cv_linux_gethostbyname_r_6'+set}'`\" = set"; then
5894   echo $ac_n "(cached) $ac_c" 1>&6
5895 else
5896   cat > conftest.$ac_ext <<EOF
5897 #line 5898 "configure"
5898 #include "confdefs.h"
5899
5900 #include <netdb.h>
5901         
5902 int main() {
5903
5904     char *name=NULL;
5905     struct hostent he;
5906     struct hostent *result;
5907     char *buf=NULL;
5908     int bufsize=0;
5909     int res,errnr;
5910     char *addr=NULL;
5911     int addrlen=0;
5912     int addrtype=0;
5913     res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
5914     res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
5915     
5916 ; return 0; }
5917 EOF
5918 if { (eval echo configure:5919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5919   rm -rf conftest*
5920   wine_cv_linux_gethostbyname_r_6=yes
5921 else
5922   echo "configure: failed program was:" >&5
5923   cat conftest.$ac_ext >&5
5924   rm -rf conftest*
5925   wine_cv_linux_gethostbyname_r_6=no
5926         
5927 fi
5928 rm -f conftest*
5929    
5930 fi
5931
5932 echo "$ac_t""$wine_cv_linux_gethostbyname_r_6" 1>&6
5933    if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
5934    then
5935       cat >> confdefs.h <<\EOF
5936 #define HAVE_LINUX_GETHOSTBYNAME_R_6 1
5937 EOF
5938
5939    fi
5940
5941 if test "$ac_cv_header_linux_joystick_h" = "yes"
5942 then
5943    echo $ac_n "checking "whether linux/joystick.h uses the Linux 2.2+ API"""... $ac_c" 1>&6
5944 echo "configure:5945: checking "whether linux/joystick.h uses the Linux 2.2+ API"" >&5
5945 if eval "test \"`echo '$''{'wine_cv_linux_joystick_22_api'+set}'`\" = set"; then
5946   echo $ac_n "(cached) $ac_c" 1>&6
5947 else
5948   cat > conftest.$ac_ext <<EOF
5949 #line 5950 "configure"
5950 #include "confdefs.h"
5951
5952         #include <sys/ioctl.h>
5953         #include <linux/joystick.h>
5954
5955         struct js_event blub;
5956         #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
5957         #error "no 2.2 header"
5958         #endif
5959         
5960 int main() {
5961 /*empty*/
5962 ; return 0; }
5963 EOF
5964 if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5965   rm -rf conftest*
5966   wine_cv_linux_joystick_22_api=yes
5967 else
5968   echo "configure: failed program was:" >&5
5969   cat conftest.$ac_ext >&5
5970   rm -rf conftest*
5971   wine_cv_linux_joystick_22_api=no
5972 fi
5973 rm -f conftest*
5974    
5975 fi
5976
5977 echo "$ac_t""$wine_cv_linux_joystick_22_api" 1>&6
5978    if test "$wine_cv_linux_joystick_22_api" = "yes"
5979    then
5980       cat >> confdefs.h <<\EOF
5981 #define HAVE_LINUX_22_JOYSTICK_API 1
5982 EOF
5983
5984    fi
5985 fi
5986
5987
5988 if test "$ac_cv_header_sys_vfs_h" = "yes"
5989 then
5990     echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6
5991 echo "configure:5992: checking "whether sys/vfs.h defines statfs"" >&5
5992 if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then
5993   echo $ac_n "(cached) $ac_c" 1>&6
5994 else
5995   cat > conftest.$ac_ext <<EOF
5996 #line 5997 "configure"
5997 #include "confdefs.h"
5998
5999         #include <sys/types.h>
6000         #ifdef HAVE_SYS_PARAM_H
6001         # include <sys/param.h>
6002         #endif
6003         #include <sys/vfs.h>
6004         
6005 int main() {
6006
6007                 struct statfs stfs;
6008
6009                 memset(&stfs,0,sizeof(stfs));
6010         
6011 ; return 0; }
6012 EOF
6013 if { (eval echo configure:6014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6014   rm -rf conftest*
6015   wine_cv_sys_vfs_has_statfs=yes
6016 else
6017   echo "configure: failed program was:" >&5
6018   cat conftest.$ac_ext >&5
6019   rm -rf conftest*
6020   wine_cv_sys_vfs_has_statfs=no
6021         
6022 fi
6023 rm -f conftest*
6024     
6025 fi
6026
6027 echo "$ac_t""$wine_cv_sys_vfs_has_statfs" 1>&6
6028     if test "$wine_cv_sys_vfs_has_statfs" = "yes"
6029     then
6030       cat >> confdefs.h <<\EOF
6031 #define STATFS_DEFINED_BY_SYS_VFS 1
6032 EOF
6033
6034     fi
6035 fi
6036
6037 if test "$ac_cv_header_sys_statfs_h" = "yes"
6038 then
6039     echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6
6040 echo "configure:6041: checking "whether sys/statfs.h defines statfs"" >&5
6041 if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then
6042   echo $ac_n "(cached) $ac_c" 1>&6
6043 else
6044   cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047
6048         #include <sys/types.h>
6049         #ifdef HAVE_SYS_PARAM_H
6050         # include <sys/param.h>
6051         #endif
6052         #include <sys/statfs.h>
6053         
6054 int main() {
6055
6056                 struct statfs stfs;
6057         
6058 ; return 0; }
6059 EOF
6060 if { (eval echo configure:6061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6061   rm -rf conftest*
6062   wine_cv_sys_statfs_has_statfs=yes
6063 else
6064   echo "configure: failed program was:" >&5
6065   cat conftest.$ac_ext >&5
6066   rm -rf conftest*
6067   wine_cv_sys_statfs_has_statfs=no
6068         
6069 fi
6070 rm -f conftest*
6071     
6072 fi
6073
6074 echo "$ac_t""$wine_cv_sys_statfs_has_statfs" 1>&6
6075     if test "$wine_cv_sys_statfs_has_statfs" = "yes"
6076     then
6077       cat >> confdefs.h <<\EOF
6078 #define STATFS_DEFINED_BY_SYS_STATFS 1
6079 EOF
6080
6081     fi
6082 fi
6083
6084 if test "$ac_cv_header_sys_mount_h" = "yes"
6085 then
6086     echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6
6087 echo "configure:6088: checking "whether sys/mount.h defines statfs"" >&5
6088 if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then
6089   echo $ac_n "(cached) $ac_c" 1>&6
6090 else
6091   cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6094
6095         #include <sys/types.h>
6096         #ifdef HAVE_SYS_PARAM_H
6097         # include <sys/param.h>
6098         #endif
6099         #include <sys/mount.h>
6100         
6101 int main() {
6102
6103                 struct statfs stfs;
6104         
6105 ; return 0; }
6106 EOF
6107 if { (eval echo configure:6108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6108   rm -rf conftest*
6109   wine_cv_sys_mount_has_statfs=yes
6110 else
6111   echo "configure: failed program was:" >&5
6112   cat conftest.$ac_ext >&5
6113   rm -rf conftest*
6114   wine_cv_sys_mount_has_statfs=no
6115         
6116 fi
6117 rm -f conftest*
6118     
6119 fi
6120
6121 echo "$ac_t""$wine_cv_sys_mount_has_statfs" 1>&6
6122     if test "$wine_cv_sys_mount_has_statfs" = "yes"
6123     then
6124       cat >> confdefs.h <<\EOF
6125 #define STATFS_DEFINED_BY_SYS_MOUNT 1
6126 EOF
6127
6128     fi
6129 fi
6130
6131
6132 echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6
6133 echo "configure:6134: checking "for statfs.f_bfree"" >&5
6134 if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then
6135   echo $ac_n "(cached) $ac_c" 1>&6
6136 else
6137    if test "x$statfs_bfree" = "xno"
6138     then
6139         wine_cv_statfs_bfree=no
6140     else
6141         cat > conftest.$ac_ext <<EOF
6142 #line 6143 "configure"
6143 #include "confdefs.h"
6144
6145         #include <sys/types.h>
6146         #ifdef HAVE_SYS_PARAM_H
6147         # include <sys/param.h>
6148         #endif
6149         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
6150         # include <sys/mount.h>
6151         #else
6152         # ifdef STATFS_DEFINED_BY_SYS_VFS
6153         #  include <sys/vfs.h>
6154         # else
6155         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
6156         #   include <sys/statfs.h>
6157         #  endif
6158         # endif
6159         #endif
6160         
6161 int main() {
6162
6163                 struct statfs stfs;
6164
6165                 stfs.f_bfree++;
6166         
6167 ; return 0; }
6168 EOF
6169 if { (eval echo configure:6170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6170   rm -rf conftest*
6171   wine_cv_statfs_bfree=yes
6172 else
6173   echo "configure: failed program was:" >&5
6174   cat conftest.$ac_ext >&5
6175   rm -rf conftest*
6176   wine_cv_statfs_bfree=no
6177         
6178 fi
6179 rm -f conftest*
6180     fi  
6181 fi
6182
6183 echo "$ac_t""$wine_cv_statfs_bfree" 1>&6
6184 if test "$wine_cv_statfs_bfree" = "yes"
6185 then
6186   cat >> confdefs.h <<\EOF
6187 #define STATFS_HAS_BFREE 1
6188 EOF
6189
6190 fi
6191
6192 echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6
6193 echo "configure:6194: checking "for statfs.f_bavail"" >&5
6194 if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then
6195   echo $ac_n "(cached) $ac_c" 1>&6
6196 else
6197    if test "x$statfs_bavail" = "xno"
6198     then
6199         wine_cv_statfs_bavail=no
6200     else
6201         cat > conftest.$ac_ext <<EOF
6202 #line 6203 "configure"
6203 #include "confdefs.h"
6204
6205         #include <sys/types.h>
6206         #ifdef HAVE_SYS_PARAM_H
6207         # include <sys/param.h>
6208         #endif
6209         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
6210         # include <sys/mount.h>
6211         #else
6212         # ifdef STATFS_DEFINED_BY_SYS_VFS
6213         #  include <sys/vfs.h>
6214         # else
6215         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
6216         #   include <sys/statfs.h>
6217         #  endif
6218         # endif
6219         #endif
6220         
6221 int main() {
6222
6223                 struct statfs stfs;
6224
6225                 stfs.f_bavail++;
6226         
6227 ; return 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6230   rm -rf conftest*
6231   wine_cv_statfs_bavail=yes
6232 else
6233   echo "configure: failed program was:" >&5
6234   cat conftest.$ac_ext >&5
6235   rm -rf conftest*
6236   wine_cv_statfs_bavail=no
6237         
6238 fi
6239 rm -f conftest*
6240     fi  
6241 fi
6242
6243 echo "$ac_t""$wine_cv_statfs_bavail" 1>&6
6244 if test "$wine_cv_statfs_bavail" = "yes"
6245 then
6246   cat >> confdefs.h <<\EOF
6247 #define STATFS_HAS_BAVAIL 1
6248 EOF
6249
6250 fi
6251
6252
6253 echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6
6254 echo "configure:6255: checking "for msg_accrights in struct msghdr"" >&5
6255 if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then
6256   echo $ac_n "(cached) $ac_c" 1>&6
6257 else
6258   cat > conftest.$ac_ext <<EOF
6259 #line 6260 "configure"
6260 #include "confdefs.h"
6261 #include <sys/types.h>
6262 #include <sys/socket.h>
6263 int main() {
6264 struct msghdr hdr; hdr.msg_accrights=0
6265 ; return 0; }
6266 EOF
6267 if { (eval echo configure:6268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6268   rm -rf conftest*
6269   ac_cv_c_msg_accrights="yes"
6270 else
6271   echo "configure: failed program was:" >&5
6272   cat conftest.$ac_ext >&5
6273   rm -rf conftest*
6274   ac_cv_c_msg_accrights="no"
6275 fi
6276 rm -f conftest*
6277 fi
6278
6279 echo "$ac_t""$ac_cv_c_msg_accrights" 1>&6
6280 if test "$ac_cv_c_msg_accrights" = "yes"
6281 then
6282     cat >> confdefs.h <<\EOF
6283 #define HAVE_MSGHDR_ACCRIGHTS 1
6284 EOF
6285
6286 fi
6287
6288
6289 echo $ac_n "checking "for sun_len in struct sockaddr_un"""... $ac_c" 1>&6
6290 echo "configure:6291: checking "for sun_len in struct sockaddr_un"" >&5
6291 if eval "test \"`echo '$''{'ac_cv_c_sun_len'+set}'`\" = set"; then
6292   echo $ac_n "(cached) $ac_c" 1>&6
6293 else
6294   cat > conftest.$ac_ext <<EOF
6295 #line 6296 "configure"
6296 #include "confdefs.h"
6297 #include <sys/types.h>
6298 #include <sys/socket.h>
6299 #include <sys/un.h>
6300 int main() {
6301 static struct sockaddr_un addr; addr.sun_len = 1
6302 ; return 0; }
6303 EOF
6304 if { (eval echo configure:6305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6305   rm -rf conftest*
6306   ac_cv_c_sun_len="yes"
6307 else
6308   echo "configure: failed program was:" >&5
6309   cat conftest.$ac_ext >&5
6310   rm -rf conftest*
6311   ac_cv_c_sun_len="no"
6312 fi
6313 rm -f conftest*
6314 fi
6315
6316 echo "$ac_t""$ac_cv_c_sun_len" 1>&6
6317 if test "$ac_cv_c_sun_len" = "yes"
6318 then
6319     cat >> confdefs.h <<\EOF
6320 #define HAVE_SOCKADDR_SUN_LEN 1
6321 EOF
6322
6323 fi
6324
6325
6326 echo $ac_n "checking "whether we need to define __i386__"""... $ac_c" 1>&6
6327 echo "configure:6328: checking "whether we need to define __i386__"" >&5
6328 if eval "test \"`echo '$''{'ac_cv_cpp_def_i386'+set}'`\" = set"; then
6329   echo $ac_n "(cached) $ac_c" 1>&6
6330 else
6331   cat > conftest.$ac_ext <<EOF
6332 #line 6333 "configure"
6333 #include "confdefs.h"
6334 #if (defined(i386) || defined(__i386)) && !defined(__i386__)
6335 yes
6336 #endif
6337 EOF
6338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6339   egrep "yes" >/dev/null 2>&1; then
6340   rm -rf conftest*
6341   ac_cv_cpp_def_i386="yes"
6342 else
6343   rm -rf conftest*
6344   ac_cv_cpp_def_i386="no"
6345 fi
6346 rm -f conftest*
6347
6348 fi
6349
6350 echo "$ac_t""$ac_cv_cpp_def_i386" 1>&6
6351 if test "$ac_cv_cpp_def_i386" = "yes"
6352 then
6353     CFLAGS="$CFLAGS -D__i386__"
6354     LINTFLAGS="$LINTFLAGS -D__i386__"
6355 fi
6356
6357 GCC_NO_BUILTIN=""
6358 if test "$GCC" = "yes"
6359 then
6360     GCC_NO_BUILTIN="-fno-builtin"
6361 fi
6362
6363
6364
6365
6366
6367 MAKE_RULES=Make.rules
6368
6369
6370 MAKE_DLL_RULES=dlls/Makedll.rules
6371
6372
6373 MAKE_PROG_RULES=programs/Makeprog.rules
6374
6375
6376 trap '' 1 2 15
6377 cat > confcache <<\EOF
6378 # This file is a shell script that caches the results of configure
6379 # tests run on this system so they can be shared between configure
6380 # scripts and configure runs.  It is not useful on other systems.
6381 # If it contains results you don't want to keep, you may remove or edit it.
6382 #
6383 # By default, configure uses ./config.cache as the cache file,
6384 # creating it if it does not exist already.  You can give configure
6385 # the --cache-file=FILE option to use a different cache file; that is
6386 # what configure does when it calls configure scripts in
6387 # subdirectories, so they share the cache.
6388 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6389 # config.status only pays attention to the cache file if you give it the
6390 # --recheck option to rerun configure.
6391 #
6392 EOF
6393 # The following way of writing the cache mishandles newlines in values,
6394 # but we know of no workaround that is simple, portable, and efficient.
6395 # So, don't put newlines in cache variables' values.
6396 # Ultrix sh set writes to stderr and can't be redirected directly,
6397 # and sets the high bit in the cache file unless we assign to the vars.
6398 (set) 2>&1 |
6399   case `(ac_space=' '; set | grep ac_space) 2>&1` in
6400   *ac_space=\ *)
6401     # `set' does not quote correctly, so add quotes (double-quote substitution
6402     # turns \\\\ into \\, and sed turns \\ into \).
6403     sed -n \
6404       -e "s/'/'\\\\''/g" \
6405       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6406     ;;
6407   *)
6408     # `set' quotes correctly as required by POSIX, so do not add quotes.
6409     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6410     ;;
6411   esac >> confcache
6412 if cmp -s $cache_file confcache; then
6413   :
6414 else
6415   if test -w $cache_file; then
6416     echo "updating cache $cache_file"
6417     cat confcache > $cache_file
6418   else
6419     echo "not updating unwritable cache $cache_file"
6420   fi
6421 fi
6422 rm -f confcache
6423
6424 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6425
6426 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6427 # Let make expand exec_prefix.
6428 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6429
6430 # Any assignment to VPATH causes Sun make to only execute
6431 # the first set of double-colon rules, so remove it if not needed.
6432 # If there is a colon in the path, we need to keep it.
6433 if test "x$srcdir" = x.; then
6434   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6435 fi
6436
6437 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6438
6439 DEFS=-DHAVE_CONFIG_H
6440
6441 # Without the "./", some shells look in PATH for config.status.
6442 : ${CONFIG_STATUS=./config.status}
6443
6444 echo creating $CONFIG_STATUS
6445 rm -f $CONFIG_STATUS
6446 cat > $CONFIG_STATUS <<EOF
6447 #! /bin/sh
6448 # Generated automatically by configure.
6449 # Run this file to recreate the current configuration.
6450 # This directory was configured as follows,
6451 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6452 #
6453 # $0 $ac_configure_args
6454 #
6455 # Compiler output produced by configure, useful for debugging
6456 # configure, is in ./config.log if it exists.
6457
6458 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6459 for ac_option
6460 do
6461   case "\$ac_option" in
6462   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6463     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6464     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6465   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6466     echo "$CONFIG_STATUS generated by autoconf version 2.13"
6467     exit 0 ;;
6468   -help | --help | --hel | --he | --h)
6469     echo "\$ac_cs_usage"; exit 0 ;;
6470   *) echo "\$ac_cs_usage"; exit 1 ;;
6471   esac
6472 done
6473
6474 ac_given_srcdir=$srcdir
6475 ac_given_INSTALL="$INSTALL"
6476
6477 trap 'rm -fr `echo "
6478 Make.rules
6479 dlls/Makedll.rules
6480 programs/Makeprog.rules
6481 Makefile
6482 console/Makefile
6483 controls/Makefile
6484 debugger/Makefile
6485 dlls/Makefile
6486 dlls/advapi32/Makefile
6487 dlls/avifil32/Makefile
6488 dlls/comctl32/Makefile
6489 dlls/commdlg/Makefile
6490 dlls/crtdll/Makefile
6491 dlls/dciman32/Makefile
6492 dlls/ddraw/Makefile
6493 dlls/dinput/Makefile
6494 dlls/dplay/Makefile
6495 dlls/dplayx/Makefile
6496 dlls/dsound/Makefile
6497 dlls/gdi/Makefile
6498 dlls/icmp/Makefile
6499 dlls/imagehlp/Makefile
6500 dlls/imm32/Makefile
6501 dlls/kernel/Makefile
6502 dlls/lzexpand/Makefile
6503 dlls/mpr/Makefile
6504 dlls/msacm/Makefile
6505 dlls/msnet32/Makefile
6506 dlls/msvideo/Makefile
6507 dlls/ntdll/Makefile
6508 dlls/odbc32/Makefile
6509 dlls/ole32/Makefile
6510 dlls/oleaut32/Makefile
6511 dlls/olecli/Makefile
6512 dlls/oledlg/Makefile
6513 dlls/olepro32/Makefile
6514 dlls/olesvr/Makefile
6515 dlls/opengl32/Makefile
6516 dlls/psapi/Makefile
6517 dlls/rasapi32/Makefile
6518 dlls/richedit/Makefile
6519 dlls/rpcrt4/Makefile
6520 dlls/serialui/Makefile
6521 dlls/setupapi/Makefile
6522 dlls/shell32/Makefile
6523 dlls/shfolder/Makefile
6524 dlls/shlwapi/Makefile
6525 dlls/tapi32/Makefile
6526 dlls/ttydrv/Makefile
6527 dlls/urlmon/Makefile
6528 dlls/user/Makefile
6529 dlls/version/Makefile
6530 dlls/win32s/Makefile
6531 dlls/winaspi/Makefile
6532 dlls/wineps/Makefile
6533 dlls/wininet/Makefile
6534 dlls/winmm/Makefile
6535 dlls/winmm/joystick/Makefile
6536 dlls/winmm/mcianim/Makefile
6537 dlls/winmm/mciavi/Makefile
6538 dlls/winmm/mcicda/Makefile
6539 dlls/winmm/mciseq/Makefile
6540 dlls/winmm/mciwave/Makefile
6541 dlls/winmm/midimap/Makefile
6542 dlls/winmm/wavemap/Makefile
6543 dlls/winmm/wineoss/Makefile
6544 dlls/winsock/Makefile
6545 dlls/winspool/Makefile
6546 dlls/wow32/Makefile
6547 dlls/wsock32/Makefile
6548 dlls/x11drv/Makefile
6549 documentation/Makefile
6550 documentation/wine.conf.man
6551 documentation/wine.man
6552 files/Makefile
6553 graphics/Makefile
6554 graphics/enhmetafiledrv/Makefile
6555 graphics/metafiledrv/Makefile
6556 graphics/win16drv/Makefile
6557 graphics/x11drv/Makefile
6558 if1632/Makefile
6559 include/Makefile
6560 library/Makefile
6561 libtest/Makefile
6562 loader/Makefile
6563 loader/dos/Makefile
6564 loader/ne/Makefile
6565 memory/Makefile
6566 misc/Makefile
6567 miscemu/Makefile
6568 msdos/Makefile
6569 objects/Makefile
6570 ole/Makefile
6571 programs/Makefile
6572 programs/avitools/Makefile
6573 programs/clock/Makefile
6574 programs/cmdlgtst/Makefile
6575 programs/control/Makefile
6576 programs/notepad/Makefile
6577 programs/osversioncheck/Makefile
6578 programs/progman/Makefile
6579 programs/regapi/Makefile
6580 programs/regtest/Makefile
6581 programs/uninstaller/Makefile
6582 programs/view/Makefile
6583 programs/wcmd/Makefile
6584 programs/winemine/Makefile
6585 programs/winhelp/Makefile
6586 programs/winver/Makefile
6587 relay32/Makefile
6588 scheduler/Makefile
6589 server/Makefile
6590 tools/Makefile
6591 tools/cvdump/Makefile
6592 tools/winebuild/Makefile
6593 tools/winelauncher
6594 tools/wmc/Makefile
6595 tools/wrc/Makefile
6596 tsx11/Makefile
6597 unicode/Makefile
6598 win32/Makefile
6599 windows/Makefile
6600 windows/x11drv/Makefile  include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6601 EOF
6602 cat >> $CONFIG_STATUS <<EOF
6603
6604 # Protect against being on the right side of a sed subst in config.status.
6605 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6606  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6607 $ac_vpsub
6608 $extrasub
6609 s%@SHELL@%$SHELL%g
6610 s%@CFLAGS@%$CFLAGS%g
6611 s%@CPPFLAGS@%$CPPFLAGS%g
6612 s%@CXXFLAGS@%$CXXFLAGS%g
6613 s%@FFLAGS@%$FFLAGS%g
6614 s%@DEFS@%$DEFS%g
6615 s%@LDFLAGS@%$LDFLAGS%g
6616 s%@LIBS@%$LIBS%g
6617 s%@exec_prefix@%$exec_prefix%g
6618 s%@prefix@%$prefix%g
6619 s%@program_transform_name@%$program_transform_name%g
6620 s%@bindir@%$bindir%g
6621 s%@sbindir@%$sbindir%g
6622 s%@libexecdir@%$libexecdir%g
6623 s%@datadir@%$datadir%g
6624 s%@sysconfdir@%$sysconfdir%g
6625 s%@sharedstatedir@%$sharedstatedir%g
6626 s%@localstatedir@%$localstatedir%g
6627 s%@libdir@%$libdir%g
6628 s%@includedir@%$includedir%g
6629 s%@oldincludedir@%$oldincludedir%g
6630 s%@infodir@%$infodir%g
6631 s%@mandir@%$mandir%g
6632 s%@OPTIONS@%$OPTIONS%g
6633 s%@SET_MAKE@%$SET_MAKE%g
6634 s%@CC@%$CC%g
6635 s%@CPP@%$CPP%g
6636 s%@X_CFLAGS@%$X_CFLAGS%g
6637 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
6638 s%@X_LIBS@%$X_LIBS%g
6639 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
6640 s%@YACC@%$YACC%g
6641 s%@LEX@%$LEX%g
6642 s%@LEXLIB@%$LEXLIB%g
6643 s%@XLEX@%$XLEX%g
6644 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
6645 s%@RANLIB@%$RANLIB%g
6646 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6647 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6648 s%@INSTALL_DATA@%$INSTALL_DATA%g
6649 s%@LN_S@%$LN_S%g
6650 s%@C2MAN@%$C2MAN%g
6651 s%@LDCONFIG@%$LDCONFIG%g
6652 s%@LINT@%$LINT%g
6653 s%@LINTFLAGS@%$LINTFLAGS%g
6654 s%@XLIB@%$XLIB%g
6655 s%@X_DLLS@%$X_DLLS%g
6656 s%@XFILES@%$XFILES%g
6657 s%@OPENGLFILES@%$OPENGLFILES%g
6658 s%@OPENGL32_DLL@%$OPENGL32_DLL%g
6659 s%@DGA_SRCS@%$DGA_SRCS%g
6660 s%@DGA2_SRCS@%$DGA2_SRCS%g
6661 s%@MESA_SRCS@%$MESA_SRCS%g
6662 s%@DLL_LINK@%$DLL_LINK%g
6663 s%@DLLFLAGS@%$DLLFLAGS%g
6664 s%@LDSHARED@%$LDSHARED%g
6665 s%@LDDLLFLAGS@%$LDDLLFLAGS%g
6666 s%@LIBEXT@%$LIBEXT%g
6667 s%@ALLOCA@%$ALLOCA%g
6668 s%@GCC_NO_BUILTIN@%$GCC_NO_BUILTIN%g
6669 /@MAKE_RULES@/r $MAKE_RULES
6670 s%@MAKE_RULES@%%g
6671 /@MAKE_DLL_RULES@/r $MAKE_DLL_RULES
6672 s%@MAKE_DLL_RULES@%%g
6673 /@MAKE_PROG_RULES@/r $MAKE_PROG_RULES
6674 s%@MAKE_PROG_RULES@%%g
6675
6676 CEOF
6677 EOF
6678
6679 cat >> $CONFIG_STATUS <<\EOF
6680
6681 # Split the substitutions into bite-sized pieces for seds with
6682 # small command number limits, like on Digital OSF/1 and HP-UX.
6683 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6684 ac_file=1 # Number of current file.
6685 ac_beg=1 # First line for current file.
6686 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6687 ac_more_lines=:
6688 ac_sed_cmds=""
6689 while $ac_more_lines; do
6690   if test $ac_beg -gt 1; then
6691     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6692   else
6693     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6694   fi
6695   if test ! -s conftest.s$ac_file; then
6696     ac_more_lines=false
6697     rm -f conftest.s$ac_file
6698   else
6699     if test -z "$ac_sed_cmds"; then
6700       ac_sed_cmds="sed -f conftest.s$ac_file"
6701     else
6702       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6703     fi
6704     ac_file=`expr $ac_file + 1`
6705     ac_beg=$ac_end
6706     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6707   fi
6708 done
6709 if test -z "$ac_sed_cmds"; then
6710   ac_sed_cmds=cat
6711 fi
6712 EOF
6713
6714 cat >> $CONFIG_STATUS <<EOF
6715
6716 CONFIG_FILES=\${CONFIG_FILES-"Make.rules
6717 dlls/Makedll.rules
6718 programs/Makeprog.rules
6719 Makefile
6720 console/Makefile
6721 controls/Makefile
6722 debugger/Makefile
6723 dlls/Makefile
6724 dlls/advapi32/Makefile
6725 dlls/avifil32/Makefile
6726 dlls/comctl32/Makefile
6727 dlls/commdlg/Makefile
6728 dlls/crtdll/Makefile
6729 dlls/dciman32/Makefile
6730 dlls/ddraw/Makefile
6731 dlls/dinput/Makefile
6732 dlls/dplay/Makefile
6733 dlls/dplayx/Makefile
6734 dlls/dsound/Makefile
6735 dlls/gdi/Makefile
6736 dlls/icmp/Makefile
6737 dlls/imagehlp/Makefile
6738 dlls/imm32/Makefile
6739 dlls/kernel/Makefile
6740 dlls/lzexpand/Makefile
6741 dlls/mpr/Makefile
6742 dlls/msacm/Makefile
6743 dlls/msnet32/Makefile
6744 dlls/msvideo/Makefile
6745 dlls/ntdll/Makefile
6746 dlls/odbc32/Makefile
6747 dlls/ole32/Makefile
6748 dlls/oleaut32/Makefile
6749 dlls/olecli/Makefile
6750 dlls/oledlg/Makefile
6751 dlls/olepro32/Makefile
6752 dlls/olesvr/Makefile
6753 dlls/opengl32/Makefile
6754 dlls/psapi/Makefile
6755 dlls/rasapi32/Makefile
6756 dlls/richedit/Makefile
6757 dlls/rpcrt4/Makefile
6758 dlls/serialui/Makefile
6759 dlls/setupapi/Makefile
6760 dlls/shell32/Makefile
6761 dlls/shfolder/Makefile
6762 dlls/shlwapi/Makefile
6763 dlls/tapi32/Makefile
6764 dlls/ttydrv/Makefile
6765 dlls/urlmon/Makefile
6766 dlls/user/Makefile
6767 dlls/version/Makefile
6768 dlls/win32s/Makefile
6769 dlls/winaspi/Makefile
6770 dlls/wineps/Makefile
6771 dlls/wininet/Makefile
6772 dlls/winmm/Makefile
6773 dlls/winmm/joystick/Makefile
6774 dlls/winmm/mcianim/Makefile
6775 dlls/winmm/mciavi/Makefile
6776 dlls/winmm/mcicda/Makefile
6777 dlls/winmm/mciseq/Makefile
6778 dlls/winmm/mciwave/Makefile
6779 dlls/winmm/midimap/Makefile
6780 dlls/winmm/wavemap/Makefile
6781 dlls/winmm/wineoss/Makefile
6782 dlls/winsock/Makefile
6783 dlls/winspool/Makefile
6784 dlls/wow32/Makefile
6785 dlls/wsock32/Makefile
6786 dlls/x11drv/Makefile
6787 documentation/Makefile
6788 documentation/wine.conf.man
6789 documentation/wine.man
6790 files/Makefile
6791 graphics/Makefile
6792 graphics/enhmetafiledrv/Makefile
6793 graphics/metafiledrv/Makefile
6794 graphics/win16drv/Makefile
6795 graphics/x11drv/Makefile
6796 if1632/Makefile
6797 include/Makefile
6798 library/Makefile
6799 libtest/Makefile
6800 loader/Makefile
6801 loader/dos/Makefile
6802 loader/ne/Makefile
6803 memory/Makefile
6804 misc/Makefile
6805 miscemu/Makefile
6806 msdos/Makefile
6807 objects/Makefile
6808 ole/Makefile
6809 programs/Makefile
6810 programs/avitools/Makefile
6811 programs/clock/Makefile
6812 programs/cmdlgtst/Makefile
6813 programs/control/Makefile
6814 programs/notepad/Makefile
6815 programs/osversioncheck/Makefile
6816 programs/progman/Makefile
6817 programs/regapi/Makefile
6818 programs/regtest/Makefile
6819 programs/uninstaller/Makefile
6820 programs/view/Makefile
6821 programs/wcmd/Makefile
6822 programs/winemine/Makefile
6823 programs/winhelp/Makefile
6824 programs/winver/Makefile
6825 relay32/Makefile
6826 scheduler/Makefile
6827 server/Makefile
6828 tools/Makefile
6829 tools/cvdump/Makefile
6830 tools/winebuild/Makefile
6831 tools/winelauncher
6832 tools/wmc/Makefile
6833 tools/wrc/Makefile
6834 tsx11/Makefile
6835 unicode/Makefile
6836 win32/Makefile
6837 windows/Makefile
6838 windows/x11drv/Makefile "}
6839 EOF
6840 cat >> $CONFIG_STATUS <<\EOF
6841 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6842   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6843   case "$ac_file" in
6844   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6845        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6846   *) ac_file_in="${ac_file}.in" ;;
6847   esac
6848
6849   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6850
6851   # Remove last slash and all that follows it.  Not all systems have dirname.
6852   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6853   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6854     # The file is in a subdirectory.
6855     test ! -d "$ac_dir" && mkdir "$ac_dir"
6856     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6857     # A "../" for each directory in $ac_dir_suffix.
6858     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6859   else
6860     ac_dir_suffix= ac_dots=
6861   fi
6862
6863   case "$ac_given_srcdir" in
6864   .)  srcdir=.
6865       if test -z "$ac_dots"; then top_srcdir=.
6866       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6867   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6868   *) # Relative path.
6869     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6870     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6871   esac
6872
6873   case "$ac_given_INSTALL" in
6874   [/$]*) INSTALL="$ac_given_INSTALL" ;;
6875   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6876   esac
6877
6878   echo creating "$ac_file"
6879   rm -f "$ac_file"
6880   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6881   case "$ac_file" in
6882   *Makefile*) ac_comsub="1i\\
6883 # $configure_input" ;;
6884   *) ac_comsub= ;;
6885   esac
6886
6887   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6888   sed -e "$ac_comsub
6889 s%@configure_input@%$configure_input%g
6890 s%@srcdir@%$srcdir%g
6891 s%@top_srcdir@%$top_srcdir%g
6892 s%@INSTALL@%$INSTALL%g
6893 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6894 fi; done
6895 rm -f conftest.s*
6896
6897 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6898 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6899 #
6900 # ac_d sets the value in "#define NAME VALUE" lines.
6901 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6902 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6903 ac_dC='\3'
6904 ac_dD='%g'
6905 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6906 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6907 ac_uB='\([      ]\)%\1#\2define\3'
6908 ac_uC=' '
6909 ac_uD='\4%g'
6910 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6911 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6912 ac_eB='$%\1#\2define\3'
6913 ac_eC=' '
6914 ac_eD='%g'
6915
6916 if test "${CONFIG_HEADERS+set}" != set; then
6917 EOF
6918 cat >> $CONFIG_STATUS <<EOF
6919   CONFIG_HEADERS="include/config.h"
6920 EOF
6921 cat >> $CONFIG_STATUS <<\EOF
6922 fi
6923 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6924   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6925   case "$ac_file" in
6926   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6927        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6928   *) ac_file_in="${ac_file}.in" ;;
6929   esac
6930
6931   echo creating $ac_file
6932
6933   rm -f conftest.frag conftest.in conftest.out
6934   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6935   cat $ac_file_inputs > conftest.in
6936
6937 EOF
6938
6939 # Transform confdefs.h into a sed script conftest.vals that substitutes
6940 # the proper values into config.h.in to produce config.h.  And first:
6941 # Protect against being on the right side of a sed subst in config.status.
6942 # Protect against being in an unquoted here document in config.status.
6943 rm -f conftest.vals
6944 cat > conftest.hdr <<\EOF
6945 s/[\\&%]/\\&/g
6946 s%[\\$`]%\\&%g
6947 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6948 s%ac_d%ac_u%gp
6949 s%ac_u%ac_e%gp
6950 EOF
6951 sed -n -f conftest.hdr confdefs.h > conftest.vals
6952 rm -f conftest.hdr
6953
6954 # This sed command replaces #undef with comments.  This is necessary, for
6955 # example, in the case of _POSIX_SOURCE, which is predefined and required
6956 # on some systems where configure will not decide to define it.
6957 cat >> conftest.vals <<\EOF
6958 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6959 EOF
6960
6961 # Break up conftest.vals because some shells have a limit on
6962 # the size of here documents, and old seds have small limits too.
6963
6964 rm -f conftest.tail
6965 while :
6966 do
6967   ac_lines=`grep -c . conftest.vals`
6968   # grep -c gives empty output for an empty file on some AIX systems.
6969   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6970   # Write a limited-size here document to conftest.frag.
6971   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6972   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6973   echo 'CEOF
6974   sed -f conftest.frag conftest.in > conftest.out
6975   rm -f conftest.in
6976   mv conftest.out conftest.in
6977 ' >> $CONFIG_STATUS
6978   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6979   rm -f conftest.vals
6980   mv conftest.tail conftest.vals
6981 done
6982 rm -f conftest.vals
6983
6984 cat >> $CONFIG_STATUS <<\EOF
6985   rm -f conftest.frag conftest.h
6986   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6987   cat conftest.in >> conftest.h
6988   rm -f conftest.in
6989   if cmp -s $ac_file conftest.h 2>/dev/null; then
6990     echo "$ac_file is unchanged"
6991     rm -f conftest.h
6992   else
6993     # Remove last slash and all that follows it.  Not all systems have dirname.
6994       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6995       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6996       # The file is in a subdirectory.
6997       test ! -d "$ac_dir" && mkdir "$ac_dir"
6998     fi
6999     rm -f $ac_file
7000     mv conftest.h $ac_file
7001   fi
7002 fi; done
7003
7004 EOF
7005 cat >> $CONFIG_STATUS <<EOF
7006
7007
7008 EOF
7009 cat >> $CONFIG_STATUS <<\EOF
7010
7011 extra_subdirs="\
7012 dlls/ddraw/d3ddevice \
7013 dlls/ddraw/dclipper \
7014 dlls/ddraw/ddraw \
7015 dlls/ddraw/direct3d \
7016 dlls/ddraw/dpalette \
7017 dlls/ddraw/dsurface \
7018 dlls/dinput/joystick \
7019 dlls/dinput/keyboard \
7020 dlls/dinput/mouse \
7021 dlls/kernel/messages \
7022 dlls/user/resources \
7023 "
7024 for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done 
7025
7026 exit 0
7027 EOF
7028 chmod +x $CONFIG_STATUS
7029 rm -fr confdefs* $ac_clean_files
7030 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7031
7032
7033 if test "$have_x" = "no"
7034 then
7035   echo
7036   echo "*** Warning: X development files not found. Wine will be built without"
7037   echo "*** X support, which currently does not work, and would probably not be"
7038   echo "*** what you want anyway. You will need to install devel packages of"
7039   echo "*** Xlib/Xfree86 and Xpm at the very least."
7040 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
7041 then
7042   echo
7043   echo "*** Warning: Xpm development files not found. Wine will be built without"
7044   echo "*** Xpm support, which currently does not work. You will need to install"
7045   echo "*** devel packages of Xpm."
7046 fi
7047
7048 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
7049 then
7050   echo
7051   echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
7052   echo "*** terminal resize support. Consider upgrading ncurses."
7053 fi
7054
7055 if test "$wine_cv_libc_reentrant" = "no" 
7056 then
7057   echo
7058   echo "*** Warning: non-reentrant libc detected. Wine will be build without"
7059   echo "*** thread support. Consider upgrading libc to a more recent"
7060   echo "*** reentrant version of libc."
7061 fi
7062
7063 if test "$wine_cv_opengl_version_OK" = "no"
7064 then
7065   echo
7066   echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
7067   echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
7068 fi
7069
7070 if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "normal"
7071 then
7072   echo
7073   echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
7074   echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
7075   echo "*** A fix for glibc 2.1.3 that seem to work is included in this version of Wine,"
7076   echo "*** start configure with '--enable-opengl' to force OpenGL support."
7077 fi
7078
7079 if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "yes"
7080 then
7081   echo
7082   echo "*** Warning: you explicitely linked in a thread-safe OpenGL version. If you"
7083   echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
7084   echo "*** support before reporting bugs."
7085 fi
7086
7087
7088 echo
7089 echo "Configure finished.  Do 'make depend && make' to compile Wine."
7090 echo
7091