3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
18 --enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir',
19 instead of putting them in bindir itself. You can
20 specify the name of the subdirectory. For example,
21 --exec-prefix=/usr/local/bin --enable-subdir=demos
22 would put xscreensaver in /usr/local/bin/, and would
23 put the demos in /usr/local/bin/demos/. Note that if
24 you do this, you must make sure that the directory
25 is on your \$PATH before xscreensaver is started: the
26 directory name is not hardcoded into the program.
27 This merely sets the default installation location.
29 --disable-subdir Just put the demos in \`bindir' (this is the default.)
32 --with-x use the X Window System"
37 --with-sgi-ext Include support for the SGI SCREEN_SAVER
38 server extension, if possible (this is the default).
39 --without-sgi-ext Do not compile in support for this extension."
41 --with-mit-ext Include support for the MIT-SCREEN-SAVER
42 server extension, if possible (this is the default).
43 --without-mit-ext Do not compile in support for this extension."
45 --with-xidle-ext Include support for the XIDLE server extension,
46 if possible (this is the default).
47 --without-xidle-ext Do not compile in support for this extension."
49 --with-xshm-ext Include support for the XSHM (Shared Memory) server
50 extension, if possible (this is the default).
51 --without-xshm-ext Do not compile in support for this extension."
53 --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL server
54 extension, if possible (this is the default).
55 --without-sgivc-ext Do not compile in support for this extension."
60 --with-motif Use the Motif toolkit for the user interface,
61 if possible (this is the default).
62 --without-motif Do not use Motif."
64 --with-athena Use the Athena toolkit for the user interface, if
65 possible (this is the default if Motif isn't used.)
66 --without-athena Do not use Athena."
71 --with-xpm Include support for XPM files in some demos,
72 if possible (this is the default).
73 --without-xpm Do not compile in support for XPM files."
75 --with-gl Build those demos which depend on OpenGL,
76 if possible (this is the default).
77 --without-gl Do not build the OpenGL demos."
79 --with-readdisplay Include support for the XReadDisplay server
80 extension if possible (this is the default).
81 --without-readdisplay Do not compile in support for this extension."
83 --with-sgivideo Include support for SGI's Iris Video Library
84 if possible (this is the default).
85 --without-sgivideo Do not compile in support for this library."
87 --with-zippy=PROGRAM Some demos are able to run an external program and
88 display its text; this names the program to use by
89 default (though it can be overridden with X
90 resources.) If you don't specify this, the default
91 is to use \"yow\" from the Emacs distribution (if you
92 have it) or else to use \"fortune\"."
97 --enable-locking Compile in support for locking the display
98 (this is the default.)
99 --disable-locking Do not allow locking at all."
102 --with-kerberos Include support for Kerberos authentication,
103 if possible (this is the default.)
104 --without-kerberos Do not compile in support for Kerberos."
106 --with-shadow Include support for shadow password authentication,
107 if possible (this is the default, if no Kerberos.)
108 --without-shadow Do not compile in support for shadow passwords.
111 # Initialize some variables set by options.
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
115 cache_file=./config.cache
124 program_transform_name=s,x,x,
132 bindir='${exec_prefix}/bin'
133 sbindir='${exec_prefix}/sbin'
134 libexecdir='${exec_prefix}/libexec'
135 datadir='${prefix}/share'
136 sysconfdir='${prefix}/etc'
137 sharedstatedir='${prefix}/com'
138 localstatedir='${prefix}/var'
139 libdir='${exec_prefix}/lib'
140 includedir='${prefix}/include'
141 oldincludedir='/usr/include'
142 infodir='${prefix}/info'
143 mandir='${prefix}/man'
145 # Initialize some other variables.
148 # Maximum number of lines to put in a shell here document.
155 # If the previous option needs an argument, assign it.
156 if test -n "$ac_prev"; then
157 eval "$ac_prev=\$ac_option"
163 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
167 # Accept the important Cygnus configure options, so we can diagnose typos.
171 -bindir | --bindir | --bindi | --bind | --bin | --bi)
173 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174 bindir="$ac_optarg" ;;
176 -build | --build | --buil | --bui | --bu)
178 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179 build="$ac_optarg" ;;
181 -cache-file | --cache-file | --cache-fil | --cache-fi \
182 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183 ac_prev=cache_file ;;
184 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186 cache_file="$ac_optarg" ;;
188 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
190 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
192 datadir="$ac_optarg" ;;
194 -disable-* | --disable-*)
195 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
196 # Reject names that are not valid shell variable names.
197 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
198 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
200 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
201 eval "enable_${ac_feature}=no" ;;
203 -enable-* | --enable-*)
204 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
205 # Reject names that are not valid shell variable names.
206 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
207 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
209 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
214 eval "enable_${ac_feature}='$ac_optarg'" ;;
216 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
217 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
218 | --exec | --exe | --ex)
219 ac_prev=exec_prefix ;;
220 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
221 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
222 | --exec=* | --exe=* | --ex=*)
223 exec_prefix="$ac_optarg" ;;
225 -gas | --gas | --ga | --g)
226 # Obsolete; use --with-gas.
229 -help | --help | --hel | --he)
230 # Omit some internal or obsolete options to make the list less imposing.
231 # This message is too long to be a string in the A/UX 3.1 sh.
233 Usage: configure [options] [host]
234 Options: [defaults in brackets after descriptions]
236 --cache-file=FILE cache test results in FILE
237 --help print this message
238 --no-create do not create output files
239 --quiet, --silent do not print \`checking...' messages
240 --version print the version of autoconf that created configure
241 Directory and file names:
242 --prefix=PREFIX install architecture-independent files in PREFIX
244 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
246 --bindir=DIR user executables in DIR [EPREFIX/bin]
247 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
248 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
249 --datadir=DIR read-only architecture-independent data in DIR
251 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
252 --sharedstatedir=DIR modifiable architecture-independent data in DIR
254 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
255 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
256 --includedir=DIR C header files in DIR [PREFIX/include]
257 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
258 --infodir=DIR info documentation in DIR [PREFIX/info]
259 --mandir=DIR man documentation in DIR [PREFIX/man]
260 --srcdir=DIR find the sources in DIR [configure dir or ..]
261 --program-prefix=PREFIX prepend PREFIX to installed program names
262 --program-suffix=SUFFIX append SUFFIX to installed program names
263 --program-transform-name=PROGRAM
264 run sed PROGRAM on installed program names
268 --build=BUILD configure for building on BUILD [BUILD=HOST]
269 --host=HOST configure for HOST [guessed]
270 --target=TARGET configure for TARGET [TARGET=HOST]
271 Features and packages:
272 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
273 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
274 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
275 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
276 --x-includes=DIR X include files are in DIR
277 --x-libraries=DIR X library files are in DIR
279 if test -n "$ac_help"; then
280 echo "--enable and --with options recognized:$ac_help"
284 -host | --host | --hos | --ho)
286 -host=* | --host=* | --hos=* | --ho=*)
289 -includedir | --includedir | --includedi | --included | --include \
290 | --includ | --inclu | --incl | --inc)
291 ac_prev=includedir ;;
292 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293 | --includ=* | --inclu=* | --incl=* | --inc=*)
294 includedir="$ac_optarg" ;;
296 -infodir | --infodir | --infodi | --infod | --info | --inf)
298 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299 infodir="$ac_optarg" ;;
301 -libdir | --libdir | --libdi | --libd)
303 -libdir=* | --libdir=* | --libdi=* | --libd=*)
304 libdir="$ac_optarg" ;;
306 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307 | --libexe | --libex | --libe)
308 ac_prev=libexecdir ;;
309 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310 | --libexe=* | --libex=* | --libe=*)
311 libexecdir="$ac_optarg" ;;
313 -localstatedir | --localstatedir | --localstatedi | --localstated \
314 | --localstate | --localstat | --localsta | --localst \
315 | --locals | --local | --loca | --loc | --lo)
316 ac_prev=localstatedir ;;
317 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320 localstatedir="$ac_optarg" ;;
322 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
324 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
325 mandir="$ac_optarg" ;;
328 # Obsolete; use --without-fp.
331 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
335 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
336 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
339 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
340 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
341 | --oldin | --oldi | --old | --ol | --o)
342 ac_prev=oldincludedir ;;
343 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
344 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
345 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
346 oldincludedir="$ac_optarg" ;;
348 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
350 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
351 prefix="$ac_optarg" ;;
353 -program-prefix | --program-prefix | --program-prefi | --program-pref \
354 | --program-pre | --program-pr | --program-p)
355 ac_prev=program_prefix ;;
356 -program-prefix=* | --program-prefix=* | --program-prefi=* \
357 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
358 program_prefix="$ac_optarg" ;;
360 -program-suffix | --program-suffix | --program-suffi | --program-suff \
361 | --program-suf | --program-su | --program-s)
362 ac_prev=program_suffix ;;
363 -program-suffix=* | --program-suffix=* | --program-suffi=* \
364 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
365 program_suffix="$ac_optarg" ;;
367 -program-transform-name | --program-transform-name \
368 | --program-transform-nam | --program-transform-na \
369 | --program-transform-n | --program-transform- \
370 | --program-transform | --program-transfor \
371 | --program-transfo | --program-transf \
372 | --program-trans | --program-tran \
373 | --progr-tra | --program-tr | --program-t)
374 ac_prev=program_transform_name ;;
375 -program-transform-name=* | --program-transform-name=* \
376 | --program-transform-nam=* | --program-transform-na=* \
377 | --program-transform-n=* | --program-transform-=* \
378 | --program-transform=* | --program-transfor=* \
379 | --program-transfo=* | --program-transf=* \
380 | --program-trans=* | --program-tran=* \
381 | --progr-tra=* | --program-tr=* | --program-t=*)
382 program_transform_name="$ac_optarg" ;;
384 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
385 | -silent | --silent | --silen | --sile | --sil)
388 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
390 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
392 sbindir="$ac_optarg" ;;
394 -sharedstatedir | --sharedstatedir | --sharedstatedi \
395 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
396 | --sharedst | --shareds | --shared | --share | --shar \
398 ac_prev=sharedstatedir ;;
399 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
400 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
401 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
403 sharedstatedir="$ac_optarg" ;;
405 -site | --site | --sit)
407 -site=* | --site=* | --sit=*)
410 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
412 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
413 srcdir="$ac_optarg" ;;
415 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
416 | --syscon | --sysco | --sysc | --sys | --sy)
417 ac_prev=sysconfdir ;;
418 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
419 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
420 sysconfdir="$ac_optarg" ;;
422 -target | --target | --targe | --targ | --tar | --ta | --t)
424 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
425 target="$ac_optarg" ;;
427 -v | -verbose | --verbose | --verbos | --verbo | --verb)
430 -version | --version | --versio | --versi | --vers)
431 echo "configure generated by autoconf version 2.12"
435 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
436 # Reject names that are not valid shell variable names.
437 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
438 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
440 ac_package=`echo $ac_package| sed 's/-/_/g'`
445 eval "with_${ac_package}='$ac_optarg'" ;;
447 -without-* | --without-*)
448 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
449 # Reject names that are not valid shell variable names.
450 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
451 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
453 ac_package=`echo $ac_package| sed 's/-/_/g'`
454 eval "with_${ac_package}=no" ;;
457 # Obsolete; use --with-x.
460 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
461 | --x-incl | --x-inc | --x-in | --x-i)
462 ac_prev=x_includes ;;
463 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
464 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
465 x_includes="$ac_optarg" ;;
467 -x-libraries | --x-libraries | --x-librarie | --x-librari \
468 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
469 ac_prev=x_libraries ;;
470 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
471 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
472 x_libraries="$ac_optarg" ;;
474 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
478 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
479 echo "configure: warning: $ac_option: invalid host type" 1>&2
481 if test "x$nonopt" != xNONE; then
482 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
490 if test -n "$ac_prev"; then
491 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
494 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
496 # File descriptor usage:
499 # 2 errors and warnings
500 # 3 some systems may open it to /dev/tty
501 # 4 used on the Kubota Titan
502 # 6 checking for... messages and results
503 # 5 compiler messages saved in config.log
504 if test "$silent" = yes; then
512 This file contains any messages produced by compilers while
513 running configure, to aid debugging if configure makes a mistake.
516 # Strip out --no-create and --no-recursion so they do not pile up.
517 # Also quote any args containing shell metacharacters.
522 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
523 | --no-cr | --no-c) ;;
524 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
525 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
526 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
527 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
528 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
533 # Only set these to C if already set. These must not be set unconditionally
534 # because not all systems understand e.g. LANG=C (notably SCO).
535 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
536 # Non-C LC_CTYPE values break the ctype check.
537 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
538 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
539 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
540 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
542 # confdefs.h avoids OS command line length limits that DEFS can exceed.
543 rm -rf conftest* confdefs.h
544 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
547 # A filename unique to this package, relative to the directory that
548 # configure is in, which we can look for to find out if srcdir is correct.
549 ac_unique_file=driver/subprocs.c
551 # Find the source files, if location was not specified.
552 if test -z "$srcdir"; then
553 ac_srcdir_defaulted=yes
554 # Try the directory containing this script, then its parent.
556 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
557 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
559 if test ! -r $srcdir/$ac_unique_file; then
563 ac_srcdir_defaulted=no
565 if test ! -r $srcdir/$ac_unique_file; then
566 if test "$ac_srcdir_defaulted" = yes; then
567 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
569 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
572 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
574 # Prefer explicitly selected file to automatically selected ones.
575 if test -z "$CONFIG_SITE"; then
576 if test "x$prefix" != xNONE; then
577 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
579 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
582 for ac_site_file in $CONFIG_SITE; do
583 if test -r "$ac_site_file"; then
584 echo "loading site script $ac_site_file"
589 if test -r "$cache_file"; then
590 echo "loading cache $cache_file"
593 echo "creating cache $cache_file"
598 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
599 ac_cpp='$CPP $CPPFLAGS'
600 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
601 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
602 cross_compiling=$ac_cv_prog_cc_cross
604 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
605 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
606 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
613 ac_n= ac_c='\c' ac_t=
619 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
620 if test -f $ac_dir/install-sh; then
622 ac_install_sh="$ac_aux_dir/install-sh -c"
624 elif test -f $ac_dir/install.sh; then
626 ac_install_sh="$ac_aux_dir/install.sh -c"
630 if test -z "$ac_aux_dir"; then
631 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
633 ac_config_guess=$ac_aux_dir/config.guess
634 ac_config_sub=$ac_aux_dir/config.sub
635 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
638 # Make sure we can run config.sub.
639 if $ac_config_sub sun4 >/dev/null 2>&1; then :
640 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
643 echo $ac_n "checking host system type""... $ac_c" 1>&6
644 echo "configure:645: checking host system type" >&5
647 case "$host_alias" in
651 if host_alias=`$ac_config_guess`; then :
652 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
654 *) host_alias=$nonopt ;;
658 host=`$ac_config_sub $host_alias`
659 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
660 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
661 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
662 echo "$ac_t""$host" 1>&6
665 # Extract the first word of "gcc", so it can be a program name with args.
666 set dummy gcc; ac_word=$2
667 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
668 echo "configure:669: checking for $ac_word" >&5
669 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
670 echo $ac_n "(cached) $ac_c" 1>&6
672 if test -n "$CC"; then
673 ac_cv_prog_CC="$CC" # Let the user override the test.
675 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
676 for ac_dir in $PATH; do
677 test -z "$ac_dir" && ac_dir=.
678 if test -f $ac_dir/$ac_word; then
687 if test -n "$CC"; then
688 echo "$ac_t""$CC" 1>&6
690 echo "$ac_t""no" 1>&6
693 if test -z "$CC"; then
694 # Extract the first word of "cc", so it can be a program name with args.
695 set dummy cc; ac_word=$2
696 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
697 echo "configure:698: checking for $ac_word" >&5
698 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
699 echo $ac_n "(cached) $ac_c" 1>&6
701 if test -n "$CC"; then
702 ac_cv_prog_CC="$CC" # Let the user override the test.
704 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
706 for ac_dir in $PATH; do
707 test -z "$ac_dir" && ac_dir=.
708 if test -f $ac_dir/$ac_word; then
709 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
718 if test $ac_prog_rejected = yes; then
719 # We found a bogon in the path, so make sure we never use it.
720 set dummy $ac_cv_prog_CC
722 if test $# -gt 0; then
723 # We chose a different compiler from the bogus one.
724 # However, it has the same basename, so the bogon will be chosen
725 # first if we set CC to just the basename; use the full file name.
727 set dummy "$ac_dir/$ac_word" "$@"
735 if test -n "$CC"; then
736 echo "$ac_t""$CC" 1>&6
738 echo "$ac_t""no" 1>&6
741 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
744 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
745 echo "configure:746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
748 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
749 ac_cpp='$CPP $CPPFLAGS'
750 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
751 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
752 cross_compiling=$ac_cv_prog_cc_cross
754 cat > conftest.$ac_ext <<EOF
755 #line 756 "configure"
756 #include "confdefs.h"
759 if { (eval echo configure:760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
760 ac_cv_prog_cc_works=yes
761 # If we can't run a trivial program, we are probably using a cross compiler.
762 if (./conftest; exit) 2>/dev/null; then
763 ac_cv_prog_cc_cross=no
765 ac_cv_prog_cc_cross=yes
768 echo "configure: failed program was:" >&5
769 cat conftest.$ac_ext >&5
770 ac_cv_prog_cc_works=no
774 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
775 if test $ac_cv_prog_cc_works = no; then
776 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
778 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
779 echo "configure:780: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
780 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
781 cross_compiling=$ac_cv_prog_cc_cross
783 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
784 echo "configure:785: checking whether we are using GNU C" >&5
785 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
786 echo $ac_n "(cached) $ac_c" 1>&6
788 cat > conftest.c <<EOF
793 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
800 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
802 if test $ac_cv_prog_gcc = yes; then
804 ac_test_CFLAGS="${CFLAGS+set}"
805 ac_save_CFLAGS="$CFLAGS"
807 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
808 echo "configure:809: checking whether ${CC-cc} accepts -g" >&5
809 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
810 echo $ac_n "(cached) $ac_c" 1>&6
812 echo 'void f(){}' > conftest.c
813 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
822 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
823 if test "$ac_test_CFLAGS" = set; then
824 CFLAGS="$ac_save_CFLAGS"
825 elif test $ac_cv_prog_cc_g = yes; then
832 test "${CFLAGS+set}" = set || CFLAGS="-g"
836 if test -z "$GCC"; then
837 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
838 echo "configure:839: checking how to request ANSI compilation" >&5
841 echo "$ac_t""HPUX: adding -Ae" 1>&6
845 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
846 CC="$CC -qlanglvl=ansi -qhalt=e"
849 echo "$ac_t""no idea" 1>&6
855 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
856 echo "configure:857: checking whether the compiler works on ANSI C" >&5
857 if test "$cross_compiling" = yes; then
858 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
860 cat > conftest.$ac_ext <<EOF
861 #line 862 "configure"
862 #include "confdefs.h"
863 main(int ac, char **av) { return 0; }
865 if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
867 echo "$ac_t""yes" 1>&6
869 echo "configure: failed program was:" >&5
870 cat conftest.$ac_ext >&5
872 echo "$ac_t""no" 1>&6
873 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
881 if test -n "$GCC"; then
882 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
883 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
886 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
887 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
893 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
894 echo "configure:895: checking how to run the C preprocessor" >&5
895 # On Suns, sometimes $CPP names a directory.
896 if test -n "$CPP" && test -d "$CPP"; then
899 if test -z "$CPP"; then
900 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
901 echo $ac_n "(cached) $ac_c" 1>&6
903 # This must be in double quotes, not single quotes, because CPP may get
904 # substituted into the Makefile and "${CC-cc}" will confuse make.
906 # On the NeXT, cc -E runs the code through the compiler's parser,
907 # not just through cpp.
908 cat > conftest.$ac_ext <<EOF
909 #line 910 "configure"
910 #include "confdefs.h"
914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
915 { (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
916 ac_err=`grep -v '^ *+' conftest.out`
917 if test -z "$ac_err"; then
921 echo "configure: failed program was:" >&5
922 cat conftest.$ac_ext >&5
924 CPP="${CC-cc} -E -traditional-cpp"
925 cat > conftest.$ac_ext <<EOF
926 #line 927 "configure"
927 #include "confdefs.h"
931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
932 { (eval echo configure:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
933 ac_err=`grep -v '^ *+' conftest.out`
934 if test -z "$ac_err"; then
938 echo "configure: failed program was:" >&5
939 cat conftest.$ac_ext >&5
946 ac_cv_prog_CPP="$CPP"
948 CPP="$ac_cv_prog_CPP"
950 ac_cv_prog_CPP="$CPP"
952 echo "$ac_t""$CPP" 1>&6
954 # Find a good install program. We prefer a C program (faster),
955 # so one script is as good as another. But avoid the broken or
956 # incompatible versions:
957 # SysV /etc/install, /usr/sbin/install
958 # SunOS /usr/etc/install
961 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
962 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
963 # ./install, which can be erroneously created by make from ./install.sh.
964 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
965 echo "configure:966: checking for a BSD compatible install" >&5
966 if test -z "$INSTALL"; then
967 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
968 echo $ac_n "(cached) $ac_c" 1>&6
970 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
971 for ac_dir in $PATH; do
972 # Account for people who put trailing slashes in PATH elements.
974 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
976 # OSF1 and SCO ODT 3.0 have their own names for install.
977 for ac_prog in ginstall installbsd scoinst install; do
978 if test -f $ac_dir/$ac_prog; then
979 if test $ac_prog = install &&
980 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
981 # AIX install. It has an incompatible calling convention.
982 # OSF/1 installbsd also uses dspmsg, but is usable.
985 ac_cv_path_install="$ac_dir/$ac_prog -c"
996 if test "${ac_cv_path_install+set}" = set; then
997 INSTALL="$ac_cv_path_install"
999 # As a last resort, use the slow shell script. We don't cache a
1000 # path for INSTALL within a source directory, because that will
1001 # break other packages using the cache if that directory is
1002 # removed, or if the path is relative.
1003 INSTALL="$ac_install_sh"
1006 echo "$ac_t""$INSTALL" 1>&6
1008 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1009 # It thinks the first close brace ends the variable substitution.
1010 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1012 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1014 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1015 echo "configure:1016: checking whether ${MAKE-make} sets \${MAKE}" >&5
1016 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1017 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1018 echo $ac_n "(cached) $ac_c" 1>&6
1020 cat > conftestmake <<\EOF
1022 @echo 'ac_maketemp="${MAKE}"'
1024 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1025 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1026 if test -n "$ac_maketemp"; then
1027 eval ac_cv_prog_make_${ac_make}_set=yes
1029 eval ac_cv_prog_make_${ac_make}_set=no
1033 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1034 echo "$ac_t""yes" 1>&6
1037 echo "$ac_t""no" 1>&6
1038 SET_MAKE="MAKE=${MAKE-make}"
1042 echo $ac_n "checking for working const""... $ac_c" 1>&6
1043 echo "configure:1044: checking for working const" >&5
1044 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1045 echo $ac_n "(cached) $ac_c" 1>&6
1047 cat > conftest.$ac_ext <<EOF
1048 #line 1049 "configure"
1049 #include "confdefs.h"
1053 /* Ultrix mips cc rejects this. */
1054 typedef int charset[2]; const charset x;
1055 /* SunOS 4.1.1 cc rejects this. */
1056 char const *const *ccp;
1058 /* NEC SVR4.0.2 mips cc rejects this. */
1059 struct point {int x, y;};
1060 static struct point const zero = {0,0};
1061 /* AIX XL C 1.02.0.0 rejects this.
1062 It does not let you subtract one const X* pointer from another in an arm
1063 of an if-expression whose if-part is not a constant expression */
1064 const char *g = "string";
1065 ccp = &g + (g ? g-g : 0);
1066 /* HPUX 7.0 cc rejects these. */
1069 ccp = (char const *const *) p;
1070 { /* SCO 3.2v4 cc rejects this. */
1072 char const *s = 0 ? (char *) 0 : (char const *) 0;
1076 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1078 const int *foo = &x[0];
1081 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1082 typedef const int *iptr;
1086 { /* AIX XL C 1.02.0.0 rejects this saying
1087 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1088 struct s { int j; const int *ap[3]; };
1089 struct s *b; b->j = 5;
1091 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1097 if { (eval echo configure:1098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1101 echo "configure: failed program was:" >&5
1102 cat conftest.$ac_ext >&5
1109 echo "$ac_t""$ac_cv_c_const" 1>&6
1110 if test $ac_cv_c_const = no; then
1111 cat >> confdefs.h <<\EOF
1117 echo $ac_n "checking for inline""... $ac_c" 1>&6
1118 echo "configure:1119: checking for inline" >&5
1119 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1120 echo $ac_n "(cached) $ac_c" 1>&6
1123 for ac_kw in inline __inline__ __inline; do
1124 cat > conftest.$ac_ext <<EOF
1125 #line 1126 "configure"
1126 #include "confdefs.h"
1132 if { (eval echo configure:1133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1134 ac_cv_c_inline=$ac_kw; break
1136 echo "configure: failed program was:" >&5
1137 cat conftest.$ac_ext >&5
1144 echo "$ac_t""$ac_cv_c_inline" 1>&6
1145 case "$ac_cv_c_inline" in
1147 no) cat >> confdefs.h <<\EOF
1151 *) cat >> confdefs.h <<EOF
1152 #define inline $ac_cv_c_inline
1158 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1159 echo "configure:1160: checking for ANSI C header files" >&5
1160 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1161 echo $ac_n "(cached) $ac_c" 1>&6
1163 cat > conftest.$ac_ext <<EOF
1164 #line 1165 "configure"
1165 #include "confdefs.h"
1171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1172 { (eval echo configure:1173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1173 ac_err=`grep -v '^ *+' conftest.out`
1174 if test -z "$ac_err"; then
1176 ac_cv_header_stdc=yes
1179 echo "configure: failed program was:" >&5
1180 cat conftest.$ac_ext >&5
1182 ac_cv_header_stdc=no
1186 if test $ac_cv_header_stdc = yes; then
1187 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1188 cat > conftest.$ac_ext <<EOF
1189 #line 1190 "configure"
1190 #include "confdefs.h"
1193 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1194 egrep "memchr" >/dev/null 2>&1; then
1198 ac_cv_header_stdc=no
1204 if test $ac_cv_header_stdc = yes; then
1205 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1206 cat > conftest.$ac_ext <<EOF
1207 #line 1208 "configure"
1208 #include "confdefs.h"
1211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1212 egrep "free" >/dev/null 2>&1; then
1216 ac_cv_header_stdc=no
1222 if test $ac_cv_header_stdc = yes; then
1223 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1224 if test "$cross_compiling" = yes; then
1227 cat > conftest.$ac_ext <<EOF
1228 #line 1229 "configure"
1229 #include "confdefs.h"
1231 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1232 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1233 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1234 int main () { int i; for (i = 0; i < 256; i++)
1235 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1239 if { (eval echo configure:1240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1243 echo "configure: failed program was:" >&5
1244 cat conftest.$ac_ext >&5
1246 ac_cv_header_stdc=no
1254 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1255 if test $ac_cv_header_stdc = yes; then
1256 cat >> confdefs.h <<\EOF
1257 #define STDC_HEADERS 1
1262 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1263 echo "configure:1264: checking whether time.h and sys/time.h may both be included" >&5
1264 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1265 echo $ac_n "(cached) $ac_c" 1>&6
1267 cat > conftest.$ac_ext <<EOF
1268 #line 1269 "configure"
1269 #include "confdefs.h"
1270 #include <sys/types.h>
1271 #include <sys/time.h>
1277 if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1279 ac_cv_header_time=yes
1281 echo "configure: failed program was:" >&5
1282 cat conftest.$ac_ext >&5
1284 ac_cv_header_time=no
1289 echo "$ac_t""$ac_cv_header_time" 1>&6
1290 if test $ac_cv_header_time = yes; then
1291 cat >> confdefs.h <<\EOF
1292 #define TIME_WITH_SYS_TIME 1
1297 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1298 echo "configure:1299: checking for sys/wait.h that is POSIX.1 compatible" >&5
1299 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1300 echo $ac_n "(cached) $ac_c" 1>&6
1302 cat > conftest.$ac_ext <<EOF
1303 #line 1304 "configure"
1304 #include "confdefs.h"
1305 #include <sys/types.h>
1306 #include <sys/wait.h>
1308 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1311 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1316 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1319 if { (eval echo configure:1320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1321 ac_cv_header_sys_wait_h=yes
1323 echo "configure: failed program was:" >&5
1324 cat conftest.$ac_ext >&5
1326 ac_cv_header_sys_wait_h=no
1331 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1332 if test $ac_cv_header_sys_wait_h = yes; then
1333 cat >> confdefs.h <<\EOF
1334 #define HAVE_SYS_WAIT_H 1
1340 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1343 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1344 echo "configure:1345: checking for $ac_hdr that defines DIR" >&5
1345 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1346 echo $ac_n "(cached) $ac_c" 1>&6
1348 cat > conftest.$ac_ext <<EOF
1349 #line 1350 "configure"
1350 #include "confdefs.h"
1351 #include <sys/types.h>
1357 if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1359 eval "ac_cv_header_dirent_$ac_safe=yes"
1361 echo "configure: failed program was:" >&5
1362 cat conftest.$ac_ext >&5
1364 eval "ac_cv_header_dirent_$ac_safe=no"
1368 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1369 echo "$ac_t""yes" 1>&6
1370 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1371 cat >> confdefs.h <<EOF
1372 #define $ac_tr_hdr 1
1374 ac_header_dirent=$ac_hdr; break
1376 echo "$ac_t""no" 1>&6
1379 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1380 if test $ac_header_dirent = dirent.h; then
1381 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1382 echo "configure:1383: checking for opendir in -ldir" >&5
1383 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1384 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1385 echo $ac_n "(cached) $ac_c" 1>&6
1387 ac_save_LIBS="$LIBS"
1389 cat > conftest.$ac_ext <<EOF
1390 #line 1391 "configure"
1391 #include "confdefs.h"
1392 /* Override any gcc2 internal prototype to avoid an error. */
1393 /* We use char because int might match the return type of a gcc2
1394 builtin and then its argument prototype would still apply. */
1401 if { (eval echo configure:1402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1403 eval "ac_cv_lib_$ac_lib_var=yes"
1405 echo "configure: failed program was:" >&5
1406 cat conftest.$ac_ext >&5
1408 eval "ac_cv_lib_$ac_lib_var=no"
1411 LIBS="$ac_save_LIBS"
1414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1415 echo "$ac_t""yes" 1>&6
1418 echo "$ac_t""no" 1>&6
1422 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1423 echo "configure:1424: checking for opendir in -lx" >&5
1424 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1425 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1426 echo $ac_n "(cached) $ac_c" 1>&6
1428 ac_save_LIBS="$LIBS"
1430 cat > conftest.$ac_ext <<EOF
1431 #line 1432 "configure"
1432 #include "confdefs.h"
1433 /* Override any gcc2 internal prototype to avoid an error. */
1434 /* We use char because int might match the return type of a gcc2
1435 builtin and then its argument prototype would still apply. */
1442 if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1444 eval "ac_cv_lib_$ac_lib_var=yes"
1446 echo "configure: failed program was:" >&5
1447 cat conftest.$ac_ext >&5
1449 eval "ac_cv_lib_$ac_lib_var=no"
1452 LIBS="$ac_save_LIBS"
1455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1456 echo "$ac_t""yes" 1>&6
1459 echo "$ac_t""no" 1>&6
1465 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1466 echo "configure:1467: checking for mode_t" >&5
1467 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1468 echo $ac_n "(cached) $ac_c" 1>&6
1470 cat > conftest.$ac_ext <<EOF
1471 #line 1472 "configure"
1472 #include "confdefs.h"
1473 #include <sys/types.h>
1479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1480 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1482 ac_cv_type_mode_t=yes
1485 ac_cv_type_mode_t=no
1490 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1491 if test $ac_cv_type_mode_t = no; then
1492 cat >> confdefs.h <<\EOF
1498 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1499 echo "configure:1500: checking for pid_t" >&5
1500 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1501 echo $ac_n "(cached) $ac_c" 1>&6
1503 cat > conftest.$ac_ext <<EOF
1504 #line 1505 "configure"
1505 #include "confdefs.h"
1506 #include <sys/types.h>
1512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1513 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1515 ac_cv_type_pid_t=yes
1523 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1524 if test $ac_cv_type_pid_t = no; then
1525 cat >> confdefs.h <<\EOF
1531 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1532 echo "configure:1533: checking return type of signal handlers" >&5
1533 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1534 echo $ac_n "(cached) $ac_c" 1>&6
1536 cat > conftest.$ac_ext <<EOF
1537 #line 1538 "configure"
1538 #include "confdefs.h"
1539 #include <sys/types.h>
1545 extern "C" void (*signal (int, void (*)(int)))(int);
1547 void (*signal ()) ();
1554 if { (eval echo configure:1555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1556 ac_cv_type_signal=void
1558 echo "configure: failed program was:" >&5
1559 cat conftest.$ac_ext >&5
1561 ac_cv_type_signal=int
1566 echo "$ac_t""$ac_cv_type_signal" 1>&6
1567 cat >> confdefs.h <<EOF
1568 #define RETSIGTYPE $ac_cv_type_signal
1572 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1573 echo "configure:1574: checking for size_t" >&5
1574 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1575 echo $ac_n "(cached) $ac_c" 1>&6
1577 cat > conftest.$ac_ext <<EOF
1578 #line 1579 "configure"
1579 #include "confdefs.h"
1580 #include <sys/types.h>
1586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1587 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1589 ac_cv_type_size_t=yes
1592 ac_cv_type_size_t=no
1597 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1598 if test $ac_cv_type_size_t = no; then
1599 cat >> confdefs.h <<\EOF
1600 #define size_t unsigned
1607 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1608 echo "configure:1609: checking how to call gettimeofday" >&5
1609 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1610 echo $ac_n "(cached) $ac_c" 1>&6
1612 cat > conftest.$ac_ext <<EOF
1613 #line 1614 "configure"
1614 #include "confdefs.h"
1616 #include <sys/time.h>
1618 struct timeval tv; gettimeofday(&tv);
1621 if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1623 ac_gettimeofday_args=1
1625 echo "configure: failed program was:" >&5
1626 cat conftest.$ac_ext >&5
1628 cat > conftest.$ac_ext <<EOF
1629 #line 1630 "configure"
1630 #include "confdefs.h"
1632 #include <sys/time.h>
1634 struct timeval tv; struct timezone tzp;
1635 gettimeofday(&tv, &tzp);
1638 if { (eval echo configure:1639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1640 ac_gettimeofday_args=2
1642 echo "configure: failed program was:" >&5
1643 cat conftest.$ac_ext >&5
1645 ac_gettimeofday_args=0
1650 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1653 ac_gettimeofday_args=$ac_cv_gettimeofday_args
1654 if test $ac_gettimeofday_args = 1 ; then
1655 cat >> confdefs.h <<\EOF
1656 #define HAVE_GETTIMEOFDAY 1
1659 echo "$ac_t""one argument" 1>&6
1660 elif test $ac_gettimeofday_args = 2 ; then
1661 cat >> confdefs.h <<\EOF
1662 #define HAVE_GETTIMEOFDAY 1
1665 cat >> confdefs.h <<\EOF
1666 #define GETTIMEOFDAY_TWO_ARGS 1
1669 echo "$ac_t""two arguments" 1>&6
1671 echo "$ac_t""unknown" 1>&6
1675 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
1677 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1678 echo "configure:1679: checking for $ac_func" >&5
1679 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1682 cat > conftest.$ac_ext <<EOF
1683 #line 1684 "configure"
1684 #include "confdefs.h"
1685 /* System header to define __stub macros and hopefully few prototypes,
1686 which can conflict with char $ac_func(); below. */
1688 /* Override any gcc2 internal prototype to avoid an error. */
1689 /* We use char because int might match the return type of a gcc2
1690 builtin and then its argument prototype would still apply. */
1695 /* The GNU C library defines this for functions which it implements
1696 to always fail with ENOSYS. Some functions are actually named
1697 something starting with __ and the normal name is an alias. */
1698 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1706 if { (eval echo configure:1707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1708 eval "ac_cv_func_$ac_func=yes"
1710 echo "configure: failed program was:" >&5
1711 cat conftest.$ac_ext >&5
1713 eval "ac_cv_func_$ac_func=no"
1718 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1719 echo "$ac_t""yes" 1>&6
1720 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1721 cat >> confdefs.h <<EOF
1722 #define $ac_tr_func 1
1726 echo "$ac_t""no" 1>&6
1730 for ac_hdr in unistd.h
1732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1734 echo "configure:1735: checking for $ac_hdr" >&5
1735 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1736 echo $ac_n "(cached) $ac_c" 1>&6
1738 cat > conftest.$ac_ext <<EOF
1739 #line 1740 "configure"
1740 #include "confdefs.h"
1743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1744 { (eval echo configure:1745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1745 ac_err=`grep -v '^ *+' conftest.out`
1746 if test -z "$ac_err"; then
1748 eval "ac_cv_header_$ac_safe=yes"
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1754 eval "ac_cv_header_$ac_safe=no"
1758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1759 echo "$ac_t""yes" 1>&6
1760 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1761 cat >> confdefs.h <<EOF
1762 #define $ac_tr_hdr 1
1766 echo "$ac_t""no" 1>&6
1773 # Check whether --enable-subdir or --disable-subdir was given.
1774 if test "${enable_subdir+set}" = set; then
1775 enableval="$enable_subdir"
1776 enable_subdir="$enableval"
1781 if test x"$enable_subdir" = xno; then
1783 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
1784 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
1787 HACKDIR='$(bindir)/'$enable_subdir
1791 # If we find X, set shell vars x_includes and x_libraries to the
1792 # paths, otherwise set no_x=yes.
1793 # Uses ac_ vars as temps to allow command line to override cache and checks.
1794 # --without-x overrides everything else, but does not touch the cache.
1795 echo $ac_n "checking for X""... $ac_c" 1>&6
1796 echo "configure:1797: checking for X" >&5
1798 # Check whether --with-x or --without-x was given.
1799 if test "${with_x+set}" = set; then
1804 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1805 if test "x$with_x" = xno; then
1806 # The user explicitly disabled X.
1809 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1810 # Both variables are already set.
1813 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1814 echo $ac_n "(cached) $ac_c" 1>&6
1816 # One or both of the vars are not set, and there is no cached value.
1817 ac_x_includes=NO ac_x_libraries=NO
1819 if mkdir conftestdir; then
1821 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1822 cat > Imakefile <<'EOF'
1824 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1826 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1827 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1828 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1829 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1830 for ac_extension in a so sl; do
1831 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1832 test -f $ac_im_libdir/libX11.$ac_extension; then
1833 ac_im_usrlibdir=$ac_im_libdir; break
1836 # Screen out bogus values from the imake configuration. They are
1837 # bogus both because they are the default anyway, and because
1838 # using them would break gcc on systems where it needs fixed includes.
1839 case "$ac_im_incroot" in
1841 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1843 case "$ac_im_usrlibdir" in
1845 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1852 if test "$ac_x_includes" = NO; then
1853 # Guess where to find include files, by looking for this one X11 .h file.
1854 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1856 # First, try using that file with no special directory specified.
1857 cat > conftest.$ac_ext <<EOF
1858 #line 1859 "configure"
1859 #include "confdefs.h"
1860 #include <$x_direct_test_include>
1862 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1863 { (eval echo configure:1864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1864 ac_err=`grep -v '^ *+' conftest.out`
1865 if test -z "$ac_err"; then
1867 # We can compile using X headers with no special include directory.
1871 echo "configure: failed program was:" >&5
1872 cat conftest.$ac_ext >&5
1874 # Look for the header file in a standard set of common directories.
1875 # Check X11 before X11Rn because it is often a symlink to the current release.
1878 /usr/X11R6/include \
1879 /usr/X11R5/include \
1880 /usr/X11R4/include \
1883 /usr/include/X11R6 \
1884 /usr/include/X11R5 \
1885 /usr/include/X11R4 \
1887 /usr/local/X11/include \
1888 /usr/local/X11R6/include \
1889 /usr/local/X11R5/include \
1890 /usr/local/X11R4/include \
1892 /usr/local/include/X11 \
1893 /usr/local/include/X11R6 \
1894 /usr/local/include/X11R5 \
1895 /usr/local/include/X11R4 \
1899 /usr/XFree86/include/X11 \
1902 /usr/local/include \
1903 /usr/unsupported/include \
1904 /usr/athena/include \
1905 /usr/local/x11r5/include \
1906 /usr/lpp/Xamples/include \
1908 /usr/openwin/include \
1909 /usr/openwin/share/include \
1912 if test -r "$ac_dir/$x_direct_test_include"; then
1913 ac_x_includes=$ac_dir
1919 fi # $ac_x_includes = NO
1921 if test "$ac_x_libraries" = NO; then
1922 # Check for the libraries.
1924 test -z "$x_direct_test_library" && x_direct_test_library=Xt
1925 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1927 # See if we find them without any special options.
1928 # Don't add to $LIBS permanently.
1929 ac_save_LIBS="$LIBS"
1930 LIBS="-l$x_direct_test_library $LIBS"
1931 cat > conftest.$ac_ext <<EOF
1932 #line 1933 "configure"
1933 #include "confdefs.h"
1936 ${x_direct_test_function}()
1939 if { (eval echo configure:1940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1941 LIBS="$ac_save_LIBS"
1942 # We can link X programs with no special library path.
1945 echo "configure: failed program was:" >&5
1946 cat conftest.$ac_ext >&5
1948 LIBS="$ac_save_LIBS"
1949 # First see if replacing the include by lib works.
1950 # Check X11 before X11Rn because it is often a symlink to the current release.
1951 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1962 /usr/local/X11/lib \
1963 /usr/local/X11R6/lib \
1964 /usr/local/X11R5/lib \
1965 /usr/local/X11R4/lib \
1967 /usr/local/lib/X11 \
1968 /usr/local/lib/X11R6 \
1969 /usr/local/lib/X11R5 \
1970 /usr/local/lib/X11R4 \
1974 /usr/XFree86/lib/X11 \
1978 /usr/unsupported/lib \
1980 /usr/local/x11r5/lib \
1981 /usr/lpp/Xamples/lib \
1985 /usr/openwin/share/lib \
1988 for ac_extension in a so sl; do
1989 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1990 ac_x_libraries=$ac_dir
1997 fi # $ac_x_libraries = NO
1999 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2000 # Didn't find X anywhere. Cache the known absence of X.
2001 ac_cv_have_x="have_x=no"
2003 # Record where we found X for the cache.
2004 ac_cv_have_x="have_x=yes \
2005 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2009 eval "$ac_cv_have_x"
2012 if test "$have_x" != yes; then
2013 echo "$ac_t""$have_x" 1>&6
2016 # If each of the values was on the command line, it overrides each guess.
2017 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2018 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2019 # Update the cache value to reflect the command line values.
2020 ac_cv_have_x="have_x=yes \
2021 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2022 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2025 if test "$no_x" = yes; then
2026 # Not all programs may use this symbol, but it does not hurt to define it.
2027 cat >> confdefs.h <<\EOF
2028 #define X_DISPLAY_MISSING 1
2031 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2033 if test -n "$x_includes"; then
2034 X_CFLAGS="$X_CFLAGS -I$x_includes"
2037 # It would also be nice to do this for all -L options, not just this one.
2038 if test -n "$x_libraries"; then
2039 X_LIBS="$X_LIBS -L$x_libraries"
2040 # For Solaris; some versions of Sun CC require a space after -R and
2041 # others require no space. Words are not sufficient . . . .
2042 case "`(uname -sr) 2>/dev/null`" in
2044 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2045 echo "configure:2046: checking whether -R must be followed by a space" >&5
2046 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2047 cat > conftest.$ac_ext <<EOF
2048 #line 2049 "configure"
2049 #include "confdefs.h"
2055 if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2065 if test $ac_R_nospace = yes; then
2066 echo "$ac_t""no" 1>&6
2067 X_LIBS="$X_LIBS -R$x_libraries"
2069 LIBS="$ac_xsave_LIBS -R $x_libraries"
2070 cat > conftest.$ac_ext <<EOF
2071 #line 2072 "configure"
2072 #include "confdefs.h"
2078 if { (eval echo configure:2079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2082 echo "configure: failed program was:" >&5
2083 cat conftest.$ac_ext >&5
2088 if test $ac_R_space = yes; then
2089 echo "$ac_t""yes" 1>&6
2090 X_LIBS="$X_LIBS -R $x_libraries"
2092 echo "$ac_t""neither works" 1>&6
2095 LIBS="$ac_xsave_LIBS"
2099 # Check for system-dependent libraries X programs must link with.
2100 # Do this before checking for the system-independent R6 libraries
2101 # (-lICE), since we may need -lsocket or whatever for X linking.
2103 if test "$ISC" = yes; then
2104 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2106 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2107 # libraries were built with DECnet support. And karl@cs.umb.edu says
2108 # the Alpha needs dnet_stub (dnet does not exist).
2109 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2110 echo "configure:2111: checking for dnet_ntoa in -ldnet" >&5
2111 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2112 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2113 echo $ac_n "(cached) $ac_c" 1>&6
2115 ac_save_LIBS="$LIBS"
2117 cat > conftest.$ac_ext <<EOF
2118 #line 2119 "configure"
2119 #include "confdefs.h"
2120 /* Override any gcc2 internal prototype to avoid an error. */
2121 /* We use char because int might match the return type of a gcc2
2122 builtin and then its argument prototype would still apply. */
2129 if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2131 eval "ac_cv_lib_$ac_lib_var=yes"
2133 echo "configure: failed program was:" >&5
2134 cat conftest.$ac_ext >&5
2136 eval "ac_cv_lib_$ac_lib_var=no"
2139 LIBS="$ac_save_LIBS"
2142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2143 echo "$ac_t""yes" 1>&6
2144 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2146 echo "$ac_t""no" 1>&6
2149 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2150 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2151 echo "configure:2152: checking for dnet_ntoa in -ldnet_stub" >&5
2152 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2153 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2154 echo $ac_n "(cached) $ac_c" 1>&6
2156 ac_save_LIBS="$LIBS"
2157 LIBS="-ldnet_stub $LIBS"
2158 cat > conftest.$ac_ext <<EOF
2159 #line 2160 "configure"
2160 #include "confdefs.h"
2161 /* Override any gcc2 internal prototype to avoid an error. */
2162 /* We use char because int might match the return type of a gcc2
2163 builtin and then its argument prototype would still apply. */
2170 if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2172 eval "ac_cv_lib_$ac_lib_var=yes"
2174 echo "configure: failed program was:" >&5
2175 cat conftest.$ac_ext >&5
2177 eval "ac_cv_lib_$ac_lib_var=no"
2180 LIBS="$ac_save_LIBS"
2183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2184 echo "$ac_t""yes" 1>&6
2185 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2187 echo "$ac_t""no" 1>&6
2192 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2193 # to get the SysV transport functions.
2194 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2196 # The nsl library prevents programs from opening the X display
2197 # on Irix 5.2, according to dickey@clark.net.
2198 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2199 echo "configure:2200: checking for gethostbyname" >&5
2200 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2201 echo $ac_n "(cached) $ac_c" 1>&6
2203 cat > conftest.$ac_ext <<EOF
2204 #line 2205 "configure"
2205 #include "confdefs.h"
2206 /* System header to define __stub macros and hopefully few prototypes,
2207 which can conflict with char gethostbyname(); below. */
2209 /* Override any gcc2 internal prototype to avoid an error. */
2210 /* We use char because int might match the return type of a gcc2
2211 builtin and then its argument prototype would still apply. */
2212 char gethostbyname();
2216 /* The GNU C library defines this for functions which it implements
2217 to always fail with ENOSYS. Some functions are actually named
2218 something starting with __ and the normal name is an alias. */
2219 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2227 if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2229 eval "ac_cv_func_gethostbyname=yes"
2231 echo "configure: failed program was:" >&5
2232 cat conftest.$ac_ext >&5
2234 eval "ac_cv_func_gethostbyname=no"
2239 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2240 echo "$ac_t""yes" 1>&6
2243 echo "$ac_t""no" 1>&6
2246 if test $ac_cv_func_gethostbyname = no; then
2247 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2248 echo "configure:2249: checking for gethostbyname in -lnsl" >&5
2249 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2250 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2251 echo $ac_n "(cached) $ac_c" 1>&6
2253 ac_save_LIBS="$LIBS"
2255 cat > conftest.$ac_ext <<EOF
2256 #line 2257 "configure"
2257 #include "confdefs.h"
2258 /* Override any gcc2 internal prototype to avoid an error. */
2259 /* We use char because int might match the return type of a gcc2
2260 builtin and then its argument prototype would still apply. */
2261 char gethostbyname();
2267 if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2269 eval "ac_cv_lib_$ac_lib_var=yes"
2271 echo "configure: failed program was:" >&5
2272 cat conftest.$ac_ext >&5
2274 eval "ac_cv_lib_$ac_lib_var=no"
2277 LIBS="$ac_save_LIBS"
2280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2281 echo "$ac_t""yes" 1>&6
2282 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2284 echo "$ac_t""no" 1>&6
2289 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2290 # socket/setsockopt and other routines are undefined under SCO ODT
2291 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2292 # on later versions), says simon@lia.di.epfl.ch: it contains
2293 # gethostby* variants that don't use the nameserver (or something).
2294 # -lsocket must be given before -lnsl if both are needed.
2295 # We assume that if connect needs -lnsl, so does gethostbyname.
2296 echo $ac_n "checking for connect""... $ac_c" 1>&6
2297 echo "configure:2298: checking for connect" >&5
2298 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2299 echo $ac_n "(cached) $ac_c" 1>&6
2301 cat > conftest.$ac_ext <<EOF
2302 #line 2303 "configure"
2303 #include "confdefs.h"
2304 /* System header to define __stub macros and hopefully few prototypes,
2305 which can conflict with char connect(); below. */
2307 /* Override any gcc2 internal prototype to avoid an error. */
2308 /* We use char because int might match the return type of a gcc2
2309 builtin and then its argument prototype would still apply. */
2314 /* The GNU C library defines this for functions which it implements
2315 to always fail with ENOSYS. Some functions are actually named
2316 something starting with __ and the normal name is an alias. */
2317 #if defined (__stub_connect) || defined (__stub___connect)
2325 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2327 eval "ac_cv_func_connect=yes"
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2332 eval "ac_cv_func_connect=no"
2337 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2338 echo "$ac_t""yes" 1>&6
2341 echo "$ac_t""no" 1>&6
2344 if test $ac_cv_func_connect = no; then
2345 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2346 echo "configure:2347: checking for connect in -lsocket" >&5
2347 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2348 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2349 echo $ac_n "(cached) $ac_c" 1>&6
2351 ac_save_LIBS="$LIBS"
2352 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2353 cat > conftest.$ac_ext <<EOF
2354 #line 2355 "configure"
2355 #include "confdefs.h"
2356 /* Override any gcc2 internal prototype to avoid an error. */
2357 /* We use char because int might match the return type of a gcc2
2358 builtin and then its argument prototype would still apply. */
2365 if { (eval echo configure:2366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2367 eval "ac_cv_lib_$ac_lib_var=yes"
2369 echo "configure: failed program was:" >&5
2370 cat conftest.$ac_ext >&5
2372 eval "ac_cv_lib_$ac_lib_var=no"
2375 LIBS="$ac_save_LIBS"
2378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2379 echo "$ac_t""yes" 1>&6
2380 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2382 echo "$ac_t""no" 1>&6
2387 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2388 echo $ac_n "checking for remove""... $ac_c" 1>&6
2389 echo "configure:2390: checking for remove" >&5
2390 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2391 echo $ac_n "(cached) $ac_c" 1>&6
2393 cat > conftest.$ac_ext <<EOF
2394 #line 2395 "configure"
2395 #include "confdefs.h"
2396 /* System header to define __stub macros and hopefully few prototypes,
2397 which can conflict with char remove(); below. */
2399 /* Override any gcc2 internal prototype to avoid an error. */
2400 /* We use char because int might match the return type of a gcc2
2401 builtin and then its argument prototype would still apply. */
2406 /* The GNU C library defines this for functions which it implements
2407 to always fail with ENOSYS. Some functions are actually named
2408 something starting with __ and the normal name is an alias. */
2409 #if defined (__stub_remove) || defined (__stub___remove)
2417 if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2419 eval "ac_cv_func_remove=yes"
2421 echo "configure: failed program was:" >&5
2422 cat conftest.$ac_ext >&5
2424 eval "ac_cv_func_remove=no"
2429 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2430 echo "$ac_t""yes" 1>&6
2433 echo "$ac_t""no" 1>&6
2436 if test $ac_cv_func_remove = no; then
2437 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2438 echo "configure:2439: checking for remove in -lposix" >&5
2439 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2440 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2441 echo $ac_n "(cached) $ac_c" 1>&6
2443 ac_save_LIBS="$LIBS"
2444 LIBS="-lposix $LIBS"
2445 cat > conftest.$ac_ext <<EOF
2446 #line 2447 "configure"
2447 #include "confdefs.h"
2448 /* Override any gcc2 internal prototype to avoid an error. */
2449 /* We use char because int might match the return type of a gcc2
2450 builtin and then its argument prototype would still apply. */
2457 if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2459 eval "ac_cv_lib_$ac_lib_var=yes"
2461 echo "configure: failed program was:" >&5
2462 cat conftest.$ac_ext >&5
2464 eval "ac_cv_lib_$ac_lib_var=no"
2467 LIBS="$ac_save_LIBS"
2470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2471 echo "$ac_t""yes" 1>&6
2472 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2474 echo "$ac_t""no" 1>&6
2479 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2480 echo $ac_n "checking for shmat""... $ac_c" 1>&6
2481 echo "configure:2482: checking for shmat" >&5
2482 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2483 echo $ac_n "(cached) $ac_c" 1>&6
2485 cat > conftest.$ac_ext <<EOF
2486 #line 2487 "configure"
2487 #include "confdefs.h"
2488 /* System header to define __stub macros and hopefully few prototypes,
2489 which can conflict with char shmat(); below. */
2491 /* Override any gcc2 internal prototype to avoid an error. */
2492 /* We use char because int might match the return type of a gcc2
2493 builtin and then its argument prototype would still apply. */
2498 /* The GNU C library defines this for functions which it implements
2499 to always fail with ENOSYS. Some functions are actually named
2500 something starting with __ and the normal name is an alias. */
2501 #if defined (__stub_shmat) || defined (__stub___shmat)
2509 if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2511 eval "ac_cv_func_shmat=yes"
2513 echo "configure: failed program was:" >&5
2514 cat conftest.$ac_ext >&5
2516 eval "ac_cv_func_shmat=no"
2521 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2522 echo "$ac_t""yes" 1>&6
2525 echo "$ac_t""no" 1>&6
2528 if test $ac_cv_func_shmat = no; then
2529 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2530 echo "configure:2531: checking for shmat in -lipc" >&5
2531 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2532 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2533 echo $ac_n "(cached) $ac_c" 1>&6
2535 ac_save_LIBS="$LIBS"
2537 cat > conftest.$ac_ext <<EOF
2538 #line 2539 "configure"
2539 #include "confdefs.h"
2540 /* Override any gcc2 internal prototype to avoid an error. */
2541 /* We use char because int might match the return type of a gcc2
2542 builtin and then its argument prototype would still apply. */
2549 if { (eval echo configure:2550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2551 eval "ac_cv_lib_$ac_lib_var=yes"
2553 echo "configure: failed program was:" >&5
2554 cat conftest.$ac_ext >&5
2556 eval "ac_cv_lib_$ac_lib_var=no"
2559 LIBS="$ac_save_LIBS"
2562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2563 echo "$ac_t""yes" 1>&6
2564 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2566 echo "$ac_t""no" 1>&6
2572 # Check for libraries that X11R6 Xt/Xaw programs need.
2573 ac_save_LDFLAGS="$LDFLAGS"
2574 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2575 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2576 # check for ICE first), but we must link in the order -lSM -lICE or
2577 # we get undefined symbols. So assume we have SM if we have ICE.
2578 # These have to be linked with before -lX11, unlike the other
2579 # libraries we check for below, so use a different variable.
2580 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2581 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2582 echo "configure:2583: checking for IceConnectionNumber in -lICE" >&5
2583 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2584 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2585 echo $ac_n "(cached) $ac_c" 1>&6
2587 ac_save_LIBS="$LIBS"
2589 cat > conftest.$ac_ext <<EOF
2590 #line 2591 "configure"
2591 #include "confdefs.h"
2592 /* Override any gcc2 internal prototype to avoid an error. */
2593 /* We use char because int might match the return type of a gcc2
2594 builtin and then its argument prototype would still apply. */
2595 char IceConnectionNumber();
2598 IceConnectionNumber()
2601 if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2603 eval "ac_cv_lib_$ac_lib_var=yes"
2605 echo "configure: failed program was:" >&5
2606 cat conftest.$ac_ext >&5
2608 eval "ac_cv_lib_$ac_lib_var=no"
2611 LIBS="$ac_save_LIBS"
2614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2615 echo "$ac_t""yes" 1>&6
2616 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2618 echo "$ac_t""no" 1>&6
2621 LDFLAGS="$ac_save_LDFLAGS"
2626 # Try and find the app-defaults directory.
2627 # It sucks that autoconf doesn't do this already...
2637 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
2638 echo "configure:2639: checking for X app-defaults directory" >&5
2639 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
2640 echo $ac_n "(cached) $ac_c" 1>&6
2644 if mkdir conftestdir; then
2646 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2647 cat > Imakefile <<'EOF'
2649 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
2651 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2652 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
2653 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2658 # Look for the directory under a standard set of common directories.
2659 # Check X11 before X11Rn because it's often a symlink to the current release.
2661 /usr/X11/lib/app-defaults \
2662 /usr/X11R6/lib/app-defaults \
2663 /usr/X11R6/lib/X11/app-defaults \
2664 /usr/X11R5/lib/app-defaults \
2665 /usr/X11R5/lib/X11/app-defaults \
2666 /usr/X11R4/lib/app-defaults \
2667 /usr/X11R4/lib/X11/app-defaults \
2669 /usr/lib/X11/app-defaults \
2670 /usr/lib/X11R6/app-defaults \
2671 /usr/lib/X11R5/app-defaults \
2672 /usr/lib/X11R4/app-defaults \
2674 /usr/local/X11/lib/app-defaults \
2675 /usr/local/X11R6/lib/app-defaults \
2676 /usr/local/X11R5/lib/app-defaults \
2677 /usr/local/X11R4/lib/app-defaults \
2679 /usr/local/lib/X11/app-defaults \
2680 /usr/local/lib/X11R6/app-defaults \
2681 /usr/local/lib/X11R6/X11/app-defaults \
2682 /usr/local/lib/X11R5/app-defaults \
2683 /usr/local/lib/X11R5/X11/app-defaults \
2684 /usr/local/lib/X11R4/app-defaults \
2685 /usr/local/lib/X11R4/X11/app-defaults \
2687 /usr/X386/lib/X11/app-defaults \
2688 /usr/x386/lib/X11/app-defaults \
2689 /usr/XFree86/lib/X11/app-defaults \
2691 /usr/lib/X11/app-defaults \
2692 /usr/local/lib/X11/app-defaults \
2693 /usr/unsupported/lib/X11/app-defaults \
2694 /usr/athena/lib/X11/app-defaults \
2695 /usr/local/x11r5/lib/X11/app-defaults \
2696 /usr/lpp/Xamples/lib/X11/app-defaults \
2697 /lib/usr/lib/X11/app-defaults \
2699 /usr/openwin/lib/app-defaults \
2700 /usr/openwin/lib/X11/app-defaults \
2701 /usr/openwin/share/lib/app-defaults \
2702 /usr/openwin/share/lib/X11/app-defaults \
2704 /X11R6/lib/app-defaults \
2705 /X11R5/lib/app-defaults \
2706 /X11R4/lib/app-defaults \
2709 if test -d "$ac_dir"; then
2710 ac_x_app_defaults=$ac_dir
2715 if test x"$ac_x_app_defaults" = x; then
2716 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
2718 # Record where we found app-defaults for the cache.
2719 ac_cv_x_app_defaults="$ac_x_app_defaults"
2723 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
2724 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
2726 APPDEFAULTS=$ac_x_app_defaults
2729 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2733 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2737 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2742 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2743 # Use this sparingly; it probably doesn't work very well on X programs.
2747 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2748 # (But not the -L directories!)
2756 # check for the HP XHPDisableReset server extension headers.
2759 ac_save_CPPFLAGS="$CPPFLAGS"
2760 if test \! -z "$includedir" ; then
2761 CPPFLAGS="$CPPFLAGS -I$includedir"
2763 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2764 cat > conftest.$ac_ext <<EOF
2765 #line 2766 "configure"
2766 #include "confdefs.h"
2767 #include <X11/XHPlib.h>
2769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2770 egrep "XHPDisableReset" >/dev/null 2>&1; then
2772 cat >> confdefs.h <<\EOF
2773 #define HAVE_XHPDISABLERESET 1
2776 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
2780 CPPFLAGS="$ac_save_CPPFLAGS"
2783 # Check for the availability of the XPointer typedef, and define it otherwise.
2785 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
2786 echo "configure:2787: checking for XPointer" >&5
2787 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
2788 echo $ac_n "(cached) $ac_c" 1>&6
2791 ac_save_CPPFLAGS="$CPPFLAGS"
2792 if test \! -z "$includedir" ; then
2793 CPPFLAGS="$CPPFLAGS -I$includedir"
2795 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2796 cat > conftest.$ac_ext <<EOF
2797 #line 2798 "configure"
2798 #include "confdefs.h"
2799 #include <X11/Xlib.h>
2801 XPointer foo = (XPointer) 0;
2804 if { (eval echo configure:2805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2808 echo "configure: failed program was:" >&5
2809 cat conftest.$ac_ext >&5
2814 CPPFLAGS="$ac_save_CPPFLAGS"
2817 echo "$ac_t""$ac_cv_xpointer" 1>&6
2818 if test $ac_cv_xpointer != yes; then
2819 cat >> confdefs.h <<\EOF
2820 #define XPointer char*
2828 # Thanks for not making xmkmf find this by default, you losers.
2829 if test -d /usr/lib/Motif1.2 ; then
2830 X_CFLAGS="-I/usr/include/Motif1.2 $X_CFLAGS"
2831 X_LIBS="-L/usr/lib/Motif1.2 $X_LIBS"
2832 elif test -d /usr/lib/Motif1.1 ; then
2833 X_CFLAGS="-I/usr/include/Motif1.1 $X_CFLAGS"
2834 X_LIBS="-L/usr/lib/Motif1.1 $X_LIBS"
2837 # This too. You losers.
2838 if test -d /usr/contrib/X11R6/include ; then
2839 X_CFLAGS="-I/usr/contrib/X11R6/include $X_CFLAGS"
2840 X_LIBS="-L/usr/contrib/X11R6/lib $X_LIBS"
2841 elif test -d /usr/contrib/X11R5/include ; then
2842 X_CFLAGS="-I/usr/contrib/X11R5/include $X_CFLAGS"
2843 X_LIBS="-L/usr/contrib/X11R5/lib $X_LIBS"
2848 # Same to you, pinheads. (Is this really the standard location now?
2849 # What happened to the joke that this kind of thing went in /opt?)
2850 if test -f /usr/dt/include/Xm/Xm.h ; then
2851 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
2852 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
2854 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
2855 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
2856 echo "configure:2857: checking for regcmp in -lgen" >&5
2857 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
2858 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2859 echo $ac_n "(cached) $ac_c" 1>&6
2861 ac_save_LIBS="$LIBS"
2863 cat > conftest.$ac_ext <<EOF
2864 #line 2865 "configure"
2865 #include "confdefs.h"
2866 /* Override any gcc2 internal prototype to avoid an error. */
2867 /* We use char because int might match the return type of a gcc2
2868 builtin and then its argument prototype would still apply. */
2875 if { (eval echo configure:2876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2877 eval "ac_cv_lib_$ac_lib_var=yes"
2879 echo "configure: failed program was:" >&5
2880 cat conftest.$ac_ext >&5
2882 eval "ac_cv_lib_$ac_lib_var=no"
2885 LIBS="$ac_save_LIBS"
2888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2889 echo "$ac_t""yes" 1>&6
2890 X_LIBS="$X_LIBS -lgen"
2892 echo "$ac_t""no" 1>&6
2901 # Check for Xmu (some fucked up vendors don't ship it...)
2905 ac_save_CPPFLAGS="$CPPFLAGS"
2906 if test \! -z "$includedir" ; then
2907 CPPFLAGS="$CPPFLAGS -I$includedir"
2909 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2910 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
2911 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
2912 echo "configure:2913: checking for X11/Xmu/Error.h" >&5
2913 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2914 echo $ac_n "(cached) $ac_c" 1>&6
2916 cat > conftest.$ac_ext <<EOF
2917 #line 2918 "configure"
2918 #include "confdefs.h"
2919 #include <X11/Xmu/Error.h>
2921 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2922 { (eval echo configure:2923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2923 ac_err=`grep -v '^ *+' conftest.out`
2924 if test -z "$ac_err"; then
2926 eval "ac_cv_header_$ac_safe=yes"
2929 echo "configure: failed program was:" >&5
2930 cat conftest.$ac_ext >&5
2932 eval "ac_cv_header_$ac_safe=no"
2936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2937 echo "$ac_t""yes" 1>&6
2940 echo "$ac_t""no" 1>&6
2943 CPPFLAGS="$ac_save_CPPFLAGS"
2944 if test $have_xmu = no ; then
2945 XMU_SRCS='$(UTILS_SRC)/xmu.c'
2946 XMU_OBJS='$(UTILS_BIN)/xmu.o'
2950 SAVER_LIBS="-lXmu $SAVER_LIBS"
2951 HACK_LIBS="-lXmu $HACK_LIBS"
2952 cat >> confdefs.h <<\EOF
2959 # See comp.windows.x FAQ question 124 about _get_wmShellWidgetClass on 4.1.x.
2960 # The right fix is to get OpenWindows 3.0 patches 100512-02 and 100573-03.
2962 if test $have_xmu = yes ; then
2965 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
2966 echo "configure:2967: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
2967 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
2968 echo $ac_n "(cached) $ac_c" 1>&6
2970 ac_save_LDFLAGS="$LDFLAGS"
2971 if test \! -z "$x_libraries" ; then
2972 LDFLAGS="$LDFLAGS -L$x_libraries"
2974 # Note: this trick never works! (Generally.)
2975 # We're only getting away with using AC_TRY_LINK
2976 # with X libraries because we know it's SunOS.
2977 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
2978 cat > conftest.$ac_ext <<EOF
2979 #line 2980 "configure"
2980 #include "confdefs.h"
2986 if { (eval echo configure:2987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2988 ac_cv_sunos_xmu_bug=no
2990 echo "configure: failed program was:" >&5
2991 cat conftest.$ac_ext >&5
2993 ac_cv_sunos_xmu_bug=yes
2996 LDFLAGS="$ac_save_LDFLAGS"
2999 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3000 if test $ac_cv_sunos_xmu_bug = yes ; then
3001 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3002 echo "configure:3003: checking whether the compiler understands -static" >&5
3003 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3004 echo $ac_n "(cached) $ac_c" 1>&6
3006 ac_save_LDFLAGS="$LDFLAGS"
3007 LDFLAGS="$LDFLAGS -static"
3008 cat > conftest.$ac_ext <<EOF
3009 #line 3010 "configure"
3010 #include "confdefs.h"
3016 if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3020 echo "configure: failed program was:" >&5
3021 cat conftest.$ac_ext >&5
3026 LDFLAGS="$ac_save_LDFLAGS"
3029 echo "$ac_t""$ac_cv_ld_static" 1>&6
3030 if test $ac_cv_ld_static = yes ; then
3031 LDFLAGS="$LDFLAGS -static"
3033 LDFLAGS="$LDFLAGS -Bstatic"
3041 # Check for the SGI SCREEN_SAVER server extension header.
3044 with_sgi_req=unspecified
3045 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3046 if test "${with_sgi_ext+set}" = set; then
3047 withval="$with_sgi_ext"
3048 with_sgi="$withval"; with_sgi_req="$withval"
3053 if test $with_sgi = yes; then
3055 ac_save_CPPFLAGS="$CPPFLAGS"
3056 if test \! -z "$includedir" ; then
3057 CPPFLAGS="$CPPFLAGS -I$includedir"
3059 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3060 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3061 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3062 echo "configure:3063: checking for X11/extensions/XScreenSaver.h" >&5
3063 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3064 echo $ac_n "(cached) $ac_c" 1>&6
3066 cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3069 #include <X11/extensions/XScreenSaver.h>
3071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3072 { (eval echo configure:3073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3073 ac_err=`grep -v '^ *+' conftest.out`
3074 if test -z "$ac_err"; then
3076 eval "ac_cv_header_$ac_safe=yes"
3079 echo "configure: failed program was:" >&5
3080 cat conftest.$ac_ext >&5
3082 eval "ac_cv_header_$ac_safe=no"
3086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3087 echo "$ac_t""yes" 1>&6
3089 cat >> confdefs.h <<\EOF
3090 #define HAVE_SGI_SAVER_EXTENSION 1
3094 echo "$ac_t""no" 1>&6
3097 CPPFLAGS="$ac_save_CPPFLAGS"
3099 elif test $with_sgi != no; then
3100 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3104 # Check for the MIT-SCREEN-SAVER server extension header,
3105 # unless the SGI extension has already been found.
3108 with_mit_req=unspecified
3109 # Check whether --with-mit-ext or --without-mit-ext was given.
3110 if test "${with_mit_ext+set}" = set; then
3111 withval="$with_mit_ext"
3112 with_mit="$withval"; with_mit_req="$withval"
3117 if test $have_sgi != yes; then
3118 if test $with_mit = yes; then
3120 ac_save_CPPFLAGS="$CPPFLAGS"
3121 if test \! -z "$includedir" ; then
3122 CPPFLAGS="$CPPFLAGS -I$includedir"
3124 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3125 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3126 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3127 echo "configure:3128: checking for X11/extensions/scrnsaver.h" >&5
3128 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3129 echo $ac_n "(cached) $ac_c" 1>&6
3131 cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134 #include <X11/extensions/scrnsaver.h>
3136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3137 { (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3138 ac_err=`grep -v '^ *+' conftest.out`
3139 if test -z "$ac_err"; then
3141 eval "ac_cv_header_$ac_safe=yes"
3144 echo "configure: failed program was:" >&5
3145 cat conftest.$ac_ext >&5
3147 eval "ac_cv_header_$ac_safe=no"
3151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3152 echo "$ac_t""yes" 1>&6
3155 echo "$ac_t""no" 1>&6
3158 CPPFLAGS="$ac_save_CPPFLAGS"
3160 # Now check to see if it's really in the library; XF86Free-3.3 ships
3161 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3163 if test $have_mit = yes; then
3165 ac_save_CPPFLAGS="$CPPFLAGS"
3166 ac_save_LDFLAGS="$LDFLAGS"
3167 if test \! -z "$includedir" ; then
3168 CPPFLAGS="$CPPFLAGS -I$includedir"
3170 if test \! -z "$includedir" ; then
3171 CPPFLAGS="$CPPFLAGS -I$includedir"
3173 if test \! -z "$libdir" ; then
3174 LDFLAGS="$LDFLAGS -L$libdir"
3176 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3177 if test \! -z "$x_libraries" ; then
3178 LDFLAGS="$LDFLAGS -L$x_libraries"
3180 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3181 echo "configure:3182: checking for XScreenSaverRegister in -lXext" >&5
3182 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3183 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3184 echo $ac_n "(cached) $ac_c" 1>&6
3186 ac_save_LIBS="$LIBS"
3187 LIBS="-lXext -lm $LIBS"
3188 cat > conftest.$ac_ext <<EOF
3189 #line 3190 "configure"
3190 #include "confdefs.h"
3191 /* Override any gcc2 internal prototype to avoid an error. */
3192 /* We use char because int might match the return type of a gcc2
3193 builtin and then its argument prototype would still apply. */
3194 char XScreenSaverRegister();
3197 XScreenSaverRegister()
3200 if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3202 eval "ac_cv_lib_$ac_lib_var=yes"
3204 echo "configure: failed program was:" >&5
3205 cat conftest.$ac_ext >&5
3207 eval "ac_cv_lib_$ac_lib_var=no"
3210 LIBS="$ac_save_LIBS"
3213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3214 echo "$ac_t""yes" 1>&6
3215 ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3216 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3217 cat >> confdefs.h <<EOF
3218 #define $ac_tr_lib 1
3224 echo "$ac_t""no" 1>&6
3228 CPPFLAGS="$ac_save_CPPFLAGS"
3229 LDFLAGS="$ac_save_LDFLAGS"
3231 if test $have_mit = no; then
3232 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3233 # of in Xext. Thank you master, may I have another.
3235 ac_save_CPPFLAGS="$CPPFLAGS"
3236 ac_save_LDFLAGS="$LDFLAGS"
3237 if test \! -z "$includedir" ; then
3238 CPPFLAGS="$CPPFLAGS -I$includedir"
3240 if test \! -z "$includedir" ; then
3241 CPPFLAGS="$CPPFLAGS -I$includedir"
3243 if test \! -z "$libdir" ; then
3244 LDFLAGS="$LDFLAGS -L$libdir"
3246 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3247 if test \! -z "$x_libraries" ; then
3248 LDFLAGS="$LDFLAGS -L$x_libraries"
3250 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3251 echo "configure:3252: checking for XScreenSaverRegister in -lXExExt" >&5
3252 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3253 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3254 echo $ac_n "(cached) $ac_c" 1>&6
3256 ac_save_LIBS="$LIBS"
3257 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3258 cat > conftest.$ac_ext <<EOF
3259 #line 3260 "configure"
3260 #include "confdefs.h"
3261 /* Override any gcc2 internal prototype to avoid an error. */
3262 /* We use char because int might match the return type of a gcc2
3263 builtin and then its argument prototype would still apply. */
3264 char XScreenSaverRegister();
3267 XScreenSaverRegister()
3270 if { (eval echo configure:3271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3272 eval "ac_cv_lib_$ac_lib_var=yes"
3274 echo "configure: failed program was:" >&5
3275 cat conftest.$ac_ext >&5
3277 eval "ac_cv_lib_$ac_lib_var=no"
3280 LIBS="$ac_save_LIBS"
3283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3284 echo "$ac_t""yes" 1>&6
3285 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3287 echo "$ac_t""no" 1>&6
3290 CPPFLAGS="$ac_save_CPPFLAGS"
3291 LDFLAGS="$ac_save_LDFLAGS"
3294 if test $have_mit = no; then
3295 # Double fuck! Looks like some versions of XFree86 (whichever version
3296 # it is that comes with RedHat Linux 2.0 -- I can't find a version
3297 # number) put this garbage in Xss instead of Xext. Thank you master,
3298 # may I have another.
3300 ac_save_CPPFLAGS="$CPPFLAGS"
3301 ac_save_LDFLAGS="$LDFLAGS"
3302 if test \! -z "$includedir" ; then
3303 CPPFLAGS="$CPPFLAGS -I$includedir"
3305 if test \! -z "$includedir" ; then
3306 CPPFLAGS="$CPPFLAGS -I$includedir"
3308 if test \! -z "$libdir" ; then
3309 LDFLAGS="$LDFLAGS -L$libdir"
3311 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3312 if test \! -z "$x_libraries" ; then
3313 LDFLAGS="$LDFLAGS -L$x_libraries"
3315 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
3316 echo "configure:3317: checking for XScreenSaverRegister in -lXss" >&5
3317 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3318 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3319 echo $ac_n "(cached) $ac_c" 1>&6
3321 ac_save_LIBS="$LIBS"
3322 LIBS="-lXss -lX11 -lXext -lm $LIBS"
3323 cat > conftest.$ac_ext <<EOF
3324 #line 3325 "configure"
3325 #include "confdefs.h"
3326 /* Override any gcc2 internal prototype to avoid an error. */
3327 /* We use char because int might match the return type of a gcc2
3328 builtin and then its argument prototype would still apply. */
3329 char XScreenSaverRegister();
3332 XScreenSaverRegister()
3335 if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3337 eval "ac_cv_lib_$ac_lib_var=yes"
3339 echo "configure: failed program was:" >&5
3340 cat conftest.$ac_ext >&5
3342 eval "ac_cv_lib_$ac_lib_var=no"
3345 LIBS="$ac_save_LIBS"
3348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3349 echo "$ac_t""yes" 1>&6
3350 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
3352 echo "$ac_t""no" 1>&6
3355 CPPFLAGS="$ac_save_CPPFLAGS"
3356 LDFLAGS="$ac_save_LDFLAGS"
3359 if test $have_mit = yes; then
3360 cat >> confdefs.h <<\EOF
3361 #define HAVE_MIT_SAVER_EXTENSION 1
3368 elif test $with_mit != no; then
3369 echo "error: must be yes or no: --with-mit-ext=$with_mit"
3375 # Check for the XIDLE server extension header.
3378 with_xidle_req=unspecified
3379 # Check whether --with-xidle-ext or --without-xidle-ext was given.
3380 if test "${with_xidle_ext+set}" = set; then
3381 withval="$with_xidle_ext"
3382 with_xidle="$withval"; with_xidle_req="$withval"
3387 if test $with_xidle = yes; then
3389 ac_save_CPPFLAGS="$CPPFLAGS"
3390 if test \! -z "$includedir" ; then
3391 CPPFLAGS="$CPPFLAGS -I$includedir"
3393 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3394 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
3395 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
3396 echo "configure:3397: checking for X11/extensions/xidle.h" >&5
3397 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3398 echo $ac_n "(cached) $ac_c" 1>&6
3400 cat > conftest.$ac_ext <<EOF
3401 #line 3402 "configure"
3402 #include "confdefs.h"
3403 #include <X11/extensions/xidle.h>
3405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3406 { (eval echo configure:3407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3407 ac_err=`grep -v '^ *+' conftest.out`
3408 if test -z "$ac_err"; then
3410 eval "ac_cv_header_$ac_safe=yes"
3413 echo "configure: failed program was:" >&5
3414 cat conftest.$ac_ext >&5
3416 eval "ac_cv_header_$ac_safe=no"
3420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3421 echo "$ac_t""yes" 1>&6
3423 cat >> confdefs.h <<\EOF
3424 #define HAVE_XIDLE_EXTENSION 1
3428 echo "$ac_t""no" 1>&6
3431 CPPFLAGS="$ac_save_CPPFLAGS"
3432 elif test $with_xidle != no; then
3433 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
3438 # Check for the XSHM server extension header.
3441 with_xshm_req=unspecified
3442 # Check whether --with-xshm-ext or --without-xshm-ext was given.
3443 if test "${with_xshm_ext+set}" = set; then
3444 withval="$with_xshm_ext"
3445 with_xshm="$withval"; with_xshm_req="$withval"
3450 if test $with_xshm = yes; then
3452 # first check for Xshm.h.
3454 ac_save_CPPFLAGS="$CPPFLAGS"
3455 if test \! -z "$includedir" ; then
3456 CPPFLAGS="$CPPFLAGS -I$includedir"
3458 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3459 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
3460 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
3461 echo "configure:3462: checking for X11/extensions/XShm.h" >&5
3462 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3463 echo $ac_n "(cached) $ac_c" 1>&6
3465 cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 #include <X11/extensions/XShm.h>
3470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3471 { (eval echo configure:3472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3472 ac_err=`grep -v '^ *+' conftest.out`
3473 if test -z "$ac_err"; then
3475 eval "ac_cv_header_$ac_safe=yes"
3478 echo "configure: failed program was:" >&5
3479 cat conftest.$ac_ext >&5
3481 eval "ac_cv_header_$ac_safe=no"
3485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3486 echo "$ac_t""yes" 1>&6
3489 echo "$ac_t""no" 1>&6
3492 CPPFLAGS="$ac_save_CPPFLAGS"
3494 # if that succeeded, then check for sys/ipc.h.
3495 if test $have_xshm = yes; then
3498 ac_save_CPPFLAGS="$CPPFLAGS"
3499 if test \! -z "$includedir" ; then
3500 CPPFLAGS="$CPPFLAGS -I$includedir"
3502 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3503 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
3504 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
3505 echo "configure:3506: checking for sys/ipc.h" >&5
3506 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3507 echo $ac_n "(cached) $ac_c" 1>&6
3509 cat > conftest.$ac_ext <<EOF
3510 #line 3511 "configure"
3511 #include "confdefs.h"
3512 #include <sys/ipc.h>
3514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3515 { (eval echo configure:3516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3516 ac_err=`grep -v '^ *+' conftest.out`
3517 if test -z "$ac_err"; then
3519 eval "ac_cv_header_$ac_safe=yes"
3522 echo "configure: failed program was:" >&5
3523 cat conftest.$ac_ext >&5
3525 eval "ac_cv_header_$ac_safe=no"
3529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3530 echo "$ac_t""yes" 1>&6
3533 echo "$ac_t""no" 1>&6
3536 CPPFLAGS="$ac_save_CPPFLAGS"
3539 # if that succeeded, then check for sys/shm.h.
3540 if test $have_xshm = yes; then
3543 ac_save_CPPFLAGS="$CPPFLAGS"
3544 if test \! -z "$includedir" ; then
3545 CPPFLAGS="$CPPFLAGS -I$includedir"
3547 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3548 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
3549 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
3550 echo "configure:3551: checking for sys/shm.h" >&5
3551 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3552 echo $ac_n "(cached) $ac_c" 1>&6
3554 cat > conftest.$ac_ext <<EOF
3555 #line 3556 "configure"
3556 #include "confdefs.h"
3557 #include <sys/shm.h>
3559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3560 { (eval echo configure:3561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3561 ac_err=`grep -v '^ *+' conftest.out`
3562 if test -z "$ac_err"; then
3564 eval "ac_cv_header_$ac_safe=yes"
3567 echo "configure: failed program was:" >&5
3568 cat conftest.$ac_ext >&5
3570 eval "ac_cv_header_$ac_safe=no"
3574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3575 echo "$ac_t""yes" 1>&6
3578 echo "$ac_t""no" 1>&6
3581 CPPFLAGS="$ac_save_CPPFLAGS"
3584 # if that succeeded, then we've really got it.
3585 if test $have_xshm = yes; then
3586 cat >> confdefs.h <<\EOF
3587 #define HAVE_XSHM_EXTENSION 1
3592 elif test $with_xshm != no; then
3593 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
3598 # Check for the SGI-VIDEO-CONTROL server extension header.
3601 with_sgivc_req=unspecified
3602 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
3603 if test "${with_sgivc_ext+set}" = set; then
3604 withval="$with_sgivc_ext"
3605 with_sgivc="$withval"; with_sgivc_req="$withval"
3610 if test $with_sgivc = yes; then
3612 # first check for XSGIvc.h
3614 ac_save_CPPFLAGS="$CPPFLAGS"
3615 if test \! -z "$includedir" ; then
3616 CPPFLAGS="$CPPFLAGS -I$includedir"
3618 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3619 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
3620 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
3621 echo "configure:3622: checking for X11/extensions/XSGIvc.h" >&5
3622 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3623 echo $ac_n "(cached) $ac_c" 1>&6
3625 cat > conftest.$ac_ext <<EOF
3626 #line 3627 "configure"
3627 #include "confdefs.h"
3628 #include <X11/extensions/XSGIvc.h>
3630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3631 { (eval echo configure:3632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3632 ac_err=`grep -v '^ *+' conftest.out`
3633 if test -z "$ac_err"; then
3635 eval "ac_cv_header_$ac_safe=yes"
3638 echo "configure: failed program was:" >&5
3639 cat conftest.$ac_ext >&5
3641 eval "ac_cv_header_$ac_safe=no"
3645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3646 echo "$ac_t""yes" 1>&6
3649 echo "$ac_t""no" 1>&6
3652 CPPFLAGS="$ac_save_CPPFLAGS"
3654 # if that succeeded, then check for the -lXsgivc
3655 if test $have_sgivc = yes; then
3658 ac_save_CPPFLAGS="$CPPFLAGS"
3659 ac_save_LDFLAGS="$LDFLAGS"
3660 if test \! -z "$includedir" ; then
3661 CPPFLAGS="$CPPFLAGS -I$includedir"
3663 if test \! -z "$includedir" ; then
3664 CPPFLAGS="$CPPFLAGS -I$includedir"
3666 if test \! -z "$libdir" ; then
3667 LDFLAGS="$LDFLAGS -L$libdir"
3669 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3670 if test \! -z "$x_libraries" ; then
3671 LDFLAGS="$LDFLAGS -L$x_libraries"
3673 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
3674 echo "configure:3675: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
3675 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
3676 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3677 echo $ac_n "(cached) $ac_c" 1>&6
3679 ac_save_LIBS="$LIBS"
3680 LIBS="-lXsgivc -lXext -lX11 $LIBS"
3681 cat > conftest.$ac_ext <<EOF
3682 #line 3683 "configure"
3683 #include "confdefs.h"
3684 /* Override any gcc2 internal prototype to avoid an error. */
3685 /* We use char because int might match the return type of a gcc2
3686 builtin and then its argument prototype would still apply. */
3687 char XSGIvcQueryGammaMap();
3690 XSGIvcQueryGammaMap()
3693 if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3695 eval "ac_cv_lib_$ac_lib_var=yes"
3697 echo "configure: failed program was:" >&5
3698 cat conftest.$ac_ext >&5
3700 eval "ac_cv_lib_$ac_lib_var=no"
3703 LIBS="$ac_save_LIBS"
3706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3707 echo "$ac_t""yes" 1>&6
3708 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
3710 echo "$ac_t""no" 1>&6
3713 CPPFLAGS="$ac_save_CPPFLAGS"
3714 LDFLAGS="$ac_save_LDFLAGS"
3717 # if that succeeded, then we've really got it.
3718 if test $have_sgivc = yes; then
3719 cat >> confdefs.h <<\EOF
3720 #define HAVE_SGI_VC_EXTENSION 1
3725 elif test $with_sgivc != no; then
3726 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
3737 # Check for Motif and Athena --with and --without arguments.
3741 with_motif_req=unspecified
3742 with_athena_req=unspecified
3744 # Check whether --with-motif or --without-motif was given.
3745 if test "${with_motif+set}" = set; then
3746 withval="$with_motif"
3747 with_motif="$withval"; with_motif_req="$withval"
3753 # Check whether --with-athena or --without-athena was given.
3754 if test "${with_athena+set}" = set; then
3755 withval="$with_athena"
3756 with_athena="$withval"; with_athena_req="$withval"
3762 if test $with_motif != yes -a $with_motif != no ; then
3763 echo "error: must be yes or no: --with-motif=$with_motif"
3767 if test $with_athena != yes -a $with_athena != no ; then
3768 echo "error: must be yes or no: --with-athena=$with_athena"
3773 # Saying --without-motif is the same as saying --with-athena.
3774 if test $with_motif_req = no ; then
3779 # Saying --without-athena is the same as saying --with-motif.
3780 if test $with_athena_req = no ; then
3785 # Check for Motif and Athena headers.
3789 ac_save_CPPFLAGS="$CPPFLAGS"
3790 if test \! -z "$includedir" ; then
3791 CPPFLAGS="$CPPFLAGS -I$includedir"
3793 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3794 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
3795 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
3796 echo "configure:3797: checking for Xm/Xm.h" >&5
3797 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3798 echo $ac_n "(cached) $ac_c" 1>&6
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3802 "configure"
3802 #include "confdefs.h"
3805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3806 { (eval echo configure:3807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3807 ac_err=`grep -v '^ *+' conftest.out`
3808 if test -z "$ac_err"; then
3810 eval "ac_cv_header_$ac_safe=yes"
3813 echo "configure: failed program was:" >&5
3814 cat conftest.$ac_ext >&5
3816 eval "ac_cv_header_$ac_safe=no"
3820 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3821 echo "$ac_t""yes" 1>&6
3823 cat >> confdefs.h <<\EOF
3824 #define HAVE_MOTIF 1
3827 SAVER_LIBS="-lXm $SAVER_LIBS"
3829 echo "$ac_t""no" 1>&6
3832 CPPFLAGS="$ac_save_CPPFLAGS"
3837 ac_save_CPPFLAGS="$CPPFLAGS"
3838 if test \! -z "$includedir" ; then
3839 CPPFLAGS="$CPPFLAGS -I$includedir"
3841 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3842 ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
3843 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
3844 echo "configure:3845: checking for X11/Xaw/Dialog.h" >&5
3845 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3846 echo $ac_n "(cached) $ac_c" 1>&6
3848 cat > conftest.$ac_ext <<EOF
3849 #line 3850 "configure"
3850 #include "confdefs.h"
3851 #include <X11/Xaw/Dialog.h>
3853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3854 { (eval echo configure:3855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3855 ac_err=`grep -v '^ *+' conftest.out`
3856 if test -z "$ac_err"; then
3858 eval "ac_cv_header_$ac_safe=yes"
3861 echo "configure: failed program was:" >&5
3862 cat conftest.$ac_ext >&5
3864 eval "ac_cv_header_$ac_safe=no"
3868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3869 echo "$ac_t""yes" 1>&6
3871 cat >> confdefs.h <<\EOF
3872 #define HAVE_ATHENA 1
3875 SAVER_LIBS="-lXaw $SAVER_LIBS"
3877 echo "$ac_t""no" 1>&6
3880 CPPFLAGS="$ac_save_CPPFLAGS"
3884 # If they asked for both motif and athena, check motif then athena.
3885 # If they asked for only motif, check motif then athena.
3886 # If they asked for only athena, check athena then motif.
3887 # If they asked for neither, check motif then athena.
3889 proselytize_motif=yes
3890 if test $with_motif = yes; then
3891 # asked for both, or for motif only
3893 if test $have_motif = yes; then
3900 elif test $with_athena = yes; then
3901 # asked for athena only
3903 if test $have_athena = yes; then
3905 proselytize_motif=no
3913 if test $have_motif = yes; then
3921 if test $have_motif = yes; then
3922 proselytize_motif=no
3925 # If we have Athena, check whether it's a version that includes
3926 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
3927 if test $have_athena = yes ; then
3928 echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
3929 echo "configure:3930: checking for XawViewportSetCoordinates in Viewport.h" >&5
3930 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
3931 echo $ac_n "(cached) $ac_c" 1>&6
3933 ac_cv_have_XawViewportSetCoordinates=no
3935 ac_save_CPPFLAGS="$CPPFLAGS"
3936 if test \! -z "$includedir" ; then
3937 CPPFLAGS="$CPPFLAGS -I$includedir"
3939 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3940 cat > conftest.$ac_ext <<EOF
3941 #line 3942 "configure"
3942 #include "confdefs.h"
3943 #include <X11/Xaw/Viewport.h>
3945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3946 egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then
3948 ac_cv_have_XawViewportSetCoordinates=yes
3952 CPPFLAGS="$ac_save_CPPFLAGS"
3955 echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6
3956 if test $ac_cv_have_XawViewportSetCoordinates = yes ; then
3957 cat >> confdefs.h <<\EOF
3958 #define HAVE_XawViewportSetCoordinates 1
3965 # If we have Motif, check whether it's really LessTif.
3968 if test $have_motif = yes ; then
3969 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
3970 echo "configure:3971: checking whether Motif is really LessTif" >&5
3971 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
3972 echo $ac_n "(cached) $ac_c" 1>&6
3975 ac_save_CPPFLAGS="$CPPFLAGS"
3976 if test \! -z "$includedir" ; then
3977 CPPFLAGS="$CPPFLAGS -I$includedir"
3979 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3980 cat > conftest.$ac_ext <<EOF
3981 #line 3982 "configure"
3982 #include "confdefs.h"
3985 long vers = LesstifVersion;
3988 if { (eval echo configure:3989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3990 ac_cv_have_lesstif=yes
3992 echo "configure: failed program was:" >&5
3993 cat conftest.$ac_ext >&5
3995 ac_cv_have_lesstif=no
3998 CPPFLAGS="$ac_save_CPPFLAGS"
4001 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
4002 have_lesstif=$ac_cv_have_lesstif
4006 unset ac_cv_good_lesstif
4009 if test $have_lesstif = yes ; then
4010 # It must be at least "GNU Lesstif 0.82".
4011 # #### If you change this, also sync the warning message lower down.
4012 echo $ac_n "checking whether LessTif is of a recent enough vintage""... $ac_c" 1>&6
4013 echo "configure:4014: checking whether LessTif is of a recent enough vintage" >&5
4014 if eval "test \"`echo '$''{'ac_cv_good_lesstif'+set}'`\" = set"; then
4015 echo $ac_n "(cached) $ac_c" 1>&6
4018 ac_save_CPPFLAGS="$CPPFLAGS"
4019 if test \! -z "$includedir" ; then
4020 CPPFLAGS="$CPPFLAGS -I$includedir"
4022 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4023 if test "$cross_compiling" = yes; then
4024 # cross compiling? Make an ass out of umption.
4025 ac_cv_good_lesstif=yes
4027 cat > conftest.$ac_ext <<EOF
4028 #line 4029 "configure"
4029 #include "confdefs.h"
4031 int main() { exit(LesstifVersion < 82); }
4033 if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4035 ac_cv_good_lesstif=yes
4037 echo "configure: failed program was:" >&5
4038 cat conftest.$ac_ext >&5
4040 ac_cv_good_lesstif=no
4045 CPPFLAGS="$ac_save_CPPFLAGS"
4048 echo "$ac_t""$ac_cv_good_lesstif" 1>&6
4049 good_lesstif=$ac_cv_good_lesstif
4053 # check for XPM header.
4056 with_xpm_req=unspecified
4057 # Check whether --with-xpm or --without-xpm was given.
4058 if test "${with_xpm+set}" = set; then
4060 with_xpm="$withval"; with_xpm_req="$withval"
4065 if test $with_xpm = yes; then
4067 ac_save_CPPFLAGS="$CPPFLAGS"
4068 if test \! -z "$includedir" ; then
4069 CPPFLAGS="$CPPFLAGS -I$includedir"
4071 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4072 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
4073 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
4074 echo "configure:4075: checking for X11/xpm.h" >&5
4075 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4076 echo $ac_n "(cached) $ac_c" 1>&6
4078 cat > conftest.$ac_ext <<EOF
4079 #line 4080 "configure"
4080 #include "confdefs.h"
4081 #include <X11/xpm.h>
4083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4084 { (eval echo configure:4085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4085 ac_err=`grep -v '^ *+' conftest.out`
4086 if test -z "$ac_err"; then
4088 eval "ac_cv_header_$ac_safe=yes"
4091 echo "configure: failed program was:" >&5
4092 cat conftest.$ac_ext >&5
4094 eval "ac_cv_header_$ac_safe=no"
4098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4099 echo "$ac_t""yes" 1>&6
4101 cat >> confdefs.h <<\EOF
4107 echo "$ac_t""no" 1>&6
4110 CPPFLAGS="$ac_save_CPPFLAGS"
4111 elif test $with_xpm != no; then
4112 echo "error: must be yes or no: --with-xpm=$with_xpm"
4117 # check for the GL header
4120 with_gl_req=unspecified
4121 # Check whether --with-gl or --without-gl was given.
4122 if test "${with_gl+set}" = set; then
4124 with_gl="$withval"; with_gl_req="$withval"
4130 if test $with_gl = yes; then
4132 ac_save_CPPFLAGS="$CPPFLAGS"
4133 if test \! -z "$includedir" ; then
4134 CPPFLAGS="$CPPFLAGS -I$includedir"
4136 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4137 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
4138 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
4139 echo "configure:4140: checking for GL/gl.h" >&5
4140 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4141 echo $ac_n "(cached) $ac_c" 1>&6
4143 cat > conftest.$ac_ext <<EOF
4144 #line 4145 "configure"
4145 #include "confdefs.h"
4148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4149 { (eval echo configure:4150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4150 ac_err=`grep -v '^ *+' conftest.out`
4151 if test -z "$ac_err"; then
4153 eval "ac_cv_header_$ac_safe=yes"
4156 echo "configure: failed program was:" >&5
4157 cat conftest.$ac_ext >&5
4159 eval "ac_cv_header_$ac_safe=no"
4163 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4164 echo "$ac_t""yes" 1>&6
4167 echo "$ac_t""no" 1>&6
4170 CPPFLAGS="$ac_save_CPPFLAGS"
4171 if test $have_gl = yes ; then
4173 ac_save_CPPFLAGS="$CPPFLAGS"
4174 if test \! -z "$includedir" ; then
4175 CPPFLAGS="$CPPFLAGS -I$includedir"
4177 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4178 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
4179 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
4180 echo "configure:4181: checking for GL/glx.h" >&5
4181 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4182 echo $ac_n "(cached) $ac_c" 1>&6
4184 cat > conftest.$ac_ext <<EOF
4185 #line 4186 "configure"
4186 #include "confdefs.h"
4189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4190 { (eval echo configure:4191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4191 ac_err=`grep -v '^ *+' conftest.out`
4192 if test -z "$ac_err"; then
4194 eval "ac_cv_header_$ac_safe=yes"
4197 echo "configure: failed program was:" >&5
4198 cat conftest.$ac_ext >&5
4200 eval "ac_cv_header_$ac_safe=no"
4204 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4205 echo "$ac_t""yes" 1>&6
4208 echo "$ac_t""no" 1>&6
4211 CPPFLAGS="$ac_save_CPPFLAGS"
4214 # If we have the headers, try and figure out which vendor it's from.
4216 if test $have_gl = yes ; then
4218 cat >> confdefs.h <<\EOF
4224 ac_save_CPPFLAGS="$CPPFLAGS"
4225 if test \! -z "$includedir" ; then
4226 CPPFLAGS="$CPPFLAGS -I$includedir"
4228 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4229 cat > conftest.$ac_ext <<EOF
4230 #line 4231 "configure"
4231 #include "confdefs.h"
4234 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4235 egrep "Mesa" >/dev/null 2>&1; then
4241 CPPFLAGS="$ac_save_CPPFLAGS"
4242 if test $have_mesa_gl = no ; then
4243 GL_LIBS="-lGL -lGLU"
4245 cat >> confdefs.h <<\EOF
4246 #define HAVE_MESA_GL 1
4249 GL_LIBS="-lMesaGL -lMesaGLU"
4253 elif test $with_gl != no; then
4254 echo "error: must be yes or no: --with-gl=$with_gl"
4259 # check for SGI XReadDisplay server extension header.
4262 with_readdisplay_req=unspecified
4263 # Check whether --with-readdisplay or --without-readdisplay was given.
4264 if test "${with_readdisplay+set}" = set; then
4265 withval="$with_readdisplay"
4266 with_readdisplay="$withval"; with_readdisplay_req="$withval"
4268 with_readdisplay=yes
4271 if test $with_readdisplay = yes; then
4273 ac_save_CPPFLAGS="$CPPFLAGS"
4274 if test \! -z "$includedir" ; then
4275 CPPFLAGS="$CPPFLAGS -I$includedir"
4277 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4278 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
4279 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
4280 echo "configure:4281: checking for X11/extensions/readdisplay.h" >&5
4281 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4282 echo $ac_n "(cached) $ac_c" 1>&6
4284 cat > conftest.$ac_ext <<EOF
4285 #line 4286 "configure"
4286 #include "confdefs.h"
4287 #include <X11/extensions/readdisplay.h>
4289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4290 { (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4291 ac_err=`grep -v '^ *+' conftest.out`
4292 if test -z "$ac_err"; then
4294 eval "ac_cv_header_$ac_safe=yes"
4297 echo "configure: failed program was:" >&5
4298 cat conftest.$ac_ext >&5
4300 eval "ac_cv_header_$ac_safe=no"
4304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4305 echo "$ac_t""yes" 1>&6
4306 cat >> confdefs.h <<\EOF
4307 #define HAVE_READ_DISPLAY_EXTENSION 1
4311 echo "$ac_t""no" 1>&6
4314 CPPFLAGS="$ac_save_CPPFLAGS"
4315 elif test $with_readdisplay != no; then
4316 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
4321 # check for SGI's Iris Video Library header.
4324 with_sgivideo_req=unspecified
4325 # Check whether --with-sgivideo or --without-sgivideo was given.
4326 if test "${with_sgivideo+set}" = set; then
4327 withval="$with_sgivideo"
4328 with_sgivideo="$withval"; with_sgivideo_req="$withval"
4333 if test $with_sgivideo = yes; then
4335 ac_save_CPPFLAGS="$CPPFLAGS"
4336 if test \! -z "$includedir" ; then
4337 CPPFLAGS="$CPPFLAGS -I$includedir"
4339 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4340 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
4341 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
4342 echo "configure:4343: checking for dmedia/vl.h" >&5
4343 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4344 echo $ac_n "(cached) $ac_c" 1>&6
4346 cat > conftest.$ac_ext <<EOF
4347 #line 4348 "configure"
4348 #include "confdefs.h"
4349 #include <dmedia/vl.h>
4351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4352 { (eval echo configure:4353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4353 ac_err=`grep -v '^ *+' conftest.out`
4354 if test -z "$ac_err"; then
4356 eval "ac_cv_header_$ac_safe=yes"
4359 echo "configure: failed program was:" >&5
4360 cat conftest.$ac_ext >&5
4362 eval "ac_cv_header_$ac_safe=no"
4366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4367 echo "$ac_t""yes" 1>&6
4370 echo "$ac_t""no" 1>&6
4373 CPPFLAGS="$ac_save_CPPFLAGS"
4374 if test $have_sgivideo = yes; then
4376 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
4377 echo "configure:4378: checking for vlOpenVideo in -lvl" >&5
4378 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
4379 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4380 echo $ac_n "(cached) $ac_c" 1>&6
4382 ac_save_LIBS="$LIBS"
4384 cat > conftest.$ac_ext <<EOF
4385 #line 4386 "configure"
4386 #include "confdefs.h"
4387 /* Override any gcc2 internal prototype to avoid an error. */
4388 /* We use char because int might match the return type of a gcc2
4389 builtin and then its argument prototype would still apply. */
4396 if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4398 eval "ac_cv_lib_$ac_lib_var=yes"
4400 echo "configure: failed program was:" >&5
4401 cat conftest.$ac_ext >&5
4403 eval "ac_cv_lib_$ac_lib_var=no"
4406 LIBS="$ac_save_LIBS"
4409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4410 echo "$ac_t""yes" 1>&6
4413 echo "$ac_t""no" 1>&6
4416 if test $have_sgivideo = yes; then
4417 SGI_VIDEO_OBJS="$(UTILS_SRC)/sgivideo.o"
4418 SGI_VIDEO_LIBS="-lvl"
4419 cat >> confdefs.h <<\EOF
4420 #define HAVE_SGI_VIDEO 1
4425 elif test $with_sgivideo != no; then
4426 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
4432 # Try to find a program to generate random text.
4434 # Zippy is funnier than the idiocy generally spat out by `fortune',
4435 # so try to find that, by invoking Emacs and asking it where its
4436 # libexec directory is ("yow" lives in there.)
4438 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
4439 # and if so, use them.
4441 # If that doesn't work, look in /usr/games, and if it's there, use
4442 # the full pathname.
4445 # Check whether --with-zippy or --without-zippy was given.
4446 if test "${with_zippy+set}" = set; then
4447 withval="$with_zippy"
4448 with_zippy_req="$withval"; with_zippy="$withval"
4450 with_zippy_req="$withval"; with_zippy="$withval"
4454 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
4459 if test -n "$with_zippy_req" ; then
4460 ac_cv_zippy_program=""
4461 case "$with_zippy_req" in
4463 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
4464 echo "configure:4465: checking for $with_zippy_req" >&5
4465 if test -x "$with_zippy_req" ; then
4466 echo "$ac_t""yes" 1>&6
4468 echo "$ac_t""no" 1>&6
4474 unset ac_cv_path_zip2
4475 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
4476 set dummy $with_zippy_req; ac_word=$2
4477 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4478 echo "configure:4479: checking for $ac_word" >&5
4479 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
4480 echo $ac_n "(cached) $ac_c" 1>&6
4484 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
4487 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4488 for ac_dir in $PATH; do
4489 test -z "$ac_dir" && ac_dir=.
4490 if test -f $ac_dir/$ac_word; then
4491 ac_cv_path_zip2="$ac_dir/$ac_word"
4499 zip2="$ac_cv_path_zip2"
4500 if test -n "$zip2"; then
4501 echo "$ac_t""$zip2" 1>&6
4503 echo "$ac_t""no" 1>&6
4506 if test "$zip2" = ""; then
4511 ac_cv_zippy_program="$with_zippy"
4513 elif test -n "$ac_cv_zippy_program"; then
4514 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
4517 if test ! -n "$ac_cv_zippy_program"; then
4519 for ac_prog in emacs
4521 # Extract the first word of "$ac_prog", so it can be a program name with args.
4522 set dummy $ac_prog; ac_word=$2
4523 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4524 echo "configure:4525: checking for $ac_word" >&5
4525 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
4526 echo $ac_n "(cached) $ac_c" 1>&6
4528 if test -n "$emacs_exe"; then
4529 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
4531 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4532 for ac_dir in $PATH; do
4533 test -z "$ac_dir" && ac_dir=.
4534 if test -f $ac_dir/$ac_word; then
4535 ac_cv_prog_emacs_exe="$ac_prog"
4542 emacs_exe="$ac_cv_prog_emacs_exe"
4543 if test -n "$emacs_exe"; then
4544 echo "$ac_t""$emacs_exe" 1>&6
4546 echo "$ac_t""no" 1>&6
4549 test -n "$emacs_exe" && break
4552 for ac_prog in xemacs
4554 # Extract the first word of "$ac_prog", so it can be a program name with args.
4555 set dummy $ac_prog; ac_word=$2
4556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4557 echo "configure:4558: checking for $ac_word" >&5
4558 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
4559 echo $ac_n "(cached) $ac_c" 1>&6
4561 if test -n "$xemacs_exe"; then
4562 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
4564 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4565 for ac_dir in $PATH; do
4566 test -z "$ac_dir" && ac_dir=.
4567 if test -f $ac_dir/$ac_word; then
4568 ac_cv_prog_xemacs_exe="$ac_prog"
4575 xemacs_exe="$ac_cv_prog_xemacs_exe"
4576 if test -n "$xemacs_exe"; then
4577 echo "$ac_t""$xemacs_exe" 1>&6
4579 echo "$ac_t""no" 1>&6
4582 test -n "$xemacs_exe" && break
4586 ac_cv_zippy_program=""
4587 eargs='-batch -q -nw --eval'
4589 if test -n "$emacs_exe" ; then
4590 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
4591 echo "configure:4592: checking for emacs yow" >&5
4593 # get emacs to tell us where the libexec directory is.
4595 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
4596 2>/dev/null | tail -1`
4597 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
4599 # try running libexec/yow and see if it exits without error.
4601 if test x"$dir" != x -a -x $dir/yow ; then
4602 if $dir/yow >&- 2>&- ; then
4603 ac_cv_zippy_program="$dir/yow"
4604 echo "$ac_t""$ac_cv_zippy_program" 1>&6
4606 echo "$ac_t""no" 1>&6
4611 if test -z "$ac_cv_zippy_program" ; then
4612 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
4613 echo "configure:4614: checking for xemacs yow" >&5
4614 if test -n "$xemacs_exe" ; then
4616 # get xemacs to tell us where the libexec directory is.
4618 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
4619 2>/dev/null | tail -1`
4620 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
4622 # try running libexec/yow and see if it exits without error.
4624 if test x"$dir" != x -a -x $dir/yow ; then
4625 if $dir/yow >&- 2>&- ; then
4626 ac_cv_zippy_program="$dir/yow"
4627 echo "$ac_t""$ac_cv_zippy_program" 1>&6
4630 # in some xemacs installations, the pathname of the yow.lines file
4631 # isn't hardcoded into the yow executable, and must be passed on
4632 # the command line. See if it's in libexec/../etc/.
4636 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
4639 yow="yow -f $dir_up/etc/yow.lines"
4640 if $dir/$yow >&- 2>&- ; then
4641 ac_cv_zippy_program="$dir/$yow"
4642 echo "$ac_t""$ac_cv_zippy_program" 1>&6
4644 echo "$ac_t""no" 1>&6
4651 # if that didn't work, try for some other programs...
4652 if test -z "$ac_cv_zippy_program" ; then
4654 for ac_prog in fortune zippy yow
4656 # Extract the first word of "$ac_prog", so it can be a program name with args.
4657 set dummy $ac_prog; ac_word=$2
4658 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4659 echo "configure:4660: checking for $ac_word" >&5
4660 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
4661 echo $ac_n "(cached) $ac_c" 1>&6
4663 if test -n "$fortune"; then
4664 ac_cv_prog_fortune="$fortune" # Let the user override the test.
4666 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4667 for ac_dir in $PATH; do
4668 test -z "$ac_dir" && ac_dir=.
4669 if test -f $ac_dir/$ac_word; then
4670 ac_cv_prog_fortune="$ac_prog"
4677 fortune="$ac_cv_prog_fortune"
4678 if test -n "$fortune"; then
4679 echo "$ac_t""$fortune" 1>&6
4681 echo "$ac_t""no" 1>&6
4684 test -n "$fortune" && break
4687 # if that didn't work, try for those programs in /usr/games...
4688 if test -z "$fortune" ; then
4689 for ac_prog in fortune zippy yow
4691 # Extract the first word of "$ac_prog", so it can be a program name with args.
4692 set dummy $ac_prog; ac_word=$2
4693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4694 echo "configure:4695: checking for $ac_word" >&5
4695 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
4696 echo $ac_n "(cached) $ac_c" 1>&6
4700 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
4703 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4704 for ac_dir in /usr/games:/usr/local/games$ac_dummy; do
4705 test -z "$ac_dir" && ac_dir=.
4706 if test -f $ac_dir/$ac_word; then
4707 ac_cv_path_fortune="$ac_dir/$ac_word"
4715 fortune="$ac_cv_path_fortune"
4716 if test -n "$fortune"; then
4717 echo "$ac_t""$fortune" 1>&6
4719 echo "$ac_t""no" 1>&6
4722 test -n "$fortune" && break
4724 test -n "$fortune" || fortune="fortune"
4730 if test -z "$ac_cv_zippy_program" ; then
4731 ac_cv_zippy_program=fortune
4734 cat >> confdefs.h <<EOF
4735 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
4742 # Allow locking to be disabled at compile-time.
4746 with_kerberos_req=unspecified
4748 with_shadow_req=unspecified
4751 # Check whether --enable-locking or --disable-locking was given.
4752 if test "${enable_locking+set}" = set; then
4753 enableval="$enable_locking"
4754 enable_locking="$enableval"
4759 if test $enable_locking = yes; then
4761 # Check for Kerberos.
4763 # Check whether --with-kerberos or --without-kerberos was given.
4764 if test "${with_kerberos+set}" = set; then
4765 withval="$with_kerberos"
4766 with_kerberos="$withval"; with_kerberos_req="$withval"
4771 if test $with_kerberos = yes; then
4772 echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
4773 echo "configure:4774: checking for Kerberos" >&5
4774 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
4775 echo $ac_n "(cached) $ac_c" 1>&6
4778 ac_save_CPPFLAGS="$CPPFLAGS"
4779 if test \! -z "$includedir" ; then
4780 CPPFLAGS="$CPPFLAGS -I$includedir"
4782 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4783 cat > conftest.$ac_ext <<EOF
4784 #line 4785 "configure"
4785 #include "confdefs.h"
4791 if { (eval echo configure:4792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4795 echo "configure: failed program was:" >&5
4796 cat conftest.$ac_ext >&5
4801 CPPFLAGS="$ac_save_CPPFLAGS"
4804 echo "$ac_t""$ac_cv_kerberos" 1>&6
4805 if test $ac_cv_kerberos = yes ; then
4807 cat >> confdefs.h <<\EOF
4808 #define HAVE_KERBEROS 1
4811 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lnsl -lsocket"
4813 elif test $with_kerberos != no; then
4814 echo "error: must be yes or no: --with-kerberos=$with_kerberos"
4818 # Next, check for the nine billion variants of shadow passwords...
4820 passwd_cruft_done=no
4821 # Check whether --with-shadow or --without-shadow was given.
4822 if test "${with_shadow+set}" = set; then
4823 withval="$with_shadow"
4824 with_shadow="$withval"; with_shadow_req="$withval"
4829 if test $with_shadow = no; then
4830 passwd_cruft_done=yes
4831 elif test $with_shadow != yes; then
4832 echo "error: must be yes or no: --with-shadow=$with_shadow"
4837 # Sun's "adjunct" passwords.
4839 if test $passwd_cruft_done = no ; then
4840 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
4841 echo "configure:4842: checking for Sun-style shadow passwords" >&5
4842 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
4843 echo $ac_n "(cached) $ac_c" 1>&6
4846 ac_save_CPPFLAGS="$CPPFLAGS"
4847 if test \! -z "$includedir" ; then
4848 CPPFLAGS="$CPPFLAGS -I$includedir"
4850 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4851 cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4856 #include <sys/types.h>
4857 #include <sys/label.h>
4858 #include <sys/audit.h>
4861 struct passwd_adjunct *p = getpwanam("nobody");
4862 const char *pw = p->pwa_passwd;
4865 if { (eval echo configure:4866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4867 ac_cv_sun_adjunct=yes
4869 echo "configure: failed program was:" >&5
4870 cat conftest.$ac_ext >&5
4872 ac_cv_sun_adjunct=no
4875 CPPFLAGS="$ac_save_CPPFLAGS"
4878 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
4879 if test $ac_cv_sun_adjunct = yes; then
4882 passwd_cruft_done=yes
4883 cat >> confdefs.h <<\EOF
4884 #define HAVE_ADJUNCT_PASSWD 1
4890 # DEC and SCO so-called "enhanced" security.
4892 if test $passwd_cruft_done = no ; then
4893 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
4894 echo "configure:4895: checking for DEC-style shadow passwords" >&5
4895 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
4896 echo $ac_n "(cached) $ac_c" 1>&6
4899 ac_save_CPPFLAGS="$CPPFLAGS"
4900 if test \! -z "$includedir" ; then
4901 CPPFLAGS="$CPPFLAGS -I$includedir"
4903 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4904 cat > conftest.$ac_ext <<EOF
4905 #line 4906 "configure"
4906 #include "confdefs.h"
4909 #include <sys/types.h>
4911 #include <sys/security.h>
4914 struct pr_passwd *p;
4916 set_auth_parameters(0, 0);
4917 check_auth_parameters();
4918 p = getprpwnam("nobody");
4919 pw = p->ufld.fd_encrypt;
4922 if { (eval echo configure:4923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4924 ac_cv_enhanced_passwd=yes
4926 echo "configure: failed program was:" >&5
4927 cat conftest.$ac_ext >&5
4929 ac_cv_enhanced_passwd=no
4932 CPPFLAGS="$ac_save_CPPFLAGS"
4935 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
4936 if test $ac_cv_enhanced_passwd = yes; then
4939 passwd_cruft_done=yes
4940 cat >> confdefs.h <<\EOF
4941 #define HAVE_ENHANCED_PASSWD 1
4945 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
4946 # (I'm told it needs -lcurses too, but I don't understand why.)
4947 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
4948 echo "configure:4949: checking for getprpwnam in -lprot" >&5
4949 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
4950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4951 echo $ac_n "(cached) $ac_c" 1>&6
4953 ac_save_LIBS="$LIBS"
4954 LIBS="-lprot -lx $LIBS"
4955 cat > conftest.$ac_ext <<EOF
4956 #line 4957 "configure"
4957 #include "confdefs.h"
4958 /* Override any gcc2 internal prototype to avoid an error. */
4959 /* We use char because int might match the return type of a gcc2
4960 builtin and then its argument prototype would still apply. */
4967 if { (eval echo configure:4968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4969 eval "ac_cv_lib_$ac_lib_var=yes"
4971 echo "configure: failed program was:" >&5
4972 cat conftest.$ac_ext >&5
4974 eval "ac_cv_lib_$ac_lib_var=no"
4977 LIBS="$ac_save_LIBS"
4980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4981 echo "$ac_t""yes" 1>&6
4982 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
4984 echo "$ac_t""no" 1>&6
4985 # On DEC, getprpwnam() is in -lsecurity
4986 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
4987 echo "configure:4988: checking for getprpwnam in -lsecurity" >&5
4988 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
4989 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4990 echo $ac_n "(cached) $ac_c" 1>&6
4992 ac_save_LIBS="$LIBS"
4993 LIBS="-lsecurity $LIBS"
4994 cat > conftest.$ac_ext <<EOF
4995 #line 4996 "configure"
4996 #include "confdefs.h"
4997 /* Override any gcc2 internal prototype to avoid an error. */
4998 /* We use char because int might match the return type of a gcc2
4999 builtin and then its argument prototype would still apply. */
5006 if { (eval echo configure:5007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5008 eval "ac_cv_lib_$ac_lib_var=yes"
5010 echo "configure: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5013 eval "ac_cv_lib_$ac_lib_var=no"
5016 LIBS="$ac_save_LIBS"
5019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5020 echo "$ac_t""yes" 1>&6
5021 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5023 echo "$ac_t""no" 1>&6
5031 # HP's entry in the "Not Invented Here" Sweepstakes.
5033 if test $passwd_cruft_done = no ; then
5034 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5035 echo "configure:5036: checking for HP-style shadow passwords" >&5
5036 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5037 echo $ac_n "(cached) $ac_c" 1>&6
5040 ac_save_CPPFLAGS="$CPPFLAGS"
5041 if test \! -z "$includedir" ; then
5042 CPPFLAGS="$CPPFLAGS -I$includedir"
5044 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5045 cat > conftest.$ac_ext <<EOF
5046 #line 5047 "configure"
5047 #include "confdefs.h"
5050 #include <sys/types.h>
5052 #include <hpsecurity.h>
5055 struct s_passwd *p = getspwnam("nobody");
5056 const char *pw = p->pw_passwd;
5059 if { (eval echo configure:5060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5061 ac_cv_hpux_passwd=yes
5063 echo "configure: failed program was:" >&5
5064 cat conftest.$ac_ext >&5
5066 ac_cv_hpux_passwd=no
5069 CPPFLAGS="$ac_save_CPPFLAGS"
5072 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
5073 if test $ac_cv_hpux_passwd = yes; then
5076 passwd_cruft_done=yes
5077 cat >> confdefs.h <<\EOF
5078 #define HAVE_HPUX_PASSWD 1
5082 # on HPUX, bigcrypt is in -lsec
5083 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
5084 echo "configure:5085: checking for bigcrypt in -lsec" >&5
5085 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
5086 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5087 echo $ac_n "(cached) $ac_c" 1>&6
5089 ac_save_LIBS="$LIBS"
5091 cat > conftest.$ac_ext <<EOF
5092 #line 5093 "configure"
5093 #include "confdefs.h"
5094 /* Override any gcc2 internal prototype to avoid an error. */
5095 /* We use char because int might match the return type of a gcc2
5096 builtin and then its argument prototype would still apply. */
5103 if { (eval echo configure:5104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5105 eval "ac_cv_lib_$ac_lib_var=yes"
5107 echo "configure: failed program was:" >&5
5108 cat conftest.$ac_ext >&5
5110 eval "ac_cv_lib_$ac_lib_var=no"
5113 LIBS="$ac_save_LIBS"
5116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5117 echo "$ac_t""yes" 1>&6
5118 PASSWD_LIBS="$PASSWD_LIBS -lsec"
5120 echo "$ac_t""no" 1>&6
5126 # Traditional (ha!) shadow passwords.
5128 if test $passwd_cruft_done = no ; then
5129 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
5130 echo "configure:5131: checking for generic shadow passwords" >&5
5131 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
5132 echo $ac_n "(cached) $ac_c" 1>&6
5135 ac_save_CPPFLAGS="$CPPFLAGS"
5136 if test \! -z "$includedir" ; then
5137 CPPFLAGS="$CPPFLAGS -I$includedir"
5139 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5140 cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5145 #include <sys/types.h>
5149 struct spwd *p = getspnam("nobody");
5150 const char *pw = p->sp_pwdp;
5153 if { (eval echo configure:5154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5157 echo "configure: failed program was:" >&5
5158 cat conftest.$ac_ext >&5
5163 CPPFLAGS="$ac_save_CPPFLAGS"
5166 echo "$ac_t""$ac_cv_shadow" 1>&6
5167 if test $ac_cv_shadow = yes; then
5170 passwd_cruft_done=yes
5171 cat >> confdefs.h <<\EOF
5172 #define HAVE_SHADOW_PASSWD 1
5176 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
5178 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
5179 echo "configure:5180: checking for getspnam in -lc" >&5
5180 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
5181 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5182 echo $ac_n "(cached) $ac_c" 1>&6
5184 ac_save_LIBS="$LIBS"
5186 cat > conftest.$ac_ext <<EOF
5187 #line 5188 "configure"
5188 #include "confdefs.h"
5189 /* Override any gcc2 internal prototype to avoid an error. */
5190 /* We use char because int might match the return type of a gcc2
5191 builtin and then its argument prototype would still apply. */
5198 if { (eval echo configure:5199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5200 eval "ac_cv_lib_$ac_lib_var=yes"
5202 echo "configure: failed program was:" >&5
5203 cat conftest.$ac_ext >&5
5205 eval "ac_cv_lib_$ac_lib_var=no"
5208 LIBS="$ac_save_LIBS"
5211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5212 echo "$ac_t""yes" 1>&6
5215 echo "$ac_t""no" 1>&6
5218 if test $have_getspnam = no ; then
5219 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
5220 echo "configure:5221: checking for getspnam in -lgen" >&5
5221 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
5222 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5223 echo $ac_n "(cached) $ac_c" 1>&6
5225 ac_save_LIBS="$LIBS"
5227 cat > conftest.$ac_ext <<EOF
5228 #line 5229 "configure"
5229 #include "confdefs.h"
5230 /* Override any gcc2 internal prototype to avoid an error. */
5231 /* We use char because int might match the return type of a gcc2
5232 builtin and then its argument prototype would still apply. */
5239 if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5241 eval "ac_cv_lib_$ac_lib_var=yes"
5243 echo "configure: failed program was:" >&5
5244 cat conftest.$ac_ext >&5
5246 eval "ac_cv_lib_$ac_lib_var=no"
5249 LIBS="$ac_save_LIBS"
5252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5253 echo "$ac_t""yes" 1>&6
5254 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
5256 echo "$ac_t""no" 1>&6
5263 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
5265 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
5266 echo "configure:5267: checking for crypt in -lc" >&5
5267 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
5268 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5269 echo $ac_n "(cached) $ac_c" 1>&6
5271 ac_save_LIBS="$LIBS"
5273 cat > conftest.$ac_ext <<EOF
5274 #line 5275 "configure"
5275 #include "confdefs.h"
5276 /* Override any gcc2 internal prototype to avoid an error. */
5277 /* We use char because int might match the return type of a gcc2
5278 builtin and then its argument prototype would still apply. */
5285 if { (eval echo configure:5286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5287 eval "ac_cv_lib_$ac_lib_var=yes"
5289 echo "configure: failed program was:" >&5
5290 cat conftest.$ac_ext >&5
5292 eval "ac_cv_lib_$ac_lib_var=no"
5295 LIBS="$ac_save_LIBS"
5298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5299 echo "$ac_t""yes" 1>&6
5302 echo "$ac_t""no" 1>&6
5305 if test $have_crypt = no ; then
5306 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
5307 echo "configure:5308: checking for crypt in -lcrypt" >&5
5308 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
5309 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5310 echo $ac_n "(cached) $ac_c" 1>&6
5312 ac_save_LIBS="$LIBS"
5313 LIBS="-lcrypt $LIBS"
5314 cat > conftest.$ac_ext <<EOF
5315 #line 5316 "configure"
5316 #include "confdefs.h"
5317 /* Override any gcc2 internal prototype to avoid an error. */
5318 /* We use char because int might match the return type of a gcc2
5319 builtin and then its argument prototype would still apply. */
5326 if { (eval echo configure:5327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5328 eval "ac_cv_lib_$ac_lib_var=yes"
5330 echo "configure: failed program was:" >&5
5331 cat conftest.$ac_ext >&5
5333 eval "ac_cv_lib_$ac_lib_var=no"
5336 LIBS="$ac_save_LIBS"
5339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5340 echo "$ac_t""yes" 1>&6
5341 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
5343 echo "$ac_t""no" 1>&6
5349 # Most of the above shadow mechanisms will have set need_setuid to yes,
5350 # if they were found. But, on some systems, we need setuid even when
5351 # using plain old vanilla passwords.
5353 if test $need_setuid = no ; then
5355 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
5361 elif test $enable_locking = no; then
5362 cat >> confdefs.h <<\EOF
5363 #define NO_LOCKING 1
5367 echo "error: must be yes or no: --enable-locking=$enable_locking"
5373 if test \! -z "$includedir" ; then
5374 INCLUDES="-I$includedir"
5377 if test \! -z "$libdir" ; then
5378 LDFLAGS="$LDFLAGS -L$libdir"
5382 ##### should have options to override the DEPEND crap, I guess...
5389 # Done testing things -- now substitute in some stuff for the Makefiles.
5391 if test $have_motif = yes; then
5392 cat >> confdefs.h <<\EOF
5393 #define HAVE_MOTIF 1
5396 DIALOG_SRCS='$(MOTIF_SRCS)'
5397 DIALOG_OBJS='$(MOTIF_OBJS)'
5398 elif test $have_athena = yes; then
5399 cat >> confdefs.h <<\EOF
5400 #define HAVE_ATHENA 1
5403 DIALOG_SRCS='$(ATHENA_SRCS)'
5404 DIALOG_OBJS='$(ATHENA_OBJS)'
5410 if test $have_kerberos = yes; then
5411 PASSWD_SRCS='$(KERBEROS_SRCS)'
5412 PASSWD_OBJS='$(KERBEROS_OBJS)'
5414 PASSWD_SRCS='$(PWENT_SRCS)'
5415 PASSWD_OBJS='$(PWENT_OBJS)'
5418 if test $enable_locking = yes; then
5419 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
5420 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
5426 if test $need_setuid = yes; then
5428 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
5431 INSTALL_SETUID='$(INSTALL_PROGRAM)'
5435 if test $have_gl = yes; then
5436 GL_EXES='$(GL_EXES)'
5437 GL_KLUDGE_1=${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}' \'
5440 GL_KLUDGE_1=${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}'\n'
5441 GL_KLUDGE_2='!'${tab}
5474 # Print some warnings before emitting the Makefiles.
5477 warnsep=' #################################################################'
5479 if test $warning = no ; then
5480 echo '' ; echo "$warnsep" ; echo ''
5487 if test $warning = long ; then echo '' ; fi
5496 if test $was != no ; then echo '' ; fi
5505 if test $with_sgi_req = yes -a $have_sgi = no ; then
5506 warn 'The SGI saver extension was requested, but was not found.'
5509 if test $with_mit_req = yes -a $have_mit = no ; then
5510 warn 'The MIT saver extension was requested, but was not found.'
5513 if test $with_xidle_req = yes -a $have_xidle = no ; then
5514 warn 'The XIdle extension was requested, but was not found.'
5517 if test $with_xshm_req = yes -a $have_xshm = no ; then
5518 warn 'The XSHM extension was requested, but was not found.'
5521 if test $with_sgivc_req = yes -a $have_sgivc = no ; then
5522 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
5525 if test $have_motif = no -a $have_athena = no ; then
5526 warnL "Neither Motif nor Athena widgets seem to be available;"
5527 warn2 "one or the other is required."
5528 proselytize_motif=no
5530 elif test $with_motif_req = yes -a $have_motif = no ; then
5531 warnL "Use of Motif was requested, but it wasn't found;"
5532 warn2 "Athena will be used instead."
5534 elif test $with_athena_req = yes -a $have_athena = no ; then
5535 warnL "Use of Athena was requested, but it wasn't found;"
5536 warn2 "Motif will be used instead."
5539 if test $have_motif = yes -a $have_lesstif = yes ; then
5540 if test $good_lesstif != yes ; then
5541 warnL "Motif is being used, but it appears to actually be"
5542 warn2 "LessTif, and the version number is less than 0.82!"
5543 warn2 "Such old versions of LessTif are too buggy to use"
5544 warn2 "with XScreenSaver; it is strongly recommended that"
5545 warn2 "you upgrade! See <http://www.lesstif.org/>."
5549 if test $proselytize_motif = yes ; then
5550 warnL "Athena widgets are being used instead of Motif."
5551 warn2 "XScreenSaver looks much better with Motif, and has"
5552 warn2 "a few extra features as well. Wouldn't you rather"
5553 warn2 "be using Motif? It is shipped by every commercial"
5554 warn2 "Unix vendor; and there is a free implementation"
5555 warn2 "available as well: see <http://www.lesstif.org/>."
5558 if test $with_xpm_req = yes -a $have_xpm = no ; then
5559 warn 'Use of XPM was requested, but it was not found.'
5562 if test $with_gl_req = yes -a $have_gl = no ; then
5563 warn 'Use of GL was requested, but it was not found.'
5566 if test $with_readdisplay_req = yes -a $have_readdisplay = no ; then
5567 warn 'Use of XReadDisplay was requested, but it was not found.'
5570 if test $with_sgivideo_req = yes -a $have_sgivideo = no ; then
5571 warn 'Use of the Iris Video Library was requested, but it was not found.'
5574 if test $with_kerberos_req = yes -a $have_kerberos = no ; then
5575 warn 'Use of Kerberos was requested, but it was not found.'
5578 if test $with_shadow_req = yes -a $have_shadow = no ; then
5579 warn 'Use of shadow passwords was requested, but they were not found.'
5582 if test -n "$with_zippy_req"; then
5583 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
5584 warnL "$with_zippy_req was requested as the Zippy program,"
5585 warn2 "but was not found. The default will be used instead."
5589 if test $warning != no; then
5590 echo '' ; echo "$warnsep" ; echo ''
5595 cat > confcache <<\EOF
5596 # This file is a shell script that caches the results of configure
5597 # tests run on this system so they can be shared between configure
5598 # scripts and configure runs. It is not useful on other systems.
5599 # If it contains results you don't want to keep, you may remove or edit it.
5601 # By default, configure uses ./config.cache as the cache file,
5602 # creating it if it does not exist already. You can give configure
5603 # the --cache-file=FILE option to use a different cache file; that is
5604 # what configure does when it calls configure scripts in
5605 # subdirectories, so they share the cache.
5606 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5607 # config.status only pays attention to the cache file if you give it the
5608 # --recheck option to rerun configure.
5611 # The following way of writing the cache mishandles newlines in values,
5612 # but we know of no workaround that is simple, portable, and efficient.
5613 # So, don't put newlines in cache variables' values.
5614 # Ultrix sh set writes to stderr and can't be redirected directly,
5615 # and sets the high bit in the cache file unless we assign to the vars.
5617 case `(ac_space=' '; set) 2>&1` in
5619 # `set' does not quote correctly, so add quotes (double-quote substitution
5620 # turns \\\\ into \\, and sed turns \\ into \).
5622 -e "s/'/'\\\\''/g" \
5623 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5626 # `set' quotes correctly as required by POSIX, so do not add quotes.
5627 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5630 if cmp -s $cache_file confcache; then
5633 if test -w $cache_file; then
5634 echo "updating cache $cache_file"
5635 cat confcache > $cache_file
5637 echo "not updating unwritable cache $cache_file"
5642 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5644 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5645 # Let make expand exec_prefix.
5646 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5648 # Any assignment to VPATH causes Sun make to only execute
5649 # the first set of double-colon rules, so remove it if not needed.
5650 # If there is a colon in the path, we need to keep it.
5651 if test "x$srcdir" = x.; then
5652 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5655 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5657 DEFS=-DHAVE_CONFIG_H
5659 # Without the "./", some shells look in PATH for config.status.
5660 : ${CONFIG_STATUS=./config.status}
5662 echo creating $CONFIG_STATUS
5663 rm -f $CONFIG_STATUS
5664 cat > $CONFIG_STATUS <<EOF
5666 # Generated automatically by configure.
5667 # Run this file to recreate the current configuration.
5668 # This directory was configured as follows,
5669 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5671 # $0 $ac_configure_args
5673 # Compiler output produced by configure, useful for debugging
5674 # configure, is in ./config.log if it exists.
5676 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5679 case "\$ac_option" in
5680 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5681 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5682 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5683 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5684 echo "$CONFIG_STATUS generated by autoconf version 2.12"
5686 -help | --help | --hel | --he | --h)
5687 echo "\$ac_cs_usage"; exit 0 ;;
5688 *) echo "\$ac_cs_usage"; exit 1 ;;
5692 ac_given_srcdir=$srcdir
5693 ac_given_INSTALL="$INSTALL"
5695 trap 'rm -fr `echo "Makefile
5700 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5702 cat >> $CONFIG_STATUS <<EOF
5704 # Protect against being on the right side of a sed subst in config.status.
5705 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5706 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5709 s%@CFLAGS@%$CFLAGS%g
5710 s%@CPPFLAGS@%$CPPFLAGS%g
5711 s%@CXXFLAGS@%$CXXFLAGS%g
5713 s%@LDFLAGS@%$LDFLAGS%g
5715 s%@exec_prefix@%$exec_prefix%g
5716 s%@prefix@%$prefix%g
5717 s%@program_transform_name@%$program_transform_name%g
5718 s%@bindir@%$bindir%g
5719 s%@sbindir@%$sbindir%g
5720 s%@libexecdir@%$libexecdir%g
5721 s%@datadir@%$datadir%g
5722 s%@sysconfdir@%$sysconfdir%g
5723 s%@sharedstatedir@%$sharedstatedir%g
5724 s%@localstatedir@%$localstatedir%g
5725 s%@libdir@%$libdir%g
5726 s%@includedir@%$includedir%g
5727 s%@oldincludedir@%$oldincludedir%g
5728 s%@infodir@%$infodir%g
5729 s%@mandir@%$mandir%g
5731 s%@host_alias@%$host_alias%g
5732 s%@host_cpu@%$host_cpu%g
5733 s%@host_vendor@%$host_vendor%g
5734 s%@host_os@%$host_os%g
5737 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5738 s%@INSTALL_DATA@%$INSTALL_DATA%g
5739 s%@SET_MAKE@%$SET_MAKE%g
5740 s%@X_CFLAGS@%$X_CFLAGS%g
5741 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
5742 s%@X_LIBS@%$X_LIBS%g
5743 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
5745 s%@emacs_exe@%$emacs_exe%g
5746 s%@xemacs_exe@%$xemacs_exe%g
5747 s%@fortune@%$fortune%g
5748 s%@INCLUDES@%$INCLUDES%g
5749 s%@SAVER_LIBS@%$SAVER_LIBS%g
5750 s%@HACK_LIBS@%$HACK_LIBS%g
5751 s%@XPM_LIBS@%$XPM_LIBS%g
5752 s%@GL_LIBS@%$GL_LIBS%g
5753 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
5754 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
5755 s%@NEED_SETUID@%$NEED_SETUID%g
5756 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
5757 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
5758 s%@DIALOG_SRCS@%$DIALOG_SRCS%g
5759 s%@DIALOG_OBJS@%$DIALOG_OBJS%g
5760 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
5761 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
5762 s%@XMU_SRCS@%$XMU_SRCS%g
5763 s%@XMU_OBJS@%$XMU_OBJS%g
5764 s%@LOCK_SRCS@%$LOCK_SRCS%g
5765 s%@LOCK_OBJS@%$LOCK_OBJS%g
5766 s%@GL_EXES@%$GL_EXES%g
5767 s%@GL_KLUDGE_1@%$GL_KLUDGE_1%g
5768 s%@GL_KLUDGE_2@%$GL_KLUDGE_2%g
5769 s%@HACKDIR@%$HACKDIR%g
5770 s%@APPDEFAULTS@%$APPDEFAULTS%g
5771 s%@DEPEND@%$DEPEND%g
5772 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
5773 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
5778 cat >> $CONFIG_STATUS <<\EOF
5780 # Split the substitutions into bite-sized pieces for seds with
5781 # small command number limits, like on Digital OSF/1 and HP-UX.
5782 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5783 ac_file=1 # Number of current file.
5784 ac_beg=1 # First line for current file.
5785 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5788 while $ac_more_lines; do
5789 if test $ac_beg -gt 1; then
5790 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5792 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5794 if test ! -s conftest.s$ac_file; then
5796 rm -f conftest.s$ac_file
5798 if test -z "$ac_sed_cmds"; then
5799 ac_sed_cmds="sed -f conftest.s$ac_file"
5801 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5803 ac_file=`expr $ac_file + 1`
5805 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5808 if test -z "$ac_sed_cmds"; then
5813 cat >> $CONFIG_STATUS <<EOF
5815 CONFIG_FILES=\${CONFIG_FILES-"Makefile
5820 driver/XScreenSaver.ad"}
5822 cat >> $CONFIG_STATUS <<\EOF
5823 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5824 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5826 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5827 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5828 *) ac_file_in="${ac_file}.in" ;;
5831 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5833 # Remove last slash and all that follows it. Not all systems have dirname.
5834 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5835 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5836 # The file is in a subdirectory.
5837 test ! -d "$ac_dir" && mkdir "$ac_dir"
5838 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5839 # A "../" for each directory in $ac_dir_suffix.
5840 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5842 ac_dir_suffix= ac_dots=
5845 case "$ac_given_srcdir" in
5847 if test -z "$ac_dots"; then top_srcdir=.
5848 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5849 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5851 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5852 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5855 case "$ac_given_INSTALL" in
5856 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5857 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5860 echo creating "$ac_file"
5862 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5864 *Makefile*) ac_comsub="1i\\
5865 # $configure_input" ;;
5869 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5871 s%@configure_input@%$configure_input%g
5872 s%@srcdir@%$srcdir%g
5873 s%@top_srcdir@%$top_srcdir%g
5874 s%@INSTALL@%$INSTALL%g
5875 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5879 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5880 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5882 # ac_d sets the value in "#define NAME VALUE" lines.
5883 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5884 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5887 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5888 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5889 ac_uB='\([ ]\)%\1#\2define\3'
5892 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5893 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5894 ac_eB='$%\1#\2define\3'
5898 if test "${CONFIG_HEADERS+set}" != set; then
5900 cat >> $CONFIG_STATUS <<EOF
5901 CONFIG_HEADERS="config.h"
5903 cat >> $CONFIG_STATUS <<\EOF
5905 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5906 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5908 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5909 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5910 *) ac_file_in="${ac_file}.in" ;;
5913 echo creating $ac_file
5915 rm -f conftest.frag conftest.in conftest.out
5916 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5917 cat $ac_file_inputs > conftest.in
5921 # Transform confdefs.h into a sed script conftest.vals that substitutes
5922 # the proper values into config.h.in to produce config.h. And first:
5923 # Protect against being on the right side of a sed subst in config.status.
5924 # Protect against being in an unquoted here document in config.status.
5926 cat > conftest.hdr <<\EOF
5929 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5933 sed -n -f conftest.hdr confdefs.h > conftest.vals
5936 # This sed command replaces #undef with comments. This is necessary, for
5937 # example, in the case of _POSIX_SOURCE, which is predefined and required
5938 # on some systems where configure will not decide to define it.
5939 cat >> conftest.vals <<\EOF
5940 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5943 # Break up conftest.vals because some shells have a limit on
5944 # the size of here documents, and old seds have small limits too.
5949 ac_lines=`grep -c . conftest.vals`
5950 # grep -c gives empty output for an empty file on some AIX systems.
5951 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5952 # Write a limited-size here document to conftest.frag.
5953 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5954 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5956 sed -f conftest.frag conftest.in > conftest.out
5958 mv conftest.out conftest.in
5960 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5962 mv conftest.tail conftest.vals
5966 cat >> $CONFIG_STATUS <<\EOF
5967 rm -f conftest.frag conftest.h
5968 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5969 cat conftest.in >> conftest.h
5971 if cmp -s $ac_file conftest.h 2>/dev/null; then
5972 echo "$ac_file is unchanged"
5975 # Remove last slash and all that follows it. Not all systems have dirname.
5976 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5977 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5978 # The file is in a subdirectory.
5979 test ! -d "$ac_dir" && mkdir "$ac_dir"
5982 mv conftest.h $ac_file
5987 cat >> $CONFIG_STATUS <<EOF
5990 cat >> $CONFIG_STATUS <<\EOF
5994 chmod +x $CONFIG_STATUS
5995 rm -fr confdefs* $ac_clean_files
5996 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1