Make winsock.h and winsock2.h independent from the Unix headers.
[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 for ac_func in openpty
2767 do
2768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2769 echo "configure:2770: checking for $ac_func" >&5
2770 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2771   echo $ac_n "(cached) $ac_c" 1>&6
2772 else
2773   cat > conftest.$ac_ext <<EOF
2774 #line 2775 "configure"
2775 #include "confdefs.h"
2776 /* System header to define __stub macros and hopefully few prototypes,
2777     which can conflict with char $ac_func(); below.  */
2778 #include <assert.h>
2779 /* Override any gcc2 internal prototype to avoid an error.  */
2780 /* We use char because int might match the return type of a gcc2
2781     builtin and then its argument prototype would still apply.  */
2782 char $ac_func();
2783
2784 int main() {
2785
2786 /* The GNU C library defines this for functions which it implements
2787     to always fail with ENOSYS.  Some functions are actually named
2788     something starting with __ and the normal name is an alias.  */
2789 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2790 choke me
2791 #else
2792 $ac_func();
2793 #endif
2794
2795 ; return 0; }
2796 EOF
2797 if { (eval echo configure:2798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2798   rm -rf conftest*
2799   eval "ac_cv_func_$ac_func=yes"
2800 else
2801   echo "configure: failed program was:" >&5
2802   cat conftest.$ac_ext >&5
2803   rm -rf conftest*
2804   eval "ac_cv_func_$ac_func=no"
2805 fi
2806 rm -f conftest*
2807 fi
2808
2809 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2810   echo "$ac_t""yes" 1>&6
2811     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2812   cat >> confdefs.h <<EOF
2813 #define $ac_tr_func 1
2814 EOF
2815  
2816 else
2817   echo "$ac_t""no" 1>&6
2818 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
2819 echo "configure:2820: checking for openpty in -lutil" >&5
2820 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
2821 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2822   echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824   ac_save_LIBS="$LIBS"
2825 LIBS="-lutil  $LIBS"
2826 cat > conftest.$ac_ext <<EOF
2827 #line 2828 "configure"
2828 #include "confdefs.h"
2829 /* Override any gcc2 internal prototype to avoid an error.  */
2830 /* We use char because int might match the return type of a gcc2
2831     builtin and then its argument prototype would still apply.  */
2832 char openpty();
2833
2834 int main() {
2835 openpty()
2836 ; return 0; }
2837 EOF
2838 if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2839   rm -rf conftest*
2840   eval "ac_cv_lib_$ac_lib_var=yes"
2841 else
2842   echo "configure: failed program was:" >&5
2843   cat conftest.$ac_ext >&5
2844   rm -rf conftest*
2845   eval "ac_cv_lib_$ac_lib_var=no"
2846 fi
2847 rm -f conftest*
2848 LIBS="$ac_save_LIBS"
2849
2850 fi
2851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2852   echo "$ac_t""yes" 1>&6
2853   cat >> confdefs.h <<\EOF
2854 #define HAVE_OPENPTY 1
2855 EOF
2856
2857                 LIBS="$LIBS -lutil"
2858         
2859 else
2860   echo "$ac_t""no" 1>&6
2861 fi
2862
2863 fi
2864 done
2865
2866
2867 for ac_hdr in dlfcn.h
2868 do
2869 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2870 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2871 echo "configure:2872: checking for $ac_hdr" >&5
2872 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2873   echo $ac_n "(cached) $ac_c" 1>&6
2874 else
2875   cat > conftest.$ac_ext <<EOF
2876 #line 2877 "configure"
2877 #include "confdefs.h"
2878 #include <$ac_hdr>
2879 EOF
2880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2881 { (eval echo configure:2882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2883 if test -z "$ac_err"; then
2884   rm -rf conftest*
2885   eval "ac_cv_header_$ac_safe=yes"
2886 else
2887   echo "$ac_err" >&5
2888   echo "configure: failed program was:" >&5
2889   cat conftest.$ac_ext >&5
2890   rm -rf conftest*
2891   eval "ac_cv_header_$ac_safe=no"
2892 fi
2893 rm -f conftest*
2894 fi
2895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2896   echo "$ac_t""yes" 1>&6
2897     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2898   cat >> confdefs.h <<EOF
2899 #define $ac_tr_hdr 1
2900 EOF
2901  for ac_func in dlopen
2902 do
2903 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2904 echo "configure:2905: checking for $ac_func" >&5
2905 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2906   echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908   cat > conftest.$ac_ext <<EOF
2909 #line 2910 "configure"
2910 #include "confdefs.h"
2911 /* System header to define __stub macros and hopefully few prototypes,
2912     which can conflict with char $ac_func(); below.  */
2913 #include <assert.h>
2914 /* Override any gcc2 internal prototype to avoid an error.  */
2915 /* We use char because int might match the return type of a gcc2
2916     builtin and then its argument prototype would still apply.  */
2917 char $ac_func();
2918
2919 int main() {
2920
2921 /* The GNU C library defines this for functions which it implements
2922     to always fail with ENOSYS.  Some functions are actually named
2923     something starting with __ and the normal name is an alias.  */
2924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2925 choke me
2926 #else
2927 $ac_func();
2928 #endif
2929
2930 ; return 0; }
2931 EOF
2932 if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2933   rm -rf conftest*
2934   eval "ac_cv_func_$ac_func=yes"
2935 else
2936   echo "configure: failed program was:" >&5
2937   cat conftest.$ac_ext >&5
2938   rm -rf conftest*
2939   eval "ac_cv_func_$ac_func=no"
2940 fi
2941 rm -f conftest*
2942 fi
2943
2944 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2945   echo "$ac_t""yes" 1>&6
2946     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2947   cat >> confdefs.h <<EOF
2948 #define $ac_tr_func 1
2949 EOF
2950  
2951 else
2952   echo "$ac_t""no" 1>&6
2953 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2954 echo "configure:2955: checking for dlopen in -ldl" >&5
2955 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2957   echo $ac_n "(cached) $ac_c" 1>&6
2958 else
2959   ac_save_LIBS="$LIBS"
2960 LIBS="-ldl  $LIBS"
2961 cat > conftest.$ac_ext <<EOF
2962 #line 2963 "configure"
2963 #include "confdefs.h"
2964 /* Override any gcc2 internal prototype to avoid an error.  */
2965 /* We use char because int might match the return type of a gcc2
2966     builtin and then its argument prototype would still apply.  */
2967 char dlopen();
2968
2969 int main() {
2970 dlopen()
2971 ; return 0; }
2972 EOF
2973 if { (eval echo configure:2974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2974   rm -rf conftest*
2975   eval "ac_cv_lib_$ac_lib_var=yes"
2976 else
2977   echo "configure: failed program was:" >&5
2978   cat conftest.$ac_ext >&5
2979   rm -rf conftest*
2980   eval "ac_cv_lib_$ac_lib_var=no"
2981 fi
2982 rm -f conftest*
2983 LIBS="$ac_save_LIBS"
2984
2985 fi
2986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2987   echo "$ac_t""yes" 1>&6
2988   cat >> confdefs.h <<\EOF
2989 #define HAVE_DLOPEN 1
2990 EOF
2991
2992                      LIBS="$LIBS -ldl"
2993 else
2994   echo "$ac_t""no" 1>&6
2995 LIBEXT="a"
2996 fi
2997
2998         
2999 fi
3000 done
3001
3002 else
3003   echo "$ac_t""no" 1>&6
3004 LIBEXT="a"
3005     
3006 fi
3007 done
3008
3009
3010 JPEGLIB=""
3011
3012 for ac_hdr in jpeglib.h
3013 do
3014 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3015 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3016 echo "configure:3017: checking for $ac_hdr" >&5
3017 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3018   echo $ac_n "(cached) $ac_c" 1>&6
3019 else
3020   cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3023 #include <$ac_hdr>
3024 EOF
3025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3026 { (eval echo configure:3027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3028 if test -z "$ac_err"; then
3029   rm -rf conftest*
3030   eval "ac_cv_header_$ac_safe=yes"
3031 else
3032   echo "$ac_err" >&5
3033   echo "configure: failed program was:" >&5
3034   cat conftest.$ac_ext >&5
3035   rm -rf conftest*
3036   eval "ac_cv_header_$ac_safe=no"
3037 fi
3038 rm -f conftest*
3039 fi
3040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3041   echo "$ac_t""yes" 1>&6
3042     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3043   cat >> confdefs.h <<EOF
3044 #define $ac_tr_hdr 1
3045 EOF
3046  echo $ac_n "checking for jpeg_start_decompress in -ljpeg""... $ac_c" 1>&6
3047 echo "configure:3048: checking for jpeg_start_decompress in -ljpeg" >&5
3048 ac_lib_var=`echo jpeg'_'jpeg_start_decompress | sed 'y%./+-%__p_%'`
3049 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3050   echo $ac_n "(cached) $ac_c" 1>&6
3051 else
3052   ac_save_LIBS="$LIBS"
3053 LIBS="-ljpeg  $LIBS"
3054 cat > conftest.$ac_ext <<EOF
3055 #line 3056 "configure"
3056 #include "confdefs.h"
3057 /* Override any gcc2 internal prototype to avoid an error.  */
3058 /* We use char because int might match the return type of a gcc2
3059     builtin and then its argument prototype would still apply.  */
3060 char jpeg_start_decompress();
3061
3062 int main() {
3063 jpeg_start_decompress()
3064 ; return 0; }
3065 EOF
3066 if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3067   rm -rf conftest*
3068   eval "ac_cv_lib_$ac_lib_var=yes"
3069 else
3070   echo "configure: failed program was:" >&5
3071   cat conftest.$ac_ext >&5
3072   rm -rf conftest*
3073   eval "ac_cv_lib_$ac_lib_var=no"
3074 fi
3075 rm -f conftest*
3076 LIBS="$ac_save_LIBS"
3077
3078 fi
3079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3080   echo "$ac_t""yes" 1>&6
3081   cat >> confdefs.h <<\EOF
3082 #define HAVE_LIBJPEG 1
3083 EOF
3084
3085         JPEGLIB="-ljpeg"
3086     
3087 else
3088   echo "$ac_t""no" 1>&6
3089 fi
3090
3091
3092 else
3093   echo "$ac_t""no" 1>&6
3094 fi
3095 done
3096
3097
3098
3099
3100
3101 XFILES=""
3102
3103 OPENGLFILES=""
3104
3105 GLU32FILES=""
3106 if test "$have_x" = "yes"
3107 then
3108     XLIB="-lXext -lX11"
3109     ac_save_CPPFLAGS="$CPPFLAGS"
3110     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3111
3112         for ac_hdr in X11/xpm.h
3113 do
3114 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3115 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3116 echo "configure:3117: checking for $ac_hdr" >&5
3117 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120   cat > conftest.$ac_ext <<EOF
3121 #line 3122 "configure"
3122 #include "confdefs.h"
3123 #include <$ac_hdr>
3124 EOF
3125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3126 { (eval echo configure:3127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3128 if test -z "$ac_err"; then
3129   rm -rf conftest*
3130   eval "ac_cv_header_$ac_safe=yes"
3131 else
3132   echo "$ac_err" >&5
3133   echo "configure: failed program was:" >&5
3134   cat conftest.$ac_ext >&5
3135   rm -rf conftest*
3136   eval "ac_cv_header_$ac_safe=no"
3137 fi
3138 rm -f conftest*
3139 fi
3140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3141   echo "$ac_t""yes" 1>&6
3142     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3143   cat >> confdefs.h <<EOF
3144 #define $ac_tr_hdr 1
3145 EOF
3146           echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6
3147 echo "configure:3148: checking for XpmCreatePixmapFromData in -lXpm" >&5
3148 ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'`
3149 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3150   echo $ac_n "(cached) $ac_c" 1>&6
3151 else
3152   ac_save_LIBS="$LIBS"
3153 LIBS="-lXpm $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3154          $LIBS"
3155 cat > conftest.$ac_ext <<EOF
3156 #line 3157 "configure"
3157 #include "confdefs.h"
3158 /* Override any gcc2 internal prototype to avoid an error.  */
3159 /* We use char because int might match the return type of a gcc2
3160     builtin and then its argument prototype would still apply.  */
3161 char XpmCreatePixmapFromData();
3162
3163 int main() {
3164 XpmCreatePixmapFromData()
3165 ; return 0; }
3166 EOF
3167 if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3168   rm -rf conftest*
3169   eval "ac_cv_lib_$ac_lib_var=yes"
3170 else
3171   echo "configure: failed program was:" >&5
3172   cat conftest.$ac_ext >&5
3173   rm -rf conftest*
3174   eval "ac_cv_lib_$ac_lib_var=no"
3175 fi
3176 rm -f conftest*
3177 LIBS="$ac_save_LIBS"
3178
3179 fi
3180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3181   echo "$ac_t""yes" 1>&6
3182    cat >> confdefs.h <<\EOF
3183 #define HAVE_LIBXXPM 1
3184 EOF
3185
3186             X_PRE_LIBS="$X_PRE_LIBS -lXpm"
3187 else
3188   echo "$ac_t""no" 1>&6
3189 fi
3190
3191       
3192 else
3193   echo "$ac_t""no" 1>&6
3194                                 echo "Install the following packages:"
3195         echo "Red Hat < 7.1     :       xpm xpm-devel"
3196         echo "Red Hat >= 7.1    :       XFree86-devel"
3197         echo "Caldera OpenLinux :       xpm xpm-devel xpm-devel-static"
3198         echo "SuSE              :       xpm"
3199         echo "Debian/Corel Linux:       xpm4g xpm4g-dev"
3200         echo "Solaris 8         :       SFWxpm"
3201         echo
3202         echo "Or get the sources from ftp.x.org and all its mirror sites from "
3203         echo "the directory /contrib/libraries."
3204         echo
3205         exit 1
3206       
3207     
3208 fi
3209 done
3210
3211
3212         for ac_hdr in X11/Xlib.h
3213 do
3214 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3215 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3216 echo "configure:3217: checking for $ac_hdr" >&5
3217 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220   cat > conftest.$ac_ext <<EOF
3221 #line 3222 "configure"
3222 #include "confdefs.h"
3223 #include <$ac_hdr>
3224 EOF
3225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3226 { (eval echo configure:3227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3228 if test -z "$ac_err"; then
3229   rm -rf conftest*
3230   eval "ac_cv_header_$ac_safe=yes"
3231 else
3232   echo "$ac_err" >&5
3233   echo "configure: failed program was:" >&5
3234   cat conftest.$ac_ext >&5
3235   rm -rf conftest*
3236   eval "ac_cv_header_$ac_safe=no"
3237 fi
3238 rm -f conftest*
3239 fi
3240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3241   echo "$ac_t""yes" 1>&6
3242     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3243   cat >> confdefs.h <<EOF
3244 #define $ac_tr_hdr 1
3245 EOF
3246  
3247                 for ac_hdr in X11/XKBlib.h
3248 do
3249 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3251 echo "configure:3252: checking for $ac_hdr" >&5
3252 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3253   echo $ac_n "(cached) $ac_c" 1>&6
3254 else
3255   cat > conftest.$ac_ext <<EOF
3256 #line 3257 "configure"
3257 #include "confdefs.h"
3258 #include <$ac_hdr>
3259 EOF
3260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3261 { (eval echo configure:3262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3263 if test -z "$ac_err"; then
3264   rm -rf conftest*
3265   eval "ac_cv_header_$ac_safe=yes"
3266 else
3267   echo "$ac_err" >&5
3268   echo "configure: failed program was:" >&5
3269   cat conftest.$ac_ext >&5
3270   rm -rf conftest*
3271   eval "ac_cv_header_$ac_safe=no"
3272 fi
3273 rm -f conftest*
3274 fi
3275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3276   echo "$ac_t""yes" 1>&6
3277     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3278   cat >> confdefs.h <<EOF
3279 #define $ac_tr_hdr 1
3280 EOF
3281                 echo $ac_n "checking for XkbQueryExtension in -lX11""... $ac_c" 1>&6
3282 echo "configure:3283: checking for XkbQueryExtension in -lX11" >&5
3283 ac_lib_var=`echo X11'_'XkbQueryExtension | sed 'y%./+-%__p_%'`
3284 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3285   echo $ac_n "(cached) $ac_c" 1>&6
3286 else
3287   ac_save_LIBS="$LIBS"
3288 LIBS="-lX11 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3289 cat > conftest.$ac_ext <<EOF
3290 #line 3291 "configure"
3291 #include "confdefs.h"
3292 /* Override any gcc2 internal prototype to avoid an error.  */
3293 /* We use char because int might match the return type of a gcc2
3294     builtin and then its argument prototype would still apply.  */
3295 char XkbQueryExtension();
3296
3297 int main() {
3298 XkbQueryExtension()
3299 ; return 0; }
3300 EOF
3301 if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3302   rm -rf conftest*
3303   eval "ac_cv_lib_$ac_lib_var=yes"
3304 else
3305   echo "configure: failed program was:" >&5
3306   cat conftest.$ac_ext >&5
3307   rm -rf conftest*
3308   eval "ac_cv_lib_$ac_lib_var=no"
3309 fi
3310 rm -f conftest*
3311 LIBS="$ac_save_LIBS"
3312
3313 fi
3314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3315   echo "$ac_t""yes" 1>&6
3316   cat >> confdefs.h <<\EOF
3317 #define HAVE_XKB 1
3318 EOF
3319
3320 else
3321   echo "$ac_t""no" 1>&6
3322 fi
3323
3324             
3325 else
3326   echo "$ac_t""no" 1>&6
3327 echo "configure: warning: XKB extension not found!!" 1>&2
3328         
3329 fi
3330 done
3331
3332
3333                 for ac_hdr in X11/extensions/XShm.h
3334 do
3335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3337 echo "configure:3338: checking for $ac_hdr" >&5
3338 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3339   echo $ac_n "(cached) $ac_c" 1>&6
3340 else
3341   cat > conftest.$ac_ext <<EOF
3342 #line 3343 "configure"
3343 #include "confdefs.h"
3344 #include <$ac_hdr>
3345 EOF
3346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3347 { (eval echo configure:3348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3349 if test -z "$ac_err"; then
3350   rm -rf conftest*
3351   eval "ac_cv_header_$ac_safe=yes"
3352 else
3353   echo "$ac_err" >&5
3354   echo "configure: failed program was:" >&5
3355   cat conftest.$ac_ext >&5
3356   rm -rf conftest*
3357   eval "ac_cv_header_$ac_safe=no"
3358 fi
3359 rm -f conftest*
3360 fi
3361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3362   echo "$ac_t""yes" 1>&6
3363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3364   cat >> confdefs.h <<EOF
3365 #define $ac_tr_hdr 1
3366 EOF
3367                 echo $ac_n "checking for XShmQueryExtension in -lXext""... $ac_c" 1>&6
3368 echo "configure:3369: checking for XShmQueryExtension in -lXext" >&5
3369 ac_lib_var=`echo Xext'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
3370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3371   echo $ac_n "(cached) $ac_c" 1>&6
3372 else
3373   ac_save_LIBS="$LIBS"
3374 LIBS="-lXext $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3375 cat > conftest.$ac_ext <<EOF
3376 #line 3377 "configure"
3377 #include "confdefs.h"
3378 /* Override any gcc2 internal prototype to avoid an error.  */
3379 /* We use char because int might match the return type of a gcc2
3380     builtin and then its argument prototype would still apply.  */
3381 char XShmQueryExtension();
3382
3383 int main() {
3384 XShmQueryExtension()
3385 ; return 0; }
3386 EOF
3387 if { (eval echo configure:3388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3388   rm -rf conftest*
3389   eval "ac_cv_lib_$ac_lib_var=yes"
3390 else
3391   echo "configure: failed program was:" >&5
3392   cat conftest.$ac_ext >&5
3393   rm -rf conftest*
3394   eval "ac_cv_lib_$ac_lib_var=no"
3395 fi
3396 rm -f conftest*
3397 LIBS="$ac_save_LIBS"
3398
3399 fi
3400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3401   echo "$ac_t""yes" 1>&6
3402   cat >> confdefs.h <<\EOF
3403 #define HAVE_LIBXXSHM 1
3404 EOF
3405
3406 else
3407   echo "$ac_t""no" 1>&6
3408 fi
3409
3410             
3411 else
3412   echo "$ac_t""no" 1>&6
3413 echo "configure: warning: Xshm extension not found!!" 1>&2
3414         
3415 fi
3416 done
3417
3418
3419                 for ac_hdr in X11/extensions/shape.h
3420 do
3421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3423 echo "configure:3424: checking for $ac_hdr" >&5
3424 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3425   echo $ac_n "(cached) $ac_c" 1>&6
3426 else
3427   cat > conftest.$ac_ext <<EOF
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3430 #include <$ac_hdr>
3431 EOF
3432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3433 { (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3435 if test -z "$ac_err"; then
3436   rm -rf conftest*
3437   eval "ac_cv_header_$ac_safe=yes"
3438 else
3439   echo "$ac_err" >&5
3440   echo "configure: failed program was:" >&5
3441   cat conftest.$ac_ext >&5
3442   rm -rf conftest*
3443   eval "ac_cv_header_$ac_safe=no"
3444 fi
3445 rm -f conftest*
3446 fi
3447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3448   echo "$ac_t""yes" 1>&6
3449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3450   cat >> confdefs.h <<EOF
3451 #define $ac_tr_hdr 1
3452 EOF
3453                 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
3454 echo "configure:3455: checking for XShapeQueryExtension in -lXext" >&5
3455 ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
3456 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3457   echo $ac_n "(cached) $ac_c" 1>&6
3458 else
3459   ac_save_LIBS="$LIBS"
3460 LIBS="-lXext $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
3461 cat > conftest.$ac_ext <<EOF
3462 #line 3463 "configure"
3463 #include "confdefs.h"
3464 /* Override any gcc2 internal prototype to avoid an error.  */
3465 /* We use char because int might match the return type of a gcc2
3466     builtin and then its argument prototype would still apply.  */
3467 char XShapeQueryExtension();
3468
3469 int main() {
3470 XShapeQueryExtension()
3471 ; return 0; }
3472 EOF
3473 if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3474   rm -rf conftest*
3475   eval "ac_cv_lib_$ac_lib_var=yes"
3476 else
3477   echo "configure: failed program was:" >&5
3478   cat conftest.$ac_ext >&5
3479   rm -rf conftest*
3480   eval "ac_cv_lib_$ac_lib_var=no"
3481 fi
3482 rm -f conftest*
3483 LIBS="$ac_save_LIBS"
3484
3485 fi
3486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3487   echo "$ac_t""yes" 1>&6
3488   cat >> confdefs.h <<\EOF
3489 #define HAVE_LIBXSHAPE 1
3490 EOF
3491
3492 else
3493   echo "$ac_t""no" 1>&6
3494 fi
3495
3496             
3497 else
3498   echo "$ac_t""no" 1>&6
3499 echo "configure: warning: XShape extension not found!!" 1>&2
3500         
3501 fi
3502 done
3503
3504         
3505                 for ac_hdr in X11/extensions/xf86dga.h
3506 do
3507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3509 echo "configure:3510: checking for $ac_hdr" >&5
3510 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3511   echo $ac_n "(cached) $ac_c" 1>&6
3512 else
3513   cat > conftest.$ac_ext <<EOF
3514 #line 3515 "configure"
3515 #include "confdefs.h"
3516 #include <$ac_hdr>
3517 EOF
3518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3519 { (eval echo configure:3520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3521 if test -z "$ac_err"; then
3522   rm -rf conftest*
3523   eval "ac_cv_header_$ac_safe=yes"
3524 else
3525   echo "$ac_err" >&5
3526   echo "configure: failed program was:" >&5
3527   cat conftest.$ac_ext >&5
3528   rm -rf conftest*
3529   eval "ac_cv_header_$ac_safe=no"
3530 fi
3531 rm -f conftest*
3532 fi
3533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3534   echo "$ac_t""yes" 1>&6
3535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3536   cat >> confdefs.h <<EOF
3537 #define $ac_tr_hdr 1
3538 EOF
3539                               echo $ac_n "checking for XDGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
3540 echo "configure:3541: checking for XDGAQueryExtension in -lXxf86dga" >&5
3541 ac_lib_var=`echo Xxf86dga'_'XDGAQueryExtension | sed 'y%./+-%__p_%'`
3542 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3543   echo $ac_n "(cached) $ac_c" 1>&6
3544 else
3545   ac_save_LIBS="$LIBS"
3546 LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3547                $LIBS"
3548 cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551 /* Override any gcc2 internal prototype to avoid an error.  */
3552 /* We use char because int might match the return type of a gcc2
3553     builtin and then its argument prototype would still apply.  */
3554 char XDGAQueryExtension();
3555
3556 int main() {
3557 XDGAQueryExtension()
3558 ; return 0; }
3559 EOF
3560 if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3561   rm -rf conftest*
3562   eval "ac_cv_lib_$ac_lib_var=yes"
3563 else
3564   echo "configure: failed program was:" >&5
3565   cat conftest.$ac_ext >&5
3566   rm -rf conftest*
3567   eval "ac_cv_lib_$ac_lib_var=no"
3568 fi
3569 rm -f conftest*
3570 LIBS="$ac_save_LIBS"
3571
3572 fi
3573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3574   echo "$ac_t""yes" 1>&6
3575                      cat >> confdefs.h <<\EOF
3576 #define HAVE_LIBXXF86DGA2 1
3577 EOF
3578
3579                   X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
3580                
3581 else
3582   echo "$ac_t""no" 1>&6
3583                                      echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
3584 echo "configure:3585: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
3585 ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
3586 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3587   echo $ac_n "(cached) $ac_c" 1>&6
3588 else
3589   ac_save_LIBS="$LIBS"
3590 LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3591                    $LIBS"
3592 cat > conftest.$ac_ext <<EOF
3593 #line 3594 "configure"
3594 #include "confdefs.h"
3595 /* Override any gcc2 internal prototype to avoid an error.  */
3596 /* We use char because int might match the return type of a gcc2
3597     builtin and then its argument prototype would still apply.  */
3598 char XF86DGAQueryExtension();
3599
3600 int main() {
3601 XF86DGAQueryExtension()
3602 ; return 0; }
3603 EOF
3604 if { (eval echo configure:3605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3605   rm -rf conftest*
3606   eval "ac_cv_lib_$ac_lib_var=yes"
3607 else
3608   echo "configure: failed program was:" >&5
3609   cat conftest.$ac_ext >&5
3610   rm -rf conftest*
3611   eval "ac_cv_lib_$ac_lib_var=no"
3612 fi
3613 rm -f conftest*
3614 LIBS="$ac_save_LIBS"
3615
3616 fi
3617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3618   echo "$ac_t""yes" 1>&6
3619    cat >> confdefs.h <<\EOF
3620 #define HAVE_LIBXXF86DGA 1
3621 EOF
3622
3623                       X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
3624                     
3625 else
3626   echo "$ac_t""no" 1>&6
3627 fi
3628
3629                 
3630 fi
3631
3632             
3633 else
3634   echo "$ac_t""no" 1>&6
3635 echo "configure: warning: DGA extension not found!!" 1>&2
3636         
3637 fi
3638 done
3639
3640
3641                 for ac_hdr in X11/extensions/xf86vmode.h
3642 do
3643 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3644 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3645 echo "configure:3646: checking for $ac_hdr" >&5
3646 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3647   echo $ac_n "(cached) $ac_c" 1>&6
3648 else
3649   cat > conftest.$ac_ext <<EOF
3650 #line 3651 "configure"
3651 #include "confdefs.h"
3652 #include <$ac_hdr>
3653 EOF
3654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3655 { (eval echo configure:3656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3657 if test -z "$ac_err"; then
3658   rm -rf conftest*
3659   eval "ac_cv_header_$ac_safe=yes"
3660 else
3661   echo "$ac_err" >&5
3662   echo "configure: failed program was:" >&5
3663   cat conftest.$ac_ext >&5
3664   rm -rf conftest*
3665   eval "ac_cv_header_$ac_safe=no"
3666 fi
3667 rm -f conftest*
3668 fi
3669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3670   echo "$ac_t""yes" 1>&6
3671     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3672   cat >> confdefs.h <<EOF
3673 #define $ac_tr_hdr 1
3674 EOF
3675                   echo $ac_n "checking for XF86VidModeQueryExtension in -lXxf86vm""... $ac_c" 1>&6
3676 echo "configure:3677: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5
3677 ac_lib_var=`echo Xxf86vm'_'XF86VidModeQueryExtension | sed 'y%./+-%__p_%'`
3678 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3679   echo $ac_n "(cached) $ac_c" 1>&6
3680 else
3681   ac_save_LIBS="$LIBS"
3682 LIBS="-lXxf86vm $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3683                  $LIBS"
3684 cat > conftest.$ac_ext <<EOF
3685 #line 3686 "configure"
3686 #include "confdefs.h"
3687 /* Override any gcc2 internal prototype to avoid an error.  */
3688 /* We use char because int might match the return type of a gcc2
3689     builtin and then its argument prototype would still apply.  */
3690 char XF86VidModeQueryExtension();
3691
3692 int main() {
3693 XF86VidModeQueryExtension()
3694 ; return 0; }
3695 EOF
3696 if { (eval echo configure:3697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3697   rm -rf conftest*
3698   eval "ac_cv_lib_$ac_lib_var=yes"
3699 else
3700   echo "configure: failed program was:" >&5
3701   cat conftest.$ac_ext >&5
3702   rm -rf conftest*
3703   eval "ac_cv_lib_$ac_lib_var=no"
3704 fi
3705 rm -f conftest*
3706 LIBS="$ac_save_LIBS"
3707
3708 fi
3709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3710   echo "$ac_t""yes" 1>&6
3711    cat >> confdefs.h <<\EOF
3712 #define HAVE_LIBXXF86VM 1
3713 EOF
3714
3715                      X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
3716                   
3717 else
3718   echo "$ac_t""no" 1>&6
3719 fi
3720
3721             
3722 else
3723   echo "$ac_t""no" 1>&6
3724 echo "configure: warning: XFree86 VMODE extension not found!!" 1>&2
3725         
3726 fi
3727 done
3728
3729
3730                 for ac_hdr in X11/extensions/Xvlib.h
3731 do
3732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3734 echo "configure:3735: checking for $ac_hdr" >&5
3735 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3736   echo $ac_n "(cached) $ac_c" 1>&6
3737 else
3738   cat > conftest.$ac_ext <<EOF
3739 #line 3740 "configure"
3740 #include "confdefs.h"
3741 #include <$ac_hdr>
3742 EOF
3743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3744 { (eval echo configure:3745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3746 if test -z "$ac_err"; then
3747   rm -rf conftest*
3748   eval "ac_cv_header_$ac_safe=yes"
3749 else
3750   echo "$ac_err" >&5
3751   echo "configure: failed program was:" >&5
3752   cat conftest.$ac_ext >&5
3753   rm -rf conftest*
3754   eval "ac_cv_header_$ac_safe=no"
3755 fi
3756 rm -f conftest*
3757 fi
3758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3759   echo "$ac_t""yes" 1>&6
3760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3761   cat >> confdefs.h <<EOF
3762 #define $ac_tr_hdr 1
3763 EOF
3764                   echo $ac_n "checking for XvShmCreateImage in -lXv""... $ac_c" 1>&6
3765 echo "configure:3766: checking for XvShmCreateImage in -lXv" >&5
3766 ac_lib_var=`echo Xv'_'XvShmCreateImage | sed 'y%./+-%__p_%'`
3767 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3768   echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770   ac_save_LIBS="$LIBS"
3771 LIBS="-lXv $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3772                  $LIBS"
3773 cat > conftest.$ac_ext <<EOF
3774 #line 3775 "configure"
3775 #include "confdefs.h"
3776 /* Override any gcc2 internal prototype to avoid an error.  */
3777 /* We use char because int might match the return type of a gcc2
3778     builtin and then its argument prototype would still apply.  */
3779 char XvShmCreateImage();
3780
3781 int main() {
3782 XvShmCreateImage()
3783 ; return 0; }
3784 EOF
3785 if { (eval echo configure:3786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3786   rm -rf conftest*
3787   eval "ac_cv_lib_$ac_lib_var=yes"
3788 else
3789   echo "configure: failed program was:" >&5
3790   cat conftest.$ac_ext >&5
3791   rm -rf conftest*
3792   eval "ac_cv_lib_$ac_lib_var=no"
3793 fi
3794 rm -f conftest*
3795 LIBS="$ac_save_LIBS"
3796
3797 fi
3798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3799   echo "$ac_t""yes" 1>&6
3800    cat >> confdefs.h <<\EOF
3801 #define HAVE_XVIDEO 1
3802 EOF
3803
3804                      X_PRE_LIBS="$X_PRE_LIBS -lXv"
3805                   
3806 else
3807   echo "$ac_t""no" 1>&6
3808 fi
3809
3810             
3811 else
3812   echo "$ac_t""no" 1>&6
3813 echo "configure: warning: XVideo extension not found !!" 1>&2
3814         
3815 fi
3816 done
3817
3818
3819                 for ac_hdr in X11/extensions/Xrender.h
3820 do
3821 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3822 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3823 echo "configure:3824: checking for $ac_hdr" >&5
3824 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3825   echo $ac_n "(cached) $ac_c" 1>&6
3826 else
3827   cat > conftest.$ac_ext <<EOF
3828 #line 3829 "configure"
3829 #include "confdefs.h"
3830 #include <$ac_hdr>
3831 EOF
3832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3833 { (eval echo configure:3834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3835 if test -z "$ac_err"; then
3836   rm -rf conftest*
3837   eval "ac_cv_header_$ac_safe=yes"
3838 else
3839   echo "$ac_err" >&5
3840   echo "configure: failed program was:" >&5
3841   cat conftest.$ac_ext >&5
3842   rm -rf conftest*
3843   eval "ac_cv_header_$ac_safe=no"
3844 fi
3845 rm -f conftest*
3846 fi
3847 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3848   echo "$ac_t""yes" 1>&6
3849     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3850   cat >> confdefs.h <<EOF
3851 #define $ac_tr_hdr 1
3852 EOF
3853                   echo $ac_n "checking for XRenderQueryExtension in -lXrender""... $ac_c" 1>&6
3854 echo "configure:3855: checking for XRenderQueryExtension in -lXrender" >&5
3855 ac_lib_var=`echo Xrender'_'XRenderQueryExtension | sed 'y%./+-%__p_%'`
3856 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3857   echo $ac_n "(cached) $ac_c" 1>&6
3858 else
3859   ac_save_LIBS="$LIBS"
3860 LIBS="-lXrender $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
3861                  $LIBS"
3862 cat > conftest.$ac_ext <<EOF
3863 #line 3864 "configure"
3864 #include "confdefs.h"
3865 /* Override any gcc2 internal prototype to avoid an error.  */
3866 /* We use char because int might match the return type of a gcc2
3867     builtin and then its argument prototype would still apply.  */
3868 char XRenderQueryExtension();
3869
3870 int main() {
3871 XRenderQueryExtension()
3872 ; return 0; }
3873 EOF
3874 if { (eval echo configure:3875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3875   rm -rf conftest*
3876   eval "ac_cv_lib_$ac_lib_var=yes"
3877 else
3878   echo "configure: failed program was:" >&5
3879   cat conftest.$ac_ext >&5
3880   rm -rf conftest*
3881   eval "ac_cv_lib_$ac_lib_var=no"
3882 fi
3883 rm -f conftest*
3884 LIBS="$ac_save_LIBS"
3885
3886 fi
3887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3888   echo "$ac_t""yes" 1>&6
3889    cat >> confdefs.h <<\EOF
3890 #define HAVE_LIBXRENDER 1
3891 EOF
3892
3893                      X_PRE_LIBS="$X_PRE_LIBS -lXrender"
3894                   
3895 else
3896   echo "$ac_t""no" 1>&6
3897 fi
3898
3899             
3900 else
3901   echo "$ac_t""no" 1>&6
3902 echo "configure: warning: XRender extension not found !!" 1>&2
3903         
3904 fi
3905 done
3906
3907
3908       
3909     
3910 else
3911   echo "$ac_t""no" 1>&6
3912 fi
3913 done
3914  
3915         if test $OPENGL = "yes" -o $OPENGL = "normal"
3916     then
3917         for ac_hdr in GL/gl.h GL/glx.h GL/glext.h
3918 do
3919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3921 echo "configure:3922: checking for $ac_hdr" >&5
3922 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3923   echo $ac_n "(cached) $ac_c" 1>&6
3924 else
3925   cat > conftest.$ac_ext <<EOF
3926 #line 3927 "configure"
3927 #include "confdefs.h"
3928 #include <$ac_hdr>
3929 EOF
3930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3931 { (eval echo configure:3932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3933 if test -z "$ac_err"; then
3934   rm -rf conftest*
3935   eval "ac_cv_header_$ac_safe=yes"
3936 else
3937   echo "$ac_err" >&5
3938   echo "configure: failed program was:" >&5
3939   cat conftest.$ac_ext >&5
3940   rm -rf conftest*
3941   eval "ac_cv_header_$ac_safe=no"
3942 fi
3943 rm -f conftest*
3944 fi
3945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3946   echo "$ac_t""yes" 1>&6
3947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3948   cat >> confdefs.h <<EOF
3949 #define $ac_tr_hdr 1
3950 EOF
3951  
3952 else
3953   echo "$ac_t""no" 1>&6
3954 fi
3955 done
3956
3957         if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
3958         then
3959                     echo $ac_n "checking for up-to-date OpenGL version""... $ac_c" 1>&6
3960 echo "configure:3961: checking for up-to-date OpenGL version" >&5
3961 if eval "test \"`echo '$''{'wine_cv_opengl_version_OK'+set}'`\" = set"; then
3962   echo $ac_n "(cached) $ac_c" 1>&6
3963 else
3964   cat > conftest.$ac_ext <<EOF
3965 #line 3966 "configure"
3966 #include "confdefs.h"
3967 #include <GL/gl.h>
3968 int main() {
3969 GLenum test = GL_UNSIGNED_SHORT_5_6_5;
3970 ; return 0; }
3971 EOF
3972 if { (eval echo configure:3973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3973   rm -rf conftest*
3974   wine_cv_opengl_version_OK="yes"
3975 else
3976   echo "configure: failed program was:" >&5
3977   cat conftest.$ac_ext >&5
3978   rm -rf conftest*
3979   wine_cv_opengl_version_OK="no"
3980               
3981 fi
3982 rm -f conftest*
3983             
3984 fi
3985
3986 echo "$ac_t""$wine_cv_opengl_version_OK" 1>&6
3987
3988                     echo $ac_n "checking for thread-safe OpenGL version""... $ac_c" 1>&6
3989 echo "configure:3990: checking for thread-safe OpenGL version" >&5
3990 if eval "test \"`echo '$''{'wine_cv_opengl_version_threadsafe'+set}'`\" = set"; then
3991   echo $ac_n "(cached) $ac_c" 1>&6
3992 else
3993   saved_libs=$LIBS
3994                LIBS="$X_LIBS -lGL"
3995                cat > conftest.$ac_ext <<EOF
3996 #line 3997 "configure"
3997 #include "confdefs.h"
3998
3999 int main() {
4000 pthread_getspecific();
4001 ; return 0; }
4002 EOF
4003 if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4004   rm -rf conftest*
4005   wine_cv_opengl_version_threadsafe="yes"
4006 else
4007   echo "configure: failed program was:" >&5
4008   cat conftest.$ac_ext >&5
4009   rm -rf conftest*
4010   wine_cv_opengl_version_threadsafe="no"
4011 fi
4012 rm -f conftest*
4013                LIBS=$saved_libs
4014             
4015 fi
4016
4017 echo "$ac_t""$wine_cv_opengl_version_threadsafe" 1>&6
4018
4019             if test "$wine_cv_opengl_version_OK" = "yes" -a \( "$wine_cv_opengl_version_threadsafe" = "no" -o $OPENGL = "yes" \)
4020             then
4021                                 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
4022 echo "configure:4023: checking for glXCreateContext in -lGL" >&5
4023 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
4024 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4025   echo $ac_n "(cached) $ac_c" 1>&6
4026 else
4027   ac_save_LIBS="$LIBS"
4028 LIBS="-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
4029 cat > conftest.$ac_ext <<EOF
4030 #line 4031 "configure"
4031 #include "confdefs.h"
4032 /* Override any gcc2 internal prototype to avoid an error.  */
4033 /* We use char because int might match the return type of a gcc2
4034     builtin and then its argument prototype would still apply.  */
4035 char glXCreateContext();
4036
4037 int main() {
4038 glXCreateContext()
4039 ; return 0; }
4040 EOF
4041 if { (eval echo configure:4042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4042   rm -rf conftest*
4043   eval "ac_cv_lib_$ac_lib_var=yes"
4044 else
4045   echo "configure: failed program was:" >&5
4046   cat conftest.$ac_ext >&5
4047   rm -rf conftest*
4048   eval "ac_cv_lib_$ac_lib_var=no"
4049 fi
4050 rm -f conftest*
4051 LIBS="$ac_save_LIBS"
4052
4053 fi
4054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4055   echo "$ac_t""yes" 1>&6
4056   X_PRE_LIBS="$X_PRE_LIBS -lGL"
4057                              
4058 else
4059   echo "$ac_t""no" 1>&6
4060 fi
4061
4062
4063                 if test $ac_cv_lib_GL_glXCreateContext = "yes"
4064                 then
4065
4066                         OPENGLFILES='$(OPENGLFILES)'
4067                         cat >> confdefs.h <<\EOF
4068 #define HAVE_OPENGL 1
4069 EOF
4070
4071
4072                         echo $ac_n "checking for glXGetProcAddressARB in -lGL""... $ac_c" 1>&6
4073 echo "configure:4074: checking for glXGetProcAddressARB in -lGL" >&5
4074 ac_lib_var=`echo GL'_'glXGetProcAddressARB | sed 'y%./+-%__p_%'`
4075 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4076   echo $ac_n "(cached) $ac_c" 1>&6
4077 else
4078   ac_save_LIBS="$LIBS"
4079 LIBS="-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS"
4080 cat > conftest.$ac_ext <<EOF
4081 #line 4082 "configure"
4082 #include "confdefs.h"
4083 /* Override any gcc2 internal prototype to avoid an error.  */
4084 /* We use char because int might match the return type of a gcc2
4085     builtin and then its argument prototype would still apply.  */
4086 char glXGetProcAddressARB();
4087
4088 int main() {
4089 glXGetProcAddressARB()
4090 ; return 0; }
4091 EOF
4092 if { (eval echo configure:4093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4093   rm -rf conftest*
4094   eval "ac_cv_lib_$ac_lib_var=yes"
4095 else
4096   echo "configure: failed program was:" >&5
4097   cat conftest.$ac_ext >&5
4098   rm -rf conftest*
4099   eval "ac_cv_lib_$ac_lib_var=no"
4100 fi
4101 rm -f conftest*
4102 LIBS="$ac_save_LIBS"
4103
4104 fi
4105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4106   echo "$ac_t""yes" 1>&6
4107   cat >> confdefs.h <<\EOF
4108 #define HAVE_GLX_GETPROCADDRESS 1
4109 EOF
4110
4111 else
4112   echo "$ac_t""no" 1>&6
4113 fi
4114
4115
4116                         if test $ac_cv_lib_GL_glXGetProcAddressARB = "yes"
4117                         then
4118                                echo $ac_n "checking for OpenGL extension functions prototypes""... $ac_c" 1>&6
4119 echo "configure:4120: checking for OpenGL extension functions prototypes" >&5
4120 if eval "test \"`echo '$''{'wine_cv_extension_prototypes'+set}'`\" = set"; then
4121   echo $ac_n "(cached) $ac_c" 1>&6
4122 else
4123   cat > conftest.$ac_ext <<EOF
4124 #line 4125 "configure"
4125 #include "confdefs.h"
4126 #include <GL/gl.h>
4127                                                   #ifdef HAVE_GL_GLEXT_H
4128                                                   # include <GL/glext.h>
4129                                                   #endif
4130                                                   
4131 int main() {
4132 PFNGLCOLORTABLEEXTPROC test_proc;
4133 ; return 0; }
4134 EOF
4135 if { (eval echo configure:4136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4136   rm -rf conftest*
4137   wine_cv_extension_prototypes="yes"
4138 else
4139   echo "configure: failed program was:" >&5
4140   cat conftest.$ac_ext >&5
4141   rm -rf conftest*
4142   wine_cv_extension_prototypes="no"
4143                                   
4144 fi
4145 rm -f conftest*
4146                                 
4147 fi
4148
4149 echo "$ac_t""$wine_cv_extension_prototypes" 1>&6
4150                                 if test $wine_cv_extension_prototypes = "yes"
4151                                 then
4152                                     cat >> confdefs.h <<\EOF
4153 #define HAVE_GLEXT_PROTOTYPES 1
4154 EOF
4155
4156                                 fi
4157                         fi
4158
4159                 fi
4160                                 echo $ac_n "checking for gluLookAt in -lGLU""... $ac_c" 1>&6
4161 echo "configure:4162: checking for gluLookAt in -lGLU" >&5
4162 ac_lib_var=`echo GLU'_'gluLookAt | sed 'y%./+-%__p_%'`
4163 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4164   echo $ac_n "(cached) $ac_c" 1>&6
4165 else
4166   ac_save_LIBS="$LIBS"
4167 LIBS="-lGLU $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
4168                  $LIBS"
4169 cat > conftest.$ac_ext <<EOF
4170 #line 4171 "configure"
4171 #include "confdefs.h"
4172 /* Override any gcc2 internal prototype to avoid an error.  */
4173 /* We use char because int might match the return type of a gcc2
4174     builtin and then its argument prototype would still apply.  */
4175 char gluLookAt();
4176
4177 int main() {
4178 gluLookAt()
4179 ; return 0; }
4180 EOF
4181 if { (eval echo configure:4182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4182   rm -rf conftest*
4183   eval "ac_cv_lib_$ac_lib_var=yes"
4184 else
4185   echo "configure: failed program was:" >&5
4186   cat conftest.$ac_ext >&5
4187   rm -rf conftest*
4188   eval "ac_cv_lib_$ac_lib_var=no"
4189 fi
4190 rm -f conftest*
4191 LIBS="$ac_save_LIBS"
4192
4193 fi
4194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4195   echo "$ac_t""yes" 1>&6
4196   X_PRE_LIBS="$X_PRE_LIBS -lGLU"
4197                              GLU32FILES='$(GLU32FILES)'
4198                              
4199 else
4200   echo "$ac_t""no" 1>&6
4201 fi
4202
4203              fi
4204          fi
4205     fi
4206
4207     CPPFLAGS="$ac_save_CPPFLAGS"
4208     XFILES='$(XFILES)'
4209 else
4210     XLIB=""
4211     X_CFLAGS=""
4212     X_LIBS=""
4213 fi
4214
4215 if test "$CURSES" = "yes"
4216 then
4217     for ac_hdr in ncurses.h
4218 do
4219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4221 echo "configure:4222: checking for $ac_hdr" >&5
4222 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4223   echo $ac_n "(cached) $ac_c" 1>&6
4224 else
4225   cat > conftest.$ac_ext <<EOF
4226 #line 4227 "configure"
4227 #include "confdefs.h"
4228 #include <$ac_hdr>
4229 EOF
4230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4231 { (eval echo configure:4232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4233 if test -z "$ac_err"; then
4234   rm -rf conftest*
4235   eval "ac_cv_header_$ac_safe=yes"
4236 else
4237   echo "$ac_err" >&5
4238   echo "configure: failed program was:" >&5
4239   cat conftest.$ac_ext >&5
4240   rm -rf conftest*
4241   eval "ac_cv_header_$ac_safe=no"
4242 fi
4243 rm -f conftest*
4244 fi
4245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4246   echo "$ac_t""yes" 1>&6
4247     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4248   cat >> confdefs.h <<EOF
4249 #define $ac_tr_hdr 1
4250 EOF
4251  echo $ac_n "checking for waddch in -lncurses""... $ac_c" 1>&6
4252 echo "configure:4253: checking for waddch in -lncurses" >&5
4253 ac_lib_var=`echo ncurses'_'waddch | sed 'y%./+-%__p_%'`
4254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4255   echo $ac_n "(cached) $ac_c" 1>&6
4256 else
4257   ac_save_LIBS="$LIBS"
4258 LIBS="-lncurses  $LIBS"
4259 cat > conftest.$ac_ext <<EOF
4260 #line 4261 "configure"
4261 #include "confdefs.h"
4262 /* Override any gcc2 internal prototype to avoid an error.  */
4263 /* We use char because int might match the return type of a gcc2
4264     builtin and then its argument prototype would still apply.  */
4265 char waddch();
4266
4267 int main() {
4268 waddch()
4269 ; return 0; }
4270 EOF
4271 if { (eval echo configure:4272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4272   rm -rf conftest*
4273   eval "ac_cv_lib_$ac_lib_var=yes"
4274 else
4275   echo "configure: failed program was:" >&5
4276   cat conftest.$ac_ext >&5
4277   rm -rf conftest*
4278   eval "ac_cv_lib_$ac_lib_var=no"
4279 fi
4280 rm -f conftest*
4281 LIBS="$ac_save_LIBS"
4282
4283 fi
4284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4285   echo "$ac_t""yes" 1>&6
4286     ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/^a-zA-Z0-9_/_/g' \
4287     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4288   cat >> confdefs.h <<EOF
4289 #define $ac_tr_lib 1
4290 EOF
4291
4292   LIBS="-lncurses $LIBS"
4293
4294 else
4295   echo "$ac_t""no" 1>&6
4296 fi
4297
4298 else
4299   echo "$ac_t""no" 1>&6
4300 for ac_hdr in curses.h
4301 do
4302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4304 echo "configure:4305: checking for $ac_hdr" >&5
4305 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4306   echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308   cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 #include <$ac_hdr>
4312 EOF
4313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4314 { (eval echo configure:4315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4316 if test -z "$ac_err"; then
4317   rm -rf conftest*
4318   eval "ac_cv_header_$ac_safe=yes"
4319 else
4320   echo "$ac_err" >&5
4321   echo "configure: failed program was:" >&5
4322   cat conftest.$ac_ext >&5
4323   rm -rf conftest*
4324   eval "ac_cv_header_$ac_safe=no"
4325 fi
4326 rm -f conftest*
4327 fi
4328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4329   echo "$ac_t""yes" 1>&6
4330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4331   cat >> confdefs.h <<EOF
4332 #define $ac_tr_hdr 1
4333 EOF
4334  echo $ac_n "checking for waddch in -lcurses""... $ac_c" 1>&6
4335 echo "configure:4336: checking for waddch in -lcurses" >&5
4336 ac_lib_var=`echo curses'_'waddch | sed 'y%./+-%__p_%'`
4337 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4338   echo $ac_n "(cached) $ac_c" 1>&6
4339 else
4340   ac_save_LIBS="$LIBS"
4341 LIBS="-lcurses  $LIBS"
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4345 /* Override any gcc2 internal prototype to avoid an error.  */
4346 /* We use char because int might match the return type of a gcc2
4347     builtin and then its argument prototype would still apply.  */
4348 char waddch();
4349
4350 int main() {
4351 waddch()
4352 ; return 0; }
4353 EOF
4354 if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4355   rm -rf conftest*
4356   eval "ac_cv_lib_$ac_lib_var=yes"
4357 else
4358   echo "configure: failed program was:" >&5
4359   cat conftest.$ac_ext >&5
4360   rm -rf conftest*
4361   eval "ac_cv_lib_$ac_lib_var=no"
4362 fi
4363 rm -f conftest*
4364 LIBS="$ac_save_LIBS"
4365
4366 fi
4367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4368   echo "$ac_t""yes" 1>&6
4369     ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \
4370     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4371   cat >> confdefs.h <<EOF
4372 #define $ac_tr_lib 1
4373 EOF
4374
4375   LIBS="-lcurses $LIBS"
4376
4377 else
4378   echo "$ac_t""no" 1>&6
4379 fi
4380
4381 else
4382   echo "$ac_t""no" 1>&6
4383 fi
4384 done
4385
4386 fi
4387 done
4388
4389     for ac_func in getbkgd resizeterm
4390 do
4391 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4392 echo "configure:4393: checking for $ac_func" >&5
4393 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4394   echo $ac_n "(cached) $ac_c" 1>&6
4395 else
4396   cat > conftest.$ac_ext <<EOF
4397 #line 4398 "configure"
4398 #include "confdefs.h"
4399 /* System header to define __stub macros and hopefully few prototypes,
4400     which can conflict with char $ac_func(); below.  */
4401 #include <assert.h>
4402 /* Override any gcc2 internal prototype to avoid an error.  */
4403 /* We use char because int might match the return type of a gcc2
4404     builtin and then its argument prototype would still apply.  */
4405 char $ac_func();
4406
4407 int main() {
4408
4409 /* The GNU C library defines this for functions which it implements
4410     to always fail with ENOSYS.  Some functions are actually named
4411     something starting with __ and the normal name is an alias.  */
4412 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4413 choke me
4414 #else
4415 $ac_func();
4416 #endif
4417
4418 ; return 0; }
4419 EOF
4420 if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4421   rm -rf conftest*
4422   eval "ac_cv_func_$ac_func=yes"
4423 else
4424   echo "configure: failed program was:" >&5
4425   cat conftest.$ac_ext >&5
4426   rm -rf conftest*
4427   eval "ac_cv_func_$ac_func=no"
4428 fi
4429 rm -f conftest*
4430 fi
4431
4432 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4433   echo "$ac_t""yes" 1>&6
4434     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4435   cat >> confdefs.h <<EOF
4436 #define $ac_tr_func 1
4437 EOF
4438  
4439 else
4440   echo "$ac_t""no" 1>&6
4441 fi
4442 done
4443
4444 fi
4445
4446 CUPSLIBS=""
4447 wine_cv_warn_cups_h=no
4448 echo $ac_n "checking for cupsGetPPD in -lcups""... $ac_c" 1>&6
4449 echo "configure:4450: checking for cupsGetPPD in -lcups" >&5
4450 ac_lib_var=`echo cups'_'cupsGetPPD | sed 'y%./+-%__p_%'`
4451 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4452   echo $ac_n "(cached) $ac_c" 1>&6
4453 else
4454   ac_save_LIBS="$LIBS"
4455 LIBS="-lcups  $LIBS"
4456 cat > conftest.$ac_ext <<EOF
4457 #line 4458 "configure"
4458 #include "confdefs.h"
4459 /* Override any gcc2 internal prototype to avoid an error.  */
4460 /* We use char because int might match the return type of a gcc2
4461     builtin and then its argument prototype would still apply.  */
4462 char cupsGetPPD();
4463
4464 int main() {
4465 cupsGetPPD()
4466 ; return 0; }
4467 EOF
4468 if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4469   rm -rf conftest*
4470   eval "ac_cv_lib_$ac_lib_var=yes"
4471 else
4472   echo "configure: failed program was:" >&5
4473   cat conftest.$ac_ext >&5
4474   rm -rf conftest*
4475   eval "ac_cv_lib_$ac_lib_var=no"
4476 fi
4477 rm -f conftest*
4478 LIBS="$ac_save_LIBS"
4479
4480 fi
4481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4482   echo "$ac_t""yes" 1>&6
4483   ac_safe=`echo "cups/cups.h" | sed 'y%./+-%__p_%'`
4484 echo $ac_n "checking for cups/cups.h""... $ac_c" 1>&6
4485 echo "configure:4486: checking for cups/cups.h" >&5
4486 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4487   echo $ac_n "(cached) $ac_c" 1>&6
4488 else
4489   cat > conftest.$ac_ext <<EOF
4490 #line 4491 "configure"
4491 #include "confdefs.h"
4492 #include <cups/cups.h>
4493 EOF
4494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4495 { (eval echo configure:4496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4497 if test -z "$ac_err"; then
4498   rm -rf conftest*
4499   eval "ac_cv_header_$ac_safe=yes"
4500 else
4501   echo "$ac_err" >&5
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -rf conftest*
4505   eval "ac_cv_header_$ac_safe=no"
4506 fi
4507 rm -f conftest*
4508 fi
4509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4510   echo "$ac_t""yes" 1>&6
4511   cat >> confdefs.h <<\EOF
4512 #define HAVE_CUPS 1
4513 EOF
4514
4515             CUPSLIBS="-lcups"
4516 else
4517   echo "$ac_t""no" 1>&6
4518 wine_cv_warn_cups_h=yes
4519 fi
4520
4521
4522 else
4523   echo "$ac_t""no" 1>&6
4524 fi
4525
4526
4527
4528 echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
4529 echo "configure:4530: checking for FT_Init_FreeType in -lfreetype" >&5
4530 ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
4531 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4532   echo $ac_n "(cached) $ac_c" 1>&6
4533 else
4534   ac_save_LIBS="$LIBS"
4535 LIBS="-lfreetype $X_LIBS $LIBS"
4536 cat > conftest.$ac_ext <<EOF
4537 #line 4538 "configure"
4538 #include "confdefs.h"
4539 /* Override any gcc2 internal prototype to avoid an error.  */
4540 /* We use char because int might match the return type of a gcc2
4541     builtin and then its argument prototype would still apply.  */
4542 char FT_Init_FreeType();
4543
4544 int main() {
4545 FT_Init_FreeType()
4546 ; return 0; }
4547 EOF
4548 if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4549   rm -rf conftest*
4550   eval "ac_cv_lib_$ac_lib_var=yes"
4551 else
4552   echo "configure: failed program was:" >&5
4553   cat conftest.$ac_ext >&5
4554   rm -rf conftest*
4555   eval "ac_cv_lib_$ac_lib_var=no"
4556 fi
4557 rm -f conftest*
4558 LIBS="$ac_save_LIBS"
4559
4560 fi
4561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4562   echo "$ac_t""yes" 1>&6
4563   ft_lib=yes
4564 else
4565   echo "$ac_t""no" 1>&6
4566 ft_lib=no
4567 fi
4568
4569 if test "$ft_lib" = "no"
4570 then
4571     FREETYPELIBS=""
4572     FREETYPEINCL=""
4573     wine_cv_msg_freetype=no
4574 else
4575     # Extract the first word of "freetype-config", so it can be a program name with args.
4576 set dummy freetype-config; ac_word=$2
4577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4578 echo "configure:4579: checking for $ac_word" >&5
4579 if eval "test \"`echo '$''{'ac_cv_prog_ft_devel'+set}'`\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   if test -n "$ft_devel"; then
4583   ac_cv_prog_ft_devel="$ft_devel" # Let the user override the test.
4584 else
4585   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4586   ac_dummy="$PATH"
4587   for ac_dir in $ac_dummy; do
4588     test -z "$ac_dir" && ac_dir=.
4589     if test -f $ac_dir/$ac_word; then
4590       ac_cv_prog_ft_devel="freetype-config"
4591       break
4592     fi
4593   done
4594   IFS="$ac_save_ifs"
4595   test -z "$ac_cv_prog_ft_devel" && ac_cv_prog_ft_devel="no"
4596 fi
4597 fi
4598 ft_devel="$ac_cv_prog_ft_devel"
4599 if test -n "$ft_devel"; then
4600   echo "$ac_t""$ft_devel" 1>&6
4601 else
4602   echo "$ac_t""no" 1>&6
4603 fi
4604
4605     if test "$ft_devel" = "no"
4606     then
4607         # Extract the first word of "freetype2-config", so it can be a program name with args.
4608 set dummy freetype2-config; ac_word=$2
4609 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4610 echo "configure:4611: checking for $ac_word" >&5
4611 if eval "test \"`echo '$''{'ac_cv_prog_ft_devel2'+set}'`\" = set"; then
4612   echo $ac_n "(cached) $ac_c" 1>&6
4613 else
4614   if test -n "$ft_devel2"; then
4615   ac_cv_prog_ft_devel2="$ft_devel2" # Let the user override the test.
4616 else
4617   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4618   ac_dummy="$PATH"
4619   for ac_dir in $ac_dummy; do
4620     test -z "$ac_dir" && ac_dir=.
4621     if test -f $ac_dir/$ac_word; then
4622       ac_cv_prog_ft_devel2="freetype2-config"
4623       break
4624     fi
4625   done
4626   IFS="$ac_save_ifs"
4627   test -z "$ac_cv_prog_ft_devel2" && ac_cv_prog_ft_devel2="no"
4628 fi
4629 fi
4630 ft_devel2="$ac_cv_prog_ft_devel2"
4631 if test -n "$ft_devel2"; then
4632   echo "$ac_t""$ft_devel2" 1>&6
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636
4637         if test "$ft_devel2" = "freetype2-config"
4638         then
4639                 ft_devel=$ft_devel2
4640         fi
4641     fi
4642     if test "$ft_devel" = "no"
4643     then
4644         FREETYPELIBS=""
4645         FREETYPEINCL=""
4646         wine_cv_msg_freetype=yes
4647     else
4648         cat >> confdefs.h <<\EOF
4649 #define HAVE_FREETYPE 1
4650 EOF
4651
4652         FREETYPELIBS=`$ft_devel --libs`
4653         FREETYPEINCL=`$ft_devel --cflags`
4654         ac_save_CPPFLAGS="$CPPFLAGS"
4655         CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
4656         for ac_hdr in freetype/freetype.h \
4657                          freetype/ftglyph.h \
4658                          freetype/tttables.h \
4659                          freetype/ftnames.h \
4660                          freetype/ftsnames.h \
4661                          freetype/ttnameid.h \
4662                          freetype/ftoutln.h \
4663                          freetype/internal/sfnt.h
4664 do
4665 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4666 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4667 echo "configure:4668: checking for $ac_hdr" >&5
4668 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4669   echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671   cat > conftest.$ac_ext <<EOF
4672 #line 4673 "configure"
4673 #include "confdefs.h"
4674 #include <$ac_hdr>
4675 EOF
4676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4677 { (eval echo configure:4678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4679 if test -z "$ac_err"; then
4680   rm -rf conftest*
4681   eval "ac_cv_header_$ac_safe=yes"
4682 else
4683   echo "$ac_err" >&5
4684   echo "configure: failed program was:" >&5
4685   cat conftest.$ac_ext >&5
4686   rm -rf conftest*
4687   eval "ac_cv_header_$ac_safe=no"
4688 fi
4689 rm -f conftest*
4690 fi
4691 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4692   echo "$ac_t""yes" 1>&6
4693     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4694   cat >> confdefs.h <<EOF
4695 #define $ac_tr_hdr 1
4696 EOF
4697  
4698 else
4699   echo "$ac_t""no" 1>&6
4700 fi
4701 done
4702
4703         CPPFLAGS="$ac_save_CPPFLAGS"
4704         wine_cv_msg_freetype=no
4705     fi
4706 fi
4707
4708
4709
4710 echo $ac_n "checking for parport header/ppdev.h""... $ac_c" 1>&6
4711 echo "configure:4712: checking for parport header/ppdev.h" >&5
4712 if eval "test \"`echo '$''{'ac_cv_c_ppdev'+set}'`\" = set"; then
4713   echo $ac_n "(cached) $ac_c" 1>&6
4714 else
4715   cat > conftest.$ac_ext <<EOF
4716 #line 4717 "configure"
4717 #include "confdefs.h"
4718 #include <linux/ppdev.h>
4719 int main() {
4720 ioctl (1,PPCLAIM,0)
4721 ; return 0; }
4722 EOF
4723 if { (eval echo configure:4724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4724   rm -rf conftest*
4725   ac_cv_c_ppdev="yes"
4726 else
4727   echo "configure: failed program was:" >&5
4728   cat conftest.$ac_ext >&5
4729   rm -rf conftest*
4730   ac_cv_c_ppdev="no"
4731 fi
4732 rm -f conftest*
4733  
4734 fi
4735
4736 echo "$ac_t""$ac_cv_c_ppdev" 1>&6
4737 if test "$ac_cv_c_ppdev" = "yes"
4738 then
4739     cat >> confdefs.h <<\EOF
4740 #define HAVE_PPDEV 1
4741 EOF
4742
4743 fi
4744
4745 echo $ac_n "checking for GNU style IPX support""... $ac_c" 1>&6
4746 echo "configure:4747: checking for GNU style IPX support" >&5
4747 if eval "test \"`echo '$''{'ac_cv_c_ipx_gnu'+set}'`\" = set"; then
4748   echo $ac_n "(cached) $ac_c" 1>&6
4749 else
4750   cat > conftest.$ac_ext <<EOF
4751 #line 4752 "configure"
4752 #include "confdefs.h"
4753 #include <sys/socket.h>
4754     #include <netipx/ipx.h>
4755 int main() {
4756 ((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
4757 ; return 0; }
4758 EOF
4759 if { (eval echo configure:4760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4760   rm -rf conftest*
4761   ac_cv_c_ipx_gnu="yes"
4762 else
4763   echo "configure: failed program was:" >&5
4764   cat conftest.$ac_ext >&5
4765   rm -rf conftest*
4766   ac_cv_c_ipx_gnu="no"
4767 fi
4768 rm -f conftest*
4769  
4770 fi
4771
4772 echo "$ac_t""$ac_cv_c_ipx_gnu" 1>&6
4773 if test "$ac_cv_c_ipx_gnu" = "yes"
4774 then
4775     cat >> confdefs.h <<\EOF
4776 #define HAVE_IPX_GNU 1
4777 EOF
4778
4779 fi
4780
4781 if test "$ac_cv_c_ipx_gnu" = "no"
4782 then
4783  echo $ac_n "checking for linux style IPX support""... $ac_c" 1>&6
4784 echo "configure:4785: checking for linux style IPX support" >&5
4785 if eval "test \"`echo '$''{'ac_cv_c_ipx_linux'+set}'`\" = set"; then
4786   echo $ac_n "(cached) $ac_c" 1>&6
4787 else
4788   cat > conftest.$ac_ext <<EOF
4789 #line 4790 "configure"
4790 #include "confdefs.h"
4791 #include <sys/socket.h>
4792      #include <asm/types.h>
4793      #include <linux/ipx.h>
4794 int main() {
4795 ((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
4796 ; return 0; }
4797 EOF
4798 if { (eval echo configure:4799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4799   rm -rf conftest*
4800   ac_cv_c_ipx_linux="yes"
4801 else
4802   echo "configure: failed program was:" >&5
4803   cat conftest.$ac_ext >&5
4804   rm -rf conftest*
4805   ac_cv_c_ipx_linux="no"
4806 fi
4807 rm -f conftest*
4808   
4809 fi
4810
4811 echo "$ac_t""$ac_cv_c_ipx_linux" 1>&6
4812   if test "$ac_cv_c_ipx_linux" = "yes"
4813   then
4814       cat >> confdefs.h <<\EOF
4815 #define HAVE_IPX_LINUX 1
4816 EOF
4817
4818   fi
4819 fi
4820
4821 for ac_hdr in sys/soundcard.h machine/soundcard.h soundcard.h
4822 do
4823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4825 echo "configure:4826: checking for $ac_hdr" >&5
4826 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4827   echo $ac_n "(cached) $ac_c" 1>&6
4828 else
4829   cat > conftest.$ac_ext <<EOF
4830 #line 4831 "configure"
4831 #include "confdefs.h"
4832 #include <$ac_hdr>
4833 EOF
4834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4835 { (eval echo configure:4836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4837 if test -z "$ac_err"; then
4838   rm -rf conftest*
4839   eval "ac_cv_header_$ac_safe=yes"
4840 else
4841   echo "$ac_err" >&5
4842   echo "configure: failed program was:" >&5
4843   cat conftest.$ac_ext >&5
4844   rm -rf conftest*
4845   eval "ac_cv_header_$ac_safe=no"
4846 fi
4847 rm -f conftest*
4848 fi
4849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4850   echo "$ac_t""yes" 1>&6
4851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4852   cat >> confdefs.h <<EOF
4853 #define $ac_tr_hdr 1
4854 EOF
4855  break
4856 else
4857   echo "$ac_t""no" 1>&6
4858 fi
4859 done
4860
4861
4862 echo $ac_n "checking for Open Sound System""... $ac_c" 1>&6
4863 echo "configure:4864: checking for Open Sound System" >&5
4864 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then
4865   echo $ac_n "(cached) $ac_c" 1>&6
4866 else
4867   cat > conftest.$ac_ext <<EOF
4868 #line 4869 "configure"
4869 #include "confdefs.h"
4870
4871         #if defined(HAVE_SYS_SOUNDCARD_H)
4872                 #include <sys/soundcard.h>
4873         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
4874                 #include <machine/soundcard.h>
4875         #elif defined(HAVE_SOUNDCARD_H)
4876                 #include <soundcard.h>
4877         #endif
4878         
4879 int main() {
4880
4881
4882 /* check for one of the Open Sound System specific SNDCTL_ defines */
4883 #if !defined(SNDCTL_DSP_STEREO)
4884 #error No open sound system
4885 #endif
4886
4887 ; return 0; }
4888 EOF
4889 if { (eval echo configure:4890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4890   rm -rf conftest*
4891   ac_cv_c_opensoundsystem="yes"
4892 else
4893   echo "configure: failed program was:" >&5
4894   cat conftest.$ac_ext >&5
4895   rm -rf conftest*
4896   ac_cv_c_opensoundsystem="no"
4897 fi
4898 rm -f conftest*
4899 fi
4900
4901 echo "$ac_t""$ac_cv_c_opensoundsystem" 1>&6
4902
4903 if test "$ac_cv_c_opensoundsystem" = "yes"
4904 then
4905     cat >> confdefs.h <<\EOF
4906 #define HAVE_OSS 1
4907 EOF
4908
4909 fi
4910
4911 echo $ac_n "checking for Open Sound System/MIDI interface""... $ac_c" 1>&6
4912 echo "configure:4913: checking for Open Sound System/MIDI interface" >&5
4913 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem_midi'+set}'`\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916   cat > conftest.$ac_ext <<EOF
4917 #line 4918 "configure"
4918 #include "confdefs.h"
4919
4920         #if defined(HAVE_SYS_SOUNDCARD_H)
4921                 #include <sys/soundcard.h>
4922         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
4923                 #include <machine/soundcard.h>
4924         #elif defined(HAVE_SOUNDCARD_H)
4925                 #include <soundcard.h>
4926         #endif
4927         
4928 int main() {
4929
4930
4931 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
4932 #if !defined(SNDCTL_SEQ_SYNC)
4933 #error No open sound system MIDI interface
4934 #endif
4935
4936 ; return 0; }
4937 EOF
4938 if { (eval echo configure:4939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4939   rm -rf conftest*
4940   ac_cv_c_opensoundsystem_midi="yes"
4941 else
4942   echo "configure: failed program was:" >&5
4943   cat conftest.$ac_ext >&5
4944   rm -rf conftest*
4945   ac_cv_c_opensoundsystem_midi="no"
4946 fi
4947 rm -f conftest*
4948 fi
4949
4950 echo "$ac_t""$ac_cv_c_opensoundsystem_midi" 1>&6
4951
4952 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
4953 then
4954     cat >> confdefs.h <<\EOF
4955 #define HAVE_OSS_MIDI 1
4956 EOF
4957
4958 fi
4959
4960 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
4961
4962
4963 echo $ac_n "checking whether mmap64 works defined as mmap""... $ac_c" 1>&6
4964 echo "configure:4965: checking whether mmap64 works defined as mmap" >&5
4965 if eval "test \"`echo '$''{'ac_cv_mmap64_works'+set}'`\" = set"; then
4966   echo $ac_n "(cached) $ac_c" 1>&6
4967 else
4968   if test "$cross_compiling" = yes; then
4969   ac_cv_mmap64_works="no"
4970 else
4971   cat > conftest.$ac_ext <<EOF
4972 #line 4973 "configure"
4973 #include "confdefs.h"
4974
4975                 #define _FILE_OFFSET_BITS 64
4976                 #include <stdio.h>
4977                 #include <unistd.h>
4978                 #include <fcntl.h>
4979                 #include <sys/mman.h>
4980                 #include <errno.h>
4981
4982                 int main(int argc,char **argv) {
4983                         int fd = open("conftest.map",O_CREAT|O_RDWR,0600);
4984                         if (fd == -1) exit(1);
4985
4986                         unlink("conftest.map");
4987
4988                         write(fd,"test",4);
4989
4990                         if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) &&
4991                             (errno == EINVAL)
4992                         ) {
4993                                 exit(1);
4994                         }
4995                         close(fd);
4996                         fprintf(stderr,"success!\n");
4997                         exit(0);
4998                 }
4999
5000         
5001 EOF
5002 if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5003 then
5004   ac_cv_mmap64_works="yes"
5005 else
5006   echo "configure: failed program was:" >&5
5007   cat conftest.$ac_ext >&5
5008   rm -fr conftest*
5009   ac_cv_mmap64_works="no"
5010 fi
5011 rm -fr conftest*
5012 fi
5013  
5014 fi
5015
5016 echo "$ac_t""$ac_cv_mmap64_works" 1>&6
5017
5018 if test "$ac_cv_mmap64_works" = "yes"
5019 then
5020     cat >> confdefs.h <<\EOF
5021 #define _FILE_OFFSET_BITS 64
5022 EOF
5023
5024 fi
5025
5026
5027 if test "x${GCC}" = "xyes"
5028 then
5029   CFLAGS="$CFLAGS -Wall"
5030   echo $ac_n "checking for gcc strength-reduce bug""... $ac_c" 1>&6
5031 echo "configure:5032: checking for gcc strength-reduce bug" >&5
5032 if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
5033   echo $ac_n "(cached) $ac_c" 1>&6
5034 else
5035   if test "$cross_compiling" = yes; then
5036   ac_cv_c_gcc_strength_bug="yes"
5037 else
5038   cat > conftest.$ac_ext <<EOF
5039 #line 5040 "configure"
5040 #include "confdefs.h"
5041
5042 int     L[4] = {0,1,2,3};
5043 int main(void) {
5044   static int Array[3];
5045   unsigned int B = 3;
5046   int i;
5047   for(i=0; i<B; i++) Array[i] = i - 3;
5048   for(i=0; i<4 - 1; i++) L[i] = L[i + 1];
5049   L[i] = 4;
5050   
5051   exit( Array[1] != -2 || L[2] != 3);
5052 }
5053 EOF
5054 if { (eval echo configure:5055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5055 then
5056   ac_cv_c_gcc_strength_bug="no"
5057 else
5058   echo "configure: failed program was:" >&5
5059   cat conftest.$ac_ext >&5
5060   rm -fr conftest*
5061   ac_cv_c_gcc_strength_bug="yes"
5062 fi
5063 rm -fr conftest*
5064 fi
5065  
5066 fi
5067
5068 echo "$ac_t""$ac_cv_c_gcc_strength_bug" 1>&6
5069   if test "$ac_cv_c_gcc_strength_bug" = "yes"
5070   then
5071     CFLAGS="$CFLAGS -fno-strength-reduce"
5072   fi
5073
5074     echo $ac_n "checking for gcc -mpreferred-stack-boundary=2 support""... $ac_c" 1>&6
5075 echo "configure:5076: checking for gcc -mpreferred-stack-boundary=2 support" >&5
5076 if eval "test \"`echo '$''{'ac_cv_c_gcc_stack_boundary'+set}'`\" = set"; then
5077   echo $ac_n "(cached) $ac_c" 1>&6
5078 else
5079   saved_cflags=$CFLAGS
5080   CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
5081   cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084
5085 int main() {
5086 return 0
5087 ; return 0; }
5088 EOF
5089 if { (eval echo configure:5090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5090   rm -rf conftest*
5091   ac_cv_c_gcc_stack_boundary="yes"
5092 else
5093   echo "configure: failed program was:" >&5
5094   cat conftest.$ac_ext >&5
5095   rm -rf conftest*
5096   ac_cv_c_gcc_stack_boundary="no"
5097 fi
5098 rm -f conftest*
5099   CFLAGS=$saved_cflags
5100   
5101 fi
5102
5103 echo "$ac_t""$ac_cv_c_gcc_stack_boundary" 1>&6
5104   if test "$ac_cv_c_gcc_stack_boundary" = "yes"
5105   then
5106     CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
5107   fi
5108 fi
5109
5110
5111 echo $ac_n "checking whether .type must sit inside a .def directive""... $ac_c" 1>&6
5112 echo "configure:5113: checking whether .type must sit inside a .def directive" >&5
5113 if eval "test \"`echo '$''{'ac_cv_c_type_in_def'+set}'`\" = set"; then
5114   echo $ac_n "(cached) $ac_c" 1>&6
5115 else
5116   saved_libs=$LIBS
5117 LIBS="conftest_asm.s $LIBS"
5118 cat > conftest_asm.s <<EOF
5119         .globl _ac_test
5120         .def _ac_test; .scl 2; .type 32; .endef
5121 _ac_test:
5122         .long 0
5123 EOF
5124 cat > conftest.$ac_ext <<EOF
5125 #line 5126 "configure"
5126 #include "confdefs.h"
5127
5128 int main() {
5129
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133   rm -rf conftest*
5134   ac_cv_c_type_in_def="yes"
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   ac_cv_c_type_in_def="no"
5140 fi
5141 rm -f conftest*
5142 LIBS=$saved_libs
5143 fi
5144
5145 echo "$ac_t""$ac_cv_c_type_in_def" 1>&6
5146 if test "$ac_cv_c_type_in_def" = "yes"
5147 then
5148   cat >> confdefs.h <<\EOF
5149 #define NEED_TYPE_IN_DEF 1
5150 EOF
5151
5152 fi
5153  
5154
5155 echo $ac_n "checking whether external symbols need an underscore prefix""... $ac_c" 1>&6
5156 echo "configure:5157: checking whether external symbols need an underscore prefix" >&5
5157 if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then
5158   echo $ac_n "(cached) $ac_c" 1>&6
5159 else
5160   saved_libs=$LIBS
5161 LIBS="conftest_asm.s $LIBS"
5162 cat > conftest_asm.s <<EOF
5163         .globl _ac_test
5164 _ac_test:
5165         .long 0
5166 EOF
5167 cat > conftest.$ac_ext <<EOF
5168 #line 5169 "configure"
5169 #include "confdefs.h"
5170 extern int ac_test;
5171 int main() {
5172 if (ac_test) return 1
5173 ; return 0; }
5174 EOF
5175 if { (eval echo configure:5176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5176   rm -rf conftest*
5177   ac_cv_c_extern_prefix="yes"
5178 else
5179   echo "configure: failed program was:" >&5
5180   cat conftest.$ac_ext >&5
5181   rm -rf conftest*
5182   ac_cv_c_extern_prefix="no"
5183 fi
5184 rm -f conftest*
5185 LIBS=$saved_libs
5186 fi
5187
5188 echo "$ac_t""$ac_cv_c_extern_prefix" 1>&6
5189 if test "$ac_cv_c_extern_prefix" = "yes"
5190 then
5191   cat >> confdefs.h <<\EOF
5192 #define NEED_UNDERSCORE_PREFIX 1
5193 EOF
5194
5195 fi
5196
5197
5198 echo $ac_n "checking whether assembler accepts .string""... $ac_c" 1>&6
5199 echo "configure:5200: checking whether assembler accepts .string" >&5
5200 if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then
5201   echo $ac_n "(cached) $ac_c" 1>&6
5202 else
5203   saved_libs=$LIBS
5204 LIBS="conftest_asm.s $LIBS"
5205 cat > conftest_asm.s <<EOF
5206         .string "test"
5207 EOF
5208 cat > conftest.$ac_ext <<EOF
5209 #line 5210 "configure"
5210 #include "confdefs.h"
5211
5212 int main() {
5213
5214 ; return 0; }
5215 EOF
5216 if { (eval echo configure:5217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5217   rm -rf conftest*
5218   ac_cv_c_asm_string="yes"
5219 else
5220   echo "configure: failed program was:" >&5
5221   cat conftest.$ac_ext >&5
5222   rm -rf conftest*
5223   ac_cv_c_asm_string="no"
5224 fi
5225 rm -f conftest*
5226 LIBS=$saved_libs
5227 fi
5228
5229 echo "$ac_t""$ac_cv_c_asm_string" 1>&6
5230 if test "$ac_cv_c_asm_string" = "yes"
5231 then
5232   cat >> confdefs.h <<\EOF
5233 #define HAVE_ASM_STRING 1
5234 EOF
5235
5236 fi
5237
5238
5239 LDSHARED=""
5240 LDDLLFLAGS=""
5241 if test "$LIBEXT" = "so"
5242 then
5243   echo $ac_n "checking whether we can build a GNU style ELF dll""... $ac_c" 1>&6
5244 echo "configure:5245: checking whether we can build a GNU style ELF dll" >&5
5245 if eval "test \"`echo '$''{'ac_cv_c_dll_gnuelf'+set}'`\" = set"; then
5246   echo $ac_n "(cached) $ac_c" 1>&6
5247 else
5248   saved_cflags=$CFLAGS
5249   CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
5250   cat > conftest.$ac_ext <<EOF
5251 #line 5252 "configure"
5252 #include "confdefs.h"
5253
5254 int main() {
5255 return 1
5256 ; return 0; }
5257 EOF
5258 if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5259   rm -rf conftest*
5260   ac_cv_c_dll_gnuelf="yes"
5261 else
5262   echo "configure: failed program was:" >&5
5263   cat conftest.$ac_ext >&5
5264   rm -rf conftest*
5265   ac_cv_c_dll_gnuelf="no"
5266 fi
5267 rm -f conftest*
5268   CFLAGS=$saved_cflags
5269   
5270 fi
5271
5272 echo "$ac_t""$ac_cv_c_dll_gnuelf" 1>&6
5273   if test "$ac_cv_c_dll_gnuelf" = "yes"
5274   then
5275     LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
5276     LDDLLFLAGS="-Wl,-Bsymbolic"
5277   else
5278     echo $ac_n "checking whether we can build a UnixWare (Solaris) dll""... $ac_c" 1>&6
5279 echo "configure:5280: checking whether we can build a UnixWare (Solaris) dll" >&5
5280 if eval "test \"`echo '$''{'ac_cv_c_dll_unixware'+set}'`\" = set"; then
5281   echo $ac_n "(cached) $ac_c" 1>&6
5282 else
5283   saved_cflags=$CFLAGS
5284     CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
5285     cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288
5289 int main() {
5290 return 1
5291 ; return 0; }
5292 EOF
5293 if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5294   rm -rf conftest*
5295   ac_cv_c_dll_unixware="yes"
5296 else
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299   rm -rf conftest*
5300   ac_cv_c_dll_unixware="no"
5301 fi
5302 rm -f conftest*
5303     CFLAGS=$saved_cflags
5304     
5305 fi
5306
5307 echo "$ac_t""$ac_cv_c_dll_unixware" 1>&6
5308     if test "$ac_cv_c_dll_unixware" = "yes"
5309     then
5310       LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
5311       LDDLLFLAGS="-Wl,-B,symbolic"
5312     fi
5313   fi
5314   if test "$ac_cv_c_dll_gnuelf" = "no" -a "$ac_cv_c_dll_unixware" = "no"
5315   then
5316     LIBEXT="a"
5317     if test "$DLLWRAP" = "dllwrap"; then
5318             if test "$CYGWIN" = "yes"; then
5319         echo "*** use dllwrap for building shared library."
5320         LIBEXT="dll"
5321       fi
5322     fi
5323   fi
5324 fi
5325
5326 if test "$LIBEXT" = "a"; then
5327   echo "*** It is currently not possible to build WINE without shared"
5328   echo "*** library (.so) support to allow transparent switch between .so"
5329   echo "*** and .dll files."
5330   echo "*** If you are using Linux, you will need a newer binutils."
5331   exit 1
5332 fi
5333
5334 DLLFLAGS=""
5335 LDPATH=""
5336
5337 if test "$LIBEXT" = "so"; then
5338     DLLFLAGS="-fPIC"
5339     LDPATH="LD_LIBRARY_PATH=\"\$(TOPOBJDIR)/unicode:\$\$LD_LIBRARY_PATH\""
5340 elif test "$LIBEXT" = "dll"; then
5341     #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
5342     LDPATH="PATH=\"\$(TOPOBJDIR)/unicode:\$\$PATH\""
5343 fi
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354 wine_cv_libc_reentrant=no 
5355
5356   echo $ac_n "checking for reentrant libc: __errno_location""... $ac_c" 1>&6
5357 echo "configure:5358: checking for reentrant libc: __errno_location" >&5
5358 if eval "test \"`echo '$''{'wine_cv_libc_r___errno_location'+set}'`\" = set"; then
5359   echo $ac_n "(cached) $ac_c" 1>&6
5360 else
5361   if test "$cross_compiling" = yes; then
5362   wine_cv_libc_r___errno_location=yes 
5363 else
5364   cat > conftest.$ac_ext <<EOF
5365 #line 5366 "configure"
5366 #include "confdefs.h"
5367 int myerrno = 0;
5368 char buf[256];
5369 int *__errno_location(){return &myerrno;}
5370 main(){connect(0,buf,255); exit(!myerrno);}
5371 EOF
5372 if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5373 then
5374   wine_cv_libc_r___errno_location=yes
5375 else
5376   echo "configure: failed program was:" >&5
5377   cat conftest.$ac_ext >&5
5378   rm -fr conftest*
5379   wine_cv_libc_r___errno_location=no
5380 fi
5381 rm -fr conftest*
5382 fi
5383
5384
5385 fi
5386
5387 echo "$ac_t""$wine_cv_libc_r___errno_location" 1>&6
5388 if test "$wine_cv_libc_r___errno_location" = "yes"
5389 then
5390     wine_cv_libc_reentrant=__errno_location 
5391 fi
5392
5393
5394   echo $ac_n "checking for reentrant libc: __error""... $ac_c" 1>&6
5395 echo "configure:5396: checking for reentrant libc: __error" >&5
5396 if eval "test \"`echo '$''{'wine_cv_libc_r___error'+set}'`\" = set"; then
5397   echo $ac_n "(cached) $ac_c" 1>&6
5398 else
5399   if test "$cross_compiling" = yes; then
5400   wine_cv_libc_r___error=yes 
5401 else
5402   cat > conftest.$ac_ext <<EOF
5403 #line 5404 "configure"
5404 #include "confdefs.h"
5405 int myerrno = 0;
5406 char buf[256];
5407 int *__error(){return &myerrno;}
5408 main(){connect(0,buf,255); exit(!myerrno);}
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5411 then
5412   wine_cv_libc_r___error=yes
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -fr conftest*
5417   wine_cv_libc_r___error=no
5418 fi
5419 rm -fr conftest*
5420 fi
5421
5422
5423 fi
5424
5425 echo "$ac_t""$wine_cv_libc_r___error" 1>&6
5426 if test "$wine_cv_libc_r___error" = "yes"
5427 then
5428     wine_cv_libc_reentrant=__error 
5429 fi
5430
5431
5432   echo $ac_n "checking for reentrant libc: ___errno""... $ac_c" 1>&6
5433 echo "configure:5434: checking for reentrant libc: ___errno" >&5
5434 if eval "test \"`echo '$''{'wine_cv_libc_r____errno'+set}'`\" = set"; then
5435   echo $ac_n "(cached) $ac_c" 1>&6
5436 else
5437   if test "$cross_compiling" = yes; then
5438   wine_cv_libc_r____errno=yes 
5439 else
5440   cat > conftest.$ac_ext <<EOF
5441 #line 5442 "configure"
5442 #include "confdefs.h"
5443 int myerrno = 0;
5444 char buf[256];
5445 int *___errno(){return &myerrno;}
5446 main(){connect(0,buf,255); exit(!myerrno);}
5447 EOF
5448 if { (eval echo configure:5449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5449 then
5450   wine_cv_libc_r____errno=yes
5451 else
5452   echo "configure: failed program was:" >&5
5453   cat conftest.$ac_ext >&5
5454   rm -fr conftest*
5455   wine_cv_libc_r____errno=no
5456 fi
5457 rm -fr conftest*
5458 fi
5459
5460
5461 fi
5462
5463 echo "$ac_t""$wine_cv_libc_r____errno" 1>&6
5464 if test "$wine_cv_libc_r____errno" = "yes"
5465 then
5466     wine_cv_libc_reentrant=___errno 
5467 fi
5468
5469
5470   echo $ac_n "checking for reentrant libc: __thr_errno""... $ac_c" 1>&6
5471 echo "configure:5472: checking for reentrant libc: __thr_errno" >&5
5472 if eval "test \"`echo '$''{'wine_cv_libc_r___thr_errno'+set}'`\" = set"; then
5473   echo $ac_n "(cached) $ac_c" 1>&6
5474 else
5475   if test "$cross_compiling" = yes; then
5476   wine_cv_libc_r___thr_errno=yes 
5477 else
5478   cat > conftest.$ac_ext <<EOF
5479 #line 5480 "configure"
5480 #include "confdefs.h"
5481 int myerrno = 0;
5482 char buf[256];
5483 int *__thr_errno(){return &myerrno;}
5484 main(){connect(0,buf,255); exit(!myerrno);}
5485 EOF
5486 if { (eval echo configure:5487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5487 then
5488   wine_cv_libc_r___thr_errno=yes
5489 else
5490   echo "configure: failed program was:" >&5
5491   cat conftest.$ac_ext >&5
5492   rm -fr conftest*
5493   wine_cv_libc_r___thr_errno=no
5494 fi
5495 rm -fr conftest*
5496 fi
5497
5498
5499 fi
5500
5501 echo "$ac_t""$wine_cv_libc_r___thr_errno" 1>&6
5502 if test "$wine_cv_libc_r___thr_errno" = "yes"
5503 then
5504     wine_cv_libc_reentrant=__thr_errno 
5505 fi
5506
5507
5508   echo $ac_n "checking for reentrant libc: __errno""... $ac_c" 1>&6
5509 echo "configure:5510: checking for reentrant libc: __errno" >&5
5510 if eval "test \"`echo '$''{'wine_cv_libc_r___errno'+set}'`\" = set"; then
5511   echo $ac_n "(cached) $ac_c" 1>&6
5512 else
5513   if test "$cross_compiling" = yes; then
5514   wine_cv_libc_r___errno=yes 
5515 else
5516   cat > conftest.$ac_ext <<EOF
5517 #line 5518 "configure"
5518 #include "confdefs.h"
5519 int myerrno = 0;
5520 char buf[256];
5521 int *__errno(){return &myerrno;}
5522 main(){connect(0,buf,255); exit(!myerrno);}
5523 EOF
5524 if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5525 then
5526   wine_cv_libc_r___errno=yes
5527 else
5528   echo "configure: failed program was:" >&5
5529   cat conftest.$ac_ext >&5
5530   rm -fr conftest*
5531   wine_cv_libc_r___errno=no
5532 fi
5533 rm -fr conftest*
5534 fi
5535
5536
5537 fi
5538
5539 echo "$ac_t""$wine_cv_libc_r___errno" 1>&6
5540 if test "$wine_cv_libc_r___errno" = "yes"
5541 then
5542     wine_cv_libc_reentrant=__errno 
5543 fi
5544
5545
5546 if test "$wine_cv_libc_reentrant" != "no" 
5547 then
5548   cat >> confdefs.h <<EOF
5549 #define ERRNO_LOCATION $wine_cv_libc_reentrant
5550 EOF
5551
5552 fi
5553
5554
5555 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
5556 then
5557 echo $ac_n "checking for reentrant X libraries""... $ac_c" 1>&6
5558 echo "configure:5559: checking for reentrant X libraries" >&5
5559 if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then
5560   echo $ac_n "(cached) $ac_c" 1>&6
5561 else
5562    if test "x$with_reentrant_x" = "xno" 
5563     then
5564         wine_cv_x_reentrant=no
5565     else
5566         libX11_check=none
5567         for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
5568             if test -r $dir/libX11.so; then
5569                 libX11_check="-D $dir/libX11.so"
5570                 break 1
5571             fi
5572             if test -r $dir/libX11.a; then
5573                 libX11_check="$dir/libX11.a"
5574                 break 1
5575             fi
5576         done
5577         if test "$libX11_check" != "none"; then
5578             if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
5579             then
5580                 wine_cv_x_reentrant=yes
5581             else
5582                 wine_cv_x_reentrant=no
5583             fi
5584         else
5585             wine_cv_x_reentrant=unknown
5586         fi
5587     fi  
5588 fi
5589
5590 echo "$ac_t""$wine_cv_x_reentrant" 1>&6
5591 else
5592     wine_cv_x_reentrant=no
5593 fi
5594 if test "$wine_cv_x_reentrant" = "no"
5595 then
5596   cat >> confdefs.h <<\EOF
5597 #define NO_REENTRANT_X11 1
5598 EOF
5599
5600 fi
5601
5602
5603
5604 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5605 # for constant arguments.  Useless!
5606 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5607 echo "configure:5608: checking for working alloca.h" >&5
5608 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5609   echo $ac_n "(cached) $ac_c" 1>&6
5610 else
5611   cat > conftest.$ac_ext <<EOF
5612 #line 5613 "configure"
5613 #include "confdefs.h"
5614 #include <alloca.h>
5615 int main() {
5616 char *p = alloca(2 * sizeof(int));
5617 ; return 0; }
5618 EOF
5619 if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5620   rm -rf conftest*
5621   ac_cv_header_alloca_h=yes
5622 else
5623   echo "configure: failed program was:" >&5
5624   cat conftest.$ac_ext >&5
5625   rm -rf conftest*
5626   ac_cv_header_alloca_h=no
5627 fi
5628 rm -f conftest*
5629 fi
5630
5631 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5632 if test $ac_cv_header_alloca_h = yes; then
5633   cat >> confdefs.h <<\EOF
5634 #define HAVE_ALLOCA_H 1
5635 EOF
5636
5637 fi
5638
5639 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5640 echo "configure:5641: checking for alloca" >&5
5641 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5642   echo $ac_n "(cached) $ac_c" 1>&6
5643 else
5644   cat > conftest.$ac_ext <<EOF
5645 #line 5646 "configure"
5646 #include "confdefs.h"
5647
5648 #ifdef __GNUC__
5649 # define alloca __builtin_alloca
5650 #else
5651 # ifdef _MSC_VER
5652 #  include <malloc.h>
5653 #  define alloca _alloca
5654 # else
5655 #  if HAVE_ALLOCA_H
5656 #   include <alloca.h>
5657 #  else
5658 #   ifdef _AIX
5659  #pragma alloca
5660 #   else
5661 #    ifndef alloca /* predefined by HP cc +Olibcalls */
5662 char *alloca ();
5663 #    endif
5664 #   endif
5665 #  endif
5666 # endif
5667 #endif
5668
5669 int main() {
5670 char *p = (char *) alloca(1);
5671 ; return 0; }
5672 EOF
5673 if { (eval echo configure:5674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5674   rm -rf conftest*
5675   ac_cv_func_alloca_works=yes
5676 else
5677   echo "configure: failed program was:" >&5
5678   cat conftest.$ac_ext >&5
5679   rm -rf conftest*
5680   ac_cv_func_alloca_works=no
5681 fi
5682 rm -f conftest*
5683 fi
5684
5685 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5686 if test $ac_cv_func_alloca_works = yes; then
5687   cat >> confdefs.h <<\EOF
5688 #define HAVE_ALLOCA 1
5689 EOF
5690
5691 fi
5692
5693 if test $ac_cv_func_alloca_works = no; then
5694   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5695   # that cause trouble.  Some versions do not even contain alloca or
5696   # contain a buggy version.  If you still want to use their alloca,
5697   # use ar to extract alloca.o from them instead of compiling alloca.c.
5698   ALLOCA=alloca.${ac_objext}
5699   cat >> confdefs.h <<\EOF
5700 #define C_ALLOCA 1
5701 EOF
5702
5703
5704 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5705 echo "configure:5706: checking whether alloca needs Cray hooks" >&5
5706 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5707   echo $ac_n "(cached) $ac_c" 1>&6
5708 else
5709   cat > conftest.$ac_ext <<EOF
5710 #line 5711 "configure"
5711 #include "confdefs.h"
5712 #if defined(CRAY) && ! defined(CRAY2)
5713 webecray
5714 #else
5715 wenotbecray
5716 #endif
5717
5718 EOF
5719 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5720   egrep "webecray" >/dev/null 2>&1; then
5721   rm -rf conftest*
5722   ac_cv_os_cray=yes
5723 else
5724   rm -rf conftest*
5725   ac_cv_os_cray=no
5726 fi
5727 rm -f conftest*
5728
5729 fi
5730
5731 echo "$ac_t""$ac_cv_os_cray" 1>&6
5732 if test $ac_cv_os_cray = yes; then
5733 for ac_func in _getb67 GETB67 getb67; do
5734   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5735 echo "configure:5736: checking for $ac_func" >&5
5736 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5737   echo $ac_n "(cached) $ac_c" 1>&6
5738 else
5739   cat > conftest.$ac_ext <<EOF
5740 #line 5741 "configure"
5741 #include "confdefs.h"
5742 /* System header to define __stub macros and hopefully few prototypes,
5743     which can conflict with char $ac_func(); below.  */
5744 #include <assert.h>
5745 /* Override any gcc2 internal prototype to avoid an error.  */
5746 /* We use char because int might match the return type of a gcc2
5747     builtin and then its argument prototype would still apply.  */
5748 char $ac_func();
5749
5750 int main() {
5751
5752 /* The GNU C library defines this for functions which it implements
5753     to always fail with ENOSYS.  Some functions are actually named
5754     something starting with __ and the normal name is an alias.  */
5755 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5756 choke me
5757 #else
5758 $ac_func();
5759 #endif
5760
5761 ; return 0; }
5762 EOF
5763 if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5764   rm -rf conftest*
5765   eval "ac_cv_func_$ac_func=yes"
5766 else
5767   echo "configure: failed program was:" >&5
5768   cat conftest.$ac_ext >&5
5769   rm -rf conftest*
5770   eval "ac_cv_func_$ac_func=no"
5771 fi
5772 rm -f conftest*
5773 fi
5774
5775 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5776   echo "$ac_t""yes" 1>&6
5777   cat >> confdefs.h <<EOF
5778 #define CRAY_STACKSEG_END $ac_func
5779 EOF
5780
5781   break
5782 else
5783   echo "$ac_t""no" 1>&6
5784 fi
5785
5786 done
5787 fi
5788
5789 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5790 echo "configure:5791: checking stack direction for C alloca" >&5
5791 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5792   echo $ac_n "(cached) $ac_c" 1>&6
5793 else
5794   if test "$cross_compiling" = yes; then
5795   ac_cv_c_stack_direction=0
5796 else
5797   cat > conftest.$ac_ext <<EOF
5798 #line 5799 "configure"
5799 #include "confdefs.h"
5800 find_stack_direction ()
5801 {
5802   static char *addr = 0;
5803   auto char dummy;
5804   if (addr == 0)
5805     {
5806       addr = &dummy;
5807       return find_stack_direction ();
5808     }
5809   else
5810     return (&dummy > addr) ? 1 : -1;
5811 }
5812 main ()
5813 {
5814   exit (find_stack_direction() < 0);
5815 }
5816 EOF
5817 if { (eval echo configure:5818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5818 then
5819   ac_cv_c_stack_direction=1
5820 else
5821   echo "configure: failed program was:" >&5
5822   cat conftest.$ac_ext >&5
5823   rm -fr conftest*
5824   ac_cv_c_stack_direction=-1
5825 fi
5826 rm -fr conftest*
5827 fi
5828
5829 fi
5830
5831 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5832 cat >> confdefs.h <<EOF
5833 #define STACK_DIRECTION $ac_cv_c_stack_direction
5834 EOF
5835
5836 fi
5837
5838 for ac_func in \
5839         __libc_fork \
5840         _lwp_create \
5841         clone \
5842         ecvt \
5843         finite \
5844         fpclass \
5845         ftruncate64 \
5846         getnetbyaddr \
5847         getnetbyname \
5848         getpagesize \
5849         getprotobyname \
5850         getprotobynumber \
5851         getrlimit \
5852         getservbyport \
5853         getsockopt \
5854         inet_network \
5855         lseek64 \
5856         lstat \
5857         memmove \
5858         mmap \
5859         rfork \
5860         select \
5861         sendmsg \
5862         settimeofday \
5863         sigaltstack \
5864         statfs \
5865         strcasecmp \
5866         strerror \
5867         strncasecmp \
5868         tcgetattr \
5869         timegm \
5870         usleep \
5871         vfscanf \
5872         wait4 \
5873         waitpid \
5874
5875 do
5876 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5877 echo "configure:5878: checking for $ac_func" >&5
5878 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5879   echo $ac_n "(cached) $ac_c" 1>&6
5880 else
5881   cat > conftest.$ac_ext <<EOF
5882 #line 5883 "configure"
5883 #include "confdefs.h"
5884 /* System header to define __stub macros and hopefully few prototypes,
5885     which can conflict with char $ac_func(); below.  */
5886 #include <assert.h>
5887 /* Override any gcc2 internal prototype to avoid an error.  */
5888 /* We use char because int might match the return type of a gcc2
5889     builtin and then its argument prototype would still apply.  */
5890 char $ac_func();
5891
5892 int main() {
5893
5894 /* The GNU C library defines this for functions which it implements
5895     to always fail with ENOSYS.  Some functions are actually named
5896     something starting with __ and the normal name is an alias.  */
5897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5898 choke me
5899 #else
5900 $ac_func();
5901 #endif
5902
5903 ; return 0; }
5904 EOF
5905 if { (eval echo configure:5906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5906   rm -rf conftest*
5907   eval "ac_cv_func_$ac_func=yes"
5908 else
5909   echo "configure: failed program was:" >&5
5910   cat conftest.$ac_ext >&5
5911   rm -rf conftest*
5912   eval "ac_cv_func_$ac_func=no"
5913 fi
5914 rm -f conftest*
5915 fi
5916
5917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5918   echo "$ac_t""yes" 1>&6
5919     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5920   cat >> confdefs.h <<EOF
5921 #define $ac_tr_func 1
5922 EOF
5923  
5924 else
5925   echo "$ac_t""no" 1>&6
5926 fi
5927 done
5928
5929
5930
5931 for ac_hdr in \
5932         arpa/inet.h \
5933         arpa/nameser.h \
5934         elf.h \
5935         float.h \
5936         ieeefp.h \
5937         libio.h \
5938         libutil.h \
5939         link.h \
5940         linux/cdrom.h \
5941         linux/input.h \
5942         linux/joystick.h \
5943         linux/ucdrom.h \
5944         net/if.h \
5945         netdb.h \
5946         netinet/in.h \
5947         netinet/in_systm.h \
5948         netinet/ip.h \
5949         netinet/tcp.h \
5950         pty.h \
5951         resolv.h \
5952         sched.h \
5953         socket.h \
5954         strings.h \
5955         sys/cdio.h \
5956         sys/errno.h \
5957         sys/file.h \
5958         sys/filio.h \
5959         sys/ipc.h \
5960         sys/link.h \
5961         sys/lwp.h \
5962         sys/mman.h \
5963         sys/modem.h \
5964         sys/mount.h \
5965         sys/msg.h \
5966         sys/param.h \
5967         sys/ptrace.h \
5968         sys/reg.h \
5969         sys/signal.h \
5970         sys/shm.h \
5971         sys/socket.h \
5972         sys/sockio.h \
5973         sys/statfs.h \
5974         sys/strtio.h \
5975         sys/syscall.h \
5976         sys/user.h \
5977         sys/wait.h \
5978         sys/v86.h \
5979         sys/v86intr.h \
5980         sys/vfs.h \
5981         sys/vm86.h \
5982         syscall.h \
5983         ucontext.h \
5984
5985 do
5986 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5987 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5988 echo "configure:5989: checking for $ac_hdr" >&5
5989 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5990   echo $ac_n "(cached) $ac_c" 1>&6
5991 else
5992   cat > conftest.$ac_ext <<EOF
5993 #line 5994 "configure"
5994 #include "confdefs.h"
5995 #include <$ac_hdr>
5996 EOF
5997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5998 { (eval echo configure:5999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6000 if test -z "$ac_err"; then
6001   rm -rf conftest*
6002   eval "ac_cv_header_$ac_safe=yes"
6003 else
6004   echo "$ac_err" >&5
6005   echo "configure: failed program was:" >&5
6006   cat conftest.$ac_ext >&5
6007   rm -rf conftest*
6008   eval "ac_cv_header_$ac_safe=no"
6009 fi
6010 rm -f conftest*
6011 fi
6012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6013   echo "$ac_t""yes" 1>&6
6014     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6015   cat >> confdefs.h <<EOF
6016 #define $ac_tr_hdr 1
6017 EOF
6018  
6019 else
6020   echo "$ac_t""no" 1>&6
6021 fi
6022 done
6023
6024 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
6025 echo "configure:6026: checking whether stat file-mode macros are broken" >&5
6026 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
6027   echo $ac_n "(cached) $ac_c" 1>&6
6028 else
6029   cat > conftest.$ac_ext <<EOF
6030 #line 6031 "configure"
6031 #include "confdefs.h"
6032 #include <sys/types.h>
6033 #include <sys/stat.h>
6034
6035 #if defined(S_ISBLK) && defined(S_IFDIR)
6036 # if S_ISBLK (S_IFDIR)
6037 You lose.
6038 # endif
6039 #endif
6040
6041 #if defined(S_ISBLK) && defined(S_IFCHR)
6042 # if S_ISBLK (S_IFCHR)
6043 You lose.
6044 # endif
6045 #endif
6046
6047 #if defined(S_ISLNK) && defined(S_IFREG)
6048 # if S_ISLNK (S_IFREG)
6049 You lose.
6050 # endif
6051 #endif
6052
6053 #if defined(S_ISSOCK) && defined(S_IFREG)
6054 # if S_ISSOCK (S_IFREG)
6055 You lose.
6056 # endif
6057 #endif
6058
6059 EOF
6060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6061   egrep "You lose" >/dev/null 2>&1; then
6062   rm -rf conftest*
6063   ac_cv_header_stat_broken=yes
6064 else
6065   rm -rf conftest*
6066   ac_cv_header_stat_broken=no
6067 fi
6068 rm -f conftest*
6069
6070 fi
6071
6072 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
6073 if test $ac_cv_header_stat_broken = yes; then
6074   cat >> confdefs.h <<\EOF
6075 #define STAT_MACROS_BROKEN 1
6076 EOF
6077
6078 fi
6079
6080
6081
6082 echo $ac_n "checking for working const""... $ac_c" 1>&6
6083 echo "configure:6084: checking for working const" >&5
6084 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6085   echo $ac_n "(cached) $ac_c" 1>&6
6086 else
6087   cat > conftest.$ac_ext <<EOF
6088 #line 6089 "configure"
6089 #include "confdefs.h"
6090
6091 int main() {
6092
6093 /* Ultrix mips cc rejects this.  */
6094 typedef int charset[2]; const charset x;
6095 /* SunOS 4.1.1 cc rejects this.  */
6096 char const *const *ccp;
6097 char **p;
6098 /* NEC SVR4.0.2 mips cc rejects this.  */
6099 struct point {int x, y;};
6100 static struct point const zero = {0,0};
6101 /* AIX XL C 1.02.0.0 rejects this.
6102    It does not let you subtract one const X* pointer from another in an arm
6103    of an if-expression whose if-part is not a constant expression */
6104 const char *g = "string";
6105 ccp = &g + (g ? g-g : 0);
6106 /* HPUX 7.0 cc rejects these. */
6107 ++ccp;
6108 p = (char**) ccp;
6109 ccp = (char const *const *) p;
6110 { /* SCO 3.2v4 cc rejects this.  */
6111   char *t;
6112   char const *s = 0 ? (char *) 0 : (char const *) 0;
6113
6114   *t++ = 0;
6115 }
6116 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6117   int x[] = {25, 17};
6118   const int *foo = &x[0];
6119   ++foo;
6120 }
6121 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6122   typedef const int *iptr;
6123   iptr p = 0;
6124   ++p;
6125 }
6126 { /* AIX XL C 1.02.0.0 rejects this saying
6127      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6128   struct s { int j; const int *ap[3]; };
6129   struct s *b; b->j = 5;
6130 }
6131 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6132   const int foo = 10;
6133 }
6134
6135 ; return 0; }
6136 EOF
6137 if { (eval echo configure:6138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6138   rm -rf conftest*
6139   ac_cv_c_const=yes
6140 else
6141   echo "configure: failed program was:" >&5
6142   cat conftest.$ac_ext >&5
6143   rm -rf conftest*
6144   ac_cv_c_const=no
6145 fi
6146 rm -f conftest*
6147 fi
6148
6149 echo "$ac_t""$ac_cv_c_const" 1>&6
6150 if test $ac_cv_c_const = no; then
6151   cat >> confdefs.h <<\EOF
6152 #define const 
6153 EOF
6154
6155 fi
6156
6157 echo $ac_n "checking for inline""... $ac_c" 1>&6
6158 echo "configure:6159: checking for inline" >&5
6159 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
6160   echo $ac_n "(cached) $ac_c" 1>&6
6161 else
6162   ac_cv_c_inline=no
6163 for ac_kw in inline __inline__ __inline; do
6164   cat > conftest.$ac_ext <<EOF
6165 #line 6166 "configure"
6166 #include "confdefs.h"
6167
6168 int main() {
6169 } $ac_kw foo() {
6170 ; return 0; }
6171 EOF
6172 if { (eval echo configure:6173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6173   rm -rf conftest*
6174   ac_cv_c_inline=$ac_kw; break
6175 else
6176   echo "configure: failed program was:" >&5
6177   cat conftest.$ac_ext >&5
6178 fi
6179 rm -f conftest*
6180 done
6181
6182 fi
6183
6184 echo "$ac_t""$ac_cv_c_inline" 1>&6
6185 case "$ac_cv_c_inline" in
6186   inline | yes) ;;
6187   no) cat >> confdefs.h <<\EOF
6188 #define inline 
6189 EOF
6190  ;;
6191   *)  cat >> confdefs.h <<EOF
6192 #define inline $ac_cv_c_inline
6193 EOF
6194  ;;
6195 esac
6196
6197 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
6198 echo "configure:6199: checking for ANSI C header files" >&5
6199 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6200   echo $ac_n "(cached) $ac_c" 1>&6
6201 else
6202   cat > conftest.$ac_ext <<EOF
6203 #line 6204 "configure"
6204 #include "confdefs.h"
6205 #include <stdlib.h>
6206 #include <stdarg.h>
6207 #include <string.h>
6208 #include <float.h>
6209 EOF
6210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6211 { (eval echo configure:6212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6213 if test -z "$ac_err"; then
6214   rm -rf conftest*
6215   ac_cv_header_stdc=yes
6216 else
6217   echo "$ac_err" >&5
6218   echo "configure: failed program was:" >&5
6219   cat conftest.$ac_ext >&5
6220   rm -rf conftest*
6221   ac_cv_header_stdc=no
6222 fi
6223 rm -f conftest*
6224
6225 if test $ac_cv_header_stdc = yes; then
6226   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6227 cat > conftest.$ac_ext <<EOF
6228 #line 6229 "configure"
6229 #include "confdefs.h"
6230 #include <string.h>
6231 EOF
6232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6233   egrep "memchr" >/dev/null 2>&1; then
6234   :
6235 else
6236   rm -rf conftest*
6237   ac_cv_header_stdc=no
6238 fi
6239 rm -f conftest*
6240
6241 fi
6242
6243 if test $ac_cv_header_stdc = yes; then
6244   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6245 cat > conftest.$ac_ext <<EOF
6246 #line 6247 "configure"
6247 #include "confdefs.h"
6248 #include <stdlib.h>
6249 EOF
6250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6251   egrep "free" >/dev/null 2>&1; then
6252   :
6253 else
6254   rm -rf conftest*
6255   ac_cv_header_stdc=no
6256 fi
6257 rm -f conftest*
6258
6259 fi
6260
6261 if test $ac_cv_header_stdc = yes; then
6262   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6263 if test "$cross_compiling" = yes; then
6264   :
6265 else
6266   cat > conftest.$ac_ext <<EOF
6267 #line 6268 "configure"
6268 #include "confdefs.h"
6269 #include <ctype.h>
6270 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6271 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6272 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6273 int main () { int i; for (i = 0; i < 256; i++)
6274 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6275 exit (0); }
6276
6277 EOF
6278 if { (eval echo configure:6279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6279 then
6280   :
6281 else
6282   echo "configure: failed program was:" >&5
6283   cat conftest.$ac_ext >&5
6284   rm -fr conftest*
6285   ac_cv_header_stdc=no
6286 fi
6287 rm -fr conftest*
6288 fi
6289
6290 fi
6291 fi
6292
6293 echo "$ac_t""$ac_cv_header_stdc" 1>&6
6294 if test $ac_cv_header_stdc = yes; then
6295   cat >> confdefs.h <<\EOF
6296 #define STDC_HEADERS 1
6297 EOF
6298
6299 fi
6300
6301 echo $ac_n "checking for size_t""... $ac_c" 1>&6
6302 echo "configure:6303: checking for size_t" >&5
6303 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6304   echo $ac_n "(cached) $ac_c" 1>&6
6305 else
6306   cat > conftest.$ac_ext <<EOF
6307 #line 6308 "configure"
6308 #include "confdefs.h"
6309 #include <sys/types.h>
6310 #if STDC_HEADERS
6311 #include <stdlib.h>
6312 #include <stddef.h>
6313 #endif
6314 EOF
6315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6316   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6317   rm -rf conftest*
6318   ac_cv_type_size_t=yes
6319 else
6320   rm -rf conftest*
6321   ac_cv_type_size_t=no
6322 fi
6323 rm -f conftest*
6324
6325 fi
6326 echo "$ac_t""$ac_cv_type_size_t" 1>&6
6327 if test $ac_cv_type_size_t = no; then
6328   cat >> confdefs.h <<\EOF
6329 #define size_t unsigned
6330 EOF
6331
6332 fi
6333
6334 echo $ac_n "checking size of long long""... $ac_c" 1>&6
6335 echo "configure:6336: checking size of long long" >&5
6336 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
6337   echo $ac_n "(cached) $ac_c" 1>&6
6338 else
6339   if test "$cross_compiling" = yes; then
6340   ac_cv_sizeof_long_long=0
6341 else
6342   cat > conftest.$ac_ext <<EOF
6343 #line 6344 "configure"
6344 #include "confdefs.h"
6345 #include <stdio.h>
6346 #include <sys/types.h>
6347 main()
6348 {
6349   FILE *f=fopen("conftestval", "w");
6350   if (!f) exit(1);
6351   fprintf(f, "%d\n", sizeof(long long));
6352   exit(0);
6353 }
6354 EOF
6355 if { (eval echo configure:6356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6356 then
6357   ac_cv_sizeof_long_long=`cat conftestval`
6358 else
6359   echo "configure: failed program was:" >&5
6360   cat conftest.$ac_ext >&5
6361   rm -fr conftest*
6362   ac_cv_sizeof_long_long=0
6363 fi
6364 rm -fr conftest*
6365 fi
6366
6367 fi
6368 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
6369 cat >> confdefs.h <<EOF
6370 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
6371 EOF
6372
6373
6374
6375 echo $ac_n "checking whether linux/input.h is for real""... $ac_c" 1>&6
6376 echo "configure:6377: checking whether linux/input.h is for real" >&5
6377 if eval "test \"`echo '$''{'wine_cv_linux_input_h'+set}'`\" = set"; then
6378   echo $ac_n "(cached) $ac_c" 1>&6
6379 else
6380   cat > conftest.$ac_ext <<EOF
6381 #line 6382 "configure"
6382 #include "confdefs.h"
6383
6384             #include <linux/input.h>
6385          
6386 int main() {
6387
6388             int foo = EVIOCGBIT(EV_ABS,42);
6389             int bar = BTN_PINKIE;
6390             int fortytwo = 42;
6391         
6392 ; return 0; }
6393 EOF
6394 if { (eval echo configure:6395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6395   rm -rf conftest*
6396   wine_cv_linux_input_h=yes
6397 else
6398   echo "configure: failed program was:" >&5
6399   cat conftest.$ac_ext >&5
6400   rm -rf conftest*
6401   wine_cv_linux_input_h=no
6402 fi
6403 rm -f conftest*
6404     
6405 fi
6406
6407 echo "$ac_t""$wine_cv_linux_input_h" 1>&6
6408     if test "$wine_cv_linux_input_h" = "yes"
6409     then
6410         cat >> confdefs.h <<\EOF
6411 #define HAVE_CORRECT_LINUXINPUT_H 1
6412 EOF
6413
6414     fi
6415
6416    
6417 echo $ac_n "checking whether we can use re-entrant gethostbyname_r Linux style""... $ac_c" 1>&6
6418 echo "configure:6419: checking whether we can use re-entrant gethostbyname_r Linux style" >&5
6419 if eval "test \"`echo '$''{'wine_cv_linux_gethostbyname_r_6'+set}'`\" = set"; then
6420   echo $ac_n "(cached) $ac_c" 1>&6
6421 else
6422   cat > conftest.$ac_ext <<EOF
6423 #line 6424 "configure"
6424 #include "confdefs.h"
6425
6426 #include <netdb.h>
6427         
6428 int main() {
6429
6430     char *name=NULL;
6431     struct hostent he;
6432     struct hostent *result;
6433     char *buf=NULL;
6434     int bufsize=0;
6435     int res,errnr;
6436     char *addr=NULL;
6437     int addrlen=0;
6438     int addrtype=0;
6439     res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
6440     res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
6441     
6442 ; return 0; }
6443 EOF
6444 if { (eval echo configure:6445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6445   rm -rf conftest*
6446   wine_cv_linux_gethostbyname_r_6=yes
6447 else
6448   echo "configure: failed program was:" >&5
6449   cat conftest.$ac_ext >&5
6450   rm -rf conftest*
6451   wine_cv_linux_gethostbyname_r_6=no
6452         
6453 fi
6454 rm -f conftest*
6455    
6456 fi
6457
6458 echo "$ac_t""$wine_cv_linux_gethostbyname_r_6" 1>&6
6459    if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
6460    then
6461       cat >> confdefs.h <<\EOF
6462 #define HAVE_LINUX_GETHOSTBYNAME_R_6 1
6463 EOF
6464
6465    fi
6466
6467 if test "$ac_cv_header_linux_joystick_h" = "yes"
6468 then
6469    echo $ac_n "checking whether linux/joystick.h uses the Linux 2.2+ API""... $ac_c" 1>&6
6470 echo "configure:6471: checking whether linux/joystick.h uses the Linux 2.2+ API" >&5
6471 if eval "test \"`echo '$''{'wine_cv_linux_joystick_22_api'+set}'`\" = set"; then
6472   echo $ac_n "(cached) $ac_c" 1>&6
6473 else
6474   cat > conftest.$ac_ext <<EOF
6475 #line 6476 "configure"
6476 #include "confdefs.h"
6477
6478         #include <sys/ioctl.h>
6479         #include <linux/joystick.h>
6480
6481         struct js_event blub;
6482         #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
6483         #error "no 2.2 header"
6484         #endif
6485         
6486 int main() {
6487 /*empty*/
6488 ; return 0; }
6489 EOF
6490 if { (eval echo configure:6491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6491   rm -rf conftest*
6492   wine_cv_linux_joystick_22_api=yes
6493 else
6494   echo "configure: failed program was:" >&5
6495   cat conftest.$ac_ext >&5
6496   rm -rf conftest*
6497   wine_cv_linux_joystick_22_api=no
6498 fi
6499 rm -f conftest*
6500    
6501 fi
6502
6503 echo "$ac_t""$wine_cv_linux_joystick_22_api" 1>&6
6504    if test "$wine_cv_linux_joystick_22_api" = "yes"
6505    then
6506       cat >> confdefs.h <<\EOF
6507 #define HAVE_LINUX_22_JOYSTICK_API 1
6508 EOF
6509
6510    fi
6511 fi
6512
6513
6514 if test "$ac_cv_header_sys_vfs_h" = "yes"
6515 then
6516     echo $ac_n "checking whether sys/vfs.h defines statfs""... $ac_c" 1>&6
6517 echo "configure:6518: checking whether sys/vfs.h defines statfs" >&5
6518 if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then
6519   echo $ac_n "(cached) $ac_c" 1>&6
6520 else
6521   cat > conftest.$ac_ext <<EOF
6522 #line 6523 "configure"
6523 #include "confdefs.h"
6524
6525         #include <sys/types.h>
6526         #ifdef HAVE_SYS_PARAM_H
6527         # include <sys/param.h>
6528         #endif
6529         #include <sys/vfs.h>
6530         
6531 int main() {
6532
6533                 struct statfs stfs;
6534
6535                 memset(&stfs,0,sizeof(stfs));
6536         
6537 ; return 0; }
6538 EOF
6539 if { (eval echo configure:6540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6540   rm -rf conftest*
6541   wine_cv_sys_vfs_has_statfs=yes
6542 else
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   wine_cv_sys_vfs_has_statfs=no
6547         
6548 fi
6549 rm -f conftest*
6550     
6551 fi
6552
6553 echo "$ac_t""$wine_cv_sys_vfs_has_statfs" 1>&6
6554     if test "$wine_cv_sys_vfs_has_statfs" = "yes"
6555     then
6556       cat >> confdefs.h <<\EOF
6557 #define STATFS_DEFINED_BY_SYS_VFS 1
6558 EOF
6559
6560     fi
6561 fi
6562
6563 if test "$ac_cv_header_sys_statfs_h" = "yes"
6564 then
6565     echo $ac_n "checking whether sys/statfs.h defines statfs""... $ac_c" 1>&6
6566 echo "configure:6567: checking whether sys/statfs.h defines statfs" >&5
6567 if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then
6568   echo $ac_n "(cached) $ac_c" 1>&6
6569 else
6570   cat > conftest.$ac_ext <<EOF
6571 #line 6572 "configure"
6572 #include "confdefs.h"
6573
6574         #include <sys/types.h>
6575         #ifdef HAVE_SYS_PARAM_H
6576         # include <sys/param.h>
6577         #endif
6578         #include <sys/statfs.h>
6579         
6580 int main() {
6581
6582                 struct statfs stfs;
6583         
6584 ; return 0; }
6585 EOF
6586 if { (eval echo configure:6587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6587   rm -rf conftest*
6588   wine_cv_sys_statfs_has_statfs=yes
6589 else
6590   echo "configure: failed program was:" >&5
6591   cat conftest.$ac_ext >&5
6592   rm -rf conftest*
6593   wine_cv_sys_statfs_has_statfs=no
6594         
6595 fi
6596 rm -f conftest*
6597     
6598 fi
6599
6600 echo "$ac_t""$wine_cv_sys_statfs_has_statfs" 1>&6
6601     if test "$wine_cv_sys_statfs_has_statfs" = "yes"
6602     then
6603       cat >> confdefs.h <<\EOF
6604 #define STATFS_DEFINED_BY_SYS_STATFS 1
6605 EOF
6606
6607     fi
6608 fi
6609
6610 if test "$ac_cv_header_sys_mount_h" = "yes"
6611 then
6612     echo $ac_n "checking whether sys/mount.h defines statfs""... $ac_c" 1>&6
6613 echo "configure:6614: checking whether sys/mount.h defines statfs" >&5
6614 if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then
6615   echo $ac_n "(cached) $ac_c" 1>&6
6616 else
6617   cat > conftest.$ac_ext <<EOF
6618 #line 6619 "configure"
6619 #include "confdefs.h"
6620
6621         #include <sys/types.h>
6622         #ifdef HAVE_SYS_PARAM_H
6623         # include <sys/param.h>
6624         #endif
6625         #include <sys/mount.h>
6626         
6627 int main() {
6628
6629                 struct statfs stfs;
6630         
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6634   rm -rf conftest*
6635   wine_cv_sys_mount_has_statfs=yes
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   wine_cv_sys_mount_has_statfs=no
6641         
6642 fi
6643 rm -f conftest*
6644     
6645 fi
6646
6647 echo "$ac_t""$wine_cv_sys_mount_has_statfs" 1>&6
6648     if test "$wine_cv_sys_mount_has_statfs" = "yes"
6649     then
6650       cat >> confdefs.h <<\EOF
6651 #define STATFS_DEFINED_BY_SYS_MOUNT 1
6652 EOF
6653
6654     fi
6655 fi
6656
6657
6658 echo $ac_n "checking for statfs.f_bfree""... $ac_c" 1>&6
6659 echo "configure:6660: checking for statfs.f_bfree" >&5
6660 if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then
6661   echo $ac_n "(cached) $ac_c" 1>&6
6662 else
6663    if test "x$statfs_bfree" = "xno"
6664     then
6665         wine_cv_statfs_bfree=no
6666     else
6667         cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670
6671         #include <sys/types.h>
6672         #ifdef HAVE_SYS_PARAM_H
6673         # include <sys/param.h>
6674         #endif
6675         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
6676         # include <sys/mount.h>
6677         #else
6678         # ifdef STATFS_DEFINED_BY_SYS_VFS
6679         #  include <sys/vfs.h>
6680         # else
6681         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
6682         #   include <sys/statfs.h>
6683         #  endif
6684         # endif
6685         #endif
6686         
6687 int main() {
6688
6689                 struct statfs stfs;
6690
6691                 stfs.f_bfree++;
6692         
6693 ; return 0; }
6694 EOF
6695 if { (eval echo configure:6696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6696   rm -rf conftest*
6697   wine_cv_statfs_bfree=yes
6698 else
6699   echo "configure: failed program was:" >&5
6700   cat conftest.$ac_ext >&5
6701   rm -rf conftest*
6702   wine_cv_statfs_bfree=no
6703         
6704 fi
6705 rm -f conftest*
6706     fi  
6707 fi
6708
6709 echo "$ac_t""$wine_cv_statfs_bfree" 1>&6
6710 if test "$wine_cv_statfs_bfree" = "yes"
6711 then
6712   cat >> confdefs.h <<\EOF
6713 #define STATFS_HAS_BFREE 1
6714 EOF
6715
6716 fi
6717
6718 echo $ac_n "checking for statfs.f_bavail""... $ac_c" 1>&6
6719 echo "configure:6720: checking for statfs.f_bavail" >&5
6720 if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then
6721   echo $ac_n "(cached) $ac_c" 1>&6
6722 else
6723    if test "x$statfs_bavail" = "xno"
6724     then
6725         wine_cv_statfs_bavail=no
6726     else
6727         cat > conftest.$ac_ext <<EOF
6728 #line 6729 "configure"
6729 #include "confdefs.h"
6730
6731         #include <sys/types.h>
6732         #ifdef HAVE_SYS_PARAM_H
6733         # include <sys/param.h>
6734         #endif
6735         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
6736         # include <sys/mount.h>
6737         #else
6738         # ifdef STATFS_DEFINED_BY_SYS_VFS
6739         #  include <sys/vfs.h>
6740         # else
6741         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
6742         #   include <sys/statfs.h>
6743         #  endif
6744         # endif
6745         #endif
6746         
6747 int main() {
6748
6749                 struct statfs stfs;
6750
6751                 stfs.f_bavail++;
6752         
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6756   rm -rf conftest*
6757   wine_cv_statfs_bavail=yes
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   wine_cv_statfs_bavail=no
6763         
6764 fi
6765 rm -f conftest*
6766     fi  
6767 fi
6768
6769 echo "$ac_t""$wine_cv_statfs_bavail" 1>&6
6770 if test "$wine_cv_statfs_bavail" = "yes"
6771 then
6772   cat >> confdefs.h <<\EOF
6773 #define STATFS_HAS_BAVAIL 1
6774 EOF
6775
6776 fi
6777
6778
6779 echo $ac_n "checking for msg_accrights in struct msghdr""... $ac_c" 1>&6
6780 echo "configure:6781: checking for msg_accrights in struct msghdr" >&5
6781 if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then
6782   echo $ac_n "(cached) $ac_c" 1>&6
6783 else
6784   cat > conftest.$ac_ext <<EOF
6785 #line 6786 "configure"
6786 #include "confdefs.h"
6787 #include <sys/types.h>
6788 #include <sys/socket.h>
6789 int main() {
6790 struct msghdr hdr; hdr.msg_accrights=0
6791 ; return 0; }
6792 EOF
6793 if { (eval echo configure:6794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6794   rm -rf conftest*
6795   ac_cv_c_msg_accrights="yes"
6796 else
6797   echo "configure: failed program was:" >&5
6798   cat conftest.$ac_ext >&5
6799   rm -rf conftest*
6800   ac_cv_c_msg_accrights="no"
6801 fi
6802 rm -f conftest*
6803 fi
6804
6805 echo "$ac_t""$ac_cv_c_msg_accrights" 1>&6
6806 if test "$ac_cv_c_msg_accrights" = "yes"
6807 then
6808     cat >> confdefs.h <<\EOF
6809 #define HAVE_MSGHDR_ACCRIGHTS 1
6810 EOF
6811
6812 fi
6813
6814
6815 echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6
6816 echo "configure:6817: checking for sa_len in struct sockaddr" >&5
6817 if eval "test \"`echo '$''{'ac_cv_c_sockaddr_sa_len'+set}'`\" = set"; then
6818   echo $ac_n "(cached) $ac_c" 1>&6
6819 else
6820   cat > conftest.$ac_ext <<EOF
6821 #line 6822 "configure"
6822 #include "confdefs.h"
6823 #include <sys/types.h>
6824 #include <sys/socket.h>
6825
6826 int main() {
6827 static struct sockaddr addr; addr.sa_len = 1
6828 ; return 0; }
6829 EOF
6830 if { (eval echo configure:6831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6831   rm -rf conftest*
6832   ac_cv_c_sockaddr_sa_len="yes"
6833 else
6834   echo "configure: failed program was:" >&5
6835   cat conftest.$ac_ext >&5
6836   rm -rf conftest*
6837   ac_cv_c_sockaddr_sa_len="no"
6838 fi
6839 rm -f conftest*
6840 fi
6841
6842 echo "$ac_t""$ac_cv_c_sockaddr_sa_len" 1>&6
6843 if test "$ac_cv_c_sockaddr_sa_len" = "yes"
6844 then
6845     cat >> confdefs.h <<\EOF
6846 #define HAVE_SOCKADDR_SA_LEN 1
6847 EOF
6848
6849 fi
6850
6851
6852 echo $ac_n "checking for sun_len in struct sockaddr_un""... $ac_c" 1>&6
6853 echo "configure:6854: checking for sun_len in struct sockaddr_un" >&5
6854 if eval "test \"`echo '$''{'ac_cv_c_sockaddr_sun_len'+set}'`\" = set"; then
6855   echo $ac_n "(cached) $ac_c" 1>&6
6856 else
6857   cat > conftest.$ac_ext <<EOF
6858 #line 6859 "configure"
6859 #include "confdefs.h"
6860 #include <sys/types.h>
6861 #include <sys/socket.h>
6862 #include <sys/un.h>
6863 int main() {
6864 static struct sockaddr_un addr; addr.sun_len = 1
6865 ; return 0; }
6866 EOF
6867 if { (eval echo configure:6868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6868   rm -rf conftest*
6869   ac_cv_c_sockaddr_sun_len="yes"
6870 else
6871   echo "configure: failed program was:" >&5
6872   cat conftest.$ac_ext >&5
6873   rm -rf conftest*
6874   ac_cv_c_sockaddr_sun_len="no"
6875 fi
6876 rm -f conftest*
6877 fi
6878
6879 echo "$ac_t""$ac_cv_c_sockaddr_sun_len" 1>&6
6880 if test "$ac_cv_c_sockaddr_sun_len" = "yes"
6881 then
6882     cat >> confdefs.h <<\EOF
6883 #define HAVE_SOCKADDR_SUN_LEN 1
6884 EOF
6885
6886 fi
6887
6888
6889 echo $ac_n "checking whether we need to define __i386__""... $ac_c" 1>&6
6890 echo "configure:6891: checking whether we need to define __i386__" >&5
6891 if eval "test \"`echo '$''{'ac_cv_cpp_def_i386'+set}'`\" = set"; then
6892   echo $ac_n "(cached) $ac_c" 1>&6
6893 else
6894   cat > conftest.$ac_ext <<EOF
6895 #line 6896 "configure"
6896 #include "confdefs.h"
6897 #if (defined(i386) || defined(__i386)) && !defined(__i386__)
6898 yes
6899 #endif
6900 EOF
6901 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6902   egrep "yes" >/dev/null 2>&1; then
6903   rm -rf conftest*
6904   ac_cv_cpp_def_i386="yes"
6905 else
6906   rm -rf conftest*
6907   ac_cv_cpp_def_i386="no"
6908 fi
6909 rm -f conftest*
6910
6911 fi
6912
6913 echo "$ac_t""$ac_cv_cpp_def_i386" 1>&6
6914 if test "$ac_cv_cpp_def_i386" = "yes"
6915 then
6916     CFLAGS="$CFLAGS -D__i386__"
6917     LINTFLAGS="$LINTFLAGS -D__i386__"
6918 fi
6919
6920 GCC_NO_BUILTIN=""
6921 if test "$GCC" = "yes"
6922 then
6923     GCC_NO_BUILTIN="-fno-builtin"
6924 fi
6925
6926
6927
6928 cat >> confdefs.h <<\EOF
6929 #define __WINE_CONFIG_H 1
6930 EOF
6931
6932
6933
6934
6935 MAKE_RULES=Make.rules
6936
6937
6938 MAKE_DLL_RULES=dlls/Makedll.rules
6939
6940
6941 MAKE_PROG_RULES=programs/Makeprog.rules
6942
6943
6944 trap '' 1 2 15
6945 cat > confcache <<\EOF
6946 # This file is a shell script that caches the results of configure
6947 # tests run on this system so they can be shared between configure
6948 # scripts and configure runs.  It is not useful on other systems.
6949 # If it contains results you don't want to keep, you may remove or edit it.
6950 #
6951 # By default, configure uses ./config.cache as the cache file,
6952 # creating it if it does not exist already.  You can give configure
6953 # the --cache-file=FILE option to use a different cache file; that is
6954 # what configure does when it calls configure scripts in
6955 # subdirectories, so they share the cache.
6956 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6957 # config.status only pays attention to the cache file if you give it the
6958 # --recheck option to rerun configure.
6959 #
6960 EOF
6961 # The following way of writing the cache mishandles newlines in values,
6962 # but we know of no workaround that is simple, portable, and efficient.
6963 # So, don't put newlines in cache variables' values.
6964 # Ultrix sh set writes to stderr and can't be redirected directly,
6965 # and sets the high bit in the cache file unless we assign to the vars.
6966 (set) 2>&1 |
6967   case `(ac_space=' '; set | grep ac_space) 2>&1` in
6968   *ac_space=\ *)
6969     # `set' does not quote correctly, so add quotes (double-quote substitution
6970     # turns \\\\ into \\, and sed turns \\ into \).
6971     sed -n \
6972       -e "s/'/'\\\\''/g" \
6973       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6974     ;;
6975   *)
6976     # `set' quotes correctly as required by POSIX, so do not add quotes.
6977     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6978     ;;
6979   esac >> confcache
6980 if cmp -s $cache_file confcache; then
6981   :
6982 else
6983   if test -w $cache_file; then
6984     echo "updating cache $cache_file"
6985     cat confcache > $cache_file
6986   else
6987     echo "not updating unwritable cache $cache_file"
6988   fi
6989 fi
6990 rm -f confcache
6991
6992 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6993
6994 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6995 # Let make expand exec_prefix.
6996 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6997
6998 # Any assignment to VPATH causes Sun make to only execute
6999 # the first set of double-colon rules, so remove it if not needed.
7000 # If there is a colon in the path, we need to keep it.
7001 if test "x$srcdir" = x.; then
7002   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7003 fi
7004
7005 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7006
7007 DEFS=-DHAVE_CONFIG_H
7008
7009 # Without the "./", some shells look in PATH for config.status.
7010 : ${CONFIG_STATUS=./config.status}
7011
7012 echo creating $CONFIG_STATUS
7013 rm -f $CONFIG_STATUS
7014 cat > $CONFIG_STATUS <<EOF
7015 #! /bin/sh
7016 # Generated automatically by configure.
7017 # Run this file to recreate the current configuration.
7018 # This directory was configured as follows,
7019 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7020 #
7021 # $0 $ac_configure_args
7022 #
7023 # Compiler output produced by configure, useful for debugging
7024 # configure, is in ./config.log if it exists.
7025
7026 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7027 for ac_option
7028 do
7029   case "\$ac_option" in
7030   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7031     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7032     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7033   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7034     echo "$CONFIG_STATUS generated by autoconf version 2.13"
7035     exit 0 ;;
7036   -help | --help | --hel | --he | --h)
7037     echo "\$ac_cs_usage"; exit 0 ;;
7038   *) echo "\$ac_cs_usage"; exit 1 ;;
7039   esac
7040 done
7041
7042 ac_given_srcdir=$srcdir
7043 ac_given_INSTALL="$INSTALL"
7044
7045 trap 'rm -fr `echo "
7046 Make.rules
7047 dlls/Makedll.rules
7048 programs/Makeprog.rules
7049 Makefile
7050 console/Makefile
7051 controls/Makefile
7052 debugger/Makefile
7053 dlls/Makefile
7054 dlls/advapi32/Makefile
7055 dlls/avicap32/Makefile
7056 dlls/avifil32/Makefile
7057 dlls/comctl32/Makefile
7058 dlls/commdlg/Makefile
7059 dlls/crtdll/Makefile
7060 dlls/dciman32/Makefile
7061 dlls/ddraw/Makefile
7062 dlls/devenum/Makefile
7063 dlls/dinput/Makefile
7064 dlls/dplay/Makefile
7065 dlls/dplayx/Makefile
7066 dlls/dsound/Makefile
7067 dlls/gdi/Makefile
7068 dlls/glu32/Makefile
7069 dlls/icmp/Makefile
7070 dlls/imagehlp/Makefile
7071 dlls/imm32/Makefile
7072 dlls/kernel/Makefile
7073 dlls/lzexpand/Makefile
7074 dlls/mapi32/Makefile
7075 dlls/mpr/Makefile
7076 dlls/msacm/Makefile
7077 dlls/msdmo/Makefile
7078 dlls/msimg32/Makefile
7079 dlls/msnet32/Makefile
7080 dlls/msrle32/Makefile
7081 dlls/msvcrt/Makefile
7082 dlls/msvideo/Makefile
7083 dlls/netapi32/Makefile
7084 dlls/ntdll/Makefile
7085 dlls/odbc32/Makefile
7086 dlls/ole32/Makefile
7087 dlls/oleaut32/Makefile
7088 dlls/olecli/Makefile
7089 dlls/oledlg/Makefile
7090 dlls/olepro32/Makefile
7091 dlls/olesvr/Makefile
7092 dlls/opengl32/Makefile
7093 dlls/psapi/Makefile
7094 dlls/qcap/Makefile
7095 dlls/quartz/Makefile
7096 dlls/rasapi32/Makefile
7097 dlls/richedit/Makefile
7098 dlls/rpcrt4/Makefile
7099 dlls/serialui/Makefile
7100 dlls/setupapi/Makefile
7101 dlls/shdocvw/Makefile
7102 dlls/shell32/Makefile
7103 dlls/shfolder/Makefile
7104 dlls/shlwapi/Makefile
7105 dlls/sti/Makefile
7106 dlls/tapi32/Makefile
7107 dlls/ttydrv/Makefile
7108 dlls/url/Makefile
7109 dlls/urlmon/Makefile
7110 dlls/user/Makefile
7111 dlls/version/Makefile
7112 dlls/win32s/Makefile
7113 dlls/winaspi/Makefile
7114 dlls/winedos/Makefile
7115 dlls/wineps/Makefile
7116 dlls/wininet/Makefile
7117 dlls/winmm/Makefile
7118 dlls/winmm/joystick/Makefile
7119 dlls/winmm/mcianim/Makefile
7120 dlls/winmm/mciavi/Makefile
7121 dlls/winmm/mcicda/Makefile
7122 dlls/winmm/mciseq/Makefile
7123 dlls/winmm/mciwave/Makefile
7124 dlls/winmm/midimap/Makefile
7125 dlls/winmm/wavemap/Makefile
7126 dlls/winmm/wineoss/Makefile
7127 dlls/winnls/Makefile
7128 dlls/winsock/Makefile
7129 dlls/winspool/Makefile
7130 dlls/wintrust/Makefile
7131 dlls/wow32/Makefile
7132 dlls/wsock32/Makefile
7133 dlls/x11drv/Makefile
7134 documentation/Makefile
7135 documentation/wine.conf.man
7136 documentation/wine.man
7137 files/Makefile
7138 graphics/Makefile
7139 graphics/enhmetafiledrv/Makefile
7140 graphics/metafiledrv/Makefile
7141 graphics/win16drv/Makefile
7142 graphics/x11drv/Makefile
7143 if1632/Makefile
7144 include/Makefile
7145 library/Makefile
7146 libtest/Makefile
7147 loader/Makefile
7148 loader/dos/Makefile
7149 loader/ne/Makefile
7150 memory/Makefile
7151 misc/Makefile
7152 miscemu/Makefile
7153 msdos/Makefile
7154 objects/Makefile
7155 ole/Makefile
7156 programs/Makefile
7157 programs/avitools/Makefile
7158 programs/clock/Makefile
7159 programs/cmdlgtst/Makefile
7160 programs/control/Makefile
7161 programs/notepad/Makefile
7162 programs/osversioncheck/Makefile
7163 programs/progman/Makefile
7164 programs/regapi/Makefile
7165 programs/regtest/Makefile
7166 programs/uninstaller/Makefile
7167 programs/view/Makefile
7168 programs/wcmd/Makefile
7169 programs/winemine/Makefile
7170 programs/winetest/Makefile
7171 programs/winhelp/Makefile
7172 programs/winver/Makefile
7173 relay32/Makefile
7174 scheduler/Makefile
7175 server/Makefile
7176 tools/Makefile
7177 tools/winapi/Makefile
7178 tools/winebuild/Makefile
7179 tools/winedump/Makefile
7180 tools/winelauncher
7181 tools/wmc/Makefile
7182 tools/wrc/Makefile
7183 tsx11/Makefile
7184 unicode/Makefile
7185 win32/Makefile
7186 windows/Makefile
7187 windows/x11drv/Makefile  include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7188 EOF
7189 cat >> $CONFIG_STATUS <<EOF
7190
7191 # Protect against being on the right side of a sed subst in config.status.
7192 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7193  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7194 $ac_vpsub
7195 $extrasub
7196 s%@SHELL@%$SHELL%g
7197 s%@CFLAGS@%$CFLAGS%g
7198 s%@CPPFLAGS@%$CPPFLAGS%g
7199 s%@CXXFLAGS@%$CXXFLAGS%g
7200 s%@FFLAGS@%$FFLAGS%g
7201 s%@DEFS@%$DEFS%g
7202 s%@LDFLAGS@%$LDFLAGS%g
7203 s%@LIBS@%$LIBS%g
7204 s%@exec_prefix@%$exec_prefix%g
7205 s%@prefix@%$prefix%g
7206 s%@program_transform_name@%$program_transform_name%g
7207 s%@bindir@%$bindir%g
7208 s%@sbindir@%$sbindir%g
7209 s%@libexecdir@%$libexecdir%g
7210 s%@datadir@%$datadir%g
7211 s%@sysconfdir@%$sysconfdir%g
7212 s%@sharedstatedir@%$sharedstatedir%g
7213 s%@localstatedir@%$localstatedir%g
7214 s%@libdir@%$libdir%g
7215 s%@includedir@%$includedir%g
7216 s%@oldincludedir@%$oldincludedir%g
7217 s%@infodir@%$infodir%g
7218 s%@mandir@%$mandir%g
7219 s%@OPTIONS@%$OPTIONS%g
7220 s%@SET_MAKE@%$SET_MAKE%g
7221 s%@CC@%$CC%g
7222 s%@CPP@%$CPP%g
7223 s%@X_CFLAGS@%$X_CFLAGS%g
7224 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7225 s%@X_LIBS@%$X_LIBS%g
7226 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7227 s%@YACC@%$YACC%g
7228 s%@LEX@%$LEX%g
7229 s%@LEXLIB@%$LEXLIB%g
7230 s%@XLEX@%$XLEX%g
7231 s%@RANLIB@%$RANLIB%g
7232 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7233 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7234 s%@INSTALL_DATA@%$INSTALL_DATA%g
7235 s%@LN_S@%$LN_S%g
7236 s%@C2MAN@%$C2MAN%g
7237 s%@LDCONFIG@%$LDCONFIG%g
7238 s%@DLLWRAP@%$DLLWRAP%g
7239 s%@LINT@%$LINT%g
7240 s%@LINTFLAGS@%$LINTFLAGS%g
7241 s%@LDCOMBINE@%$LDCOMBINE%g
7242 s%@JPEGLIB@%$JPEGLIB%g
7243 s%@XLIB@%$XLIB%g
7244 s%@XFILES@%$XFILES%g
7245 s%@OPENGLFILES@%$OPENGLFILES%g
7246 s%@GLU32FILES@%$GLU32FILES%g
7247 s%@CUPSLIBS@%$CUPSLIBS%g
7248 s%@ft_devel@%$ft_devel%g
7249 s%@ft_devel2@%$ft_devel2%g
7250 s%@FREETYPELIBS@%$FREETYPELIBS%g
7251 s%@FREETYPEINCL@%$FREETYPEINCL%g
7252 s%@DLLFLAGS@%$DLLFLAGS%g
7253 s%@LDSHARED@%$LDSHARED%g
7254 s%@LDDLLFLAGS@%$LDDLLFLAGS%g
7255 s%@LIBEXT@%$LIBEXT%g
7256 s%@LDPATH@%$LDPATH%g
7257 s%@ALLOCA@%$ALLOCA%g
7258 s%@GCC_NO_BUILTIN@%$GCC_NO_BUILTIN%g
7259 /@MAKE_RULES@/r $MAKE_RULES
7260 s%@MAKE_RULES@%%g
7261 /@MAKE_DLL_RULES@/r $MAKE_DLL_RULES
7262 s%@MAKE_DLL_RULES@%%g
7263 /@MAKE_PROG_RULES@/r $MAKE_PROG_RULES
7264 s%@MAKE_PROG_RULES@%%g
7265
7266 CEOF
7267 EOF
7268
7269 cat >> $CONFIG_STATUS <<\EOF
7270
7271 # Split the substitutions into bite-sized pieces for seds with
7272 # small command number limits, like on Digital OSF/1 and HP-UX.
7273 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7274 ac_file=1 # Number of current file.
7275 ac_beg=1 # First line for current file.
7276 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7277 ac_more_lines=:
7278 ac_sed_cmds=""
7279 while $ac_more_lines; do
7280   if test $ac_beg -gt 1; then
7281     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7282   else
7283     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7284   fi
7285   if test ! -s conftest.s$ac_file; then
7286     ac_more_lines=false
7287     rm -f conftest.s$ac_file
7288   else
7289     if test -z "$ac_sed_cmds"; then
7290       ac_sed_cmds="sed -f conftest.s$ac_file"
7291     else
7292       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7293     fi
7294     ac_file=`expr $ac_file + 1`
7295     ac_beg=$ac_end
7296     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7297   fi
7298 done
7299 if test -z "$ac_sed_cmds"; then
7300   ac_sed_cmds=cat
7301 fi
7302 EOF
7303
7304 cat >> $CONFIG_STATUS <<EOF
7305
7306 CONFIG_FILES=\${CONFIG_FILES-"Make.rules
7307 dlls/Makedll.rules
7308 programs/Makeprog.rules
7309 Makefile
7310 console/Makefile
7311 controls/Makefile
7312 debugger/Makefile
7313 dlls/Makefile
7314 dlls/advapi32/Makefile
7315 dlls/avicap32/Makefile
7316 dlls/avifil32/Makefile
7317 dlls/comctl32/Makefile
7318 dlls/commdlg/Makefile
7319 dlls/crtdll/Makefile
7320 dlls/dciman32/Makefile
7321 dlls/ddraw/Makefile
7322 dlls/devenum/Makefile
7323 dlls/dinput/Makefile
7324 dlls/dplay/Makefile
7325 dlls/dplayx/Makefile
7326 dlls/dsound/Makefile
7327 dlls/gdi/Makefile
7328 dlls/glu32/Makefile
7329 dlls/icmp/Makefile
7330 dlls/imagehlp/Makefile
7331 dlls/imm32/Makefile
7332 dlls/kernel/Makefile
7333 dlls/lzexpand/Makefile
7334 dlls/mapi32/Makefile
7335 dlls/mpr/Makefile
7336 dlls/msacm/Makefile
7337 dlls/msdmo/Makefile
7338 dlls/msimg32/Makefile
7339 dlls/msnet32/Makefile
7340 dlls/msrle32/Makefile
7341 dlls/msvcrt/Makefile
7342 dlls/msvideo/Makefile
7343 dlls/netapi32/Makefile
7344 dlls/ntdll/Makefile
7345 dlls/odbc32/Makefile
7346 dlls/ole32/Makefile
7347 dlls/oleaut32/Makefile
7348 dlls/olecli/Makefile
7349 dlls/oledlg/Makefile
7350 dlls/olepro32/Makefile
7351 dlls/olesvr/Makefile
7352 dlls/opengl32/Makefile
7353 dlls/psapi/Makefile
7354 dlls/qcap/Makefile
7355 dlls/quartz/Makefile
7356 dlls/rasapi32/Makefile
7357 dlls/richedit/Makefile
7358 dlls/rpcrt4/Makefile
7359 dlls/serialui/Makefile
7360 dlls/setupapi/Makefile
7361 dlls/shdocvw/Makefile
7362 dlls/shell32/Makefile
7363 dlls/shfolder/Makefile
7364 dlls/shlwapi/Makefile
7365 dlls/sti/Makefile
7366 dlls/tapi32/Makefile
7367 dlls/ttydrv/Makefile
7368 dlls/url/Makefile
7369 dlls/urlmon/Makefile
7370 dlls/user/Makefile
7371 dlls/version/Makefile
7372 dlls/win32s/Makefile
7373 dlls/winaspi/Makefile
7374 dlls/winedos/Makefile
7375 dlls/wineps/Makefile
7376 dlls/wininet/Makefile
7377 dlls/winmm/Makefile
7378 dlls/winmm/joystick/Makefile
7379 dlls/winmm/mcianim/Makefile
7380 dlls/winmm/mciavi/Makefile
7381 dlls/winmm/mcicda/Makefile
7382 dlls/winmm/mciseq/Makefile
7383 dlls/winmm/mciwave/Makefile
7384 dlls/winmm/midimap/Makefile
7385 dlls/winmm/wavemap/Makefile
7386 dlls/winmm/wineoss/Makefile
7387 dlls/winnls/Makefile
7388 dlls/winsock/Makefile
7389 dlls/winspool/Makefile
7390 dlls/wintrust/Makefile
7391 dlls/wow32/Makefile
7392 dlls/wsock32/Makefile
7393 dlls/x11drv/Makefile
7394 documentation/Makefile
7395 documentation/wine.conf.man
7396 documentation/wine.man
7397 files/Makefile
7398 graphics/Makefile
7399 graphics/enhmetafiledrv/Makefile
7400 graphics/metafiledrv/Makefile
7401 graphics/win16drv/Makefile
7402 graphics/x11drv/Makefile
7403 if1632/Makefile
7404 include/Makefile
7405 library/Makefile
7406 libtest/Makefile
7407 loader/Makefile
7408 loader/dos/Makefile
7409 loader/ne/Makefile
7410 memory/Makefile
7411 misc/Makefile
7412 miscemu/Makefile
7413 msdos/Makefile
7414 objects/Makefile
7415 ole/Makefile
7416 programs/Makefile
7417 programs/avitools/Makefile
7418 programs/clock/Makefile
7419 programs/cmdlgtst/Makefile
7420 programs/control/Makefile
7421 programs/notepad/Makefile
7422 programs/osversioncheck/Makefile
7423 programs/progman/Makefile
7424 programs/regapi/Makefile
7425 programs/regtest/Makefile
7426 programs/uninstaller/Makefile
7427 programs/view/Makefile
7428 programs/wcmd/Makefile
7429 programs/winemine/Makefile
7430 programs/winetest/Makefile
7431 programs/winhelp/Makefile
7432 programs/winver/Makefile
7433 relay32/Makefile
7434 scheduler/Makefile
7435 server/Makefile
7436 tools/Makefile
7437 tools/winapi/Makefile
7438 tools/winebuild/Makefile
7439 tools/winedump/Makefile
7440 tools/winelauncher
7441 tools/wmc/Makefile
7442 tools/wrc/Makefile
7443 tsx11/Makefile
7444 unicode/Makefile
7445 win32/Makefile
7446 windows/Makefile
7447 windows/x11drv/Makefile "}
7448 EOF
7449 cat >> $CONFIG_STATUS <<\EOF
7450 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7451   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7452   case "$ac_file" in
7453   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7454        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7455   *) ac_file_in="${ac_file}.in" ;;
7456   esac
7457
7458   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7459
7460   # Remove last slash and all that follows it.  Not all systems have dirname.
7461   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7462   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7463     # The file is in a subdirectory.
7464     test ! -d "$ac_dir" && mkdir "$ac_dir"
7465     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7466     # A "../" for each directory in $ac_dir_suffix.
7467     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7468   else
7469     ac_dir_suffix= ac_dots=
7470   fi
7471
7472   case "$ac_given_srcdir" in
7473   .)  srcdir=.
7474       if test -z "$ac_dots"; then top_srcdir=.
7475       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7476   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7477   *) # Relative path.
7478     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7479     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7480   esac
7481
7482   case "$ac_given_INSTALL" in
7483   [/$]*) INSTALL="$ac_given_INSTALL" ;;
7484   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7485   esac
7486
7487   echo creating "$ac_file"
7488   rm -f "$ac_file"
7489   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7490   case "$ac_file" in
7491   *Makefile*) ac_comsub="1i\\
7492 # $configure_input" ;;
7493   *) ac_comsub= ;;
7494   esac
7495
7496   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7497   sed -e "$ac_comsub
7498 s%@configure_input@%$configure_input%g
7499 s%@srcdir@%$srcdir%g
7500 s%@top_srcdir@%$top_srcdir%g
7501 s%@INSTALL@%$INSTALL%g
7502 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7503 fi; done
7504 rm -f conftest.s*
7505
7506 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7507 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7508 #
7509 # ac_d sets the value in "#define NAME VALUE" lines.
7510 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7511 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7512 ac_dC='\3'
7513 ac_dD='%g'
7514 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7515 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7516 ac_uB='\([      ]\)%\1#\2define\3'
7517 ac_uC=' '
7518 ac_uD='\4%g'
7519 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7520 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7521 ac_eB='$%\1#\2define\3'
7522 ac_eC=' '
7523 ac_eD='%g'
7524
7525 if test "${CONFIG_HEADERS+set}" != set; then
7526 EOF
7527 cat >> $CONFIG_STATUS <<EOF
7528   CONFIG_HEADERS="include/config.h"
7529 EOF
7530 cat >> $CONFIG_STATUS <<\EOF
7531 fi
7532 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7533   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7534   case "$ac_file" in
7535   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7536        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7537   *) ac_file_in="${ac_file}.in" ;;
7538   esac
7539
7540   echo creating $ac_file
7541
7542   rm -f conftest.frag conftest.in conftest.out
7543   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7544   cat $ac_file_inputs > conftest.in
7545
7546 EOF
7547
7548 # Transform confdefs.h into a sed script conftest.vals that substitutes
7549 # the proper values into config.h.in to produce config.h.  And first:
7550 # Protect against being on the right side of a sed subst in config.status.
7551 # Protect against being in an unquoted here document in config.status.
7552 rm -f conftest.vals
7553 cat > conftest.hdr <<\EOF
7554 s/[\\&%]/\\&/g
7555 s%[\\$`]%\\&%g
7556 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7557 s%ac_d%ac_u%gp
7558 s%ac_u%ac_e%gp
7559 EOF
7560 sed -n -f conftest.hdr confdefs.h > conftest.vals
7561 rm -f conftest.hdr
7562
7563 # This sed command replaces #undef with comments.  This is necessary, for
7564 # example, in the case of _POSIX_SOURCE, which is predefined and required
7565 # on some systems where configure will not decide to define it.
7566 cat >> conftest.vals <<\EOF
7567 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7568 EOF
7569
7570 # Break up conftest.vals because some shells have a limit on
7571 # the size of here documents, and old seds have small limits too.
7572
7573 rm -f conftest.tail
7574 while :
7575 do
7576   ac_lines=`grep -c . conftest.vals`
7577   # grep -c gives empty output for an empty file on some AIX systems.
7578   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7579   # Write a limited-size here document to conftest.frag.
7580   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7581   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7582   echo 'CEOF
7583   sed -f conftest.frag conftest.in > conftest.out
7584   rm -f conftest.in
7585   mv conftest.out conftest.in
7586 ' >> $CONFIG_STATUS
7587   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7588   rm -f conftest.vals
7589   mv conftest.tail conftest.vals
7590 done
7591 rm -f conftest.vals
7592
7593 cat >> $CONFIG_STATUS <<\EOF
7594   rm -f conftest.frag conftest.h
7595   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7596   cat conftest.in >> conftest.h
7597   rm -f conftest.in
7598   if cmp -s $ac_file conftest.h 2>/dev/null; then
7599     echo "$ac_file is unchanged"
7600     rm -f conftest.h
7601   else
7602     # Remove last slash and all that follows it.  Not all systems have dirname.
7603       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7604       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7605       # The file is in a subdirectory.
7606       test ! -d "$ac_dir" && mkdir "$ac_dir"
7607     fi
7608     rm -f $ac_file
7609     mv conftest.h $ac_file
7610   fi
7611 fi; done
7612
7613 EOF
7614 cat >> $CONFIG_STATUS <<EOF
7615
7616
7617 EOF
7618 cat >> $CONFIG_STATUS <<\EOF
7619
7620 extra_subdirs="\
7621 dlls/ddraw/d3ddevice \
7622 dlls/ddraw/dclipper \
7623 dlls/ddraw/ddraw \
7624 dlls/ddraw/direct3d \
7625 dlls/ddraw/dpalette \
7626 dlls/ddraw/dsurface \
7627 dlls/dinput/joystick \
7628 dlls/dinput/keyboard \
7629 dlls/dinput/mouse \
7630 dlls/kernel/messages \
7631 dlls/user/dde \
7632 dlls/user/resources \
7633 dlls/wineps/data \
7634 "
7635 for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done 
7636
7637 exit 0
7638 EOF
7639 chmod +x $CONFIG_STATUS
7640 rm -fr confdefs* $ac_clean_files
7641 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7642
7643
7644 if test "$have_x" = "no"
7645 then
7646   echo
7647   echo "*** Warning: X development files not found. Wine will be built without"
7648   echo "*** X support, which currently does not work, and would probably not be"
7649   echo "*** what you want anyway. You will need to install devel packages of"
7650   echo "*** Xlib/Xfree86 and Xpm at the very least."
7651 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
7652 then
7653   echo
7654   echo "*** Warning: Xpm development files not found. Wine will be built without"
7655   echo "*** Xpm support, which currently does not work. You will need to install"
7656   echo "*** devel packages of Xpm."
7657 fi
7658
7659 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
7660 then
7661   echo
7662   echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
7663   echo "*** terminal resize support. Consider upgrading ncurses."
7664 fi
7665
7666 if test "$wine_cv_libc_reentrant" = "no" 
7667 then
7668   echo
7669   echo "*** Warning: non-reentrant libc detected. Wine will be build without"
7670   echo "*** thread support. Consider upgrading libc to a more recent"
7671   echo "*** reentrant version of libc."
7672 fi
7673
7674 if test "$wine_cv_opengl_version_OK" = "no"
7675 then
7676   echo
7677   echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
7678   echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
7679 fi
7680
7681 if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "normal"
7682 then
7683   echo
7684   echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
7685   echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
7686   echo "*** A fix for glibc 2.1.3 that seems to work is included in this version of Wine,"
7687   echo "*** start configure with '--enable-opengl' to force OpenGL support."
7688 fi
7689
7690 if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "yes"
7691 then
7692   echo
7693   echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
7694   echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
7695   echo "*** support before reporting bugs."
7696 fi
7697
7698 if test "$wine_cv_warn_cups_h" = "yes"
7699 then
7700   echo
7701   echo "*** Note: You have cups runtime libraries, but no development"
7702   echo "*** libraries. Install the cups-devel package or whichever package"
7703   echo "*** contains cups.h to enable CUPS support in WINE."
7704 fi
7705
7706 if test "$wine_cv_msg_freetype" = "yes"
7707 then
7708   echo
7709   echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
7710   echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
7711   echo "*** freetype-devel package (or its equivalent on your distribution) to"
7712   echo "*** enable Wine to use TrueType fonts."
7713 fi
7714
7715 echo
7716 echo "Configure finished.  Do 'make depend && make' to compile Wine."
7717 echo
7718