blob: 23aa1e6c344109dabc0c50a0690b5fd991301017 [file] [log] [blame]
Constantin Kaplinsky13e90832006-05-30 06:08:20 +00001#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-x use the X Window System"
16ac_help="$ac_help
17 --with-installed-zlib use the version of zlib which is installed on the
18 system instead of the one distributed with VNC"
19ac_help="$ac_help
20 --with-installed-jpeg use the version of jpeg which is installed on the
21 system instead of the one distributed with VNC"
22
23# Initialize some variables set by options.
24# The variables have the same names as the options, with
25# dashes changed to underlines.
26build=NONE
27cache_file=./config.cache
28exec_prefix=NONE
29host=NONE
30no_create=
31nonopt=NONE
32no_recursion=
33prefix=NONE
34program_prefix=NONE
35program_suffix=NONE
36program_transform_name=s,x,x,
37silent=
38site=
39srcdir=
40target=NONE
41verbose=
42x_includes=NONE
43x_libraries=NONE
44bindir='${exec_prefix}/bin'
45sbindir='${exec_prefix}/sbin'
46libexecdir='${exec_prefix}/libexec'
47datadir='${prefix}/share'
48sysconfdir='${prefix}/etc'
49sharedstatedir='${prefix}/com'
50localstatedir='${prefix}/var'
51libdir='${exec_prefix}/lib'
52includedir='${prefix}/include'
53oldincludedir='/usr/include'
54infodir='${prefix}/info'
55mandir='${prefix}/man'
56
57# Initialize some other variables.
58subdirs=
59MFLAGS= MAKEFLAGS=
60SHELL=${CONFIG_SHELL-/bin/sh}
61# Maximum number of lines to put in a shell here document.
62ac_max_here_lines=12
63
64ac_prev=
65for ac_option
66do
67
68 # If the previous option needs an argument, assign it.
69 if test -n "$ac_prev"; then
70 eval "$ac_prev=\$ac_option"
71 ac_prev=
72 continue
73 fi
74
75 case "$ac_option" in
76 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
77 *) ac_optarg= ;;
78 esac
79
80 # Accept the important Cygnus configure options, so we can diagnose typos.
81
82 case "$ac_option" in
83
84 -bindir | --bindir | --bindi | --bind | --bin | --bi)
85 ac_prev=bindir ;;
86 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
87 bindir="$ac_optarg" ;;
88
89 -build | --build | --buil | --bui | --bu)
90 ac_prev=build ;;
91 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
92 build="$ac_optarg" ;;
93
94 -cache-file | --cache-file | --cache-fil | --cache-fi \
95 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
96 ac_prev=cache_file ;;
97 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
98 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
99 cache_file="$ac_optarg" ;;
100
101 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
102 ac_prev=datadir ;;
103 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
104 | --da=*)
105 datadir="$ac_optarg" ;;
106
107 -disable-* | --disable-*)
108 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
109 # Reject names that are not valid shell variable names.
110 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
111 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
112 fi
113 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114 eval "enable_${ac_feature}=no" ;;
115
116 -enable-* | --enable-*)
117 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
118 # Reject names that are not valid shell variable names.
119 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
121 fi
122 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123 case "$ac_option" in
124 *=*) ;;
125 *) ac_optarg=yes ;;
126 esac
127 eval "enable_${ac_feature}='$ac_optarg'" ;;
128
129 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
130 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
131 | --exec | --exe | --ex)
132 ac_prev=exec_prefix ;;
133 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
134 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
135 | --exec=* | --exe=* | --ex=*)
136 exec_prefix="$ac_optarg" ;;
137
138 -gas | --gas | --ga | --g)
139 # Obsolete; use --with-gas.
140 with_gas=yes ;;
141
142 -help | --help | --hel | --he)
143 # Omit some internal or obsolete options to make the list less imposing.
144 # This message is too long to be a string in the A/UX 3.1 sh.
145 cat << EOF
146Usage: configure [options] [host]
147Options: [defaults in brackets after descriptions]
148Configuration:
149 --cache-file=FILE cache test results in FILE
150 --help print this message
151 --no-create do not create output files
152 --quiet, --silent do not print \`checking...' messages
153 --version print the version of autoconf that created configure
154Directory and file names:
155 --prefix=PREFIX install architecture-independent files in PREFIX
156 [$ac_default_prefix]
157 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
158 [same as prefix]
159 --bindir=DIR user executables in DIR [EPREFIX/bin]
160 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
161 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
162 --datadir=DIR read-only architecture-independent data in DIR
163 [PREFIX/share]
164 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
165 --sharedstatedir=DIR modifiable architecture-independent data in DIR
166 [PREFIX/com]
167 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
168 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
169 --includedir=DIR C header files in DIR [PREFIX/include]
170 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
171 --infodir=DIR info documentation in DIR [PREFIX/info]
172 --mandir=DIR man documentation in DIR [PREFIX/man]
173 --srcdir=DIR find the sources in DIR [configure dir or ..]
174 --program-prefix=PREFIX prepend PREFIX to installed program names
175 --program-suffix=SUFFIX append SUFFIX to installed program names
176 --program-transform-name=PROGRAM
177 run sed PROGRAM on installed program names
178EOF
179 cat << EOF
180Host type:
181 --build=BUILD configure for building on BUILD [BUILD=HOST]
182 --host=HOST configure for HOST [guessed]
183 --target=TARGET configure for TARGET [TARGET=HOST]
184Features and packages:
185 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
186 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
187 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
188 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
189 --x-includes=DIR X include files are in DIR
190 --x-libraries=DIR X library files are in DIR
191EOF
192 if test -n "$ac_help"; then
193 echo "--enable and --with options recognized:$ac_help"
194 fi
195 exit 0 ;;
196
197 -host | --host | --hos | --ho)
198 ac_prev=host ;;
199 -host=* | --host=* | --hos=* | --ho=*)
200 host="$ac_optarg" ;;
201
202 -includedir | --includedir | --includedi | --included | --include \
203 | --includ | --inclu | --incl | --inc)
204 ac_prev=includedir ;;
205 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
206 | --includ=* | --inclu=* | --incl=* | --inc=*)
207 includedir="$ac_optarg" ;;
208
209 -infodir | --infodir | --infodi | --infod | --info | --inf)
210 ac_prev=infodir ;;
211 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
212 infodir="$ac_optarg" ;;
213
214 -libdir | --libdir | --libdi | --libd)
215 ac_prev=libdir ;;
216 -libdir=* | --libdir=* | --libdi=* | --libd=*)
217 libdir="$ac_optarg" ;;
218
219 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
220 | --libexe | --libex | --libe)
221 ac_prev=libexecdir ;;
222 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
223 | --libexe=* | --libex=* | --libe=*)
224 libexecdir="$ac_optarg" ;;
225
226 -localstatedir | --localstatedir | --localstatedi | --localstated \
227 | --localstate | --localstat | --localsta | --localst \
228 | --locals | --local | --loca | --loc | --lo)
229 ac_prev=localstatedir ;;
230 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
231 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
232 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
233 localstatedir="$ac_optarg" ;;
234
235 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
236 ac_prev=mandir ;;
237 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
238 mandir="$ac_optarg" ;;
239
240 -nfp | --nfp | --nf)
241 # Obsolete; use --without-fp.
242 with_fp=no ;;
243
244 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
245 | --no-cr | --no-c)
246 no_create=yes ;;
247
248 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
249 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
250 no_recursion=yes ;;
251
252 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
253 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
254 | --oldin | --oldi | --old | --ol | --o)
255 ac_prev=oldincludedir ;;
256 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
257 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
258 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
259 oldincludedir="$ac_optarg" ;;
260
261 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
262 ac_prev=prefix ;;
263 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
264 prefix="$ac_optarg" ;;
265
266 -program-prefix | --program-prefix | --program-prefi | --program-pref \
267 | --program-pre | --program-pr | --program-p)
268 ac_prev=program_prefix ;;
269 -program-prefix=* | --program-prefix=* | --program-prefi=* \
270 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
271 program_prefix="$ac_optarg" ;;
272
273 -program-suffix | --program-suffix | --program-suffi | --program-suff \
274 | --program-suf | --program-su | --program-s)
275 ac_prev=program_suffix ;;
276 -program-suffix=* | --program-suffix=* | --program-suffi=* \
277 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
278 program_suffix="$ac_optarg" ;;
279
280 -program-transform-name | --program-transform-name \
281 | --program-transform-nam | --program-transform-na \
282 | --program-transform-n | --program-transform- \
283 | --program-transform | --program-transfor \
284 | --program-transfo | --program-transf \
285 | --program-trans | --program-tran \
286 | --progr-tra | --program-tr | --program-t)
287 ac_prev=program_transform_name ;;
288 -program-transform-name=* | --program-transform-name=* \
289 | --program-transform-nam=* | --program-transform-na=* \
290 | --program-transform-n=* | --program-transform-=* \
291 | --program-transform=* | --program-transfor=* \
292 | --program-transfo=* | --program-transf=* \
293 | --program-trans=* | --program-tran=* \
294 | --progr-tra=* | --program-tr=* | --program-t=*)
295 program_transform_name="$ac_optarg" ;;
296
297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
298 | -silent | --silent | --silen | --sile | --sil)
299 silent=yes ;;
300
301 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
302 ac_prev=sbindir ;;
303 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
304 | --sbi=* | --sb=*)
305 sbindir="$ac_optarg" ;;
306
307 -sharedstatedir | --sharedstatedir | --sharedstatedi \
308 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
309 | --sharedst | --shareds | --shared | --share | --shar \
310 | --sha | --sh)
311 ac_prev=sharedstatedir ;;
312 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
313 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
314 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
315 | --sha=* | --sh=*)
316 sharedstatedir="$ac_optarg" ;;
317
318 -site | --site | --sit)
319 ac_prev=site ;;
320 -site=* | --site=* | --sit=*)
321 site="$ac_optarg" ;;
322
323 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
324 ac_prev=srcdir ;;
325 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
326 srcdir="$ac_optarg" ;;
327
328 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
329 | --syscon | --sysco | --sysc | --sys | --sy)
330 ac_prev=sysconfdir ;;
331 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
332 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
333 sysconfdir="$ac_optarg" ;;
334
335 -target | --target | --targe | --targ | --tar | --ta | --t)
336 ac_prev=target ;;
337 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
338 target="$ac_optarg" ;;
339
340 -v | -verbose | --verbose | --verbos | --verbo | --verb)
341 verbose=yes ;;
342
343 -version | --version | --versio | --versi | --vers)
344 echo "configure generated by autoconf version 2.13"
345 exit 0 ;;
346
347 -with-* | --with-*)
348 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
349 # Reject names that are not valid shell variable names.
350 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
351 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
352 fi
353 ac_package=`echo $ac_package| sed 's/-/_/g'`
354 case "$ac_option" in
355 *=*) ;;
356 *) ac_optarg=yes ;;
357 esac
358 eval "with_${ac_package}='$ac_optarg'" ;;
359
360 -without-* | --without-*)
361 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
362 # Reject names that are not valid shell variable names.
363 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
364 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
365 fi
366 ac_package=`echo $ac_package| sed 's/-/_/g'`
367 eval "with_${ac_package}=no" ;;
368
369 --x)
370 # Obsolete; use --with-x.
371 with_x=yes ;;
372
373 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
374 | --x-incl | --x-inc | --x-in | --x-i)
375 ac_prev=x_includes ;;
376 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
377 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
378 x_includes="$ac_optarg" ;;
379
380 -x-libraries | --x-libraries | --x-librarie | --x-librari \
381 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
382 ac_prev=x_libraries ;;
383 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
384 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
385 x_libraries="$ac_optarg" ;;
386
387 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
388 ;;
389
390 *)
391 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
392 echo "configure: warning: $ac_option: invalid host type" 1>&2
393 fi
394 if test "x$nonopt" != xNONE; then
395 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
396 fi
397 nonopt="$ac_option"
398 ;;
399
400 esac
401done
402
403if test -n "$ac_prev"; then
404 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
405fi
406
407trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
408
409# File descriptor usage:
410# 0 standard input
411# 1 file creation
412# 2 errors and warnings
413# 3 some systems may open it to /dev/tty
414# 4 used on the Kubota Titan
415# 6 checking for... messages and results
416# 5 compiler messages saved in config.log
417if test "$silent" = yes; then
418 exec 6>/dev/null
419else
420 exec 6>&1
421fi
422exec 5>./config.log
423
424echo "\
425This file contains any messages produced by compilers while
426running configure, to aid debugging if configure makes a mistake.
427" 1>&5
428
429# Strip out --no-create and --no-recursion so they do not pile up.
430# Also quote any args containing shell metacharacters.
431ac_configure_args=
432for ac_arg
433do
434 case "$ac_arg" in
435 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
436 | --no-cr | --no-c) ;;
437 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
438 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
439 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
440 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
441 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
442 esac
443done
444
445# NLS nuisances.
446# Only set these to C if already set. These must not be set unconditionally
447# because not all systems understand e.g. LANG=C (notably SCO).
448# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
449# Non-C LC_CTYPE values break the ctype check.
450if test "${LANG+set}" = set; then LANG=C; export LANG; fi
451if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
452if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
453if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
454
455# confdefs.h avoids OS command line length limits that DEFS can exceed.
456rm -rf conftest* confdefs.h
457# AIX cpp loses on an empty file, so make sure it contains at least a newline.
458echo > confdefs.h
459
460# A filename unique to this package, relative to the directory that
461# configure is in, which we can look for to find out if srcdir is correct.
462ac_unique_file=rdr/InStream.h
463
464# Find the source files, if location was not specified.
465if test -z "$srcdir"; then
466 ac_srcdir_defaulted=yes
467 # Try the directory containing this script, then its parent.
468 ac_prog=$0
469 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
470 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
471 srcdir=$ac_confdir
472 if test ! -r $srcdir/$ac_unique_file; then
473 srcdir=..
474 fi
475else
476 ac_srcdir_defaulted=no
477fi
478if test ! -r $srcdir/$ac_unique_file; then
479 if test "$ac_srcdir_defaulted" = yes; then
480 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
481 else
482 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
483 fi
484fi
485srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
486
487# Prefer explicitly selected file to automatically selected ones.
488if test -z "$CONFIG_SITE"; then
489 if test "x$prefix" != xNONE; then
490 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
491 else
492 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
493 fi
494fi
495for ac_site_file in $CONFIG_SITE; do
496 if test -r "$ac_site_file"; then
497 echo "loading site script $ac_site_file"
498 . "$ac_site_file"
499 fi
500done
501
502if test -r "$cache_file"; then
503 echo "loading cache $cache_file"
504 . $cache_file
505else
506 echo "creating cache $cache_file"
507 > $cache_file
508fi
509
510ac_ext=c
511# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
512ac_cpp='$CPP $CPPFLAGS'
513ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
514ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
515cross_compiling=$ac_cv_prog_cc_cross
516
517ac_exeext=
518ac_objext=o
519if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
520 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
521 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
522 ac_n= ac_c='
523' ac_t=' '
524 else
525 ac_n=-n ac_c= ac_t=
526 fi
527else
528 ac_n= ac_c='\c' ac_t=
529fi
530
531
532
533ac_cv_prog_cc_g=no
534ac_cv_prog_cxx_g=no
535
536# Extract the first word of "gcc", so it can be a program name with args.
537set dummy gcc; ac_word=$2
538echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
539echo "configure:540: checking for $ac_word" >&5
540if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
541 echo $ac_n "(cached) $ac_c" 1>&6
542else
543 if test -n "$CC"; then
544 ac_cv_prog_CC="$CC" # Let the user override the test.
545else
546 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
547 ac_dummy="$PATH"
548 for ac_dir in $ac_dummy; do
549 test -z "$ac_dir" && ac_dir=.
550 if test -f $ac_dir/$ac_word; then
551 ac_cv_prog_CC="gcc"
552 break
553 fi
554 done
555 IFS="$ac_save_ifs"
556fi
557fi
558CC="$ac_cv_prog_CC"
559if test -n "$CC"; then
560 echo "$ac_t""$CC" 1>&6
561else
562 echo "$ac_t""no" 1>&6
563fi
564
565if test -z "$CC"; then
566 # Extract the first word of "cc", so it can be a program name with args.
567set dummy cc; ac_word=$2
568echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
569echo "configure:570: checking for $ac_word" >&5
570if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
571 echo $ac_n "(cached) $ac_c" 1>&6
572else
573 if test -n "$CC"; then
574 ac_cv_prog_CC="$CC" # Let the user override the test.
575else
576 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
577 ac_prog_rejected=no
578 ac_dummy="$PATH"
579 for ac_dir in $ac_dummy; do
580 test -z "$ac_dir" && ac_dir=.
581 if test -f $ac_dir/$ac_word; then
582 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
583 ac_prog_rejected=yes
584 continue
585 fi
586 ac_cv_prog_CC="cc"
587 break
588 fi
589 done
590 IFS="$ac_save_ifs"
591if test $ac_prog_rejected = yes; then
592 # We found a bogon in the path, so make sure we never use it.
593 set dummy $ac_cv_prog_CC
594 shift
595 if test $# -gt 0; then
596 # We chose a different compiler from the bogus one.
597 # However, it has the same basename, so the bogon will be chosen
598 # first if we set CC to just the basename; use the full file name.
599 shift
600 set dummy "$ac_dir/$ac_word" "$@"
601 shift
602 ac_cv_prog_CC="$@"
603 fi
604fi
605fi
606fi
607CC="$ac_cv_prog_CC"
608if test -n "$CC"; then
609 echo "$ac_t""$CC" 1>&6
610else
611 echo "$ac_t""no" 1>&6
612fi
613
614 if test -z "$CC"; then
615 case "`uname -s`" in
616 *win32* | *WIN32*)
617 # Extract the first word of "cl", so it can be a program name with args.
618set dummy cl; ac_word=$2
619echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
620echo "configure:621: checking for $ac_word" >&5
621if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
622 echo $ac_n "(cached) $ac_c" 1>&6
623else
624 if test -n "$CC"; then
625 ac_cv_prog_CC="$CC" # Let the user override the test.
626else
627 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
628 ac_dummy="$PATH"
629 for ac_dir in $ac_dummy; do
630 test -z "$ac_dir" && ac_dir=.
631 if test -f $ac_dir/$ac_word; then
632 ac_cv_prog_CC="cl"
633 break
634 fi
635 done
636 IFS="$ac_save_ifs"
637fi
638fi
639CC="$ac_cv_prog_CC"
640if test -n "$CC"; then
641 echo "$ac_t""$CC" 1>&6
642else
643 echo "$ac_t""no" 1>&6
644fi
645 ;;
646 esac
647 fi
648 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
649fi
650
651echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
652echo "configure:653: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
653
654ac_ext=c
655# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
656ac_cpp='$CPP $CPPFLAGS'
657ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
658ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
659cross_compiling=$ac_cv_prog_cc_cross
660
661cat > conftest.$ac_ext << EOF
662
663#line 664 "configure"
664#include "confdefs.h"
665
666main(){return(0);}
667EOF
668if { (eval echo configure:669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
669 ac_cv_prog_cc_works=yes
670 # If we can't run a trivial program, we are probably using a cross compiler.
671 if (./conftest; exit) 2>/dev/null; then
672 ac_cv_prog_cc_cross=no
673 else
674 ac_cv_prog_cc_cross=yes
675 fi
676else
677 echo "configure: failed program was:" >&5
678 cat conftest.$ac_ext >&5
679 ac_cv_prog_cc_works=no
680fi
681rm -fr conftest*
682ac_ext=c
683# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
684ac_cpp='$CPP $CPPFLAGS'
685ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
686ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
687cross_compiling=$ac_cv_prog_cc_cross
688
689echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
690if test $ac_cv_prog_cc_works = no; then
691 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
692fi
693echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
694echo "configure:695: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
695echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
696cross_compiling=$ac_cv_prog_cc_cross
697
698echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
699echo "configure:700: checking whether we are using GNU C" >&5
700if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
701 echo $ac_n "(cached) $ac_c" 1>&6
702else
703 cat > conftest.c <<EOF
704#ifdef __GNUC__
705 yes;
706#endif
707EOF
708if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
709 ac_cv_prog_gcc=yes
710else
711 ac_cv_prog_gcc=no
712fi
713fi
714
715echo "$ac_t""$ac_cv_prog_gcc" 1>&6
716
717if test $ac_cv_prog_gcc = yes; then
718 GCC=yes
719else
720 GCC=
721fi
722
723ac_test_CFLAGS="${CFLAGS+set}"
724ac_save_CFLAGS="$CFLAGS"
725CFLAGS=
726echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
727echo "configure:728: checking whether ${CC-cc} accepts -g" >&5
728if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
729 echo $ac_n "(cached) $ac_c" 1>&6
730else
731 echo 'void f(){}' > conftest.c
732if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
733 ac_cv_prog_cc_g=yes
734else
735 ac_cv_prog_cc_g=no
736fi
737rm -f conftest*
738
739fi
740
741echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
742if test "$ac_test_CFLAGS" = set; then
743 CFLAGS="$ac_save_CFLAGS"
744elif test $ac_cv_prog_cc_g = yes; then
745 if test "$GCC" = yes; then
746 CFLAGS="-g -O2"
747 else
748 CFLAGS="-g"
749 fi
750else
751 if test "$GCC" = yes; then
752 CFLAGS="-O2"
753 else
754 CFLAGS=
755 fi
756fi
757
758for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
759do
760# Extract the first word of "$ac_prog", so it can be a program name with args.
761set dummy $ac_prog; ac_word=$2
762echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
763echo "configure:764: checking for $ac_word" >&5
764if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
765 echo $ac_n "(cached) $ac_c" 1>&6
766else
767 if test -n "$CXX"; then
768 ac_cv_prog_CXX="$CXX" # Let the user override the test.
769else
770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
771 ac_dummy="$PATH"
772 for ac_dir in $ac_dummy; do
773 test -z "$ac_dir" && ac_dir=.
774 if test -f $ac_dir/$ac_word; then
775 ac_cv_prog_CXX="$ac_prog"
776 break
777 fi
778 done
779 IFS="$ac_save_ifs"
780fi
781fi
782CXX="$ac_cv_prog_CXX"
783if test -n "$CXX"; then
784 echo "$ac_t""$CXX" 1>&6
785else
786 echo "$ac_t""no" 1>&6
787fi
788
789test -n "$CXX" && break
790done
791test -n "$CXX" || CXX="gcc"
792
793
794echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
795echo "configure:796: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
796
797ac_ext=C
798# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
799ac_cpp='$CXXCPP $CPPFLAGS'
800ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
801ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
802cross_compiling=$ac_cv_prog_cxx_cross
803
804cat > conftest.$ac_ext << EOF
805
806#line 807 "configure"
807#include "confdefs.h"
808
809int main(){return(0);}
810EOF
811if { (eval echo configure:812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
812 ac_cv_prog_cxx_works=yes
813 # If we can't run a trivial program, we are probably using a cross compiler.
814 if (./conftest; exit) 2>/dev/null; then
815 ac_cv_prog_cxx_cross=no
816 else
817 ac_cv_prog_cxx_cross=yes
818 fi
819else
820 echo "configure: failed program was:" >&5
821 cat conftest.$ac_ext >&5
822 ac_cv_prog_cxx_works=no
823fi
824rm -fr conftest*
825ac_ext=c
826# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
827ac_cpp='$CPP $CPPFLAGS'
828ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
829ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
830cross_compiling=$ac_cv_prog_cc_cross
831
832echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
833if test $ac_cv_prog_cxx_works = no; then
834 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
835fi
836echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
837echo "configure:838: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
838echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
839cross_compiling=$ac_cv_prog_cxx_cross
840
841echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
842echo "configure:843: checking whether we are using GNU C++" >&5
843if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
844 echo $ac_n "(cached) $ac_c" 1>&6
845else
846 cat > conftest.C <<EOF
847#ifdef __GNUC__
848 yes;
849#endif
850EOF
851if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
852 ac_cv_prog_gxx=yes
853else
854 ac_cv_prog_gxx=no
855fi
856fi
857
858echo "$ac_t""$ac_cv_prog_gxx" 1>&6
859
860if test $ac_cv_prog_gxx = yes; then
861 GXX=yes
862else
863 GXX=
864fi
865
866ac_test_CXXFLAGS="${CXXFLAGS+set}"
867ac_save_CXXFLAGS="$CXXFLAGS"
868CXXFLAGS=
869echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
870echo "configure:871: checking whether ${CXX-g++} accepts -g" >&5
871if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
872 echo $ac_n "(cached) $ac_c" 1>&6
873else
874 echo 'void f(){}' > conftest.cc
875if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
876 ac_cv_prog_cxx_g=yes
877else
878 ac_cv_prog_cxx_g=no
879fi
880rm -f conftest*
881
882fi
883
884echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
885if test "$ac_test_CXXFLAGS" = set; then
886 CXXFLAGS="$ac_save_CXXFLAGS"
887elif test $ac_cv_prog_cxx_g = yes; then
888 if test "$GXX" = yes; then
889 CXXFLAGS="-g -O2"
890 else
891 CXXFLAGS="-g"
892 fi
893else
894 if test "$GXX" = yes; then
895 CXXFLAGS="-O2"
896 else
897 CXXFLAGS=
898 fi
899fi
900
901for ac_declaration in \
902 ''\
903 '#include <stdlib.h>' \
904 'extern "C" void std::exit (int) throw (); using std::exit;' \
905 'extern "C" void std::exit (int); using std::exit;' \
906 'extern "C" void exit (int) throw ();' \
907 'extern "C" void exit (int);' \
908 'void exit (int);'
909do
910 cat > conftest.$ac_ext <<EOF
911#line 912 "configure"
912#include "confdefs.h"
913#include <stdlib.h>
914$ac_declaration
915int main() {
916exit (42);
917; return 0; }
918EOF
919if { (eval echo configure:920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
920 :
921else
922 echo "configure: failed program was:" >&5
923 cat conftest.$ac_ext >&5
924 rm -rf conftest*
925 continue
926fi
927rm -f conftest*
928 cat > conftest.$ac_ext <<EOF
929#line 930 "configure"
930#include "confdefs.h"
931$ac_declaration
932int main() {
933exit (42);
934; return 0; }
935EOF
936if { (eval echo configure:937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
937 rm -rf conftest*
938 break
939else
940 echo "configure: failed program was:" >&5
941 cat conftest.$ac_ext >&5
942fi
943rm -f conftest*
944done
945if test -n "$ac_declaration"; then
946 echo '#ifdef __cplusplus' >>confdefs.h
947 echo $ac_declaration >>confdefs.h
948 echo '#endif' >>confdefs.h
949fi
950
951
952# Extract the first word of "ranlib", so it can be a program name with args.
953set dummy ranlib; ac_word=$2
954echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
955echo "configure:956: checking for $ac_word" >&5
956if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
957 echo $ac_n "(cached) $ac_c" 1>&6
958else
959 if test -n "$RANLIB"; then
960 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
961else
962 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
963 ac_dummy="$PATH"
964 for ac_dir in $ac_dummy; do
965 test -z "$ac_dir" && ac_dir=.
966 if test -f $ac_dir/$ac_word; then
967 ac_cv_prog_RANLIB="ranlib"
968 break
969 fi
970 done
971 IFS="$ac_save_ifs"
972 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
973fi
974fi
975RANLIB="$ac_cv_prog_RANLIB"
976if test -n "$RANLIB"; then
977 echo "$ac_t""$RANLIB" 1>&6
978else
979 echo "$ac_t""no" 1>&6
980fi
981
982echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
983echo "configure:984: checking whether ${MAKE-make} sets \${MAKE}" >&5
984set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
985if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
986 echo $ac_n "(cached) $ac_c" 1>&6
987else
988 cat > conftestmake <<\EOF
989all:
990 @echo 'ac_maketemp="${MAKE}"'
991EOF
992# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
993eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
994if test -n "$ac_maketemp"; then
995 eval ac_cv_prog_make_${ac_make}_set=yes
996else
997 eval ac_cv_prog_make_${ac_make}_set=no
998fi
999rm -f conftestmake
1000fi
1001if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1002 echo "$ac_t""yes" 1>&6
1003 SET_MAKE=
1004else
1005 echo "$ac_t""no" 1>&6
1006 SET_MAKE="MAKE=${MAKE-make}"
1007fi
1008
1009ac_ext=C
1010# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1011ac_cpp='$CXXCPP $CPPFLAGS'
1012ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1013ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1014cross_compiling=$ac_cv_prog_cxx_cross
1015
1016
1017case "`(uname -sr) 2>/dev/null`" in
1018"SunOS 5"*)
1019 SOLARIS=yes
1020 ;;
1021"Linux"*)
1022 LINUX=yes
1023 ;;
1024"IRIX 6"*)
1025 X_LIBS="-L/usr/lib32"
1026 ;;
1027"LynxOS 2"*)
1028 SJLJ_EXCEPTIONS=yes
1029 ;;
1030esac
1031
1032if test "$GCC" = yes; then
1033 CFLAGS="$CFLAGS -Wall"
1034 if test "$SOLARIS" = yes; then
1035 CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int"
1036 fi
1037fi
1038if test "$GXX" = yes; then
1039 CXXFLAGS="$CXXFLAGS -Wall"
1040 if test "$SOLARIS" = yes; then
1041 CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -fpermissive"
1042 fi
1043 if test "$SJLJ_EXCEPTIONS" = yes; then
1044 CXXFLAGS="$CXXFLAGS -fsjlj-exceptions"
1045 fi
1046fi
1047
1048echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
1049echo "configure:1050: checking how to run the C++ preprocessor" >&5
1050if test -z "$CXXCPP"; then
1051if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
1052 echo $ac_n "(cached) $ac_c" 1>&6
1053else
1054 ac_ext=C
1055# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1056ac_cpp='$CXXCPP $CPPFLAGS'
1057ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1058ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1059cross_compiling=$ac_cv_prog_cxx_cross
1060 CXXCPP="${CXX-g++} -E"
1061 cat > conftest.$ac_ext <<EOF
1062#line 1063 "configure"
1063#include "confdefs.h"
1064#include <stdlib.h>
1065EOF
1066ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1067{ (eval echo configure:1068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1068ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1069if test -z "$ac_err"; then
1070 :
1071else
1072 echo "$ac_err" >&5
1073 echo "configure: failed program was:" >&5
1074 cat conftest.$ac_ext >&5
1075 rm -rf conftest*
1076 CXXCPP=/lib/cpp
1077fi
1078rm -f conftest*
1079 ac_cv_prog_CXXCPP="$CXXCPP"
1080ac_ext=C
1081# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1082ac_cpp='$CXXCPP $CPPFLAGS'
1083ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1084ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1085cross_compiling=$ac_cv_prog_cxx_cross
1086fi
1087fi
1088CXXCPP="$ac_cv_prog_CXXCPP"
1089echo "$ac_t""$CXXCPP" 1>&6
1090
1091# If we find X, set shell vars x_includes and x_libraries to the
1092# paths, otherwise set no_x=yes.
1093# Uses ac_ vars as temps to allow command line to override cache and checks.
1094# --without-x overrides everything else, but does not touch the cache.
1095echo $ac_n "checking for X""... $ac_c" 1>&6
1096echo "configure:1097: checking for X" >&5
1097
1098# Check whether --with-x or --without-x was given.
1099if test "${with_x+set}" = set; then
1100 withval="$with_x"
1101 :
1102fi
1103
1104# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1105if test "x$with_x" = xno; then
1106 # The user explicitly disabled X.
1107 have_x=disabled
1108else
1109 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1110 # Both variables are already set.
1111 have_x=yes
1112 else
1113if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1114 echo $ac_n "(cached) $ac_c" 1>&6
1115else
1116 # One or both of the vars are not set, and there is no cached value.
1117ac_x_includes=NO ac_x_libraries=NO
1118rm -fr conftestdir
1119if mkdir conftestdir; then
1120 cd conftestdir
1121 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1122 cat > Imakefile <<'EOF'
1123acfindx:
1124 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1125EOF
1126 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1127 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1128 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1129 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1130 for ac_extension in a so sl; do
1131 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1132 test -f $ac_im_libdir/libX11.$ac_extension; then
1133 ac_im_usrlibdir=$ac_im_libdir; break
1134 fi
1135 done
1136 # Screen out bogus values from the imake configuration. They are
1137 # bogus both because they are the default anyway, and because
1138 # using them would break gcc on systems where it needs fixed includes.
1139 case "$ac_im_incroot" in
1140 /usr/include) ;;
1141 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1142 esac
1143 case "$ac_im_usrlibdir" in
1144 /usr/lib | /lib) ;;
1145 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1146 esac
1147 fi
1148 cd ..
1149 rm -fr conftestdir
1150fi
1151
1152if test "$ac_x_includes" = NO; then
1153 # Guess where to find include files, by looking for this one X11 .h file.
1154 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1155
1156 # First, try using that file with no special directory specified.
1157cat > conftest.$ac_ext <<EOF
1158#line 1159 "configure"
1159#include "confdefs.h"
1160#include <$x_direct_test_include>
1161EOF
1162ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1163{ (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1164ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1165if test -z "$ac_err"; then
1166 rm -rf conftest*
1167 # We can compile using X headers with no special include directory.
1168ac_x_includes=
1169else
1170 echo "$ac_err" >&5
1171 echo "configure: failed program was:" >&5
1172 cat conftest.$ac_ext >&5
1173 rm -rf conftest*
1174 # Look for the header file in a standard set of common directories.
1175# Check X11 before X11Rn because it is often a symlink to the current release.
1176 for ac_dir in \
1177 /usr/X11/include \
1178 /usr/X11R6/include \
1179 /usr/X11R5/include \
1180 /usr/X11R4/include \
1181 \
1182 /usr/include/X11 \
1183 /usr/include/X11R6 \
1184 /usr/include/X11R5 \
1185 /usr/include/X11R4 \
1186 \
1187 /usr/local/X11/include \
1188 /usr/local/X11R6/include \
1189 /usr/local/X11R5/include \
1190 /usr/local/X11R4/include \
1191 \
1192 /usr/local/include/X11 \
1193 /usr/local/include/X11R6 \
1194 /usr/local/include/X11R5 \
1195 /usr/local/include/X11R4 \
1196 \
1197 /usr/X386/include \
1198 /usr/x386/include \
1199 /usr/XFree86/include/X11 \
1200 \
1201 /usr/include \
1202 /usr/local/include \
1203 /usr/unsupported/include \
1204 /usr/athena/include \
1205 /usr/local/x11r5/include \
1206 /usr/lpp/Xamples/include \
1207 \
1208 /usr/openwin/include \
1209 /usr/openwin/share/include \
1210 ; \
1211 do
1212 if test -r "$ac_dir/$x_direct_test_include"; then
1213 ac_x_includes=$ac_dir
1214 break
1215 fi
1216 done
1217fi
1218rm -f conftest*
1219fi # $ac_x_includes = NO
1220
1221if test "$ac_x_libraries" = NO; then
1222 # Check for the libraries.
1223
1224 test -z "$x_direct_test_library" && x_direct_test_library=Xt
1225 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1226
1227 # See if we find them without any special options.
1228 # Don't add to $LIBS permanently.
1229 ac_save_LIBS="$LIBS"
1230 LIBS="-l$x_direct_test_library $LIBS"
1231cat > conftest.$ac_ext <<EOF
1232#line 1233 "configure"
1233#include "confdefs.h"
1234
1235int main() {
1236${x_direct_test_function}()
1237; return 0; }
1238EOF
1239if { (eval echo configure:1240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1240 rm -rf conftest*
1241 LIBS="$ac_save_LIBS"
1242# We can link X programs with no special library path.
1243ac_x_libraries=
1244else
1245 echo "configure: failed program was:" >&5
1246 cat conftest.$ac_ext >&5
1247 rm -rf conftest*
1248 LIBS="$ac_save_LIBS"
1249# First see if replacing the include by lib works.
1250# Check X11 before X11Rn because it is often a symlink to the current release.
1251for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1252 /usr/X11/lib \
1253 /usr/X11R6/lib \
1254 /usr/X11R5/lib \
1255 /usr/X11R4/lib \
1256 \
1257 /usr/lib/X11 \
1258 /usr/lib/X11R6 \
1259 /usr/lib/X11R5 \
1260 /usr/lib/X11R4 \
1261 \
1262 /usr/local/X11/lib \
1263 /usr/local/X11R6/lib \
1264 /usr/local/X11R5/lib \
1265 /usr/local/X11R4/lib \
1266 \
1267 /usr/local/lib/X11 \
1268 /usr/local/lib/X11R6 \
1269 /usr/local/lib/X11R5 \
1270 /usr/local/lib/X11R4 \
1271 \
1272 /usr/X386/lib \
1273 /usr/x386/lib \
1274 /usr/XFree86/lib/X11 \
1275 \
1276 /usr/lib \
1277 /usr/local/lib \
1278 /usr/unsupported/lib \
1279 /usr/athena/lib \
1280 /usr/local/x11r5/lib \
1281 /usr/lpp/Xamples/lib \
1282 /lib/usr/lib/X11 \
1283 \
1284 /usr/openwin/lib \
1285 /usr/openwin/share/lib \
1286 ; \
1287do
1288 for ac_extension in a so sl; do
1289 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1290 ac_x_libraries=$ac_dir
1291 break 2
1292 fi
1293 done
1294done
1295fi
1296rm -f conftest*
1297fi # $ac_x_libraries = NO
1298
1299if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1300 # Didn't find X anywhere. Cache the known absence of X.
1301 ac_cv_have_x="have_x=no"
1302else
1303 # Record where we found X for the cache.
1304 ac_cv_have_x="have_x=yes \
1305 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1306fi
1307fi
1308 fi
1309 eval "$ac_cv_have_x"
1310fi # $with_x != no
1311
1312if test "$have_x" != yes; then
1313 echo "$ac_t""$have_x" 1>&6
1314 no_x=yes
1315else
1316 # If each of the values was on the command line, it overrides each guess.
1317 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1318 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1319 # Update the cache value to reflect the command line values.
1320 ac_cv_have_x="have_x=yes \
1321 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1322 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1323fi
1324
1325if test "$no_x" = yes; then
1326 # Not all programs may use this symbol, but it does not hurt to define it.
1327 cat >> confdefs.h <<\EOF
1328#define X_DISPLAY_MISSING 1
1329EOF
1330
1331 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
1332else
1333 if test -n "$x_includes"; then
1334 X_CFLAGS="$X_CFLAGS -I$x_includes"
1335 fi
1336
1337 # It would also be nice to do this for all -L options, not just this one.
1338 if test -n "$x_libraries"; then
1339 X_LIBS="$X_LIBS -L$x_libraries"
1340 # For Solaris; some versions of Sun CC require a space after -R and
1341 # others require no space. Words are not sufficient . . . .
1342 case "`(uname -sr) 2>/dev/null`" in
1343 "SunOS 5"*)
1344 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
1345echo "configure:1346: checking whether -R must be followed by a space" >&5
1346 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
1347 cat > conftest.$ac_ext <<EOF
1348#line 1349 "configure"
1349#include "confdefs.h"
1350
1351int main() {
1352
1353; return 0; }
1354EOF
1355if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1356 rm -rf conftest*
1357 ac_R_nospace=yes
1358else
1359 echo "configure: failed program was:" >&5
1360 cat conftest.$ac_ext >&5
1361 rm -rf conftest*
1362 ac_R_nospace=no
1363fi
1364rm -f conftest*
1365 if test $ac_R_nospace = yes; then
1366 echo "$ac_t""no" 1>&6
1367 X_LIBS="$X_LIBS -R$x_libraries"
1368 else
1369 LIBS="$ac_xsave_LIBS -R $x_libraries"
1370 cat > conftest.$ac_ext <<EOF
1371#line 1372 "configure"
1372#include "confdefs.h"
1373
1374int main() {
1375
1376; return 0; }
1377EOF
1378if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1379 rm -rf conftest*
1380 ac_R_space=yes
1381else
1382 echo "configure: failed program was:" >&5
1383 cat conftest.$ac_ext >&5
1384 rm -rf conftest*
1385 ac_R_space=no
1386fi
1387rm -f conftest*
1388 if test $ac_R_space = yes; then
1389 echo "$ac_t""yes" 1>&6
1390 X_LIBS="$X_LIBS -R $x_libraries"
1391 else
1392 echo "$ac_t""neither works" 1>&6
1393 fi
1394 fi
1395 LIBS="$ac_xsave_LIBS"
1396 esac
1397 fi
1398
1399 # Check for system-dependent libraries X programs must link with.
1400 # Do this before checking for the system-independent R6 libraries
1401 # (-lICE), since we may need -lsocket or whatever for X linking.
1402
1403 if test "$ISC" = yes; then
1404 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1405 else
1406 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1407 # libraries were built with DECnet support. And karl@cs.umb.edu says
1408 # the Alpha needs dnet_stub (dnet does not exist).
1409 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
1410echo "configure:1411: checking for dnet_ntoa in -ldnet" >&5
1411ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1412if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1413 echo $ac_n "(cached) $ac_c" 1>&6
1414else
1415 ac_save_LIBS="$LIBS"
1416LIBS="-ldnet $LIBS"
1417cat > conftest.$ac_ext <<EOF
1418#line 1419 "configure"
1419#include "confdefs.h"
1420/* Override any gcc2 internal prototype to avoid an error. */
1421#ifdef __cplusplus
1422extern "C"
1423#endif
1424/* We use char because int might match the return type of a gcc2
1425 builtin and then its argument prototype would still apply. */
1426char dnet_ntoa();
1427
1428int main() {
1429dnet_ntoa()
1430; return 0; }
1431EOF
1432if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1433 rm -rf conftest*
1434 eval "ac_cv_lib_$ac_lib_var=yes"
1435else
1436 echo "configure: failed program was:" >&5
1437 cat conftest.$ac_ext >&5
1438 rm -rf conftest*
1439 eval "ac_cv_lib_$ac_lib_var=no"
1440fi
1441rm -f conftest*
1442LIBS="$ac_save_LIBS"
1443
1444fi
1445if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1446 echo "$ac_t""yes" 1>&6
1447 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1448else
1449 echo "$ac_t""no" 1>&6
1450fi
1451
1452 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1453 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
1454echo "configure:1455: checking for dnet_ntoa in -ldnet_stub" >&5
1455ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1456if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1457 echo $ac_n "(cached) $ac_c" 1>&6
1458else
1459 ac_save_LIBS="$LIBS"
1460LIBS="-ldnet_stub $LIBS"
1461cat > conftest.$ac_ext <<EOF
1462#line 1463 "configure"
1463#include "confdefs.h"
1464/* Override any gcc2 internal prototype to avoid an error. */
1465#ifdef __cplusplus
1466extern "C"
1467#endif
1468/* We use char because int might match the return type of a gcc2
1469 builtin and then its argument prototype would still apply. */
1470char dnet_ntoa();
1471
1472int main() {
1473dnet_ntoa()
1474; return 0; }
1475EOF
1476if { (eval echo configure:1477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1477 rm -rf conftest*
1478 eval "ac_cv_lib_$ac_lib_var=yes"
1479else
1480 echo "configure: failed program was:" >&5
1481 cat conftest.$ac_ext >&5
1482 rm -rf conftest*
1483 eval "ac_cv_lib_$ac_lib_var=no"
1484fi
1485rm -f conftest*
1486LIBS="$ac_save_LIBS"
1487
1488fi
1489if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1490 echo "$ac_t""yes" 1>&6
1491 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1492else
1493 echo "$ac_t""no" 1>&6
1494fi
1495
1496 fi
1497
1498 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1499 # to get the SysV transport functions.
1500 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
1501 # needs -lnsl.
1502 # The nsl library prevents programs from opening the X display
1503 # on Irix 5.2, according to dickey@clark.net.
1504 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1505echo "configure:1506: checking for gethostbyname" >&5
1506if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1507 echo $ac_n "(cached) $ac_c" 1>&6
1508else
1509 cat > conftest.$ac_ext <<EOF
1510#line 1511 "configure"
1511#include "confdefs.h"
1512/* System header to define __stub macros and hopefully few prototypes,
1513 which can conflict with char gethostbyname(); below. */
1514#include <assert.h>
1515/* Override any gcc2 internal prototype to avoid an error. */
1516#ifdef __cplusplus
1517extern "C"
1518#endif
1519/* We use char because int might match the return type of a gcc2
1520 builtin and then its argument prototype would still apply. */
1521char gethostbyname();
1522
1523int main() {
1524
1525/* The GNU C library defines this for functions which it implements
1526 to always fail with ENOSYS. Some functions are actually named
1527 something starting with __ and the normal name is an alias. */
1528#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1529choke me
1530#else
1531gethostbyname();
1532#endif
1533
1534; return 0; }
1535EOF
1536if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1537 rm -rf conftest*
1538 eval "ac_cv_func_gethostbyname=yes"
1539else
1540 echo "configure: failed program was:" >&5
1541 cat conftest.$ac_ext >&5
1542 rm -rf conftest*
1543 eval "ac_cv_func_gethostbyname=no"
1544fi
1545rm -f conftest*
1546fi
1547
1548if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1549 echo "$ac_t""yes" 1>&6
1550 :
1551else
1552 echo "$ac_t""no" 1>&6
1553fi
1554
1555 if test $ac_cv_func_gethostbyname = no; then
1556 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1557echo "configure:1558: checking for gethostbyname in -lnsl" >&5
1558ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1559if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1560 echo $ac_n "(cached) $ac_c" 1>&6
1561else
1562 ac_save_LIBS="$LIBS"
1563LIBS="-lnsl $LIBS"
1564cat > conftest.$ac_ext <<EOF
1565#line 1566 "configure"
1566#include "confdefs.h"
1567/* Override any gcc2 internal prototype to avoid an error. */
1568#ifdef __cplusplus
1569extern "C"
1570#endif
1571/* We use char because int might match the return type of a gcc2
1572 builtin and then its argument prototype would still apply. */
1573char gethostbyname();
1574
1575int main() {
1576gethostbyname()
1577; return 0; }
1578EOF
1579if { (eval echo configure:1580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1580 rm -rf conftest*
1581 eval "ac_cv_lib_$ac_lib_var=yes"
1582else
1583 echo "configure: failed program was:" >&5
1584 cat conftest.$ac_ext >&5
1585 rm -rf conftest*
1586 eval "ac_cv_lib_$ac_lib_var=no"
1587fi
1588rm -f conftest*
1589LIBS="$ac_save_LIBS"
1590
1591fi
1592if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1593 echo "$ac_t""yes" 1>&6
1594 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1595else
1596 echo "$ac_t""no" 1>&6
1597fi
1598
1599 fi
1600
1601 # lieder@skyler.mavd.honeywell.com says without -lsocket,
1602 # socket/setsockopt and other routines are undefined under SCO ODT
1603 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
1604 # on later versions), says simon@lia.di.epfl.ch: it contains
1605 # gethostby* variants that don't use the nameserver (or something).
1606 # -lsocket must be given before -lnsl if both are needed.
1607 # We assume that if connect needs -lnsl, so does gethostbyname.
1608 echo $ac_n "checking for connect""... $ac_c" 1>&6
1609echo "configure:1610: checking for connect" >&5
1610if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1611 echo $ac_n "(cached) $ac_c" 1>&6
1612else
1613 cat > conftest.$ac_ext <<EOF
1614#line 1615 "configure"
1615#include "confdefs.h"
1616/* System header to define __stub macros and hopefully few prototypes,
1617 which can conflict with char connect(); below. */
1618#include <assert.h>
1619/* Override any gcc2 internal prototype to avoid an error. */
1620#ifdef __cplusplus
1621extern "C"
1622#endif
1623/* We use char because int might match the return type of a gcc2
1624 builtin and then its argument prototype would still apply. */
1625char connect();
1626
1627int main() {
1628
1629/* The GNU C library defines this for functions which it implements
1630 to always fail with ENOSYS. Some functions are actually named
1631 something starting with __ and the normal name is an alias. */
1632#if defined (__stub_connect) || defined (__stub___connect)
1633choke me
1634#else
1635connect();
1636#endif
1637
1638; return 0; }
1639EOF
1640if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1641 rm -rf conftest*
1642 eval "ac_cv_func_connect=yes"
1643else
1644 echo "configure: failed program was:" >&5
1645 cat conftest.$ac_ext >&5
1646 rm -rf conftest*
1647 eval "ac_cv_func_connect=no"
1648fi
1649rm -f conftest*
1650fi
1651
1652if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1653 echo "$ac_t""yes" 1>&6
1654 :
1655else
1656 echo "$ac_t""no" 1>&6
1657fi
1658
1659 if test $ac_cv_func_connect = no; then
1660 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1661echo "configure:1662: checking for connect in -lsocket" >&5
1662ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
1663if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1664 echo $ac_n "(cached) $ac_c" 1>&6
1665else
1666 ac_save_LIBS="$LIBS"
1667LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
1668cat > conftest.$ac_ext <<EOF
1669#line 1670 "configure"
1670#include "confdefs.h"
1671/* Override any gcc2 internal prototype to avoid an error. */
1672#ifdef __cplusplus
1673extern "C"
1674#endif
1675/* We use char because int might match the return type of a gcc2
1676 builtin and then its argument prototype would still apply. */
1677char connect();
1678
1679int main() {
1680connect()
1681; return 0; }
1682EOF
1683if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1684 rm -rf conftest*
1685 eval "ac_cv_lib_$ac_lib_var=yes"
1686else
1687 echo "configure: failed program was:" >&5
1688 cat conftest.$ac_ext >&5
1689 rm -rf conftest*
1690 eval "ac_cv_lib_$ac_lib_var=no"
1691fi
1692rm -f conftest*
1693LIBS="$ac_save_LIBS"
1694
1695fi
1696if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1697 echo "$ac_t""yes" 1>&6
1698 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
1699else
1700 echo "$ac_t""no" 1>&6
1701fi
1702
1703 fi
1704
1705 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
1706 echo $ac_n "checking for remove""... $ac_c" 1>&6
1707echo "configure:1708: checking for remove" >&5
1708if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
1709 echo $ac_n "(cached) $ac_c" 1>&6
1710else
1711 cat > conftest.$ac_ext <<EOF
1712#line 1713 "configure"
1713#include "confdefs.h"
1714/* System header to define __stub macros and hopefully few prototypes,
1715 which can conflict with char remove(); below. */
1716#include <assert.h>
1717/* Override any gcc2 internal prototype to avoid an error. */
1718#ifdef __cplusplus
1719extern "C"
1720#endif
1721/* We use char because int might match the return type of a gcc2
1722 builtin and then its argument prototype would still apply. */
1723char remove();
1724
1725int main() {
1726
1727/* The GNU C library defines this for functions which it implements
1728 to always fail with ENOSYS. Some functions are actually named
1729 something starting with __ and the normal name is an alias. */
1730#if defined (__stub_remove) || defined (__stub___remove)
1731choke me
1732#else
1733remove();
1734#endif
1735
1736; return 0; }
1737EOF
1738if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1739 rm -rf conftest*
1740 eval "ac_cv_func_remove=yes"
1741else
1742 echo "configure: failed program was:" >&5
1743 cat conftest.$ac_ext >&5
1744 rm -rf conftest*
1745 eval "ac_cv_func_remove=no"
1746fi
1747rm -f conftest*
1748fi
1749
1750if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
1751 echo "$ac_t""yes" 1>&6
1752 :
1753else
1754 echo "$ac_t""no" 1>&6
1755fi
1756
1757 if test $ac_cv_func_remove = no; then
1758 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
1759echo "configure:1760: checking for remove in -lposix" >&5
1760ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
1761if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1762 echo $ac_n "(cached) $ac_c" 1>&6
1763else
1764 ac_save_LIBS="$LIBS"
1765LIBS="-lposix $LIBS"
1766cat > conftest.$ac_ext <<EOF
1767#line 1768 "configure"
1768#include "confdefs.h"
1769/* Override any gcc2 internal prototype to avoid an error. */
1770#ifdef __cplusplus
1771extern "C"
1772#endif
1773/* We use char because int might match the return type of a gcc2
1774 builtin and then its argument prototype would still apply. */
1775char remove();
1776
1777int main() {
1778remove()
1779; return 0; }
1780EOF
1781if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1782 rm -rf conftest*
1783 eval "ac_cv_lib_$ac_lib_var=yes"
1784else
1785 echo "configure: failed program was:" >&5
1786 cat conftest.$ac_ext >&5
1787 rm -rf conftest*
1788 eval "ac_cv_lib_$ac_lib_var=no"
1789fi
1790rm -f conftest*
1791LIBS="$ac_save_LIBS"
1792
1793fi
1794if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1795 echo "$ac_t""yes" 1>&6
1796 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
1797else
1798 echo "$ac_t""no" 1>&6
1799fi
1800
1801 fi
1802
1803 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
1804 echo $ac_n "checking for shmat""... $ac_c" 1>&6
1805echo "configure:1806: checking for shmat" >&5
1806if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
1807 echo $ac_n "(cached) $ac_c" 1>&6
1808else
1809 cat > conftest.$ac_ext <<EOF
1810#line 1811 "configure"
1811#include "confdefs.h"
1812/* System header to define __stub macros and hopefully few prototypes,
1813 which can conflict with char shmat(); below. */
1814#include <assert.h>
1815/* Override any gcc2 internal prototype to avoid an error. */
1816#ifdef __cplusplus
1817extern "C"
1818#endif
1819/* We use char because int might match the return type of a gcc2
1820 builtin and then its argument prototype would still apply. */
1821char shmat();
1822
1823int main() {
1824
1825/* The GNU C library defines this for functions which it implements
1826 to always fail with ENOSYS. Some functions are actually named
1827 something starting with __ and the normal name is an alias. */
1828#if defined (__stub_shmat) || defined (__stub___shmat)
1829choke me
1830#else
1831shmat();
1832#endif
1833
1834; return 0; }
1835EOF
1836if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1837 rm -rf conftest*
1838 eval "ac_cv_func_shmat=yes"
1839else
1840 echo "configure: failed program was:" >&5
1841 cat conftest.$ac_ext >&5
1842 rm -rf conftest*
1843 eval "ac_cv_func_shmat=no"
1844fi
1845rm -f conftest*
1846fi
1847
1848if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
1849 echo "$ac_t""yes" 1>&6
1850 :
1851else
1852 echo "$ac_t""no" 1>&6
1853fi
1854
1855 if test $ac_cv_func_shmat = no; then
1856 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
1857echo "configure:1858: checking for shmat in -lipc" >&5
1858ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
1859if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1860 echo $ac_n "(cached) $ac_c" 1>&6
1861else
1862 ac_save_LIBS="$LIBS"
1863LIBS="-lipc $LIBS"
1864cat > conftest.$ac_ext <<EOF
1865#line 1866 "configure"
1866#include "confdefs.h"
1867/* Override any gcc2 internal prototype to avoid an error. */
1868#ifdef __cplusplus
1869extern "C"
1870#endif
1871/* We use char because int might match the return type of a gcc2
1872 builtin and then its argument prototype would still apply. */
1873char shmat();
1874
1875int main() {
1876shmat()
1877; return 0; }
1878EOF
1879if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1880 rm -rf conftest*
1881 eval "ac_cv_lib_$ac_lib_var=yes"
1882else
1883 echo "configure: failed program was:" >&5
1884 cat conftest.$ac_ext >&5
1885 rm -rf conftest*
1886 eval "ac_cv_lib_$ac_lib_var=no"
1887fi
1888rm -f conftest*
1889LIBS="$ac_save_LIBS"
1890
1891fi
1892if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1893 echo "$ac_t""yes" 1>&6
1894 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
1895else
1896 echo "$ac_t""no" 1>&6
1897fi
1898
1899 fi
1900 fi
1901
1902 # Check for libraries that X11R6 Xt/Xaw programs need.
1903 ac_save_LDFLAGS="$LDFLAGS"
1904 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
1905 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1906 # check for ICE first), but we must link in the order -lSM -lICE or
1907 # we get undefined symbols. So assume we have SM if we have ICE.
1908 # These have to be linked with before -lX11, unlike the other
1909 # libraries we check for below, so use a different variable.
1910 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1911 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
1912echo "configure:1913: checking for IceConnectionNumber in -lICE" >&5
1913ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
1914if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1915 echo $ac_n "(cached) $ac_c" 1>&6
1916else
1917 ac_save_LIBS="$LIBS"
1918LIBS="-lICE $X_EXTRA_LIBS $LIBS"
1919cat > conftest.$ac_ext <<EOF
1920#line 1921 "configure"
1921#include "confdefs.h"
1922/* Override any gcc2 internal prototype to avoid an error. */
1923#ifdef __cplusplus
1924extern "C"
1925#endif
1926/* We use char because int might match the return type of a gcc2
1927 builtin and then its argument prototype would still apply. */
1928char IceConnectionNumber();
1929
1930int main() {
1931IceConnectionNumber()
1932; return 0; }
1933EOF
1934if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1935 rm -rf conftest*
1936 eval "ac_cv_lib_$ac_lib_var=yes"
1937else
1938 echo "configure: failed program was:" >&5
1939 cat conftest.$ac_ext >&5
1940 rm -rf conftest*
1941 eval "ac_cv_lib_$ac_lib_var=no"
1942fi
1943rm -f conftest*
1944LIBS="$ac_save_LIBS"
1945
1946fi
1947if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1948 echo "$ac_t""yes" 1>&6
1949 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1950else
1951 echo "$ac_t""no" 1>&6
1952fi
1953
1954 LDFLAGS="$ac_save_LDFLAGS"
1955
1956fi
1957
1958
1959# Check whether --with-installed-zlib or --without-installed-zlib was given.
1960if test "${with_installed_zlib+set}" = set; then
1961 withval="$with_installed_zlib"
1962 :
1963fi
1964
1965
1966if test "$with_installed_zlib" = yes; then
1967 echo "using installed zlib"
1968 ZLIB_LIB=-lz
1969else
1970 ZLIB_DIR=zlib
1971 ZLIB_INCLUDE='-I$(top_srcdir)/zlib'
1972 ZLIB_LIB='$(top_srcdir)/zlib/libz.a'
1973 echo "configuring zlib..."
1974 (cd zlib; ./configure)
1975 echo "...done configuring zlib"
1976fi
1977
1978
1979
1980
1981
1982# Check whether --with-installed-jpeg or --without-installed-jpeg was given.
1983if test "${with_installed_jpeg+set}" = set; then
1984 withval="$with_installed_jpeg"
1985 :
1986fi
1987
1988
1989if test "$with_installed_jpeg" = yes; then
1990 echo "using installed jpeg"
1991 JPEG_LIB=-ljpeg
1992else
1993 JPEG_DIR=jpeg/build
1994 JPEG_INCLUDE='-I$(top_srcdir)/jpeg'
1995 JPEG_LIB='$(top_srcdir)/jpeg/build/libjpeg.a'
1996 echo "configuring jpeg..."
1997 (mkdir jpeg/build; cd jpeg/build; ../configure)
1998 echo "...done configuring jpeg"
1999fi
2000
2001
2002
2003
2004
2005echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
2006echo "configure:2007: checking for vsnprintf" >&5
2007if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
2008 echo $ac_n "(cached) $ac_c" 1>&6
2009else
2010 cat > conftest.$ac_ext <<EOF
2011#line 2012 "configure"
2012#include "confdefs.h"
2013/* System header to define __stub macros and hopefully few prototypes,
2014 which can conflict with char vsnprintf(); below. */
2015#include <assert.h>
2016/* Override any gcc2 internal prototype to avoid an error. */
2017#ifdef __cplusplus
2018extern "C"
2019#endif
2020/* We use char because int might match the return type of a gcc2
2021 builtin and then its argument prototype would still apply. */
2022char vsnprintf();
2023
2024int main() {
2025
2026/* The GNU C library defines this for functions which it implements
2027 to always fail with ENOSYS. Some functions are actually named
2028 something starting with __ and the normal name is an alias. */
2029#if defined (__stub_vsnprintf) || defined (__stub___vsnprintf)
2030choke me
2031#else
2032vsnprintf();
2033#endif
2034
2035; return 0; }
2036EOF
2037if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2038 rm -rf conftest*
2039 eval "ac_cv_func_vsnprintf=yes"
2040else
2041 echo "configure: failed program was:" >&5
2042 cat conftest.$ac_ext >&5
2043 rm -rf conftest*
2044 eval "ac_cv_func_vsnprintf=no"
2045fi
2046rm -f conftest*
2047fi
2048
2049if eval "test \"`echo '$ac_cv_func_'vsnprintf`\" = yes"; then
2050 echo "$ac_t""yes" 1>&6
2051 VSNPRINTF_DEFINE='-DHAVE_VSNPRINTF'
2052else
2053 echo "$ac_t""no" 1>&6
2054VSNPRINTF_DEFINE=
2055fi
2056
2057
2058
2059echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
2060echo "configure:2061: checking for strcasecmp" >&5
2061if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
2062 echo $ac_n "(cached) $ac_c" 1>&6
2063else
2064 cat > conftest.$ac_ext <<EOF
2065#line 2066 "configure"
2066#include "confdefs.h"
2067/* System header to define __stub macros and hopefully few prototypes,
2068 which can conflict with char strcasecmp(); below. */
2069#include <assert.h>
2070/* Override any gcc2 internal prototype to avoid an error. */
2071#ifdef __cplusplus
2072extern "C"
2073#endif
2074/* We use char because int might match the return type of a gcc2
2075 builtin and then its argument prototype would still apply. */
2076char strcasecmp();
2077
2078int main() {
2079
2080/* The GNU C library defines this for functions which it implements
2081 to always fail with ENOSYS. Some functions are actually named
2082 something starting with __ and the normal name is an alias. */
2083#if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
2084choke me
2085#else
2086strcasecmp();
2087#endif
2088
2089; return 0; }
2090EOF
2091if { (eval echo configure:2092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2092 rm -rf conftest*
2093 eval "ac_cv_func_strcasecmp=yes"
2094else
2095 echo "configure: failed program was:" >&5
2096 cat conftest.$ac_ext >&5
2097 rm -rf conftest*
2098 eval "ac_cv_func_strcasecmp=no"
2099fi
2100rm -f conftest*
2101fi
2102
2103if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then
2104 echo "$ac_t""yes" 1>&6
2105 STRCASECMP_DEFINE='-DHAVE_STRCASECMP'
2106else
2107 echo "$ac_t""no" 1>&6
2108STRCASECMP_DEFINE=
2109fi
2110
2111
2112
2113echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
2114echo "configure:2115: checking for strncasecmp" >&5
2115if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
2116 echo $ac_n "(cached) $ac_c" 1>&6
2117else
2118 cat > conftest.$ac_ext <<EOF
2119#line 2120 "configure"
2120#include "confdefs.h"
2121/* System header to define __stub macros and hopefully few prototypes,
2122 which can conflict with char strncasecmp(); below. */
2123#include <assert.h>
2124/* Override any gcc2 internal prototype to avoid an error. */
2125#ifdef __cplusplus
2126extern "C"
2127#endif
2128/* We use char because int might match the return type of a gcc2
2129 builtin and then its argument prototype would still apply. */
2130char strncasecmp();
2131
2132int main() {
2133
2134/* The GNU C library defines this for functions which it implements
2135 to always fail with ENOSYS. Some functions are actually named
2136 something starting with __ and the normal name is an alias. */
2137#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
2138choke me
2139#else
2140strncasecmp();
2141#endif
2142
2143; return 0; }
2144EOF
2145if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2146 rm -rf conftest*
2147 eval "ac_cv_func_strncasecmp=yes"
2148else
2149 echo "configure: failed program was:" >&5
2150 cat conftest.$ac_ext >&5
2151 rm -rf conftest*
2152 eval "ac_cv_func_strncasecmp=no"
2153fi
2154rm -f conftest*
2155fi
2156
2157if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then
2158 echo "$ac_t""yes" 1>&6
2159 STRNCASECMP_DEFINE='-DHAVE_STRNCASECMP'
2160else
2161 echo "$ac_t""no" 1>&6
2162STRNCASECMP_DEFINE=
2163fi
2164
2165
2166
2167
2168ac_ext=c
2169# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2170ac_cpp='$CPP $CPPFLAGS'
2171ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2172ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2173cross_compiling=$ac_cv_prog_cc_cross
2174
2175echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2176echo "configure:2177: checking for gethostbyname" >&5
2177if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2178 echo $ac_n "(cached) $ac_c" 1>&6
2179else
2180 cat > conftest.$ac_ext <<EOF
2181#line 2182 "configure"
2182#include "confdefs.h"
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char gethostbyname(); below. */
2185#include <assert.h>
2186/* Override any gcc2 internal prototype to avoid an error. */
2187/* We use char because int might match the return type of a gcc2
2188 builtin and then its argument prototype would still apply. */
2189char gethostbyname();
2190
2191int main() {
2192
2193/* The GNU C library defines this for functions which it implements
2194 to always fail with ENOSYS. Some functions are actually named
2195 something starting with __ and the normal name is an alias. */
2196#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2197choke me
2198#else
2199gethostbyname();
2200#endif
2201
2202; return 0; }
2203EOF
2204if { (eval echo configure:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2205 rm -rf conftest*
2206 eval "ac_cv_func_gethostbyname=yes"
2207else
2208 echo "configure: failed program was:" >&5
2209 cat conftest.$ac_ext >&5
2210 rm -rf conftest*
2211 eval "ac_cv_func_gethostbyname=no"
2212fi
2213rm -f conftest*
2214fi
2215
2216if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2217 echo "$ac_t""yes" 1>&6
2218 INET_LIB_REQ=
2219else
2220 echo "$ac_t""no" 1>&6
2221INET_LIB_REQ=yes
2222fi
2223
2224if test "$INET_LIB_REQ" = yes; then
2225 echo $ac_n "checking for gethostbyname in -lbsd""... $ac_c" 1>&6
2226echo "configure:2227: checking for gethostbyname in -lbsd" >&5
2227ac_lib_var=`echo bsd'_'gethostbyname | sed 'y%./+-%__p_%'`
2228if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2229 echo $ac_n "(cached) $ac_c" 1>&6
2230else
2231 ac_save_LIBS="$LIBS"
2232LIBS="-lbsd $LIBS"
2233cat > conftest.$ac_ext <<EOF
2234#line 2235 "configure"
2235#include "confdefs.h"
2236/* Override any gcc2 internal prototype to avoid an error. */
2237/* We use char because int might match the return type of a gcc2
2238 builtin and then its argument prototype would still apply. */
2239char gethostbyname();
2240
2241int main() {
2242gethostbyname()
2243; return 0; }
2244EOF
2245if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2246 rm -rf conftest*
2247 eval "ac_cv_lib_$ac_lib_var=yes"
2248else
2249 echo "configure: failed program was:" >&5
2250 cat conftest.$ac_ext >&5
2251 rm -rf conftest*
2252 eval "ac_cv_lib_$ac_lib_var=no"
2253fi
2254rm -f conftest*
2255LIBS="$ac_save_LIBS"
2256
2257fi
2258if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2259 echo "$ac_t""yes" 1>&6
2260 INET_LIB=-lbsd
2261else
2262 echo "$ac_t""no" 1>&6
2263INET_LIB=
2264fi
2265
2266fi
2267ac_ext=C
2268# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2269ac_cpp='$CXXCPP $CPPFLAGS'
2270ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2271ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2272cross_compiling=$ac_cv_prog_cxx_cross
2273
2274
2275
2276echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
2277echo "configure:2278: checking for socklen_t" >&5
2278cat > conftest.$ac_ext <<EOF
2279#line 2280 "configure"
2280#include "confdefs.h"
2281#include <sys/types.h>
2282 #include <sys/socket.h>
2283int main() {
2284socklen_t x;
2285accept(0, 0, &x);
2286; return 0; }
2287EOF
2288if { (eval echo configure:2289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2289 rm -rf conftest*
2290 echo "$ac_t""yes" 1>&6
2291SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=socklen_t'
2292else
2293 echo "configure: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 rm -rf conftest*
2296 echo "$ac_t""using int" 1>&6
2297SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=int'
2298fi
2299rm -f conftest*
2300
2301
2302BOILERPLATE=boilerplate.mk
2303
2304if (sh -c "make --version" 2>/dev/null | grep GNU 2>&1 >/dev/null); then
2305 if sh -c "vncmkdepend" >/dev/null 2>&1; then
2306 BOILERPLATE="$BOILERPLATE:depend.mk"
2307 fi
2308fi
2309
2310trap '' 1 2 15
2311cat > confcache <<\EOF
2312# This file is a shell script that caches the results of configure
2313# tests run on this system so they can be shared between configure
2314# scripts and configure runs. It is not useful on other systems.
2315# If it contains results you don't want to keep, you may remove or edit it.
2316#
2317# By default, configure uses ./config.cache as the cache file,
2318# creating it if it does not exist already. You can give configure
2319# the --cache-file=FILE option to use a different cache file; that is
2320# what configure does when it calls configure scripts in
2321# subdirectories, so they share the cache.
2322# Giving --cache-file=/dev/null disables caching, for debugging configure.
2323# config.status only pays attention to the cache file if you give it the
2324# --recheck option to rerun configure.
2325#
2326EOF
2327# The following way of writing the cache mishandles newlines in values,
2328# but we know of no workaround that is simple, portable, and efficient.
2329# So, don't put newlines in cache variables' values.
2330# Ultrix sh set writes to stderr and can't be redirected directly,
2331# and sets the high bit in the cache file unless we assign to the vars.
2332(set) 2>&1 |
2333 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2334 *ac_space=\ *)
2335 # `set' does not quote correctly, so add quotes (double-quote substitution
2336 # turns \\\\ into \\, and sed turns \\ into \).
2337 sed -n \
2338 -e "s/'/'\\\\''/g" \
2339 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2340 ;;
2341 *)
2342 # `set' quotes correctly as required by POSIX, so do not add quotes.
2343 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2344 ;;
2345 esac >> confcache
2346if cmp -s $cache_file confcache; then
2347 :
2348else
2349 if test -w $cache_file; then
2350 echo "updating cache $cache_file"
2351 cat confcache > $cache_file
2352 else
2353 echo "not updating unwritable cache $cache_file"
2354 fi
2355fi
2356rm -f confcache
2357
2358trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2359
2360test "x$prefix" = xNONE && prefix=$ac_default_prefix
2361# Let make expand exec_prefix.
2362test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2363
2364# Any assignment to VPATH causes Sun make to only execute
2365# the first set of double-colon rules, so remove it if not needed.
2366# If there is a colon in the path, we need to keep it.
2367if test "x$srcdir" = x.; then
2368 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2369fi
2370
2371trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2372
2373# Transform confdefs.h into DEFS.
2374# Protect against shell expansion while executing Makefile rules.
2375# Protect against Makefile macro expansion.
2376cat > conftest.defs <<\EOF
2377s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2378s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
2379s%\[%\\&%g
2380s%\]%\\&%g
2381s%\$%$$%g
2382EOF
2383DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2384rm -f conftest.defs
2385
2386
2387# Without the "./", some shells look in PATH for config.status.
2388: ${CONFIG_STATUS=./config.status}
2389
2390echo creating $CONFIG_STATUS
2391rm -f $CONFIG_STATUS
2392cat > $CONFIG_STATUS <<EOF
2393#! /bin/sh
2394# Generated automatically by configure.
2395# Run this file to recreate the current configuration.
2396# This directory was configured as follows,
2397# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2398#
2399# $0 $ac_configure_args
2400#
2401# Compiler output produced by configure, useful for debugging
2402# configure, is in ./config.log if it exists.
2403
2404ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2405for ac_option
2406do
2407 case "\$ac_option" in
2408 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2409 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2410 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2411 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2412 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2413 exit 0 ;;
2414 -help | --help | --hel | --he | --h)
2415 echo "\$ac_cs_usage"; exit 0 ;;
2416 *) echo "\$ac_cs_usage"; exit 1 ;;
2417 esac
2418done
2419
2420ac_given_srcdir=$srcdir
2421
2422trap 'rm -fr `echo "Makefile:Makefile.in:$BOILERPLATE \
2423 rdr/Makefile:rdr/Makefile.in:$BOILERPLATE \
2424 network/Makefile:network/Makefile.in:$BOILERPLATE \
2425 Xregion/Makefile:Xregion/Makefile.in:$BOILERPLATE \
2426 rfb/Makefile:rfb/Makefile.in:$BOILERPLATE \
2427" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2428EOF
2429cat >> $CONFIG_STATUS <<EOF
2430
2431# Protect against being on the right side of a sed subst in config.status.
2432sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2433 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2434$ac_vpsub
2435$extrasub
2436s%@SHELL@%$SHELL%g
2437s%@CFLAGS@%$CFLAGS%g
2438s%@CPPFLAGS@%$CPPFLAGS%g
2439s%@CXXFLAGS@%$CXXFLAGS%g
2440s%@FFLAGS@%$FFLAGS%g
2441s%@DEFS@%$DEFS%g
2442s%@LDFLAGS@%$LDFLAGS%g
2443s%@LIBS@%$LIBS%g
2444s%@exec_prefix@%$exec_prefix%g
2445s%@prefix@%$prefix%g
2446s%@program_transform_name@%$program_transform_name%g
2447s%@bindir@%$bindir%g
2448s%@sbindir@%$sbindir%g
2449s%@libexecdir@%$libexecdir%g
2450s%@datadir@%$datadir%g
2451s%@sysconfdir@%$sysconfdir%g
2452s%@sharedstatedir@%$sharedstatedir%g
2453s%@localstatedir@%$localstatedir%g
2454s%@libdir@%$libdir%g
2455s%@includedir@%$includedir%g
2456s%@oldincludedir@%$oldincludedir%g
2457s%@infodir@%$infodir%g
2458s%@mandir@%$mandir%g
2459s%@CC@%$CC%g
2460s%@CXX@%$CXX%g
2461s%@RANLIB@%$RANLIB%g
2462s%@SET_MAKE@%$SET_MAKE%g
2463s%@CXXCPP@%$CXXCPP%g
2464s%@X_CFLAGS@%$X_CFLAGS%g
2465s%@X_PRE_LIBS@%$X_PRE_LIBS%g
2466s%@X_LIBS@%$X_LIBS%g
2467s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
2468s%@ZLIB_DIR@%$ZLIB_DIR%g
2469s%@ZLIB_INCLUDE@%$ZLIB_INCLUDE%g
2470s%@ZLIB_LIB@%$ZLIB_LIB%g
2471s%@JPEG_DIR@%$JPEG_DIR%g
2472s%@JPEG_INCLUDE@%$JPEG_INCLUDE%g
2473s%@JPEG_LIB@%$JPEG_LIB%g
2474s%@VSNPRINTF_DEFINE@%$VSNPRINTF_DEFINE%g
2475s%@STRCASECMP_DEFINE@%$STRCASECMP_DEFINE%g
2476s%@STRNCASECMP_DEFINE@%$STRNCASECMP_DEFINE%g
2477s%@INET_LIB@%$INET_LIB%g
2478s%@SOCKLEN_T_DEFINE@%$SOCKLEN_T_DEFINE%g
2479
2480CEOF
2481EOF
2482
2483cat >> $CONFIG_STATUS <<\EOF
2484
2485# Split the substitutions into bite-sized pieces for seds with
2486# small command number limits, like on Digital OSF/1 and HP-UX.
2487ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2488ac_file=1 # Number of current file.
2489ac_beg=1 # First line for current file.
2490ac_end=$ac_max_sed_cmds # Line after last line for current file.
2491ac_more_lines=:
2492ac_sed_cmds=""
2493while $ac_more_lines; do
2494 if test $ac_beg -gt 1; then
2495 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2496 else
2497 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2498 fi
2499 if test ! -s conftest.s$ac_file; then
2500 ac_more_lines=false
2501 rm -f conftest.s$ac_file
2502 else
2503 if test -z "$ac_sed_cmds"; then
2504 ac_sed_cmds="sed -f conftest.s$ac_file"
2505 else
2506 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2507 fi
2508 ac_file=`expr $ac_file + 1`
2509 ac_beg=$ac_end
2510 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2511 fi
2512done
2513if test -z "$ac_sed_cmds"; then
2514 ac_sed_cmds=cat
2515fi
2516EOF
2517
2518cat >> $CONFIG_STATUS <<EOF
2519
2520CONFIG_FILES=\${CONFIG_FILES-"Makefile:Makefile.in:$BOILERPLATE \
2521 rdr/Makefile:rdr/Makefile.in:$BOILERPLATE \
2522 network/Makefile:network/Makefile.in:$BOILERPLATE \
2523 Xregion/Makefile:Xregion/Makefile.in:$BOILERPLATE \
2524 rfb/Makefile:rfb/Makefile.in:$BOILERPLATE \
2525"}
2526EOF
2527cat >> $CONFIG_STATUS <<\EOF
2528for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2529 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2530 case "$ac_file" in
2531 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2532 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2533 *) ac_file_in="${ac_file}.in" ;;
2534 esac
2535
2536 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2537
2538 # Remove last slash and all that follows it. Not all systems have dirname.
2539 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2540 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2541 # The file is in a subdirectory.
2542 test ! -d "$ac_dir" && mkdir "$ac_dir"
2543 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2544 # A "../" for each directory in $ac_dir_suffix.
2545 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2546 else
2547 ac_dir_suffix= ac_dots=
2548 fi
2549
2550 case "$ac_given_srcdir" in
2551 .) srcdir=.
2552 if test -z "$ac_dots"; then top_srcdir=.
2553 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2554 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2555 *) # Relative path.
2556 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2557 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2558 esac
2559
2560
2561 echo creating "$ac_file"
2562 rm -f "$ac_file"
2563 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2564 case "$ac_file" in
2565 *Makefile*) ac_comsub="1i\\
2566# $configure_input" ;;
2567 *) ac_comsub= ;;
2568 esac
2569
2570 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2571 sed -e "$ac_comsub
2572s%@configure_input@%$configure_input%g
2573s%@srcdir@%$srcdir%g
2574s%@top_srcdir@%$top_srcdir%g
2575" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2576fi; done
2577rm -f conftest.s*
2578
2579EOF
2580cat >> $CONFIG_STATUS <<EOF
2581
2582EOF
2583cat >> $CONFIG_STATUS <<\EOF
2584
2585exit 0
2586EOF
2587chmod +x $CONFIG_STATUS
2588rm -fr confdefs* $ac_clean_files
2589test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2590