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