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
6878 # Check whether --with-gl or --without-gl was given.
6879 if test "${with_gl+set}" = set; then
6881 with_gl="$withval"; with_gl_req="$withval"
6893 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
6894 echo "configure:6906: checking for GL headers" >&5
6897 X_CFLAGS="-I$d $X_CFLAGS"
6898 echo "$ac_t""$d" 1>&6
6900 echo "$ac_t""not found ($d: no such directory)" 1>&6
6903 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
6904 echo "configure:6916: checking for GL libs" >&5
6907 X_LIBS="-L$d $X_LIBS"
6908 echo "$ac_t""$d" 1>&6
6910 echo "$ac_t""not found ($d: no such directory)" 1>&6
6913 # replace the directory string with "yes".
6915 with_gl=$with_gl_req
6920 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
6921 echo " If it is a directory, then \`DIR/include' will be added to"
6922 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6928 ac_mesagl_version=unknown
6929 ac_mesagl_version_string=unknown
6931 if test "$with_gl" = yes; then
6933 ac_save_CPPFLAGS="$CPPFLAGS"
6934 if test \! -z "$includedir" ; then
6935 CPPFLAGS="$CPPFLAGS -I$includedir"
6937 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6938 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
6939 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
6940 echo "configure:6952: checking for GL/gl.h" >&5
6941 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6942 echo $ac_n "(cached) $ac_c" 1>&6
6944 cat > conftest.$ac_ext <<EOF
6945 #line 6957 "configure"
6946 #include "confdefs.h"
6949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6950 { (eval echo configure:6962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6952 if test -z "$ac_err"; then
6954 eval "ac_cv_header_$ac_safe=yes"
6957 echo "configure: failed program was:" >&5
6958 cat conftest.$ac_ext >&5
6960 eval "ac_cv_header_$ac_safe=no"
6964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6965 echo "$ac_t""yes" 1>&6
6968 echo "$ac_t""no" 1>&6
6971 CPPFLAGS="$ac_save_CPPFLAGS"
6972 if test "$have_gl" = yes ; then
6974 ac_save_CPPFLAGS="$CPPFLAGS"
6975 if test \! -z "$includedir" ; then
6976 CPPFLAGS="$CPPFLAGS -I$includedir"
6978 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6979 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
6980 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
6981 echo "configure:6993: checking for GL/glx.h" >&5
6982 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6983 echo $ac_n "(cached) $ac_c" 1>&6
6985 cat > conftest.$ac_ext <<EOF
6986 #line 6998 "configure"
6987 #include "confdefs.h"
6990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6991 { (eval echo configure:7003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6993 if test -z "$ac_err"; then
6995 eval "ac_cv_header_$ac_safe=yes"
6998 echo "configure: failed program was:" >&5
6999 cat conftest.$ac_ext >&5
7001 eval "ac_cv_header_$ac_safe=no"
7005 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7006 echo "$ac_t""yes" 1>&6
7009 echo "$ac_t""no" 1>&6
7012 CPPFLAGS="$ac_save_CPPFLAGS"
7015 # If we have the headers, try and figure out which vendor it's from.
7017 if test "$have_gl" = yes ; then
7019 # We need to know whether it's MesaGL so that we know which libraries
7022 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7023 echo "configure:7035: checking whether GL is really MesaGL" >&5
7024 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7025 echo $ac_n "(cached) $ac_c" 1>&6
7027 ac_cv_have_mesa_gl=no
7029 ac_save_CPPFLAGS="$CPPFLAGS"
7030 if test \! -z "$includedir" ; then
7031 CPPFLAGS="$CPPFLAGS -I$includedir"
7033 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7034 cat > conftest.$ac_ext <<EOF
7035 #line 7047 "configure"
7036 #include "confdefs.h"
7039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7040 egrep "Mesa" >/dev/null 2>&1; then
7042 ac_cv_have_mesa_gl=yes
7046 CPPFLAGS="$ac_save_CPPFLAGS"
7050 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7051 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7058 # Some versions of MesaGL are compiled to require -lpthread.
7059 # So if the Mesa headers exist, and -lpthread exists, then always
7060 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
7062 if test "$ac_have_mesa_gl" = yes; then
7063 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7064 echo "configure:7076: checking for pthread_create in -lpthread" >&5
7065 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7066 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7067 echo $ac_n "(cached) $ac_c" 1>&6
7069 ac_save_LIBS="$LIBS"
7070 LIBS="-lpthread $LIBS"
7071 cat > conftest.$ac_ext <<EOF
7072 #line 7084 "configure"
7073 #include "confdefs.h"
7074 /* Override any gcc2 internal prototype to avoid an error. */
7075 /* We use char because int might match the return type of a gcc2
7076 builtin and then its argument prototype would still apply. */
7077 char pthread_create();
7083 if { (eval echo configure:7095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7085 eval "ac_cv_lib_$ac_lib_var=yes"
7087 echo "configure: failed program was:" >&5
7088 cat conftest.$ac_ext >&5
7090 eval "ac_cv_lib_$ac_lib_var=no"
7093 LIBS="$ac_save_LIBS"
7096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7097 echo "$ac_t""yes" 1>&6
7100 echo "$ac_t""no" 1>&6
7106 # If we have Mesa headers, check to see if we can link against -lMesaGL.
7107 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
7108 # Else, warn that GL is busted. (We have the headers, but no libs.)
7111 if test "$ac_have_mesa_gl" = yes ; then
7113 ac_save_CPPFLAGS="$CPPFLAGS"
7114 ac_save_LDFLAGS="$LDFLAGS"
7115 # ac_save_LIBS="$LIBS"
7117 if test \! -z "$includedir" ; then
7118 CPPFLAGS="$CPPFLAGS -I$includedir"
7120 # note: $X_CFLAGS includes $x_includes
7121 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7123 if test \! -z "$libdir" ; then
7124 LDFLAGS="$LDFLAGS -L$libdir"
7126 # note: $X_LIBS includes $x_libraries
7127 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7129 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
7130 echo "configure:7142: checking for glXCreateContext in -lMesaGL" >&5
7131 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7133 echo $ac_n "(cached) $ac_c" 1>&6
7135 ac_save_LIBS="$LIBS"
7136 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7137 cat > conftest.$ac_ext <<EOF
7138 #line 7150 "configure"
7139 #include "confdefs.h"
7140 /* Override any gcc2 internal prototype to avoid an error. */
7141 /* We use char because int might match the return type of a gcc2
7142 builtin and then its argument prototype would still apply. */
7143 char glXCreateContext();
7149 if { (eval echo configure:7161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7151 eval "ac_cv_lib_$ac_lib_var=yes"
7153 echo "configure: failed program was:" >&5
7154 cat conftest.$ac_ext >&5
7156 eval "ac_cv_lib_$ac_lib_var=no"
7159 LIBS="$ac_save_LIBS"
7162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7163 echo "$ac_t""yes" 1>&6
7165 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
7167 echo "$ac_t""no" 1>&6
7170 CPPFLAGS="$ac_save_CPPFLAGS"
7171 LDFLAGS="$ac_save_LDFLAGS"
7172 # LIBS="$ac_save_LIBS"
7176 if test "$gl_lib_1" = "" ; then
7178 ac_save_CPPFLAGS="$CPPFLAGS"
7179 ac_save_LDFLAGS="$LDFLAGS"
7180 # ac_save_LIBS="$LIBS"
7182 if test \! -z "$includedir" ; then
7183 CPPFLAGS="$CPPFLAGS -I$includedir"
7185 # note: $X_CFLAGS includes $x_includes
7186 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7188 if test \! -z "$libdir" ; then
7189 LDFLAGS="$LDFLAGS -L$libdir"
7191 # note: $X_LIBS includes $x_libraries
7192 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7194 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7195 echo "configure:7207: checking for glXCreateContext in -lGL" >&5
7196 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7197 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7198 echo $ac_n "(cached) $ac_c" 1>&6
7200 ac_save_LIBS="$LIBS"
7201 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7202 cat > conftest.$ac_ext <<EOF
7203 #line 7215 "configure"
7204 #include "confdefs.h"
7205 /* Override any gcc2 internal prototype to avoid an error. */
7206 /* We use char because int might match the return type of a gcc2
7207 builtin and then its argument prototype would still apply. */
7208 char glXCreateContext();
7214 if { (eval echo configure:7226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7216 eval "ac_cv_lib_$ac_lib_var=yes"
7218 echo "configure: failed program was:" >&5
7219 cat conftest.$ac_ext >&5
7221 eval "ac_cv_lib_$ac_lib_var=no"
7224 LIBS="$ac_save_LIBS"
7227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7228 echo "$ac_t""yes" 1>&6
7230 GL_LIBS="-lGL -lGLU $GL_LIBS"
7232 echo "$ac_t""no" 1>&6
7235 CPPFLAGS="$ac_save_CPPFLAGS"
7236 LDFLAGS="$ac_save_LDFLAGS"
7237 # LIBS="$ac_save_LIBS"
7241 if test "$gl_lib_1" = "" ; then
7242 # we have headers, but no libs -- bail.
7247 # linking works -- we can build the GL hacks.
7248 cat >> confdefs.h <<\EOF
7252 if test "$ac_have_mesa_gl" = yes ; then
7253 cat >> confdefs.h <<\EOF
7254 #define HAVE_MESA_GL 1
7262 # Now that we know we have GL headers and libs, do some more GL testing.
7265 if test "$have_gl" = yes ; then
7266 # If it's MesaGL, we'd like to issue a warning if the version number
7267 # is less than or equal to 2.6, because that version had a security bug.
7269 if test "$ac_have_mesa_gl" = yes; then
7271 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7272 echo "configure:7284: checking MesaGL version number" >&5
7273 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7274 echo $ac_n "(cached) $ac_c" 1>&6
7276 cat > conftest.$ac_ext <<EOF
7277 #line 7289 "configure"
7278 #include "confdefs.h"
7280 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7283 ac_save_CPPFLAGS="$CPPFLAGS"
7284 if test \! -z "$includedir" ; then
7285 CPPFLAGS="$CPPFLAGS -I$includedir"
7287 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7291 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7292 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7295 rm -f conftest.$ac_ext
7297 CPPFLAGS="$ac_save_CPPFLAGS"
7299 if test "$mglv" = ""; then
7300 ac_mesagl_version=unknown
7301 ac_mesagl_version_string=unknown
7303 ac_mesagl_version_string=$mglv
7304 maj=`echo $mglv | sed -n 's/\..*//p'`
7305 min=`echo $mglv | sed -n 's/.*\.//p'`
7306 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7307 if test -z "$ac_mesagl_version"; then
7308 ac_mesagl_version=unknown
7309 ac_mesagl_version_string=unknown
7312 ac_cv_mesagl_version=$ac_mesagl_version
7313 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7317 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7318 ac_mesagl_version=$ac_cv_mesagl_version
7319 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7323 # Check for OpenGL 1.1 features.
7326 ac_save_CPPFLAGS="$CPPFLAGS"
7327 ac_save_LDFLAGS="$LDFLAGS"
7328 # ac_save_LIBS="$LIBS"
7330 if test \! -z "$includedir" ; then
7331 CPPFLAGS="$CPPFLAGS -I$includedir"
7333 # note: $X_CFLAGS includes $x_includes
7334 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7336 if test \! -z "$libdir" ; then
7337 LDFLAGS="$LDFLAGS -L$libdir"
7339 # note: $X_LIBS includes $x_libraries
7340 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7342 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7343 echo "configure:7355: checking for glBindTexture in -l$gl_lib_1" >&5
7344 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7345 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7346 echo $ac_n "(cached) $ac_c" 1>&6
7348 ac_save_LIBS="$LIBS"
7349 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7350 cat > conftest.$ac_ext <<EOF
7351 #line 7363 "configure"
7352 #include "confdefs.h"
7353 /* Override any gcc2 internal prototype to avoid an error. */
7354 /* We use char because int might match the return type of a gcc2
7355 builtin and then its argument prototype would still apply. */
7356 char glBindTexture();
7362 if { (eval echo configure:7374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7364 eval "ac_cv_lib_$ac_lib_var=yes"
7366 echo "configure: failed program was:" >&5
7367 cat conftest.$ac_ext >&5
7369 eval "ac_cv_lib_$ac_lib_var=no"
7372 LIBS="$ac_save_LIBS"
7375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7376 echo "$ac_t""yes" 1>&6
7377 cat >> confdefs.h <<\EOF
7378 #define HAVE_GLBINDTEXTURE 1
7382 echo "$ac_t""no" 1>&6
7386 CPPFLAGS="$ac_save_CPPFLAGS"
7387 LDFLAGS="$ac_save_LDFLAGS"
7388 # LIBS="$ac_save_LIBS"
7392 # Check whether the `xscreensaver' executable should link against GL.
7393 # See comments in utils/visual-gl.c for why this is sometimes necessary.
7395 echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6
7396 echo "configure:7408: checking whether drastic GL measures must be taken" >&5
7399 echo "$ac_t""yes -- hello, SGI." 1>&6
7400 cat >> confdefs.h <<\EOF
7401 #define DAEMON_USE_GL 1
7404 SAVER_GL_SRCS='$(UTILS_SRC)/visual-gl.c'
7405 SAVER_GL_OBJS='$(UTILS_BIN)/visual-gl.o'
7406 SAVER_GL_LIBS="$GL_LIBS"
7409 echo "$ac_t""no -- non-SGI." 1>&6
7418 elif test "$with_gl" != no; then
7419 echo "error: must be yes or no: --with-gl=$with_gl"
7424 ###############################################################################
7428 ###############################################################################
7431 with_gle_req=unspecified
7433 # Check whether --with-gle or --without-gle was given.
7434 if test "${with_gle+set}" = set; then
7436 with_gle="$withval"; with_gle_req="$withval"
7448 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7449 echo "configure:7461: checking for GLE headers" >&5
7452 X_CFLAGS="-I$d $X_CFLAGS"
7453 echo "$ac_t""$d" 1>&6
7455 echo "$ac_t""not found ($d: no such directory)" 1>&6
7458 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7459 echo "configure:7471: checking for GLE libs" >&5
7462 X_LIBS="-L$d $X_LIBS"
7463 echo "$ac_t""$d" 1>&6
7465 echo "$ac_t""not found ($d: no such directory)" 1>&6
7468 # replace the directory string with "yes".
7470 with_gle=$with_gle_req
7475 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7476 echo " If it is a directory, then \`DIR/include' will be added to"
7477 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7485 if test "$with_gle" = yes; then
7488 ac_save_CPPFLAGS="$CPPFLAGS"
7489 if test \! -z "$includedir" ; then
7490 CPPFLAGS="$CPPFLAGS -I$includedir"
7492 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7493 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7494 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7495 echo "configure:7507: checking for GL/gutil.h" >&5
7496 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7497 echo $ac_n "(cached) $ac_c" 1>&6
7499 cat > conftest.$ac_ext <<EOF
7500 #line 7512 "configure"
7501 #include "confdefs.h"
7502 #include <GL/gutil.h>
7504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7505 { (eval echo configure:7517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7507 if test -z "$ac_err"; then
7509 eval "ac_cv_header_$ac_safe=yes"
7512 echo "configure: failed program was:" >&5
7513 cat conftest.$ac_ext >&5
7515 eval "ac_cv_header_$ac_safe=no"
7519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7520 echo "$ac_t""yes" 1>&6
7523 echo "$ac_t""no" 1>&6
7526 CPPFLAGS="$ac_save_CPPFLAGS"
7527 if test "$have_gle" = yes ; then
7529 ac_save_CPPFLAGS="$CPPFLAGS"
7530 if test \! -z "$includedir" ; then
7531 CPPFLAGS="$CPPFLAGS -I$includedir"
7533 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7534 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
7535 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
7536 echo "configure:7548: checking for GL/tube.h" >&5
7537 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7538 echo $ac_n "(cached) $ac_c" 1>&6
7540 cat > conftest.$ac_ext <<EOF
7541 #line 7553 "configure"
7542 #include "confdefs.h"
7543 #include <GL/tube.h>
7545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7546 { (eval echo configure:7558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7548 if test -z "$ac_err"; then
7550 eval "ac_cv_header_$ac_safe=yes"
7553 echo "configure: failed program was:" >&5
7554 cat conftest.$ac_ext >&5
7556 eval "ac_cv_header_$ac_safe=no"
7560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7561 echo "$ac_t""yes" 1>&6
7564 echo "$ac_t""no" 1>&6
7567 CPPFLAGS="$ac_save_CPPFLAGS"
7570 if test "$have_gle" = yes ; then
7574 ac_save_CPPFLAGS="$CPPFLAGS"
7575 ac_save_LDFLAGS="$LDFLAGS"
7576 # ac_save_LIBS="$LIBS"
7578 if test \! -z "$includedir" ; then
7579 CPPFLAGS="$CPPFLAGS -I$includedir"
7581 # note: $X_CFLAGS includes $x_includes
7582 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7584 if test \! -z "$libdir" ; then
7585 LDFLAGS="$LDFLAGS -L$libdir"
7587 # note: $X_LIBS includes $x_libraries
7588 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7590 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
7591 echo "configure:7603: checking for gleCreateGC in -lgle" >&5
7592 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
7593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7594 echo $ac_n "(cached) $ac_c" 1>&6
7596 ac_save_LIBS="$LIBS"
7597 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7598 cat > conftest.$ac_ext <<EOF
7599 #line 7611 "configure"
7600 #include "confdefs.h"
7601 /* Override any gcc2 internal prototype to avoid an error. */
7602 /* We use char because int might match the return type of a gcc2
7603 builtin and then its argument prototype would still apply. */
7610 if { (eval echo configure:7622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7612 eval "ac_cv_lib_$ac_lib_var=yes"
7614 echo "configure: failed program was:" >&5
7615 cat conftest.$ac_ext >&5
7617 eval "ac_cv_lib_$ac_lib_var=no"
7620 LIBS="$ac_save_LIBS"
7623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7624 echo "$ac_t""yes" 1>&6
7625 have_gle=yes; gle_halfassed=no, GLE_LIBS="-lgle"
7627 echo "$ac_t""no" 1>&6
7630 CPPFLAGS="$ac_save_CPPFLAGS"
7631 LDFLAGS="$ac_save_LDFLAGS"
7632 # LIBS="$ac_save_LIBS"
7635 if test "$have_gle" = yes ; then
7639 ac_save_CPPFLAGS="$CPPFLAGS"
7640 ac_save_LDFLAGS="$LDFLAGS"
7641 # ac_save_LIBS="$LIBS"
7643 if test \! -z "$includedir" ; then
7644 CPPFLAGS="$CPPFLAGS -I$includedir"
7646 # note: $X_CFLAGS includes $x_includes
7647 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7649 if test \! -z "$libdir" ; then
7650 LDFLAGS="$LDFLAGS -L$libdir"
7652 # note: $X_LIBS includes $x_libraries
7653 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7655 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
7656 echo "configure:7668: checking for uview_direction_d in -lmatrix" >&5
7657 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
7658 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7659 echo $ac_n "(cached) $ac_c" 1>&6
7661 ac_save_LIBS="$LIBS"
7662 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
7663 cat > conftest.$ac_ext <<EOF
7664 #line 7676 "configure"
7665 #include "confdefs.h"
7666 /* Override any gcc2 internal prototype to avoid an error. */
7667 /* We use char because int might match the return type of a gcc2
7668 builtin and then its argument prototype would still apply. */
7669 char uview_direction_d();
7675 if { (eval echo configure:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7677 eval "ac_cv_lib_$ac_lib_var=yes"
7679 echo "configure: failed program was:" >&5
7680 cat conftest.$ac_ext >&5
7682 eval "ac_cv_lib_$ac_lib_var=no"
7685 LIBS="$ac_save_LIBS"
7688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7689 echo "$ac_t""yes" 1>&6
7690 have_gle=yes; gle_halfassed=no,
7691 GLE_LIBS="$GLE_LIBS -lmatrix"
7693 echo "$ac_t""no" 1>&6
7696 CPPFLAGS="$ac_save_CPPFLAGS"
7697 LDFLAGS="$ac_save_LDFLAGS"
7698 # LIBS="$ac_save_LIBS"
7702 if test "$have_gle" = yes ; then
7703 cat >> confdefs.h <<\EOF
7709 elif test "$with_gle" != no; then
7710 echo "error: must be yes or no: --with-gle=$with_gle"
7717 ###############################################################################
7721 ###############################################################################
7724 with_xpm_req=unspecified
7725 # Check whether --with-xpm or --without-xpm was given.
7726 if test "${with_xpm+set}" = set; then
7728 with_xpm="$withval"; with_xpm_req="$withval"
7740 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
7741 echo "configure:7753: checking for XPM headers" >&5
7744 X_CFLAGS="-I$d $X_CFLAGS"
7745 echo "$ac_t""$d" 1>&6
7747 echo "$ac_t""not found ($d: no such directory)" 1>&6
7750 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
7751 echo "configure:7763: checking for XPM libs" >&5
7754 X_LIBS="-L$d $X_LIBS"
7755 echo "$ac_t""$d" 1>&6
7757 echo "$ac_t""not found ($d: no such directory)" 1>&6
7760 # replace the directory string with "yes".
7762 with_xpm=$with_xpm_req
7767 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
7768 echo " If it is a directory, then \`DIR/include' will be added to"
7769 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7775 if test "$with_xpm" = yes; then
7777 ac_save_CPPFLAGS="$CPPFLAGS"
7778 if test \! -z "$includedir" ; then
7779 CPPFLAGS="$CPPFLAGS -I$includedir"
7781 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7782 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
7783 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
7784 echo "configure:7796: checking for X11/xpm.h" >&5
7785 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7786 echo $ac_n "(cached) $ac_c" 1>&6
7788 cat > conftest.$ac_ext <<EOF
7789 #line 7801 "configure"
7790 #include "confdefs.h"
7791 #include <X11/xpm.h>
7793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7794 { (eval echo configure:7806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7796 if test -z "$ac_err"; then
7798 eval "ac_cv_header_$ac_safe=yes"
7801 echo "configure: failed program was:" >&5
7802 cat conftest.$ac_ext >&5
7804 eval "ac_cv_header_$ac_safe=no"
7808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7809 echo "$ac_t""yes" 1>&6
7811 cat >> confdefs.h <<\EOF
7817 echo "$ac_t""no" 1>&6
7820 CPPFLAGS="$ac_save_CPPFLAGS"
7821 elif test "$with_xpm" != no; then
7822 echo "error: must be yes or no: --with-xpm=$with_xpm"
7826 # See comment near $motif_requires_xpm, above.
7827 # Need to do this here, after both Motif and XPM have been checked for.
7829 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
7830 if test "$motif_requires_xpm" = yes ; then
7831 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
7836 ###############################################################################
7838 # Check for the XSHM server extension.
7840 ###############################################################################
7843 with_xshm_req=unspecified
7844 # Check whether --with-xshm-ext or --without-xshm-ext was given.
7845 if test "${with_xshm_ext+set}" = set; then
7846 withval="$with_xshm_ext"
7847 with_xshm="$withval"; with_xshm_req="$withval"
7854 case "$with_xshm" in
7859 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
7860 echo "configure:7872: checking for XSHM headers" >&5
7861 d=$with_xshm/include
7863 X_CFLAGS="-I$d $X_CFLAGS"
7864 echo "$ac_t""$d" 1>&6
7866 echo "$ac_t""not found ($d: no such directory)" 1>&6
7869 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
7870 echo "configure:7882: checking for XSHM libs" >&5
7873 X_LIBS="-L$d $X_LIBS"
7874 echo "$ac_t""$d" 1>&6
7876 echo "$ac_t""not found ($d: no such directory)" 1>&6
7879 # replace the directory string with "yes".
7881 with_xshm=$with_xshm_req
7886 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
7887 echo " If it is a directory, then \`DIR/include' will be added to"
7888 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7894 if test "$with_xshm" = yes; then
7896 # first check for Xshm.h.
7898 ac_save_CPPFLAGS="$CPPFLAGS"
7899 if test \! -z "$includedir" ; then
7900 CPPFLAGS="$CPPFLAGS -I$includedir"
7902 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7903 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
7904 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
7905 echo "configure:7917: checking for X11/extensions/XShm.h" >&5
7906 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7907 echo $ac_n "(cached) $ac_c" 1>&6
7909 cat > conftest.$ac_ext <<EOF
7910 #line 7922 "configure"
7911 #include "confdefs.h"
7912 #include <X11/extensions/XShm.h>
7914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7915 { (eval echo configure:7927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7917 if test -z "$ac_err"; then
7919 eval "ac_cv_header_$ac_safe=yes"
7922 echo "configure: failed program was:" >&5
7923 cat conftest.$ac_ext >&5
7925 eval "ac_cv_header_$ac_safe=no"
7929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7930 echo "$ac_t""yes" 1>&6
7933 echo "$ac_t""no" 1>&6
7936 CPPFLAGS="$ac_save_CPPFLAGS"
7938 # if that succeeded, then check for sys/ipc.h.
7939 if test "$have_xshm" = yes; then
7942 ac_save_CPPFLAGS="$CPPFLAGS"
7943 if test \! -z "$includedir" ; then
7944 CPPFLAGS="$CPPFLAGS -I$includedir"
7946 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7947 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
7948 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
7949 echo "configure:7961: checking for sys/ipc.h" >&5
7950 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7951 echo $ac_n "(cached) $ac_c" 1>&6
7953 cat > conftest.$ac_ext <<EOF
7954 #line 7966 "configure"
7955 #include "confdefs.h"
7956 #include <sys/ipc.h>
7958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7959 { (eval echo configure:7971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7961 if test -z "$ac_err"; then
7963 eval "ac_cv_header_$ac_safe=yes"
7966 echo "configure: failed program was:" >&5
7967 cat conftest.$ac_ext >&5
7969 eval "ac_cv_header_$ac_safe=no"
7973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7974 echo "$ac_t""yes" 1>&6
7977 echo "$ac_t""no" 1>&6
7980 CPPFLAGS="$ac_save_CPPFLAGS"
7983 # if that succeeded, then check for sys/shm.h.
7984 if test "$have_xshm" = yes; then
7987 ac_save_CPPFLAGS="$CPPFLAGS"
7988 if test \! -z "$includedir" ; then
7989 CPPFLAGS="$CPPFLAGS -I$includedir"
7991 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7992 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
7993 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
7994 echo "configure:8006: checking for sys/shm.h" >&5
7995 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7996 echo $ac_n "(cached) $ac_c" 1>&6
7998 cat > conftest.$ac_ext <<EOF
7999 #line 8011 "configure"
8000 #include "confdefs.h"
8001 #include <sys/shm.h>
8003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8004 { (eval echo configure:8016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8006 if test -z "$ac_err"; then
8008 eval "ac_cv_header_$ac_safe=yes"
8011 echo "configure: failed program was:" >&5
8012 cat conftest.$ac_ext >&5
8014 eval "ac_cv_header_$ac_safe=no"
8018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8019 echo "$ac_t""yes" 1>&6
8022 echo "$ac_t""no" 1>&6
8025 CPPFLAGS="$ac_save_CPPFLAGS"
8028 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
8029 # to exist, but the library code to not exist. And even better, the library
8030 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
8031 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
8032 # that's not quite right, but close enough.)
8036 if `uname -v` -eq 3 ; then
8039 ac_save_CPPFLAGS="$CPPFLAGS"
8040 ac_save_LDFLAGS="$LDFLAGS"
8041 # ac_save_LIBS="$LIBS"
8043 if test \! -z "$includedir" ; then
8044 CPPFLAGS="$CPPFLAGS -I$includedir"
8046 # note: $X_CFLAGS includes $x_includes
8047 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8049 if test \! -z "$libdir" ; then
8050 LDFLAGS="$LDFLAGS -L$libdir"
8052 # note: $X_LIBS includes $x_libraries
8053 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8055 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
8056 echo "configure:8068: checking for XShmQueryExtension in -lXextSam" >&5
8057 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
8058 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8059 echo $ac_n "(cached) $ac_c" 1>&6
8061 ac_save_LIBS="$LIBS"
8062 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
8063 cat > conftest.$ac_ext <<EOF
8064 #line 8076 "configure"
8065 #include "confdefs.h"
8066 /* Override any gcc2 internal prototype to avoid an error. */
8067 /* We use char because int might match the return type of a gcc2
8068 builtin and then its argument prototype would still apply. */
8069 char XShmQueryExtension();
8072 XShmQueryExtension()
8075 if { (eval echo configure:8087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8077 eval "ac_cv_lib_$ac_lib_var=yes"
8079 echo "configure: failed program was:" >&5
8080 cat conftest.$ac_ext >&5
8082 eval "ac_cv_lib_$ac_lib_var=no"
8085 LIBS="$ac_save_LIBS"
8088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8089 echo "$ac_t""yes" 1>&6
8090 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
8092 echo "$ac_t""no" 1>&6
8096 CPPFLAGS="$ac_save_CPPFLAGS"
8097 LDFLAGS="$ac_save_LDFLAGS"
8098 # LIBS="$ac_save_LIBS"
8104 # if that succeeded, then we've really got it.
8105 if test "$have_xshm" = yes; then
8106 cat >> confdefs.h <<\EOF
8107 #define HAVE_XSHM_EXTENSION 1
8112 elif test "$with_xshm" != no; then
8113 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
8118 ###############################################################################
8120 # Check for the DOUBLE-BUFFER server extension.
8122 ###############################################################################
8125 with_xdbe_req=unspecified
8126 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
8127 if test "${with_xdbe_ext+set}" = set; then
8128 withval="$with_xdbe_ext"
8129 with_xdbe="$withval"; with_xdbe_req="$withval"
8136 case "$with_xdbe" in
8141 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
8142 echo "configure:8154: checking for DOUBLE-BUFFER headers" >&5
8143 d=$with_xdbe/include
8145 X_CFLAGS="-I$d $X_CFLAGS"
8146 echo "$ac_t""$d" 1>&6
8148 echo "$ac_t""not found ($d: no such directory)" 1>&6
8151 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
8152 echo "configure:8164: checking for DOUBLE-BUFFER libs" >&5
8155 X_LIBS="-L$d $X_LIBS"
8156 echo "$ac_t""$d" 1>&6
8158 echo "$ac_t""not found ($d: no such directory)" 1>&6
8161 # replace the directory string with "yes".
8163 with_xdbe=$with_xdbe_req
8168 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
8169 echo " If it is a directory, then \`DIR/include' will be added to"
8170 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8176 if test "$with_xdbe" = yes; then
8179 ac_save_CPPFLAGS="$CPPFLAGS"
8180 if test \! -z "$includedir" ; then
8181 CPPFLAGS="$CPPFLAGS -I$includedir"
8183 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8184 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8185 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8186 echo "configure:8198: checking for X11/extensions/Xdbe.h" >&5
8187 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8188 echo $ac_n "(cached) $ac_c" 1>&6
8190 cat > conftest.$ac_ext <<EOF
8191 #line 8203 "configure"
8192 #include "confdefs.h"
8193 #include <X11/extensions/Xdbe.h>
8195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8196 { (eval echo configure:8208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8198 if test -z "$ac_err"; then
8200 eval "ac_cv_header_$ac_safe=yes"
8203 echo "configure: failed program was:" >&5
8204 cat conftest.$ac_ext >&5
8206 eval "ac_cv_header_$ac_safe=no"
8210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8211 echo "$ac_t""yes" 1>&6
8214 echo "$ac_t""no" 1>&6
8217 CPPFLAGS="$ac_save_CPPFLAGS"
8218 if test "$have_xdbe" = yes; then
8219 cat >> confdefs.h <<\EOF
8220 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8225 elif test "$with_xdbe" != no; then
8226 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8231 ###############################################################################
8233 # Check for the SGI XReadDisplay server extension.
8235 # Note: this has to be down here, rather than up with the other server
8236 # extension tests, so that the output of `configure --help' is in the
8237 # right order. Arrgh!
8239 ###############################################################################
8242 with_readdisplay_req=unspecified
8243 # Check whether --with-readdisplay or --without-readdisplay was given.
8244 if test "${with_readdisplay+set}" = set; then
8245 withval="$with_readdisplay"
8246 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8248 with_readdisplay=yes
8253 case "$with_readdisplay" in
8258 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8259 echo "configure:8271: checking for XReadDisplay headers" >&5
8260 d=$with_readdisplay/include
8262 X_CFLAGS="-I$d $X_CFLAGS"
8263 echo "$ac_t""$d" 1>&6
8265 echo "$ac_t""not found ($d: no such directory)" 1>&6
8268 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8269 echo "configure:8281: checking for XReadDisplay libs" >&5
8270 d=$with_readdisplay/lib
8272 X_LIBS="-L$d $X_LIBS"
8273 echo "$ac_t""$d" 1>&6
8275 echo "$ac_t""not found ($d: no such directory)" 1>&6
8278 # replace the directory string with "yes".
8279 with_readdisplay_req="yes"
8280 with_readdisplay=$with_readdisplay_req
8285 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8286 echo " If it is a directory, then \`DIR/include' will be added to"
8287 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8293 if test "$with_readdisplay" = yes; then
8295 ac_save_CPPFLAGS="$CPPFLAGS"
8296 if test \! -z "$includedir" ; then
8297 CPPFLAGS="$CPPFLAGS -I$includedir"
8299 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8300 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8301 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8302 echo "configure:8314: checking for X11/extensions/readdisplay.h" >&5
8303 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8304 echo $ac_n "(cached) $ac_c" 1>&6
8306 cat > conftest.$ac_ext <<EOF
8307 #line 8319 "configure"
8308 #include "confdefs.h"
8309 #include <X11/extensions/readdisplay.h>
8311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8312 { (eval echo configure:8324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8314 if test -z "$ac_err"; then
8316 eval "ac_cv_header_$ac_safe=yes"
8319 echo "configure: failed program was:" >&5
8320 cat conftest.$ac_ext >&5
8322 eval "ac_cv_header_$ac_safe=no"
8326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8327 echo "$ac_t""yes" 1>&6
8328 cat >> confdefs.h <<\EOF
8329 #define HAVE_READ_DISPLAY_EXTENSION 1
8333 echo "$ac_t""no" 1>&6
8336 CPPFLAGS="$ac_save_CPPFLAGS"
8337 elif test "$with_readdisplay" != no; then
8338 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8343 ###############################################################################
8345 # Check for the SGI Iris Video Library.
8347 ###############################################################################
8350 with_sgivideo_req=unspecified
8351 # Check whether --with-sgivideo or --without-sgivideo was given.
8352 if test "${with_sgivideo+set}" = set; then
8353 withval="$with_sgivideo"
8354 with_sgivideo="$withval"; with_sgivideo_req="$withval"
8361 case "$with_sgivideo" in
8366 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
8367 echo "configure:8379: checking for Iris Video headers" >&5
8368 d=$with_sgivideo/include
8370 X_CFLAGS="-I$d $X_CFLAGS"
8371 echo "$ac_t""$d" 1>&6
8373 echo "$ac_t""not found ($d: no such directory)" 1>&6
8376 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
8377 echo "configure:8389: checking for Iris Video libs" >&5
8378 d=$with_sgivideo/lib
8380 X_LIBS="-L$d $X_LIBS"
8381 echo "$ac_t""$d" 1>&6
8383 echo "$ac_t""not found ($d: no such directory)" 1>&6
8386 # replace the directory string with "yes".
8387 with_sgivideo_req="yes"
8388 with_sgivideo=$with_sgivideo_req
8393 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8394 echo " If it is a directory, then \`DIR/include' will be added to"
8395 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8401 if test "$with_sgivideo" = yes; then
8403 ac_save_CPPFLAGS="$CPPFLAGS"
8404 if test \! -z "$includedir" ; then
8405 CPPFLAGS="$CPPFLAGS -I$includedir"
8407 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8408 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8409 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8410 echo "configure:8422: checking for dmedia/vl.h" >&5
8411 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8412 echo $ac_n "(cached) $ac_c" 1>&6
8414 cat > conftest.$ac_ext <<EOF
8415 #line 8427 "configure"
8416 #include "confdefs.h"
8417 #include <dmedia/vl.h>
8419 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8420 { (eval echo configure:8432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8421 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8422 if test -z "$ac_err"; then
8424 eval "ac_cv_header_$ac_safe=yes"
8427 echo "configure: failed program was:" >&5
8428 cat conftest.$ac_ext >&5
8430 eval "ac_cv_header_$ac_safe=no"
8434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8435 echo "$ac_t""yes" 1>&6
8438 echo "$ac_t""no" 1>&6
8441 CPPFLAGS="$ac_save_CPPFLAGS"
8442 if test "$have_sgivideo" = yes; then
8444 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8445 echo "configure:8457: checking for vlOpenVideo in -lvl" >&5
8446 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8448 echo $ac_n "(cached) $ac_c" 1>&6
8450 ac_save_LIBS="$LIBS"
8452 cat > conftest.$ac_ext <<EOF
8453 #line 8465 "configure"
8454 #include "confdefs.h"
8455 /* Override any gcc2 internal prototype to avoid an error. */
8456 /* We use char because int might match the return type of a gcc2
8457 builtin and then its argument prototype would still apply. */
8464 if { (eval echo configure:8476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8466 eval "ac_cv_lib_$ac_lib_var=yes"
8468 echo "configure: failed program was:" >&5
8469 cat conftest.$ac_ext >&5
8471 eval "ac_cv_lib_$ac_lib_var=no"
8474 LIBS="$ac_save_LIBS"
8477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8478 echo "$ac_t""yes" 1>&6
8481 echo "$ac_t""no" 1>&6
8484 if test "$have_sgivideo" = yes; then
8485 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8486 SGI_VIDEO_LIBS="-lvl"
8487 cat >> confdefs.h <<\EOF
8488 #define HAVE_SGI_VIDEO 1
8493 elif test "$with_sgivideo" != no; then
8494 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8499 ###############################################################################
8501 # Check for a program to generate random text.
8503 # Zippy is funnier than the idiocy generally spat out by `fortune',
8504 # so try to find that, by invoking Emacs and asking it where its
8505 # libexec directory is ("yow" lives in there.)
8507 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8508 # and if so, use them.
8510 # If that doesn't work, look in /usr/games, and if it's there, use
8511 # the full pathname.
8513 ###############################################################################
8516 # Check whether --with-zippy or --without-zippy was given.
8517 if test "${with_zippy+set}" = set; then
8518 withval="$with_zippy"
8519 with_zippy_req="$withval"; with_zippy="$withval"
8525 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8530 if test -n "$with_zippy_req" ; then
8531 ac_cv_zippy_program=""
8532 case "$with_zippy_req" in
8534 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8535 echo "configure:8547: checking for $with_zippy_req" >&5
8536 if test -x "$with_zippy_req" ; then
8537 echo "$ac_t""yes" 1>&6
8539 echo "$ac_t""no" 1>&6
8545 unset ac_cv_path_zip2
8546 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8547 set dummy $with_zippy_req; ac_word=$2
8548 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8549 echo "configure:8561: checking for $ac_word" >&5
8550 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8551 echo $ac_n "(cached) $ac_c" 1>&6
8555 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8558 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8561 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8563 for ac_dir in $ac_dummy; do
8564 test -z "$ac_dir" && ac_dir=.
8565 if test -f $ac_dir/$ac_word; then
8566 ac_cv_path_zip2="$ac_dir/$ac_word"
8574 zip2="$ac_cv_path_zip2"
8575 if test -n "$zip2"; then
8576 echo "$ac_t""$zip2" 1>&6
8578 echo "$ac_t""no" 1>&6
8581 if test "$zip2" = ""; then
8586 ac_cv_zippy_program="$with_zippy"
8588 elif test -n "$ac_cv_zippy_program"; then
8589 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8592 if test ! -n "$ac_cv_zippy_program"; then
8594 for ac_prog in emacs
8596 # Extract the first word of "$ac_prog", so it can be a program name with args.
8597 set dummy $ac_prog; ac_word=$2
8598 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8599 echo "configure:8611: checking for $ac_word" >&5
8600 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8601 echo $ac_n "(cached) $ac_c" 1>&6
8603 if test -n "$emacs_exe"; then
8604 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8606 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8608 for ac_dir in $ac_dummy; do
8609 test -z "$ac_dir" && ac_dir=.
8610 if test -f $ac_dir/$ac_word; then
8611 ac_cv_prog_emacs_exe="$ac_prog"
8618 emacs_exe="$ac_cv_prog_emacs_exe"
8619 if test -n "$emacs_exe"; then
8620 echo "$ac_t""$emacs_exe" 1>&6
8622 echo "$ac_t""no" 1>&6
8625 test -n "$emacs_exe" && break
8628 for ac_prog in xemacs
8630 # Extract the first word of "$ac_prog", so it can be a program name with args.
8631 set dummy $ac_prog; ac_word=$2
8632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8633 echo "configure:8645: checking for $ac_word" >&5
8634 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
8635 echo $ac_n "(cached) $ac_c" 1>&6
8637 if test -n "$xemacs_exe"; then
8638 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
8640 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8642 for ac_dir in $ac_dummy; do
8643 test -z "$ac_dir" && ac_dir=.
8644 if test -f $ac_dir/$ac_word; then
8645 ac_cv_prog_xemacs_exe="$ac_prog"
8652 xemacs_exe="$ac_cv_prog_xemacs_exe"
8653 if test -n "$xemacs_exe"; then
8654 echo "$ac_t""$xemacs_exe" 1>&6
8656 echo "$ac_t""no" 1>&6
8659 test -n "$xemacs_exe" && break
8663 ac_cv_zippy_program=""
8664 eargs='-batch -q -nw --eval'
8666 if test -n "$emacs_exe" ; then
8667 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
8668 echo "configure:8680: checking for emacs yow" >&5
8670 # get emacs to tell us where the libexec directory is.
8672 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8673 2>/dev/null | tail -1`
8674 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8676 # try running libexec/yow and see if it exits without error.
8678 if test x"$dir" != x -a -x "$dir/yow" ; then
8679 if $dir/yow >&- 2>&- ; then
8680 ac_cv_zippy_program="$dir/yow"
8681 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8683 echo "$ac_t""no" 1>&6
8688 if test -z "$ac_cv_zippy_program" ; then
8689 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
8690 echo "configure:8702: checking for xemacs yow" >&5
8691 if test -n "$xemacs_exe" ; then
8693 # get xemacs to tell us where the libexec directory is.
8695 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8696 2>/dev/null | tail -1`
8697 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8699 # try running libexec/yow and see if it exits without error.
8701 if test x"$dir" != x -a -x "$dir/yow" ; then
8702 if $dir/yow >&- 2>&- ; then
8703 ac_cv_zippy_program="$dir/yow"
8704 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8707 # in some xemacs installations, the pathname of the yow.lines file
8708 # isn't hardcoded into the yow executable, and must be passed on
8709 # the command line. See if it's in libexec/../etc/.
8713 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
8716 yowlines="$dir_up/etc/yow.lines"
8717 if $dir/yow -f $yowlines >&- 2>&- ; then
8718 ac_cv_zippy_program="$dir/yow -f $yowlines"
8719 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8722 # In newer XEmacs releases, yow.lines is in a different place,
8723 # and the easiest way to get it is by calling the new function
8724 # `locate-data-file'.
8726 yowlines=`$xemacs_exe $eargs \
8727 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
8728 2>/dev/null | tail -1`
8729 if $dir/yow -f $yowlines >&- 2>&- ; then
8730 ac_cv_zippy_program="$dir/yow -f $yowlines"
8731 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8733 echo "$ac_t""no" 1>&6
8741 # if that didn't work, try for some other programs...
8742 if test -z "$ac_cv_zippy_program" ; then
8744 for ac_prog in fortune zippy yow
8746 # Extract the first word of "$ac_prog", so it can be a program name with args.
8747 set dummy $ac_prog; ac_word=$2
8748 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8749 echo "configure:8761: checking for $ac_word" >&5
8750 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
8751 echo $ac_n "(cached) $ac_c" 1>&6
8753 if test -n "$fortune"; then
8754 ac_cv_prog_fortune="$fortune" # Let the user override the test.
8756 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8758 for ac_dir in $ac_dummy; do
8759 test -z "$ac_dir" && ac_dir=.
8760 if test -f $ac_dir/$ac_word; then
8761 ac_cv_prog_fortune="$ac_prog"
8768 fortune="$ac_cv_prog_fortune"
8769 if test -n "$fortune"; then
8770 echo "$ac_t""$fortune" 1>&6
8772 echo "$ac_t""no" 1>&6
8775 test -n "$fortune" && break
8778 # if that didn't work, try for those programs in /usr/games...
8779 if test -z "$fortune" ; then
8780 for ac_prog in fortune zippy yow
8782 # Extract the first word of "$ac_prog", so it can be a program name with args.
8783 set dummy $ac_prog; ac_word=$2
8784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8785 echo "configure:8797: checking for $ac_word" >&5
8786 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
8787 echo $ac_n "(cached) $ac_c" 1>&6
8791 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
8794 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
8797 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8798 ac_dummy="/usr/games:/usr/local/games:$PATH"
8799 for ac_dir in $ac_dummy; do
8800 test -z "$ac_dir" && ac_dir=.
8801 if test -f $ac_dir/$ac_word; then
8802 ac_cv_path_fortune="$ac_dir/$ac_word"
8810 fortune="$ac_cv_path_fortune"
8811 if test -n "$fortune"; then
8812 echo "$ac_t""$fortune" 1>&6
8814 echo "$ac_t""no" 1>&6
8817 test -n "$fortune" && break
8819 test -n "$fortune" || fortune="fortune"
8825 if test -z "$ac_cv_zippy_program" ; then
8826 ac_cv_zippy_program=fortune
8829 cat >> confdefs.h <<EOF
8830 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
8835 ###############################################################################
8837 # Done testing. Now, set up the various -I and -L variables,
8838 # and decide which GUI program to build by default.
8840 ###############################################################################
8847 if test \! -z "$includedir" ; then
8848 INCLUDES="$INCLUDES -I$includedir"
8851 if test \! -z "$libdir" ; then
8852 LDFLAGS="$LDFLAGS -L$libdir"
8856 DEMO_MAN="xscreensaver-demo-old.man"
8858 if test "$have_athena" = yes; then
8859 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw
8860 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8862 if test "$have_athena3d" = yes; then
8863 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw3d
8864 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8866 if test "$have_motif" = yes; then
8867 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
8868 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8870 if test "$have_gtk" = yes; then
8871 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
8872 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8873 DEMO_MAN="xscreensaver-demo.man"
8877 if test "$have_kerberos" = yes; then
8878 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
8879 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
8881 if test "$have_pam" = yes; then
8882 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
8883 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
8884 INSTALL_PAM="install-pam"
8886 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
8887 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
8890 if test "$enable_locking" = yes; then
8891 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
8892 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
8894 LOCK_SRCS='$(NOLOCK_SRCS_1)'
8895 LOCK_OBJS='$(NOLOCK_OBJS_1)'
8898 if test "$need_setuid" = yes; then
8900 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
8903 INSTALL_SETUID='$(INSTALL_PROGRAM)'
8907 if test "$have_gl" = yes; then
8908 GL_EXES='$(GL_EXES)'
8912 GL_KLUDGE="-${tab} "
8915 if test "$have_gle" = yes; then
8916 GLE_EXES='$(GLE_EXES)'
8917 GLE_MEN='$(GLE_MEN)'
8918 GLE_KLUDGE="${tab} "
8920 GLE_KLUDGE="-${tab} "
8924 ###############################################################################
8926 # Perform substitutions and write Makefiles.
8928 ###############################################################################
8969 APPDEFAULTS=$ac_x_app_defaults
8978 cat > confcache <<\EOF
8979 # This file is a shell script that caches the results of configure
8980 # tests run on this system so they can be shared between configure
8981 # scripts and configure runs. It is not useful on other systems.
8982 # If it contains results you don't want to keep, you may remove or edit it.
8984 # By default, configure uses ./config.cache as the cache file,
8985 # creating it if it does not exist already. You can give configure
8986 # the --cache-file=FILE option to use a different cache file; that is
8987 # what configure does when it calls configure scripts in
8988 # subdirectories, so they share the cache.
8989 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8990 # config.status only pays attention to the cache file if you give it the
8991 # --recheck option to rerun configure.
8994 # The following way of writing the cache mishandles newlines in values,
8995 # but we know of no workaround that is simple, portable, and efficient.
8996 # So, don't put newlines in cache variables' values.
8997 # Ultrix sh set writes to stderr and can't be redirected directly,
8998 # and sets the high bit in the cache file unless we assign to the vars.
9000 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9002 # `set' does not quote correctly, so add quotes (double-quote substitution
9003 # turns \\\\ into \\, and sed turns \\ into \).
9005 -e "s/'/'\\\\''/g" \
9006 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9009 # `set' quotes correctly as required by POSIX, so do not add quotes.
9010 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9013 if cmp -s $cache_file confcache; then
9016 if test -w $cache_file; then
9017 echo "updating cache $cache_file"
9018 cat confcache > $cache_file
9020 echo "not updating unwritable cache $cache_file"
9025 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9027 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9028 # Let make expand exec_prefix.
9029 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9031 # Any assignment to VPATH causes Sun make to only execute
9032 # the first set of double-colon rules, so remove it if not needed.
9033 # If there is a colon in the path, we need to keep it.
9034 if test "x$srcdir" = x.; then
9035 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9038 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9040 DEFS=-DHAVE_CONFIG_H
9042 # Without the "./", some shells look in PATH for config.status.
9043 : ${CONFIG_STATUS=./config.status}
9045 echo creating $CONFIG_STATUS
9046 rm -f $CONFIG_STATUS
9047 cat > $CONFIG_STATUS <<EOF
9049 # Generated automatically by configure.
9050 # Run this file to recreate the current configuration.
9051 # This directory was configured as follows,
9052 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9054 # $0 $ac_configure_args
9056 # Compiler output produced by configure, useful for debugging
9057 # configure, is in ./config.log if it exists.
9059 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9062 case "\$ac_option" in
9063 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9064 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9065 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9066 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9067 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9069 -help | --help | --hel | --he | --h)
9070 echo "\$ac_cs_usage"; exit 0 ;;
9071 *) echo "\$ac_cs_usage"; exit 1 ;;
9075 ac_given_srcdir=$srcdir
9076 ac_given_INSTALL="$INSTALL"
9078 trap 'rm -fr `echo "Makefile
9083 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9085 cat >> $CONFIG_STATUS <<EOF
9087 # Protect against being on the right side of a sed subst in config.status.
9088 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9089 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9093 s%@CFLAGS@%$CFLAGS%g
9094 s%@CPPFLAGS@%$CPPFLAGS%g
9095 s%@CXXFLAGS@%$CXXFLAGS%g
9096 s%@FFLAGS@%$FFLAGS%g
9098 s%@LDFLAGS@%$LDFLAGS%g
9100 s%@exec_prefix@%$exec_prefix%g
9101 s%@prefix@%$prefix%g
9102 s%@program_transform_name@%$program_transform_name%g
9103 s%@bindir@%$bindir%g
9104 s%@sbindir@%$sbindir%g
9105 s%@libexecdir@%$libexecdir%g
9106 s%@datadir@%$datadir%g
9107 s%@sysconfdir@%$sysconfdir%g
9108 s%@sharedstatedir@%$sharedstatedir%g
9109 s%@localstatedir@%$localstatedir%g
9110 s%@libdir@%$libdir%g
9111 s%@includedir@%$includedir%g
9112 s%@oldincludedir@%$oldincludedir%g
9113 s%@infodir@%$infodir%g
9114 s%@mandir@%$mandir%g
9116 s%@host_alias@%$host_alias%g
9117 s%@host_cpu@%$host_cpu%g
9118 s%@host_vendor@%$host_vendor%g
9119 s%@host_os@%$host_os%g
9122 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9123 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9124 s%@INSTALL_DATA@%$INSTALL_DATA%g
9125 s%@SET_MAKE@%$SET_MAKE%g
9127 s%@X_CFLAGS@%$X_CFLAGS%g
9128 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9129 s%@X_LIBS@%$X_LIBS%g
9130 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9131 s%@glib_config@%$glib_config%g
9132 s%@gtk_config@%$gtk_config%g
9134 s%@emacs_exe@%$emacs_exe%g
9135 s%@xemacs_exe@%$xemacs_exe%g
9136 s%@fortune@%$fortune%g
9137 s%@INCLUDES@%$INCLUDES%g
9138 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
9139 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
9140 s%@DEMO_MAN@%$DEMO_MAN%g
9141 s%@SAVER_LIBS@%$SAVER_LIBS%g
9142 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
9143 s%@GTK_LIBS@%$GTK_LIBS%g
9144 s%@ATHENA_LIBS@%$ATHENA_LIBS%g
9145 s%@ATHENA3D_LIBS@%$ATHENA3D_LIBS%g
9146 s%@HACK_LIBS@%$HACK_LIBS%g
9147 s%@XPM_LIBS@%$XPM_LIBS%g
9148 s%@GL_LIBS@%$GL_LIBS%g
9149 s%@GLE_LIBS@%$GLE_LIBS%g
9150 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
9151 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
9152 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
9153 s%@NEED_SETUID@%$NEED_SETUID%g
9154 s%@INSTALL_PAM@%$INSTALL_PAM%g
9155 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
9156 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
9157 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
9158 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
9159 s%@XMU_SRCS@%$XMU_SRCS%g
9160 s%@XMU_OBJS@%$XMU_OBJS%g
9161 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
9162 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
9163 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
9164 s%@LOCK_SRCS@%$LOCK_SRCS%g
9165 s%@LOCK_OBJS@%$LOCK_OBJS%g
9166 s%@GL_EXES@%$GL_EXES%g
9167 s%@GL_MEN@%$GL_MEN%g
9168 s%@GL_KLUDGE@%$GL_KLUDGE%g
9169 s%@GLE_EXES@%$GLE_EXES%g
9170 s%@GLE_MEN@%$GLE_MEN%g
9171 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
9172 s%@HACKDIR@%$HACKDIR%g
9173 s%@APPDEFAULTS@%$APPDEFAULTS%g
9174 s%@DEPEND@%$DEPEND%g
9175 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
9176 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
9181 cat >> $CONFIG_STATUS <<\EOF
9183 # Split the substitutions into bite-sized pieces for seds with
9184 # small command number limits, like on Digital OSF/1 and HP-UX.
9185 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9186 ac_file=1 # Number of current file.
9187 ac_beg=1 # First line for current file.
9188 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9191 while $ac_more_lines; do
9192 if test $ac_beg -gt 1; then
9193 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9195 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9197 if test ! -s conftest.s$ac_file; then
9199 rm -f conftest.s$ac_file
9201 if test -z "$ac_sed_cmds"; then
9202 ac_sed_cmds="sed -f conftest.s$ac_file"
9204 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9206 ac_file=`expr $ac_file + 1`
9208 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9211 if test -z "$ac_sed_cmds"; then
9216 cat >> $CONFIG_STATUS <<EOF
9218 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9223 driver/XScreenSaver.ad"}
9225 cat >> $CONFIG_STATUS <<\EOF
9226 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9227 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9229 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9230 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9231 *) ac_file_in="${ac_file}.in" ;;
9234 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9236 # Remove last slash and all that follows it. Not all systems have dirname.
9237 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9238 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9239 # The file is in a subdirectory.
9240 test ! -d "$ac_dir" && mkdir "$ac_dir"
9241 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9242 # A "../" for each directory in $ac_dir_suffix.
9243 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9245 ac_dir_suffix= ac_dots=
9248 case "$ac_given_srcdir" in
9250 if test -z "$ac_dots"; then top_srcdir=.
9251 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9252 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9254 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9255 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9258 case "$ac_given_INSTALL" in
9259 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9260 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9263 echo creating "$ac_file"
9265 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9267 *Makefile*) ac_comsub="1i\\
9268 # $configure_input" ;;
9272 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9274 s%@configure_input@%$configure_input%g
9275 s%@srcdir@%$srcdir%g
9276 s%@top_srcdir@%$top_srcdir%g
9277 s%@INSTALL@%$INSTALL%g
9278 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9282 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9283 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9285 # ac_d sets the value in "#define NAME VALUE" lines.
9286 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9287 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9290 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9291 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9292 ac_uB='\([ ]\)%\1#\2define\3'
9295 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9296 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9297 ac_eB='$%\1#\2define\3'
9301 if test "${CONFIG_HEADERS+set}" != set; then
9303 cat >> $CONFIG_STATUS <<EOF
9304 CONFIG_HEADERS="config.h"
9306 cat >> $CONFIG_STATUS <<\EOF
9308 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9309 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9311 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9312 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9313 *) ac_file_in="${ac_file}.in" ;;
9316 echo creating $ac_file
9318 rm -f conftest.frag conftest.in conftest.out
9319 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9320 cat $ac_file_inputs > conftest.in
9324 # Transform confdefs.h into a sed script conftest.vals that substitutes
9325 # the proper values into config.h.in to produce config.h. And first:
9326 # Protect against being on the right side of a sed subst in config.status.
9327 # Protect against being in an unquoted here document in config.status.
9329 cat > conftest.hdr <<\EOF
9332 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9336 sed -n -f conftest.hdr confdefs.h > conftest.vals
9339 # This sed command replaces #undef with comments. This is necessary, for
9340 # example, in the case of _POSIX_SOURCE, which is predefined and required
9341 # on some systems where configure will not decide to define it.
9342 cat >> conftest.vals <<\EOF
9343 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9346 # Break up conftest.vals because some shells have a limit on
9347 # the size of here documents, and old seds have small limits too.
9352 ac_lines=`grep -c . conftest.vals`
9353 # grep -c gives empty output for an empty file on some AIX systems.
9354 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9355 # Write a limited-size here document to conftest.frag.
9356 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9357 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9359 sed -f conftest.frag conftest.in > conftest.out
9361 mv conftest.out conftest.in
9363 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9365 mv conftest.tail conftest.vals
9369 cat >> $CONFIG_STATUS <<\EOF
9370 rm -f conftest.frag conftest.h
9371 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9372 cat conftest.in >> conftest.h
9374 if cmp -s $ac_file conftest.h 2>/dev/null; then
9375 echo "$ac_file is unchanged"
9378 # Remove last slash and all that follows it. Not all systems have dirname.
9379 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9380 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9381 # The file is in a subdirectory.
9382 test ! -d "$ac_dir" && mkdir "$ac_dir"
9385 mv conftest.h $ac_file
9390 cat >> $CONFIG_STATUS <<EOF
9393 cat >> $CONFIG_STATUS <<\EOF
9397 chmod +x $CONFIG_STATUS
9398 rm -fr confdefs* $ac_clean_files
9399 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9402 ###############################################################################
9404 # Print some warnings at the end.
9406 ###############################################################################
9408 warn_prefix_1=" Warning:"
9409 warn_prefix_2=" Note:"
9410 warn_prefix="$warn_prefix_1"
9413 warnsep=' #################################################################'
9416 if test "$warning" = no ; then
9417 echo '' ; echo "$warnsep" ; echo ''
9424 if test "$warning" = long ; then echo '' ; fi
9426 echo "$warn_prefix $@"
9433 if test "$was" != no ; then echo '' ; fi
9434 echo "$warn_prefix $@"
9443 warn_prefix="$warn_prefix_2"
9445 warn_prefix="$warn_prefix_1"
9449 warn_prefix="$warn_prefix_2"
9451 warn_prefix="$warn_prefix_1"
9455 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9456 warn 'The SGI saver extension was requested, but was not found.'
9459 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9460 warn 'The MIT saver extension was requested, but was not found.'
9463 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9464 warn 'The XIdle extension was requested, but was not found.'
9467 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9468 warn 'The XSHM extension was requested, but was not found.'
9471 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9472 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9475 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9476 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9479 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9480 warn 'The DPMS extension was requested, but was not found.'
9483 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9484 warn 'The XF86VMODE extension was requested, but was not found.'
9487 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9488 warn "Checking of /proc/interrupts was requested, but it's bogus."
9492 if test "$have_motif" = no -a "$have_gtk" = no -a "$have_athena" = no ; then
9493 warnL "None of Motif, Gtk, or Athena widgets seem to be available;"
9494 warn2 "the \`xscreensaver-demo' program requires one of these."
9496 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9497 warnL "Use of Motif was requested, but it wasn't found;"
9498 if test "$have_gtk" = yes; then
9499 warn2 "Gtk will be used instead."
9501 warn2 "Athena will be used instead."
9504 elif test "$jurassic_gtk" = yes ; then
9508 v="$ac_gtk_version_string"
9509 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9510 warnL "Use of Gtk was requested, but its version number is unknown;"
9511 elif test "$with_gtk_req" = yes ; then
9512 warnL "Use of Gtk was requested, but it is version $v;"
9514 warnL "Gtk was found on this system, but it is version $v;"
9517 if test "$have_motif" = yes; then
9523 warn2 "Gtk $pref_gtk or newer is required. $which will be used instead."
9525 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9526 warnL "Use of Gtk was requested, but it wasn't found;"
9527 if test "$have_motif" = yes; then
9528 warn2 "Motif will be used instead."
9530 warn2 "Athena will be used instead."
9533 elif test "$with_athena_req" = yes -a "$have_athena" = no ; then
9534 warnL "Use of Athena was requested, but it wasn't found;"
9535 if test "$have_gtk" = yes; then
9536 warn2 "Gtk will be used instead."
9538 warn2 "Motif will be used instead."
9543 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9545 preferred_lesstif=0.86
9547 if test "$lesstif_version" = unknown; then
9548 warnL "Unable to determine the LessTif version number!"
9549 warn2 "Make sure you are using version $preferred_lesstif or newer."
9550 warn2 "See <http://www.lesstif.org/>."
9552 elif test \! $lesstif_version -gt 82; then
9553 warnL "LessTif version $lesstif_version_string is being used."
9554 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9555 warn2 "use with XScreenSaver; it is strongly recommended"
9556 warn2 "that you upgrade to at least version $preferred_lesstif!"
9557 warn2 "See <http://www.lesstif.org/>."
9561 if test "$have_athena" = yes -a "$have_motif" = no -a "$have_gtk" = no; then
9562 warnL "Athena widgets are being used instead of Motif or Gtk."
9563 warn2 "The \`xscreensaver-demo' program looks much better"
9564 warn2 "with Motif or Gtk. Wouldn't you rather be using Motif?"
9565 warn2 "Motif is shipped by every commercial Unix vendor,"
9566 warn2 "and there is a free implementation available as"
9567 warn2 "well: see <http://www.lesstif.org/>. Gtk is shipped"
9568 warn2 "with most Linux and BSD distributions."
9572 if test "$have_xpm" = no ; then
9573 if test "$with_xpm_req" = yes ; then
9574 warnL 'Use of XPM was requested, but it was not found.'
9575 elif test "$with_xpm_req" = no ; then
9576 noteL 'The XPM library is not being used.'
9578 noteL 'The XPM library was not found.'
9582 warn2 'Some of the demos will not be as colorful as they'
9583 warn2 'could be. You might want to consider installing XPM'
9584 warn2 'and re-running configure. (Remember to delete the'
9585 warn2 'config.cache file first.) You can find XPM at most'
9586 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9590 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9591 preferred_mesagl=3.0
9593 if test "$ac_mesagl_version" = unknown; then
9594 warnL "Unable to determine the MesaGL version number!"
9595 warn2 "Make sure you are using version $preferred_mesagl or newer."
9597 elif test \! "$ac_mesagl_version" -gt 2006; then
9598 warnL "MesaGL version $ac_mesagl_version_string is being used."
9599 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9600 warn2 "It is strongly recommended that you upgrade to at"
9601 warn2 "least version $preferred_mesagl."
9605 if test "$have_gl" = no ; then
9606 if test "$with_gl_req" = yes ; then
9607 warnL 'Use of GL was requested, but it was not found.'
9608 elif test "$with_gl_req" = no ; then
9609 noteL 'The OpenGL 3D library is not being used.'
9611 noteL 'The OpenGL 3D library was not found.'
9614 if test "$gl_halfassed" = yes ; then
9616 warn2 'More specifically, we found the headers, but not the'
9617 warn2 'libraries; so either GL is half-installed on this'
9618 warn2 "system, or something else went wrong. The \`config.log'"
9619 warn2 'file might contain some clues.'
9623 warn2 'Those demos which use 3D will not be built or installed.'
9624 warn2 'You might want to consider installing OpenGL and'
9625 warn2 're-running configure. (Remember to delete the'
9626 warn2 "config.cache file first.) If your vendor doesn't ship"
9627 warn2 'their own implementation of OpenGL, you can get a free'
9628 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
9629 warn2 'info, see <http://www.opengl.org/>.'
9634 if test "$have_gl" = yes -a "$have_gle" = no ; then
9635 if test "$with_gle_req" = yes ; then
9636 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
9637 warn2 'it was not found (though the OpenGL library was found, and'
9638 warn2 'is being used.)'
9639 elif test "$with_gle_req" = no ; then
9640 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
9641 warn2 'library is not.'
9643 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
9647 if test "$gle_halfassed" = yes ; then
9649 warn2 'More specifically, we found the headers, but not the'
9650 warn2 'libraries; so either GLE is half-installed on this'
9651 warn2 "system, or something else went wrong. The \`config.log'"
9652 warn2 'file might contain some clues.'
9656 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
9657 warn2 'will not be built or installed. You might want to consider'
9658 warn2 'installing GLE and re-running configure. (Remember to delete'
9659 warn2 'the config.cache file first.) You can find the GLE library'
9660 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
9661 warn2 'see <http://www.opengl.org/>.'
9666 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
9667 warn 'Use of XReadDisplay was requested, but it was not found.'
9670 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
9671 warn 'Use of the Iris Video Library was requested, but it was not found.'
9674 if test -n "$with_zippy_req"; then
9675 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
9676 warnL "$with_zippy_req was requested as the Zippy program,"
9677 warn2 "but was not found. The default will be used instead."
9681 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
9682 warn 'Use of Kerberos was requested, but it was not found.'
9685 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
9686 warn 'Use of PAM was requested, but it was not found.'
9689 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
9690 warn 'Use of shadow passwords was requested, but they were not found.'
9694 # You are in a twisty maze of namespaces and syntaxes, all alike.
9695 # Fuck the skull of Unix.
9697 eval bindir=${bindir}
9698 eval bindir=${bindir}
9699 eval bindir=${bindir}
9700 eval bindir=${bindir}
9701 eval bindir=${bindir}
9702 eval bindir=${bindir}
9703 eval HACKDIR=${HACKDIR}
9704 eval HACKDIR=${HACKDIR}
9705 eval HACKDIR=${HACKDIR}
9706 eval HACKDIR=${HACKDIR}
9707 eval HACKDIR=${HACKDIR}
9708 eval HACKDIR=${HACKDIR}
9710 # canonicalize slashes.
9711 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
9712 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9715 # Sanity check the subdir
9716 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
9717 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
9719 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
9720 There will be an executable installed with that name, so
9721 that can't be the name of a directory as well. Please
9722 re-configure with a different directory name." 1>&2; exit 1; }
9729 # Now let's see if there's a previous RPM version already installed. Blargh!
9733 rpmv=`(rpm -qv xscreensaver) 2>&- | \
9734 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-[0-9][0-9]*$/\1/'`
9737 if test \! -z "$rpmv" ; then
9738 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
9739 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
9742 warnL "There is already an installed RPM of xscreensaver $rpmv"
9743 warn2 "on this system. You might want to remove it (with"
9744 warn2 '"rpm -ve xscreensaver") before running "make install"'
9745 warn2 "from this directory."
9747 warn2 "Alternately, you could build this version of xscreensaver"
9748 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
9749 warn2 "file is included. See the RPM documentation for more info."
9752 if test "$rpmbdir" = "$rpmhdir" ; then
9753 warn2 "The RPM version was installed in $rpmbdir."
9755 warn2 "The RPM version was installed in $rpmbdir,"
9756 warn2 "with demos in $rpmhdir."
9763 # Warn about egregious GNOME bogosity.
9765 if (rpm -qv control-center) >&- 2>&- ; then
9767 warnL "The Gnome Control Center seems to be installed."
9769 warn2 "Note that simply installing this version of xscreensaver"
9770 warn2 "will not cause GNOME to know about the newly-added display"
9771 warn2 "modes -- GNOME is just lame that way. Instead of using the"
9772 warn2 "Control Center, try using the \`xscreensaver-demo' command."
9776 if test "${bindir}" = "${HACKDIR}" ; then
9780 if test "$do_dir_warning" = yes; then
9784 echo ' When you run "make install", the "xscreensaver",'
9785 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
9786 echo " will be installed in ${bindir}."
9788 echo " The various graphics demos (100+ different executables) will"
9789 echo " also be installed in ${HACKDIR}."
9791 echo " If you would prefer the demos to be installed elsewhere"
9792 echo " (for example, in a dedicated directory) you should re-run"
9793 echo " configure with the --enable-subdir=DIR option. For more"
9794 echo " information, run $0 --help."
9798 if test "$warning" != no; then
9799 echo '' ; echo "$warnsep" ; echo ''