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:
18 --enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir',
19 instead of putting them in bindir itself. You can
20 specify the name of the subdirectory. For example,
21 \`--exec-prefix=/usr/local --enable-subdir=demos'
22 would put xscreensaver in /usr/local/bin/, and would
23 put the demos in /usr/local/bin/demos/. (If DIR
24 begins with /, then bindir will not be prepended.)
26 --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 By default, support for each of these options will be built in, if the
35 relevant library routines exist. At run time, they will then be used
36 only if the X server being used supports them. Each --with option has
37 a corresponding --without option, to override building support for them
40 Screen blanking and idle-detection options:
42 --with-sgi-ext Include support for the SGI SCREEN_SAVER extension."
44 --with-mit-ext Include support for the MIT-SCREEN-SAVER extension."
46 --with-xidle-ext Include support for the XIDLE extension."
48 --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL extension."
50 --with-dpms-ext Include support for the DPMS extension."
52 --with-xf86vmode-ext Include support for XFree86 virtual screens."
54 --with-proc-interrupts Include support for consulting the /proc/interrupts
55 file to notice keyboard activity."
58 Screen locking options:
60 --enable-locking Compile in support for locking the display.
61 --disable-locking Do not allow locking at all.
64 --with-pam Include support for PAM (Pluggable Auth Modules.)"
66 --with-kerberos Include support for Kerberos authentication."
68 --with-shadow Include support for shadow password authentication."
71 User interface options:
73 --with-motif Use the Motif toolkit for the user interface."
75 --with-gtk Use the Gtk toolkit for the user interface."
77 --with-athena Use the Athena toolkit for the user interface."
82 --with-gl Build those demos which depend on OpenGL."
84 --with-gle Build those demos which depend on GLE
85 (the OpenGL "extrusion" library.)"
87 --with-xpm Include support for XPM files in some demos."
89 --with-xshm-ext Include support for the XSHM extension."
91 --with-xdbe-ext Include support for the DOUBLE-BUFFER extension."
93 --with-readdisplay Include support for the XReadDisplay extension."
95 --with-sgivideo Include support for SGI's Iris Video Library."
98 --with-zippy=PROGRAM Some demos are able to run an external program and
99 display its text; this names the program to use by
100 default (though it can be overridden with X
101 resources.) If you don't specify this, the default
102 is to use \"yow\" from the Emacs distribution (if you
103 have it) or else to use \"fortune\".
106 # Initialize some variables set by options.
107 # The variables have the same names as the options, with
108 # dashes changed to underlines.
110 cache_file=./config.cache
119 program_transform_name=s,x,x,
127 bindir='${exec_prefix}/bin'
128 sbindir='${exec_prefix}/sbin'
129 libexecdir='${exec_prefix}/libexec'
130 datadir='${prefix}/share'
131 sysconfdir='${prefix}/etc'
132 sharedstatedir='${prefix}/com'
133 localstatedir='${prefix}/var'
134 libdir='${exec_prefix}/lib'
135 includedir='${prefix}/include'
136 oldincludedir='/usr/include'
137 infodir='${prefix}/info'
138 mandir='${prefix}/man'
140 # Initialize some other variables.
143 SHELL=${CONFIG_SHELL-/bin/sh}
144 # Maximum number of lines to put in a shell here document.
151 # If the previous option needs an argument, assign it.
152 if test -n "$ac_prev"; then
153 eval "$ac_prev=\$ac_option"
159 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
163 # Accept the important Cygnus configure options, so we can diagnose typos.
167 -bindir | --bindir | --bindi | --bind | --bin | --bi)
169 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
170 bindir="$ac_optarg" ;;
172 -build | --build | --buil | --bui | --bu)
174 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
175 build="$ac_optarg" ;;
177 -cache-file | --cache-file | --cache-fil | --cache-fi \
178 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
179 ac_prev=cache_file ;;
180 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
181 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
182 cache_file="$ac_optarg" ;;
184 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
186 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
188 datadir="$ac_optarg" ;;
190 -disable-* | --disable-*)
191 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
192 # Reject names that are not valid shell variable names.
193 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
194 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
196 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
197 eval "enable_${ac_feature}=no" ;;
199 -enable-* | --enable-*)
200 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
201 # Reject names that are not valid shell variable names.
202 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
203 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
205 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
210 eval "enable_${ac_feature}='$ac_optarg'" ;;
212 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
213 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
214 | --exec | --exe | --ex)
215 ac_prev=exec_prefix ;;
216 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
217 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
218 | --exec=* | --exe=* | --ex=*)
219 exec_prefix="$ac_optarg" ;;
221 -gas | --gas | --ga | --g)
222 # Obsolete; use --with-gas.
225 -help | --help | --hel | --he)
226 # Omit some internal or obsolete options to make the list less imposing.
227 # This message is too long to be a string in the A/UX 3.1 sh.
229 Usage: configure [options] [host]
230 Options: [defaults in brackets after descriptions]
234 --cache-file=FILE cache test results in FILE
235 --help print this message
236 --no-create do not create output files
237 --quiet, --silent do not print \`checking...' messages
238 --version print the version of autoconf that created configure
240 Directory and file names:
242 --prefix=PREFIX install architecture-independent files in PREFIX
244 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
246 --bindir=DIR user executables in DIR [EPREFIX/bin]
247 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
248 --includedir=DIR C header files in DIR [PREFIX/include]
249 --x-includes=DIR X include files are in DIR
250 --x-libraries=DIR X library files are in DIR
251 --mandir=DIR man documentation in DIR [PREFIX/man]
252 --srcdir=DIR find the sources in DIR [configure dir or ..]
253 --program-prefix=PREFIX prepend PREFIX to installed program names
254 --program-suffix=SUFFIX append SUFFIX to installed program names
255 --program-transform-name=PROGRAM
256 run sed PROGRAM on installed program names
262 --build=BUILD configure for building on BUILD [BUILD=HOST]
263 --host=HOST configure for HOST [guessed]
264 --target=TARGET configure for TARGET [TARGET=HOST]
266 if test -n "$ac_help"; then
271 -host | --host | --hos | --ho)
273 -host=* | --host=* | --hos=* | --ho=*)
276 -includedir | --includedir | --includedi | --included | --include \
277 | --includ | --inclu | --incl | --inc)
278 ac_prev=includedir ;;
279 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
280 | --includ=* | --inclu=* | --incl=* | --inc=*)
281 includedir="$ac_optarg" ;;
283 -infodir | --infodir | --infodi | --infod | --info | --inf)
285 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
286 infodir="$ac_optarg" ;;
288 -libdir | --libdir | --libdi | --libd)
290 -libdir=* | --libdir=* | --libdi=* | --libd=*)
291 libdir="$ac_optarg" ;;
293 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
294 | --libexe | --libex | --libe)
295 ac_prev=libexecdir ;;
296 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
297 | --libexe=* | --libex=* | --libe=*)
298 libexecdir="$ac_optarg" ;;
300 -localstatedir | --localstatedir | --localstatedi | --localstated \
301 | --localstate | --localstat | --localsta | --localst \
302 | --locals | --local | --loca | --loc | --lo)
303 ac_prev=localstatedir ;;
304 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
305 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
306 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
307 localstatedir="$ac_optarg" ;;
309 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
311 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
312 mandir="$ac_optarg" ;;
315 # Obsolete; use --without-fp.
318 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
323 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
326 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
327 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
328 | --oldin | --oldi | --old | --ol | --o)
329 ac_prev=oldincludedir ;;
330 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
331 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
332 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
333 oldincludedir="$ac_optarg" ;;
335 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
337 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
338 prefix="$ac_optarg" ;;
340 -program-prefix | --program-prefix | --program-prefi | --program-pref \
341 | --program-pre | --program-pr | --program-p)
342 ac_prev=program_prefix ;;
343 -program-prefix=* | --program-prefix=* | --program-prefi=* \
344 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
345 program_prefix="$ac_optarg" ;;
347 -program-suffix | --program-suffix | --program-suffi | --program-suff \
348 | --program-suf | --program-su | --program-s)
349 ac_prev=program_suffix ;;
350 -program-suffix=* | --program-suffix=* | --program-suffi=* \
351 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
352 program_suffix="$ac_optarg" ;;
354 -program-transform-name | --program-transform-name \
355 | --program-transform-nam | --program-transform-na \
356 | --program-transform-n | --program-transform- \
357 | --program-transform | --program-transfor \
358 | --program-transfo | --program-transf \
359 | --program-trans | --program-tran \
360 | --progr-tra | --program-tr | --program-t)
361 ac_prev=program_transform_name ;;
362 -program-transform-name=* | --program-transform-name=* \
363 | --program-transform-nam=* | --program-transform-na=* \
364 | --program-transform-n=* | --program-transform-=* \
365 | --program-transform=* | --program-transfor=* \
366 | --program-transfo=* | --program-transf=* \
367 | --program-trans=* | --program-tran=* \
368 | --progr-tra=* | --program-tr=* | --program-t=*)
369 program_transform_name="$ac_optarg" ;;
371 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
372 | -silent | --silent | --silen | --sile | --sil)
375 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
377 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
379 sbindir="$ac_optarg" ;;
381 -sharedstatedir | --sharedstatedir | --sharedstatedi \
382 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
383 | --sharedst | --shareds | --shared | --share | --shar \
385 ac_prev=sharedstatedir ;;
386 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
387 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
388 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
390 sharedstatedir="$ac_optarg" ;;
392 -site | --site | --sit)
394 -site=* | --site=* | --sit=*)
397 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
399 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
400 srcdir="$ac_optarg" ;;
402 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
403 | --syscon | --sysco | --sysc | --sys | --sy)
404 ac_prev=sysconfdir ;;
405 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
406 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
407 sysconfdir="$ac_optarg" ;;
409 -target | --target | --targe | --targ | --tar | --ta | --t)
411 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
412 target="$ac_optarg" ;;
414 -v | -verbose | --verbose | --verbos | --verbo | --verb)
417 -version | --version | --versio | --versi | --vers)
418 echo "configure generated by autoconf version 2.13"
422 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
423 # Reject names that are not valid shell variable names.
424 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
425 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
427 ac_package=`echo $ac_package| sed 's/-/_/g'`
432 eval "with_${ac_package}='$ac_optarg'" ;;
434 -without-* | --without-*)
435 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
436 # Reject names that are not valid shell variable names.
437 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
438 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
440 ac_package=`echo $ac_package| sed 's/-/_/g'`
441 eval "with_${ac_package}=no" ;;
444 # Obsolete; use --with-x.
447 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
448 | --x-incl | --x-inc | --x-in | --x-i)
449 ac_prev=x_includes ;;
450 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
451 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
452 x_includes="$ac_optarg" ;;
454 -x-libraries | --x-libraries | --x-librarie | --x-librari \
455 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
456 ac_prev=x_libraries ;;
457 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
458 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
459 x_libraries="$ac_optarg" ;;
461 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
465 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
466 echo "configure: warning: $ac_option: invalid host type" 1>&2
468 if test "x$nonopt" != xNONE; then
469 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
477 if test -n "$ac_prev"; then
478 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
481 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
483 # File descriptor usage:
486 # 2 errors and warnings
487 # 3 some systems may open it to /dev/tty
488 # 4 used on the Kubota Titan
489 # 6 checking for... messages and results
490 # 5 compiler messages saved in config.log
491 if test "$silent" = yes; then
499 This file contains any messages produced by compilers while
500 running configure, to aid debugging if configure makes a mistake.
503 # Strip out --no-create and --no-recursion so they do not pile up.
504 # Also quote any args containing shell metacharacters.
509 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
510 | --no-cr | --no-c) ;;
511 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
512 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
513 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
514 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
515 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
520 # Only set these to C if already set. These must not be set unconditionally
521 # because not all systems understand e.g. LANG=C (notably SCO).
522 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
523 # Non-C LC_CTYPE values break the ctype check.
524 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
525 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
526 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
527 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
529 # confdefs.h avoids OS command line length limits that DEFS can exceed.
530 rm -rf conftest* confdefs.h
531 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
534 # A filename unique to this package, relative to the directory that
535 # configure is in, which we can look for to find out if srcdir is correct.
536 ac_unique_file=driver/subprocs.c
538 # Find the source files, if location was not specified.
539 if test -z "$srcdir"; then
540 ac_srcdir_defaulted=yes
541 # Try the directory containing this script, then its parent.
543 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
544 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
546 if test ! -r $srcdir/$ac_unique_file; then
550 ac_srcdir_defaulted=no
552 if test ! -r $srcdir/$ac_unique_file; then
553 if test "$ac_srcdir_defaulted" = yes; then
554 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
556 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
559 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
561 # Prefer explicitly selected file to automatically selected ones.
562 if test -z "$CONFIG_SITE"; then
563 if test "x$prefix" != xNONE; then
564 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
566 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
569 for ac_site_file in $CONFIG_SITE; do
570 if test -r "$ac_site_file"; then
571 echo "loading site script $ac_site_file"
576 if test -r "$cache_file"; then
577 echo "loading cache $cache_file"
580 echo "creating cache $cache_file"
585 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
586 ac_cpp='$CPP $CPPFLAGS'
587 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
588 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
589 cross_compiling=$ac_cv_prog_cc_cross
593 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
594 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
595 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
602 ac_n= ac_c='\c' ac_t=
608 echo "current directory: `pwd`"
609 echo "command line was: $0 $@"
612 # After checking to see that --srcdir is correct (which AC_INIT does)
613 # check for some random other files that come later in the tar file,
614 # to make sure everything is here.
616 for d in driver utils hacks hacks/glx ; do
617 f=$srcdir/$d/Makefile.in
618 if test \! -r $f ; then
620 echo "ERROR: The package is incomplete: $f does not exist."
621 echo " This probably means that your download was truncated."
628 ###############################################################################
630 # Function to figure out how to run the compiler.
632 ###############################################################################
637 ###############################################################################
639 # Function to figure out how to create directory trees.
641 ###############################################################################
646 ###############################################################################
648 # Function to check whether gettimeofday() exists, and how to call it.
649 # This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
651 ###############################################################################
656 ###############################################################################
658 # Function to find perl5 (defines PERL and PERL_VERSION.)
660 ###############################################################################
662 # M4 sucks!! perl sucks too!!
664 perl_version_cmd='print $]'
670 ###############################################################################
672 # Functions to check how to do ICMP PING requests.
674 ###############################################################################
681 ###############################################################################
683 # Functions to check for various X11 crap.
685 ###############################################################################
687 # Try and find the app-defaults directory.
688 # It sucks that autoconf doesn't do this already...
700 # Random special-cases for X on certain pathological OSes.
701 # You know who you are.
707 ###############################################################################
709 # Some utility functions to make checking for X things easier.
711 ###############################################################################
713 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
717 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
721 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
726 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
727 # Use this sparingly; it probably doesn't work very well on X programs.
731 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
732 # (But not the -L directories!)
738 # Usage: HANDLE_X_PATH_ARG([variable_name],
739 # [--command-line-option],
740 # [descriptive string])
742 # All of the --with options take three forms:
744 # --with-foo (or --with-foo=yes)
745 # --without-foo (or --with-foo=no)
748 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
749 # a directory (string beginning with a slash) it checks to see whether
750 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
757 ###############################################################################
758 ###############################################################################
760 # End of function definitions. Now start actually executing stuff.
762 ###############################################################################
763 ###############################################################################
765 # random compiler setup
767 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
768 if test -f $ac_dir/install-sh; then
770 ac_install_sh="$ac_aux_dir/install-sh -c"
772 elif test -f $ac_dir/install.sh; then
774 ac_install_sh="$ac_aux_dir/install.sh -c"
778 if test -z "$ac_aux_dir"; then
779 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
781 ac_config_guess=$ac_aux_dir/config.guess
782 ac_config_sub=$ac_aux_dir/config.sub
783 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
786 # Make sure we can run config.sub.
787 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
788 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
791 echo $ac_n "checking host system type""... $ac_c" 1>&6
792 echo "configure:804: checking host system type" >&5
795 case "$host_alias" in
799 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
800 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
802 *) host_alias=$nonopt ;;
806 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
807 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
808 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
809 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
810 echo "$ac_t""$host" 1>&6
812 # Extract the first word of "gcc", so it can be a program name with args.
813 set dummy gcc; ac_word=$2
814 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
815 echo "configure:827: checking for $ac_word" >&5
816 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
817 echo $ac_n "(cached) $ac_c" 1>&6
819 if test -n "$CC"; then
820 ac_cv_prog_CC="$CC" # Let the user override the test.
822 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
824 for ac_dir in $ac_dummy; do
825 test -z "$ac_dir" && ac_dir=.
826 if test -f $ac_dir/$ac_word; then
835 if test -n "$CC"; then
836 echo "$ac_t""$CC" 1>&6
838 echo "$ac_t""no" 1>&6
841 if test -z "$CC"; then
842 # Extract the first word of "cc", so it can be a program name with args.
843 set dummy cc; ac_word=$2
844 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
845 echo "configure:857: checking for $ac_word" >&5
846 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
847 echo $ac_n "(cached) $ac_c" 1>&6
849 if test -n "$CC"; then
850 ac_cv_prog_CC="$CC" # Let the user override the test.
852 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
855 for ac_dir in $ac_dummy; do
856 test -z "$ac_dir" && ac_dir=.
857 if test -f $ac_dir/$ac_word; then
858 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
867 if test $ac_prog_rejected = yes; then
868 # We found a bogon in the path, so make sure we never use it.
869 set dummy $ac_cv_prog_CC
871 if test $# -gt 0; then
872 # We chose a different compiler from the bogus one.
873 # However, it has the same basename, so the bogon will be chosen
874 # first if we set CC to just the basename; use the full file name.
876 set dummy "$ac_dir/$ac_word" "$@"
884 if test -n "$CC"; then
885 echo "$ac_t""$CC" 1>&6
887 echo "$ac_t""no" 1>&6
890 if test -z "$CC"; then
893 # Extract the first word of "cl", so it can be a program name with args.
894 set dummy cl; ac_word=$2
895 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
896 echo "configure:908: checking for $ac_word" >&5
897 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
898 echo $ac_n "(cached) $ac_c" 1>&6
900 if test -n "$CC"; then
901 ac_cv_prog_CC="$CC" # Let the user override the test.
903 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
905 for ac_dir in $ac_dummy; do
906 test -z "$ac_dir" && ac_dir=.
907 if test -f $ac_dir/$ac_word; then
916 if test -n "$CC"; then
917 echo "$ac_t""$CC" 1>&6
919 echo "$ac_t""no" 1>&6
924 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
927 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
928 echo "configure:940: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
931 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
932 ac_cpp='$CPP $CPPFLAGS'
933 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
934 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
935 cross_compiling=$ac_cv_prog_cc_cross
937 cat > conftest.$ac_ext << EOF
939 #line 951 "configure"
940 #include "confdefs.h"
944 if { (eval echo configure:956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
945 ac_cv_prog_cc_works=yes
946 # If we can't run a trivial program, we are probably using a cross compiler.
947 if (./conftest; exit) 2>/dev/null; then
948 ac_cv_prog_cc_cross=no
950 ac_cv_prog_cc_cross=yes
953 echo "configure: failed program was:" >&5
954 cat conftest.$ac_ext >&5
955 ac_cv_prog_cc_works=no
959 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
960 ac_cpp='$CPP $CPPFLAGS'
961 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
962 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
963 cross_compiling=$ac_cv_prog_cc_cross
965 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
966 if test $ac_cv_prog_cc_works = no; then
967 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
969 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
970 echo "configure:982: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
971 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
972 cross_compiling=$ac_cv_prog_cc_cross
974 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
975 echo "configure:987: checking whether we are using GNU C" >&5
976 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
977 echo $ac_n "(cached) $ac_c" 1>&6
979 cat > conftest.c <<EOF
984 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
991 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
993 if test $ac_cv_prog_gcc = yes; then
999 ac_test_CFLAGS="${CFLAGS+set}"
1000 ac_save_CFLAGS="$CFLAGS"
1002 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1003 echo "configure:1015: checking whether ${CC-cc} accepts -g" >&5
1004 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1005 echo $ac_n "(cached) $ac_c" 1>&6
1007 echo 'void f(){}' > conftest.c
1008 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1017 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1018 if test "$ac_test_CFLAGS" = set; then
1019 CFLAGS="$ac_save_CFLAGS"
1020 elif test $ac_cv_prog_cc_g = yes; then
1021 if test "$GCC" = yes; then
1027 if test "$GCC" = yes; then
1035 if test -z "$GCC"; then
1036 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
1037 echo "configure:1049: checking how to request ANSI compilation" >&5
1040 echo "$ac_t""HPUX: adding -Ae" 1>&6
1044 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
1045 CC="$CC -qlanglvl=ansi -qhalt=e"
1049 echo "$ac_t""DEC: adding -std1" 1>&6
1054 echo "$ac_t""no idea" 1>&6
1059 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
1060 echo "configure:1072: checking whether the compiler works on ANSI C" >&5
1061 if test "$cross_compiling" = yes; then
1062 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1064 cat > conftest.$ac_ext <<EOF
1065 #line 1077 "configure"
1066 #include "confdefs.h"
1067 main(int ac, char **av) { return 0; }
1069 if { (eval echo configure:1081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1071 echo "$ac_t""yes" 1>&6
1073 echo "configure: failed program was:" >&5
1074 cat conftest.$ac_ext >&5
1076 echo "$ac_t""no" 1>&6
1077 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1083 if test -n "$GCC"; then
1084 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
1085 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
1088 *-irix5* |*-irix6.0-3* )
1089 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1090 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1093 # if test -z "$GCC"; then
1094 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1095 # CC="$CC -migrate -w0 -verbose -warnprotos"
1101 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1102 echo "configure:1114: checking how to run the C preprocessor" >&5
1103 # On Suns, sometimes $CPP names a directory.
1104 if test -n "$CPP" && test -d "$CPP"; then
1107 if test -z "$CPP"; then
1108 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1109 echo $ac_n "(cached) $ac_c" 1>&6
1111 # This must be in double quotes, not single quotes, because CPP may get
1112 # substituted into the Makefile and "${CC-cc}" will confuse make.
1114 # On the NeXT, cc -E runs the code through the compiler's parser,
1115 # not just through cpp.
1116 cat > conftest.$ac_ext <<EOF
1117 #line 1129 "configure"
1118 #include "confdefs.h"
1122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1123 { (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1125 if test -z "$ac_err"; then
1129 echo "configure: failed program was:" >&5
1130 cat conftest.$ac_ext >&5
1132 CPP="${CC-cc} -E -traditional-cpp"
1133 cat > conftest.$ac_ext <<EOF
1134 #line 1146 "configure"
1135 #include "confdefs.h"
1139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1140 { (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1142 if test -z "$ac_err"; then
1146 echo "configure: failed program was:" >&5
1147 cat conftest.$ac_ext >&5
1149 CPP="${CC-cc} -nologo -E"
1150 cat > conftest.$ac_ext <<EOF
1151 #line 1163 "configure"
1152 #include "confdefs.h"
1156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1157 { (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1159 if test -z "$ac_err"; then
1163 echo "configure: failed program was:" >&5
1164 cat conftest.$ac_ext >&5
1173 ac_cv_prog_CPP="$CPP"
1175 CPP="$ac_cv_prog_CPP"
1177 ac_cv_prog_CPP="$CPP"
1179 echo "$ac_t""$CPP" 1>&6
1181 echo $ac_n "checking for working const""... $ac_c" 1>&6
1182 echo "configure:1194: checking for working const" >&5
1183 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1184 echo $ac_n "(cached) $ac_c" 1>&6
1186 cat > conftest.$ac_ext <<EOF
1187 #line 1199 "configure"
1188 #include "confdefs.h"
1192 /* Ultrix mips cc rejects this. */
1193 typedef int charset[2]; const charset x;
1194 /* SunOS 4.1.1 cc rejects this. */
1195 char const *const *ccp;
1197 /* NEC SVR4.0.2 mips cc rejects this. */
1198 struct point {int x, y;};
1199 static struct point const zero = {0,0};
1200 /* AIX XL C 1.02.0.0 rejects this.
1201 It does not let you subtract one const X* pointer from another in an arm
1202 of an if-expression whose if-part is not a constant expression */
1203 const char *g = "string";
1204 ccp = &g + (g ? g-g : 0);
1205 /* HPUX 7.0 cc rejects these. */
1208 ccp = (char const *const *) p;
1209 { /* SCO 3.2v4 cc rejects this. */
1211 char const *s = 0 ? (char *) 0 : (char const *) 0;
1215 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1217 const int *foo = &x[0];
1220 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1221 typedef const int *iptr;
1225 { /* AIX XL C 1.02.0.0 rejects this saying
1226 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1227 struct s { int j; const int *ap[3]; };
1228 struct s *b; b->j = 5;
1230 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1236 if { (eval echo configure:1248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1240 echo "configure: failed program was:" >&5
1241 cat conftest.$ac_ext >&5
1248 echo "$ac_t""$ac_cv_c_const" 1>&6
1249 if test $ac_cv_c_const = no; then
1250 cat >> confdefs.h <<\EOF
1256 echo $ac_n "checking for inline""... $ac_c" 1>&6
1257 echo "configure:1269: checking for inline" >&5
1258 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1259 echo $ac_n "(cached) $ac_c" 1>&6
1262 for ac_kw in inline __inline__ __inline; do
1263 cat > conftest.$ac_ext <<EOF
1264 #line 1276 "configure"
1265 #include "confdefs.h"
1271 if { (eval echo configure:1283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1273 ac_cv_c_inline=$ac_kw; break
1275 echo "configure: failed program was:" >&5
1276 cat conftest.$ac_ext >&5
1283 echo "$ac_t""$ac_cv_c_inline" 1>&6
1284 case "$ac_cv_c_inline" in
1286 no) cat >> confdefs.h <<\EOF
1290 *) cat >> confdefs.h <<EOF
1291 #define inline $ac_cv_c_inline
1297 # stuff for Makefiles
1298 # Find a good install program. We prefer a C program (faster),
1299 # so one script is as good as another. But avoid the broken or
1300 # incompatible versions:
1301 # SysV /etc/install, /usr/sbin/install
1302 # SunOS /usr/etc/install
1303 # IRIX /sbin/install
1305 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1306 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1307 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1308 # ./install, which can be erroneously created by make from ./install.sh.
1309 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1310 echo "configure:1322: checking for a BSD compatible install" >&5
1311 if test -z "$INSTALL"; then
1312 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1313 echo $ac_n "(cached) $ac_c" 1>&6
1315 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1316 for ac_dir in $PATH; do
1317 # Account for people who put trailing slashes in PATH elements.
1319 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1321 # OSF1 and SCO ODT 3.0 have their own names for install.
1322 # Don't use installbsd from OSF since it installs stuff as root
1324 for ac_prog in ginstall scoinst install; do
1325 if test -f $ac_dir/$ac_prog; then
1326 if test $ac_prog = install &&
1327 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1328 # AIX install. It has an incompatible calling convention.
1331 ac_cv_path_install="$ac_dir/$ac_prog -c"
1342 if test "${ac_cv_path_install+set}" = set; then
1343 INSTALL="$ac_cv_path_install"
1345 # As a last resort, use the slow shell script. We don't cache a
1346 # path for INSTALL within a source directory, because that will
1347 # break other packages using the cache if that directory is
1348 # removed, or if the path is relative.
1349 INSTALL="$ac_install_sh"
1352 echo "$ac_t""$INSTALL" 1>&6
1354 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1355 # It thinks the first close brace ends the variable substitution.
1356 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1358 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1360 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1362 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1363 echo "configure:1375: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1364 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1365 echo $ac_n "(cached) $ac_c" 1>&6
1367 ac_cv_install_d_creates_dirs=no
1369 if mkdir conftestdir; then
1371 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1372 if test -d dir1/dir2/. ; then
1373 ac_cv_install_d_creates_dirs=yes
1381 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1383 if test "$ac_cv_install_d_creates_dirs" = no ; then
1384 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1385 echo "configure:1397: checking whether \"mkdir -p\" creates intermediate directories" >&5
1386 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1387 echo $ac_n "(cached) $ac_c" 1>&6
1389 ac_cv_mkdir_p_creates_dirs=no
1391 if mkdir conftestdir; then
1393 mkdir -p dir1/dir2 >&- 2>&-
1394 if test -d dir1/dir2/. ; then
1395 ac_cv_mkdir_p_creates_dirs=yes
1403 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1406 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1407 INSTALL_DIRS='${INSTALL} -d'
1408 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1409 INSTALL_DIRS='mkdir -p'
1412 INSTALL_DIRS='${INSTALL} -d'
1415 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1416 echo "configure:1428: checking whether ${MAKE-make} sets \${MAKE}" >&5
1417 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1418 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1419 echo $ac_n "(cached) $ac_c" 1>&6
1421 cat > conftestmake <<\EOF
1423 @echo 'ac_maketemp="${MAKE}"'
1425 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1426 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1427 if test -n "$ac_maketemp"; then
1428 eval ac_cv_prog_make_${ac_make}_set=yes
1430 eval ac_cv_prog_make_${ac_make}_set=no
1434 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1435 echo "$ac_t""yes" 1>&6
1438 echo "$ac_t""no" 1>&6
1439 SET_MAKE="MAKE=${MAKE-make}"
1444 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1445 echo "configure:1457: checking for ANSI C header files" >&5
1446 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1447 echo $ac_n "(cached) $ac_c" 1>&6
1449 cat > conftest.$ac_ext <<EOF
1450 #line 1462 "configure"
1451 #include "confdefs.h"
1457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1458 { (eval echo configure:1470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1460 if test -z "$ac_err"; then
1462 ac_cv_header_stdc=yes
1465 echo "configure: failed program was:" >&5
1466 cat conftest.$ac_ext >&5
1468 ac_cv_header_stdc=no
1472 if test $ac_cv_header_stdc = yes; then
1473 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1474 cat > conftest.$ac_ext <<EOF
1475 #line 1487 "configure"
1476 #include "confdefs.h"
1479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1480 egrep "memchr" >/dev/null 2>&1; then
1484 ac_cv_header_stdc=no
1490 if test $ac_cv_header_stdc = yes; then
1491 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1492 cat > conftest.$ac_ext <<EOF
1493 #line 1505 "configure"
1494 #include "confdefs.h"
1497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1498 egrep "free" >/dev/null 2>&1; then
1502 ac_cv_header_stdc=no
1508 if test $ac_cv_header_stdc = yes; then
1509 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1510 if test "$cross_compiling" = yes; then
1513 cat > conftest.$ac_ext <<EOF
1514 #line 1526 "configure"
1515 #include "confdefs.h"
1517 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1518 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1519 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1520 int main () { int i; for (i = 0; i < 256; i++)
1521 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1525 if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1529 echo "configure: failed program was:" >&5
1530 cat conftest.$ac_ext >&5
1532 ac_cv_header_stdc=no
1540 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1541 if test $ac_cv_header_stdc = yes; then
1542 cat >> confdefs.h <<\EOF
1543 #define STDC_HEADERS 1
1548 for ac_hdr in unistd.h
1550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1552 echo "configure:1564: checking for $ac_hdr" >&5
1553 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1554 echo $ac_n "(cached) $ac_c" 1>&6
1556 cat > conftest.$ac_ext <<EOF
1557 #line 1569 "configure"
1558 #include "confdefs.h"
1561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1562 { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1564 if test -z "$ac_err"; then
1566 eval "ac_cv_header_$ac_safe=yes"
1569 echo "configure: failed program was:" >&5
1570 cat conftest.$ac_ext >&5
1572 eval "ac_cv_header_$ac_safe=no"
1576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1577 echo "$ac_t""yes" 1>&6
1578 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1579 cat >> confdefs.h <<EOF
1580 #define $ac_tr_hdr 1
1584 echo "$ac_t""no" 1>&6
1588 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1589 echo "configure:1601: checking for mode_t" >&5
1590 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1591 echo $ac_n "(cached) $ac_c" 1>&6
1593 cat > conftest.$ac_ext <<EOF
1594 #line 1606 "configure"
1595 #include "confdefs.h"
1596 #include <sys/types.h>
1602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1603 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1605 ac_cv_type_mode_t=yes
1608 ac_cv_type_mode_t=no
1613 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1614 if test $ac_cv_type_mode_t = no; then
1615 cat >> confdefs.h <<\EOF
1621 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1622 echo "configure:1634: checking for pid_t" >&5
1623 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1624 echo $ac_n "(cached) $ac_c" 1>&6
1626 cat > conftest.$ac_ext <<EOF
1627 #line 1639 "configure"
1628 #include "confdefs.h"
1629 #include <sys/types.h>
1635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1636 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1638 ac_cv_type_pid_t=yes
1646 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1647 if test $ac_cv_type_pid_t = no; then
1648 cat >> confdefs.h <<\EOF
1654 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1655 echo "configure:1667: checking for size_t" >&5
1656 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1657 echo $ac_n "(cached) $ac_c" 1>&6
1659 cat > conftest.$ac_ext <<EOF
1660 #line 1672 "configure"
1661 #include "confdefs.h"
1662 #include <sys/types.h>
1668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1669 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1671 ac_cv_type_size_t=yes
1674 ac_cv_type_size_t=no
1679 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1680 if test $ac_cv_type_size_t = no; then
1681 cat >> confdefs.h <<\EOF
1682 #define size_t unsigned
1687 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1688 echo "configure:1700: checking return type of signal handlers" >&5
1689 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1690 echo $ac_n "(cached) $ac_c" 1>&6
1692 cat > conftest.$ac_ext <<EOF
1693 #line 1705 "configure"
1694 #include "confdefs.h"
1695 #include <sys/types.h>
1701 extern "C" void (*signal (int, void (*)(int)))(int);
1703 void (*signal ()) ();
1710 if { (eval echo configure:1722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1712 ac_cv_type_signal=void
1714 echo "configure: failed program was:" >&5
1715 cat conftest.$ac_ext >&5
1717 ac_cv_type_signal=int
1722 echo "$ac_t""$ac_cv_type_signal" 1>&6
1723 cat >> confdefs.h <<EOF
1724 #define RETSIGTYPE $ac_cv_type_signal
1728 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1729 echo "configure:1741: checking whether time.h and sys/time.h may both be included" >&5
1730 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1731 echo $ac_n "(cached) $ac_c" 1>&6
1733 cat > conftest.$ac_ext <<EOF
1734 #line 1746 "configure"
1735 #include "confdefs.h"
1736 #include <sys/types.h>
1737 #include <sys/time.h>
1743 if { (eval echo configure:1755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1745 ac_cv_header_time=yes
1747 echo "configure: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1750 ac_cv_header_time=no
1755 echo "$ac_t""$ac_cv_header_time" 1>&6
1756 if test $ac_cv_header_time = yes; then
1757 cat >> confdefs.h <<\EOF
1758 #define TIME_WITH_SYS_TIME 1
1763 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1764 echo "configure:1776: checking for sys/wait.h that is POSIX.1 compatible" >&5
1765 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1766 echo $ac_n "(cached) $ac_c" 1>&6
1768 cat > conftest.$ac_ext <<EOF
1769 #line 1781 "configure"
1770 #include "confdefs.h"
1771 #include <sys/types.h>
1772 #include <sys/wait.h>
1774 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1777 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1782 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1785 if { (eval echo configure:1797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1787 ac_cv_header_sys_wait_h=yes
1789 echo "configure: failed program was:" >&5
1790 cat conftest.$ac_ext >&5
1792 ac_cv_header_sys_wait_h=no
1797 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1798 if test $ac_cv_header_sys_wait_h = yes; then
1799 cat >> confdefs.h <<\EOF
1800 #define HAVE_SYS_WAIT_H 1
1806 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1808 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1809 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1810 echo "configure:1822: checking for $ac_hdr that defines DIR" >&5
1811 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1812 echo $ac_n "(cached) $ac_c" 1>&6
1814 cat > conftest.$ac_ext <<EOF
1815 #line 1827 "configure"
1816 #include "confdefs.h"
1817 #include <sys/types.h>
1823 if { (eval echo configure:1835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1825 eval "ac_cv_header_dirent_$ac_safe=yes"
1827 echo "configure: failed program was:" >&5
1828 cat conftest.$ac_ext >&5
1830 eval "ac_cv_header_dirent_$ac_safe=no"
1834 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1835 echo "$ac_t""yes" 1>&6
1836 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1837 cat >> confdefs.h <<EOF
1838 #define $ac_tr_hdr 1
1840 ac_header_dirent=$ac_hdr; break
1842 echo "$ac_t""no" 1>&6
1845 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1846 if test $ac_header_dirent = dirent.h; then
1847 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1848 echo "configure:1860: checking for opendir in -ldir" >&5
1849 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1851 echo $ac_n "(cached) $ac_c" 1>&6
1853 ac_save_LIBS="$LIBS"
1855 cat > conftest.$ac_ext <<EOF
1856 #line 1868 "configure"
1857 #include "confdefs.h"
1858 /* Override any gcc2 internal prototype to avoid an error. */
1859 /* We use char because int might match the return type of a gcc2
1860 builtin and then its argument prototype would still apply. */
1867 if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1869 eval "ac_cv_lib_$ac_lib_var=yes"
1871 echo "configure: failed program was:" >&5
1872 cat conftest.$ac_ext >&5
1874 eval "ac_cv_lib_$ac_lib_var=no"
1877 LIBS="$ac_save_LIBS"
1880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1881 echo "$ac_t""yes" 1>&6
1884 echo "$ac_t""no" 1>&6
1888 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1889 echo "configure:1901: checking for opendir in -lx" >&5
1890 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1891 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1892 echo $ac_n "(cached) $ac_c" 1>&6
1894 ac_save_LIBS="$LIBS"
1896 cat > conftest.$ac_ext <<EOF
1897 #line 1909 "configure"
1898 #include "confdefs.h"
1899 /* Override any gcc2 internal prototype to avoid an error. */
1900 /* We use char because int might match the return type of a gcc2
1901 builtin and then its argument prototype would still apply. */
1908 if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1910 eval "ac_cv_lib_$ac_lib_var=yes"
1912 echo "configure: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1915 eval "ac_cv_lib_$ac_lib_var=no"
1918 LIBS="$ac_save_LIBS"
1921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1922 echo "$ac_t""yes" 1>&6
1925 echo "$ac_t""no" 1>&6
1930 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1931 echo "configure:1943: checking how to call gettimeofday" >&5
1932 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1933 echo $ac_n "(cached) $ac_c" 1>&6
1935 cat > conftest.$ac_ext <<EOF
1936 #line 1948 "configure"
1937 #include "confdefs.h"
1939 #include <sys/time.h>
1941 struct timeval tv; struct timezone tzp;
1942 gettimeofday(&tv, &tzp);
1945 if { (eval echo configure:1957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1947 ac_gettimeofday_args=2
1949 echo "configure: failed program was:" >&5
1950 cat conftest.$ac_ext >&5
1952 cat > conftest.$ac_ext <<EOF
1953 #line 1965 "configure"
1954 #include "confdefs.h"
1956 #include <sys/time.h>
1958 struct timeval tv; gettimeofday(&tv);
1961 if { (eval echo configure:1973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1963 ac_gettimeofday_args=1
1965 echo "configure: failed program was:" >&5
1966 cat conftest.$ac_ext >&5
1968 ac_gettimeofday_args=0
1973 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1976 ac_gettimeofday_args=$ac_cv_gettimeofday_args
1977 if test "$ac_gettimeofday_args" = 1 ; then
1978 cat >> confdefs.h <<\EOF
1979 #define HAVE_GETTIMEOFDAY 1
1982 echo "$ac_t""one argument" 1>&6
1983 elif test "$ac_gettimeofday_args" = 2 ; then
1984 cat >> confdefs.h <<\EOF
1985 #define HAVE_GETTIMEOFDAY 1
1988 cat >> confdefs.h <<\EOF
1989 #define GETTIMEOFDAY_TWO_ARGS 1
1992 echo "$ac_t""two arguments" 1>&6
1994 echo "$ac_t""unknown" 1>&6
1997 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
1999 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2000 echo "configure:2012: checking for $ac_func" >&5
2001 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2002 echo $ac_n "(cached) $ac_c" 1>&6
2004 cat > conftest.$ac_ext <<EOF
2005 #line 2017 "configure"
2006 #include "confdefs.h"
2007 /* System header to define __stub macros and hopefully few prototypes,
2008 which can conflict with char $ac_func(); below. */
2010 /* Override any gcc2 internal prototype to avoid an error. */
2011 /* We use char because int might match the return type of a gcc2
2012 builtin and then its argument prototype would still apply. */
2017 /* The GNU C library defines this for functions which it implements
2018 to always fail with ENOSYS. Some functions are actually named
2019 something starting with __ and the normal name is an alias. */
2020 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2028 if { (eval echo configure:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2030 eval "ac_cv_func_$ac_func=yes"
2032 echo "configure: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2035 eval "ac_cv_func_$ac_func=no"
2040 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2041 echo "$ac_t""yes" 1>&6
2042 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2043 cat >> confdefs.h <<EOF
2044 #define $ac_tr_func 1
2048 echo "$ac_t""no" 1>&6
2053 for ac_func in sigaction syslog realpath
2055 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2056 echo "configure:2068: checking for $ac_func" >&5
2057 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2058 echo $ac_n "(cached) $ac_c" 1>&6
2060 cat > conftest.$ac_ext <<EOF
2061 #line 2073 "configure"
2062 #include "confdefs.h"
2063 /* System header to define __stub macros and hopefully few prototypes,
2064 which can conflict with char $ac_func(); below. */
2066 /* Override any gcc2 internal prototype to avoid an error. */
2067 /* We use char because int might match the return type of a gcc2
2068 builtin and then its argument prototype would still apply. */
2073 /* The GNU C library defines this for functions which it implements
2074 to always fail with ENOSYS. Some functions are actually named
2075 something starting with __ and the normal name is an alias. */
2076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2084 if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2086 eval "ac_cv_func_$ac_func=yes"
2088 echo "configure: failed program was:" >&5
2089 cat conftest.$ac_ext >&5
2091 eval "ac_cv_func_$ac_func=no"
2096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2097 echo "$ac_t""yes" 1>&6
2098 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2099 cat >> confdefs.h <<EOF
2100 #define $ac_tr_func 1
2104 echo "$ac_t""no" 1>&6
2108 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2109 echo "configure:2121: checking for struct icmp" >&5
2110 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2111 echo $ac_n "(cached) $ac_c" 1>&6
2113 cat > conftest.$ac_ext <<EOF
2114 #line 2126 "configure"
2115 #include "confdefs.h"
2123 #include <sys/types.h>
2124 #include <sys/time.h>
2125 #include <sys/ipc.h>
2126 #include <sys/shm.h>
2127 #include <sys/socket.h>
2128 #include <netinet/in_systm.h>
2129 #include <netinet/in.h>
2130 #include <netinet/ip.h>
2131 #include <netinet/ip_icmp.h>
2132 #include <netinet/udp.h>
2133 #include <arpa/inet.h>
2138 struct sockaddr_in si;
2140 i.icmp_type = ICMP_ECHO;
2145 si.sin_family = AF_INET;
2149 if { (eval echo configure:2161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2153 echo "configure: failed program was:" >&5
2154 cat conftest.$ac_ext >&5
2161 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2162 if test "$ac_cv_have_icmp" = yes ; then
2163 cat >> confdefs.h <<\EOF
2168 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2169 echo "configure:2181: checking for struct icmphdr" >&5
2170 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2171 echo $ac_n "(cached) $ac_c" 1>&6
2173 cat > conftest.$ac_ext <<EOF
2174 #line 2186 "configure"
2175 #include "confdefs.h"
2183 #include <sys/types.h>
2184 #include <sys/time.h>
2185 #include <sys/ipc.h>
2186 #include <sys/shm.h>
2187 #include <sys/socket.h>
2188 #include <netinet/in_systm.h>
2189 #include <netinet/in.h>
2190 #include <netinet/ip.h>
2191 #include <netinet/ip_icmp.h>
2192 #include <netinet/udp.h>
2193 #include <arpa/inet.h>
2198 struct sockaddr_in si;
2204 i.un.echo.sequence = 0;
2205 si.sin_family = AF_INET;
2209 if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2211 ac_cv_have_icmphdr=yes
2213 echo "configure: failed program was:" >&5
2214 cat conftest.$ac_ext >&5
2216 ac_cv_have_icmphdr=no
2221 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2222 if test "$ac_cv_have_icmphdr" = yes ; then
2223 cat >> confdefs.h <<\EOF
2224 #define HAVE_ICMPHDR 1
2228 for ac_hdr in crypt.h sys/select.h
2230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2232 echo "configure:2244: checking for $ac_hdr" >&5
2233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2234 echo $ac_n "(cached) $ac_c" 1>&6
2236 cat > conftest.$ac_ext <<EOF
2237 #line 2249 "configure"
2238 #include "confdefs.h"
2241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2242 { (eval echo configure:2254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2244 if test -z "$ac_err"; then
2246 eval "ac_cv_header_$ac_safe=yes"
2249 echo "configure: failed program was:" >&5
2250 cat conftest.$ac_ext >&5
2252 eval "ac_cv_header_$ac_safe=no"
2256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2257 echo "$ac_t""yes" 1>&6
2258 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2259 cat >> confdefs.h <<EOF
2260 #define $ac_tr_hdr 1
2264 echo "$ac_t""no" 1>&6
2268 for ac_prog in perl5 perl
2270 # Extract the first word of "$ac_prog", so it can be a program name with args.
2271 set dummy $ac_prog; ac_word=$2
2272 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2273 echo "configure:2285: checking for $ac_word" >&5
2274 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2275 echo $ac_n "(cached) $ac_c" 1>&6
2279 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2282 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2285 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2287 for ac_dir in $ac_dummy; do
2288 test -z "$ac_dir" && ac_dir=.
2289 if test -f $ac_dir/$ac_word; then
2290 ac_cv_path_PERL="$ac_dir/$ac_word"
2298 PERL="$ac_cv_path_PERL"
2299 if test -n "$PERL"; then
2300 echo "$ac_t""$PERL" 1>&6
2302 echo "$ac_t""no" 1>&6
2305 test -n "$PERL" && break
2308 if test -z "$PERL" ; then
2311 echo $ac_n "checking perl version""... $ac_c" 1>&6
2312 echo "configure:2324: checking perl version" >&5
2313 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2314 echo $ac_n "(cached) $ac_c" 1>&6
2316 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2319 echo "$ac_t""$ac_cv_perl_version" 1>&6
2320 PERL_VERSION=$ac_cv_perl_version
2324 if test -z "$PERL" ; then
2325 # don't let it be blank...
2326 PERL=/usr/local/bin/perl5
2329 # If we find X, set shell vars x_includes and x_libraries to the
2330 # paths, otherwise set no_x=yes.
2331 # Uses ac_ vars as temps to allow command line to override cache and checks.
2332 # --without-x overrides everything else, but does not touch the cache.
2333 echo $ac_n "checking for X""... $ac_c" 1>&6
2334 echo "configure:2346: checking for X" >&5
2336 # Check whether --with-x or --without-x was given.
2337 if test "${with_x+set}" = set; then
2342 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2343 if test "x$with_x" = xno; then
2344 # The user explicitly disabled X.
2347 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2348 # Both variables are already set.
2351 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2352 echo $ac_n "(cached) $ac_c" 1>&6
2354 # One or both of the vars are not set, and there is no cached value.
2355 ac_x_includes=NO ac_x_libraries=NO
2357 if mkdir conftestdir; then
2359 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2360 cat > Imakefile <<'EOF'
2362 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2364 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2365 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2366 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2367 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2368 for ac_extension in a so sl; do
2369 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2370 test -f $ac_im_libdir/libX11.$ac_extension; then
2371 ac_im_usrlibdir=$ac_im_libdir; break
2374 # Screen out bogus values from the imake configuration. They are
2375 # bogus both because they are the default anyway, and because
2376 # using them would break gcc on systems where it needs fixed includes.
2377 case "$ac_im_incroot" in
2379 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2381 case "$ac_im_usrlibdir" in
2383 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2390 if test "$ac_x_includes" = NO; then
2391 # Guess where to find include files, by looking for this one X11 .h file.
2392 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2394 # First, try using that file with no special directory specified.
2395 cat > conftest.$ac_ext <<EOF
2396 #line 2408 "configure"
2397 #include "confdefs.h"
2398 #include <$x_direct_test_include>
2400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2401 { (eval echo configure:2413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2403 if test -z "$ac_err"; then
2405 # We can compile using X headers with no special include directory.
2409 echo "configure: failed program was:" >&5
2410 cat conftest.$ac_ext >&5
2412 # Look for the header file in a standard set of common directories.
2413 # Check X11 before X11Rn because it is often a symlink to the current release.
2416 /usr/X11R6/include \
2417 /usr/X11R5/include \
2418 /usr/X11R4/include \
2421 /usr/include/X11R6 \
2422 /usr/include/X11R5 \
2423 /usr/include/X11R4 \
2425 /usr/local/X11/include \
2426 /usr/local/X11R6/include \
2427 /usr/local/X11R5/include \
2428 /usr/local/X11R4/include \
2430 /usr/local/include/X11 \
2431 /usr/local/include/X11R6 \
2432 /usr/local/include/X11R5 \
2433 /usr/local/include/X11R4 \
2437 /usr/XFree86/include/X11 \
2440 /usr/local/include \
2441 /usr/unsupported/include \
2442 /usr/athena/include \
2443 /usr/local/x11r5/include \
2444 /usr/lpp/Xamples/include \
2446 /usr/openwin/include \
2447 /usr/openwin/share/include \
2450 if test -r "$ac_dir/$x_direct_test_include"; then
2451 ac_x_includes=$ac_dir
2457 fi # $ac_x_includes = NO
2459 if test "$ac_x_libraries" = NO; then
2460 # Check for the libraries.
2462 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2463 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2465 # See if we find them without any special options.
2466 # Don't add to $LIBS permanently.
2467 ac_save_LIBS="$LIBS"
2468 LIBS="-l$x_direct_test_library $LIBS"
2469 cat > conftest.$ac_ext <<EOF
2470 #line 2482 "configure"
2471 #include "confdefs.h"
2474 ${x_direct_test_function}()
2477 if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2479 LIBS="$ac_save_LIBS"
2480 # We can link X programs with no special library path.
2483 echo "configure: failed program was:" >&5
2484 cat conftest.$ac_ext >&5
2486 LIBS="$ac_save_LIBS"
2487 # First see if replacing the include by lib works.
2488 # Check X11 before X11Rn because it is often a symlink to the current release.
2489 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2500 /usr/local/X11/lib \
2501 /usr/local/X11R6/lib \
2502 /usr/local/X11R5/lib \
2503 /usr/local/X11R4/lib \
2505 /usr/local/lib/X11 \
2506 /usr/local/lib/X11R6 \
2507 /usr/local/lib/X11R5 \
2508 /usr/local/lib/X11R4 \
2512 /usr/XFree86/lib/X11 \
2516 /usr/unsupported/lib \
2518 /usr/local/x11r5/lib \
2519 /usr/lpp/Xamples/lib \
2523 /usr/openwin/share/lib \
2526 for ac_extension in a so sl; do
2527 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2528 ac_x_libraries=$ac_dir
2535 fi # $ac_x_libraries = NO
2537 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2538 # Didn't find X anywhere. Cache the known absence of X.
2539 ac_cv_have_x="have_x=no"
2541 # Record where we found X for the cache.
2542 ac_cv_have_x="have_x=yes \
2543 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2547 eval "$ac_cv_have_x"
2550 if test "$have_x" != yes; then
2551 echo "$ac_t""$have_x" 1>&6
2554 # If each of the values was on the command line, it overrides each guess.
2555 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2556 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2557 # Update the cache value to reflect the command line values.
2558 ac_cv_have_x="have_x=yes \
2559 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2560 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2563 if test "$no_x" = yes; then
2564 # Not all programs may use this symbol, but it does not hurt to define it.
2565 cat >> confdefs.h <<\EOF
2566 #define X_DISPLAY_MISSING 1
2569 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2571 if test -n "$x_includes"; then
2572 X_CFLAGS="$X_CFLAGS -I$x_includes"
2575 # It would also be nice to do this for all -L options, not just this one.
2576 if test -n "$x_libraries"; then
2577 X_LIBS="$X_LIBS -L$x_libraries"
2578 # For Solaris; some versions of Sun CC require a space after -R and
2579 # others require no space. Words are not sufficient . . . .
2580 case "`(uname -sr) 2>/dev/null`" in
2582 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2583 echo "configure:2595: checking whether -R must be followed by a space" >&5
2584 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2585 cat > conftest.$ac_ext <<EOF
2586 #line 2598 "configure"
2587 #include "confdefs.h"
2593 if { (eval echo configure:2605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2597 echo "configure: failed program was:" >&5
2598 cat conftest.$ac_ext >&5
2603 if test $ac_R_nospace = yes; then
2604 echo "$ac_t""no" 1>&6
2605 X_LIBS="$X_LIBS -R$x_libraries"
2607 LIBS="$ac_xsave_LIBS -R $x_libraries"
2608 cat > conftest.$ac_ext <<EOF
2609 #line 2621 "configure"
2610 #include "confdefs.h"
2616 if { (eval echo configure:2628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2620 echo "configure: failed program was:" >&5
2621 cat conftest.$ac_ext >&5
2626 if test $ac_R_space = yes; then
2627 echo "$ac_t""yes" 1>&6
2628 X_LIBS="$X_LIBS -R $x_libraries"
2630 echo "$ac_t""neither works" 1>&6
2633 LIBS="$ac_xsave_LIBS"
2637 # Check for system-dependent libraries X programs must link with.
2638 # Do this before checking for the system-independent R6 libraries
2639 # (-lICE), since we may need -lsocket or whatever for X linking.
2641 if test "$ISC" = yes; then
2642 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2644 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2645 # libraries were built with DECnet support. And karl@cs.umb.edu says
2646 # the Alpha needs dnet_stub (dnet does not exist).
2647 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2648 echo "configure:2660: checking for dnet_ntoa in -ldnet" >&5
2649 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2650 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2651 echo $ac_n "(cached) $ac_c" 1>&6
2653 ac_save_LIBS="$LIBS"
2655 cat > conftest.$ac_ext <<EOF
2656 #line 2668 "configure"
2657 #include "confdefs.h"
2658 /* Override any gcc2 internal prototype to avoid an error. */
2659 /* We use char because int might match the return type of a gcc2
2660 builtin and then its argument prototype would still apply. */
2667 if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2669 eval "ac_cv_lib_$ac_lib_var=yes"
2671 echo "configure: failed program was:" >&5
2672 cat conftest.$ac_ext >&5
2674 eval "ac_cv_lib_$ac_lib_var=no"
2677 LIBS="$ac_save_LIBS"
2680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2681 echo "$ac_t""yes" 1>&6
2682 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2684 echo "$ac_t""no" 1>&6
2687 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2688 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2689 echo "configure:2701: checking for dnet_ntoa in -ldnet_stub" >&5
2690 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2691 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2692 echo $ac_n "(cached) $ac_c" 1>&6
2694 ac_save_LIBS="$LIBS"
2695 LIBS="-ldnet_stub $LIBS"
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2709 "configure"
2698 #include "confdefs.h"
2699 /* Override any gcc2 internal prototype to avoid an error. */
2700 /* We use char because int might match the return type of a gcc2
2701 builtin and then its argument prototype would still apply. */
2708 if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2710 eval "ac_cv_lib_$ac_lib_var=yes"
2712 echo "configure: failed program was:" >&5
2713 cat conftest.$ac_ext >&5
2715 eval "ac_cv_lib_$ac_lib_var=no"
2718 LIBS="$ac_save_LIBS"
2721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2722 echo "$ac_t""yes" 1>&6
2723 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2725 echo "$ac_t""no" 1>&6
2730 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2731 # to get the SysV transport functions.
2732 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2734 # The nsl library prevents programs from opening the X display
2735 # on Irix 5.2, according to dickey@clark.net.
2736 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2737 echo "configure:2749: checking for gethostbyname" >&5
2738 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2739 echo $ac_n "(cached) $ac_c" 1>&6
2741 cat > conftest.$ac_ext <<EOF
2742 #line 2754 "configure"
2743 #include "confdefs.h"
2744 /* System header to define __stub macros and hopefully few prototypes,
2745 which can conflict with char gethostbyname(); below. */
2747 /* Override any gcc2 internal prototype to avoid an error. */
2748 /* We use char because int might match the return type of a gcc2
2749 builtin and then its argument prototype would still apply. */
2750 char gethostbyname();
2754 /* The GNU C library defines this for functions which it implements
2755 to always fail with ENOSYS. Some functions are actually named
2756 something starting with __ and the normal name is an alias. */
2757 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2765 if { (eval echo configure:2777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2767 eval "ac_cv_func_gethostbyname=yes"
2769 echo "configure: failed program was:" >&5
2770 cat conftest.$ac_ext >&5
2772 eval "ac_cv_func_gethostbyname=no"
2777 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2778 echo "$ac_t""yes" 1>&6
2781 echo "$ac_t""no" 1>&6
2784 if test $ac_cv_func_gethostbyname = no; then
2785 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2786 echo "configure:2798: checking for gethostbyname in -lnsl" >&5
2787 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2788 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2789 echo $ac_n "(cached) $ac_c" 1>&6
2791 ac_save_LIBS="$LIBS"
2793 cat > conftest.$ac_ext <<EOF
2794 #line 2806 "configure"
2795 #include "confdefs.h"
2796 /* Override any gcc2 internal prototype to avoid an error. */
2797 /* We use char because int might match the return type of a gcc2
2798 builtin and then its argument prototype would still apply. */
2799 char gethostbyname();
2805 if { (eval echo configure:2817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2807 eval "ac_cv_lib_$ac_lib_var=yes"
2809 echo "configure: failed program was:" >&5
2810 cat conftest.$ac_ext >&5
2812 eval "ac_cv_lib_$ac_lib_var=no"
2815 LIBS="$ac_save_LIBS"
2818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2819 echo "$ac_t""yes" 1>&6
2820 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2822 echo "$ac_t""no" 1>&6
2827 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2828 # socket/setsockopt and other routines are undefined under SCO ODT
2829 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2830 # on later versions), says simon@lia.di.epfl.ch: it contains
2831 # gethostby* variants that don't use the nameserver (or something).
2832 # -lsocket must be given before -lnsl if both are needed.
2833 # We assume that if connect needs -lnsl, so does gethostbyname.
2834 echo $ac_n "checking for connect""... $ac_c" 1>&6
2835 echo "configure:2847: checking for connect" >&5
2836 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2837 echo $ac_n "(cached) $ac_c" 1>&6
2839 cat > conftest.$ac_ext <<EOF
2840 #line 2852 "configure"
2841 #include "confdefs.h"
2842 /* System header to define __stub macros and hopefully few prototypes,
2843 which can conflict with char connect(); below. */
2845 /* Override any gcc2 internal prototype to avoid an error. */
2846 /* We use char because int might match the return type of a gcc2
2847 builtin and then its argument prototype would still apply. */
2852 /* The GNU C library defines this for functions which it implements
2853 to always fail with ENOSYS. Some functions are actually named
2854 something starting with __ and the normal name is an alias. */
2855 #if defined (__stub_connect) || defined (__stub___connect)
2863 if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2865 eval "ac_cv_func_connect=yes"
2867 echo "configure: failed program was:" >&5
2868 cat conftest.$ac_ext >&5
2870 eval "ac_cv_func_connect=no"
2875 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2876 echo "$ac_t""yes" 1>&6
2879 echo "$ac_t""no" 1>&6
2882 if test $ac_cv_func_connect = no; then
2883 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2884 echo "configure:2896: checking for connect in -lsocket" >&5
2885 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2886 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2887 echo $ac_n "(cached) $ac_c" 1>&6
2889 ac_save_LIBS="$LIBS"
2890 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2891 cat > conftest.$ac_ext <<EOF
2892 #line 2904 "configure"
2893 #include "confdefs.h"
2894 /* Override any gcc2 internal prototype to avoid an error. */
2895 /* We use char because int might match the return type of a gcc2
2896 builtin and then its argument prototype would still apply. */
2903 if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2905 eval "ac_cv_lib_$ac_lib_var=yes"
2907 echo "configure: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2910 eval "ac_cv_lib_$ac_lib_var=no"
2913 LIBS="$ac_save_LIBS"
2916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2917 echo "$ac_t""yes" 1>&6
2918 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2920 echo "$ac_t""no" 1>&6
2925 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2926 echo $ac_n "checking for remove""... $ac_c" 1>&6
2927 echo "configure:2939: checking for remove" >&5
2928 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2929 echo $ac_n "(cached) $ac_c" 1>&6
2931 cat > conftest.$ac_ext <<EOF
2932 #line 2944 "configure"
2933 #include "confdefs.h"
2934 /* System header to define __stub macros and hopefully few prototypes,
2935 which can conflict with char remove(); below. */
2937 /* Override any gcc2 internal prototype to avoid an error. */
2938 /* We use char because int might match the return type of a gcc2
2939 builtin and then its argument prototype would still apply. */
2944 /* The GNU C library defines this for functions which it implements
2945 to always fail with ENOSYS. Some functions are actually named
2946 something starting with __ and the normal name is an alias. */
2947 #if defined (__stub_remove) || defined (__stub___remove)
2955 if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2957 eval "ac_cv_func_remove=yes"
2959 echo "configure: failed program was:" >&5
2960 cat conftest.$ac_ext >&5
2962 eval "ac_cv_func_remove=no"
2967 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2968 echo "$ac_t""yes" 1>&6
2971 echo "$ac_t""no" 1>&6
2974 if test $ac_cv_func_remove = no; then
2975 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2976 echo "configure:2988: checking for remove in -lposix" >&5
2977 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2978 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2979 echo $ac_n "(cached) $ac_c" 1>&6
2981 ac_save_LIBS="$LIBS"
2982 LIBS="-lposix $LIBS"
2983 cat > conftest.$ac_ext <<EOF
2984 #line 2996 "configure"
2985 #include "confdefs.h"
2986 /* Override any gcc2 internal prototype to avoid an error. */
2987 /* We use char because int might match the return type of a gcc2
2988 builtin and then its argument prototype would still apply. */
2995 if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2997 eval "ac_cv_lib_$ac_lib_var=yes"
2999 echo "configure: failed program was:" >&5
3000 cat conftest.$ac_ext >&5
3002 eval "ac_cv_lib_$ac_lib_var=no"
3005 LIBS="$ac_save_LIBS"
3008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3009 echo "$ac_t""yes" 1>&6
3010 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3012 echo "$ac_t""no" 1>&6
3017 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3018 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3019 echo "configure:3031: checking for shmat" >&5
3020 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3021 echo $ac_n "(cached) $ac_c" 1>&6
3023 cat > conftest.$ac_ext <<EOF
3024 #line 3036 "configure"
3025 #include "confdefs.h"
3026 /* System header to define __stub macros and hopefully few prototypes,
3027 which can conflict with char shmat(); below. */
3029 /* Override any gcc2 internal prototype to avoid an error. */
3030 /* We use char because int might match the return type of a gcc2
3031 builtin and then its argument prototype would still apply. */
3036 /* The GNU C library defines this for functions which it implements
3037 to always fail with ENOSYS. Some functions are actually named
3038 something starting with __ and the normal name is an alias. */
3039 #if defined (__stub_shmat) || defined (__stub___shmat)
3047 if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3049 eval "ac_cv_func_shmat=yes"
3051 echo "configure: failed program was:" >&5
3052 cat conftest.$ac_ext >&5
3054 eval "ac_cv_func_shmat=no"
3059 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3060 echo "$ac_t""yes" 1>&6
3063 echo "$ac_t""no" 1>&6
3066 if test $ac_cv_func_shmat = no; then
3067 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3068 echo "configure:3080: checking for shmat in -lipc" >&5
3069 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3071 echo $ac_n "(cached) $ac_c" 1>&6
3073 ac_save_LIBS="$LIBS"
3075 cat > conftest.$ac_ext <<EOF
3076 #line 3088 "configure"
3077 #include "confdefs.h"
3078 /* Override any gcc2 internal prototype to avoid an error. */
3079 /* We use char because int might match the return type of a gcc2
3080 builtin and then its argument prototype would still apply. */
3087 if { (eval echo configure:3099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3089 eval "ac_cv_lib_$ac_lib_var=yes"
3091 echo "configure: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3094 eval "ac_cv_lib_$ac_lib_var=no"
3097 LIBS="$ac_save_LIBS"
3100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3101 echo "$ac_t""yes" 1>&6
3102 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3104 echo "$ac_t""no" 1>&6
3110 # Check for libraries that X11R6 Xt/Xaw programs need.
3111 ac_save_LDFLAGS="$LDFLAGS"
3112 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3113 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3114 # check for ICE first), but we must link in the order -lSM -lICE or
3115 # we get undefined symbols. So assume we have SM if we have ICE.
3116 # These have to be linked with before -lX11, unlike the other
3117 # libraries we check for below, so use a different variable.
3118 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3119 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3120 echo "configure:3132: checking for IceConnectionNumber in -lICE" >&5
3121 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3122 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3123 echo $ac_n "(cached) $ac_c" 1>&6
3125 ac_save_LIBS="$LIBS"
3126 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3127 cat > conftest.$ac_ext <<EOF
3128 #line 3140 "configure"
3129 #include "confdefs.h"
3130 /* Override any gcc2 internal prototype to avoid an error. */
3131 /* We use char because int might match the return type of a gcc2
3132 builtin and then its argument prototype would still apply. */
3133 char IceConnectionNumber();
3136 IceConnectionNumber()
3139 if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3141 eval "ac_cv_lib_$ac_lib_var=yes"
3143 echo "configure: failed program was:" >&5
3144 cat conftest.$ac_ext >&5
3146 eval "ac_cv_lib_$ac_lib_var=no"
3149 LIBS="$ac_save_LIBS"
3152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3153 echo "$ac_t""yes" 1>&6
3154 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3156 echo "$ac_t""no" 1>&6
3159 LDFLAGS="$ac_save_LDFLAGS"
3164 if test "$have_x" != yes; then
3165 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3169 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3170 echo "configure:3182: checking for X app-defaults directory" >&5
3171 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3172 echo $ac_n "(cached) $ac_c" 1>&6
3176 if mkdir conftestdir; then
3178 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3179 cat > Imakefile <<'EOF'
3181 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3183 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3184 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3185 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3190 if test x"$ac_x_app_defaults" = x; then
3192 # Look for the directory under a standard set of common directories.
3193 # Check X11 before X11Rn because it's often a symlink to the current release.
3195 /usr/X11/lib/app-defaults \
3196 /usr/X11R6/lib/app-defaults \
3197 /usr/X11R6/lib/X11/app-defaults \
3198 /usr/X11R5/lib/app-defaults \
3199 /usr/X11R5/lib/X11/app-defaults \
3200 /usr/X11R4/lib/app-defaults \
3201 /usr/X11R4/lib/X11/app-defaults \
3203 /usr/lib/X11/app-defaults \
3204 /usr/lib/X11R6/app-defaults \
3205 /usr/lib/X11R5/app-defaults \
3206 /usr/lib/X11R4/app-defaults \
3208 /usr/local/X11/lib/app-defaults \
3209 /usr/local/X11R6/lib/app-defaults \
3210 /usr/local/X11R5/lib/app-defaults \
3211 /usr/local/X11R4/lib/app-defaults \
3213 /usr/local/lib/X11/app-defaults \
3214 /usr/local/lib/X11R6/app-defaults \
3215 /usr/local/lib/X11R6/X11/app-defaults \
3216 /usr/local/lib/X11R5/app-defaults \
3217 /usr/local/lib/X11R5/X11/app-defaults \
3218 /usr/local/lib/X11R4/app-defaults \
3219 /usr/local/lib/X11R4/X11/app-defaults \
3221 /usr/X386/lib/X11/app-defaults \
3222 /usr/x386/lib/X11/app-defaults \
3223 /usr/XFree86/lib/X11/app-defaults \
3225 /usr/lib/X11/app-defaults \
3226 /usr/local/lib/X11/app-defaults \
3227 /usr/unsupported/lib/X11/app-defaults \
3228 /usr/athena/lib/X11/app-defaults \
3229 /usr/local/x11r5/lib/X11/app-defaults \
3230 /usr/lpp/Xamples/lib/X11/app-defaults \
3231 /lib/usr/lib/X11/app-defaults \
3233 /usr/openwin/lib/app-defaults \
3234 /usr/openwin/lib/X11/app-defaults \
3235 /usr/openwin/share/lib/app-defaults \
3236 /usr/openwin/share/lib/X11/app-defaults \
3238 /X11R6/lib/app-defaults \
3239 /X11R5/lib/app-defaults \
3240 /X11R4/lib/app-defaults \
3243 if test -d "$ac_dir"; then
3244 ac_x_app_defaults=$ac_dir
3250 if test x"$ac_x_app_defaults" = x; then
3251 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3253 # Record where we found app-defaults for the cache.
3254 ac_cv_x_app_defaults="$ac_x_app_defaults"
3258 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3259 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3263 # The following arcana was gleaned from conversations with
3264 # Eric Schwartz <erics@col.hp.com>:
3266 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3267 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3268 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3269 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3270 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3271 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3272 # you don't need any -I or -L arguments.
3274 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3275 # are the same division as 10.x. However, there are no symlinks to
3276 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3277 # arguments are always necessary.
3279 # However, X11R6 was available on HPUX 9.x as a patch: if that
3280 # patch was installed, then all of X11R6 went in to
3281 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3283 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3284 # whether R5 was available as a patch; R6 undoubtedly was not.)
3286 # So. We try and use the highest numbered pair of
3287 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3288 # that are available. We do not mix and match different versions
3291 # Question I still don't know the answer to: (do you?)
3293 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3294 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3295 # that contrib directory? Did it contain so-called "standard"
3296 # X11R6, or did it include Xaw and Xmu as well? If the former,
3297 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3298 # be a situation where one had to reach into the R5 headers and
3299 # libs to find Xmu? That is, must both R6 and R5 directories
3300 # be on the -I and -L lists in that case?
3302 for version in X11R6 X11R5 X11R4 ; do
3303 # if either pair of directories exists...
3304 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3306 # if contrib exists, use it...
3307 if test -d /usr/contrib/$version/lib ; then
3308 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3309 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3311 # if the "standard" one exists, use it.
3312 if test -d /usr/lib/$version ; then
3313 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3314 X_LIBS="$X_LIBS -L/usr/lib/$version"
3316 # since at least one of the pair exists, go no farther.
3321 # Now find Motif. Thanks for not making xmkmf find this by
3322 # default, you losers.
3324 if test -d /usr/lib/Motif1.2 ; then
3325 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3326 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3327 elif test -d /usr/lib/Motif1.1 ; then
3328 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3329 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3332 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3334 if test -d /opt/Mesa/lib ; then
3335 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3336 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3339 if test -d /opt/xpm/lib/X11 ; then
3340 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3341 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3344 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3345 # in /usr/local/, unless there is already an xscreensaver in
3346 # /usr/local/bin/. This can be overridden with the --prefix arg
3347 # to configure. I'm not sure this is the right thing to do, but
3348 # Richard Lloyd says so...
3350 if test \! -x /usr/local/bin/xscreensaver ; then
3351 ac_default_prefix=/opt/xscreensaver
3357 # Thanks for not making xmkmf find this by default, pinheads.
3358 # And thanks for moving things around again, too. Is this
3359 # really the standard location now? What happened to the
3360 # joke that this kind of thing went in /opt?
3361 # cthomp says "answer: CDE (Common Disorganized Environment)"
3363 if test -f /usr/dt/include/Xm/Xm.h ; then
3364 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3365 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3367 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3368 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3369 echo "configure:3381: checking for regcmp in -lgen" >&5
3370 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3371 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3372 echo $ac_n "(cached) $ac_c" 1>&6
3374 ac_save_LIBS="$LIBS"
3376 cat > conftest.$ac_ext <<EOF
3377 #line 3389 "configure"
3378 #include "confdefs.h"
3379 /* Override any gcc2 internal prototype to avoid an error. */
3380 /* We use char because int might match the return type of a gcc2
3381 builtin and then its argument prototype would still apply. */
3388 if { (eval echo configure:3400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3390 eval "ac_cv_lib_$ac_lib_var=yes"
3392 echo "configure: failed program was:" >&5
3393 cat conftest.$ac_ext >&5
3395 eval "ac_cv_lib_$ac_lib_var=no"
3398 LIBS="$ac_save_LIBS"
3401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3402 echo "$ac_t""yes" 1>&6
3403 X_LIBS="$X_LIBS -lgen"
3405 echo "$ac_t""no" 1>&6
3411 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3412 echo "configure:3424: checking for XPointer" >&5
3413 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3414 echo $ac_n "(cached) $ac_c" 1>&6
3417 ac_save_CPPFLAGS="$CPPFLAGS"
3418 if test \! -z "$includedir" ; then
3419 CPPFLAGS="$CPPFLAGS -I$includedir"
3421 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3422 cat > conftest.$ac_ext <<EOF
3423 #line 3435 "configure"
3424 #include "confdefs.h"
3425 #include <X11/Xlib.h>
3427 XPointer foo = (XPointer) 0;
3430 if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3434 echo "configure: failed program was:" >&5
3435 cat conftest.$ac_ext >&5
3440 CPPFLAGS="$ac_save_CPPFLAGS"
3443 echo "$ac_t""$ac_cv_xpointer" 1>&6
3444 if test "$ac_cv_xpointer" != yes; then
3445 cat >> confdefs.h <<\EOF
3446 #define XPointer char*
3453 ###############################################################################
3455 # Check for -lXmu (some fucked up vendors don't ship it...)
3457 ###############################################################################
3461 ac_save_CPPFLAGS="$CPPFLAGS"
3462 if test \! -z "$includedir" ; then
3463 CPPFLAGS="$CPPFLAGS -I$includedir"
3465 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3466 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3467 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3468 echo "configure:3480: checking for X11/Xmu/Error.h" >&5
3469 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3470 echo $ac_n "(cached) $ac_c" 1>&6
3472 cat > conftest.$ac_ext <<EOF
3473 #line 3485 "configure"
3474 #include "confdefs.h"
3475 #include <X11/Xmu/Error.h>
3477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3478 { (eval echo configure:3490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3480 if test -z "$ac_err"; then
3482 eval "ac_cv_header_$ac_safe=yes"
3485 echo "configure: failed program was:" >&5
3486 cat conftest.$ac_ext >&5
3488 eval "ac_cv_header_$ac_safe=no"
3492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3493 echo "$ac_t""yes" 1>&6
3496 echo "$ac_t""no" 1>&6
3499 CPPFLAGS="$ac_save_CPPFLAGS"
3500 if test "$have_xmu" = no ; then
3501 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3502 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3506 SAVER_LIBS="-lXmu $SAVER_LIBS"
3507 HACK_LIBS="-lXmu $HACK_LIBS"
3508 MOTIF_LIBS="-lXmu $MOTIF_LIBS"
3509 GTK_LIBS="-lXmu $GTK_LIBS"
3510 ATHENA_LIBS="-lXmu $ATHENA_LIBS"
3511 ATHENA3D_LIBS="-lXmu $ATHENA3D_LIBS"
3512 cat >> confdefs.h <<\EOF
3519 ###############################################################################
3521 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3522 # See comp.windows.x FAQ question 124. The right fix is to
3523 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3525 ###############################################################################
3527 if test "$have_xmu" = yes ; then
3530 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3531 echo "configure:3543: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3532 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3533 echo $ac_n "(cached) $ac_c" 1>&6
3535 ac_save_LDFLAGS="$LDFLAGS"
3536 if test \! -z "$x_libraries" ; then
3537 LDFLAGS="$LDFLAGS -L$x_libraries"
3539 # Note: this trick never works! (Generally.)
3540 # We're only getting away with using AC_TRY_LINK
3541 # with X libraries because we know it's SunOS.
3542 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3543 cat > conftest.$ac_ext <<EOF
3544 #line 3556 "configure"
3545 #include "confdefs.h"
3551 if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3553 ac_cv_sunos_xmu_bug=no
3555 echo "configure: failed program was:" >&5
3556 cat conftest.$ac_ext >&5
3558 ac_cv_sunos_xmu_bug=yes
3561 LDFLAGS="$ac_save_LDFLAGS"
3564 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3565 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3566 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3567 echo "configure:3579: checking whether the compiler understands -static" >&5
3568 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3569 echo $ac_n "(cached) $ac_c" 1>&6
3571 ac_save_LDFLAGS="$LDFLAGS"
3572 LDFLAGS="$LDFLAGS -static"
3573 cat > conftest.$ac_ext <<EOF
3574 #line 3586 "configure"
3575 #include "confdefs.h"
3581 if { (eval echo configure:3593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3585 echo "configure: failed program was:" >&5
3586 cat conftest.$ac_ext >&5
3591 LDFLAGS="$ac_save_LDFLAGS"
3594 echo "$ac_t""$ac_cv_ld_static" 1>&6
3595 if test "$ac_cv_ld_static" = yes ; then
3596 LDFLAGS="$LDFLAGS -static"
3598 LDFLAGS="$LDFLAGS -Bstatic"
3606 ###############################################################################
3608 # Handle the --enable-subdir option
3610 ###############################################################################
3612 # Check whether --enable-subdir or --disable-subdir was given.
3613 if test "${enable_subdir+set}" = set; then
3614 enableval="$enable_subdir"
3615 enable_subdir="$enableval"
3620 if test x"$enable_subdir" = xno; then
3622 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
3623 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
3626 # there must be a better way than this...
3627 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
3629 HACKDIR=$enable_subdir
3632 HACKDIR='${bindir}/'$enable_subdir
3636 # canonicalize slashes.
3637 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3640 ###############################################################################
3642 # Check for the SGI SCREEN_SAVER server extension.
3644 ###############################################################################
3647 with_sgi_req=unspecified
3648 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3649 if test "${with_sgi_ext+set}" = set; then
3650 withval="$with_sgi_ext"
3651 with_sgi="$withval"; with_sgi_req="$withval"
3663 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3664 echo "configure:3676: checking for SGI SCREEN_SAVER headers" >&5
3667 X_CFLAGS="-I$d $X_CFLAGS"
3668 echo "$ac_t""$d" 1>&6
3670 echo "$ac_t""not found ($d: no such directory)" 1>&6
3673 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3674 echo "configure:3686: checking for SGI SCREEN_SAVER libs" >&5
3677 X_LIBS="-L$d $X_LIBS"
3678 echo "$ac_t""$d" 1>&6
3680 echo "$ac_t""not found ($d: no such directory)" 1>&6
3683 # replace the directory string with "yes".
3685 with_sgi=$with_sgi_req
3690 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3691 echo " If it is a directory, then \`DIR/include' will be added to"
3692 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3698 if test "$with_sgi" = yes; then
3700 ac_save_CPPFLAGS="$CPPFLAGS"
3701 if test \! -z "$includedir" ; then
3702 CPPFLAGS="$CPPFLAGS -I$includedir"
3704 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3705 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3706 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3707 echo "configure:3719: checking for X11/extensions/XScreenSaver.h" >&5
3708 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3709 echo $ac_n "(cached) $ac_c" 1>&6
3711 cat > conftest.$ac_ext <<EOF
3712 #line 3724 "configure"
3713 #include "confdefs.h"
3714 #include <X11/extensions/XScreenSaver.h>
3716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3717 { (eval echo configure:3729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3718 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3719 if test -z "$ac_err"; then
3721 eval "ac_cv_header_$ac_safe=yes"
3724 echo "configure: failed program was:" >&5
3725 cat conftest.$ac_ext >&5
3727 eval "ac_cv_header_$ac_safe=no"
3731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3732 echo "$ac_t""yes" 1>&6
3734 cat >> confdefs.h <<\EOF
3735 #define HAVE_SGI_SAVER_EXTENSION 1
3739 echo "$ac_t""no" 1>&6
3742 CPPFLAGS="$ac_save_CPPFLAGS"
3744 elif test "$with_sgi" != no; then
3745 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3750 ###############################################################################
3752 # Check for the MIT-SCREEN-SAVER server extension.
3754 ###############################################################################
3757 with_mit_req=unspecified
3758 # Check whether --with-mit-ext or --without-mit-ext was given.
3759 if test "${with_mit_ext+set}" = set; then
3760 withval="$with_mit_ext"
3761 with_mit="$withval"; with_mit_req="$withval"
3773 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3774 echo "configure:3786: checking for MIT-SCREEN-SAVER headers" >&5
3777 X_CFLAGS="-I$d $X_CFLAGS"
3778 echo "$ac_t""$d" 1>&6
3780 echo "$ac_t""not found ($d: no such directory)" 1>&6
3783 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3784 echo "configure:3796: checking for MIT-SCREEN-SAVER libs" >&5
3787 X_LIBS="-L$d $X_LIBS"
3788 echo "$ac_t""$d" 1>&6
3790 echo "$ac_t""not found ($d: no such directory)" 1>&6
3793 # replace the directory string with "yes".
3795 with_mit=$with_mit_req
3800 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3801 echo " If it is a directory, then \`DIR/include' will be added to"
3802 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3808 if test "$with_mit" = yes; then
3810 ac_save_CPPFLAGS="$CPPFLAGS"
3811 if test \! -z "$includedir" ; then
3812 CPPFLAGS="$CPPFLAGS -I$includedir"
3814 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3815 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3816 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3817 echo "configure:3829: checking for X11/extensions/scrnsaver.h" >&5
3818 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3819 echo $ac_n "(cached) $ac_c" 1>&6
3821 cat > conftest.$ac_ext <<EOF
3822 #line 3834 "configure"
3823 #include "confdefs.h"
3824 #include <X11/extensions/scrnsaver.h>
3826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3827 { (eval echo configure:3839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3829 if test -z "$ac_err"; then
3831 eval "ac_cv_header_$ac_safe=yes"
3834 echo "configure: failed program was:" >&5
3835 cat conftest.$ac_ext >&5
3837 eval "ac_cv_header_$ac_safe=no"
3841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3842 echo "$ac_t""yes" 1>&6
3845 echo "$ac_t""no" 1>&6
3848 CPPFLAGS="$ac_save_CPPFLAGS"
3850 # Now check to see if it's really in the library; XF86Free-3.3 ships
3851 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3853 if test "$have_mit" = yes; then
3855 ac_save_CPPFLAGS="$CPPFLAGS"
3856 ac_save_LDFLAGS="$LDFLAGS"
3857 # ac_save_LIBS="$LIBS"
3859 if test \! -z "$includedir" ; then
3860 CPPFLAGS="$CPPFLAGS -I$includedir"
3862 # note: $X_CFLAGS includes $x_includes
3863 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3865 if test \! -z "$libdir" ; then
3866 LDFLAGS="$LDFLAGS -L$libdir"
3868 # note: $X_LIBS includes $x_libraries
3869 LDFLAGS="$LDFLAGS $X_LIBS"
3871 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3872 echo "configure:3884: checking for XScreenSaverRegister in -lXext" >&5
3873 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3874 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3875 echo $ac_n "(cached) $ac_c" 1>&6
3877 ac_save_LIBS="$LIBS"
3878 LIBS="-lXext -lm $LIBS"
3879 cat > conftest.$ac_ext <<EOF
3880 #line 3892 "configure"
3881 #include "confdefs.h"
3882 /* Override any gcc2 internal prototype to avoid an error. */
3883 /* We use char because int might match the return type of a gcc2
3884 builtin and then its argument prototype would still apply. */
3885 char XScreenSaverRegister();
3888 XScreenSaverRegister()
3891 if { (eval echo configure:3903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3893 eval "ac_cv_lib_$ac_lib_var=yes"
3895 echo "configure: failed program was:" >&5
3896 cat conftest.$ac_ext >&5
3898 eval "ac_cv_lib_$ac_lib_var=no"
3901 LIBS="$ac_save_LIBS"
3904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3905 echo "$ac_t""yes" 1>&6
3908 echo "$ac_t""no" 1>&6
3912 CPPFLAGS="$ac_save_CPPFLAGS"
3913 LDFLAGS="$ac_save_LDFLAGS"
3914 # LIBS="$ac_save_LIBS"
3917 if test "$have_mit" = no; then
3918 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3919 # of in Xext. Thank you master, may I have another.
3921 ac_save_CPPFLAGS="$CPPFLAGS"
3922 ac_save_LDFLAGS="$LDFLAGS"
3923 # ac_save_LIBS="$LIBS"
3925 if test \! -z "$includedir" ; then
3926 CPPFLAGS="$CPPFLAGS -I$includedir"
3928 # note: $X_CFLAGS includes $x_includes
3929 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3931 if test \! -z "$libdir" ; then
3932 LDFLAGS="$LDFLAGS -L$libdir"
3934 # note: $X_LIBS includes $x_libraries
3935 LDFLAGS="$LDFLAGS $X_LIBS"
3937 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3938 echo "configure:3950: checking for XScreenSaverRegister in -lXExExt" >&5
3939 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3940 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3941 echo $ac_n "(cached) $ac_c" 1>&6
3943 ac_save_LIBS="$LIBS"
3944 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3945 cat > conftest.$ac_ext <<EOF
3946 #line 3958 "configure"
3947 #include "confdefs.h"
3948 /* Override any gcc2 internal prototype to avoid an error. */
3949 /* We use char because int might match the return type of a gcc2
3950 builtin and then its argument prototype would still apply. */
3951 char XScreenSaverRegister();
3954 XScreenSaverRegister()
3957 if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3959 eval "ac_cv_lib_$ac_lib_var=yes"
3961 echo "configure: failed program was:" >&5
3962 cat conftest.$ac_ext >&5
3964 eval "ac_cv_lib_$ac_lib_var=no"
3967 LIBS="$ac_save_LIBS"
3970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3971 echo "$ac_t""yes" 1>&6
3972 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3974 echo "$ac_t""no" 1>&6
3978 CPPFLAGS="$ac_save_CPPFLAGS"
3979 LDFLAGS="$ac_save_LDFLAGS"
3980 # LIBS="$ac_save_LIBS"
3984 if test "$have_mit" = no; then
3985 # Double fuck! Looks like some versions of XFree86 (whichever version
3986 # it is that comes with RedHat Linux 2.0 -- I can't find a version
3987 # number) put this garbage in Xss instead of Xext. Thank you master,
3988 # may I have another.
3990 ac_save_CPPFLAGS="$CPPFLAGS"
3991 ac_save_LDFLAGS="$LDFLAGS"
3992 # ac_save_LIBS="$LIBS"
3994 if test \! -z "$includedir" ; then
3995 CPPFLAGS="$CPPFLAGS -I$includedir"
3997 # note: $X_CFLAGS includes $x_includes
3998 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4000 if test \! -z "$libdir" ; then
4001 LDFLAGS="$LDFLAGS -L$libdir"
4003 # note: $X_LIBS includes $x_libraries
4004 LDFLAGS="$LDFLAGS $X_LIBS"
4006 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4007 echo "configure:4019: checking for XScreenSaverRegister in -lXss" >&5
4008 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4009 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4010 echo $ac_n "(cached) $ac_c" 1>&6
4012 ac_save_LIBS="$LIBS"
4013 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4014 cat > conftest.$ac_ext <<EOF
4015 #line 4027 "configure"
4016 #include "confdefs.h"
4017 /* Override any gcc2 internal prototype to avoid an error. */
4018 /* We use char because int might match the return type of a gcc2
4019 builtin and then its argument prototype would still apply. */
4020 char XScreenSaverRegister();
4023 XScreenSaverRegister()
4026 if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4028 eval "ac_cv_lib_$ac_lib_var=yes"
4030 echo "configure: failed program was:" >&5
4031 cat conftest.$ac_ext >&5
4033 eval "ac_cv_lib_$ac_lib_var=no"
4036 LIBS="$ac_save_LIBS"
4039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4040 echo "$ac_t""yes" 1>&6
4041 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4043 echo "$ac_t""no" 1>&6
4047 CPPFLAGS="$ac_save_CPPFLAGS"
4048 LDFLAGS="$ac_save_LDFLAGS"
4049 # LIBS="$ac_save_LIBS"
4053 if test "$have_mit" = yes; then
4054 cat >> confdefs.h <<\EOF
4055 #define HAVE_MIT_SAVER_EXTENSION 1
4062 elif test "$with_mit" != no; then
4063 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4068 ###############################################################################
4070 # Check for the XIDLE server extension.
4072 ###############################################################################
4075 with_xidle_req=unspecified
4076 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4077 if test "${with_xidle_ext+set}" = set; then
4078 withval="$with_xidle_ext"
4079 with_xidle="$withval"; with_xidle_req="$withval"
4086 case "$with_xidle" in
4091 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4092 echo "configure:4104: checking for XIDLE headers" >&5
4093 d=$with_xidle/include
4095 X_CFLAGS="-I$d $X_CFLAGS"
4096 echo "$ac_t""$d" 1>&6
4098 echo "$ac_t""not found ($d: no such directory)" 1>&6
4101 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4102 echo "configure:4114: checking for XIDLE libs" >&5
4105 X_LIBS="-L$d $X_LIBS"
4106 echo "$ac_t""$d" 1>&6
4108 echo "$ac_t""not found ($d: no such directory)" 1>&6
4111 # replace the directory string with "yes".
4112 with_xidle_req="yes"
4113 with_xidle=$with_xidle_req
4118 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4119 echo " If it is a directory, then \`DIR/include' will be added to"
4120 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4126 if test "$with_xidle" = yes; then
4128 ac_save_CPPFLAGS="$CPPFLAGS"
4129 if test \! -z "$includedir" ; then
4130 CPPFLAGS="$CPPFLAGS -I$includedir"
4132 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4133 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4134 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4135 echo "configure:4147: checking for X11/extensions/xidle.h" >&5
4136 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4137 echo $ac_n "(cached) $ac_c" 1>&6
4139 cat > conftest.$ac_ext <<EOF
4140 #line 4152 "configure"
4141 #include "confdefs.h"
4142 #include <X11/extensions/xidle.h>
4144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4145 { (eval echo configure:4157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4147 if test -z "$ac_err"; then
4149 eval "ac_cv_header_$ac_safe=yes"
4152 echo "configure: failed program was:" >&5
4153 cat conftest.$ac_ext >&5
4155 eval "ac_cv_header_$ac_safe=no"
4159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4160 echo "$ac_t""yes" 1>&6
4162 cat >> confdefs.h <<\EOF
4163 #define HAVE_XIDLE_EXTENSION 1
4167 echo "$ac_t""no" 1>&6
4170 CPPFLAGS="$ac_save_CPPFLAGS"
4171 elif test "$with_xidle" != no; then
4172 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4177 ###############################################################################
4179 # Check for the SGI-VIDEO-CONTROL server extension.
4181 ###############################################################################
4184 with_sgivc_req=unspecified
4185 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4186 if test "${with_sgivc_ext+set}" = set; then
4187 withval="$with_sgivc_ext"
4188 with_sgivc="$withval"; with_sgivc_req="$withval"
4195 case "$with_sgivc" in
4200 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4201 echo "configure:4213: checking for SGI-VIDEO-CONTROL headers" >&5
4202 d=$with_sgivc/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 SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4211 echo "configure:4223: checking for SGI-VIDEO-CONTROL 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".
4221 with_sgivc_req="yes"
4222 with_sgivc=$with_sgivc_req
4227 echo "error: argument to --with-sgivc-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."
4235 if test "$with_sgivc" = yes; then
4237 # first check for XSGIvc.h
4239 ac_save_CPPFLAGS="$CPPFLAGS"
4240 if test \! -z "$includedir" ; then
4241 CPPFLAGS="$CPPFLAGS -I$includedir"
4243 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4244 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4245 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4246 echo "configure:4258: checking for X11/extensions/XSGIvc.h" >&5
4247 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4248 echo $ac_n "(cached) $ac_c" 1>&6
4250 cat > conftest.$ac_ext <<EOF
4251 #line 4263 "configure"
4252 #include "confdefs.h"
4253 #include <X11/extensions/XSGIvc.h>
4255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4256 { (eval echo configure:4268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4258 if test -z "$ac_err"; then
4260 eval "ac_cv_header_$ac_safe=yes"
4263 echo "configure: failed program was:" >&5
4264 cat conftest.$ac_ext >&5
4266 eval "ac_cv_header_$ac_safe=no"
4270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4271 echo "$ac_t""yes" 1>&6
4274 echo "$ac_t""no" 1>&6
4277 CPPFLAGS="$ac_save_CPPFLAGS"
4279 # if that succeeded, then check for the -lXsgivc
4280 if test "$have_sgivc" = yes; then
4283 ac_save_CPPFLAGS="$CPPFLAGS"
4284 ac_save_LDFLAGS="$LDFLAGS"
4285 # ac_save_LIBS="$LIBS"
4287 if test \! -z "$includedir" ; then
4288 CPPFLAGS="$CPPFLAGS -I$includedir"
4290 # note: $X_CFLAGS includes $x_includes
4291 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4293 if test \! -z "$libdir" ; then
4294 LDFLAGS="$LDFLAGS -L$libdir"
4296 # note: $X_LIBS includes $x_libraries
4297 LDFLAGS="$LDFLAGS $X_LIBS"
4299 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4300 echo "configure:4312: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4301 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4302 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4303 echo $ac_n "(cached) $ac_c" 1>&6
4305 ac_save_LIBS="$LIBS"
4306 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4307 cat > conftest.$ac_ext <<EOF
4308 #line 4320 "configure"
4309 #include "confdefs.h"
4310 /* Override any gcc2 internal prototype to avoid an error. */
4311 /* We use char because int might match the return type of a gcc2
4312 builtin and then its argument prototype would still apply. */
4313 char XSGIvcQueryGammaMap();
4316 XSGIvcQueryGammaMap()
4319 if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4321 eval "ac_cv_lib_$ac_lib_var=yes"
4323 echo "configure: failed program was:" >&5
4324 cat conftest.$ac_ext >&5
4326 eval "ac_cv_lib_$ac_lib_var=no"
4329 LIBS="$ac_save_LIBS"
4332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4333 echo "$ac_t""yes" 1>&6
4334 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4336 echo "$ac_t""no" 1>&6
4340 CPPFLAGS="$ac_save_CPPFLAGS"
4341 LDFLAGS="$ac_save_LDFLAGS"
4342 # LIBS="$ac_save_LIBS"
4346 # if that succeeded, then we've really got it.
4347 if test "$have_sgivc" = yes; then
4348 cat >> confdefs.h <<\EOF
4349 #define HAVE_SGI_VC_EXTENSION 1
4354 elif test "$with_sgivc" != no; then
4355 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4360 ###############################################################################
4362 # Check for the DPMS server extension.
4364 ###############################################################################
4367 with_dpms_req=unspecified
4368 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4369 if test "${with_dpms_ext+set}" = set; then
4370 withval="$with_dpms_ext"
4371 with_dpms="$withval"; with_dpms_req="$withval"
4378 case "$with_dpms" in
4383 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4384 echo "configure:4396: checking for DPMS headers" >&5
4385 d=$with_dpms/include
4387 X_CFLAGS="-I$d $X_CFLAGS"
4388 echo "$ac_t""$d" 1>&6
4390 echo "$ac_t""not found ($d: no such directory)" 1>&6
4393 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4394 echo "configure:4406: checking for DPMS libs" >&5
4397 X_LIBS="-L$d $X_LIBS"
4398 echo "$ac_t""$d" 1>&6
4400 echo "$ac_t""not found ($d: no such directory)" 1>&6
4403 # replace the directory string with "yes".
4405 with_dpms=$with_dpms_req
4410 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4411 echo " If it is a directory, then \`DIR/include' will be added to"
4412 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4418 if test "$with_dpms" = yes; then
4420 # first check for dpms.h
4422 ac_save_CPPFLAGS="$CPPFLAGS"
4423 if test \! -z "$includedir" ; then
4424 CPPFLAGS="$CPPFLAGS -I$includedir"
4426 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4427 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4428 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4429 echo "configure:4441: checking for X11/extensions/dpms.h" >&5
4430 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4431 echo $ac_n "(cached) $ac_c" 1>&6
4433 cat > conftest.$ac_ext <<EOF
4434 #line 4446 "configure"
4435 #include "confdefs.h"
4436 #include <X11/extensions/dpms.h>
4438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4439 { (eval echo configure:4451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4441 if test -z "$ac_err"; then
4443 eval "ac_cv_header_$ac_safe=yes"
4446 echo "configure: failed program was:" >&5
4447 cat conftest.$ac_ext >&5
4449 eval "ac_cv_header_$ac_safe=no"
4453 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4454 echo "$ac_t""yes" 1>&6
4457 echo "$ac_t""no" 1>&6
4460 CPPFLAGS="$ac_save_CPPFLAGS"
4462 # if that succeeded, then check for the -lXdpms
4463 if test "$have_dpms" = yes; then
4466 ac_save_CPPFLAGS="$CPPFLAGS"
4467 ac_save_LDFLAGS="$LDFLAGS"
4468 # ac_save_LIBS="$LIBS"
4470 if test \! -z "$includedir" ; then
4471 CPPFLAGS="$CPPFLAGS -I$includedir"
4473 # note: $X_CFLAGS includes $x_includes
4474 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4476 if test \! -z "$libdir" ; then
4477 LDFLAGS="$LDFLAGS -L$libdir"
4479 # note: $X_LIBS includes $x_libraries
4480 LDFLAGS="$LDFLAGS $X_LIBS"
4482 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4483 echo "configure:4495: checking for DPMSInfo in -lXdpms" >&5
4484 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4485 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4486 echo $ac_n "(cached) $ac_c" 1>&6
4488 ac_save_LIBS="$LIBS"
4489 LIBS="-lXdpms -lXext -lX11 $LIBS"
4490 cat > conftest.$ac_ext <<EOF
4491 #line 4503 "configure"
4492 #include "confdefs.h"
4493 /* Override any gcc2 internal prototype to avoid an error. */
4494 /* We use char because int might match the return type of a gcc2
4495 builtin and then its argument prototype would still apply. */
4502 if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4504 eval "ac_cv_lib_$ac_lib_var=yes"
4506 echo "configure: failed program was:" >&5
4507 cat conftest.$ac_ext >&5
4509 eval "ac_cv_lib_$ac_lib_var=no"
4512 LIBS="$ac_save_LIBS"
4515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4516 echo "$ac_t""yes" 1>&6
4517 have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
4519 echo "$ac_t""no" 1>&6
4523 CPPFLAGS="$ac_save_CPPFLAGS"
4524 LDFLAGS="$ac_save_LDFLAGS"
4525 # LIBS="$ac_save_LIBS"
4529 # if that succeeded, then we've really got it.
4530 if test "$have_dpms" = yes; then
4531 cat >> confdefs.h <<\EOF
4532 #define HAVE_DPMS_EXTENSION 1
4537 elif test "$with_dpms" != no; then
4538 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4543 ###############################################################################
4545 # Check for the XF86VMODE server extension.
4547 ###############################################################################
4550 with_xf86vmode_req=unspecified
4551 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4552 if test "${with_xf86vmode_ext+set}" = set; then
4553 withval="$with_xf86vmode_ext"
4554 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4561 case "$with_xf86vmode" in
4566 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4567 echo "configure:4579: checking for xf86vmode headers" >&5
4568 d=$with_xf86vmode/include
4570 X_CFLAGS="-I$d $X_CFLAGS"
4571 echo "$ac_t""$d" 1>&6
4573 echo "$ac_t""not found ($d: no such directory)" 1>&6
4576 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4577 echo "configure:4589: checking for xf86vmode libs" >&5
4578 d=$with_xf86vmode/lib
4580 X_LIBS="-L$d $X_LIBS"
4581 echo "$ac_t""$d" 1>&6
4583 echo "$ac_t""not found ($d: no such directory)" 1>&6
4586 # replace the directory string with "yes".
4587 with_xf86vmode_req="yes"
4588 with_xf86vmode=$with_xf86vmode_req
4593 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4594 echo " If it is a directory, then \`DIR/include' will be added to"
4595 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4601 if test "$with_xf86vmode" = yes; then
4603 # first check for xf86vmode.h
4605 ac_save_CPPFLAGS="$CPPFLAGS"
4606 if test \! -z "$includedir" ; then
4607 CPPFLAGS="$CPPFLAGS -I$includedir"
4609 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4610 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4611 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4612 echo "configure:4624: checking for X11/extensions/xf86vmode.h" >&5
4613 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4614 echo $ac_n "(cached) $ac_c" 1>&6
4616 cat > conftest.$ac_ext <<EOF
4617 #line 4629 "configure"
4618 #include "confdefs.h"
4619 #include <X11/extensions/xf86vmode.h>
4621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4622 { (eval echo configure:4634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4624 if test -z "$ac_err"; then
4626 eval "ac_cv_header_$ac_safe=yes"
4629 echo "configure: failed program was:" >&5
4630 cat conftest.$ac_ext >&5
4632 eval "ac_cv_header_$ac_safe=no"
4636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4637 echo "$ac_t""yes" 1>&6
4640 echo "$ac_t""no" 1>&6
4643 CPPFLAGS="$ac_save_CPPFLAGS"
4645 # if that succeeded, then check for the -lXxf86vm
4646 if test "$have_xf86vmode" = yes; then
4649 ac_save_CPPFLAGS="$CPPFLAGS"
4650 ac_save_LDFLAGS="$LDFLAGS"
4651 # ac_save_LIBS="$LIBS"
4653 if test \! -z "$includedir" ; then
4654 CPPFLAGS="$CPPFLAGS -I$includedir"
4656 # note: $X_CFLAGS includes $x_includes
4657 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4659 if test \! -z "$libdir" ; then
4660 LDFLAGS="$LDFLAGS -L$libdir"
4662 # note: $X_LIBS includes $x_libraries
4663 LDFLAGS="$LDFLAGS $X_LIBS"
4665 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4666 echo "configure:4678: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4667 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4668 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4669 echo $ac_n "(cached) $ac_c" 1>&6
4671 ac_save_LIBS="$LIBS"
4672 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4673 cat > conftest.$ac_ext <<EOF
4674 #line 4686 "configure"
4675 #include "confdefs.h"
4676 /* Override any gcc2 internal prototype to avoid an error. */
4677 /* We use char because int might match the return type of a gcc2
4678 builtin and then its argument prototype would still apply. */
4679 char XF86VidModeGetViewPort();
4682 XF86VidModeGetViewPort()
4685 if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4687 eval "ac_cv_lib_$ac_lib_var=yes"
4689 echo "configure: failed program was:" >&5
4690 cat conftest.$ac_ext >&5
4692 eval "ac_cv_lib_$ac_lib_var=no"
4695 LIBS="$ac_save_LIBS"
4698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4699 echo "$ac_t""yes" 1>&6
4700 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4702 echo "$ac_t""no" 1>&6
4706 CPPFLAGS="$ac_save_CPPFLAGS"
4707 LDFLAGS="$ac_save_LDFLAGS"
4708 # LIBS="$ac_save_LIBS"
4712 # if that succeeded, then we've really got it.
4713 if test "$have_xf86vmode" = yes; then
4714 cat >> confdefs.h <<\EOF
4715 #define HAVE_XF86VMODE 1
4720 elif test "$with_xf86vmode" != no; then
4721 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4726 ###############################################################################
4728 # Check for HP XHPDisableReset and XHPEnableReset.
4730 ###############################################################################
4733 ac_save_CPPFLAGS="$CPPFLAGS"
4734 if test \! -z "$includedir" ; then
4735 CPPFLAGS="$CPPFLAGS -I$includedir"
4737 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4738 cat > conftest.$ac_ext <<EOF
4739 #line 4751 "configure"
4740 #include "confdefs.h"
4741 #include <X11/XHPlib.h>
4743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4744 egrep "XHPDisableReset" >/dev/null 2>&1; then
4746 cat >> confdefs.h <<\EOF
4747 #define HAVE_XHPDISABLERESET 1
4750 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
4754 CPPFLAGS="$ac_save_CPPFLAGS"
4757 ###############################################################################
4759 # Check for /proc/interrupts.
4761 ###############################################################################
4763 have_proc_interrupts=no
4764 with_proc_interrupts_req=unspecified
4765 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4766 if test "${with_proc_interrupts+set}" = set; then
4767 withval="$with_proc_interrupts"
4768 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4770 with_proc_interrupts=yes
4774 if test "$with_proc_interrupts" = yes; then
4776 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4777 echo "configure:4789: checking whether /proc/interrupts contains keyboard data" >&5
4778 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4779 echo $ac_n "(cached) $ac_c" 1>&6
4781 ac_cv_have_proc_interrupts=no
4782 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4783 ac_cv_have_proc_interrupts=yes
4788 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
4789 have_proc_interrupts=$ac_cv_have_proc_interrupts
4791 if test "$have_proc_interrupts" = yes; then
4792 cat >> confdefs.h <<\EOF
4793 #define HAVE_PROC_INTERRUPTS 1
4798 elif test "$with_proc_interrupts" != no; then
4799 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
4804 ###############################################################################
4806 # The --enable-locking option
4808 ###############################################################################
4810 # Check whether --enable-locking or --disable-locking was given.
4811 if test "${enable_locking+set}" = set; then
4812 enableval="$enable_locking"
4813 enable_locking="$enableval"
4818 if test "$enable_locking" = yes; then
4820 elif test "$enable_locking" = no; then
4821 cat >> confdefs.h <<\EOF
4822 #define NO_LOCKING 1
4826 echo "error: must be yes or no: --enable-locking=$enable_locking"
4832 ###############################################################################
4834 # The --enable-vt-locking option
4836 ###############################################################################
4838 #ac_vt_lockswitch=no
4839 #AC_ARG_ENABLE(vt-locking,[
4840 # --enable-vt-locking Compile in support for locking Virtual Terminals.
4841 # This is the default if the system supports it, and
4842 # if locking support is included (--enable-locking.)
4843 # --disable-vt-locking Do not allow locking of VTs, even if locking is
4845 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
4846 #if test "$enable_vt_locking" = yes; then
4848 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
4849 # [AC_TRY_COMPILE([#include <fcntl.h>
4850 # #include <sys/ioctl.h>
4851 # #include <sys/vt.h>],
4852 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
4853 # [ac_cv_vt_lockswitch=yes],
4854 # [ac_cv_vt_lockswitch=no])])
4855 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
4857 #elif test "$enable_vt_locking" = no; then
4860 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
4864 #if test "$ac_vt_lockswitch" = yes; then
4865 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
4866 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
4867 # # #### but it doesn't work yet, so don't worry about that for now.
4873 ###############################################################################
4877 ###############################################################################
4881 # Solaris systems tend to come with PAM misconfigured.
4882 # Don't build it by default, even if the headers exist.
4886 # Default to building PAM support on all other systems, if it exists.
4887 with_pam_default=yes
4892 with_pam_req=unspecified
4894 # Check whether --with-pam or --without-pam was given.
4895 if test "${with_pam+set}" = set; then
4897 with_pam="$withval"; with_pam_req="$withval"
4899 with_pam=$with_pam_default
4909 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
4910 echo "configure:4922: checking for PAM headers" >&5
4913 X_CFLAGS="-I$d $X_CFLAGS"
4914 echo "$ac_t""$d" 1>&6
4916 echo "$ac_t""not found ($d: no such directory)" 1>&6
4919 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
4920 echo "configure:4932: checking for PAM libs" >&5
4923 X_LIBS="-L$d $X_LIBS"
4924 echo "$ac_t""$d" 1>&6
4926 echo "$ac_t""not found ($d: no such directory)" 1>&6
4929 # replace the directory string with "yes".
4931 with_pam=$with_pam_req
4936 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
4937 echo " If it is a directory, then \`DIR/include' will be added to"
4938 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4944 if test "$enable_locking" = yes -a "$with_pam" = yes; then
4945 echo $ac_n "checking for PAM""... $ac_c" 1>&6
4946 echo "configure:4958: checking for PAM" >&5
4947 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
4948 echo $ac_n "(cached) $ac_c" 1>&6
4951 ac_save_CPPFLAGS="$CPPFLAGS"
4952 if test \! -z "$includedir" ; then
4953 CPPFLAGS="$CPPFLAGS -I$includedir"
4955 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4956 cat > conftest.$ac_ext <<EOF
4957 #line 4969 "configure"
4958 #include "confdefs.h"
4959 #include <security/pam_appl.h>
4964 if { (eval echo configure:4976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4968 echo "configure: failed program was:" >&5
4969 cat conftest.$ac_ext >&5
4974 CPPFLAGS="$ac_save_CPPFLAGS"
4977 echo "$ac_t""$ac_cv_pam" 1>&6
4978 if test "$ac_cv_pam" = yes ; then
4980 cat >> confdefs.h <<\EOF
4984 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
4986 # libpam typically requires dlopen and dlsym. On FreeBSD,
4987 # those are in libc. On Linux and Solaris, they're in libdl.
4988 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4989 echo "configure:5001: checking for dlopen in -ldl" >&5
4990 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4991 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4992 echo $ac_n "(cached) $ac_c" 1>&6
4994 ac_save_LIBS="$LIBS"
4996 cat > conftest.$ac_ext <<EOF
4997 #line 5009 "configure"
4998 #include "confdefs.h"
4999 /* Override any gcc2 internal prototype to avoid an error. */
5000 /* We use char because int might match the return type of a gcc2
5001 builtin and then its argument prototype would still apply. */
5008 if { (eval echo configure:5020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5010 eval "ac_cv_lib_$ac_lib_var=yes"
5012 echo "configure: failed program was:" >&5
5013 cat conftest.$ac_ext >&5
5015 eval "ac_cv_lib_$ac_lib_var=no"
5018 LIBS="$ac_save_LIBS"
5021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5022 echo "$ac_t""yes" 1>&6
5023 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5025 echo "$ac_t""no" 1>&6
5029 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5030 echo "configure:5042: checking how to call pam_strerror" >&5
5031 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5032 echo $ac_n "(cached) $ac_c" 1>&6
5034 cat > conftest.$ac_ext <<EOF
5035 #line 5047 "configure"
5036 #include "confdefs.h"
5039 #include <security/pam_appl.h>
5041 pam_handle_t *pamh = 0;
5042 char *s = pam_strerror(pamh, PAM_SUCCESS);
5045 if { (eval echo configure:5057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5047 ac_pam_strerror_args=2
5049 echo "configure: failed program was:" >&5
5050 cat conftest.$ac_ext >&5
5052 cat > conftest.$ac_ext <<EOF
5053 #line 5065 "configure"
5054 #include "confdefs.h"
5057 #include <security/pam_appl.h>
5060 pam_strerror(PAM_SUCCESS);
5063 if { (eval echo configure:5075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5065 ac_pam_strerror_args=1
5067 echo "configure: failed program was:" >&5
5068 cat conftest.$ac_ext >&5
5070 ac_pam_strerror_args=0
5075 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5078 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5079 if test "$ac_pam_strerror_args" = 1 ; then
5080 echo "$ac_t""one argument" 1>&6
5081 elif test "$ac_pam_strerror_args" = 2 ; then
5082 cat >> confdefs.h <<\EOF
5083 #define PAM_STRERROR_TWO_ARGS 1
5086 echo "$ac_t""two arguments" 1>&6
5088 echo "$ac_t""unknown" 1>&6
5094 ###############################################################################
5096 # Check for Kerberos.
5098 ###############################################################################
5101 with_kerberos_req=unspecified
5103 # Check whether --with-kerberos or --without-kerberos was given.
5104 if test "${with_kerberos+set}" = set; then
5105 withval="$with_kerberos"
5106 with_kerberos="$withval"; with_kerberos_req="$withval"
5113 case "$with_kerberos" in
5118 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5119 echo "configure:5131: checking for Kerberos headers" >&5
5120 d=$with_kerberos/include
5122 X_CFLAGS="-I$d $X_CFLAGS"
5123 echo "$ac_t""$d" 1>&6
5125 echo "$ac_t""not found ($d: no such directory)" 1>&6
5128 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5129 echo "configure:5141: checking for Kerberos libs" >&5
5130 d=$with_kerberos/lib
5132 X_LIBS="-L$d $X_LIBS"
5133 echo "$ac_t""$d" 1>&6
5135 echo "$ac_t""not found ($d: no such directory)" 1>&6
5138 # replace the directory string with "yes".
5139 with_kerberos_req="yes"
5140 with_kerberos=$with_kerberos_req
5145 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5146 echo " If it is a directory, then \`DIR/include' will be added to"
5147 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5153 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5154 echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
5155 echo "configure:5167: checking for Kerberos" >&5
5156 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5157 echo $ac_n "(cached) $ac_c" 1>&6
5160 ac_save_CPPFLAGS="$CPPFLAGS"
5161 if test \! -z "$includedir" ; then
5162 CPPFLAGS="$CPPFLAGS -I$includedir"
5164 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5165 cat > conftest.$ac_ext <<EOF
5166 #line 5178 "configure"
5167 #include "confdefs.h"
5173 if { (eval echo configure:5185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5177 echo "configure: failed program was:" >&5
5178 cat conftest.$ac_ext >&5
5183 CPPFLAGS="$ac_save_CPPFLAGS"
5186 echo "$ac_t""$ac_cv_kerberos" 1>&6
5187 if test "$ac_cv_kerberos" = yes ; then
5189 cat >> confdefs.h <<\EOF
5190 #define HAVE_KERBEROS 1
5194 # from Tim Showalter <tjs+@andrew.cmu.edu>
5195 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
5196 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5197 echo "configure:5209: checking for res_search" >&5
5198 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5199 echo $ac_n "(cached) $ac_c" 1>&6
5201 cat > conftest.$ac_ext <<EOF
5202 #line 5214 "configure"
5203 #include "confdefs.h"
5204 /* System header to define __stub macros and hopefully few prototypes,
5205 which can conflict with char res_search(); below. */
5207 /* Override any gcc2 internal prototype to avoid an error. */
5208 /* We use char because int might match the return type of a gcc2
5209 builtin and then its argument prototype would still apply. */
5214 /* The GNU C library defines this for functions which it implements
5215 to always fail with ENOSYS. Some functions are actually named
5216 something starting with __ and the normal name is an alias. */
5217 #if defined (__stub_res_search) || defined (__stub___res_search)
5225 if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5227 eval "ac_cv_func_res_search=yes"
5229 echo "configure: failed program was:" >&5
5230 cat conftest.$ac_ext >&5
5232 eval "ac_cv_func_res_search=no"
5237 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5238 echo "$ac_t""yes" 1>&6
5241 echo "$ac_t""no" 1>&6
5242 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5243 echo "configure:5255: checking for res_search in -lresolv" >&5
5244 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5245 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5246 echo $ac_n "(cached) $ac_c" 1>&6
5248 ac_save_LIBS="$LIBS"
5249 LIBS="-lresolv $LIBS"
5250 cat > conftest.$ac_ext <<EOF
5251 #line 5263 "configure"
5252 #include "confdefs.h"
5253 /* Override any gcc2 internal prototype to avoid an error. */
5254 /* We use char because int might match the return type of a gcc2
5255 builtin and then its argument prototype would still apply. */
5262 if { (eval echo configure:5274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5264 eval "ac_cv_lib_$ac_lib_var=yes"
5266 echo "configure: failed program was:" >&5
5267 cat conftest.$ac_ext >&5
5269 eval "ac_cv_lib_$ac_lib_var=no"
5272 LIBS="$ac_save_LIBS"
5275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5276 echo "$ac_t""yes" 1>&6
5277 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
5279 echo "$ac_t""no" 1>&6
5280 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
5291 ###############################################################################
5293 # Check for the nine billion variants of shadow passwords...
5295 ###############################################################################
5300 with_shadow_req=unspecified
5302 # Check whether --with-shadow or --without-shadow was given.
5303 if test "${with_shadow+set}" = set; then
5304 withval="$with_shadow"
5305 with_shadow="$withval"; with_shadow_req="$withval"
5312 case "$with_shadow" in
5317 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
5318 echo "configure:5330: checking for shadow password headers" >&5
5319 d=$with_shadow/include
5321 X_CFLAGS="-I$d $X_CFLAGS"
5322 echo "$ac_t""$d" 1>&6
5324 echo "$ac_t""not found ($d: no such directory)" 1>&6
5327 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
5328 echo "configure:5340: checking for shadow password libs" >&5
5331 X_LIBS="-L$d $X_LIBS"
5332 echo "$ac_t""$d" 1>&6
5334 echo "$ac_t""not found ($d: no such directory)" 1>&6
5337 # replace the directory string with "yes".
5338 with_shadow_req="yes"
5339 with_shadow=$with_shadow_req
5344 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
5345 echo " If it is a directory, then \`DIR/include' will be added to"
5346 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5352 if test "$enable_locking" = no ; then
5358 ###############################################################################
5360 # Check for Sun "adjunct" passwords.
5362 ###############################################################################
5364 if test "$with_shadow" = yes ; then
5365 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
5366 echo "configure:5378: checking for Sun-style shadow passwords" >&5
5367 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
5368 echo $ac_n "(cached) $ac_c" 1>&6
5371 ac_save_CPPFLAGS="$CPPFLAGS"
5372 if test \! -z "$includedir" ; then
5373 CPPFLAGS="$CPPFLAGS -I$includedir"
5375 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5376 cat > conftest.$ac_ext <<EOF
5377 #line 5389 "configure"
5378 #include "confdefs.h"
5381 #include <sys/types.h>
5382 #include <sys/label.h>
5383 #include <sys/audit.h>
5386 struct passwd_adjunct *p = getpwanam("nobody");
5387 const char *pw = p->pwa_passwd;
5390 if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5392 ac_cv_sun_adjunct=yes
5394 echo "configure: failed program was:" >&5
5395 cat conftest.$ac_ext >&5
5397 ac_cv_sun_adjunct=no
5400 CPPFLAGS="$ac_save_CPPFLAGS"
5403 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
5404 if test "$ac_cv_sun_adjunct" = yes; then
5405 have_shadow_adjunct=yes
5412 ###############################################################################
5414 # Check for DEC and SCO so-called "enhanced" security.
5416 ###############################################################################
5418 if test "$with_shadow" = yes ; then
5419 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
5420 echo "configure:5432: checking for DEC-style shadow passwords" >&5
5421 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
5422 echo $ac_n "(cached) $ac_c" 1>&6
5425 ac_save_CPPFLAGS="$CPPFLAGS"
5426 if test \! -z "$includedir" ; then
5427 CPPFLAGS="$CPPFLAGS -I$includedir"
5429 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5430 cat > conftest.$ac_ext <<EOF
5431 #line 5443 "configure"
5432 #include "confdefs.h"
5435 #include <sys/types.h>
5437 #include <sys/security.h>
5440 struct pr_passwd *p;
5442 set_auth_parameters(0, 0);
5443 check_auth_parameters();
5444 p = getprpwnam("nobody");
5445 pw = p->ufld.fd_encrypt;
5448 if { (eval echo configure:5460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5450 ac_cv_enhanced_passwd=yes
5452 echo "configure: failed program was:" >&5
5453 cat conftest.$ac_ext >&5
5455 ac_cv_enhanced_passwd=no
5458 CPPFLAGS="$ac_save_CPPFLAGS"
5461 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
5462 if test $ac_cv_enhanced_passwd = yes; then
5463 have_shadow_enhanced=yes
5467 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
5468 # (I'm told it needs -lcurses too, but I don't understand why.)
5469 # But on DEC, it's in -lsecurity.
5471 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
5472 echo "configure:5484: checking for getprpwnam in -lprot" >&5
5473 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
5474 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5475 echo $ac_n "(cached) $ac_c" 1>&6
5477 ac_save_LIBS="$LIBS"
5478 LIBS="-lprot -lx $LIBS"
5479 cat > conftest.$ac_ext <<EOF
5480 #line 5492 "configure"
5481 #include "confdefs.h"
5482 /* Override any gcc2 internal prototype to avoid an error. */
5483 /* We use char because int might match the return type of a gcc2
5484 builtin and then its argument prototype would still apply. */
5491 if { (eval echo configure:5503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5493 eval "ac_cv_lib_$ac_lib_var=yes"
5495 echo "configure: failed program was:" >&5
5496 cat conftest.$ac_ext >&5
5498 eval "ac_cv_lib_$ac_lib_var=no"
5501 LIBS="$ac_save_LIBS"
5504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5505 echo "$ac_t""yes" 1>&6
5506 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
5508 echo "$ac_t""no" 1>&6
5509 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
5510 echo "configure:5522: checking for getprpwnam in -lsecurity" >&5
5511 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
5512 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5513 echo $ac_n "(cached) $ac_c" 1>&6
5515 ac_save_LIBS="$LIBS"
5516 LIBS="-lsecurity $LIBS"
5517 cat > conftest.$ac_ext <<EOF
5518 #line 5530 "configure"
5519 #include "confdefs.h"
5520 /* Override any gcc2 internal prototype to avoid an error. */
5521 /* We use char because int might match the return type of a gcc2
5522 builtin and then its argument prototype would still apply. */
5529 if { (eval echo configure:5541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5531 eval "ac_cv_lib_$ac_lib_var=yes"
5533 echo "configure: failed program was:" >&5
5534 cat conftest.$ac_ext >&5
5536 eval "ac_cv_lib_$ac_lib_var=no"
5539 LIBS="$ac_save_LIBS"
5542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5543 echo "$ac_t""yes" 1>&6
5544 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5546 echo "$ac_t""no" 1>&6
5554 ###############################################################################
5556 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
5558 ###############################################################################
5560 if test "$with_shadow" = yes ; then
5561 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5562 echo "configure:5574: checking for HP-style shadow passwords" >&5
5563 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5564 echo $ac_n "(cached) $ac_c" 1>&6
5567 ac_save_CPPFLAGS="$CPPFLAGS"
5568 if test \! -z "$includedir" ; then
5569 CPPFLAGS="$CPPFLAGS -I$includedir"
5571 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5572 cat > conftest.$ac_ext <<EOF
5573 #line 5585 "configure"
5574 #include "confdefs.h"
5577 #include <sys/types.h>
5579 #include <hpsecurity.h>
5582 struct s_passwd *p = getspwnam("nobody");
5583 const char *pw = p->pw_passwd;
5586 if { (eval echo configure:5598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5588 ac_cv_hpux_passwd=yes
5590 echo "configure: failed program was:" >&5
5591 cat conftest.$ac_ext >&5
5593 ac_cv_hpux_passwd=no
5596 CPPFLAGS="$ac_save_CPPFLAGS"
5599 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
5600 if test "$ac_cv_hpux_passwd" = yes; then
5601 have_shadow_hpux=yes
5605 # on HPUX, bigcrypt is in -lsec
5606 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
5607 echo "configure:5619: checking for bigcrypt in -lsec" >&5
5608 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
5609 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5610 echo $ac_n "(cached) $ac_c" 1>&6
5612 ac_save_LIBS="$LIBS"
5614 cat > conftest.$ac_ext <<EOF
5615 #line 5627 "configure"
5616 #include "confdefs.h"
5617 /* Override any gcc2 internal prototype to avoid an error. */
5618 /* We use char because int might match the return type of a gcc2
5619 builtin and then its argument prototype would still apply. */
5626 if { (eval echo configure:5638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5628 eval "ac_cv_lib_$ac_lib_var=yes"
5630 echo "configure: failed program was:" >&5
5631 cat conftest.$ac_ext >&5
5633 eval "ac_cv_lib_$ac_lib_var=no"
5636 LIBS="$ac_save_LIBS"
5639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5640 echo "$ac_t""yes" 1>&6
5641 PASSWD_LIBS="$PASSWD_LIBS -lsec"
5643 echo "$ac_t""no" 1>&6
5650 ###############################################################################
5652 # Check for FreeBSD-style shadow passwords.
5654 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
5655 # password systems -- except you only get stuff in the pw_passwd field
5656 # if the running program is setuid. So, guess that we've got this
5657 # lossage to contend with if /etc/master.passwd exists, and default to
5658 # a setuid installation.
5660 ###############################################################################
5662 if test "$with_shadow" = yes ; then
5663 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
5664 echo "configure:5676: checking for FreeBSD-style shadow passwords" >&5
5665 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
5666 echo $ac_n "(cached) $ac_c" 1>&6
5668 if test -f /etc/master.passwd ; then
5669 ac_cv_master_passwd=yes
5671 ac_cv_master_passwd=no
5675 echo "$ac_t""$ac_cv_master_passwd" 1>&6
5676 if test "$ac_cv_master_passwd" = yes; then
5682 ###############################################################################
5684 # Check for traditional (ha!) shadow passwords.
5686 ###############################################################################
5688 if test "$with_shadow" = yes ; then
5689 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
5690 echo "configure:5702: checking for generic shadow passwords" >&5
5691 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
5692 echo $ac_n "(cached) $ac_c" 1>&6
5695 ac_save_CPPFLAGS="$CPPFLAGS"
5696 if test \! -z "$includedir" ; then
5697 CPPFLAGS="$CPPFLAGS -I$includedir"
5699 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5700 cat > conftest.$ac_ext <<EOF
5701 #line 5713 "configure"
5702 #include "confdefs.h"
5705 #include <sys/types.h>
5709 struct spwd *p = getspnam("nobody");
5710 const char *pw = p->sp_pwdp;
5713 if { (eval echo configure:5725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5717 echo "configure: failed program was:" >&5
5718 cat conftest.$ac_ext >&5
5723 CPPFLAGS="$ac_save_CPPFLAGS"
5726 echo "$ac_t""$ac_cv_shadow" 1>&6
5727 if test "$ac_cv_shadow" = yes; then
5731 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
5733 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
5734 echo "configure:5746: checking for getspnam in -lc" >&5
5735 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
5736 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5737 echo $ac_n "(cached) $ac_c" 1>&6
5739 ac_save_LIBS="$LIBS"
5741 cat > conftest.$ac_ext <<EOF
5742 #line 5754 "configure"
5743 #include "confdefs.h"
5744 /* Override any gcc2 internal prototype to avoid an error. */
5745 /* We use char because int might match the return type of a gcc2
5746 builtin and then its argument prototype would still apply. */
5753 if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5755 eval "ac_cv_lib_$ac_lib_var=yes"
5757 echo "configure: failed program was:" >&5
5758 cat conftest.$ac_ext >&5
5760 eval "ac_cv_lib_$ac_lib_var=no"
5763 LIBS="$ac_save_LIBS"
5766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5767 echo "$ac_t""yes" 1>&6
5770 echo "$ac_t""no" 1>&6
5773 if test "$have_getspnam" = no ; then
5774 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
5775 echo "configure:5787: checking for getspnam in -lgen" >&5
5776 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
5777 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5778 echo $ac_n "(cached) $ac_c" 1>&6
5780 ac_save_LIBS="$LIBS"
5782 cat > conftest.$ac_ext <<EOF
5783 #line 5795 "configure"
5784 #include "confdefs.h"
5785 /* Override any gcc2 internal prototype to avoid an error. */
5786 /* We use char because int might match the return type of a gcc2
5787 builtin and then its argument prototype would still apply. */
5794 if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5796 eval "ac_cv_lib_$ac_lib_var=yes"
5798 echo "configure: failed program was:" >&5
5799 cat conftest.$ac_ext >&5
5801 eval "ac_cv_lib_$ac_lib_var=no"
5804 LIBS="$ac_save_LIBS"
5807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5808 echo "$ac_t""yes" 1>&6
5809 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
5811 echo "$ac_t""no" 1>&6
5819 ###############################################################################
5821 # Check for other libraries needed for non-shadow passwords.
5823 ###############################################################################
5825 if test "$enable_locking" = yes ; then
5827 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
5829 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
5830 echo "configure:5842: checking for crypt in -lc" >&5
5831 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
5832 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5833 echo $ac_n "(cached) $ac_c" 1>&6
5835 ac_save_LIBS="$LIBS"
5837 cat > conftest.$ac_ext <<EOF
5838 #line 5850 "configure"
5839 #include "confdefs.h"
5840 /* Override any gcc2 internal prototype to avoid an error. */
5841 /* We use char because int might match the return type of a gcc2
5842 builtin and then its argument prototype would still apply. */
5849 if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5851 eval "ac_cv_lib_$ac_lib_var=yes"
5853 echo "configure: failed program was:" >&5
5854 cat conftest.$ac_ext >&5
5856 eval "ac_cv_lib_$ac_lib_var=no"
5859 LIBS="$ac_save_LIBS"
5862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5863 echo "$ac_t""yes" 1>&6
5866 echo "$ac_t""no" 1>&6
5869 if test "$have_crypt" = no ; then
5870 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
5871 echo "configure:5883: checking for crypt in -lcrypt" >&5
5872 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
5873 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5874 echo $ac_n "(cached) $ac_c" 1>&6
5876 ac_save_LIBS="$LIBS"
5877 LIBS="-lcrypt $LIBS"
5878 cat > conftest.$ac_ext <<EOF
5879 #line 5891 "configure"
5880 #include "confdefs.h"
5881 /* Override any gcc2 internal prototype to avoid an error. */
5882 /* We use char because int might match the return type of a gcc2
5883 builtin and then its argument prototype would still apply. */
5890 if { (eval echo configure:5902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5892 eval "ac_cv_lib_$ac_lib_var=yes"
5894 echo "configure: failed program was:" >&5
5895 cat conftest.$ac_ext >&5
5897 eval "ac_cv_lib_$ac_lib_var=no"
5900 LIBS="$ac_save_LIBS"
5903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5904 echo "$ac_t""yes" 1>&6
5905 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
5907 echo "$ac_t""no" 1>&6
5914 # Most of the above shadow mechanisms will have set need_setuid to yes,
5915 # if they were found. But, on some systems, we need setuid even when
5916 # using plain old vanilla passwords.
5918 if test "$enable_locking" = yes ; then
5920 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
5927 if test "$have_shadow_adjunct" = yes ; then
5928 cat >> confdefs.h <<\EOF
5929 #define HAVE_ADJUNCT_PASSWD 1
5932 elif test "$have_shadow_enhanced" = yes ; then
5933 cat >> confdefs.h <<\EOF
5934 #define HAVE_ENHANCED_PASSWD 1
5937 elif test "$have_shadow_hpux" = yes ; then
5938 cat >> confdefs.h <<\EOF
5939 #define HAVE_HPUX_PASSWD 1
5942 elif test "$have_shadow" = yes ; then
5943 cat >> confdefs.h <<\EOF
5944 #define HAVE_SHADOW_PASSWD 1
5950 ###############################################################################
5954 ###############################################################################
5957 with_motif_req=unspecified
5958 # Check whether --with-motif or --without-motif was given.
5959 if test "${with_motif+set}" = set; then
5960 withval="$with_motif"
5961 with_motif="$withval"; with_motif_req="$withval"
5968 case "$with_motif" in
5973 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
5974 echo "configure:5986: checking for Motif headers" >&5
5975 d=$with_motif/include
5977 X_CFLAGS="-I$d $X_CFLAGS"
5978 echo "$ac_t""$d" 1>&6
5980 echo "$ac_t""not found ($d: no such directory)" 1>&6
5983 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
5984 echo "configure:5996: checking for Motif libs" >&5
5987 X_LIBS="-L$d $X_LIBS"
5988 echo "$ac_t""$d" 1>&6
5990 echo "$ac_t""not found ($d: no such directory)" 1>&6
5993 # replace the directory string with "yes".
5994 with_motif_req="yes"
5995 with_motif=$with_motif_req
6000 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6001 echo " If it is a directory, then \`DIR/include' will be added to"
6002 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6008 if test "$with_motif" != yes -a "$with_motif" != no ; then
6009 echo "error: must be yes or no: --with-motif=$with_motif"
6013 if test "$with_motif" = yes; then
6016 ac_save_CPPFLAGS="$CPPFLAGS"
6017 if test \! -z "$includedir" ; then
6018 CPPFLAGS="$CPPFLAGS -I$includedir"
6020 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6021 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6022 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6023 echo "configure:6035: checking for Xm/Xm.h" >&5
6024 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6025 echo $ac_n "(cached) $ac_c" 1>&6
6027 cat > conftest.$ac_ext <<EOF
6028 #line 6040 "configure"
6029 #include "confdefs.h"
6032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6033 { (eval echo configure:6045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6035 if test -z "$ac_err"; then
6037 eval "ac_cv_header_$ac_safe=yes"
6040 echo "configure: failed program was:" >&5
6041 cat conftest.$ac_ext >&5
6043 eval "ac_cv_header_$ac_safe=no"
6047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6048 echo "$ac_t""yes" 1>&6
6050 cat >> confdefs.h <<\EOF
6051 #define HAVE_MOTIF 1
6054 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6056 echo "$ac_t""no" 1>&6
6059 CPPFLAGS="$ac_save_CPPFLAGS"
6063 ###############################################################################
6067 ###############################################################################
6070 with_gtk_req=unspecified
6071 # Check whether --with-gtk or --without-gtk was given.
6072 if test "${with_gtk+set}" = set; then
6074 with_gtk="$withval"; with_gtk_req="$withval"
6080 # if --with-gtk=/directory/ was specified, remember that directory so that
6081 # we can also look for the `gtk-config' program in that directory.
6097 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6098 echo "configure:6110: checking for Gtk headers" >&5
6101 X_CFLAGS="-I$d $X_CFLAGS"
6102 echo "$ac_t""$d" 1>&6
6104 echo "$ac_t""not found ($d: no such directory)" 1>&6
6107 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6108 echo "configure:6120: checking for Gtk libs" >&5
6111 X_LIBS="-L$d $X_LIBS"
6112 echo "$ac_t""$d" 1>&6
6114 echo "$ac_t""not found ($d: no such directory)" 1>&6
6117 # replace the directory string with "yes".
6119 with_gtk=$with_gtk_req
6124 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6125 echo " If it is a directory, then \`DIR/include' will be added to"
6126 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6132 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6133 echo "error: must be yes or no: --with-gtk=$with_gtk"
6138 if test "$with_gtk" = yes; then
6141 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6142 # for glib-config and gtk-config.
6146 if test ! -z "$gtk_dir"; then
6147 # canonicalize slashes.
6148 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6149 gtk_path="$gtk_dir:$gtk_dir:$gtk_path"
6152 for ac_prog in glib-config
6154 # Extract the first word of "$ac_prog", so it can be a program name with args.
6155 set dummy $ac_prog; ac_word=$2
6156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6157 echo "configure:6169: checking for $ac_word" >&5
6158 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6159 echo $ac_n "(cached) $ac_c" 1>&6
6161 case "$glib_config" in
6163 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6166 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6169 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6170 ac_dummy="$gtk_path"
6171 for ac_dir in $ac_dummy; do
6172 test -z "$ac_dir" && ac_dir=.
6173 if test -f $ac_dir/$ac_word; then
6174 ac_cv_path_glib_config="$ac_dir/$ac_word"
6182 glib_config="$ac_cv_path_glib_config"
6183 if test -n "$glib_config"; then
6184 echo "$ac_t""$glib_config" 1>&6
6186 echo "$ac_t""no" 1>&6
6189 test -n "$glib_config" && break
6192 for ac_prog in gtk-config
6194 # Extract the first word of "$ac_prog", so it can be a program name with args.
6195 set dummy $ac_prog; ac_word=$2
6196 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6197 echo "configure:6209: checking for $ac_word" >&5
6198 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6199 echo $ac_n "(cached) $ac_c" 1>&6
6201 case "$gtk_config" in
6203 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6206 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6209 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6210 ac_dummy="$gtk_path"
6211 for ac_dir in $ac_dummy; do
6212 test -z "$ac_dir" && ac_dir=.
6213 if test -f $ac_dir/$ac_word; then
6214 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6222 gtk_config="$ac_cv_path_gtk_config"
6223 if test -n "$gtk_config"; then
6224 echo "$ac_t""$gtk_config" 1>&6
6226 echo "$ac_t""no" 1>&6
6229 test -n "$gtk_config" && break
6233 if test -n "$glib_config" -a -n "gtk_config" ; then
6236 if test "$have_gtk" = yes; then
6237 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6238 echo "configure:6250: checking Gtk version number" >&5
6239 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6240 echo $ac_n "(cached) $ac_c" 1>&6
6242 ac_cv_gtk_version_string=`$glib_config --version`
6245 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6246 ac_gtk_version_string=$ac_cv_gtk_version_string
6249 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6250 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6252 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6253 if test -z "$ac_gtk_version"; then
6254 ac_gtk_version=unknown
6255 ac_gtk_version_string=unknown
6257 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6263 if test "$have_gtk" = yes; then
6264 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6265 echo "configure:6277: checking for Gtk includes" >&5
6266 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6267 echo $ac_n "(cached) $ac_c" 1>&6
6269 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6272 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6273 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6274 echo "configure:6286: checking for Gtk libs" >&5
6275 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6276 echo $ac_n "(cached) $ac_c" 1>&6
6278 ac_cv_gtk_config_libs=`$gtk_config --libs`
6281 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6282 INCLUDES="$INCLUDES $ac_cv_gtk_config_cflags"
6283 GTK_LIBS="$GTK_LIBS $ac_cv_gtk_config_libs"
6284 cat >> confdefs.h <<\EOF
6292 ###############################################################################
6294 # Check for -lXaw and -lXaw3d.
6296 ###############################################################################
6300 with_athena_req=unspecified
6301 # Check whether --with-athena or --without-athena was given.
6302 if test "${with_athena+set}" = set; then
6303 withval="$with_athena"
6304 with_athena="$withval"; with_athena_req="$withval"
6311 case "$with_athena" in
6316 echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
6317 echo "configure:6329: checking for Athena headers" >&5
6318 d=$with_athena/include
6320 X_CFLAGS="-I$d $X_CFLAGS"
6321 echo "$ac_t""$d" 1>&6
6323 echo "$ac_t""not found ($d: no such directory)" 1>&6
6326 echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
6327 echo "configure:6339: checking for Athena libs" >&5
6330 X_LIBS="-L$d $X_LIBS"
6331 echo "$ac_t""$d" 1>&6
6333 echo "$ac_t""not found ($d: no such directory)" 1>&6
6336 # replace the directory string with "yes".
6337 with_athena_req="yes"
6338 with_athena=$with_athena_req
6343 echo "error: argument to --with-athena must be \"yes\", \"no\", or a directory."
6344 echo " If it is a directory, then \`DIR/include' will be added to"
6345 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6352 if test "$with_athena" != yes -a "$with_athena" != no ; then
6353 echo "error: must be yes or no: --with-athena=$with_athena"
6358 if test "$with_athena" = yes; then
6361 ac_save_CPPFLAGS="$CPPFLAGS"
6362 if test \! -z "$includedir" ; then
6363 CPPFLAGS="$CPPFLAGS -I$includedir"
6365 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6366 ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
6367 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
6368 echo "configure:6380: checking for X11/Xaw/Dialog.h" >&5
6369 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6370 echo $ac_n "(cached) $ac_c" 1>&6
6372 cat > conftest.$ac_ext <<EOF
6373 #line 6385 "configure"
6374 #include "confdefs.h"
6375 #include <X11/Xaw/Dialog.h>
6377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6378 { (eval echo configure:6390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6380 if test -z "$ac_err"; then
6382 eval "ac_cv_header_$ac_safe=yes"
6385 echo "configure: failed program was:" >&5
6386 cat conftest.$ac_ext >&5
6388 eval "ac_cv_header_$ac_safe=no"
6392 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6393 echo "$ac_t""yes" 1>&6
6396 echo "$ac_t""no" 1>&6
6399 CPPFLAGS="$ac_save_CPPFLAGS"
6400 if test "$have_athena" = yes; then
6402 ac_save_CPPFLAGS="$CPPFLAGS"
6403 ac_save_LDFLAGS="$LDFLAGS"
6404 # ac_save_LIBS="$LIBS"
6406 if test \! -z "$includedir" ; then
6407 CPPFLAGS="$CPPFLAGS -I$includedir"
6409 # note: $X_CFLAGS includes $x_includes
6410 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6412 if test \! -z "$libdir" ; then
6413 LDFLAGS="$LDFLAGS -L$libdir"
6415 # note: $X_LIBS includes $x_libraries
6416 LDFLAGS="$LDFLAGS $X_LIBS"
6418 echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
6419 echo "configure:6431: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
6420 ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'`
6421 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6422 echo $ac_n "(cached) $ac_c" 1>&6
6424 ac_save_LIBS="$LIBS"
6425 LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
6426 cat > conftest.$ac_ext <<EOF
6427 #line 6439 "configure"
6428 #include "confdefs.h"
6429 /* Override any gcc2 internal prototype to avoid an error. */
6430 /* We use char because int might match the return type of a gcc2
6431 builtin and then its argument prototype would still apply. */
6432 char Xaw3dComputeTopShadowRGB();
6435 Xaw3dComputeTopShadowRGB()
6438 if { (eval echo configure:6450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6440 eval "ac_cv_lib_$ac_lib_var=yes"
6442 echo "configure: failed program was:" >&5
6443 cat conftest.$ac_ext >&5
6445 eval "ac_cv_lib_$ac_lib_var=no"
6448 LIBS="$ac_save_LIBS"
6451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6452 echo "$ac_t""yes" 1>&6
6453 have_athena=yes; have_athena3d=yes
6455 echo "$ac_t""no" 1>&6
6459 CPPFLAGS="$ac_save_CPPFLAGS"
6460 LDFLAGS="$ac_save_LDFLAGS"
6461 # LIBS="$ac_save_LIBS"
6466 if test "$have_athena" = yes; then
6467 cat >> confdefs.h <<\EOF
6468 #define HAVE_ATHENA 1
6471 ATHENA_LIBS="-lXaw $ATHENA_LIBS"
6474 if test "$have_athena3d" = yes; then
6475 ATHENA3D_LIBS="-lXaw3d $ATHENA3D_LIBS"
6479 # If we have Athena, check whether it's a version that includes
6480 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
6481 if test "$have_athena" = yes ; then
6482 echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
6483 echo "configure:6495: checking for XawViewportSetCoordinates in Viewport.h" >&5
6484 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
6485 echo $ac_n "(cached) $ac_c" 1>&6
6487 ac_cv_have_XawViewportSetCoordinates=no
6489 ac_save_CPPFLAGS="$CPPFLAGS"
6490 if test \! -z "$includedir" ; then
6491 CPPFLAGS="$CPPFLAGS -I$includedir"
6493 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6494 cat > conftest.$ac_ext <<EOF
6495 #line 6507 "configure"
6496 #include "confdefs.h"
6497 #include <X11/Xaw/Viewport.h>
6499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6500 egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then
6502 ac_cv_have_XawViewportSetCoordinates=yes
6506 CPPFLAGS="$ac_save_CPPFLAGS"
6509 echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6
6510 if test "$ac_cv_have_XawViewportSetCoordinates" = yes ; then
6511 cat >> confdefs.h <<\EOF
6512 #define HAVE_XawViewportSetCoordinates 1
6519 ###############################################################################
6521 # Checking whether Motif is really Lesstif.
6523 ###############################################################################
6526 if test "$have_motif" = yes ; then
6527 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6528 echo "configure:6540: checking whether Motif is really LessTif" >&5
6529 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6530 echo $ac_n "(cached) $ac_c" 1>&6
6533 ac_save_CPPFLAGS="$CPPFLAGS"
6534 if test \! -z "$includedir" ; then
6535 CPPFLAGS="$CPPFLAGS -I$includedir"
6537 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6538 cat > conftest.$ac_ext <<EOF
6539 #line 6551 "configure"
6540 #include "confdefs.h"
6543 long vers = LesstifVersion;
6546 if { (eval echo configure:6558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6548 ac_cv_have_lesstif=yes
6550 echo "configure: failed program was:" >&5
6551 cat conftest.$ac_ext >&5
6553 ac_cv_have_lesstif=no
6556 CPPFLAGS="$ac_save_CPPFLAGS"
6559 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
6560 have_lesstif=$ac_cv_have_lesstif
6564 lesstif_version=unknown
6565 lesstif_version_string=unknown
6567 if test "$have_lesstif" = yes ; then
6569 echo unknown > conftest-lt
6570 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
6571 echo "configure:6583: checking LessTif version number" >&5
6572 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
6573 echo $ac_n "(cached) $ac_c" 1>&6
6576 ac_save_CPPFLAGS="$CPPFLAGS"
6577 if test \! -z "$includedir" ; then
6578 CPPFLAGS="$CPPFLAGS -I$includedir"
6580 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6581 if test "$cross_compiling" = yes; then
6582 ac_cv_lesstif_version=unknown
6583 ac_cv_lesstif_version_string=unknown
6585 cat > conftest.$ac_ext <<EOF
6586 #line 6598 "configure"
6587 #include "confdefs.h"
6591 FILE *f = fopen("conftest-lt", "w");
6593 fprintf(f, "%d %d.%d\n", LesstifVersion,
6594 LESSTIF_VERSION, LESSTIF_REVISION);
6599 if { (eval echo configure:6611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6601 ltv=`cat conftest-lt`
6602 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
6603 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
6605 echo "configure: failed program was:" >&5
6606 cat conftest.$ac_ext >&5
6608 ac_cv_lesstif_version=unknown
6609 ac_cv_lesstif_version_string=unknown
6614 CPPFLAGS="$ac_save_CPPFLAGS"
6617 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
6619 lesstif_version=$ac_cv_lesstif_version
6620 lesstif_version_string=$ac_cv_lesstif_version_string
6625 if test "$have_motif" = yes ; then
6627 echo unknown > conftest-mt
6628 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
6629 echo "configure:6641: checking Motif version number" >&5
6630 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
6631 echo $ac_n "(cached) $ac_c" 1>&6
6634 ac_save_CPPFLAGS="$CPPFLAGS"
6635 if test \! -z "$includedir" ; then
6636 CPPFLAGS="$CPPFLAGS -I$includedir"
6638 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6639 if test "$cross_compiling" = yes; then
6640 ac_cv_motif_version=unknown
6641 ac_cv_motif_version_string=unknown
6643 cat > conftest.$ac_ext <<EOF
6644 #line 6656 "configure"
6645 #include "confdefs.h"
6649 FILE *f = fopen("conftest-mt", "w");
6651 fprintf(f, "%d %d.%d\n", XmVersion,
6652 XmVERSION, XmREVISION);
6657 if { (eval echo configure:6669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6659 mtv=`cat conftest-mt`
6660 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
6661 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
6663 echo "configure: failed program was:" >&5
6664 cat conftest.$ac_ext >&5
6666 ac_cv_motif_version=unknown
6667 ac_cv_motif_version_string=unknown
6672 CPPFLAGS="$ac_save_CPPFLAGS"
6675 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
6677 motif_version=$ac_cv_motif_version
6678 motif_version_string=$ac_cv_motif_version_string
6683 ###############################################################################
6685 # Checking whether Motif requires -lXpm.
6687 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
6688 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
6689 # of the library whether to build the XPM code into libXm, or whether
6690 # to rely on an external libXm. So the only way to tell whether XPM is
6691 # a link-time requirement is to examine libXm.a, which is very
6692 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
6693 # always link against XPM if the XPM lib exists (and this will be a
6694 # no-op if libXm happens to already have the XPM code in it.)
6696 ###############################################################################
6698 motif_requires_xpm=no
6699 if test "$have_motif" = yes ; then
6700 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
6701 echo "configure:6713: checking whether Motif requires XPM" >&5
6702 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
6704 motif_requires_xpm=yes
6705 echo "$ac_t""maybe" 1>&6
6707 echo "$ac_t""no" 1>&6
6712 ###############################################################################
6714 # Checking whether Motif requires -lXp.
6716 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
6717 # Extension". Why this extension isn't in -lXext with all the others,
6720 ###############################################################################
6723 if test "$have_motif" = yes ; then
6726 ac_save_CPPFLAGS="$CPPFLAGS"
6727 ac_save_LDFLAGS="$LDFLAGS"
6728 # ac_save_LIBS="$LIBS"
6730 if test \! -z "$includedir" ; then
6731 CPPFLAGS="$CPPFLAGS -I$includedir"
6733 # note: $X_CFLAGS includes $x_includes
6734 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6736 if test \! -z "$libdir" ; then
6737 LDFLAGS="$LDFLAGS -L$libdir"
6739 # note: $X_LIBS includes $x_libraries
6740 LDFLAGS="$LDFLAGS $X_LIBS"
6742 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
6743 echo "configure:6755: checking for XpQueryExtension in -lXp" >&5
6744 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
6745 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6746 echo $ac_n "(cached) $ac_c" 1>&6
6748 ac_save_LIBS="$LIBS"
6749 LIBS="-lXp -lX11 -lXext -lm $LIBS"
6750 cat > conftest.$ac_ext <<EOF
6751 #line 6763 "configure"
6752 #include "confdefs.h"
6753 /* Override any gcc2 internal prototype to avoid an error. */
6754 /* We use char because int might match the return type of a gcc2
6755 builtin and then its argument prototype would still apply. */
6756 char XpQueryExtension();
6762 if { (eval echo configure:6774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6764 eval "ac_cv_lib_$ac_lib_var=yes"
6766 echo "configure: failed program was:" >&5
6767 cat conftest.$ac_ext >&5
6769 eval "ac_cv_lib_$ac_lib_var=no"
6772 LIBS="$ac_save_LIBS"
6775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6776 echo "$ac_t""yes" 1>&6
6777 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
6779 echo "$ac_t""no" 1>&6
6783 CPPFLAGS="$ac_save_CPPFLAGS"
6784 LDFLAGS="$ac_save_LDFLAGS"
6785 # LIBS="$ac_save_LIBS"
6790 ###############################################################################
6792 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
6794 ###############################################################################
6797 if test "$have_motif" = yes ; then
6799 ac_save_CPPFLAGS="$CPPFLAGS"
6800 ac_save_LDFLAGS="$LDFLAGS"
6801 # ac_save_LIBS="$LIBS"
6803 if test \! -z "$includedir" ; then
6804 CPPFLAGS="$CPPFLAGS -I$includedir"
6806 # note: $X_CFLAGS includes $x_includes
6807 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6809 if test \! -z "$libdir" ; then
6810 LDFLAGS="$LDFLAGS -L$libdir"
6812 # note: $X_LIBS includes $x_libraries
6813 LDFLAGS="$LDFLAGS $X_LIBS"
6815 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
6816 echo "configure:6828: checking for _Xsetlocale in -lXintl" >&5
6817 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
6818 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6819 echo $ac_n "(cached) $ac_c" 1>&6
6821 ac_save_LIBS="$LIBS"
6822 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
6823 cat > conftest.$ac_ext <<EOF
6824 #line 6836 "configure"
6825 #include "confdefs.h"
6826 /* Override any gcc2 internal prototype to avoid an error. */
6827 /* We use char because int might match the return type of a gcc2
6828 builtin and then its argument prototype would still apply. */
6835 if { (eval echo configure:6847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6837 eval "ac_cv_lib_$ac_lib_var=yes"
6839 echo "configure: failed program was:" >&5
6840 cat conftest.$ac_ext >&5
6842 eval "ac_cv_lib_$ac_lib_var=no"
6845 LIBS="$ac_save_LIBS"
6848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6849 echo "$ac_t""yes" 1>&6
6852 echo "$ac_t""no" 1>&6
6856 CPPFLAGS="$ac_save_CPPFLAGS"
6857 LDFLAGS="$ac_save_LDFLAGS"
6858 # LIBS="$ac_save_LIBS"
6860 if test "$have_xintl" = yes; then
6861 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
6866 ###############################################################################
6868 # Check for -lGL or -lMesaGL.
6870 ###############################################################################
6874 with_gl_req=unspecified
6875 # Check whether --with-gl or --without-gl was given.
6876 if test "${with_gl+set}" = set; then
6878 with_gl="$withval"; with_gl_req="$withval"
6890 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
6891 echo "configure:6903: checking for GL headers" >&5
6894 X_CFLAGS="-I$d $X_CFLAGS"
6895 echo "$ac_t""$d" 1>&6
6897 echo "$ac_t""not found ($d: no such directory)" 1>&6
6900 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
6901 echo "configure:6913: checking for GL libs" >&5
6904 X_LIBS="-L$d $X_LIBS"
6905 echo "$ac_t""$d" 1>&6
6907 echo "$ac_t""not found ($d: no such directory)" 1>&6
6910 # replace the directory string with "yes".
6912 with_gl=$with_gl_req
6917 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
6918 echo " If it is a directory, then \`DIR/include' will be added to"
6919 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6925 ac_mesagl_version=unknown
6926 ac_mesagl_version_string=unknown
6928 if test "$with_gl" = yes; then
6930 ac_save_CPPFLAGS="$CPPFLAGS"
6931 if test \! -z "$includedir" ; then
6932 CPPFLAGS="$CPPFLAGS -I$includedir"
6934 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6935 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
6936 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
6937 echo "configure:6949: checking for GL/gl.h" >&5
6938 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6939 echo $ac_n "(cached) $ac_c" 1>&6
6941 cat > conftest.$ac_ext <<EOF
6942 #line 6954 "configure"
6943 #include "confdefs.h"
6946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6947 { (eval echo configure:6959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6949 if test -z "$ac_err"; then
6951 eval "ac_cv_header_$ac_safe=yes"
6954 echo "configure: failed program was:" >&5
6955 cat conftest.$ac_ext >&5
6957 eval "ac_cv_header_$ac_safe=no"
6961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6962 echo "$ac_t""yes" 1>&6
6965 echo "$ac_t""no" 1>&6
6968 CPPFLAGS="$ac_save_CPPFLAGS"
6969 if test "$have_gl" = yes ; then
6971 ac_save_CPPFLAGS="$CPPFLAGS"
6972 if test \! -z "$includedir" ; then
6973 CPPFLAGS="$CPPFLAGS -I$includedir"
6975 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6976 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
6977 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
6978 echo "configure:6990: checking for GL/glx.h" >&5
6979 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6980 echo $ac_n "(cached) $ac_c" 1>&6
6982 cat > conftest.$ac_ext <<EOF
6983 #line 6995 "configure"
6984 #include "confdefs.h"
6987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6988 { (eval echo configure:7000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6990 if test -z "$ac_err"; then
6992 eval "ac_cv_header_$ac_safe=yes"
6995 echo "configure: failed program was:" >&5
6996 cat conftest.$ac_ext >&5
6998 eval "ac_cv_header_$ac_safe=no"
7002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7003 echo "$ac_t""yes" 1>&6
7006 echo "$ac_t""no" 1>&6
7009 CPPFLAGS="$ac_save_CPPFLAGS"
7012 # If we have the headers, try and figure out which vendor it's from.
7014 if test "$have_gl" = yes ; then
7016 # We need to know whether it's MesaGL so that we know which libraries
7019 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7020 echo "configure:7032: checking whether GL is really MesaGL" >&5
7021 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7022 echo $ac_n "(cached) $ac_c" 1>&6
7024 ac_cv_have_mesa_gl=no
7026 ac_save_CPPFLAGS="$CPPFLAGS"
7027 if test \! -z "$includedir" ; then
7028 CPPFLAGS="$CPPFLAGS -I$includedir"
7030 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7031 cat > conftest.$ac_ext <<EOF
7032 #line 7044 "configure"
7033 #include "confdefs.h"
7036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7037 egrep "Mesa" >/dev/null 2>&1; then
7039 ac_cv_have_mesa_gl=yes
7043 CPPFLAGS="$ac_save_CPPFLAGS"
7047 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7048 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7051 # If we have Mesa headers, check to see if we can link against -lMesaGL.
7052 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
7053 # Else, warn that GL is busted. (We have the headers, but no libs.)
7058 if test "$ac_have_mesa_gl" = yes ; then
7060 ac_save_CPPFLAGS="$CPPFLAGS"
7061 ac_save_LDFLAGS="$LDFLAGS"
7062 # ac_save_LIBS="$LIBS"
7064 if test \! -z "$includedir" ; then
7065 CPPFLAGS="$CPPFLAGS -I$includedir"
7067 # note: $X_CFLAGS includes $x_includes
7068 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7070 if test \! -z "$libdir" ; then
7071 LDFLAGS="$LDFLAGS -L$libdir"
7073 # note: $X_LIBS includes $x_libraries
7074 LDFLAGS="$LDFLAGS $X_LIBS"
7076 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
7077 echo "configure:7089: checking for glXCreateContext in -lMesaGL" >&5
7078 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7079 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7080 echo $ac_n "(cached) $ac_c" 1>&6
7082 ac_save_LIBS="$LIBS"
7083 LIBS="-lMesaGL -lMesaGLU -lX11 -lXext -lm $LIBS"
7084 cat > conftest.$ac_ext <<EOF
7085 #line 7097 "configure"
7086 #include "confdefs.h"
7087 /* Override any gcc2 internal prototype to avoid an error. */
7088 /* We use char because int might match the return type of a gcc2
7089 builtin and then its argument prototype would still apply. */
7090 char glXCreateContext();
7096 if { (eval echo configure:7108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7098 eval "ac_cv_lib_$ac_lib_var=yes"
7100 echo "configure: failed program was:" >&5
7101 cat conftest.$ac_ext >&5
7103 eval "ac_cv_lib_$ac_lib_var=no"
7106 LIBS="$ac_save_LIBS"
7109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7110 echo "$ac_t""yes" 1>&6
7112 GL_LIBS="-lMesaGL -lMesaGLU"
7114 echo "$ac_t""no" 1>&6
7117 CPPFLAGS="$ac_save_CPPFLAGS"
7118 LDFLAGS="$ac_save_LDFLAGS"
7119 # LIBS="$ac_save_LIBS"
7123 if test "$gl_lib_1" = "" ; then
7125 ac_save_CPPFLAGS="$CPPFLAGS"
7126 ac_save_LDFLAGS="$LDFLAGS"
7127 # ac_save_LIBS="$LIBS"
7129 if test \! -z "$includedir" ; then
7130 CPPFLAGS="$CPPFLAGS -I$includedir"
7132 # note: $X_CFLAGS includes $x_includes
7133 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7135 if test \! -z "$libdir" ; then
7136 LDFLAGS="$LDFLAGS -L$libdir"
7138 # note: $X_LIBS includes $x_libraries
7139 LDFLAGS="$LDFLAGS $X_LIBS"
7141 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7142 echo "configure:7154: checking for glXCreateContext in -lGL" >&5
7143 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7144 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7145 echo $ac_n "(cached) $ac_c" 1>&6
7147 ac_save_LIBS="$LIBS"
7148 LIBS="-lGL -lGLU -lX11 -lXext -lm $LIBS"
7149 cat > conftest.$ac_ext <<EOF
7150 #line 7162 "configure"
7151 #include "confdefs.h"
7152 /* Override any gcc2 internal prototype to avoid an error. */
7153 /* We use char because int might match the return type of a gcc2
7154 builtin and then its argument prototype would still apply. */
7155 char glXCreateContext();
7161 if { (eval echo configure:7173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7163 eval "ac_cv_lib_$ac_lib_var=yes"
7165 echo "configure: failed program was:" >&5
7166 cat conftest.$ac_ext >&5
7168 eval "ac_cv_lib_$ac_lib_var=no"
7171 LIBS="$ac_save_LIBS"
7174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7175 echo "$ac_t""yes" 1>&6
7177 GL_LIBS="-lGL -lGLU"
7179 echo "$ac_t""no" 1>&6
7182 CPPFLAGS="$ac_save_CPPFLAGS"
7183 LDFLAGS="$ac_save_LDFLAGS"
7184 # LIBS="$ac_save_LIBS"
7188 if test "$gl_lib_1" = "" ; then
7189 # we have headers, but no libs -- bail.
7193 # linking works -- we can build the GL hacks.
7194 cat >> confdefs.h <<\EOF
7198 if test "$ac_have_mesa_gl" = yes ; then
7199 cat >> confdefs.h <<\EOF
7200 #define HAVE_MESA_GL 1
7208 # Now that we know we have GL headers and libs, do some more GL testing.
7211 if test "$have_gl" = yes ; then
7212 # If it's MesaGL, we'd like to issue a warning if the version number
7213 # is less than or equal to 2.6, because that version had a security bug.
7215 if test "$ac_have_mesa_gl" = yes; then
7217 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7218 echo "configure:7230: checking MesaGL version number" >&5
7219 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7220 echo $ac_n "(cached) $ac_c" 1>&6
7222 cat > conftest.$ac_ext <<EOF
7223 #line 7235 "configure"
7224 #include "confdefs.h"
7226 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7229 ac_save_CPPFLAGS="$CPPFLAGS"
7230 if test \! -z "$includedir" ; then
7231 CPPFLAGS="$CPPFLAGS -I$includedir"
7233 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7237 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7238 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7241 rm -f conftest.$ac_ext
7243 CPPFLAGS="$ac_save_CPPFLAGS"
7245 if test "$mglv" = ""; then
7246 ac_mesagl_version=unknown
7247 ac_mesagl_version_string=unknown
7249 ac_mesagl_version_string=$mglv
7250 maj=`echo $mglv | sed -n 's/\..*//p'`
7251 min=`echo $mglv | sed -n 's/.*\.//p'`
7252 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7253 if test -z "$ac_mesagl_version"; then
7254 ac_mesagl_version=unknown
7255 ac_mesagl_version_string=unknown
7258 ac_cv_mesagl_version=$ac_mesagl_version
7259 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7263 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7264 ac_mesagl_version=$ac_cv_mesagl_version
7265 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7269 # If it's MesaGL, check to see if it requires -lpthread.
7272 mesa_requires_pthread=no
7273 if test "$ac_have_mesa_gl" = yes; then
7275 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7276 echo "configure:7288: checking for pthread_create in -lpthread" >&5
7277 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7278 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7279 echo $ac_n "(cached) $ac_c" 1>&6
7281 ac_save_LIBS="$LIBS"
7282 LIBS="-lpthread $LIBS"
7283 cat > conftest.$ac_ext <<EOF
7284 #line 7296 "configure"
7285 #include "confdefs.h"
7286 /* Override any gcc2 internal prototype to avoid an error. */
7287 /* We use char because int might match the return type of a gcc2
7288 builtin and then its argument prototype would still apply. */
7289 char pthread_create();
7295 if { (eval echo configure:7307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7297 eval "ac_cv_lib_$ac_lib_var=yes"
7299 echo "configure: failed program was:" >&5
7300 cat conftest.$ac_ext >&5
7302 eval "ac_cv_lib_$ac_lib_var=no"
7305 LIBS="$ac_save_LIBS"
7308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7309 echo "$ac_t""yes" 1>&6
7312 echo "$ac_t""no" 1>&6
7315 if test "$have_pthread" = yes; then
7317 ac_save_CPPFLAGS="$CPPFLAGS"
7318 ac_save_LDFLAGS="$LDFLAGS"
7319 # ac_save_LIBS="$LIBS"
7321 if test \! -z "$includedir" ; then
7322 CPPFLAGS="$CPPFLAGS -I$includedir"
7324 # note: $X_CFLAGS includes $x_includes
7325 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7327 if test \! -z "$libdir" ; then
7328 LDFLAGS="$LDFLAGS -L$libdir"
7330 # note: $X_LIBS includes $x_libraries
7331 LDFLAGS="$LDFLAGS $X_LIBS"
7333 echo $ac_n "checking for gl_get_thread_context in -l$gl_lib_1""... $ac_c" 1>&6
7334 echo "configure:7346: checking for gl_get_thread_context in -l$gl_lib_1" >&5
7335 ac_lib_var=`echo $gl_lib_1'_'gl_get_thread_context | sed 'y%./+-%__p_%'`
7336 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7337 echo $ac_n "(cached) $ac_c" 1>&6
7339 ac_save_LIBS="$LIBS"
7340 LIBS="-l$gl_lib_1 $GL_LIBS -lpthread -lX11 -lXext -lm $LIBS"
7341 cat > conftest.$ac_ext <<EOF
7342 #line 7354 "configure"
7343 #include "confdefs.h"
7344 /* Override any gcc2 internal prototype to avoid an error. */
7345 /* We use char because int might match the return type of a gcc2
7346 builtin and then its argument prototype would still apply. */
7347 char gl_get_thread_context();
7350 gl_get_thread_context()
7353 if { (eval echo configure:7365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7355 eval "ac_cv_lib_$ac_lib_var=yes"
7357 echo "configure: failed program was:" >&5
7358 cat conftest.$ac_ext >&5
7360 eval "ac_cv_lib_$ac_lib_var=no"
7363 LIBS="$ac_save_LIBS"
7366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7367 echo "$ac_t""yes" 1>&6
7368 mesa_requires_pthread=yes
7370 echo "$ac_t""no" 1>&6
7374 CPPFLAGS="$ac_save_CPPFLAGS"
7375 LDFLAGS="$ac_save_LDFLAGS"
7376 # LIBS="$ac_save_LIBS"
7380 if test "$mesa_requires_pthread" = yes; then
7381 GL_LIBS="$GL_LIBS -lpthread"
7385 # Check for OpenGL 1.1 features.
7388 ac_save_CPPFLAGS="$CPPFLAGS"
7389 ac_save_LDFLAGS="$LDFLAGS"
7390 # ac_save_LIBS="$LIBS"
7392 if test \! -z "$includedir" ; then
7393 CPPFLAGS="$CPPFLAGS -I$includedir"
7395 # note: $X_CFLAGS includes $x_includes
7396 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7398 if test \! -z "$libdir" ; then
7399 LDFLAGS="$LDFLAGS -L$libdir"
7401 # note: $X_LIBS includes $x_libraries
7402 LDFLAGS="$LDFLAGS $X_LIBS"
7404 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7405 echo "configure:7417: checking for glBindTexture in -l$gl_lib_1" >&5
7406 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7407 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7408 echo $ac_n "(cached) $ac_c" 1>&6
7410 ac_save_LIBS="$LIBS"
7411 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7412 cat > conftest.$ac_ext <<EOF
7413 #line 7425 "configure"
7414 #include "confdefs.h"
7415 /* Override any gcc2 internal prototype to avoid an error. */
7416 /* We use char because int might match the return type of a gcc2
7417 builtin and then its argument prototype would still apply. */
7418 char glBindTexture();
7424 if { (eval echo configure:7436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7426 eval "ac_cv_lib_$ac_lib_var=yes"
7428 echo "configure: failed program was:" >&5
7429 cat conftest.$ac_ext >&5
7431 eval "ac_cv_lib_$ac_lib_var=no"
7434 LIBS="$ac_save_LIBS"
7437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7438 echo "$ac_t""yes" 1>&6
7439 cat >> confdefs.h <<\EOF
7440 #define HAVE_GLBINDTEXTURE 1
7444 echo "$ac_t""no" 1>&6
7448 CPPFLAGS="$ac_save_CPPFLAGS"
7449 LDFLAGS="$ac_save_LDFLAGS"
7450 # LIBS="$ac_save_LIBS"
7454 # Check whether the `xscreensaver' executable should link against GL.
7455 # See comments in utils/visual-gl.c for why this is sometimes necessary.
7457 echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6
7458 echo "configure:7470: checking whether drastic GL measures must be taken" >&5
7461 echo "$ac_t""yes -- hello, SGI." 1>&6
7462 cat >> confdefs.h <<\EOF
7463 #define DAEMON_USE_GL 1
7466 SAVER_GL_SRCS='$(UTILS_SRC)/visual-gl.c'
7467 SAVER_GL_OBJS='$(UTILS_BIN)/visual-gl.o'
7468 SAVER_GL_LIBS="$GL_LIBS"
7471 echo "$ac_t""no -- non-SGI." 1>&6
7480 elif test "$with_gl" != no; then
7481 echo "error: must be yes or no: --with-gl=$with_gl"
7486 ###############################################################################
7490 ###############################################################################
7493 with_gle_req=unspecified
7494 # Check whether --with-gle or --without-gle was given.
7495 if test "${with_gle+set}" = set; then
7497 with_gle="$withval"; with_gle_req="$withval"
7509 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7510 echo "configure:7522: checking for GLE headers" >&5
7513 X_CFLAGS="-I$d $X_CFLAGS"
7514 echo "$ac_t""$d" 1>&6
7516 echo "$ac_t""not found ($d: no such directory)" 1>&6
7519 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7520 echo "configure:7532: checking for GLE libs" >&5
7523 X_LIBS="-L$d $X_LIBS"
7524 echo "$ac_t""$d" 1>&6
7526 echo "$ac_t""not found ($d: no such directory)" 1>&6
7529 # replace the directory string with "yes".
7531 with_gle=$with_gle_req
7536 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7537 echo " If it is a directory, then \`DIR/include' will be added to"
7538 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7546 if test "$with_gle" = yes; then
7549 ac_save_CPPFLAGS="$CPPFLAGS"
7550 if test \! -z "$includedir" ; then
7551 CPPFLAGS="$CPPFLAGS -I$includedir"
7553 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7554 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7555 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7556 echo "configure:7568: checking for GL/gutil.h" >&5
7557 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7558 echo $ac_n "(cached) $ac_c" 1>&6
7560 cat > conftest.$ac_ext <<EOF
7561 #line 7573 "configure"
7562 #include "confdefs.h"
7563 #include <GL/gutil.h>
7565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7566 { (eval echo configure:7578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7568 if test -z "$ac_err"; then
7570 eval "ac_cv_header_$ac_safe=yes"
7573 echo "configure: failed program was:" >&5
7574 cat conftest.$ac_ext >&5
7576 eval "ac_cv_header_$ac_safe=no"
7580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7581 echo "$ac_t""yes" 1>&6
7584 echo "$ac_t""no" 1>&6
7587 CPPFLAGS="$ac_save_CPPFLAGS"
7588 if test "$have_gle" = yes ; then
7590 ac_save_CPPFLAGS="$CPPFLAGS"
7591 if test \! -z "$includedir" ; then
7592 CPPFLAGS="$CPPFLAGS -I$includedir"
7594 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7595 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
7596 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
7597 echo "configure:7609: checking for GL/tube.h" >&5
7598 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7599 echo $ac_n "(cached) $ac_c" 1>&6
7601 cat > conftest.$ac_ext <<EOF
7602 #line 7614 "configure"
7603 #include "confdefs.h"
7604 #include <GL/tube.h>
7606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7607 { (eval echo configure:7619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7609 if test -z "$ac_err"; then
7611 eval "ac_cv_header_$ac_safe=yes"
7614 echo "configure: failed program was:" >&5
7615 cat conftest.$ac_ext >&5
7617 eval "ac_cv_header_$ac_safe=no"
7621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7622 echo "$ac_t""yes" 1>&6
7625 echo "$ac_t""no" 1>&6
7628 CPPFLAGS="$ac_save_CPPFLAGS"
7631 # /usr/local/lib/GL/libgle.a
7632 # /usr/local/lib/GL/libmatrix.a
7634 if test "$have_gle" = yes ; then
7637 ac_save_CPPFLAGS="$CPPFLAGS"
7638 ac_save_LDFLAGS="$LDFLAGS"
7639 # ac_save_LIBS="$LIBS"
7641 if test \! -z "$includedir" ; then
7642 CPPFLAGS="$CPPFLAGS -I$includedir"
7644 # note: $X_CFLAGS includes $x_includes
7645 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7647 if test \! -z "$libdir" ; then
7648 LDFLAGS="$LDFLAGS -L$libdir"
7650 # note: $X_LIBS includes $x_libraries
7651 LDFLAGS="$LDFLAGS $X_LIBS"
7653 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
7654 echo "configure:7666: checking for gleCreateGC in -lgle" >&5
7655 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
7656 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7657 echo $ac_n "(cached) $ac_c" 1>&6
7659 ac_save_LIBS="$LIBS"
7660 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7661 cat > conftest.$ac_ext <<EOF
7662 #line 7674 "configure"
7663 #include "confdefs.h"
7664 /* Override any gcc2 internal prototype to avoid an error. */
7665 /* We use char because int might match the return type of a gcc2
7666 builtin and then its argument prototype would still apply. */
7673 if { (eval echo configure:7685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7675 eval "ac_cv_lib_$ac_lib_var=yes"
7677 echo "configure: failed program was:" >&5
7678 cat conftest.$ac_ext >&5
7680 eval "ac_cv_lib_$ac_lib_var=no"
7683 LIBS="$ac_save_LIBS"
7686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7687 echo "$ac_t""yes" 1>&6
7688 have_gle=yes; GLE_LIBS="-lgle"
7690 echo "$ac_t""no" 1>&6
7693 CPPFLAGS="$ac_save_CPPFLAGS"
7694 LDFLAGS="$ac_save_LDFLAGS"
7695 # LIBS="$ac_save_LIBS"
7698 if test "$have_gle" = yes ; then
7701 ac_save_CPPFLAGS="$CPPFLAGS"
7702 ac_save_LDFLAGS="$LDFLAGS"
7703 # ac_save_LIBS="$LIBS"
7705 if test \! -z "$includedir" ; then
7706 CPPFLAGS="$CPPFLAGS -I$includedir"
7708 # note: $X_CFLAGS includes $x_includes
7709 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7711 if test \! -z "$libdir" ; then
7712 LDFLAGS="$LDFLAGS -L$libdir"
7714 # note: $X_LIBS includes $x_libraries
7715 LDFLAGS="$LDFLAGS $X_LIBS"
7717 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
7718 echo "configure:7730: checking for uview_direction_d in -lmatrix" >&5
7719 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
7720 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7721 echo $ac_n "(cached) $ac_c" 1>&6
7723 ac_save_LIBS="$LIBS"
7724 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
7725 cat > conftest.$ac_ext <<EOF
7726 #line 7738 "configure"
7727 #include "confdefs.h"
7728 /* Override any gcc2 internal prototype to avoid an error. */
7729 /* We use char because int might match the return type of a gcc2
7730 builtin and then its argument prototype would still apply. */
7731 char uview_direction_d();
7737 if { (eval echo configure:7749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7739 eval "ac_cv_lib_$ac_lib_var=yes"
7741 echo "configure: failed program was:" >&5
7742 cat conftest.$ac_ext >&5
7744 eval "ac_cv_lib_$ac_lib_var=no"
7747 LIBS="$ac_save_LIBS"
7750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7751 echo "$ac_t""yes" 1>&6
7752 have_gle=yes; GLE_LIBS="$GLE_LIBS -lmatrix"
7754 echo "$ac_t""no" 1>&6
7757 CPPFLAGS="$ac_save_CPPFLAGS"
7758 LDFLAGS="$ac_save_LDFLAGS"
7759 # LIBS="$ac_save_LIBS"
7763 if test "$have_gle" = yes ; then
7764 cat >> confdefs.h <<\EOF
7770 elif test "$with_gle" != no; then
7771 echo "error: must be yes or no: --with-gle=$with_gle"
7778 ###############################################################################
7782 ###############################################################################
7785 with_xpm_req=unspecified
7786 # Check whether --with-xpm or --without-xpm was given.
7787 if test "${with_xpm+set}" = set; then
7789 with_xpm="$withval"; with_xpm_req="$withval"
7801 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
7802 echo "configure:7814: checking for XPM headers" >&5
7805 X_CFLAGS="-I$d $X_CFLAGS"
7806 echo "$ac_t""$d" 1>&6
7808 echo "$ac_t""not found ($d: no such directory)" 1>&6
7811 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
7812 echo "configure:7824: checking for XPM libs" >&5
7815 X_LIBS="-L$d $X_LIBS"
7816 echo "$ac_t""$d" 1>&6
7818 echo "$ac_t""not found ($d: no such directory)" 1>&6
7821 # replace the directory string with "yes".
7823 with_xpm=$with_xpm_req
7828 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
7829 echo " If it is a directory, then \`DIR/include' will be added to"
7830 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7836 if test "$with_xpm" = yes; then
7838 ac_save_CPPFLAGS="$CPPFLAGS"
7839 if test \! -z "$includedir" ; then
7840 CPPFLAGS="$CPPFLAGS -I$includedir"
7842 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7843 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
7844 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
7845 echo "configure:7857: checking for X11/xpm.h" >&5
7846 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7847 echo $ac_n "(cached) $ac_c" 1>&6
7849 cat > conftest.$ac_ext <<EOF
7850 #line 7862 "configure"
7851 #include "confdefs.h"
7852 #include <X11/xpm.h>
7854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7855 { (eval echo configure:7867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7857 if test -z "$ac_err"; then
7859 eval "ac_cv_header_$ac_safe=yes"
7862 echo "configure: failed program was:" >&5
7863 cat conftest.$ac_ext >&5
7865 eval "ac_cv_header_$ac_safe=no"
7869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7870 echo "$ac_t""yes" 1>&6
7872 cat >> confdefs.h <<\EOF
7878 echo "$ac_t""no" 1>&6
7881 CPPFLAGS="$ac_save_CPPFLAGS"
7882 elif test "$with_xpm" != no; then
7883 echo "error: must be yes or no: --with-xpm=$with_xpm"
7887 # See comment near $motif_requires_xpm, above.
7888 # Need to do this here, after both Motif and XPM have been checked for.
7890 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
7891 if test "$motif_requires_xpm" = yes ; then
7892 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
7897 ###############################################################################
7899 # Check for the XSHM server extension.
7901 ###############################################################################
7904 with_xshm_req=unspecified
7905 # Check whether --with-xshm-ext or --without-xshm-ext was given.
7906 if test "${with_xshm_ext+set}" = set; then
7907 withval="$with_xshm_ext"
7908 with_xshm="$withval"; with_xshm_req="$withval"
7915 case "$with_xshm" in
7920 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
7921 echo "configure:7933: checking for XSHM headers" >&5
7922 d=$with_xshm/include
7924 X_CFLAGS="-I$d $X_CFLAGS"
7925 echo "$ac_t""$d" 1>&6
7927 echo "$ac_t""not found ($d: no such directory)" 1>&6
7930 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
7931 echo "configure:7943: checking for XSHM libs" >&5
7934 X_LIBS="-L$d $X_LIBS"
7935 echo "$ac_t""$d" 1>&6
7937 echo "$ac_t""not found ($d: no such directory)" 1>&6
7940 # replace the directory string with "yes".
7942 with_xshm=$with_xshm_req
7947 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
7948 echo " If it is a directory, then \`DIR/include' will be added to"
7949 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7955 if test "$with_xshm" = yes; then
7957 # first check for Xshm.h.
7959 ac_save_CPPFLAGS="$CPPFLAGS"
7960 if test \! -z "$includedir" ; then
7961 CPPFLAGS="$CPPFLAGS -I$includedir"
7963 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7964 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
7965 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
7966 echo "configure:7978: checking for X11/extensions/XShm.h" >&5
7967 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7968 echo $ac_n "(cached) $ac_c" 1>&6
7970 cat > conftest.$ac_ext <<EOF
7971 #line 7983 "configure"
7972 #include "confdefs.h"
7973 #include <X11/extensions/XShm.h>
7975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7976 { (eval echo configure:7988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7978 if test -z "$ac_err"; then
7980 eval "ac_cv_header_$ac_safe=yes"
7983 echo "configure: failed program was:" >&5
7984 cat conftest.$ac_ext >&5
7986 eval "ac_cv_header_$ac_safe=no"
7990 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7991 echo "$ac_t""yes" 1>&6
7994 echo "$ac_t""no" 1>&6
7997 CPPFLAGS="$ac_save_CPPFLAGS"
7999 # if that succeeded, then check for sys/ipc.h.
8000 if test "$have_xshm" = yes; then
8003 ac_save_CPPFLAGS="$CPPFLAGS"
8004 if test \! -z "$includedir" ; then
8005 CPPFLAGS="$CPPFLAGS -I$includedir"
8007 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8008 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
8009 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
8010 echo "configure:8022: checking for sys/ipc.h" >&5
8011 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8012 echo $ac_n "(cached) $ac_c" 1>&6
8014 cat > conftest.$ac_ext <<EOF
8015 #line 8027 "configure"
8016 #include "confdefs.h"
8017 #include <sys/ipc.h>
8019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8020 { (eval echo configure:8032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8022 if test -z "$ac_err"; then
8024 eval "ac_cv_header_$ac_safe=yes"
8027 echo "configure: failed program was:" >&5
8028 cat conftest.$ac_ext >&5
8030 eval "ac_cv_header_$ac_safe=no"
8034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8035 echo "$ac_t""yes" 1>&6
8038 echo "$ac_t""no" 1>&6
8041 CPPFLAGS="$ac_save_CPPFLAGS"
8044 # if that succeeded, then check for sys/shm.h.
8045 if test "$have_xshm" = yes; then
8048 ac_save_CPPFLAGS="$CPPFLAGS"
8049 if test \! -z "$includedir" ; then
8050 CPPFLAGS="$CPPFLAGS -I$includedir"
8052 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8053 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
8054 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
8055 echo "configure:8067: checking for sys/shm.h" >&5
8056 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8057 echo $ac_n "(cached) $ac_c" 1>&6
8059 cat > conftest.$ac_ext <<EOF
8060 #line 8072 "configure"
8061 #include "confdefs.h"
8062 #include <sys/shm.h>
8064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8065 { (eval echo configure:8077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8067 if test -z "$ac_err"; then
8069 eval "ac_cv_header_$ac_safe=yes"
8072 echo "configure: failed program was:" >&5
8073 cat conftest.$ac_ext >&5
8075 eval "ac_cv_header_$ac_safe=no"
8079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8080 echo "$ac_t""yes" 1>&6
8083 echo "$ac_t""no" 1>&6
8086 CPPFLAGS="$ac_save_CPPFLAGS"
8089 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
8090 # to exist, but the library code to not exist. And even better, the library
8091 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
8092 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
8093 # that's not quite right, but close enough.)
8099 ac_save_CPPFLAGS="$CPPFLAGS"
8100 ac_save_LDFLAGS="$LDFLAGS"
8101 # ac_save_LIBS="$LIBS"
8103 if test \! -z "$includedir" ; then
8104 CPPFLAGS="$CPPFLAGS -I$includedir"
8106 # note: $X_CFLAGS includes $x_includes
8107 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8109 if test \! -z "$libdir" ; then
8110 LDFLAGS="$LDFLAGS -L$libdir"
8112 # note: $X_LIBS includes $x_libraries
8113 LDFLAGS="$LDFLAGS $X_LIBS"
8115 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
8116 echo "configure:8128: checking for XShmQueryExtension in -lXextSam" >&5
8117 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
8118 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8119 echo $ac_n "(cached) $ac_c" 1>&6
8121 ac_save_LIBS="$LIBS"
8122 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
8123 cat > conftest.$ac_ext <<EOF
8124 #line 8136 "configure"
8125 #include "confdefs.h"
8126 /* Override any gcc2 internal prototype to avoid an error. */
8127 /* We use char because int might match the return type of a gcc2
8128 builtin and then its argument prototype would still apply. */
8129 char XShmQueryExtension();
8132 XShmQueryExtension()
8135 if { (eval echo configure:8147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8137 eval "ac_cv_lib_$ac_lib_var=yes"
8139 echo "configure: failed program was:" >&5
8140 cat conftest.$ac_ext >&5
8142 eval "ac_cv_lib_$ac_lib_var=no"
8145 LIBS="$ac_save_LIBS"
8148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8149 echo "$ac_t""yes" 1>&6
8150 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
8152 echo "$ac_t""no" 1>&6
8156 CPPFLAGS="$ac_save_CPPFLAGS"
8157 LDFLAGS="$ac_save_LDFLAGS"
8158 # LIBS="$ac_save_LIBS"
8163 # if that succeeded, then we've really got it.
8164 if test "$have_xshm" = yes; then
8165 cat >> confdefs.h <<\EOF
8166 #define HAVE_XSHM_EXTENSION 1
8171 elif test "$with_xshm" != no; then
8172 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
8177 ###############################################################################
8179 # Check for the DOUBLE-BUFFER server extension.
8181 ###############################################################################
8184 with_xdbe_req=unspecified
8185 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
8186 if test "${with_xdbe_ext+set}" = set; then
8187 withval="$with_xdbe_ext"
8188 with_xdbe="$withval"; with_xdbe_req="$withval"
8195 case "$with_xdbe" in
8200 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
8201 echo "configure:8213: checking for DOUBLE-BUFFER headers" >&5
8202 d=$with_xdbe/include
8204 X_CFLAGS="-I$d $X_CFLAGS"
8205 echo "$ac_t""$d" 1>&6
8207 echo "$ac_t""not found ($d: no such directory)" 1>&6
8210 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
8211 echo "configure:8223: checking for DOUBLE-BUFFER libs" >&5
8214 X_LIBS="-L$d $X_LIBS"
8215 echo "$ac_t""$d" 1>&6
8217 echo "$ac_t""not found ($d: no such directory)" 1>&6
8220 # replace the directory string with "yes".
8222 with_xdbe=$with_xdbe_req
8227 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
8228 echo " If it is a directory, then \`DIR/include' will be added to"
8229 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8235 if test "$with_xdbe" = yes; then
8238 ac_save_CPPFLAGS="$CPPFLAGS"
8239 if test \! -z "$includedir" ; then
8240 CPPFLAGS="$CPPFLAGS -I$includedir"
8242 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8243 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8244 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8245 echo "configure:8257: checking for X11/extensions/Xdbe.h" >&5
8246 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8247 echo $ac_n "(cached) $ac_c" 1>&6
8249 cat > conftest.$ac_ext <<EOF
8250 #line 8262 "configure"
8251 #include "confdefs.h"
8252 #include <X11/extensions/Xdbe.h>
8254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8255 { (eval echo configure:8267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8257 if test -z "$ac_err"; then
8259 eval "ac_cv_header_$ac_safe=yes"
8262 echo "configure: failed program was:" >&5
8263 cat conftest.$ac_ext >&5
8265 eval "ac_cv_header_$ac_safe=no"
8269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8270 echo "$ac_t""yes" 1>&6
8273 echo "$ac_t""no" 1>&6
8276 CPPFLAGS="$ac_save_CPPFLAGS"
8277 if test "$have_xdbe" = yes; then
8278 cat >> confdefs.h <<\EOF
8279 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8284 elif test "$with_xdbe" != no; then
8285 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8290 ###############################################################################
8292 # Check for the SGI XReadDisplay server extension.
8294 # Note: this has to be down here, rather than up with the other server
8295 # extension tests, so that the output of `configure --help' is in the
8296 # right order. Arrgh!
8298 ###############################################################################
8301 with_readdisplay_req=unspecified
8302 # Check whether --with-readdisplay or --without-readdisplay was given.
8303 if test "${with_readdisplay+set}" = set; then
8304 withval="$with_readdisplay"
8305 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8307 with_readdisplay=yes
8312 case "$with_readdisplay" in
8317 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8318 echo "configure:8330: checking for XReadDisplay headers" >&5
8319 d=$with_readdisplay/include
8321 X_CFLAGS="-I$d $X_CFLAGS"
8322 echo "$ac_t""$d" 1>&6
8324 echo "$ac_t""not found ($d: no such directory)" 1>&6
8327 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8328 echo "configure:8340: checking for XReadDisplay libs" >&5
8329 d=$with_readdisplay/lib
8331 X_LIBS="-L$d $X_LIBS"
8332 echo "$ac_t""$d" 1>&6
8334 echo "$ac_t""not found ($d: no such directory)" 1>&6
8337 # replace the directory string with "yes".
8338 with_readdisplay_req="yes"
8339 with_readdisplay=$with_readdisplay_req
8344 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8345 echo " If it is a directory, then \`DIR/include' will be added to"
8346 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8352 if test "$with_readdisplay" = yes; then
8354 ac_save_CPPFLAGS="$CPPFLAGS"
8355 if test \! -z "$includedir" ; then
8356 CPPFLAGS="$CPPFLAGS -I$includedir"
8358 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8359 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8360 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8361 echo "configure:8373: checking for X11/extensions/readdisplay.h" >&5
8362 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8363 echo $ac_n "(cached) $ac_c" 1>&6
8365 cat > conftest.$ac_ext <<EOF
8366 #line 8378 "configure"
8367 #include "confdefs.h"
8368 #include <X11/extensions/readdisplay.h>
8370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8371 { (eval echo configure:8383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8373 if test -z "$ac_err"; then
8375 eval "ac_cv_header_$ac_safe=yes"
8378 echo "configure: failed program was:" >&5
8379 cat conftest.$ac_ext >&5
8381 eval "ac_cv_header_$ac_safe=no"
8385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8386 echo "$ac_t""yes" 1>&6
8387 cat >> confdefs.h <<\EOF
8388 #define HAVE_READ_DISPLAY_EXTENSION 1
8392 echo "$ac_t""no" 1>&6
8395 CPPFLAGS="$ac_save_CPPFLAGS"
8396 elif test "$with_readdisplay" != no; then
8397 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8402 ###############################################################################
8404 # Check for the SGI Iris Video Library.
8406 ###############################################################################
8409 with_sgivideo_req=unspecified
8410 # Check whether --with-sgivideo or --without-sgivideo was given.
8411 if test "${with_sgivideo+set}" = set; then
8412 withval="$with_sgivideo"
8413 with_sgivideo="$withval"; with_sgivideo_req="$withval"
8420 case "$with_sgivideo" in
8425 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
8426 echo "configure:8438: checking for Iris Video headers" >&5
8427 d=$with_sgivideo/include
8429 X_CFLAGS="-I$d $X_CFLAGS"
8430 echo "$ac_t""$d" 1>&6
8432 echo "$ac_t""not found ($d: no such directory)" 1>&6
8435 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
8436 echo "configure:8448: checking for Iris Video libs" >&5
8437 d=$with_sgivideo/lib
8439 X_LIBS="-L$d $X_LIBS"
8440 echo "$ac_t""$d" 1>&6
8442 echo "$ac_t""not found ($d: no such directory)" 1>&6
8445 # replace the directory string with "yes".
8446 with_sgivideo_req="yes"
8447 with_sgivideo=$with_sgivideo_req
8452 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8453 echo " If it is a directory, then \`DIR/include' will be added to"
8454 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8460 if test "$with_sgivideo" = yes; then
8462 ac_save_CPPFLAGS="$CPPFLAGS"
8463 if test \! -z "$includedir" ; then
8464 CPPFLAGS="$CPPFLAGS -I$includedir"
8466 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8467 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8468 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8469 echo "configure:8481: checking for dmedia/vl.h" >&5
8470 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8471 echo $ac_n "(cached) $ac_c" 1>&6
8473 cat > conftest.$ac_ext <<EOF
8474 #line 8486 "configure"
8475 #include "confdefs.h"
8476 #include <dmedia/vl.h>
8478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8479 { (eval echo configure:8491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8481 if test -z "$ac_err"; then
8483 eval "ac_cv_header_$ac_safe=yes"
8486 echo "configure: failed program was:" >&5
8487 cat conftest.$ac_ext >&5
8489 eval "ac_cv_header_$ac_safe=no"
8493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8494 echo "$ac_t""yes" 1>&6
8497 echo "$ac_t""no" 1>&6
8500 CPPFLAGS="$ac_save_CPPFLAGS"
8501 if test "$have_sgivideo" = yes; then
8503 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8504 echo "configure:8516: checking for vlOpenVideo in -lvl" >&5
8505 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8506 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8507 echo $ac_n "(cached) $ac_c" 1>&6
8509 ac_save_LIBS="$LIBS"
8511 cat > conftest.$ac_ext <<EOF
8512 #line 8524 "configure"
8513 #include "confdefs.h"
8514 /* Override any gcc2 internal prototype to avoid an error. */
8515 /* We use char because int might match the return type of a gcc2
8516 builtin and then its argument prototype would still apply. */
8523 if { (eval echo configure:8535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8525 eval "ac_cv_lib_$ac_lib_var=yes"
8527 echo "configure: failed program was:" >&5
8528 cat conftest.$ac_ext >&5
8530 eval "ac_cv_lib_$ac_lib_var=no"
8533 LIBS="$ac_save_LIBS"
8536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8537 echo "$ac_t""yes" 1>&6
8540 echo "$ac_t""no" 1>&6
8543 if test "$have_sgivideo" = yes; then
8544 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8545 SGI_VIDEO_LIBS="-lvl"
8546 cat >> confdefs.h <<\EOF
8547 #define HAVE_SGI_VIDEO 1
8552 elif test "$with_sgivideo" != no; then
8553 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8558 ###############################################################################
8560 # Check for a program to generate random text.
8562 # Zippy is funnier than the idiocy generally spat out by `fortune',
8563 # so try to find that, by invoking Emacs and asking it where its
8564 # libexec directory is ("yow" lives in there.)
8566 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8567 # and if so, use them.
8569 # If that doesn't work, look in /usr/games, and if it's there, use
8570 # the full pathname.
8572 ###############################################################################
8575 # Check whether --with-zippy or --without-zippy was given.
8576 if test "${with_zippy+set}" = set; then
8577 withval="$with_zippy"
8578 with_zippy_req="$withval"; with_zippy="$withval"
8584 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8589 if test -n "$with_zippy_req" ; then
8590 ac_cv_zippy_program=""
8591 case "$with_zippy_req" in
8593 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8594 echo "configure:8606: checking for $with_zippy_req" >&5
8595 if test -x "$with_zippy_req" ; then
8596 echo "$ac_t""yes" 1>&6
8598 echo "$ac_t""no" 1>&6
8604 unset ac_cv_path_zip2
8605 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8606 set dummy $with_zippy_req; ac_word=$2
8607 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8608 echo "configure:8620: checking for $ac_word" >&5
8609 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8610 echo $ac_n "(cached) $ac_c" 1>&6
8614 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8617 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8620 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8622 for ac_dir in $ac_dummy; do
8623 test -z "$ac_dir" && ac_dir=.
8624 if test -f $ac_dir/$ac_word; then
8625 ac_cv_path_zip2="$ac_dir/$ac_word"
8633 zip2="$ac_cv_path_zip2"
8634 if test -n "$zip2"; then
8635 echo "$ac_t""$zip2" 1>&6
8637 echo "$ac_t""no" 1>&6
8640 if test "$zip2" = ""; then
8645 ac_cv_zippy_program="$with_zippy"
8647 elif test -n "$ac_cv_zippy_program"; then
8648 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8651 if test ! -n "$ac_cv_zippy_program"; then
8653 for ac_prog in emacs
8655 # Extract the first word of "$ac_prog", so it can be a program name with args.
8656 set dummy $ac_prog; ac_word=$2
8657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8658 echo "configure:8670: checking for $ac_word" >&5
8659 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8660 echo $ac_n "(cached) $ac_c" 1>&6
8662 if test -n "$emacs_exe"; then
8663 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8665 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8667 for ac_dir in $ac_dummy; do
8668 test -z "$ac_dir" && ac_dir=.
8669 if test -f $ac_dir/$ac_word; then
8670 ac_cv_prog_emacs_exe="$ac_prog"
8677 emacs_exe="$ac_cv_prog_emacs_exe"
8678 if test -n "$emacs_exe"; then
8679 echo "$ac_t""$emacs_exe" 1>&6
8681 echo "$ac_t""no" 1>&6
8684 test -n "$emacs_exe" && break
8687 for ac_prog in xemacs
8689 # Extract the first word of "$ac_prog", so it can be a program name with args.
8690 set dummy $ac_prog; ac_word=$2
8691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8692 echo "configure:8704: checking for $ac_word" >&5
8693 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
8694 echo $ac_n "(cached) $ac_c" 1>&6
8696 if test -n "$xemacs_exe"; then
8697 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
8699 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8701 for ac_dir in $ac_dummy; do
8702 test -z "$ac_dir" && ac_dir=.
8703 if test -f $ac_dir/$ac_word; then
8704 ac_cv_prog_xemacs_exe="$ac_prog"
8711 xemacs_exe="$ac_cv_prog_xemacs_exe"
8712 if test -n "$xemacs_exe"; then
8713 echo "$ac_t""$xemacs_exe" 1>&6
8715 echo "$ac_t""no" 1>&6
8718 test -n "$xemacs_exe" && break
8722 ac_cv_zippy_program=""
8723 eargs='-batch -q -nw --eval'
8725 if test -n "$emacs_exe" ; then
8726 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
8727 echo "configure:8739: checking for emacs yow" >&5
8729 # get emacs to tell us where the libexec directory is.
8731 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8732 2>/dev/null | tail -1`
8733 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8735 # try running libexec/yow and see if it exits without error.
8737 if test x"$dir" != x -a -x "$dir/yow" ; then
8738 if $dir/yow >&- 2>&- ; then
8739 ac_cv_zippy_program="$dir/yow"
8740 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8742 echo "$ac_t""no" 1>&6
8747 if test -z "$ac_cv_zippy_program" ; then
8748 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
8749 echo "configure:8761: checking for xemacs yow" >&5
8750 if test -n "$xemacs_exe" ; then
8752 # get xemacs to tell us where the libexec directory is.
8754 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8755 2>/dev/null | tail -1`
8756 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8758 # try running libexec/yow and see if it exits without error.
8760 if test x"$dir" != x -a -x "$dir/yow" ; then
8761 if $dir/yow >&- 2>&- ; then
8762 ac_cv_zippy_program="$dir/yow"
8763 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8766 # in some xemacs installations, the pathname of the yow.lines file
8767 # isn't hardcoded into the yow executable, and must be passed on
8768 # the command line. See if it's in libexec/../etc/.
8772 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
8775 yowlines="$dir_up/etc/yow.lines"
8776 if $dir/yow -f $yowlines >&- 2>&- ; then
8777 ac_cv_zippy_program="$dir/yow -f $yowlines"
8778 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8781 # In newer XEmacs releases, yow.lines is in a different place,
8782 # and the easiest way to get it is by calling the new function
8783 # `locate-data-file'.
8785 yowlines=`$xemacs_exe $eargs \
8786 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
8787 2>/dev/null | tail -1`
8788 if $dir/yow -f $yowlines >&- 2>&- ; then
8789 ac_cv_zippy_program="$dir/yow -f $yowlines"
8790 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8792 echo "$ac_t""no" 1>&6
8800 # if that didn't work, try for some other programs...
8801 if test -z "$ac_cv_zippy_program" ; then
8803 for ac_prog in fortune zippy yow
8805 # Extract the first word of "$ac_prog", so it can be a program name with args.
8806 set dummy $ac_prog; ac_word=$2
8807 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8808 echo "configure:8820: checking for $ac_word" >&5
8809 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
8810 echo $ac_n "(cached) $ac_c" 1>&6
8812 if test -n "$fortune"; then
8813 ac_cv_prog_fortune="$fortune" # Let the user override the test.
8815 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8817 for ac_dir in $ac_dummy; do
8818 test -z "$ac_dir" && ac_dir=.
8819 if test -f $ac_dir/$ac_word; then
8820 ac_cv_prog_fortune="$ac_prog"
8827 fortune="$ac_cv_prog_fortune"
8828 if test -n "$fortune"; then
8829 echo "$ac_t""$fortune" 1>&6
8831 echo "$ac_t""no" 1>&6
8834 test -n "$fortune" && break
8837 # if that didn't work, try for those programs in /usr/games...
8838 if test -z "$fortune" ; then
8839 for ac_prog in fortune zippy yow
8841 # Extract the first word of "$ac_prog", so it can be a program name with args.
8842 set dummy $ac_prog; ac_word=$2
8843 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8844 echo "configure:8856: checking for $ac_word" >&5
8845 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
8846 echo $ac_n "(cached) $ac_c" 1>&6
8850 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
8853 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
8856 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8857 ac_dummy="/usr/games:/usr/local/games:$PATH"
8858 for ac_dir in $ac_dummy; do
8859 test -z "$ac_dir" && ac_dir=.
8860 if test -f $ac_dir/$ac_word; then
8861 ac_cv_path_fortune="$ac_dir/$ac_word"
8869 fortune="$ac_cv_path_fortune"
8870 if test -n "$fortune"; then
8871 echo "$ac_t""$fortune" 1>&6
8873 echo "$ac_t""no" 1>&6
8876 test -n "$fortune" && break
8878 test -n "$fortune" || fortune="fortune"
8884 if test -z "$ac_cv_zippy_program" ; then
8885 ac_cv_zippy_program=fortune
8888 cat >> confdefs.h <<EOF
8889 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
8894 ###############################################################################
8896 # Done testing. Now, set up the various -I and -L variables,
8897 # and decide which GUI program to build by default.
8899 ###############################################################################
8906 if test \! -z "$includedir" ; then
8907 INCLUDES="$INCLUDES -I$includedir"
8910 if test \! -z "$libdir" ; then
8911 LDFLAGS="$LDFLAGS -L$libdir"
8916 if test "$have_athena3d" = yes; then
8917 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw3d
8918 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8920 if test "$have_athena" = yes; then
8921 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw
8922 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8924 if test "$have_gtk" = yes; then
8925 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
8926 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8928 if test "$have_motif" = yes; then
8929 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
8930 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8934 if test "$have_kerberos" = yes; then
8935 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
8936 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
8938 if test "$have_pam" = yes; then
8939 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
8940 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
8941 INSTALL_PAM="install-pam"
8943 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
8944 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
8947 if test "$enable_locking" = yes; then
8948 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
8949 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
8951 LOCK_SRCS='$(NOLOCK_SRCS_1)'
8952 LOCK_OBJS='$(NOLOCK_SRCS_1)'
8955 if test "$need_setuid" = yes; then
8957 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
8960 INSTALL_SETUID='$(INSTALL_PROGRAM)'
8964 if test "$have_gl" = yes; then
8965 GL_EXES='$(GL_EXES)'
8969 GL_KLUDGE=" -${tab} "
8972 if test "$have_gle" = yes; then
8973 GLE_EXES='$(GLE_EXES)'
8974 GLE_MEN='$(GLE_MEN)'
8975 GLE_KLUDGE="${tab} "
8977 GLE_KLUDGE=" -${tab} "
8981 ###############################################################################
8983 # Perform substitutions and write Makefiles.
8985 ###############################################################################
9025 APPDEFAULTS=$ac_x_app_defaults
9034 cat > confcache <<\EOF
9035 # This file is a shell script that caches the results of configure
9036 # tests run on this system so they can be shared between configure
9037 # scripts and configure runs. It is not useful on other systems.
9038 # If it contains results you don't want to keep, you may remove or edit it.
9040 # By default, configure uses ./config.cache as the cache file,
9041 # creating it if it does not exist already. You can give configure
9042 # the --cache-file=FILE option to use a different cache file; that is
9043 # what configure does when it calls configure scripts in
9044 # subdirectories, so they share the cache.
9045 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9046 # config.status only pays attention to the cache file if you give it the
9047 # --recheck option to rerun configure.
9050 # The following way of writing the cache mishandles newlines in values,
9051 # but we know of no workaround that is simple, portable, and efficient.
9052 # So, don't put newlines in cache variables' values.
9053 # Ultrix sh set writes to stderr and can't be redirected directly,
9054 # and sets the high bit in the cache file unless we assign to the vars.
9056 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9058 # `set' does not quote correctly, so add quotes (double-quote substitution
9059 # turns \\\\ into \\, and sed turns \\ into \).
9061 -e "s/'/'\\\\''/g" \
9062 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9065 # `set' quotes correctly as required by POSIX, so do not add quotes.
9066 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9069 if cmp -s $cache_file confcache; then
9072 if test -w $cache_file; then
9073 echo "updating cache $cache_file"
9074 cat confcache > $cache_file
9076 echo "not updating unwritable cache $cache_file"
9081 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9083 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9084 # Let make expand exec_prefix.
9085 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9087 # Any assignment to VPATH causes Sun make to only execute
9088 # the first set of double-colon rules, so remove it if not needed.
9089 # If there is a colon in the path, we need to keep it.
9090 if test "x$srcdir" = x.; then
9091 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9094 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9096 DEFS=-DHAVE_CONFIG_H
9098 # Without the "./", some shells look in PATH for config.status.
9099 : ${CONFIG_STATUS=./config.status}
9101 echo creating $CONFIG_STATUS
9102 rm -f $CONFIG_STATUS
9103 cat > $CONFIG_STATUS <<EOF
9105 # Generated automatically by configure.
9106 # Run this file to recreate the current configuration.
9107 # This directory was configured as follows,
9108 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9110 # $0 $ac_configure_args
9112 # Compiler output produced by configure, useful for debugging
9113 # configure, is in ./config.log if it exists.
9115 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9118 case "\$ac_option" in
9119 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9120 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9121 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9122 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9123 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9125 -help | --help | --hel | --he | --h)
9126 echo "\$ac_cs_usage"; exit 0 ;;
9127 *) echo "\$ac_cs_usage"; exit 1 ;;
9131 ac_given_srcdir=$srcdir
9132 ac_given_INSTALL="$INSTALL"
9134 trap 'rm -fr `echo "Makefile
9139 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9141 cat >> $CONFIG_STATUS <<EOF
9143 # Protect against being on the right side of a sed subst in config.status.
9144 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9145 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9149 s%@CFLAGS@%$CFLAGS%g
9150 s%@CPPFLAGS@%$CPPFLAGS%g
9151 s%@CXXFLAGS@%$CXXFLAGS%g
9152 s%@FFLAGS@%$FFLAGS%g
9154 s%@LDFLAGS@%$LDFLAGS%g
9156 s%@exec_prefix@%$exec_prefix%g
9157 s%@prefix@%$prefix%g
9158 s%@program_transform_name@%$program_transform_name%g
9159 s%@bindir@%$bindir%g
9160 s%@sbindir@%$sbindir%g
9161 s%@libexecdir@%$libexecdir%g
9162 s%@datadir@%$datadir%g
9163 s%@sysconfdir@%$sysconfdir%g
9164 s%@sharedstatedir@%$sharedstatedir%g
9165 s%@localstatedir@%$localstatedir%g
9166 s%@libdir@%$libdir%g
9167 s%@includedir@%$includedir%g
9168 s%@oldincludedir@%$oldincludedir%g
9169 s%@infodir@%$infodir%g
9170 s%@mandir@%$mandir%g
9172 s%@host_alias@%$host_alias%g
9173 s%@host_cpu@%$host_cpu%g
9174 s%@host_vendor@%$host_vendor%g
9175 s%@host_os@%$host_os%g
9178 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9179 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9180 s%@INSTALL_DATA@%$INSTALL_DATA%g
9181 s%@SET_MAKE@%$SET_MAKE%g
9183 s%@X_CFLAGS@%$X_CFLAGS%g
9184 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9185 s%@X_LIBS@%$X_LIBS%g
9186 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9187 s%@glib_config@%$glib_config%g
9188 s%@gtk_config@%$gtk_config%g
9190 s%@emacs_exe@%$emacs_exe%g
9191 s%@xemacs_exe@%$xemacs_exe%g
9192 s%@fortune@%$fortune%g
9193 s%@INCLUDES@%$INCLUDES%g
9194 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
9195 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
9196 s%@SAVER_LIBS@%$SAVER_LIBS%g
9197 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
9198 s%@GTK_LIBS@%$GTK_LIBS%g
9199 s%@ATHENA_LIBS@%$ATHENA_LIBS%g
9200 s%@ATHENA3D_LIBS@%$ATHENA3D_LIBS%g
9201 s%@HACK_LIBS@%$HACK_LIBS%g
9202 s%@XPM_LIBS@%$XPM_LIBS%g
9203 s%@GL_LIBS@%$GL_LIBS%g
9204 s%@GLE_LIBS@%$GLE_LIBS%g
9205 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
9206 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
9207 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
9208 s%@NEED_SETUID@%$NEED_SETUID%g
9209 s%@INSTALL_PAM@%$INSTALL_PAM%g
9210 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
9211 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
9212 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
9213 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
9214 s%@XMU_SRCS@%$XMU_SRCS%g
9215 s%@XMU_OBJS@%$XMU_OBJS%g
9216 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
9217 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
9218 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
9219 s%@LOCK_SRCS@%$LOCK_SRCS%g
9220 s%@LOCK_OBJS@%$LOCK_OBJS%g
9221 s%@GL_EXES@%$GL_EXES%g
9222 s%@GL_MEN@%$GL_MEN%g
9223 s%@GL_KLUDGE@%$GL_KLUDGE%g
9224 s%@GLE_EXES@%$GLE_EXES%g
9225 s%@GLE_MEN@%$GLE_MEN%g
9226 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
9227 s%@HACKDIR@%$HACKDIR%g
9228 s%@APPDEFAULTS@%$APPDEFAULTS%g
9229 s%@DEPEND@%$DEPEND%g
9230 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
9231 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
9236 cat >> $CONFIG_STATUS <<\EOF
9238 # Split the substitutions into bite-sized pieces for seds with
9239 # small command number limits, like on Digital OSF/1 and HP-UX.
9240 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9241 ac_file=1 # Number of current file.
9242 ac_beg=1 # First line for current file.
9243 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9246 while $ac_more_lines; do
9247 if test $ac_beg -gt 1; then
9248 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9250 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9252 if test ! -s conftest.s$ac_file; then
9254 rm -f conftest.s$ac_file
9256 if test -z "$ac_sed_cmds"; then
9257 ac_sed_cmds="sed -f conftest.s$ac_file"
9259 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9261 ac_file=`expr $ac_file + 1`
9263 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9266 if test -z "$ac_sed_cmds"; then
9271 cat >> $CONFIG_STATUS <<EOF
9273 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9278 driver/XScreenSaver.ad"}
9280 cat >> $CONFIG_STATUS <<\EOF
9281 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9282 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9284 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9285 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9286 *) ac_file_in="${ac_file}.in" ;;
9289 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9291 # Remove last slash and all that follows it. Not all systems have dirname.
9292 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9293 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9294 # The file is in a subdirectory.
9295 test ! -d "$ac_dir" && mkdir "$ac_dir"
9296 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9297 # A "../" for each directory in $ac_dir_suffix.
9298 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9300 ac_dir_suffix= ac_dots=
9303 case "$ac_given_srcdir" in
9305 if test -z "$ac_dots"; then top_srcdir=.
9306 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9307 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9309 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9310 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9313 case "$ac_given_INSTALL" in
9314 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9315 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9318 echo creating "$ac_file"
9320 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9322 *Makefile*) ac_comsub="1i\\
9323 # $configure_input" ;;
9327 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9329 s%@configure_input@%$configure_input%g
9330 s%@srcdir@%$srcdir%g
9331 s%@top_srcdir@%$top_srcdir%g
9332 s%@INSTALL@%$INSTALL%g
9333 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9337 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9338 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9340 # ac_d sets the value in "#define NAME VALUE" lines.
9341 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9342 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9345 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9346 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9347 ac_uB='\([ ]\)%\1#\2define\3'
9350 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9351 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9352 ac_eB='$%\1#\2define\3'
9356 if test "${CONFIG_HEADERS+set}" != set; then
9358 cat >> $CONFIG_STATUS <<EOF
9359 CONFIG_HEADERS="config.h"
9361 cat >> $CONFIG_STATUS <<\EOF
9363 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9364 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9366 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9367 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9368 *) ac_file_in="${ac_file}.in" ;;
9371 echo creating $ac_file
9373 rm -f conftest.frag conftest.in conftest.out
9374 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9375 cat $ac_file_inputs > conftest.in
9379 # Transform confdefs.h into a sed script conftest.vals that substitutes
9380 # the proper values into config.h.in to produce config.h. And first:
9381 # Protect against being on the right side of a sed subst in config.status.
9382 # Protect against being in an unquoted here document in config.status.
9384 cat > conftest.hdr <<\EOF
9387 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9391 sed -n -f conftest.hdr confdefs.h > conftest.vals
9394 # This sed command replaces #undef with comments. This is necessary, for
9395 # example, in the case of _POSIX_SOURCE, which is predefined and required
9396 # on some systems where configure will not decide to define it.
9397 cat >> conftest.vals <<\EOF
9398 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9401 # Break up conftest.vals because some shells have a limit on
9402 # the size of here documents, and old seds have small limits too.
9407 ac_lines=`grep -c . conftest.vals`
9408 # grep -c gives empty output for an empty file on some AIX systems.
9409 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9410 # Write a limited-size here document to conftest.frag.
9411 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9412 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9414 sed -f conftest.frag conftest.in > conftest.out
9416 mv conftest.out conftest.in
9418 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9420 mv conftest.tail conftest.vals
9424 cat >> $CONFIG_STATUS <<\EOF
9425 rm -f conftest.frag conftest.h
9426 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9427 cat conftest.in >> conftest.h
9429 if cmp -s $ac_file conftest.h 2>/dev/null; then
9430 echo "$ac_file is unchanged"
9433 # Remove last slash and all that follows it. Not all systems have dirname.
9434 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9435 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9436 # The file is in a subdirectory.
9437 test ! -d "$ac_dir" && mkdir "$ac_dir"
9440 mv conftest.h $ac_file
9445 cat >> $CONFIG_STATUS <<EOF
9448 cat >> $CONFIG_STATUS <<\EOF
9452 chmod +x $CONFIG_STATUS
9453 rm -fr confdefs* $ac_clean_files
9454 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9457 ###############################################################################
9459 # Print some warnings at the end.
9461 ###############################################################################
9463 warn_prefix_1=" Warning:"
9464 warn_prefix_2=" Note:"
9465 warn_prefix="$warn_prefix_1"
9468 warnsep=' #################################################################'
9471 if test "$warning" = no ; then
9472 echo '' ; echo "$warnsep" ; echo ''
9479 if test "$warning" = long ; then echo '' ; fi
9481 echo "$warn_prefix $@"
9488 if test "$was" != no ; then echo '' ; fi
9489 echo "$warn_prefix $@"
9498 warn_prefix="$warn_prefix_2"
9500 warn_prefix="$warn_prefix_1"
9504 warn_prefix="$warn_prefix_2"
9506 warn_prefix="$warn_prefix_1"
9510 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9511 warn 'The SGI saver extension was requested, but was not found.'
9514 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9515 warn 'The MIT saver extension was requested, but was not found.'
9518 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9519 warn 'The XIdle extension was requested, but was not found.'
9522 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9523 warn 'The XSHM extension was requested, but was not found.'
9526 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9527 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9530 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9531 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9534 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9535 warn 'The DPMS extension was requested, but was not found.'
9538 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9539 warn 'The XF86VMODE extension was requested, but was not found.'
9542 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9543 warn "Checking of /proc/interrupts was requested, but it's bogus."
9547 if test "$have_motif" = no -a "$have_gtk" = no -a "$have_athena" = no ; then
9548 warnL "None of Motif, Gtk, or Athena widgets seem to be available;"
9549 warn2 "the \`xscreensaver-demo' program requires one of these."
9551 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9552 warnL "Use of Motif was requested, but it wasn't found;"
9553 if test "$have_gtk" = yes; then
9554 warn2 "Gtk will be used instead."
9556 warn2 "Athena will be used instead."
9559 elif test "$jurassic_gtk" = yes ; then
9563 v="$ac_gtk_version_string"
9564 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9565 warnL "Use of Gtk was requested, but its version number is unknown;"
9566 elif test "$with_gtk_req" = yes ; then
9567 warnL "Use of Gtk was requested, but it is version $v;"
9569 warnL "Gtk was found on this system, but it is version $v;"
9572 if test "$have_motif" = yes; then
9578 warn2 "Gtk $pref_gtk or newer is required. $which will be used instead."
9580 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9581 warnL "Use of Gtk was requested, but it wasn't found;"
9582 if test "$have_motif" = yes; then
9583 warn2 "Motif will be used instead."
9585 warn2 "Athena will be used instead."
9588 elif test "$with_athena_req" = yes -a "$have_athena" = no ; then
9589 warnL "Use of Athena was requested, but it wasn't found;"
9590 if test "$have_gtk" = yes; then
9591 warn2 "Gtk will be used instead."
9593 warn2 "Motif will be used instead."
9598 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9600 preferred_lesstif=0.86
9602 if test "$lesstif_version" = unknown; then
9603 warnL "Unable to determine the LessTif version number!"
9604 warn2 "Make sure you are using version $preferred_lesstif or newer."
9605 warn2 "See <http://www.lesstif.org/>."
9607 elif test \! $lesstif_version -gt 82; then
9608 warnL "LessTif version $lesstif_version_string is being used."
9609 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9610 warn2 "use with XScreenSaver; it is strongly recommended"
9611 warn2 "that you upgrade to at least version $preferred_lesstif!"
9612 warn2 "See <http://www.lesstif.org/>."
9616 if test "$have_athena" = yes -a "$have_motif" = no -a "$have_gtk" = no; then
9617 warnL "Athena widgets are being used instead of Motif or Gtk."
9618 warn2 "The \`xscreensaver-demo' program looks much better"
9619 warn2 "with Motif or Gtk. Wouldn't you rather be using Motif?"
9620 warn2 "Motif is shipped by every commercial Unix vendor,"
9621 warn2 "and there is a free implementation available as"
9622 warn2 "well: see <http://www.lesstif.org/>. Gtk is shipped"
9623 warn2 "with most Linux and BSD distributions."
9627 if test "$have_xpm" = no ; then
9628 if test "$with_xpm_req" = yes ; then
9629 warnL 'Use of XPM was requested, but it was not found.'
9630 elif test "$with_xpm_req" = no ; then
9631 noteL 'The XPM library is not being used.'
9633 noteL 'The XPM library was not found.'
9637 warn2 'Some of the demos will not be as colorful as they'
9638 warn2 'could be. You might want to consider installing XPM'
9639 warn2 'and re-running configure. (Remember to delete the'
9640 warn2 'config.cache file first.) You can find XPM at most'
9641 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9645 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9646 preferred_mesagl=3.0
9648 if test "$ac_mesagl_version" = unknown; then
9649 warnL "Unable to determine the MesaGL version number!"
9650 warn2 "Make sure you are using version $preferred_mesagl or newer."
9652 elif test \! "$ac_mesagl_version" -gt 2006; then
9653 warnL "MesaGL version $ac_mesagl_version_string is being used."
9654 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9655 warn2 "It is strongly recommended that you upgrade to at"
9656 warn2 "least version $preferred_mesagl."
9661 if test "$have_gl" = no ; then
9662 if test "$with_gl_req" = yes ; then
9663 warnL 'Use of GL was requested, but it was not found.'
9664 elif test "$with_gl_req" = no ; then
9665 noteL 'The OpenGL 3D library is not being used.'
9667 noteL 'The OpenGL 3D library was not found.'
9671 warn2 'Those demos which use 3D will not be built or installed.'
9672 warn2 'You might want to consider installing OpenGL and'
9673 warn2 're-running configure. (Remember to delete the'
9674 warn2 "config.cache file first.) If your vendor doesn't ship"
9675 warn2 'their own implementation of OpenGL, you can get a free'
9676 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
9677 warn2 'info, see <http://www.opengl.org/>.'
9682 if test "$have_gl" = yes -a "$have_gle" = no ; then
9683 if test "$with_gle_req" = yes ; then
9684 warnL 'Use of GLE was requested, but it was not found.'
9685 elif test "$with_gle_req" = no ; then
9686 noteL 'The GLE (GL Extrusion) library is not being used.'
9688 noteL 'The GLE (GL Extrusion) library was not found.'
9692 warn2 'Some of the OpenGL (3D) demos will not be built or installed.'
9693 warn2 'You might want to consider installing GLE and re-running'
9694 warn2 'configure. (Remember to delete the config.cache file first.)'
9695 warn2 'You can find the GLE library at <http://www.linas.org/gle/>.'
9696 warn2 'For general OpenGL info, see <http://www.opengl.org/>.'
9701 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
9702 warn 'Use of XReadDisplay was requested, but it was not found.'
9705 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
9706 warn 'Use of the Iris Video Library was requested, but it was not found.'
9709 if test -n "$with_zippy_req"; then
9710 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
9711 warnL "$with_zippy_req was requested as the Zippy program,"
9712 warn2 "but was not found. The default will be used instead."
9716 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
9717 warn 'Use of Kerberos was requested, but it was not found.'
9720 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
9721 warn 'Use of PAM was requested, but it was not found.'
9724 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
9725 warn 'Use of shadow passwords was requested, but they were not found.'
9729 # You are in a twisty maze of namespaces and syntaxes, all alike.
9730 # Fuck the skull of Unix.
9732 eval bindir=${bindir}
9733 eval bindir=${bindir}
9734 eval bindir=${bindir}
9735 eval bindir=${bindir}
9736 eval bindir=${bindir}
9737 eval bindir=${bindir}
9738 eval HACKDIR=${HACKDIR}
9739 eval HACKDIR=${HACKDIR}
9740 eval HACKDIR=${HACKDIR}
9741 eval HACKDIR=${HACKDIR}
9742 eval HACKDIR=${HACKDIR}
9743 eval HACKDIR=${HACKDIR}
9745 # canonicalize slashes.
9746 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
9747 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9750 # Sanity check the subdir
9751 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
9752 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
9754 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
9755 There will be an executable installed with that name, so
9756 that can't be the name of a directory as well. Please
9757 re-configure with a different directory name." 1>&2; exit 1; }
9764 # Now let's see if there's a previous RPM version already installed. Blargh!
9768 rpmv=`(rpm -qv xscreensaver) 2>&- | \
9769 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-[0-9][0-9]*$/\1/'`
9772 if test \! -z "$rpmv" ; then
9773 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
9774 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
9777 warnL "There is already an installed RPM of xscreensaver $rpmv"
9778 warn2 "on this system. You might want to remove it (with"
9779 warn2 '"rpm -ve xscreensaver") before running "make install"'
9780 warn2 "from this directory."
9782 warn2 "Alternately, you could build this version of xscreensaver"
9783 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
9784 warn2 "file is included. See the RPM documentation for more info."
9787 if test "$rpmbdir" = "$rpmhdir" ; then
9788 warn2 "The RPM version was installed in $rpmbdir."
9790 warn2 "The RPM version was installed in $rpmbdir,"
9791 warn2 "with demos in $rpmhdir."
9798 # Warn about egregious GNOME bogosity.
9800 if (rpm -qv control-center) >&- 2>&- ; then
9802 warnL "The Gnome Control Center seems to be installed."
9804 warn2 "Note that simply installing this version of xscreensaver"
9805 warn2 "will not cause GNOME to know about the newly-added display"
9806 warn2 "modes -- GNOME is just lame that way. Instead of using the"
9807 warn2 "Control Center, try using the \`xscreensaver-demo' command."
9811 if test "${bindir}" = "${HACKDIR}" ; then
9815 if test "$do_dir_warning" = yes; then
9819 echo ' When you run "make install", the "xscreensaver",'
9820 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
9821 echo " will be installed in ${bindir}."
9823 echo " The various graphics demos (100+ different executables) will"
9824 echo " also be installed in ${HACKDIR}."
9826 echo " If you would prefer the demos to be installed elsewhere"
9827 echo " (for example, in a dedicated directory) you should re-run"
9828 echo " configure with the --enable-subdir=DIR option. For more"
9829 echo " information, run $0 --help."
9833 if test "$warning" != no; then
9834 echo '' ; echo "$warnsep" ; echo ''