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