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