3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
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:
17 --enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir',
18 instead of putting them in bindir itself. You can
19 specify the name of the subdirectory. For example,
20 \`--exec-prefix=/usr/local --enable-subdir=demos'
21 would put xscreensaver in /usr/local/bin/, and would
22 put the demos in /usr/local/bin/demos/. (If DIR
23 begins with /, then bindir will not be prepended.)
25 --disable-subdir Just put the demos in \`bindir' (this is the default.)
29 Except where noted, all of the --with options below can also take a
30 directory argument: for example, --with-motif=/opt/Motif. That would
31 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
32 to be added to the -L list, assuming those directories exist.
34 X Server Extension options:
36 --with-sgi-ext Include support for the SGI SCREEN_SAVER
37 server extension, if possible (this is the default).
38 --without-sgi-ext Do not compile in support for this extension."
40 --with-mit-ext Include support for the MIT-SCREEN-SAVER
41 server extension, if possible (this is the default).
42 --without-mit-ext Do not compile in support for this extension."
44 --with-xidle-ext Include support for the XIDLE server extension,
45 if possible (this is the default).
46 --without-xidle-ext Do not compile in support for this extension."
48 --with-xshm-ext Include support for the XSHM (Shared Memory) server
49 extension, if possible (this is the default).
50 --without-xshm-ext Do not compile in support for this extension."
52 --with-xdbe-ext Include support for the DOUBLE-BUFFER server
53 extension, if possible (this is the default).
54 --without-xdbe-ext Do not compile in support for this extension."
56 --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL server
57 extension, if possible (this is the default).
58 --without-sgivc-ext Do not compile in support for this extension."
60 --with-dpms-ext Include support for the DPMS server extension,
61 if possible (this is the default).
62 --without-dpms-ext Do not compile in support for this extension."
64 --with-xf86vmode-ext Include support for XFree86 virtual screens, if
65 possible (this is the default).
66 --without-xf86vmode-ext Do not compile in support for this extension."
68 --with-proc-interrupts Include support for consulting the /proc/interrupts
69 file to notice keyboard activity, if possible.
70 --without-proc-interrupts Do not compile in support for this method."
73 X Client Toolkit options:
75 --with-motif Use the Motif toolkit for the user interface, if
76 possible (this is the default).
77 --without-motif Do not use Motif."
79 --with-athena Use the Athena toolkit for the user interface, if
80 possible (this is the default if Motif isn't used.)
81 --without-athena Do not use Athena."
84 Graphics Demo options:
86 --with-xpm Include support for XPM files in some demos,
87 if possible (this is the default).
88 --without-xpm Do not compile in support for XPM files."
90 --with-gl Build those demos which depend on OpenGL,
91 if possible (this is the default).
92 --without-gl Do not build the OpenGL demos."
94 --with-readdisplay Include support for the XReadDisplay server
95 extension if possible (this is the default).
96 --without-readdisplay Do not compile in support for this extension."
98 --with-sgivideo Include support for SGI's Iris Video Library
99 if possible (this is the default).
100 --without-sgivideo Do not compile in support for this library."
102 --with-zippy=PROGRAM Some demos are able to run an external program and
103 display its text; this names the program to use by
104 default (though it can be overridden with X
105 resources.) If you don't specify this, the default
106 is to use \"yow\" from the Emacs distribution (if you
107 have it) or else to use \"fortune\"."
110 Screen Locking options:
112 --enable-locking Compile in support for locking the display
113 (this is the default.)
114 --disable-locking Do not allow locking at all."
117 --enable-vt-locking Compile in support for locking Virtual Terminals.
118 This is the default if the system supports it, and
119 if locking support is included (--enable-locking.)
120 --disable-vt-locking Do not allow locking of VTs, even if locking is
124 --with-kerberos Include support for Kerberos authentication,
125 if possible (this is the default.)
126 --without-kerberos Do not compile in support for Kerberos."
128 --with-pam Include support for PAM (Pluggable Authentication
129 Modules) if possible (this is the default.)
130 --without-pam Do not compile in support for PAM."
132 --with-shadow Include support for shadow password authentication,
133 if possible (this is the default, if no Kerberos or
135 --without-shadow Do not compile in support for shadow passwords.
138 # Initialize some variables set by options.
139 # The variables have the same names as the options, with
140 # dashes changed to underlines.
142 cache_file=./config.cache
151 program_transform_name=s,x,x,
159 bindir='${exec_prefix}/bin'
160 sbindir='${exec_prefix}/sbin'
161 libexecdir='${exec_prefix}/libexec'
162 datadir='${prefix}/share'
163 sysconfdir='${prefix}/etc'
164 sharedstatedir='${prefix}/com'
165 localstatedir='${prefix}/var'
166 libdir='${exec_prefix}/lib'
167 includedir='${prefix}/include'
168 oldincludedir='/usr/include'
169 infodir='${prefix}/info'
170 mandir='${prefix}/man'
172 # Initialize some other variables.
175 SHELL=${CONFIG_SHELL-/bin/sh}
176 # Maximum number of lines to put in a shell here document.
183 # If the previous option needs an argument, assign it.
184 if test -n "$ac_prev"; then
185 eval "$ac_prev=\$ac_option"
191 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
195 # Accept the important Cygnus configure options, so we can diagnose typos.
199 -bindir | --bindir | --bindi | --bind | --bin | --bi)
201 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
202 bindir="$ac_optarg" ;;
204 -build | --build | --buil | --bui | --bu)
206 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
207 build="$ac_optarg" ;;
209 -cache-file | --cache-file | --cache-fil | --cache-fi \
210 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
211 ac_prev=cache_file ;;
212 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
213 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
214 cache_file="$ac_optarg" ;;
216 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
218 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
220 datadir="$ac_optarg" ;;
222 -disable-* | --disable-*)
223 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
224 # Reject names that are not valid shell variable names.
225 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
226 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
228 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
229 eval "enable_${ac_feature}=no" ;;
231 -enable-* | --enable-*)
232 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
233 # Reject names that are not valid shell variable names.
234 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
235 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
237 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
242 eval "enable_${ac_feature}='$ac_optarg'" ;;
244 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
245 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
246 | --exec | --exe | --ex)
247 ac_prev=exec_prefix ;;
248 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
249 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
250 | --exec=* | --exe=* | --ex=*)
251 exec_prefix="$ac_optarg" ;;
253 -gas | --gas | --ga | --g)
254 # Obsolete; use --with-gas.
257 -help | --help | --hel | --he)
258 # Omit some internal or obsolete options to make the list less imposing.
259 # This message is too long to be a string in the A/UX 3.1 sh.
261 Usage: configure [options] [host]
262 Options: [defaults in brackets after descriptions]
266 --cache-file=FILE cache test results in FILE
267 --help print this message
268 --no-create do not create output files
269 --quiet, --silent do not print \`checking...' messages
270 --version print the version of autoconf that created configure
272 Directory and file names:
274 --prefix=PREFIX install architecture-independent files in PREFIX
276 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
278 --bindir=DIR user executables in DIR [EPREFIX/bin]
279 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
280 --includedir=DIR C header files in DIR [PREFIX/include]
281 --x-includes=DIR X include files are in DIR
282 --x-libraries=DIR X library files are in DIR
283 --mandir=DIR man documentation in DIR [PREFIX/man]
284 --srcdir=DIR find the sources in DIR [configure dir or ..]
285 --program-prefix=PREFIX prepend PREFIX to installed program names
286 --program-suffix=SUFFIX append SUFFIX to installed program names
287 --program-transform-name=PROGRAM
288 run sed PROGRAM on installed program names
294 --build=BUILD configure for building on BUILD [BUILD=HOST]
295 --host=HOST configure for HOST [guessed]
296 --target=TARGET configure for TARGET [TARGET=HOST]
298 if test -n "$ac_help"; then
303 -host | --host | --hos | --ho)
305 -host=* | --host=* | --hos=* | --ho=*)
308 -includedir | --includedir | --includedi | --included | --include \
309 | --includ | --inclu | --incl | --inc)
310 ac_prev=includedir ;;
311 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
312 | --includ=* | --inclu=* | --incl=* | --inc=*)
313 includedir="$ac_optarg" ;;
315 -infodir | --infodir | --infodi | --infod | --info | --inf)
317 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
318 infodir="$ac_optarg" ;;
320 -libdir | --libdir | --libdi | --libd)
322 -libdir=* | --libdir=* | --libdi=* | --libd=*)
323 libdir="$ac_optarg" ;;
325 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
326 | --libexe | --libex | --libe)
327 ac_prev=libexecdir ;;
328 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
329 | --libexe=* | --libex=* | --libe=*)
330 libexecdir="$ac_optarg" ;;
332 -localstatedir | --localstatedir | --localstatedi | --localstated \
333 | --localstate | --localstat | --localsta | --localst \
334 | --locals | --local | --loca | --loc | --lo)
335 ac_prev=localstatedir ;;
336 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
337 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
338 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
339 localstatedir="$ac_optarg" ;;
341 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
343 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
344 mandir="$ac_optarg" ;;
347 # Obsolete; use --without-fp.
350 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
354 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
355 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
358 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
359 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
360 | --oldin | --oldi | --old | --ol | --o)
361 ac_prev=oldincludedir ;;
362 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
363 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
364 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
365 oldincludedir="$ac_optarg" ;;
367 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
369 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
370 prefix="$ac_optarg" ;;
372 -program-prefix | --program-prefix | --program-prefi | --program-pref \
373 | --program-pre | --program-pr | --program-p)
374 ac_prev=program_prefix ;;
375 -program-prefix=* | --program-prefix=* | --program-prefi=* \
376 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
377 program_prefix="$ac_optarg" ;;
379 -program-suffix | --program-suffix | --program-suffi | --program-suff \
380 | --program-suf | --program-su | --program-s)
381 ac_prev=program_suffix ;;
382 -program-suffix=* | --program-suffix=* | --program-suffi=* \
383 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
384 program_suffix="$ac_optarg" ;;
386 -program-transform-name | --program-transform-name \
387 | --program-transform-nam | --program-transform-na \
388 | --program-transform-n | --program-transform- \
389 | --program-transform | --program-transfor \
390 | --program-transfo | --program-transf \
391 | --program-trans | --program-tran \
392 | --progr-tra | --program-tr | --program-t)
393 ac_prev=program_transform_name ;;
394 -program-transform-name=* | --program-transform-name=* \
395 | --program-transform-nam=* | --program-transform-na=* \
396 | --program-transform-n=* | --program-transform-=* \
397 | --program-transform=* | --program-transfor=* \
398 | --program-transfo=* | --program-transf=* \
399 | --program-trans=* | --program-tran=* \
400 | --progr-tra=* | --program-tr=* | --program-t=*)
401 program_transform_name="$ac_optarg" ;;
403 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
404 | -silent | --silent | --silen | --sile | --sil)
407 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
409 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
411 sbindir="$ac_optarg" ;;
413 -sharedstatedir | --sharedstatedir | --sharedstatedi \
414 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
415 | --sharedst | --shareds | --shared | --share | --shar \
417 ac_prev=sharedstatedir ;;
418 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
419 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
420 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
422 sharedstatedir="$ac_optarg" ;;
424 -site | --site | --sit)
426 -site=* | --site=* | --sit=*)
429 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
431 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
432 srcdir="$ac_optarg" ;;
434 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
435 | --syscon | --sysco | --sysc | --sys | --sy)
436 ac_prev=sysconfdir ;;
437 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
438 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
439 sysconfdir="$ac_optarg" ;;
441 -target | --target | --targe | --targ | --tar | --ta | --t)
443 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
444 target="$ac_optarg" ;;
446 -v | -verbose | --verbose | --verbos | --verbo | --verb)
449 -version | --version | --versio | --versi | --vers)
450 echo "configure generated by autoconf version 2.13"
454 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
455 # Reject names that are not valid shell variable names.
456 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
457 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
459 ac_package=`echo $ac_package| sed 's/-/_/g'`
464 eval "with_${ac_package}='$ac_optarg'" ;;
466 -without-* | --without-*)
467 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
468 # Reject names that are not valid shell variable names.
469 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
470 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
472 ac_package=`echo $ac_package| sed 's/-/_/g'`
473 eval "with_${ac_package}=no" ;;
476 # Obsolete; use --with-x.
479 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
480 | --x-incl | --x-inc | --x-in | --x-i)
481 ac_prev=x_includes ;;
482 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
483 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
484 x_includes="$ac_optarg" ;;
486 -x-libraries | --x-libraries | --x-librarie | --x-librari \
487 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
488 ac_prev=x_libraries ;;
489 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
490 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
491 x_libraries="$ac_optarg" ;;
493 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
497 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
498 echo "configure: warning: $ac_option: invalid host type" 1>&2
500 if test "x$nonopt" != xNONE; then
501 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
509 if test -n "$ac_prev"; then
510 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
513 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
515 # File descriptor usage:
518 # 2 errors and warnings
519 # 3 some systems may open it to /dev/tty
520 # 4 used on the Kubota Titan
521 # 6 checking for... messages and results
522 # 5 compiler messages saved in config.log
523 if test "$silent" = yes; then
531 This file contains any messages produced by compilers while
532 running configure, to aid debugging if configure makes a mistake.
535 # Strip out --no-create and --no-recursion so they do not pile up.
536 # Also quote any args containing shell metacharacters.
541 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
542 | --no-cr | --no-c) ;;
543 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
544 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
545 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
546 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
547 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
552 # Only set these to C if already set. These must not be set unconditionally
553 # because not all systems understand e.g. LANG=C (notably SCO).
554 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
555 # Non-C LC_CTYPE values break the ctype check.
556 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
557 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
558 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
559 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
561 # confdefs.h avoids OS command line length limits that DEFS can exceed.
562 rm -rf conftest* confdefs.h
563 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
566 # A filename unique to this package, relative to the directory that
567 # configure is in, which we can look for to find out if srcdir is correct.
568 ac_unique_file=driver/subprocs.c
570 # Find the source files, if location was not specified.
571 if test -z "$srcdir"; then
572 ac_srcdir_defaulted=yes
573 # Try the directory containing this script, then its parent.
575 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
576 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
578 if test ! -r $srcdir/$ac_unique_file; then
582 ac_srcdir_defaulted=no
584 if test ! -r $srcdir/$ac_unique_file; then
585 if test "$ac_srcdir_defaulted" = yes; then
586 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
588 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
591 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
593 # Prefer explicitly selected file to automatically selected ones.
594 if test -z "$CONFIG_SITE"; then
595 if test "x$prefix" != xNONE; then
596 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
598 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
601 for ac_site_file in $CONFIG_SITE; do
602 if test -r "$ac_site_file"; then
603 echo "loading site script $ac_site_file"
608 if test -r "$cache_file"; then
609 echo "loading cache $cache_file"
612 echo "creating cache $cache_file"
617 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
618 ac_cpp='$CPP $CPPFLAGS'
619 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
620 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
621 cross_compiling=$ac_cv_prog_cc_cross
625 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
626 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
627 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
634 ac_n= ac_c='\c' ac_t=
639 echo "current directory: `pwd`"
640 echo "command line was: $0 $@"
644 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
645 if test -f $ac_dir/install-sh; then
647 ac_install_sh="$ac_aux_dir/install-sh -c"
649 elif test -f $ac_dir/install.sh; then
651 ac_install_sh="$ac_aux_dir/install.sh -c"
655 if test -z "$ac_aux_dir"; then
656 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
658 ac_config_guess=$ac_aux_dir/config.guess
659 ac_config_sub=$ac_aux_dir/config.sub
660 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
663 # Make sure we can run config.sub.
664 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
665 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
668 echo $ac_n "checking host system type""... $ac_c" 1>&6
669 echo "configure:681: checking host system type" >&5
672 case "$host_alias" in
676 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
677 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
679 *) host_alias=$nonopt ;;
683 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
684 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
685 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
686 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
687 echo "$ac_t""$host" 1>&6
690 # Extract the first word of "gcc", so it can be a program name with args.
691 set dummy gcc; ac_word=$2
692 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
693 echo "configure:705: checking for $ac_word" >&5
694 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
695 echo $ac_n "(cached) $ac_c" 1>&6
697 if test -n "$CC"; then
698 ac_cv_prog_CC="$CC" # Let the user override the test.
700 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
702 for ac_dir in $ac_dummy; do
703 test -z "$ac_dir" && ac_dir=.
704 if test -f $ac_dir/$ac_word; then
713 if test -n "$CC"; then
714 echo "$ac_t""$CC" 1>&6
716 echo "$ac_t""no" 1>&6
719 if test -z "$CC"; then
720 # Extract the first word of "cc", so it can be a program name with args.
721 set dummy cc; ac_word=$2
722 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
723 echo "configure:735: checking for $ac_word" >&5
724 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
725 echo $ac_n "(cached) $ac_c" 1>&6
727 if test -n "$CC"; then
728 ac_cv_prog_CC="$CC" # Let the user override the test.
730 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
733 for ac_dir in $ac_dummy; do
734 test -z "$ac_dir" && ac_dir=.
735 if test -f $ac_dir/$ac_word; then
736 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
745 if test $ac_prog_rejected = yes; then
746 # We found a bogon in the path, so make sure we never use it.
747 set dummy $ac_cv_prog_CC
749 if test $# -gt 0; then
750 # We chose a different compiler from the bogus one.
751 # However, it has the same basename, so the bogon will be chosen
752 # first if we set CC to just the basename; use the full file name.
754 set dummy "$ac_dir/$ac_word" "$@"
762 if test -n "$CC"; then
763 echo "$ac_t""$CC" 1>&6
765 echo "$ac_t""no" 1>&6
768 if test -z "$CC"; then
771 # Extract the first word of "cl", so it can be a program name with args.
772 set dummy cl; ac_word=$2
773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
774 echo "configure:786: checking for $ac_word" >&5
775 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
778 if test -n "$CC"; then
779 ac_cv_prog_CC="$CC" # Let the user override the test.
781 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
783 for ac_dir in $ac_dummy; do
784 test -z "$ac_dir" && ac_dir=.
785 if test -f $ac_dir/$ac_word; then
794 if test -n "$CC"; then
795 echo "$ac_t""$CC" 1>&6
797 echo "$ac_t""no" 1>&6
802 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
805 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
806 echo "configure:818: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810 ac_cpp='$CPP $CPPFLAGS'
811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813 cross_compiling=$ac_cv_prog_cc_cross
815 cat > conftest.$ac_ext << EOF
817 #line 829 "configure"
818 #include "confdefs.h"
822 if { (eval echo configure:834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
823 ac_cv_prog_cc_works=yes
824 # If we can't run a trivial program, we are probably using a cross compiler.
825 if (./conftest; exit) 2>/dev/null; then
826 ac_cv_prog_cc_cross=no
828 ac_cv_prog_cc_cross=yes
831 echo "configure: failed program was:" >&5
832 cat conftest.$ac_ext >&5
833 ac_cv_prog_cc_works=no
837 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
838 ac_cpp='$CPP $CPPFLAGS'
839 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
840 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
841 cross_compiling=$ac_cv_prog_cc_cross
843 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
844 if test $ac_cv_prog_cc_works = no; then
845 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
847 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
848 echo "configure:860: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
849 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
850 cross_compiling=$ac_cv_prog_cc_cross
852 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
853 echo "configure:865: checking whether we are using GNU C" >&5
854 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
855 echo $ac_n "(cached) $ac_c" 1>&6
857 cat > conftest.c <<EOF
862 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
869 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
871 if test $ac_cv_prog_gcc = yes; then
877 ac_test_CFLAGS="${CFLAGS+set}"
878 ac_save_CFLAGS="$CFLAGS"
880 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
881 echo "configure:893: checking whether ${CC-cc} accepts -g" >&5
882 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
883 echo $ac_n "(cached) $ac_c" 1>&6
885 echo 'void f(){}' > conftest.c
886 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
895 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
896 if test "$ac_test_CFLAGS" = set; then
897 CFLAGS="$ac_save_CFLAGS"
898 elif test $ac_cv_prog_cc_g = yes; then
899 if test "$GCC" = yes; then
905 if test "$GCC" = yes; then
913 if test -z "$GCC"; then
914 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
915 echo "configure:927: checking how to request ANSI compilation" >&5
918 echo "$ac_t""HPUX: adding -Ae" 1>&6
922 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
923 CC="$CC -qlanglvl=ansi -qhalt=e"
927 echo "$ac_t""DEC: adding -std1" 1>&6
932 echo "$ac_t""no idea" 1>&6
938 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
939 echo "configure:951: checking whether the compiler works on ANSI C" >&5
940 if test "$cross_compiling" = yes; then
941 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
943 cat > conftest.$ac_ext <<EOF
944 #line 956 "configure"
945 #include "confdefs.h"
946 main(int ac, char **av) { return 0; }
948 if { (eval echo configure:960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
950 echo "$ac_t""yes" 1>&6
952 echo "configure: failed program was:" >&5
953 cat conftest.$ac_ext >&5
955 echo "$ac_t""no" 1>&6
956 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
963 *-irix5* |*-irix6.0-3* )
964 if test -n "$GCC"; then
965 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
966 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
969 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
970 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
975 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
976 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
980 # if test -z "$GCC"; then
981 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
982 # CC="$CC -migrate -w0 -verbose -warnprotos"
989 # Try and determine whether ${INSTALL} can create intermediate directories,
990 # and if not, whether "mkdir -p" works instead. This sets ${INSTALL_DIRS}.
991 # (But autoconf should earn its keep and do this for us!)
996 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
997 echo "configure:1009: checking how to run the C preprocessor" >&5
998 # On Suns, sometimes $CPP names a directory.
999 if test -n "$CPP" && test -d "$CPP"; then
1002 if test -z "$CPP"; then
1003 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1004 echo $ac_n "(cached) $ac_c" 1>&6
1006 # This must be in double quotes, not single quotes, because CPP may get
1007 # substituted into the Makefile and "${CC-cc}" will confuse make.
1009 # On the NeXT, cc -E runs the code through the compiler's parser,
1010 # not just through cpp.
1011 cat > conftest.$ac_ext <<EOF
1012 #line 1024 "configure"
1013 #include "confdefs.h"
1017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1018 { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1020 if test -z "$ac_err"; then
1024 echo "configure: failed program was:" >&5
1025 cat conftest.$ac_ext >&5
1027 CPP="${CC-cc} -E -traditional-cpp"
1028 cat > conftest.$ac_ext <<EOF
1029 #line 1041 "configure"
1030 #include "confdefs.h"
1034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1035 { (eval echo configure:1047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1037 if test -z "$ac_err"; then
1041 echo "configure: failed program was:" >&5
1042 cat conftest.$ac_ext >&5
1044 CPP="${CC-cc} -nologo -E"
1045 cat > conftest.$ac_ext <<EOF
1046 #line 1058 "configure"
1047 #include "confdefs.h"
1051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1052 { (eval echo configure:1064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1054 if test -z "$ac_err"; then
1058 echo "configure: failed program was:" >&5
1059 cat conftest.$ac_ext >&5
1068 ac_cv_prog_CPP="$CPP"
1070 CPP="$ac_cv_prog_CPP"
1072 ac_cv_prog_CPP="$CPP"
1074 echo "$ac_t""$CPP" 1>&6
1076 # Find a good install program. We prefer a C program (faster),
1077 # so one script is as good as another. But avoid the broken or
1078 # incompatible versions:
1079 # SysV /etc/install, /usr/sbin/install
1080 # SunOS /usr/etc/install
1081 # IRIX /sbin/install
1083 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1084 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1085 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1086 # ./install, which can be erroneously created by make from ./install.sh.
1087 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1088 echo "configure:1100: checking for a BSD compatible install" >&5
1089 if test -z "$INSTALL"; then
1090 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1091 echo $ac_n "(cached) $ac_c" 1>&6
1093 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1094 for ac_dir in $PATH; do
1095 # Account for people who put trailing slashes in PATH elements.
1097 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1099 # OSF1 and SCO ODT 3.0 have their own names for install.
1100 # Don't use installbsd from OSF since it installs stuff as root
1102 for ac_prog in ginstall scoinst install; do
1103 if test -f $ac_dir/$ac_prog; then
1104 if test $ac_prog = install &&
1105 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1106 # AIX install. It has an incompatible calling convention.
1109 ac_cv_path_install="$ac_dir/$ac_prog -c"
1120 if test "${ac_cv_path_install+set}" = set; then
1121 INSTALL="$ac_cv_path_install"
1123 # As a last resort, use the slow shell script. We don't cache a
1124 # path for INSTALL within a source directory, because that will
1125 # break other packages using the cache if that directory is
1126 # removed, or if the path is relative.
1127 INSTALL="$ac_install_sh"
1130 echo "$ac_t""$INSTALL" 1>&6
1132 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1133 # It thinks the first close brace ends the variable substitution.
1134 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1136 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1138 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1140 INSTALL_DIRS='${INSTALL} -d'
1141 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1142 echo "configure:1154: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1144 if mkdir conftestdir; then
1147 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1148 if test -d dir1/dir2 ; then
1149 echo "$ac_t""yes" 1>&6
1151 echo "$ac_t""no" 1>&6
1152 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1153 echo "configure:1165: checking whether \"mkdir -p\" creates intermediate directories" >&5
1155 mkdir -p dir1/dir2 >&- 2>&-
1156 if test -d dir1/dir2/. ; then
1157 echo "$ac_t""yes" 1>&6
1158 INSTALL_DIRS='mkdir -p'
1160 echo "$ac_t""no" 1>&6
1167 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1168 echo "configure:1180: checking whether ${MAKE-make} sets \${MAKE}" >&5
1169 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1170 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1173 cat > conftestmake <<\EOF
1175 @echo 'ac_maketemp="${MAKE}"'
1177 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1178 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1179 if test -n "$ac_maketemp"; then
1180 eval ac_cv_prog_make_${ac_make}_set=yes
1182 eval ac_cv_prog_make_${ac_make}_set=no
1186 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1187 echo "$ac_t""yes" 1>&6
1190 echo "$ac_t""no" 1>&6
1191 SET_MAKE="MAKE=${MAKE-make}"
1195 echo $ac_n "checking for working const""... $ac_c" 1>&6
1196 echo "configure:1208: checking for working const" >&5
1197 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1198 echo $ac_n "(cached) $ac_c" 1>&6
1200 cat > conftest.$ac_ext <<EOF
1201 #line 1213 "configure"
1202 #include "confdefs.h"
1206 /* Ultrix mips cc rejects this. */
1207 typedef int charset[2]; const charset x;
1208 /* SunOS 4.1.1 cc rejects this. */
1209 char const *const *ccp;
1211 /* NEC SVR4.0.2 mips cc rejects this. */
1212 struct point {int x, y;};
1213 static struct point const zero = {0,0};
1214 /* AIX XL C 1.02.0.0 rejects this.
1215 It does not let you subtract one const X* pointer from another in an arm
1216 of an if-expression whose if-part is not a constant expression */
1217 const char *g = "string";
1218 ccp = &g + (g ? g-g : 0);
1219 /* HPUX 7.0 cc rejects these. */
1222 ccp = (char const *const *) p;
1223 { /* SCO 3.2v4 cc rejects this. */
1225 char const *s = 0 ? (char *) 0 : (char const *) 0;
1229 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1231 const int *foo = &x[0];
1234 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1235 typedef const int *iptr;
1239 { /* AIX XL C 1.02.0.0 rejects this saying
1240 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1241 struct s { int j; const int *ap[3]; };
1242 struct s *b; b->j = 5;
1244 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1250 if { (eval echo configure:1262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1254 echo "configure: failed program was:" >&5
1255 cat conftest.$ac_ext >&5
1262 echo "$ac_t""$ac_cv_c_const" 1>&6
1263 if test $ac_cv_c_const = no; then
1264 cat >> confdefs.h <<\EOF
1270 echo $ac_n "checking for inline""... $ac_c" 1>&6
1271 echo "configure:1283: checking for inline" >&5
1272 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1273 echo $ac_n "(cached) $ac_c" 1>&6
1276 for ac_kw in inline __inline__ __inline; do
1277 cat > conftest.$ac_ext <<EOF
1278 #line 1290 "configure"
1279 #include "confdefs.h"
1285 if { (eval echo configure:1297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1287 ac_cv_c_inline=$ac_kw; break
1289 echo "configure: failed program was:" >&5
1290 cat conftest.$ac_ext >&5
1297 echo "$ac_t""$ac_cv_c_inline" 1>&6
1298 case "$ac_cv_c_inline" in
1300 no) cat >> confdefs.h <<\EOF
1304 *) cat >> confdefs.h <<EOF
1305 #define inline $ac_cv_c_inline
1311 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1312 echo "configure:1324: checking for ANSI C header files" >&5
1313 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1314 echo $ac_n "(cached) $ac_c" 1>&6
1316 cat > conftest.$ac_ext <<EOF
1317 #line 1329 "configure"
1318 #include "confdefs.h"
1324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1325 { (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1327 if test -z "$ac_err"; then
1329 ac_cv_header_stdc=yes
1332 echo "configure: failed program was:" >&5
1333 cat conftest.$ac_ext >&5
1335 ac_cv_header_stdc=no
1339 if test $ac_cv_header_stdc = yes; then
1340 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1341 cat > conftest.$ac_ext <<EOF
1342 #line 1354 "configure"
1343 #include "confdefs.h"
1346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1347 egrep "memchr" >/dev/null 2>&1; then
1351 ac_cv_header_stdc=no
1357 if test $ac_cv_header_stdc = yes; then
1358 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1359 cat > conftest.$ac_ext <<EOF
1360 #line 1372 "configure"
1361 #include "confdefs.h"
1364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1365 egrep "free" >/dev/null 2>&1; then
1369 ac_cv_header_stdc=no
1375 if test $ac_cv_header_stdc = yes; then
1376 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1377 if test "$cross_compiling" = yes; then
1380 cat > conftest.$ac_ext <<EOF
1381 #line 1393 "configure"
1382 #include "confdefs.h"
1384 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1385 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1386 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1387 int main () { int i; for (i = 0; i < 256; i++)
1388 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1392 if { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1396 echo "configure: failed program was:" >&5
1397 cat conftest.$ac_ext >&5
1399 ac_cv_header_stdc=no
1407 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1408 if test $ac_cv_header_stdc = yes; then
1409 cat >> confdefs.h <<\EOF
1410 #define STDC_HEADERS 1
1415 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1416 echo "configure:1428: checking whether time.h and sys/time.h may both be included" >&5
1417 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1418 echo $ac_n "(cached) $ac_c" 1>&6
1420 cat > conftest.$ac_ext <<EOF
1421 #line 1433 "configure"
1422 #include "confdefs.h"
1423 #include <sys/types.h>
1424 #include <sys/time.h>
1430 if { (eval echo configure:1442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1432 ac_cv_header_time=yes
1434 echo "configure: failed program was:" >&5
1435 cat conftest.$ac_ext >&5
1437 ac_cv_header_time=no
1442 echo "$ac_t""$ac_cv_header_time" 1>&6
1443 if test $ac_cv_header_time = yes; then
1444 cat >> confdefs.h <<\EOF
1445 #define TIME_WITH_SYS_TIME 1
1450 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1451 echo "configure:1463: checking for sys/wait.h that is POSIX.1 compatible" >&5
1452 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1453 echo $ac_n "(cached) $ac_c" 1>&6
1455 cat > conftest.$ac_ext <<EOF
1456 #line 1468 "configure"
1457 #include "confdefs.h"
1458 #include <sys/types.h>
1459 #include <sys/wait.h>
1461 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1464 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1469 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1472 if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1474 ac_cv_header_sys_wait_h=yes
1476 echo "configure: failed program was:" >&5
1477 cat conftest.$ac_ext >&5
1479 ac_cv_header_sys_wait_h=no
1484 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1485 if test $ac_cv_header_sys_wait_h = yes; then
1486 cat >> confdefs.h <<\EOF
1487 #define HAVE_SYS_WAIT_H 1
1493 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1496 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1497 echo "configure:1509: checking for $ac_hdr that defines DIR" >&5
1498 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1499 echo $ac_n "(cached) $ac_c" 1>&6
1501 cat > conftest.$ac_ext <<EOF
1502 #line 1514 "configure"
1503 #include "confdefs.h"
1504 #include <sys/types.h>
1510 if { (eval echo configure:1522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1512 eval "ac_cv_header_dirent_$ac_safe=yes"
1514 echo "configure: failed program was:" >&5
1515 cat conftest.$ac_ext >&5
1517 eval "ac_cv_header_dirent_$ac_safe=no"
1521 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1522 echo "$ac_t""yes" 1>&6
1523 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1524 cat >> confdefs.h <<EOF
1525 #define $ac_tr_hdr 1
1527 ac_header_dirent=$ac_hdr; break
1529 echo "$ac_t""no" 1>&6
1532 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1533 if test $ac_header_dirent = dirent.h; then
1534 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1535 echo "configure:1547: checking for opendir in -ldir" >&5
1536 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1538 echo $ac_n "(cached) $ac_c" 1>&6
1540 ac_save_LIBS="$LIBS"
1542 cat > conftest.$ac_ext <<EOF
1543 #line 1555 "configure"
1544 #include "confdefs.h"
1545 /* Override any gcc2 internal prototype to avoid an error. */
1546 /* We use char because int might match the return type of a gcc2
1547 builtin and then its argument prototype would still apply. */
1554 if { (eval echo configure:1566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1556 eval "ac_cv_lib_$ac_lib_var=yes"
1558 echo "configure: failed program was:" >&5
1559 cat conftest.$ac_ext >&5
1561 eval "ac_cv_lib_$ac_lib_var=no"
1564 LIBS="$ac_save_LIBS"
1567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1568 echo "$ac_t""yes" 1>&6
1571 echo "$ac_t""no" 1>&6
1575 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1576 echo "configure:1588: checking for opendir in -lx" >&5
1577 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1578 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1579 echo $ac_n "(cached) $ac_c" 1>&6
1581 ac_save_LIBS="$LIBS"
1583 cat > conftest.$ac_ext <<EOF
1584 #line 1596 "configure"
1585 #include "confdefs.h"
1586 /* Override any gcc2 internal prototype to avoid an error. */
1587 /* We use char because int might match the return type of a gcc2
1588 builtin and then its argument prototype would still apply. */
1595 if { (eval echo configure:1607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1597 eval "ac_cv_lib_$ac_lib_var=yes"
1599 echo "configure: failed program was:" >&5
1600 cat conftest.$ac_ext >&5
1602 eval "ac_cv_lib_$ac_lib_var=no"
1605 LIBS="$ac_save_LIBS"
1608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1609 echo "$ac_t""yes" 1>&6
1612 echo "$ac_t""no" 1>&6
1618 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1619 echo "configure:1631: checking for mode_t" >&5
1620 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1621 echo $ac_n "(cached) $ac_c" 1>&6
1623 cat > conftest.$ac_ext <<EOF
1624 #line 1636 "configure"
1625 #include "confdefs.h"
1626 #include <sys/types.h>
1632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1633 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1635 ac_cv_type_mode_t=yes
1638 ac_cv_type_mode_t=no
1643 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1644 if test $ac_cv_type_mode_t = no; then
1645 cat >> confdefs.h <<\EOF
1651 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1652 echo "configure:1664: checking for pid_t" >&5
1653 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1654 echo $ac_n "(cached) $ac_c" 1>&6
1656 cat > conftest.$ac_ext <<EOF
1657 #line 1669 "configure"
1658 #include "confdefs.h"
1659 #include <sys/types.h>
1665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1666 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1668 ac_cv_type_pid_t=yes
1676 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1677 if test $ac_cv_type_pid_t = no; then
1678 cat >> confdefs.h <<\EOF
1684 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1685 echo "configure:1697: checking for size_t" >&5
1686 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1687 echo $ac_n "(cached) $ac_c" 1>&6
1689 cat > conftest.$ac_ext <<EOF
1690 #line 1702 "configure"
1691 #include "confdefs.h"
1692 #include <sys/types.h>
1698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1699 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1701 ac_cv_type_size_t=yes
1704 ac_cv_type_size_t=no
1709 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1710 if test $ac_cv_type_size_t = no; then
1711 cat >> confdefs.h <<\EOF
1712 #define size_t unsigned
1717 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1718 echo "configure:1730: checking return type of signal handlers" >&5
1719 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1720 echo $ac_n "(cached) $ac_c" 1>&6
1722 cat > conftest.$ac_ext <<EOF
1723 #line 1735 "configure"
1724 #include "confdefs.h"
1725 #include <sys/types.h>
1731 extern "C" void (*signal (int, void (*)(int)))(int);
1733 void (*signal ()) ();
1740 if { (eval echo configure:1752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1742 ac_cv_type_signal=void
1744 echo "configure: failed program was:" >&5
1745 cat conftest.$ac_ext >&5
1747 ac_cv_type_signal=int
1752 echo "$ac_t""$ac_cv_type_signal" 1>&6
1753 cat >> confdefs.h <<EOF
1754 #define RETSIGTYPE $ac_cv_type_signal
1759 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1760 echo "configure:1772: checking how to call gettimeofday" >&5
1761 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1762 echo $ac_n "(cached) $ac_c" 1>&6
1764 cat > conftest.$ac_ext <<EOF
1765 #line 1777 "configure"
1766 #include "confdefs.h"
1768 #include <sys/time.h>
1770 struct timeval tv; struct timezone tzp;
1771 gettimeofday(&tv, &tzp);
1774 if { (eval echo configure:1786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1776 ac_gettimeofday_args=2
1778 echo "configure: failed program was:" >&5
1779 cat conftest.$ac_ext >&5
1781 cat > conftest.$ac_ext <<EOF
1782 #line 1794 "configure"
1783 #include "confdefs.h"
1785 #include <sys/time.h>
1787 struct timeval tv; gettimeofday(&tv);
1790 if { (eval echo configure:1802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1792 ac_gettimeofday_args=1
1794 echo "configure: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1797 ac_gettimeofday_args=0
1802 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1805 ac_gettimeofday_args=$ac_cv_gettimeofday_args
1806 if test "$ac_gettimeofday_args" = 1 ; then
1807 cat >> confdefs.h <<\EOF
1808 #define HAVE_GETTIMEOFDAY 1
1811 echo "$ac_t""one argument" 1>&6
1812 elif test "$ac_gettimeofday_args" = 2 ; then
1813 cat >> confdefs.h <<\EOF
1814 #define HAVE_GETTIMEOFDAY 1
1817 cat >> confdefs.h <<\EOF
1818 #define GETTIMEOFDAY_TWO_ARGS 1
1821 echo "$ac_t""two arguments" 1>&6
1823 echo "$ac_t""unknown" 1>&6
1827 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
1829 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1830 echo "configure:1842: checking for $ac_func" >&5
1831 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1832 echo $ac_n "(cached) $ac_c" 1>&6
1834 cat > conftest.$ac_ext <<EOF
1835 #line 1847 "configure"
1836 #include "confdefs.h"
1837 /* System header to define __stub macros and hopefully few prototypes,
1838 which can conflict with char $ac_func(); below. */
1840 /* Override any gcc2 internal prototype to avoid an error. */
1841 /* We use char because int might match the return type of a gcc2
1842 builtin and then its argument prototype would still apply. */
1847 /* The GNU C library defines this for functions which it implements
1848 to always fail with ENOSYS. Some functions are actually named
1849 something starting with __ and the normal name is an alias. */
1850 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1858 if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1860 eval "ac_cv_func_$ac_func=yes"
1862 echo "configure: failed program was:" >&5
1863 cat conftest.$ac_ext >&5
1865 eval "ac_cv_func_$ac_func=no"
1870 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1871 echo "$ac_t""yes" 1>&6
1872 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1873 cat >> confdefs.h <<EOF
1874 #define $ac_tr_func 1
1878 echo "$ac_t""no" 1>&6
1882 for ac_func in sigaction syslog
1884 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1885 echo "configure:1897: checking for $ac_func" >&5
1886 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1887 echo $ac_n "(cached) $ac_c" 1>&6
1889 cat > conftest.$ac_ext <<EOF
1890 #line 1902 "configure"
1891 #include "confdefs.h"
1892 /* System header to define __stub macros and hopefully few prototypes,
1893 which can conflict with char $ac_func(); below. */
1895 /* Override any gcc2 internal prototype to avoid an error. */
1896 /* We use char because int might match the return type of a gcc2
1897 builtin and then its argument prototype would still apply. */
1902 /* The GNU C library defines this for functions which it implements
1903 to always fail with ENOSYS. Some functions are actually named
1904 something starting with __ and the normal name is an alias. */
1905 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1913 if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1915 eval "ac_cv_func_$ac_func=yes"
1917 echo "configure: failed program was:" >&5
1918 cat conftest.$ac_ext >&5
1920 eval "ac_cv_func_$ac_func=no"
1925 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1926 echo "$ac_t""yes" 1>&6
1927 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1928 cat >> confdefs.h <<EOF
1929 #define $ac_tr_func 1
1933 echo "$ac_t""no" 1>&6
1938 for ac_hdr in unistd.h crypt.h sys/select.h
1940 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1941 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1942 echo "configure:1954: checking for $ac_hdr" >&5
1943 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1944 echo $ac_n "(cached) $ac_c" 1>&6
1946 cat > conftest.$ac_ext <<EOF
1947 #line 1959 "configure"
1948 #include "confdefs.h"
1951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1952 { (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1954 if test -z "$ac_err"; then
1956 eval "ac_cv_header_$ac_safe=yes"
1959 echo "configure: failed program was:" >&5
1960 cat conftest.$ac_ext >&5
1962 eval "ac_cv_header_$ac_safe=no"
1966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1967 echo "$ac_t""yes" 1>&6
1968 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1969 cat >> confdefs.h <<EOF
1970 #define $ac_tr_hdr 1
1974 echo "$ac_t""no" 1>&6
1981 # Check whether --enable-subdir or --disable-subdir was given.
1982 if test "${enable_subdir+set}" = set; then
1983 enableval="$enable_subdir"
1984 enable_subdir="$enableval"
1989 if test x"$enable_subdir" = xno; then
1991 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
1992 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
1995 # there must be a better way than this...
1996 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
1998 HACKDIR=$enable_subdir
2001 HACKDIR='${bindir}/'$enable_subdir
2005 # canonicalize slashes.
2006 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
2009 # If we find X, set shell vars x_includes and x_libraries to the
2010 # paths, otherwise set no_x=yes.
2011 # Uses ac_ vars as temps to allow command line to override cache and checks.
2012 # --without-x overrides everything else, but does not touch the cache.
2013 echo $ac_n "checking for X""... $ac_c" 1>&6
2014 echo "configure:2026: checking for X" >&5
2016 # Check whether --with-x or --without-x was given.
2017 if test "${with_x+set}" = set; then
2022 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2023 if test "x$with_x" = xno; then
2024 # The user explicitly disabled X.
2027 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2028 # Both variables are already set.
2031 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2032 echo $ac_n "(cached) $ac_c" 1>&6
2034 # One or both of the vars are not set, and there is no cached value.
2035 ac_x_includes=NO ac_x_libraries=NO
2037 if mkdir conftestdir; then
2039 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2040 cat > Imakefile <<'EOF'
2042 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2044 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2045 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2046 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2047 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2048 for ac_extension in a so sl; do
2049 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2050 test -f $ac_im_libdir/libX11.$ac_extension; then
2051 ac_im_usrlibdir=$ac_im_libdir; break
2054 # Screen out bogus values from the imake configuration. They are
2055 # bogus both because they are the default anyway, and because
2056 # using them would break gcc on systems where it needs fixed includes.
2057 case "$ac_im_incroot" in
2059 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2061 case "$ac_im_usrlibdir" in
2063 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2070 if test "$ac_x_includes" = NO; then
2071 # Guess where to find include files, by looking for this one X11 .h file.
2072 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2074 # First, try using that file with no special directory specified.
2075 cat > conftest.$ac_ext <<EOF
2076 #line 2088 "configure"
2077 #include "confdefs.h"
2078 #include <$x_direct_test_include>
2080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2081 { (eval echo configure:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2083 if test -z "$ac_err"; then
2085 # We can compile using X headers with no special include directory.
2089 echo "configure: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2092 # Look for the header file in a standard set of common directories.
2093 # Check X11 before X11Rn because it is often a symlink to the current release.
2096 /usr/X11R6/include \
2097 /usr/X11R5/include \
2098 /usr/X11R4/include \
2101 /usr/include/X11R6 \
2102 /usr/include/X11R5 \
2103 /usr/include/X11R4 \
2105 /usr/local/X11/include \
2106 /usr/local/X11R6/include \
2107 /usr/local/X11R5/include \
2108 /usr/local/X11R4/include \
2110 /usr/local/include/X11 \
2111 /usr/local/include/X11R6 \
2112 /usr/local/include/X11R5 \
2113 /usr/local/include/X11R4 \
2117 /usr/XFree86/include/X11 \
2120 /usr/local/include \
2121 /usr/unsupported/include \
2122 /usr/athena/include \
2123 /usr/local/x11r5/include \
2124 /usr/lpp/Xamples/include \
2126 /usr/openwin/include \
2127 /usr/openwin/share/include \
2130 if test -r "$ac_dir/$x_direct_test_include"; then
2131 ac_x_includes=$ac_dir
2137 fi # $ac_x_includes = NO
2139 if test "$ac_x_libraries" = NO; then
2140 # Check for the libraries.
2142 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2143 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2145 # See if we find them without any special options.
2146 # Don't add to $LIBS permanently.
2147 ac_save_LIBS="$LIBS"
2148 LIBS="-l$x_direct_test_library $LIBS"
2149 cat > conftest.$ac_ext <<EOF
2150 #line 2162 "configure"
2151 #include "confdefs.h"
2154 ${x_direct_test_function}()
2157 if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2159 LIBS="$ac_save_LIBS"
2160 # We can link X programs with no special library path.
2163 echo "configure: failed program was:" >&5
2164 cat conftest.$ac_ext >&5
2166 LIBS="$ac_save_LIBS"
2167 # First see if replacing the include by lib works.
2168 # Check X11 before X11Rn because it is often a symlink to the current release.
2169 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2180 /usr/local/X11/lib \
2181 /usr/local/X11R6/lib \
2182 /usr/local/X11R5/lib \
2183 /usr/local/X11R4/lib \
2185 /usr/local/lib/X11 \
2186 /usr/local/lib/X11R6 \
2187 /usr/local/lib/X11R5 \
2188 /usr/local/lib/X11R4 \
2192 /usr/XFree86/lib/X11 \
2196 /usr/unsupported/lib \
2198 /usr/local/x11r5/lib \
2199 /usr/lpp/Xamples/lib \
2203 /usr/openwin/share/lib \
2206 for ac_extension in a so sl; do
2207 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2208 ac_x_libraries=$ac_dir
2215 fi # $ac_x_libraries = NO
2217 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2218 # Didn't find X anywhere. Cache the known absence of X.
2219 ac_cv_have_x="have_x=no"
2221 # Record where we found X for the cache.
2222 ac_cv_have_x="have_x=yes \
2223 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2227 eval "$ac_cv_have_x"
2230 if test "$have_x" != yes; then
2231 echo "$ac_t""$have_x" 1>&6
2234 # If each of the values was on the command line, it overrides each guess.
2235 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2236 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2237 # Update the cache value to reflect the command line values.
2238 ac_cv_have_x="have_x=yes \
2239 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2240 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2243 if test "$no_x" = yes; then
2244 # Not all programs may use this symbol, but it does not hurt to define it.
2245 cat >> confdefs.h <<\EOF
2246 #define X_DISPLAY_MISSING 1
2249 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2251 if test -n "$x_includes"; then
2252 X_CFLAGS="$X_CFLAGS -I$x_includes"
2255 # It would also be nice to do this for all -L options, not just this one.
2256 if test -n "$x_libraries"; then
2257 X_LIBS="$X_LIBS -L$x_libraries"
2258 # For Solaris; some versions of Sun CC require a space after -R and
2259 # others require no space. Words are not sufficient . . . .
2260 case "`(uname -sr) 2>/dev/null`" in
2262 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2263 echo "configure:2275: checking whether -R must be followed by a space" >&5
2264 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2265 cat > conftest.$ac_ext <<EOF
2266 #line 2278 "configure"
2267 #include "confdefs.h"
2273 if { (eval echo configure:2285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2277 echo "configure: failed program was:" >&5
2278 cat conftest.$ac_ext >&5
2283 if test $ac_R_nospace = yes; then
2284 echo "$ac_t""no" 1>&6
2285 X_LIBS="$X_LIBS -R$x_libraries"
2287 LIBS="$ac_xsave_LIBS -R $x_libraries"
2288 cat > conftest.$ac_ext <<EOF
2289 #line 2301 "configure"
2290 #include "confdefs.h"
2296 if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2300 echo "configure: failed program was:" >&5
2301 cat conftest.$ac_ext >&5
2306 if test $ac_R_space = yes; then
2307 echo "$ac_t""yes" 1>&6
2308 X_LIBS="$X_LIBS -R $x_libraries"
2310 echo "$ac_t""neither works" 1>&6
2313 LIBS="$ac_xsave_LIBS"
2317 # Check for system-dependent libraries X programs must link with.
2318 # Do this before checking for the system-independent R6 libraries
2319 # (-lICE), since we may need -lsocket or whatever for X linking.
2321 if test "$ISC" = yes; then
2322 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2324 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2325 # libraries were built with DECnet support. And karl@cs.umb.edu says
2326 # the Alpha needs dnet_stub (dnet does not exist).
2327 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2328 echo "configure:2340: checking for dnet_ntoa in -ldnet" >&5
2329 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2330 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2331 echo $ac_n "(cached) $ac_c" 1>&6
2333 ac_save_LIBS="$LIBS"
2335 cat > conftest.$ac_ext <<EOF
2336 #line 2348 "configure"
2337 #include "confdefs.h"
2338 /* Override any gcc2 internal prototype to avoid an error. */
2339 /* We use char because int might match the return type of a gcc2
2340 builtin and then its argument prototype would still apply. */
2347 if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2349 eval "ac_cv_lib_$ac_lib_var=yes"
2351 echo "configure: failed program was:" >&5
2352 cat conftest.$ac_ext >&5
2354 eval "ac_cv_lib_$ac_lib_var=no"
2357 LIBS="$ac_save_LIBS"
2360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2361 echo "$ac_t""yes" 1>&6
2362 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2364 echo "$ac_t""no" 1>&6
2367 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2368 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2369 echo "configure:2381: checking for dnet_ntoa in -ldnet_stub" >&5
2370 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2371 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2374 ac_save_LIBS="$LIBS"
2375 LIBS="-ldnet_stub $LIBS"
2376 cat > conftest.$ac_ext <<EOF
2377 #line 2389 "configure"
2378 #include "confdefs.h"
2379 /* Override any gcc2 internal prototype to avoid an error. */
2380 /* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2388 if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2390 eval "ac_cv_lib_$ac_lib_var=yes"
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2395 eval "ac_cv_lib_$ac_lib_var=no"
2398 LIBS="$ac_save_LIBS"
2401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2402 echo "$ac_t""yes" 1>&6
2403 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2405 echo "$ac_t""no" 1>&6
2410 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2411 # to get the SysV transport functions.
2412 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2414 # The nsl library prevents programs from opening the X display
2415 # on Irix 5.2, according to dickey@clark.net.
2416 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2417 echo "configure:2429: checking for gethostbyname" >&5
2418 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2419 echo $ac_n "(cached) $ac_c" 1>&6
2421 cat > conftest.$ac_ext <<EOF
2422 #line 2434 "configure"
2423 #include "confdefs.h"
2424 /* System header to define __stub macros and hopefully few prototypes,
2425 which can conflict with char gethostbyname(); below. */
2427 /* Override any gcc2 internal prototype to avoid an error. */
2428 /* We use char because int might match the return type of a gcc2
2429 builtin and then its argument prototype would still apply. */
2430 char gethostbyname();
2434 /* The GNU C library defines this for functions which it implements
2435 to always fail with ENOSYS. Some functions are actually named
2436 something starting with __ and the normal name is an alias. */
2437 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2445 if { (eval echo configure:2457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2447 eval "ac_cv_func_gethostbyname=yes"
2449 echo "configure: failed program was:" >&5
2450 cat conftest.$ac_ext >&5
2452 eval "ac_cv_func_gethostbyname=no"
2457 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2458 echo "$ac_t""yes" 1>&6
2461 echo "$ac_t""no" 1>&6
2464 if test $ac_cv_func_gethostbyname = no; then
2465 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2466 echo "configure:2478: checking for gethostbyname in -lnsl" >&5
2467 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2468 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2469 echo $ac_n "(cached) $ac_c" 1>&6
2471 ac_save_LIBS="$LIBS"
2473 cat > conftest.$ac_ext <<EOF
2474 #line 2486 "configure"
2475 #include "confdefs.h"
2476 /* Override any gcc2 internal prototype to avoid an error. */
2477 /* We use char because int might match the return type of a gcc2
2478 builtin and then its argument prototype would still apply. */
2479 char gethostbyname();
2485 if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2487 eval "ac_cv_lib_$ac_lib_var=yes"
2489 echo "configure: failed program was:" >&5
2490 cat conftest.$ac_ext >&5
2492 eval "ac_cv_lib_$ac_lib_var=no"
2495 LIBS="$ac_save_LIBS"
2498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2499 echo "$ac_t""yes" 1>&6
2500 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2502 echo "$ac_t""no" 1>&6
2507 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2508 # socket/setsockopt and other routines are undefined under SCO ODT
2509 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2510 # on later versions), says simon@lia.di.epfl.ch: it contains
2511 # gethostby* variants that don't use the nameserver (or something).
2512 # -lsocket must be given before -lnsl if both are needed.
2513 # We assume that if connect needs -lnsl, so does gethostbyname.
2514 echo $ac_n "checking for connect""... $ac_c" 1>&6
2515 echo "configure:2527: checking for connect" >&5
2516 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2517 echo $ac_n "(cached) $ac_c" 1>&6
2519 cat > conftest.$ac_ext <<EOF
2520 #line 2532 "configure"
2521 #include "confdefs.h"
2522 /* System header to define __stub macros and hopefully few prototypes,
2523 which can conflict with char connect(); below. */
2525 /* Override any gcc2 internal prototype to avoid an error. */
2526 /* We use char because int might match the return type of a gcc2
2527 builtin and then its argument prototype would still apply. */
2532 /* The GNU C library defines this for functions which it implements
2533 to always fail with ENOSYS. Some functions are actually named
2534 something starting with __ and the normal name is an alias. */
2535 #if defined (__stub_connect) || defined (__stub___connect)
2543 if { (eval echo configure:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2545 eval "ac_cv_func_connect=yes"
2547 echo "configure: failed program was:" >&5
2548 cat conftest.$ac_ext >&5
2550 eval "ac_cv_func_connect=no"
2555 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2556 echo "$ac_t""yes" 1>&6
2559 echo "$ac_t""no" 1>&6
2562 if test $ac_cv_func_connect = no; then
2563 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2564 echo "configure:2576: checking for connect in -lsocket" >&5
2565 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2566 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2567 echo $ac_n "(cached) $ac_c" 1>&6
2569 ac_save_LIBS="$LIBS"
2570 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2571 cat > conftest.$ac_ext <<EOF
2572 #line 2584 "configure"
2573 #include "confdefs.h"
2574 /* Override any gcc2 internal prototype to avoid an error. */
2575 /* We use char because int might match the return type of a gcc2
2576 builtin and then its argument prototype would still apply. */
2583 if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2585 eval "ac_cv_lib_$ac_lib_var=yes"
2587 echo "configure: failed program was:" >&5
2588 cat conftest.$ac_ext >&5
2590 eval "ac_cv_lib_$ac_lib_var=no"
2593 LIBS="$ac_save_LIBS"
2596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2597 echo "$ac_t""yes" 1>&6
2598 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2600 echo "$ac_t""no" 1>&6
2605 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2606 echo $ac_n "checking for remove""... $ac_c" 1>&6
2607 echo "configure:2619: checking for remove" >&5
2608 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2609 echo $ac_n "(cached) $ac_c" 1>&6
2611 cat > conftest.$ac_ext <<EOF
2612 #line 2624 "configure"
2613 #include "confdefs.h"
2614 /* System header to define __stub macros and hopefully few prototypes,
2615 which can conflict with char remove(); below. */
2617 /* Override any gcc2 internal prototype to avoid an error. */
2618 /* We use char because int might match the return type of a gcc2
2619 builtin and then its argument prototype would still apply. */
2624 /* The GNU C library defines this for functions which it implements
2625 to always fail with ENOSYS. Some functions are actually named
2626 something starting with __ and the normal name is an alias. */
2627 #if defined (__stub_remove) || defined (__stub___remove)
2635 if { (eval echo configure:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2637 eval "ac_cv_func_remove=yes"
2639 echo "configure: failed program was:" >&5
2640 cat conftest.$ac_ext >&5
2642 eval "ac_cv_func_remove=no"
2647 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2648 echo "$ac_t""yes" 1>&6
2651 echo "$ac_t""no" 1>&6
2654 if test $ac_cv_func_remove = no; then
2655 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2656 echo "configure:2668: checking for remove in -lposix" >&5
2657 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2658 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2659 echo $ac_n "(cached) $ac_c" 1>&6
2661 ac_save_LIBS="$LIBS"
2662 LIBS="-lposix $LIBS"
2663 cat > conftest.$ac_ext <<EOF
2664 #line 2676 "configure"
2665 #include "confdefs.h"
2666 /* Override any gcc2 internal prototype to avoid an error. */
2667 /* We use char because int might match the return type of a gcc2
2668 builtin and then its argument prototype would still apply. */
2675 if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2677 eval "ac_cv_lib_$ac_lib_var=yes"
2679 echo "configure: failed program was:" >&5
2680 cat conftest.$ac_ext >&5
2682 eval "ac_cv_lib_$ac_lib_var=no"
2685 LIBS="$ac_save_LIBS"
2688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2689 echo "$ac_t""yes" 1>&6
2690 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2692 echo "$ac_t""no" 1>&6
2697 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2698 echo $ac_n "checking for shmat""... $ac_c" 1>&6
2699 echo "configure:2711: checking for shmat" >&5
2700 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2701 echo $ac_n "(cached) $ac_c" 1>&6
2703 cat > conftest.$ac_ext <<EOF
2704 #line 2716 "configure"
2705 #include "confdefs.h"
2706 /* System header to define __stub macros and hopefully few prototypes,
2707 which can conflict with char shmat(); below. */
2709 /* Override any gcc2 internal prototype to avoid an error. */
2710 /* We use char because int might match the return type of a gcc2
2711 builtin and then its argument prototype would still apply. */
2716 /* The GNU C library defines this for functions which it implements
2717 to always fail with ENOSYS. Some functions are actually named
2718 something starting with __ and the normal name is an alias. */
2719 #if defined (__stub_shmat) || defined (__stub___shmat)
2727 if { (eval echo configure:2739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2729 eval "ac_cv_func_shmat=yes"
2731 echo "configure: failed program was:" >&5
2732 cat conftest.$ac_ext >&5
2734 eval "ac_cv_func_shmat=no"
2739 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2740 echo "$ac_t""yes" 1>&6
2743 echo "$ac_t""no" 1>&6
2746 if test $ac_cv_func_shmat = no; then
2747 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2748 echo "configure:2760: checking for shmat in -lipc" >&5
2749 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2750 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2751 echo $ac_n "(cached) $ac_c" 1>&6
2753 ac_save_LIBS="$LIBS"
2755 cat > conftest.$ac_ext <<EOF
2756 #line 2768 "configure"
2757 #include "confdefs.h"
2758 /* Override any gcc2 internal prototype to avoid an error. */
2759 /* We use char because int might match the return type of a gcc2
2760 builtin and then its argument prototype would still apply. */
2767 if { (eval echo configure:2779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2769 eval "ac_cv_lib_$ac_lib_var=yes"
2771 echo "configure: failed program was:" >&5
2772 cat conftest.$ac_ext >&5
2774 eval "ac_cv_lib_$ac_lib_var=no"
2777 LIBS="$ac_save_LIBS"
2780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2781 echo "$ac_t""yes" 1>&6
2782 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2784 echo "$ac_t""no" 1>&6
2790 # Check for libraries that X11R6 Xt/Xaw programs need.
2791 ac_save_LDFLAGS="$LDFLAGS"
2792 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2793 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2794 # check for ICE first), but we must link in the order -lSM -lICE or
2795 # we get undefined symbols. So assume we have SM if we have ICE.
2796 # These have to be linked with before -lX11, unlike the other
2797 # libraries we check for below, so use a different variable.
2798 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2799 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2800 echo "configure:2812: checking for IceConnectionNumber in -lICE" >&5
2801 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2802 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2803 echo $ac_n "(cached) $ac_c" 1>&6
2805 ac_save_LIBS="$LIBS"
2806 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
2807 cat > conftest.$ac_ext <<EOF
2808 #line 2820 "configure"
2809 #include "confdefs.h"
2810 /* Override any gcc2 internal prototype to avoid an error. */
2811 /* We use char because int might match the return type of a gcc2
2812 builtin and then its argument prototype would still apply. */
2813 char IceConnectionNumber();
2816 IceConnectionNumber()
2819 if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2821 eval "ac_cv_lib_$ac_lib_var=yes"
2823 echo "configure: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
2826 eval "ac_cv_lib_$ac_lib_var=no"
2829 LIBS="$ac_save_LIBS"
2832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2833 echo "$ac_t""yes" 1>&6
2834 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2836 echo "$ac_t""no" 1>&6
2839 LDFLAGS="$ac_save_LDFLAGS"
2844 if test "$have_x" != yes; then
2845 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
2849 # Try and find the app-defaults directory.
2850 # It sucks that autoconf doesn't do this already...
2860 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
2861 echo "configure:2873: checking for X app-defaults directory" >&5
2862 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
2863 echo $ac_n "(cached) $ac_c" 1>&6
2867 if mkdir conftestdir; then
2869 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2870 cat > Imakefile <<'EOF'
2872 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
2874 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2875 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
2876 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2881 if test x"$ac_x_app_defaults" = x; then
2883 # Look for the directory under a standard set of common directories.
2884 # Check X11 before X11Rn because it's often a symlink to the current release.
2886 /usr/X11/lib/app-defaults \
2887 /usr/X11R6/lib/app-defaults \
2888 /usr/X11R6/lib/X11/app-defaults \
2889 /usr/X11R5/lib/app-defaults \
2890 /usr/X11R5/lib/X11/app-defaults \
2891 /usr/X11R4/lib/app-defaults \
2892 /usr/X11R4/lib/X11/app-defaults \
2894 /usr/lib/X11/app-defaults \
2895 /usr/lib/X11R6/app-defaults \
2896 /usr/lib/X11R5/app-defaults \
2897 /usr/lib/X11R4/app-defaults \
2899 /usr/local/X11/lib/app-defaults \
2900 /usr/local/X11R6/lib/app-defaults \
2901 /usr/local/X11R5/lib/app-defaults \
2902 /usr/local/X11R4/lib/app-defaults \
2904 /usr/local/lib/X11/app-defaults \
2905 /usr/local/lib/X11R6/app-defaults \
2906 /usr/local/lib/X11R6/X11/app-defaults \
2907 /usr/local/lib/X11R5/app-defaults \
2908 /usr/local/lib/X11R5/X11/app-defaults \
2909 /usr/local/lib/X11R4/app-defaults \
2910 /usr/local/lib/X11R4/X11/app-defaults \
2912 /usr/X386/lib/X11/app-defaults \
2913 /usr/x386/lib/X11/app-defaults \
2914 /usr/XFree86/lib/X11/app-defaults \
2916 /usr/lib/X11/app-defaults \
2917 /usr/local/lib/X11/app-defaults \
2918 /usr/unsupported/lib/X11/app-defaults \
2919 /usr/athena/lib/X11/app-defaults \
2920 /usr/local/x11r5/lib/X11/app-defaults \
2921 /usr/lpp/Xamples/lib/X11/app-defaults \
2922 /lib/usr/lib/X11/app-defaults \
2924 /usr/openwin/lib/app-defaults \
2925 /usr/openwin/lib/X11/app-defaults \
2926 /usr/openwin/share/lib/app-defaults \
2927 /usr/openwin/share/lib/X11/app-defaults \
2929 /X11R6/lib/app-defaults \
2930 /X11R5/lib/app-defaults \
2931 /X11R4/lib/app-defaults \
2934 if test -d "$ac_dir"; then
2935 ac_x_app_defaults=$ac_dir
2941 if test x"$ac_x_app_defaults" = x; then
2942 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
2944 # Record where we found app-defaults for the cache.
2945 ac_cv_x_app_defaults="$ac_x_app_defaults"
2949 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
2950 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
2952 APPDEFAULTS=$ac_x_app_defaults
2955 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2959 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2963 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2968 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2969 # Use this sparingly; it probably doesn't work very well on X programs.
2973 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2974 # (But not the -L directories!)
2980 # Usage: HANDLE_X_PATH_ARG([variable_name],
2981 # [--command-line-option],
2982 # [descriptive string])
2984 # All of the --with options take three forms:
2986 # --with-foo (or --with-foo=yes)
2987 # --without-foo (or --with-foo=no)
2990 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
2991 # a directory (string beginning with a slash) it checks to see whether
2992 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2999 # check for the HP XHPDisableReset server extension headers.
3002 ac_save_CPPFLAGS="$CPPFLAGS"
3003 if test \! -z "$includedir" ; then
3004 CPPFLAGS="$CPPFLAGS -I$includedir"
3006 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3007 cat > conftest.$ac_ext <<EOF
3008 #line 3020 "configure"
3009 #include "confdefs.h"
3010 #include <X11/XHPlib.h>
3012 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3013 egrep "XHPDisableReset" >/dev/null 2>&1; then
3015 cat >> confdefs.h <<\EOF
3016 #define HAVE_XHPDISABLERESET 1
3019 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
3023 CPPFLAGS="$ac_save_CPPFLAGS"
3026 # Check for the availability of the XPointer typedef, and define it otherwise.
3028 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3029 echo "configure:3041: checking for XPointer" >&5
3030 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3031 echo $ac_n "(cached) $ac_c" 1>&6
3034 ac_save_CPPFLAGS="$CPPFLAGS"
3035 if test \! -z "$includedir" ; then
3036 CPPFLAGS="$CPPFLAGS -I$includedir"
3038 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3039 cat > conftest.$ac_ext <<EOF
3040 #line 3052 "configure"
3041 #include "confdefs.h"
3042 #include <X11/Xlib.h>
3044 XPointer foo = (XPointer) 0;
3047 if { (eval echo configure:3059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3051 echo "configure: failed program was:" >&5
3052 cat conftest.$ac_ext >&5
3057 CPPFLAGS="$ac_save_CPPFLAGS"
3060 echo "$ac_t""$ac_cv_xpointer" 1>&6
3061 if test "$ac_cv_xpointer" != yes; then
3062 cat >> confdefs.h <<\EOF
3063 #define XPointer char*
3069 # Random special-cases for certain pathological OSes. You know who you are.
3074 # The following arcana was gleaned from conversations with
3075 # Eric Schwartz <erics@col.hp.com>:
3077 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3078 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3079 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3080 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3081 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3082 # you don't need any -I or -L arguments.
3084 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3085 # are the same division as 10.x. However, there are no symlinks to
3086 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3087 # arguments are always necessary.
3089 # However, X11R6 was available on HPUX 9.x as a patch: if that
3090 # patch was installed, then all of X11R6 went in to
3091 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3093 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3094 # whether R5 was available as a patch; R6 undoubtedly was not.)
3096 # So. We try and use the highest numbered pair of
3097 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3098 # that are available. We do not mix and match different versions
3101 # Questions I still don't know the answers to: (do you?)
3103 # * Does HPUX 10.x come with /usr/contrib/X11R6/ standard?
3104 # Or does that need to be installed separately?
3106 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3107 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3108 # that contrib directory? Did it contain so-called "standard"
3109 # X11R6, or did it include Xaw and Xmu as well? If the former,
3110 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3111 # be a situation where one had to reach into the R5 headers and
3112 # libs to find Xmu? That is, must both R6 and R5 directories
3113 # be on the -I and -L lists in that case?
3115 for version in X11R6 X11R5 X11R4 ; do
3116 # if either pair of directories exists...
3117 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib ; then
3118 # if contrib exists, use it...
3119 if test -d /usr/contrib/$version/lib ; then
3120 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3121 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3123 # if the "standard" one exists, use it.
3124 if test -d /usr/lib/$version ; then
3125 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3126 X_LIBS="$X_LIBS -L/usr/lib/$version"
3128 # since at least one of the pair exists, go no farther.
3133 # Now find Motif. Thanks for not making xmkmf find this by
3134 # default, you losers.
3136 if test -d /usr/lib/Motif1.2 ; then
3137 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3138 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3139 elif test -d /usr/lib/Motif1.1 ; then
3140 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3141 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3144 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3146 if test -d /opt/Mesa/lib ; then
3147 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3148 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3151 if test -d /opt/xpm/lib/X11 ; then
3152 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3153 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3156 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3157 # in /usr/local/, unless there is already an xscreensaver in
3158 # /usr/local/bin/. This can be overridden with the --prefix arg
3159 # to configure. I'm not sure this is the right thing to do, but
3160 # Richard Lloyd says so...
3162 if test \! -x /usr/local/bin/xscreensaver ; then
3163 ac_default_prefix=/opt/xscreensaver
3169 # Thanks for not making xmkmf find this by default, pinheads.
3170 # And thanks for moving things around again, too. Is this
3171 # really the standard location now? What happened to the
3172 # joke that this kind of thing went in /opt?
3173 # cthomp says "answer: CDE (Common Disorganized Environment)"
3175 if test -f /usr/dt/include/Xm/Xm.h ; then
3176 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3177 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3179 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3180 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3181 echo "configure:3193: checking for regcmp in -lgen" >&5
3182 ac_lib_var=`echo gen'_'regcmp | 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"
3188 cat > conftest.$ac_ext <<EOF
3189 #line 3201 "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. */
3200 if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 X_LIBS="$X_LIBS -lgen"
3217 echo "$ac_t""no" 1>&6
3226 # Check for Xmu (some fucked up vendors don't ship it...)
3230 ac_save_CPPFLAGS="$CPPFLAGS"
3231 if test \! -z "$includedir" ; then
3232 CPPFLAGS="$CPPFLAGS -I$includedir"
3234 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3235 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3236 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3237 echo "configure:3249: checking for X11/Xmu/Error.h" >&5
3238 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3239 echo $ac_n "(cached) $ac_c" 1>&6
3241 cat > conftest.$ac_ext <<EOF
3242 #line 3254 "configure"
3243 #include "confdefs.h"
3244 #include <X11/Xmu/Error.h>
3246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3247 { (eval echo configure:3259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3249 if test -z "$ac_err"; then
3251 eval "ac_cv_header_$ac_safe=yes"
3254 echo "configure: failed program was:" >&5
3255 cat conftest.$ac_ext >&5
3257 eval "ac_cv_header_$ac_safe=no"
3261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3262 echo "$ac_t""yes" 1>&6
3265 echo "$ac_t""no" 1>&6
3268 CPPFLAGS="$ac_save_CPPFLAGS"
3269 if test "$have_xmu" = no ; then
3270 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3271 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3275 SAVER_LIBS="-lXmu $SAVER_LIBS"
3276 HACK_LIBS="-lXmu $HACK_LIBS"
3277 TOOLKIT_LIBS="-lXmu $TOOLKIT_LIBS"
3278 cat >> confdefs.h <<\EOF
3285 # See comp.windows.x FAQ question 124 about _get_wmShellWidgetClass on 4.1.x.
3286 # The right fix is to get OpenWindows 3.0 patches 100512-02 and 100573-03.
3288 if test "$have_xmu" = yes ; then
3291 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3292 echo "configure:3304: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3293 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3294 echo $ac_n "(cached) $ac_c" 1>&6
3296 ac_save_LDFLAGS="$LDFLAGS"
3297 if test \! -z "$x_libraries" ; then
3298 LDFLAGS="$LDFLAGS -L$x_libraries"
3300 # Note: this trick never works! (Generally.)
3301 # We're only getting away with using AC_TRY_LINK
3302 # with X libraries because we know it's SunOS.
3303 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3304 cat > conftest.$ac_ext <<EOF
3305 #line 3317 "configure"
3306 #include "confdefs.h"
3312 if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3314 ac_cv_sunos_xmu_bug=no
3316 echo "configure: failed program was:" >&5
3317 cat conftest.$ac_ext >&5
3319 ac_cv_sunos_xmu_bug=yes
3322 LDFLAGS="$ac_save_LDFLAGS"
3325 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3326 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3327 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3328 echo "configure:3340: checking whether the compiler understands -static" >&5
3329 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3330 echo $ac_n "(cached) $ac_c" 1>&6
3332 ac_save_LDFLAGS="$LDFLAGS"
3333 LDFLAGS="$LDFLAGS -static"
3334 cat > conftest.$ac_ext <<EOF
3335 #line 3347 "configure"
3336 #include "confdefs.h"
3342 if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3346 echo "configure: failed program was:" >&5
3347 cat conftest.$ac_ext >&5
3352 LDFLAGS="$ac_save_LDFLAGS"
3355 echo "$ac_t""$ac_cv_ld_static" 1>&6
3356 if test "$ac_cv_ld_static" = yes ; then
3357 LDFLAGS="$LDFLAGS -static"
3359 LDFLAGS="$LDFLAGS -Bstatic"
3367 # Check for the SGI SCREEN_SAVER server extension header.
3370 with_sgi_req=unspecified
3371 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3372 if test "${with_sgi_ext+set}" = set; then
3373 withval="$with_sgi_ext"
3374 with_sgi="$withval"; with_sgi_req="$withval"
3386 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3387 echo "configure:3399: checking for SGI SCREEN_SAVER headers" >&5
3390 X_CFLAGS="-I$d $X_CFLAGS"
3391 echo "$ac_t""$d" 1>&6
3393 echo "$ac_t""not found ($d: no such directory)" 1>&6
3396 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3397 echo "configure:3409: checking for SGI SCREEN_SAVER libs" >&5
3400 X_LIBS="-L$d $X_LIBS"
3401 echo "$ac_t""$d" 1>&6
3403 echo "$ac_t""not found ($d: no such directory)" 1>&6
3406 # replace the directory string with "yes".
3408 with_sgi=$with_sgi_req
3413 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3414 echo " If it is a directory, then \`DIR/include' will be added to"
3415 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3420 # why is this necessary?
3421 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3422 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3426 if test "$with_sgi" = yes; then
3428 ac_save_CPPFLAGS="$CPPFLAGS"
3429 if test \! -z "$includedir" ; then
3430 CPPFLAGS="$CPPFLAGS -I$includedir"
3432 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3433 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3434 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3435 echo "configure:3447: checking for X11/extensions/XScreenSaver.h" >&5
3436 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3437 echo $ac_n "(cached) $ac_c" 1>&6
3439 cat > conftest.$ac_ext <<EOF
3440 #line 3452 "configure"
3441 #include "confdefs.h"
3442 #include <X11/extensions/XScreenSaver.h>
3444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3445 { (eval echo configure:3457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3447 if test -z "$ac_err"; then
3449 eval "ac_cv_header_$ac_safe=yes"
3452 echo "configure: failed program was:" >&5
3453 cat conftest.$ac_ext >&5
3455 eval "ac_cv_header_$ac_safe=no"
3459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3460 echo "$ac_t""yes" 1>&6
3462 cat >> confdefs.h <<\EOF
3463 #define HAVE_SGI_SAVER_EXTENSION 1
3467 echo "$ac_t""no" 1>&6
3470 CPPFLAGS="$ac_save_CPPFLAGS"
3472 elif test "$with_sgi" != no; then
3473 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3477 # Check for the MIT-SCREEN-SAVER server extension header,
3478 # unless the SGI extension has already been found.
3481 with_mit_req=unspecified
3482 # Check whether --with-mit-ext or --without-mit-ext was given.
3483 if test "${with_mit_ext+set}" = set; then
3484 withval="$with_mit_ext"
3485 with_mit="$withval"; with_mit_req="$withval"
3497 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3498 echo "configure:3510: checking for MIT-SCREEN-SAVER headers" >&5
3501 X_CFLAGS="-I$d $X_CFLAGS"
3502 echo "$ac_t""$d" 1>&6
3504 echo "$ac_t""not found ($d: no such directory)" 1>&6
3507 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3508 echo "configure:3520: checking for MIT-SCREEN-SAVER libs" >&5
3511 X_LIBS="-L$d $X_LIBS"
3512 echo "$ac_t""$d" 1>&6
3514 echo "$ac_t""not found ($d: no such directory)" 1>&6
3517 # replace the directory string with "yes".
3519 with_mit=$with_mit_req
3524 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3525 echo " If it is a directory, then \`DIR/include' will be added to"
3526 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3531 # why is this necessary?
3532 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3533 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3537 if test "$have_sgi" != yes; then
3538 if test "$with_mit" = yes; then
3540 ac_save_CPPFLAGS="$CPPFLAGS"
3541 if test \! -z "$includedir" ; then
3542 CPPFLAGS="$CPPFLAGS -I$includedir"
3544 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3545 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3546 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3547 echo "configure:3559: checking for X11/extensions/scrnsaver.h" >&5
3548 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3549 echo $ac_n "(cached) $ac_c" 1>&6
3551 cat > conftest.$ac_ext <<EOF
3552 #line 3564 "configure"
3553 #include "confdefs.h"
3554 #include <X11/extensions/scrnsaver.h>
3556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3557 { (eval echo configure:3569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3559 if test -z "$ac_err"; then
3561 eval "ac_cv_header_$ac_safe=yes"
3564 echo "configure: failed program was:" >&5
3565 cat conftest.$ac_ext >&5
3567 eval "ac_cv_header_$ac_safe=no"
3571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3572 echo "$ac_t""yes" 1>&6
3575 echo "$ac_t""no" 1>&6
3578 CPPFLAGS="$ac_save_CPPFLAGS"
3580 # Now check to see if it's really in the library; XF86Free-3.3 ships
3581 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3583 if test "$have_mit" = yes; then
3585 ac_save_CPPFLAGS="$CPPFLAGS"
3586 ac_save_LDFLAGS="$LDFLAGS"
3588 if test \! -z "$includedir" ; then
3589 CPPFLAGS="$CPPFLAGS -I$includedir"
3591 # note: $X_CFLAGS includes $x_includes
3592 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3594 if test \! -z "$libdir" ; then
3595 LDFLAGS="$LDFLAGS -L$libdir"
3597 # note: $X_LIBS includes $x_libraries
3598 LDFLAGS="$LDFLAGS $X_LIBS"
3600 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3601 echo "configure:3613: checking for XScreenSaverRegister in -lXext" >&5
3602 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3603 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3604 echo $ac_n "(cached) $ac_c" 1>&6
3606 ac_save_LIBS="$LIBS"
3607 LIBS="-lXext -lm $LIBS"
3608 cat > conftest.$ac_ext <<EOF
3609 #line 3621 "configure"
3610 #include "confdefs.h"
3611 /* Override any gcc2 internal prototype to avoid an error. */
3612 /* We use char because int might match the return type of a gcc2
3613 builtin and then its argument prototype would still apply. */
3614 char XScreenSaverRegister();
3617 XScreenSaverRegister()
3620 if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3622 eval "ac_cv_lib_$ac_lib_var=yes"
3624 echo "configure: failed program was:" >&5
3625 cat conftest.$ac_ext >&5
3627 eval "ac_cv_lib_$ac_lib_var=no"
3630 LIBS="$ac_save_LIBS"
3633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3634 echo "$ac_t""yes" 1>&6
3635 ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3636 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3637 cat >> confdefs.h <<EOF
3638 #define $ac_tr_lib 1
3644 echo "$ac_t""no" 1>&6
3648 CPPFLAGS="$ac_save_CPPFLAGS"
3649 LDFLAGS="$ac_save_LDFLAGS"
3651 if test "$have_mit" = no; then
3652 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3653 # of in Xext. Thank you master, may I have another.
3655 ac_save_CPPFLAGS="$CPPFLAGS"
3656 ac_save_LDFLAGS="$LDFLAGS"
3658 if test \! -z "$includedir" ; then
3659 CPPFLAGS="$CPPFLAGS -I$includedir"
3661 # note: $X_CFLAGS includes $x_includes
3662 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3664 if test \! -z "$libdir" ; then
3665 LDFLAGS="$LDFLAGS -L$libdir"
3667 # note: $X_LIBS includes $x_libraries
3668 LDFLAGS="$LDFLAGS $X_LIBS"
3670 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3671 echo "configure:3683: checking for XScreenSaverRegister in -lXExExt" >&5
3672 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3674 echo $ac_n "(cached) $ac_c" 1>&6
3676 ac_save_LIBS="$LIBS"
3677 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3678 cat > conftest.$ac_ext <<EOF
3679 #line 3691 "configure"
3680 #include "confdefs.h"
3681 /* Override any gcc2 internal prototype to avoid an error. */
3682 /* We use char because int might match the return type of a gcc2
3683 builtin and then its argument prototype would still apply. */
3684 char XScreenSaverRegister();
3687 XScreenSaverRegister()
3690 if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3692 eval "ac_cv_lib_$ac_lib_var=yes"
3694 echo "configure: failed program was:" >&5
3695 cat conftest.$ac_ext >&5
3697 eval "ac_cv_lib_$ac_lib_var=no"
3700 LIBS="$ac_save_LIBS"
3703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3704 echo "$ac_t""yes" 1>&6
3705 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3707 echo "$ac_t""no" 1>&6
3710 CPPFLAGS="$ac_save_CPPFLAGS"
3711 LDFLAGS="$ac_save_LDFLAGS"
3714 if test "$have_mit" = no; then
3715 # Double fuck! Looks like some versions of XFree86 (whichever version
3716 # it is that comes with RedHat Linux 2.0 -- I can't find a version
3717 # number) put this garbage in Xss instead of Xext. Thank you master,
3718 # may I have another.
3720 ac_save_CPPFLAGS="$CPPFLAGS"
3721 ac_save_LDFLAGS="$LDFLAGS"
3723 if test \! -z "$includedir" ; then
3724 CPPFLAGS="$CPPFLAGS -I$includedir"
3726 # note: $X_CFLAGS includes $x_includes
3727 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3729 if test \! -z "$libdir" ; then
3730 LDFLAGS="$LDFLAGS -L$libdir"
3732 # note: $X_LIBS includes $x_libraries
3733 LDFLAGS="$LDFLAGS $X_LIBS"
3735 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
3736 echo "configure:3748: checking for XScreenSaverRegister in -lXss" >&5
3737 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3739 echo $ac_n "(cached) $ac_c" 1>&6
3741 ac_save_LIBS="$LIBS"
3742 LIBS="-lXss -lX11 -lXext -lm $LIBS"
3743 cat > conftest.$ac_ext <<EOF
3744 #line 3756 "configure"
3745 #include "confdefs.h"
3746 /* Override any gcc2 internal prototype to avoid an error. */
3747 /* We use char because int might match the return type of a gcc2
3748 builtin and then its argument prototype would still apply. */
3749 char XScreenSaverRegister();
3752 XScreenSaverRegister()
3755 if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3757 eval "ac_cv_lib_$ac_lib_var=yes"
3759 echo "configure: failed program was:" >&5
3760 cat conftest.$ac_ext >&5
3762 eval "ac_cv_lib_$ac_lib_var=no"
3765 LIBS="$ac_save_LIBS"
3768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3769 echo "$ac_t""yes" 1>&6
3770 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
3772 echo "$ac_t""no" 1>&6
3775 CPPFLAGS="$ac_save_CPPFLAGS"
3776 LDFLAGS="$ac_save_LDFLAGS"
3779 if test "$have_mit" = yes; then
3780 cat >> confdefs.h <<\EOF
3781 #define HAVE_MIT_SAVER_EXTENSION 1
3788 elif test "$with_mit" != no; then
3789 echo "error: must be yes or no: --with-mit-ext=$with_mit"
3795 # Check for the XIDLE server extension header.
3798 with_xidle_req=unspecified
3799 # Check whether --with-xidle-ext or --without-xidle-ext was given.
3800 if test "${with_xidle_ext+set}" = set; then
3801 withval="$with_xidle_ext"
3802 with_xidle="$withval"; with_xidle_req="$withval"
3809 case "$with_xidle" in
3814 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
3815 echo "configure:3827: checking for XIDLE headers" >&5
3816 d=$with_xidle/include
3818 X_CFLAGS="-I$d $X_CFLAGS"
3819 echo "$ac_t""$d" 1>&6
3821 echo "$ac_t""not found ($d: no such directory)" 1>&6
3824 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
3825 echo "configure:3837: checking for XIDLE libs" >&5
3828 X_LIBS="-L$d $X_LIBS"
3829 echo "$ac_t""$d" 1>&6
3831 echo "$ac_t""not found ($d: no such directory)" 1>&6
3834 # replace the directory string with "yes".
3835 with_xidle_req="yes"
3836 with_xidle=$with_xidle_req
3841 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
3842 echo " If it is a directory, then \`DIR/include' will be added to"
3843 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3848 # why is this necessary?
3849 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3850 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3854 if test "$with_xidle" = yes; then
3856 ac_save_CPPFLAGS="$CPPFLAGS"
3857 if test \! -z "$includedir" ; then
3858 CPPFLAGS="$CPPFLAGS -I$includedir"
3860 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3861 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
3862 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
3863 echo "configure:3875: checking for X11/extensions/xidle.h" >&5
3864 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3865 echo $ac_n "(cached) $ac_c" 1>&6
3867 cat > conftest.$ac_ext <<EOF
3868 #line 3880 "configure"
3869 #include "confdefs.h"
3870 #include <X11/extensions/xidle.h>
3872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3873 { (eval echo configure:3885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3875 if test -z "$ac_err"; then
3877 eval "ac_cv_header_$ac_safe=yes"
3880 echo "configure: failed program was:" >&5
3881 cat conftest.$ac_ext >&5
3883 eval "ac_cv_header_$ac_safe=no"
3887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3888 echo "$ac_t""yes" 1>&6
3890 cat >> confdefs.h <<\EOF
3891 #define HAVE_XIDLE_EXTENSION 1
3895 echo "$ac_t""no" 1>&6
3898 CPPFLAGS="$ac_save_CPPFLAGS"
3899 elif test "$with_xidle" != no; then
3900 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
3905 # Check for the XSHM server extension header.
3908 with_xshm_req=unspecified
3909 # Check whether --with-xshm-ext or --without-xshm-ext was given.
3910 if test "${with_xshm_ext+set}" = set; then
3911 withval="$with_xshm_ext"
3912 with_xshm="$withval"; with_xshm_req="$withval"
3919 case "$with_xshm" in
3924 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
3925 echo "configure:3937: checking for XSHM headers" >&5
3926 d=$with_xshm/include
3928 X_CFLAGS="-I$d $X_CFLAGS"
3929 echo "$ac_t""$d" 1>&6
3931 echo "$ac_t""not found ($d: no such directory)" 1>&6
3934 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
3935 echo "configure:3947: checking for XSHM libs" >&5
3938 X_LIBS="-L$d $X_LIBS"
3939 echo "$ac_t""$d" 1>&6
3941 echo "$ac_t""not found ($d: no such directory)" 1>&6
3944 # replace the directory string with "yes".
3946 with_xshm=$with_xshm_req
3951 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
3952 echo " If it is a directory, then \`DIR/include' will be added to"
3953 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3958 # why is this necessary?
3959 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3960 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3964 if test "$with_xshm" = yes; then
3966 # first check for Xshm.h.
3968 ac_save_CPPFLAGS="$CPPFLAGS"
3969 if test \! -z "$includedir" ; then
3970 CPPFLAGS="$CPPFLAGS -I$includedir"
3972 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3973 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
3974 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
3975 echo "configure:3987: checking for X11/extensions/XShm.h" >&5
3976 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3977 echo $ac_n "(cached) $ac_c" 1>&6
3979 cat > conftest.$ac_ext <<EOF
3980 #line 3992 "configure"
3981 #include "confdefs.h"
3982 #include <X11/extensions/XShm.h>
3984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3985 { (eval echo configure:3997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3986 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3987 if test -z "$ac_err"; then
3989 eval "ac_cv_header_$ac_safe=yes"
3992 echo "configure: failed program was:" >&5
3993 cat conftest.$ac_ext >&5
3995 eval "ac_cv_header_$ac_safe=no"
3999 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4000 echo "$ac_t""yes" 1>&6
4003 echo "$ac_t""no" 1>&6
4006 CPPFLAGS="$ac_save_CPPFLAGS"
4008 # if that succeeded, then check for sys/ipc.h.
4009 if test "$have_xshm" = yes; then
4012 ac_save_CPPFLAGS="$CPPFLAGS"
4013 if test \! -z "$includedir" ; then
4014 CPPFLAGS="$CPPFLAGS -I$includedir"
4016 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4017 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
4018 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
4019 echo "configure:4031: checking for sys/ipc.h" >&5
4020 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4021 echo $ac_n "(cached) $ac_c" 1>&6
4023 cat > conftest.$ac_ext <<EOF
4024 #line 4036 "configure"
4025 #include "confdefs.h"
4026 #include <sys/ipc.h>
4028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4029 { (eval echo configure:4041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4031 if test -z "$ac_err"; then
4033 eval "ac_cv_header_$ac_safe=yes"
4036 echo "configure: failed program was:" >&5
4037 cat conftest.$ac_ext >&5
4039 eval "ac_cv_header_$ac_safe=no"
4043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4044 echo "$ac_t""yes" 1>&6
4047 echo "$ac_t""no" 1>&6
4050 CPPFLAGS="$ac_save_CPPFLAGS"
4053 # if that succeeded, then check for sys/shm.h.
4054 if test "$have_xshm" = yes; then
4057 ac_save_CPPFLAGS="$CPPFLAGS"
4058 if test \! -z "$includedir" ; then
4059 CPPFLAGS="$CPPFLAGS -I$includedir"
4061 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4062 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
4063 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
4064 echo "configure:4076: checking for sys/shm.h" >&5
4065 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4066 echo $ac_n "(cached) $ac_c" 1>&6
4068 cat > conftest.$ac_ext <<EOF
4069 #line 4081 "configure"
4070 #include "confdefs.h"
4071 #include <sys/shm.h>
4073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4074 { (eval echo configure:4086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4076 if test -z "$ac_err"; then
4078 eval "ac_cv_header_$ac_safe=yes"
4081 echo "configure: failed program was:" >&5
4082 cat conftest.$ac_ext >&5
4084 eval "ac_cv_header_$ac_safe=no"
4088 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4089 echo "$ac_t""yes" 1>&6
4092 echo "$ac_t""no" 1>&6
4095 CPPFLAGS="$ac_save_CPPFLAGS"
4098 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
4099 # to exist, but the library code to not exist. And even better, the library
4100 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
4101 # lib doesn't exist, give up.
4107 ac_save_CPPFLAGS="$CPPFLAGS"
4108 ac_save_LDFLAGS="$LDFLAGS"
4110 if test \! -z "$includedir" ; then
4111 CPPFLAGS="$CPPFLAGS -I$includedir"
4113 # note: $X_CFLAGS includes $x_includes
4114 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4116 if test \! -z "$libdir" ; then
4117 LDFLAGS="$LDFLAGS -L$libdir"
4119 # note: $X_LIBS includes $x_libraries
4120 LDFLAGS="$LDFLAGS $X_LIBS"
4122 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
4123 echo "configure:4135: checking for XShmQueryExtension in -lXextSam" >&5
4124 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
4125 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4126 echo $ac_n "(cached) $ac_c" 1>&6
4128 ac_save_LIBS="$LIBS"
4129 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
4130 cat > conftest.$ac_ext <<EOF
4131 #line 4143 "configure"
4132 #include "confdefs.h"
4133 /* Override any gcc2 internal prototype to avoid an error. */
4134 /* We use char because int might match the return type of a gcc2
4135 builtin and then its argument prototype would still apply. */
4136 char XShmQueryExtension();
4139 XShmQueryExtension()
4142 if { (eval echo configure:4154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4144 eval "ac_cv_lib_$ac_lib_var=yes"
4146 echo "configure: failed program was:" >&5
4147 cat conftest.$ac_ext >&5
4149 eval "ac_cv_lib_$ac_lib_var=no"
4152 LIBS="$ac_save_LIBS"
4155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4156 echo "$ac_t""yes" 1>&6
4157 have_xshm=yes; SAVER_LIBS="$SAVER_LIBS -lXextSam"
4159 echo "$ac_t""no" 1>&6
4162 CPPFLAGS="$ac_save_CPPFLAGS"
4163 LDFLAGS="$ac_save_LDFLAGS"
4167 # if that succeeded, then we've really got it.
4168 if test "$have_xshm" = yes; then
4169 cat >> confdefs.h <<\EOF
4170 #define HAVE_XSHM_EXTENSION 1
4175 elif test "$with_xshm" != no; then
4176 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
4181 # Check for the DOUBLE-BUFFER server extension header.
4184 with_xdbe_req=unspecified
4185 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
4186 if test "${with_xdbe_ext+set}" = set; then
4187 withval="$with_xdbe_ext"
4188 with_xdbe="$withval"; with_xdbe_req="$withval"
4195 case "$with_xdbe" in
4200 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
4201 echo "configure:4213: checking for DOUBLE-BUFFER headers" >&5
4202 d=$with_xdbe/include
4204 X_CFLAGS="-I$d $X_CFLAGS"
4205 echo "$ac_t""$d" 1>&6
4207 echo "$ac_t""not found ($d: no such directory)" 1>&6
4210 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
4211 echo "configure:4223: checking for DOUBLE-BUFFER libs" >&5
4214 X_LIBS="-L$d $X_LIBS"
4215 echo "$ac_t""$d" 1>&6
4217 echo "$ac_t""not found ($d: no such directory)" 1>&6
4220 # replace the directory string with "yes".
4222 with_xdbe=$with_xdbe_req
4227 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
4228 echo " If it is a directory, then \`DIR/include' will be added to"
4229 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4234 # why is this necessary?
4235 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4236 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4240 if test "$with_xdbe" = yes; then
4243 ac_save_CPPFLAGS="$CPPFLAGS"
4244 if test \! -z "$includedir" ; then
4245 CPPFLAGS="$CPPFLAGS -I$includedir"
4247 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4248 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
4249 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
4250 echo "configure:4262: checking for X11/extensions/Xdbe.h" >&5
4251 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4252 echo $ac_n "(cached) $ac_c" 1>&6
4254 cat > conftest.$ac_ext <<EOF
4255 #line 4267 "configure"
4256 #include "confdefs.h"
4257 #include <X11/extensions/Xdbe.h>
4259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4260 { (eval echo configure:4272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4262 if test -z "$ac_err"; then
4264 eval "ac_cv_header_$ac_safe=yes"
4267 echo "configure: failed program was:" >&5
4268 cat conftest.$ac_ext >&5
4270 eval "ac_cv_header_$ac_safe=no"
4274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4275 echo "$ac_t""yes" 1>&6
4278 echo "$ac_t""no" 1>&6
4281 CPPFLAGS="$ac_save_CPPFLAGS"
4282 if test "$have_xdbe" = yes; then
4283 cat >> confdefs.h <<\EOF
4284 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
4289 elif test "$with_xdbe" != no; then
4290 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
4295 # Check for the SGI-VIDEO-CONTROL server extension header.
4298 with_sgivc_req=unspecified
4299 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4300 if test "${with_sgivc_ext+set}" = set; then
4301 withval="$with_sgivc_ext"
4302 with_sgivc="$withval"; with_sgivc_req="$withval"
4309 case "$with_sgivc" in
4314 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4315 echo "configure:4327: checking for SGI-VIDEO-CONTROL headers" >&5
4316 d=$with_sgivc/include
4318 X_CFLAGS="-I$d $X_CFLAGS"
4319 echo "$ac_t""$d" 1>&6
4321 echo "$ac_t""not found ($d: no such directory)" 1>&6
4324 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4325 echo "configure:4337: checking for SGI-VIDEO-CONTROL libs" >&5
4328 X_LIBS="-L$d $X_LIBS"
4329 echo "$ac_t""$d" 1>&6
4331 echo "$ac_t""not found ($d: no such directory)" 1>&6
4334 # replace the directory string with "yes".
4335 with_sgivc_req="yes"
4336 with_sgivc=$with_sgivc_req
4341 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4342 echo " If it is a directory, then \`DIR/include' will be added to"
4343 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4348 # why is this necessary?
4349 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4350 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4354 if test "$with_sgivc" = yes; then
4356 # first check for XSGIvc.h
4358 ac_save_CPPFLAGS="$CPPFLAGS"
4359 if test \! -z "$includedir" ; then
4360 CPPFLAGS="$CPPFLAGS -I$includedir"
4362 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4363 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4364 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4365 echo "configure:4377: checking for X11/extensions/XSGIvc.h" >&5
4366 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4367 echo $ac_n "(cached) $ac_c" 1>&6
4369 cat > conftest.$ac_ext <<EOF
4370 #line 4382 "configure"
4371 #include "confdefs.h"
4372 #include <X11/extensions/XSGIvc.h>
4374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4375 { (eval echo configure:4387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4377 if test -z "$ac_err"; then
4379 eval "ac_cv_header_$ac_safe=yes"
4382 echo "configure: failed program was:" >&5
4383 cat conftest.$ac_ext >&5
4385 eval "ac_cv_header_$ac_safe=no"
4389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4390 echo "$ac_t""yes" 1>&6
4393 echo "$ac_t""no" 1>&6
4396 CPPFLAGS="$ac_save_CPPFLAGS"
4398 # if that succeeded, then check for the -lXsgivc
4399 if test "$have_sgivc" = yes; then
4402 ac_save_CPPFLAGS="$CPPFLAGS"
4403 ac_save_LDFLAGS="$LDFLAGS"
4405 if test \! -z "$includedir" ; then
4406 CPPFLAGS="$CPPFLAGS -I$includedir"
4408 # note: $X_CFLAGS includes $x_includes
4409 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4411 if test \! -z "$libdir" ; then
4412 LDFLAGS="$LDFLAGS -L$libdir"
4414 # note: $X_LIBS includes $x_libraries
4415 LDFLAGS="$LDFLAGS $X_LIBS"
4417 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4418 echo "configure:4430: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4419 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4421 echo $ac_n "(cached) $ac_c" 1>&6
4423 ac_save_LIBS="$LIBS"
4424 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4425 cat > conftest.$ac_ext <<EOF
4426 #line 4438 "configure"
4427 #include "confdefs.h"
4428 /* Override any gcc2 internal prototype to avoid an error. */
4429 /* We use char because int might match the return type of a gcc2
4430 builtin and then its argument prototype would still apply. */
4431 char XSGIvcQueryGammaMap();
4434 XSGIvcQueryGammaMap()
4437 if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4439 eval "ac_cv_lib_$ac_lib_var=yes"
4441 echo "configure: failed program was:" >&5
4442 cat conftest.$ac_ext >&5
4444 eval "ac_cv_lib_$ac_lib_var=no"
4447 LIBS="$ac_save_LIBS"
4450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4451 echo "$ac_t""yes" 1>&6
4452 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4454 echo "$ac_t""no" 1>&6
4457 CPPFLAGS="$ac_save_CPPFLAGS"
4458 LDFLAGS="$ac_save_LDFLAGS"
4461 # if that succeeded, then we've really got it.
4462 if test "$have_sgivc" = yes; then
4463 cat >> confdefs.h <<\EOF
4464 #define HAVE_SGI_VC_EXTENSION 1
4469 elif test "$with_sgivc" != no; then
4470 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4475 # Check for the DPMS server extension header.
4478 with_dpms_req=unspecified
4479 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4480 if test "${with_dpms_ext+set}" = set; then
4481 withval="$with_dpms_ext"
4482 with_dpms="$withval"; with_dpms_req="$withval"
4489 case "$with_dpms" in
4494 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4495 echo "configure:4507: checking for DPMS headers" >&5
4496 d=$with_dpms/include
4498 X_CFLAGS="-I$d $X_CFLAGS"
4499 echo "$ac_t""$d" 1>&6
4501 echo "$ac_t""not found ($d: no such directory)" 1>&6
4504 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4505 echo "configure:4517: checking for DPMS libs" >&5
4508 X_LIBS="-L$d $X_LIBS"
4509 echo "$ac_t""$d" 1>&6
4511 echo "$ac_t""not found ($d: no such directory)" 1>&6
4514 # replace the directory string with "yes".
4516 with_dpms=$with_dpms_req
4521 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4522 echo " If it is a directory, then \`DIR/include' will be added to"
4523 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4528 # why is this necessary?
4529 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4530 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4534 if test "$with_dpms" = yes; then
4536 # first check for dpms.h
4538 ac_save_CPPFLAGS="$CPPFLAGS"
4539 if test \! -z "$includedir" ; then
4540 CPPFLAGS="$CPPFLAGS -I$includedir"
4542 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4543 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4544 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4545 echo "configure:4557: checking for X11/extensions/dpms.h" >&5
4546 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4547 echo $ac_n "(cached) $ac_c" 1>&6
4549 cat > conftest.$ac_ext <<EOF
4550 #line 4562 "configure"
4551 #include "confdefs.h"
4552 #include <X11/extensions/dpms.h>
4554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4555 { (eval echo configure:4567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4557 if test -z "$ac_err"; then
4559 eval "ac_cv_header_$ac_safe=yes"
4562 echo "configure: failed program was:" >&5
4563 cat conftest.$ac_ext >&5
4565 eval "ac_cv_header_$ac_safe=no"
4569 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4570 echo "$ac_t""yes" 1>&6
4573 echo "$ac_t""no" 1>&6
4576 CPPFLAGS="$ac_save_CPPFLAGS"
4578 # if that succeeded, then check for the -lXdpms
4579 if test "$have_dpms" = yes; then
4582 ac_save_CPPFLAGS="$CPPFLAGS"
4583 ac_save_LDFLAGS="$LDFLAGS"
4585 if test \! -z "$includedir" ; then
4586 CPPFLAGS="$CPPFLAGS -I$includedir"
4588 # note: $X_CFLAGS includes $x_includes
4589 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4591 if test \! -z "$libdir" ; then
4592 LDFLAGS="$LDFLAGS -L$libdir"
4594 # note: $X_LIBS includes $x_libraries
4595 LDFLAGS="$LDFLAGS $X_LIBS"
4597 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4598 echo "configure:4610: checking for DPMSInfo in -lXdpms" >&5
4599 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4600 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4601 echo $ac_n "(cached) $ac_c" 1>&6
4603 ac_save_LIBS="$LIBS"
4604 LIBS="-lXdpms -lXext -lX11 $LIBS"
4605 cat > conftest.$ac_ext <<EOF
4606 #line 4618 "configure"
4607 #include "confdefs.h"
4608 /* Override any gcc2 internal prototype to avoid an error. */
4609 /* We use char because int might match the return type of a gcc2
4610 builtin and then its argument prototype would still apply. */
4617 if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4619 eval "ac_cv_lib_$ac_lib_var=yes"
4621 echo "configure: failed program was:" >&5
4622 cat conftest.$ac_ext >&5
4624 eval "ac_cv_lib_$ac_lib_var=no"
4627 LIBS="$ac_save_LIBS"
4630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4631 echo "$ac_t""yes" 1>&6
4632 have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
4634 echo "$ac_t""no" 1>&6
4637 CPPFLAGS="$ac_save_CPPFLAGS"
4638 LDFLAGS="$ac_save_LDFLAGS"
4641 # if that succeeded, then we've really got it.
4642 if test "$have_dpms" = yes; then
4643 cat >> confdefs.h <<\EOF
4644 #define HAVE_DPMS_EXTENSION 1
4649 elif test "$with_dpms" != no; then
4650 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4655 # Check for the XF86VMODE server extension header.
4658 with_xf86vmode_req=unspecified
4659 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4660 if test "${with_xf86vmode_ext+set}" = set; then
4661 withval="$with_xf86vmode_ext"
4662 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4669 case "$with_xf86vmode" in
4674 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4675 echo "configure:4687: checking for xf86vmode headers" >&5
4676 d=$with_xf86vmode/include
4678 X_CFLAGS="-I$d $X_CFLAGS"
4679 echo "$ac_t""$d" 1>&6
4681 echo "$ac_t""not found ($d: no such directory)" 1>&6
4684 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4685 echo "configure:4697: checking for xf86vmode libs" >&5
4686 d=$with_xf86vmode/lib
4688 X_LIBS="-L$d $X_LIBS"
4689 echo "$ac_t""$d" 1>&6
4691 echo "$ac_t""not found ($d: no such directory)" 1>&6
4694 # replace the directory string with "yes".
4695 with_xf86vmode_req="yes"
4696 with_xf86vmode=$with_xf86vmode_req
4701 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4702 echo " If it is a directory, then \`DIR/include' will be added to"
4703 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4708 # why is this necessary?
4709 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4710 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4714 if test "$with_xf86vmode" = yes; then
4716 # first check for xf86vmode.h
4718 ac_save_CPPFLAGS="$CPPFLAGS"
4719 if test \! -z "$includedir" ; then
4720 CPPFLAGS="$CPPFLAGS -I$includedir"
4722 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4723 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4724 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4725 echo "configure:4737: checking for X11/extensions/xf86vmode.h" >&5
4726 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4727 echo $ac_n "(cached) $ac_c" 1>&6
4729 cat > conftest.$ac_ext <<EOF
4730 #line 4742 "configure"
4731 #include "confdefs.h"
4732 #include <X11/extensions/xf86vmode.h>
4734 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4735 { (eval echo configure:4747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4736 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4737 if test -z "$ac_err"; then
4739 eval "ac_cv_header_$ac_safe=yes"
4742 echo "configure: failed program was:" >&5
4743 cat conftest.$ac_ext >&5
4745 eval "ac_cv_header_$ac_safe=no"
4749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4750 echo "$ac_t""yes" 1>&6
4753 echo "$ac_t""no" 1>&6
4756 CPPFLAGS="$ac_save_CPPFLAGS"
4758 # if that succeeded, then check for the -lXxf86vm
4759 if test "$have_xf86vmode" = yes; then
4762 ac_save_CPPFLAGS="$CPPFLAGS"
4763 ac_save_LDFLAGS="$LDFLAGS"
4765 if test \! -z "$includedir" ; then
4766 CPPFLAGS="$CPPFLAGS -I$includedir"
4768 # note: $X_CFLAGS includes $x_includes
4769 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4771 if test \! -z "$libdir" ; then
4772 LDFLAGS="$LDFLAGS -L$libdir"
4774 # note: $X_LIBS includes $x_libraries
4775 LDFLAGS="$LDFLAGS $X_LIBS"
4777 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4778 echo "configure:4790: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4779 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4780 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4781 echo $ac_n "(cached) $ac_c" 1>&6
4783 ac_save_LIBS="$LIBS"
4784 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4785 cat > conftest.$ac_ext <<EOF
4786 #line 4798 "configure"
4787 #include "confdefs.h"
4788 /* Override any gcc2 internal prototype to avoid an error. */
4789 /* We use char because int might match the return type of a gcc2
4790 builtin and then its argument prototype would still apply. */
4791 char XF86VidModeGetViewPort();
4794 XF86VidModeGetViewPort()
4797 if { (eval echo configure:4809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4799 eval "ac_cv_lib_$ac_lib_var=yes"
4801 echo "configure: failed program was:" >&5
4802 cat conftest.$ac_ext >&5
4804 eval "ac_cv_lib_$ac_lib_var=no"
4807 LIBS="$ac_save_LIBS"
4810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4811 echo "$ac_t""yes" 1>&6
4812 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4814 echo "$ac_t""no" 1>&6
4817 CPPFLAGS="$ac_save_CPPFLAGS"
4818 LDFLAGS="$ac_save_LDFLAGS"
4821 # if that succeeded, then we've really got it.
4822 if test "$have_xf86vmode" = yes; then
4823 cat >> confdefs.h <<\EOF
4824 #define HAVE_XF86VMODE 1
4829 elif test "$with_xf86vmode" != no; then
4830 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4835 # Check for /proc/interrupts
4837 have_proc_interrupts=no
4838 with_proc_interrupts_req=unspecified
4839 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4840 if test "${with_proc_interrupts+set}" = set; then
4841 withval="$with_proc_interrupts"
4842 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4844 with_proc_interrupts=yes
4848 if test "$with_proc_interrupts" = yes; then
4850 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4851 echo "configure:4863: checking whether /proc/interrupts contains keyboard data" >&5
4852 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4853 echo $ac_n "(cached) $ac_c" 1>&6
4855 ac_cv_have_proc_interrupts=no
4856 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4857 ac_cv_have_proc_interrupts=yes
4862 have_proc_interrupts=$ac_cv_have_proc_interrupts
4864 echo "$ac_t""$have_proc_interrupts" 1>&6
4866 if test "$have_proc_interrupts" = yes; then
4867 cat >> confdefs.h <<\EOF
4868 #define HAVE_PROC_INTERRUPTS 1
4873 elif test "$with_proc_interrupts" != no; then
4874 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
4880 # Check for Motif and Athena --with and --without arguments.
4885 with_motif_req=unspecified
4886 with_athena_req=unspecified
4888 # Check whether --with-motif or --without-motif was given.
4889 if test "${with_motif+set}" = set; then
4890 withval="$with_motif"
4891 with_motif="$withval"; with_motif_req="$withval"
4898 case "$with_motif" in
4903 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
4904 echo "configure:4916: checking for Motif headers" >&5
4905 d=$with_motif/include
4907 X_CFLAGS="-I$d $X_CFLAGS"
4908 echo "$ac_t""$d" 1>&6
4910 echo "$ac_t""not found ($d: no such directory)" 1>&6
4913 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
4914 echo "configure:4926: checking for Motif libs" >&5
4917 X_LIBS="-L$d $X_LIBS"
4918 echo "$ac_t""$d" 1>&6
4920 echo "$ac_t""not found ($d: no such directory)" 1>&6
4923 # replace the directory string with "yes".
4924 with_motif_req="yes"
4925 with_motif=$with_motif_req
4930 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
4931 echo " If it is a directory, then \`DIR/include' will be added to"
4932 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4937 # why is this necessary?
4938 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4939 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4943 # Check whether --with-athena or --without-athena was given.
4944 if test "${with_athena+set}" = set; then
4945 withval="$with_athena"
4946 with_athena="$withval"; with_athena_req="$withval"
4953 case "$with_athena" in
4958 echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
4959 echo "configure:4971: checking for Athena headers" >&5
4960 d=$with_athena/include
4962 X_CFLAGS="-I$d $X_CFLAGS"
4963 echo "$ac_t""$d" 1>&6
4965 echo "$ac_t""not found ($d: no such directory)" 1>&6
4968 echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
4969 echo "configure:4981: checking for Athena libs" >&5
4972 X_LIBS="-L$d $X_LIBS"
4973 echo "$ac_t""$d" 1>&6
4975 echo "$ac_t""not found ($d: no such directory)" 1>&6
4978 # replace the directory string with "yes".
4979 with_athena_req="yes"
4980 with_athena=$with_athena_req
4985 echo "error: argument to --with-athena must be \"yes\", \"no\", or a directory."
4986 echo " If it is a directory, then \`DIR/include' will be added to"
4987 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4992 # why is this necessary?
4993 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4994 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4998 if test "$with_motif" != yes -a "$with_motif" != no ; then
4999 echo "error: must be yes or no: --with-motif=$with_motif"
5003 if test "$with_athena" != yes -a "$with_athena" != no ; then
5004 echo "error: must be yes or no: --with-athena=$with_athena"
5009 # Saying --without-motif is the same as saying --with-athena.
5010 if test "$with_motif_req" = no ; then
5015 # Saying --without-athena is the same as saying --with-motif.
5016 if test "$with_athena_req" = no ; then
5021 # Check for Motif and Athena headers.
5025 ac_save_CPPFLAGS="$CPPFLAGS"
5026 if test \! -z "$includedir" ; then
5027 CPPFLAGS="$CPPFLAGS -I$includedir"
5029 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5030 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
5031 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
5032 echo "configure:5044: checking for Xm/Xm.h" >&5
5033 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5034 echo $ac_n "(cached) $ac_c" 1>&6
5036 cat > conftest.$ac_ext <<EOF
5037 #line 5049 "configure"
5038 #include "confdefs.h"
5041 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5042 { (eval echo configure:5054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5043 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5044 if test -z "$ac_err"; then
5046 eval "ac_cv_header_$ac_safe=yes"
5049 echo "configure: failed program was:" >&5
5050 cat conftest.$ac_ext >&5
5052 eval "ac_cv_header_$ac_safe=no"
5056 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5057 echo "$ac_t""yes" 1>&6
5059 cat >> confdefs.h <<\EOF
5060 #define HAVE_MOTIF 1
5063 TOOLKIT_LIBS="-lXm $TOOLKIT_LIBS"
5065 echo "$ac_t""no" 1>&6
5068 CPPFLAGS="$ac_save_CPPFLAGS"
5075 ac_save_CPPFLAGS="$CPPFLAGS"
5076 if test \! -z "$includedir" ; then
5077 CPPFLAGS="$CPPFLAGS -I$includedir"
5079 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5080 ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
5081 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
5082 echo "configure:5094: checking for X11/Xaw/Dialog.h" >&5
5083 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5084 echo $ac_n "(cached) $ac_c" 1>&6
5086 cat > conftest.$ac_ext <<EOF
5087 #line 5099 "configure"
5088 #include "confdefs.h"
5089 #include <X11/Xaw/Dialog.h>
5091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5092 { (eval echo configure:5104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5094 if test -z "$ac_err"; then
5096 eval "ac_cv_header_$ac_safe=yes"
5099 echo "configure: failed program was:" >&5
5100 cat conftest.$ac_ext >&5
5102 eval "ac_cv_header_$ac_safe=no"
5106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5107 echo "$ac_t""yes" 1>&6
5110 echo "$ac_t""no" 1>&6
5113 CPPFLAGS="$ac_save_CPPFLAGS"
5114 if test "$have_athena" = yes; then
5116 ac_save_CPPFLAGS="$CPPFLAGS"
5117 ac_save_LDFLAGS="$LDFLAGS"
5119 if test \! -z "$includedir" ; then
5120 CPPFLAGS="$CPPFLAGS -I$includedir"
5122 # note: $X_CFLAGS includes $x_includes
5123 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5125 if test \! -z "$libdir" ; then
5126 LDFLAGS="$LDFLAGS -L$libdir"
5128 # note: $X_LIBS includes $x_libraries
5129 LDFLAGS="$LDFLAGS $X_LIBS"
5131 echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
5132 echo "configure:5144: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
5133 ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'`
5134 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5135 echo $ac_n "(cached) $ac_c" 1>&6
5137 ac_save_LIBS="$LIBS"
5138 LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
5139 cat > conftest.$ac_ext <<EOF
5140 #line 5152 "configure"
5141 #include "confdefs.h"
5142 /* Override any gcc2 internal prototype to avoid an error. */
5143 /* We use char because int might match the return type of a gcc2
5144 builtin and then its argument prototype would still apply. */
5145 char Xaw3dComputeTopShadowRGB();
5148 Xaw3dComputeTopShadowRGB()
5151 if { (eval echo configure:5163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5153 eval "ac_cv_lib_$ac_lib_var=yes"
5155 echo "configure: failed program was:" >&5
5156 cat conftest.$ac_ext >&5
5158 eval "ac_cv_lib_$ac_lib_var=no"
5161 LIBS="$ac_save_LIBS"
5164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5165 echo "$ac_t""yes" 1>&6
5166 have_athena=yes; have_athena3d=yes
5168 echo "$ac_t""no" 1>&6
5171 CPPFLAGS="$ac_save_CPPFLAGS"
5172 LDFLAGS="$ac_save_LDFLAGS"
5175 if test "$have_athena3d" = yes; then
5176 TOOLKIT_LIBS="-lXaw3d $TOOLKIT_LIBS"
5177 elif test "$have_athena" = yes; then
5178 TOOLKIT_LIBS="-lXaw $TOOLKIT_LIBS"
5183 # If they asked for both motif and athena, check motif then athena.
5184 # If they asked for only motif, check motif then athena.
5185 # If they asked for only athena, check athena then motif.
5186 # If they asked for neither, check motif then athena.
5188 proselytize_motif=yes
5189 if test "$with_motif" = yes; then
5190 # asked for both, or for motif only
5192 if test "$have_motif" = yes; then
5199 elif test "$with_athena" = yes; then
5200 # asked for athena only
5202 if test "$have_athena" = yes; then
5204 proselytize_motif=no
5212 if test "$have_motif" = yes; then
5220 if test "$have_motif" = yes; then
5221 proselytize_motif=no
5224 # If we have Athena, check whether it's a version that includes
5225 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
5226 if test "$have_athena" = yes ; then
5227 echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
5228 echo "configure:5240: checking for XawViewportSetCoordinates in Viewport.h" >&5
5229 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
5230 echo $ac_n "(cached) $ac_c" 1>&6
5232 ac_cv_have_XawViewportSetCoordinates=no
5234 ac_save_CPPFLAGS="$CPPFLAGS"
5235 if test \! -z "$includedir" ; then
5236 CPPFLAGS="$CPPFLAGS -I$includedir"
5238 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5239 cat > conftest.$ac_ext <<EOF
5240 #line 5252 "configure"
5241 #include "confdefs.h"
5242 #include <X11/Xaw/Viewport.h>
5244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5245 egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then
5247 ac_cv_have_XawViewportSetCoordinates=yes
5251 CPPFLAGS="$ac_save_CPPFLAGS"
5254 echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6
5255 if test "$ac_cv_have_XawViewportSetCoordinates" = yes ; then
5256 cat >> confdefs.h <<\EOF
5257 #define HAVE_XawViewportSetCoordinates 1
5264 # If we have Motif, check whether it's really LessTif.
5267 if test "$have_motif" = yes ; then
5268 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
5269 echo "configure:5281: checking whether Motif is really LessTif" >&5
5270 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
5271 echo $ac_n "(cached) $ac_c" 1>&6
5274 ac_save_CPPFLAGS="$CPPFLAGS"
5275 if test \! -z "$includedir" ; then
5276 CPPFLAGS="$CPPFLAGS -I$includedir"
5278 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5279 cat > conftest.$ac_ext <<EOF
5280 #line 5292 "configure"
5281 #include "confdefs.h"
5284 long vers = LesstifVersion;
5287 if { (eval echo configure:5299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5289 ac_cv_have_lesstif=yes
5291 echo "configure: failed program was:" >&5
5292 cat conftest.$ac_ext >&5
5294 ac_cv_have_lesstif=no
5297 CPPFLAGS="$ac_save_CPPFLAGS"
5300 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
5301 have_lesstif=$ac_cv_have_lesstif
5305 unset ac_cv_lesstif_version
5306 unset ac_cv_lesstif_version_string
5308 lesstif_version=unknown
5309 lesstif_version_string=unknown
5311 if test "$have_lesstif" = yes ; then
5313 echo unknown > conftest-lt
5314 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
5315 echo "configure:5327: checking LessTif version number" >&5
5316 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
5317 echo $ac_n "(cached) $ac_c" 1>&6
5320 ac_save_CPPFLAGS="$CPPFLAGS"
5321 if test \! -z "$includedir" ; then
5322 CPPFLAGS="$CPPFLAGS -I$includedir"
5324 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5325 if test "$cross_compiling" = yes; then
5326 ac_cv_lesstif_version=unknown
5327 ac_cv_lesstif_version_string=unknown
5329 cat > conftest.$ac_ext <<EOF
5330 #line 5342 "configure"
5331 #include "confdefs.h"
5335 FILE *f = fopen("conftest-lt", "w");
5337 fprintf(f, "%d %d.%d\n", LesstifVersion,
5338 LESSTIF_VERSION, LESSTIF_REVISION);
5343 if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5345 ltv=`cat conftest-lt`
5346 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
5347 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
5349 echo "configure: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5352 ac_cv_lesstif_version=unknown
5353 ac_cv_lesstif_version_string=unknown
5358 CPPFLAGS="$ac_save_CPPFLAGS"
5361 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
5363 lesstif_version=$ac_cv_lesstif_version
5364 lesstif_version_string=$ac_cv_lesstif_version_string
5369 if test "$have_motif" = yes ; then
5371 echo unknown > conftest-mt
5372 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
5373 echo "configure:5385: checking Motif version number" >&5
5374 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
5375 echo $ac_n "(cached) $ac_c" 1>&6
5378 ac_save_CPPFLAGS="$CPPFLAGS"
5379 if test \! -z "$includedir" ; then
5380 CPPFLAGS="$CPPFLAGS -I$includedir"
5382 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5383 if test "$cross_compiling" = yes; then
5384 ac_cv_motif_version=unknown
5385 ac_cv_motif_version_string=unknown
5387 cat > conftest.$ac_ext <<EOF
5388 #line 5400 "configure"
5389 #include "confdefs.h"
5393 FILE *f = fopen("conftest-mt", "w");
5395 fprintf(f, "%d %d.%d\n", XmVersion,
5396 XmVERSION, XmREVISION);
5401 if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5403 mtv=`cat conftest-mt`
5404 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
5405 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
5407 echo "configure: failed program was:" >&5
5408 cat conftest.$ac_ext >&5
5410 ac_cv_motif_version=unknown
5411 ac_cv_motif_version_string=unknown
5416 CPPFLAGS="$ac_save_CPPFLAGS"
5419 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
5421 motif_version=$ac_cv_motif_version
5422 motif_version_string=$ac_cv_motif_version_string
5427 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
5428 # The deal is, Motif 2.x requires XPM -- but it's a compilation option of
5429 # the library whether to build the XPM code into libXm, or whether to rely
5430 # on an external libXm. So the only way to tell whether XPM is a link-time
5431 # requirement is to examine libXm.a, which is very difficult to do in an
5432 # autoconf script. So... if it's Motif 2.x, we always link against XPM if
5433 # the XPM lib exists (and this will be a no-op if libXm happens to already
5434 # have the XPM code in it.)
5436 motif_requires_xpm=no
5437 if test "$have_motif" = yes ; then
5438 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
5439 echo "configure:5451: checking whether Motif requires XPM" >&5
5440 if test "$motif_version" -ge 2000; then
5441 motif_requires_xpm=yes
5442 echo "$ac_t""maybe" 1>&6
5444 echo "$ac_t""no" 1>&6
5450 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
5451 # Extension". Why this extension isn't in -lXext with all the others,
5455 if test "$have_motif" = yes ; then
5458 ac_save_CPPFLAGS="$CPPFLAGS"
5459 ac_save_LDFLAGS="$LDFLAGS"
5461 if test \! -z "$includedir" ; then
5462 CPPFLAGS="$CPPFLAGS -I$includedir"
5464 # note: $X_CFLAGS includes $x_includes
5465 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5467 if test \! -z "$libdir" ; then
5468 LDFLAGS="$LDFLAGS -L$libdir"
5470 # note: $X_LIBS includes $x_libraries
5471 LDFLAGS="$LDFLAGS $X_LIBS"
5473 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
5474 echo "configure:5486: checking for XpQueryExtension in -lXp" >&5
5475 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
5476 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5477 echo $ac_n "(cached) $ac_c" 1>&6
5479 ac_save_LIBS="$LIBS"
5480 LIBS="-lXp -lX11 -lXext -lm $LIBS"
5481 cat > conftest.$ac_ext <<EOF
5482 #line 5494 "configure"
5483 #include "confdefs.h"
5484 /* Override any gcc2 internal prototype to avoid an error. */
5485 /* We use char because int might match the return type of a gcc2
5486 builtin and then its argument prototype would still apply. */
5487 char XpQueryExtension();
5493 if { (eval echo configure:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5495 eval "ac_cv_lib_$ac_lib_var=yes"
5497 echo "configure: failed program was:" >&5
5498 cat conftest.$ac_ext >&5
5500 eval "ac_cv_lib_$ac_lib_var=no"
5503 LIBS="$ac_save_LIBS"
5506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5507 echo "$ac_t""yes" 1>&6
5508 have_xp_ext=yes; TOOLKIT_LIBS="$TOOLKIT_LIBS -lXp"
5510 echo "$ac_t""no" 1>&6
5513 CPPFLAGS="$ac_save_CPPFLAGS"
5514 LDFLAGS="$ac_save_LDFLAGS"
5518 # Check for _Xsetlocale in -lXintl, since at least some recent versions
5519 # of Motif (on Linux) need it.
5522 if test "$have_motif" = yes ; then
5524 ac_save_CPPFLAGS="$CPPFLAGS"
5525 ac_save_LDFLAGS="$LDFLAGS"
5527 if test \! -z "$includedir" ; then
5528 CPPFLAGS="$CPPFLAGS -I$includedir"
5530 # note: $X_CFLAGS includes $x_includes
5531 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5533 if test \! -z "$libdir" ; then
5534 LDFLAGS="$LDFLAGS -L$libdir"
5536 # note: $X_LIBS includes $x_libraries
5537 LDFLAGS="$LDFLAGS $X_LIBS"
5539 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
5540 echo "configure:5552: checking for _Xsetlocale in -lXintl" >&5
5541 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
5542 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5543 echo $ac_n "(cached) $ac_c" 1>&6
5545 ac_save_LIBS="$LIBS"
5546 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
5547 cat > conftest.$ac_ext <<EOF
5548 #line 5560 "configure"
5549 #include "confdefs.h"
5550 /* Override any gcc2 internal prototype to avoid an error. */
5551 /* We use char because int might match the return type of a gcc2
5552 builtin and then its argument prototype would still apply. */
5559 if { (eval echo configure:5571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5561 eval "ac_cv_lib_$ac_lib_var=yes"
5563 echo "configure: failed program was:" >&5
5564 cat conftest.$ac_ext >&5
5566 eval "ac_cv_lib_$ac_lib_var=no"
5569 LIBS="$ac_save_LIBS"
5572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5573 echo "$ac_t""yes" 1>&6
5576 echo "$ac_t""no" 1>&6
5580 CPPFLAGS="$ac_save_CPPFLAGS"
5581 LDFLAGS="$ac_save_LDFLAGS"
5582 if test "$have_xintl" = yes; then
5583 TOOLKIT_LIBS="$TOOLKIT_LIBS -lXintl"
5588 # check for XPM header.
5591 with_xpm_req=unspecified
5592 # Check whether --with-xpm or --without-xpm was given.
5593 if test "${with_xpm+set}" = set; then
5595 with_xpm="$withval"; with_xpm_req="$withval"
5607 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
5608 echo "configure:5620: checking for XPM headers" >&5
5611 X_CFLAGS="-I$d $X_CFLAGS"
5612 echo "$ac_t""$d" 1>&6
5614 echo "$ac_t""not found ($d: no such directory)" 1>&6
5617 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
5618 echo "configure:5630: checking for XPM libs" >&5
5621 X_LIBS="-L$d $X_LIBS"
5622 echo "$ac_t""$d" 1>&6
5624 echo "$ac_t""not found ($d: no such directory)" 1>&6
5627 # replace the directory string with "yes".
5629 with_xpm=$with_xpm_req
5634 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
5635 echo " If it is a directory, then \`DIR/include' will be added to"
5636 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5641 # why is this necessary?
5642 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5643 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5647 if test "$with_xpm" = yes; then
5649 ac_save_CPPFLAGS="$CPPFLAGS"
5650 if test \! -z "$includedir" ; then
5651 CPPFLAGS="$CPPFLAGS -I$includedir"
5653 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5654 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
5655 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
5656 echo "configure:5668: checking for X11/xpm.h" >&5
5657 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5658 echo $ac_n "(cached) $ac_c" 1>&6
5660 cat > conftest.$ac_ext <<EOF
5661 #line 5673 "configure"
5662 #include "confdefs.h"
5663 #include <X11/xpm.h>
5665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5666 { (eval echo configure:5678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5668 if test -z "$ac_err"; then
5670 eval "ac_cv_header_$ac_safe=yes"
5673 echo "configure: failed program was:" >&5
5674 cat conftest.$ac_ext >&5
5676 eval "ac_cv_header_$ac_safe=no"
5680 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5681 echo "$ac_t""yes" 1>&6
5683 cat >> confdefs.h <<\EOF
5689 echo "$ac_t""no" 1>&6
5692 CPPFLAGS="$ac_save_CPPFLAGS"
5693 elif test "$with_xpm" != no; then
5694 echo "error: must be yes or no: --with-xpm=$with_xpm"
5698 # See comment near $motif_requires_xpm, above.
5699 # Need to do this here, after both Motif and XPM have been checked for.
5701 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
5702 if test "$motif_requires_xpm" = yes ; then
5703 TOOLKIT_LIBS="$TOOLKIT_LIBS $XPM_LIBS"
5708 # check for the GL header
5712 with_gl_req=unspecified
5713 # Check whether --with-gl or --without-gl was given.
5714 if test "${with_gl+set}" = set; then
5716 with_gl="$withval"; with_gl_req="$withval"
5728 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
5729 echo "configure:5741: checking for GL headers" >&5
5732 X_CFLAGS="-I$d $X_CFLAGS"
5733 echo "$ac_t""$d" 1>&6
5735 echo "$ac_t""not found ($d: no such directory)" 1>&6
5738 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
5739 echo "configure:5751: checking for GL libs" >&5
5742 X_LIBS="-L$d $X_LIBS"
5743 echo "$ac_t""$d" 1>&6
5745 echo "$ac_t""not found ($d: no such directory)" 1>&6
5748 # replace the directory string with "yes".
5750 with_gl=$with_gl_req
5755 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
5756 echo " If it is a directory, then \`DIR/include' will be added to"
5757 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5762 # why is this necessary?
5763 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5764 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5768 ac_mesagl_version=unknown
5769 ac_mesagl_version_string=unknown
5771 if test "$with_gl" = yes; then
5773 ac_save_CPPFLAGS="$CPPFLAGS"
5774 if test \! -z "$includedir" ; then
5775 CPPFLAGS="$CPPFLAGS -I$includedir"
5777 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5778 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
5779 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
5780 echo "configure:5792: checking for GL/gl.h" >&5
5781 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5782 echo $ac_n "(cached) $ac_c" 1>&6
5784 cat > conftest.$ac_ext <<EOF
5785 #line 5797 "configure"
5786 #include "confdefs.h"
5789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5790 { (eval echo configure:5802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5792 if test -z "$ac_err"; then
5794 eval "ac_cv_header_$ac_safe=yes"
5797 echo "configure: failed program was:" >&5
5798 cat conftest.$ac_ext >&5
5800 eval "ac_cv_header_$ac_safe=no"
5804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5805 echo "$ac_t""yes" 1>&6
5808 echo "$ac_t""no" 1>&6
5811 CPPFLAGS="$ac_save_CPPFLAGS"
5812 if test "$have_gl" = yes ; then
5814 ac_save_CPPFLAGS="$CPPFLAGS"
5815 if test \! -z "$includedir" ; then
5816 CPPFLAGS="$CPPFLAGS -I$includedir"
5818 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5819 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
5820 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
5821 echo "configure:5833: checking for GL/glx.h" >&5
5822 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5823 echo $ac_n "(cached) $ac_c" 1>&6
5825 cat > conftest.$ac_ext <<EOF
5826 #line 5838 "configure"
5827 #include "confdefs.h"
5830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5831 { (eval echo configure:5843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5833 if test -z "$ac_err"; then
5835 eval "ac_cv_header_$ac_safe=yes"
5838 echo "configure: failed program was:" >&5
5839 cat conftest.$ac_ext >&5
5841 eval "ac_cv_header_$ac_safe=no"
5845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5846 echo "$ac_t""yes" 1>&6
5849 echo "$ac_t""no" 1>&6
5852 CPPFLAGS="$ac_save_CPPFLAGS"
5855 # If we have the headers, try and figure out which vendor it's from.
5857 if test "$have_gl" = yes ; then
5859 cat >> confdefs.h <<\EOF
5864 # We need to know whether it's MesaGL so that we know which libraries
5867 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
5868 echo "configure:5880: checking whether GL is really MesaGL" >&5
5869 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
5870 echo $ac_n "(cached) $ac_c" 1>&6
5872 ac_cv_have_mesa_gl=no
5874 ac_save_CPPFLAGS="$CPPFLAGS"
5875 if test \! -z "$includedir" ; then
5876 CPPFLAGS="$CPPFLAGS -I$includedir"
5878 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5879 cat > conftest.$ac_ext <<EOF
5880 #line 5892 "configure"
5881 #include "confdefs.h"
5884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5885 egrep "Mesa" >/dev/null 2>&1; then
5887 ac_cv_have_mesa_gl=yes
5891 CPPFLAGS="$ac_save_CPPFLAGS"
5895 ac_have_mesa_gl=$ac_cv_have_mesa_gl
5896 echo "$ac_t""$ac_have_mesa_gl" 1>&6
5898 if test "$ac_have_mesa_gl" = no ; then
5900 GL_LIBS="-lGL -lGLU"
5902 cat >> confdefs.h <<\EOF
5903 #define HAVE_MESA_GL 1
5907 GL_LIBS="-lMesaGL -lMesaGLU"
5911 # If it's MesaGL, we'd like to issue a warning if the version number
5912 # is less than or equal to 2.6, because that version had a security bug.
5914 if test "$ac_have_mesa_gl" = yes; then
5916 # don't cache these.
5917 unset ac_cv_mesagl_version
5918 unset ac_cv_mesagl_version_string
5920 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
5921 echo "configure:5933: checking MesaGL version number" >&5
5922 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
5923 echo $ac_n "(cached) $ac_c" 1>&6
5925 cat > conftest.$ac_ext <<EOF
5926 #line 5938 "configure"
5927 #include "confdefs.h"
5929 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
5932 ac_save_CPPFLAGS="$CPPFLAGS"
5933 if test \! -z "$includedir" ; then
5934 CPPFLAGS="$CPPFLAGS -I$includedir"
5936 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5940 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
5941 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
5944 rm -f conftest.$ac_ext
5946 CPPFLAGS="$ac_save_CPPFLAGS"
5948 if test "$mglv" = ""; then
5949 ac_mesagl_version=unknown
5950 ac_mesagl_version_string=unknown
5952 ac_mesagl_version_string=$mglv
5953 maj=`echo $mglv | sed -n 's/\..*//p'`
5954 min=`echo $mglv | sed -n 's/.*\.//p'`
5955 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
5956 if test -z "$ac_mesagl_version"; then
5957 ac_mesagl_version=unknown
5958 ac_mesagl_version_string=unknown
5961 ac_cv_mesagl_version=$ac_mesagl_version
5962 ac_cv_mesagl_version_string=$ac_mesagl_version_string
5966 ac_mesagl_version=$ac_cv_mesagl_version
5967 ac_mesagl_version_string=$ac_cv_mesagl_version_string
5968 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
5972 # If it's MesaGL, check to see if it requires -lpthread.
5975 mesa_requires_pthread=no
5976 if test "$ac_have_mesa_gl" = yes; then
5978 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5979 echo "configure:5991: checking for pthread_create in -lpthread" >&5
5980 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
5981 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5982 echo $ac_n "(cached) $ac_c" 1>&6
5984 ac_save_LIBS="$LIBS"
5985 LIBS="-lpthread $LIBS"
5986 cat > conftest.$ac_ext <<EOF
5987 #line 5999 "configure"
5988 #include "confdefs.h"
5989 /* Override any gcc2 internal prototype to avoid an error. */
5990 /* We use char because int might match the return type of a gcc2
5991 builtin and then its argument prototype would still apply. */
5992 char pthread_create();
5998 if { (eval echo configure:6010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6000 eval "ac_cv_lib_$ac_lib_var=yes"
6002 echo "configure: failed program was:" >&5
6003 cat conftest.$ac_ext >&5
6005 eval "ac_cv_lib_$ac_lib_var=no"
6008 LIBS="$ac_save_LIBS"
6011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6012 echo "$ac_t""yes" 1>&6
6015 echo "$ac_t""no" 1>&6
6018 if test "$have_pthread" = yes; then
6020 ac_save_CPPFLAGS="$CPPFLAGS"
6021 ac_save_LDFLAGS="$LDFLAGS"
6023 if test \! -z "$includedir" ; then
6024 CPPFLAGS="$CPPFLAGS -I$includedir"
6026 # note: $X_CFLAGS includes $x_includes
6027 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6029 if test \! -z "$libdir" ; then
6030 LDFLAGS="$LDFLAGS -L$libdir"
6032 # note: $X_LIBS includes $x_libraries
6033 LDFLAGS="$LDFLAGS $X_LIBS"
6035 echo $ac_n "checking for gl_get_thread_context in -l$gl_lib_1""... $ac_c" 1>&6
6036 echo "configure:6048: checking for gl_get_thread_context in -l$gl_lib_1" >&5
6037 ac_lib_var=`echo $gl_lib_1'_'gl_get_thread_context | sed 'y%./+-%__p_%'`
6038 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6039 echo $ac_n "(cached) $ac_c" 1>&6
6041 ac_save_LIBS="$LIBS"
6042 LIBS="-l$gl_lib_1 $GL_LIBS -lpthread -lX11 -lXext -lm $LIBS"
6043 cat > conftest.$ac_ext <<EOF
6044 #line 6056 "configure"
6045 #include "confdefs.h"
6046 /* Override any gcc2 internal prototype to avoid an error. */
6047 /* We use char because int might match the return type of a gcc2
6048 builtin and then its argument prototype would still apply. */
6049 char gl_get_thread_context();
6052 gl_get_thread_context()
6055 if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6057 eval "ac_cv_lib_$ac_lib_var=yes"
6059 echo "configure: failed program was:" >&5
6060 cat conftest.$ac_ext >&5
6062 eval "ac_cv_lib_$ac_lib_var=no"
6065 LIBS="$ac_save_LIBS"
6068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6069 echo "$ac_t""yes" 1>&6
6070 mesa_requires_pthread=yes
6072 echo "$ac_t""no" 1>&6
6075 CPPFLAGS="$ac_save_CPPFLAGS"
6076 LDFLAGS="$ac_save_LDFLAGS"
6079 if test "$mesa_requires_pthread" = yes; then
6080 GL_LIBS="$GL_LIBS -lpthread"
6084 # Check for OpenGL 1.1 features.
6087 ac_save_CPPFLAGS="$CPPFLAGS"
6088 ac_save_LDFLAGS="$LDFLAGS"
6090 if test \! -z "$includedir" ; then
6091 CPPFLAGS="$CPPFLAGS -I$includedir"
6093 # note: $X_CFLAGS includes $x_includes
6094 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6096 if test \! -z "$libdir" ; then
6097 LDFLAGS="$LDFLAGS -L$libdir"
6099 # note: $X_LIBS includes $x_libraries
6100 LDFLAGS="$LDFLAGS $X_LIBS"
6102 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
6103 echo "configure:6115: checking for glBindTexture in -l$gl_lib_1" >&5
6104 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
6105 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6106 echo $ac_n "(cached) $ac_c" 1>&6
6108 ac_save_LIBS="$LIBS"
6109 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
6110 cat > conftest.$ac_ext <<EOF
6111 #line 6123 "configure"
6112 #include "confdefs.h"
6113 /* Override any gcc2 internal prototype to avoid an error. */
6114 /* We use char because int might match the return type of a gcc2
6115 builtin and then its argument prototype would still apply. */
6116 char glBindTexture();
6122 if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6124 eval "ac_cv_lib_$ac_lib_var=yes"
6126 echo "configure: failed program was:" >&5
6127 cat conftest.$ac_ext >&5
6129 eval "ac_cv_lib_$ac_lib_var=no"
6132 LIBS="$ac_save_LIBS"
6135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6136 echo "$ac_t""yes" 1>&6
6137 cat >> confdefs.h <<\EOF
6138 #define HAVE_GLBINDTEXTURE 1
6142 echo "$ac_t""no" 1>&6
6145 CPPFLAGS="$ac_save_CPPFLAGS"
6146 LDFLAGS="$ac_save_LDFLAGS"
6149 # Check whether the `xscreensaver' executable should link against GL.
6150 # See comments in utils/visual-gl.c for why this is sometimes necessary.
6152 echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6
6153 echo "configure:6165: checking whether drastic GL measures must be taken" >&5
6156 echo "$ac_t""yes -- hello, SGI." 1>&6
6157 cat >> confdefs.h <<\EOF
6158 #define DAEMON_USE_GL 1
6161 SAVER_GL_SRCS='$(UTILS_SRC)/visual-gl.c'
6162 SAVER_GL_OBJS='$(UTILS_BIN)/visual-gl.o'
6163 SAVER_GL_LIBS="$GL_LIBS"
6166 echo "$ac_t""no -- non-SGI." 1>&6
6175 elif test "$with_gl" != no; then
6176 echo "error: must be yes or no: --with-gl=$with_gl"
6181 # check for SGI XReadDisplay server extension header.
6184 with_readdisplay_req=unspecified
6185 # Check whether --with-readdisplay or --without-readdisplay was given.
6186 if test "${with_readdisplay+set}" = set; then
6187 withval="$with_readdisplay"
6188 with_readdisplay="$withval"; with_readdisplay_req="$withval"
6190 with_readdisplay=yes
6195 case "$with_readdisplay" in
6200 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
6201 echo "configure:6213: checking for XReadDisplay headers" >&5
6202 d=$with_readdisplay/include
6204 X_CFLAGS="-I$d $X_CFLAGS"
6205 echo "$ac_t""$d" 1>&6
6207 echo "$ac_t""not found ($d: no such directory)" 1>&6
6210 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
6211 echo "configure:6223: checking for XReadDisplay libs" >&5
6212 d=$with_readdisplay/lib
6214 X_LIBS="-L$d $X_LIBS"
6215 echo "$ac_t""$d" 1>&6
6217 echo "$ac_t""not found ($d: no such directory)" 1>&6
6220 # replace the directory string with "yes".
6221 with_readdisplay_req="yes"
6222 with_readdisplay=$with_readdisplay_req
6227 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
6228 echo " If it is a directory, then \`DIR/include' will be added to"
6229 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6234 # why is this necessary?
6235 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6236 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6240 if test "$with_readdisplay" = yes; then
6242 ac_save_CPPFLAGS="$CPPFLAGS"
6243 if test \! -z "$includedir" ; then
6244 CPPFLAGS="$CPPFLAGS -I$includedir"
6246 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6247 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
6248 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
6249 echo "configure:6261: checking for X11/extensions/readdisplay.h" >&5
6250 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6251 echo $ac_n "(cached) $ac_c" 1>&6
6253 cat > conftest.$ac_ext <<EOF
6254 #line 6266 "configure"
6255 #include "confdefs.h"
6256 #include <X11/extensions/readdisplay.h>
6258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6259 { (eval echo configure:6271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6261 if test -z "$ac_err"; then
6263 eval "ac_cv_header_$ac_safe=yes"
6266 echo "configure: failed program was:" >&5
6267 cat conftest.$ac_ext >&5
6269 eval "ac_cv_header_$ac_safe=no"
6273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6274 echo "$ac_t""yes" 1>&6
6275 cat >> confdefs.h <<\EOF
6276 #define HAVE_READ_DISPLAY_EXTENSION 1
6280 echo "$ac_t""no" 1>&6
6283 CPPFLAGS="$ac_save_CPPFLAGS"
6284 elif test "$with_readdisplay" != no; then
6285 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
6290 # check for SGI's Iris Video Library header.
6293 with_sgivideo_req=unspecified
6294 # Check whether --with-sgivideo or --without-sgivideo was given.
6295 if test "${with_sgivideo+set}" = set; then
6296 withval="$with_sgivideo"
6297 with_sgivideo="$withval"; with_sgivideo_req="$withval"
6304 case "$with_sgivideo" in
6309 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
6310 echo "configure:6322: checking for Iris Video headers" >&5
6311 d=$with_sgivideo/include
6313 X_CFLAGS="-I$d $X_CFLAGS"
6314 echo "$ac_t""$d" 1>&6
6316 echo "$ac_t""not found ($d: no such directory)" 1>&6
6319 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
6320 echo "configure:6332: checking for Iris Video libs" >&5
6321 d=$with_sgivideo/lib
6323 X_LIBS="-L$d $X_LIBS"
6324 echo "$ac_t""$d" 1>&6
6326 echo "$ac_t""not found ($d: no such directory)" 1>&6
6329 # replace the directory string with "yes".
6330 with_sgivideo_req="yes"
6331 with_sgivideo=$with_sgivideo_req
6336 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
6337 echo " If it is a directory, then \`DIR/include' will be added to"
6338 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6343 # why is this necessary?
6344 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6345 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6349 if test "$with_sgivideo" = yes; then
6351 ac_save_CPPFLAGS="$CPPFLAGS"
6352 if test \! -z "$includedir" ; then
6353 CPPFLAGS="$CPPFLAGS -I$includedir"
6355 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6356 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
6357 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
6358 echo "configure:6370: checking for dmedia/vl.h" >&5
6359 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6360 echo $ac_n "(cached) $ac_c" 1>&6
6362 cat > conftest.$ac_ext <<EOF
6363 #line 6375 "configure"
6364 #include "confdefs.h"
6365 #include <dmedia/vl.h>
6367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6368 { (eval echo configure:6380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6370 if test -z "$ac_err"; then
6372 eval "ac_cv_header_$ac_safe=yes"
6375 echo "configure: failed program was:" >&5
6376 cat conftest.$ac_ext >&5
6378 eval "ac_cv_header_$ac_safe=no"
6382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6383 echo "$ac_t""yes" 1>&6
6386 echo "$ac_t""no" 1>&6
6389 CPPFLAGS="$ac_save_CPPFLAGS"
6390 if test "$have_sgivideo" = yes; then
6392 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
6393 echo "configure:6405: checking for vlOpenVideo in -lvl" >&5
6394 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
6395 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6396 echo $ac_n "(cached) $ac_c" 1>&6
6398 ac_save_LIBS="$LIBS"
6400 cat > conftest.$ac_ext <<EOF
6401 #line 6413 "configure"
6402 #include "confdefs.h"
6403 /* Override any gcc2 internal prototype to avoid an error. */
6404 /* We use char because int might match the return type of a gcc2
6405 builtin and then its argument prototype would still apply. */
6412 if { (eval echo configure:6424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6414 eval "ac_cv_lib_$ac_lib_var=yes"
6416 echo "configure: failed program was:" >&5
6417 cat conftest.$ac_ext >&5
6419 eval "ac_cv_lib_$ac_lib_var=no"
6422 LIBS="$ac_save_LIBS"
6425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6426 echo "$ac_t""yes" 1>&6
6429 echo "$ac_t""no" 1>&6
6432 if test "$have_sgivideo" = yes; then
6433 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
6434 SGI_VIDEO_LIBS="-lvl"
6435 cat >> confdefs.h <<\EOF
6436 #define HAVE_SGI_VIDEO 1
6441 elif test "$with_sgivideo" != no; then
6442 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
6448 # Try to find a program to generate random text.
6450 # Zippy is funnier than the idiocy generally spat out by `fortune',
6451 # so try to find that, by invoking Emacs and asking it where its
6452 # libexec directory is ("yow" lives in there.)
6454 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
6455 # and if so, use them.
6457 # If that doesn't work, look in /usr/games, and if it's there, use
6458 # the full pathname.
6461 # Check whether --with-zippy or --without-zippy was given.
6462 if test "${with_zippy+set}" = set; then
6463 withval="$with_zippy"
6464 with_zippy_req="$withval"; with_zippy="$withval"
6466 with_zippy_req="$withval"; with_zippy="$withval"
6470 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
6475 if test -n "$with_zippy_req" ; then
6476 ac_cv_zippy_program=""
6477 case "$with_zippy_req" in
6479 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
6480 echo "configure:6492: checking for $with_zippy_req" >&5
6481 if test -x "$with_zippy_req" ; then
6482 echo "$ac_t""yes" 1>&6
6484 echo "$ac_t""no" 1>&6
6490 unset ac_cv_path_zip2
6491 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
6492 set dummy $with_zippy_req; ac_word=$2
6493 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6494 echo "configure:6506: checking for $ac_word" >&5
6495 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
6496 echo $ac_n "(cached) $ac_c" 1>&6
6500 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
6503 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
6506 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6508 for ac_dir in $ac_dummy; do
6509 test -z "$ac_dir" && ac_dir=.
6510 if test -f $ac_dir/$ac_word; then
6511 ac_cv_path_zip2="$ac_dir/$ac_word"
6519 zip2="$ac_cv_path_zip2"
6520 if test -n "$zip2"; then
6521 echo "$ac_t""$zip2" 1>&6
6523 echo "$ac_t""no" 1>&6
6526 if test "$zip2" = ""; then
6531 ac_cv_zippy_program="$with_zippy"
6533 elif test -n "$ac_cv_zippy_program"; then
6534 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
6537 if test ! -n "$ac_cv_zippy_program"; then
6539 for ac_prog in emacs
6541 # Extract the first word of "$ac_prog", so it can be a program name with args.
6542 set dummy $ac_prog; ac_word=$2
6543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6544 echo "configure:6556: checking for $ac_word" >&5
6545 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
6546 echo $ac_n "(cached) $ac_c" 1>&6
6548 if test -n "$emacs_exe"; then
6549 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
6551 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6553 for ac_dir in $ac_dummy; do
6554 test -z "$ac_dir" && ac_dir=.
6555 if test -f $ac_dir/$ac_word; then
6556 ac_cv_prog_emacs_exe="$ac_prog"
6563 emacs_exe="$ac_cv_prog_emacs_exe"
6564 if test -n "$emacs_exe"; then
6565 echo "$ac_t""$emacs_exe" 1>&6
6567 echo "$ac_t""no" 1>&6
6570 test -n "$emacs_exe" && break
6573 for ac_prog in xemacs
6575 # Extract the first word of "$ac_prog", so it can be a program name with args.
6576 set dummy $ac_prog; ac_word=$2
6577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6578 echo "configure:6590: checking for $ac_word" >&5
6579 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
6580 echo $ac_n "(cached) $ac_c" 1>&6
6582 if test -n "$xemacs_exe"; then
6583 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
6585 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6587 for ac_dir in $ac_dummy; do
6588 test -z "$ac_dir" && ac_dir=.
6589 if test -f $ac_dir/$ac_word; then
6590 ac_cv_prog_xemacs_exe="$ac_prog"
6597 xemacs_exe="$ac_cv_prog_xemacs_exe"
6598 if test -n "$xemacs_exe"; then
6599 echo "$ac_t""$xemacs_exe" 1>&6
6601 echo "$ac_t""no" 1>&6
6604 test -n "$xemacs_exe" && break
6608 ac_cv_zippy_program=""
6609 eargs='-batch -q -nw --eval'
6611 if test -n "$emacs_exe" ; then
6612 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
6613 echo "configure:6625: checking for emacs yow" >&5
6615 # get emacs to tell us where the libexec directory is.
6617 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
6618 2>/dev/null | tail -1`
6619 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
6621 # try running libexec/yow and see if it exits without error.
6623 if test x"$dir" != x -a -x "$dir/yow" ; then
6624 if $dir/yow >&- 2>&- ; then
6625 ac_cv_zippy_program="$dir/yow"
6626 echo "$ac_t""$ac_cv_zippy_program" 1>&6
6628 echo "$ac_t""no" 1>&6
6633 if test -z "$ac_cv_zippy_program" ; then
6634 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
6635 echo "configure:6647: checking for xemacs yow" >&5
6636 if test -n "$xemacs_exe" ; then
6638 # get xemacs to tell us where the libexec directory is.
6640 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
6641 2>/dev/null | tail -1`
6642 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
6644 # try running libexec/yow and see if it exits without error.
6646 if test x"$dir" != x -a -x "$dir/yow" ; then
6647 if $dir/yow >&- 2>&- ; then
6648 ac_cv_zippy_program="$dir/yow"
6649 echo "$ac_t""$ac_cv_zippy_program" 1>&6
6652 # in some xemacs installations, the pathname of the yow.lines file
6653 # isn't hardcoded into the yow executable, and must be passed on
6654 # the command line. See if it's in libexec/../etc/.
6658 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
6661 yowlines="$dir_up/etc/yow.lines"
6662 if $dir/yow -f $yowlines >&- 2>&- ; then
6663 ac_cv_zippy_program="$dir/yow -f $yowlines"
6664 echo "$ac_t""$ac_cv_zippy_program" 1>&6
6667 # In newer XEmacs releases, yow.lines is in a different place,
6668 # and the easiest way to get it is by calling the new function
6669 # `locate-data-file'.
6671 yowlines=`$xemacs_exe $eargs \
6672 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
6673 2>/dev/null | tail -1`
6674 if $dir/yow -f $yowlines >&- 2>&- ; then
6675 ac_cv_zippy_program="$dir/yow -f $yowlines"
6676 echo "$ac_t""$ac_cv_zippy_program" 1>&6
6678 echo "$ac_t""no" 1>&6
6686 # if that didn't work, try for some other programs...
6687 if test -z "$ac_cv_zippy_program" ; then
6689 for ac_prog in fortune zippy yow
6691 # Extract the first word of "$ac_prog", so it can be a program name with args.
6692 set dummy $ac_prog; ac_word=$2
6693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6694 echo "configure:6706: checking for $ac_word" >&5
6695 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
6696 echo $ac_n "(cached) $ac_c" 1>&6
6698 if test -n "$fortune"; then
6699 ac_cv_prog_fortune="$fortune" # Let the user override the test.
6701 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6703 for ac_dir in $ac_dummy; do
6704 test -z "$ac_dir" && ac_dir=.
6705 if test -f $ac_dir/$ac_word; then
6706 ac_cv_prog_fortune="$ac_prog"
6713 fortune="$ac_cv_prog_fortune"
6714 if test -n "$fortune"; then
6715 echo "$ac_t""$fortune" 1>&6
6717 echo "$ac_t""no" 1>&6
6720 test -n "$fortune" && break
6723 # if that didn't work, try for those programs in /usr/games...
6724 if test -z "$fortune" ; then
6725 for ac_prog in fortune zippy yow
6727 # Extract the first word of "$ac_prog", so it can be a program name with args.
6728 set dummy $ac_prog; ac_word=$2
6729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6730 echo "configure:6742: checking for $ac_word" >&5
6731 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
6732 echo $ac_n "(cached) $ac_c" 1>&6
6736 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
6739 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
6742 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6743 ac_dummy="/usr/games:/usr/local/games"
6744 for ac_dir in $ac_dummy; do
6745 test -z "$ac_dir" && ac_dir=.
6746 if test -f $ac_dir/$ac_word; then
6747 ac_cv_path_fortune="$ac_dir/$ac_word"
6755 fortune="$ac_cv_path_fortune"
6756 if test -n "$fortune"; then
6757 echo "$ac_t""$fortune" 1>&6
6759 echo "$ac_t""no" 1>&6
6762 test -n "$fortune" && break
6764 test -n "$fortune" || fortune="fortune"
6770 if test -z "$ac_cv_zippy_program" ; then
6771 ac_cv_zippy_program=fortune
6774 cat >> confdefs.h <<EOF
6775 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
6782 # Allow locking to be disabled at compile-time.
6785 with_kerberos_req=unspecified
6787 with_shadow_req=unspecified
6789 with_pam_req=unspecified
6792 # Check whether --enable-locking or --disable-locking was given.
6793 if test "${enable_locking+set}" = set; then
6794 enableval="$enable_locking"
6795 enable_locking="$enableval"
6800 if test "$enable_locking" = yes; then
6802 elif test "$enable_locking" = no; then
6803 cat >> confdefs.h <<\EOF
6804 #define NO_LOCKING 1
6808 echo "error: must be yes or no: --enable-locking=$enable_locking"
6814 # Check to see if we can lock Virtual-Terminal switching, but allow that
6815 # to be disabled at compile-time.
6818 # Check whether --enable-vt-locking or --disable-vt-locking was given.
6819 if test "${enable_vt_locking+set}" = set; then
6820 enableval="$enable_vt_locking"
6821 enable_vt_locking="$enableval"
6823 enable_vt_locking=yes
6826 if test "$enable_vt_locking" = yes; then
6828 echo $ac_n "checking for the VT_LOCKSWITCH ioctl""... $ac_c" 1>&6
6829 echo "configure:6841: checking for the VT_LOCKSWITCH ioctl" >&5
6830 if eval "test \"`echo '$''{'ac_cv_vt_lockswitch'+set}'`\" = set"; then
6831 echo $ac_n "(cached) $ac_c" 1>&6
6833 cat > conftest.$ac_ext <<EOF
6834 #line 6846 "configure"
6835 #include "confdefs.h"
6837 #include <sys/ioctl.h>
6840 int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;
6843 if { (eval echo configure:6855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6845 ac_cv_vt_lockswitch=yes
6847 echo "configure: failed program was:" >&5
6848 cat conftest.$ac_ext >&5
6850 ac_cv_vt_lockswitch=no
6855 ac_vt_lockswitch=$ac_cv_vt_lockswitch
6856 echo "$ac_t""$ac_vt_lockswitch" 1>&6
6858 elif test "$enable_vt_locking" = no; then
6861 echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
6865 if test "$ac_vt_lockswitch" = yes; then
6866 cat >> confdefs.h <<\EOF
6867 #define HAVE_VT_LOCKSWITCH 1
6870 # the VT_LOCKSWITCH ioctl can only be used when running as root.
6871 # #### but it doesn't work yet, so don't worry about that for now.
6877 if test "$enable_locking" = yes; then
6879 # Check for Kerberos.
6881 # Check whether --with-kerberos or --without-kerberos was given.
6882 if test "${with_kerberos+set}" = set; then
6883 withval="$with_kerberos"
6884 with_kerberos="$withval"; with_kerberos_req="$withval"
6891 case "$with_kerberos" in
6896 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
6897 echo "configure:6909: checking for Kerberos headers" >&5
6898 d=$with_kerberos/include
6900 X_CFLAGS="-I$d $X_CFLAGS"
6901 echo "$ac_t""$d" 1>&6
6903 echo "$ac_t""not found ($d: no such directory)" 1>&6
6906 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
6907 echo "configure:6919: checking for Kerberos libs" >&5
6908 d=$with_kerberos/lib
6910 X_LIBS="-L$d $X_LIBS"
6911 echo "$ac_t""$d" 1>&6
6913 echo "$ac_t""not found ($d: no such directory)" 1>&6
6916 # replace the directory string with "yes".
6917 with_kerberos_req="yes"
6918 with_kerberos=$with_kerberos_req
6923 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
6924 echo " If it is a directory, then \`DIR/include' will be added to"
6925 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6930 # why is this necessary?
6931 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6932 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6936 if test "$with_kerberos" = yes; then
6937 echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
6938 echo "configure:6950: checking for Kerberos" >&5
6939 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
6940 echo $ac_n "(cached) $ac_c" 1>&6
6943 ac_save_CPPFLAGS="$CPPFLAGS"
6944 if test \! -z "$includedir" ; then
6945 CPPFLAGS="$CPPFLAGS -I$includedir"
6947 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6948 cat > conftest.$ac_ext <<EOF
6949 #line 6961 "configure"
6950 #include "confdefs.h"
6956 if { (eval echo configure:6968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6960 echo "configure: failed program was:" >&5
6961 cat conftest.$ac_ext >&5
6966 CPPFLAGS="$ac_save_CPPFLAGS"
6969 echo "$ac_t""$ac_cv_kerberos" 1>&6
6970 if test "$ac_cv_kerberos" = yes ; then
6972 cat >> confdefs.h <<\EOF
6973 #define HAVE_KERBEROS 1
6977 # from Tim Showalter <tjs+@andrew.cmu.edu>
6978 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
6979 echo $ac_n "checking for res_search""... $ac_c" 1>&6
6980 echo "configure:6992: checking for res_search" >&5
6981 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
6982 echo $ac_n "(cached) $ac_c" 1>&6
6984 cat > conftest.$ac_ext <<EOF
6985 #line 6997 "configure"
6986 #include "confdefs.h"
6987 /* System header to define __stub macros and hopefully few prototypes,
6988 which can conflict with char res_search(); below. */
6990 /* Override any gcc2 internal prototype to avoid an error. */
6991 /* We use char because int might match the return type of a gcc2
6992 builtin and then its argument prototype would still apply. */
6997 /* The GNU C library defines this for functions which it implements
6998 to always fail with ENOSYS. Some functions are actually named
6999 something starting with __ and the normal name is an alias. */
7000 #if defined (__stub_res_search) || defined (__stub___res_search)
7008 if { (eval echo configure:7020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7010 eval "ac_cv_func_res_search=yes"
7012 echo "configure: failed program was:" >&5
7013 cat conftest.$ac_ext >&5
7015 eval "ac_cv_func_res_search=no"
7020 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
7021 echo "$ac_t""yes" 1>&6
7024 echo "$ac_t""no" 1>&6
7025 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
7026 echo "configure:7038: checking for res_search in -lresolv" >&5
7027 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
7028 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7029 echo $ac_n "(cached) $ac_c" 1>&6
7031 ac_save_LIBS="$LIBS"
7032 LIBS="-lresolv $LIBS"
7033 cat > conftest.$ac_ext <<EOF
7034 #line 7046 "configure"
7035 #include "confdefs.h"
7036 /* Override any gcc2 internal prototype to avoid an error. */
7037 /* We use char because int might match the return type of a gcc2
7038 builtin and then its argument prototype would still apply. */
7045 if { (eval echo configure:7057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7047 eval "ac_cv_lib_$ac_lib_var=yes"
7049 echo "configure: failed program was:" >&5
7050 cat conftest.$ac_ext >&5
7052 eval "ac_cv_lib_$ac_lib_var=no"
7055 LIBS="$ac_save_LIBS"
7058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7059 echo "$ac_t""yes" 1>&6
7060 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
7062 echo "$ac_t""no" 1>&6
7063 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
7071 elif test "$with_kerberos" != no; then
7072 echo "error: must be yes or no: --with-kerberos=$with_kerberos"
7077 # Check whether --with-pam or --without-pam was given.
7078 if test "${with_pam+set}" = set; then
7080 with_pam="$withval"; with_pam_req="$withval"
7092 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
7093 echo "configure:7105: checking for PAM headers" >&5
7096 X_CFLAGS="-I$d $X_CFLAGS"
7097 echo "$ac_t""$d" 1>&6
7099 echo "$ac_t""not found ($d: no such directory)" 1>&6
7102 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
7103 echo "configure:7115: checking for PAM libs" >&5
7106 X_LIBS="-L$d $X_LIBS"
7107 echo "$ac_t""$d" 1>&6
7109 echo "$ac_t""not found ($d: no such directory)" 1>&6
7112 # replace the directory string with "yes".
7114 with_pam=$with_pam_req
7119 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
7120 echo " If it is a directory, then \`DIR/include' will be added to"
7121 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7126 # why is this necessary?
7127 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
7128 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
7132 if test "$with_pam" = yes; then
7133 echo $ac_n "checking for PAM""... $ac_c" 1>&6
7134 echo "configure:7146: checking for PAM" >&5
7135 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
7136 echo $ac_n "(cached) $ac_c" 1>&6
7139 ac_save_CPPFLAGS="$CPPFLAGS"
7140 if test \! -z "$includedir" ; then
7141 CPPFLAGS="$CPPFLAGS -I$includedir"
7143 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7144 cat > conftest.$ac_ext <<EOF
7145 #line 7157 "configure"
7146 #include "confdefs.h"
7147 #include <security/pam_appl.h>
7152 if { (eval echo configure:7164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7156 echo "configure: failed program was:" >&5
7157 cat conftest.$ac_ext >&5
7162 CPPFLAGS="$ac_save_CPPFLAGS"
7165 echo "$ac_t""$ac_cv_pam" 1>&6
7166 if test "$ac_cv_pam" = yes ; then
7168 cat >> confdefs.h <<\EOF
7172 PASSWD_LIBS="${PASSWD_LIBS} -lpam -ldl"
7175 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
7176 echo "configure:7188: checking how to call pam_strerror" >&5
7177 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
7178 echo $ac_n "(cached) $ac_c" 1>&6
7180 cat > conftest.$ac_ext <<EOF
7181 #line 7193 "configure"
7182 #include "confdefs.h"
7185 #include <security/pam_appl.h>
7187 pam_handle_t *pamh = 0;
7188 char *s = pam_strerror(pamh, PAM_SUCCESS);
7191 if { (eval echo configure:7203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7193 ac_pam_strerror_args=2
7195 echo "configure: failed program was:" >&5
7196 cat conftest.$ac_ext >&5
7198 cat > conftest.$ac_ext <<EOF
7199 #line 7211 "configure"
7200 #include "confdefs.h"
7203 #include <security/pam_appl.h>
7206 pam_strerror(PAM_SUCCESS);
7209 if { (eval echo configure:7221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7211 ac_pam_strerror_args=1
7213 echo "configure: failed program was:" >&5
7214 cat conftest.$ac_ext >&5
7216 ac_pam_strerror_args=0
7221 ac_cv_pam_strerror_args=$ac_pam_strerror_args
7224 ac_pam_strerror_args=$ac_cv_pam_strerror_args
7225 if test "$ac_pam_strerror_args" = 1 ; then
7226 echo "$ac_t""one argument" 1>&6
7227 elif test "$ac_pam_strerror_args" = 2 ; then
7228 cat >> confdefs.h <<\EOF
7229 #define PAM_STRERROR_TWO_ARGS 1
7232 echo "$ac_t""two arguments" 1>&6
7234 echo "$ac_t""unknown" 1>&6
7237 elif test "$with_pam" != no; then
7238 echo "error: must be yes or no: --with-pam=$with_pam"
7242 # Next, check for the nine billion variants of shadow passwords...
7245 # Check whether --with-shadow or --without-shadow was given.
7246 if test "${with_shadow+set}" = set; then
7247 withval="$with_shadow"
7248 with_shadow="$withval"; with_shadow_req="$withval"
7255 case "$with_shadow" in
7260 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
7261 echo "configure:7273: checking for shadow password headers" >&5
7262 d=$with_shadow/include
7264 X_CFLAGS="-I$d $X_CFLAGS"
7265 echo "$ac_t""$d" 1>&6
7267 echo "$ac_t""not found ($d: no such directory)" 1>&6
7270 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
7271 echo "configure:7283: checking for shadow password libs" >&5
7274 X_LIBS="-L$d $X_LIBS"
7275 echo "$ac_t""$d" 1>&6
7277 echo "$ac_t""not found ($d: no such directory)" 1>&6
7280 # replace the directory string with "yes".
7281 with_shadow_req="yes"
7282 with_shadow=$with_shadow_req
7287 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
7288 echo " If it is a directory, then \`DIR/include' will be added to"
7289 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7294 # why is this necessary?
7295 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
7296 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
7300 if test "$with_shadow" = no; then
7301 pwent_cruft_done=yes
7302 elif test "$with_shadow" != yes; then
7303 echo "error: must be yes or no: --with-shadow=$with_shadow"
7308 # Sun's "adjunct" passwords.
7310 if test "$pwent_cruft_done" = no ; then
7311 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
7312 echo "configure:7324: checking for Sun-style shadow passwords" >&5
7313 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
7314 echo $ac_n "(cached) $ac_c" 1>&6
7317 ac_save_CPPFLAGS="$CPPFLAGS"
7318 if test \! -z "$includedir" ; then
7319 CPPFLAGS="$CPPFLAGS -I$includedir"
7321 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7322 cat > conftest.$ac_ext <<EOF
7323 #line 7335 "configure"
7324 #include "confdefs.h"
7327 #include <sys/types.h>
7328 #include <sys/label.h>
7329 #include <sys/audit.h>
7332 struct passwd_adjunct *p = getpwanam("nobody");
7333 const char *pw = p->pwa_passwd;
7336 if { (eval echo configure:7348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7338 ac_cv_sun_adjunct=yes
7340 echo "configure: failed program was:" >&5
7341 cat conftest.$ac_ext >&5
7343 ac_cv_sun_adjunct=no
7346 CPPFLAGS="$ac_save_CPPFLAGS"
7349 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
7350 if test "$ac_cv_sun_adjunct" = yes; then
7353 pwent_cruft_done=yes
7354 cat >> confdefs.h <<\EOF
7355 #define HAVE_ADJUNCT_PASSWD 1
7361 # DEC and SCO so-called "enhanced" security.
7363 if test "$pwent_cruft_done" = no ; then
7364 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
7365 echo "configure:7377: checking for DEC-style shadow passwords" >&5
7366 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
7367 echo $ac_n "(cached) $ac_c" 1>&6
7370 ac_save_CPPFLAGS="$CPPFLAGS"
7371 if test \! -z "$includedir" ; then
7372 CPPFLAGS="$CPPFLAGS -I$includedir"
7374 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7375 cat > conftest.$ac_ext <<EOF
7376 #line 7388 "configure"
7377 #include "confdefs.h"
7380 #include <sys/types.h>
7382 #include <sys/security.h>
7385 struct pr_passwd *p;
7387 set_auth_parameters(0, 0);
7388 check_auth_parameters();
7389 p = getprpwnam("nobody");
7390 pw = p->ufld.fd_encrypt;
7393 if { (eval echo configure:7405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7395 ac_cv_enhanced_passwd=yes
7397 echo "configure: failed program was:" >&5
7398 cat conftest.$ac_ext >&5
7400 ac_cv_enhanced_passwd=no
7403 CPPFLAGS="$ac_save_CPPFLAGS"
7406 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
7407 if test $ac_cv_enhanced_passwd = yes; then
7410 pwent_cruft_done=yes
7411 cat >> confdefs.h <<\EOF
7412 #define HAVE_ENHANCED_PASSWD 1
7416 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
7417 # (I'm told it needs -lcurses too, but I don't understand why.)
7418 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
7419 echo "configure:7431: checking for getprpwnam in -lprot" >&5
7420 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
7421 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7422 echo $ac_n "(cached) $ac_c" 1>&6
7424 ac_save_LIBS="$LIBS"
7425 LIBS="-lprot -lx $LIBS"
7426 cat > conftest.$ac_ext <<EOF
7427 #line 7439 "configure"
7428 #include "confdefs.h"
7429 /* Override any gcc2 internal prototype to avoid an error. */
7430 /* We use char because int might match the return type of a gcc2
7431 builtin and then its argument prototype would still apply. */
7438 if { (eval echo configure:7450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7440 eval "ac_cv_lib_$ac_lib_var=yes"
7442 echo "configure: failed program was:" >&5
7443 cat conftest.$ac_ext >&5
7445 eval "ac_cv_lib_$ac_lib_var=no"
7448 LIBS="$ac_save_LIBS"
7451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7452 echo "$ac_t""yes" 1>&6
7453 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
7455 echo "$ac_t""no" 1>&6
7456 # On DEC, getprpwnam() is in -lsecurity
7457 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
7458 echo "configure:7470: checking for getprpwnam in -lsecurity" >&5
7459 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
7460 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7461 echo $ac_n "(cached) $ac_c" 1>&6
7463 ac_save_LIBS="$LIBS"
7464 LIBS="-lsecurity $LIBS"
7465 cat > conftest.$ac_ext <<EOF
7466 #line 7478 "configure"
7467 #include "confdefs.h"
7468 /* Override any gcc2 internal prototype to avoid an error. */
7469 /* We use char because int might match the return type of a gcc2
7470 builtin and then its argument prototype would still apply. */
7477 if { (eval echo configure:7489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7479 eval "ac_cv_lib_$ac_lib_var=yes"
7481 echo "configure: failed program was:" >&5
7482 cat conftest.$ac_ext >&5
7484 eval "ac_cv_lib_$ac_lib_var=no"
7487 LIBS="$ac_save_LIBS"
7490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7491 echo "$ac_t""yes" 1>&6
7492 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
7494 echo "$ac_t""no" 1>&6
7502 # HP's entry in the "Not Invented Here" Sweepstakes.
7504 if test "$pwent_cruft_done" = no ; then
7505 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
7506 echo "configure:7518: checking for HP-style shadow passwords" >&5
7507 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
7508 echo $ac_n "(cached) $ac_c" 1>&6
7511 ac_save_CPPFLAGS="$CPPFLAGS"
7512 if test \! -z "$includedir" ; then
7513 CPPFLAGS="$CPPFLAGS -I$includedir"
7515 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7516 cat > conftest.$ac_ext <<EOF
7517 #line 7529 "configure"
7518 #include "confdefs.h"
7521 #include <sys/types.h>
7523 #include <hpsecurity.h>
7526 struct s_passwd *p = getspwnam("nobody");
7527 const char *pw = p->pw_passwd;
7530 if { (eval echo configure:7542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7532 ac_cv_hpux_passwd=yes
7534 echo "configure: failed program was:" >&5
7535 cat conftest.$ac_ext >&5
7537 ac_cv_hpux_passwd=no
7540 CPPFLAGS="$ac_save_CPPFLAGS"
7543 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
7544 if test "$ac_cv_hpux_passwd" = yes; then
7547 pwent_cruft_done=yes
7548 cat >> confdefs.h <<\EOF
7549 #define HAVE_HPUX_PASSWD 1
7553 # on HPUX, bigcrypt is in -lsec
7554 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7555 echo "configure:7567: checking for bigcrypt in -lsec" >&5
7556 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7557 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7558 echo $ac_n "(cached) $ac_c" 1>&6
7560 ac_save_LIBS="$LIBS"
7562 cat > conftest.$ac_ext <<EOF
7563 #line 7575 "configure"
7564 #include "confdefs.h"
7565 /* Override any gcc2 internal prototype to avoid an error. */
7566 /* We use char because int might match the return type of a gcc2
7567 builtin and then its argument prototype would still apply. */
7574 if { (eval echo configure:7586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7576 eval "ac_cv_lib_$ac_lib_var=yes"
7578 echo "configure: failed program was:" >&5
7579 cat conftest.$ac_ext >&5
7581 eval "ac_cv_lib_$ac_lib_var=no"
7584 LIBS="$ac_save_LIBS"
7587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7588 echo "$ac_t""yes" 1>&6
7589 PASSWD_LIBS="$PASSWD_LIBS -lsec"
7591 echo "$ac_t""no" 1>&6
7597 # Traditional (ha!) shadow passwords.
7599 if test "$pwent_cruft_done" = no ; then
7600 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
7601 echo "configure:7613: checking for generic shadow passwords" >&5
7602 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
7603 echo $ac_n "(cached) $ac_c" 1>&6
7606 ac_save_CPPFLAGS="$CPPFLAGS"
7607 if test \! -z "$includedir" ; then
7608 CPPFLAGS="$CPPFLAGS -I$includedir"
7610 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7611 cat > conftest.$ac_ext <<EOF
7612 #line 7624 "configure"
7613 #include "confdefs.h"
7616 #include <sys/types.h>
7620 struct spwd *p = getspnam("nobody");
7621 const char *pw = p->sp_pwdp;
7624 if { (eval echo configure:7636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7628 echo "configure: failed program was:" >&5
7629 cat conftest.$ac_ext >&5
7634 CPPFLAGS="$ac_save_CPPFLAGS"
7637 echo "$ac_t""$ac_cv_shadow" 1>&6
7638 if test "$ac_cv_shadow" = yes; then
7641 pwent_cruft_done=yes
7642 cat >> confdefs.h <<\EOF
7643 #define HAVE_SHADOW_PASSWD 1
7647 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
7649 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
7650 echo "configure:7662: checking for getspnam in -lc" >&5
7651 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
7652 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7653 echo $ac_n "(cached) $ac_c" 1>&6
7655 ac_save_LIBS="$LIBS"
7657 cat > conftest.$ac_ext <<EOF
7658 #line 7670 "configure"
7659 #include "confdefs.h"
7660 /* Override any gcc2 internal prototype to avoid an error. */
7661 /* We use char because int might match the return type of a gcc2
7662 builtin and then its argument prototype would still apply. */
7669 if { (eval echo configure:7681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7671 eval "ac_cv_lib_$ac_lib_var=yes"
7673 echo "configure: failed program was:" >&5
7674 cat conftest.$ac_ext >&5
7676 eval "ac_cv_lib_$ac_lib_var=no"
7679 LIBS="$ac_save_LIBS"
7682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7683 echo "$ac_t""yes" 1>&6
7686 echo "$ac_t""no" 1>&6
7689 if test "$have_getspnam" = no ; then
7690 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7691 echo "configure:7703: checking for getspnam in -lgen" >&5
7692 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7693 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7694 echo $ac_n "(cached) $ac_c" 1>&6
7696 ac_save_LIBS="$LIBS"
7698 cat > conftest.$ac_ext <<EOF
7699 #line 7711 "configure"
7700 #include "confdefs.h"
7701 /* Override any gcc2 internal prototype to avoid an error. */
7702 /* We use char because int might match the return type of a gcc2
7703 builtin and then its argument prototype would still apply. */
7710 if { (eval echo configure:7722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7712 eval "ac_cv_lib_$ac_lib_var=yes"
7714 echo "configure: failed program was:" >&5
7715 cat conftest.$ac_ext >&5
7717 eval "ac_cv_lib_$ac_lib_var=no"
7720 LIBS="$ac_save_LIBS"
7723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7724 echo "$ac_t""yes" 1>&6
7725 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
7727 echo "$ac_t""no" 1>&6
7734 # On FreeBSD, getpwnam() and friends work just like on non-shadow-password
7735 # systems -- except you only get stuff in the pw_passwd field if the running
7736 # program is setuid. So, guess that we've got this lossage to contend with
7737 # if /etc/master.passwd exists, and default to a setuid installation.
7739 if test "$pwent_cruft_done" = no ; then
7740 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
7741 echo "configure:7753: checking for FreeBSD-style shadow passwords" >&5
7742 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
7743 echo $ac_n "(cached) $ac_c" 1>&6
7745 if test -f /etc/master.passwd ; then
7746 ac_cv_master_passwd=yes
7748 ac_cv_master_passwd=no
7752 echo "$ac_t""$ac_cv_master_passwd" 1>&6
7753 if test "$ac_cv_master_passwd" = yes; then
7755 pwent_cruft_done=yes
7759 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
7761 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
7762 echo "configure:7774: checking for crypt in -lc" >&5
7763 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
7764 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7765 echo $ac_n "(cached) $ac_c" 1>&6
7767 ac_save_LIBS="$LIBS"
7769 cat > conftest.$ac_ext <<EOF
7770 #line 7782 "configure"
7771 #include "confdefs.h"
7772 /* Override any gcc2 internal prototype to avoid an error. */
7773 /* We use char because int might match the return type of a gcc2
7774 builtin and then its argument prototype would still apply. */
7781 if { (eval echo configure:7793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7783 eval "ac_cv_lib_$ac_lib_var=yes"
7785 echo "configure: failed program was:" >&5
7786 cat conftest.$ac_ext >&5
7788 eval "ac_cv_lib_$ac_lib_var=no"
7791 LIBS="$ac_save_LIBS"
7794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7795 echo "$ac_t""yes" 1>&6
7798 echo "$ac_t""no" 1>&6
7801 if test "$have_crypt" = no ; then
7802 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
7803 echo "configure:7815: checking for crypt in -lcrypt" >&5
7804 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
7805 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7806 echo $ac_n "(cached) $ac_c" 1>&6
7808 ac_save_LIBS="$LIBS"
7809 LIBS="-lcrypt $LIBS"
7810 cat > conftest.$ac_ext <<EOF
7811 #line 7823 "configure"
7812 #include "confdefs.h"
7813 /* Override any gcc2 internal prototype to avoid an error. */
7814 /* We use char because int might match the return type of a gcc2
7815 builtin and then its argument prototype would still apply. */
7822 if { (eval echo configure:7834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7824 eval "ac_cv_lib_$ac_lib_var=yes"
7826 echo "configure: failed program was:" >&5
7827 cat conftest.$ac_ext >&5
7829 eval "ac_cv_lib_$ac_lib_var=no"
7832 LIBS="$ac_save_LIBS"
7835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7836 echo "$ac_t""yes" 1>&6
7837 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
7839 echo "$ac_t""no" 1>&6
7845 # Most of the above shadow mechanisms will have set need_setuid to yes,
7846 # if they were found. But, on some systems, we need setuid even when
7847 # using plain old vanilla passwords.
7849 if test "$need_setuid" = no ; then
7851 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
7860 # for the "sonar" hack -- check how to ping.
7862 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
7863 echo "configure:7875: checking for struct icmp" >&5
7864 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
7865 echo $ac_n "(cached) $ac_c" 1>&6
7867 cat > conftest.$ac_ext <<EOF
7868 #line 7880 "configure"
7869 #include "confdefs.h"
7877 #include <sys/types.h>
7878 #include <sys/time.h>
7879 #include <sys/ipc.h>
7880 #include <sys/shm.h>
7881 #include <sys/socket.h>
7882 #include <netinet/in_systm.h>
7883 #include <netinet/in.h>
7884 #include <netinet/ip.h>
7885 #include <netinet/ip_icmp.h>
7886 #include <netinet/udp.h>
7887 #include <arpa/inet.h>
7892 struct sockaddr_in si;
7894 i.icmp_type = ICMP_ECHO;
7899 si.sin_family = AF_INET;
7903 if { (eval echo configure:7915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7907 echo "configure: failed program was:" >&5
7908 cat conftest.$ac_ext >&5
7915 ac_have_icmp=$ac_cv_have_icmp
7916 echo "$ac_t""$ac_cv_have_icmp" 1>&6
7918 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
7919 echo "configure:7931: checking for struct icmphdr" >&5
7920 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
7921 echo $ac_n "(cached) $ac_c" 1>&6
7923 cat > conftest.$ac_ext <<EOF
7924 #line 7936 "configure"
7925 #include "confdefs.h"
7933 #include <sys/types.h>
7934 #include <sys/time.h>
7935 #include <sys/ipc.h>
7936 #include <sys/shm.h>
7937 #include <sys/socket.h>
7938 #include <netinet/in_systm.h>
7939 #include <netinet/in.h>
7940 #include <netinet/ip.h>
7941 #include <netinet/ip_icmp.h>
7942 #include <netinet/udp.h>
7943 #include <arpa/inet.h>
7948 struct sockaddr_in si;
7954 i.un.echo.sequence = 0;
7955 si.sin_family = AF_INET;
7959 if { (eval echo configure:7971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7961 ac_cv_have_icmphdr=yes
7963 echo "configure: failed program was:" >&5
7964 cat conftest.$ac_ext >&5
7966 ac_cv_have_icmphdr=no
7971 ac_have_icmphdr=$ac_cv_have_icmphdr
7972 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
7974 if test "$ac_have_icmp" = yes ; then
7975 cat >> confdefs.h <<\EOF
7980 if test "$ac_have_icmphdr" = yes ; then
7981 cat >> confdefs.h <<\EOF
7982 #define HAVE_ICMPHDR 1
7989 ########################## end of tests.
7992 if test \! -z "$includedir" ; then
7993 INCLUDES="-I$includedir"
7996 if test \! -z "$libdir" ; then
7997 LDFLAGS="$LDFLAGS -L$libdir"
8001 ##### should have options to override the DEPEND crap, I guess...
8007 # Done testing things -- now substitute in some stuff for the Makefiles.
8009 if test "$have_motif" = yes; then
8010 cat >> confdefs.h <<\EOF
8011 #define HAVE_MOTIF 1
8014 TOOLKIT_SRCS='$(MOTIF_SRCS)'
8015 TOOLKIT_OBJS='$(MOTIF_OBJS)'
8016 elif test "$have_athena" = yes; then
8017 cat >> confdefs.h <<\EOF
8018 #define HAVE_ATHENA 1
8021 TOOLKIT_SRCS='$(ATHENA_SRCS)'
8022 TOOLKIT_OBJS='$(ATHENA_OBJS)'
8028 if test "$have_kerberos" = yes; then
8029 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
8030 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
8032 if test "$have_pam" = yes; then
8033 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
8034 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
8035 INSTALL_PAM="install-pam"
8037 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
8038 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
8041 if test "$enable_locking" = yes; then
8042 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
8043 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
8049 if test "$need_setuid" = yes; then
8051 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
8054 INSTALL_SETUID='$(INSTALL_PROGRAM)'
8058 if test "$have_gl" = yes; then
8059 GL_EXES='$(GL_EXES)'
8063 GL_KLUDGE=" -${tab} "
8102 # Print some warnings before emitting the Makefiles.
8104 warn_prefix_1=" Warning:"
8105 warn_prefix_2=" Note:"
8106 warn_prefix="$warn_prefix_1"
8109 warnsep=' #################################################################'
8112 if test "$warning" = no ; then
8113 echo '' ; echo "$warnsep" ; echo ''
8120 if test "$warning" = long ; then echo '' ; fi
8122 echo "$warn_prefix $@"
8129 if test "$was" != no ; then echo '' ; fi
8130 echo "$warn_prefix $@"
8139 warn_prefix="$warn_prefix_2"
8141 warn_prefix="$warn_prefix_1"
8145 warn_prefix="$warn_prefix_2"
8147 warn_prefix="$warn_prefix_1"
8151 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
8152 warn 'The SGI saver extension was requested, but was not found.'
8155 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
8156 warn 'The MIT saver extension was requested, but was not found.'
8159 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
8160 warn 'The XIdle extension was requested, but was not found.'
8163 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
8164 warn 'The XSHM extension was requested, but was not found.'
8167 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
8168 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
8171 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
8172 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
8175 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
8176 warn 'The DPMS extension was requested, but was not found.'
8179 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
8180 warn 'The XF86VMODE extension was requested, but was not found.'
8183 if test "$have_motif" = no -a "$have_athena" = no ; then
8184 warnL "Neither Motif nor Athena widgets seem to be available;"
8185 warn2 "the \`xscreensaver-demo' program requires one or the"
8187 proselytize_motif=no
8189 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
8190 warnL "Use of Motif was requested, but it wasn't found;"
8191 warn2 "Athena will be used instead."
8193 elif test "$with_athena_req" = yes -a "$have_athena" = no ; then
8194 warnL "Use of Athena was requested, but it wasn't found;"
8195 warn2 "Motif will be used instead."
8198 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
8200 preferred_lesstif=0.86
8202 if test "$lesstif_version" = unknown; then
8203 warnL "Unable to determine the LessTif version number!"
8204 warn2 "Make sure you are using version $preferred_lesstif or newer."
8205 warn2 "See <http://www.lesstif.org/>."
8207 elif test \! $lesstif_version -gt 82; then
8208 warnL "LessTif version $lesstif_version_string is being used."
8209 warn2 "LessTif versions 0.82 and earlier are too buggy to"
8210 warn2 "use with XScreenSaver; it is strongly recommended"
8211 warn2 "that you upgrade to at least version $preferred_lesstif!"
8212 warn2 "See <http://www.lesstif.org/>."
8216 if test "$proselytize_motif" = yes ; then
8217 warnL "Athena widgets are being used instead of Motif."
8218 warn2 "The \`xscreensaver-demo' program looks much better"
8219 warn2 "with Motif. Wouldn't you rather be using Motif?"
8220 warn2 "It is shipped by every commercial Unix vendor;"
8221 warn2 "and there is a free implementation available as"
8222 warn2 "well: see <http://www.lesstif.org/>."
8226 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
8227 preferred_mesagl=3.0
8229 if test "$ac_mesagl_version" = unknown; then
8230 warnL "Unable to determine the MesaGL version number!"
8231 warn2 "Make sure you are using version $preferred_mesagl or newer."
8233 elif test \! "$ac_mesagl_version" -gt 2006; then
8234 warnL "MesaGL version $ac_mesagl_version_string is being used."
8235 warn2 "MesaGL versions 2.6 and earlier have a security bug."
8236 warn2 "It is strongly recommended that you upgrade to at"
8237 warn2 "least version $preferred_mesagl."
8242 if test "$have_xpm" = no ; then
8243 if test "$with_xpm_req" = yes ; then
8244 warnL 'Use of XPM was requested, but it was not found.'
8245 elif test "$with_xpm_req" = no ; then
8246 noteL 'The XPM library is not being used.'
8248 noteL 'The XPM library was not found.'
8252 warn2 'Some of the demos will not be as colorful as they'
8253 warn2 'could be. You might want to consider installing XPM'
8254 warn2 'and re-running configure. (Remember to delete the'
8255 warn2 'config.cache file first.) You can find XPM at most'
8256 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
8259 if test "$have_gl" = no ; then
8260 if test "$with_gl_req" = yes ; then
8261 warnL 'Use of GL was requested, but it was not found.'
8262 elif test "$with_gl_req" = no ; then
8263 noteL 'The OpenGL 3D library is not being used.'
8265 noteL 'The OpenGL 3D library was not found.'
8269 warn2 'Those demos which use 3D will not be built or installed.'
8270 warn2 'You might want to consider installing OpenGL and'
8271 warn2 're-running configure. (Remember to delete the'
8272 warn2 "config.cache file first.) If your vendor doesn't ship"
8273 warn2 'their own implementation of OpenGL, you can get a free'
8274 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
8275 warn2 'info, see <http://www.opengl.org/>.'
8279 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
8280 warn 'Use of XReadDisplay was requested, but it was not found.'
8283 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
8284 warn 'Use of the Iris Video Library was requested, but it was not found.'
8287 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
8288 warn 'Use of Kerberos was requested, but it was not found.'
8291 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
8292 warn 'Use of PAM was requested, but it was not found.'
8295 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
8296 warn 'Use of shadow passwords was requested, but they were not found.'
8299 if test -n "$with_zippy_req"; then
8300 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
8301 warnL "$with_zippy_req was requested as the Zippy program,"
8302 warn2 "but was not found. The default will be used instead."
8306 if test "$warning" != no; then
8307 echo '' ; echo "$warnsep" ; echo ''
8312 cat > confcache <<\EOF
8313 # This file is a shell script that caches the results of configure
8314 # tests run on this system so they can be shared between configure
8315 # scripts and configure runs. It is not useful on other systems.
8316 # If it contains results you don't want to keep, you may remove or edit it.
8318 # By default, configure uses ./config.cache as the cache file,
8319 # creating it if it does not exist already. You can give configure
8320 # the --cache-file=FILE option to use a different cache file; that is
8321 # what configure does when it calls configure scripts in
8322 # subdirectories, so they share the cache.
8323 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8324 # config.status only pays attention to the cache file if you give it the
8325 # --recheck option to rerun configure.
8328 # The following way of writing the cache mishandles newlines in values,
8329 # but we know of no workaround that is simple, portable, and efficient.
8330 # So, don't put newlines in cache variables' values.
8331 # Ultrix sh set writes to stderr and can't be redirected directly,
8332 # and sets the high bit in the cache file unless we assign to the vars.
8334 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8336 # `set' does not quote correctly, so add quotes (double-quote substitution
8337 # turns \\\\ into \\, and sed turns \\ into \).
8339 -e "s/'/'\\\\''/g" \
8340 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8343 # `set' quotes correctly as required by POSIX, so do not add quotes.
8344 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8347 if cmp -s $cache_file confcache; then
8350 if test -w $cache_file; then
8351 echo "updating cache $cache_file"
8352 cat confcache > $cache_file
8354 echo "not updating unwritable cache $cache_file"
8359 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8361 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8362 # Let make expand exec_prefix.
8363 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8365 # Any assignment to VPATH causes Sun make to only execute
8366 # the first set of double-colon rules, so remove it if not needed.
8367 # If there is a colon in the path, we need to keep it.
8368 if test "x$srcdir" = x.; then
8369 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8372 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8374 DEFS=-DHAVE_CONFIG_H
8376 # Without the "./", some shells look in PATH for config.status.
8377 : ${CONFIG_STATUS=./config.status}
8379 echo creating $CONFIG_STATUS
8380 rm -f $CONFIG_STATUS
8381 cat > $CONFIG_STATUS <<EOF
8383 # Generated automatically by configure.
8384 # Run this file to recreate the current configuration.
8385 # This directory was configured as follows,
8386 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8388 # $0 $ac_configure_args
8390 # Compiler output produced by configure, useful for debugging
8391 # configure, is in ./config.log if it exists.
8393 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8396 case "\$ac_option" in
8397 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8398 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8399 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8400 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8401 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8403 -help | --help | --hel | --he | --h)
8404 echo "\$ac_cs_usage"; exit 0 ;;
8405 *) echo "\$ac_cs_usage"; exit 1 ;;
8409 ac_given_srcdir=$srcdir
8410 ac_given_INSTALL="$INSTALL"
8412 trap 'rm -fr `echo "Makefile
8417 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8419 cat >> $CONFIG_STATUS <<EOF
8421 # Protect against being on the right side of a sed subst in config.status.
8422 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8423 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8427 s%@CFLAGS@%$CFLAGS%g
8428 s%@CPPFLAGS@%$CPPFLAGS%g
8429 s%@CXXFLAGS@%$CXXFLAGS%g
8430 s%@FFLAGS@%$FFLAGS%g
8432 s%@LDFLAGS@%$LDFLAGS%g
8434 s%@exec_prefix@%$exec_prefix%g
8435 s%@prefix@%$prefix%g
8436 s%@program_transform_name@%$program_transform_name%g
8437 s%@bindir@%$bindir%g
8438 s%@sbindir@%$sbindir%g
8439 s%@libexecdir@%$libexecdir%g
8440 s%@datadir@%$datadir%g
8441 s%@sysconfdir@%$sysconfdir%g
8442 s%@sharedstatedir@%$sharedstatedir%g
8443 s%@localstatedir@%$localstatedir%g
8444 s%@libdir@%$libdir%g
8445 s%@includedir@%$includedir%g
8446 s%@oldincludedir@%$oldincludedir%g
8447 s%@infodir@%$infodir%g
8448 s%@mandir@%$mandir%g
8450 s%@host_alias@%$host_alias%g
8451 s%@host_cpu@%$host_cpu%g
8452 s%@host_vendor@%$host_vendor%g
8453 s%@host_os@%$host_os%g
8456 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8457 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8458 s%@INSTALL_DATA@%$INSTALL_DATA%g
8459 s%@SET_MAKE@%$SET_MAKE%g
8460 s%@X_CFLAGS@%$X_CFLAGS%g
8461 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
8462 s%@X_LIBS@%$X_LIBS%g
8463 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
8465 s%@emacs_exe@%$emacs_exe%g
8466 s%@xemacs_exe@%$xemacs_exe%g
8467 s%@fortune@%$fortune%g
8468 s%@INCLUDES@%$INCLUDES%g
8469 s%@SAVER_LIBS@%$SAVER_LIBS%g
8470 s%@TOOLKIT_LIBS@%$TOOLKIT_LIBS%g
8471 s%@HACK_LIBS@%$HACK_LIBS%g
8472 s%@XPM_LIBS@%$XPM_LIBS%g
8473 s%@GL_LIBS@%$GL_LIBS%g
8474 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
8475 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
8476 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
8477 s%@NEED_SETUID@%$NEED_SETUID%g
8478 s%@INSTALL_PAM@%$INSTALL_PAM%g
8479 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
8480 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
8481 s%@TOOLKIT_SRCS@%$TOOLKIT_SRCS%g
8482 s%@TOOLKIT_OBJS@%$TOOLKIT_OBJS%g
8483 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
8484 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
8485 s%@XMU_SRCS@%$XMU_SRCS%g
8486 s%@XMU_OBJS@%$XMU_OBJS%g
8487 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
8488 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
8489 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
8490 s%@LOCK_SRCS@%$LOCK_SRCS%g
8491 s%@LOCK_OBJS@%$LOCK_OBJS%g
8492 s%@GL_EXES@%$GL_EXES%g
8493 s%@GL_MEN@%$GL_MEN%g
8494 s%@GL_KLUDGE@%$GL_KLUDGE%g
8495 s%@HACKDIR@%$HACKDIR%g
8496 s%@APPDEFAULTS@%$APPDEFAULTS%g
8497 s%@DEPEND@%$DEPEND%g
8498 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
8499 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
8504 cat >> $CONFIG_STATUS <<\EOF
8506 # Split the substitutions into bite-sized pieces for seds with
8507 # small command number limits, like on Digital OSF/1 and HP-UX.
8508 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8509 ac_file=1 # Number of current file.
8510 ac_beg=1 # First line for current file.
8511 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8514 while $ac_more_lines; do
8515 if test $ac_beg -gt 1; then
8516 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8518 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8520 if test ! -s conftest.s$ac_file; then
8522 rm -f conftest.s$ac_file
8524 if test -z "$ac_sed_cmds"; then
8525 ac_sed_cmds="sed -f conftest.s$ac_file"
8527 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8529 ac_file=`expr $ac_file + 1`
8531 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8534 if test -z "$ac_sed_cmds"; then
8539 cat >> $CONFIG_STATUS <<EOF
8541 CONFIG_FILES=\${CONFIG_FILES-"Makefile
8546 driver/XScreenSaver.ad"}
8548 cat >> $CONFIG_STATUS <<\EOF
8549 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8550 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8552 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8553 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8554 *) ac_file_in="${ac_file}.in" ;;
8557 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8559 # Remove last slash and all that follows it. Not all systems have dirname.
8560 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8561 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8562 # The file is in a subdirectory.
8563 test ! -d "$ac_dir" && mkdir "$ac_dir"
8564 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8565 # A "../" for each directory in $ac_dir_suffix.
8566 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8568 ac_dir_suffix= ac_dots=
8571 case "$ac_given_srcdir" in
8573 if test -z "$ac_dots"; then top_srcdir=.
8574 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8575 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8577 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8578 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8581 case "$ac_given_INSTALL" in
8582 [/$]*) INSTALL="$ac_given_INSTALL" ;;
8583 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8586 echo creating "$ac_file"
8588 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8590 *Makefile*) ac_comsub="1i\\
8591 # $configure_input" ;;
8595 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8597 s%@configure_input@%$configure_input%g
8598 s%@srcdir@%$srcdir%g
8599 s%@top_srcdir@%$top_srcdir%g
8600 s%@INSTALL@%$INSTALL%g
8601 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8605 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8606 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8608 # ac_d sets the value in "#define NAME VALUE" lines.
8609 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8610 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8613 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8614 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8615 ac_uB='\([ ]\)%\1#\2define\3'
8618 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8619 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8620 ac_eB='$%\1#\2define\3'
8624 if test "${CONFIG_HEADERS+set}" != set; then
8626 cat >> $CONFIG_STATUS <<EOF
8627 CONFIG_HEADERS="config.h"
8629 cat >> $CONFIG_STATUS <<\EOF
8631 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8632 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8634 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8635 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8636 *) ac_file_in="${ac_file}.in" ;;
8639 echo creating $ac_file
8641 rm -f conftest.frag conftest.in conftest.out
8642 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8643 cat $ac_file_inputs > conftest.in
8647 # Transform confdefs.h into a sed script conftest.vals that substitutes
8648 # the proper values into config.h.in to produce config.h. And first:
8649 # Protect against being on the right side of a sed subst in config.status.
8650 # Protect against being in an unquoted here document in config.status.
8652 cat > conftest.hdr <<\EOF
8655 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8659 sed -n -f conftest.hdr confdefs.h > conftest.vals
8662 # This sed command replaces #undef with comments. This is necessary, for
8663 # example, in the case of _POSIX_SOURCE, which is predefined and required
8664 # on some systems where configure will not decide to define it.
8665 cat >> conftest.vals <<\EOF
8666 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8669 # Break up conftest.vals because some shells have a limit on
8670 # the size of here documents, and old seds have small limits too.
8675 ac_lines=`grep -c . conftest.vals`
8676 # grep -c gives empty output for an empty file on some AIX systems.
8677 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8678 # Write a limited-size here document to conftest.frag.
8679 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8680 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8682 sed -f conftest.frag conftest.in > conftest.out
8684 mv conftest.out conftest.in
8686 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8688 mv conftest.tail conftest.vals
8692 cat >> $CONFIG_STATUS <<\EOF
8693 rm -f conftest.frag conftest.h
8694 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8695 cat conftest.in >> conftest.h
8697 if cmp -s $ac_file conftest.h 2>/dev/null; then
8698 echo "$ac_file is unchanged"
8701 # Remove last slash and all that follows it. Not all systems have dirname.
8702 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8703 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8704 # The file is in a subdirectory.
8705 test ! -d "$ac_dir" && mkdir "$ac_dir"
8708 mv conftest.h $ac_file
8713 cat >> $CONFIG_STATUS <<EOF
8716 cat >> $CONFIG_STATUS <<\EOF
8720 chmod +x $CONFIG_STATUS
8721 rm -fr confdefs* $ac_clean_files
8722 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8725 # You are in a twisty maze of namespaces and syntaxes, all alike.
8726 # Fuck the skull of Unix.
8728 eval bindir=${bindir}
8729 eval bindir=${bindir}
8730 eval bindir=${bindir}
8731 eval bindir=${bindir}
8732 eval bindir=${bindir}
8733 eval bindir=${bindir}
8734 eval HACKDIR=${HACKDIR}
8735 eval HACKDIR=${HACKDIR}
8736 eval HACKDIR=${HACKDIR}
8737 eval HACKDIR=${HACKDIR}
8738 eval HACKDIR=${HACKDIR}
8739 eval HACKDIR=${HACKDIR}
8741 # canonicalize slashes.
8742 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
8743 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8746 # Sanity check the subdir
8747 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
8748 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
8750 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
8751 There will be an executable installed with that name, so
8752 that can't be the name of a directory as well. Please
8753 re-configure with a different directory name." 1>&2; exit 1; }
8760 # Now let's see if there's a previous RPM version already installed. Blargh!
8764 rpmv=`(rpm -qv xscreensaver) 2>&- | \
8765 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-[0-9][0-9]*$/\1/'`
8768 if test \! -z "$rpmv" ; then
8769 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
8770 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
8773 warnL "There is already an installed RPM of xscreensaver $rpmv"
8774 warn2 "on this system. You might want to remove it (with"
8775 warn2 '"rpm -ve xscreensaver") before running "make install"'
8776 warn2 "from this directory."
8778 warn2 "Alternately, you could build this version of xscreensaver"
8779 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
8780 warn2 "file is included. See the RPM documentation for more info."
8783 if test "$rpmbdir" = "$rpmhdir" ; then
8784 warn2 "The RPM version was installed in $rpmbdir."
8786 warn2 "The RPM version was installed in $rpmbdir,"
8787 warn2 "with demos in $rpmhdir."
8794 if test "${bindir}" = "${HACKDIR}" ; then
8798 if test "$do_dir_warning" = yes; then
8802 echo ' When you run "make install", the "xscreensaver",'
8803 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
8804 echo " will be installed in ${bindir}."
8806 echo " The various graphics demos (90+ different executables) will"
8807 echo " also be installed in ${HACKDIR}."
8809 echo " If you would prefer the demos to be installed elsewhere"
8810 echo " (for example, in a dedicated directory) you should re-run"
8811 echo " configure with the --enable-subdir=DIR option. For more"
8812 echo " information, run $0 --help."