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