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