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