Release 980628
[wine/gsoc-2012-control.git] / configure
blobb008d4d35544f54c119b0af783d31f8170d58a98
1 #! /bin/sh
3 # From configure.in configure.in 1.00
4 # Guess values for system-dependent variables and create Makefiles.
5 # Generated automatically using autoconf version 2.12
6 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Defaults:
12 ac_help=
13 ac_default_prefix=/usr/local
14 # Any additions from configure.in:
15 ac_help="$ac_help
16 --disable-emulator build only the Wine library, not the emulator"
17 ac_help="$ac_help
18 --enable-dll build the Wine library as a DLL"
19 ac_help="$ac_help
20 --disable-debug compile out all debugging messages"
21 ac_help="$ac_help
22 --disable-trace compile out TRACE messages"
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"
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'
62 # Initialize some other variables.
63 subdirs=
64 MFLAGS= MAKEFLAGS=
65 # Maximum number of lines to put in a shell here document.
66 ac_max_here_lines=12
68 ac_prev=
69 for ac_option
72 # If the previous option needs an argument, assign it.
73 if test -n "$ac_prev"; then
74 eval "$ac_prev=\$ac_option"
75 ac_prev=
76 continue
79 case "$ac_option" in
80 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81 *) ac_optarg= ;;
82 esac
84 # Accept the important Cygnus configure options, so we can diagnose typos.
86 case "$ac_option" in
88 -bindir | --bindir | --bindi | --bind | --bin | --bi)
89 ac_prev=bindir ;;
90 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
91 bindir="$ac_optarg" ;;
93 -build | --build | --buil | --bui | --bu)
94 ac_prev=build ;;
95 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
96 build="$ac_optarg" ;;
98 -cache-file | --cache-file | --cache-fil | --cache-fi \
99 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
100 ac_prev=cache_file ;;
101 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
102 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
103 cache_file="$ac_optarg" ;;
105 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
106 ac_prev=datadir ;;
107 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
108 | --da=*)
109 datadir="$ac_optarg" ;;
111 -disable-* | --disable-*)
112 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
113 # Reject names that are not valid shell variable names.
114 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
115 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
117 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118 eval "enable_${ac_feature}=no" ;;
120 -enable-* | --enable-*)
121 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
122 # Reject names that are not valid shell variable names.
123 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
124 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
126 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127 case "$ac_option" in
128 *=*) ;;
129 *) ac_optarg=yes ;;
130 esac
131 eval "enable_${ac_feature}='$ac_optarg'" ;;
133 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
134 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
135 | --exec | --exe | --ex)
136 ac_prev=exec_prefix ;;
137 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
138 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
139 | --exec=* | --exe=* | --ex=*)
140 exec_prefix="$ac_optarg" ;;
142 -gas | --gas | --ga | --g)
143 # Obsolete; use --with-gas.
144 with_gas=yes ;;
146 -help | --help | --hel | --he)
147 # Omit some internal or obsolete options to make the list less imposing.
148 # This message is too long to be a string in the A/UX 3.1 sh.
149 cat << EOF
150 Usage: configure [options] [host]
151 Options: [defaults in brackets after descriptions]
152 Configuration:
153 --cache-file=FILE cache test results in FILE
154 --help print this message
155 --no-create do not create output files
156 --quiet, --silent do not print \`checking...' messages
157 --version print the version of autoconf that created configure
158 Directory and file names:
159 --prefix=PREFIX install architecture-independent files in PREFIX
160 [$ac_default_prefix]
161 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
162 [same as prefix]
163 --bindir=DIR user executables in DIR [EPREFIX/bin]
164 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
165 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
166 --datadir=DIR read-only architecture-independent data in DIR
167 [PREFIX/share]
168 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
169 --sharedstatedir=DIR modifiable architecture-independent data in DIR
170 [PREFIX/com]
171 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
172 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
173 --includedir=DIR C header files in DIR [PREFIX/include]
174 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
175 --infodir=DIR info documentation in DIR [PREFIX/info]
176 --mandir=DIR man documentation in DIR [PREFIX/man]
177 --srcdir=DIR find the sources in DIR [configure dir or ..]
178 --program-prefix=PREFIX prepend PREFIX to installed program names
179 --program-suffix=SUFFIX append SUFFIX to installed program names
180 --program-transform-name=PROGRAM
181 run sed PROGRAM on installed program names
183 cat << EOF
184 Host type:
185 --build=BUILD configure for building on BUILD [BUILD=HOST]
186 --host=HOST configure for HOST [guessed]
187 --target=TARGET configure for TARGET [TARGET=HOST]
188 Features and packages:
189 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
190 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
191 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
192 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
193 --x-includes=DIR X include files are in DIR
194 --x-libraries=DIR X library files are in DIR
196 if test -n "$ac_help"; then
197 echo "--enable and --with options recognized:$ac_help"
199 exit 0 ;;
201 -host | --host | --hos | --ho)
202 ac_prev=host ;;
203 -host=* | --host=* | --hos=* | --ho=*)
204 host="$ac_optarg" ;;
206 -includedir | --includedir | --includedi | --included | --include \
207 | --includ | --inclu | --incl | --inc)
208 ac_prev=includedir ;;
209 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210 | --includ=* | --inclu=* | --incl=* | --inc=*)
211 includedir="$ac_optarg" ;;
213 -infodir | --infodir | --infodi | --infod | --info | --inf)
214 ac_prev=infodir ;;
215 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216 infodir="$ac_optarg" ;;
218 -libdir | --libdir | --libdi | --libd)
219 ac_prev=libdir ;;
220 -libdir=* | --libdir=* | --libdi=* | --libd=*)
221 libdir="$ac_optarg" ;;
223 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224 | --libexe | --libex | --libe)
225 ac_prev=libexecdir ;;
226 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227 | --libexe=* | --libex=* | --libe=*)
228 libexecdir="$ac_optarg" ;;
230 -localstatedir | --localstatedir | --localstatedi | --localstated \
231 | --localstate | --localstat | --localsta | --localst \
232 | --locals | --local | --loca | --loc | --lo)
233 ac_prev=localstatedir ;;
234 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237 localstatedir="$ac_optarg" ;;
239 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240 ac_prev=mandir ;;
241 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242 mandir="$ac_optarg" ;;
244 -nfp | --nfp | --nf)
245 # Obsolete; use --without-fp.
246 with_fp=no ;;
248 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
249 | --no-cr | --no-c)
250 no_create=yes ;;
252 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254 no_recursion=yes ;;
256 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258 | --oldin | --oldi | --old | --ol | --o)
259 ac_prev=oldincludedir ;;
260 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263 oldincludedir="$ac_optarg" ;;
265 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266 ac_prev=prefix ;;
267 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268 prefix="$ac_optarg" ;;
270 -program-prefix | --program-prefix | --program-prefi | --program-pref \
271 | --program-pre | --program-pr | --program-p)
272 ac_prev=program_prefix ;;
273 -program-prefix=* | --program-prefix=* | --program-prefi=* \
274 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275 program_prefix="$ac_optarg" ;;
277 -program-suffix | --program-suffix | --program-suffi | --program-suff \
278 | --program-suf | --program-su | --program-s)
279 ac_prev=program_suffix ;;
280 -program-suffix=* | --program-suffix=* | --program-suffi=* \
281 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282 program_suffix="$ac_optarg" ;;
284 -program-transform-name | --program-transform-name \
285 | --program-transform-nam | --program-transform-na \
286 | --program-transform-n | --program-transform- \
287 | --program-transform | --program-transfor \
288 | --program-transfo | --program-transf \
289 | --program-trans | --program-tran \
290 | --progr-tra | --program-tr | --program-t)
291 ac_prev=program_transform_name ;;
292 -program-transform-name=* | --program-transform-name=* \
293 | --program-transform-nam=* | --program-transform-na=* \
294 | --program-transform-n=* | --program-transform-=* \
295 | --program-transform=* | --program-transfor=* \
296 | --program-transfo=* | --program-transf=* \
297 | --program-trans=* | --program-tran=* \
298 | --progr-tra=* | --program-tr=* | --program-t=*)
299 program_transform_name="$ac_optarg" ;;
301 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302 | -silent | --silent | --silen | --sile | --sil)
303 silent=yes ;;
305 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306 ac_prev=sbindir ;;
307 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308 | --sbi=* | --sb=*)
309 sbindir="$ac_optarg" ;;
311 -sharedstatedir | --sharedstatedir | --sharedstatedi \
312 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313 | --sharedst | --shareds | --shared | --share | --shar \
314 | --sha | --sh)
315 ac_prev=sharedstatedir ;;
316 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319 | --sha=* | --sh=*)
320 sharedstatedir="$ac_optarg" ;;
322 -site | --site | --sit)
323 ac_prev=site ;;
324 -site=* | --site=* | --sit=*)
325 site="$ac_optarg" ;;
327 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328 ac_prev=srcdir ;;
329 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330 srcdir="$ac_optarg" ;;
332 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333 | --syscon | --sysco | --sysc | --sys | --sy)
334 ac_prev=sysconfdir ;;
335 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337 sysconfdir="$ac_optarg" ;;
339 -target | --target | --targe | --targ | --tar | --ta | --t)
340 ac_prev=target ;;
341 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342 target="$ac_optarg" ;;
344 -v | -verbose | --verbose | --verbos | --verbo | --verb)
345 verbose=yes ;;
347 -version | --version | --versio | --versi | --vers)
348 echo "configure generated by autoconf version 2.12"
349 exit 0 ;;
351 -with-* | --with-*)
352 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353 # Reject names that are not valid shell variable names.
354 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357 ac_package=`echo $ac_package| sed 's/-/_/g'`
358 case "$ac_option" in
359 *=*) ;;
360 *) ac_optarg=yes ;;
361 esac
362 eval "with_${ac_package}='$ac_optarg'" ;;
364 -without-* | --without-*)
365 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366 # Reject names that are not valid shell variable names.
367 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 eval "with_${ac_package}=no" ;;
373 --x)
374 # Obsolete; use --with-x.
375 with_x=yes ;;
377 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378 | --x-incl | --x-inc | --x-in | --x-i)
379 ac_prev=x_includes ;;
380 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382 x_includes="$ac_optarg" ;;
384 -x-libraries | --x-libraries | --x-librarie | --x-librari \
385 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386 ac_prev=x_libraries ;;
387 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389 x_libraries="$ac_optarg" ;;
391 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
395 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396 echo "configure: warning: $ac_option: invalid host type" 1>&2
398 if test "x$nonopt" != xNONE; then
399 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
401 nonopt="$ac_option"
404 esac
405 done
407 if test -n "$ac_prev"; then
408 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
411 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
413 # File descriptor usage:
414 # 0 standard input
415 # 1 file creation
416 # 2 errors and warnings
417 # 3 some systems may open it to /dev/tty
418 # 4 used on the Kubota Titan
419 # 6 checking for... messages and results
420 # 5 compiler messages saved in config.log
421 if test "$silent" = yes; then
422 exec 6>/dev/null
423 else
424 exec 6>&1
426 exec 5>./config.log
428 echo "\
429 This file contains any messages produced by compilers while
430 running configure, to aid debugging if configure makes a mistake.
431 " 1>&5
433 # Strip out --no-create and --no-recursion so they do not pile up.
434 # Also quote any args containing shell metacharacters.
435 ac_configure_args=
436 for ac_arg
438 case "$ac_arg" in
439 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440 | --no-cr | --no-c) ;;
441 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446 esac
447 done
449 # NLS nuisances.
450 # Only set these to C if already set. These must not be set unconditionally
451 # because not all systems understand e.g. LANG=C (notably SCO).
452 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453 # Non-C LC_CTYPE values break the ctype check.
454 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
455 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
459 # confdefs.h avoids OS command line length limits that DEFS can exceed.
460 rm -rf conftest* confdefs.h
461 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
462 echo > confdefs.h
464 # A filename unique to this package, relative to the directory that
465 # configure is in, which we can look for to find out if srcdir is correct.
466 ac_unique_file=controls/edit.c
468 # Find the source files, if location was not specified.
469 if test -z "$srcdir"; then
470 ac_srcdir_defaulted=yes
471 # Try the directory containing this script, then its parent.
472 ac_prog=$0
473 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475 srcdir=$ac_confdir
476 if test ! -r $srcdir/$ac_unique_file; then
477 srcdir=..
479 else
480 ac_srcdir_defaulted=no
482 if test ! -r $srcdir/$ac_unique_file; then
483 if test "$ac_srcdir_defaulted" = yes; then
484 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485 else
486 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
489 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
491 # Prefer explicitly selected file to automatically selected ones.
492 if test -z "$CONFIG_SITE"; then
493 if test "x$prefix" != xNONE; then
494 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495 else
496 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
499 for ac_site_file in $CONFIG_SITE; do
500 if test -r "$ac_site_file"; then
501 echo "loading site script $ac_site_file"
502 . "$ac_site_file"
504 done
506 if test -r "$cache_file"; then
507 echo "loading cache $cache_file"
508 . $cache_file
509 else
510 echo "creating cache $cache_file"
511 > $cache_file
514 ac_ext=c
515 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516 ac_cpp='$CPP $CPPFLAGS'
517 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519 cross_compiling=$ac_cv_prog_cc_cross
521 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524 ac_n= ac_c='
525 ' ac_t=' '
526 else
527 ac_n=-n ac_c= ac_t=
529 else
530 ac_n= ac_c='\c' ac_t=
535 ac_aux_dir=
536 for ac_dir in tools $srcdir/tools; do
537 if test -f $ac_dir/install-sh; then
538 ac_aux_dir=$ac_dir
539 ac_install_sh="$ac_aux_dir/install-sh -c"
540 break
541 elif test -f $ac_dir/install.sh; then
542 ac_aux_dir=$ac_dir
543 ac_install_sh="$ac_aux_dir/install.sh -c"
544 break
546 done
547 if test -z "$ac_aux_dir"; then
548 { echo "configure: error: can not find install-sh or install.sh in tools $srcdir/tools" 1>&2; exit 1; }
550 ac_config_guess=$ac_aux_dir/config.guess
551 ac_config_sub=$ac_aux_dir/config.sub
552 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
555 # We want these before the checks, so the checks can modify their values.
556 LIBS="$LIBS -lm"
557 test -z "$PROGEXT" && PROGEXT=""
560 MAIN_TARGET=emu
561 LIB_TARGET=libwine.a
562 TRACE_MSGS=yes # the TRACE() macro
563 DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros.
565 # Check whether --enable-emulator or --disable-emulator was given.
566 if test "${enable_emulator+set}" = set; then
567 enableval="$enable_emulator"
568 if test "$enableval" = "no"; then MAIN_TARGET="lib"; fi
572 # Check whether --enable-dll or --disable-dll was given.
573 if test "${enable_dll+set}" = set; then
574 enableval="$enable_dll"
575 if test "$enableval" = "no"; then : ; else LIB_TARGET="libwine.so.1.0"; fi
580 # Check whether --enable-debug or --disable-debug was given.
581 if test "${enable_debug+set}" = set; then
582 enableval="$enable_debug"
583 if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi
587 # Check whether --enable-trace or --disable-trace was given.
588 if test "${enable_trace+set}" = set; then
589 enableval="$enable_trace"
590 if test "$enableval" = "no"; then TRACE_MSGS="no"; fi
594 # Check whether --with-reentrant-x or --without-reentrant-x was given.
595 if test "${with_reentrant_x+set}" = set; then
596 withval="$with_reentrant_x"
605 if test "$DEBUG_MSGS" = "no"
606 then
607 cat >> confdefs.h <<\EOF
608 #define NO_DEBUG_MSGS 1
611 cat >> confdefs.h <<\EOF
612 #define NO_TRACE_MSGS 1
615 else
616 if test "$TRACE_MSGS" = "no"
617 then
618 cat >> confdefs.h <<\EOF
619 #define NO_TRACE_MSGS 1
626 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
627 echo "configure:628: checking whether ${MAKE-make} sets \${MAKE}" >&5
628 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
629 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
630 echo $ac_n "(cached) $ac_c" 1>&6
631 else
632 cat > conftestmake <<\EOF
633 all:
634 @echo 'ac_maketemp="${MAKE}"'
636 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
637 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
638 if test -n "$ac_maketemp"; then
639 eval ac_cv_prog_make_${ac_make}_set=yes
640 else
641 eval ac_cv_prog_make_${ac_make}_set=no
643 rm -f conftestmake
645 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
646 echo "$ac_t""yes" 1>&6
647 SET_MAKE=
648 else
649 echo "$ac_t""no" 1>&6
650 SET_MAKE="MAKE=${MAKE-make}"
653 # Extract the first word of "gcc", so it can be a program name with args.
654 set dummy gcc; ac_word=$2
655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
656 echo "configure:657: checking for $ac_word" >&5
657 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
658 echo $ac_n "(cached) $ac_c" 1>&6
659 else
660 if test -n "$CC"; then
661 ac_cv_prog_CC="$CC" # Let the user override the test.
662 else
663 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
664 for ac_dir in $PATH; do
665 test -z "$ac_dir" && ac_dir=.
666 if test -f $ac_dir/$ac_word; then
667 ac_cv_prog_CC="gcc"
668 break
670 done
671 IFS="$ac_save_ifs"
674 CC="$ac_cv_prog_CC"
675 if test -n "$CC"; then
676 echo "$ac_t""$CC" 1>&6
677 else
678 echo "$ac_t""no" 1>&6
681 if test -z "$CC"; then
682 # Extract the first word of "cc", so it can be a program name with args.
683 set dummy cc; ac_word=$2
684 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
685 echo "configure:686: checking for $ac_word" >&5
686 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
687 echo $ac_n "(cached) $ac_c" 1>&6
688 else
689 if test -n "$CC"; then
690 ac_cv_prog_CC="$CC" # Let the user override the test.
691 else
692 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
693 ac_prog_rejected=no
694 for ac_dir in $PATH; do
695 test -z "$ac_dir" && ac_dir=.
696 if test -f $ac_dir/$ac_word; then
697 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
698 ac_prog_rejected=yes
699 continue
701 ac_cv_prog_CC="cc"
702 break
704 done
705 IFS="$ac_save_ifs"
706 if test $ac_prog_rejected = yes; then
707 # We found a bogon in the path, so make sure we never use it.
708 set dummy $ac_cv_prog_CC
709 shift
710 if test $# -gt 0; then
711 # We chose a different compiler from the bogus one.
712 # However, it has the same basename, so the bogon will be chosen
713 # first if we set CC to just the basename; use the full file name.
714 shift
715 set dummy "$ac_dir/$ac_word" "$@"
716 shift
717 ac_cv_prog_CC="$@"
722 CC="$ac_cv_prog_CC"
723 if test -n "$CC"; then
724 echo "$ac_t""$CC" 1>&6
725 else
726 echo "$ac_t""no" 1>&6
729 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
732 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
733 echo "configure:734: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
735 ac_ext=c
736 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
737 ac_cpp='$CPP $CPPFLAGS'
738 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
739 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
740 cross_compiling=$ac_cv_prog_cc_cross
742 cat > conftest.$ac_ext <<EOF
743 #line 744 "configure"
744 #include "confdefs.h"
745 main(){return(0);}
747 if { (eval echo configure:748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
748 ac_cv_prog_cc_works=yes
749 # If we can't run a trivial program, we are probably using a cross compiler.
750 if (./conftest; exit) 2>/dev/null; then
751 ac_cv_prog_cc_cross=no
752 else
753 ac_cv_prog_cc_cross=yes
755 else
756 echo "configure: failed program was:" >&5
757 cat conftest.$ac_ext >&5
758 ac_cv_prog_cc_works=no
760 rm -fr conftest*
762 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
763 if test $ac_cv_prog_cc_works = no; then
764 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
766 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
767 echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
768 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
769 cross_compiling=$ac_cv_prog_cc_cross
771 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
772 echo "configure:773: checking whether we are using GNU C" >&5
773 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
774 echo $ac_n "(cached) $ac_c" 1>&6
775 else
776 cat > conftest.c <<EOF
777 #ifdef __GNUC__
778 yes;
779 #endif
781 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
782 ac_cv_prog_gcc=yes
783 else
784 ac_cv_prog_gcc=no
788 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
790 if test $ac_cv_prog_gcc = yes; then
791 GCC=yes
792 ac_test_CFLAGS="${CFLAGS+set}"
793 ac_save_CFLAGS="$CFLAGS"
794 CFLAGS=
795 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
796 echo "configure:797: checking whether ${CC-cc} accepts -g" >&5
797 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
798 echo $ac_n "(cached) $ac_c" 1>&6
799 else
800 echo 'void f(){}' > conftest.c
801 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
802 ac_cv_prog_cc_g=yes
803 else
804 ac_cv_prog_cc_g=no
806 rm -f conftest*
810 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
811 if test "$ac_test_CFLAGS" = set; then
812 CFLAGS="$ac_save_CFLAGS"
813 elif test $ac_cv_prog_cc_g = yes; then
814 CFLAGS="-g -O2"
815 else
816 CFLAGS="-O2"
818 else
819 GCC=
820 test "${CFLAGS+set}" = set || CFLAGS="-g"
823 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
824 echo "configure:825: checking how to run the C preprocessor" >&5
825 # On Suns, sometimes $CPP names a directory.
826 if test -n "$CPP" && test -d "$CPP"; then
827 CPP=
829 if test -z "$CPP"; then
830 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
831 echo $ac_n "(cached) $ac_c" 1>&6
832 else
833 # This must be in double quotes, not single quotes, because CPP may get
834 # substituted into the Makefile and "${CC-cc}" will confuse make.
835 CPP="${CC-cc} -E"
836 # On the NeXT, cc -E runs the code through the compiler's parser,
837 # not just through cpp.
838 cat > conftest.$ac_ext <<EOF
839 #line 840 "configure"
840 #include "confdefs.h"
841 #include <assert.h>
842 Syntax Error
844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
845 { (eval echo configure:846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
846 ac_err=`grep -v '^ *+' conftest.out`
847 if test -z "$ac_err"; then
849 else
850 echo "$ac_err" >&5
851 echo "configure: failed program was:" >&5
852 cat conftest.$ac_ext >&5
853 rm -rf conftest*
854 CPP="${CC-cc} -E -traditional-cpp"
855 cat > conftest.$ac_ext <<EOF
856 #line 857 "configure"
857 #include "confdefs.h"
858 #include <assert.h>
859 Syntax Error
861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
862 { (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
863 ac_err=`grep -v '^ *+' conftest.out`
864 if test -z "$ac_err"; then
866 else
867 echo "$ac_err" >&5
868 echo "configure: failed program was:" >&5
869 cat conftest.$ac_ext >&5
870 rm -rf conftest*
871 CPP=/lib/cpp
873 rm -f conftest*
875 rm -f conftest*
876 ac_cv_prog_CPP="$CPP"
878 CPP="$ac_cv_prog_CPP"
879 else
880 ac_cv_prog_CPP="$CPP"
882 echo "$ac_t""$CPP" 1>&6
884 # If we find X, set shell vars x_includes and x_libraries to the
885 # paths, otherwise set no_x=yes.
886 # Uses ac_ vars as temps to allow command line to override cache and checks.
887 # --without-x overrides everything else, but does not touch the cache.
888 echo $ac_n "checking for X""... $ac_c" 1>&6
889 echo "configure:890: checking for X" >&5
891 # Check whether --with-x or --without-x was given.
892 if test "${with_x+set}" = set; then
893 withval="$with_x"
897 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
898 if test "x$with_x" = xno; then
899 # The user explicitly disabled X.
900 have_x=disabled
901 else
902 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
903 # Both variables are already set.
904 have_x=yes
905 else
906 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
907 echo $ac_n "(cached) $ac_c" 1>&6
908 else
909 # One or both of the vars are not set, and there is no cached value.
910 ac_x_includes=NO ac_x_libraries=NO
911 rm -fr conftestdir
912 if mkdir conftestdir; then
913 cd conftestdir
914 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
915 cat > Imakefile <<'EOF'
916 acfindx:
917 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
919 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
920 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
921 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
922 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
923 for ac_extension in a so sl; do
924 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
925 test -f $ac_im_libdir/libX11.$ac_extension; then
926 ac_im_usrlibdir=$ac_im_libdir; break
928 done
929 # Screen out bogus values from the imake configuration. They are
930 # bogus both because they are the default anyway, and because
931 # using them would break gcc on systems where it needs fixed includes.
932 case "$ac_im_incroot" in
933 /usr/include) ;;
934 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
935 esac
936 case "$ac_im_usrlibdir" in
937 /usr/lib | /lib) ;;
938 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
939 esac
941 cd ..
942 rm -fr conftestdir
945 if test "$ac_x_includes" = NO; then
946 # Guess where to find include files, by looking for this one X11 .h file.
947 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
949 # First, try using that file with no special directory specified.
950 cat > conftest.$ac_ext <<EOF
951 #line 952 "configure"
952 #include "confdefs.h"
953 #include <$x_direct_test_include>
955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
956 { (eval echo configure:957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
957 ac_err=`grep -v '^ *+' conftest.out`
958 if test -z "$ac_err"; then
959 rm -rf conftest*
960 # We can compile using X headers with no special include directory.
961 ac_x_includes=
962 else
963 echo "$ac_err" >&5
964 echo "configure: failed program was:" >&5
965 cat conftest.$ac_ext >&5
966 rm -rf conftest*
967 # Look for the header file in a standard set of common directories.
968 # Check X11 before X11Rn because it is often a symlink to the current release.
969 for ac_dir in \
970 /usr/X11/include \
971 /usr/X11R6/include \
972 /usr/X11R5/include \
973 /usr/X11R4/include \
975 /usr/include/X11 \
976 /usr/include/X11R6 \
977 /usr/include/X11R5 \
978 /usr/include/X11R4 \
980 /usr/local/X11/include \
981 /usr/local/X11R6/include \
982 /usr/local/X11R5/include \
983 /usr/local/X11R4/include \
985 /usr/local/include/X11 \
986 /usr/local/include/X11R6 \
987 /usr/local/include/X11R5 \
988 /usr/local/include/X11R4 \
990 /usr/X386/include \
991 /usr/x386/include \
992 /usr/XFree86/include/X11 \
994 /usr/include \
995 /usr/local/include \
996 /usr/unsupported/include \
997 /usr/athena/include \
998 /usr/local/x11r5/include \
999 /usr/lpp/Xamples/include \
1001 /usr/openwin/include \
1002 /usr/openwin/share/include \
1005 if test -r "$ac_dir/$x_direct_test_include"; then
1006 ac_x_includes=$ac_dir
1007 break
1009 done
1011 rm -f conftest*
1012 fi # $ac_x_includes = NO
1014 if test "$ac_x_libraries" = NO; then
1015 # Check for the libraries.
1017 test -z "$x_direct_test_library" && x_direct_test_library=Xt
1018 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1020 # See if we find them without any special options.
1021 # Don't add to $LIBS permanently.
1022 ac_save_LIBS="$LIBS"
1023 LIBS="-l$x_direct_test_library $LIBS"
1024 cat > conftest.$ac_ext <<EOF
1025 #line 1026 "configure"
1026 #include "confdefs.h"
1028 int main() {
1029 ${x_direct_test_function}()
1030 ; return 0; }
1032 if { (eval echo configure:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1033 rm -rf conftest*
1034 LIBS="$ac_save_LIBS"
1035 # We can link X programs with no special library path.
1036 ac_x_libraries=
1037 else
1038 echo "configure: failed program was:" >&5
1039 cat conftest.$ac_ext >&5
1040 rm -rf conftest*
1041 LIBS="$ac_save_LIBS"
1042 # First see if replacing the include by lib works.
1043 # Check X11 before X11Rn because it is often a symlink to the current release.
1044 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1045 /usr/X11/lib \
1046 /usr/X11R6/lib \
1047 /usr/X11R5/lib \
1048 /usr/X11R4/lib \
1050 /usr/lib/X11 \
1051 /usr/lib/X11R6 \
1052 /usr/lib/X11R5 \
1053 /usr/lib/X11R4 \
1055 /usr/local/X11/lib \
1056 /usr/local/X11R6/lib \
1057 /usr/local/X11R5/lib \
1058 /usr/local/X11R4/lib \
1060 /usr/local/lib/X11 \
1061 /usr/local/lib/X11R6 \
1062 /usr/local/lib/X11R5 \
1063 /usr/local/lib/X11R4 \
1065 /usr/X386/lib \
1066 /usr/x386/lib \
1067 /usr/XFree86/lib/X11 \
1069 /usr/lib \
1070 /usr/local/lib \
1071 /usr/unsupported/lib \
1072 /usr/athena/lib \
1073 /usr/local/x11r5/lib \
1074 /usr/lpp/Xamples/lib \
1075 /lib/usr/lib/X11 \
1077 /usr/openwin/lib \
1078 /usr/openwin/share/lib \
1081 for ac_extension in a so sl; do
1082 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1083 ac_x_libraries=$ac_dir
1084 break 2
1086 done
1087 done
1089 rm -f conftest*
1090 fi # $ac_x_libraries = NO
1092 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1093 # Didn't find X anywhere. Cache the known absence of X.
1094 ac_cv_have_x="have_x=no"
1095 else
1096 # Record where we found X for the cache.
1097 ac_cv_have_x="have_x=yes \
1098 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1102 eval "$ac_cv_have_x"
1103 fi # $with_x != no
1105 if test "$have_x" != yes; then
1106 echo "$ac_t""$have_x" 1>&6
1107 no_x=yes
1108 else
1109 # If each of the values was on the command line, it overrides each guess.
1110 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1111 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1112 # Update the cache value to reflect the command line values.
1113 ac_cv_have_x="have_x=yes \
1114 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1115 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1118 if test "$no_x" = yes; then
1119 # Not all programs may use this symbol, but it does not hurt to define it.
1120 cat >> confdefs.h <<\EOF
1121 #define X_DISPLAY_MISSING 1
1124 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
1125 else
1126 if test -n "$x_includes"; then
1127 X_CFLAGS="$X_CFLAGS -I$x_includes"
1130 # It would also be nice to do this for all -L options, not just this one.
1131 if test -n "$x_libraries"; then
1132 X_LIBS="$X_LIBS -L$x_libraries"
1133 # For Solaris; some versions of Sun CC require a space after -R and
1134 # others require no space. Words are not sufficient . . . .
1135 case "`(uname -sr) 2>/dev/null`" in
1136 "SunOS 5"*)
1137 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
1138 echo "configure:1139: checking whether -R must be followed by a space" >&5
1139 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
1140 cat > conftest.$ac_ext <<EOF
1141 #line 1142 "configure"
1142 #include "confdefs.h"
1144 int main() {
1146 ; return 0; }
1148 if { (eval echo configure:1149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1149 rm -rf conftest*
1150 ac_R_nospace=yes
1151 else
1152 echo "configure: failed program was:" >&5
1153 cat conftest.$ac_ext >&5
1154 rm -rf conftest*
1155 ac_R_nospace=no
1157 rm -f conftest*
1158 if test $ac_R_nospace = yes; then
1159 echo "$ac_t""no" 1>&6
1160 X_LIBS="$X_LIBS -R$x_libraries"
1161 else
1162 LIBS="$ac_xsave_LIBS -R $x_libraries"
1163 cat > conftest.$ac_ext <<EOF
1164 #line 1165 "configure"
1165 #include "confdefs.h"
1167 int main() {
1169 ; return 0; }
1171 if { (eval echo configure:1172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1172 rm -rf conftest*
1173 ac_R_space=yes
1174 else
1175 echo "configure: failed program was:" >&5
1176 cat conftest.$ac_ext >&5
1177 rm -rf conftest*
1178 ac_R_space=no
1180 rm -f conftest*
1181 if test $ac_R_space = yes; then
1182 echo "$ac_t""yes" 1>&6
1183 X_LIBS="$X_LIBS -R $x_libraries"
1184 else
1185 echo "$ac_t""neither works" 1>&6
1188 LIBS="$ac_xsave_LIBS"
1189 esac
1192 # Check for system-dependent libraries X programs must link with.
1193 # Do this before checking for the system-independent R6 libraries
1194 # (-lICE), since we may need -lsocket or whatever for X linking.
1196 if test "$ISC" = yes; then
1197 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1198 else
1199 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1200 # libraries were built with DECnet support. And karl@cs.umb.edu says
1201 # the Alpha needs dnet_stub (dnet does not exist).
1202 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
1203 echo "configure:1204: checking for dnet_ntoa in -ldnet" >&5
1204 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1205 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1206 echo $ac_n "(cached) $ac_c" 1>&6
1207 else
1208 ac_save_LIBS="$LIBS"
1209 LIBS="-ldnet $LIBS"
1210 cat > conftest.$ac_ext <<EOF
1211 #line 1212 "configure"
1212 #include "confdefs.h"
1213 /* Override any gcc2 internal prototype to avoid an error. */
1214 /* We use char because int might match the return type of a gcc2
1215 builtin and then its argument prototype would still apply. */
1216 char dnet_ntoa();
1218 int main() {
1219 dnet_ntoa()
1220 ; return 0; }
1222 if { (eval echo configure:1223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1223 rm -rf conftest*
1224 eval "ac_cv_lib_$ac_lib_var=yes"
1225 else
1226 echo "configure: failed program was:" >&5
1227 cat conftest.$ac_ext >&5
1228 rm -rf conftest*
1229 eval "ac_cv_lib_$ac_lib_var=no"
1231 rm -f conftest*
1232 LIBS="$ac_save_LIBS"
1235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1236 echo "$ac_t""yes" 1>&6
1237 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1238 else
1239 echo "$ac_t""no" 1>&6
1242 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1243 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
1244 echo "configure:1245: checking for dnet_ntoa in -ldnet_stub" >&5
1245 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1246 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1247 echo $ac_n "(cached) $ac_c" 1>&6
1248 else
1249 ac_save_LIBS="$LIBS"
1250 LIBS="-ldnet_stub $LIBS"
1251 cat > conftest.$ac_ext <<EOF
1252 #line 1253 "configure"
1253 #include "confdefs.h"
1254 /* Override any gcc2 internal prototype to avoid an error. */
1255 /* We use char because int might match the return type of a gcc2
1256 builtin and then its argument prototype would still apply. */
1257 char dnet_ntoa();
1259 int main() {
1260 dnet_ntoa()
1261 ; return 0; }
1263 if { (eval echo configure:1264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1264 rm -rf conftest*
1265 eval "ac_cv_lib_$ac_lib_var=yes"
1266 else
1267 echo "configure: failed program was:" >&5
1268 cat conftest.$ac_ext >&5
1269 rm -rf conftest*
1270 eval "ac_cv_lib_$ac_lib_var=no"
1272 rm -f conftest*
1273 LIBS="$ac_save_LIBS"
1276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1277 echo "$ac_t""yes" 1>&6
1278 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1279 else
1280 echo "$ac_t""no" 1>&6
1285 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1286 # to get the SysV transport functions.
1287 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
1288 # needs -lnsl.
1289 # The nsl library prevents programs from opening the X display
1290 # on Irix 5.2, according to dickey@clark.net.
1291 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1292 echo "configure:1293: checking for gethostbyname" >&5
1293 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1294 echo $ac_n "(cached) $ac_c" 1>&6
1295 else
1296 cat > conftest.$ac_ext <<EOF
1297 #line 1298 "configure"
1298 #include "confdefs.h"
1299 /* System header to define __stub macros and hopefully few prototypes,
1300 which can conflict with char gethostbyname(); below. */
1301 #include <assert.h>
1302 /* Override any gcc2 internal prototype to avoid an error. */
1303 /* We use char because int might match the return type of a gcc2
1304 builtin and then its argument prototype would still apply. */
1305 char gethostbyname();
1307 int main() {
1309 /* The GNU C library defines this for functions which it implements
1310 to always fail with ENOSYS. Some functions are actually named
1311 something starting with __ and the normal name is an alias. */
1312 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1313 choke me
1314 #else
1315 gethostbyname();
1316 #endif
1318 ; return 0; }
1320 if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1321 rm -rf conftest*
1322 eval "ac_cv_func_gethostbyname=yes"
1323 else
1324 echo "configure: failed program was:" >&5
1325 cat conftest.$ac_ext >&5
1326 rm -rf conftest*
1327 eval "ac_cv_func_gethostbyname=no"
1329 rm -f conftest*
1332 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1333 echo "$ac_t""yes" 1>&6
1335 else
1336 echo "$ac_t""no" 1>&6
1339 if test $ac_cv_func_gethostbyname = no; then
1340 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1341 echo "configure:1342: checking for gethostbyname in -lnsl" >&5
1342 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1343 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1344 echo $ac_n "(cached) $ac_c" 1>&6
1345 else
1346 ac_save_LIBS="$LIBS"
1347 LIBS="-lnsl $LIBS"
1348 cat > conftest.$ac_ext <<EOF
1349 #line 1350 "configure"
1350 #include "confdefs.h"
1351 /* Override any gcc2 internal prototype to avoid an error. */
1352 /* We use char because int might match the return type of a gcc2
1353 builtin and then its argument prototype would still apply. */
1354 char gethostbyname();
1356 int main() {
1357 gethostbyname()
1358 ; return 0; }
1360 if { (eval echo configure:1361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1361 rm -rf conftest*
1362 eval "ac_cv_lib_$ac_lib_var=yes"
1363 else
1364 echo "configure: failed program was:" >&5
1365 cat conftest.$ac_ext >&5
1366 rm -rf conftest*
1367 eval "ac_cv_lib_$ac_lib_var=no"
1369 rm -f conftest*
1370 LIBS="$ac_save_LIBS"
1373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1374 echo "$ac_t""yes" 1>&6
1375 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1376 else
1377 echo "$ac_t""no" 1>&6
1382 # lieder@skyler.mavd.honeywell.com says without -lsocket,
1383 # socket/setsockopt and other routines are undefined under SCO ODT
1384 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
1385 # on later versions), says simon@lia.di.epfl.ch: it contains
1386 # gethostby* variants that don't use the nameserver (or something).
1387 # -lsocket must be given before -lnsl if both are needed.
1388 # We assume that if connect needs -lnsl, so does gethostbyname.
1389 echo $ac_n "checking for connect""... $ac_c" 1>&6
1390 echo "configure:1391: checking for connect" >&5
1391 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1392 echo $ac_n "(cached) $ac_c" 1>&6
1393 else
1394 cat > conftest.$ac_ext <<EOF
1395 #line 1396 "configure"
1396 #include "confdefs.h"
1397 /* System header to define __stub macros and hopefully few prototypes,
1398 which can conflict with char connect(); below. */
1399 #include <assert.h>
1400 /* Override any gcc2 internal prototype to avoid an error. */
1401 /* We use char because int might match the return type of a gcc2
1402 builtin and then its argument prototype would still apply. */
1403 char connect();
1405 int main() {
1407 /* The GNU C library defines this for functions which it implements
1408 to always fail with ENOSYS. Some functions are actually named
1409 something starting with __ and the normal name is an alias. */
1410 #if defined (__stub_connect) || defined (__stub___connect)
1411 choke me
1412 #else
1413 connect();
1414 #endif
1416 ; return 0; }
1418 if { (eval echo configure:1419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1419 rm -rf conftest*
1420 eval "ac_cv_func_connect=yes"
1421 else
1422 echo "configure: failed program was:" >&5
1423 cat conftest.$ac_ext >&5
1424 rm -rf conftest*
1425 eval "ac_cv_func_connect=no"
1427 rm -f conftest*
1430 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1431 echo "$ac_t""yes" 1>&6
1433 else
1434 echo "$ac_t""no" 1>&6
1437 if test $ac_cv_func_connect = no; then
1438 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1439 echo "configure:1440: checking for connect in -lsocket" >&5
1440 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
1441 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1442 echo $ac_n "(cached) $ac_c" 1>&6
1443 else
1444 ac_save_LIBS="$LIBS"
1445 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
1446 cat > conftest.$ac_ext <<EOF
1447 #line 1448 "configure"
1448 #include "confdefs.h"
1449 /* Override any gcc2 internal prototype to avoid an error. */
1450 /* We use char because int might match the return type of a gcc2
1451 builtin and then its argument prototype would still apply. */
1452 char connect();
1454 int main() {
1455 connect()
1456 ; return 0; }
1458 if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1459 rm -rf conftest*
1460 eval "ac_cv_lib_$ac_lib_var=yes"
1461 else
1462 echo "configure: failed program was:" >&5
1463 cat conftest.$ac_ext >&5
1464 rm -rf conftest*
1465 eval "ac_cv_lib_$ac_lib_var=no"
1467 rm -f conftest*
1468 LIBS="$ac_save_LIBS"
1471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1472 echo "$ac_t""yes" 1>&6
1473 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
1474 else
1475 echo "$ac_t""no" 1>&6
1480 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
1481 echo $ac_n "checking for remove""... $ac_c" 1>&6
1482 echo "configure:1483: checking for remove" >&5
1483 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
1484 echo $ac_n "(cached) $ac_c" 1>&6
1485 else
1486 cat > conftest.$ac_ext <<EOF
1487 #line 1488 "configure"
1488 #include "confdefs.h"
1489 /* System header to define __stub macros and hopefully few prototypes,
1490 which can conflict with char remove(); below. */
1491 #include <assert.h>
1492 /* Override any gcc2 internal prototype to avoid an error. */
1493 /* We use char because int might match the return type of a gcc2
1494 builtin and then its argument prototype would still apply. */
1495 char remove();
1497 int main() {
1499 /* The GNU C library defines this for functions which it implements
1500 to always fail with ENOSYS. Some functions are actually named
1501 something starting with __ and the normal name is an alias. */
1502 #if defined (__stub_remove) || defined (__stub___remove)
1503 choke me
1504 #else
1505 remove();
1506 #endif
1508 ; return 0; }
1510 if { (eval echo configure:1511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1511 rm -rf conftest*
1512 eval "ac_cv_func_remove=yes"
1513 else
1514 echo "configure: failed program was:" >&5
1515 cat conftest.$ac_ext >&5
1516 rm -rf conftest*
1517 eval "ac_cv_func_remove=no"
1519 rm -f conftest*
1522 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
1523 echo "$ac_t""yes" 1>&6
1525 else
1526 echo "$ac_t""no" 1>&6
1529 if test $ac_cv_func_remove = no; then
1530 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
1531 echo "configure:1532: checking for remove in -lposix" >&5
1532 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
1533 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1534 echo $ac_n "(cached) $ac_c" 1>&6
1535 else
1536 ac_save_LIBS="$LIBS"
1537 LIBS="-lposix $LIBS"
1538 cat > conftest.$ac_ext <<EOF
1539 #line 1540 "configure"
1540 #include "confdefs.h"
1541 /* Override any gcc2 internal prototype to avoid an error. */
1542 /* We use char because int might match the return type of a gcc2
1543 builtin and then its argument prototype would still apply. */
1544 char remove();
1546 int main() {
1547 remove()
1548 ; return 0; }
1550 if { (eval echo configure:1551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1551 rm -rf conftest*
1552 eval "ac_cv_lib_$ac_lib_var=yes"
1553 else
1554 echo "configure: failed program was:" >&5
1555 cat conftest.$ac_ext >&5
1556 rm -rf conftest*
1557 eval "ac_cv_lib_$ac_lib_var=no"
1559 rm -f conftest*
1560 LIBS="$ac_save_LIBS"
1563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1564 echo "$ac_t""yes" 1>&6
1565 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
1566 else
1567 echo "$ac_t""no" 1>&6
1572 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
1573 echo $ac_n "checking for shmat""... $ac_c" 1>&6
1574 echo "configure:1575: checking for shmat" >&5
1575 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
1576 echo $ac_n "(cached) $ac_c" 1>&6
1577 else
1578 cat > conftest.$ac_ext <<EOF
1579 #line 1580 "configure"
1580 #include "confdefs.h"
1581 /* System header to define __stub macros and hopefully few prototypes,
1582 which can conflict with char shmat(); below. */
1583 #include <assert.h>
1584 /* Override any gcc2 internal prototype to avoid an error. */
1585 /* We use char because int might match the return type of a gcc2
1586 builtin and then its argument prototype would still apply. */
1587 char shmat();
1589 int main() {
1591 /* The GNU C library defines this for functions which it implements
1592 to always fail with ENOSYS. Some functions are actually named
1593 something starting with __ and the normal name is an alias. */
1594 #if defined (__stub_shmat) || defined (__stub___shmat)
1595 choke me
1596 #else
1597 shmat();
1598 #endif
1600 ; return 0; }
1602 if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1603 rm -rf conftest*
1604 eval "ac_cv_func_shmat=yes"
1605 else
1606 echo "configure: failed program was:" >&5
1607 cat conftest.$ac_ext >&5
1608 rm -rf conftest*
1609 eval "ac_cv_func_shmat=no"
1611 rm -f conftest*
1614 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
1615 echo "$ac_t""yes" 1>&6
1617 else
1618 echo "$ac_t""no" 1>&6
1621 if test $ac_cv_func_shmat = no; then
1622 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
1623 echo "configure:1624: checking for shmat in -lipc" >&5
1624 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
1625 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
1627 else
1628 ac_save_LIBS="$LIBS"
1629 LIBS="-lipc $LIBS"
1630 cat > conftest.$ac_ext <<EOF
1631 #line 1632 "configure"
1632 #include "confdefs.h"
1633 /* Override any gcc2 internal prototype to avoid an error. */
1634 /* We use char because int might match the return type of a gcc2
1635 builtin and then its argument prototype would still apply. */
1636 char shmat();
1638 int main() {
1639 shmat()
1640 ; return 0; }
1642 if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1643 rm -rf conftest*
1644 eval "ac_cv_lib_$ac_lib_var=yes"
1645 else
1646 echo "configure: failed program was:" >&5
1647 cat conftest.$ac_ext >&5
1648 rm -rf conftest*
1649 eval "ac_cv_lib_$ac_lib_var=no"
1651 rm -f conftest*
1652 LIBS="$ac_save_LIBS"
1655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1656 echo "$ac_t""yes" 1>&6
1657 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
1658 else
1659 echo "$ac_t""no" 1>&6
1665 # Check for libraries that X11R6 Xt/Xaw programs need.
1666 ac_save_LDFLAGS="$LDFLAGS"
1667 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
1668 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1669 # check for ICE first), but we must link in the order -lSM -lICE or
1670 # we get undefined symbols. So assume we have SM if we have ICE.
1671 # These have to be linked with before -lX11, unlike the other
1672 # libraries we check for below, so use a different variable.
1673 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1674 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
1675 echo "configure:1676: checking for IceConnectionNumber in -lICE" >&5
1676 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
1677 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1678 echo $ac_n "(cached) $ac_c" 1>&6
1679 else
1680 ac_save_LIBS="$LIBS"
1681 LIBS="-lICE $LIBS"
1682 cat > conftest.$ac_ext <<EOF
1683 #line 1684 "configure"
1684 #include "confdefs.h"
1685 /* Override any gcc2 internal prototype to avoid an error. */
1686 /* We use char because int might match the return type of a gcc2
1687 builtin and then its argument prototype would still apply. */
1688 char IceConnectionNumber();
1690 int main() {
1691 IceConnectionNumber()
1692 ; return 0; }
1694 if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1695 rm -rf conftest*
1696 eval "ac_cv_lib_$ac_lib_var=yes"
1697 else
1698 echo "configure: failed program was:" >&5
1699 cat conftest.$ac_ext >&5
1700 rm -rf conftest*
1701 eval "ac_cv_lib_$ac_lib_var=no"
1703 rm -f conftest*
1704 LIBS="$ac_save_LIBS"
1707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1708 echo "$ac_t""yes" 1>&6
1709 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1710 else
1711 echo "$ac_t""no" 1>&6
1714 LDFLAGS="$ac_save_LDFLAGS"
1718 for ac_prog in 'bison -y' byacc
1720 # Extract the first word of "$ac_prog", so it can be a program name with args.
1721 set dummy $ac_prog; ac_word=$2
1722 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1723 echo "configure:1724: checking for $ac_word" >&5
1724 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1725 echo $ac_n "(cached) $ac_c" 1>&6
1726 else
1727 if test -n "$YACC"; then
1728 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1729 else
1730 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1731 for ac_dir in $PATH; do
1732 test -z "$ac_dir" && ac_dir=.
1733 if test -f $ac_dir/$ac_word; then
1734 ac_cv_prog_YACC="$ac_prog"
1735 break
1737 done
1738 IFS="$ac_save_ifs"
1741 YACC="$ac_cv_prog_YACC"
1742 if test -n "$YACC"; then
1743 echo "$ac_t""$YACC" 1>&6
1744 else
1745 echo "$ac_t""no" 1>&6
1748 test -n "$YACC" && break
1749 done
1750 test -n "$YACC" || YACC="yacc"
1752 # Extract the first word of "flex", so it can be a program name with args.
1753 set dummy flex; ac_word=$2
1754 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1755 echo "configure:1756: checking for $ac_word" >&5
1756 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1757 echo $ac_n "(cached) $ac_c" 1>&6
1758 else
1759 if test -n "$LEX"; then
1760 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1761 else
1762 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1763 for ac_dir in $PATH; do
1764 test -z "$ac_dir" && ac_dir=.
1765 if test -f $ac_dir/$ac_word; then
1766 ac_cv_prog_LEX="flex"
1767 break
1769 done
1770 IFS="$ac_save_ifs"
1771 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1774 LEX="$ac_cv_prog_LEX"
1775 if test -n "$LEX"; then
1776 echo "$ac_t""$LEX" 1>&6
1777 else
1778 echo "$ac_t""no" 1>&6
1781 if test -z "$LEXLIB"
1782 then
1783 case "$LEX" in
1784 flex*) ac_lib=fl ;;
1785 *) ac_lib=l ;;
1786 esac
1787 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1788 echo "configure:1789: checking for yywrap in -l$ac_lib" >&5
1789 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1790 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1791 echo $ac_n "(cached) $ac_c" 1>&6
1792 else
1793 ac_save_LIBS="$LIBS"
1794 LIBS="-l$ac_lib $LIBS"
1795 cat > conftest.$ac_ext <<EOF
1796 #line 1797 "configure"
1797 #include "confdefs.h"
1798 /* Override any gcc2 internal prototype to avoid an error. */
1799 /* We use char because int might match the return type of a gcc2
1800 builtin and then its argument prototype would still apply. */
1801 char yywrap();
1803 int main() {
1804 yywrap()
1805 ; return 0; }
1807 if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1808 rm -rf conftest*
1809 eval "ac_cv_lib_$ac_lib_var=yes"
1810 else
1811 echo "configure: failed program was:" >&5
1812 cat conftest.$ac_ext >&5
1813 rm -rf conftest*
1814 eval "ac_cv_lib_$ac_lib_var=no"
1816 rm -f conftest*
1817 LIBS="$ac_save_LIBS"
1820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1821 echo "$ac_t""yes" 1>&6
1822 LEXLIB="-l$ac_lib"
1823 else
1824 echo "$ac_t""no" 1>&6
1829 # Extract the first word of "ranlib", so it can be a program name with args.
1830 set dummy ranlib; ac_word=$2
1831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1832 echo "configure:1833: checking for $ac_word" >&5
1833 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1834 echo $ac_n "(cached) $ac_c" 1>&6
1835 else
1836 if test -n "$RANLIB"; then
1837 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1838 else
1839 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1840 for ac_dir in $PATH; do
1841 test -z "$ac_dir" && ac_dir=.
1842 if test -f $ac_dir/$ac_word; then
1843 ac_cv_prog_RANLIB="ranlib"
1844 break
1846 done
1847 IFS="$ac_save_ifs"
1848 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1851 RANLIB="$ac_cv_prog_RANLIB"
1852 if test -n "$RANLIB"; then
1853 echo "$ac_t""$RANLIB" 1>&6
1854 else
1855 echo "$ac_t""no" 1>&6
1858 # Find a good install program. We prefer a C program (faster),
1859 # so one script is as good as another. But avoid the broken or
1860 # incompatible versions:
1861 # SysV /etc/install, /usr/sbin/install
1862 # SunOS /usr/etc/install
1863 # IRIX /sbin/install
1864 # AIX /bin/install
1865 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1866 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1867 # ./install, which can be erroneously created by make from ./install.sh.
1868 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1869 echo "configure:1870: checking for a BSD compatible install" >&5
1870 if test -z "$INSTALL"; then
1871 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1872 echo $ac_n "(cached) $ac_c" 1>&6
1873 else
1874 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1875 for ac_dir in $PATH; do
1876 # Account for people who put trailing slashes in PATH elements.
1877 case "$ac_dir/" in
1878 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1880 # OSF1 and SCO ODT 3.0 have their own names for install.
1881 for ac_prog in ginstall installbsd scoinst install; do
1882 if test -f $ac_dir/$ac_prog; then
1883 if test $ac_prog = install &&
1884 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1885 # AIX install. It has an incompatible calling convention.
1886 # OSF/1 installbsd also uses dspmsg, but is usable.
1888 else
1889 ac_cv_path_install="$ac_dir/$ac_prog -c"
1890 break 2
1893 done
1895 esac
1896 done
1897 IFS="$ac_save_IFS"
1900 if test "${ac_cv_path_install+set}" = set; then
1901 INSTALL="$ac_cv_path_install"
1902 else
1903 # As a last resort, use the slow shell script. We don't cache a
1904 # path for INSTALL within a source directory, because that will
1905 # break other packages using the cache if that directory is
1906 # removed, or if the path is relative.
1907 INSTALL="$ac_install_sh"
1910 echo "$ac_t""$INSTALL" 1>&6
1912 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1913 # It thinks the first close brace ends the variable substitution.
1914 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1916 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1918 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1919 echo "configure:1920: checking whether ln -s works" >&5
1920 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1921 echo $ac_n "(cached) $ac_c" 1>&6
1922 else
1923 rm -f conftestdata
1924 if ln -s X conftestdata 2>/dev/null
1925 then
1926 rm -f conftestdata
1927 ac_cv_prog_LN_S="ln -s"
1928 else
1929 ac_cv_prog_LN_S=ln
1932 LN_S="$ac_cv_prog_LN_S"
1933 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1934 echo "$ac_t""yes" 1>&6
1935 else
1936 echo "$ac_t""no" 1>&6
1939 # Extract the first word of "c2man", so it can be a program name with args.
1940 set dummy c2man; ac_word=$2
1941 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1942 echo "configure:1943: checking for $ac_word" >&5
1943 if eval "test \"`echo '$''{'ac_cv_prog_C2MAN'+set}'`\" = set"; then
1944 echo $ac_n "(cached) $ac_c" 1>&6
1945 else
1946 if test -n "$C2MAN"; then
1947 ac_cv_prog_C2MAN="$C2MAN" # Let the user override the test.
1948 else
1949 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1950 for ac_dir in $PATH; do
1951 test -z "$ac_dir" && ac_dir=.
1952 if test -f $ac_dir/$ac_word; then
1953 ac_cv_prog_C2MAN="c2man"
1954 break
1956 done
1957 IFS="$ac_save_ifs"
1958 test -z "$ac_cv_prog_C2MAN" && ac_cv_prog_C2MAN="true"
1961 C2MAN="$ac_cv_prog_C2MAN"
1962 if test -n "$C2MAN"; then
1963 echo "$ac_t""$C2MAN" 1>&6
1964 else
1965 echo "$ac_t""no" 1>&6
1970 echo $ac_n "checking for i386_set_ldt in -li386""... $ac_c" 1>&6
1971 echo "configure:1972: checking for i386_set_ldt in -li386" >&5
1972 ac_lib_var=`echo i386'_'i386_set_ldt | sed 'y%./+-%__p_%'`
1973 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1974 echo $ac_n "(cached) $ac_c" 1>&6
1975 else
1976 ac_save_LIBS="$LIBS"
1977 LIBS="-li386 $LIBS"
1978 cat > conftest.$ac_ext <<EOF
1979 #line 1980 "configure"
1980 #include "confdefs.h"
1981 /* Override any gcc2 internal prototype to avoid an error. */
1982 /* We use char because int might match the return type of a gcc2
1983 builtin and then its argument prototype would still apply. */
1984 char i386_set_ldt();
1986 int main() {
1987 i386_set_ldt()
1988 ; return 0; }
1990 if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1991 rm -rf conftest*
1992 eval "ac_cv_lib_$ac_lib_var=yes"
1993 else
1994 echo "configure: failed program was:" >&5
1995 cat conftest.$ac_ext >&5
1996 rm -rf conftest*
1997 eval "ac_cv_lib_$ac_lib_var=no"
1999 rm -f conftest*
2000 LIBS="$ac_save_LIBS"
2003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2004 echo "$ac_t""yes" 1>&6
2005 ac_tr_lib=HAVE_LIB`echo i386 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2006 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2007 cat >> confdefs.h <<EOF
2008 #define $ac_tr_lib 1
2011 LIBS="-li386 $LIBS"
2013 else
2014 echo "$ac_t""no" 1>&6
2017 echo $ac_n "checking for iswalnum in -lw""... $ac_c" 1>&6
2018 echo "configure:2019: checking for iswalnum in -lw" >&5
2019 ac_lib_var=`echo w'_'iswalnum | sed 'y%./+-%__p_%'`
2020 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2021 echo $ac_n "(cached) $ac_c" 1>&6
2022 else
2023 ac_save_LIBS="$LIBS"
2024 LIBS="-lw $LIBS"
2025 cat > conftest.$ac_ext <<EOF
2026 #line 2027 "configure"
2027 #include "confdefs.h"
2028 /* Override any gcc2 internal prototype to avoid an error. */
2029 /* We use char because int might match the return type of a gcc2
2030 builtin and then its argument prototype would still apply. */
2031 char iswalnum();
2033 int main() {
2034 iswalnum()
2035 ; return 0; }
2037 if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2038 rm -rf conftest*
2039 eval "ac_cv_lib_$ac_lib_var=yes"
2040 else
2041 echo "configure: failed program was:" >&5
2042 cat conftest.$ac_ext >&5
2043 rm -rf conftest*
2044 eval "ac_cv_lib_$ac_lib_var=no"
2046 rm -f conftest*
2047 LIBS="$ac_save_LIBS"
2050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2051 echo "$ac_t""yes" 1>&6
2052 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2053 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2054 cat >> confdefs.h <<EOF
2055 #define $ac_tr_lib 1
2058 LIBS="-lw $LIBS"
2060 else
2061 echo "$ac_t""no" 1>&6
2064 echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
2065 echo "configure:2066: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
2066 ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
2067 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2068 echo $ac_n "(cached) $ac_c" 1>&6
2069 else
2070 ac_save_LIBS="$LIBS"
2071 LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $LIBS"
2072 cat > conftest.$ac_ext <<EOF
2073 #line 2074 "configure"
2074 #include "confdefs.h"
2075 /* Override any gcc2 internal prototype to avoid an error. */
2076 /* We use char because int might match the return type of a gcc2
2077 builtin and then its argument prototype would still apply. */
2078 char XF86DGAQueryExtension();
2080 int main() {
2081 XF86DGAQueryExtension()
2082 ; return 0; }
2084 if { (eval echo configure:2085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2085 rm -rf conftest*
2086 eval "ac_cv_lib_$ac_lib_var=yes"
2087 else
2088 echo "configure: failed program was:" >&5
2089 cat conftest.$ac_ext >&5
2090 rm -rf conftest*
2091 eval "ac_cv_lib_$ac_lib_var=no"
2093 rm -f conftest*
2094 LIBS="$ac_save_LIBS"
2097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2098 echo "$ac_t""yes" 1>&6
2099 cat >> confdefs.h <<\EOF
2100 #define HAVE_LIBXXF86DGA 1
2102 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
2103 else
2104 echo "$ac_t""no" 1>&6
2108 for ac_hdr in sys/soundcard.h machine/soundcard.h
2110 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2111 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2112 echo "configure:2113: checking for $ac_hdr" >&5
2113 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2114 echo $ac_n "(cached) $ac_c" 1>&6
2115 else
2116 cat > conftest.$ac_ext <<EOF
2117 #line 2118 "configure"
2118 #include "confdefs.h"
2119 #include <$ac_hdr>
2121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2122 { (eval echo configure:2123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2123 ac_err=`grep -v '^ *+' conftest.out`
2124 if test -z "$ac_err"; then
2125 rm -rf conftest*
2126 eval "ac_cv_header_$ac_safe=yes"
2127 else
2128 echo "$ac_err" >&5
2129 echo "configure: failed program was:" >&5
2130 cat conftest.$ac_ext >&5
2131 rm -rf conftest*
2132 eval "ac_cv_header_$ac_safe=no"
2134 rm -f conftest*
2136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2137 echo "$ac_t""yes" 1>&6
2138 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2139 cat >> confdefs.h <<EOF
2140 #define $ac_tr_hdr 1
2143 else
2144 echo "$ac_t""no" 1>&6
2146 done
2149 echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6
2150 echo "configure:2151: checking "for Open Sound System"" >&5
2151 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then
2152 echo $ac_n "(cached) $ac_c" 1>&6
2153 else
2154 cat > conftest.$ac_ext <<EOF
2155 #line 2156 "configure"
2156 #include "confdefs.h"
2158 #ifdef HAVE_SYS_SOUNDCARD_H
2159 #include <sys/soundcard.h>
2160 #endif
2161 #ifdef HAVE_MACHINE_SOUNDCARD_H
2162 #include <machine/soundcard.h>
2163 #endif
2165 int main() {
2168 /* check for one of the Open Sound System specific SNDCTL_ defines */
2169 #if !defined(SNDCTL_DSP_STEREO)
2170 #error No open sound system
2171 #endif
2173 ; return 0; }
2175 if { (eval echo configure:2176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2176 rm -rf conftest*
2177 ac_cv_c_opensoundsystem="yes"
2178 else
2179 echo "configure: failed program was:" >&5
2180 cat conftest.$ac_ext >&5
2181 rm -rf conftest*
2182 ac_cv_c_opensoundsystem="no"
2184 rm -f conftest*
2187 echo "$ac_t""$ac_cv_c_opensoundsystem" 1>&6
2189 if test "$ac_cv_c_opensoundsystem" = "yes"
2190 then
2191 cat >> confdefs.h <<\EOF
2192 #define HAVE_OSS 1
2198 echo $ac_n "checking "for union semun"""... $ac_c" 1>&6
2199 echo "configure:2200: checking "for union semun"" >&5
2200 if eval "test \"`echo '$''{'ac_cv_c_union_semun'+set}'`\" = set"; then
2201 echo $ac_n "(cached) $ac_c" 1>&6
2202 else
2203 cat > conftest.$ac_ext <<EOF
2204 #line 2205 "configure"
2205 #include "confdefs.h"
2206 #include <sys/types.h>
2207 #include <sys/sem.h>
2208 int main() {
2209 union semun foo
2210 ; return 0; }
2212 if { (eval echo configure:2213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2213 rm -rf conftest*
2214 ac_cv_c_union_semun="yes"
2215 else
2216 echo "configure: failed program was:" >&5
2217 cat conftest.$ac_ext >&5
2218 rm -rf conftest*
2219 ac_cv_c_union_semun="no"
2221 rm -f conftest*
2224 echo "$ac_t""$ac_cv_c_union_semun" 1>&6
2225 if test "$ac_cv_c_union_semun" = "yes"
2226 then
2227 cat >> confdefs.h <<\EOF
2228 #define HAVE_UNION_SEMUN 1
2233 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
2236 if test "x${GCC}" = "xyes"
2237 then
2238 CFLAGS="$CFLAGS -Wall"
2239 echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
2240 echo "configure:2241: checking "for gcc strength-reduce bug"" >&5
2241 if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
2242 echo $ac_n "(cached) $ac_c" 1>&6
2243 else
2244 if test "$cross_compiling" = yes; then
2245 ac_cv_c_gcc_strength_bug="yes"
2246 else
2247 cat > conftest.$ac_ext <<EOF
2248 #line 2249 "configure"
2249 #include "confdefs.h"
2251 int main(void) {
2252 static int Array[3];
2253 unsigned int B = 3;
2254 int i;
2255 for(i=0; i<B; i++) Array[i] = i - 3;
2256 exit( Array[1] != -2 );
2259 if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2260 then
2261 ac_cv_c_gcc_strength_bug="no"
2262 else
2263 echo "configure: failed program was:" >&5
2264 cat conftest.$ac_ext >&5
2265 rm -fr conftest*
2266 ac_cv_c_gcc_strength_bug="yes"
2268 rm -fr conftest*
2273 echo "$ac_t""$ac_cv_c_gcc_strength_bug" 1>&6
2274 if test "$ac_cv_c_gcc_strength_bug" = "yes"
2275 then
2276 CFLAGS="$CFLAGS -fno-strength-reduce"
2281 echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6
2282 echo "configure:2283: checking "whether external symbols need an underscore prefix"" >&5
2283 if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then
2284 echo $ac_n "(cached) $ac_c" 1>&6
2285 else
2286 saved_libs=$LIBS
2287 LIBS="conftest_asm.s $LIBS"
2288 cat > conftest_asm.s <<EOF
2289 .globl _ac_test
2290 _ac_test:
2291 .long 0
2293 cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2296 extern int ac_test;
2297 int main() {
2298 if (ac_test) return 1
2299 ; return 0; }
2301 if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2302 rm -rf conftest*
2303 ac_cv_c_extern_prefix="yes"
2304 else
2305 echo "configure: failed program was:" >&5
2306 cat conftest.$ac_ext >&5
2307 rm -rf conftest*
2308 ac_cv_c_extern_prefix="no"
2310 rm -f conftest*
2311 LIBS=$saved_libs
2314 echo "$ac_t""$ac_cv_c_extern_prefix" 1>&6
2315 if test "$ac_cv_c_extern_prefix" = "yes"
2316 then
2317 cat >> confdefs.h <<\EOF
2318 #define NEED_UNDERSCORE_PREFIX 1
2324 echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6
2325 echo "configure:2326: checking "whether assembler accepts .string"" >&5
2326 if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then
2327 echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329 saved_libs=$LIBS
2330 LIBS="conftest_asm.s $LIBS"
2331 cat > conftest_asm.s <<EOF
2332 .string "test"
2334 cat > conftest.$ac_ext <<EOF
2335 #line 2336 "configure"
2336 #include "confdefs.h"
2338 int main() {
2340 ; return 0; }
2342 if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2343 rm -rf conftest*
2344 ac_cv_c_asm_string="yes"
2345 else
2346 echo "configure: failed program was:" >&5
2347 cat conftest.$ac_ext >&5
2348 rm -rf conftest*
2349 ac_cv_c_asm_string="no"
2351 rm -f conftest*
2352 LIBS=$saved_libs
2355 echo "$ac_t""$ac_cv_c_asm_string" 1>&6
2356 if test "$ac_cv_c_asm_string" = "yes"
2357 then
2358 cat >> confdefs.h <<\EOF
2359 #define HAVE_ASM_STRING 1
2365 DLLFLAGS=""
2366 if test "$LIB_TARGET" = "libwine.so.1.0"
2367 then
2368 echo $ac_n "checking "whether we can build a dll"""... $ac_c" 1>&6
2369 echo "configure:2370: checking "whether we can build a dll"" >&5
2370 if eval "test \"`echo '$''{'ac_cv_c_dll'+set}'`\" = set"; then
2371 echo $ac_n "(cached) $ac_c" 1>&6
2372 else
2373 saved_cflags=$CFLAGS
2374 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
2375 cat > conftest.$ac_ext <<EOF
2376 #line 2377 "configure"
2377 #include "confdefs.h"
2379 int main() {
2380 return 1
2381 ; return 0; }
2383 if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2384 rm -rf conftest*
2385 ac_cv_c_dll="yes"
2386 else
2387 echo "configure: failed program was:" >&5
2388 cat conftest.$ac_ext >&5
2389 rm -rf conftest*
2390 ac_cv_c_dll="no"
2392 rm -f conftest*
2393 CFLAGS=$saved_cflags
2397 echo "$ac_t""$ac_cv_c_dll" 1>&6
2398 if test "$ac_cv_c_dll" = "yes"
2399 then
2400 DLLFLAGS="-fPIC"
2401 else
2402 LIB_TARGET="libwine.a"
2408 echo $ac_n "checking "for reentrant X libraries"""... $ac_c" 1>&6
2409 echo "configure:2410: checking "for reentrant X libraries"" >&5
2410 if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then
2411 echo $ac_n "(cached) $ac_c" 1>&6
2412 else
2413 if test "x$with_reentrant_x" = "xno"
2414 then
2415 wine_cv_x_reentrant=no
2416 else
2417 libX11_ckeck=none
2418 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
2419 if test -e $dir/libX11.so; then
2420 libX11_check="-D $dir/libX11.so"
2421 break 1
2423 if test -e $dir/libX11.a; then
2424 libX11_check="$dir/libX11.a"
2425 break 1
2427 done
2428 if test "$libX11_check" != "none"; then
2429 if nm $libX11_check | grep -q __errno_location; then
2430 wine_cv_x_reentrant=yes
2431 else
2432 wine_cv_x_reentrant=no
2434 else
2435 wine_cv_x_reentrant=unknown
2440 echo "$ac_t""$wine_cv_x_reentrant" 1>&6
2441 if test "$wine_cv_x_reentrant" = "no"
2442 then
2443 cat >> confdefs.h <<\EOF
2444 #define NO_REENTRANT_X11 1
2450 for ac_func in clone getpagesize memmove sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid vfscanf
2452 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2453 echo "configure:2454: checking for $ac_func" >&5
2454 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2455 echo $ac_n "(cached) $ac_c" 1>&6
2456 else
2457 cat > conftest.$ac_ext <<EOF
2458 #line 2459 "configure"
2459 #include "confdefs.h"
2460 /* System header to define __stub macros and hopefully few prototypes,
2461 which can conflict with char $ac_func(); below. */
2462 #include <assert.h>
2463 /* Override any gcc2 internal prototype to avoid an error. */
2464 /* We use char because int might match the return type of a gcc2
2465 builtin and then its argument prototype would still apply. */
2466 char $ac_func();
2468 int main() {
2470 /* The GNU C library defines this for functions which it implements
2471 to always fail with ENOSYS. Some functions are actually named
2472 something starting with __ and the normal name is an alias. */
2473 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2474 choke me
2475 #else
2476 $ac_func();
2477 #endif
2479 ; return 0; }
2481 if { (eval echo configure:2482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2482 rm -rf conftest*
2483 eval "ac_cv_func_$ac_func=yes"
2484 else
2485 echo "configure: failed program was:" >&5
2486 cat conftest.$ac_ext >&5
2487 rm -rf conftest*
2488 eval "ac_cv_func_$ac_func=no"
2490 rm -f conftest*
2493 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2494 echo "$ac_t""yes" 1>&6
2495 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2496 cat >> confdefs.h <<EOF
2497 #define $ac_tr_func 1
2500 else
2501 echo "$ac_t""no" 1>&6
2503 done
2505 for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h
2507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2509 echo "configure:2510: checking for $ac_hdr" >&5
2510 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2511 echo $ac_n "(cached) $ac_c" 1>&6
2512 else
2513 cat > conftest.$ac_ext <<EOF
2514 #line 2515 "configure"
2515 #include "confdefs.h"
2516 #include <$ac_hdr>
2518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2519 { (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2520 ac_err=`grep -v '^ *+' conftest.out`
2521 if test -z "$ac_err"; then
2522 rm -rf conftest*
2523 eval "ac_cv_header_$ac_safe=yes"
2524 else
2525 echo "$ac_err" >&5
2526 echo "configure: failed program was:" >&5
2527 cat conftest.$ac_ext >&5
2528 rm -rf conftest*
2529 eval "ac_cv_header_$ac_safe=no"
2531 rm -f conftest*
2533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2534 echo "$ac_t""yes" 1>&6
2535 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2536 cat >> confdefs.h <<EOF
2537 #define $ac_tr_hdr 1
2540 else
2541 echo "$ac_t""no" 1>&6
2543 done
2545 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
2546 echo "configure:2547: checking whether stat file-mode macros are broken" >&5
2547 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
2548 echo $ac_n "(cached) $ac_c" 1>&6
2549 else
2550 cat > conftest.$ac_ext <<EOF
2551 #line 2552 "configure"
2552 #include "confdefs.h"
2553 #include <sys/types.h>
2554 #include <sys/stat.h>
2556 #if defined(S_ISBLK) && defined(S_IFDIR)
2557 # if S_ISBLK (S_IFDIR)
2558 You lose.
2559 # endif
2560 #endif
2562 #if defined(S_ISBLK) && defined(S_IFCHR)
2563 # if S_ISBLK (S_IFCHR)
2564 You lose.
2565 # endif
2566 #endif
2568 #if defined(S_ISLNK) && defined(S_IFREG)
2569 # if S_ISLNK (S_IFREG)
2570 You lose.
2571 # endif
2572 #endif
2574 #if defined(S_ISSOCK) && defined(S_IFREG)
2575 # if S_ISSOCK (S_IFREG)
2576 You lose.
2577 # endif
2578 #endif
2581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2582 egrep "You lose" >/dev/null 2>&1; then
2583 rm -rf conftest*
2584 ac_cv_header_stat_broken=yes
2585 else
2586 rm -rf conftest*
2587 ac_cv_header_stat_broken=no
2589 rm -f conftest*
2593 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
2594 if test $ac_cv_header_stat_broken = yes; then
2595 cat >> confdefs.h <<\EOF
2596 #define STAT_MACROS_BROKEN 1
2601 echo $ac_n "checking for working const""... $ac_c" 1>&6
2602 echo "configure:2603: checking for working const" >&5
2603 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2604 echo $ac_n "(cached) $ac_c" 1>&6
2605 else
2606 cat > conftest.$ac_ext <<EOF
2607 #line 2608 "configure"
2608 #include "confdefs.h"
2610 int main() {
2612 /* Ultrix mips cc rejects this. */
2613 typedef int charset[2]; const charset x;
2614 /* SunOS 4.1.1 cc rejects this. */
2615 char const *const *ccp;
2616 char **p;
2617 /* NEC SVR4.0.2 mips cc rejects this. */
2618 struct point {int x, y;};
2619 static struct point const zero = {0,0};
2620 /* AIX XL C 1.02.0.0 rejects this.
2621 It does not let you subtract one const X* pointer from another in an arm
2622 of an if-expression whose if-part is not a constant expression */
2623 const char *g = "string";
2624 ccp = &g + (g ? g-g : 0);
2625 /* HPUX 7.0 cc rejects these. */
2626 ++ccp;
2627 p = (char**) ccp;
2628 ccp = (char const *const *) p;
2629 { /* SCO 3.2v4 cc rejects this. */
2630 char *t;
2631 char const *s = 0 ? (char *) 0 : (char const *) 0;
2633 *t++ = 0;
2635 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2636 int x[] = {25, 17};
2637 const int *foo = &x[0];
2638 ++foo;
2640 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2641 typedef const int *iptr;
2642 iptr p = 0;
2643 ++p;
2645 { /* AIX XL C 1.02.0.0 rejects this saying
2646 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2647 struct s { int j; const int *ap[3]; };
2648 struct s *b; b->j = 5;
2650 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2651 const int foo = 10;
2654 ; return 0; }
2656 if { (eval echo configure:2657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2657 rm -rf conftest*
2658 ac_cv_c_const=yes
2659 else
2660 echo "configure: failed program was:" >&5
2661 cat conftest.$ac_ext >&5
2662 rm -rf conftest*
2663 ac_cv_c_const=no
2665 rm -f conftest*
2668 echo "$ac_t""$ac_cv_c_const" 1>&6
2669 if test $ac_cv_c_const = no; then
2670 cat >> confdefs.h <<\EOF
2671 #define const
2676 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2677 echo "configure:2678: checking for ANSI C header files" >&5
2678 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2679 echo $ac_n "(cached) $ac_c" 1>&6
2680 else
2681 cat > conftest.$ac_ext <<EOF
2682 #line 2683 "configure"
2683 #include "confdefs.h"
2684 #include <stdlib.h>
2685 #include <stdarg.h>
2686 #include <string.h>
2687 #include <float.h>
2689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2690 { (eval echo configure:2691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2691 ac_err=`grep -v '^ *+' conftest.out`
2692 if test -z "$ac_err"; then
2693 rm -rf conftest*
2694 ac_cv_header_stdc=yes
2695 else
2696 echo "$ac_err" >&5
2697 echo "configure: failed program was:" >&5
2698 cat conftest.$ac_ext >&5
2699 rm -rf conftest*
2700 ac_cv_header_stdc=no
2702 rm -f conftest*
2704 if test $ac_cv_header_stdc = yes; then
2705 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2706 cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709 #include <string.h>
2711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2712 egrep "memchr" >/dev/null 2>&1; then
2714 else
2715 rm -rf conftest*
2716 ac_cv_header_stdc=no
2718 rm -f conftest*
2722 if test $ac_cv_header_stdc = yes; then
2723 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2724 cat > conftest.$ac_ext <<EOF
2725 #line 2726 "configure"
2726 #include "confdefs.h"
2727 #include <stdlib.h>
2729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2730 egrep "free" >/dev/null 2>&1; then
2732 else
2733 rm -rf conftest*
2734 ac_cv_header_stdc=no
2736 rm -f conftest*
2740 if test $ac_cv_header_stdc = yes; then
2741 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2742 if test "$cross_compiling" = yes; then
2744 else
2745 cat > conftest.$ac_ext <<EOF
2746 #line 2747 "configure"
2747 #include "confdefs.h"
2748 #include <ctype.h>
2749 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2750 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2751 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2752 int main () { int i; for (i = 0; i < 256; i++)
2753 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2754 exit (0); }
2757 if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2758 then
2760 else
2761 echo "configure: failed program was:" >&5
2762 cat conftest.$ac_ext >&5
2763 rm -fr conftest*
2764 ac_cv_header_stdc=no
2766 rm -fr conftest*
2772 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2773 if test $ac_cv_header_stdc = yes; then
2774 cat >> confdefs.h <<\EOF
2775 #define STDC_HEADERS 1
2780 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2781 echo "configure:2782: checking for size_t" >&5
2782 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2783 echo $ac_n "(cached) $ac_c" 1>&6
2784 else
2785 cat > conftest.$ac_ext <<EOF
2786 #line 2787 "configure"
2787 #include "confdefs.h"
2788 #include <sys/types.h>
2789 #if STDC_HEADERS
2790 #include <stdlib.h>
2791 #include <stddef.h>
2792 #endif
2794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2795 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2796 rm -rf conftest*
2797 ac_cv_type_size_t=yes
2798 else
2799 rm -rf conftest*
2800 ac_cv_type_size_t=no
2802 rm -f conftest*
2805 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2806 if test $ac_cv_type_size_t = no; then
2807 cat >> confdefs.h <<\EOF
2808 #define size_t unsigned
2813 echo $ac_n "checking size of long long""... $ac_c" 1>&6
2814 echo "configure:2815: checking size of long long" >&5
2815 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2816 echo $ac_n "(cached) $ac_c" 1>&6
2817 else
2818 if test "$cross_compiling" = yes; then
2819 ac_cv_sizeof_long_long=0
2820 else
2821 cat > conftest.$ac_ext <<EOF
2822 #line 2823 "configure"
2823 #include "confdefs.h"
2824 #include <stdio.h>
2825 main()
2827 FILE *f=fopen("conftestval", "w");
2828 if (!f) exit(1);
2829 fprintf(f, "%d\n", sizeof(long long));
2830 exit(0);
2833 if { (eval echo configure:2834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2834 then
2835 ac_cv_sizeof_long_long=`cat conftestval`
2836 else
2837 echo "configure: failed program was:" >&5
2838 cat conftest.$ac_ext >&5
2839 rm -fr conftest*
2840 ac_cv_sizeof_long_long=0
2842 rm -fr conftest*
2846 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2847 cat >> confdefs.h <<EOF
2848 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2854 if test "$ac_cv_header_sys_vfs_h" = "yes"
2855 then
2856 echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6
2857 echo "configure:2858: checking "whether sys/vfs.h defines statfs"" >&5
2858 if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then
2859 echo $ac_n "(cached) $ac_c" 1>&6
2860 else
2861 cat > conftest.$ac_ext <<EOF
2862 #line 2863 "configure"
2863 #include "confdefs.h"
2865 #include <sys/types.h>
2866 #ifdef HAVE_SYS_PARAM_H
2867 # include <sys/param.h>
2868 #endif
2869 #include <sys/vfs.h>
2871 int main() {
2873 struct statfs stfs;
2875 memset(&stfs,0,sizeof(stfs));
2877 ; return 0; }
2879 if { (eval echo configure:2880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2880 rm -rf conftest*
2881 wine_cv_sys_vfs_has_statfs=yes
2882 else
2883 echo "configure: failed program was:" >&5
2884 cat conftest.$ac_ext >&5
2885 rm -rf conftest*
2886 wine_cv_sys_vfs_has_statfs=no
2889 rm -f conftest*
2893 echo "$ac_t""$wine_cv_sys_vfs_has_statfs" 1>&6
2894 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
2895 then
2896 cat >> confdefs.h <<\EOF
2897 #define STATFS_DEFINED_BY_SYS_VFS 1
2903 if test "$ac_cv_header_sys_statfs_h" = "yes"
2904 then
2905 echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6
2906 echo "configure:2907: checking "whether sys/statfs.h defines statfs"" >&5
2907 if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then
2908 echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910 cat > conftest.$ac_ext <<EOF
2911 #line 2912 "configure"
2912 #include "confdefs.h"
2914 #include <sys/types.h>
2915 #ifdef HAVE_SYS_PARAM_H
2916 # include <sys/param.h>
2917 #endif
2918 #include <sys/statfs.h>
2920 int main() {
2922 struct statfs stfs;
2924 ; return 0; }
2926 if { (eval echo configure:2927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2927 rm -rf conftest*
2928 wine_cv_sys_statfs_has_statfs=yes
2929 else
2930 echo "configure: failed program was:" >&5
2931 cat conftest.$ac_ext >&5
2932 rm -rf conftest*
2933 wine_cv_sys_statfs_has_statfs=no
2936 rm -f conftest*
2940 echo "$ac_t""$wine_cv_sys_statfs_has_statfs" 1>&6
2941 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
2942 then
2943 cat >> confdefs.h <<\EOF
2944 #define STATFS_DEFINED_BY_SYS_STATFS 1
2950 if test "$ac_cv_header_sys_mount_h" = "yes"
2951 then
2952 echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6
2953 echo "configure:2954: checking "whether sys/mount.h defines statfs"" >&5
2954 if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then
2955 echo $ac_n "(cached) $ac_c" 1>&6
2956 else
2957 cat > conftest.$ac_ext <<EOF
2958 #line 2959 "configure"
2959 #include "confdefs.h"
2961 #include <sys/types.h>
2962 #ifdef HAVE_SYS_PARAM_H
2963 # include <sys/param.h>
2964 #endif
2965 #include <sys/mount.h>
2967 int main() {
2969 struct statfs stfs;
2971 ; return 0; }
2973 if { (eval echo configure:2974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2974 rm -rf conftest*
2975 wine_cv_sys_mount_has_statfs=yes
2976 else
2977 echo "configure: failed program was:" >&5
2978 cat conftest.$ac_ext >&5
2979 rm -rf conftest*
2980 wine_cv_sys_mount_has_statfs=no
2983 rm -f conftest*
2987 echo "$ac_t""$wine_cv_sys_mount_has_statfs" 1>&6
2988 if test "$wine_cv_sys_mount_has_statfs" = "yes"
2989 then
2990 cat >> confdefs.h <<\EOF
2991 #define STATFS_DEFINED_BY_SYS_MOUNT 1
2998 echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6
2999 echo "configure:3000: checking "for statfs.f_bfree"" >&5
3000 if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then
3001 echo $ac_n "(cached) $ac_c" 1>&6
3002 else
3003 if test "x$statfs_bfree" = "xno"
3004 then
3005 wine_cv_statfs_bfree=no
3006 else
3007 cat > conftest.$ac_ext <<EOF
3008 #line 3009 "configure"
3009 #include "confdefs.h"
3011 #include <sys/types.h>
3012 #ifdef HAVE_SYS_PARAM_H
3013 # include <sys/param.h>
3014 #endif
3015 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
3016 # include <sys/mount.h>
3017 #else
3018 # ifdef STATFS_DEFINED_BY_SYS_VFS
3019 # include <sys/vfs.h>
3020 # else
3021 # ifdef STATFS_DEFINED_BY_SYS_STATFS
3022 # include <sys/statfs.h>
3023 # endif
3024 # endif
3025 #endif
3027 int main() {
3029 struct statfs stfs;
3031 stfs.f_bfree++;
3033 ; return 0; }
3035 if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3036 rm -rf conftest*
3037 wine_cv_statfs_bfree=yes
3038 else
3039 echo "configure: failed program was:" >&5
3040 cat conftest.$ac_ext >&5
3041 rm -rf conftest*
3042 wine_cv_statfs_bfree=no
3045 rm -f conftest*
3049 echo "$ac_t""$wine_cv_statfs_bfree" 1>&6
3050 if test "$wine_cv_statfs_bfree" = "yes"
3051 then
3052 cat >> confdefs.h <<\EOF
3053 #define STATFS_HAS_BFREE 1
3058 echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6
3059 echo "configure:3060: checking "for statfs.f_bavail"" >&5
3060 if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then
3061 echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063 if test "x$statfs_bavail" = "xno"
3064 then
3065 wine_cv_statfs_bavail=no
3066 else
3067 cat > conftest.$ac_ext <<EOF
3068 #line 3069 "configure"
3069 #include "confdefs.h"
3071 #include <sys/types.h>
3072 #ifdef HAVE_SYS_PARAM_H
3073 # include <sys/param.h>
3074 #endif
3075 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
3076 # include <sys/mount.h>
3077 #else
3078 # ifdef STATFS_DEFINED_BY_SYS_VFS
3079 # include <sys/vfs.h>
3080 # else
3081 # ifdef STATFS_DEFINED_BY_SYS_STATFS
3082 # include <sys/statfs.h>
3083 # endif
3084 # endif
3085 #endif
3087 int main() {
3089 struct statfs stfs;
3091 stfs.f_bavail++;
3093 ; return 0; }
3095 if { (eval echo configure:3096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3096 rm -rf conftest*
3097 wine_cv_statfs_bavail=yes
3098 else
3099 echo "configure: failed program was:" >&5
3100 cat conftest.$ac_ext >&5
3101 rm -rf conftest*
3102 wine_cv_statfs_bavail=no
3105 rm -f conftest*
3109 echo "$ac_t""$wine_cv_statfs_bavail" 1>&6
3110 if test "$wine_cv_statfs_bavail" = "yes"
3111 then
3112 cat >> confdefs.h <<\EOF
3113 #define STATFS_HAS_BAVAIL 1
3119 echo $ac_n "checking "for working sigaltstack"""... $ac_c" 1>&6
3120 echo "configure:3121: checking "for working sigaltstack"" >&5
3121 if eval "test \"`echo '$''{'ac_cv_c_working_sigaltstack'+set}'`\" = set"; then
3122 echo $ac_n "(cached) $ac_c" 1>&6
3123 else
3124 if test "$cross_compiling" = yes; then
3125 ac_cv_c_working_sigaltstack="no"
3127 else
3128 cat > conftest.$ac_ext <<EOF
3129 #line 3130 "configure"
3130 #include "confdefs.h"
3132 #include <stdio.h>
3133 #include <time.h> /* <sys/time.h> ? bad magic without end */
3134 #include <sys/types.h>
3135 #include <sys/signal.h>
3136 #ifdef HAVE_SYS_PARAM_H
3137 # include <sys/param.h>
3138 #endif
3139 #ifdef HAVE_SYSCALL_H
3140 # include <syscall.h>
3141 #else
3142 # ifdef HAVE_SYS_SYSCALL_H
3143 # include <sys/syscall.h>
3144 # endif
3145 #endif
3147 unsigned char *xaltstack;
3150 main(int argc,char **argv) {
3151 struct sigaltstack ss;
3153 xaltstack = malloc(16384);
3154 ss.ss_sp = xaltstack;
3155 ss.ss_size = 16384;
3156 ss.ss_flags = 0;
3157 if (sigaltstack(&ss, NULL) < 0) {
3158 /* this catches the glibc case */
3159 perror("sigaltstack");
3160 return (1); /* aka exit(1) aka fail */
3162 /* assume it works. */
3163 return 0; /* OK */
3167 if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3168 then
3169 ac_cv_c_working_sigaltstack="yes"
3170 else
3171 echo "configure: failed program was:" >&5
3172 cat conftest.$ac_ext >&5
3173 rm -fr conftest*
3174 ac_cv_c_working_sigaltstack="no"
3176 rm -fr conftest*
3181 echo "$ac_t""$ac_cv_c_working_sigaltstack" 1>&6
3183 if test "$ac_cv_c_working_sigaltstack" = "yes"
3184 then
3185 cat >> confdefs.h <<\EOF
3186 #define HAVE_WORKING_SIGALTSTACK 1
3193 MAKE_RULES=Make.rules
3196 trap '' 1 2 15
3197 cat > confcache <<\EOF
3198 # This file is a shell script that caches the results of configure
3199 # tests run on this system so they can be shared between configure
3200 # scripts and configure runs. It is not useful on other systems.
3201 # If it contains results you don't want to keep, you may remove or edit it.
3203 # By default, configure uses ./config.cache as the cache file,
3204 # creating it if it does not exist already. You can give configure
3205 # the --cache-file=FILE option to use a different cache file; that is
3206 # what configure does when it calls configure scripts in
3207 # subdirectories, so they share the cache.
3208 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3209 # config.status only pays attention to the cache file if you give it the
3210 # --recheck option to rerun configure.
3213 # The following way of writing the cache mishandles newlines in values,
3214 # but we know of no workaround that is simple, portable, and efficient.
3215 # So, don't put newlines in cache variables' values.
3216 # Ultrix sh set writes to stderr and can't be redirected directly,
3217 # and sets the high bit in the cache file unless we assign to the vars.
3218 (set) 2>&1 |
3219 case `(ac_space=' '; set) 2>&1` in
3220 *ac_space=\ *)
3221 # `set' does not quote correctly, so add quotes (double-quote substitution
3222 # turns \\\\ into \\, and sed turns \\ into \).
3223 sed -n \
3224 -e "s/'/'\\\\''/g" \
3225 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3228 # `set' quotes correctly as required by POSIX, so do not add quotes.
3229 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3231 esac >> confcache
3232 if cmp -s $cache_file confcache; then
3234 else
3235 if test -w $cache_file; then
3236 echo "updating cache $cache_file"
3237 cat confcache > $cache_file
3238 else
3239 echo "not updating unwritable cache $cache_file"
3242 rm -f confcache
3244 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3246 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3247 # Let make expand exec_prefix.
3248 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3250 # Any assignment to VPATH causes Sun make to only execute
3251 # the first set of double-colon rules, so remove it if not needed.
3252 # If there is a colon in the path, we need to keep it.
3253 if test "x$srcdir" = x.; then
3254 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3257 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3259 DEFS=-DHAVE_CONFIG_H
3261 # Without the "./", some shells look in PATH for config.status.
3262 : ${CONFIG_STATUS=./config.status}
3264 echo creating $CONFIG_STATUS
3265 rm -f $CONFIG_STATUS
3266 cat > $CONFIG_STATUS <<EOF
3267 #! /bin/sh
3268 # Generated automatically by configure.
3269 # Run this file to recreate the current configuration.
3270 # This directory was configured as follows,
3271 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3273 # $0 $ac_configure_args
3275 # Compiler output produced by configure, useful for debugging
3276 # configure, is in ./config.log if it exists.
3278 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3279 for ac_option
3281 case "\$ac_option" in
3282 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3283 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3284 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3285 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3286 echo "$CONFIG_STATUS generated by autoconf version 2.12"
3287 exit 0 ;;
3288 -help | --help | --hel | --he | --h)
3289 echo "\$ac_cs_usage"; exit 0 ;;
3290 *) echo "\$ac_cs_usage"; exit 1 ;;
3291 esac
3292 done
3294 ac_given_srcdir=$srcdir
3295 ac_given_INSTALL="$INSTALL"
3297 trap 'rm -fr `echo "
3298 Make.rules
3299 Makefile
3300 controls/Makefile
3301 debugger/Makefile
3302 documentation/Makefile
3303 files/Makefile
3304 graphics/Makefile
3305 graphics/metafiledrv/Makefile
3306 graphics/psdrv/Makefile
3307 graphics/win16drv/Makefile
3308 graphics/x11drv/Makefile
3309 if1632/Makefile
3310 ipc/Makefile
3311 library/Makefile
3312 libtest/Makefile
3313 loader/Makefile
3314 loader/ne/Makefile
3315 memory/Makefile
3316 misc/Makefile
3317 miscemu/Makefile
3318 msdos/Makefile
3319 multimedia/Makefile
3320 objects/Makefile
3321 ole/Makefile
3322 programs/Makefile
3323 programs/clock/Makefile
3324 programs/notepad/Makefile
3325 programs/progman/Makefile
3326 programs/regtest/Makefile
3327 programs/view/Makefile
3328 programs/winhelp/Makefile
3329 programs/winver/Makefile
3330 rc/Makefile
3331 relay32/Makefile
3332 resources/Makefile
3333 scheduler/Makefile
3334 tools/Makefile
3335 tools/wrc/Makefile
3336 tsx11/Makefile
3337 win32/Makefile
3338 windows/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3340 cat >> $CONFIG_STATUS <<EOF
3342 # Protect against being on the right side of a sed subst in config.status.
3343 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3344 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3345 $ac_vpsub
3346 $extrasub
3347 s%@CFLAGS@%$CFLAGS%g
3348 s%@CPPFLAGS@%$CPPFLAGS%g
3349 s%@CXXFLAGS@%$CXXFLAGS%g
3350 s%@DEFS@%$DEFS%g
3351 s%@LDFLAGS@%$LDFLAGS%g
3352 s%@LIBS@%$LIBS%g
3353 s%@exec_prefix@%$exec_prefix%g
3354 s%@prefix@%$prefix%g
3355 s%@program_transform_name@%$program_transform_name%g
3356 s%@bindir@%$bindir%g
3357 s%@sbindir@%$sbindir%g
3358 s%@libexecdir@%$libexecdir%g
3359 s%@datadir@%$datadir%g
3360 s%@sysconfdir@%$sysconfdir%g
3361 s%@sharedstatedir@%$sharedstatedir%g
3362 s%@localstatedir@%$localstatedir%g
3363 s%@libdir@%$libdir%g
3364 s%@includedir@%$includedir%g
3365 s%@oldincludedir@%$oldincludedir%g
3366 s%@infodir@%$infodir%g
3367 s%@mandir@%$mandir%g
3368 s%@PROGEXT@%$PROGEXT%g
3369 s%@MAIN_TARGET@%$MAIN_TARGET%g
3370 s%@LIB_TARGET@%$LIB_TARGET%g
3371 s%@OPTIONS@%$OPTIONS%g
3372 s%@SET_MAKE@%$SET_MAKE%g
3373 s%@CC@%$CC%g
3374 s%@CPP@%$CPP%g
3375 s%@X_CFLAGS@%$X_CFLAGS%g
3376 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3377 s%@X_LIBS@%$X_LIBS%g
3378 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
3379 s%@YACC@%$YACC%g
3380 s%@LEX@%$LEX%g
3381 s%@LEXLIB@%$LEXLIB%g
3382 s%@RANLIB@%$RANLIB%g
3383 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3384 s%@INSTALL_DATA@%$INSTALL_DATA%g
3385 s%@LN_S@%$LN_S%g
3386 s%@C2MAN@%$C2MAN%g
3387 s%@DLLFLAGS@%$DLLFLAGS%g
3388 /@MAKE_RULES@/r $MAKE_RULES
3389 s%@MAKE_RULES@%%g
3391 CEOF
3394 cat >> $CONFIG_STATUS <<\EOF
3396 # Split the substitutions into bite-sized pieces for seds with
3397 # small command number limits, like on Digital OSF/1 and HP-UX.
3398 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3399 ac_file=1 # Number of current file.
3400 ac_beg=1 # First line for current file.
3401 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3402 ac_more_lines=:
3403 ac_sed_cmds=""
3404 while $ac_more_lines; do
3405 if test $ac_beg -gt 1; then
3406 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3407 else
3408 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3410 if test ! -s conftest.s$ac_file; then
3411 ac_more_lines=false
3412 rm -f conftest.s$ac_file
3413 else
3414 if test -z "$ac_sed_cmds"; then
3415 ac_sed_cmds="sed -f conftest.s$ac_file"
3416 else
3417 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3419 ac_file=`expr $ac_file + 1`
3420 ac_beg=$ac_end
3421 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3423 done
3424 if test -z "$ac_sed_cmds"; then
3425 ac_sed_cmds=cat
3429 cat >> $CONFIG_STATUS <<EOF
3431 CONFIG_FILES=\${CONFIG_FILES-"Make.rules
3432 Makefile
3433 controls/Makefile
3434 debugger/Makefile
3435 documentation/Makefile
3436 files/Makefile
3437 graphics/Makefile
3438 graphics/metafiledrv/Makefile
3439 graphics/psdrv/Makefile
3440 graphics/win16drv/Makefile
3441 graphics/x11drv/Makefile
3442 if1632/Makefile
3443 ipc/Makefile
3444 library/Makefile
3445 libtest/Makefile
3446 loader/Makefile
3447 loader/ne/Makefile
3448 memory/Makefile
3449 misc/Makefile
3450 miscemu/Makefile
3451 msdos/Makefile
3452 multimedia/Makefile
3453 objects/Makefile
3454 ole/Makefile
3455 programs/Makefile
3456 programs/clock/Makefile
3457 programs/notepad/Makefile
3458 programs/progman/Makefile
3459 programs/regtest/Makefile
3460 programs/view/Makefile
3461 programs/winhelp/Makefile
3462 programs/winver/Makefile
3463 rc/Makefile
3464 relay32/Makefile
3465 resources/Makefile
3466 scheduler/Makefile
3467 tools/Makefile
3468 tools/wrc/Makefile
3469 tsx11/Makefile
3470 win32/Makefile
3471 windows/Makefile "}
3473 cat >> $CONFIG_STATUS <<\EOF
3474 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3475 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3476 case "$ac_file" in
3477 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3478 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3479 *) ac_file_in="${ac_file}.in" ;;
3480 esac
3482 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3484 # Remove last slash and all that follows it. Not all systems have dirname.
3485 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3486 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3487 # The file is in a subdirectory.
3488 test ! -d "$ac_dir" && mkdir "$ac_dir"
3489 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3490 # A "../" for each directory in $ac_dir_suffix.
3491 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3492 else
3493 ac_dir_suffix= ac_dots=
3496 case "$ac_given_srcdir" in
3497 .) srcdir=.
3498 if test -z "$ac_dots"; then top_srcdir=.
3499 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3500 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3501 *) # Relative path.
3502 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3503 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3504 esac
3506 case "$ac_given_INSTALL" in
3507 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3508 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3509 esac
3511 echo creating "$ac_file"
3512 rm -f "$ac_file"
3513 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3514 case "$ac_file" in
3515 *Makefile*) ac_comsub="1i\\
3516 # $configure_input" ;;
3517 *) ac_comsub= ;;
3518 esac
3520 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3521 sed -e "$ac_comsub
3522 s%@configure_input@%$configure_input%g
3523 s%@srcdir@%$srcdir%g
3524 s%@top_srcdir@%$top_srcdir%g
3525 s%@INSTALL@%$INSTALL%g
3526 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3527 fi; done
3528 rm -f conftest.s*
3530 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3531 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3533 # ac_d sets the value in "#define NAME VALUE" lines.
3534 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3535 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3536 ac_dC='\3'
3537 ac_dD='%g'
3538 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3539 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3540 ac_uB='\([ ]\)%\1#\2define\3'
3541 ac_uC=' '
3542 ac_uD='\4%g'
3543 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3544 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3545 ac_eB='$%\1#\2define\3'
3546 ac_eC=' '
3547 ac_eD='%g'
3549 if test "${CONFIG_HEADERS+set}" != set; then
3551 cat >> $CONFIG_STATUS <<EOF
3552 CONFIG_HEADERS="include/config.h"
3554 cat >> $CONFIG_STATUS <<\EOF
3556 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3557 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3558 case "$ac_file" in
3559 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3560 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3561 *) ac_file_in="${ac_file}.in" ;;
3562 esac
3564 echo creating $ac_file
3566 rm -f conftest.frag conftest.in conftest.out
3567 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3568 cat $ac_file_inputs > conftest.in
3572 # Transform confdefs.h into a sed script conftest.vals that substitutes
3573 # the proper values into config.h.in to produce config.h. And first:
3574 # Protect against being on the right side of a sed subst in config.status.
3575 # Protect against being in an unquoted here document in config.status.
3576 rm -f conftest.vals
3577 cat > conftest.hdr <<\EOF
3578 s/[\\&%]/\\&/g
3579 s%[\\$`]%\\&%g
3580 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3581 s%ac_d%ac_u%gp
3582 s%ac_u%ac_e%gp
3584 sed -n -f conftest.hdr confdefs.h > conftest.vals
3585 rm -f conftest.hdr
3587 # This sed command replaces #undef with comments. This is necessary, for
3588 # example, in the case of _POSIX_SOURCE, which is predefined and required
3589 # on some systems where configure will not decide to define it.
3590 cat >> conftest.vals <<\EOF
3591 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3594 # Break up conftest.vals because some shells have a limit on
3595 # the size of here documents, and old seds have small limits too.
3597 rm -f conftest.tail
3598 while :
3600 ac_lines=`grep -c . conftest.vals`
3601 # grep -c gives empty output for an empty file on some AIX systems.
3602 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3603 # Write a limited-size here document to conftest.frag.
3604 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3605 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3606 echo 'CEOF
3607 sed -f conftest.frag conftest.in > conftest.out
3608 rm -f conftest.in
3609 mv conftest.out conftest.in
3610 ' >> $CONFIG_STATUS
3611 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3612 rm -f conftest.vals
3613 mv conftest.tail conftest.vals
3614 done
3615 rm -f conftest.vals
3617 cat >> $CONFIG_STATUS <<\EOF
3618 rm -f conftest.frag conftest.h
3619 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3620 cat conftest.in >> conftest.h
3621 rm -f conftest.in
3622 if cmp -s $ac_file conftest.h 2>/dev/null; then
3623 echo "$ac_file is unchanged"
3624 rm -f conftest.h
3625 else
3626 # Remove last slash and all that follows it. Not all systems have dirname.
3627 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3628 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3629 # The file is in a subdirectory.
3630 test ! -d "$ac_dir" && mkdir "$ac_dir"
3632 rm -f $ac_file
3633 mv conftest.h $ac_file
3635 fi; done
3638 cat >> $CONFIG_STATUS <<EOF
3641 cat >> $CONFIG_STATUS <<\EOF
3643 exit 0
3645 chmod +x $CONFIG_STATUS
3646 rm -fr confdefs* $ac_clean_files
3647 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3650 echo
3651 echo "Configure finished. Do 'make depend; make' to compile Wine."
3652 echo