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-gnome Include support for the Gnome Control Center."
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 work around the fucked up gcc 2.96 included in Red Hat 7.0
641 ###############################################################################
646 ###############################################################################
648 # Function to figure out how to create directory trees.
650 ###############################################################################
655 ###############################################################################
657 # Function to check whether gettimeofday() exists, and how to call it.
658 # This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
660 ###############################################################################
665 ###############################################################################
667 # Function to find perl5 (defines PERL and PERL_VERSION.)
669 ###############################################################################
671 # M4 sucks!! perl sucks too!!
673 perl_version_cmd='print $]'
679 ###############################################################################
681 # Function to demand "bc". Losers.
683 ###############################################################################
687 ###############################################################################
689 # Functions to check how to do ICMP PING requests.
691 ###############################################################################
698 ###############################################################################
700 # Functions to check for various X11 crap.
702 ###############################################################################
704 # Try and find the app-defaults directory.
705 # It sucks that autoconf doesn't do this already...
717 # Random special-cases for X on certain pathological OSes.
718 # You know who you are.
724 ###############################################################################
726 # Some utility functions to make checking for X things easier.
728 ###############################################################################
730 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
734 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
738 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
743 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
744 # Use this sparingly; it probably doesn't work very well on X programs.
748 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
749 # (But not the -L directories!)
755 # Usage: HANDLE_X_PATH_ARG([variable_name],
756 # [--command-line-option],
757 # [descriptive string])
759 # All of the --with options take three forms:
761 # --with-foo (or --with-foo=yes)
762 # --without-foo (or --with-foo=no)
765 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
766 # a directory (string beginning with a slash) it checks to see whether
767 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
774 ###############################################################################
775 ###############################################################################
777 # End of function definitions. Now start actually executing stuff.
779 ###############################################################################
780 ###############################################################################
782 # random compiler setup
784 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
785 if test -f $ac_dir/install-sh; then
787 ac_install_sh="$ac_aux_dir/install-sh -c"
789 elif test -f $ac_dir/install.sh; then
791 ac_install_sh="$ac_aux_dir/install.sh -c"
795 if test -z "$ac_aux_dir"; then
796 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
798 ac_config_guess=$ac_aux_dir/config.guess
799 ac_config_sub=$ac_aux_dir/config.sub
800 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
803 # Make sure we can run config.sub.
804 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
805 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
808 echo $ac_n "checking host system type""... $ac_c" 1>&6
809 echo "configure:821: checking host system type" >&5
812 case "$host_alias" in
816 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
817 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
819 *) host_alias=$nonopt ;;
823 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
824 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
825 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
826 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
827 echo "$ac_t""$host" 1>&6
829 # Extract the first word of "gcc", so it can be a program name with args.
830 set dummy gcc; ac_word=$2
831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
832 echo "configure:844: checking for $ac_word" >&5
833 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
834 echo $ac_n "(cached) $ac_c" 1>&6
836 if test -n "$CC"; then
837 ac_cv_prog_CC="$CC" # Let the user override the test.
839 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
841 for ac_dir in $ac_dummy; do
842 test -z "$ac_dir" && ac_dir=.
843 if test -f $ac_dir/$ac_word; then
852 if test -n "$CC"; then
853 echo "$ac_t""$CC" 1>&6
855 echo "$ac_t""no" 1>&6
858 if test -z "$CC"; then
859 # Extract the first word of "cc", so it can be a program name with args.
860 set dummy cc; ac_word=$2
861 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
862 echo "configure:874: checking for $ac_word" >&5
863 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
864 echo $ac_n "(cached) $ac_c" 1>&6
866 if test -n "$CC"; then
867 ac_cv_prog_CC="$CC" # Let the user override the test.
869 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
872 for ac_dir in $ac_dummy; do
873 test -z "$ac_dir" && ac_dir=.
874 if test -f $ac_dir/$ac_word; then
875 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
884 if test $ac_prog_rejected = yes; then
885 # We found a bogon in the path, so make sure we never use it.
886 set dummy $ac_cv_prog_CC
888 if test $# -gt 0; then
889 # We chose a different compiler from the bogus one.
890 # However, it has the same basename, so the bogon will be chosen
891 # first if we set CC to just the basename; use the full file name.
893 set dummy "$ac_dir/$ac_word" "$@"
901 if test -n "$CC"; then
902 echo "$ac_t""$CC" 1>&6
904 echo "$ac_t""no" 1>&6
907 if test -z "$CC"; then
910 # Extract the first word of "cl", so it can be a program name with args.
911 set dummy cl; ac_word=$2
912 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
913 echo "configure:925: checking for $ac_word" >&5
914 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
915 echo $ac_n "(cached) $ac_c" 1>&6
917 if test -n "$CC"; then
918 ac_cv_prog_CC="$CC" # Let the user override the test.
920 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
922 for ac_dir in $ac_dummy; do
923 test -z "$ac_dir" && ac_dir=.
924 if test -f $ac_dir/$ac_word; then
933 if test -n "$CC"; then
934 echo "$ac_t""$CC" 1>&6
936 echo "$ac_t""no" 1>&6
941 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
944 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
945 echo "configure:957: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
948 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
949 ac_cpp='$CPP $CPPFLAGS'
950 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
951 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
952 cross_compiling=$ac_cv_prog_cc_cross
954 cat > conftest.$ac_ext << EOF
956 #line 968 "configure"
957 #include "confdefs.h"
961 if { (eval echo configure:973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
962 ac_cv_prog_cc_works=yes
963 # If we can't run a trivial program, we are probably using a cross compiler.
964 if (./conftest; exit) 2>/dev/null; then
965 ac_cv_prog_cc_cross=no
967 ac_cv_prog_cc_cross=yes
970 echo "configure: failed program was:" >&5
971 cat conftest.$ac_ext >&5
972 ac_cv_prog_cc_works=no
976 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
977 ac_cpp='$CPP $CPPFLAGS'
978 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
979 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
980 cross_compiling=$ac_cv_prog_cc_cross
982 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
983 if test $ac_cv_prog_cc_works = no; then
984 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
986 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
987 echo "configure:999: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
988 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
989 cross_compiling=$ac_cv_prog_cc_cross
991 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
992 echo "configure:1004: checking whether we are using GNU C" >&5
993 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
994 echo $ac_n "(cached) $ac_c" 1>&6
996 cat > conftest.c <<EOF
1001 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1008 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1010 if test $ac_cv_prog_gcc = yes; then
1016 ac_test_CFLAGS="${CFLAGS+set}"
1017 ac_save_CFLAGS="$CFLAGS"
1019 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1020 echo "configure:1032: checking whether ${CC-cc} accepts -g" >&5
1021 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1022 echo $ac_n "(cached) $ac_c" 1>&6
1024 echo 'void f(){}' > conftest.c
1025 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1034 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1035 if test "$ac_test_CFLAGS" = set; then
1036 CFLAGS="$ac_save_CFLAGS"
1037 elif test $ac_cv_prog_cc_g = yes; then
1038 if test "$GCC" = yes; then
1044 if test "$GCC" = yes; then
1052 if test -z "$GCC"; then
1053 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
1054 echo "configure:1066: checking how to request ANSI compilation" >&5
1057 echo "$ac_t""HPUX: adding -Ae" 1>&6
1061 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
1062 CC="$CC -qlanglvl=ansi -qhalt=e"
1066 echo "$ac_t""DEC: adding -std1" 1>&6
1071 echo "$ac_t""no idea" 1>&6
1076 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
1077 echo "configure:1089: checking whether the compiler works on ANSI C" >&5
1078 if test "$cross_compiling" = yes; then
1079 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1081 cat > conftest.$ac_ext <<EOF
1082 #line 1094 "configure"
1083 #include "confdefs.h"
1084 main(int ac, char **av) { return 0; }
1086 if { (eval echo configure:1098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1088 echo "$ac_t""yes" 1>&6
1090 echo "configure: failed program was:" >&5
1091 cat conftest.$ac_ext >&5
1093 echo "$ac_t""no" 1>&6
1094 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1100 if test -n "$GCC"; then
1101 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
1102 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
1103 echo "$ac_t""Disabling C++ comments in ANSI C code." 1>&6
1104 CC="$CC -Wp,-lang-c89"
1107 *-irix5* |*-irix6.0-3* )
1108 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1109 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1112 # if test -z "$GCC"; then
1113 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1114 # CC="$CC -migrate -w0 -verbose -warnprotos"
1120 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1121 echo "configure:1133: checking how to run the C preprocessor" >&5
1122 # On Suns, sometimes $CPP names a directory.
1123 if test -n "$CPP" && test -d "$CPP"; then
1126 if test -z "$CPP"; then
1127 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1128 echo $ac_n "(cached) $ac_c" 1>&6
1130 # This must be in double quotes, not single quotes, because CPP may get
1131 # substituted into the Makefile and "${CC-cc}" will confuse make.
1133 # On the NeXT, cc -E runs the code through the compiler's parser,
1134 # not just through 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} -E -traditional-cpp"
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
1168 CPP="${CC-cc} -nologo -E"
1169 cat > conftest.$ac_ext <<EOF
1170 #line 1182 "configure"
1171 #include "confdefs.h"
1175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1176 { (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1178 if test -z "$ac_err"; then
1182 echo "configure: failed program was:" >&5
1183 cat conftest.$ac_ext >&5
1192 ac_cv_prog_CPP="$CPP"
1194 CPP="$ac_cv_prog_CPP"
1196 ac_cv_prog_CPP="$CPP"
1198 echo "$ac_t""$CPP" 1>&6
1200 if test -n "$GCC"; then
1201 echo $ac_n "checking for Red Hat GCC lossage""... $ac_c" 1>&6
1202 echo "configure:1214: checking for Red Hat GCC lossage" >&5
1203 if eval "test \"`echo '$''{'ac_cv_red_hat_gcc_lossage'+set}'`\" = set"; then
1204 echo $ac_n "(cached) $ac_c" 1>&6
1206 ac_cv_red_hat_gcc_lossage=no
1207 cat > conftest.$ac_ext <<EOF
1208 #line 1220 "configure"
1209 #include "confdefs.h"
1211 #if !defined(__USE_POSIX) || !defined(__USE_SVID) || !defined(__USE_BSD)
1216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1217 egrep "lossage" >/dev/null 2>&1; then
1219 ac_cv_red_hat_gcc_lossage=yes
1227 ac_red_hat_gcc_lossage=$ac_cv_red_hat_gcc_lossage
1228 if test "$ac_cv_red_hat_gcc_lossage" = yes ; then
1229 rh_defines="-D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE";
1230 CC="$CC $rh_defines"
1231 echo "$ac_t""yes: need $rh_defines" 1>&6
1233 echo "$ac_t""no" 1>&6
1237 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1238 echo "configure:1250: checking how to run the C preprocessor" >&5
1239 # On Suns, sometimes $CPP names a directory.
1240 if test -n "$CPP" && test -d "$CPP"; then
1243 if test -z "$CPP"; then
1244 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1245 echo $ac_n "(cached) $ac_c" 1>&6
1247 # This must be in double quotes, not single quotes, because CPP may get
1248 # substituted into the Makefile and "${CC-cc}" will confuse make.
1250 # On the NeXT, cc -E runs the code through the compiler's parser,
1251 # not just through cpp.
1252 cat > conftest.$ac_ext <<EOF
1253 #line 1265 "configure"
1254 #include "confdefs.h"
1258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1259 { (eval echo configure:1271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1261 if test -z "$ac_err"; then
1265 echo "configure: failed program was:" >&5
1266 cat conftest.$ac_ext >&5
1268 CPP="${CC-cc} -E -traditional-cpp"
1269 cat > conftest.$ac_ext <<EOF
1270 #line 1282 "configure"
1271 #include "confdefs.h"
1275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1276 { (eval echo configure:1288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1278 if test -z "$ac_err"; then
1282 echo "configure: failed program was:" >&5
1283 cat conftest.$ac_ext >&5
1285 CPP="${CC-cc} -nologo -E"
1286 cat > conftest.$ac_ext <<EOF
1287 #line 1299 "configure"
1288 #include "confdefs.h"
1292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1293 { (eval echo configure:1305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1295 if test -z "$ac_err"; then
1299 echo "configure: failed program was:" >&5
1300 cat conftest.$ac_ext >&5
1309 ac_cv_prog_CPP="$CPP"
1311 CPP="$ac_cv_prog_CPP"
1313 ac_cv_prog_CPP="$CPP"
1315 echo "$ac_t""$CPP" 1>&6
1317 echo $ac_n "checking for working const""... $ac_c" 1>&6
1318 echo "configure:1330: checking for working const" >&5
1319 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1320 echo $ac_n "(cached) $ac_c" 1>&6
1322 cat > conftest.$ac_ext <<EOF
1323 #line 1335 "configure"
1324 #include "confdefs.h"
1328 /* Ultrix mips cc rejects this. */
1329 typedef int charset[2]; const charset x;
1330 /* SunOS 4.1.1 cc rejects this. */
1331 char const *const *ccp;
1333 /* NEC SVR4.0.2 mips cc rejects this. */
1334 struct point {int x, y;};
1335 static struct point const zero = {0,0};
1336 /* AIX XL C 1.02.0.0 rejects this.
1337 It does not let you subtract one const X* pointer from another in an arm
1338 of an if-expression whose if-part is not a constant expression */
1339 const char *g = "string";
1340 ccp = &g + (g ? g-g : 0);
1341 /* HPUX 7.0 cc rejects these. */
1344 ccp = (char const *const *) p;
1345 { /* SCO 3.2v4 cc rejects this. */
1347 char const *s = 0 ? (char *) 0 : (char const *) 0;
1351 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1353 const int *foo = &x[0];
1356 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1357 typedef const int *iptr;
1361 { /* AIX XL C 1.02.0.0 rejects this saying
1362 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1363 struct s { int j; const int *ap[3]; };
1364 struct s *b; b->j = 5;
1366 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1372 if { (eval echo configure:1384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1376 echo "configure: failed program was:" >&5
1377 cat conftest.$ac_ext >&5
1384 echo "$ac_t""$ac_cv_c_const" 1>&6
1385 if test $ac_cv_c_const = no; then
1386 cat >> confdefs.h <<\EOF
1392 echo $ac_n "checking for inline""... $ac_c" 1>&6
1393 echo "configure:1405: checking for inline" >&5
1394 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1395 echo $ac_n "(cached) $ac_c" 1>&6
1398 for ac_kw in inline __inline__ __inline; do
1399 cat > conftest.$ac_ext <<EOF
1400 #line 1412 "configure"
1401 #include "confdefs.h"
1407 if { (eval echo configure:1419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1409 ac_cv_c_inline=$ac_kw; break
1411 echo "configure: failed program was:" >&5
1412 cat conftest.$ac_ext >&5
1419 echo "$ac_t""$ac_cv_c_inline" 1>&6
1420 case "$ac_cv_c_inline" in
1422 no) cat >> confdefs.h <<\EOF
1426 *) cat >> confdefs.h <<EOF
1427 #define inline $ac_cv_c_inline
1432 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
1433 echo $ac_n "checking for bc""... $ac_c" 1>&6
1434 echo "configure:1446: checking for bc" >&5
1435 if test "$ac_bc_result" = "15" ; then
1436 echo "$ac_t""yes" 1>&6
1438 echo "$ac_t""no" 1>&6
1440 { echo "configure: error: Your system doesn't have \"bc\", which has been a standard
1441 part of Unix since the 1970s. Come back when your vendor
1442 has grown a clue." 1>&2; exit 1; }
1446 # stuff for Makefiles
1447 # Find a good install program. We prefer a C program (faster),
1448 # so one script is as good as another. But avoid the broken or
1449 # incompatible versions:
1450 # SysV /etc/install, /usr/sbin/install
1451 # SunOS /usr/etc/install
1452 # IRIX /sbin/install
1454 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1455 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1456 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1457 # ./install, which can be erroneously created by make from ./install.sh.
1458 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1459 echo "configure:1471: checking for a BSD compatible install" >&5
1460 if test -z "$INSTALL"; then
1461 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1462 echo $ac_n "(cached) $ac_c" 1>&6
1464 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1465 for ac_dir in $PATH; do
1466 # Account for people who put trailing slashes in PATH elements.
1468 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1470 # OSF1 and SCO ODT 3.0 have their own names for install.
1471 # Don't use installbsd from OSF since it installs stuff as root
1473 for ac_prog in ginstall scoinst install; do
1474 if test -f $ac_dir/$ac_prog; then
1475 if test $ac_prog = install &&
1476 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1477 # AIX install. It has an incompatible calling convention.
1480 ac_cv_path_install="$ac_dir/$ac_prog -c"
1491 if test "${ac_cv_path_install+set}" = set; then
1492 INSTALL="$ac_cv_path_install"
1494 # As a last resort, use the slow shell script. We don't cache a
1495 # path for INSTALL within a source directory, because that will
1496 # break other packages using the cache if that directory is
1497 # removed, or if the path is relative.
1498 INSTALL="$ac_install_sh"
1501 echo "$ac_t""$INSTALL" 1>&6
1503 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1504 # It thinks the first close brace ends the variable substitution.
1505 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1507 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1509 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1511 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1512 echo "configure:1524: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1513 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1516 ac_cv_install_d_creates_dirs=no
1518 if mkdir conftestdir; then
1520 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1521 if test -d dir1/dir2/. ; then
1522 ac_cv_install_d_creates_dirs=yes
1530 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1532 if test "$ac_cv_install_d_creates_dirs" = no ; then
1533 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1534 echo "configure:1546: checking whether \"mkdir -p\" creates intermediate directories" >&5
1535 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1536 echo $ac_n "(cached) $ac_c" 1>&6
1538 ac_cv_mkdir_p_creates_dirs=no
1540 if mkdir conftestdir; then
1542 mkdir -p dir1/dir2 >&- 2>&-
1543 if test -d dir1/dir2/. ; then
1544 ac_cv_mkdir_p_creates_dirs=yes
1552 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1555 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1556 INSTALL_DIRS='${INSTALL} -d'
1557 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1558 INSTALL_DIRS='mkdir -p'
1561 INSTALL_DIRS='${INSTALL} -d'
1564 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1565 echo "configure:1577: checking whether ${MAKE-make} sets \${MAKE}" >&5
1566 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1567 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1568 echo $ac_n "(cached) $ac_c" 1>&6
1570 cat > conftestmake <<\EOF
1572 @echo 'ac_maketemp="${MAKE}"'
1574 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1575 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1576 if test -n "$ac_maketemp"; then
1577 eval ac_cv_prog_make_${ac_make}_set=yes
1579 eval ac_cv_prog_make_${ac_make}_set=no
1583 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1584 echo "$ac_t""yes" 1>&6
1587 echo "$ac_t""no" 1>&6
1588 SET_MAKE="MAKE=${MAKE-make}"
1593 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1594 echo "configure:1606: checking for ANSI C header files" >&5
1595 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1596 echo $ac_n "(cached) $ac_c" 1>&6
1598 cat > conftest.$ac_ext <<EOF
1599 #line 1611 "configure"
1600 #include "confdefs.h"
1606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1607 { (eval echo configure:1619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1609 if test -z "$ac_err"; then
1611 ac_cv_header_stdc=yes
1614 echo "configure: failed program was:" >&5
1615 cat conftest.$ac_ext >&5
1617 ac_cv_header_stdc=no
1621 if test $ac_cv_header_stdc = yes; then
1622 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1623 cat > conftest.$ac_ext <<EOF
1624 #line 1636 "configure"
1625 #include "confdefs.h"
1628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1629 egrep "memchr" >/dev/null 2>&1; then
1633 ac_cv_header_stdc=no
1639 if test $ac_cv_header_stdc = yes; then
1640 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1641 cat > conftest.$ac_ext <<EOF
1642 #line 1654 "configure"
1643 #include "confdefs.h"
1646 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1647 egrep "free" >/dev/null 2>&1; then
1651 ac_cv_header_stdc=no
1657 if test $ac_cv_header_stdc = yes; then
1658 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1659 if test "$cross_compiling" = yes; then
1662 cat > conftest.$ac_ext <<EOF
1663 #line 1675 "configure"
1664 #include "confdefs.h"
1666 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1667 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1668 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1669 int main () { int i; for (i = 0; i < 256; i++)
1670 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1674 if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1678 echo "configure: failed program was:" >&5
1679 cat conftest.$ac_ext >&5
1681 ac_cv_header_stdc=no
1689 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1690 if test $ac_cv_header_stdc = yes; then
1691 cat >> confdefs.h <<\EOF
1692 #define STDC_HEADERS 1
1697 for ac_hdr in unistd.h
1699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1701 echo "configure:1713: checking for $ac_hdr" >&5
1702 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1703 echo $ac_n "(cached) $ac_c" 1>&6
1705 cat > conftest.$ac_ext <<EOF
1706 #line 1718 "configure"
1707 #include "confdefs.h"
1710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1711 { (eval echo configure:1723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1713 if test -z "$ac_err"; then
1715 eval "ac_cv_header_$ac_safe=yes"
1718 echo "configure: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1721 eval "ac_cv_header_$ac_safe=no"
1725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1726 echo "$ac_t""yes" 1>&6
1727 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1728 cat >> confdefs.h <<EOF
1729 #define $ac_tr_hdr 1
1733 echo "$ac_t""no" 1>&6
1737 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1738 echo "configure:1750: checking for mode_t" >&5
1739 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1740 echo $ac_n "(cached) $ac_c" 1>&6
1742 cat > conftest.$ac_ext <<EOF
1743 #line 1755 "configure"
1744 #include "confdefs.h"
1745 #include <sys/types.h>
1751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1752 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1754 ac_cv_type_mode_t=yes
1757 ac_cv_type_mode_t=no
1762 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1763 if test $ac_cv_type_mode_t = no; then
1764 cat >> confdefs.h <<\EOF
1770 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1771 echo "configure:1783: checking for pid_t" >&5
1772 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1773 echo $ac_n "(cached) $ac_c" 1>&6
1775 cat > conftest.$ac_ext <<EOF
1776 #line 1788 "configure"
1777 #include "confdefs.h"
1778 #include <sys/types.h>
1784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1785 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1787 ac_cv_type_pid_t=yes
1795 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1796 if test $ac_cv_type_pid_t = no; then
1797 cat >> confdefs.h <<\EOF
1803 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1804 echo "configure:1816: checking for size_t" >&5
1805 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1806 echo $ac_n "(cached) $ac_c" 1>&6
1808 cat > conftest.$ac_ext <<EOF
1809 #line 1821 "configure"
1810 #include "confdefs.h"
1811 #include <sys/types.h>
1817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1818 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1820 ac_cv_type_size_t=yes
1823 ac_cv_type_size_t=no
1828 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1829 if test $ac_cv_type_size_t = no; then
1830 cat >> confdefs.h <<\EOF
1831 #define size_t unsigned
1836 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1837 echo "configure:1849: checking return type of signal handlers" >&5
1838 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1839 echo $ac_n "(cached) $ac_c" 1>&6
1841 cat > conftest.$ac_ext <<EOF
1842 #line 1854 "configure"
1843 #include "confdefs.h"
1844 #include <sys/types.h>
1850 extern "C" void (*signal (int, void (*)(int)))(int);
1852 void (*signal ()) ();
1859 if { (eval echo configure:1871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1861 ac_cv_type_signal=void
1863 echo "configure: failed program was:" >&5
1864 cat conftest.$ac_ext >&5
1866 ac_cv_type_signal=int
1871 echo "$ac_t""$ac_cv_type_signal" 1>&6
1872 cat >> confdefs.h <<EOF
1873 #define RETSIGTYPE $ac_cv_type_signal
1877 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1878 echo "configure:1890: checking whether time.h and sys/time.h may both be included" >&5
1879 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1880 echo $ac_n "(cached) $ac_c" 1>&6
1882 cat > conftest.$ac_ext <<EOF
1883 #line 1895 "configure"
1884 #include "confdefs.h"
1885 #include <sys/types.h>
1886 #include <sys/time.h>
1892 if { (eval echo configure:1904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1894 ac_cv_header_time=yes
1896 echo "configure: failed program was:" >&5
1897 cat conftest.$ac_ext >&5
1899 ac_cv_header_time=no
1904 echo "$ac_t""$ac_cv_header_time" 1>&6
1905 if test $ac_cv_header_time = yes; then
1906 cat >> confdefs.h <<\EOF
1907 #define TIME_WITH_SYS_TIME 1
1912 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1913 echo "configure:1925: checking for sys/wait.h that is POSIX.1 compatible" >&5
1914 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1915 echo $ac_n "(cached) $ac_c" 1>&6
1917 cat > conftest.$ac_ext <<EOF
1918 #line 1930 "configure"
1919 #include "confdefs.h"
1920 #include <sys/types.h>
1921 #include <sys/wait.h>
1923 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1926 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1931 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1934 if { (eval echo configure:1946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1936 ac_cv_header_sys_wait_h=yes
1938 echo "configure: failed program was:" >&5
1939 cat conftest.$ac_ext >&5
1941 ac_cv_header_sys_wait_h=no
1946 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1947 if test $ac_cv_header_sys_wait_h = yes; then
1948 cat >> confdefs.h <<\EOF
1949 #define HAVE_SYS_WAIT_H 1
1955 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1957 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1958 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1959 echo "configure:1971: checking for $ac_hdr that defines DIR" >&5
1960 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1961 echo $ac_n "(cached) $ac_c" 1>&6
1963 cat > conftest.$ac_ext <<EOF
1964 #line 1976 "configure"
1965 #include "confdefs.h"
1966 #include <sys/types.h>
1972 if { (eval echo configure:1984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1974 eval "ac_cv_header_dirent_$ac_safe=yes"
1976 echo "configure: failed program was:" >&5
1977 cat conftest.$ac_ext >&5
1979 eval "ac_cv_header_dirent_$ac_safe=no"
1983 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1984 echo "$ac_t""yes" 1>&6
1985 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1986 cat >> confdefs.h <<EOF
1987 #define $ac_tr_hdr 1
1989 ac_header_dirent=$ac_hdr; break
1991 echo "$ac_t""no" 1>&6
1994 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1995 if test $ac_header_dirent = dirent.h; then
1996 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1997 echo "configure:2009: checking for opendir in -ldir" >&5
1998 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1999 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2000 echo $ac_n "(cached) $ac_c" 1>&6
2002 ac_save_LIBS="$LIBS"
2004 cat > conftest.$ac_ext <<EOF
2005 #line 2017 "configure"
2006 #include "confdefs.h"
2007 /* Override any gcc2 internal prototype to avoid an error. */
2008 /* We use char because int might match the return type of a gcc2
2009 builtin and then its argument prototype would still apply. */
2016 if { (eval echo configure:2028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2018 eval "ac_cv_lib_$ac_lib_var=yes"
2020 echo "configure: failed program was:" >&5
2021 cat conftest.$ac_ext >&5
2023 eval "ac_cv_lib_$ac_lib_var=no"
2026 LIBS="$ac_save_LIBS"
2029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2030 echo "$ac_t""yes" 1>&6
2033 echo "$ac_t""no" 1>&6
2037 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2038 echo "configure:2050: checking for opendir in -lx" >&5
2039 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2040 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2041 echo $ac_n "(cached) $ac_c" 1>&6
2043 ac_save_LIBS="$LIBS"
2045 cat > conftest.$ac_ext <<EOF
2046 #line 2058 "configure"
2047 #include "confdefs.h"
2048 /* Override any gcc2 internal prototype to avoid an error. */
2049 /* We use char because int might match the return type of a gcc2
2050 builtin and then its argument prototype would still apply. */
2057 if { (eval echo configure:2069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2059 eval "ac_cv_lib_$ac_lib_var=yes"
2061 echo "configure: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2064 eval "ac_cv_lib_$ac_lib_var=no"
2067 LIBS="$ac_save_LIBS"
2070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2071 echo "$ac_t""yes" 1>&6
2074 echo "$ac_t""no" 1>&6
2079 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
2080 echo "configure:2092: checking how to call gettimeofday" >&5
2081 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
2082 echo $ac_n "(cached) $ac_c" 1>&6
2084 cat > conftest.$ac_ext <<EOF
2085 #line 2097 "configure"
2086 #include "confdefs.h"
2088 #include <sys/time.h>
2090 struct timeval tv; struct timezone tzp;
2091 gettimeofday(&tv, &tzp);
2094 if { (eval echo configure:2106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2096 ac_gettimeofday_args=2
2098 echo "configure: failed program was:" >&5
2099 cat conftest.$ac_ext >&5
2101 cat > conftest.$ac_ext <<EOF
2102 #line 2114 "configure"
2103 #include "confdefs.h"
2105 #include <sys/time.h>
2107 struct timeval tv; gettimeofday(&tv);
2110 if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2112 ac_gettimeofday_args=1
2114 echo "configure: failed program was:" >&5
2115 cat conftest.$ac_ext >&5
2117 ac_gettimeofday_args=0
2122 ac_cv_gettimeofday_args=$ac_gettimeofday_args
2125 ac_gettimeofday_args=$ac_cv_gettimeofday_args
2126 if test "$ac_gettimeofday_args" = 1 ; then
2127 cat >> confdefs.h <<\EOF
2128 #define HAVE_GETTIMEOFDAY 1
2131 echo "$ac_t""one argument" 1>&6
2132 elif test "$ac_gettimeofday_args" = 2 ; then
2133 cat >> confdefs.h <<\EOF
2134 #define HAVE_GETTIMEOFDAY 1
2137 cat >> confdefs.h <<\EOF
2138 #define GETTIMEOFDAY_TWO_ARGS 1
2141 echo "$ac_t""two arguments" 1>&6
2143 echo "$ac_t""unknown" 1>&6
2146 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
2148 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2149 echo "configure:2161: checking for $ac_func" >&5
2150 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2151 echo $ac_n "(cached) $ac_c" 1>&6
2153 cat > conftest.$ac_ext <<EOF
2154 #line 2166 "configure"
2155 #include "confdefs.h"
2156 /* System header to define __stub macros and hopefully few prototypes,
2157 which can conflict with char $ac_func(); below. */
2159 /* Override any gcc2 internal prototype to avoid an error. */
2160 /* We use char because int might match the return type of a gcc2
2161 builtin and then its argument prototype would still apply. */
2166 /* The GNU C library defines this for functions which it implements
2167 to always fail with ENOSYS. Some functions are actually named
2168 something starting with __ and the normal name is an alias. */
2169 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2177 if { (eval echo configure:2189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2179 eval "ac_cv_func_$ac_func=yes"
2181 echo "configure: failed program was:" >&5
2182 cat conftest.$ac_ext >&5
2184 eval "ac_cv_func_$ac_func=no"
2189 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2190 echo "$ac_t""yes" 1>&6
2191 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2192 cat >> confdefs.h <<EOF
2193 #define $ac_tr_func 1
2197 echo "$ac_t""no" 1>&6
2202 for ac_func in sigaction syslog realpath
2204 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2205 echo "configure:2217: checking for $ac_func" >&5
2206 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2207 echo $ac_n "(cached) $ac_c" 1>&6
2209 cat > conftest.$ac_ext <<EOF
2210 #line 2222 "configure"
2211 #include "confdefs.h"
2212 /* System header to define __stub macros and hopefully few prototypes,
2213 which can conflict with char $ac_func(); below. */
2215 /* Override any gcc2 internal prototype to avoid an error. */
2216 /* We use char because int might match the return type of a gcc2
2217 builtin and then its argument prototype would still apply. */
2222 /* The GNU C library defines this for functions which it implements
2223 to always fail with ENOSYS. Some functions are actually named
2224 something starting with __ and the normal name is an alias. */
2225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2233 if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2235 eval "ac_cv_func_$ac_func=yes"
2237 echo "configure: failed program was:" >&5
2238 cat conftest.$ac_ext >&5
2240 eval "ac_cv_func_$ac_func=no"
2245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2246 echo "$ac_t""yes" 1>&6
2247 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2248 cat >> confdefs.h <<EOF
2249 #define $ac_tr_func 1
2253 echo "$ac_t""no" 1>&6
2257 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2258 echo "configure:2270: checking for struct icmp" >&5
2259 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2260 echo $ac_n "(cached) $ac_c" 1>&6
2262 cat > conftest.$ac_ext <<EOF
2263 #line 2275 "configure"
2264 #include "confdefs.h"
2272 #include <sys/types.h>
2273 #include <sys/time.h>
2274 #include <sys/ipc.h>
2275 #include <sys/shm.h>
2276 #include <sys/socket.h>
2277 #include <netinet/in_systm.h>
2278 #include <netinet/in.h>
2279 #include <netinet/ip.h>
2280 #include <netinet/ip_icmp.h>
2281 #include <netinet/udp.h>
2282 #include <arpa/inet.h>
2287 struct sockaddr_in si;
2289 i.icmp_type = ICMP_ECHO;
2294 si.sin_family = AF_INET;
2298 if { (eval echo configure:2310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2302 echo "configure: failed program was:" >&5
2303 cat conftest.$ac_ext >&5
2310 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2311 if test "$ac_cv_have_icmp" = yes ; then
2312 cat >> confdefs.h <<\EOF
2317 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2318 echo "configure:2330: checking for struct icmphdr" >&5
2319 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2320 echo $ac_n "(cached) $ac_c" 1>&6
2322 cat > conftest.$ac_ext <<EOF
2323 #line 2335 "configure"
2324 #include "confdefs.h"
2332 #include <sys/types.h>
2333 #include <sys/time.h>
2334 #include <sys/ipc.h>
2335 #include <sys/shm.h>
2336 #include <sys/socket.h>
2337 #include <netinet/in_systm.h>
2338 #include <netinet/in.h>
2339 #include <netinet/ip.h>
2340 #include <netinet/ip_icmp.h>
2341 #include <netinet/udp.h>
2342 #include <arpa/inet.h>
2347 struct sockaddr_in si;
2353 i.un.echo.sequence = 0;
2354 si.sin_family = AF_INET;
2358 if { (eval echo configure:2370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2360 ac_cv_have_icmphdr=yes
2362 echo "configure: failed program was:" >&5
2363 cat conftest.$ac_ext >&5
2365 ac_cv_have_icmphdr=no
2370 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2371 if test "$ac_cv_have_icmphdr" = yes ; then
2372 cat >> confdefs.h <<\EOF
2373 #define HAVE_ICMPHDR 1
2377 for ac_hdr in crypt.h sys/select.h
2379 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2380 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2381 echo "configure:2393: checking for $ac_hdr" >&5
2382 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2383 echo $ac_n "(cached) $ac_c" 1>&6
2385 cat > conftest.$ac_ext <<EOF
2386 #line 2398 "configure"
2387 #include "confdefs.h"
2390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2391 { (eval echo configure:2403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2392 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2393 if test -z "$ac_err"; then
2395 eval "ac_cv_header_$ac_safe=yes"
2398 echo "configure: failed program was:" >&5
2399 cat conftest.$ac_ext >&5
2401 eval "ac_cv_header_$ac_safe=no"
2405 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2406 echo "$ac_t""yes" 1>&6
2407 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2408 cat >> confdefs.h <<EOF
2409 #define $ac_tr_hdr 1
2413 echo "$ac_t""no" 1>&6
2417 for ac_prog in perl5 perl
2419 # Extract the first word of "$ac_prog", so it can be a program name with args.
2420 set dummy $ac_prog; ac_word=$2
2421 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2422 echo "configure:2434: checking for $ac_word" >&5
2423 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2424 echo $ac_n "(cached) $ac_c" 1>&6
2428 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2431 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2434 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2436 for ac_dir in $ac_dummy; do
2437 test -z "$ac_dir" && ac_dir=.
2438 if test -f $ac_dir/$ac_word; then
2439 ac_cv_path_PERL="$ac_dir/$ac_word"
2447 PERL="$ac_cv_path_PERL"
2448 if test -n "$PERL"; then
2449 echo "$ac_t""$PERL" 1>&6
2451 echo "$ac_t""no" 1>&6
2454 test -n "$PERL" && break
2457 if test -z "$PERL" ; then
2460 echo $ac_n "checking perl version""... $ac_c" 1>&6
2461 echo "configure:2473: checking perl version" >&5
2462 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2463 echo $ac_n "(cached) $ac_c" 1>&6
2465 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2468 echo "$ac_t""$ac_cv_perl_version" 1>&6
2469 PERL_VERSION=$ac_cv_perl_version
2473 if test -z "$PERL" ; then
2474 # don't let it be blank...
2475 PERL=/usr/local/bin/perl5
2478 # If we find X, set shell vars x_includes and x_libraries to the
2479 # paths, otherwise set no_x=yes.
2480 # Uses ac_ vars as temps to allow command line to override cache and checks.
2481 # --without-x overrides everything else, but does not touch the cache.
2482 echo $ac_n "checking for X""... $ac_c" 1>&6
2483 echo "configure:2495: checking for X" >&5
2485 # Check whether --with-x or --without-x was given.
2486 if test "${with_x+set}" = set; then
2491 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2492 if test "x$with_x" = xno; then
2493 # The user explicitly disabled X.
2496 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2497 # Both variables are already set.
2500 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2501 echo $ac_n "(cached) $ac_c" 1>&6
2503 # One or both of the vars are not set, and there is no cached value.
2504 ac_x_includes=NO ac_x_libraries=NO
2506 if mkdir conftestdir; then
2508 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2509 cat > Imakefile <<'EOF'
2511 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2513 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2514 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2515 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2516 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2517 for ac_extension in a so sl; do
2518 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2519 test -f $ac_im_libdir/libX11.$ac_extension; then
2520 ac_im_usrlibdir=$ac_im_libdir; break
2523 # Screen out bogus values from the imake configuration. They are
2524 # bogus both because they are the default anyway, and because
2525 # using them would break gcc on systems where it needs fixed includes.
2526 case "$ac_im_incroot" in
2528 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2530 case "$ac_im_usrlibdir" in
2532 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2539 if test "$ac_x_includes" = NO; then
2540 # Guess where to find include files, by looking for this one X11 .h file.
2541 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2543 # First, try using that file with no special directory specified.
2544 cat > conftest.$ac_ext <<EOF
2545 #line 2557 "configure"
2546 #include "confdefs.h"
2547 #include <$x_direct_test_include>
2549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2550 { (eval echo configure:2562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2552 if test -z "$ac_err"; then
2554 # We can compile using X headers with no special include directory.
2558 echo "configure: failed program was:" >&5
2559 cat conftest.$ac_ext >&5
2561 # Look for the header file in a standard set of common directories.
2562 # Check X11 before X11Rn because it is often a symlink to the current release.
2565 /usr/X11R6/include \
2566 /usr/X11R5/include \
2567 /usr/X11R4/include \
2570 /usr/include/X11R6 \
2571 /usr/include/X11R5 \
2572 /usr/include/X11R4 \
2574 /usr/local/X11/include \
2575 /usr/local/X11R6/include \
2576 /usr/local/X11R5/include \
2577 /usr/local/X11R4/include \
2579 /usr/local/include/X11 \
2580 /usr/local/include/X11R6 \
2581 /usr/local/include/X11R5 \
2582 /usr/local/include/X11R4 \
2586 /usr/XFree86/include/X11 \
2589 /usr/local/include \
2590 /usr/unsupported/include \
2591 /usr/athena/include \
2592 /usr/local/x11r5/include \
2593 /usr/lpp/Xamples/include \
2595 /usr/openwin/include \
2596 /usr/openwin/share/include \
2599 if test -r "$ac_dir/$x_direct_test_include"; then
2600 ac_x_includes=$ac_dir
2606 fi # $ac_x_includes = NO
2608 if test "$ac_x_libraries" = NO; then
2609 # Check for the libraries.
2611 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2612 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2614 # See if we find them without any special options.
2615 # Don't add to $LIBS permanently.
2616 ac_save_LIBS="$LIBS"
2617 LIBS="-l$x_direct_test_library $LIBS"
2618 cat > conftest.$ac_ext <<EOF
2619 #line 2631 "configure"
2620 #include "confdefs.h"
2623 ${x_direct_test_function}()
2626 if { (eval echo configure:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2628 LIBS="$ac_save_LIBS"
2629 # We can link X programs with no special library path.
2632 echo "configure: failed program was:" >&5
2633 cat conftest.$ac_ext >&5
2635 LIBS="$ac_save_LIBS"
2636 # First see if replacing the include by lib works.
2637 # Check X11 before X11Rn because it is often a symlink to the current release.
2638 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2649 /usr/local/X11/lib \
2650 /usr/local/X11R6/lib \
2651 /usr/local/X11R5/lib \
2652 /usr/local/X11R4/lib \
2654 /usr/local/lib/X11 \
2655 /usr/local/lib/X11R6 \
2656 /usr/local/lib/X11R5 \
2657 /usr/local/lib/X11R4 \
2661 /usr/XFree86/lib/X11 \
2665 /usr/unsupported/lib \
2667 /usr/local/x11r5/lib \
2668 /usr/lpp/Xamples/lib \
2672 /usr/openwin/share/lib \
2675 for ac_extension in a so sl; do
2676 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2677 ac_x_libraries=$ac_dir
2684 fi # $ac_x_libraries = NO
2686 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2687 # Didn't find X anywhere. Cache the known absence of X.
2688 ac_cv_have_x="have_x=no"
2690 # Record where we found X for the cache.
2691 ac_cv_have_x="have_x=yes \
2692 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2696 eval "$ac_cv_have_x"
2699 if test "$have_x" != yes; then
2700 echo "$ac_t""$have_x" 1>&6
2703 # If each of the values was on the command line, it overrides each guess.
2704 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2705 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2706 # Update the cache value to reflect the command line values.
2707 ac_cv_have_x="have_x=yes \
2708 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2709 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2712 if test "$no_x" = yes; then
2713 # Not all programs may use this symbol, but it does not hurt to define it.
2714 cat >> confdefs.h <<\EOF
2715 #define X_DISPLAY_MISSING 1
2718 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2720 if test -n "$x_includes"; then
2721 X_CFLAGS="$X_CFLAGS -I$x_includes"
2724 # It would also be nice to do this for all -L options, not just this one.
2725 if test -n "$x_libraries"; then
2726 X_LIBS="$X_LIBS -L$x_libraries"
2727 # For Solaris; some versions of Sun CC require a space after -R and
2728 # others require no space. Words are not sufficient . . . .
2729 case "`(uname -sr) 2>/dev/null`" in
2731 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2732 echo "configure:2744: checking whether -R must be followed by a space" >&5
2733 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2734 cat > conftest.$ac_ext <<EOF
2735 #line 2747 "configure"
2736 #include "confdefs.h"
2742 if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2746 echo "configure: failed program was:" >&5
2747 cat conftest.$ac_ext >&5
2752 if test $ac_R_nospace = yes; then
2753 echo "$ac_t""no" 1>&6
2754 X_LIBS="$X_LIBS -R$x_libraries"
2756 LIBS="$ac_xsave_LIBS -R $x_libraries"
2757 cat > conftest.$ac_ext <<EOF
2758 #line 2770 "configure"
2759 #include "confdefs.h"
2765 if { (eval echo configure:2777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2769 echo "configure: failed program was:" >&5
2770 cat conftest.$ac_ext >&5
2775 if test $ac_R_space = yes; then
2776 echo "$ac_t""yes" 1>&6
2777 X_LIBS="$X_LIBS -R $x_libraries"
2779 echo "$ac_t""neither works" 1>&6
2782 LIBS="$ac_xsave_LIBS"
2786 # Check for system-dependent libraries X programs must link with.
2787 # Do this before checking for the system-independent R6 libraries
2788 # (-lICE), since we may need -lsocket or whatever for X linking.
2790 if test "$ISC" = yes; then
2791 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2793 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2794 # libraries were built with DECnet support. And karl@cs.umb.edu says
2795 # the Alpha needs dnet_stub (dnet does not exist).
2796 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2797 echo "configure:2809: checking for dnet_ntoa in -ldnet" >&5
2798 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2799 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2800 echo $ac_n "(cached) $ac_c" 1>&6
2802 ac_save_LIBS="$LIBS"
2804 cat > conftest.$ac_ext <<EOF
2805 #line 2817 "configure"
2806 #include "confdefs.h"
2807 /* Override any gcc2 internal prototype to avoid an error. */
2808 /* We use char because int might match the return type of a gcc2
2809 builtin and then its argument prototype would still apply. */
2816 if { (eval echo configure:2828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2818 eval "ac_cv_lib_$ac_lib_var=yes"
2820 echo "configure: failed program was:" >&5
2821 cat conftest.$ac_ext >&5
2823 eval "ac_cv_lib_$ac_lib_var=no"
2826 LIBS="$ac_save_LIBS"
2829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2830 echo "$ac_t""yes" 1>&6
2831 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2833 echo "$ac_t""no" 1>&6
2836 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2837 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2838 echo "configure:2850: checking for dnet_ntoa in -ldnet_stub" >&5
2839 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2840 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2841 echo $ac_n "(cached) $ac_c" 1>&6
2843 ac_save_LIBS="$LIBS"
2844 LIBS="-ldnet_stub $LIBS"
2845 cat > conftest.$ac_ext <<EOF
2846 #line 2858 "configure"
2847 #include "confdefs.h"
2848 /* Override any gcc2 internal prototype to avoid an error. */
2849 /* We use char because int might match the return type of a gcc2
2850 builtin and then its argument prototype would still apply. */
2857 if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2859 eval "ac_cv_lib_$ac_lib_var=yes"
2861 echo "configure: failed program was:" >&5
2862 cat conftest.$ac_ext >&5
2864 eval "ac_cv_lib_$ac_lib_var=no"
2867 LIBS="$ac_save_LIBS"
2870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2871 echo "$ac_t""yes" 1>&6
2872 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2874 echo "$ac_t""no" 1>&6
2879 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2880 # to get the SysV transport functions.
2881 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2883 # The nsl library prevents programs from opening the X display
2884 # on Irix 5.2, according to dickey@clark.net.
2885 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2886 echo "configure:2898: checking for gethostbyname" >&5
2887 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2888 echo $ac_n "(cached) $ac_c" 1>&6
2890 cat > conftest.$ac_ext <<EOF
2891 #line 2903 "configure"
2892 #include "confdefs.h"
2893 /* System header to define __stub macros and hopefully few prototypes,
2894 which can conflict with char gethostbyname(); below. */
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. */
2899 char gethostbyname();
2903 /* The GNU C library defines this for functions which it implements
2904 to always fail with ENOSYS. Some functions are actually named
2905 something starting with __ and the normal name is an alias. */
2906 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2914 if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2916 eval "ac_cv_func_gethostbyname=yes"
2918 echo "configure: failed program was:" >&5
2919 cat conftest.$ac_ext >&5
2921 eval "ac_cv_func_gethostbyname=no"
2926 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2927 echo "$ac_t""yes" 1>&6
2930 echo "$ac_t""no" 1>&6
2933 if test $ac_cv_func_gethostbyname = no; then
2934 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2935 echo "configure:2947: checking for gethostbyname in -lnsl" >&5
2936 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2937 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2938 echo $ac_n "(cached) $ac_c" 1>&6
2940 ac_save_LIBS="$LIBS"
2942 cat > conftest.$ac_ext <<EOF
2943 #line 2955 "configure"
2944 #include "confdefs.h"
2945 /* Override any gcc2 internal prototype to avoid an error. */
2946 /* We use char because int might match the return type of a gcc2
2947 builtin and then its argument prototype would still apply. */
2948 char gethostbyname();
2954 if { (eval echo configure:2966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2956 eval "ac_cv_lib_$ac_lib_var=yes"
2958 echo "configure: failed program was:" >&5
2959 cat conftest.$ac_ext >&5
2961 eval "ac_cv_lib_$ac_lib_var=no"
2964 LIBS="$ac_save_LIBS"
2967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2968 echo "$ac_t""yes" 1>&6
2969 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2971 echo "$ac_t""no" 1>&6
2976 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2977 # socket/setsockopt and other routines are undefined under SCO ODT
2978 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2979 # on later versions), says simon@lia.di.epfl.ch: it contains
2980 # gethostby* variants that don't use the nameserver (or something).
2981 # -lsocket must be given before -lnsl if both are needed.
2982 # We assume that if connect needs -lnsl, so does gethostbyname.
2983 echo $ac_n "checking for connect""... $ac_c" 1>&6
2984 echo "configure:2996: checking for connect" >&5
2985 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2986 echo $ac_n "(cached) $ac_c" 1>&6
2988 cat > conftest.$ac_ext <<EOF
2989 #line 3001 "configure"
2990 #include "confdefs.h"
2991 /* System header to define __stub macros and hopefully few prototypes,
2992 which can conflict with char connect(); below. */
2994 /* Override any gcc2 internal prototype to avoid an error. */
2995 /* We use char because int might match the return type of a gcc2
2996 builtin and then its argument prototype would still apply. */
3001 /* The GNU C library defines this for functions which it implements
3002 to always fail with ENOSYS. Some functions are actually named
3003 something starting with __ and the normal name is an alias. */
3004 #if defined (__stub_connect) || defined (__stub___connect)
3012 if { (eval echo configure:3024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3014 eval "ac_cv_func_connect=yes"
3016 echo "configure: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3019 eval "ac_cv_func_connect=no"
3024 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3025 echo "$ac_t""yes" 1>&6
3028 echo "$ac_t""no" 1>&6
3031 if test $ac_cv_func_connect = no; then
3032 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3033 echo "configure:3045: checking for connect in -lsocket" >&5
3034 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3035 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3036 echo $ac_n "(cached) $ac_c" 1>&6
3038 ac_save_LIBS="$LIBS"
3039 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3040 cat > conftest.$ac_ext <<EOF
3041 #line 3053 "configure"
3042 #include "confdefs.h"
3043 /* Override any gcc2 internal prototype to avoid an error. */
3044 /* We use char because int might match the return type of a gcc2
3045 builtin and then its argument prototype would still apply. */
3052 if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3054 eval "ac_cv_lib_$ac_lib_var=yes"
3056 echo "configure: failed program was:" >&5
3057 cat conftest.$ac_ext >&5
3059 eval "ac_cv_lib_$ac_lib_var=no"
3062 LIBS="$ac_save_LIBS"
3065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3066 echo "$ac_t""yes" 1>&6
3067 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3069 echo "$ac_t""no" 1>&6
3074 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3075 echo $ac_n "checking for remove""... $ac_c" 1>&6
3076 echo "configure:3088: checking for remove" >&5
3077 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3078 echo $ac_n "(cached) $ac_c" 1>&6
3080 cat > conftest.$ac_ext <<EOF
3081 #line 3093 "configure"
3082 #include "confdefs.h"
3083 /* System header to define __stub macros and hopefully few prototypes,
3084 which can conflict with char remove(); below. */
3086 /* Override any gcc2 internal prototype to avoid an error. */
3087 /* We use char because int might match the return type of a gcc2
3088 builtin and then its argument prototype would still apply. */
3093 /* The GNU C library defines this for functions which it implements
3094 to always fail with ENOSYS. Some functions are actually named
3095 something starting with __ and the normal name is an alias. */
3096 #if defined (__stub_remove) || defined (__stub___remove)
3104 if { (eval echo configure:3116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3106 eval "ac_cv_func_remove=yes"
3108 echo "configure: failed program was:" >&5
3109 cat conftest.$ac_ext >&5
3111 eval "ac_cv_func_remove=no"
3116 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3117 echo "$ac_t""yes" 1>&6
3120 echo "$ac_t""no" 1>&6
3123 if test $ac_cv_func_remove = no; then
3124 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3125 echo "configure:3137: checking for remove in -lposix" >&5
3126 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3127 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3128 echo $ac_n "(cached) $ac_c" 1>&6
3130 ac_save_LIBS="$LIBS"
3131 LIBS="-lposix $LIBS"
3132 cat > conftest.$ac_ext <<EOF
3133 #line 3145 "configure"
3134 #include "confdefs.h"
3135 /* Override any gcc2 internal prototype to avoid an error. */
3136 /* We use char because int might match the return type of a gcc2
3137 builtin and then its argument prototype would still apply. */
3144 if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3146 eval "ac_cv_lib_$ac_lib_var=yes"
3148 echo "configure: failed program was:" >&5
3149 cat conftest.$ac_ext >&5
3151 eval "ac_cv_lib_$ac_lib_var=no"
3154 LIBS="$ac_save_LIBS"
3157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3158 echo "$ac_t""yes" 1>&6
3159 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3161 echo "$ac_t""no" 1>&6
3166 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3167 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3168 echo "configure:3180: checking for shmat" >&5
3169 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3170 echo $ac_n "(cached) $ac_c" 1>&6
3172 cat > conftest.$ac_ext <<EOF
3173 #line 3185 "configure"
3174 #include "confdefs.h"
3175 /* System header to define __stub macros and hopefully few prototypes,
3176 which can conflict with char shmat(); below. */
3178 /* Override any gcc2 internal prototype to avoid an error. */
3179 /* We use char because int might match the return type of a gcc2
3180 builtin and then its argument prototype would still apply. */
3185 /* The GNU C library defines this for functions which it implements
3186 to always fail with ENOSYS. Some functions are actually named
3187 something starting with __ and the normal name is an alias. */
3188 #if defined (__stub_shmat) || defined (__stub___shmat)
3196 if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3198 eval "ac_cv_func_shmat=yes"
3200 echo "configure: failed program was:" >&5
3201 cat conftest.$ac_ext >&5
3203 eval "ac_cv_func_shmat=no"
3208 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3209 echo "$ac_t""yes" 1>&6
3212 echo "$ac_t""no" 1>&6
3215 if test $ac_cv_func_shmat = no; then
3216 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3217 echo "configure:3229: checking for shmat in -lipc" >&5
3218 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3219 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3220 echo $ac_n "(cached) $ac_c" 1>&6
3222 ac_save_LIBS="$LIBS"
3224 cat > conftest.$ac_ext <<EOF
3225 #line 3237 "configure"
3226 #include "confdefs.h"
3227 /* Override any gcc2 internal prototype to avoid an error. */
3228 /* We use char because int might match the return type of a gcc2
3229 builtin and then its argument prototype would still apply. */
3236 if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3238 eval "ac_cv_lib_$ac_lib_var=yes"
3240 echo "configure: failed program was:" >&5
3241 cat conftest.$ac_ext >&5
3243 eval "ac_cv_lib_$ac_lib_var=no"
3246 LIBS="$ac_save_LIBS"
3249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3250 echo "$ac_t""yes" 1>&6
3251 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3253 echo "$ac_t""no" 1>&6
3259 # Check for libraries that X11R6 Xt/Xaw programs need.
3260 ac_save_LDFLAGS="$LDFLAGS"
3261 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3262 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3263 # check for ICE first), but we must link in the order -lSM -lICE or
3264 # we get undefined symbols. So assume we have SM if we have ICE.
3265 # These have to be linked with before -lX11, unlike the other
3266 # libraries we check for below, so use a different variable.
3267 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3268 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3269 echo "configure:3281: checking for IceConnectionNumber in -lICE" >&5
3270 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3271 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3272 echo $ac_n "(cached) $ac_c" 1>&6
3274 ac_save_LIBS="$LIBS"
3275 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3276 cat > conftest.$ac_ext <<EOF
3277 #line 3289 "configure"
3278 #include "confdefs.h"
3279 /* Override any gcc2 internal prototype to avoid an error. */
3280 /* We use char because int might match the return type of a gcc2
3281 builtin and then its argument prototype would still apply. */
3282 char IceConnectionNumber();
3285 IceConnectionNumber()
3288 if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3290 eval "ac_cv_lib_$ac_lib_var=yes"
3292 echo "configure: failed program was:" >&5
3293 cat conftest.$ac_ext >&5
3295 eval "ac_cv_lib_$ac_lib_var=no"
3298 LIBS="$ac_save_LIBS"
3301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3302 echo "$ac_t""yes" 1>&6
3303 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3305 echo "$ac_t""no" 1>&6
3308 LDFLAGS="$ac_save_LDFLAGS"
3313 if test "$have_x" != yes; then
3314 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3318 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3319 echo "configure:3331: checking for X app-defaults directory" >&5
3320 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3321 echo $ac_n "(cached) $ac_c" 1>&6
3325 if mkdir conftestdir; then
3327 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3328 cat > Imakefile <<'EOF'
3330 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3332 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3333 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3334 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3339 if test x"$ac_x_app_defaults" = x; then
3341 # Look for the directory under a standard set of common directories.
3342 # Check X11 before X11Rn because it's often a symlink to the current release.
3344 /usr/X11/lib/app-defaults \
3345 /usr/X11R6/lib/app-defaults \
3346 /usr/X11R6/lib/X11/app-defaults \
3347 /usr/X11R5/lib/app-defaults \
3348 /usr/X11R5/lib/X11/app-defaults \
3349 /usr/X11R4/lib/app-defaults \
3350 /usr/X11R4/lib/X11/app-defaults \
3352 /usr/lib/X11/app-defaults \
3353 /usr/lib/X11R6/app-defaults \
3354 /usr/lib/X11R5/app-defaults \
3355 /usr/lib/X11R4/app-defaults \
3357 /usr/local/X11/lib/app-defaults \
3358 /usr/local/X11R6/lib/app-defaults \
3359 /usr/local/X11R5/lib/app-defaults \
3360 /usr/local/X11R4/lib/app-defaults \
3362 /usr/local/lib/X11/app-defaults \
3363 /usr/local/lib/X11R6/app-defaults \
3364 /usr/local/lib/X11R6/X11/app-defaults \
3365 /usr/local/lib/X11R5/app-defaults \
3366 /usr/local/lib/X11R5/X11/app-defaults \
3367 /usr/local/lib/X11R4/app-defaults \
3368 /usr/local/lib/X11R4/X11/app-defaults \
3370 /usr/X386/lib/X11/app-defaults \
3371 /usr/x386/lib/X11/app-defaults \
3372 /usr/XFree86/lib/X11/app-defaults \
3374 /usr/lib/X11/app-defaults \
3375 /usr/local/lib/X11/app-defaults \
3376 /usr/unsupported/lib/X11/app-defaults \
3377 /usr/athena/lib/X11/app-defaults \
3378 /usr/local/x11r5/lib/X11/app-defaults \
3379 /usr/lpp/Xamples/lib/X11/app-defaults \
3380 /lib/usr/lib/X11/app-defaults \
3382 /usr/openwin/lib/app-defaults \
3383 /usr/openwin/lib/X11/app-defaults \
3384 /usr/openwin/share/lib/app-defaults \
3385 /usr/openwin/share/lib/X11/app-defaults \
3387 /X11R6/lib/app-defaults \
3388 /X11R5/lib/app-defaults \
3389 /X11R4/lib/app-defaults \
3392 if test -d "$ac_dir"; then
3393 ac_x_app_defaults=$ac_dir
3399 if test x"$ac_x_app_defaults" = x; then
3400 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3402 # Record where we found app-defaults for the cache.
3403 ac_cv_x_app_defaults="$ac_x_app_defaults"
3407 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3408 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3412 # The following arcana was gleaned from conversations with
3413 # Eric Schwartz <erics@col.hp.com>:
3415 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3416 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3417 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3418 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3419 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3420 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3421 # you don't need any -I or -L arguments.
3423 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3424 # are the same division as 10.x. However, there are no symlinks to
3425 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3426 # arguments are always necessary.
3428 # However, X11R6 was available on HPUX 9.x as a patch: if that
3429 # patch was installed, then all of X11R6 went in to
3430 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3432 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3433 # whether R5 was available as a patch; R6 undoubtedly was not.)
3435 # So. We try and use the highest numbered pair of
3436 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3437 # that are available. We do not mix and match different versions
3440 # Question I still don't know the answer to: (do you?)
3442 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3443 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3444 # that contrib directory? Did it contain so-called "standard"
3445 # X11R6, or did it include Xaw and Xmu as well? If the former,
3446 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3447 # be a situation where one had to reach into the R5 headers and
3448 # libs to find Xmu? That is, must both R6 and R5 directories
3449 # be on the -I and -L lists in that case?
3451 for version in X11R6 X11R5 X11R4 ; do
3452 # if either pair of directories exists...
3453 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3455 # if contrib exists, use it...
3456 if test -d /usr/contrib/$version/lib ; then
3457 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3458 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3460 # if the "standard" one exists, use it.
3461 if test -d /usr/lib/$version ; then
3462 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3463 X_LIBS="$X_LIBS -L/usr/lib/$version"
3465 # since at least one of the pair exists, go no farther.
3470 # Now find Motif. Thanks for not making xmkmf find this by
3471 # default, you losers.
3473 if test -d /usr/lib/Motif1.2 ; then
3474 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3475 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3476 elif test -d /usr/lib/Motif1.1 ; then
3477 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3478 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3481 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3483 if test -d /opt/Mesa/lib ; then
3484 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3485 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3488 if test -d /opt/xpm/lib/X11 ; then
3489 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3490 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3493 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3494 # in /usr/local/, unless there is already an xscreensaver in
3495 # /usr/local/bin/. This can be overridden with the --prefix arg
3496 # to configure. I'm not sure this is the right thing to do, but
3497 # Richard Lloyd says so...
3499 if test \! -x /usr/local/bin/xscreensaver ; then
3500 ac_default_prefix=/opt/xscreensaver
3506 # Thanks for not making xmkmf find this by default, pinheads.
3507 # And thanks for moving things around again, too. Is this
3508 # really the standard location now? What happened to the
3509 # joke that this kind of thing went in /opt?
3510 # cthomp says "answer: CDE (Common Disorganized Environment)"
3512 if test -f /usr/dt/include/Xm/Xm.h ; then
3513 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3514 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3516 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3517 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3518 echo "configure:3530: checking for regcmp in -lgen" >&5
3519 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3520 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3521 echo $ac_n "(cached) $ac_c" 1>&6
3523 ac_save_LIBS="$LIBS"
3525 cat > conftest.$ac_ext <<EOF
3526 #line 3538 "configure"
3527 #include "confdefs.h"
3528 /* Override any gcc2 internal prototype to avoid an error. */
3529 /* We use char because int might match the return type of a gcc2
3530 builtin and then its argument prototype would still apply. */
3537 if { (eval echo configure:3549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3539 eval "ac_cv_lib_$ac_lib_var=yes"
3541 echo "configure: failed program was:" >&5
3542 cat conftest.$ac_ext >&5
3544 eval "ac_cv_lib_$ac_lib_var=no"
3547 LIBS="$ac_save_LIBS"
3550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3551 echo "$ac_t""yes" 1>&6
3552 X_LIBS="$X_LIBS -lgen"
3554 echo "$ac_t""no" 1>&6
3560 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3561 echo "configure:3573: checking for XPointer" >&5
3562 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3563 echo $ac_n "(cached) $ac_c" 1>&6
3566 ac_save_CPPFLAGS="$CPPFLAGS"
3567 if test \! -z "$includedir" ; then
3568 CPPFLAGS="$CPPFLAGS -I$includedir"
3570 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3571 cat > conftest.$ac_ext <<EOF
3572 #line 3584 "configure"
3573 #include "confdefs.h"
3574 #include <X11/Xlib.h>
3576 XPointer foo = (XPointer) 0;
3579 if { (eval echo configure:3591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3583 echo "configure: failed program was:" >&5
3584 cat conftest.$ac_ext >&5
3589 CPPFLAGS="$ac_save_CPPFLAGS"
3592 echo "$ac_t""$ac_cv_xpointer" 1>&6
3593 if test "$ac_cv_xpointer" != yes; then
3594 cat >> confdefs.h <<\EOF
3595 #define XPointer char*
3602 ###############################################################################
3604 # Check for -lXmu (some fucked up vendors don't ship it...)
3606 ###############################################################################
3610 ac_save_CPPFLAGS="$CPPFLAGS"
3611 if test \! -z "$includedir" ; then
3612 CPPFLAGS="$CPPFLAGS -I$includedir"
3614 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3615 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3616 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3617 echo "configure:3629: checking for X11/Xmu/Error.h" >&5
3618 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3619 echo $ac_n "(cached) $ac_c" 1>&6
3621 cat > conftest.$ac_ext <<EOF
3622 #line 3634 "configure"
3623 #include "confdefs.h"
3624 #include <X11/Xmu/Error.h>
3626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3627 { (eval echo configure:3639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3629 if test -z "$ac_err"; then
3631 eval "ac_cv_header_$ac_safe=yes"
3634 echo "configure: failed program was:" >&5
3635 cat conftest.$ac_ext >&5
3637 eval "ac_cv_header_$ac_safe=no"
3641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3642 echo "$ac_t""yes" 1>&6
3645 echo "$ac_t""no" 1>&6
3648 CPPFLAGS="$ac_save_CPPFLAGS"
3649 if test "$have_xmu" = no ; then
3650 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3651 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3655 SAVER_LIBS="-lXmu $SAVER_LIBS"
3656 HACK_LIBS="-lXmu $HACK_LIBS"
3657 MOTIF_LIBS="-lXmu $MOTIF_LIBS"
3658 GTK_LIBS="-lXmu $GTK_LIBS"
3659 cat >> confdefs.h <<\EOF
3666 ###############################################################################
3668 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3669 # See comp.windows.x FAQ question 124. The right fix is to
3670 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3672 ###############################################################################
3674 if test "$have_xmu" = yes ; then
3677 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3678 echo "configure:3690: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3679 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3680 echo $ac_n "(cached) $ac_c" 1>&6
3682 ac_save_LDFLAGS="$LDFLAGS"
3683 if test \! -z "$x_libraries" ; then
3684 LDFLAGS="$LDFLAGS -L$x_libraries"
3686 # Note: this trick never works! (Generally.)
3687 # We're only getting away with using AC_TRY_LINK
3688 # with X libraries because we know it's SunOS.
3689 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3690 cat > conftest.$ac_ext <<EOF
3691 #line 3703 "configure"
3692 #include "confdefs.h"
3698 if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3700 ac_cv_sunos_xmu_bug=no
3702 echo "configure: failed program was:" >&5
3703 cat conftest.$ac_ext >&5
3705 ac_cv_sunos_xmu_bug=yes
3708 LDFLAGS="$ac_save_LDFLAGS"
3711 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3712 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3713 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3714 echo "configure:3726: checking whether the compiler understands -static" >&5
3715 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3716 echo $ac_n "(cached) $ac_c" 1>&6
3718 ac_save_LDFLAGS="$LDFLAGS"
3719 LDFLAGS="$LDFLAGS -static"
3720 cat > conftest.$ac_ext <<EOF
3721 #line 3733 "configure"
3722 #include "confdefs.h"
3728 if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3732 echo "configure: failed program was:" >&5
3733 cat conftest.$ac_ext >&5
3738 LDFLAGS="$ac_save_LDFLAGS"
3741 echo "$ac_t""$ac_cv_ld_static" 1>&6
3742 if test "$ac_cv_ld_static" = yes ; then
3743 LDFLAGS="$LDFLAGS -static"
3745 LDFLAGS="$LDFLAGS -Bstatic"
3753 ###############################################################################
3755 # Handle the --enable-subdir option
3757 ###############################################################################
3759 # Check whether --enable-subdir or --disable-subdir was given.
3760 if test "${enable_subdir+set}" = set; then
3761 enableval="$enable_subdir"
3762 enable_subdir="$enableval"
3767 if test x"$enable_subdir" = xno; then
3769 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
3770 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
3773 # there must be a better way than this...
3774 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
3776 HACKDIR=$enable_subdir
3779 HACKDIR='${bindir}/'$enable_subdir
3783 # canonicalize slashes.
3784 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3787 ###############################################################################
3789 # Check for the SGI SCREEN_SAVER server extension.
3791 ###############################################################################
3794 with_sgi_req=unspecified
3795 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3796 if test "${with_sgi_ext+set}" = set; then
3797 withval="$with_sgi_ext"
3798 with_sgi="$withval"; with_sgi_req="$withval"
3810 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3811 echo "configure:3823: checking for SGI SCREEN_SAVER headers" >&5
3814 X_CFLAGS="-I$d $X_CFLAGS"
3815 echo "$ac_t""$d" 1>&6
3817 echo "$ac_t""not found ($d: no such directory)" 1>&6
3820 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3821 echo "configure:3833: checking for SGI SCREEN_SAVER libs" >&5
3824 X_LIBS="-L$d $X_LIBS"
3825 echo "$ac_t""$d" 1>&6
3827 echo "$ac_t""not found ($d: no such directory)" 1>&6
3830 # replace the directory string with "yes".
3832 with_sgi=$with_sgi_req
3837 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3838 echo " If it is a directory, then \`DIR/include' will be added to"
3839 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3845 if test "$with_sgi" = yes; then
3847 ac_save_CPPFLAGS="$CPPFLAGS"
3848 if test \! -z "$includedir" ; then
3849 CPPFLAGS="$CPPFLAGS -I$includedir"
3851 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3852 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3853 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3854 echo "configure:3866: checking for X11/extensions/XScreenSaver.h" >&5
3855 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3856 echo $ac_n "(cached) $ac_c" 1>&6
3858 cat > conftest.$ac_ext <<EOF
3859 #line 3871 "configure"
3860 #include "confdefs.h"
3861 #include <X11/extensions/XScreenSaver.h>
3863 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3864 { (eval echo configure:3876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3865 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3866 if test -z "$ac_err"; then
3868 eval "ac_cv_header_$ac_safe=yes"
3871 echo "configure: failed program was:" >&5
3872 cat conftest.$ac_ext >&5
3874 eval "ac_cv_header_$ac_safe=no"
3878 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3879 echo "$ac_t""yes" 1>&6
3881 cat >> confdefs.h <<\EOF
3882 #define HAVE_SGI_SAVER_EXTENSION 1
3886 echo "$ac_t""no" 1>&6
3889 CPPFLAGS="$ac_save_CPPFLAGS"
3891 elif test "$with_sgi" != no; then
3892 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3897 ###############################################################################
3899 # Check for the MIT-SCREEN-SAVER server extension.
3901 ###############################################################################
3904 with_mit_req=unspecified
3905 # Check whether --with-mit-ext or --without-mit-ext was given.
3906 if test "${with_mit_ext+set}" = set; then
3907 withval="$with_mit_ext"
3908 with_mit="$withval"; with_mit_req="$withval"
3920 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3921 echo "configure:3933: checking for MIT-SCREEN-SAVER headers" >&5
3924 X_CFLAGS="-I$d $X_CFLAGS"
3925 echo "$ac_t""$d" 1>&6
3927 echo "$ac_t""not found ($d: no such directory)" 1>&6
3930 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3931 echo "configure:3943: checking for MIT-SCREEN-SAVER libs" >&5
3934 X_LIBS="-L$d $X_LIBS"
3935 echo "$ac_t""$d" 1>&6
3937 echo "$ac_t""not found ($d: no such directory)" 1>&6
3940 # replace the directory string with "yes".
3942 with_mit=$with_mit_req
3947 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3948 echo " If it is a directory, then \`DIR/include' will be added to"
3949 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3955 if test "$with_mit" = yes; then
3957 ac_save_CPPFLAGS="$CPPFLAGS"
3958 if test \! -z "$includedir" ; then
3959 CPPFLAGS="$CPPFLAGS -I$includedir"
3961 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3962 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3963 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3964 echo "configure:3976: checking for X11/extensions/scrnsaver.h" >&5
3965 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3966 echo $ac_n "(cached) $ac_c" 1>&6
3968 cat > conftest.$ac_ext <<EOF
3969 #line 3981 "configure"
3970 #include "confdefs.h"
3971 #include <X11/extensions/scrnsaver.h>
3973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3974 { (eval echo configure:3986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3976 if test -z "$ac_err"; then
3978 eval "ac_cv_header_$ac_safe=yes"
3981 echo "configure: failed program was:" >&5
3982 cat conftest.$ac_ext >&5
3984 eval "ac_cv_header_$ac_safe=no"
3988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3989 echo "$ac_t""yes" 1>&6
3992 echo "$ac_t""no" 1>&6
3995 CPPFLAGS="$ac_save_CPPFLAGS"
3997 # Now check to see if it's really in the library; XF86Free-3.3 ships
3998 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
4000 if test "$have_mit" = yes; then
4002 ac_save_CPPFLAGS="$CPPFLAGS"
4003 ac_save_LDFLAGS="$LDFLAGS"
4004 # ac_save_LIBS="$LIBS"
4006 if test \! -z "$includedir" ; then
4007 CPPFLAGS="$CPPFLAGS -I$includedir"
4009 # note: $X_CFLAGS includes $x_includes
4010 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4012 if test \! -z "$libdir" ; then
4013 LDFLAGS="$LDFLAGS -L$libdir"
4015 # note: $X_LIBS includes $x_libraries
4016 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4018 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
4019 echo "configure:4031: checking for XScreenSaverRegister in -lXext" >&5
4020 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4021 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4022 echo $ac_n "(cached) $ac_c" 1>&6
4024 ac_save_LIBS="$LIBS"
4025 LIBS="-lXext -lm $LIBS"
4026 cat > conftest.$ac_ext <<EOF
4027 #line 4039 "configure"
4028 #include "confdefs.h"
4029 /* Override any gcc2 internal prototype to avoid an error. */
4030 /* We use char because int might match the return type of a gcc2
4031 builtin and then its argument prototype would still apply. */
4032 char XScreenSaverRegister();
4035 XScreenSaverRegister()
4038 if { (eval echo configure:4050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4040 eval "ac_cv_lib_$ac_lib_var=yes"
4042 echo "configure: failed program was:" >&5
4043 cat conftest.$ac_ext >&5
4045 eval "ac_cv_lib_$ac_lib_var=no"
4048 LIBS="$ac_save_LIBS"
4051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4052 echo "$ac_t""yes" 1>&6
4055 echo "$ac_t""no" 1>&6
4059 CPPFLAGS="$ac_save_CPPFLAGS"
4060 LDFLAGS="$ac_save_LDFLAGS"
4061 # LIBS="$ac_save_LIBS"
4064 if test "$have_mit" = no; then
4065 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
4066 # of in Xext. Thank you master, may I have another.
4068 ac_save_CPPFLAGS="$CPPFLAGS"
4069 ac_save_LDFLAGS="$LDFLAGS"
4070 # ac_save_LIBS="$LIBS"
4072 if test \! -z "$includedir" ; then
4073 CPPFLAGS="$CPPFLAGS -I$includedir"
4075 # note: $X_CFLAGS includes $x_includes
4076 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4078 if test \! -z "$libdir" ; then
4079 LDFLAGS="$LDFLAGS -L$libdir"
4081 # note: $X_LIBS includes $x_libraries
4082 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4084 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
4085 echo "configure:4097: checking for XScreenSaverRegister in -lXExExt" >&5
4086 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4088 echo $ac_n "(cached) $ac_c" 1>&6
4090 ac_save_LIBS="$LIBS"
4091 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
4092 cat > conftest.$ac_ext <<EOF
4093 #line 4105 "configure"
4094 #include "confdefs.h"
4095 /* Override any gcc2 internal prototype to avoid an error. */
4096 /* We use char because int might match the return type of a gcc2
4097 builtin and then its argument prototype would still apply. */
4098 char XScreenSaverRegister();
4101 XScreenSaverRegister()
4104 if { (eval echo configure:4116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4106 eval "ac_cv_lib_$ac_lib_var=yes"
4108 echo "configure: failed program was:" >&5
4109 cat conftest.$ac_ext >&5
4111 eval "ac_cv_lib_$ac_lib_var=no"
4114 LIBS="$ac_save_LIBS"
4117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4118 echo "$ac_t""yes" 1>&6
4119 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
4121 echo "$ac_t""no" 1>&6
4125 CPPFLAGS="$ac_save_CPPFLAGS"
4126 LDFLAGS="$ac_save_LDFLAGS"
4127 # LIBS="$ac_save_LIBS"
4131 if test "$have_mit" = no; then
4132 # Double fuck! Looks like some versions of XFree86 (whichever version
4133 # it is that comes with RedHat Linux 2.0 -- I can't find a version
4134 # number) put this garbage in Xss instead of Xext. Thank you master,
4135 # may I have another.
4137 ac_save_CPPFLAGS="$CPPFLAGS"
4138 ac_save_LDFLAGS="$LDFLAGS"
4139 # ac_save_LIBS="$LIBS"
4141 if test \! -z "$includedir" ; then
4142 CPPFLAGS="$CPPFLAGS -I$includedir"
4144 # note: $X_CFLAGS includes $x_includes
4145 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4147 if test \! -z "$libdir" ; then
4148 LDFLAGS="$LDFLAGS -L$libdir"
4150 # note: $X_LIBS includes $x_libraries
4151 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4153 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4154 echo "configure:4166: checking for XScreenSaverRegister in -lXss" >&5
4155 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4156 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4157 echo $ac_n "(cached) $ac_c" 1>&6
4159 ac_save_LIBS="$LIBS"
4160 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4161 cat > conftest.$ac_ext <<EOF
4162 #line 4174 "configure"
4163 #include "confdefs.h"
4164 /* Override any gcc2 internal prototype to avoid an error. */
4165 /* We use char because int might match the return type of a gcc2
4166 builtin and then its argument prototype would still apply. */
4167 char XScreenSaverRegister();
4170 XScreenSaverRegister()
4173 if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4175 eval "ac_cv_lib_$ac_lib_var=yes"
4177 echo "configure: failed program was:" >&5
4178 cat conftest.$ac_ext >&5
4180 eval "ac_cv_lib_$ac_lib_var=no"
4183 LIBS="$ac_save_LIBS"
4186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4187 echo "$ac_t""yes" 1>&6
4188 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4190 echo "$ac_t""no" 1>&6
4194 CPPFLAGS="$ac_save_CPPFLAGS"
4195 LDFLAGS="$ac_save_LDFLAGS"
4196 # LIBS="$ac_save_LIBS"
4200 if test "$have_mit" = yes; then
4201 cat >> confdefs.h <<\EOF
4202 #define HAVE_MIT_SAVER_EXTENSION 1
4209 elif test "$with_mit" != no; then
4210 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4215 ###############################################################################
4217 # Check for the XIDLE server extension.
4219 ###############################################################################
4222 with_xidle_req=unspecified
4223 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4224 if test "${with_xidle_ext+set}" = set; then
4225 withval="$with_xidle_ext"
4226 with_xidle="$withval"; with_xidle_req="$withval"
4233 case "$with_xidle" in
4238 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4239 echo "configure:4251: checking for XIDLE headers" >&5
4240 d=$with_xidle/include
4242 X_CFLAGS="-I$d $X_CFLAGS"
4243 echo "$ac_t""$d" 1>&6
4245 echo "$ac_t""not found ($d: no such directory)" 1>&6
4248 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4249 echo "configure:4261: checking for XIDLE libs" >&5
4252 X_LIBS="-L$d $X_LIBS"
4253 echo "$ac_t""$d" 1>&6
4255 echo "$ac_t""not found ($d: no such directory)" 1>&6
4258 # replace the directory string with "yes".
4259 with_xidle_req="yes"
4260 with_xidle=$with_xidle_req
4265 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4266 echo " If it is a directory, then \`DIR/include' will be added to"
4267 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4273 if test "$with_xidle" = yes; then
4275 ac_save_CPPFLAGS="$CPPFLAGS"
4276 if test \! -z "$includedir" ; then
4277 CPPFLAGS="$CPPFLAGS -I$includedir"
4279 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4280 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4281 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4282 echo "configure:4294: checking for X11/extensions/xidle.h" >&5
4283 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4284 echo $ac_n "(cached) $ac_c" 1>&6
4286 cat > conftest.$ac_ext <<EOF
4287 #line 4299 "configure"
4288 #include "confdefs.h"
4289 #include <X11/extensions/xidle.h>
4291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4292 { (eval echo configure:4304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4294 if test -z "$ac_err"; then
4296 eval "ac_cv_header_$ac_safe=yes"
4299 echo "configure: failed program was:" >&5
4300 cat conftest.$ac_ext >&5
4302 eval "ac_cv_header_$ac_safe=no"
4306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4307 echo "$ac_t""yes" 1>&6
4309 cat >> confdefs.h <<\EOF
4310 #define HAVE_XIDLE_EXTENSION 1
4314 echo "$ac_t""no" 1>&6
4317 CPPFLAGS="$ac_save_CPPFLAGS"
4318 elif test "$with_xidle" != no; then
4319 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4324 ###############################################################################
4326 # Check for the SGI-VIDEO-CONTROL server extension.
4328 ###############################################################################
4331 with_sgivc_req=unspecified
4332 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4333 if test "${with_sgivc_ext+set}" = set; then
4334 withval="$with_sgivc_ext"
4335 with_sgivc="$withval"; with_sgivc_req="$withval"
4342 case "$with_sgivc" in
4347 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4348 echo "configure:4360: checking for SGI-VIDEO-CONTROL headers" >&5
4349 d=$with_sgivc/include
4351 X_CFLAGS="-I$d $X_CFLAGS"
4352 echo "$ac_t""$d" 1>&6
4354 echo "$ac_t""not found ($d: no such directory)" 1>&6
4357 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4358 echo "configure:4370: checking for SGI-VIDEO-CONTROL libs" >&5
4361 X_LIBS="-L$d $X_LIBS"
4362 echo "$ac_t""$d" 1>&6
4364 echo "$ac_t""not found ($d: no such directory)" 1>&6
4367 # replace the directory string with "yes".
4368 with_sgivc_req="yes"
4369 with_sgivc=$with_sgivc_req
4374 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4375 echo " If it is a directory, then \`DIR/include' will be added to"
4376 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4382 if test "$with_sgivc" = yes; then
4384 # first check for XSGIvc.h
4386 ac_save_CPPFLAGS="$CPPFLAGS"
4387 if test \! -z "$includedir" ; then
4388 CPPFLAGS="$CPPFLAGS -I$includedir"
4390 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4391 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4392 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4393 echo "configure:4405: checking for X11/extensions/XSGIvc.h" >&5
4394 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4395 echo $ac_n "(cached) $ac_c" 1>&6
4397 cat > conftest.$ac_ext <<EOF
4398 #line 4410 "configure"
4399 #include "confdefs.h"
4400 #include <X11/extensions/XSGIvc.h>
4402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4403 { (eval echo configure:4415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4405 if test -z "$ac_err"; then
4407 eval "ac_cv_header_$ac_safe=yes"
4410 echo "configure: failed program was:" >&5
4411 cat conftest.$ac_ext >&5
4413 eval "ac_cv_header_$ac_safe=no"
4417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4418 echo "$ac_t""yes" 1>&6
4421 echo "$ac_t""no" 1>&6
4424 CPPFLAGS="$ac_save_CPPFLAGS"
4426 # if that succeeded, then check for the -lXsgivc
4427 if test "$have_sgivc" = yes; then
4430 ac_save_CPPFLAGS="$CPPFLAGS"
4431 ac_save_LDFLAGS="$LDFLAGS"
4432 # ac_save_LIBS="$LIBS"
4434 if test \! -z "$includedir" ; then
4435 CPPFLAGS="$CPPFLAGS -I$includedir"
4437 # note: $X_CFLAGS includes $x_includes
4438 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4440 if test \! -z "$libdir" ; then
4441 LDFLAGS="$LDFLAGS -L$libdir"
4443 # note: $X_LIBS includes $x_libraries
4444 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4446 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4447 echo "configure:4459: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4448 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4449 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4450 echo $ac_n "(cached) $ac_c" 1>&6
4452 ac_save_LIBS="$LIBS"
4453 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4454 cat > conftest.$ac_ext <<EOF
4455 #line 4467 "configure"
4456 #include "confdefs.h"
4457 /* Override any gcc2 internal prototype to avoid an error. */
4458 /* We use char because int might match the return type of a gcc2
4459 builtin and then its argument prototype would still apply. */
4460 char XSGIvcQueryGammaMap();
4463 XSGIvcQueryGammaMap()
4466 if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4468 eval "ac_cv_lib_$ac_lib_var=yes"
4470 echo "configure: failed program was:" >&5
4471 cat conftest.$ac_ext >&5
4473 eval "ac_cv_lib_$ac_lib_var=no"
4476 LIBS="$ac_save_LIBS"
4479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4480 echo "$ac_t""yes" 1>&6
4481 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4483 echo "$ac_t""no" 1>&6
4487 CPPFLAGS="$ac_save_CPPFLAGS"
4488 LDFLAGS="$ac_save_LDFLAGS"
4489 # LIBS="$ac_save_LIBS"
4493 # if that succeeded, then we've really got it.
4494 if test "$have_sgivc" = yes; then
4495 cat >> confdefs.h <<\EOF
4496 #define HAVE_SGI_VC_EXTENSION 1
4501 elif test "$with_sgivc" != no; then
4502 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4507 ###############################################################################
4509 # Check for the DPMS server extension.
4511 ###############################################################################
4514 with_dpms_req=unspecified
4515 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4516 if test "${with_dpms_ext+set}" = set; then
4517 withval="$with_dpms_ext"
4518 with_dpms="$withval"; with_dpms_req="$withval"
4525 case "$with_dpms" in
4530 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4531 echo "configure:4543: checking for DPMS headers" >&5
4532 d=$with_dpms/include
4534 X_CFLAGS="-I$d $X_CFLAGS"
4535 echo "$ac_t""$d" 1>&6
4537 echo "$ac_t""not found ($d: no such directory)" 1>&6
4540 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4541 echo "configure:4553: checking for DPMS libs" >&5
4544 X_LIBS="-L$d $X_LIBS"
4545 echo "$ac_t""$d" 1>&6
4547 echo "$ac_t""not found ($d: no such directory)" 1>&6
4550 # replace the directory string with "yes".
4552 with_dpms=$with_dpms_req
4557 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4558 echo " If it is a directory, then \`DIR/include' will be added to"
4559 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4565 if test "$with_dpms" = yes; then
4567 # first check for dpms.h
4569 ac_save_CPPFLAGS="$CPPFLAGS"
4570 if test \! -z "$includedir" ; then
4571 CPPFLAGS="$CPPFLAGS -I$includedir"
4573 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4574 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4575 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4576 echo "configure:4588: checking for X11/extensions/dpms.h" >&5
4577 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4578 echo $ac_n "(cached) $ac_c" 1>&6
4580 cat > conftest.$ac_ext <<EOF
4581 #line 4593 "configure"
4582 #include "confdefs.h"
4583 #include <X11/extensions/dpms.h>
4585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4586 { (eval echo configure:4598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4588 if test -z "$ac_err"; then
4590 eval "ac_cv_header_$ac_safe=yes"
4593 echo "configure: failed program was:" >&5
4594 cat conftest.$ac_ext >&5
4596 eval "ac_cv_header_$ac_safe=no"
4600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4601 echo "$ac_t""yes" 1>&6
4604 echo "$ac_t""no" 1>&6
4607 CPPFLAGS="$ac_save_CPPFLAGS"
4609 # if that succeeded, then check for the DPMS code in the libraries
4610 if test "$have_dpms" = yes; then
4612 # first look in -lXext (this is where it is with XFree86 4.0)
4615 ac_save_CPPFLAGS="$CPPFLAGS"
4616 ac_save_LDFLAGS="$LDFLAGS"
4617 # ac_save_LIBS="$LIBS"
4619 if test \! -z "$includedir" ; then
4620 CPPFLAGS="$CPPFLAGS -I$includedir"
4622 # note: $X_CFLAGS includes $x_includes
4623 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4625 if test \! -z "$libdir" ; then
4626 LDFLAGS="$LDFLAGS -L$libdir"
4628 # note: $X_LIBS includes $x_libraries
4629 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4631 echo $ac_n "checking for DPMSInfo in -lXext""... $ac_c" 1>&6
4632 echo "configure:4644: checking for DPMSInfo in -lXext" >&5
4633 ac_lib_var=`echo Xext'_'DPMSInfo | sed 'y%./+-%__p_%'`
4634 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4635 echo $ac_n "(cached) $ac_c" 1>&6
4637 ac_save_LIBS="$LIBS"
4638 LIBS="-lXext -lXext -lX11 $LIBS"
4639 cat > conftest.$ac_ext <<EOF
4640 #line 4652 "configure"
4641 #include "confdefs.h"
4642 /* Override any gcc2 internal prototype to avoid an error. */
4643 /* We use char because int might match the return type of a gcc2
4644 builtin and then its argument prototype would still apply. */
4651 if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4653 eval "ac_cv_lib_$ac_lib_var=yes"
4655 echo "configure: failed program was:" >&5
4656 cat conftest.$ac_ext >&5
4658 eval "ac_cv_lib_$ac_lib_var=no"
4661 LIBS="$ac_save_LIBS"
4664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4665 echo "$ac_t""yes" 1>&6
4668 echo "$ac_t""no" 1>&6
4672 CPPFLAGS="$ac_save_CPPFLAGS"
4673 LDFLAGS="$ac_save_LDFLAGS"
4674 # LIBS="$ac_save_LIBS"
4677 # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
4678 if test "$have_dpms" = no; then
4680 ac_save_CPPFLAGS="$CPPFLAGS"
4681 ac_save_LDFLAGS="$LDFLAGS"
4682 # ac_save_LIBS="$LIBS"
4684 if test \! -z "$includedir" ; then
4685 CPPFLAGS="$CPPFLAGS -I$includedir"
4687 # note: $X_CFLAGS includes $x_includes
4688 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4690 if test \! -z "$libdir" ; then
4691 LDFLAGS="$LDFLAGS -L$libdir"
4693 # note: $X_LIBS includes $x_libraries
4694 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4696 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4697 echo "configure:4709: checking for DPMSInfo in -lXdpms" >&5
4698 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4699 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4700 echo $ac_n "(cached) $ac_c" 1>&6
4702 ac_save_LIBS="$LIBS"
4703 LIBS="-lXdpms -lXext -lX11 $LIBS"
4704 cat > conftest.$ac_ext <<EOF
4705 #line 4717 "configure"
4706 #include "confdefs.h"
4707 /* Override any gcc2 internal prototype to avoid an error. */
4708 /* We use char because int might match the return type of a gcc2
4709 builtin and then its argument prototype would still apply. */
4716 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4718 eval "ac_cv_lib_$ac_lib_var=yes"
4720 echo "configure: failed program was:" >&5
4721 cat conftest.$ac_ext >&5
4723 eval "ac_cv_lib_$ac_lib_var=no"
4726 LIBS="$ac_save_LIBS"
4729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4730 echo "$ac_t""yes" 1>&6
4731 have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
4733 echo "$ac_t""no" 1>&6
4737 CPPFLAGS="$ac_save_CPPFLAGS"
4738 LDFLAGS="$ac_save_LDFLAGS"
4739 # LIBS="$ac_save_LIBS"
4745 # if that succeeded, then we've really got it.
4746 if test "$have_dpms" = yes; then
4747 cat >> confdefs.h <<\EOF
4748 #define HAVE_DPMS_EXTENSION 1
4753 elif test "$with_dpms" != no; then
4754 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4759 ###############################################################################
4761 # Check for the XF86VMODE server extension.
4763 ###############################################################################
4766 with_xf86vmode_req=unspecified
4767 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4768 if test "${with_xf86vmode_ext+set}" = set; then
4769 withval="$with_xf86vmode_ext"
4770 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4777 case "$with_xf86vmode" in
4782 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4783 echo "configure:4795: checking for xf86vmode headers" >&5
4784 d=$with_xf86vmode/include
4786 X_CFLAGS="-I$d $X_CFLAGS"
4787 echo "$ac_t""$d" 1>&6
4789 echo "$ac_t""not found ($d: no such directory)" 1>&6
4792 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4793 echo "configure:4805: checking for xf86vmode libs" >&5
4794 d=$with_xf86vmode/lib
4796 X_LIBS="-L$d $X_LIBS"
4797 echo "$ac_t""$d" 1>&6
4799 echo "$ac_t""not found ($d: no such directory)" 1>&6
4802 # replace the directory string with "yes".
4803 with_xf86vmode_req="yes"
4804 with_xf86vmode=$with_xf86vmode_req
4809 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4810 echo " If it is a directory, then \`DIR/include' will be added to"
4811 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4817 if test "$with_xf86vmode" = yes; then
4819 # first check for xf86vmode.h
4821 ac_save_CPPFLAGS="$CPPFLAGS"
4822 if test \! -z "$includedir" ; then
4823 CPPFLAGS="$CPPFLAGS -I$includedir"
4825 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4826 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4827 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4828 echo "configure:4840: checking for X11/extensions/xf86vmode.h" >&5
4829 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4830 echo $ac_n "(cached) $ac_c" 1>&6
4832 cat > conftest.$ac_ext <<EOF
4833 #line 4845 "configure"
4834 #include "confdefs.h"
4835 #include <X11/extensions/xf86vmode.h>
4837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4838 { (eval echo configure:4850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4840 if test -z "$ac_err"; then
4842 eval "ac_cv_header_$ac_safe=yes"
4845 echo "configure: failed program was:" >&5
4846 cat conftest.$ac_ext >&5
4848 eval "ac_cv_header_$ac_safe=no"
4852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4853 echo "$ac_t""yes" 1>&6
4856 echo "$ac_t""no" 1>&6
4859 CPPFLAGS="$ac_save_CPPFLAGS"
4861 # if that succeeded, then check for the -lXxf86vm
4862 if test "$have_xf86vmode" = yes; then
4865 ac_save_CPPFLAGS="$CPPFLAGS"
4866 ac_save_LDFLAGS="$LDFLAGS"
4867 # ac_save_LIBS="$LIBS"
4869 if test \! -z "$includedir" ; then
4870 CPPFLAGS="$CPPFLAGS -I$includedir"
4872 # note: $X_CFLAGS includes $x_includes
4873 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4875 if test \! -z "$libdir" ; then
4876 LDFLAGS="$LDFLAGS -L$libdir"
4878 # note: $X_LIBS includes $x_libraries
4879 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4881 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4882 echo "configure:4894: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4883 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4884 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4885 echo $ac_n "(cached) $ac_c" 1>&6
4887 ac_save_LIBS="$LIBS"
4888 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4889 cat > conftest.$ac_ext <<EOF
4890 #line 4902 "configure"
4891 #include "confdefs.h"
4892 /* Override any gcc2 internal prototype to avoid an error. */
4893 /* We use char because int might match the return type of a gcc2
4894 builtin and then its argument prototype would still apply. */
4895 char XF86VidModeGetViewPort();
4898 XF86VidModeGetViewPort()
4901 if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4903 eval "ac_cv_lib_$ac_lib_var=yes"
4905 echo "configure: failed program was:" >&5
4906 cat conftest.$ac_ext >&5
4908 eval "ac_cv_lib_$ac_lib_var=no"
4911 LIBS="$ac_save_LIBS"
4914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4915 echo "$ac_t""yes" 1>&6
4916 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4918 echo "$ac_t""no" 1>&6
4922 CPPFLAGS="$ac_save_CPPFLAGS"
4923 LDFLAGS="$ac_save_LDFLAGS"
4924 # LIBS="$ac_save_LIBS"
4928 # if that succeeded, then we've really got it.
4929 if test "$have_xf86vmode" = yes; then
4930 cat >> confdefs.h <<\EOF
4931 #define HAVE_XF86VMODE 1
4936 elif test "$with_xf86vmode" != no; then
4937 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4942 ###############################################################################
4944 # Check for HP XHPDisableReset and XHPEnableReset.
4946 ###############################################################################
4949 ac_save_CPPFLAGS="$CPPFLAGS"
4950 if test \! -z "$includedir" ; then
4951 CPPFLAGS="$CPPFLAGS -I$includedir"
4953 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4954 cat > conftest.$ac_ext <<EOF
4955 #line 4967 "configure"
4956 #include "confdefs.h"
4957 #include <X11/XHPlib.h>
4959 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4960 egrep "XHPDisableReset" >/dev/null 2>&1; then
4962 cat >> confdefs.h <<\EOF
4963 #define HAVE_XHPDISABLERESET 1
4966 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
4970 CPPFLAGS="$ac_save_CPPFLAGS"
4973 ###############################################################################
4975 # Check for /proc/interrupts.
4977 ###############################################################################
4979 have_proc_interrupts=no
4980 with_proc_interrupts_req=unspecified
4981 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4982 if test "${with_proc_interrupts+set}" = set; then
4983 withval="$with_proc_interrupts"
4984 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4986 with_proc_interrupts=yes
4990 if test "$with_proc_interrupts" = yes; then
4992 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4993 echo "configure:5005: checking whether /proc/interrupts contains keyboard data" >&5
4994 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4995 echo $ac_n "(cached) $ac_c" 1>&6
4997 ac_cv_have_proc_interrupts=no
4998 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4999 ac_cv_have_proc_interrupts=yes
5004 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
5005 have_proc_interrupts=$ac_cv_have_proc_interrupts
5007 if test "$have_proc_interrupts" = yes; then
5008 cat >> confdefs.h <<\EOF
5009 #define HAVE_PROC_INTERRUPTS 1
5014 elif test "$with_proc_interrupts" != no; then
5015 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
5020 ###############################################################################
5022 # The --enable-locking option
5024 ###############################################################################
5026 # Check whether --enable-locking or --disable-locking was given.
5027 if test "${enable_locking+set}" = set; then
5028 enableval="$enable_locking"
5029 enable_locking="$enableval"
5034 if test "$enable_locking" = yes; then
5036 elif test "$enable_locking" = no; then
5037 cat >> confdefs.h <<\EOF
5038 #define NO_LOCKING 1
5042 echo "error: must be yes or no: --enable-locking=$enable_locking"
5048 ###############################################################################
5050 # The --enable-vt-locking option
5052 ###############################################################################
5054 #ac_vt_lockswitch=no
5055 #AC_ARG_ENABLE(vt-locking,[
5056 # --enable-vt-locking Compile in support for locking Virtual Terminals.
5057 # This is the default if the system supports it, and
5058 # if locking support is included (--enable-locking.)
5059 # --disable-vt-locking Do not allow locking of VTs, even if locking is
5061 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
5062 #if test "$enable_vt_locking" = yes; then
5064 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
5065 # [AC_TRY_COMPILE([#include <fcntl.h>
5066 # #include <sys/ioctl.h>
5067 # #include <sys/vt.h>],
5068 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
5069 # [ac_cv_vt_lockswitch=yes],
5070 # [ac_cv_vt_lockswitch=no])])
5071 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
5073 #elif test "$enable_vt_locking" = no; then
5076 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
5080 #if test "$ac_vt_lockswitch" = yes; then
5081 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
5082 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
5083 # # #### but it doesn't work yet, so don't worry about that for now.
5089 ###############################################################################
5093 ###############################################################################
5097 # Solaris systems tend to come with PAM misconfigured.
5098 # Don't build it by default, even if the headers exist.
5102 # Default to building PAM support on all other systems, if it exists.
5103 with_pam_default=yes
5108 with_pam_req=unspecified
5110 # Check whether --with-pam or --without-pam was given.
5111 if test "${with_pam+set}" = set; then
5113 with_pam="$withval"; with_pam_req="$withval"
5115 with_pam=$with_pam_default
5125 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
5126 echo "configure:5138: checking for PAM headers" >&5
5129 X_CFLAGS="-I$d $X_CFLAGS"
5130 echo "$ac_t""$d" 1>&6
5132 echo "$ac_t""not found ($d: no such directory)" 1>&6
5135 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
5136 echo "configure:5148: checking for PAM libs" >&5
5139 X_LIBS="-L$d $X_LIBS"
5140 echo "$ac_t""$d" 1>&6
5142 echo "$ac_t""not found ($d: no such directory)" 1>&6
5145 # replace the directory string with "yes".
5147 with_pam=$with_pam_req
5152 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
5153 echo " If it is a directory, then \`DIR/include' will be added to"
5154 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5160 if test "$enable_locking" = yes -a "$with_pam" = yes; then
5161 echo $ac_n "checking for PAM""... $ac_c" 1>&6
5162 echo "configure:5174: checking for PAM" >&5
5163 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
5164 echo $ac_n "(cached) $ac_c" 1>&6
5167 ac_save_CPPFLAGS="$CPPFLAGS"
5168 if test \! -z "$includedir" ; then
5169 CPPFLAGS="$CPPFLAGS -I$includedir"
5171 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5172 cat > conftest.$ac_ext <<EOF
5173 #line 5185 "configure"
5174 #include "confdefs.h"
5175 #include <security/pam_appl.h>
5180 if { (eval echo configure:5192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5184 echo "configure: failed program was:" >&5
5185 cat conftest.$ac_ext >&5
5190 CPPFLAGS="$ac_save_CPPFLAGS"
5193 echo "$ac_t""$ac_cv_pam" 1>&6
5194 if test "$ac_cv_pam" = yes ; then
5196 cat >> confdefs.h <<\EOF
5200 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
5202 # libpam typically requires dlopen and dlsym. On FreeBSD,
5203 # those are in libc. On Linux and Solaris, they're in libdl.
5204 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5205 echo "configure:5217: checking for dlopen in -ldl" >&5
5206 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5207 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5208 echo $ac_n "(cached) $ac_c" 1>&6
5210 ac_save_LIBS="$LIBS"
5212 cat > conftest.$ac_ext <<EOF
5213 #line 5225 "configure"
5214 #include "confdefs.h"
5215 /* Override any gcc2 internal prototype to avoid an error. */
5216 /* We use char because int might match the return type of a gcc2
5217 builtin and then its argument prototype would still apply. */
5224 if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5226 eval "ac_cv_lib_$ac_lib_var=yes"
5228 echo "configure: failed program was:" >&5
5229 cat conftest.$ac_ext >&5
5231 eval "ac_cv_lib_$ac_lib_var=no"
5234 LIBS="$ac_save_LIBS"
5237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5238 echo "$ac_t""yes" 1>&6
5239 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5241 echo "$ac_t""no" 1>&6
5245 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5246 echo "configure:5258: checking how to call pam_strerror" >&5
5247 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5248 echo $ac_n "(cached) $ac_c" 1>&6
5250 cat > conftest.$ac_ext <<EOF
5251 #line 5263 "configure"
5252 #include "confdefs.h"
5255 #include <security/pam_appl.h>
5257 pam_handle_t *pamh = 0;
5258 char *s = pam_strerror(pamh, PAM_SUCCESS);
5261 if { (eval echo configure:5273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5263 ac_pam_strerror_args=2
5265 echo "configure: failed program was:" >&5
5266 cat conftest.$ac_ext >&5
5268 cat > conftest.$ac_ext <<EOF
5269 #line 5281 "configure"
5270 #include "confdefs.h"
5273 #include <security/pam_appl.h>
5276 pam_strerror(PAM_SUCCESS);
5279 if { (eval echo configure:5291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5281 ac_pam_strerror_args=1
5283 echo "configure: failed program was:" >&5
5284 cat conftest.$ac_ext >&5
5286 ac_pam_strerror_args=0
5291 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5294 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5295 if test "$ac_pam_strerror_args" = 1 ; then
5296 echo "$ac_t""one argument" 1>&6
5297 elif test "$ac_pam_strerror_args" = 2 ; then
5298 cat >> confdefs.h <<\EOF
5299 #define PAM_STRERROR_TWO_ARGS 1
5302 echo "$ac_t""two arguments" 1>&6
5304 echo "$ac_t""unknown" 1>&6
5310 ###############################################################################
5312 # Check for Kerberos.
5314 ###############################################################################
5318 with_kerberos_req=unspecified
5320 # Check whether --with-kerberos or --without-kerberos was given.
5321 if test "${with_kerberos+set}" = set; then
5322 withval="$with_kerberos"
5323 with_kerberos="$withval"; with_kerberos_req="$withval"
5330 case "$with_kerberos" in
5335 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5336 echo "configure:5348: checking for Kerberos headers" >&5
5337 d=$with_kerberos/include
5339 X_CFLAGS="-I$d $X_CFLAGS"
5340 echo "$ac_t""$d" 1>&6
5342 echo "$ac_t""not found ($d: no such directory)" 1>&6
5345 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5346 echo "configure:5358: checking for Kerberos libs" >&5
5347 d=$with_kerberos/lib
5349 X_LIBS="-L$d $X_LIBS"
5350 echo "$ac_t""$d" 1>&6
5352 echo "$ac_t""not found ($d: no such directory)" 1>&6
5355 # replace the directory string with "yes".
5356 with_kerberos_req="yes"
5357 with_kerberos=$with_kerberos_req
5362 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5363 echo " If it is a directory, then \`DIR/include' will be added to"
5364 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5370 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5371 echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
5372 echo "configure:5384: checking for Kerberos 4" >&5
5373 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5374 echo $ac_n "(cached) $ac_c" 1>&6
5377 ac_save_CPPFLAGS="$CPPFLAGS"
5378 if test \! -z "$includedir" ; then
5379 CPPFLAGS="$CPPFLAGS -I$includedir"
5381 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5382 cat > conftest.$ac_ext <<EOF
5383 #line 5395 "configure"
5384 #include "confdefs.h"
5390 if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5394 echo "configure: failed program was:" >&5
5395 cat conftest.$ac_ext >&5
5400 CPPFLAGS="$ac_save_CPPFLAGS"
5403 echo "$ac_t""$ac_cv_kerberos" 1>&6
5404 echo $ac_n "checking for Kerberos 5""... $ac_c" 1>&6
5405 echo "configure:5417: checking for Kerberos 5" >&5
5406 if eval "test \"`echo '$''{'ac_cv_kerberos5'+set}'`\" = set"; then
5407 echo $ac_n "(cached) $ac_c" 1>&6
5410 ac_save_CPPFLAGS="$CPPFLAGS"
5411 if test \! -z "$includedir" ; then
5412 CPPFLAGS="$CPPFLAGS -I$includedir"
5414 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5415 cat > conftest.$ac_ext <<EOF
5416 #line 5428 "configure"
5417 #include "confdefs.h"
5418 #include <kerberosIV/krb.h>
5423 if { (eval echo configure:5435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5427 echo "configure: failed program was:" >&5
5428 cat conftest.$ac_ext >&5
5433 CPPFLAGS="$ac_save_CPPFLAGS"
5436 echo "$ac_t""$ac_cv_kerberos5" 1>&6
5438 if test "$ac_cv_kerberos" = yes ; then
5440 cat >> confdefs.h <<\EOF
5441 #define HAVE_KERBEROS 1
5446 if test "$ac_cv_kerberos5" = yes ; then
5449 cat >> confdefs.h <<\EOF
5450 #define HAVE_KERBEROS 1
5453 cat >> confdefs.h <<\EOF
5454 #define HAVE_KERBEROS5 1
5459 if test "$have_kerberos5" = yes ; then
5460 # from Matt Knopp <mhat@infocalypse.netlag.com>
5461 # (who got it from amu@mit.edu)
5462 PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
5463 elif test "$have_kerberos" = yes ; then
5464 # from Tim Showalter <tjs+@andrew.cmu.edu>
5465 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
5468 if test "$have_kerberos" = yes ; then
5469 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5470 echo "configure:5482: checking for res_search" >&5
5471 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5472 echo $ac_n "(cached) $ac_c" 1>&6
5474 cat > conftest.$ac_ext <<EOF
5475 #line 5487 "configure"
5476 #include "confdefs.h"
5477 /* System header to define __stub macros and hopefully few prototypes,
5478 which can conflict with char res_search(); below. */
5480 /* Override any gcc2 internal prototype to avoid an error. */
5481 /* We use char because int might match the return type of a gcc2
5482 builtin and then its argument prototype would still apply. */
5487 /* The GNU C library defines this for functions which it implements
5488 to always fail with ENOSYS. Some functions are actually named
5489 something starting with __ and the normal name is an alias. */
5490 #if defined (__stub_res_search) || defined (__stub___res_search)
5498 if { (eval echo configure:5510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5500 eval "ac_cv_func_res_search=yes"
5502 echo "configure: failed program was:" >&5
5503 cat conftest.$ac_ext >&5
5505 eval "ac_cv_func_res_search=no"
5510 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5511 echo "$ac_t""yes" 1>&6
5514 echo "$ac_t""no" 1>&6
5515 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5516 echo "configure:5528: checking for res_search in -lresolv" >&5
5517 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5518 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5519 echo $ac_n "(cached) $ac_c" 1>&6
5521 ac_save_LIBS="$LIBS"
5522 LIBS="-lresolv $LIBS"
5523 cat > conftest.$ac_ext <<EOF
5524 #line 5536 "configure"
5525 #include "confdefs.h"
5526 /* Override any gcc2 internal prototype to avoid an error. */
5527 /* We use char because int might match the return type of a gcc2
5528 builtin and then its argument prototype would still apply. */
5535 if { (eval echo configure:5547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5537 eval "ac_cv_lib_$ac_lib_var=yes"
5539 echo "configure: failed program was:" >&5
5540 cat conftest.$ac_ext >&5
5542 eval "ac_cv_lib_$ac_lib_var=no"
5545 LIBS="$ac_save_LIBS"
5548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5549 echo "$ac_t""yes" 1>&6
5550 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
5552 echo "$ac_t""no" 1>&6
5553 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
5563 ###############################################################################
5565 # Check for the nine billion variants of shadow passwords...
5567 ###############################################################################
5572 with_shadow_req=unspecified
5574 # Check whether --with-shadow or --without-shadow was given.
5575 if test "${with_shadow+set}" = set; then
5576 withval="$with_shadow"
5577 with_shadow="$withval"; with_shadow_req="$withval"
5584 case "$with_shadow" in
5589 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
5590 echo "configure:5602: checking for shadow password headers" >&5
5591 d=$with_shadow/include
5593 X_CFLAGS="-I$d $X_CFLAGS"
5594 echo "$ac_t""$d" 1>&6
5596 echo "$ac_t""not found ($d: no such directory)" 1>&6
5599 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
5600 echo "configure:5612: checking for shadow password libs" >&5
5603 X_LIBS="-L$d $X_LIBS"
5604 echo "$ac_t""$d" 1>&6
5606 echo "$ac_t""not found ($d: no such directory)" 1>&6
5609 # replace the directory string with "yes".
5610 with_shadow_req="yes"
5611 with_shadow=$with_shadow_req
5616 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
5617 echo " If it is a directory, then \`DIR/include' will be added to"
5618 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5624 if test "$enable_locking" = no ; then
5630 ###############################################################################
5632 # Check for Sun "adjunct" passwords.
5634 ###############################################################################
5636 if test "$with_shadow" = yes ; then
5637 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
5638 echo "configure:5650: checking for Sun-style shadow passwords" >&5
5639 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
5640 echo $ac_n "(cached) $ac_c" 1>&6
5643 ac_save_CPPFLAGS="$CPPFLAGS"
5644 if test \! -z "$includedir" ; then
5645 CPPFLAGS="$CPPFLAGS -I$includedir"
5647 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5648 cat > conftest.$ac_ext <<EOF
5649 #line 5661 "configure"
5650 #include "confdefs.h"
5653 #include <sys/types.h>
5654 #include <sys/label.h>
5655 #include <sys/audit.h>
5658 struct passwd_adjunct *p = getpwanam("nobody");
5659 const char *pw = p->pwa_passwd;
5662 if { (eval echo configure:5674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5664 ac_cv_sun_adjunct=yes
5666 echo "configure: failed program was:" >&5
5667 cat conftest.$ac_ext >&5
5669 ac_cv_sun_adjunct=no
5672 CPPFLAGS="$ac_save_CPPFLAGS"
5675 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
5676 if test "$ac_cv_sun_adjunct" = yes; then
5677 have_shadow_adjunct=yes
5684 ###############################################################################
5686 # Check for DEC and SCO so-called "enhanced" security.
5688 ###############################################################################
5690 if test "$with_shadow" = yes ; then
5691 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
5692 echo "configure:5704: checking for DEC-style shadow passwords" >&5
5693 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+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>
5709 #include <sys/security.h>
5712 struct pr_passwd *p;
5714 set_auth_parameters(0, 0);
5715 check_auth_parameters();
5716 p = getprpwnam("nobody");
5717 pw = p->ufld.fd_encrypt;
5720 if { (eval echo configure:5732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5722 ac_cv_enhanced_passwd=yes
5724 echo "configure: failed program was:" >&5
5725 cat conftest.$ac_ext >&5
5727 ac_cv_enhanced_passwd=no
5730 CPPFLAGS="$ac_save_CPPFLAGS"
5733 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
5734 if test $ac_cv_enhanced_passwd = yes; then
5735 have_shadow_enhanced=yes
5739 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
5740 # (I'm told it needs -lcurses too, but I don't understand why.)
5741 # But on DEC, it's in -lsecurity.
5743 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
5744 echo "configure:5756: checking for getprpwnam in -lprot" >&5
5745 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
5746 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5747 echo $ac_n "(cached) $ac_c" 1>&6
5749 ac_save_LIBS="$LIBS"
5750 LIBS="-lprot -lx $LIBS"
5751 cat > conftest.$ac_ext <<EOF
5752 #line 5764 "configure"
5753 #include "confdefs.h"
5754 /* Override any gcc2 internal prototype to avoid an error. */
5755 /* We use char because int might match the return type of a gcc2
5756 builtin and then its argument prototype would still apply. */
5763 if { (eval echo configure:5775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5765 eval "ac_cv_lib_$ac_lib_var=yes"
5767 echo "configure: failed program was:" >&5
5768 cat conftest.$ac_ext >&5
5770 eval "ac_cv_lib_$ac_lib_var=no"
5773 LIBS="$ac_save_LIBS"
5776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5777 echo "$ac_t""yes" 1>&6
5778 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
5780 echo "$ac_t""no" 1>&6
5781 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
5782 echo "configure:5794: checking for getprpwnam in -lsecurity" >&5
5783 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
5784 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5785 echo $ac_n "(cached) $ac_c" 1>&6
5787 ac_save_LIBS="$LIBS"
5788 LIBS="-lsecurity $LIBS"
5789 cat > conftest.$ac_ext <<EOF
5790 #line 5802 "configure"
5791 #include "confdefs.h"
5792 /* Override any gcc2 internal prototype to avoid an error. */
5793 /* We use char because int might match the return type of a gcc2
5794 builtin and then its argument prototype would still apply. */
5801 if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5803 eval "ac_cv_lib_$ac_lib_var=yes"
5805 echo "configure: failed program was:" >&5
5806 cat conftest.$ac_ext >&5
5808 eval "ac_cv_lib_$ac_lib_var=no"
5811 LIBS="$ac_save_LIBS"
5814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5815 echo "$ac_t""yes" 1>&6
5816 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5818 echo "$ac_t""no" 1>&6
5826 ###############################################################################
5828 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
5830 ###############################################################################
5832 if test "$with_shadow" = yes ; then
5833 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5834 echo "configure:5846: checking for HP-style shadow passwords" >&5
5835 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5836 echo $ac_n "(cached) $ac_c" 1>&6
5839 ac_save_CPPFLAGS="$CPPFLAGS"
5840 if test \! -z "$includedir" ; then
5841 CPPFLAGS="$CPPFLAGS -I$includedir"
5843 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5844 cat > conftest.$ac_ext <<EOF
5845 #line 5857 "configure"
5846 #include "confdefs.h"
5849 #include <sys/types.h>
5851 #include <hpsecurity.h>
5854 struct s_passwd *p = getspwnam("nobody");
5855 const char *pw = p->pw_passwd;
5858 if { (eval echo configure:5870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5860 ac_cv_hpux_passwd=yes
5862 echo "configure: failed program was:" >&5
5863 cat conftest.$ac_ext >&5
5865 ac_cv_hpux_passwd=no
5868 CPPFLAGS="$ac_save_CPPFLAGS"
5871 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
5872 if test "$ac_cv_hpux_passwd" = yes; then
5873 have_shadow_hpux=yes
5877 # on HPUX, bigcrypt is in -lsec
5878 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
5879 echo "configure:5891: checking for bigcrypt in -lsec" >&5
5880 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
5881 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5882 echo $ac_n "(cached) $ac_c" 1>&6
5884 ac_save_LIBS="$LIBS"
5886 cat > conftest.$ac_ext <<EOF
5887 #line 5899 "configure"
5888 #include "confdefs.h"
5889 /* Override any gcc2 internal prototype to avoid an error. */
5890 /* We use char because int might match the return type of a gcc2
5891 builtin and then its argument prototype would still apply. */
5898 if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5900 eval "ac_cv_lib_$ac_lib_var=yes"
5902 echo "configure: failed program was:" >&5
5903 cat conftest.$ac_ext >&5
5905 eval "ac_cv_lib_$ac_lib_var=no"
5908 LIBS="$ac_save_LIBS"
5911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5912 echo "$ac_t""yes" 1>&6
5913 PASSWD_LIBS="$PASSWD_LIBS -lsec"
5915 echo "$ac_t""no" 1>&6
5922 ###############################################################################
5924 # Check for FreeBSD-style shadow passwords.
5926 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
5927 # password systems -- except you only get stuff in the pw_passwd field
5928 # if the running program is setuid. So, guess that we've got this
5929 # lossage to contend with if /etc/master.passwd exists, and default to
5930 # a setuid installation.
5932 ###############################################################################
5934 if test "$with_shadow" = yes ; then
5935 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
5936 echo "configure:5948: checking for FreeBSD-style shadow passwords" >&5
5937 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
5938 echo $ac_n "(cached) $ac_c" 1>&6
5940 if test -f /etc/master.passwd ; then
5941 ac_cv_master_passwd=yes
5943 ac_cv_master_passwd=no
5947 echo "$ac_t""$ac_cv_master_passwd" 1>&6
5948 if test "$ac_cv_master_passwd" = yes; then
5954 ###############################################################################
5956 # Check for traditional (ha!) shadow passwords.
5958 ###############################################################################
5960 if test "$with_shadow" = yes ; then
5961 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
5962 echo "configure:5974: checking for generic shadow passwords" >&5
5963 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
5964 echo $ac_n "(cached) $ac_c" 1>&6
5967 ac_save_CPPFLAGS="$CPPFLAGS"
5968 if test \! -z "$includedir" ; then
5969 CPPFLAGS="$CPPFLAGS -I$includedir"
5971 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5972 cat > conftest.$ac_ext <<EOF
5973 #line 5985 "configure"
5974 #include "confdefs.h"
5977 #include <sys/types.h>
5981 struct spwd *p = getspnam("nobody");
5982 const char *pw = p->sp_pwdp;
5985 if { (eval echo configure:5997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5989 echo "configure: failed program was:" >&5
5990 cat conftest.$ac_ext >&5
5995 CPPFLAGS="$ac_save_CPPFLAGS"
5998 echo "$ac_t""$ac_cv_shadow" 1>&6
5999 if test "$ac_cv_shadow" = yes; then
6003 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
6005 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
6006 echo "configure:6018: checking for getspnam in -lc" >&5
6007 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
6008 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6009 echo $ac_n "(cached) $ac_c" 1>&6
6011 ac_save_LIBS="$LIBS"
6013 cat > conftest.$ac_ext <<EOF
6014 #line 6026 "configure"
6015 #include "confdefs.h"
6016 /* Override any gcc2 internal prototype to avoid an error. */
6017 /* We use char because int might match the return type of a gcc2
6018 builtin and then its argument prototype would still apply. */
6025 if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6027 eval "ac_cv_lib_$ac_lib_var=yes"
6029 echo "configure: failed program was:" >&5
6030 cat conftest.$ac_ext >&5
6032 eval "ac_cv_lib_$ac_lib_var=no"
6035 LIBS="$ac_save_LIBS"
6038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6039 echo "$ac_t""yes" 1>&6
6042 echo "$ac_t""no" 1>&6
6045 if test "$have_getspnam" = no ; then
6046 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
6047 echo "configure:6059: checking for getspnam in -lgen" >&5
6048 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
6049 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6050 echo $ac_n "(cached) $ac_c" 1>&6
6052 ac_save_LIBS="$LIBS"
6054 cat > conftest.$ac_ext <<EOF
6055 #line 6067 "configure"
6056 #include "confdefs.h"
6057 /* Override any gcc2 internal prototype to avoid an error. */
6058 /* We use char because int might match the return type of a gcc2
6059 builtin and then its argument prototype would still apply. */
6066 if { (eval echo configure:6078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6068 eval "ac_cv_lib_$ac_lib_var=yes"
6070 echo "configure: failed program was:" >&5
6071 cat conftest.$ac_ext >&5
6073 eval "ac_cv_lib_$ac_lib_var=no"
6076 LIBS="$ac_save_LIBS"
6079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6080 echo "$ac_t""yes" 1>&6
6081 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
6083 echo "$ac_t""no" 1>&6
6091 ###############################################################################
6093 # Check for other libraries needed for non-shadow passwords.
6095 ###############################################################################
6097 if test "$enable_locking" = yes ; then
6099 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
6101 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
6102 echo "configure:6114: checking for crypt in -lc" >&5
6103 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
6104 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6105 echo $ac_n "(cached) $ac_c" 1>&6
6107 ac_save_LIBS="$LIBS"
6109 cat > conftest.$ac_ext <<EOF
6110 #line 6122 "configure"
6111 #include "confdefs.h"
6112 /* Override any gcc2 internal prototype to avoid an error. */
6113 /* We use char because int might match the return type of a gcc2
6114 builtin and then its argument prototype would still apply. */
6121 if { (eval echo configure:6133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6123 eval "ac_cv_lib_$ac_lib_var=yes"
6125 echo "configure: failed program was:" >&5
6126 cat conftest.$ac_ext >&5
6128 eval "ac_cv_lib_$ac_lib_var=no"
6131 LIBS="$ac_save_LIBS"
6134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6135 echo "$ac_t""yes" 1>&6
6138 echo "$ac_t""no" 1>&6
6141 if test "$have_crypt" = no ; then
6142 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6143 echo "configure:6155: checking for crypt in -lcrypt" >&5
6144 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6145 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6146 echo $ac_n "(cached) $ac_c" 1>&6
6148 ac_save_LIBS="$LIBS"
6149 LIBS="-lcrypt $LIBS"
6150 cat > conftest.$ac_ext <<EOF
6151 #line 6163 "configure"
6152 #include "confdefs.h"
6153 /* Override any gcc2 internal prototype to avoid an error. */
6154 /* We use char because int might match the return type of a gcc2
6155 builtin and then its argument prototype would still apply. */
6162 if { (eval echo configure:6174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6164 eval "ac_cv_lib_$ac_lib_var=yes"
6166 echo "configure: failed program was:" >&5
6167 cat conftest.$ac_ext >&5
6169 eval "ac_cv_lib_$ac_lib_var=no"
6172 LIBS="$ac_save_LIBS"
6175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6176 echo "$ac_t""yes" 1>&6
6177 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
6179 echo "$ac_t""no" 1>&6
6186 # Most of the above shadow mechanisms will have set need_setuid to yes,
6187 # if they were found. But, on some systems, we need setuid even when
6188 # using plain old vanilla passwords.
6190 if test "$enable_locking" = yes ; then
6192 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
6199 if test "$have_shadow_adjunct" = yes ; then
6200 cat >> confdefs.h <<\EOF
6201 #define HAVE_ADJUNCT_PASSWD 1
6204 elif test "$have_shadow_enhanced" = yes ; then
6205 cat >> confdefs.h <<\EOF
6206 #define HAVE_ENHANCED_PASSWD 1
6209 elif test "$have_shadow_hpux" = yes ; then
6210 cat >> confdefs.h <<\EOF
6211 #define HAVE_HPUX_PASSWD 1
6214 elif test "$have_shadow" = yes ; then
6215 cat >> confdefs.h <<\EOF
6216 #define HAVE_SHADOW_PASSWD 1
6222 ###############################################################################
6226 ###############################################################################
6229 with_motif_req=unspecified
6230 # Check whether --with-motif or --without-motif was given.
6231 if test "${with_motif+set}" = set; then
6232 withval="$with_motif"
6233 with_motif="$withval"; with_motif_req="$withval"
6240 case "$with_motif" in
6245 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
6246 echo "configure:6258: checking for Motif headers" >&5
6247 d=$with_motif/include
6249 X_CFLAGS="-I$d $X_CFLAGS"
6250 echo "$ac_t""$d" 1>&6
6252 echo "$ac_t""not found ($d: no such directory)" 1>&6
6255 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
6256 echo "configure:6268: checking for Motif libs" >&5
6259 X_LIBS="-L$d $X_LIBS"
6260 echo "$ac_t""$d" 1>&6
6262 echo "$ac_t""not found ($d: no such directory)" 1>&6
6265 # replace the directory string with "yes".
6266 with_motif_req="yes"
6267 with_motif=$with_motif_req
6272 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6273 echo " If it is a directory, then \`DIR/include' will be added to"
6274 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6280 if test "$with_motif" != yes -a "$with_motif" != no ; then
6281 echo "error: must be yes or no: --with-motif=$with_motif"
6285 if test "$with_motif" = yes; then
6288 ac_save_CPPFLAGS="$CPPFLAGS"
6289 if test \! -z "$includedir" ; then
6290 CPPFLAGS="$CPPFLAGS -I$includedir"
6292 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6293 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6294 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6295 echo "configure:6307: checking for Xm/Xm.h" >&5
6296 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6297 echo $ac_n "(cached) $ac_c" 1>&6
6299 cat > conftest.$ac_ext <<EOF
6300 #line 6312 "configure"
6301 #include "confdefs.h"
6304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6305 { (eval echo configure:6317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6307 if test -z "$ac_err"; then
6309 eval "ac_cv_header_$ac_safe=yes"
6312 echo "configure: failed program was:" >&5
6313 cat conftest.$ac_ext >&5
6315 eval "ac_cv_header_$ac_safe=no"
6319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6320 echo "$ac_t""yes" 1>&6
6322 cat >> confdefs.h <<\EOF
6323 #define HAVE_MOTIF 1
6326 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6328 echo "$ac_t""no" 1>&6
6331 CPPFLAGS="$ac_save_CPPFLAGS"
6335 if test "$have_motif" = yes; then
6337 ac_save_CPPFLAGS="$CPPFLAGS"
6338 if test \! -z "$includedir" ; then
6339 CPPFLAGS="$CPPFLAGS -I$includedir"
6341 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6342 ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
6343 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
6344 echo "configure:6356: checking for Xm/ComboBox.h" >&5
6345 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6346 echo $ac_n "(cached) $ac_c" 1>&6
6348 cat > conftest.$ac_ext <<EOF
6349 #line 6361 "configure"
6350 #include "confdefs.h"
6351 #include <Xm/ComboBox.h>
6353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6354 { (eval echo configure:6366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6356 if test -z "$ac_err"; then
6358 eval "ac_cv_header_$ac_safe=yes"
6361 echo "configure: failed program was:" >&5
6362 cat conftest.$ac_ext >&5
6364 eval "ac_cv_header_$ac_safe=no"
6368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6369 echo "$ac_t""yes" 1>&6
6370 cat >> confdefs.h <<\EOF
6371 #define HAVE_XMCOMBOBOX 1
6375 echo "$ac_t""no" 1>&6
6378 CPPFLAGS="$ac_save_CPPFLAGS"
6382 ###############################################################################
6384 # Check for -lgtk (and Gnome stuff)
6386 ###############################################################################
6389 with_gtk_req=unspecified
6390 # Check whether --with-gtk or --without-gtk was given.
6391 if test "${with_gtk+set}" = set; then
6393 with_gtk="$withval"; with_gtk_req="$withval"
6399 # if --with-gtk=/directory/ was specified, remember that directory so that
6400 # we can also look for the `gtk-config' program in that directory.
6416 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6417 echo "configure:6429: checking for Gtk headers" >&5
6420 X_CFLAGS="-I$d $X_CFLAGS"
6421 echo "$ac_t""$d" 1>&6
6423 echo "$ac_t""not found ($d: no such directory)" 1>&6
6426 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6427 echo "configure:6439: checking for Gtk libs" >&5
6430 X_LIBS="-L$d $X_LIBS"
6431 echo "$ac_t""$d" 1>&6
6433 echo "$ac_t""not found ($d: no such directory)" 1>&6
6436 # replace the directory string with "yes".
6438 with_gtk=$with_gtk_req
6443 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6444 echo " If it is a directory, then \`DIR/include' will be added to"
6445 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6451 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6452 echo "error: must be yes or no: --with-gtk=$with_gtk"
6457 with_gnome_req=unspecified
6458 # Check whether --with-gnome or --without-gnome was given.
6459 if test "${with_gnome+set}" = set; then
6460 withval="$with_gnome"
6461 with_gnome="$withval"; with_gnome_req="$withval"
6467 # if --with-gnome=/directory/ was specified, remember that directory so that
6468 # we can also look for the `gnome-config' program in that directory.
6469 case "$with_gnome" in
6471 gnome_dir="$with_gnome"
6479 case "$with_gnome" in
6484 echo $ac_n "checking for Gnome headers""... $ac_c" 1>&6
6485 echo "configure:6497: checking for Gnome headers" >&5
6486 d=$with_gnome/include
6488 X_CFLAGS="-I$d $X_CFLAGS"
6489 echo "$ac_t""$d" 1>&6
6491 echo "$ac_t""not found ($d: no such directory)" 1>&6
6494 echo $ac_n "checking for Gnome libs""... $ac_c" 1>&6
6495 echo "configure:6507: checking for Gnome libs" >&5
6498 X_LIBS="-L$d $X_LIBS"
6499 echo "$ac_t""$d" 1>&6
6501 echo "$ac_t""not found ($d: no such directory)" 1>&6
6504 # replace the directory string with "yes".
6505 with_gnome_req="yes"
6506 with_gnome=$with_gnome_req
6511 echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
6512 echo " If it is a directory, then \`DIR/include' will be added to"
6513 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6519 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
6520 echo "error: must be yes or no: --with-gnome=$with_gnome"
6526 if test "$with_gtk" = yes; then
6529 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6530 # for glib-config and gtk-config.
6534 if test ! -z "$gtk_dir"; then
6535 # canonicalize slashes.
6536 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6537 gtk_path="$gtk_dir:$gtk_path"
6540 if test ! -z "gnome_dir"; then
6541 # canonicalize slashes.
6542 gnome_dir=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
6543 gtk_path="$gnome_dir:$gtk_path"
6546 for ac_prog in glib12-config glib-config
6548 # Extract the first word of "$ac_prog", so it can be a program name with args.
6549 set dummy $ac_prog; ac_word=$2
6550 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6551 echo "configure:6563: checking for $ac_word" >&5
6552 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6553 echo $ac_n "(cached) $ac_c" 1>&6
6555 case "$glib_config" in
6557 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6560 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6563 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6564 ac_dummy="$gtk_path"
6565 for ac_dir in $ac_dummy; do
6566 test -z "$ac_dir" && ac_dir=.
6567 if test -f $ac_dir/$ac_word; then
6568 ac_cv_path_glib_config="$ac_dir/$ac_word"
6576 glib_config="$ac_cv_path_glib_config"
6577 if test -n "$glib_config"; then
6578 echo "$ac_t""$glib_config" 1>&6
6580 echo "$ac_t""no" 1>&6
6583 test -n "$glib_config" && break
6586 for ac_prog in gtk12-config gtk-config
6588 # Extract the first word of "$ac_prog", so it can be a program name with args.
6589 set dummy $ac_prog; ac_word=$2
6590 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6591 echo "configure:6603: checking for $ac_word" >&5
6592 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6593 echo $ac_n "(cached) $ac_c" 1>&6
6595 case "$gtk_config" in
6597 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6600 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6603 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6604 ac_dummy="$gtk_path"
6605 for ac_dir in $ac_dummy; do
6606 test -z "$ac_dir" && ac_dir=.
6607 if test -f $ac_dir/$ac_word; then
6608 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6616 gtk_config="$ac_cv_path_gtk_config"
6617 if test -n "$gtk_config"; then
6618 echo "$ac_t""$gtk_config" 1>&6
6620 echo "$ac_t""no" 1>&6
6623 test -n "$gtk_config" && break
6627 if test "$with_gnome" = yes; then
6628 for ac_prog in gnome-config
6630 # Extract the first word of "$ac_prog", so it can be a program name with args.
6631 set dummy $ac_prog; ac_word=$2
6632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6633 echo "configure:6645: checking for $ac_word" >&5
6634 if eval "test \"`echo '$''{'ac_cv_path_gnome_config'+set}'`\" = set"; then
6635 echo $ac_n "(cached) $ac_c" 1>&6
6637 case "$gnome_config" in
6639 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
6642 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a dos path.
6645 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6646 ac_dummy="$gtk_path"
6647 for ac_dir in $ac_dummy; do
6648 test -z "$ac_dir" && ac_dir=.
6649 if test -f $ac_dir/$ac_word; then
6650 ac_cv_path_gnome_config="$ac_dir/$ac_word"
6658 gnome_config="$ac_cv_path_gnome_config"
6659 if test -n "$gnome_config"; then
6660 echo "$ac_t""$gnome_config" 1>&6
6662 echo "$ac_t""no" 1>&6
6665 test -n "$gnome_config" && break
6670 if test -n "$glib_config" -a -n "gtk_config" ; then
6672 if test "$with_gnome" = yes -a -n "$gnome_config" ; then
6677 if test "$have_gtk" = yes; then
6678 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6679 echo "configure:6691: checking Gtk version number" >&5
6680 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6681 echo $ac_n "(cached) $ac_c" 1>&6
6683 ac_cv_gtk_version_string=`$gtk_config --version`
6686 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6687 ac_gtk_version_string=$ac_cv_gtk_version_string
6690 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6691 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6693 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6694 if test -z "$ac_gtk_version"; then
6695 ac_gtk_version=unknown
6696 ac_gtk_version_string=unknown
6698 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6706 if test "$have_gtk" = yes; then
6707 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6708 echo "configure:6720: checking for Gtk includes" >&5
6709 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6710 echo $ac_n "(cached) $ac_c" 1>&6
6712 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6715 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6716 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6717 echo "configure:6729: checking for Gtk libs" >&5
6718 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6719 echo $ac_n "(cached) $ac_c" 1>&6
6721 ac_cv_gtk_config_libs=`$gtk_config --libs`
6724 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6726 ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
6727 ac_gtk_config_libs=$ac_cv_gtk_config_libs
6729 # Check for Gnome Capplet support.
6731 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6732 gnome_config_libs="capplet gnomeui"
6733 echo $ac_n "checking for Gnome capplet includes""... $ac_c" 1>&6
6734 echo "configure:6746: checking for Gnome capplet includes" >&5
6735 if eval "test \"`echo '$''{'ac_cv_gnome_config_cflags'+set}'`\" = set"; then
6736 echo $ac_n "(cached) $ac_c" 1>&6
6738 if ( $gnome_config --cflags $gnome_config_libs 2>&1 >/dev/null | \
6739 grep Unknown >/dev/null ) ; then
6740 ac_cv_gnome_config_cflags=''
6742 ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
6746 ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
6747 if test "$ac_gnome_config_cflags" = "" ; then
6749 echo "$ac_t""no" 1>&6
6751 echo "$ac_t""$ac_gnome_config_cflags" 1>&6
6755 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6756 echo $ac_n "checking for Gnome capplet libs""... $ac_c" 1>&6
6757 echo "configure:6769: checking for Gnome capplet libs" >&5
6758 if eval "test \"`echo '$''{'ac_cv_gnome_config_libs'+set}'`\" = set"; then
6759 echo $ac_n "(cached) $ac_c" 1>&6
6761 if ( $gnome_config --libs $gnome_config_libs 2>&1 >/dev/null |
6762 grep Unknown >/dev/null ) ; then
6763 ac_cv_gnome_config_libs=''
6765 ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
6769 ac_gnome_config_libs=$ac_cv_gnome_config_libs
6770 if test "$ac_gnome_config_libs" = "" ; then
6772 echo "$ac_t""no" 1>&6
6774 echo "$ac_t""$ac_gnome_config_libs" 1>&6
6779 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6780 GNOME_DATADIR=`$gnome_config --datadir`
6784 # If we have Gnome, then override the gtk-config values with
6785 # the gnome-config values.
6787 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6788 ac_gtk_config_cflags=$ac_gnome_config_cflags
6789 ac_gtk_config_libs=$ac_gnome_config_libs
6790 cat >> confdefs.h <<\EOF
6791 #define HAVE_CRAPPLET 1
6797 if test "$have_gtk" = yes; then
6798 INCLUDES="$INCLUDES $ac_gtk_config_cflags"
6799 GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
6800 cat >> confdefs.h <<\EOF
6809 ###############################################################################
6811 # Checking whether Motif is really Lesstif.
6813 ###############################################################################
6816 if test "$have_motif" = yes ; then
6817 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6818 echo "configure:6830: checking whether Motif is really LessTif" >&5
6819 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6820 echo $ac_n "(cached) $ac_c" 1>&6
6823 ac_save_CPPFLAGS="$CPPFLAGS"
6824 if test \! -z "$includedir" ; then
6825 CPPFLAGS="$CPPFLAGS -I$includedir"
6827 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6828 cat > conftest.$ac_ext <<EOF
6829 #line 6841 "configure"
6830 #include "confdefs.h"
6833 long vers = LesstifVersion;
6836 if { (eval echo configure:6848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6838 ac_cv_have_lesstif=yes
6840 echo "configure: failed program was:" >&5
6841 cat conftest.$ac_ext >&5
6843 ac_cv_have_lesstif=no
6846 CPPFLAGS="$ac_save_CPPFLAGS"
6849 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
6850 have_lesstif=$ac_cv_have_lesstif
6854 lesstif_version=unknown
6855 lesstif_version_string=unknown
6857 if test "$have_lesstif" = yes ; then
6859 echo unknown > conftest-lt
6860 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
6861 echo "configure:6873: checking LessTif version number" >&5
6862 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
6863 echo $ac_n "(cached) $ac_c" 1>&6
6866 ac_save_CPPFLAGS="$CPPFLAGS"
6867 if test \! -z "$includedir" ; then
6868 CPPFLAGS="$CPPFLAGS -I$includedir"
6870 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6871 if test "$cross_compiling" = yes; then
6872 ac_cv_lesstif_version=unknown
6873 ac_cv_lesstif_version_string=unknown
6875 cat > conftest.$ac_ext <<EOF
6876 #line 6888 "configure"
6877 #include "confdefs.h"
6881 FILE *f = fopen("conftest-lt", "w");
6883 fprintf(f, "%d %d.%d\n", LesstifVersion,
6884 LESSTIF_VERSION, LESSTIF_REVISION);
6889 if { (eval echo configure:6901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6891 ltv=`cat conftest-lt`
6892 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
6893 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
6895 echo "configure: failed program was:" >&5
6896 cat conftest.$ac_ext >&5
6898 ac_cv_lesstif_version=unknown
6899 ac_cv_lesstif_version_string=unknown
6904 CPPFLAGS="$ac_save_CPPFLAGS"
6907 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
6909 lesstif_version=$ac_cv_lesstif_version
6910 lesstif_version_string=$ac_cv_lesstif_version_string
6915 if test "$have_motif" = yes ; then
6917 echo unknown > conftest-mt
6918 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
6919 echo "configure:6931: checking Motif version number" >&5
6920 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
6921 echo $ac_n "(cached) $ac_c" 1>&6
6924 ac_save_CPPFLAGS="$CPPFLAGS"
6925 if test \! -z "$includedir" ; then
6926 CPPFLAGS="$CPPFLAGS -I$includedir"
6928 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6929 if test "$cross_compiling" = yes; then
6930 ac_cv_motif_version=unknown
6931 ac_cv_motif_version_string=unknown
6933 cat > conftest.$ac_ext <<EOF
6934 #line 6946 "configure"
6935 #include "confdefs.h"
6939 FILE *f = fopen("conftest-mt", "w");
6941 fprintf(f, "%d %d.%d\n", XmVersion,
6942 XmVERSION, XmREVISION);
6947 if { (eval echo configure:6959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6949 mtv=`cat conftest-mt`
6950 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
6951 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
6953 echo "configure: failed program was:" >&5
6954 cat conftest.$ac_ext >&5
6956 ac_cv_motif_version=unknown
6957 ac_cv_motif_version_string=unknown
6962 CPPFLAGS="$ac_save_CPPFLAGS"
6965 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
6967 motif_version=$ac_cv_motif_version
6968 motif_version_string=$ac_cv_motif_version_string
6973 ###############################################################################
6975 # Checking whether Motif requires -lXpm.
6977 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
6978 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
6979 # of the library whether to build the XPM code into libXm, or whether
6980 # to rely on an external libXm. So the only way to tell whether XPM is
6981 # a link-time requirement is to examine libXm.a, which is very
6982 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
6983 # always link against XPM if the XPM lib exists (and this will be a
6984 # no-op if libXm happens to already have the XPM code in it.)
6986 ###############################################################################
6988 motif_requires_xpm=no
6989 if test "$have_motif" = yes ; then
6990 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
6991 echo "configure:7003: checking whether Motif requires XPM" >&5
6992 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
6994 motif_requires_xpm=yes
6995 echo "$ac_t""maybe" 1>&6
6997 echo "$ac_t""no" 1>&6
7002 ###############################################################################
7004 # Checking whether Motif requires -lXp.
7006 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
7007 # Extension". Why this extension isn't in -lXext with all the others,
7010 ###############################################################################
7013 if test "$have_motif" = yes ; then
7016 ac_save_CPPFLAGS="$CPPFLAGS"
7017 ac_save_LDFLAGS="$LDFLAGS"
7018 # ac_save_LIBS="$LIBS"
7020 if test \! -z "$includedir" ; then
7021 CPPFLAGS="$CPPFLAGS -I$includedir"
7023 # note: $X_CFLAGS includes $x_includes
7024 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7026 if test \! -z "$libdir" ; then
7027 LDFLAGS="$LDFLAGS -L$libdir"
7029 # note: $X_LIBS includes $x_libraries
7030 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7032 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
7033 echo "configure:7045: checking for XpQueryExtension in -lXp" >&5
7034 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
7035 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7036 echo $ac_n "(cached) $ac_c" 1>&6
7038 ac_save_LIBS="$LIBS"
7039 LIBS="-lXp -lX11 -lXext -lm $LIBS"
7040 cat > conftest.$ac_ext <<EOF
7041 #line 7053 "configure"
7042 #include "confdefs.h"
7043 /* Override any gcc2 internal prototype to avoid an error. */
7044 /* We use char because int might match the return type of a gcc2
7045 builtin and then its argument prototype would still apply. */
7046 char XpQueryExtension();
7052 if { (eval echo configure:7064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7054 eval "ac_cv_lib_$ac_lib_var=yes"
7056 echo "configure: failed program was:" >&5
7057 cat conftest.$ac_ext >&5
7059 eval "ac_cv_lib_$ac_lib_var=no"
7062 LIBS="$ac_save_LIBS"
7065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7066 echo "$ac_t""yes" 1>&6
7067 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
7069 echo "$ac_t""no" 1>&6
7073 CPPFLAGS="$ac_save_CPPFLAGS"
7074 LDFLAGS="$ac_save_LDFLAGS"
7075 # LIBS="$ac_save_LIBS"
7080 ###############################################################################
7082 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
7084 ###############################################################################
7087 if test "$have_motif" = yes ; then
7089 ac_save_CPPFLAGS="$CPPFLAGS"
7090 ac_save_LDFLAGS="$LDFLAGS"
7091 # ac_save_LIBS="$LIBS"
7093 if test \! -z "$includedir" ; then
7094 CPPFLAGS="$CPPFLAGS -I$includedir"
7096 # note: $X_CFLAGS includes $x_includes
7097 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7099 if test \! -z "$libdir" ; then
7100 LDFLAGS="$LDFLAGS -L$libdir"
7102 # note: $X_LIBS includes $x_libraries
7103 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7105 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
7106 echo "configure:7118: checking for _Xsetlocale in -lXintl" >&5
7107 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
7108 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7109 echo $ac_n "(cached) $ac_c" 1>&6
7111 ac_save_LIBS="$LIBS"
7112 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
7113 cat > conftest.$ac_ext <<EOF
7114 #line 7126 "configure"
7115 #include "confdefs.h"
7116 /* Override any gcc2 internal prototype to avoid an error. */
7117 /* We use char because int might match the return type of a gcc2
7118 builtin and then its argument prototype would still apply. */
7125 if { (eval echo configure:7137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7127 eval "ac_cv_lib_$ac_lib_var=yes"
7129 echo "configure: failed program was:" >&5
7130 cat conftest.$ac_ext >&5
7132 eval "ac_cv_lib_$ac_lib_var=no"
7135 LIBS="$ac_save_LIBS"
7138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7139 echo "$ac_t""yes" 1>&6
7142 echo "$ac_t""no" 1>&6
7146 CPPFLAGS="$ac_save_CPPFLAGS"
7147 LDFLAGS="$ac_save_LDFLAGS"
7148 # LIBS="$ac_save_LIBS"
7150 if test "$have_xintl" = yes; then
7151 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
7156 ###############################################################################
7158 # Check for -lGL or -lMesaGL.
7160 ###############################################################################
7164 with_gl_req=unspecified
7166 # Check whether --with-gl or --without-gl was given.
7167 if test "${with_gl+set}" = set; then
7169 with_gl="$withval"; with_gl_req="$withval"
7181 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
7182 echo "configure:7194: checking for GL headers" >&5
7185 X_CFLAGS="-I$d $X_CFLAGS"
7186 echo "$ac_t""$d" 1>&6
7188 echo "$ac_t""not found ($d: no such directory)" 1>&6
7191 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
7192 echo "configure:7204: checking for GL libs" >&5
7195 X_LIBS="-L$d $X_LIBS"
7196 echo "$ac_t""$d" 1>&6
7198 echo "$ac_t""not found ($d: no such directory)" 1>&6
7201 # replace the directory string with "yes".
7203 with_gl=$with_gl_req
7208 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
7209 echo " If it is a directory, then \`DIR/include' will be added to"
7210 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7216 ac_mesagl_version=unknown
7217 ac_mesagl_version_string=unknown
7219 if test "$with_gl" = yes; then
7221 ac_save_CPPFLAGS="$CPPFLAGS"
7222 if test \! -z "$includedir" ; then
7223 CPPFLAGS="$CPPFLAGS -I$includedir"
7225 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7226 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
7227 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
7228 echo "configure:7240: checking for GL/gl.h" >&5
7229 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7230 echo $ac_n "(cached) $ac_c" 1>&6
7232 cat > conftest.$ac_ext <<EOF
7233 #line 7245 "configure"
7234 #include "confdefs.h"
7237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7238 { (eval echo configure:7250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7240 if test -z "$ac_err"; then
7242 eval "ac_cv_header_$ac_safe=yes"
7245 echo "configure: failed program was:" >&5
7246 cat conftest.$ac_ext >&5
7248 eval "ac_cv_header_$ac_safe=no"
7252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7253 echo "$ac_t""yes" 1>&6
7256 echo "$ac_t""no" 1>&6
7259 CPPFLAGS="$ac_save_CPPFLAGS"
7260 if test "$have_gl" = yes ; then
7262 ac_save_CPPFLAGS="$CPPFLAGS"
7263 if test \! -z "$includedir" ; then
7264 CPPFLAGS="$CPPFLAGS -I$includedir"
7266 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7267 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
7268 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
7269 echo "configure:7281: checking for GL/glx.h" >&5
7270 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7271 echo $ac_n "(cached) $ac_c" 1>&6
7273 cat > conftest.$ac_ext <<EOF
7274 #line 7286 "configure"
7275 #include "confdefs.h"
7278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7279 { (eval echo configure:7291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7281 if test -z "$ac_err"; then
7283 eval "ac_cv_header_$ac_safe=yes"
7286 echo "configure: failed program was:" >&5
7287 cat conftest.$ac_ext >&5
7289 eval "ac_cv_header_$ac_safe=no"
7293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7294 echo "$ac_t""yes" 1>&6
7297 echo "$ac_t""no" 1>&6
7300 CPPFLAGS="$ac_save_CPPFLAGS"
7303 # If we have the headers, try and figure out which vendor it's from.
7305 if test "$have_gl" = yes ; then
7307 # We need to know whether it's MesaGL so that we know which libraries
7310 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7311 echo "configure:7323: checking whether GL is really MesaGL" >&5
7312 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7313 echo $ac_n "(cached) $ac_c" 1>&6
7315 ac_cv_have_mesa_gl=no
7317 ac_save_CPPFLAGS="$CPPFLAGS"
7318 if test \! -z "$includedir" ; then
7319 CPPFLAGS="$CPPFLAGS -I$includedir"
7321 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7322 cat > conftest.$ac_ext <<EOF
7323 #line 7335 "configure"
7324 #include "confdefs.h"
7327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7328 egrep "Mesa" >/dev/null 2>&1; then
7330 ac_cv_have_mesa_gl=yes
7334 CPPFLAGS="$ac_save_CPPFLAGS"
7338 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7339 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7346 # Some versions of MesaGL are compiled to require -lpthread.
7347 # So if the Mesa headers exist, and -lpthread exists, then always
7348 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
7350 if test "$ac_have_mesa_gl" = yes; then
7351 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7352 echo "configure:7364: checking for pthread_create in -lpthread" >&5
7353 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7355 echo $ac_n "(cached) $ac_c" 1>&6
7357 ac_save_LIBS="$LIBS"
7358 LIBS="-lpthread $LIBS"
7359 cat > conftest.$ac_ext <<EOF
7360 #line 7372 "configure"
7361 #include "confdefs.h"
7362 /* Override any gcc2 internal prototype to avoid an error. */
7363 /* We use char because int might match the return type of a gcc2
7364 builtin and then its argument prototype would still apply. */
7365 char pthread_create();
7371 if { (eval echo configure:7383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7373 eval "ac_cv_lib_$ac_lib_var=yes"
7375 echo "configure: failed program was:" >&5
7376 cat conftest.$ac_ext >&5
7378 eval "ac_cv_lib_$ac_lib_var=no"
7381 LIBS="$ac_save_LIBS"
7384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7385 echo "$ac_t""yes" 1>&6
7388 echo "$ac_t""no" 1>&6
7394 # If we have Mesa headers, check to see if we can link against -lMesaGL.
7395 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
7396 # Else, warn that GL is busted. (We have the headers, but no libs.)
7399 if test "$ac_have_mesa_gl" = yes ; then
7401 ac_save_CPPFLAGS="$CPPFLAGS"
7402 ac_save_LDFLAGS="$LDFLAGS"
7403 # ac_save_LIBS="$LIBS"
7405 if test \! -z "$includedir" ; then
7406 CPPFLAGS="$CPPFLAGS -I$includedir"
7408 # note: $X_CFLAGS includes $x_includes
7409 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7411 if test \! -z "$libdir" ; then
7412 LDFLAGS="$LDFLAGS -L$libdir"
7414 # note: $X_LIBS includes $x_libraries
7415 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7417 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
7418 echo "configure:7430: checking for glXCreateContext in -lMesaGL" >&5
7419 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7421 echo $ac_n "(cached) $ac_c" 1>&6
7423 ac_save_LIBS="$LIBS"
7424 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7425 cat > conftest.$ac_ext <<EOF
7426 #line 7438 "configure"
7427 #include "confdefs.h"
7428 /* Override any gcc2 internal prototype to avoid an error. */
7429 /* We use char because int might match the return type of a gcc2
7430 builtin and then its argument prototype would still apply. */
7431 char glXCreateContext();
7437 if { (eval echo configure:7449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7439 eval "ac_cv_lib_$ac_lib_var=yes"
7441 echo "configure: failed program was:" >&5
7442 cat conftest.$ac_ext >&5
7444 eval "ac_cv_lib_$ac_lib_var=no"
7447 LIBS="$ac_save_LIBS"
7450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7451 echo "$ac_t""yes" 1>&6
7453 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
7455 echo "$ac_t""no" 1>&6
7458 CPPFLAGS="$ac_save_CPPFLAGS"
7459 LDFLAGS="$ac_save_LDFLAGS"
7460 # LIBS="$ac_save_LIBS"
7464 if test "$gl_lib_1" = "" ; then
7466 ac_save_CPPFLAGS="$CPPFLAGS"
7467 ac_save_LDFLAGS="$LDFLAGS"
7468 # ac_save_LIBS="$LIBS"
7470 if test \! -z "$includedir" ; then
7471 CPPFLAGS="$CPPFLAGS -I$includedir"
7473 # note: $X_CFLAGS includes $x_includes
7474 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7476 if test \! -z "$libdir" ; then
7477 LDFLAGS="$LDFLAGS -L$libdir"
7479 # note: $X_LIBS includes $x_libraries
7480 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7482 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7483 echo "configure:7495: checking for glXCreateContext in -lGL" >&5
7484 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7485 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7486 echo $ac_n "(cached) $ac_c" 1>&6
7488 ac_save_LIBS="$LIBS"
7489 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7490 cat > conftest.$ac_ext <<EOF
7491 #line 7503 "configure"
7492 #include "confdefs.h"
7493 /* Override any gcc2 internal prototype to avoid an error. */
7494 /* We use char because int might match the return type of a gcc2
7495 builtin and then its argument prototype would still apply. */
7496 char glXCreateContext();
7502 if { (eval echo configure:7514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7504 eval "ac_cv_lib_$ac_lib_var=yes"
7506 echo "configure: failed program was:" >&5
7507 cat conftest.$ac_ext >&5
7509 eval "ac_cv_lib_$ac_lib_var=no"
7512 LIBS="$ac_save_LIBS"
7515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7516 echo "$ac_t""yes" 1>&6
7518 GL_LIBS="-lGL -lGLU $GL_LIBS"
7520 echo "$ac_t""no" 1>&6
7523 CPPFLAGS="$ac_save_CPPFLAGS"
7524 LDFLAGS="$ac_save_LDFLAGS"
7525 # LIBS="$ac_save_LIBS"
7529 if test "$gl_lib_1" = "" ; then
7530 # we have headers, but no libs -- bail.
7535 # linking works -- we can build the GL hacks.
7536 cat >> confdefs.h <<\EOF
7540 if test "$ac_have_mesa_gl" = yes ; then
7541 cat >> confdefs.h <<\EOF
7542 #define HAVE_MESA_GL 1
7550 # Now that we know we have GL headers and libs, do some more GL testing.
7553 if test "$have_gl" = yes ; then
7554 # If it's MesaGL, we'd like to issue a warning if the version number
7555 # is less than or equal to 2.6, because that version had a security bug.
7557 if test "$ac_have_mesa_gl" = yes; then
7559 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7560 echo "configure:7572: checking MesaGL version number" >&5
7561 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7562 echo $ac_n "(cached) $ac_c" 1>&6
7564 cat > conftest.$ac_ext <<EOF
7565 #line 7577 "configure"
7566 #include "confdefs.h"
7568 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7571 ac_save_CPPFLAGS="$CPPFLAGS"
7572 if test \! -z "$includedir" ; then
7573 CPPFLAGS="$CPPFLAGS -I$includedir"
7575 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7579 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7580 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7583 rm -f conftest.$ac_ext
7585 CPPFLAGS="$ac_save_CPPFLAGS"
7587 if test "$mglv" = ""; then
7588 ac_mesagl_version=unknown
7589 ac_mesagl_version_string=unknown
7591 ac_mesagl_version_string=$mglv
7592 maj=`echo $mglv | sed -n 's/\..*//p'`
7593 min=`echo $mglv | sed -n 's/.*\.//p'`
7594 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7595 if test -z "$ac_mesagl_version"; then
7596 ac_mesagl_version=unknown
7597 ac_mesagl_version_string=unknown
7600 ac_cv_mesagl_version=$ac_mesagl_version
7601 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7605 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7606 ac_mesagl_version=$ac_cv_mesagl_version
7607 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7611 # Check for OpenGL 1.1 features.
7614 ac_save_CPPFLAGS="$CPPFLAGS"
7615 ac_save_LDFLAGS="$LDFLAGS"
7616 # ac_save_LIBS="$LIBS"
7618 if test \! -z "$includedir" ; then
7619 CPPFLAGS="$CPPFLAGS -I$includedir"
7621 # note: $X_CFLAGS includes $x_includes
7622 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7624 if test \! -z "$libdir" ; then
7625 LDFLAGS="$LDFLAGS -L$libdir"
7627 # note: $X_LIBS includes $x_libraries
7628 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7630 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7631 echo "configure:7643: checking for glBindTexture in -l$gl_lib_1" >&5
7632 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7633 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7634 echo $ac_n "(cached) $ac_c" 1>&6
7636 ac_save_LIBS="$LIBS"
7637 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7638 cat > conftest.$ac_ext <<EOF
7639 #line 7651 "configure"
7640 #include "confdefs.h"
7641 /* Override any gcc2 internal prototype to avoid an error. */
7642 /* We use char because int might match the return type of a gcc2
7643 builtin and then its argument prototype would still apply. */
7644 char glBindTexture();
7650 if { (eval echo configure:7662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7652 eval "ac_cv_lib_$ac_lib_var=yes"
7654 echo "configure: failed program was:" >&5
7655 cat conftest.$ac_ext >&5
7657 eval "ac_cv_lib_$ac_lib_var=no"
7660 LIBS="$ac_save_LIBS"
7663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7664 echo "$ac_t""yes" 1>&6
7665 cat >> confdefs.h <<\EOF
7666 #define HAVE_GLBINDTEXTURE 1
7670 echo "$ac_t""no" 1>&6
7674 CPPFLAGS="$ac_save_CPPFLAGS"
7675 LDFLAGS="$ac_save_LDFLAGS"
7676 # LIBS="$ac_save_LIBS"
7680 elif test "$with_gl" != no; then
7681 echo "error: must be yes or no: --with-gl=$with_gl"
7686 ###############################################################################
7690 ###############################################################################
7693 with_gle_req=unspecified
7695 # Check whether --with-gle or --without-gle was given.
7696 if test "${with_gle+set}" = set; then
7698 with_gle="$withval"; with_gle_req="$withval"
7710 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7711 echo "configure:7723: checking for GLE headers" >&5
7714 X_CFLAGS="-I$d $X_CFLAGS"
7715 echo "$ac_t""$d" 1>&6
7717 echo "$ac_t""not found ($d: no such directory)" 1>&6
7720 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7721 echo "configure:7733: checking for GLE libs" >&5
7724 X_LIBS="-L$d $X_LIBS"
7725 echo "$ac_t""$d" 1>&6
7727 echo "$ac_t""not found ($d: no such directory)" 1>&6
7730 # replace the directory string with "yes".
7732 with_gle=$with_gle_req
7737 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7738 echo " If it is a directory, then \`DIR/include' will be added to"
7739 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7747 if test "$with_gle" = yes; then
7750 ac_save_CPPFLAGS="$CPPFLAGS"
7751 if test \! -z "$includedir" ; then
7752 CPPFLAGS="$CPPFLAGS -I$includedir"
7754 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7755 ac_safe=`echo "GL/gle.h" | sed 'y%./+-%__p_%'`
7756 echo $ac_n "checking for GL/gle.h""... $ac_c" 1>&6
7757 echo "configure:7769: checking for GL/gle.h" >&5
7758 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7759 echo $ac_n "(cached) $ac_c" 1>&6
7761 cat > conftest.$ac_ext <<EOF
7762 #line 7774 "configure"
7763 #include "confdefs.h"
7766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7767 { (eval echo configure:7779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7769 if test -z "$ac_err"; then
7771 eval "ac_cv_header_$ac_safe=yes"
7774 echo "configure: failed program was:" >&5
7775 cat conftest.$ac_ext >&5
7777 eval "ac_cv_header_$ac_safe=no"
7781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7782 echo "$ac_t""yes" 1>&6
7785 echo "$ac_t""no" 1>&6
7788 CPPFLAGS="$ac_save_CPPFLAGS"
7789 if test "$have_gle3" = yes ; then
7793 ac_save_CPPFLAGS="$CPPFLAGS"
7794 if test \! -z "$includedir" ; then
7795 CPPFLAGS="$CPPFLAGS -I$includedir"
7797 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7798 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7799 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7800 echo "configure:7812: checking for GL/gutil.h" >&5
7801 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7802 echo $ac_n "(cached) $ac_c" 1>&6
7804 cat > conftest.$ac_ext <<EOF
7805 #line 7817 "configure"
7806 #include "confdefs.h"
7807 #include <GL/gutil.h>
7809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7810 { (eval echo configure:7822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7812 if test -z "$ac_err"; then
7814 eval "ac_cv_header_$ac_safe=yes"
7817 echo "configure: failed program was:" >&5
7818 cat conftest.$ac_ext >&5
7820 eval "ac_cv_header_$ac_safe=no"
7824 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7825 echo "$ac_t""yes" 1>&6
7828 echo "$ac_t""no" 1>&6
7831 CPPFLAGS="$ac_save_CPPFLAGS"
7832 if test "$have_gle" = yes ; then
7834 ac_save_CPPFLAGS="$CPPFLAGS"
7835 if test \! -z "$includedir" ; then
7836 CPPFLAGS="$CPPFLAGS -I$includedir"
7838 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7839 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
7840 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
7841 echo "configure:7853: checking for GL/tube.h" >&5
7842 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7843 echo $ac_n "(cached) $ac_c" 1>&6
7845 cat > conftest.$ac_ext <<EOF
7846 #line 7858 "configure"
7847 #include "confdefs.h"
7848 #include <GL/tube.h>
7850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7851 { (eval echo configure:7863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7853 if test -z "$ac_err"; then
7855 eval "ac_cv_header_$ac_safe=yes"
7858 echo "configure: failed program was:" >&5
7859 cat conftest.$ac_ext >&5
7861 eval "ac_cv_header_$ac_safe=no"
7865 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7866 echo "$ac_t""yes" 1>&6
7869 echo "$ac_t""no" 1>&6
7872 CPPFLAGS="$ac_save_CPPFLAGS"
7876 if test "$have_gle" = yes ; then
7880 ac_save_CPPFLAGS="$CPPFLAGS"
7881 ac_save_LDFLAGS="$LDFLAGS"
7882 # ac_save_LIBS="$LIBS"
7884 if test \! -z "$includedir" ; then
7885 CPPFLAGS="$CPPFLAGS -I$includedir"
7887 # note: $X_CFLAGS includes $x_includes
7888 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7890 if test \! -z "$libdir" ; then
7891 LDFLAGS="$LDFLAGS -L$libdir"
7893 # note: $X_LIBS includes $x_libraries
7894 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7896 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
7897 echo "configure:7909: checking for gleCreateGC in -lgle" >&5
7898 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
7899 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7900 echo $ac_n "(cached) $ac_c" 1>&6
7902 ac_save_LIBS="$LIBS"
7903 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7904 cat > conftest.$ac_ext <<EOF
7905 #line 7917 "configure"
7906 #include "confdefs.h"
7907 /* Override any gcc2 internal prototype to avoid an error. */
7908 /* We use char because int might match the return type of a gcc2
7909 builtin and then its argument prototype would still apply. */
7916 if { (eval echo configure:7928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7918 eval "ac_cv_lib_$ac_lib_var=yes"
7920 echo "configure: failed program was:" >&5
7921 cat conftest.$ac_ext >&5
7923 eval "ac_cv_lib_$ac_lib_var=no"
7926 LIBS="$ac_save_LIBS"
7929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7930 echo "$ac_t""yes" 1>&6
7931 have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
7933 echo "$ac_t""no" 1>&6
7936 CPPFLAGS="$ac_save_CPPFLAGS"
7937 LDFLAGS="$ac_save_LDFLAGS"
7938 # LIBS="$ac_save_LIBS"
7941 if test "$have_gle" = yes ; then
7945 # sometimes the libmatrix stuff is included in libgle. look there first.
7947 # I don't get it. For some reason, this test passes on SGI, as if
7948 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
7949 # Yet the link is succeeding. Why???
7951 # AC_CHECK_X_LIB(gle, uview_direction_d,
7952 # [have_gle=yes; gle_halfassed=no],
7953 # [], $GL_LIBS -lX11 -lXext -lm)
7955 # As of GLE 3 this is in libgle, and has changed name to uview_direction!
7957 if test "$have_gle3" = yes ; then
7959 ac_save_CPPFLAGS="$CPPFLAGS"
7960 ac_save_LDFLAGS="$LDFLAGS"
7961 # ac_save_LIBS="$LIBS"
7963 if test \! -z "$includedir" ; then
7964 CPPFLAGS="$CPPFLAGS -I$includedir"
7966 # note: $X_CFLAGS includes $x_includes
7967 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7969 if test \! -z "$libdir" ; then
7970 LDFLAGS="$LDFLAGS -L$libdir"
7972 # note: $X_LIBS includes $x_libraries
7973 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7975 echo $ac_n "checking for uview_direction in -lgle""... $ac_c" 1>&6
7976 echo "configure:7988: checking for uview_direction in -lgle" >&5
7977 ac_lib_var=`echo gle'_'uview_direction | sed 'y%./+-%__p_%'`
7978 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7979 echo $ac_n "(cached) $ac_c" 1>&6
7981 ac_save_LIBS="$LIBS"
7982 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7983 cat > conftest.$ac_ext <<EOF
7984 #line 7996 "configure"
7985 #include "confdefs.h"
7986 /* Override any gcc2 internal prototype to avoid an error. */
7987 /* We use char because int might match the return type of a gcc2
7988 builtin and then its argument prototype would still apply. */
7989 char uview_direction();
7995 if { (eval echo configure:8007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7997 eval "ac_cv_lib_$ac_lib_var=yes"
7999 echo "configure: failed program was:" >&5
8000 cat conftest.$ac_ext >&5
8002 eval "ac_cv_lib_$ac_lib_var=no"
8005 LIBS="$ac_save_LIBS"
8008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8009 echo "$ac_t""yes" 1>&6
8010 have_gle=yes; gle_halfassed=no
8012 echo "$ac_t""no" 1>&6
8015 CPPFLAGS="$ac_save_CPPFLAGS"
8016 LDFLAGS="$ac_save_LDFLAGS"
8017 # LIBS="$ac_save_LIBS"
8020 # if it wasn't in libgle, then look in libmatrix.
8021 if test "$have_gle" = no ; then
8023 ac_save_CPPFLAGS="$CPPFLAGS"
8024 ac_save_LDFLAGS="$LDFLAGS"
8025 # ac_save_LIBS="$LIBS"
8027 if test \! -z "$includedir" ; then
8028 CPPFLAGS="$CPPFLAGS -I$includedir"
8030 # note: $X_CFLAGS includes $x_includes
8031 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8033 if test \! -z "$libdir" ; then
8034 LDFLAGS="$LDFLAGS -L$libdir"
8036 # note: $X_LIBS includes $x_libraries
8037 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8039 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
8040 echo "configure:8052: checking for uview_direction_d in -lmatrix" >&5
8041 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
8042 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8043 echo $ac_n "(cached) $ac_c" 1>&6
8045 ac_save_LIBS="$LIBS"
8046 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
8047 cat > conftest.$ac_ext <<EOF
8048 #line 8060 "configure"
8049 #include "confdefs.h"
8050 /* Override any gcc2 internal prototype to avoid an error. */
8051 /* We use char because int might match the return type of a gcc2
8052 builtin and then its argument prototype would still apply. */
8053 char uview_direction_d();
8059 if { (eval echo configure:8071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8061 eval "ac_cv_lib_$ac_lib_var=yes"
8063 echo "configure: failed program was:" >&5
8064 cat conftest.$ac_ext >&5
8066 eval "ac_cv_lib_$ac_lib_var=no"
8069 LIBS="$ac_save_LIBS"
8072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8073 echo "$ac_t""yes" 1>&6
8074 have_gle=yes; gle_halfassed=no;
8075 GLE_LIBS="$GLE_LIBS -lmatrix"
8077 echo "$ac_t""no" 1>&6
8080 CPPFLAGS="$ac_save_CPPFLAGS"
8081 LDFLAGS="$ac_save_LDFLAGS"
8082 # LIBS="$ac_save_LIBS"
8087 if test "$have_gle" = yes ; then
8088 cat >> confdefs.h <<\EOF
8092 if test "$have_gle3" = yes ; then
8093 cat >> confdefs.h <<\EOF
8100 elif test "$with_gle" != no; then
8101 echo "error: must be yes or no: --with-gle=$with_gle"
8108 ###############################################################################
8112 ###############################################################################
8115 with_xpm_req=unspecified
8116 # Check whether --with-xpm or --without-xpm was given.
8117 if test "${with_xpm+set}" = set; then
8119 with_xpm="$withval"; with_xpm_req="$withval"
8131 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
8132 echo "configure:8144: checking for XPM headers" >&5
8135 X_CFLAGS="-I$d $X_CFLAGS"
8136 echo "$ac_t""$d" 1>&6
8138 echo "$ac_t""not found ($d: no such directory)" 1>&6
8141 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
8142 echo "configure:8154: checking for XPM libs" >&5
8145 X_LIBS="-L$d $X_LIBS"
8146 echo "$ac_t""$d" 1>&6
8148 echo "$ac_t""not found ($d: no such directory)" 1>&6
8151 # replace the directory string with "yes".
8153 with_xpm=$with_xpm_req
8158 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
8159 echo " If it is a directory, then \`DIR/include' will be added to"
8160 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8166 if test "$with_xpm" = yes; then
8168 ac_save_CPPFLAGS="$CPPFLAGS"
8169 if test \! -z "$includedir" ; then
8170 CPPFLAGS="$CPPFLAGS -I$includedir"
8172 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8173 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
8174 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
8175 echo "configure:8187: checking for X11/xpm.h" >&5
8176 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8177 echo $ac_n "(cached) $ac_c" 1>&6
8179 cat > conftest.$ac_ext <<EOF
8180 #line 8192 "configure"
8181 #include "confdefs.h"
8182 #include <X11/xpm.h>
8184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8185 { (eval echo configure:8197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8187 if test -z "$ac_err"; then
8189 eval "ac_cv_header_$ac_safe=yes"
8192 echo "configure: failed program was:" >&5
8193 cat conftest.$ac_ext >&5
8195 eval "ac_cv_header_$ac_safe=no"
8199 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8200 echo "$ac_t""yes" 1>&6
8202 cat >> confdefs.h <<\EOF
8208 echo "$ac_t""no" 1>&6
8211 CPPFLAGS="$ac_save_CPPFLAGS"
8212 elif test "$with_xpm" != no; then
8213 echo "error: must be yes or no: --with-xpm=$with_xpm"
8217 # See comment near $motif_requires_xpm, above.
8218 # Need to do this here, after both Motif and XPM have been checked for.
8220 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
8221 if test "$motif_requires_xpm" = yes ; then
8222 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
8227 ###############################################################################
8229 # Check for the XSHM server extension.
8231 ###############################################################################
8234 with_xshm_req=unspecified
8235 # Check whether --with-xshm-ext or --without-xshm-ext was given.
8236 if test "${with_xshm_ext+set}" = set; then
8237 withval="$with_xshm_ext"
8238 with_xshm="$withval"; with_xshm_req="$withval"
8245 case "$with_xshm" in
8250 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
8251 echo "configure:8263: checking for XSHM headers" >&5
8252 d=$with_xshm/include
8254 X_CFLAGS="-I$d $X_CFLAGS"
8255 echo "$ac_t""$d" 1>&6
8257 echo "$ac_t""not found ($d: no such directory)" 1>&6
8260 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
8261 echo "configure:8273: checking for XSHM libs" >&5
8264 X_LIBS="-L$d $X_LIBS"
8265 echo "$ac_t""$d" 1>&6
8267 echo "$ac_t""not found ($d: no such directory)" 1>&6
8270 # replace the directory string with "yes".
8272 with_xshm=$with_xshm_req
8277 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
8278 echo " If it is a directory, then \`DIR/include' will be added to"
8279 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8285 if test "$with_xshm" = yes; then
8287 # first check for Xshm.h.
8289 ac_save_CPPFLAGS="$CPPFLAGS"
8290 if test \! -z "$includedir" ; then
8291 CPPFLAGS="$CPPFLAGS -I$includedir"
8293 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8294 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
8295 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
8296 echo "configure:8308: checking for X11/extensions/XShm.h" >&5
8297 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8298 echo $ac_n "(cached) $ac_c" 1>&6
8300 cat > conftest.$ac_ext <<EOF
8301 #line 8313 "configure"
8302 #include "confdefs.h"
8303 #include <X11/extensions/XShm.h>
8305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8306 { (eval echo configure:8318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8308 if test -z "$ac_err"; then
8310 eval "ac_cv_header_$ac_safe=yes"
8313 echo "configure: failed program was:" >&5
8314 cat conftest.$ac_ext >&5
8316 eval "ac_cv_header_$ac_safe=no"
8320 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8321 echo "$ac_t""yes" 1>&6
8324 echo "$ac_t""no" 1>&6
8327 CPPFLAGS="$ac_save_CPPFLAGS"
8329 # if that succeeded, then check for sys/ipc.h.
8330 if test "$have_xshm" = yes; then
8333 ac_save_CPPFLAGS="$CPPFLAGS"
8334 if test \! -z "$includedir" ; then
8335 CPPFLAGS="$CPPFLAGS -I$includedir"
8337 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8338 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
8339 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
8340 echo "configure:8352: checking for sys/ipc.h" >&5
8341 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8342 echo $ac_n "(cached) $ac_c" 1>&6
8344 cat > conftest.$ac_ext <<EOF
8345 #line 8357 "configure"
8346 #include "confdefs.h"
8347 #include <sys/ipc.h>
8349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8350 { (eval echo configure:8362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8352 if test -z "$ac_err"; then
8354 eval "ac_cv_header_$ac_safe=yes"
8357 echo "configure: failed program was:" >&5
8358 cat conftest.$ac_ext >&5
8360 eval "ac_cv_header_$ac_safe=no"
8364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8365 echo "$ac_t""yes" 1>&6
8368 echo "$ac_t""no" 1>&6
8371 CPPFLAGS="$ac_save_CPPFLAGS"
8374 # if that succeeded, then check for sys/shm.h.
8375 if test "$have_xshm" = yes; then
8378 ac_save_CPPFLAGS="$CPPFLAGS"
8379 if test \! -z "$includedir" ; then
8380 CPPFLAGS="$CPPFLAGS -I$includedir"
8382 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8383 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
8384 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
8385 echo "configure:8397: checking for sys/shm.h" >&5
8386 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8387 echo $ac_n "(cached) $ac_c" 1>&6
8389 cat > conftest.$ac_ext <<EOF
8390 #line 8402 "configure"
8391 #include "confdefs.h"
8392 #include <sys/shm.h>
8394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8395 { (eval echo configure:8407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8397 if test -z "$ac_err"; then
8399 eval "ac_cv_header_$ac_safe=yes"
8402 echo "configure: failed program was:" >&5
8403 cat conftest.$ac_ext >&5
8405 eval "ac_cv_header_$ac_safe=no"
8409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8410 echo "$ac_t""yes" 1>&6
8413 echo "$ac_t""no" 1>&6
8416 CPPFLAGS="$ac_save_CPPFLAGS"
8419 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
8420 # to exist, but the library code to not exist. And even better, the library
8421 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
8422 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
8423 # that's not quite right, but close enough.)
8427 if `uname -v` -eq 3 ; then
8430 ac_save_CPPFLAGS="$CPPFLAGS"
8431 ac_save_LDFLAGS="$LDFLAGS"
8432 # ac_save_LIBS="$LIBS"
8434 if test \! -z "$includedir" ; then
8435 CPPFLAGS="$CPPFLAGS -I$includedir"
8437 # note: $X_CFLAGS includes $x_includes
8438 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8440 if test \! -z "$libdir" ; then
8441 LDFLAGS="$LDFLAGS -L$libdir"
8443 # note: $X_LIBS includes $x_libraries
8444 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8446 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
8447 echo "configure:8459: checking for XShmQueryExtension in -lXextSam" >&5
8448 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
8449 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8450 echo $ac_n "(cached) $ac_c" 1>&6
8452 ac_save_LIBS="$LIBS"
8453 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
8454 cat > conftest.$ac_ext <<EOF
8455 #line 8467 "configure"
8456 #include "confdefs.h"
8457 /* Override any gcc2 internal prototype to avoid an error. */
8458 /* We use char because int might match the return type of a gcc2
8459 builtin and then its argument prototype would still apply. */
8460 char XShmQueryExtension();
8463 XShmQueryExtension()
8466 if { (eval echo configure:8478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8468 eval "ac_cv_lib_$ac_lib_var=yes"
8470 echo "configure: failed program was:" >&5
8471 cat conftest.$ac_ext >&5
8473 eval "ac_cv_lib_$ac_lib_var=no"
8476 LIBS="$ac_save_LIBS"
8479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8480 echo "$ac_t""yes" 1>&6
8481 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
8483 echo "$ac_t""no" 1>&6
8487 CPPFLAGS="$ac_save_CPPFLAGS"
8488 LDFLAGS="$ac_save_LDFLAGS"
8489 # LIBS="$ac_save_LIBS"
8495 # if that succeeded, then we've really got it.
8496 if test "$have_xshm" = yes; then
8497 cat >> confdefs.h <<\EOF
8498 #define HAVE_XSHM_EXTENSION 1
8503 elif test "$with_xshm" != no; then
8504 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
8509 ###############################################################################
8511 # Check for the DOUBLE-BUFFER server extension.
8513 ###############################################################################
8516 with_xdbe_req=unspecified
8517 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
8518 if test "${with_xdbe_ext+set}" = set; then
8519 withval="$with_xdbe_ext"
8520 with_xdbe="$withval"; with_xdbe_req="$withval"
8527 case "$with_xdbe" in
8532 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
8533 echo "configure:8545: checking for DOUBLE-BUFFER headers" >&5
8534 d=$with_xdbe/include
8536 X_CFLAGS="-I$d $X_CFLAGS"
8537 echo "$ac_t""$d" 1>&6
8539 echo "$ac_t""not found ($d: no such directory)" 1>&6
8542 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
8543 echo "configure:8555: checking for DOUBLE-BUFFER libs" >&5
8546 X_LIBS="-L$d $X_LIBS"
8547 echo "$ac_t""$d" 1>&6
8549 echo "$ac_t""not found ($d: no such directory)" 1>&6
8552 # replace the directory string with "yes".
8554 with_xdbe=$with_xdbe_req
8559 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
8560 echo " If it is a directory, then \`DIR/include' will be added to"
8561 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8567 if test "$with_xdbe" = yes; then
8570 ac_save_CPPFLAGS="$CPPFLAGS"
8571 if test \! -z "$includedir" ; then
8572 CPPFLAGS="$CPPFLAGS -I$includedir"
8574 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8575 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8576 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8577 echo "configure:8589: checking for X11/extensions/Xdbe.h" >&5
8578 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8579 echo $ac_n "(cached) $ac_c" 1>&6
8581 cat > conftest.$ac_ext <<EOF
8582 #line 8594 "configure"
8583 #include "confdefs.h"
8584 #include <X11/extensions/Xdbe.h>
8586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8587 { (eval echo configure:8599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8589 if test -z "$ac_err"; then
8591 eval "ac_cv_header_$ac_safe=yes"
8594 echo "configure: failed program was:" >&5
8595 cat conftest.$ac_ext >&5
8597 eval "ac_cv_header_$ac_safe=no"
8601 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8602 echo "$ac_t""yes" 1>&6
8605 echo "$ac_t""no" 1>&6
8608 CPPFLAGS="$ac_save_CPPFLAGS"
8609 if test "$have_xdbe" = yes; then
8610 cat >> confdefs.h <<\EOF
8611 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8616 elif test "$with_xdbe" != no; then
8617 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8622 ###############################################################################
8624 # Check for the SGI XReadDisplay server extension.
8626 # Note: this has to be down here, rather than up with the other server
8627 # extension tests, so that the output of `configure --help' is in the
8628 # right order. Arrgh!
8630 ###############################################################################
8633 with_readdisplay_req=unspecified
8634 # Check whether --with-readdisplay or --without-readdisplay was given.
8635 if test "${with_readdisplay+set}" = set; then
8636 withval="$with_readdisplay"
8637 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8639 with_readdisplay=yes
8644 case "$with_readdisplay" in
8649 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8650 echo "configure:8662: checking for XReadDisplay headers" >&5
8651 d=$with_readdisplay/include
8653 X_CFLAGS="-I$d $X_CFLAGS"
8654 echo "$ac_t""$d" 1>&6
8656 echo "$ac_t""not found ($d: no such directory)" 1>&6
8659 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8660 echo "configure:8672: checking for XReadDisplay libs" >&5
8661 d=$with_readdisplay/lib
8663 X_LIBS="-L$d $X_LIBS"
8664 echo "$ac_t""$d" 1>&6
8666 echo "$ac_t""not found ($d: no such directory)" 1>&6
8669 # replace the directory string with "yes".
8670 with_readdisplay_req="yes"
8671 with_readdisplay=$with_readdisplay_req
8676 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8677 echo " If it is a directory, then \`DIR/include' will be added to"
8678 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8684 if test "$with_readdisplay" = yes; then
8686 ac_save_CPPFLAGS="$CPPFLAGS"
8687 if test \! -z "$includedir" ; then
8688 CPPFLAGS="$CPPFLAGS -I$includedir"
8690 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8691 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8692 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8693 echo "configure:8705: checking for X11/extensions/readdisplay.h" >&5
8694 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8695 echo $ac_n "(cached) $ac_c" 1>&6
8697 cat > conftest.$ac_ext <<EOF
8698 #line 8710 "configure"
8699 #include "confdefs.h"
8700 #include <X11/extensions/readdisplay.h>
8702 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8703 { (eval echo configure:8715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8704 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8705 if test -z "$ac_err"; then
8707 eval "ac_cv_header_$ac_safe=yes"
8710 echo "configure: failed program was:" >&5
8711 cat conftest.$ac_ext >&5
8713 eval "ac_cv_header_$ac_safe=no"
8717 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8718 echo "$ac_t""yes" 1>&6
8719 cat >> confdefs.h <<\EOF
8720 #define HAVE_READ_DISPLAY_EXTENSION 1
8724 echo "$ac_t""no" 1>&6
8727 CPPFLAGS="$ac_save_CPPFLAGS"
8728 elif test "$with_readdisplay" != no; then
8729 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8734 ###############################################################################
8736 # Check for the SGI Iris Video Library.
8738 ###############################################################################
8741 with_sgivideo_req=unspecified
8742 # Check whether --with-sgivideo or --without-sgivideo was given.
8743 if test "${with_sgivideo+set}" = set; then
8744 withval="$with_sgivideo"
8745 with_sgivideo="$withval"; with_sgivideo_req="$withval"
8752 case "$with_sgivideo" in
8757 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
8758 echo "configure:8770: checking for Iris Video headers" >&5
8759 d=$with_sgivideo/include
8761 X_CFLAGS="-I$d $X_CFLAGS"
8762 echo "$ac_t""$d" 1>&6
8764 echo "$ac_t""not found ($d: no such directory)" 1>&6
8767 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
8768 echo "configure:8780: checking for Iris Video libs" >&5
8769 d=$with_sgivideo/lib
8771 X_LIBS="-L$d $X_LIBS"
8772 echo "$ac_t""$d" 1>&6
8774 echo "$ac_t""not found ($d: no such directory)" 1>&6
8777 # replace the directory string with "yes".
8778 with_sgivideo_req="yes"
8779 with_sgivideo=$with_sgivideo_req
8784 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8785 echo " If it is a directory, then \`DIR/include' will be added to"
8786 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8792 if test "$with_sgivideo" = yes; then
8794 ac_save_CPPFLAGS="$CPPFLAGS"
8795 if test \! -z "$includedir" ; then
8796 CPPFLAGS="$CPPFLAGS -I$includedir"
8798 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8799 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8800 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8801 echo "configure:8813: checking for dmedia/vl.h" >&5
8802 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8803 echo $ac_n "(cached) $ac_c" 1>&6
8805 cat > conftest.$ac_ext <<EOF
8806 #line 8818 "configure"
8807 #include "confdefs.h"
8808 #include <dmedia/vl.h>
8810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8811 { (eval echo configure:8823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8813 if test -z "$ac_err"; then
8815 eval "ac_cv_header_$ac_safe=yes"
8818 echo "configure: failed program was:" >&5
8819 cat conftest.$ac_ext >&5
8821 eval "ac_cv_header_$ac_safe=no"
8825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8826 echo "$ac_t""yes" 1>&6
8829 echo "$ac_t""no" 1>&6
8832 CPPFLAGS="$ac_save_CPPFLAGS"
8833 if test "$have_sgivideo" = yes; then
8835 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8836 echo "configure:8848: checking for vlOpenVideo in -lvl" >&5
8837 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8838 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8839 echo $ac_n "(cached) $ac_c" 1>&6
8841 ac_save_LIBS="$LIBS"
8843 cat > conftest.$ac_ext <<EOF
8844 #line 8856 "configure"
8845 #include "confdefs.h"
8846 /* Override any gcc2 internal prototype to avoid an error. */
8847 /* We use char because int might match the return type of a gcc2
8848 builtin and then its argument prototype would still apply. */
8855 if { (eval echo configure:8867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8857 eval "ac_cv_lib_$ac_lib_var=yes"
8859 echo "configure: failed program was:" >&5
8860 cat conftest.$ac_ext >&5
8862 eval "ac_cv_lib_$ac_lib_var=no"
8865 LIBS="$ac_save_LIBS"
8868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8869 echo "$ac_t""yes" 1>&6
8872 echo "$ac_t""no" 1>&6
8875 if test "$have_sgivideo" = yes; then
8876 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8877 SGI_VIDEO_LIBS="-lvl"
8878 cat >> confdefs.h <<\EOF
8879 #define HAVE_SGI_VIDEO 1
8884 elif test "$with_sgivideo" != no; then
8885 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8890 ###############################################################################
8892 # Check for a program to generate random text.
8894 # Zippy is funnier than the idiocy generally spat out by `fortune',
8895 # so try to find that, by invoking Emacs and asking it where its
8896 # libexec directory is ("yow" lives in there.)
8898 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8899 # and if so, use them.
8901 # If that doesn't work, look in /usr/games, and if it's there, use
8902 # the full pathname.
8904 ###############################################################################
8907 # Check whether --with-zippy or --without-zippy was given.
8908 if test "${with_zippy+set}" = set; then
8909 withval="$with_zippy"
8910 with_zippy_req="$withval"; with_zippy="$withval"
8916 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8921 if test -n "$with_zippy_req" ; then
8922 ac_cv_zippy_program=""
8923 case "$with_zippy_req" in
8925 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8926 echo "configure:8938: checking for $with_zippy_req" >&5
8927 if test -x "$with_zippy_req" ; then
8928 echo "$ac_t""yes" 1>&6
8930 echo "$ac_t""no" 1>&6
8936 unset ac_cv_path_zip2
8937 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8938 set dummy $with_zippy_req; ac_word=$2
8939 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8940 echo "configure:8952: checking for $ac_word" >&5
8941 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8942 echo $ac_n "(cached) $ac_c" 1>&6
8946 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8949 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8952 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8954 for ac_dir in $ac_dummy; do
8955 test -z "$ac_dir" && ac_dir=.
8956 if test -f $ac_dir/$ac_word; then
8957 ac_cv_path_zip2="$ac_dir/$ac_word"
8965 zip2="$ac_cv_path_zip2"
8966 if test -n "$zip2"; then
8967 echo "$ac_t""$zip2" 1>&6
8969 echo "$ac_t""no" 1>&6
8972 if test "$zip2" = ""; then
8977 ac_cv_zippy_program="$with_zippy"
8979 elif test -n "$ac_cv_zippy_program"; then
8980 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8983 if test ! -n "$ac_cv_zippy_program"; then
8985 for ac_prog in emacs
8987 # Extract the first word of "$ac_prog", so it can be a program name with args.
8988 set dummy $ac_prog; ac_word=$2
8989 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8990 echo "configure:9002: checking for $ac_word" >&5
8991 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8992 echo $ac_n "(cached) $ac_c" 1>&6
8994 if test -n "$emacs_exe"; then
8995 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8997 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8999 for ac_dir in $ac_dummy; do
9000 test -z "$ac_dir" && ac_dir=.
9001 if test -f $ac_dir/$ac_word; then
9002 ac_cv_prog_emacs_exe="$ac_prog"
9009 emacs_exe="$ac_cv_prog_emacs_exe"
9010 if test -n "$emacs_exe"; then
9011 echo "$ac_t""$emacs_exe" 1>&6
9013 echo "$ac_t""no" 1>&6
9016 test -n "$emacs_exe" && break
9019 for ac_prog in xemacs
9021 # Extract the first word of "$ac_prog", so it can be a program name with args.
9022 set dummy $ac_prog; ac_word=$2
9023 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9024 echo "configure:9036: checking for $ac_word" >&5
9025 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
9026 echo $ac_n "(cached) $ac_c" 1>&6
9028 if test -n "$xemacs_exe"; then
9029 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
9031 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9033 for ac_dir in $ac_dummy; do
9034 test -z "$ac_dir" && ac_dir=.
9035 if test -f $ac_dir/$ac_word; then
9036 ac_cv_prog_xemacs_exe="$ac_prog"
9043 xemacs_exe="$ac_cv_prog_xemacs_exe"
9044 if test -n "$xemacs_exe"; then
9045 echo "$ac_t""$xemacs_exe" 1>&6
9047 echo "$ac_t""no" 1>&6
9050 test -n "$xemacs_exe" && break
9054 ac_cv_zippy_program=""
9055 eargs='-batch -q -nw --eval'
9057 if test -n "$emacs_exe" ; then
9058 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
9059 echo "configure:9071: checking for emacs yow" >&5
9061 # get emacs to tell us where the libexec directory is.
9063 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
9064 2>/dev/null | tail -1`
9065 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
9067 # try running libexec/yow and see if it exits without error.
9069 if test x"$dir" != x -a -x "$dir/yow" ; then
9070 if $dir/yow >&- 2>&- ; then
9071 ac_cv_zippy_program="$dir/yow"
9072 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9074 echo "$ac_t""no" 1>&6
9079 if test -z "$ac_cv_zippy_program" ; then
9080 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
9081 echo "configure:9093: checking for xemacs yow" >&5
9082 if test -n "$xemacs_exe" ; then
9084 # get xemacs to tell us where the libexec directory is.
9086 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
9087 2>/dev/null | tail -1`
9088 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
9090 # try running libexec/yow and see if it exits without error.
9092 if test x"$dir" != x -a -x "$dir/yow" ; then
9093 if $dir/yow >&- 2>&- ; then
9094 ac_cv_zippy_program="$dir/yow"
9095 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9098 # in some xemacs installations, the pathname of the yow.lines file
9099 # isn't hardcoded into the yow executable, and must be passed on
9100 # the command line. See if it's in libexec/../etc/.
9104 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
9107 yowlines="$dir_up/etc/yow.lines"
9108 if $dir/yow -f $yowlines >&- 2>&- ; then
9109 ac_cv_zippy_program="$dir/yow -f $yowlines"
9110 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9113 # In newer XEmacs releases, yow.lines is in a different place,
9114 # and the easiest way to get it is by calling the new function
9115 # `locate-data-file'.
9117 yowlines=`$xemacs_exe $eargs \
9118 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
9119 2>/dev/null | tail -1`
9120 if $dir/yow -f $yowlines >&- 2>&- ; then
9121 ac_cv_zippy_program="$dir/yow -f $yowlines"
9122 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9124 echo "$ac_t""no" 1>&6
9132 # if that didn't work, try for some other programs...
9133 if test -z "$ac_cv_zippy_program" ; then
9135 for ac_prog in fortune zippy yow
9137 # Extract the first word of "$ac_prog", so it can be a program name with args.
9138 set dummy $ac_prog; ac_word=$2
9139 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9140 echo "configure:9152: checking for $ac_word" >&5
9141 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
9142 echo $ac_n "(cached) $ac_c" 1>&6
9144 if test -n "$fortune"; then
9145 ac_cv_prog_fortune="$fortune" # Let the user override the test.
9147 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9149 for ac_dir in $ac_dummy; do
9150 test -z "$ac_dir" && ac_dir=.
9151 if test -f $ac_dir/$ac_word; then
9152 ac_cv_prog_fortune="$ac_prog"
9159 fortune="$ac_cv_prog_fortune"
9160 if test -n "$fortune"; then
9161 echo "$ac_t""$fortune" 1>&6
9163 echo "$ac_t""no" 1>&6
9166 test -n "$fortune" && break
9169 # if that didn't work, try for those programs in /usr/games...
9170 if test -z "$fortune" ; then
9171 for ac_prog in fortune zippy yow
9173 # Extract the first word of "$ac_prog", so it can be a program name with args.
9174 set dummy $ac_prog; ac_word=$2
9175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9176 echo "configure:9188: checking for $ac_word" >&5
9177 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
9178 echo $ac_n "(cached) $ac_c" 1>&6
9182 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
9185 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
9188 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9189 ac_dummy="/usr/games:/usr/local/games:$PATH"
9190 for ac_dir in $ac_dummy; do
9191 test -z "$ac_dir" && ac_dir=.
9192 if test -f $ac_dir/$ac_word; then
9193 ac_cv_path_fortune="$ac_dir/$ac_word"
9201 fortune="$ac_cv_path_fortune"
9202 if test -n "$fortune"; then
9203 echo "$ac_t""$fortune" 1>&6
9205 echo "$ac_t""no" 1>&6
9208 test -n "$fortune" && break
9210 test -n "$fortune" || fortune="fortune"
9216 if test -z "$ac_cv_zippy_program" ; then
9217 ac_cv_zippy_program=fortune
9220 cat >> confdefs.h <<EOF
9221 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
9226 ###############################################################################
9228 # Done testing. Now, set up the various -I and -L variables,
9229 # and decide which GUI program to build by default.
9231 ###############################################################################
9238 if test \! -z "$includedir" ; then
9239 INCLUDES="$INCLUDES -I$includedir"
9242 if test \! -z "$libdir" ; then
9243 LDFLAGS="$LDFLAGS -L$libdir"
9247 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9249 if test "$have_motif" = yes; then
9250 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9251 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9253 if test "$have_gtk" = yes; then
9254 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
9255 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9259 if test "$have_kerberos" = yes; then
9260 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
9261 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
9263 if test "$have_pam" = yes; then
9264 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
9265 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
9266 INSTALL_PAM="install-pam"
9268 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
9269 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
9272 if test "$enable_locking" = yes; then
9273 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
9274 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
9276 LOCK_SRCS='$(NOLOCK_SRCS_1)'
9277 LOCK_OBJS='$(NOLOCK_OBJS_1)'
9280 if test "$need_setuid" = yes; then
9282 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
9285 INSTALL_SETUID='$(INSTALL_PROGRAM)'
9289 if test "$have_gl" = yes; then
9290 GL_EXES='$(GL_EXES)'
9294 GL_KLUDGE="-${tab} "
9297 if test "$have_gle" = yes; then
9298 GLE_EXES='$(GLE_EXES)'
9299 GLE_MEN='$(GLE_MEN)'
9300 GLE_KLUDGE="${tab} "
9302 GLE_KLUDGE="-${tab} "
9306 ###############################################################################
9308 # Perform substitutions and write Makefiles.
9310 ###############################################################################
9349 APPDEFAULTS=$ac_x_app_defaults
9358 cat > confcache <<\EOF
9359 # This file is a shell script that caches the results of configure
9360 # tests run on this system so they can be shared between configure
9361 # scripts and configure runs. It is not useful on other systems.
9362 # If it contains results you don't want to keep, you may remove or edit it.
9364 # By default, configure uses ./config.cache as the cache file,
9365 # creating it if it does not exist already. You can give configure
9366 # the --cache-file=FILE option to use a different cache file; that is
9367 # what configure does when it calls configure scripts in
9368 # subdirectories, so they share the cache.
9369 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9370 # config.status only pays attention to the cache file if you give it the
9371 # --recheck option to rerun configure.
9374 # The following way of writing the cache mishandles newlines in values,
9375 # but we know of no workaround that is simple, portable, and efficient.
9376 # So, don't put newlines in cache variables' values.
9377 # Ultrix sh set writes to stderr and can't be redirected directly,
9378 # and sets the high bit in the cache file unless we assign to the vars.
9380 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9382 # `set' does not quote correctly, so add quotes (double-quote substitution
9383 # turns \\\\ into \\, and sed turns \\ into \).
9385 -e "s/'/'\\\\''/g" \
9386 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9389 # `set' quotes correctly as required by POSIX, so do not add quotes.
9390 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9393 if cmp -s $cache_file confcache; then
9396 if test -w $cache_file; then
9397 echo "updating cache $cache_file"
9398 cat confcache > $cache_file
9400 echo "not updating unwritable cache $cache_file"
9405 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9407 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9408 # Let make expand exec_prefix.
9409 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9411 # Any assignment to VPATH causes Sun make to only execute
9412 # the first set of double-colon rules, so remove it if not needed.
9413 # If there is a colon in the path, we need to keep it.
9414 if test "x$srcdir" = x.; then
9415 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9418 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9420 DEFS=-DHAVE_CONFIG_H
9422 # Without the "./", some shells look in PATH for config.status.
9423 : ${CONFIG_STATUS=./config.status}
9425 echo creating $CONFIG_STATUS
9426 rm -f $CONFIG_STATUS
9427 cat > $CONFIG_STATUS <<EOF
9429 # Generated automatically by configure.
9430 # Run this file to recreate the current configuration.
9431 # This directory was configured as follows,
9432 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9434 # $0 $ac_configure_args
9436 # Compiler output produced by configure, useful for debugging
9437 # configure, is in ./config.log if it exists.
9439 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9442 case "\$ac_option" in
9443 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9444 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9445 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9446 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9447 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9449 -help | --help | --hel | --he | --h)
9450 echo "\$ac_cs_usage"; exit 0 ;;
9451 *) echo "\$ac_cs_usage"; exit 1 ;;
9455 ac_given_srcdir=$srcdir
9456 ac_given_INSTALL="$INSTALL"
9458 trap 'rm -fr `echo "Makefile
9463 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9465 cat >> $CONFIG_STATUS <<EOF
9467 # Protect against being on the right side of a sed subst in config.status.
9468 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9469 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9473 s%@CFLAGS@%$CFLAGS%g
9474 s%@CPPFLAGS@%$CPPFLAGS%g
9475 s%@CXXFLAGS@%$CXXFLAGS%g
9476 s%@FFLAGS@%$FFLAGS%g
9478 s%@LDFLAGS@%$LDFLAGS%g
9480 s%@exec_prefix@%$exec_prefix%g
9481 s%@prefix@%$prefix%g
9482 s%@program_transform_name@%$program_transform_name%g
9483 s%@bindir@%$bindir%g
9484 s%@sbindir@%$sbindir%g
9485 s%@libexecdir@%$libexecdir%g
9486 s%@datadir@%$datadir%g
9487 s%@sysconfdir@%$sysconfdir%g
9488 s%@sharedstatedir@%$sharedstatedir%g
9489 s%@localstatedir@%$localstatedir%g
9490 s%@libdir@%$libdir%g
9491 s%@includedir@%$includedir%g
9492 s%@oldincludedir@%$oldincludedir%g
9493 s%@infodir@%$infodir%g
9494 s%@mandir@%$mandir%g
9496 s%@host_alias@%$host_alias%g
9497 s%@host_cpu@%$host_cpu%g
9498 s%@host_vendor@%$host_vendor%g
9499 s%@host_os@%$host_os%g
9502 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9503 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9504 s%@INSTALL_DATA@%$INSTALL_DATA%g
9505 s%@SET_MAKE@%$SET_MAKE%g
9507 s%@X_CFLAGS@%$X_CFLAGS%g
9508 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9509 s%@X_LIBS@%$X_LIBS%g
9510 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9511 s%@glib_config@%$glib_config%g
9512 s%@gtk_config@%$gtk_config%g
9513 s%@gnome_config@%$gnome_config%g
9515 s%@emacs_exe@%$emacs_exe%g
9516 s%@xemacs_exe@%$xemacs_exe%g
9517 s%@fortune@%$fortune%g
9518 s%@INCLUDES@%$INCLUDES%g
9519 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
9520 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
9521 s%@SAVER_LIBS@%$SAVER_LIBS%g
9522 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
9523 s%@GTK_LIBS@%$GTK_LIBS%g
9524 s%@HACK_LIBS@%$HACK_LIBS%g
9525 s%@XPM_LIBS@%$XPM_LIBS%g
9526 s%@GL_LIBS@%$GL_LIBS%g
9527 s%@GLE_LIBS@%$GLE_LIBS%g
9528 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
9529 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
9530 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
9531 s%@NEED_SETUID@%$NEED_SETUID%g
9532 s%@INSTALL_PAM@%$INSTALL_PAM%g
9533 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
9534 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
9535 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
9536 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
9537 s%@XMU_SRCS@%$XMU_SRCS%g
9538 s%@XMU_OBJS@%$XMU_OBJS%g
9539 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
9540 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
9541 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
9542 s%@LOCK_SRCS@%$LOCK_SRCS%g
9543 s%@LOCK_OBJS@%$LOCK_OBJS%g
9544 s%@GL_EXES@%$GL_EXES%g
9545 s%@GL_MEN@%$GL_MEN%g
9546 s%@GL_KLUDGE@%$GL_KLUDGE%g
9547 s%@GLE_EXES@%$GLE_EXES%g
9548 s%@GLE_MEN@%$GLE_MEN%g
9549 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
9550 s%@HACKDIR@%$HACKDIR%g
9551 s%@GNOME_DATADIR@%$GNOME_DATADIR%g
9552 s%@APPDEFAULTS@%$APPDEFAULTS%g
9553 s%@DEPEND@%$DEPEND%g
9554 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
9555 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
9560 cat >> $CONFIG_STATUS <<\EOF
9562 # Split the substitutions into bite-sized pieces for seds with
9563 # small command number limits, like on Digital OSF/1 and HP-UX.
9564 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9565 ac_file=1 # Number of current file.
9566 ac_beg=1 # First line for current file.
9567 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9570 while $ac_more_lines; do
9571 if test $ac_beg -gt 1; then
9572 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9574 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9576 if test ! -s conftest.s$ac_file; then
9578 rm -f conftest.s$ac_file
9580 if test -z "$ac_sed_cmds"; then
9581 ac_sed_cmds="sed -f conftest.s$ac_file"
9583 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9585 ac_file=`expr $ac_file + 1`
9587 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9590 if test -z "$ac_sed_cmds"; then
9595 cat >> $CONFIG_STATUS <<EOF
9597 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9602 driver/XScreenSaver.ad"}
9604 cat >> $CONFIG_STATUS <<\EOF
9605 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9606 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9608 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9609 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9610 *) ac_file_in="${ac_file}.in" ;;
9613 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9615 # Remove last slash and all that follows it. Not all systems have dirname.
9616 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9617 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9618 # The file is in a subdirectory.
9619 test ! -d "$ac_dir" && mkdir "$ac_dir"
9620 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9621 # A "../" for each directory in $ac_dir_suffix.
9622 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9624 ac_dir_suffix= ac_dots=
9627 case "$ac_given_srcdir" in
9629 if test -z "$ac_dots"; then top_srcdir=.
9630 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9631 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9633 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9634 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9637 case "$ac_given_INSTALL" in
9638 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9639 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9642 echo creating "$ac_file"
9644 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9646 *Makefile*) ac_comsub="1i\\
9647 # $configure_input" ;;
9651 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9653 s%@configure_input@%$configure_input%g
9654 s%@srcdir@%$srcdir%g
9655 s%@top_srcdir@%$top_srcdir%g
9656 s%@INSTALL@%$INSTALL%g
9657 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9661 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9662 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9664 # ac_d sets the value in "#define NAME VALUE" lines.
9665 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9666 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9669 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9670 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9671 ac_uB='\([ ]\)%\1#\2define\3'
9674 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9675 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9676 ac_eB='$%\1#\2define\3'
9680 if test "${CONFIG_HEADERS+set}" != set; then
9682 cat >> $CONFIG_STATUS <<EOF
9683 CONFIG_HEADERS="config.h"
9685 cat >> $CONFIG_STATUS <<\EOF
9687 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9688 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9690 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9691 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9692 *) ac_file_in="${ac_file}.in" ;;
9695 echo creating $ac_file
9697 rm -f conftest.frag conftest.in conftest.out
9698 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9699 cat $ac_file_inputs > conftest.in
9703 # Transform confdefs.h into a sed script conftest.vals that substitutes
9704 # the proper values into config.h.in to produce config.h. And first:
9705 # Protect against being on the right side of a sed subst in config.status.
9706 # Protect against being in an unquoted here document in config.status.
9708 cat > conftest.hdr <<\EOF
9711 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9715 sed -n -f conftest.hdr confdefs.h > conftest.vals
9718 # This sed command replaces #undef with comments. This is necessary, for
9719 # example, in the case of _POSIX_SOURCE, which is predefined and required
9720 # on some systems where configure will not decide to define it.
9721 cat >> conftest.vals <<\EOF
9722 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9725 # Break up conftest.vals because some shells have a limit on
9726 # the size of here documents, and old seds have small limits too.
9731 ac_lines=`grep -c . conftest.vals`
9732 # grep -c gives empty output for an empty file on some AIX systems.
9733 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9734 # Write a limited-size here document to conftest.frag.
9735 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9736 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9738 sed -f conftest.frag conftest.in > conftest.out
9740 mv conftest.out conftest.in
9742 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9744 mv conftest.tail conftest.vals
9748 cat >> $CONFIG_STATUS <<\EOF
9749 rm -f conftest.frag conftest.h
9750 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9751 cat conftest.in >> conftest.h
9753 if cmp -s $ac_file conftest.h 2>/dev/null; then
9754 echo "$ac_file is unchanged"
9757 # Remove last slash and all that follows it. Not all systems have dirname.
9758 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9759 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9760 # The file is in a subdirectory.
9761 test ! -d "$ac_dir" && mkdir "$ac_dir"
9764 mv conftest.h $ac_file
9769 cat >> $CONFIG_STATUS <<EOF
9772 cat >> $CONFIG_STATUS <<\EOF
9776 chmod +x $CONFIG_STATUS
9777 rm -fr confdefs* $ac_clean_files
9778 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9781 ###############################################################################
9783 # Print some warnings at the end.
9785 ###############################################################################
9787 warn_prefix_1=" Warning:"
9788 warn_prefix_2=" Note:"
9789 warn_prefix="$warn_prefix_1"
9792 warnsep=' #################################################################'
9795 if test "$warning" = no ; then
9796 echo '' ; echo "$warnsep" ; echo ''
9803 if test "$warning" = long ; then echo '' ; fi
9806 echo "$warn_prefix $rest"
9813 if test "$was" != no ; then echo '' ; fi
9815 echo "$warn_prefix $rest"
9825 warn_prefix="$warn_prefix_2"
9827 warn_prefix="$warn_prefix_1"
9831 warn_prefix="$warn_prefix_2"
9833 warn_prefix="$warn_prefix_1"
9837 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9838 warn 'The SGI saver extension was requested, but was not found.'
9841 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9842 warn 'The MIT saver extension was requested, but was not found.'
9845 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9846 warn 'The XIdle extension was requested, but was not found.'
9849 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9850 warn 'The XSHM extension was requested, but was not found.'
9853 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9854 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9857 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9858 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9861 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9862 warn 'The DPMS extension was requested, but was not found.'
9865 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9866 warn 'The XF86VMODE extension was requested, but was not found.'
9869 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9870 warn "Checking of /proc/interrupts was requested, but it's bogus."
9874 if test "$have_motif" = no -a "$have_gtk" = no; then
9875 warnL "Neither Motif nor Gtk seem to be available;"
9876 warn2 "the \`xscreensaver-demo' program requires one of these."
9878 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9879 warnL "Use of Motif was requested, but it wasn't found;"
9880 warn2 "Gtk will be used instead."
9882 elif test "$jurassic_gtk" = yes ; then
9886 v="$ac_gtk_version_string"
9887 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9888 warnL "Use of Gtk was requested, but its version number is unknown;"
9889 elif test "$with_gtk_req" = yes ; then
9890 warnL "Use of Gtk was requested, but it is version $v;"
9892 warnL "Gtk was found on this system, but it is version $v;"
9895 warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
9897 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9898 warnL "Use of Gtk was requested, but it wasn't found;"
9899 warn2 "Motif will be used instead."
9904 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
9905 warn 'Use of the Gnome Control Panel was requested, but the necessary'
9906 warn2 'headers and/or libraries were not found.'
9910 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9912 preferred_lesstif=0.86
9914 if test "$lesstif_version" = unknown; then
9915 warnL "Unable to determine the LessTif version number!"
9916 warn2 "Make sure you are using version $preferred_lesstif or newer."
9917 warn2 "See <http://www.lesstif.org/>."
9919 elif test \! $lesstif_version -gt 82; then
9920 warnL "LessTif version $lesstif_version_string is being used."
9921 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9922 warn2 "use with XScreenSaver; it is strongly recommended"
9923 warn2 "that you upgrade to at least version $preferred_lesstif!"
9924 warn2 "See <http://www.lesstif.org/>."
9930 if test "$have_xpm" = no ; then
9931 if test "$with_xpm_req" = yes ; then
9932 warnL 'Use of XPM was requested, but it was not found.'
9933 elif test "$with_xpm_req" = no ; then
9934 noteL 'The XPM library is not being used.'
9936 noteL 'The XPM library was not found.'
9940 warn2 'Some of the demos will not be as colorful as they'
9941 warn2 'could be. You might want to consider installing XPM'
9942 warn2 'and re-running configure. (Remember to delete the'
9943 warn2 'config.cache file first.) You can find XPM at most'
9944 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9948 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9949 preferred_mesagl=3.0
9951 if test "$ac_mesagl_version" = unknown; then
9952 warnL "Unable to determine the MesaGL version number!"
9953 warn2 "Make sure you are using version $preferred_mesagl or newer."
9955 elif test \! "$ac_mesagl_version" -gt 2006; then
9956 warnL "MesaGL version $ac_mesagl_version_string is being used."
9957 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9958 warn2 "It is strongly recommended that you upgrade to at"
9959 warn2 "least version $preferred_mesagl."
9963 if test "$have_gl" = no ; then
9964 if test "$with_gl_req" = yes ; then
9965 warnL 'Use of GL was requested, but it was not found.'
9966 elif test "$with_gl_req" = no ; then
9967 noteL 'The OpenGL 3D library is not being used.'
9969 noteL 'The OpenGL 3D library was not found.'
9972 if test "$gl_halfassed" = yes ; then
9974 warn2 'More specifically, we found the headers, but not the'
9975 warn2 'libraries; so either GL is half-installed on this'
9976 warn2 "system, or something else went wrong. The \`config.log'"
9977 warn2 'file might contain some clues.'
9981 warn2 'Those demos which use 3D will not be built or installed.'
9982 warn2 'You might want to consider installing OpenGL and'
9983 warn2 're-running configure. (Remember to delete the'
9984 warn2 "config.cache file first.) If your vendor doesn't ship"
9985 warn2 'their own implementation of OpenGL, you can get a free'
9986 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
9987 warn2 'info, see <http://www.opengl.org/>.'
9992 if test "$have_gl" = yes -a "$have_gle" = no ; then
9993 if test "$with_gle_req" = yes ; then
9994 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
9995 warn2 'it was not found (though the OpenGL library was found, and'
9996 warn2 'is being used.)'
9997 elif test "$with_gle_req" = no ; then
9998 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
9999 warn2 'library is not.'
10001 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
10005 if test "$gle_halfassed" = yes ; then
10007 warn2 'More specifically, we found the headers, but not the'
10008 warn2 'libraries; so either GLE is half-installed on this'
10009 warn2 "system, or something else went wrong. The \`config.log'"
10010 warn2 'file might contain some clues.'
10014 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
10015 warn2 'will not be built or installed. You might want to consider'
10016 warn2 'installing GLE and re-running configure. (Remember to delete'
10017 warn2 'the config.cache file first.) You can find the GLE library'
10018 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
10019 warn2 'see <http://www.opengl.org/>.'
10024 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
10025 warn 'Use of XReadDisplay was requested, but it was not found.'
10028 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
10029 warn 'Use of the Iris Video Library was requested, but it was not found.'
10032 if test -n "$with_zippy_req"; then
10033 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
10034 warnL "$with_zippy_req was requested as the Zippy program,"
10035 warn2 "but was not found. The default will be used instead."
10039 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
10040 warn 'Use of Kerberos was requested, but it was not found.'
10043 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
10044 warn 'Use of PAM was requested, but it was not found.'
10047 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
10048 warn 'Use of shadow passwords was requested, but they were not found.'
10052 # You are in a twisty maze of namespaces and syntaxes, all alike.
10053 # Fuck the skull of Unix.
10055 eval bindir=${bindir}
10056 eval bindir=${bindir}
10057 eval bindir=${bindir}
10058 eval bindir=${bindir}
10059 eval bindir=${bindir}
10060 eval bindir=${bindir}
10061 eval HACKDIR=${HACKDIR}
10062 eval HACKDIR=${HACKDIR}
10063 eval HACKDIR=${HACKDIR}
10064 eval HACKDIR=${HACKDIR}
10065 eval HACKDIR=${HACKDIR}
10066 eval HACKDIR=${HACKDIR}
10068 # canonicalize slashes.
10069 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
10070 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10073 # Sanity check the subdir
10074 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
10075 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
10077 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
10078 There will be an executable installed with that name, so
10079 that can't be the name of a directory as well. Please
10080 re-configure with a different directory name." 1>&2; exit 1; }
10087 # Now let's see if there's a previous RPM version already installed. Blargh!
10091 rpmv=`(rpm -qv xscreensaver) 2>&- | \
10092 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/'`
10095 if test \! -z "$rpmv" ; then
10096 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
10097 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
10100 warnL "There is already an installed RPM of xscreensaver $rpmv"
10101 warn2 "on this system. You might want to remove it (with"
10102 warn2 '"rpm -ve xscreensaver") before running "make install"'
10103 warn2 "from this directory."
10105 warn2 "Alternately, you could build this version of xscreensaver"
10106 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
10107 warn2 "file is included. See the RPM documentation for more info."
10110 if test "$rpmbdir" = "$rpmhdir" ; then
10111 warn2 "The RPM version was installed in $rpmbdir."
10113 warn2 "The RPM version was installed in $rpmbdir,"
10114 warn2 "with demos in $rpmhdir."
10121 # Warn about egregious GNOME bogosity.
10123 #if (rpm -qv control-center) >&- 2>&- ; then
10125 # warnL "The Gnome Control Center seems to be installed."
10127 # warn2 "Note that simply installing this version of xscreensaver"
10128 # warn2 "will not cause GNOME to know about the newly-added display"
10129 # warn2 "modes -- GNOME is just lame that way. Instead of using the"
10130 # warn2 "Control Center, try using the \`xscreensaver-demo' command."
10134 if test "${bindir}" = "${HACKDIR}" ; then
10138 if test "$do_dir_warning" = yes; then
10142 echo ' When you run "make install", the "xscreensaver",'
10143 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
10144 echo " will be installed in ${bindir}."
10146 echo " The various graphics demos (100+ different executables) will"
10147 echo " also be installed in ${HACKDIR}."
10149 echo " If you would prefer the demos to be installed elsewhere"
10150 echo " (for example, in a dedicated directory) you should re-run"
10151 echo " configure with the --enable-subdir=DIR option. For more"
10152 echo " information, run $0 --help."
10156 if test "$warning" != no; then
10157 echo '' ; echo "$warnsep" ; echo ''