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"
1086 echo "$ac_t""Disabling C++ comments in ANSI C code." 1>&6
1087 CC="$CC -Wp,-lang-c89"
1090 *-irix5* |*-irix6.0-3* )
1091 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1092 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1095 # if test -z "$GCC"; then
1096 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1097 # CC="$CC -migrate -w0 -verbose -warnprotos"
1103 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1104 echo "configure:1116: checking how to run the C preprocessor" >&5
1105 # On Suns, sometimes $CPP names a directory.
1106 if test -n "$CPP" && test -d "$CPP"; then
1109 if test -z "$CPP"; then
1110 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1111 echo $ac_n "(cached) $ac_c" 1>&6
1113 # This must be in double quotes, not single quotes, because CPP may get
1114 # substituted into the Makefile and "${CC-cc}" will confuse make.
1116 # On the NeXT, cc -E runs the code through the compiler's parser,
1117 # not just through cpp.
1118 cat > conftest.$ac_ext <<EOF
1119 #line 1131 "configure"
1120 #include "confdefs.h"
1124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1125 { (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1127 if test -z "$ac_err"; then
1131 echo "configure: failed program was:" >&5
1132 cat conftest.$ac_ext >&5
1134 CPP="${CC-cc} -E -traditional-cpp"
1135 cat > conftest.$ac_ext <<EOF
1136 #line 1148 "configure"
1137 #include "confdefs.h"
1141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1142 { (eval echo configure:1154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1144 if test -z "$ac_err"; then
1148 echo "configure: failed program was:" >&5
1149 cat conftest.$ac_ext >&5
1151 CPP="${CC-cc} -nologo -E"
1152 cat > conftest.$ac_ext <<EOF
1153 #line 1165 "configure"
1154 #include "confdefs.h"
1158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1159 { (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1161 if test -z "$ac_err"; then
1165 echo "configure: failed program was:" >&5
1166 cat conftest.$ac_ext >&5
1175 ac_cv_prog_CPP="$CPP"
1177 CPP="$ac_cv_prog_CPP"
1179 ac_cv_prog_CPP="$CPP"
1181 echo "$ac_t""$CPP" 1>&6
1183 echo $ac_n "checking for working const""... $ac_c" 1>&6
1184 echo "configure:1196: checking for working const" >&5
1185 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1186 echo $ac_n "(cached) $ac_c" 1>&6
1188 cat > conftest.$ac_ext <<EOF
1189 #line 1201 "configure"
1190 #include "confdefs.h"
1194 /* Ultrix mips cc rejects this. */
1195 typedef int charset[2]; const charset x;
1196 /* SunOS 4.1.1 cc rejects this. */
1197 char const *const *ccp;
1199 /* NEC SVR4.0.2 mips cc rejects this. */
1200 struct point {int x, y;};
1201 static struct point const zero = {0,0};
1202 /* AIX XL C 1.02.0.0 rejects this.
1203 It does not let you subtract one const X* pointer from another in an arm
1204 of an if-expression whose if-part is not a constant expression */
1205 const char *g = "string";
1206 ccp = &g + (g ? g-g : 0);
1207 /* HPUX 7.0 cc rejects these. */
1210 ccp = (char const *const *) p;
1211 { /* SCO 3.2v4 cc rejects this. */
1213 char const *s = 0 ? (char *) 0 : (char const *) 0;
1217 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1219 const int *foo = &x[0];
1222 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1223 typedef const int *iptr;
1227 { /* AIX XL C 1.02.0.0 rejects this saying
1228 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1229 struct s { int j; const int *ap[3]; };
1230 struct s *b; b->j = 5;
1232 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1238 if { (eval echo configure:1250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1242 echo "configure: failed program was:" >&5
1243 cat conftest.$ac_ext >&5
1250 echo "$ac_t""$ac_cv_c_const" 1>&6
1251 if test $ac_cv_c_const = no; then
1252 cat >> confdefs.h <<\EOF
1258 echo $ac_n "checking for inline""... $ac_c" 1>&6
1259 echo "configure:1271: checking for inline" >&5
1260 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1261 echo $ac_n "(cached) $ac_c" 1>&6
1264 for ac_kw in inline __inline__ __inline; do
1265 cat > conftest.$ac_ext <<EOF
1266 #line 1278 "configure"
1267 #include "confdefs.h"
1273 if { (eval echo configure:1285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1275 ac_cv_c_inline=$ac_kw; break
1277 echo "configure: failed program was:" >&5
1278 cat conftest.$ac_ext >&5
1285 echo "$ac_t""$ac_cv_c_inline" 1>&6
1286 case "$ac_cv_c_inline" in
1288 no) cat >> confdefs.h <<\EOF
1292 *) cat >> confdefs.h <<EOF
1293 #define inline $ac_cv_c_inline
1299 # stuff for Makefiles
1300 # Find a good install program. We prefer a C program (faster),
1301 # so one script is as good as another. But avoid the broken or
1302 # incompatible versions:
1303 # SysV /etc/install, /usr/sbin/install
1304 # SunOS /usr/etc/install
1305 # IRIX /sbin/install
1307 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1308 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1309 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1310 # ./install, which can be erroneously created by make from ./install.sh.
1311 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1312 echo "configure:1324: checking for a BSD compatible install" >&5
1313 if test -z "$INSTALL"; then
1314 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1315 echo $ac_n "(cached) $ac_c" 1>&6
1317 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1318 for ac_dir in $PATH; do
1319 # Account for people who put trailing slashes in PATH elements.
1321 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1323 # OSF1 and SCO ODT 3.0 have their own names for install.
1324 # Don't use installbsd from OSF since it installs stuff as root
1326 for ac_prog in ginstall scoinst install; do
1327 if test -f $ac_dir/$ac_prog; then
1328 if test $ac_prog = install &&
1329 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1330 # AIX install. It has an incompatible calling convention.
1333 ac_cv_path_install="$ac_dir/$ac_prog -c"
1344 if test "${ac_cv_path_install+set}" = set; then
1345 INSTALL="$ac_cv_path_install"
1347 # As a last resort, use the slow shell script. We don't cache a
1348 # path for INSTALL within a source directory, because that will
1349 # break other packages using the cache if that directory is
1350 # removed, or if the path is relative.
1351 INSTALL="$ac_install_sh"
1354 echo "$ac_t""$INSTALL" 1>&6
1356 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1357 # It thinks the first close brace ends the variable substitution.
1358 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1360 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1362 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1364 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1365 echo "configure:1377: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1366 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1367 echo $ac_n "(cached) $ac_c" 1>&6
1369 ac_cv_install_d_creates_dirs=no
1371 if mkdir conftestdir; then
1373 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1374 if test -d dir1/dir2/. ; then
1375 ac_cv_install_d_creates_dirs=yes
1383 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1385 if test "$ac_cv_install_d_creates_dirs" = no ; then
1386 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1387 echo "configure:1399: checking whether \"mkdir -p\" creates intermediate directories" >&5
1388 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1389 echo $ac_n "(cached) $ac_c" 1>&6
1391 ac_cv_mkdir_p_creates_dirs=no
1393 if mkdir conftestdir; then
1395 mkdir -p dir1/dir2 >&- 2>&-
1396 if test -d dir1/dir2/. ; then
1397 ac_cv_mkdir_p_creates_dirs=yes
1405 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1408 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1409 INSTALL_DIRS='${INSTALL} -d'
1410 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1411 INSTALL_DIRS='mkdir -p'
1414 INSTALL_DIRS='${INSTALL} -d'
1417 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1418 echo "configure:1430: checking whether ${MAKE-make} sets \${MAKE}" >&5
1419 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1420 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1421 echo $ac_n "(cached) $ac_c" 1>&6
1423 cat > conftestmake <<\EOF
1425 @echo 'ac_maketemp="${MAKE}"'
1427 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1428 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1429 if test -n "$ac_maketemp"; then
1430 eval ac_cv_prog_make_${ac_make}_set=yes
1432 eval ac_cv_prog_make_${ac_make}_set=no
1436 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1437 echo "$ac_t""yes" 1>&6
1440 echo "$ac_t""no" 1>&6
1441 SET_MAKE="MAKE=${MAKE-make}"
1446 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1447 echo "configure:1459: checking for ANSI C header files" >&5
1448 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1449 echo $ac_n "(cached) $ac_c" 1>&6
1451 cat > conftest.$ac_ext <<EOF
1452 #line 1464 "configure"
1453 #include "confdefs.h"
1459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1460 { (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1462 if test -z "$ac_err"; then
1464 ac_cv_header_stdc=yes
1467 echo "configure: failed program was:" >&5
1468 cat conftest.$ac_ext >&5
1470 ac_cv_header_stdc=no
1474 if test $ac_cv_header_stdc = yes; then
1475 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1476 cat > conftest.$ac_ext <<EOF
1477 #line 1489 "configure"
1478 #include "confdefs.h"
1481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1482 egrep "memchr" >/dev/null 2>&1; then
1486 ac_cv_header_stdc=no
1492 if test $ac_cv_header_stdc = yes; then
1493 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1494 cat > conftest.$ac_ext <<EOF
1495 #line 1507 "configure"
1496 #include "confdefs.h"
1499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1500 egrep "free" >/dev/null 2>&1; then
1504 ac_cv_header_stdc=no
1510 if test $ac_cv_header_stdc = yes; then
1511 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1512 if test "$cross_compiling" = yes; then
1515 cat > conftest.$ac_ext <<EOF
1516 #line 1528 "configure"
1517 #include "confdefs.h"
1519 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1520 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1521 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1522 int main () { int i; for (i = 0; i < 256; i++)
1523 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1527 if { (eval echo configure:1539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1531 echo "configure: failed program was:" >&5
1532 cat conftest.$ac_ext >&5
1534 ac_cv_header_stdc=no
1542 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1543 if test $ac_cv_header_stdc = yes; then
1544 cat >> confdefs.h <<\EOF
1545 #define STDC_HEADERS 1
1550 for ac_hdr in unistd.h
1552 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1553 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1554 echo "configure:1566: checking for $ac_hdr" >&5
1555 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1556 echo $ac_n "(cached) $ac_c" 1>&6
1558 cat > conftest.$ac_ext <<EOF
1559 #line 1571 "configure"
1560 #include "confdefs.h"
1563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1564 { (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1566 if test -z "$ac_err"; then
1568 eval "ac_cv_header_$ac_safe=yes"
1571 echo "configure: failed program was:" >&5
1572 cat conftest.$ac_ext >&5
1574 eval "ac_cv_header_$ac_safe=no"
1578 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1579 echo "$ac_t""yes" 1>&6
1580 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1581 cat >> confdefs.h <<EOF
1582 #define $ac_tr_hdr 1
1586 echo "$ac_t""no" 1>&6
1590 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1591 echo "configure:1603: checking for mode_t" >&5
1592 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1593 echo $ac_n "(cached) $ac_c" 1>&6
1595 cat > conftest.$ac_ext <<EOF
1596 #line 1608 "configure"
1597 #include "confdefs.h"
1598 #include <sys/types.h>
1604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1605 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1607 ac_cv_type_mode_t=yes
1610 ac_cv_type_mode_t=no
1615 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1616 if test $ac_cv_type_mode_t = no; then
1617 cat >> confdefs.h <<\EOF
1623 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1624 echo "configure:1636: checking for pid_t" >&5
1625 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
1628 cat > conftest.$ac_ext <<EOF
1629 #line 1641 "configure"
1630 #include "confdefs.h"
1631 #include <sys/types.h>
1637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1638 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1640 ac_cv_type_pid_t=yes
1648 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1649 if test $ac_cv_type_pid_t = no; then
1650 cat >> confdefs.h <<\EOF
1656 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1657 echo "configure:1669: checking for size_t" >&5
1658 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1659 echo $ac_n "(cached) $ac_c" 1>&6
1661 cat > conftest.$ac_ext <<EOF
1662 #line 1674 "configure"
1663 #include "confdefs.h"
1664 #include <sys/types.h>
1670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1671 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1673 ac_cv_type_size_t=yes
1676 ac_cv_type_size_t=no
1681 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1682 if test $ac_cv_type_size_t = no; then
1683 cat >> confdefs.h <<\EOF
1684 #define size_t unsigned
1689 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1690 echo "configure:1702: checking return type of signal handlers" >&5
1691 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1692 echo $ac_n "(cached) $ac_c" 1>&6
1694 cat > conftest.$ac_ext <<EOF
1695 #line 1707 "configure"
1696 #include "confdefs.h"
1697 #include <sys/types.h>
1703 extern "C" void (*signal (int, void (*)(int)))(int);
1705 void (*signal ()) ();
1712 if { (eval echo configure:1724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1714 ac_cv_type_signal=void
1716 echo "configure: failed program was:" >&5
1717 cat conftest.$ac_ext >&5
1719 ac_cv_type_signal=int
1724 echo "$ac_t""$ac_cv_type_signal" 1>&6
1725 cat >> confdefs.h <<EOF
1726 #define RETSIGTYPE $ac_cv_type_signal
1730 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1731 echo "configure:1743: checking whether time.h and sys/time.h may both be included" >&5
1732 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1733 echo $ac_n "(cached) $ac_c" 1>&6
1735 cat > conftest.$ac_ext <<EOF
1736 #line 1748 "configure"
1737 #include "confdefs.h"
1738 #include <sys/types.h>
1739 #include <sys/time.h>
1745 if { (eval echo configure:1757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1747 ac_cv_header_time=yes
1749 echo "configure: failed program was:" >&5
1750 cat conftest.$ac_ext >&5
1752 ac_cv_header_time=no
1757 echo "$ac_t""$ac_cv_header_time" 1>&6
1758 if test $ac_cv_header_time = yes; then
1759 cat >> confdefs.h <<\EOF
1760 #define TIME_WITH_SYS_TIME 1
1765 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1766 echo "configure:1778: checking for sys/wait.h that is POSIX.1 compatible" >&5
1767 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1768 echo $ac_n "(cached) $ac_c" 1>&6
1770 cat > conftest.$ac_ext <<EOF
1771 #line 1783 "configure"
1772 #include "confdefs.h"
1773 #include <sys/types.h>
1774 #include <sys/wait.h>
1776 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1779 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1784 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1787 if { (eval echo configure:1799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1789 ac_cv_header_sys_wait_h=yes
1791 echo "configure: failed program was:" >&5
1792 cat conftest.$ac_ext >&5
1794 ac_cv_header_sys_wait_h=no
1799 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1800 if test $ac_cv_header_sys_wait_h = yes; then
1801 cat >> confdefs.h <<\EOF
1802 #define HAVE_SYS_WAIT_H 1
1808 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1810 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1811 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1812 echo "configure:1824: checking for $ac_hdr that defines DIR" >&5
1813 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1814 echo $ac_n "(cached) $ac_c" 1>&6
1816 cat > conftest.$ac_ext <<EOF
1817 #line 1829 "configure"
1818 #include "confdefs.h"
1819 #include <sys/types.h>
1825 if { (eval echo configure:1837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1827 eval "ac_cv_header_dirent_$ac_safe=yes"
1829 echo "configure: failed program was:" >&5
1830 cat conftest.$ac_ext >&5
1832 eval "ac_cv_header_dirent_$ac_safe=no"
1836 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1837 echo "$ac_t""yes" 1>&6
1838 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1839 cat >> confdefs.h <<EOF
1840 #define $ac_tr_hdr 1
1842 ac_header_dirent=$ac_hdr; break
1844 echo "$ac_t""no" 1>&6
1847 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1848 if test $ac_header_dirent = dirent.h; then
1849 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1850 echo "configure:1862: checking for opendir in -ldir" >&5
1851 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1853 echo $ac_n "(cached) $ac_c" 1>&6
1855 ac_save_LIBS="$LIBS"
1857 cat > conftest.$ac_ext <<EOF
1858 #line 1870 "configure"
1859 #include "confdefs.h"
1860 /* Override any gcc2 internal prototype to avoid an error. */
1861 /* We use char because int might match the return type of a gcc2
1862 builtin and then its argument prototype would still apply. */
1869 if { (eval echo configure:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1871 eval "ac_cv_lib_$ac_lib_var=yes"
1873 echo "configure: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1876 eval "ac_cv_lib_$ac_lib_var=no"
1879 LIBS="$ac_save_LIBS"
1882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1883 echo "$ac_t""yes" 1>&6
1886 echo "$ac_t""no" 1>&6
1890 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1891 echo "configure:1903: checking for opendir in -lx" >&5
1892 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1893 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1894 echo $ac_n "(cached) $ac_c" 1>&6
1896 ac_save_LIBS="$LIBS"
1898 cat > conftest.$ac_ext <<EOF
1899 #line 1911 "configure"
1900 #include "confdefs.h"
1901 /* Override any gcc2 internal prototype to avoid an error. */
1902 /* We use char because int might match the return type of a gcc2
1903 builtin and then its argument prototype would still apply. */
1910 if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1912 eval "ac_cv_lib_$ac_lib_var=yes"
1914 echo "configure: failed program was:" >&5
1915 cat conftest.$ac_ext >&5
1917 eval "ac_cv_lib_$ac_lib_var=no"
1920 LIBS="$ac_save_LIBS"
1923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1924 echo "$ac_t""yes" 1>&6
1927 echo "$ac_t""no" 1>&6
1932 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1933 echo "configure:1945: checking how to call gettimeofday" >&5
1934 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1935 echo $ac_n "(cached) $ac_c" 1>&6
1937 cat > conftest.$ac_ext <<EOF
1938 #line 1950 "configure"
1939 #include "confdefs.h"
1941 #include <sys/time.h>
1943 struct timeval tv; struct timezone tzp;
1944 gettimeofday(&tv, &tzp);
1947 if { (eval echo configure:1959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1949 ac_gettimeofday_args=2
1951 echo "configure: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
1954 cat > conftest.$ac_ext <<EOF
1955 #line 1967 "configure"
1956 #include "confdefs.h"
1958 #include <sys/time.h>
1960 struct timeval tv; gettimeofday(&tv);
1963 if { (eval echo configure:1975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1965 ac_gettimeofday_args=1
1967 echo "configure: failed program was:" >&5
1968 cat conftest.$ac_ext >&5
1970 ac_gettimeofday_args=0
1975 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1978 ac_gettimeofday_args=$ac_cv_gettimeofday_args
1979 if test "$ac_gettimeofday_args" = 1 ; then
1980 cat >> confdefs.h <<\EOF
1981 #define HAVE_GETTIMEOFDAY 1
1984 echo "$ac_t""one argument" 1>&6
1985 elif test "$ac_gettimeofday_args" = 2 ; then
1986 cat >> confdefs.h <<\EOF
1987 #define HAVE_GETTIMEOFDAY 1
1990 cat >> confdefs.h <<\EOF
1991 #define GETTIMEOFDAY_TWO_ARGS 1
1994 echo "$ac_t""two arguments" 1>&6
1996 echo "$ac_t""unknown" 1>&6
1999 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
2001 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2002 echo "configure:2014: checking for $ac_func" >&5
2003 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2004 echo $ac_n "(cached) $ac_c" 1>&6
2006 cat > conftest.$ac_ext <<EOF
2007 #line 2019 "configure"
2008 #include "confdefs.h"
2009 /* System header to define __stub macros and hopefully few prototypes,
2010 which can conflict with char $ac_func(); below. */
2012 /* Override any gcc2 internal prototype to avoid an error. */
2013 /* We use char because int might match the return type of a gcc2
2014 builtin and then its argument prototype would still apply. */
2019 /* The GNU C library defines this for functions which it implements
2020 to always fail with ENOSYS. Some functions are actually named
2021 something starting with __ and the normal name is an alias. */
2022 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2030 if { (eval echo configure:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2032 eval "ac_cv_func_$ac_func=yes"
2034 echo "configure: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2037 eval "ac_cv_func_$ac_func=no"
2042 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2043 echo "$ac_t""yes" 1>&6
2044 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2045 cat >> confdefs.h <<EOF
2046 #define $ac_tr_func 1
2050 echo "$ac_t""no" 1>&6
2055 for ac_func in sigaction syslog realpath
2057 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2058 echo "configure:2070: checking for $ac_func" >&5
2059 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2060 echo $ac_n "(cached) $ac_c" 1>&6
2062 cat > conftest.$ac_ext <<EOF
2063 #line 2075 "configure"
2064 #include "confdefs.h"
2065 /* System header to define __stub macros and hopefully few prototypes,
2066 which can conflict with char $ac_func(); below. */
2068 /* Override any gcc2 internal prototype to avoid an error. */
2069 /* We use char because int might match the return type of a gcc2
2070 builtin and then its argument prototype would still apply. */
2075 /* The GNU C library defines this for functions which it implements
2076 to always fail with ENOSYS. Some functions are actually named
2077 something starting with __ and the normal name is an alias. */
2078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2086 if { (eval echo configure:2098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2088 eval "ac_cv_func_$ac_func=yes"
2090 echo "configure: failed program was:" >&5
2091 cat conftest.$ac_ext >&5
2093 eval "ac_cv_func_$ac_func=no"
2098 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2099 echo "$ac_t""yes" 1>&6
2100 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2101 cat >> confdefs.h <<EOF
2102 #define $ac_tr_func 1
2106 echo "$ac_t""no" 1>&6
2110 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2111 echo "configure:2123: checking for struct icmp" >&5
2112 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2113 echo $ac_n "(cached) $ac_c" 1>&6
2115 cat > conftest.$ac_ext <<EOF
2116 #line 2128 "configure"
2117 #include "confdefs.h"
2125 #include <sys/types.h>
2126 #include <sys/time.h>
2127 #include <sys/ipc.h>
2128 #include <sys/shm.h>
2129 #include <sys/socket.h>
2130 #include <netinet/in_systm.h>
2131 #include <netinet/in.h>
2132 #include <netinet/ip.h>
2133 #include <netinet/ip_icmp.h>
2134 #include <netinet/udp.h>
2135 #include <arpa/inet.h>
2140 struct sockaddr_in si;
2142 i.icmp_type = ICMP_ECHO;
2147 si.sin_family = AF_INET;
2151 if { (eval echo configure:2163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2163 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2164 if test "$ac_cv_have_icmp" = yes ; then
2165 cat >> confdefs.h <<\EOF
2170 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2171 echo "configure:2183: checking for struct icmphdr" >&5
2172 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2173 echo $ac_n "(cached) $ac_c" 1>&6
2175 cat > conftest.$ac_ext <<EOF
2176 #line 2188 "configure"
2177 #include "confdefs.h"
2185 #include <sys/types.h>
2186 #include <sys/time.h>
2187 #include <sys/ipc.h>
2188 #include <sys/shm.h>
2189 #include <sys/socket.h>
2190 #include <netinet/in_systm.h>
2191 #include <netinet/in.h>
2192 #include <netinet/ip.h>
2193 #include <netinet/ip_icmp.h>
2194 #include <netinet/udp.h>
2195 #include <arpa/inet.h>
2200 struct sockaddr_in si;
2206 i.un.echo.sequence = 0;
2207 si.sin_family = AF_INET;
2211 if { (eval echo configure:2223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2213 ac_cv_have_icmphdr=yes
2215 echo "configure: failed program was:" >&5
2216 cat conftest.$ac_ext >&5
2218 ac_cv_have_icmphdr=no
2223 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2224 if test "$ac_cv_have_icmphdr" = yes ; then
2225 cat >> confdefs.h <<\EOF
2226 #define HAVE_ICMPHDR 1
2230 for ac_hdr in crypt.h sys/select.h
2232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2234 echo "configure:2246: checking for $ac_hdr" >&5
2235 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2236 echo $ac_n "(cached) $ac_c" 1>&6
2238 cat > conftest.$ac_ext <<EOF
2239 #line 2251 "configure"
2240 #include "confdefs.h"
2243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2244 { (eval echo configure:2256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2246 if test -z "$ac_err"; then
2248 eval "ac_cv_header_$ac_safe=yes"
2251 echo "configure: failed program was:" >&5
2252 cat conftest.$ac_ext >&5
2254 eval "ac_cv_header_$ac_safe=no"
2258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2259 echo "$ac_t""yes" 1>&6
2260 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2261 cat >> confdefs.h <<EOF
2262 #define $ac_tr_hdr 1
2266 echo "$ac_t""no" 1>&6
2270 for ac_prog in perl5 perl
2272 # Extract the first word of "$ac_prog", so it can be a program name with args.
2273 set dummy $ac_prog; ac_word=$2
2274 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2275 echo "configure:2287: checking for $ac_word" >&5
2276 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2277 echo $ac_n "(cached) $ac_c" 1>&6
2281 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2284 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2287 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2289 for ac_dir in $ac_dummy; do
2290 test -z "$ac_dir" && ac_dir=.
2291 if test -f $ac_dir/$ac_word; then
2292 ac_cv_path_PERL="$ac_dir/$ac_word"
2300 PERL="$ac_cv_path_PERL"
2301 if test -n "$PERL"; then
2302 echo "$ac_t""$PERL" 1>&6
2304 echo "$ac_t""no" 1>&6
2307 test -n "$PERL" && break
2310 if test -z "$PERL" ; then
2313 echo $ac_n "checking perl version""... $ac_c" 1>&6
2314 echo "configure:2326: checking perl version" >&5
2315 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2318 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2321 echo "$ac_t""$ac_cv_perl_version" 1>&6
2322 PERL_VERSION=$ac_cv_perl_version
2326 if test -z "$PERL" ; then
2327 # don't let it be blank...
2328 PERL=/usr/local/bin/perl5
2331 # If we find X, set shell vars x_includes and x_libraries to the
2332 # paths, otherwise set no_x=yes.
2333 # Uses ac_ vars as temps to allow command line to override cache and checks.
2334 # --without-x overrides everything else, but does not touch the cache.
2335 echo $ac_n "checking for X""... $ac_c" 1>&6
2336 echo "configure:2348: checking for X" >&5
2338 # Check whether --with-x or --without-x was given.
2339 if test "${with_x+set}" = set; then
2344 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2345 if test "x$with_x" = xno; then
2346 # The user explicitly disabled X.
2349 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2350 # Both variables are already set.
2353 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2354 echo $ac_n "(cached) $ac_c" 1>&6
2356 # One or both of the vars are not set, and there is no cached value.
2357 ac_x_includes=NO ac_x_libraries=NO
2359 if mkdir conftestdir; then
2361 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2362 cat > Imakefile <<'EOF'
2364 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2366 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2367 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2368 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2369 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2370 for ac_extension in a so sl; do
2371 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2372 test -f $ac_im_libdir/libX11.$ac_extension; then
2373 ac_im_usrlibdir=$ac_im_libdir; break
2376 # Screen out bogus values from the imake configuration. They are
2377 # bogus both because they are the default anyway, and because
2378 # using them would break gcc on systems where it needs fixed includes.
2379 case "$ac_im_incroot" in
2381 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2383 case "$ac_im_usrlibdir" in
2385 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2392 if test "$ac_x_includes" = NO; then
2393 # Guess where to find include files, by looking for this one X11 .h file.
2394 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2396 # First, try using that file with no special directory specified.
2397 cat > conftest.$ac_ext <<EOF
2398 #line 2410 "configure"
2399 #include "confdefs.h"
2400 #include <$x_direct_test_include>
2402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2403 { (eval echo configure:2415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2405 if test -z "$ac_err"; then
2407 # We can compile using X headers with no special include directory.
2411 echo "configure: failed program was:" >&5
2412 cat conftest.$ac_ext >&5
2414 # Look for the header file in a standard set of common directories.
2415 # Check X11 before X11Rn because it is often a symlink to the current release.
2418 /usr/X11R6/include \
2419 /usr/X11R5/include \
2420 /usr/X11R4/include \
2423 /usr/include/X11R6 \
2424 /usr/include/X11R5 \
2425 /usr/include/X11R4 \
2427 /usr/local/X11/include \
2428 /usr/local/X11R6/include \
2429 /usr/local/X11R5/include \
2430 /usr/local/X11R4/include \
2432 /usr/local/include/X11 \
2433 /usr/local/include/X11R6 \
2434 /usr/local/include/X11R5 \
2435 /usr/local/include/X11R4 \
2439 /usr/XFree86/include/X11 \
2442 /usr/local/include \
2443 /usr/unsupported/include \
2444 /usr/athena/include \
2445 /usr/local/x11r5/include \
2446 /usr/lpp/Xamples/include \
2448 /usr/openwin/include \
2449 /usr/openwin/share/include \
2452 if test -r "$ac_dir/$x_direct_test_include"; then
2453 ac_x_includes=$ac_dir
2459 fi # $ac_x_includes = NO
2461 if test "$ac_x_libraries" = NO; then
2462 # Check for the libraries.
2464 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2465 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2467 # See if we find them without any special options.
2468 # Don't add to $LIBS permanently.
2469 ac_save_LIBS="$LIBS"
2470 LIBS="-l$x_direct_test_library $LIBS"
2471 cat > conftest.$ac_ext <<EOF
2472 #line 2484 "configure"
2473 #include "confdefs.h"
2476 ${x_direct_test_function}()
2479 if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2481 LIBS="$ac_save_LIBS"
2482 # We can link X programs with no special library path.
2485 echo "configure: failed program was:" >&5
2486 cat conftest.$ac_ext >&5
2488 LIBS="$ac_save_LIBS"
2489 # First see if replacing the include by lib works.
2490 # Check X11 before X11Rn because it is often a symlink to the current release.
2491 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2502 /usr/local/X11/lib \
2503 /usr/local/X11R6/lib \
2504 /usr/local/X11R5/lib \
2505 /usr/local/X11R4/lib \
2507 /usr/local/lib/X11 \
2508 /usr/local/lib/X11R6 \
2509 /usr/local/lib/X11R5 \
2510 /usr/local/lib/X11R4 \
2514 /usr/XFree86/lib/X11 \
2518 /usr/unsupported/lib \
2520 /usr/local/x11r5/lib \
2521 /usr/lpp/Xamples/lib \
2525 /usr/openwin/share/lib \
2528 for ac_extension in a so sl; do
2529 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2530 ac_x_libraries=$ac_dir
2537 fi # $ac_x_libraries = NO
2539 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2540 # Didn't find X anywhere. Cache the known absence of X.
2541 ac_cv_have_x="have_x=no"
2543 # Record where we found X for the cache.
2544 ac_cv_have_x="have_x=yes \
2545 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2549 eval "$ac_cv_have_x"
2552 if test "$have_x" != yes; then
2553 echo "$ac_t""$have_x" 1>&6
2556 # If each of the values was on the command line, it overrides each guess.
2557 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2558 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2559 # Update the cache value to reflect the command line values.
2560 ac_cv_have_x="have_x=yes \
2561 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2562 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2565 if test "$no_x" = yes; then
2566 # Not all programs may use this symbol, but it does not hurt to define it.
2567 cat >> confdefs.h <<\EOF
2568 #define X_DISPLAY_MISSING 1
2571 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2573 if test -n "$x_includes"; then
2574 X_CFLAGS="$X_CFLAGS -I$x_includes"
2577 # It would also be nice to do this for all -L options, not just this one.
2578 if test -n "$x_libraries"; then
2579 X_LIBS="$X_LIBS -L$x_libraries"
2580 # For Solaris; some versions of Sun CC require a space after -R and
2581 # others require no space. Words are not sufficient . . . .
2582 case "`(uname -sr) 2>/dev/null`" in
2584 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2585 echo "configure:2597: checking whether -R must be followed by a space" >&5
2586 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2587 cat > conftest.$ac_ext <<EOF
2588 #line 2600 "configure"
2589 #include "confdefs.h"
2595 if { (eval echo configure:2607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2599 echo "configure: failed program was:" >&5
2600 cat conftest.$ac_ext >&5
2605 if test $ac_R_nospace = yes; then
2606 echo "$ac_t""no" 1>&6
2607 X_LIBS="$X_LIBS -R$x_libraries"
2609 LIBS="$ac_xsave_LIBS -R $x_libraries"
2610 cat > conftest.$ac_ext <<EOF
2611 #line 2623 "configure"
2612 #include "confdefs.h"
2618 if { (eval echo configure:2630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2622 echo "configure: failed program was:" >&5
2623 cat conftest.$ac_ext >&5
2628 if test $ac_R_space = yes; then
2629 echo "$ac_t""yes" 1>&6
2630 X_LIBS="$X_LIBS -R $x_libraries"
2632 echo "$ac_t""neither works" 1>&6
2635 LIBS="$ac_xsave_LIBS"
2639 # Check for system-dependent libraries X programs must link with.
2640 # Do this before checking for the system-independent R6 libraries
2641 # (-lICE), since we may need -lsocket or whatever for X linking.
2643 if test "$ISC" = yes; then
2644 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2646 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2647 # libraries were built with DECnet support. And karl@cs.umb.edu says
2648 # the Alpha needs dnet_stub (dnet does not exist).
2649 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2650 echo "configure:2662: checking for dnet_ntoa in -ldnet" >&5
2651 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2652 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2653 echo $ac_n "(cached) $ac_c" 1>&6
2655 ac_save_LIBS="$LIBS"
2657 cat > conftest.$ac_ext <<EOF
2658 #line 2670 "configure"
2659 #include "confdefs.h"
2660 /* Override any gcc2 internal prototype to avoid an error. */
2661 /* We use char because int might match the return type of a gcc2
2662 builtin and then its argument prototype would still apply. */
2669 if { (eval echo configure:2681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2671 eval "ac_cv_lib_$ac_lib_var=yes"
2673 echo "configure: failed program was:" >&5
2674 cat conftest.$ac_ext >&5
2676 eval "ac_cv_lib_$ac_lib_var=no"
2679 LIBS="$ac_save_LIBS"
2682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2683 echo "$ac_t""yes" 1>&6
2684 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2686 echo "$ac_t""no" 1>&6
2689 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2690 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2691 echo "configure:2703: checking for dnet_ntoa in -ldnet_stub" >&5
2692 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2693 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2694 echo $ac_n "(cached) $ac_c" 1>&6
2696 ac_save_LIBS="$LIBS"
2697 LIBS="-ldnet_stub $LIBS"
2698 cat > conftest.$ac_ext <<EOF
2699 #line 2711 "configure"
2700 #include "confdefs.h"
2701 /* Override any gcc2 internal prototype to avoid an error. */
2702 /* We use char because int might match the return type of a gcc2
2703 builtin and then its argument prototype would still apply. */
2710 if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2712 eval "ac_cv_lib_$ac_lib_var=yes"
2714 echo "configure: failed program was:" >&5
2715 cat conftest.$ac_ext >&5
2717 eval "ac_cv_lib_$ac_lib_var=no"
2720 LIBS="$ac_save_LIBS"
2723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2724 echo "$ac_t""yes" 1>&6
2725 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2727 echo "$ac_t""no" 1>&6
2732 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2733 # to get the SysV transport functions.
2734 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2736 # The nsl library prevents programs from opening the X display
2737 # on Irix 5.2, according to dickey@clark.net.
2738 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2739 echo "configure:2751: checking for gethostbyname" >&5
2740 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2741 echo $ac_n "(cached) $ac_c" 1>&6
2743 cat > conftest.$ac_ext <<EOF
2744 #line 2756 "configure"
2745 #include "confdefs.h"
2746 /* System header to define __stub macros and hopefully few prototypes,
2747 which can conflict with char gethostbyname(); below. */
2749 /* Override any gcc2 internal prototype to avoid an error. */
2750 /* We use char because int might match the return type of a gcc2
2751 builtin and then its argument prototype would still apply. */
2752 char gethostbyname();
2756 /* The GNU C library defines this for functions which it implements
2757 to always fail with ENOSYS. Some functions are actually named
2758 something starting with __ and the normal name is an alias. */
2759 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2767 if { (eval echo configure:2779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2769 eval "ac_cv_func_gethostbyname=yes"
2771 echo "configure: failed program was:" >&5
2772 cat conftest.$ac_ext >&5
2774 eval "ac_cv_func_gethostbyname=no"
2779 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2780 echo "$ac_t""yes" 1>&6
2783 echo "$ac_t""no" 1>&6
2786 if test $ac_cv_func_gethostbyname = no; then
2787 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2788 echo "configure:2800: checking for gethostbyname in -lnsl" >&5
2789 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2790 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2791 echo $ac_n "(cached) $ac_c" 1>&6
2793 ac_save_LIBS="$LIBS"
2795 cat > conftest.$ac_ext <<EOF
2796 #line 2808 "configure"
2797 #include "confdefs.h"
2798 /* Override any gcc2 internal prototype to avoid an error. */
2799 /* We use char because int might match the return type of a gcc2
2800 builtin and then its argument prototype would still apply. */
2801 char gethostbyname();
2807 if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2809 eval "ac_cv_lib_$ac_lib_var=yes"
2811 echo "configure: failed program was:" >&5
2812 cat conftest.$ac_ext >&5
2814 eval "ac_cv_lib_$ac_lib_var=no"
2817 LIBS="$ac_save_LIBS"
2820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2821 echo "$ac_t""yes" 1>&6
2822 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2824 echo "$ac_t""no" 1>&6
2829 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2830 # socket/setsockopt and other routines are undefined under SCO ODT
2831 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2832 # on later versions), says simon@lia.di.epfl.ch: it contains
2833 # gethostby* variants that don't use the nameserver (or something).
2834 # -lsocket must be given before -lnsl if both are needed.
2835 # We assume that if connect needs -lnsl, so does gethostbyname.
2836 echo $ac_n "checking for connect""... $ac_c" 1>&6
2837 echo "configure:2849: checking for connect" >&5
2838 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2839 echo $ac_n "(cached) $ac_c" 1>&6
2841 cat > conftest.$ac_ext <<EOF
2842 #line 2854 "configure"
2843 #include "confdefs.h"
2844 /* System header to define __stub macros and hopefully few prototypes,
2845 which can conflict with char connect(); below. */
2847 /* Override any gcc2 internal prototype to avoid an error. */
2848 /* We use char because int might match the return type of a gcc2
2849 builtin and then its argument prototype would still apply. */
2854 /* The GNU C library defines this for functions which it implements
2855 to always fail with ENOSYS. Some functions are actually named
2856 something starting with __ and the normal name is an alias. */
2857 #if defined (__stub_connect) || defined (__stub___connect)
2865 if { (eval echo configure:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2867 eval "ac_cv_func_connect=yes"
2869 echo "configure: failed program was:" >&5
2870 cat conftest.$ac_ext >&5
2872 eval "ac_cv_func_connect=no"
2877 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2878 echo "$ac_t""yes" 1>&6
2881 echo "$ac_t""no" 1>&6
2884 if test $ac_cv_func_connect = no; then
2885 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2886 echo "configure:2898: checking for connect in -lsocket" >&5
2887 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2888 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2889 echo $ac_n "(cached) $ac_c" 1>&6
2891 ac_save_LIBS="$LIBS"
2892 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2893 cat > conftest.$ac_ext <<EOF
2894 #line 2906 "configure"
2895 #include "confdefs.h"
2896 /* Override any gcc2 internal prototype to avoid an error. */
2897 /* We use char because int might match the return type of a gcc2
2898 builtin and then its argument prototype would still apply. */
2905 if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2907 eval "ac_cv_lib_$ac_lib_var=yes"
2909 echo "configure: failed program was:" >&5
2910 cat conftest.$ac_ext >&5
2912 eval "ac_cv_lib_$ac_lib_var=no"
2915 LIBS="$ac_save_LIBS"
2918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2919 echo "$ac_t""yes" 1>&6
2920 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2922 echo "$ac_t""no" 1>&6
2927 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2928 echo $ac_n "checking for remove""... $ac_c" 1>&6
2929 echo "configure:2941: checking for remove" >&5
2930 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2931 echo $ac_n "(cached) $ac_c" 1>&6
2933 cat > conftest.$ac_ext <<EOF
2934 #line 2946 "configure"
2935 #include "confdefs.h"
2936 /* System header to define __stub macros and hopefully few prototypes,
2937 which can conflict with char remove(); below. */
2939 /* Override any gcc2 internal prototype to avoid an error. */
2940 /* We use char because int might match the return type of a gcc2
2941 builtin and then its argument prototype would still apply. */
2946 /* The GNU C library defines this for functions which it implements
2947 to always fail with ENOSYS. Some functions are actually named
2948 something starting with __ and the normal name is an alias. */
2949 #if defined (__stub_remove) || defined (__stub___remove)
2957 if { (eval echo configure:2969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2959 eval "ac_cv_func_remove=yes"
2961 echo "configure: failed program was:" >&5
2962 cat conftest.$ac_ext >&5
2964 eval "ac_cv_func_remove=no"
2969 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2970 echo "$ac_t""yes" 1>&6
2973 echo "$ac_t""no" 1>&6
2976 if test $ac_cv_func_remove = no; then
2977 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2978 echo "configure:2990: checking for remove in -lposix" >&5
2979 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2980 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2981 echo $ac_n "(cached) $ac_c" 1>&6
2983 ac_save_LIBS="$LIBS"
2984 LIBS="-lposix $LIBS"
2985 cat > conftest.$ac_ext <<EOF
2986 #line 2998 "configure"
2987 #include "confdefs.h"
2988 /* Override any gcc2 internal prototype to avoid an error. */
2989 /* We use char because int might match the return type of a gcc2
2990 builtin and then its argument prototype would still apply. */
2997 if { (eval echo configure:3009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2999 eval "ac_cv_lib_$ac_lib_var=yes"
3001 echo "configure: failed program was:" >&5
3002 cat conftest.$ac_ext >&5
3004 eval "ac_cv_lib_$ac_lib_var=no"
3007 LIBS="$ac_save_LIBS"
3010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3011 echo "$ac_t""yes" 1>&6
3012 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3014 echo "$ac_t""no" 1>&6
3019 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3020 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3021 echo "configure:3033: checking for shmat" >&5
3022 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3023 echo $ac_n "(cached) $ac_c" 1>&6
3025 cat > conftest.$ac_ext <<EOF
3026 #line 3038 "configure"
3027 #include "confdefs.h"
3028 /* System header to define __stub macros and hopefully few prototypes,
3029 which can conflict with char shmat(); below. */
3031 /* Override any gcc2 internal prototype to avoid an error. */
3032 /* We use char because int might match the return type of a gcc2
3033 builtin and then its argument prototype would still apply. */
3038 /* The GNU C library defines this for functions which it implements
3039 to always fail with ENOSYS. Some functions are actually named
3040 something starting with __ and the normal name is an alias. */
3041 #if defined (__stub_shmat) || defined (__stub___shmat)
3049 if { (eval echo configure:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3051 eval "ac_cv_func_shmat=yes"
3053 echo "configure: failed program was:" >&5
3054 cat conftest.$ac_ext >&5
3056 eval "ac_cv_func_shmat=no"
3061 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3062 echo "$ac_t""yes" 1>&6
3065 echo "$ac_t""no" 1>&6
3068 if test $ac_cv_func_shmat = no; then
3069 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3070 echo "configure:3082: checking for shmat in -lipc" >&5
3071 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3072 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3073 echo $ac_n "(cached) $ac_c" 1>&6
3075 ac_save_LIBS="$LIBS"
3077 cat > conftest.$ac_ext <<EOF
3078 #line 3090 "configure"
3079 #include "confdefs.h"
3080 /* Override any gcc2 internal prototype to avoid an error. */
3081 /* We use char because int might match the return type of a gcc2
3082 builtin and then its argument prototype would still apply. */
3089 if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3091 eval "ac_cv_lib_$ac_lib_var=yes"
3093 echo "configure: failed program was:" >&5
3094 cat conftest.$ac_ext >&5
3096 eval "ac_cv_lib_$ac_lib_var=no"
3099 LIBS="$ac_save_LIBS"
3102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3103 echo "$ac_t""yes" 1>&6
3104 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3106 echo "$ac_t""no" 1>&6
3112 # Check for libraries that X11R6 Xt/Xaw programs need.
3113 ac_save_LDFLAGS="$LDFLAGS"
3114 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3115 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3116 # check for ICE first), but we must link in the order -lSM -lICE or
3117 # we get undefined symbols. So assume we have SM if we have ICE.
3118 # These have to be linked with before -lX11, unlike the other
3119 # libraries we check for below, so use a different variable.
3120 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3121 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3122 echo "configure:3134: checking for IceConnectionNumber in -lICE" >&5
3123 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3124 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3125 echo $ac_n "(cached) $ac_c" 1>&6
3127 ac_save_LIBS="$LIBS"
3128 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3129 cat > conftest.$ac_ext <<EOF
3130 #line 3142 "configure"
3131 #include "confdefs.h"
3132 /* Override any gcc2 internal prototype to avoid an error. */
3133 /* We use char because int might match the return type of a gcc2
3134 builtin and then its argument prototype would still apply. */
3135 char IceConnectionNumber();
3138 IceConnectionNumber()
3141 if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3143 eval "ac_cv_lib_$ac_lib_var=yes"
3145 echo "configure: failed program was:" >&5
3146 cat conftest.$ac_ext >&5
3148 eval "ac_cv_lib_$ac_lib_var=no"
3151 LIBS="$ac_save_LIBS"
3154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3155 echo "$ac_t""yes" 1>&6
3156 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3158 echo "$ac_t""no" 1>&6
3161 LDFLAGS="$ac_save_LDFLAGS"
3166 if test "$have_x" != yes; then
3167 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3171 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3172 echo "configure:3184: checking for X app-defaults directory" >&5
3173 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3174 echo $ac_n "(cached) $ac_c" 1>&6
3178 if mkdir conftestdir; then
3180 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3181 cat > Imakefile <<'EOF'
3183 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3185 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3186 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3187 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3192 if test x"$ac_x_app_defaults" = x; then
3194 # Look for the directory under a standard set of common directories.
3195 # Check X11 before X11Rn because it's often a symlink to the current release.
3197 /usr/X11/lib/app-defaults \
3198 /usr/X11R6/lib/app-defaults \
3199 /usr/X11R6/lib/X11/app-defaults \
3200 /usr/X11R5/lib/app-defaults \
3201 /usr/X11R5/lib/X11/app-defaults \
3202 /usr/X11R4/lib/app-defaults \
3203 /usr/X11R4/lib/X11/app-defaults \
3205 /usr/lib/X11/app-defaults \
3206 /usr/lib/X11R6/app-defaults \
3207 /usr/lib/X11R5/app-defaults \
3208 /usr/lib/X11R4/app-defaults \
3210 /usr/local/X11/lib/app-defaults \
3211 /usr/local/X11R6/lib/app-defaults \
3212 /usr/local/X11R5/lib/app-defaults \
3213 /usr/local/X11R4/lib/app-defaults \
3215 /usr/local/lib/X11/app-defaults \
3216 /usr/local/lib/X11R6/app-defaults \
3217 /usr/local/lib/X11R6/X11/app-defaults \
3218 /usr/local/lib/X11R5/app-defaults \
3219 /usr/local/lib/X11R5/X11/app-defaults \
3220 /usr/local/lib/X11R4/app-defaults \
3221 /usr/local/lib/X11R4/X11/app-defaults \
3223 /usr/X386/lib/X11/app-defaults \
3224 /usr/x386/lib/X11/app-defaults \
3225 /usr/XFree86/lib/X11/app-defaults \
3227 /usr/lib/X11/app-defaults \
3228 /usr/local/lib/X11/app-defaults \
3229 /usr/unsupported/lib/X11/app-defaults \
3230 /usr/athena/lib/X11/app-defaults \
3231 /usr/local/x11r5/lib/X11/app-defaults \
3232 /usr/lpp/Xamples/lib/X11/app-defaults \
3233 /lib/usr/lib/X11/app-defaults \
3235 /usr/openwin/lib/app-defaults \
3236 /usr/openwin/lib/X11/app-defaults \
3237 /usr/openwin/share/lib/app-defaults \
3238 /usr/openwin/share/lib/X11/app-defaults \
3240 /X11R6/lib/app-defaults \
3241 /X11R5/lib/app-defaults \
3242 /X11R4/lib/app-defaults \
3245 if test -d "$ac_dir"; then
3246 ac_x_app_defaults=$ac_dir
3252 if test x"$ac_x_app_defaults" = x; then
3253 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3255 # Record where we found app-defaults for the cache.
3256 ac_cv_x_app_defaults="$ac_x_app_defaults"
3260 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3261 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3265 # The following arcana was gleaned from conversations with
3266 # Eric Schwartz <erics@col.hp.com>:
3268 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3269 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3270 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3271 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3272 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3273 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3274 # you don't need any -I or -L arguments.
3276 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3277 # are the same division as 10.x. However, there are no symlinks to
3278 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3279 # arguments are always necessary.
3281 # However, X11R6 was available on HPUX 9.x as a patch: if that
3282 # patch was installed, then all of X11R6 went in to
3283 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3285 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3286 # whether R5 was available as a patch; R6 undoubtedly was not.)
3288 # So. We try and use the highest numbered pair of
3289 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3290 # that are available. We do not mix and match different versions
3293 # Question I still don't know the answer to: (do you?)
3295 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3296 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3297 # that contrib directory? Did it contain so-called "standard"
3298 # X11R6, or did it include Xaw and Xmu as well? If the former,
3299 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3300 # be a situation where one had to reach into the R5 headers and
3301 # libs to find Xmu? That is, must both R6 and R5 directories
3302 # be on the -I and -L lists in that case?
3304 for version in X11R6 X11R5 X11R4 ; do
3305 # if either pair of directories exists...
3306 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3308 # if contrib exists, use it...
3309 if test -d /usr/contrib/$version/lib ; then
3310 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3311 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3313 # if the "standard" one exists, use it.
3314 if test -d /usr/lib/$version ; then
3315 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3316 X_LIBS="$X_LIBS -L/usr/lib/$version"
3318 # since at least one of the pair exists, go no farther.
3323 # Now find Motif. Thanks for not making xmkmf find this by
3324 # default, you losers.
3326 if test -d /usr/lib/Motif1.2 ; then
3327 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3328 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3329 elif test -d /usr/lib/Motif1.1 ; then
3330 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3331 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3334 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3336 if test -d /opt/Mesa/lib ; then
3337 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3338 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3341 if test -d /opt/xpm/lib/X11 ; then
3342 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3343 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3346 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3347 # in /usr/local/, unless there is already an xscreensaver in
3348 # /usr/local/bin/. This can be overridden with the --prefix arg
3349 # to configure. I'm not sure this is the right thing to do, but
3350 # Richard Lloyd says so...
3352 if test \! -x /usr/local/bin/xscreensaver ; then
3353 ac_default_prefix=/opt/xscreensaver
3359 # Thanks for not making xmkmf find this by default, pinheads.
3360 # And thanks for moving things around again, too. Is this
3361 # really the standard location now? What happened to the
3362 # joke that this kind of thing went in /opt?
3363 # cthomp says "answer: CDE (Common Disorganized Environment)"
3365 if test -f /usr/dt/include/Xm/Xm.h ; then
3366 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3367 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3369 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3370 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3371 echo "configure:3383: checking for regcmp in -lgen" >&5
3372 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3373 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3374 echo $ac_n "(cached) $ac_c" 1>&6
3376 ac_save_LIBS="$LIBS"
3378 cat > conftest.$ac_ext <<EOF
3379 #line 3391 "configure"
3380 #include "confdefs.h"
3381 /* Override any gcc2 internal prototype to avoid an error. */
3382 /* We use char because int might match the return type of a gcc2
3383 builtin and then its argument prototype would still apply. */
3390 if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3392 eval "ac_cv_lib_$ac_lib_var=yes"
3394 echo "configure: failed program was:" >&5
3395 cat conftest.$ac_ext >&5
3397 eval "ac_cv_lib_$ac_lib_var=no"
3400 LIBS="$ac_save_LIBS"
3403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3404 echo "$ac_t""yes" 1>&6
3405 X_LIBS="$X_LIBS -lgen"
3407 echo "$ac_t""no" 1>&6
3413 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3414 echo "configure:3426: checking for XPointer" >&5
3415 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3416 echo $ac_n "(cached) $ac_c" 1>&6
3419 ac_save_CPPFLAGS="$CPPFLAGS"
3420 if test \! -z "$includedir" ; then
3421 CPPFLAGS="$CPPFLAGS -I$includedir"
3423 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3424 cat > conftest.$ac_ext <<EOF
3425 #line 3437 "configure"
3426 #include "confdefs.h"
3427 #include <X11/Xlib.h>
3429 XPointer foo = (XPointer) 0;
3432 if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3436 echo "configure: failed program was:" >&5
3437 cat conftest.$ac_ext >&5
3442 CPPFLAGS="$ac_save_CPPFLAGS"
3445 echo "$ac_t""$ac_cv_xpointer" 1>&6
3446 if test "$ac_cv_xpointer" != yes; then
3447 cat >> confdefs.h <<\EOF
3448 #define XPointer char*
3455 ###############################################################################
3457 # Check for -lXmu (some fucked up vendors don't ship it...)
3459 ###############################################################################
3463 ac_save_CPPFLAGS="$CPPFLAGS"
3464 if test \! -z "$includedir" ; then
3465 CPPFLAGS="$CPPFLAGS -I$includedir"
3467 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3468 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3469 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3470 echo "configure:3482: checking for X11/Xmu/Error.h" >&5
3471 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3472 echo $ac_n "(cached) $ac_c" 1>&6
3474 cat > conftest.$ac_ext <<EOF
3475 #line 3487 "configure"
3476 #include "confdefs.h"
3477 #include <X11/Xmu/Error.h>
3479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3480 { (eval echo configure:3492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3482 if test -z "$ac_err"; then
3484 eval "ac_cv_header_$ac_safe=yes"
3487 echo "configure: failed program was:" >&5
3488 cat conftest.$ac_ext >&5
3490 eval "ac_cv_header_$ac_safe=no"
3494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3495 echo "$ac_t""yes" 1>&6
3498 echo "$ac_t""no" 1>&6
3501 CPPFLAGS="$ac_save_CPPFLAGS"
3502 if test "$have_xmu" = no ; then
3503 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3504 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3508 SAVER_LIBS="-lXmu $SAVER_LIBS"
3509 HACK_LIBS="-lXmu $HACK_LIBS"
3510 MOTIF_LIBS="-lXmu $MOTIF_LIBS"
3511 GTK_LIBS="-lXmu $GTK_LIBS"
3512 ATHENA_LIBS="-lXmu $ATHENA_LIBS"
3513 ATHENA3D_LIBS="-lXmu $ATHENA3D_LIBS"
3514 cat >> confdefs.h <<\EOF
3521 ###############################################################################
3523 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3524 # See comp.windows.x FAQ question 124. The right fix is to
3525 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3527 ###############################################################################
3529 if test "$have_xmu" = yes ; then
3532 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3533 echo "configure:3545: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3534 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3535 echo $ac_n "(cached) $ac_c" 1>&6
3537 ac_save_LDFLAGS="$LDFLAGS"
3538 if test \! -z "$x_libraries" ; then
3539 LDFLAGS="$LDFLAGS -L$x_libraries"
3541 # Note: this trick never works! (Generally.)
3542 # We're only getting away with using AC_TRY_LINK
3543 # with X libraries because we know it's SunOS.
3544 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3545 cat > conftest.$ac_ext <<EOF
3546 #line 3558 "configure"
3547 #include "confdefs.h"
3553 if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3555 ac_cv_sunos_xmu_bug=no
3557 echo "configure: failed program was:" >&5
3558 cat conftest.$ac_ext >&5
3560 ac_cv_sunos_xmu_bug=yes
3563 LDFLAGS="$ac_save_LDFLAGS"
3566 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3567 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3568 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3569 echo "configure:3581: checking whether the compiler understands -static" >&5
3570 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3571 echo $ac_n "(cached) $ac_c" 1>&6
3573 ac_save_LDFLAGS="$LDFLAGS"
3574 LDFLAGS="$LDFLAGS -static"
3575 cat > conftest.$ac_ext <<EOF
3576 #line 3588 "configure"
3577 #include "confdefs.h"
3583 if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3587 echo "configure: failed program was:" >&5
3588 cat conftest.$ac_ext >&5
3593 LDFLAGS="$ac_save_LDFLAGS"
3596 echo "$ac_t""$ac_cv_ld_static" 1>&6
3597 if test "$ac_cv_ld_static" = yes ; then
3598 LDFLAGS="$LDFLAGS -static"
3600 LDFLAGS="$LDFLAGS -Bstatic"
3608 ###############################################################################
3610 # Handle the --enable-subdir option
3612 ###############################################################################
3614 # Check whether --enable-subdir or --disable-subdir was given.
3615 if test "${enable_subdir+set}" = set; then
3616 enableval="$enable_subdir"
3617 enable_subdir="$enableval"
3622 if test x"$enable_subdir" = xno; then
3624 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
3625 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
3628 # there must be a better way than this...
3629 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
3631 HACKDIR=$enable_subdir
3634 HACKDIR='${bindir}/'$enable_subdir
3638 # canonicalize slashes.
3639 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3642 ###############################################################################
3644 # Check for the SGI SCREEN_SAVER server extension.
3646 ###############################################################################
3649 with_sgi_req=unspecified
3650 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3651 if test "${with_sgi_ext+set}" = set; then
3652 withval="$with_sgi_ext"
3653 with_sgi="$withval"; with_sgi_req="$withval"
3665 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3666 echo "configure:3678: checking for SGI SCREEN_SAVER headers" >&5
3669 X_CFLAGS="-I$d $X_CFLAGS"
3670 echo "$ac_t""$d" 1>&6
3672 echo "$ac_t""not found ($d: no such directory)" 1>&6
3675 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3676 echo "configure:3688: checking for SGI SCREEN_SAVER libs" >&5
3679 X_LIBS="-L$d $X_LIBS"
3680 echo "$ac_t""$d" 1>&6
3682 echo "$ac_t""not found ($d: no such directory)" 1>&6
3685 # replace the directory string with "yes".
3687 with_sgi=$with_sgi_req
3692 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3693 echo " If it is a directory, then \`DIR/include' will be added to"
3694 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3700 if test "$with_sgi" = yes; then
3702 ac_save_CPPFLAGS="$CPPFLAGS"
3703 if test \! -z "$includedir" ; then
3704 CPPFLAGS="$CPPFLAGS -I$includedir"
3706 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3707 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3708 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3709 echo "configure:3721: checking for X11/extensions/XScreenSaver.h" >&5
3710 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3711 echo $ac_n "(cached) $ac_c" 1>&6
3713 cat > conftest.$ac_ext <<EOF
3714 #line 3726 "configure"
3715 #include "confdefs.h"
3716 #include <X11/extensions/XScreenSaver.h>
3718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3719 { (eval echo configure:3731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3721 if test -z "$ac_err"; then
3723 eval "ac_cv_header_$ac_safe=yes"
3726 echo "configure: failed program was:" >&5
3727 cat conftest.$ac_ext >&5
3729 eval "ac_cv_header_$ac_safe=no"
3733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3734 echo "$ac_t""yes" 1>&6
3736 cat >> confdefs.h <<\EOF
3737 #define HAVE_SGI_SAVER_EXTENSION 1
3741 echo "$ac_t""no" 1>&6
3744 CPPFLAGS="$ac_save_CPPFLAGS"
3746 elif test "$with_sgi" != no; then
3747 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3752 ###############################################################################
3754 # Check for the MIT-SCREEN-SAVER server extension.
3756 ###############################################################################
3759 with_mit_req=unspecified
3760 # Check whether --with-mit-ext or --without-mit-ext was given.
3761 if test "${with_mit_ext+set}" = set; then
3762 withval="$with_mit_ext"
3763 with_mit="$withval"; with_mit_req="$withval"
3775 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3776 echo "configure:3788: checking for MIT-SCREEN-SAVER headers" >&5
3779 X_CFLAGS="-I$d $X_CFLAGS"
3780 echo "$ac_t""$d" 1>&6
3782 echo "$ac_t""not found ($d: no such directory)" 1>&6
3785 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3786 echo "configure:3798: checking for MIT-SCREEN-SAVER libs" >&5
3789 X_LIBS="-L$d $X_LIBS"
3790 echo "$ac_t""$d" 1>&6
3792 echo "$ac_t""not found ($d: no such directory)" 1>&6
3795 # replace the directory string with "yes".
3797 with_mit=$with_mit_req
3802 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3803 echo " If it is a directory, then \`DIR/include' will be added to"
3804 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3810 if test "$with_mit" = yes; then
3812 ac_save_CPPFLAGS="$CPPFLAGS"
3813 if test \! -z "$includedir" ; then
3814 CPPFLAGS="$CPPFLAGS -I$includedir"
3816 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3817 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3818 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3819 echo "configure:3831: checking for X11/extensions/scrnsaver.h" >&5
3820 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3821 echo $ac_n "(cached) $ac_c" 1>&6
3823 cat > conftest.$ac_ext <<EOF
3824 #line 3836 "configure"
3825 #include "confdefs.h"
3826 #include <X11/extensions/scrnsaver.h>
3828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3829 { (eval echo configure:3841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3831 if test -z "$ac_err"; then
3833 eval "ac_cv_header_$ac_safe=yes"
3836 echo "configure: failed program was:" >&5
3837 cat conftest.$ac_ext >&5
3839 eval "ac_cv_header_$ac_safe=no"
3843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3844 echo "$ac_t""yes" 1>&6
3847 echo "$ac_t""no" 1>&6
3850 CPPFLAGS="$ac_save_CPPFLAGS"
3852 # Now check to see if it's really in the library; XF86Free-3.3 ships
3853 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3855 if test "$have_mit" = yes; then
3857 ac_save_CPPFLAGS="$CPPFLAGS"
3858 ac_save_LDFLAGS="$LDFLAGS"
3859 # ac_save_LIBS="$LIBS"
3861 if test \! -z "$includedir" ; then
3862 CPPFLAGS="$CPPFLAGS -I$includedir"
3864 # note: $X_CFLAGS includes $x_includes
3865 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3867 if test \! -z "$libdir" ; then
3868 LDFLAGS="$LDFLAGS -L$libdir"
3870 # note: $X_LIBS includes $x_libraries
3871 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3873 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3874 echo "configure:3886: checking for XScreenSaverRegister in -lXext" >&5
3875 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3876 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3877 echo $ac_n "(cached) $ac_c" 1>&6
3879 ac_save_LIBS="$LIBS"
3880 LIBS="-lXext -lm $LIBS"
3881 cat > conftest.$ac_ext <<EOF
3882 #line 3894 "configure"
3883 #include "confdefs.h"
3884 /* Override any gcc2 internal prototype to avoid an error. */
3885 /* We use char because int might match the return type of a gcc2
3886 builtin and then its argument prototype would still apply. */
3887 char XScreenSaverRegister();
3890 XScreenSaverRegister()
3893 if { (eval echo configure:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3895 eval "ac_cv_lib_$ac_lib_var=yes"
3897 echo "configure: failed program was:" >&5
3898 cat conftest.$ac_ext >&5
3900 eval "ac_cv_lib_$ac_lib_var=no"
3903 LIBS="$ac_save_LIBS"
3906 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3907 echo "$ac_t""yes" 1>&6
3910 echo "$ac_t""no" 1>&6
3914 CPPFLAGS="$ac_save_CPPFLAGS"
3915 LDFLAGS="$ac_save_LDFLAGS"
3916 # LIBS="$ac_save_LIBS"
3919 if test "$have_mit" = no; then
3920 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3921 # of in Xext. Thank you master, may I have another.
3923 ac_save_CPPFLAGS="$CPPFLAGS"
3924 ac_save_LDFLAGS="$LDFLAGS"
3925 # ac_save_LIBS="$LIBS"
3927 if test \! -z "$includedir" ; then
3928 CPPFLAGS="$CPPFLAGS -I$includedir"
3930 # note: $X_CFLAGS includes $x_includes
3931 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3933 if test \! -z "$libdir" ; then
3934 LDFLAGS="$LDFLAGS -L$libdir"
3936 # note: $X_LIBS includes $x_libraries
3937 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3939 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3940 echo "configure:3952: checking for XScreenSaverRegister in -lXExExt" >&5
3941 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3942 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3943 echo $ac_n "(cached) $ac_c" 1>&6
3945 ac_save_LIBS="$LIBS"
3946 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3947 cat > conftest.$ac_ext <<EOF
3948 #line 3960 "configure"
3949 #include "confdefs.h"
3950 /* Override any gcc2 internal prototype to avoid an error. */
3951 /* We use char because int might match the return type of a gcc2
3952 builtin and then its argument prototype would still apply. */
3953 char XScreenSaverRegister();
3956 XScreenSaverRegister()
3959 if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3961 eval "ac_cv_lib_$ac_lib_var=yes"
3963 echo "configure: failed program was:" >&5
3964 cat conftest.$ac_ext >&5
3966 eval "ac_cv_lib_$ac_lib_var=no"
3969 LIBS="$ac_save_LIBS"
3972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3973 echo "$ac_t""yes" 1>&6
3974 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3976 echo "$ac_t""no" 1>&6
3980 CPPFLAGS="$ac_save_CPPFLAGS"
3981 LDFLAGS="$ac_save_LDFLAGS"
3982 # LIBS="$ac_save_LIBS"
3986 if test "$have_mit" = no; then
3987 # Double fuck! Looks like some versions of XFree86 (whichever version
3988 # it is that comes with RedHat Linux 2.0 -- I can't find a version
3989 # number) put this garbage in Xss instead of Xext. Thank you master,
3990 # may I have another.
3992 ac_save_CPPFLAGS="$CPPFLAGS"
3993 ac_save_LDFLAGS="$LDFLAGS"
3994 # ac_save_LIBS="$LIBS"
3996 if test \! -z "$includedir" ; then
3997 CPPFLAGS="$CPPFLAGS -I$includedir"
3999 # note: $X_CFLAGS includes $x_includes
4000 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4002 if test \! -z "$libdir" ; then
4003 LDFLAGS="$LDFLAGS -L$libdir"
4005 # note: $X_LIBS includes $x_libraries
4006 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4008 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4009 echo "configure:4021: checking for XScreenSaverRegister in -lXss" >&5
4010 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4011 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4012 echo $ac_n "(cached) $ac_c" 1>&6
4014 ac_save_LIBS="$LIBS"
4015 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4016 cat > conftest.$ac_ext <<EOF
4017 #line 4029 "configure"
4018 #include "confdefs.h"
4019 /* Override any gcc2 internal prototype to avoid an error. */
4020 /* We use char because int might match the return type of a gcc2
4021 builtin and then its argument prototype would still apply. */
4022 char XScreenSaverRegister();
4025 XScreenSaverRegister()
4028 if { (eval echo configure:4040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4030 eval "ac_cv_lib_$ac_lib_var=yes"
4032 echo "configure: failed program was:" >&5
4033 cat conftest.$ac_ext >&5
4035 eval "ac_cv_lib_$ac_lib_var=no"
4038 LIBS="$ac_save_LIBS"
4041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4042 echo "$ac_t""yes" 1>&6
4043 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4045 echo "$ac_t""no" 1>&6
4049 CPPFLAGS="$ac_save_CPPFLAGS"
4050 LDFLAGS="$ac_save_LDFLAGS"
4051 # LIBS="$ac_save_LIBS"
4055 if test "$have_mit" = yes; then
4056 cat >> confdefs.h <<\EOF
4057 #define HAVE_MIT_SAVER_EXTENSION 1
4064 elif test "$with_mit" != no; then
4065 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4070 ###############################################################################
4072 # Check for the XIDLE server extension.
4074 ###############################################################################
4077 with_xidle_req=unspecified
4078 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4079 if test "${with_xidle_ext+set}" = set; then
4080 withval="$with_xidle_ext"
4081 with_xidle="$withval"; with_xidle_req="$withval"
4088 case "$with_xidle" in
4093 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4094 echo "configure:4106: checking for XIDLE headers" >&5
4095 d=$with_xidle/include
4097 X_CFLAGS="-I$d $X_CFLAGS"
4098 echo "$ac_t""$d" 1>&6
4100 echo "$ac_t""not found ($d: no such directory)" 1>&6
4103 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4104 echo "configure:4116: checking for XIDLE libs" >&5
4107 X_LIBS="-L$d $X_LIBS"
4108 echo "$ac_t""$d" 1>&6
4110 echo "$ac_t""not found ($d: no such directory)" 1>&6
4113 # replace the directory string with "yes".
4114 with_xidle_req="yes"
4115 with_xidle=$with_xidle_req
4120 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4121 echo " If it is a directory, then \`DIR/include' will be added to"
4122 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4128 if test "$with_xidle" = yes; then
4130 ac_save_CPPFLAGS="$CPPFLAGS"
4131 if test \! -z "$includedir" ; then
4132 CPPFLAGS="$CPPFLAGS -I$includedir"
4134 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4135 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4136 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4137 echo "configure:4149: checking for X11/extensions/xidle.h" >&5
4138 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4139 echo $ac_n "(cached) $ac_c" 1>&6
4141 cat > conftest.$ac_ext <<EOF
4142 #line 4154 "configure"
4143 #include "confdefs.h"
4144 #include <X11/extensions/xidle.h>
4146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4147 { (eval echo configure:4159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4149 if test -z "$ac_err"; then
4151 eval "ac_cv_header_$ac_safe=yes"
4154 echo "configure: failed program was:" >&5
4155 cat conftest.$ac_ext >&5
4157 eval "ac_cv_header_$ac_safe=no"
4161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4162 echo "$ac_t""yes" 1>&6
4164 cat >> confdefs.h <<\EOF
4165 #define HAVE_XIDLE_EXTENSION 1
4169 echo "$ac_t""no" 1>&6
4172 CPPFLAGS="$ac_save_CPPFLAGS"
4173 elif test "$with_xidle" != no; then
4174 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4179 ###############################################################################
4181 # Check for the SGI-VIDEO-CONTROL server extension.
4183 ###############################################################################
4186 with_sgivc_req=unspecified
4187 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4188 if test "${with_sgivc_ext+set}" = set; then
4189 withval="$with_sgivc_ext"
4190 with_sgivc="$withval"; with_sgivc_req="$withval"
4197 case "$with_sgivc" in
4202 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4203 echo "configure:4215: checking for SGI-VIDEO-CONTROL headers" >&5
4204 d=$with_sgivc/include
4206 X_CFLAGS="-I$d $X_CFLAGS"
4207 echo "$ac_t""$d" 1>&6
4209 echo "$ac_t""not found ($d: no such directory)" 1>&6
4212 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4213 echo "configure:4225: checking for SGI-VIDEO-CONTROL libs" >&5
4216 X_LIBS="-L$d $X_LIBS"
4217 echo "$ac_t""$d" 1>&6
4219 echo "$ac_t""not found ($d: no such directory)" 1>&6
4222 # replace the directory string with "yes".
4223 with_sgivc_req="yes"
4224 with_sgivc=$with_sgivc_req
4229 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4230 echo " If it is a directory, then \`DIR/include' will be added to"
4231 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4237 if test "$with_sgivc" = yes; then
4239 # first check for XSGIvc.h
4241 ac_save_CPPFLAGS="$CPPFLAGS"
4242 if test \! -z "$includedir" ; then
4243 CPPFLAGS="$CPPFLAGS -I$includedir"
4245 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4246 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4247 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4248 echo "configure:4260: checking for X11/extensions/XSGIvc.h" >&5
4249 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4250 echo $ac_n "(cached) $ac_c" 1>&6
4252 cat > conftest.$ac_ext <<EOF
4253 #line 4265 "configure"
4254 #include "confdefs.h"
4255 #include <X11/extensions/XSGIvc.h>
4257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4258 { (eval echo configure:4270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4260 if test -z "$ac_err"; then
4262 eval "ac_cv_header_$ac_safe=yes"
4265 echo "configure: failed program was:" >&5
4266 cat conftest.$ac_ext >&5
4268 eval "ac_cv_header_$ac_safe=no"
4272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4273 echo "$ac_t""yes" 1>&6
4276 echo "$ac_t""no" 1>&6
4279 CPPFLAGS="$ac_save_CPPFLAGS"
4281 # if that succeeded, then check for the -lXsgivc
4282 if test "$have_sgivc" = yes; then
4285 ac_save_CPPFLAGS="$CPPFLAGS"
4286 ac_save_LDFLAGS="$LDFLAGS"
4287 # ac_save_LIBS="$LIBS"
4289 if test \! -z "$includedir" ; then
4290 CPPFLAGS="$CPPFLAGS -I$includedir"
4292 # note: $X_CFLAGS includes $x_includes
4293 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4295 if test \! -z "$libdir" ; then
4296 LDFLAGS="$LDFLAGS -L$libdir"
4298 # note: $X_LIBS includes $x_libraries
4299 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4301 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4302 echo "configure:4314: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4303 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4304 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4305 echo $ac_n "(cached) $ac_c" 1>&6
4307 ac_save_LIBS="$LIBS"
4308 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4309 cat > conftest.$ac_ext <<EOF
4310 #line 4322 "configure"
4311 #include "confdefs.h"
4312 /* Override any gcc2 internal prototype to avoid an error. */
4313 /* We use char because int might match the return type of a gcc2
4314 builtin and then its argument prototype would still apply. */
4315 char XSGIvcQueryGammaMap();
4318 XSGIvcQueryGammaMap()
4321 if { (eval echo configure:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4323 eval "ac_cv_lib_$ac_lib_var=yes"
4325 echo "configure: failed program was:" >&5
4326 cat conftest.$ac_ext >&5
4328 eval "ac_cv_lib_$ac_lib_var=no"
4331 LIBS="$ac_save_LIBS"
4334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4335 echo "$ac_t""yes" 1>&6
4336 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4338 echo "$ac_t""no" 1>&6
4342 CPPFLAGS="$ac_save_CPPFLAGS"
4343 LDFLAGS="$ac_save_LDFLAGS"
4344 # LIBS="$ac_save_LIBS"
4348 # if that succeeded, then we've really got it.
4349 if test "$have_sgivc" = yes; then
4350 cat >> confdefs.h <<\EOF
4351 #define HAVE_SGI_VC_EXTENSION 1
4356 elif test "$with_sgivc" != no; then
4357 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4362 ###############################################################################
4364 # Check for the DPMS server extension.
4366 ###############################################################################
4369 with_dpms_req=unspecified
4370 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4371 if test "${with_dpms_ext+set}" = set; then
4372 withval="$with_dpms_ext"
4373 with_dpms="$withval"; with_dpms_req="$withval"
4380 case "$with_dpms" in
4385 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4386 echo "configure:4398: checking for DPMS headers" >&5
4387 d=$with_dpms/include
4389 X_CFLAGS="-I$d $X_CFLAGS"
4390 echo "$ac_t""$d" 1>&6
4392 echo "$ac_t""not found ($d: no such directory)" 1>&6
4395 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4396 echo "configure:4408: checking for DPMS libs" >&5
4399 X_LIBS="-L$d $X_LIBS"
4400 echo "$ac_t""$d" 1>&6
4402 echo "$ac_t""not found ($d: no such directory)" 1>&6
4405 # replace the directory string with "yes".
4407 with_dpms=$with_dpms_req
4412 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4413 echo " If it is a directory, then \`DIR/include' will be added to"
4414 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4420 if test "$with_dpms" = yes; then
4422 # first check for dpms.h
4424 ac_save_CPPFLAGS="$CPPFLAGS"
4425 if test \! -z "$includedir" ; then
4426 CPPFLAGS="$CPPFLAGS -I$includedir"
4428 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4429 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4430 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4431 echo "configure:4443: checking for X11/extensions/dpms.h" >&5
4432 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4433 echo $ac_n "(cached) $ac_c" 1>&6
4435 cat > conftest.$ac_ext <<EOF
4436 #line 4448 "configure"
4437 #include "confdefs.h"
4438 #include <X11/extensions/dpms.h>
4440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4441 { (eval echo configure:4453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4443 if test -z "$ac_err"; then
4445 eval "ac_cv_header_$ac_safe=yes"
4448 echo "configure: failed program was:" >&5
4449 cat conftest.$ac_ext >&5
4451 eval "ac_cv_header_$ac_safe=no"
4455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4456 echo "$ac_t""yes" 1>&6
4459 echo "$ac_t""no" 1>&6
4462 CPPFLAGS="$ac_save_CPPFLAGS"
4464 # if that succeeded, then check for the -lXdpms
4465 if test "$have_dpms" = yes; then
4468 ac_save_CPPFLAGS="$CPPFLAGS"
4469 ac_save_LDFLAGS="$LDFLAGS"
4470 # ac_save_LIBS="$LIBS"
4472 if test \! -z "$includedir" ; then
4473 CPPFLAGS="$CPPFLAGS -I$includedir"
4475 # note: $X_CFLAGS includes $x_includes
4476 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4478 if test \! -z "$libdir" ; then
4479 LDFLAGS="$LDFLAGS -L$libdir"
4481 # note: $X_LIBS includes $x_libraries
4482 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4484 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4485 echo "configure:4497: checking for DPMSInfo in -lXdpms" >&5
4486 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4487 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4488 echo $ac_n "(cached) $ac_c" 1>&6
4490 ac_save_LIBS="$LIBS"
4491 LIBS="-lXdpms -lXext -lX11 $LIBS"
4492 cat > conftest.$ac_ext <<EOF
4493 #line 4505 "configure"
4494 #include "confdefs.h"
4495 /* Override any gcc2 internal prototype to avoid an error. */
4496 /* We use char because int might match the return type of a gcc2
4497 builtin and then its argument prototype would still apply. */
4504 if { (eval echo configure:4516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4506 eval "ac_cv_lib_$ac_lib_var=yes"
4508 echo "configure: failed program was:" >&5
4509 cat conftest.$ac_ext >&5
4511 eval "ac_cv_lib_$ac_lib_var=no"
4514 LIBS="$ac_save_LIBS"
4517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4518 echo "$ac_t""yes" 1>&6
4519 have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
4521 echo "$ac_t""no" 1>&6
4525 CPPFLAGS="$ac_save_CPPFLAGS"
4526 LDFLAGS="$ac_save_LDFLAGS"
4527 # LIBS="$ac_save_LIBS"
4531 # if that succeeded, then we've really got it.
4532 if test "$have_dpms" = yes; then
4533 cat >> confdefs.h <<\EOF
4534 #define HAVE_DPMS_EXTENSION 1
4539 elif test "$with_dpms" != no; then
4540 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4545 ###############################################################################
4547 # Check for the XF86VMODE server extension.
4549 ###############################################################################
4552 with_xf86vmode_req=unspecified
4553 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4554 if test "${with_xf86vmode_ext+set}" = set; then
4555 withval="$with_xf86vmode_ext"
4556 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4563 case "$with_xf86vmode" in
4568 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4569 echo "configure:4581: checking for xf86vmode headers" >&5
4570 d=$with_xf86vmode/include
4572 X_CFLAGS="-I$d $X_CFLAGS"
4573 echo "$ac_t""$d" 1>&6
4575 echo "$ac_t""not found ($d: no such directory)" 1>&6
4578 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4579 echo "configure:4591: checking for xf86vmode libs" >&5
4580 d=$with_xf86vmode/lib
4582 X_LIBS="-L$d $X_LIBS"
4583 echo "$ac_t""$d" 1>&6
4585 echo "$ac_t""not found ($d: no such directory)" 1>&6
4588 # replace the directory string with "yes".
4589 with_xf86vmode_req="yes"
4590 with_xf86vmode=$with_xf86vmode_req
4595 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4596 echo " If it is a directory, then \`DIR/include' will be added to"
4597 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4603 if test "$with_xf86vmode" = yes; then
4605 # first check for xf86vmode.h
4607 ac_save_CPPFLAGS="$CPPFLAGS"
4608 if test \! -z "$includedir" ; then
4609 CPPFLAGS="$CPPFLAGS -I$includedir"
4611 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4612 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4613 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4614 echo "configure:4626: checking for X11/extensions/xf86vmode.h" >&5
4615 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4616 echo $ac_n "(cached) $ac_c" 1>&6
4618 cat > conftest.$ac_ext <<EOF
4619 #line 4631 "configure"
4620 #include "confdefs.h"
4621 #include <X11/extensions/xf86vmode.h>
4623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4624 { (eval echo configure:4636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4626 if test -z "$ac_err"; then
4628 eval "ac_cv_header_$ac_safe=yes"
4631 echo "configure: failed program was:" >&5
4632 cat conftest.$ac_ext >&5
4634 eval "ac_cv_header_$ac_safe=no"
4638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4639 echo "$ac_t""yes" 1>&6
4642 echo "$ac_t""no" 1>&6
4645 CPPFLAGS="$ac_save_CPPFLAGS"
4647 # if that succeeded, then check for the -lXxf86vm
4648 if test "$have_xf86vmode" = yes; then
4651 ac_save_CPPFLAGS="$CPPFLAGS"
4652 ac_save_LDFLAGS="$LDFLAGS"
4653 # ac_save_LIBS="$LIBS"
4655 if test \! -z "$includedir" ; then
4656 CPPFLAGS="$CPPFLAGS -I$includedir"
4658 # note: $X_CFLAGS includes $x_includes
4659 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4661 if test \! -z "$libdir" ; then
4662 LDFLAGS="$LDFLAGS -L$libdir"
4664 # note: $X_LIBS includes $x_libraries
4665 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4667 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4668 echo "configure:4680: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4669 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4670 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4671 echo $ac_n "(cached) $ac_c" 1>&6
4673 ac_save_LIBS="$LIBS"
4674 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4675 cat > conftest.$ac_ext <<EOF
4676 #line 4688 "configure"
4677 #include "confdefs.h"
4678 /* Override any gcc2 internal prototype to avoid an error. */
4679 /* We use char because int might match the return type of a gcc2
4680 builtin and then its argument prototype would still apply. */
4681 char XF86VidModeGetViewPort();
4684 XF86VidModeGetViewPort()
4687 if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689 eval "ac_cv_lib_$ac_lib_var=yes"
4691 echo "configure: failed program was:" >&5
4692 cat conftest.$ac_ext >&5
4694 eval "ac_cv_lib_$ac_lib_var=no"
4697 LIBS="$ac_save_LIBS"
4700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4701 echo "$ac_t""yes" 1>&6
4702 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4704 echo "$ac_t""no" 1>&6
4708 CPPFLAGS="$ac_save_CPPFLAGS"
4709 LDFLAGS="$ac_save_LDFLAGS"
4710 # LIBS="$ac_save_LIBS"
4714 # if that succeeded, then we've really got it.
4715 if test "$have_xf86vmode" = yes; then
4716 cat >> confdefs.h <<\EOF
4717 #define HAVE_XF86VMODE 1
4722 elif test "$with_xf86vmode" != no; then
4723 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4728 ###############################################################################
4730 # Check for HP XHPDisableReset and XHPEnableReset.
4732 ###############################################################################
4735 ac_save_CPPFLAGS="$CPPFLAGS"
4736 if test \! -z "$includedir" ; then
4737 CPPFLAGS="$CPPFLAGS -I$includedir"
4739 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4740 cat > conftest.$ac_ext <<EOF
4741 #line 4753 "configure"
4742 #include "confdefs.h"
4743 #include <X11/XHPlib.h>
4745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4746 egrep "XHPDisableReset" >/dev/null 2>&1; then
4748 cat >> confdefs.h <<\EOF
4749 #define HAVE_XHPDISABLERESET 1
4752 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
4756 CPPFLAGS="$ac_save_CPPFLAGS"
4759 ###############################################################################
4761 # Check for /proc/interrupts.
4763 ###############################################################################
4765 have_proc_interrupts=no
4766 with_proc_interrupts_req=unspecified
4767 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4768 if test "${with_proc_interrupts+set}" = set; then
4769 withval="$with_proc_interrupts"
4770 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4772 with_proc_interrupts=yes
4776 if test "$with_proc_interrupts" = yes; then
4778 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4779 echo "configure:4791: checking whether /proc/interrupts contains keyboard data" >&5
4780 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4781 echo $ac_n "(cached) $ac_c" 1>&6
4783 ac_cv_have_proc_interrupts=no
4784 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4785 ac_cv_have_proc_interrupts=yes
4790 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
4791 have_proc_interrupts=$ac_cv_have_proc_interrupts
4793 if test "$have_proc_interrupts" = yes; then
4794 cat >> confdefs.h <<\EOF
4795 #define HAVE_PROC_INTERRUPTS 1
4800 elif test "$with_proc_interrupts" != no; then
4801 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
4806 ###############################################################################
4808 # The --enable-locking option
4810 ###############################################################################
4812 # Check whether --enable-locking or --disable-locking was given.
4813 if test "${enable_locking+set}" = set; then
4814 enableval="$enable_locking"
4815 enable_locking="$enableval"
4820 if test "$enable_locking" = yes; then
4822 elif test "$enable_locking" = no; then
4823 cat >> confdefs.h <<\EOF
4824 #define NO_LOCKING 1
4828 echo "error: must be yes or no: --enable-locking=$enable_locking"
4834 ###############################################################################
4836 # The --enable-vt-locking option
4838 ###############################################################################
4840 #ac_vt_lockswitch=no
4841 #AC_ARG_ENABLE(vt-locking,[
4842 # --enable-vt-locking Compile in support for locking Virtual Terminals.
4843 # This is the default if the system supports it, and
4844 # if locking support is included (--enable-locking.)
4845 # --disable-vt-locking Do not allow locking of VTs, even if locking is
4847 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
4848 #if test "$enable_vt_locking" = yes; then
4850 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
4851 # [AC_TRY_COMPILE([#include <fcntl.h>
4852 # #include <sys/ioctl.h>
4853 # #include <sys/vt.h>],
4854 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
4855 # [ac_cv_vt_lockswitch=yes],
4856 # [ac_cv_vt_lockswitch=no])])
4857 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
4859 #elif test "$enable_vt_locking" = no; then
4862 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
4866 #if test "$ac_vt_lockswitch" = yes; then
4867 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
4868 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
4869 # # #### but it doesn't work yet, so don't worry about that for now.
4875 ###############################################################################
4879 ###############################################################################
4883 # Solaris systems tend to come with PAM misconfigured.
4884 # Don't build it by default, even if the headers exist.
4888 # Default to building PAM support on all other systems, if it exists.
4889 with_pam_default=yes
4894 with_pam_req=unspecified
4896 # Check whether --with-pam or --without-pam was given.
4897 if test "${with_pam+set}" = set; then
4899 with_pam="$withval"; with_pam_req="$withval"
4901 with_pam=$with_pam_default
4911 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
4912 echo "configure:4924: checking for PAM headers" >&5
4915 X_CFLAGS="-I$d $X_CFLAGS"
4916 echo "$ac_t""$d" 1>&6
4918 echo "$ac_t""not found ($d: no such directory)" 1>&6
4921 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
4922 echo "configure:4934: checking for PAM libs" >&5
4925 X_LIBS="-L$d $X_LIBS"
4926 echo "$ac_t""$d" 1>&6
4928 echo "$ac_t""not found ($d: no such directory)" 1>&6
4931 # replace the directory string with "yes".
4933 with_pam=$with_pam_req
4938 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
4939 echo " If it is a directory, then \`DIR/include' will be added to"
4940 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4946 if test "$enable_locking" = yes -a "$with_pam" = yes; then
4947 echo $ac_n "checking for PAM""... $ac_c" 1>&6
4948 echo "configure:4960: checking for PAM" >&5
4949 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
4950 echo $ac_n "(cached) $ac_c" 1>&6
4953 ac_save_CPPFLAGS="$CPPFLAGS"
4954 if test \! -z "$includedir" ; then
4955 CPPFLAGS="$CPPFLAGS -I$includedir"
4957 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4958 cat > conftest.$ac_ext <<EOF
4959 #line 4971 "configure"
4960 #include "confdefs.h"
4961 #include <security/pam_appl.h>
4966 if { (eval echo configure:4978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4970 echo "configure: failed program was:" >&5
4971 cat conftest.$ac_ext >&5
4976 CPPFLAGS="$ac_save_CPPFLAGS"
4979 echo "$ac_t""$ac_cv_pam" 1>&6
4980 if test "$ac_cv_pam" = yes ; then
4982 cat >> confdefs.h <<\EOF
4986 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
4988 # libpam typically requires dlopen and dlsym. On FreeBSD,
4989 # those are in libc. On Linux and Solaris, they're in libdl.
4990 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4991 echo "configure:5003: checking for dlopen in -ldl" >&5
4992 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4993 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4994 echo $ac_n "(cached) $ac_c" 1>&6
4996 ac_save_LIBS="$LIBS"
4998 cat > conftest.$ac_ext <<EOF
4999 #line 5011 "configure"
5000 #include "confdefs.h"
5001 /* Override any gcc2 internal prototype to avoid an error. */
5002 /* We use char because int might match the return type of a gcc2
5003 builtin and then its argument prototype would still apply. */
5010 if { (eval echo configure:5022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5012 eval "ac_cv_lib_$ac_lib_var=yes"
5014 echo "configure: failed program was:" >&5
5015 cat conftest.$ac_ext >&5
5017 eval "ac_cv_lib_$ac_lib_var=no"
5020 LIBS="$ac_save_LIBS"
5023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5024 echo "$ac_t""yes" 1>&6
5025 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5027 echo "$ac_t""no" 1>&6
5031 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5032 echo "configure:5044: checking how to call pam_strerror" >&5
5033 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5034 echo $ac_n "(cached) $ac_c" 1>&6
5036 cat > conftest.$ac_ext <<EOF
5037 #line 5049 "configure"
5038 #include "confdefs.h"
5041 #include <security/pam_appl.h>
5043 pam_handle_t *pamh = 0;
5044 char *s = pam_strerror(pamh, PAM_SUCCESS);
5047 if { (eval echo configure:5059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5049 ac_pam_strerror_args=2
5051 echo "configure: failed program was:" >&5
5052 cat conftest.$ac_ext >&5
5054 cat > conftest.$ac_ext <<EOF
5055 #line 5067 "configure"
5056 #include "confdefs.h"
5059 #include <security/pam_appl.h>
5062 pam_strerror(PAM_SUCCESS);
5065 if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5067 ac_pam_strerror_args=1
5069 echo "configure: failed program was:" >&5
5070 cat conftest.$ac_ext >&5
5072 ac_pam_strerror_args=0
5077 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5080 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5081 if test "$ac_pam_strerror_args" = 1 ; then
5082 echo "$ac_t""one argument" 1>&6
5083 elif test "$ac_pam_strerror_args" = 2 ; then
5084 cat >> confdefs.h <<\EOF
5085 #define PAM_STRERROR_TWO_ARGS 1
5088 echo "$ac_t""two arguments" 1>&6
5090 echo "$ac_t""unknown" 1>&6
5096 ###############################################################################
5098 # Check for Kerberos.
5100 ###############################################################################
5103 with_kerberos_req=unspecified
5105 # Check whether --with-kerberos or --without-kerberos was given.
5106 if test "${with_kerberos+set}" = set; then
5107 withval="$with_kerberos"
5108 with_kerberos="$withval"; with_kerberos_req="$withval"
5115 case "$with_kerberos" in
5120 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5121 echo "configure:5133: checking for Kerberos headers" >&5
5122 d=$with_kerberos/include
5124 X_CFLAGS="-I$d $X_CFLAGS"
5125 echo "$ac_t""$d" 1>&6
5127 echo "$ac_t""not found ($d: no such directory)" 1>&6
5130 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5131 echo "configure:5143: checking for Kerberos libs" >&5
5132 d=$with_kerberos/lib
5134 X_LIBS="-L$d $X_LIBS"
5135 echo "$ac_t""$d" 1>&6
5137 echo "$ac_t""not found ($d: no such directory)" 1>&6
5140 # replace the directory string with "yes".
5141 with_kerberos_req="yes"
5142 with_kerberos=$with_kerberos_req
5147 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5148 echo " If it is a directory, then \`DIR/include' will be added to"
5149 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5155 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5156 echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
5157 echo "configure:5169: checking for Kerberos" >&5
5158 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5159 echo $ac_n "(cached) $ac_c" 1>&6
5162 ac_save_CPPFLAGS="$CPPFLAGS"
5163 if test \! -z "$includedir" ; then
5164 CPPFLAGS="$CPPFLAGS -I$includedir"
5166 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5167 cat > conftest.$ac_ext <<EOF
5168 #line 5180 "configure"
5169 #include "confdefs.h"
5175 if { (eval echo configure:5187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5179 echo "configure: failed program was:" >&5
5180 cat conftest.$ac_ext >&5
5185 CPPFLAGS="$ac_save_CPPFLAGS"
5188 echo "$ac_t""$ac_cv_kerberos" 1>&6
5189 if test "$ac_cv_kerberos" = yes ; then
5191 cat >> confdefs.h <<\EOF
5192 #define HAVE_KERBEROS 1
5196 # from Tim Showalter <tjs+@andrew.cmu.edu>
5197 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
5198 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5199 echo "configure:5211: checking for res_search" >&5
5200 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5201 echo $ac_n "(cached) $ac_c" 1>&6
5203 cat > conftest.$ac_ext <<EOF
5204 #line 5216 "configure"
5205 #include "confdefs.h"
5206 /* System header to define __stub macros and hopefully few prototypes,
5207 which can conflict with char res_search(); below. */
5209 /* Override any gcc2 internal prototype to avoid an error. */
5210 /* We use char because int might match the return type of a gcc2
5211 builtin and then its argument prototype would still apply. */
5216 /* The GNU C library defines this for functions which it implements
5217 to always fail with ENOSYS. Some functions are actually named
5218 something starting with __ and the normal name is an alias. */
5219 #if defined (__stub_res_search) || defined (__stub___res_search)
5227 if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5229 eval "ac_cv_func_res_search=yes"
5231 echo "configure: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5234 eval "ac_cv_func_res_search=no"
5239 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5240 echo "$ac_t""yes" 1>&6
5243 echo "$ac_t""no" 1>&6
5244 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5245 echo "configure:5257: checking for res_search in -lresolv" >&5
5246 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5247 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5248 echo $ac_n "(cached) $ac_c" 1>&6
5250 ac_save_LIBS="$LIBS"
5251 LIBS="-lresolv $LIBS"
5252 cat > conftest.$ac_ext <<EOF
5253 #line 5265 "configure"
5254 #include "confdefs.h"
5255 /* Override any gcc2 internal prototype to avoid an error. */
5256 /* We use char because int might match the return type of a gcc2
5257 builtin and then its argument prototype would still apply. */
5264 if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5266 eval "ac_cv_lib_$ac_lib_var=yes"
5268 echo "configure: failed program was:" >&5
5269 cat conftest.$ac_ext >&5
5271 eval "ac_cv_lib_$ac_lib_var=no"
5274 LIBS="$ac_save_LIBS"
5277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5278 echo "$ac_t""yes" 1>&6
5279 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
5281 echo "$ac_t""no" 1>&6
5282 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
5293 ###############################################################################
5295 # Check for the nine billion variants of shadow passwords...
5297 ###############################################################################
5302 with_shadow_req=unspecified
5304 # Check whether --with-shadow or --without-shadow was given.
5305 if test "${with_shadow+set}" = set; then
5306 withval="$with_shadow"
5307 with_shadow="$withval"; with_shadow_req="$withval"
5314 case "$with_shadow" in
5319 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
5320 echo "configure:5332: checking for shadow password headers" >&5
5321 d=$with_shadow/include
5323 X_CFLAGS="-I$d $X_CFLAGS"
5324 echo "$ac_t""$d" 1>&6
5326 echo "$ac_t""not found ($d: no such directory)" 1>&6
5329 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
5330 echo "configure:5342: checking for shadow password libs" >&5
5333 X_LIBS="-L$d $X_LIBS"
5334 echo "$ac_t""$d" 1>&6
5336 echo "$ac_t""not found ($d: no such directory)" 1>&6
5339 # replace the directory string with "yes".
5340 with_shadow_req="yes"
5341 with_shadow=$with_shadow_req
5346 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
5347 echo " If it is a directory, then \`DIR/include' will be added to"
5348 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5354 if test "$enable_locking" = no ; then
5360 ###############################################################################
5362 # Check for Sun "adjunct" passwords.
5364 ###############################################################################
5366 if test "$with_shadow" = yes ; then
5367 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
5368 echo "configure:5380: checking for Sun-style shadow passwords" >&5
5369 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
5370 echo $ac_n "(cached) $ac_c" 1>&6
5373 ac_save_CPPFLAGS="$CPPFLAGS"
5374 if test \! -z "$includedir" ; then
5375 CPPFLAGS="$CPPFLAGS -I$includedir"
5377 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5378 cat > conftest.$ac_ext <<EOF
5379 #line 5391 "configure"
5380 #include "confdefs.h"
5383 #include <sys/types.h>
5384 #include <sys/label.h>
5385 #include <sys/audit.h>
5388 struct passwd_adjunct *p = getpwanam("nobody");
5389 const char *pw = p->pwa_passwd;
5392 if { (eval echo configure:5404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5394 ac_cv_sun_adjunct=yes
5396 echo "configure: failed program was:" >&5
5397 cat conftest.$ac_ext >&5
5399 ac_cv_sun_adjunct=no
5402 CPPFLAGS="$ac_save_CPPFLAGS"
5405 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
5406 if test "$ac_cv_sun_adjunct" = yes; then
5407 have_shadow_adjunct=yes
5414 ###############################################################################
5416 # Check for DEC and SCO so-called "enhanced" security.
5418 ###############################################################################
5420 if test "$with_shadow" = yes ; then
5421 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
5422 echo "configure:5434: checking for DEC-style shadow passwords" >&5
5423 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
5424 echo $ac_n "(cached) $ac_c" 1>&6
5427 ac_save_CPPFLAGS="$CPPFLAGS"
5428 if test \! -z "$includedir" ; then
5429 CPPFLAGS="$CPPFLAGS -I$includedir"
5431 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5432 cat > conftest.$ac_ext <<EOF
5433 #line 5445 "configure"
5434 #include "confdefs.h"
5437 #include <sys/types.h>
5439 #include <sys/security.h>
5442 struct pr_passwd *p;
5444 set_auth_parameters(0, 0);
5445 check_auth_parameters();
5446 p = getprpwnam("nobody");
5447 pw = p->ufld.fd_encrypt;
5450 if { (eval echo configure:5462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5452 ac_cv_enhanced_passwd=yes
5454 echo "configure: failed program was:" >&5
5455 cat conftest.$ac_ext >&5
5457 ac_cv_enhanced_passwd=no
5460 CPPFLAGS="$ac_save_CPPFLAGS"
5463 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
5464 if test $ac_cv_enhanced_passwd = yes; then
5465 have_shadow_enhanced=yes
5469 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
5470 # (I'm told it needs -lcurses too, but I don't understand why.)
5471 # But on DEC, it's in -lsecurity.
5473 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
5474 echo "configure:5486: checking for getprpwnam in -lprot" >&5
5475 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
5476 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5477 echo $ac_n "(cached) $ac_c" 1>&6
5479 ac_save_LIBS="$LIBS"
5480 LIBS="-lprot -lx $LIBS"
5481 cat > conftest.$ac_ext <<EOF
5482 #line 5494 "configure"
5483 #include "confdefs.h"
5484 /* Override any gcc2 internal prototype to avoid an error. */
5485 /* We use char because int might match the return type of a gcc2
5486 builtin and then its argument prototype would still apply. */
5493 if { (eval echo configure:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5495 eval "ac_cv_lib_$ac_lib_var=yes"
5497 echo "configure: failed program was:" >&5
5498 cat conftest.$ac_ext >&5
5500 eval "ac_cv_lib_$ac_lib_var=no"
5503 LIBS="$ac_save_LIBS"
5506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5507 echo "$ac_t""yes" 1>&6
5508 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
5510 echo "$ac_t""no" 1>&6
5511 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
5512 echo "configure:5524: checking for getprpwnam in -lsecurity" >&5
5513 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
5514 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5515 echo $ac_n "(cached) $ac_c" 1>&6
5517 ac_save_LIBS="$LIBS"
5518 LIBS="-lsecurity $LIBS"
5519 cat > conftest.$ac_ext <<EOF
5520 #line 5532 "configure"
5521 #include "confdefs.h"
5522 /* Override any gcc2 internal prototype to avoid an error. */
5523 /* We use char because int might match the return type of a gcc2
5524 builtin and then its argument prototype would still apply. */
5531 if { (eval echo configure:5543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5533 eval "ac_cv_lib_$ac_lib_var=yes"
5535 echo "configure: failed program was:" >&5
5536 cat conftest.$ac_ext >&5
5538 eval "ac_cv_lib_$ac_lib_var=no"
5541 LIBS="$ac_save_LIBS"
5544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5545 echo "$ac_t""yes" 1>&6
5546 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5548 echo "$ac_t""no" 1>&6
5556 ###############################################################################
5558 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
5560 ###############################################################################
5562 if test "$with_shadow" = yes ; then
5563 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5564 echo "configure:5576: checking for HP-style shadow passwords" >&5
5565 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5566 echo $ac_n "(cached) $ac_c" 1>&6
5569 ac_save_CPPFLAGS="$CPPFLAGS"
5570 if test \! -z "$includedir" ; then
5571 CPPFLAGS="$CPPFLAGS -I$includedir"
5573 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5574 cat > conftest.$ac_ext <<EOF
5575 #line 5587 "configure"
5576 #include "confdefs.h"
5579 #include <sys/types.h>
5581 #include <hpsecurity.h>
5584 struct s_passwd *p = getspwnam("nobody");
5585 const char *pw = p->pw_passwd;
5588 if { (eval echo configure:5600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5590 ac_cv_hpux_passwd=yes
5592 echo "configure: failed program was:" >&5
5593 cat conftest.$ac_ext >&5
5595 ac_cv_hpux_passwd=no
5598 CPPFLAGS="$ac_save_CPPFLAGS"
5601 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
5602 if test "$ac_cv_hpux_passwd" = yes; then
5603 have_shadow_hpux=yes
5607 # on HPUX, bigcrypt is in -lsec
5608 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
5609 echo "configure:5621: checking for bigcrypt in -lsec" >&5
5610 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
5611 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5612 echo $ac_n "(cached) $ac_c" 1>&6
5614 ac_save_LIBS="$LIBS"
5616 cat > conftest.$ac_ext <<EOF
5617 #line 5629 "configure"
5618 #include "confdefs.h"
5619 /* Override any gcc2 internal prototype to avoid an error. */
5620 /* We use char because int might match the return type of a gcc2
5621 builtin and then its argument prototype would still apply. */
5628 if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5630 eval "ac_cv_lib_$ac_lib_var=yes"
5632 echo "configure: failed program was:" >&5
5633 cat conftest.$ac_ext >&5
5635 eval "ac_cv_lib_$ac_lib_var=no"
5638 LIBS="$ac_save_LIBS"
5641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5642 echo "$ac_t""yes" 1>&6
5643 PASSWD_LIBS="$PASSWD_LIBS -lsec"
5645 echo "$ac_t""no" 1>&6
5652 ###############################################################################
5654 # Check for FreeBSD-style shadow passwords.
5656 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
5657 # password systems -- except you only get stuff in the pw_passwd field
5658 # if the running program is setuid. So, guess that we've got this
5659 # lossage to contend with if /etc/master.passwd exists, and default to
5660 # a setuid installation.
5662 ###############################################################################
5664 if test "$with_shadow" = yes ; then
5665 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
5666 echo "configure:5678: checking for FreeBSD-style shadow passwords" >&5
5667 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
5668 echo $ac_n "(cached) $ac_c" 1>&6
5670 if test -f /etc/master.passwd ; then
5671 ac_cv_master_passwd=yes
5673 ac_cv_master_passwd=no
5677 echo "$ac_t""$ac_cv_master_passwd" 1>&6
5678 if test "$ac_cv_master_passwd" = yes; then
5684 ###############################################################################
5686 # Check for traditional (ha!) shadow passwords.
5688 ###############################################################################
5690 if test "$with_shadow" = yes ; then
5691 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
5692 echo "configure:5704: checking for generic shadow passwords" >&5
5693 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
5694 echo $ac_n "(cached) $ac_c" 1>&6
5697 ac_save_CPPFLAGS="$CPPFLAGS"
5698 if test \! -z "$includedir" ; then
5699 CPPFLAGS="$CPPFLAGS -I$includedir"
5701 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5702 cat > conftest.$ac_ext <<EOF
5703 #line 5715 "configure"
5704 #include "confdefs.h"
5707 #include <sys/types.h>
5711 struct spwd *p = getspnam("nobody");
5712 const char *pw = p->sp_pwdp;
5715 if { (eval echo configure:5727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5719 echo "configure: failed program was:" >&5
5720 cat conftest.$ac_ext >&5
5725 CPPFLAGS="$ac_save_CPPFLAGS"
5728 echo "$ac_t""$ac_cv_shadow" 1>&6
5729 if test "$ac_cv_shadow" = yes; then
5733 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
5735 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
5736 echo "configure:5748: checking for getspnam in -lc" >&5
5737 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
5738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5739 echo $ac_n "(cached) $ac_c" 1>&6
5741 ac_save_LIBS="$LIBS"
5743 cat > conftest.$ac_ext <<EOF
5744 #line 5756 "configure"
5745 #include "confdefs.h"
5746 /* Override any gcc2 internal prototype to avoid an error. */
5747 /* We use char because int might match the return type of a gcc2
5748 builtin and then its argument prototype would still apply. */
5755 if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5757 eval "ac_cv_lib_$ac_lib_var=yes"
5759 echo "configure: failed program was:" >&5
5760 cat conftest.$ac_ext >&5
5762 eval "ac_cv_lib_$ac_lib_var=no"
5765 LIBS="$ac_save_LIBS"
5768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5769 echo "$ac_t""yes" 1>&6
5772 echo "$ac_t""no" 1>&6
5775 if test "$have_getspnam" = no ; then
5776 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
5777 echo "configure:5789: checking for getspnam in -lgen" >&5
5778 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
5779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5780 echo $ac_n "(cached) $ac_c" 1>&6
5782 ac_save_LIBS="$LIBS"
5784 cat > conftest.$ac_ext <<EOF
5785 #line 5797 "configure"
5786 #include "confdefs.h"
5787 /* Override any gcc2 internal prototype to avoid an error. */
5788 /* We use char because int might match the return type of a gcc2
5789 builtin and then its argument prototype would still apply. */
5796 if { (eval echo configure:5808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5798 eval "ac_cv_lib_$ac_lib_var=yes"
5800 echo "configure: failed program was:" >&5
5801 cat conftest.$ac_ext >&5
5803 eval "ac_cv_lib_$ac_lib_var=no"
5806 LIBS="$ac_save_LIBS"
5809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5810 echo "$ac_t""yes" 1>&6
5811 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
5813 echo "$ac_t""no" 1>&6
5821 ###############################################################################
5823 # Check for other libraries needed for non-shadow passwords.
5825 ###############################################################################
5827 if test "$enable_locking" = yes ; then
5829 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
5831 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
5832 echo "configure:5844: checking for crypt in -lc" >&5
5833 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
5834 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5835 echo $ac_n "(cached) $ac_c" 1>&6
5837 ac_save_LIBS="$LIBS"
5839 cat > conftest.$ac_ext <<EOF
5840 #line 5852 "configure"
5841 #include "confdefs.h"
5842 /* Override any gcc2 internal prototype to avoid an error. */
5843 /* We use char because int might match the return type of a gcc2
5844 builtin and then its argument prototype would still apply. */
5851 if { (eval echo configure:5863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5853 eval "ac_cv_lib_$ac_lib_var=yes"
5855 echo "configure: failed program was:" >&5
5856 cat conftest.$ac_ext >&5
5858 eval "ac_cv_lib_$ac_lib_var=no"
5861 LIBS="$ac_save_LIBS"
5864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5865 echo "$ac_t""yes" 1>&6
5868 echo "$ac_t""no" 1>&6
5871 if test "$have_crypt" = no ; then
5872 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
5873 echo "configure:5885: checking for crypt in -lcrypt" >&5
5874 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
5875 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5876 echo $ac_n "(cached) $ac_c" 1>&6
5878 ac_save_LIBS="$LIBS"
5879 LIBS="-lcrypt $LIBS"
5880 cat > conftest.$ac_ext <<EOF
5881 #line 5893 "configure"
5882 #include "confdefs.h"
5883 /* Override any gcc2 internal prototype to avoid an error. */
5884 /* We use char because int might match the return type of a gcc2
5885 builtin and then its argument prototype would still apply. */
5892 if { (eval echo configure:5904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5894 eval "ac_cv_lib_$ac_lib_var=yes"
5896 echo "configure: failed program was:" >&5
5897 cat conftest.$ac_ext >&5
5899 eval "ac_cv_lib_$ac_lib_var=no"
5902 LIBS="$ac_save_LIBS"
5905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5906 echo "$ac_t""yes" 1>&6
5907 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
5909 echo "$ac_t""no" 1>&6
5916 # Most of the above shadow mechanisms will have set need_setuid to yes,
5917 # if they were found. But, on some systems, we need setuid even when
5918 # using plain old vanilla passwords.
5920 if test "$enable_locking" = yes ; then
5922 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
5929 if test "$have_shadow_adjunct" = yes ; then
5930 cat >> confdefs.h <<\EOF
5931 #define HAVE_ADJUNCT_PASSWD 1
5934 elif test "$have_shadow_enhanced" = yes ; then
5935 cat >> confdefs.h <<\EOF
5936 #define HAVE_ENHANCED_PASSWD 1
5939 elif test "$have_shadow_hpux" = yes ; then
5940 cat >> confdefs.h <<\EOF
5941 #define HAVE_HPUX_PASSWD 1
5944 elif test "$have_shadow" = yes ; then
5945 cat >> confdefs.h <<\EOF
5946 #define HAVE_SHADOW_PASSWD 1
5952 ###############################################################################
5956 ###############################################################################
5959 with_motif_req=unspecified
5960 # Check whether --with-motif or --without-motif was given.
5961 if test "${with_motif+set}" = set; then
5962 withval="$with_motif"
5963 with_motif="$withval"; with_motif_req="$withval"
5970 case "$with_motif" in
5975 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
5976 echo "configure:5988: checking for Motif headers" >&5
5977 d=$with_motif/include
5979 X_CFLAGS="-I$d $X_CFLAGS"
5980 echo "$ac_t""$d" 1>&6
5982 echo "$ac_t""not found ($d: no such directory)" 1>&6
5985 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
5986 echo "configure:5998: checking for Motif libs" >&5
5989 X_LIBS="-L$d $X_LIBS"
5990 echo "$ac_t""$d" 1>&6
5992 echo "$ac_t""not found ($d: no such directory)" 1>&6
5995 # replace the directory string with "yes".
5996 with_motif_req="yes"
5997 with_motif=$with_motif_req
6002 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6003 echo " If it is a directory, then \`DIR/include' will be added to"
6004 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6010 if test "$with_motif" != yes -a "$with_motif" != no ; then
6011 echo "error: must be yes or no: --with-motif=$with_motif"
6015 if test "$with_motif" = yes; then
6018 ac_save_CPPFLAGS="$CPPFLAGS"
6019 if test \! -z "$includedir" ; then
6020 CPPFLAGS="$CPPFLAGS -I$includedir"
6022 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6023 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6024 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6025 echo "configure:6037: checking for Xm/Xm.h" >&5
6026 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6027 echo $ac_n "(cached) $ac_c" 1>&6
6029 cat > conftest.$ac_ext <<EOF
6030 #line 6042 "configure"
6031 #include "confdefs.h"
6034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6035 { (eval echo configure:6047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6037 if test -z "$ac_err"; then
6039 eval "ac_cv_header_$ac_safe=yes"
6042 echo "configure: failed program was:" >&5
6043 cat conftest.$ac_ext >&5
6045 eval "ac_cv_header_$ac_safe=no"
6049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6050 echo "$ac_t""yes" 1>&6
6052 cat >> confdefs.h <<\EOF
6053 #define HAVE_MOTIF 1
6056 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6058 echo "$ac_t""no" 1>&6
6061 CPPFLAGS="$ac_save_CPPFLAGS"
6065 ###############################################################################
6069 ###############################################################################
6072 with_gtk_req=unspecified
6073 # Check whether --with-gtk or --without-gtk was given.
6074 if test "${with_gtk+set}" = set; then
6076 with_gtk="$withval"; with_gtk_req="$withval"
6082 # if --with-gtk=/directory/ was specified, remember that directory so that
6083 # we can also look for the `gtk-config' program in that directory.
6099 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6100 echo "configure:6112: checking for Gtk headers" >&5
6103 X_CFLAGS="-I$d $X_CFLAGS"
6104 echo "$ac_t""$d" 1>&6
6106 echo "$ac_t""not found ($d: no such directory)" 1>&6
6109 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6110 echo "configure:6122: checking for Gtk libs" >&5
6113 X_LIBS="-L$d $X_LIBS"
6114 echo "$ac_t""$d" 1>&6
6116 echo "$ac_t""not found ($d: no such directory)" 1>&6
6119 # replace the directory string with "yes".
6121 with_gtk=$with_gtk_req
6126 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6127 echo " If it is a directory, then \`DIR/include' will be added to"
6128 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6134 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6135 echo "error: must be yes or no: --with-gtk=$with_gtk"
6140 if test "$with_gtk" = yes; then
6143 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6144 # for glib-config and gtk-config.
6148 if test ! -z "$gtk_dir"; then
6149 # canonicalize slashes.
6150 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6151 gtk_path="$gtk_dir:$gtk_dir:$gtk_path"
6154 for ac_prog in glib-config
6156 # Extract the first word of "$ac_prog", so it can be a program name with args.
6157 set dummy $ac_prog; ac_word=$2
6158 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6159 echo "configure:6171: checking for $ac_word" >&5
6160 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6161 echo $ac_n "(cached) $ac_c" 1>&6
6163 case "$glib_config" in
6165 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6168 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6171 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6172 ac_dummy="$gtk_path"
6173 for ac_dir in $ac_dummy; do
6174 test -z "$ac_dir" && ac_dir=.
6175 if test -f $ac_dir/$ac_word; then
6176 ac_cv_path_glib_config="$ac_dir/$ac_word"
6184 glib_config="$ac_cv_path_glib_config"
6185 if test -n "$glib_config"; then
6186 echo "$ac_t""$glib_config" 1>&6
6188 echo "$ac_t""no" 1>&6
6191 test -n "$glib_config" && break
6194 for ac_prog in gtk-config
6196 # Extract the first word of "$ac_prog", so it can be a program name with args.
6197 set dummy $ac_prog; ac_word=$2
6198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6199 echo "configure:6211: checking for $ac_word" >&5
6200 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6201 echo $ac_n "(cached) $ac_c" 1>&6
6203 case "$gtk_config" in
6205 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6208 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6211 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6212 ac_dummy="$gtk_path"
6213 for ac_dir in $ac_dummy; do
6214 test -z "$ac_dir" && ac_dir=.
6215 if test -f $ac_dir/$ac_word; then
6216 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6224 gtk_config="$ac_cv_path_gtk_config"
6225 if test -n "$gtk_config"; then
6226 echo "$ac_t""$gtk_config" 1>&6
6228 echo "$ac_t""no" 1>&6
6231 test -n "$gtk_config" && break
6235 if test -n "$glib_config" -a -n "gtk_config" ; then
6238 if test "$have_gtk" = yes; then
6239 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6240 echo "configure:6252: checking Gtk version number" >&5
6241 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6242 echo $ac_n "(cached) $ac_c" 1>&6
6244 ac_cv_gtk_version_string=`$glib_config --version`
6247 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6248 ac_gtk_version_string=$ac_cv_gtk_version_string
6251 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6252 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6254 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6255 if test -z "$ac_gtk_version"; then
6256 ac_gtk_version=unknown
6257 ac_gtk_version_string=unknown
6259 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6265 if test "$have_gtk" = yes; then
6266 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6267 echo "configure:6279: checking for Gtk includes" >&5
6268 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6269 echo $ac_n "(cached) $ac_c" 1>&6
6271 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6274 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6275 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6276 echo "configure:6288: checking for Gtk libs" >&5
6277 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6278 echo $ac_n "(cached) $ac_c" 1>&6
6280 ac_cv_gtk_config_libs=`$gtk_config --libs`
6283 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6284 INCLUDES="$INCLUDES $ac_cv_gtk_config_cflags"
6285 GTK_LIBS="$GTK_LIBS $ac_cv_gtk_config_libs"
6286 cat >> confdefs.h <<\EOF
6294 ###############################################################################
6296 # Check for -lXaw and -lXaw3d.
6298 ###############################################################################
6302 with_athena_req=unspecified
6303 # Check whether --with-athena or --without-athena was given.
6304 if test "${with_athena+set}" = set; then
6305 withval="$with_athena"
6306 with_athena="$withval"; with_athena_req="$withval"
6313 case "$with_athena" in
6318 echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
6319 echo "configure:6331: checking for Athena headers" >&5
6320 d=$with_athena/include
6322 X_CFLAGS="-I$d $X_CFLAGS"
6323 echo "$ac_t""$d" 1>&6
6325 echo "$ac_t""not found ($d: no such directory)" 1>&6
6328 echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
6329 echo "configure:6341: checking for Athena libs" >&5
6332 X_LIBS="-L$d $X_LIBS"
6333 echo "$ac_t""$d" 1>&6
6335 echo "$ac_t""not found ($d: no such directory)" 1>&6
6338 # replace the directory string with "yes".
6339 with_athena_req="yes"
6340 with_athena=$with_athena_req
6345 echo "error: argument to --with-athena must be \"yes\", \"no\", or a directory."
6346 echo " If it is a directory, then \`DIR/include' will be added to"
6347 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6354 if test "$with_athena" != yes -a "$with_athena" != no ; then
6355 echo "error: must be yes or no: --with-athena=$with_athena"
6360 if test "$with_athena" = yes; then
6363 ac_save_CPPFLAGS="$CPPFLAGS"
6364 if test \! -z "$includedir" ; then
6365 CPPFLAGS="$CPPFLAGS -I$includedir"
6367 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6368 ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
6369 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
6370 echo "configure:6382: checking for X11/Xaw/Dialog.h" >&5
6371 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6372 echo $ac_n "(cached) $ac_c" 1>&6
6374 cat > conftest.$ac_ext <<EOF
6375 #line 6387 "configure"
6376 #include "confdefs.h"
6377 #include <X11/Xaw/Dialog.h>
6379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6380 { (eval echo configure:6392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6382 if test -z "$ac_err"; then
6384 eval "ac_cv_header_$ac_safe=yes"
6387 echo "configure: failed program was:" >&5
6388 cat conftest.$ac_ext >&5
6390 eval "ac_cv_header_$ac_safe=no"
6394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6395 echo "$ac_t""yes" 1>&6
6398 echo "$ac_t""no" 1>&6
6401 CPPFLAGS="$ac_save_CPPFLAGS"
6402 if test "$have_athena" = yes; then
6404 ac_save_CPPFLAGS="$CPPFLAGS"
6405 ac_save_LDFLAGS="$LDFLAGS"
6406 # ac_save_LIBS="$LIBS"
6408 if test \! -z "$includedir" ; then
6409 CPPFLAGS="$CPPFLAGS -I$includedir"
6411 # note: $X_CFLAGS includes $x_includes
6412 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6414 if test \! -z "$libdir" ; then
6415 LDFLAGS="$LDFLAGS -L$libdir"
6417 # note: $X_LIBS includes $x_libraries
6418 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6420 echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
6421 echo "configure:6433: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
6422 ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'`
6423 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6424 echo $ac_n "(cached) $ac_c" 1>&6
6426 ac_save_LIBS="$LIBS"
6427 LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
6428 cat > conftest.$ac_ext <<EOF
6429 #line 6441 "configure"
6430 #include "confdefs.h"
6431 /* Override any gcc2 internal prototype to avoid an error. */
6432 /* We use char because int might match the return type of a gcc2
6433 builtin and then its argument prototype would still apply. */
6434 char Xaw3dComputeTopShadowRGB();
6437 Xaw3dComputeTopShadowRGB()
6440 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6442 eval "ac_cv_lib_$ac_lib_var=yes"
6444 echo "configure: failed program was:" >&5
6445 cat conftest.$ac_ext >&5
6447 eval "ac_cv_lib_$ac_lib_var=no"
6450 LIBS="$ac_save_LIBS"
6453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6454 echo "$ac_t""yes" 1>&6
6455 have_athena=yes; have_athena3d=yes
6457 echo "$ac_t""no" 1>&6
6461 CPPFLAGS="$ac_save_CPPFLAGS"
6462 LDFLAGS="$ac_save_LDFLAGS"
6463 # LIBS="$ac_save_LIBS"
6468 if test "$have_athena" = yes; then
6469 cat >> confdefs.h <<\EOF
6470 #define HAVE_ATHENA 1
6473 ATHENA_LIBS="-lXaw $ATHENA_LIBS"
6476 if test "$have_athena3d" = yes; then
6477 ATHENA3D_LIBS="-lXaw3d $ATHENA3D_LIBS"
6481 # If we have Athena, check whether it's a version that includes
6482 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
6483 if test "$have_athena" = yes ; then
6484 echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
6485 echo "configure:6497: checking for XawViewportSetCoordinates in Viewport.h" >&5
6486 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
6487 echo $ac_n "(cached) $ac_c" 1>&6
6489 ac_cv_have_XawViewportSetCoordinates=no
6491 ac_save_CPPFLAGS="$CPPFLAGS"
6492 if test \! -z "$includedir" ; then
6493 CPPFLAGS="$CPPFLAGS -I$includedir"
6495 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6496 cat > conftest.$ac_ext <<EOF
6497 #line 6509 "configure"
6498 #include "confdefs.h"
6499 #include <X11/Xaw/Viewport.h>
6501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6502 egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then
6504 ac_cv_have_XawViewportSetCoordinates=yes
6508 CPPFLAGS="$ac_save_CPPFLAGS"
6511 echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6
6512 if test "$ac_cv_have_XawViewportSetCoordinates" = yes ; then
6513 cat >> confdefs.h <<\EOF
6514 #define HAVE_XawViewportSetCoordinates 1
6521 ###############################################################################
6523 # Checking whether Motif is really Lesstif.
6525 ###############################################################################
6528 if test "$have_motif" = yes ; then
6529 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6530 echo "configure:6542: checking whether Motif is really LessTif" >&5
6531 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6532 echo $ac_n "(cached) $ac_c" 1>&6
6535 ac_save_CPPFLAGS="$CPPFLAGS"
6536 if test \! -z "$includedir" ; then
6537 CPPFLAGS="$CPPFLAGS -I$includedir"
6539 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6540 cat > conftest.$ac_ext <<EOF
6541 #line 6553 "configure"
6542 #include "confdefs.h"
6545 long vers = LesstifVersion;
6548 if { (eval echo configure:6560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6550 ac_cv_have_lesstif=yes
6552 echo "configure: failed program was:" >&5
6553 cat conftest.$ac_ext >&5
6555 ac_cv_have_lesstif=no
6558 CPPFLAGS="$ac_save_CPPFLAGS"
6561 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
6562 have_lesstif=$ac_cv_have_lesstif
6566 lesstif_version=unknown
6567 lesstif_version_string=unknown
6569 if test "$have_lesstif" = yes ; then
6571 echo unknown > conftest-lt
6572 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
6573 echo "configure:6585: checking LessTif version number" >&5
6574 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
6575 echo $ac_n "(cached) $ac_c" 1>&6
6578 ac_save_CPPFLAGS="$CPPFLAGS"
6579 if test \! -z "$includedir" ; then
6580 CPPFLAGS="$CPPFLAGS -I$includedir"
6582 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6583 if test "$cross_compiling" = yes; then
6584 ac_cv_lesstif_version=unknown
6585 ac_cv_lesstif_version_string=unknown
6587 cat > conftest.$ac_ext <<EOF
6588 #line 6600 "configure"
6589 #include "confdefs.h"
6593 FILE *f = fopen("conftest-lt", "w");
6595 fprintf(f, "%d %d.%d\n", LesstifVersion,
6596 LESSTIF_VERSION, LESSTIF_REVISION);
6601 if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6603 ltv=`cat conftest-lt`
6604 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
6605 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
6607 echo "configure: failed program was:" >&5
6608 cat conftest.$ac_ext >&5
6610 ac_cv_lesstif_version=unknown
6611 ac_cv_lesstif_version_string=unknown
6616 CPPFLAGS="$ac_save_CPPFLAGS"
6619 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
6621 lesstif_version=$ac_cv_lesstif_version
6622 lesstif_version_string=$ac_cv_lesstif_version_string
6627 if test "$have_motif" = yes ; then
6629 echo unknown > conftest-mt
6630 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
6631 echo "configure:6643: checking Motif version number" >&5
6632 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
6633 echo $ac_n "(cached) $ac_c" 1>&6
6636 ac_save_CPPFLAGS="$CPPFLAGS"
6637 if test \! -z "$includedir" ; then
6638 CPPFLAGS="$CPPFLAGS -I$includedir"
6640 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6641 if test "$cross_compiling" = yes; then
6642 ac_cv_motif_version=unknown
6643 ac_cv_motif_version_string=unknown
6645 cat > conftest.$ac_ext <<EOF
6646 #line 6658 "configure"
6647 #include "confdefs.h"
6651 FILE *f = fopen("conftest-mt", "w");
6653 fprintf(f, "%d %d.%d\n", XmVersion,
6654 XmVERSION, XmREVISION);
6659 if { (eval echo configure:6671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6661 mtv=`cat conftest-mt`
6662 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
6663 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
6665 echo "configure: failed program was:" >&5
6666 cat conftest.$ac_ext >&5
6668 ac_cv_motif_version=unknown
6669 ac_cv_motif_version_string=unknown
6674 CPPFLAGS="$ac_save_CPPFLAGS"
6677 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
6679 motif_version=$ac_cv_motif_version
6680 motif_version_string=$ac_cv_motif_version_string
6685 ###############################################################################
6687 # Checking whether Motif requires -lXpm.
6689 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
6690 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
6691 # of the library whether to build the XPM code into libXm, or whether
6692 # to rely on an external libXm. So the only way to tell whether XPM is
6693 # a link-time requirement is to examine libXm.a, which is very
6694 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
6695 # always link against XPM if the XPM lib exists (and this will be a
6696 # no-op if libXm happens to already have the XPM code in it.)
6698 ###############################################################################
6700 motif_requires_xpm=no
6701 if test "$have_motif" = yes ; then
6702 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
6703 echo "configure:6715: checking whether Motif requires XPM" >&5
6704 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
6706 motif_requires_xpm=yes
6707 echo "$ac_t""maybe" 1>&6
6709 echo "$ac_t""no" 1>&6
6714 ###############################################################################
6716 # Checking whether Motif requires -lXp.
6718 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
6719 # Extension". Why this extension isn't in -lXext with all the others,
6722 ###############################################################################
6725 if test "$have_motif" = yes ; then
6728 ac_save_CPPFLAGS="$CPPFLAGS"
6729 ac_save_LDFLAGS="$LDFLAGS"
6730 # ac_save_LIBS="$LIBS"
6732 if test \! -z "$includedir" ; then
6733 CPPFLAGS="$CPPFLAGS -I$includedir"
6735 # note: $X_CFLAGS includes $x_includes
6736 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6738 if test \! -z "$libdir" ; then
6739 LDFLAGS="$LDFLAGS -L$libdir"
6741 # note: $X_LIBS includes $x_libraries
6742 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6744 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
6745 echo "configure:6757: checking for XpQueryExtension in -lXp" >&5
6746 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
6747 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6748 echo $ac_n "(cached) $ac_c" 1>&6
6750 ac_save_LIBS="$LIBS"
6751 LIBS="-lXp -lX11 -lXext -lm $LIBS"
6752 cat > conftest.$ac_ext <<EOF
6753 #line 6765 "configure"
6754 #include "confdefs.h"
6755 /* Override any gcc2 internal prototype to avoid an error. */
6756 /* We use char because int might match the return type of a gcc2
6757 builtin and then its argument prototype would still apply. */
6758 char XpQueryExtension();
6764 if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6766 eval "ac_cv_lib_$ac_lib_var=yes"
6768 echo "configure: failed program was:" >&5
6769 cat conftest.$ac_ext >&5
6771 eval "ac_cv_lib_$ac_lib_var=no"
6774 LIBS="$ac_save_LIBS"
6777 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6778 echo "$ac_t""yes" 1>&6
6779 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
6781 echo "$ac_t""no" 1>&6
6785 CPPFLAGS="$ac_save_CPPFLAGS"
6786 LDFLAGS="$ac_save_LDFLAGS"
6787 # LIBS="$ac_save_LIBS"
6792 ###############################################################################
6794 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
6796 ###############################################################################
6799 if test "$have_motif" = yes ; then
6801 ac_save_CPPFLAGS="$CPPFLAGS"
6802 ac_save_LDFLAGS="$LDFLAGS"
6803 # ac_save_LIBS="$LIBS"
6805 if test \! -z "$includedir" ; then
6806 CPPFLAGS="$CPPFLAGS -I$includedir"
6808 # note: $X_CFLAGS includes $x_includes
6809 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6811 if test \! -z "$libdir" ; then
6812 LDFLAGS="$LDFLAGS -L$libdir"
6814 # note: $X_LIBS includes $x_libraries
6815 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6817 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
6818 echo "configure:6830: checking for _Xsetlocale in -lXintl" >&5
6819 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
6820 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6821 echo $ac_n "(cached) $ac_c" 1>&6
6823 ac_save_LIBS="$LIBS"
6824 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
6825 cat > conftest.$ac_ext <<EOF
6826 #line 6838 "configure"
6827 #include "confdefs.h"
6828 /* Override any gcc2 internal prototype to avoid an error. */
6829 /* We use char because int might match the return type of a gcc2
6830 builtin and then its argument prototype would still apply. */
6837 if { (eval echo configure:6849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6839 eval "ac_cv_lib_$ac_lib_var=yes"
6841 echo "configure: failed program was:" >&5
6842 cat conftest.$ac_ext >&5
6844 eval "ac_cv_lib_$ac_lib_var=no"
6847 LIBS="$ac_save_LIBS"
6850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6851 echo "$ac_t""yes" 1>&6
6854 echo "$ac_t""no" 1>&6
6858 CPPFLAGS="$ac_save_CPPFLAGS"
6859 LDFLAGS="$ac_save_LDFLAGS"
6860 # LIBS="$ac_save_LIBS"
6862 if test "$have_xintl" = yes; then
6863 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
6868 ###############################################################################
6870 # Check for -lGL or -lMesaGL.
6872 ###############################################################################
6876 with_gl_req=unspecified
6877 # Check whether --with-gl or --without-gl was given.
6878 if test "${with_gl+set}" = set; then
6880 with_gl="$withval"; with_gl_req="$withval"
6892 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
6893 echo "configure:6905: checking for GL headers" >&5
6896 X_CFLAGS="-I$d $X_CFLAGS"
6897 echo "$ac_t""$d" 1>&6
6899 echo "$ac_t""not found ($d: no such directory)" 1>&6
6902 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
6903 echo "configure:6915: checking for GL libs" >&5
6906 X_LIBS="-L$d $X_LIBS"
6907 echo "$ac_t""$d" 1>&6
6909 echo "$ac_t""not found ($d: no such directory)" 1>&6
6912 # replace the directory string with "yes".
6914 with_gl=$with_gl_req
6919 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
6920 echo " If it is a directory, then \`DIR/include' will be added to"
6921 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6927 ac_mesagl_version=unknown
6928 ac_mesagl_version_string=unknown
6930 if test "$with_gl" = yes; then
6932 ac_save_CPPFLAGS="$CPPFLAGS"
6933 if test \! -z "$includedir" ; then
6934 CPPFLAGS="$CPPFLAGS -I$includedir"
6936 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6937 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
6938 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
6939 echo "configure:6951: checking for GL/gl.h" >&5
6940 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6941 echo $ac_n "(cached) $ac_c" 1>&6
6943 cat > conftest.$ac_ext <<EOF
6944 #line 6956 "configure"
6945 #include "confdefs.h"
6948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6949 { (eval echo configure:6961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6951 if test -z "$ac_err"; then
6953 eval "ac_cv_header_$ac_safe=yes"
6956 echo "configure: failed program was:" >&5
6957 cat conftest.$ac_ext >&5
6959 eval "ac_cv_header_$ac_safe=no"
6963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6964 echo "$ac_t""yes" 1>&6
6967 echo "$ac_t""no" 1>&6
6970 CPPFLAGS="$ac_save_CPPFLAGS"
6971 if test "$have_gl" = yes ; then
6973 ac_save_CPPFLAGS="$CPPFLAGS"
6974 if test \! -z "$includedir" ; then
6975 CPPFLAGS="$CPPFLAGS -I$includedir"
6977 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6978 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
6979 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
6980 echo "configure:6992: checking for GL/glx.h" >&5
6981 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6982 echo $ac_n "(cached) $ac_c" 1>&6
6984 cat > conftest.$ac_ext <<EOF
6985 #line 6997 "configure"
6986 #include "confdefs.h"
6989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6990 { (eval echo configure:7002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6992 if test -z "$ac_err"; then
6994 eval "ac_cv_header_$ac_safe=yes"
6997 echo "configure: failed program was:" >&5
6998 cat conftest.$ac_ext >&5
7000 eval "ac_cv_header_$ac_safe=no"
7004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7005 echo "$ac_t""yes" 1>&6
7008 echo "$ac_t""no" 1>&6
7011 CPPFLAGS="$ac_save_CPPFLAGS"
7014 # If we have the headers, try and figure out which vendor it's from.
7016 if test "$have_gl" = yes ; then
7018 # We need to know whether it's MesaGL so that we know which libraries
7021 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7022 echo "configure:7034: checking whether GL is really MesaGL" >&5
7023 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7024 echo $ac_n "(cached) $ac_c" 1>&6
7026 ac_cv_have_mesa_gl=no
7028 ac_save_CPPFLAGS="$CPPFLAGS"
7029 if test \! -z "$includedir" ; then
7030 CPPFLAGS="$CPPFLAGS -I$includedir"
7032 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7033 cat > conftest.$ac_ext <<EOF
7034 #line 7046 "configure"
7035 #include "confdefs.h"
7038 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7039 egrep "Mesa" >/dev/null 2>&1; then
7041 ac_cv_have_mesa_gl=yes
7045 CPPFLAGS="$ac_save_CPPFLAGS"
7049 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7050 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7057 # Some versions of MesaGL are compiled to require -lpthread.
7058 # So if the Mesa headers exist, and -lpthread exists, then always
7059 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
7061 if test "$ac_have_mesa_gl" = yes; then
7062 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7063 echo "configure:7075: checking for pthread_create in -lpthread" >&5
7064 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7065 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7066 echo $ac_n "(cached) $ac_c" 1>&6
7068 ac_save_LIBS="$LIBS"
7069 LIBS="-lpthread $LIBS"
7070 cat > conftest.$ac_ext <<EOF
7071 #line 7083 "configure"
7072 #include "confdefs.h"
7073 /* Override any gcc2 internal prototype to avoid an error. */
7074 /* We use char because int might match the return type of a gcc2
7075 builtin and then its argument prototype would still apply. */
7076 char pthread_create();
7082 if { (eval echo configure:7094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7084 eval "ac_cv_lib_$ac_lib_var=yes"
7086 echo "configure: failed program was:" >&5
7087 cat conftest.$ac_ext >&5
7089 eval "ac_cv_lib_$ac_lib_var=no"
7092 LIBS="$ac_save_LIBS"
7095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7096 echo "$ac_t""yes" 1>&6
7099 echo "$ac_t""no" 1>&6
7105 # If we have Mesa headers, check to see if we can link against -lMesaGL.
7106 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
7107 # Else, warn that GL is busted. (We have the headers, but no libs.)
7110 if test "$ac_have_mesa_gl" = yes ; then
7112 ac_save_CPPFLAGS="$CPPFLAGS"
7113 ac_save_LDFLAGS="$LDFLAGS"
7114 # ac_save_LIBS="$LIBS"
7116 if test \! -z "$includedir" ; then
7117 CPPFLAGS="$CPPFLAGS -I$includedir"
7119 # note: $X_CFLAGS includes $x_includes
7120 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7122 if test \! -z "$libdir" ; then
7123 LDFLAGS="$LDFLAGS -L$libdir"
7125 # note: $X_LIBS includes $x_libraries
7126 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7128 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
7129 echo "configure:7141: checking for glXCreateContext in -lMesaGL" >&5
7130 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7131 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7132 echo $ac_n "(cached) $ac_c" 1>&6
7134 ac_save_LIBS="$LIBS"
7135 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7136 cat > conftest.$ac_ext <<EOF
7137 #line 7149 "configure"
7138 #include "confdefs.h"
7139 /* Override any gcc2 internal prototype to avoid an error. */
7140 /* We use char because int might match the return type of a gcc2
7141 builtin and then its argument prototype would still apply. */
7142 char glXCreateContext();
7148 if { (eval echo configure:7160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7150 eval "ac_cv_lib_$ac_lib_var=yes"
7152 echo "configure: failed program was:" >&5
7153 cat conftest.$ac_ext >&5
7155 eval "ac_cv_lib_$ac_lib_var=no"
7158 LIBS="$ac_save_LIBS"
7161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7162 echo "$ac_t""yes" 1>&6
7164 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
7166 echo "$ac_t""no" 1>&6
7169 CPPFLAGS="$ac_save_CPPFLAGS"
7170 LDFLAGS="$ac_save_LDFLAGS"
7171 # LIBS="$ac_save_LIBS"
7175 if test "$gl_lib_1" = "" ; then
7177 ac_save_CPPFLAGS="$CPPFLAGS"
7178 ac_save_LDFLAGS="$LDFLAGS"
7179 # ac_save_LIBS="$LIBS"
7181 if test \! -z "$includedir" ; then
7182 CPPFLAGS="$CPPFLAGS -I$includedir"
7184 # note: $X_CFLAGS includes $x_includes
7185 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7187 if test \! -z "$libdir" ; then
7188 LDFLAGS="$LDFLAGS -L$libdir"
7190 # note: $X_LIBS includes $x_libraries
7191 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7193 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7194 echo "configure:7206: checking for glXCreateContext in -lGL" >&5
7195 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7196 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7197 echo $ac_n "(cached) $ac_c" 1>&6
7199 ac_save_LIBS="$LIBS"
7200 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7201 cat > conftest.$ac_ext <<EOF
7202 #line 7214 "configure"
7203 #include "confdefs.h"
7204 /* Override any gcc2 internal prototype to avoid an error. */
7205 /* We use char because int might match the return type of a gcc2
7206 builtin and then its argument prototype would still apply. */
7207 char glXCreateContext();
7213 if { (eval echo configure:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7215 eval "ac_cv_lib_$ac_lib_var=yes"
7217 echo "configure: failed program was:" >&5
7218 cat conftest.$ac_ext >&5
7220 eval "ac_cv_lib_$ac_lib_var=no"
7223 LIBS="$ac_save_LIBS"
7226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7227 echo "$ac_t""yes" 1>&6
7229 GL_LIBS="-lGL -lGLU $GL_LIBS"
7231 echo "$ac_t""no" 1>&6
7234 CPPFLAGS="$ac_save_CPPFLAGS"
7235 LDFLAGS="$ac_save_LDFLAGS"
7236 # LIBS="$ac_save_LIBS"
7240 if test "$gl_lib_1" = "" ; then
7241 # we have headers, but no libs -- bail.
7245 # linking works -- we can build the GL hacks.
7246 cat >> confdefs.h <<\EOF
7250 if test "$ac_have_mesa_gl" = yes ; then
7251 cat >> confdefs.h <<\EOF
7252 #define HAVE_MESA_GL 1
7260 # Now that we know we have GL headers and libs, do some more GL testing.
7263 if test "$have_gl" = yes ; then
7264 # If it's MesaGL, we'd like to issue a warning if the version number
7265 # is less than or equal to 2.6, because that version had a security bug.
7267 if test "$ac_have_mesa_gl" = yes; then
7269 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7270 echo "configure:7282: checking MesaGL version number" >&5
7271 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7272 echo $ac_n "(cached) $ac_c" 1>&6
7274 cat > conftest.$ac_ext <<EOF
7275 #line 7287 "configure"
7276 #include "confdefs.h"
7278 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7281 ac_save_CPPFLAGS="$CPPFLAGS"
7282 if test \! -z "$includedir" ; then
7283 CPPFLAGS="$CPPFLAGS -I$includedir"
7285 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7289 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7290 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7293 rm -f conftest.$ac_ext
7295 CPPFLAGS="$ac_save_CPPFLAGS"
7297 if test "$mglv" = ""; then
7298 ac_mesagl_version=unknown
7299 ac_mesagl_version_string=unknown
7301 ac_mesagl_version_string=$mglv
7302 maj=`echo $mglv | sed -n 's/\..*//p'`
7303 min=`echo $mglv | sed -n 's/.*\.//p'`
7304 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7305 if test -z "$ac_mesagl_version"; then
7306 ac_mesagl_version=unknown
7307 ac_mesagl_version_string=unknown
7310 ac_cv_mesagl_version=$ac_mesagl_version
7311 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7315 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7316 ac_mesagl_version=$ac_cv_mesagl_version
7317 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7321 # Check for OpenGL 1.1 features.
7324 ac_save_CPPFLAGS="$CPPFLAGS"
7325 ac_save_LDFLAGS="$LDFLAGS"
7326 # ac_save_LIBS="$LIBS"
7328 if test \! -z "$includedir" ; then
7329 CPPFLAGS="$CPPFLAGS -I$includedir"
7331 # note: $X_CFLAGS includes $x_includes
7332 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7334 if test \! -z "$libdir" ; then
7335 LDFLAGS="$LDFLAGS -L$libdir"
7337 # note: $X_LIBS includes $x_libraries
7338 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7340 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7341 echo "configure:7353: checking for glBindTexture in -l$gl_lib_1" >&5
7342 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7343 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7344 echo $ac_n "(cached) $ac_c" 1>&6
7346 ac_save_LIBS="$LIBS"
7347 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7348 cat > conftest.$ac_ext <<EOF
7349 #line 7361 "configure"
7350 #include "confdefs.h"
7351 /* Override any gcc2 internal prototype to avoid an error. */
7352 /* We use char because int might match the return type of a gcc2
7353 builtin and then its argument prototype would still apply. */
7354 char glBindTexture();
7360 if { (eval echo configure:7372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7362 eval "ac_cv_lib_$ac_lib_var=yes"
7364 echo "configure: failed program was:" >&5
7365 cat conftest.$ac_ext >&5
7367 eval "ac_cv_lib_$ac_lib_var=no"
7370 LIBS="$ac_save_LIBS"
7373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7374 echo "$ac_t""yes" 1>&6
7375 cat >> confdefs.h <<\EOF
7376 #define HAVE_GLBINDTEXTURE 1
7380 echo "$ac_t""no" 1>&6
7384 CPPFLAGS="$ac_save_CPPFLAGS"
7385 LDFLAGS="$ac_save_LDFLAGS"
7386 # LIBS="$ac_save_LIBS"
7390 # Check whether the `xscreensaver' executable should link against GL.
7391 # See comments in utils/visual-gl.c for why this is sometimes necessary.
7393 echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6
7394 echo "configure:7406: checking whether drastic GL measures must be taken" >&5
7397 echo "$ac_t""yes -- hello, SGI." 1>&6
7398 cat >> confdefs.h <<\EOF
7399 #define DAEMON_USE_GL 1
7402 SAVER_GL_SRCS='$(UTILS_SRC)/visual-gl.c'
7403 SAVER_GL_OBJS='$(UTILS_BIN)/visual-gl.o'
7404 SAVER_GL_LIBS="$GL_LIBS"
7407 echo "$ac_t""no -- non-SGI." 1>&6
7416 elif test "$with_gl" != no; then
7417 echo "error: must be yes or no: --with-gl=$with_gl"
7422 ###############################################################################
7426 ###############################################################################
7429 with_gle_req=unspecified
7430 # Check whether --with-gle or --without-gle was given.
7431 if test "${with_gle+set}" = set; then
7433 with_gle="$withval"; with_gle_req="$withval"
7445 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7446 echo "configure:7458: checking for GLE headers" >&5
7449 X_CFLAGS="-I$d $X_CFLAGS"
7450 echo "$ac_t""$d" 1>&6
7452 echo "$ac_t""not found ($d: no such directory)" 1>&6
7455 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7456 echo "configure:7468: checking for GLE libs" >&5
7459 X_LIBS="-L$d $X_LIBS"
7460 echo "$ac_t""$d" 1>&6
7462 echo "$ac_t""not found ($d: no such directory)" 1>&6
7465 # replace the directory string with "yes".
7467 with_gle=$with_gle_req
7472 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7473 echo " If it is a directory, then \`DIR/include' will be added to"
7474 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7482 if test "$with_gle" = yes; then
7485 ac_save_CPPFLAGS="$CPPFLAGS"
7486 if test \! -z "$includedir" ; then
7487 CPPFLAGS="$CPPFLAGS -I$includedir"
7489 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7490 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7491 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7492 echo "configure:7504: checking for GL/gutil.h" >&5
7493 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7494 echo $ac_n "(cached) $ac_c" 1>&6
7496 cat > conftest.$ac_ext <<EOF
7497 #line 7509 "configure"
7498 #include "confdefs.h"
7499 #include <GL/gutil.h>
7501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7502 { (eval echo configure:7514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7504 if test -z "$ac_err"; then
7506 eval "ac_cv_header_$ac_safe=yes"
7509 echo "configure: failed program was:" >&5
7510 cat conftest.$ac_ext >&5
7512 eval "ac_cv_header_$ac_safe=no"
7516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7517 echo "$ac_t""yes" 1>&6
7520 echo "$ac_t""no" 1>&6
7523 CPPFLAGS="$ac_save_CPPFLAGS"
7524 if test "$have_gle" = yes ; then
7526 ac_save_CPPFLAGS="$CPPFLAGS"
7527 if test \! -z "$includedir" ; then
7528 CPPFLAGS="$CPPFLAGS -I$includedir"
7530 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7531 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
7532 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
7533 echo "configure:7545: checking for GL/tube.h" >&5
7534 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7535 echo $ac_n "(cached) $ac_c" 1>&6
7537 cat > conftest.$ac_ext <<EOF
7538 #line 7550 "configure"
7539 #include "confdefs.h"
7540 #include <GL/tube.h>
7542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7543 { (eval echo configure:7555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7545 if test -z "$ac_err"; then
7547 eval "ac_cv_header_$ac_safe=yes"
7550 echo "configure: failed program was:" >&5
7551 cat conftest.$ac_ext >&5
7553 eval "ac_cv_header_$ac_safe=no"
7557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7558 echo "$ac_t""yes" 1>&6
7561 echo "$ac_t""no" 1>&6
7564 CPPFLAGS="$ac_save_CPPFLAGS"
7567 # /usr/local/lib/GL/libgle.a
7568 # /usr/local/lib/GL/libmatrix.a
7570 if test "$have_gle" = yes ; then
7573 ac_save_CPPFLAGS="$CPPFLAGS"
7574 ac_save_LDFLAGS="$LDFLAGS"
7575 # ac_save_LIBS="$LIBS"
7577 if test \! -z "$includedir" ; then
7578 CPPFLAGS="$CPPFLAGS -I$includedir"
7580 # note: $X_CFLAGS includes $x_includes
7581 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7583 if test \! -z "$libdir" ; then
7584 LDFLAGS="$LDFLAGS -L$libdir"
7586 # note: $X_LIBS includes $x_libraries
7587 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7589 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
7590 echo "configure:7602: checking for gleCreateGC in -lgle" >&5
7591 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
7592 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7593 echo $ac_n "(cached) $ac_c" 1>&6
7595 ac_save_LIBS="$LIBS"
7596 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7597 cat > conftest.$ac_ext <<EOF
7598 #line 7610 "configure"
7599 #include "confdefs.h"
7600 /* Override any gcc2 internal prototype to avoid an error. */
7601 /* We use char because int might match the return type of a gcc2
7602 builtin and then its argument prototype would still apply. */
7609 if { (eval echo configure:7621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7611 eval "ac_cv_lib_$ac_lib_var=yes"
7613 echo "configure: failed program was:" >&5
7614 cat conftest.$ac_ext >&5
7616 eval "ac_cv_lib_$ac_lib_var=no"
7619 LIBS="$ac_save_LIBS"
7622 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7623 echo "$ac_t""yes" 1>&6
7624 have_gle=yes; GLE_LIBS="-lgle"
7626 echo "$ac_t""no" 1>&6
7629 CPPFLAGS="$ac_save_CPPFLAGS"
7630 LDFLAGS="$ac_save_LDFLAGS"
7631 # LIBS="$ac_save_LIBS"
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 $X_EXTRA_LIBS"
7653 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
7654 echo "configure:7666: checking for uview_direction_d in -lmatrix" >&5
7655 ac_lib_var=`echo matrix'_'uview_direction_d | 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="-lmatrix $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. */
7667 char uview_direction_d();
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="$GLE_LIBS -lmatrix"
7690 echo "$ac_t""no" 1>&6
7693 CPPFLAGS="$ac_save_CPPFLAGS"
7694 LDFLAGS="$ac_save_LDFLAGS"
7695 # LIBS="$ac_save_LIBS"
7699 if test "$have_gle" = yes ; then
7700 cat >> confdefs.h <<\EOF
7706 elif test "$with_gle" != no; then
7707 echo "error: must be yes or no: --with-gle=$with_gle"
7714 ###############################################################################
7718 ###############################################################################
7721 with_xpm_req=unspecified
7722 # Check whether --with-xpm or --without-xpm was given.
7723 if test "${with_xpm+set}" = set; then
7725 with_xpm="$withval"; with_xpm_req="$withval"
7737 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
7738 echo "configure:7750: checking for XPM headers" >&5
7741 X_CFLAGS="-I$d $X_CFLAGS"
7742 echo "$ac_t""$d" 1>&6
7744 echo "$ac_t""not found ($d: no such directory)" 1>&6
7747 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
7748 echo "configure:7760: checking for XPM libs" >&5
7751 X_LIBS="-L$d $X_LIBS"
7752 echo "$ac_t""$d" 1>&6
7754 echo "$ac_t""not found ($d: no such directory)" 1>&6
7757 # replace the directory string with "yes".
7759 with_xpm=$with_xpm_req
7764 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
7765 echo " If it is a directory, then \`DIR/include' will be added to"
7766 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7772 if test "$with_xpm" = yes; then
7774 ac_save_CPPFLAGS="$CPPFLAGS"
7775 if test \! -z "$includedir" ; then
7776 CPPFLAGS="$CPPFLAGS -I$includedir"
7778 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7779 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
7780 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
7781 echo "configure:7793: checking for X11/xpm.h" >&5
7782 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7783 echo $ac_n "(cached) $ac_c" 1>&6
7785 cat > conftest.$ac_ext <<EOF
7786 #line 7798 "configure"
7787 #include "confdefs.h"
7788 #include <X11/xpm.h>
7790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7791 { (eval echo configure:7803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7793 if test -z "$ac_err"; then
7795 eval "ac_cv_header_$ac_safe=yes"
7798 echo "configure: failed program was:" >&5
7799 cat conftest.$ac_ext >&5
7801 eval "ac_cv_header_$ac_safe=no"
7805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7806 echo "$ac_t""yes" 1>&6
7808 cat >> confdefs.h <<\EOF
7814 echo "$ac_t""no" 1>&6
7817 CPPFLAGS="$ac_save_CPPFLAGS"
7818 elif test "$with_xpm" != no; then
7819 echo "error: must be yes or no: --with-xpm=$with_xpm"
7823 # See comment near $motif_requires_xpm, above.
7824 # Need to do this here, after both Motif and XPM have been checked for.
7826 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
7827 if test "$motif_requires_xpm" = yes ; then
7828 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
7833 ###############################################################################
7835 # Check for the XSHM server extension.
7837 ###############################################################################
7840 with_xshm_req=unspecified
7841 # Check whether --with-xshm-ext or --without-xshm-ext was given.
7842 if test "${with_xshm_ext+set}" = set; then
7843 withval="$with_xshm_ext"
7844 with_xshm="$withval"; with_xshm_req="$withval"
7851 case "$with_xshm" in
7856 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
7857 echo "configure:7869: checking for XSHM headers" >&5
7858 d=$with_xshm/include
7860 X_CFLAGS="-I$d $X_CFLAGS"
7861 echo "$ac_t""$d" 1>&6
7863 echo "$ac_t""not found ($d: no such directory)" 1>&6
7866 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
7867 echo "configure:7879: checking for XSHM libs" >&5
7870 X_LIBS="-L$d $X_LIBS"
7871 echo "$ac_t""$d" 1>&6
7873 echo "$ac_t""not found ($d: no such directory)" 1>&6
7876 # replace the directory string with "yes".
7878 with_xshm=$with_xshm_req
7883 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
7884 echo " If it is a directory, then \`DIR/include' will be added to"
7885 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7891 if test "$with_xshm" = yes; then
7893 # first check for Xshm.h.
7895 ac_save_CPPFLAGS="$CPPFLAGS"
7896 if test \! -z "$includedir" ; then
7897 CPPFLAGS="$CPPFLAGS -I$includedir"
7899 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7900 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
7901 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
7902 echo "configure:7914: checking for X11/extensions/XShm.h" >&5
7903 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7904 echo $ac_n "(cached) $ac_c" 1>&6
7906 cat > conftest.$ac_ext <<EOF
7907 #line 7919 "configure"
7908 #include "confdefs.h"
7909 #include <X11/extensions/XShm.h>
7911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7912 { (eval echo configure:7924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7914 if test -z "$ac_err"; then
7916 eval "ac_cv_header_$ac_safe=yes"
7919 echo "configure: failed program was:" >&5
7920 cat conftest.$ac_ext >&5
7922 eval "ac_cv_header_$ac_safe=no"
7926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7927 echo "$ac_t""yes" 1>&6
7930 echo "$ac_t""no" 1>&6
7933 CPPFLAGS="$ac_save_CPPFLAGS"
7935 # if that succeeded, then check for sys/ipc.h.
7936 if test "$have_xshm" = yes; then
7939 ac_save_CPPFLAGS="$CPPFLAGS"
7940 if test \! -z "$includedir" ; then
7941 CPPFLAGS="$CPPFLAGS -I$includedir"
7943 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7944 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
7945 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
7946 echo "configure:7958: checking for sys/ipc.h" >&5
7947 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7948 echo $ac_n "(cached) $ac_c" 1>&6
7950 cat > conftest.$ac_ext <<EOF
7951 #line 7963 "configure"
7952 #include "confdefs.h"
7953 #include <sys/ipc.h>
7955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7956 { (eval echo configure:7968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7958 if test -z "$ac_err"; then
7960 eval "ac_cv_header_$ac_safe=yes"
7963 echo "configure: failed program was:" >&5
7964 cat conftest.$ac_ext >&5
7966 eval "ac_cv_header_$ac_safe=no"
7970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7971 echo "$ac_t""yes" 1>&6
7974 echo "$ac_t""no" 1>&6
7977 CPPFLAGS="$ac_save_CPPFLAGS"
7980 # if that succeeded, then check for sys/shm.h.
7981 if test "$have_xshm" = yes; then
7984 ac_save_CPPFLAGS="$CPPFLAGS"
7985 if test \! -z "$includedir" ; then
7986 CPPFLAGS="$CPPFLAGS -I$includedir"
7988 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7989 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
7990 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
7991 echo "configure:8003: checking for sys/shm.h" >&5
7992 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7993 echo $ac_n "(cached) $ac_c" 1>&6
7995 cat > conftest.$ac_ext <<EOF
7996 #line 8008 "configure"
7997 #include "confdefs.h"
7998 #include <sys/shm.h>
8000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8001 { (eval echo configure:8013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8003 if test -z "$ac_err"; then
8005 eval "ac_cv_header_$ac_safe=yes"
8008 echo "configure: failed program was:" >&5
8009 cat conftest.$ac_ext >&5
8011 eval "ac_cv_header_$ac_safe=no"
8015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8016 echo "$ac_t""yes" 1>&6
8019 echo "$ac_t""no" 1>&6
8022 CPPFLAGS="$ac_save_CPPFLAGS"
8025 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
8026 # to exist, but the library code to not exist. And even better, the library
8027 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
8028 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
8029 # that's not quite right, but close enough.)
8035 ac_save_CPPFLAGS="$CPPFLAGS"
8036 ac_save_LDFLAGS="$LDFLAGS"
8037 # ac_save_LIBS="$LIBS"
8039 if test \! -z "$includedir" ; then
8040 CPPFLAGS="$CPPFLAGS -I$includedir"
8042 # note: $X_CFLAGS includes $x_includes
8043 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8045 if test \! -z "$libdir" ; then
8046 LDFLAGS="$LDFLAGS -L$libdir"
8048 # note: $X_LIBS includes $x_libraries
8049 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8051 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
8052 echo "configure:8064: checking for XShmQueryExtension in -lXextSam" >&5
8053 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
8054 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8055 echo $ac_n "(cached) $ac_c" 1>&6
8057 ac_save_LIBS="$LIBS"
8058 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
8059 cat > conftest.$ac_ext <<EOF
8060 #line 8072 "configure"
8061 #include "confdefs.h"
8062 /* Override any gcc2 internal prototype to avoid an error. */
8063 /* We use char because int might match the return type of a gcc2
8064 builtin and then its argument prototype would still apply. */
8065 char XShmQueryExtension();
8068 XShmQueryExtension()
8071 if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8073 eval "ac_cv_lib_$ac_lib_var=yes"
8075 echo "configure: failed program was:" >&5
8076 cat conftest.$ac_ext >&5
8078 eval "ac_cv_lib_$ac_lib_var=no"
8081 LIBS="$ac_save_LIBS"
8084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8085 echo "$ac_t""yes" 1>&6
8086 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
8088 echo "$ac_t""no" 1>&6
8092 CPPFLAGS="$ac_save_CPPFLAGS"
8093 LDFLAGS="$ac_save_LDFLAGS"
8094 # LIBS="$ac_save_LIBS"
8099 # if that succeeded, then we've really got it.
8100 if test "$have_xshm" = yes; then
8101 cat >> confdefs.h <<\EOF
8102 #define HAVE_XSHM_EXTENSION 1
8107 elif test "$with_xshm" != no; then
8108 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
8113 ###############################################################################
8115 # Check for the DOUBLE-BUFFER server extension.
8117 ###############################################################################
8120 with_xdbe_req=unspecified
8121 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
8122 if test "${with_xdbe_ext+set}" = set; then
8123 withval="$with_xdbe_ext"
8124 with_xdbe="$withval"; with_xdbe_req="$withval"
8131 case "$with_xdbe" in
8136 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
8137 echo "configure:8149: checking for DOUBLE-BUFFER headers" >&5
8138 d=$with_xdbe/include
8140 X_CFLAGS="-I$d $X_CFLAGS"
8141 echo "$ac_t""$d" 1>&6
8143 echo "$ac_t""not found ($d: no such directory)" 1>&6
8146 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
8147 echo "configure:8159: checking for DOUBLE-BUFFER libs" >&5
8150 X_LIBS="-L$d $X_LIBS"
8151 echo "$ac_t""$d" 1>&6
8153 echo "$ac_t""not found ($d: no such directory)" 1>&6
8156 # replace the directory string with "yes".
8158 with_xdbe=$with_xdbe_req
8163 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
8164 echo " If it is a directory, then \`DIR/include' will be added to"
8165 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8171 if test "$with_xdbe" = yes; then
8174 ac_save_CPPFLAGS="$CPPFLAGS"
8175 if test \! -z "$includedir" ; then
8176 CPPFLAGS="$CPPFLAGS -I$includedir"
8178 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8179 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8180 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8181 echo "configure:8193: checking for X11/extensions/Xdbe.h" >&5
8182 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8183 echo $ac_n "(cached) $ac_c" 1>&6
8185 cat > conftest.$ac_ext <<EOF
8186 #line 8198 "configure"
8187 #include "confdefs.h"
8188 #include <X11/extensions/Xdbe.h>
8190 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8191 { (eval echo configure:8203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8192 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8193 if test -z "$ac_err"; then
8195 eval "ac_cv_header_$ac_safe=yes"
8198 echo "configure: failed program was:" >&5
8199 cat conftest.$ac_ext >&5
8201 eval "ac_cv_header_$ac_safe=no"
8205 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8206 echo "$ac_t""yes" 1>&6
8209 echo "$ac_t""no" 1>&6
8212 CPPFLAGS="$ac_save_CPPFLAGS"
8213 if test "$have_xdbe" = yes; then
8214 cat >> confdefs.h <<\EOF
8215 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8220 elif test "$with_xdbe" != no; then
8221 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8226 ###############################################################################
8228 # Check for the SGI XReadDisplay server extension.
8230 # Note: this has to be down here, rather than up with the other server
8231 # extension tests, so that the output of `configure --help' is in the
8232 # right order. Arrgh!
8234 ###############################################################################
8237 with_readdisplay_req=unspecified
8238 # Check whether --with-readdisplay or --without-readdisplay was given.
8239 if test "${with_readdisplay+set}" = set; then
8240 withval="$with_readdisplay"
8241 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8243 with_readdisplay=yes
8248 case "$with_readdisplay" in
8253 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8254 echo "configure:8266: checking for XReadDisplay headers" >&5
8255 d=$with_readdisplay/include
8257 X_CFLAGS="-I$d $X_CFLAGS"
8258 echo "$ac_t""$d" 1>&6
8260 echo "$ac_t""not found ($d: no such directory)" 1>&6
8263 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8264 echo "configure:8276: checking for XReadDisplay libs" >&5
8265 d=$with_readdisplay/lib
8267 X_LIBS="-L$d $X_LIBS"
8268 echo "$ac_t""$d" 1>&6
8270 echo "$ac_t""not found ($d: no such directory)" 1>&6
8273 # replace the directory string with "yes".
8274 with_readdisplay_req="yes"
8275 with_readdisplay=$with_readdisplay_req
8280 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8281 echo " If it is a directory, then \`DIR/include' will be added to"
8282 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8288 if test "$with_readdisplay" = yes; then
8290 ac_save_CPPFLAGS="$CPPFLAGS"
8291 if test \! -z "$includedir" ; then
8292 CPPFLAGS="$CPPFLAGS -I$includedir"
8294 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8295 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8296 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8297 echo "configure:8309: checking for X11/extensions/readdisplay.h" >&5
8298 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8299 echo $ac_n "(cached) $ac_c" 1>&6
8301 cat > conftest.$ac_ext <<EOF
8302 #line 8314 "configure"
8303 #include "confdefs.h"
8304 #include <X11/extensions/readdisplay.h>
8306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8307 { (eval echo configure:8319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8309 if test -z "$ac_err"; then
8311 eval "ac_cv_header_$ac_safe=yes"
8314 echo "configure: failed program was:" >&5
8315 cat conftest.$ac_ext >&5
8317 eval "ac_cv_header_$ac_safe=no"
8321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8322 echo "$ac_t""yes" 1>&6
8323 cat >> confdefs.h <<\EOF
8324 #define HAVE_READ_DISPLAY_EXTENSION 1
8328 echo "$ac_t""no" 1>&6
8331 CPPFLAGS="$ac_save_CPPFLAGS"
8332 elif test "$with_readdisplay" != no; then
8333 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8338 ###############################################################################
8340 # Check for the SGI Iris Video Library.
8342 ###############################################################################
8345 with_sgivideo_req=unspecified
8346 # Check whether --with-sgivideo or --without-sgivideo was given.
8347 if test "${with_sgivideo+set}" = set; then
8348 withval="$with_sgivideo"
8349 with_sgivideo="$withval"; with_sgivideo_req="$withval"
8356 case "$with_sgivideo" in
8361 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
8362 echo "configure:8374: checking for Iris Video headers" >&5
8363 d=$with_sgivideo/include
8365 X_CFLAGS="-I$d $X_CFLAGS"
8366 echo "$ac_t""$d" 1>&6
8368 echo "$ac_t""not found ($d: no such directory)" 1>&6
8371 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
8372 echo "configure:8384: checking for Iris Video libs" >&5
8373 d=$with_sgivideo/lib
8375 X_LIBS="-L$d $X_LIBS"
8376 echo "$ac_t""$d" 1>&6
8378 echo "$ac_t""not found ($d: no such directory)" 1>&6
8381 # replace the directory string with "yes".
8382 with_sgivideo_req="yes"
8383 with_sgivideo=$with_sgivideo_req
8388 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8389 echo " If it is a directory, then \`DIR/include' will be added to"
8390 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8396 if test "$with_sgivideo" = yes; then
8398 ac_save_CPPFLAGS="$CPPFLAGS"
8399 if test \! -z "$includedir" ; then
8400 CPPFLAGS="$CPPFLAGS -I$includedir"
8402 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8403 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8404 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8405 echo "configure:8417: checking for dmedia/vl.h" >&5
8406 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8407 echo $ac_n "(cached) $ac_c" 1>&6
8409 cat > conftest.$ac_ext <<EOF
8410 #line 8422 "configure"
8411 #include "confdefs.h"
8412 #include <dmedia/vl.h>
8414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8415 { (eval echo configure:8427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8417 if test -z "$ac_err"; then
8419 eval "ac_cv_header_$ac_safe=yes"
8422 echo "configure: failed program was:" >&5
8423 cat conftest.$ac_ext >&5
8425 eval "ac_cv_header_$ac_safe=no"
8429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8430 echo "$ac_t""yes" 1>&6
8433 echo "$ac_t""no" 1>&6
8436 CPPFLAGS="$ac_save_CPPFLAGS"
8437 if test "$have_sgivideo" = yes; then
8439 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8440 echo "configure:8452: checking for vlOpenVideo in -lvl" >&5
8441 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8442 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8443 echo $ac_n "(cached) $ac_c" 1>&6
8445 ac_save_LIBS="$LIBS"
8447 cat > conftest.$ac_ext <<EOF
8448 #line 8460 "configure"
8449 #include "confdefs.h"
8450 /* Override any gcc2 internal prototype to avoid an error. */
8451 /* We use char because int might match the return type of a gcc2
8452 builtin and then its argument prototype would still apply. */
8459 if { (eval echo configure:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8461 eval "ac_cv_lib_$ac_lib_var=yes"
8463 echo "configure: failed program was:" >&5
8464 cat conftest.$ac_ext >&5
8466 eval "ac_cv_lib_$ac_lib_var=no"
8469 LIBS="$ac_save_LIBS"
8472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8473 echo "$ac_t""yes" 1>&6
8476 echo "$ac_t""no" 1>&6
8479 if test "$have_sgivideo" = yes; then
8480 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8481 SGI_VIDEO_LIBS="-lvl"
8482 cat >> confdefs.h <<\EOF
8483 #define HAVE_SGI_VIDEO 1
8488 elif test "$with_sgivideo" != no; then
8489 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8494 ###############################################################################
8496 # Check for a program to generate random text.
8498 # Zippy is funnier than the idiocy generally spat out by `fortune',
8499 # so try to find that, by invoking Emacs and asking it where its
8500 # libexec directory is ("yow" lives in there.)
8502 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8503 # and if so, use them.
8505 # If that doesn't work, look in /usr/games, and if it's there, use
8506 # the full pathname.
8508 ###############################################################################
8511 # Check whether --with-zippy or --without-zippy was given.
8512 if test "${with_zippy+set}" = set; then
8513 withval="$with_zippy"
8514 with_zippy_req="$withval"; with_zippy="$withval"
8520 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8525 if test -n "$with_zippy_req" ; then
8526 ac_cv_zippy_program=""
8527 case "$with_zippy_req" in
8529 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8530 echo "configure:8542: checking for $with_zippy_req" >&5
8531 if test -x "$with_zippy_req" ; then
8532 echo "$ac_t""yes" 1>&6
8534 echo "$ac_t""no" 1>&6
8540 unset ac_cv_path_zip2
8541 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8542 set dummy $with_zippy_req; ac_word=$2
8543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8544 echo "configure:8556: checking for $ac_word" >&5
8545 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8546 echo $ac_n "(cached) $ac_c" 1>&6
8550 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8553 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8558 for ac_dir in $ac_dummy; do
8559 test -z "$ac_dir" && ac_dir=.
8560 if test -f $ac_dir/$ac_word; then
8561 ac_cv_path_zip2="$ac_dir/$ac_word"
8569 zip2="$ac_cv_path_zip2"
8570 if test -n "$zip2"; then
8571 echo "$ac_t""$zip2" 1>&6
8573 echo "$ac_t""no" 1>&6
8576 if test "$zip2" = ""; then
8581 ac_cv_zippy_program="$with_zippy"
8583 elif test -n "$ac_cv_zippy_program"; then
8584 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8587 if test ! -n "$ac_cv_zippy_program"; then
8589 for ac_prog in emacs
8591 # Extract the first word of "$ac_prog", so it can be a program name with args.
8592 set dummy $ac_prog; ac_word=$2
8593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8594 echo "configure:8606: checking for $ac_word" >&5
8595 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8596 echo $ac_n "(cached) $ac_c" 1>&6
8598 if test -n "$emacs_exe"; then
8599 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8601 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8603 for ac_dir in $ac_dummy; do
8604 test -z "$ac_dir" && ac_dir=.
8605 if test -f $ac_dir/$ac_word; then
8606 ac_cv_prog_emacs_exe="$ac_prog"
8613 emacs_exe="$ac_cv_prog_emacs_exe"
8614 if test -n "$emacs_exe"; then
8615 echo "$ac_t""$emacs_exe" 1>&6
8617 echo "$ac_t""no" 1>&6
8620 test -n "$emacs_exe" && break
8623 for ac_prog in xemacs
8625 # Extract the first word of "$ac_prog", so it can be a program name with args.
8626 set dummy $ac_prog; ac_word=$2
8627 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8628 echo "configure:8640: checking for $ac_word" >&5
8629 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
8630 echo $ac_n "(cached) $ac_c" 1>&6
8632 if test -n "$xemacs_exe"; then
8633 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
8635 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8637 for ac_dir in $ac_dummy; do
8638 test -z "$ac_dir" && ac_dir=.
8639 if test -f $ac_dir/$ac_word; then
8640 ac_cv_prog_xemacs_exe="$ac_prog"
8647 xemacs_exe="$ac_cv_prog_xemacs_exe"
8648 if test -n "$xemacs_exe"; then
8649 echo "$ac_t""$xemacs_exe" 1>&6
8651 echo "$ac_t""no" 1>&6
8654 test -n "$xemacs_exe" && break
8658 ac_cv_zippy_program=""
8659 eargs='-batch -q -nw --eval'
8661 if test -n "$emacs_exe" ; then
8662 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
8663 echo "configure:8675: checking for emacs yow" >&5
8665 # get emacs to tell us where the libexec directory is.
8667 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8668 2>/dev/null | tail -1`
8669 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8671 # try running libexec/yow and see if it exits without error.
8673 if test x"$dir" != x -a -x "$dir/yow" ; then
8674 if $dir/yow >&- 2>&- ; then
8675 ac_cv_zippy_program="$dir/yow"
8676 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8678 echo "$ac_t""no" 1>&6
8683 if test -z "$ac_cv_zippy_program" ; then
8684 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
8685 echo "configure:8697: checking for xemacs yow" >&5
8686 if test -n "$xemacs_exe" ; then
8688 # get xemacs to tell us where the libexec directory is.
8690 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8691 2>/dev/null | tail -1`
8692 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8694 # try running libexec/yow and see if it exits without error.
8696 if test x"$dir" != x -a -x "$dir/yow" ; then
8697 if $dir/yow >&- 2>&- ; then
8698 ac_cv_zippy_program="$dir/yow"
8699 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8702 # in some xemacs installations, the pathname of the yow.lines file
8703 # isn't hardcoded into the yow executable, and must be passed on
8704 # the command line. See if it's in libexec/../etc/.
8708 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
8711 yowlines="$dir_up/etc/yow.lines"
8712 if $dir/yow -f $yowlines >&- 2>&- ; then
8713 ac_cv_zippy_program="$dir/yow -f $yowlines"
8714 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8717 # In newer XEmacs releases, yow.lines is in a different place,
8718 # and the easiest way to get it is by calling the new function
8719 # `locate-data-file'.
8721 yowlines=`$xemacs_exe $eargs \
8722 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
8723 2>/dev/null | tail -1`
8724 if $dir/yow -f $yowlines >&- 2>&- ; then
8725 ac_cv_zippy_program="$dir/yow -f $yowlines"
8726 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8728 echo "$ac_t""no" 1>&6
8736 # if that didn't work, try for some other programs...
8737 if test -z "$ac_cv_zippy_program" ; then
8739 for ac_prog in fortune zippy yow
8741 # Extract the first word of "$ac_prog", so it can be a program name with args.
8742 set dummy $ac_prog; ac_word=$2
8743 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8744 echo "configure:8756: checking for $ac_word" >&5
8745 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
8746 echo $ac_n "(cached) $ac_c" 1>&6
8748 if test -n "$fortune"; then
8749 ac_cv_prog_fortune="$fortune" # Let the user override the test.
8751 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8753 for ac_dir in $ac_dummy; do
8754 test -z "$ac_dir" && ac_dir=.
8755 if test -f $ac_dir/$ac_word; then
8756 ac_cv_prog_fortune="$ac_prog"
8763 fortune="$ac_cv_prog_fortune"
8764 if test -n "$fortune"; then
8765 echo "$ac_t""$fortune" 1>&6
8767 echo "$ac_t""no" 1>&6
8770 test -n "$fortune" && break
8773 # if that didn't work, try for those programs in /usr/games...
8774 if test -z "$fortune" ; then
8775 for ac_prog in fortune zippy yow
8777 # Extract the first word of "$ac_prog", so it can be a program name with args.
8778 set dummy $ac_prog; ac_word=$2
8779 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8780 echo "configure:8792: checking for $ac_word" >&5
8781 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
8782 echo $ac_n "(cached) $ac_c" 1>&6
8786 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
8789 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
8792 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8793 ac_dummy="/usr/games:/usr/local/games:$PATH"
8794 for ac_dir in $ac_dummy; do
8795 test -z "$ac_dir" && ac_dir=.
8796 if test -f $ac_dir/$ac_word; then
8797 ac_cv_path_fortune="$ac_dir/$ac_word"
8805 fortune="$ac_cv_path_fortune"
8806 if test -n "$fortune"; then
8807 echo "$ac_t""$fortune" 1>&6
8809 echo "$ac_t""no" 1>&6
8812 test -n "$fortune" && break
8814 test -n "$fortune" || fortune="fortune"
8820 if test -z "$ac_cv_zippy_program" ; then
8821 ac_cv_zippy_program=fortune
8824 cat >> confdefs.h <<EOF
8825 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
8830 ###############################################################################
8832 # Done testing. Now, set up the various -I and -L variables,
8833 # and decide which GUI program to build by default.
8835 ###############################################################################
8842 if test \! -z "$includedir" ; then
8843 INCLUDES="$INCLUDES -I$includedir"
8846 if test \! -z "$libdir" ; then
8847 LDFLAGS="$LDFLAGS -L$libdir"
8851 DEMO_MAN="xscreensaver-demo-old.man"
8853 if test "$have_athena" = yes; then
8854 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw
8855 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8857 if test "$have_athena3d" = yes; then
8858 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw3d
8859 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8861 if test "$have_motif" = yes; then
8862 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
8863 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8865 if test "$have_gtk" = yes; then
8866 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
8867 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8868 DEMO_MAN="xscreensaver-demo.man"
8872 if test "$have_kerberos" = yes; then
8873 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
8874 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
8876 if test "$have_pam" = yes; then
8877 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
8878 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
8879 INSTALL_PAM="install-pam"
8881 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
8882 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
8885 if test "$enable_locking" = yes; then
8886 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
8887 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
8889 LOCK_SRCS='$(NOLOCK_SRCS_1)'
8890 LOCK_OBJS='$(NOLOCK_OBJS_1)'
8893 if test "$need_setuid" = yes; then
8895 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
8898 INSTALL_SETUID='$(INSTALL_PROGRAM)'
8902 if test "$have_gl" = yes; then
8903 GL_EXES='$(GL_EXES)'
8907 GL_KLUDGE="-${tab} "
8910 if test "$have_gle" = yes; then
8911 GLE_EXES='$(GLE_EXES)'
8912 GLE_MEN='$(GLE_MEN)'
8913 GLE_KLUDGE="${tab} "
8915 GLE_KLUDGE="-${tab} "
8919 ###############################################################################
8921 # Perform substitutions and write Makefiles.
8923 ###############################################################################
8964 APPDEFAULTS=$ac_x_app_defaults
8973 cat > confcache <<\EOF
8974 # This file is a shell script that caches the results of configure
8975 # tests run on this system so they can be shared between configure
8976 # scripts and configure runs. It is not useful on other systems.
8977 # If it contains results you don't want to keep, you may remove or edit it.
8979 # By default, configure uses ./config.cache as the cache file,
8980 # creating it if it does not exist already. You can give configure
8981 # the --cache-file=FILE option to use a different cache file; that is
8982 # what configure does when it calls configure scripts in
8983 # subdirectories, so they share the cache.
8984 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8985 # config.status only pays attention to the cache file if you give it the
8986 # --recheck option to rerun configure.
8989 # The following way of writing the cache mishandles newlines in values,
8990 # but we know of no workaround that is simple, portable, and efficient.
8991 # So, don't put newlines in cache variables' values.
8992 # Ultrix sh set writes to stderr and can't be redirected directly,
8993 # and sets the high bit in the cache file unless we assign to the vars.
8995 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8997 # `set' does not quote correctly, so add quotes (double-quote substitution
8998 # turns \\\\ into \\, and sed turns \\ into \).
9000 -e "s/'/'\\\\''/g" \
9001 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9004 # `set' quotes correctly as required by POSIX, so do not add quotes.
9005 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9008 if cmp -s $cache_file confcache; then
9011 if test -w $cache_file; then
9012 echo "updating cache $cache_file"
9013 cat confcache > $cache_file
9015 echo "not updating unwritable cache $cache_file"
9020 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9022 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9023 # Let make expand exec_prefix.
9024 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9026 # Any assignment to VPATH causes Sun make to only execute
9027 # the first set of double-colon rules, so remove it if not needed.
9028 # If there is a colon in the path, we need to keep it.
9029 if test "x$srcdir" = x.; then
9030 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9033 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9035 DEFS=-DHAVE_CONFIG_H
9037 # Without the "./", some shells look in PATH for config.status.
9038 : ${CONFIG_STATUS=./config.status}
9040 echo creating $CONFIG_STATUS
9041 rm -f $CONFIG_STATUS
9042 cat > $CONFIG_STATUS <<EOF
9044 # Generated automatically by configure.
9045 # Run this file to recreate the current configuration.
9046 # This directory was configured as follows,
9047 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9049 # $0 $ac_configure_args
9051 # Compiler output produced by configure, useful for debugging
9052 # configure, is in ./config.log if it exists.
9054 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9057 case "\$ac_option" in
9058 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9059 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9060 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9061 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9062 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9064 -help | --help | --hel | --he | --h)
9065 echo "\$ac_cs_usage"; exit 0 ;;
9066 *) echo "\$ac_cs_usage"; exit 1 ;;
9070 ac_given_srcdir=$srcdir
9071 ac_given_INSTALL="$INSTALL"
9073 trap 'rm -fr `echo "Makefile
9078 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9080 cat >> $CONFIG_STATUS <<EOF
9082 # Protect against being on the right side of a sed subst in config.status.
9083 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9084 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9088 s%@CFLAGS@%$CFLAGS%g
9089 s%@CPPFLAGS@%$CPPFLAGS%g
9090 s%@CXXFLAGS@%$CXXFLAGS%g
9091 s%@FFLAGS@%$FFLAGS%g
9093 s%@LDFLAGS@%$LDFLAGS%g
9095 s%@exec_prefix@%$exec_prefix%g
9096 s%@prefix@%$prefix%g
9097 s%@program_transform_name@%$program_transform_name%g
9098 s%@bindir@%$bindir%g
9099 s%@sbindir@%$sbindir%g
9100 s%@libexecdir@%$libexecdir%g
9101 s%@datadir@%$datadir%g
9102 s%@sysconfdir@%$sysconfdir%g
9103 s%@sharedstatedir@%$sharedstatedir%g
9104 s%@localstatedir@%$localstatedir%g
9105 s%@libdir@%$libdir%g
9106 s%@includedir@%$includedir%g
9107 s%@oldincludedir@%$oldincludedir%g
9108 s%@infodir@%$infodir%g
9109 s%@mandir@%$mandir%g
9111 s%@host_alias@%$host_alias%g
9112 s%@host_cpu@%$host_cpu%g
9113 s%@host_vendor@%$host_vendor%g
9114 s%@host_os@%$host_os%g
9117 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9118 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9119 s%@INSTALL_DATA@%$INSTALL_DATA%g
9120 s%@SET_MAKE@%$SET_MAKE%g
9122 s%@X_CFLAGS@%$X_CFLAGS%g
9123 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9124 s%@X_LIBS@%$X_LIBS%g
9125 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9126 s%@glib_config@%$glib_config%g
9127 s%@gtk_config@%$gtk_config%g
9129 s%@emacs_exe@%$emacs_exe%g
9130 s%@xemacs_exe@%$xemacs_exe%g
9131 s%@fortune@%$fortune%g
9132 s%@INCLUDES@%$INCLUDES%g
9133 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
9134 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
9135 s%@DEMO_MAN@%$DEMO_MAN%g
9136 s%@SAVER_LIBS@%$SAVER_LIBS%g
9137 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
9138 s%@GTK_LIBS@%$GTK_LIBS%g
9139 s%@ATHENA_LIBS@%$ATHENA_LIBS%g
9140 s%@ATHENA3D_LIBS@%$ATHENA3D_LIBS%g
9141 s%@HACK_LIBS@%$HACK_LIBS%g
9142 s%@XPM_LIBS@%$XPM_LIBS%g
9143 s%@GL_LIBS@%$GL_LIBS%g
9144 s%@GLE_LIBS@%$GLE_LIBS%g
9145 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
9146 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
9147 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
9148 s%@NEED_SETUID@%$NEED_SETUID%g
9149 s%@INSTALL_PAM@%$INSTALL_PAM%g
9150 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
9151 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
9152 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
9153 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
9154 s%@XMU_SRCS@%$XMU_SRCS%g
9155 s%@XMU_OBJS@%$XMU_OBJS%g
9156 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
9157 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
9158 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
9159 s%@LOCK_SRCS@%$LOCK_SRCS%g
9160 s%@LOCK_OBJS@%$LOCK_OBJS%g
9161 s%@GL_EXES@%$GL_EXES%g
9162 s%@GL_MEN@%$GL_MEN%g
9163 s%@GL_KLUDGE@%$GL_KLUDGE%g
9164 s%@GLE_EXES@%$GLE_EXES%g
9165 s%@GLE_MEN@%$GLE_MEN%g
9166 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
9167 s%@HACKDIR@%$HACKDIR%g
9168 s%@APPDEFAULTS@%$APPDEFAULTS%g
9169 s%@DEPEND@%$DEPEND%g
9170 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
9171 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
9176 cat >> $CONFIG_STATUS <<\EOF
9178 # Split the substitutions into bite-sized pieces for seds with
9179 # small command number limits, like on Digital OSF/1 and HP-UX.
9180 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9181 ac_file=1 # Number of current file.
9182 ac_beg=1 # First line for current file.
9183 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9186 while $ac_more_lines; do
9187 if test $ac_beg -gt 1; then
9188 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9190 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9192 if test ! -s conftest.s$ac_file; then
9194 rm -f conftest.s$ac_file
9196 if test -z "$ac_sed_cmds"; then
9197 ac_sed_cmds="sed -f conftest.s$ac_file"
9199 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9201 ac_file=`expr $ac_file + 1`
9203 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9206 if test -z "$ac_sed_cmds"; then
9211 cat >> $CONFIG_STATUS <<EOF
9213 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9218 driver/XScreenSaver.ad"}
9220 cat >> $CONFIG_STATUS <<\EOF
9221 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9222 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9224 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9225 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9226 *) ac_file_in="${ac_file}.in" ;;
9229 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9231 # Remove last slash and all that follows it. Not all systems have dirname.
9232 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9233 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9234 # The file is in a subdirectory.
9235 test ! -d "$ac_dir" && mkdir "$ac_dir"
9236 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9237 # A "../" for each directory in $ac_dir_suffix.
9238 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9240 ac_dir_suffix= ac_dots=
9243 case "$ac_given_srcdir" in
9245 if test -z "$ac_dots"; then top_srcdir=.
9246 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9247 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9249 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9250 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9253 case "$ac_given_INSTALL" in
9254 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9255 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9258 echo creating "$ac_file"
9260 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9262 *Makefile*) ac_comsub="1i\\
9263 # $configure_input" ;;
9267 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9269 s%@configure_input@%$configure_input%g
9270 s%@srcdir@%$srcdir%g
9271 s%@top_srcdir@%$top_srcdir%g
9272 s%@INSTALL@%$INSTALL%g
9273 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9277 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9278 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9280 # ac_d sets the value in "#define NAME VALUE" lines.
9281 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9282 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9285 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9286 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9287 ac_uB='\([ ]\)%\1#\2define\3'
9290 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9291 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9292 ac_eB='$%\1#\2define\3'
9296 if test "${CONFIG_HEADERS+set}" != set; then
9298 cat >> $CONFIG_STATUS <<EOF
9299 CONFIG_HEADERS="config.h"
9301 cat >> $CONFIG_STATUS <<\EOF
9303 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9304 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9306 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9307 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9308 *) ac_file_in="${ac_file}.in" ;;
9311 echo creating $ac_file
9313 rm -f conftest.frag conftest.in conftest.out
9314 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9315 cat $ac_file_inputs > conftest.in
9319 # Transform confdefs.h into a sed script conftest.vals that substitutes
9320 # the proper values into config.h.in to produce config.h. And first:
9321 # Protect against being on the right side of a sed subst in config.status.
9322 # Protect against being in an unquoted here document in config.status.
9324 cat > conftest.hdr <<\EOF
9327 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9331 sed -n -f conftest.hdr confdefs.h > conftest.vals
9334 # This sed command replaces #undef with comments. This is necessary, for
9335 # example, in the case of _POSIX_SOURCE, which is predefined and required
9336 # on some systems where configure will not decide to define it.
9337 cat >> conftest.vals <<\EOF
9338 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9341 # Break up conftest.vals because some shells have a limit on
9342 # the size of here documents, and old seds have small limits too.
9347 ac_lines=`grep -c . conftest.vals`
9348 # grep -c gives empty output for an empty file on some AIX systems.
9349 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9350 # Write a limited-size here document to conftest.frag.
9351 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9352 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9354 sed -f conftest.frag conftest.in > conftest.out
9356 mv conftest.out conftest.in
9358 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9360 mv conftest.tail conftest.vals
9364 cat >> $CONFIG_STATUS <<\EOF
9365 rm -f conftest.frag conftest.h
9366 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9367 cat conftest.in >> conftest.h
9369 if cmp -s $ac_file conftest.h 2>/dev/null; then
9370 echo "$ac_file is unchanged"
9373 # Remove last slash and all that follows it. Not all systems have dirname.
9374 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9375 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9376 # The file is in a subdirectory.
9377 test ! -d "$ac_dir" && mkdir "$ac_dir"
9380 mv conftest.h $ac_file
9385 cat >> $CONFIG_STATUS <<EOF
9388 cat >> $CONFIG_STATUS <<\EOF
9392 chmod +x $CONFIG_STATUS
9393 rm -fr confdefs* $ac_clean_files
9394 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9397 ###############################################################################
9399 # Print some warnings at the end.
9401 ###############################################################################
9403 warn_prefix_1=" Warning:"
9404 warn_prefix_2=" Note:"
9405 warn_prefix="$warn_prefix_1"
9408 warnsep=' #################################################################'
9411 if test "$warning" = no ; then
9412 echo '' ; echo "$warnsep" ; echo ''
9419 if test "$warning" = long ; then echo '' ; fi
9421 echo "$warn_prefix $@"
9428 if test "$was" != no ; then echo '' ; fi
9429 echo "$warn_prefix $@"
9438 warn_prefix="$warn_prefix_2"
9440 warn_prefix="$warn_prefix_1"
9444 warn_prefix="$warn_prefix_2"
9446 warn_prefix="$warn_prefix_1"
9450 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9451 warn 'The SGI saver extension was requested, but was not found.'
9454 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9455 warn 'The MIT saver extension was requested, but was not found.'
9458 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9459 warn 'The XIdle extension was requested, but was not found.'
9462 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9463 warn 'The XSHM extension was requested, but was not found.'
9466 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9467 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9470 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9471 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9474 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9475 warn 'The DPMS extension was requested, but was not found.'
9478 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9479 warn 'The XF86VMODE extension was requested, but was not found.'
9482 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9483 warn "Checking of /proc/interrupts was requested, but it's bogus."
9487 if test "$have_motif" = no -a "$have_gtk" = no -a "$have_athena" = no ; then
9488 warnL "None of Motif, Gtk, or Athena widgets seem to be available;"
9489 warn2 "the \`xscreensaver-demo' program requires one of these."
9491 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9492 warnL "Use of Motif was requested, but it wasn't found;"
9493 if test "$have_gtk" = yes; then
9494 warn2 "Gtk will be used instead."
9496 warn2 "Athena will be used instead."
9499 elif test "$jurassic_gtk" = yes ; then
9503 v="$ac_gtk_version_string"
9504 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9505 warnL "Use of Gtk was requested, but its version number is unknown;"
9506 elif test "$with_gtk_req" = yes ; then
9507 warnL "Use of Gtk was requested, but it is version $v;"
9509 warnL "Gtk was found on this system, but it is version $v;"
9512 if test "$have_motif" = yes; then
9518 warn2 "Gtk $pref_gtk or newer is required. $which will be used instead."
9520 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9521 warnL "Use of Gtk was requested, but it wasn't found;"
9522 if test "$have_motif" = yes; then
9523 warn2 "Motif will be used instead."
9525 warn2 "Athena will be used instead."
9528 elif test "$with_athena_req" = yes -a "$have_athena" = no ; then
9529 warnL "Use of Athena was requested, but it wasn't found;"
9530 if test "$have_gtk" = yes; then
9531 warn2 "Gtk will be used instead."
9533 warn2 "Motif will be used instead."
9538 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9540 preferred_lesstif=0.86
9542 if test "$lesstif_version" = unknown; then
9543 warnL "Unable to determine the LessTif version number!"
9544 warn2 "Make sure you are using version $preferred_lesstif or newer."
9545 warn2 "See <http://www.lesstif.org/>."
9547 elif test \! $lesstif_version -gt 82; then
9548 warnL "LessTif version $lesstif_version_string is being used."
9549 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9550 warn2 "use with XScreenSaver; it is strongly recommended"
9551 warn2 "that you upgrade to at least version $preferred_lesstif!"
9552 warn2 "See <http://www.lesstif.org/>."
9556 if test "$have_athena" = yes -a "$have_motif" = no -a "$have_gtk" = no; then
9557 warnL "Athena widgets are being used instead of Motif or Gtk."
9558 warn2 "The \`xscreensaver-demo' program looks much better"
9559 warn2 "with Motif or Gtk. Wouldn't you rather be using Motif?"
9560 warn2 "Motif is shipped by every commercial Unix vendor,"
9561 warn2 "and there is a free implementation available as"
9562 warn2 "well: see <http://www.lesstif.org/>. Gtk is shipped"
9563 warn2 "with most Linux and BSD distributions."
9567 if test "$have_xpm" = no ; then
9568 if test "$with_xpm_req" = yes ; then
9569 warnL 'Use of XPM was requested, but it was not found.'
9570 elif test "$with_xpm_req" = no ; then
9571 noteL 'The XPM library is not being used.'
9573 noteL 'The XPM library was not found.'
9577 warn2 'Some of the demos will not be as colorful as they'
9578 warn2 'could be. You might want to consider installing XPM'
9579 warn2 'and re-running configure. (Remember to delete the'
9580 warn2 'config.cache file first.) You can find XPM at most'
9581 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9585 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9586 preferred_mesagl=3.0
9588 if test "$ac_mesagl_version" = unknown; then
9589 warnL "Unable to determine the MesaGL version number!"
9590 warn2 "Make sure you are using version $preferred_mesagl or newer."
9592 elif test \! "$ac_mesagl_version" -gt 2006; then
9593 warnL "MesaGL version $ac_mesagl_version_string is being used."
9594 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9595 warn2 "It is strongly recommended that you upgrade to at"
9596 warn2 "least version $preferred_mesagl."
9601 if test "$have_gl" = no ; then
9602 if test "$with_gl_req" = yes ; then
9603 warnL 'Use of GL was requested, but it was not found.'
9604 elif test "$with_gl_req" = no ; then
9605 noteL 'The OpenGL 3D library is not being used.'
9607 noteL 'The OpenGL 3D library was not found.'
9611 warn2 'Those demos which use 3D will not be built or installed.'
9612 warn2 'You might want to consider installing OpenGL and'
9613 warn2 're-running configure. (Remember to delete the'
9614 warn2 "config.cache file first.) If your vendor doesn't ship"
9615 warn2 'their own implementation of OpenGL, you can get a free'
9616 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
9617 warn2 'info, see <http://www.opengl.org/>.'
9622 if test "$have_gl" = yes -a "$have_gle" = no ; then
9623 if test "$with_gle_req" = yes ; then
9624 warnL 'Use of GLE was requested, but it was not found.'
9625 elif test "$with_gle_req" = no ; then
9626 noteL 'The GLE (GL Extrusion) library is not being used.'
9628 noteL 'The GLE (GL Extrusion) library was not found.'
9632 warn2 'Some of the OpenGL (3D) demos will not be built or installed.'
9633 warn2 'You might want to consider installing GLE and re-running'
9634 warn2 'configure. (Remember to delete the config.cache file first.)'
9635 warn2 'You can find the GLE library at <http://www.linas.org/gle/>.'
9636 warn2 'For general OpenGL info, see <http://www.opengl.org/>.'
9641 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
9642 warn 'Use of XReadDisplay was requested, but it was not found.'
9645 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
9646 warn 'Use of the Iris Video Library was requested, but it was not found.'
9649 if test -n "$with_zippy_req"; then
9650 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
9651 warnL "$with_zippy_req was requested as the Zippy program,"
9652 warn2 "but was not found. The default will be used instead."
9656 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
9657 warn 'Use of Kerberos was requested, but it was not found.'
9660 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
9661 warn 'Use of PAM was requested, but it was not found.'
9664 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
9665 warn 'Use of shadow passwords was requested, but they were not found.'
9669 # You are in a twisty maze of namespaces and syntaxes, all alike.
9670 # Fuck the skull of Unix.
9672 eval bindir=${bindir}
9673 eval bindir=${bindir}
9674 eval bindir=${bindir}
9675 eval bindir=${bindir}
9676 eval bindir=${bindir}
9677 eval bindir=${bindir}
9678 eval HACKDIR=${HACKDIR}
9679 eval HACKDIR=${HACKDIR}
9680 eval HACKDIR=${HACKDIR}
9681 eval HACKDIR=${HACKDIR}
9682 eval HACKDIR=${HACKDIR}
9683 eval HACKDIR=${HACKDIR}
9685 # canonicalize slashes.
9686 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
9687 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9690 # Sanity check the subdir
9691 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
9692 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
9694 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
9695 There will be an executable installed with that name, so
9696 that can't be the name of a directory as well. Please
9697 re-configure with a different directory name." 1>&2; exit 1; }
9704 # Now let's see if there's a previous RPM version already installed. Blargh!
9708 rpmv=`(rpm -qv xscreensaver) 2>&- | \
9709 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-[0-9][0-9]*$/\1/'`
9712 if test \! -z "$rpmv" ; then
9713 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
9714 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
9717 warnL "There is already an installed RPM of xscreensaver $rpmv"
9718 warn2 "on this system. You might want to remove it (with"
9719 warn2 '"rpm -ve xscreensaver") before running "make install"'
9720 warn2 "from this directory."
9722 warn2 "Alternately, you could build this version of xscreensaver"
9723 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
9724 warn2 "file is included. See the RPM documentation for more info."
9727 if test "$rpmbdir" = "$rpmhdir" ; then
9728 warn2 "The RPM version was installed in $rpmbdir."
9730 warn2 "The RPM version was installed in $rpmbdir,"
9731 warn2 "with demos in $rpmhdir."
9738 # Warn about egregious GNOME bogosity.
9740 if (rpm -qv control-center) >&- 2>&- ; then
9742 warnL "The Gnome Control Center seems to be installed."
9744 warn2 "Note that simply installing this version of xscreensaver"
9745 warn2 "will not cause GNOME to know about the newly-added display"
9746 warn2 "modes -- GNOME is just lame that way. Instead of using the"
9747 warn2 "Control Center, try using the \`xscreensaver-demo' command."
9751 if test "${bindir}" = "${HACKDIR}" ; then
9755 if test "$do_dir_warning" = yes; then
9759 echo ' When you run "make install", the "xscreensaver",'
9760 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
9761 echo " will be installed in ${bindir}."
9763 echo " The various graphics demos (100+ different executables) will"
9764 echo " also be installed in ${HACKDIR}."
9766 echo " If you would prefer the demos to be installed elsewhere"
9767 echo " (for example, in a dedicated directory) you should re-run"
9768 echo " configure with the --enable-subdir=DIR option. For more"
9769 echo " information, run $0 --help."
9773 if test "$warning" != no; then
9774 echo '' ; echo "$warnsep" ; echo ''