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 figure out how to create directory trees.
641 ###############################################################################
646 ###############################################################################
648 # Function to check whether gettimeofday() exists, and how to call it.
649 # This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
651 ###############################################################################
656 ###############################################################################
658 # Function to find perl5 (defines PERL and PERL_VERSION.)
660 ###############################################################################
662 # M4 sucks!! perl sucks too!!
664 perl_version_cmd='print $]'
670 ###############################################################################
672 # Function to demand "bc". Losers.
674 ###############################################################################
678 ###############################################################################
680 # Functions to check how to do ICMP PING requests.
682 ###############################################################################
689 ###############################################################################
691 # Functions to check for various X11 crap.
693 ###############################################################################
695 # Try and find the app-defaults directory.
696 # It sucks that autoconf doesn't do this already...
708 # Random special-cases for X on certain pathological OSes.
709 # You know who you are.
715 ###############################################################################
717 # Some utility functions to make checking for X things easier.
719 ###############################################################################
721 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
725 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
729 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
734 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
735 # Use this sparingly; it probably doesn't work very well on X programs.
739 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
740 # (But not the -L directories!)
746 # Usage: HANDLE_X_PATH_ARG([variable_name],
747 # [--command-line-option],
748 # [descriptive string])
750 # All of the --with options take three forms:
752 # --with-foo (or --with-foo=yes)
753 # --without-foo (or --with-foo=no)
756 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
757 # a directory (string beginning with a slash) it checks to see whether
758 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
765 ###############################################################################
766 ###############################################################################
768 # End of function definitions. Now start actually executing stuff.
770 ###############################################################################
771 ###############################################################################
773 # random compiler setup
775 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
776 if test -f $ac_dir/install-sh; then
778 ac_install_sh="$ac_aux_dir/install-sh -c"
780 elif test -f $ac_dir/install.sh; then
782 ac_install_sh="$ac_aux_dir/install.sh -c"
786 if test -z "$ac_aux_dir"; then
787 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
789 ac_config_guess=$ac_aux_dir/config.guess
790 ac_config_sub=$ac_aux_dir/config.sub
791 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
794 # Make sure we can run config.sub.
795 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
796 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
799 echo $ac_n "checking host system type""... $ac_c" 1>&6
800 echo "configure:812: checking host system type" >&5
803 case "$host_alias" in
807 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
808 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
810 *) host_alias=$nonopt ;;
814 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
815 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
816 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
817 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
818 echo "$ac_t""$host" 1>&6
820 # Extract the first word of "gcc", so it can be a program name with args.
821 set dummy gcc; ac_word=$2
822 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
823 echo "configure:835: checking for $ac_word" >&5
824 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
825 echo $ac_n "(cached) $ac_c" 1>&6
827 if test -n "$CC"; then
828 ac_cv_prog_CC="$CC" # Let the user override the test.
830 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
832 for ac_dir in $ac_dummy; do
833 test -z "$ac_dir" && ac_dir=.
834 if test -f $ac_dir/$ac_word; then
843 if test -n "$CC"; then
844 echo "$ac_t""$CC" 1>&6
846 echo "$ac_t""no" 1>&6
849 if test -z "$CC"; then
850 # Extract the first word of "cc", so it can be a program name with args.
851 set dummy cc; ac_word=$2
852 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
853 echo "configure:865: checking for $ac_word" >&5
854 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
855 echo $ac_n "(cached) $ac_c" 1>&6
857 if test -n "$CC"; then
858 ac_cv_prog_CC="$CC" # Let the user override the test.
860 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
863 for ac_dir in $ac_dummy; do
864 test -z "$ac_dir" && ac_dir=.
865 if test -f $ac_dir/$ac_word; then
866 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
875 if test $ac_prog_rejected = yes; then
876 # We found a bogon in the path, so make sure we never use it.
877 set dummy $ac_cv_prog_CC
879 if test $# -gt 0; then
880 # We chose a different compiler from the bogus one.
881 # However, it has the same basename, so the bogon will be chosen
882 # first if we set CC to just the basename; use the full file name.
884 set dummy "$ac_dir/$ac_word" "$@"
892 if test -n "$CC"; then
893 echo "$ac_t""$CC" 1>&6
895 echo "$ac_t""no" 1>&6
898 if test -z "$CC"; then
901 # Extract the first word of "cl", so it can be a program name with args.
902 set dummy cl; ac_word=$2
903 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
904 echo "configure:916: checking for $ac_word" >&5
905 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
906 echo $ac_n "(cached) $ac_c" 1>&6
908 if test -n "$CC"; then
909 ac_cv_prog_CC="$CC" # Let the user override the test.
911 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
913 for ac_dir in $ac_dummy; do
914 test -z "$ac_dir" && ac_dir=.
915 if test -f $ac_dir/$ac_word; then
924 if test -n "$CC"; then
925 echo "$ac_t""$CC" 1>&6
927 echo "$ac_t""no" 1>&6
932 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
935 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
936 echo "configure:948: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
939 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
940 ac_cpp='$CPP $CPPFLAGS'
941 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
942 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
943 cross_compiling=$ac_cv_prog_cc_cross
945 cat > conftest.$ac_ext << EOF
947 #line 959 "configure"
948 #include "confdefs.h"
952 if { (eval echo configure:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
953 ac_cv_prog_cc_works=yes
954 # If we can't run a trivial program, we are probably using a cross compiler.
955 if (./conftest; exit) 2>/dev/null; then
956 ac_cv_prog_cc_cross=no
958 ac_cv_prog_cc_cross=yes
961 echo "configure: failed program was:" >&5
962 cat conftest.$ac_ext >&5
963 ac_cv_prog_cc_works=no
967 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
968 ac_cpp='$CPP $CPPFLAGS'
969 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
970 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
971 cross_compiling=$ac_cv_prog_cc_cross
973 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
974 if test $ac_cv_prog_cc_works = no; then
975 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
977 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
978 echo "configure:990: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
979 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
980 cross_compiling=$ac_cv_prog_cc_cross
982 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
983 echo "configure:995: checking whether we are using GNU C" >&5
984 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
985 echo $ac_n "(cached) $ac_c" 1>&6
987 cat > conftest.c <<EOF
992 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
999 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1001 if test $ac_cv_prog_gcc = yes; then
1007 ac_test_CFLAGS="${CFLAGS+set}"
1008 ac_save_CFLAGS="$CFLAGS"
1010 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1011 echo "configure:1023: checking whether ${CC-cc} accepts -g" >&5
1012 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1013 echo $ac_n "(cached) $ac_c" 1>&6
1015 echo 'void f(){}' > conftest.c
1016 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1025 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1026 if test "$ac_test_CFLAGS" = set; then
1027 CFLAGS="$ac_save_CFLAGS"
1028 elif test $ac_cv_prog_cc_g = yes; then
1029 if test "$GCC" = yes; then
1035 if test "$GCC" = yes; then
1043 if test -z "$GCC"; then
1044 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
1045 echo "configure:1057: checking how to request ANSI compilation" >&5
1048 echo "$ac_t""HPUX: adding -Ae" 1>&6
1052 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
1053 CC="$CC -qlanglvl=ansi -qhalt=e"
1057 echo "$ac_t""DEC: adding -std1" 1>&6
1062 echo "$ac_t""no idea" 1>&6
1067 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
1068 echo "configure:1080: checking whether the compiler works on ANSI C" >&5
1069 if test "$cross_compiling" = yes; then
1070 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1072 cat > conftest.$ac_ext <<EOF
1073 #line 1085 "configure"
1074 #include "confdefs.h"
1075 main(int ac, char **av) { return 0; }
1077 if { (eval echo configure:1089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1079 echo "$ac_t""yes" 1>&6
1081 echo "configure: failed program was:" >&5
1082 cat conftest.$ac_ext >&5
1084 echo "$ac_t""no" 1>&6
1085 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1091 if test -n "$GCC"; then
1092 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
1093 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
1094 echo "$ac_t""Disabling C++ comments in ANSI C code." 1>&6
1095 CC="$CC -Wp,-lang-c89"
1098 *-irix5* |*-irix6.0-3* )
1099 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1100 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1103 # if test -z "$GCC"; then
1104 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1105 # CC="$CC -migrate -w0 -verbose -warnprotos"
1111 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1112 echo "configure:1124: checking how to run the C preprocessor" >&5
1113 # On Suns, sometimes $CPP names a directory.
1114 if test -n "$CPP" && test -d "$CPP"; then
1117 if test -z "$CPP"; then
1118 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1119 echo $ac_n "(cached) $ac_c" 1>&6
1121 # This must be in double quotes, not single quotes, because CPP may get
1122 # substituted into the Makefile and "${CC-cc}" will confuse make.
1124 # On the NeXT, cc -E runs the code through the compiler's parser,
1125 # not just through cpp.
1126 cat > conftest.$ac_ext <<EOF
1127 #line 1139 "configure"
1128 #include "confdefs.h"
1132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1133 { (eval echo configure:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1135 if test -z "$ac_err"; then
1139 echo "configure: failed program was:" >&5
1140 cat conftest.$ac_ext >&5
1142 CPP="${CC-cc} -E -traditional-cpp"
1143 cat > conftest.$ac_ext <<EOF
1144 #line 1156 "configure"
1145 #include "confdefs.h"
1149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1150 { (eval echo configure:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1152 if test -z "$ac_err"; then
1156 echo "configure: failed program was:" >&5
1157 cat conftest.$ac_ext >&5
1159 CPP="${CC-cc} -nologo -E"
1160 cat > conftest.$ac_ext <<EOF
1161 #line 1173 "configure"
1162 #include "confdefs.h"
1166 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1167 { (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1168 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1169 if test -z "$ac_err"; then
1173 echo "configure: failed program was:" >&5
1174 cat conftest.$ac_ext >&5
1183 ac_cv_prog_CPP="$CPP"
1185 CPP="$ac_cv_prog_CPP"
1187 ac_cv_prog_CPP="$CPP"
1189 echo "$ac_t""$CPP" 1>&6
1191 echo $ac_n "checking for working const""... $ac_c" 1>&6
1192 echo "configure:1204: checking for working const" >&5
1193 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1194 echo $ac_n "(cached) $ac_c" 1>&6
1196 cat > conftest.$ac_ext <<EOF
1197 #line 1209 "configure"
1198 #include "confdefs.h"
1202 /* Ultrix mips cc rejects this. */
1203 typedef int charset[2]; const charset x;
1204 /* SunOS 4.1.1 cc rejects this. */
1205 char const *const *ccp;
1207 /* NEC SVR4.0.2 mips cc rejects this. */
1208 struct point {int x, y;};
1209 static struct point const zero = {0,0};
1210 /* AIX XL C 1.02.0.0 rejects this.
1211 It does not let you subtract one const X* pointer from another in an arm
1212 of an if-expression whose if-part is not a constant expression */
1213 const char *g = "string";
1214 ccp = &g + (g ? g-g : 0);
1215 /* HPUX 7.0 cc rejects these. */
1218 ccp = (char const *const *) p;
1219 { /* SCO 3.2v4 cc rejects this. */
1221 char const *s = 0 ? (char *) 0 : (char const *) 0;
1225 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1227 const int *foo = &x[0];
1230 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1231 typedef const int *iptr;
1235 { /* AIX XL C 1.02.0.0 rejects this saying
1236 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1237 struct s { int j; const int *ap[3]; };
1238 struct s *b; b->j = 5;
1240 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1246 if { (eval echo configure:1258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1250 echo "configure: failed program was:" >&5
1251 cat conftest.$ac_ext >&5
1258 echo "$ac_t""$ac_cv_c_const" 1>&6
1259 if test $ac_cv_c_const = no; then
1260 cat >> confdefs.h <<\EOF
1266 echo $ac_n "checking for inline""... $ac_c" 1>&6
1267 echo "configure:1279: checking for inline" >&5
1268 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1269 echo $ac_n "(cached) $ac_c" 1>&6
1272 for ac_kw in inline __inline__ __inline; do
1273 cat > conftest.$ac_ext <<EOF
1274 #line 1286 "configure"
1275 #include "confdefs.h"
1281 if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1283 ac_cv_c_inline=$ac_kw; break
1285 echo "configure: failed program was:" >&5
1286 cat conftest.$ac_ext >&5
1293 echo "$ac_t""$ac_cv_c_inline" 1>&6
1294 case "$ac_cv_c_inline" in
1296 no) cat >> confdefs.h <<\EOF
1300 *) cat >> confdefs.h <<EOF
1301 #define inline $ac_cv_c_inline
1306 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
1307 echo $ac_n "checking for bc""... $ac_c" 1>&6
1308 echo "configure:1320: checking for bc" >&5
1309 if test "$ac_bc_result" = "15" ; then
1310 echo "$ac_t""yes" 1>&6
1312 echo "$ac_t""no" 1>&6
1314 { echo "configure: error: Your system doesn't have \"bc\", which has been a standard
1315 part of Unix since the 1970s. Come back when your vendor
1316 has grown a clue." 1>&2; exit 1; }
1320 # stuff for Makefiles
1321 # Find a good install program. We prefer a C program (faster),
1322 # so one script is as good as another. But avoid the broken or
1323 # incompatible versions:
1324 # SysV /etc/install, /usr/sbin/install
1325 # SunOS /usr/etc/install
1326 # IRIX /sbin/install
1328 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1329 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1330 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1331 # ./install, which can be erroneously created by make from ./install.sh.
1332 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1333 echo "configure:1345: checking for a BSD compatible install" >&5
1334 if test -z "$INSTALL"; then
1335 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1336 echo $ac_n "(cached) $ac_c" 1>&6
1338 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1339 for ac_dir in $PATH; do
1340 # Account for people who put trailing slashes in PATH elements.
1342 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1344 # OSF1 and SCO ODT 3.0 have their own names for install.
1345 # Don't use installbsd from OSF since it installs stuff as root
1347 for ac_prog in ginstall scoinst install; do
1348 if test -f $ac_dir/$ac_prog; then
1349 if test $ac_prog = install &&
1350 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1351 # AIX install. It has an incompatible calling convention.
1354 ac_cv_path_install="$ac_dir/$ac_prog -c"
1365 if test "${ac_cv_path_install+set}" = set; then
1366 INSTALL="$ac_cv_path_install"
1368 # As a last resort, use the slow shell script. We don't cache a
1369 # path for INSTALL within a source directory, because that will
1370 # break other packages using the cache if that directory is
1371 # removed, or if the path is relative.
1372 INSTALL="$ac_install_sh"
1375 echo "$ac_t""$INSTALL" 1>&6
1377 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1378 # It thinks the first close brace ends the variable substitution.
1379 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1381 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1383 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1385 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1386 echo "configure:1398: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1387 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1388 echo $ac_n "(cached) $ac_c" 1>&6
1390 ac_cv_install_d_creates_dirs=no
1392 if mkdir conftestdir; then
1394 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1395 if test -d dir1/dir2/. ; then
1396 ac_cv_install_d_creates_dirs=yes
1404 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1406 if test "$ac_cv_install_d_creates_dirs" = no ; then
1407 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1408 echo "configure:1420: checking whether \"mkdir -p\" creates intermediate directories" >&5
1409 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1410 echo $ac_n "(cached) $ac_c" 1>&6
1412 ac_cv_mkdir_p_creates_dirs=no
1414 if mkdir conftestdir; then
1416 mkdir -p dir1/dir2 >&- 2>&-
1417 if test -d dir1/dir2/. ; then
1418 ac_cv_mkdir_p_creates_dirs=yes
1426 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1429 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1430 INSTALL_DIRS='${INSTALL} -d'
1431 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1432 INSTALL_DIRS='mkdir -p'
1435 INSTALL_DIRS='${INSTALL} -d'
1438 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1439 echo "configure:1451: checking whether ${MAKE-make} sets \${MAKE}" >&5
1440 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1441 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1442 echo $ac_n "(cached) $ac_c" 1>&6
1444 cat > conftestmake <<\EOF
1446 @echo 'ac_maketemp="${MAKE}"'
1448 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1449 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1450 if test -n "$ac_maketemp"; then
1451 eval ac_cv_prog_make_${ac_make}_set=yes
1453 eval ac_cv_prog_make_${ac_make}_set=no
1457 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1458 echo "$ac_t""yes" 1>&6
1461 echo "$ac_t""no" 1>&6
1462 SET_MAKE="MAKE=${MAKE-make}"
1467 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1468 echo "configure:1480: checking for ANSI C header files" >&5
1469 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1470 echo $ac_n "(cached) $ac_c" 1>&6
1472 cat > conftest.$ac_ext <<EOF
1473 #line 1485 "configure"
1474 #include "confdefs.h"
1480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1481 { (eval echo configure:1493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1483 if test -z "$ac_err"; then
1485 ac_cv_header_stdc=yes
1488 echo "configure: failed program was:" >&5
1489 cat conftest.$ac_ext >&5
1491 ac_cv_header_stdc=no
1495 if test $ac_cv_header_stdc = yes; then
1496 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1497 cat > conftest.$ac_ext <<EOF
1498 #line 1510 "configure"
1499 #include "confdefs.h"
1502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1503 egrep "memchr" >/dev/null 2>&1; then
1507 ac_cv_header_stdc=no
1513 if test $ac_cv_header_stdc = yes; then
1514 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1515 cat > conftest.$ac_ext <<EOF
1516 #line 1528 "configure"
1517 #include "confdefs.h"
1520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1521 egrep "free" >/dev/null 2>&1; then
1525 ac_cv_header_stdc=no
1531 if test $ac_cv_header_stdc = yes; then
1532 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1533 if test "$cross_compiling" = yes; then
1536 cat > conftest.$ac_ext <<EOF
1537 #line 1549 "configure"
1538 #include "confdefs.h"
1540 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1541 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1542 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1543 int main () { int i; for (i = 0; i < 256; i++)
1544 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1548 if { (eval echo configure:1560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1552 echo "configure: failed program was:" >&5
1553 cat conftest.$ac_ext >&5
1555 ac_cv_header_stdc=no
1563 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1564 if test $ac_cv_header_stdc = yes; then
1565 cat >> confdefs.h <<\EOF
1566 #define STDC_HEADERS 1
1571 for ac_hdr in unistd.h
1573 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1574 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1575 echo "configure:1587: checking for $ac_hdr" >&5
1576 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1577 echo $ac_n "(cached) $ac_c" 1>&6
1579 cat > conftest.$ac_ext <<EOF
1580 #line 1592 "configure"
1581 #include "confdefs.h"
1584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1585 { (eval echo configure:1597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1587 if test -z "$ac_err"; then
1589 eval "ac_cv_header_$ac_safe=yes"
1592 echo "configure: failed program was:" >&5
1593 cat conftest.$ac_ext >&5
1595 eval "ac_cv_header_$ac_safe=no"
1599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1600 echo "$ac_t""yes" 1>&6
1601 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1602 cat >> confdefs.h <<EOF
1603 #define $ac_tr_hdr 1
1607 echo "$ac_t""no" 1>&6
1611 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1612 echo "configure:1624: checking for mode_t" >&5
1613 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1614 echo $ac_n "(cached) $ac_c" 1>&6
1616 cat > conftest.$ac_ext <<EOF
1617 #line 1629 "configure"
1618 #include "confdefs.h"
1619 #include <sys/types.h>
1625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1626 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1628 ac_cv_type_mode_t=yes
1631 ac_cv_type_mode_t=no
1636 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1637 if test $ac_cv_type_mode_t = no; then
1638 cat >> confdefs.h <<\EOF
1644 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1645 echo "configure:1657: checking for pid_t" >&5
1646 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1647 echo $ac_n "(cached) $ac_c" 1>&6
1649 cat > conftest.$ac_ext <<EOF
1650 #line 1662 "configure"
1651 #include "confdefs.h"
1652 #include <sys/types.h>
1658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1659 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1661 ac_cv_type_pid_t=yes
1669 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1670 if test $ac_cv_type_pid_t = no; then
1671 cat >> confdefs.h <<\EOF
1677 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1678 echo "configure:1690: checking for size_t" >&5
1679 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1682 cat > conftest.$ac_ext <<EOF
1683 #line 1695 "configure"
1684 #include "confdefs.h"
1685 #include <sys/types.h>
1691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1692 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1694 ac_cv_type_size_t=yes
1697 ac_cv_type_size_t=no
1702 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1703 if test $ac_cv_type_size_t = no; then
1704 cat >> confdefs.h <<\EOF
1705 #define size_t unsigned
1710 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1711 echo "configure:1723: checking return type of signal handlers" >&5
1712 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1713 echo $ac_n "(cached) $ac_c" 1>&6
1715 cat > conftest.$ac_ext <<EOF
1716 #line 1728 "configure"
1717 #include "confdefs.h"
1718 #include <sys/types.h>
1724 extern "C" void (*signal (int, void (*)(int)))(int);
1726 void (*signal ()) ();
1733 if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1735 ac_cv_type_signal=void
1737 echo "configure: failed program was:" >&5
1738 cat conftest.$ac_ext >&5
1740 ac_cv_type_signal=int
1745 echo "$ac_t""$ac_cv_type_signal" 1>&6
1746 cat >> confdefs.h <<EOF
1747 #define RETSIGTYPE $ac_cv_type_signal
1751 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1752 echo "configure:1764: checking whether time.h and sys/time.h may both be included" >&5
1753 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1754 echo $ac_n "(cached) $ac_c" 1>&6
1756 cat > conftest.$ac_ext <<EOF
1757 #line 1769 "configure"
1758 #include "confdefs.h"
1759 #include <sys/types.h>
1760 #include <sys/time.h>
1766 if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1768 ac_cv_header_time=yes
1770 echo "configure: failed program was:" >&5
1771 cat conftest.$ac_ext >&5
1773 ac_cv_header_time=no
1778 echo "$ac_t""$ac_cv_header_time" 1>&6
1779 if test $ac_cv_header_time = yes; then
1780 cat >> confdefs.h <<\EOF
1781 #define TIME_WITH_SYS_TIME 1
1786 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1787 echo "configure:1799: checking for sys/wait.h that is POSIX.1 compatible" >&5
1788 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1789 echo $ac_n "(cached) $ac_c" 1>&6
1791 cat > conftest.$ac_ext <<EOF
1792 #line 1804 "configure"
1793 #include "confdefs.h"
1794 #include <sys/types.h>
1795 #include <sys/wait.h>
1797 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1800 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1805 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1808 if { (eval echo configure:1820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1810 ac_cv_header_sys_wait_h=yes
1812 echo "configure: failed program was:" >&5
1813 cat conftest.$ac_ext >&5
1815 ac_cv_header_sys_wait_h=no
1820 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1821 if test $ac_cv_header_sys_wait_h = yes; then
1822 cat >> confdefs.h <<\EOF
1823 #define HAVE_SYS_WAIT_H 1
1829 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1832 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1833 echo "configure:1845: checking for $ac_hdr that defines DIR" >&5
1834 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1835 echo $ac_n "(cached) $ac_c" 1>&6
1837 cat > conftest.$ac_ext <<EOF
1838 #line 1850 "configure"
1839 #include "confdefs.h"
1840 #include <sys/types.h>
1846 if { (eval echo configure:1858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1848 eval "ac_cv_header_dirent_$ac_safe=yes"
1850 echo "configure: failed program was:" >&5
1851 cat conftest.$ac_ext >&5
1853 eval "ac_cv_header_dirent_$ac_safe=no"
1857 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1858 echo "$ac_t""yes" 1>&6
1859 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1860 cat >> confdefs.h <<EOF
1861 #define $ac_tr_hdr 1
1863 ac_header_dirent=$ac_hdr; break
1865 echo "$ac_t""no" 1>&6
1868 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1869 if test $ac_header_dirent = dirent.h; then
1870 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1871 echo "configure:1883: checking for opendir in -ldir" >&5
1872 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1873 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1874 echo $ac_n "(cached) $ac_c" 1>&6
1876 ac_save_LIBS="$LIBS"
1878 cat > conftest.$ac_ext <<EOF
1879 #line 1891 "configure"
1880 #include "confdefs.h"
1881 /* Override any gcc2 internal prototype to avoid an error. */
1882 /* We use char because int might match the return type of a gcc2
1883 builtin and then its argument prototype would still apply. */
1890 if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1892 eval "ac_cv_lib_$ac_lib_var=yes"
1894 echo "configure: failed program was:" >&5
1895 cat conftest.$ac_ext >&5
1897 eval "ac_cv_lib_$ac_lib_var=no"
1900 LIBS="$ac_save_LIBS"
1903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1904 echo "$ac_t""yes" 1>&6
1907 echo "$ac_t""no" 1>&6
1911 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1912 echo "configure:1924: checking for opendir in -lx" >&5
1913 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1914 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1915 echo $ac_n "(cached) $ac_c" 1>&6
1917 ac_save_LIBS="$LIBS"
1919 cat > conftest.$ac_ext <<EOF
1920 #line 1932 "configure"
1921 #include "confdefs.h"
1922 /* Override any gcc2 internal prototype to avoid an error. */
1923 /* We use char because int might match the return type of a gcc2
1924 builtin and then its argument prototype would still apply. */
1931 if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1933 eval "ac_cv_lib_$ac_lib_var=yes"
1935 echo "configure: failed program was:" >&5
1936 cat conftest.$ac_ext >&5
1938 eval "ac_cv_lib_$ac_lib_var=no"
1941 LIBS="$ac_save_LIBS"
1944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1945 echo "$ac_t""yes" 1>&6
1948 echo "$ac_t""no" 1>&6
1953 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1954 echo "configure:1966: checking how to call gettimeofday" >&5
1955 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1956 echo $ac_n "(cached) $ac_c" 1>&6
1958 cat > conftest.$ac_ext <<EOF
1959 #line 1971 "configure"
1960 #include "confdefs.h"
1962 #include <sys/time.h>
1964 struct timeval tv; struct timezone tzp;
1965 gettimeofday(&tv, &tzp);
1968 if { (eval echo configure:1980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1970 ac_gettimeofday_args=2
1972 echo "configure: failed program was:" >&5
1973 cat conftest.$ac_ext >&5
1975 cat > conftest.$ac_ext <<EOF
1976 #line 1988 "configure"
1977 #include "confdefs.h"
1979 #include <sys/time.h>
1981 struct timeval tv; gettimeofday(&tv);
1984 if { (eval echo configure:1996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1986 ac_gettimeofday_args=1
1988 echo "configure: failed program was:" >&5
1989 cat conftest.$ac_ext >&5
1991 ac_gettimeofday_args=0
1996 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1999 ac_gettimeofday_args=$ac_cv_gettimeofday_args
2000 if test "$ac_gettimeofday_args" = 1 ; then
2001 cat >> confdefs.h <<\EOF
2002 #define HAVE_GETTIMEOFDAY 1
2005 echo "$ac_t""one argument" 1>&6
2006 elif test "$ac_gettimeofday_args" = 2 ; then
2007 cat >> confdefs.h <<\EOF
2008 #define HAVE_GETTIMEOFDAY 1
2011 cat >> confdefs.h <<\EOF
2012 #define GETTIMEOFDAY_TWO_ARGS 1
2015 echo "$ac_t""two arguments" 1>&6
2017 echo "$ac_t""unknown" 1>&6
2020 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
2022 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2023 echo "configure:2035: checking for $ac_func" >&5
2024 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2025 echo $ac_n "(cached) $ac_c" 1>&6
2027 cat > conftest.$ac_ext <<EOF
2028 #line 2040 "configure"
2029 #include "confdefs.h"
2030 /* System header to define __stub macros and hopefully few prototypes,
2031 which can conflict with char $ac_func(); below. */
2033 /* Override any gcc2 internal prototype to avoid an error. */
2034 /* We use char because int might match the return type of a gcc2
2035 builtin and then its argument prototype would still apply. */
2040 /* The GNU C library defines this for functions which it implements
2041 to always fail with ENOSYS. Some functions are actually named
2042 something starting with __ and the normal name is an alias. */
2043 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2051 if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2053 eval "ac_cv_func_$ac_func=yes"
2055 echo "configure: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2058 eval "ac_cv_func_$ac_func=no"
2063 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2064 echo "$ac_t""yes" 1>&6
2065 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2066 cat >> confdefs.h <<EOF
2067 #define $ac_tr_func 1
2071 echo "$ac_t""no" 1>&6
2076 for ac_func in sigaction syslog realpath
2078 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2079 echo "configure:2091: checking for $ac_func" >&5
2080 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2081 echo $ac_n "(cached) $ac_c" 1>&6
2083 cat > conftest.$ac_ext <<EOF
2084 #line 2096 "configure"
2085 #include "confdefs.h"
2086 /* System header to define __stub macros and hopefully few prototypes,
2087 which can conflict with char $ac_func(); below. */
2089 /* Override any gcc2 internal prototype to avoid an error. */
2090 /* We use char because int might match the return type of a gcc2
2091 builtin and then its argument prototype would still apply. */
2096 /* The GNU C library defines this for functions which it implements
2097 to always fail with ENOSYS. Some functions are actually named
2098 something starting with __ and the normal name is an alias. */
2099 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2107 if { (eval echo configure:2119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2109 eval "ac_cv_func_$ac_func=yes"
2111 echo "configure: failed program was:" >&5
2112 cat conftest.$ac_ext >&5
2114 eval "ac_cv_func_$ac_func=no"
2119 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2120 echo "$ac_t""yes" 1>&6
2121 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2122 cat >> confdefs.h <<EOF
2123 #define $ac_tr_func 1
2127 echo "$ac_t""no" 1>&6
2131 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2132 echo "configure:2144: checking for struct icmp" >&5
2133 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2134 echo $ac_n "(cached) $ac_c" 1>&6
2136 cat > conftest.$ac_ext <<EOF
2137 #line 2149 "configure"
2138 #include "confdefs.h"
2146 #include <sys/types.h>
2147 #include <sys/time.h>
2148 #include <sys/ipc.h>
2149 #include <sys/shm.h>
2150 #include <sys/socket.h>
2151 #include <netinet/in_systm.h>
2152 #include <netinet/in.h>
2153 #include <netinet/ip.h>
2154 #include <netinet/ip_icmp.h>
2155 #include <netinet/udp.h>
2156 #include <arpa/inet.h>
2161 struct sockaddr_in si;
2163 i.icmp_type = ICMP_ECHO;
2168 si.sin_family = AF_INET;
2172 if { (eval echo configure:2184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2176 echo "configure: failed program was:" >&5
2177 cat conftest.$ac_ext >&5
2184 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2185 if test "$ac_cv_have_icmp" = yes ; then
2186 cat >> confdefs.h <<\EOF
2191 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2192 echo "configure:2204: checking for struct icmphdr" >&5
2193 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2194 echo $ac_n "(cached) $ac_c" 1>&6
2196 cat > conftest.$ac_ext <<EOF
2197 #line 2209 "configure"
2198 #include "confdefs.h"
2206 #include <sys/types.h>
2207 #include <sys/time.h>
2208 #include <sys/ipc.h>
2209 #include <sys/shm.h>
2210 #include <sys/socket.h>
2211 #include <netinet/in_systm.h>
2212 #include <netinet/in.h>
2213 #include <netinet/ip.h>
2214 #include <netinet/ip_icmp.h>
2215 #include <netinet/udp.h>
2216 #include <arpa/inet.h>
2221 struct sockaddr_in si;
2227 i.un.echo.sequence = 0;
2228 si.sin_family = AF_INET;
2232 if { (eval echo configure:2244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2234 ac_cv_have_icmphdr=yes
2236 echo "configure: failed program was:" >&5
2237 cat conftest.$ac_ext >&5
2239 ac_cv_have_icmphdr=no
2244 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2245 if test "$ac_cv_have_icmphdr" = yes ; then
2246 cat >> confdefs.h <<\EOF
2247 #define HAVE_ICMPHDR 1
2251 for ac_hdr in crypt.h sys/select.h
2253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2255 echo "configure:2267: checking for $ac_hdr" >&5
2256 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2257 echo $ac_n "(cached) $ac_c" 1>&6
2259 cat > conftest.$ac_ext <<EOF
2260 #line 2272 "configure"
2261 #include "confdefs.h"
2264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2265 { (eval echo configure:2277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2267 if test -z "$ac_err"; then
2269 eval "ac_cv_header_$ac_safe=yes"
2272 echo "configure: failed program was:" >&5
2273 cat conftest.$ac_ext >&5
2275 eval "ac_cv_header_$ac_safe=no"
2279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2280 echo "$ac_t""yes" 1>&6
2281 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2282 cat >> confdefs.h <<EOF
2283 #define $ac_tr_hdr 1
2287 echo "$ac_t""no" 1>&6
2291 for ac_prog in perl5 perl
2293 # Extract the first word of "$ac_prog", so it can be a program name with args.
2294 set dummy $ac_prog; ac_word=$2
2295 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2296 echo "configure:2308: checking for $ac_word" >&5
2297 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2298 echo $ac_n "(cached) $ac_c" 1>&6
2302 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2305 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2308 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2310 for ac_dir in $ac_dummy; do
2311 test -z "$ac_dir" && ac_dir=.
2312 if test -f $ac_dir/$ac_word; then
2313 ac_cv_path_PERL="$ac_dir/$ac_word"
2321 PERL="$ac_cv_path_PERL"
2322 if test -n "$PERL"; then
2323 echo "$ac_t""$PERL" 1>&6
2325 echo "$ac_t""no" 1>&6
2328 test -n "$PERL" && break
2331 if test -z "$PERL" ; then
2334 echo $ac_n "checking perl version""... $ac_c" 1>&6
2335 echo "configure:2347: checking perl version" >&5
2336 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
2339 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2342 echo "$ac_t""$ac_cv_perl_version" 1>&6
2343 PERL_VERSION=$ac_cv_perl_version
2347 if test -z "$PERL" ; then
2348 # don't let it be blank...
2349 PERL=/usr/local/bin/perl5
2352 # If we find X, set shell vars x_includes and x_libraries to the
2353 # paths, otherwise set no_x=yes.
2354 # Uses ac_ vars as temps to allow command line to override cache and checks.
2355 # --without-x overrides everything else, but does not touch the cache.
2356 echo $ac_n "checking for X""... $ac_c" 1>&6
2357 echo "configure:2369: checking for X" >&5
2359 # Check whether --with-x or --without-x was given.
2360 if test "${with_x+set}" = set; then
2365 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2366 if test "x$with_x" = xno; then
2367 # The user explicitly disabled X.
2370 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2371 # Both variables are already set.
2374 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2375 echo $ac_n "(cached) $ac_c" 1>&6
2377 # One or both of the vars are not set, and there is no cached value.
2378 ac_x_includes=NO ac_x_libraries=NO
2380 if mkdir conftestdir; then
2382 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2383 cat > Imakefile <<'EOF'
2385 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2387 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2388 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2389 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2390 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2391 for ac_extension in a so sl; do
2392 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2393 test -f $ac_im_libdir/libX11.$ac_extension; then
2394 ac_im_usrlibdir=$ac_im_libdir; break
2397 # Screen out bogus values from the imake configuration. They are
2398 # bogus both because they are the default anyway, and because
2399 # using them would break gcc on systems where it needs fixed includes.
2400 case "$ac_im_incroot" in
2402 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2404 case "$ac_im_usrlibdir" in
2406 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2413 if test "$ac_x_includes" = NO; then
2414 # Guess where to find include files, by looking for this one X11 .h file.
2415 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2417 # First, try using that file with no special directory specified.
2418 cat > conftest.$ac_ext <<EOF
2419 #line 2431 "configure"
2420 #include "confdefs.h"
2421 #include <$x_direct_test_include>
2423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2424 { (eval echo configure:2436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2426 if test -z "$ac_err"; then
2428 # We can compile using X headers with no special include directory.
2432 echo "configure: failed program was:" >&5
2433 cat conftest.$ac_ext >&5
2435 # Look for the header file in a standard set of common directories.
2436 # Check X11 before X11Rn because it is often a symlink to the current release.
2439 /usr/X11R6/include \
2440 /usr/X11R5/include \
2441 /usr/X11R4/include \
2444 /usr/include/X11R6 \
2445 /usr/include/X11R5 \
2446 /usr/include/X11R4 \
2448 /usr/local/X11/include \
2449 /usr/local/X11R6/include \
2450 /usr/local/X11R5/include \
2451 /usr/local/X11R4/include \
2453 /usr/local/include/X11 \
2454 /usr/local/include/X11R6 \
2455 /usr/local/include/X11R5 \
2456 /usr/local/include/X11R4 \
2460 /usr/XFree86/include/X11 \
2463 /usr/local/include \
2464 /usr/unsupported/include \
2465 /usr/athena/include \
2466 /usr/local/x11r5/include \
2467 /usr/lpp/Xamples/include \
2469 /usr/openwin/include \
2470 /usr/openwin/share/include \
2473 if test -r "$ac_dir/$x_direct_test_include"; then
2474 ac_x_includes=$ac_dir
2480 fi # $ac_x_includes = NO
2482 if test "$ac_x_libraries" = NO; then
2483 # Check for the libraries.
2485 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2486 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2488 # See if we find them without any special options.
2489 # Don't add to $LIBS permanently.
2490 ac_save_LIBS="$LIBS"
2491 LIBS="-l$x_direct_test_library $LIBS"
2492 cat > conftest.$ac_ext <<EOF
2493 #line 2505 "configure"
2494 #include "confdefs.h"
2497 ${x_direct_test_function}()
2500 if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2502 LIBS="$ac_save_LIBS"
2503 # We can link X programs with no special library path.
2506 echo "configure: failed program was:" >&5
2507 cat conftest.$ac_ext >&5
2509 LIBS="$ac_save_LIBS"
2510 # First see if replacing the include by lib works.
2511 # Check X11 before X11Rn because it is often a symlink to the current release.
2512 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2523 /usr/local/X11/lib \
2524 /usr/local/X11R6/lib \
2525 /usr/local/X11R5/lib \
2526 /usr/local/X11R4/lib \
2528 /usr/local/lib/X11 \
2529 /usr/local/lib/X11R6 \
2530 /usr/local/lib/X11R5 \
2531 /usr/local/lib/X11R4 \
2535 /usr/XFree86/lib/X11 \
2539 /usr/unsupported/lib \
2541 /usr/local/x11r5/lib \
2542 /usr/lpp/Xamples/lib \
2546 /usr/openwin/share/lib \
2549 for ac_extension in a so sl; do
2550 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2551 ac_x_libraries=$ac_dir
2558 fi # $ac_x_libraries = NO
2560 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2561 # Didn't find X anywhere. Cache the known absence of X.
2562 ac_cv_have_x="have_x=no"
2564 # Record where we found X for the cache.
2565 ac_cv_have_x="have_x=yes \
2566 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2570 eval "$ac_cv_have_x"
2573 if test "$have_x" != yes; then
2574 echo "$ac_t""$have_x" 1>&6
2577 # If each of the values was on the command line, it overrides each guess.
2578 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2579 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2580 # Update the cache value to reflect the command line values.
2581 ac_cv_have_x="have_x=yes \
2582 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2583 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2586 if test "$no_x" = yes; then
2587 # Not all programs may use this symbol, but it does not hurt to define it.
2588 cat >> confdefs.h <<\EOF
2589 #define X_DISPLAY_MISSING 1
2592 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2594 if test -n "$x_includes"; then
2595 X_CFLAGS="$X_CFLAGS -I$x_includes"
2598 # It would also be nice to do this for all -L options, not just this one.
2599 if test -n "$x_libraries"; then
2600 X_LIBS="$X_LIBS -L$x_libraries"
2601 # For Solaris; some versions of Sun CC require a space after -R and
2602 # others require no space. Words are not sufficient . . . .
2603 case "`(uname -sr) 2>/dev/null`" in
2605 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2606 echo "configure:2618: checking whether -R must be followed by a space" >&5
2607 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2608 cat > conftest.$ac_ext <<EOF
2609 #line 2621 "configure"
2610 #include "confdefs.h"
2616 if { (eval echo configure:2628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2620 echo "configure: failed program was:" >&5
2621 cat conftest.$ac_ext >&5
2626 if test $ac_R_nospace = yes; then
2627 echo "$ac_t""no" 1>&6
2628 X_LIBS="$X_LIBS -R$x_libraries"
2630 LIBS="$ac_xsave_LIBS -R $x_libraries"
2631 cat > conftest.$ac_ext <<EOF
2632 #line 2644 "configure"
2633 #include "confdefs.h"
2639 if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2643 echo "configure: failed program was:" >&5
2644 cat conftest.$ac_ext >&5
2649 if test $ac_R_space = yes; then
2650 echo "$ac_t""yes" 1>&6
2651 X_LIBS="$X_LIBS -R $x_libraries"
2653 echo "$ac_t""neither works" 1>&6
2656 LIBS="$ac_xsave_LIBS"
2660 # Check for system-dependent libraries X programs must link with.
2661 # Do this before checking for the system-independent R6 libraries
2662 # (-lICE), since we may need -lsocket or whatever for X linking.
2664 if test "$ISC" = yes; then
2665 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2667 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2668 # libraries were built with DECnet support. And karl@cs.umb.edu says
2669 # the Alpha needs dnet_stub (dnet does not exist).
2670 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2671 echo "configure:2683: checking for dnet_ntoa in -ldnet" >&5
2672 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2674 echo $ac_n "(cached) $ac_c" 1>&6
2676 ac_save_LIBS="$LIBS"
2678 cat > conftest.$ac_ext <<EOF
2679 #line 2691 "configure"
2680 #include "confdefs.h"
2681 /* Override any gcc2 internal prototype to avoid an error. */
2682 /* We use char because int might match the return type of a gcc2
2683 builtin and then its argument prototype would still apply. */
2690 if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2692 eval "ac_cv_lib_$ac_lib_var=yes"
2694 echo "configure: failed program was:" >&5
2695 cat conftest.$ac_ext >&5
2697 eval "ac_cv_lib_$ac_lib_var=no"
2700 LIBS="$ac_save_LIBS"
2703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2704 echo "$ac_t""yes" 1>&6
2705 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2707 echo "$ac_t""no" 1>&6
2710 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2711 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2712 echo "configure:2724: checking for dnet_ntoa in -ldnet_stub" >&5
2713 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2714 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2715 echo $ac_n "(cached) $ac_c" 1>&6
2717 ac_save_LIBS="$LIBS"
2718 LIBS="-ldnet_stub $LIBS"
2719 cat > conftest.$ac_ext <<EOF
2720 #line 2732 "configure"
2721 #include "confdefs.h"
2722 /* Override any gcc2 internal prototype to avoid an error. */
2723 /* We use char because int might match the return type of a gcc2
2724 builtin and then its argument prototype would still apply. */
2731 if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2733 eval "ac_cv_lib_$ac_lib_var=yes"
2735 echo "configure: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
2738 eval "ac_cv_lib_$ac_lib_var=no"
2741 LIBS="$ac_save_LIBS"
2744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2745 echo "$ac_t""yes" 1>&6
2746 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2748 echo "$ac_t""no" 1>&6
2753 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2754 # to get the SysV transport functions.
2755 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2757 # The nsl library prevents programs from opening the X display
2758 # on Irix 5.2, according to dickey@clark.net.
2759 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2760 echo "configure:2772: checking for gethostbyname" >&5
2761 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2762 echo $ac_n "(cached) $ac_c" 1>&6
2764 cat > conftest.$ac_ext <<EOF
2765 #line 2777 "configure"
2766 #include "confdefs.h"
2767 /* System header to define __stub macros and hopefully few prototypes,
2768 which can conflict with char gethostbyname(); below. */
2770 /* Override any gcc2 internal prototype to avoid an error. */
2771 /* We use char because int might match the return type of a gcc2
2772 builtin and then its argument prototype would still apply. */
2773 char gethostbyname();
2777 /* The GNU C library defines this for functions which it implements
2778 to always fail with ENOSYS. Some functions are actually named
2779 something starting with __ and the normal name is an alias. */
2780 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2788 if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2790 eval "ac_cv_func_gethostbyname=yes"
2792 echo "configure: failed program was:" >&5
2793 cat conftest.$ac_ext >&5
2795 eval "ac_cv_func_gethostbyname=no"
2800 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2801 echo "$ac_t""yes" 1>&6
2804 echo "$ac_t""no" 1>&6
2807 if test $ac_cv_func_gethostbyname = no; then
2808 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2809 echo "configure:2821: checking for gethostbyname in -lnsl" >&5
2810 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2811 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2812 echo $ac_n "(cached) $ac_c" 1>&6
2814 ac_save_LIBS="$LIBS"
2816 cat > conftest.$ac_ext <<EOF
2817 #line 2829 "configure"
2818 #include "confdefs.h"
2819 /* Override any gcc2 internal prototype to avoid an error. */
2820 /* We use char because int might match the return type of a gcc2
2821 builtin and then its argument prototype would still apply. */
2822 char gethostbyname();
2828 if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2830 eval "ac_cv_lib_$ac_lib_var=yes"
2832 echo "configure: failed program was:" >&5
2833 cat conftest.$ac_ext >&5
2835 eval "ac_cv_lib_$ac_lib_var=no"
2838 LIBS="$ac_save_LIBS"
2841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2842 echo "$ac_t""yes" 1>&6
2843 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2845 echo "$ac_t""no" 1>&6
2850 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2851 # socket/setsockopt and other routines are undefined under SCO ODT
2852 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2853 # on later versions), says simon@lia.di.epfl.ch: it contains
2854 # gethostby* variants that don't use the nameserver (or something).
2855 # -lsocket must be given before -lnsl if both are needed.
2856 # We assume that if connect needs -lnsl, so does gethostbyname.
2857 echo $ac_n "checking for connect""... $ac_c" 1>&6
2858 echo "configure:2870: checking for connect" >&5
2859 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2860 echo $ac_n "(cached) $ac_c" 1>&6
2862 cat > conftest.$ac_ext <<EOF
2863 #line 2875 "configure"
2864 #include "confdefs.h"
2865 /* System header to define __stub macros and hopefully few prototypes,
2866 which can conflict with char connect(); below. */
2868 /* Override any gcc2 internal prototype to avoid an error. */
2869 /* We use char because int might match the return type of a gcc2
2870 builtin and then its argument prototype would still apply. */
2875 /* The GNU C library defines this for functions which it implements
2876 to always fail with ENOSYS. Some functions are actually named
2877 something starting with __ and the normal name is an alias. */
2878 #if defined (__stub_connect) || defined (__stub___connect)
2886 if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2888 eval "ac_cv_func_connect=yes"
2890 echo "configure: failed program was:" >&5
2891 cat conftest.$ac_ext >&5
2893 eval "ac_cv_func_connect=no"
2898 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2899 echo "$ac_t""yes" 1>&6
2902 echo "$ac_t""no" 1>&6
2905 if test $ac_cv_func_connect = no; then
2906 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2907 echo "configure:2919: checking for connect in -lsocket" >&5
2908 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2910 echo $ac_n "(cached) $ac_c" 1>&6
2912 ac_save_LIBS="$LIBS"
2913 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2914 cat > conftest.$ac_ext <<EOF
2915 #line 2927 "configure"
2916 #include "confdefs.h"
2917 /* Override any gcc2 internal prototype to avoid an error. */
2918 /* We use char because int might match the return type of a gcc2
2919 builtin and then its argument prototype would still apply. */
2926 if { (eval echo configure:2938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2928 eval "ac_cv_lib_$ac_lib_var=yes"
2930 echo "configure: failed program was:" >&5
2931 cat conftest.$ac_ext >&5
2933 eval "ac_cv_lib_$ac_lib_var=no"
2936 LIBS="$ac_save_LIBS"
2939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2940 echo "$ac_t""yes" 1>&6
2941 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2943 echo "$ac_t""no" 1>&6
2948 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2949 echo $ac_n "checking for remove""... $ac_c" 1>&6
2950 echo "configure:2962: checking for remove" >&5
2951 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2952 echo $ac_n "(cached) $ac_c" 1>&6
2954 cat > conftest.$ac_ext <<EOF
2955 #line 2967 "configure"
2956 #include "confdefs.h"
2957 /* System header to define __stub macros and hopefully few prototypes,
2958 which can conflict with char remove(); below. */
2960 /* Override any gcc2 internal prototype to avoid an error. */
2961 /* We use char because int might match the return type of a gcc2
2962 builtin and then its argument prototype would still apply. */
2967 /* The GNU C library defines this for functions which it implements
2968 to always fail with ENOSYS. Some functions are actually named
2969 something starting with __ and the normal name is an alias. */
2970 #if defined (__stub_remove) || defined (__stub___remove)
2978 if { (eval echo configure:2990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2980 eval "ac_cv_func_remove=yes"
2982 echo "configure: failed program was:" >&5
2983 cat conftest.$ac_ext >&5
2985 eval "ac_cv_func_remove=no"
2990 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2991 echo "$ac_t""yes" 1>&6
2994 echo "$ac_t""no" 1>&6
2997 if test $ac_cv_func_remove = no; then
2998 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2999 echo "configure:3011: checking for remove in -lposix" >&5
3000 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3001 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3002 echo $ac_n "(cached) $ac_c" 1>&6
3004 ac_save_LIBS="$LIBS"
3005 LIBS="-lposix $LIBS"
3006 cat > conftest.$ac_ext <<EOF
3007 #line 3019 "configure"
3008 #include "confdefs.h"
3009 /* Override any gcc2 internal prototype to avoid an error. */
3010 /* We use char because int might match the return type of a gcc2
3011 builtin and then its argument prototype would still apply. */
3018 if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3020 eval "ac_cv_lib_$ac_lib_var=yes"
3022 echo "configure: failed program was:" >&5
3023 cat conftest.$ac_ext >&5
3025 eval "ac_cv_lib_$ac_lib_var=no"
3028 LIBS="$ac_save_LIBS"
3031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3032 echo "$ac_t""yes" 1>&6
3033 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3035 echo "$ac_t""no" 1>&6
3040 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3041 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3042 echo "configure:3054: checking for shmat" >&5
3043 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3044 echo $ac_n "(cached) $ac_c" 1>&6
3046 cat > conftest.$ac_ext <<EOF
3047 #line 3059 "configure"
3048 #include "confdefs.h"
3049 /* System header to define __stub macros and hopefully few prototypes,
3050 which can conflict with char shmat(); below. */
3052 /* Override any gcc2 internal prototype to avoid an error. */
3053 /* We use char because int might match the return type of a gcc2
3054 builtin and then its argument prototype would still apply. */
3059 /* The GNU C library defines this for functions which it implements
3060 to always fail with ENOSYS. Some functions are actually named
3061 something starting with __ and the normal name is an alias. */
3062 #if defined (__stub_shmat) || defined (__stub___shmat)
3070 if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3072 eval "ac_cv_func_shmat=yes"
3074 echo "configure: failed program was:" >&5
3075 cat conftest.$ac_ext >&5
3077 eval "ac_cv_func_shmat=no"
3082 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3083 echo "$ac_t""yes" 1>&6
3086 echo "$ac_t""no" 1>&6
3089 if test $ac_cv_func_shmat = no; then
3090 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3091 echo "configure:3103: checking for shmat in -lipc" >&5
3092 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3093 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3094 echo $ac_n "(cached) $ac_c" 1>&6
3096 ac_save_LIBS="$LIBS"
3098 cat > conftest.$ac_ext <<EOF
3099 #line 3111 "configure"
3100 #include "confdefs.h"
3101 /* Override any gcc2 internal prototype to avoid an error. */
3102 /* We use char because int might match the return type of a gcc2
3103 builtin and then its argument prototype would still apply. */
3110 if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3112 eval "ac_cv_lib_$ac_lib_var=yes"
3114 echo "configure: failed program was:" >&5
3115 cat conftest.$ac_ext >&5
3117 eval "ac_cv_lib_$ac_lib_var=no"
3120 LIBS="$ac_save_LIBS"
3123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3124 echo "$ac_t""yes" 1>&6
3125 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3127 echo "$ac_t""no" 1>&6
3133 # Check for libraries that X11R6 Xt/Xaw programs need.
3134 ac_save_LDFLAGS="$LDFLAGS"
3135 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3136 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3137 # check for ICE first), but we must link in the order -lSM -lICE or
3138 # we get undefined symbols. So assume we have SM if we have ICE.
3139 # These have to be linked with before -lX11, unlike the other
3140 # libraries we check for below, so use a different variable.
3141 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3142 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3143 echo "configure:3155: checking for IceConnectionNumber in -lICE" >&5
3144 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3145 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3146 echo $ac_n "(cached) $ac_c" 1>&6
3148 ac_save_LIBS="$LIBS"
3149 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3150 cat > conftest.$ac_ext <<EOF
3151 #line 3163 "configure"
3152 #include "confdefs.h"
3153 /* Override any gcc2 internal prototype to avoid an error. */
3154 /* We use char because int might match the return type of a gcc2
3155 builtin and then its argument prototype would still apply. */
3156 char IceConnectionNumber();
3159 IceConnectionNumber()
3162 if { (eval echo configure:3174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3164 eval "ac_cv_lib_$ac_lib_var=yes"
3166 echo "configure: failed program was:" >&5
3167 cat conftest.$ac_ext >&5
3169 eval "ac_cv_lib_$ac_lib_var=no"
3172 LIBS="$ac_save_LIBS"
3175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3176 echo "$ac_t""yes" 1>&6
3177 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3179 echo "$ac_t""no" 1>&6
3182 LDFLAGS="$ac_save_LDFLAGS"
3187 if test "$have_x" != yes; then
3188 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3192 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3193 echo "configure:3205: checking for X app-defaults directory" >&5
3194 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3195 echo $ac_n "(cached) $ac_c" 1>&6
3199 if mkdir conftestdir; then
3201 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3202 cat > Imakefile <<'EOF'
3204 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3206 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3207 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3208 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3213 if test x"$ac_x_app_defaults" = x; then
3215 # Look for the directory under a standard set of common directories.
3216 # Check X11 before X11Rn because it's often a symlink to the current release.
3218 /usr/X11/lib/app-defaults \
3219 /usr/X11R6/lib/app-defaults \
3220 /usr/X11R6/lib/X11/app-defaults \
3221 /usr/X11R5/lib/app-defaults \
3222 /usr/X11R5/lib/X11/app-defaults \
3223 /usr/X11R4/lib/app-defaults \
3224 /usr/X11R4/lib/X11/app-defaults \
3226 /usr/lib/X11/app-defaults \
3227 /usr/lib/X11R6/app-defaults \
3228 /usr/lib/X11R5/app-defaults \
3229 /usr/lib/X11R4/app-defaults \
3231 /usr/local/X11/lib/app-defaults \
3232 /usr/local/X11R6/lib/app-defaults \
3233 /usr/local/X11R5/lib/app-defaults \
3234 /usr/local/X11R4/lib/app-defaults \
3236 /usr/local/lib/X11/app-defaults \
3237 /usr/local/lib/X11R6/app-defaults \
3238 /usr/local/lib/X11R6/X11/app-defaults \
3239 /usr/local/lib/X11R5/app-defaults \
3240 /usr/local/lib/X11R5/X11/app-defaults \
3241 /usr/local/lib/X11R4/app-defaults \
3242 /usr/local/lib/X11R4/X11/app-defaults \
3244 /usr/X386/lib/X11/app-defaults \
3245 /usr/x386/lib/X11/app-defaults \
3246 /usr/XFree86/lib/X11/app-defaults \
3248 /usr/lib/X11/app-defaults \
3249 /usr/local/lib/X11/app-defaults \
3250 /usr/unsupported/lib/X11/app-defaults \
3251 /usr/athena/lib/X11/app-defaults \
3252 /usr/local/x11r5/lib/X11/app-defaults \
3253 /usr/lpp/Xamples/lib/X11/app-defaults \
3254 /lib/usr/lib/X11/app-defaults \
3256 /usr/openwin/lib/app-defaults \
3257 /usr/openwin/lib/X11/app-defaults \
3258 /usr/openwin/share/lib/app-defaults \
3259 /usr/openwin/share/lib/X11/app-defaults \
3261 /X11R6/lib/app-defaults \
3262 /X11R5/lib/app-defaults \
3263 /X11R4/lib/app-defaults \
3266 if test -d "$ac_dir"; then
3267 ac_x_app_defaults=$ac_dir
3273 if test x"$ac_x_app_defaults" = x; then
3274 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3276 # Record where we found app-defaults for the cache.
3277 ac_cv_x_app_defaults="$ac_x_app_defaults"
3281 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3282 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3286 # The following arcana was gleaned from conversations with
3287 # Eric Schwartz <erics@col.hp.com>:
3289 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3290 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3291 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3292 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3293 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3294 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3295 # you don't need any -I or -L arguments.
3297 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3298 # are the same division as 10.x. However, there are no symlinks to
3299 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3300 # arguments are always necessary.
3302 # However, X11R6 was available on HPUX 9.x as a patch: if that
3303 # patch was installed, then all of X11R6 went in to
3304 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3306 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3307 # whether R5 was available as a patch; R6 undoubtedly was not.)
3309 # So. We try and use the highest numbered pair of
3310 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3311 # that are available. We do not mix and match different versions
3314 # Question I still don't know the answer to: (do you?)
3316 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3317 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3318 # that contrib directory? Did it contain so-called "standard"
3319 # X11R6, or did it include Xaw and Xmu as well? If the former,
3320 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3321 # be a situation where one had to reach into the R5 headers and
3322 # libs to find Xmu? That is, must both R6 and R5 directories
3323 # be on the -I and -L lists in that case?
3325 for version in X11R6 X11R5 X11R4 ; do
3326 # if either pair of directories exists...
3327 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3329 # if contrib exists, use it...
3330 if test -d /usr/contrib/$version/lib ; then
3331 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3332 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3334 # if the "standard" one exists, use it.
3335 if test -d /usr/lib/$version ; then
3336 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3337 X_LIBS="$X_LIBS -L/usr/lib/$version"
3339 # since at least one of the pair exists, go no farther.
3344 # Now find Motif. Thanks for not making xmkmf find this by
3345 # default, you losers.
3347 if test -d /usr/lib/Motif1.2 ; then
3348 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3349 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3350 elif test -d /usr/lib/Motif1.1 ; then
3351 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3352 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3355 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3357 if test -d /opt/Mesa/lib ; then
3358 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3359 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3362 if test -d /opt/xpm/lib/X11 ; then
3363 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3364 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3367 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3368 # in /usr/local/, unless there is already an xscreensaver in
3369 # /usr/local/bin/. This can be overridden with the --prefix arg
3370 # to configure. I'm not sure this is the right thing to do, but
3371 # Richard Lloyd says so...
3373 if test \! -x /usr/local/bin/xscreensaver ; then
3374 ac_default_prefix=/opt/xscreensaver
3380 # Thanks for not making xmkmf find this by default, pinheads.
3381 # And thanks for moving things around again, too. Is this
3382 # really the standard location now? What happened to the
3383 # joke that this kind of thing went in /opt?
3384 # cthomp says "answer: CDE (Common Disorganized Environment)"
3386 if test -f /usr/dt/include/Xm/Xm.h ; then
3387 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3388 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3390 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3391 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3392 echo "configure:3404: checking for regcmp in -lgen" >&5
3393 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3395 echo $ac_n "(cached) $ac_c" 1>&6
3397 ac_save_LIBS="$LIBS"
3399 cat > conftest.$ac_ext <<EOF
3400 #line 3412 "configure"
3401 #include "confdefs.h"
3402 /* Override any gcc2 internal prototype to avoid an error. */
3403 /* We use char because int might match the return type of a gcc2
3404 builtin and then its argument prototype would still apply. */
3411 if { (eval echo configure:3423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3413 eval "ac_cv_lib_$ac_lib_var=yes"
3415 echo "configure: failed program was:" >&5
3416 cat conftest.$ac_ext >&5
3418 eval "ac_cv_lib_$ac_lib_var=no"
3421 LIBS="$ac_save_LIBS"
3424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3425 echo "$ac_t""yes" 1>&6
3426 X_LIBS="$X_LIBS -lgen"
3428 echo "$ac_t""no" 1>&6
3434 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3435 echo "configure:3447: checking for XPointer" >&5
3436 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3437 echo $ac_n "(cached) $ac_c" 1>&6
3440 ac_save_CPPFLAGS="$CPPFLAGS"
3441 if test \! -z "$includedir" ; then
3442 CPPFLAGS="$CPPFLAGS -I$includedir"
3444 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3445 cat > conftest.$ac_ext <<EOF
3446 #line 3458 "configure"
3447 #include "confdefs.h"
3448 #include <X11/Xlib.h>
3450 XPointer foo = (XPointer) 0;
3453 if { (eval echo configure:3465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3457 echo "configure: failed program was:" >&5
3458 cat conftest.$ac_ext >&5
3463 CPPFLAGS="$ac_save_CPPFLAGS"
3466 echo "$ac_t""$ac_cv_xpointer" 1>&6
3467 if test "$ac_cv_xpointer" != yes; then
3468 cat >> confdefs.h <<\EOF
3469 #define XPointer char*
3476 ###############################################################################
3478 # Check for -lXmu (some fucked up vendors don't ship it...)
3480 ###############################################################################
3484 ac_save_CPPFLAGS="$CPPFLAGS"
3485 if test \! -z "$includedir" ; then
3486 CPPFLAGS="$CPPFLAGS -I$includedir"
3488 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3489 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3490 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3491 echo "configure:3503: checking for X11/Xmu/Error.h" >&5
3492 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3493 echo $ac_n "(cached) $ac_c" 1>&6
3495 cat > conftest.$ac_ext <<EOF
3496 #line 3508 "configure"
3497 #include "confdefs.h"
3498 #include <X11/Xmu/Error.h>
3500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3501 { (eval echo configure:3513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3503 if test -z "$ac_err"; then
3505 eval "ac_cv_header_$ac_safe=yes"
3508 echo "configure: failed program was:" >&5
3509 cat conftest.$ac_ext >&5
3511 eval "ac_cv_header_$ac_safe=no"
3515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3516 echo "$ac_t""yes" 1>&6
3519 echo "$ac_t""no" 1>&6
3522 CPPFLAGS="$ac_save_CPPFLAGS"
3523 if test "$have_xmu" = no ; then
3524 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3525 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3529 SAVER_LIBS="-lXmu $SAVER_LIBS"
3530 HACK_LIBS="-lXmu $HACK_LIBS"
3531 MOTIF_LIBS="-lXmu $MOTIF_LIBS"
3532 GTK_LIBS="-lXmu $GTK_LIBS"
3533 cat >> confdefs.h <<\EOF
3540 ###############################################################################
3542 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3543 # See comp.windows.x FAQ question 124. The right fix is to
3544 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3546 ###############################################################################
3548 if test "$have_xmu" = yes ; then
3551 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3552 echo "configure:3564: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3553 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3554 echo $ac_n "(cached) $ac_c" 1>&6
3556 ac_save_LDFLAGS="$LDFLAGS"
3557 if test \! -z "$x_libraries" ; then
3558 LDFLAGS="$LDFLAGS -L$x_libraries"
3560 # Note: this trick never works! (Generally.)
3561 # We're only getting away with using AC_TRY_LINK
3562 # with X libraries because we know it's SunOS.
3563 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3564 cat > conftest.$ac_ext <<EOF
3565 #line 3577 "configure"
3566 #include "confdefs.h"
3572 if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3574 ac_cv_sunos_xmu_bug=no
3576 echo "configure: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3579 ac_cv_sunos_xmu_bug=yes
3582 LDFLAGS="$ac_save_LDFLAGS"
3585 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3586 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3587 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3588 echo "configure:3600: checking whether the compiler understands -static" >&5
3589 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3590 echo $ac_n "(cached) $ac_c" 1>&6
3592 ac_save_LDFLAGS="$LDFLAGS"
3593 LDFLAGS="$LDFLAGS -static"
3594 cat > conftest.$ac_ext <<EOF
3595 #line 3607 "configure"
3596 #include "confdefs.h"
3602 if { (eval echo configure:3614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3606 echo "configure: failed program was:" >&5
3607 cat conftest.$ac_ext >&5
3612 LDFLAGS="$ac_save_LDFLAGS"
3615 echo "$ac_t""$ac_cv_ld_static" 1>&6
3616 if test "$ac_cv_ld_static" = yes ; then
3617 LDFLAGS="$LDFLAGS -static"
3619 LDFLAGS="$LDFLAGS -Bstatic"
3627 ###############################################################################
3629 # Handle the --enable-subdir option
3631 ###############################################################################
3633 # Check whether --enable-subdir or --disable-subdir was given.
3634 if test "${enable_subdir+set}" = set; then
3635 enableval="$enable_subdir"
3636 enable_subdir="$enableval"
3641 if test x"$enable_subdir" = xno; then
3643 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
3644 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
3647 # there must be a better way than this...
3648 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
3650 HACKDIR=$enable_subdir
3653 HACKDIR='${bindir}/'$enable_subdir
3657 # canonicalize slashes.
3658 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3661 ###############################################################################
3663 # Check for the SGI SCREEN_SAVER server extension.
3665 ###############################################################################
3668 with_sgi_req=unspecified
3669 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3670 if test "${with_sgi_ext+set}" = set; then
3671 withval="$with_sgi_ext"
3672 with_sgi="$withval"; with_sgi_req="$withval"
3684 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3685 echo "configure:3697: checking for SGI SCREEN_SAVER headers" >&5
3688 X_CFLAGS="-I$d $X_CFLAGS"
3689 echo "$ac_t""$d" 1>&6
3691 echo "$ac_t""not found ($d: no such directory)" 1>&6
3694 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3695 echo "configure:3707: checking for SGI SCREEN_SAVER libs" >&5
3698 X_LIBS="-L$d $X_LIBS"
3699 echo "$ac_t""$d" 1>&6
3701 echo "$ac_t""not found ($d: no such directory)" 1>&6
3704 # replace the directory string with "yes".
3706 with_sgi=$with_sgi_req
3711 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3712 echo " If it is a directory, then \`DIR/include' will be added to"
3713 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3719 if test "$with_sgi" = yes; then
3721 ac_save_CPPFLAGS="$CPPFLAGS"
3722 if test \! -z "$includedir" ; then
3723 CPPFLAGS="$CPPFLAGS -I$includedir"
3725 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3726 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3727 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3728 echo "configure:3740: checking for X11/extensions/XScreenSaver.h" >&5
3729 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3730 echo $ac_n "(cached) $ac_c" 1>&6
3732 cat > conftest.$ac_ext <<EOF
3733 #line 3745 "configure"
3734 #include "confdefs.h"
3735 #include <X11/extensions/XScreenSaver.h>
3737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3738 { (eval echo configure:3750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3740 if test -z "$ac_err"; then
3742 eval "ac_cv_header_$ac_safe=yes"
3745 echo "configure: failed program was:" >&5
3746 cat conftest.$ac_ext >&5
3748 eval "ac_cv_header_$ac_safe=no"
3752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3753 echo "$ac_t""yes" 1>&6
3755 cat >> confdefs.h <<\EOF
3756 #define HAVE_SGI_SAVER_EXTENSION 1
3760 echo "$ac_t""no" 1>&6
3763 CPPFLAGS="$ac_save_CPPFLAGS"
3765 elif test "$with_sgi" != no; then
3766 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3771 ###############################################################################
3773 # Check for the MIT-SCREEN-SAVER server extension.
3775 ###############################################################################
3778 with_mit_req=unspecified
3779 # Check whether --with-mit-ext or --without-mit-ext was given.
3780 if test "${with_mit_ext+set}" = set; then
3781 withval="$with_mit_ext"
3782 with_mit="$withval"; with_mit_req="$withval"
3794 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3795 echo "configure:3807: checking for MIT-SCREEN-SAVER headers" >&5
3798 X_CFLAGS="-I$d $X_CFLAGS"
3799 echo "$ac_t""$d" 1>&6
3801 echo "$ac_t""not found ($d: no such directory)" 1>&6
3804 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3805 echo "configure:3817: checking for MIT-SCREEN-SAVER libs" >&5
3808 X_LIBS="-L$d $X_LIBS"
3809 echo "$ac_t""$d" 1>&6
3811 echo "$ac_t""not found ($d: no such directory)" 1>&6
3814 # replace the directory string with "yes".
3816 with_mit=$with_mit_req
3821 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3822 echo " If it is a directory, then \`DIR/include' will be added to"
3823 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3829 if test "$with_mit" = yes; then
3831 ac_save_CPPFLAGS="$CPPFLAGS"
3832 if test \! -z "$includedir" ; then
3833 CPPFLAGS="$CPPFLAGS -I$includedir"
3835 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3836 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3837 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3838 echo "configure:3850: checking for X11/extensions/scrnsaver.h" >&5
3839 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3840 echo $ac_n "(cached) $ac_c" 1>&6
3842 cat > conftest.$ac_ext <<EOF
3843 #line 3855 "configure"
3844 #include "confdefs.h"
3845 #include <X11/extensions/scrnsaver.h>
3847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3848 { (eval echo configure:3860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3850 if test -z "$ac_err"; then
3852 eval "ac_cv_header_$ac_safe=yes"
3855 echo "configure: failed program was:" >&5
3856 cat conftest.$ac_ext >&5
3858 eval "ac_cv_header_$ac_safe=no"
3862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3863 echo "$ac_t""yes" 1>&6
3866 echo "$ac_t""no" 1>&6
3869 CPPFLAGS="$ac_save_CPPFLAGS"
3871 # Now check to see if it's really in the library; XF86Free-3.3 ships
3872 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3874 if test "$have_mit" = yes; then
3876 ac_save_CPPFLAGS="$CPPFLAGS"
3877 ac_save_LDFLAGS="$LDFLAGS"
3878 # ac_save_LIBS="$LIBS"
3880 if test \! -z "$includedir" ; then
3881 CPPFLAGS="$CPPFLAGS -I$includedir"
3883 # note: $X_CFLAGS includes $x_includes
3884 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3886 if test \! -z "$libdir" ; then
3887 LDFLAGS="$LDFLAGS -L$libdir"
3889 # note: $X_LIBS includes $x_libraries
3890 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3892 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3893 echo "configure:3905: checking for XScreenSaverRegister in -lXext" >&5
3894 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3895 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3896 echo $ac_n "(cached) $ac_c" 1>&6
3898 ac_save_LIBS="$LIBS"
3899 LIBS="-lXext -lm $LIBS"
3900 cat > conftest.$ac_ext <<EOF
3901 #line 3913 "configure"
3902 #include "confdefs.h"
3903 /* Override any gcc2 internal prototype to avoid an error. */
3904 /* We use char because int might match the return type of a gcc2
3905 builtin and then its argument prototype would still apply. */
3906 char XScreenSaverRegister();
3909 XScreenSaverRegister()
3912 if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3914 eval "ac_cv_lib_$ac_lib_var=yes"
3916 echo "configure: failed program was:" >&5
3917 cat conftest.$ac_ext >&5
3919 eval "ac_cv_lib_$ac_lib_var=no"
3922 LIBS="$ac_save_LIBS"
3925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3926 echo "$ac_t""yes" 1>&6
3929 echo "$ac_t""no" 1>&6
3933 CPPFLAGS="$ac_save_CPPFLAGS"
3934 LDFLAGS="$ac_save_LDFLAGS"
3935 # LIBS="$ac_save_LIBS"
3938 if test "$have_mit" = no; then
3939 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3940 # of in Xext. Thank you master, may I have another.
3942 ac_save_CPPFLAGS="$CPPFLAGS"
3943 ac_save_LDFLAGS="$LDFLAGS"
3944 # ac_save_LIBS="$LIBS"
3946 if test \! -z "$includedir" ; then
3947 CPPFLAGS="$CPPFLAGS -I$includedir"
3949 # note: $X_CFLAGS includes $x_includes
3950 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3952 if test \! -z "$libdir" ; then
3953 LDFLAGS="$LDFLAGS -L$libdir"
3955 # note: $X_LIBS includes $x_libraries
3956 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3958 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3959 echo "configure:3971: checking for XScreenSaverRegister in -lXExExt" >&5
3960 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3961 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3962 echo $ac_n "(cached) $ac_c" 1>&6
3964 ac_save_LIBS="$LIBS"
3965 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3966 cat > conftest.$ac_ext <<EOF
3967 #line 3979 "configure"
3968 #include "confdefs.h"
3969 /* Override any gcc2 internal prototype to avoid an error. */
3970 /* We use char because int might match the return type of a gcc2
3971 builtin and then its argument prototype would still apply. */
3972 char XScreenSaverRegister();
3975 XScreenSaverRegister()
3978 if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3980 eval "ac_cv_lib_$ac_lib_var=yes"
3982 echo "configure: failed program was:" >&5
3983 cat conftest.$ac_ext >&5
3985 eval "ac_cv_lib_$ac_lib_var=no"
3988 LIBS="$ac_save_LIBS"
3991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3992 echo "$ac_t""yes" 1>&6
3993 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3995 echo "$ac_t""no" 1>&6
3999 CPPFLAGS="$ac_save_CPPFLAGS"
4000 LDFLAGS="$ac_save_LDFLAGS"
4001 # LIBS="$ac_save_LIBS"
4005 if test "$have_mit" = no; then
4006 # Double fuck! Looks like some versions of XFree86 (whichever version
4007 # it is that comes with RedHat Linux 2.0 -- I can't find a version
4008 # number) put this garbage in Xss instead of Xext. Thank you master,
4009 # may I have another.
4011 ac_save_CPPFLAGS="$CPPFLAGS"
4012 ac_save_LDFLAGS="$LDFLAGS"
4013 # ac_save_LIBS="$LIBS"
4015 if test \! -z "$includedir" ; then
4016 CPPFLAGS="$CPPFLAGS -I$includedir"
4018 # note: $X_CFLAGS includes $x_includes
4019 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4021 if test \! -z "$libdir" ; then
4022 LDFLAGS="$LDFLAGS -L$libdir"
4024 # note: $X_LIBS includes $x_libraries
4025 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4027 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4028 echo "configure:4040: checking for XScreenSaverRegister in -lXss" >&5
4029 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4030 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4031 echo $ac_n "(cached) $ac_c" 1>&6
4033 ac_save_LIBS="$LIBS"
4034 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4035 cat > conftest.$ac_ext <<EOF
4036 #line 4048 "configure"
4037 #include "confdefs.h"
4038 /* Override any gcc2 internal prototype to avoid an error. */
4039 /* We use char because int might match the return type of a gcc2
4040 builtin and then its argument prototype would still apply. */
4041 char XScreenSaverRegister();
4044 XScreenSaverRegister()
4047 if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4049 eval "ac_cv_lib_$ac_lib_var=yes"
4051 echo "configure: failed program was:" >&5
4052 cat conftest.$ac_ext >&5
4054 eval "ac_cv_lib_$ac_lib_var=no"
4057 LIBS="$ac_save_LIBS"
4060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4061 echo "$ac_t""yes" 1>&6
4062 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4064 echo "$ac_t""no" 1>&6
4068 CPPFLAGS="$ac_save_CPPFLAGS"
4069 LDFLAGS="$ac_save_LDFLAGS"
4070 # LIBS="$ac_save_LIBS"
4074 if test "$have_mit" = yes; then
4075 cat >> confdefs.h <<\EOF
4076 #define HAVE_MIT_SAVER_EXTENSION 1
4083 elif test "$with_mit" != no; then
4084 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4089 ###############################################################################
4091 # Check for the XIDLE server extension.
4093 ###############################################################################
4096 with_xidle_req=unspecified
4097 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4098 if test "${with_xidle_ext+set}" = set; then
4099 withval="$with_xidle_ext"
4100 with_xidle="$withval"; with_xidle_req="$withval"
4107 case "$with_xidle" in
4112 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4113 echo "configure:4125: checking for XIDLE headers" >&5
4114 d=$with_xidle/include
4116 X_CFLAGS="-I$d $X_CFLAGS"
4117 echo "$ac_t""$d" 1>&6
4119 echo "$ac_t""not found ($d: no such directory)" 1>&6
4122 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4123 echo "configure:4135: checking for XIDLE libs" >&5
4126 X_LIBS="-L$d $X_LIBS"
4127 echo "$ac_t""$d" 1>&6
4129 echo "$ac_t""not found ($d: no such directory)" 1>&6
4132 # replace the directory string with "yes".
4133 with_xidle_req="yes"
4134 with_xidle=$with_xidle_req
4139 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4140 echo " If it is a directory, then \`DIR/include' will be added to"
4141 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4147 if test "$with_xidle" = yes; then
4149 ac_save_CPPFLAGS="$CPPFLAGS"
4150 if test \! -z "$includedir" ; then
4151 CPPFLAGS="$CPPFLAGS -I$includedir"
4153 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4154 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4155 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4156 echo "configure:4168: checking for X11/extensions/xidle.h" >&5
4157 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4158 echo $ac_n "(cached) $ac_c" 1>&6
4160 cat > conftest.$ac_ext <<EOF
4161 #line 4173 "configure"
4162 #include "confdefs.h"
4163 #include <X11/extensions/xidle.h>
4165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4166 { (eval echo configure:4178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4168 if test -z "$ac_err"; then
4170 eval "ac_cv_header_$ac_safe=yes"
4173 echo "configure: failed program was:" >&5
4174 cat conftest.$ac_ext >&5
4176 eval "ac_cv_header_$ac_safe=no"
4180 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4181 echo "$ac_t""yes" 1>&6
4183 cat >> confdefs.h <<\EOF
4184 #define HAVE_XIDLE_EXTENSION 1
4188 echo "$ac_t""no" 1>&6
4191 CPPFLAGS="$ac_save_CPPFLAGS"
4192 elif test "$with_xidle" != no; then
4193 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4198 ###############################################################################
4200 # Check for the SGI-VIDEO-CONTROL server extension.
4202 ###############################################################################
4205 with_sgivc_req=unspecified
4206 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4207 if test "${with_sgivc_ext+set}" = set; then
4208 withval="$with_sgivc_ext"
4209 with_sgivc="$withval"; with_sgivc_req="$withval"
4216 case "$with_sgivc" in
4221 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4222 echo "configure:4234: checking for SGI-VIDEO-CONTROL headers" >&5
4223 d=$with_sgivc/include
4225 X_CFLAGS="-I$d $X_CFLAGS"
4226 echo "$ac_t""$d" 1>&6
4228 echo "$ac_t""not found ($d: no such directory)" 1>&6
4231 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4232 echo "configure:4244: checking for SGI-VIDEO-CONTROL libs" >&5
4235 X_LIBS="-L$d $X_LIBS"
4236 echo "$ac_t""$d" 1>&6
4238 echo "$ac_t""not found ($d: no such directory)" 1>&6
4241 # replace the directory string with "yes".
4242 with_sgivc_req="yes"
4243 with_sgivc=$with_sgivc_req
4248 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4249 echo " If it is a directory, then \`DIR/include' will be added to"
4250 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4256 if test "$with_sgivc" = yes; then
4258 # first check for XSGIvc.h
4260 ac_save_CPPFLAGS="$CPPFLAGS"
4261 if test \! -z "$includedir" ; then
4262 CPPFLAGS="$CPPFLAGS -I$includedir"
4264 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4265 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4266 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4267 echo "configure:4279: checking for X11/extensions/XSGIvc.h" >&5
4268 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4269 echo $ac_n "(cached) $ac_c" 1>&6
4271 cat > conftest.$ac_ext <<EOF
4272 #line 4284 "configure"
4273 #include "confdefs.h"
4274 #include <X11/extensions/XSGIvc.h>
4276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4277 { (eval echo configure:4289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4279 if test -z "$ac_err"; then
4281 eval "ac_cv_header_$ac_safe=yes"
4284 echo "configure: failed program was:" >&5
4285 cat conftest.$ac_ext >&5
4287 eval "ac_cv_header_$ac_safe=no"
4291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4292 echo "$ac_t""yes" 1>&6
4295 echo "$ac_t""no" 1>&6
4298 CPPFLAGS="$ac_save_CPPFLAGS"
4300 # if that succeeded, then check for the -lXsgivc
4301 if test "$have_sgivc" = yes; then
4304 ac_save_CPPFLAGS="$CPPFLAGS"
4305 ac_save_LDFLAGS="$LDFLAGS"
4306 # ac_save_LIBS="$LIBS"
4308 if test \! -z "$includedir" ; then
4309 CPPFLAGS="$CPPFLAGS -I$includedir"
4311 # note: $X_CFLAGS includes $x_includes
4312 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4314 if test \! -z "$libdir" ; then
4315 LDFLAGS="$LDFLAGS -L$libdir"
4317 # note: $X_LIBS includes $x_libraries
4318 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4320 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4321 echo "configure:4333: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4322 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4323 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4324 echo $ac_n "(cached) $ac_c" 1>&6
4326 ac_save_LIBS="$LIBS"
4327 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4328 cat > conftest.$ac_ext <<EOF
4329 #line 4341 "configure"
4330 #include "confdefs.h"
4331 /* Override any gcc2 internal prototype to avoid an error. */
4332 /* We use char because int might match the return type of a gcc2
4333 builtin and then its argument prototype would still apply. */
4334 char XSGIvcQueryGammaMap();
4337 XSGIvcQueryGammaMap()
4340 if { (eval echo configure:4352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4342 eval "ac_cv_lib_$ac_lib_var=yes"
4344 echo "configure: failed program was:" >&5
4345 cat conftest.$ac_ext >&5
4347 eval "ac_cv_lib_$ac_lib_var=no"
4350 LIBS="$ac_save_LIBS"
4353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4354 echo "$ac_t""yes" 1>&6
4355 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4357 echo "$ac_t""no" 1>&6
4361 CPPFLAGS="$ac_save_CPPFLAGS"
4362 LDFLAGS="$ac_save_LDFLAGS"
4363 # LIBS="$ac_save_LIBS"
4367 # if that succeeded, then we've really got it.
4368 if test "$have_sgivc" = yes; then
4369 cat >> confdefs.h <<\EOF
4370 #define HAVE_SGI_VC_EXTENSION 1
4375 elif test "$with_sgivc" != no; then
4376 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4381 ###############################################################################
4383 # Check for the DPMS server extension.
4385 ###############################################################################
4388 with_dpms_req=unspecified
4389 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4390 if test "${with_dpms_ext+set}" = set; then
4391 withval="$with_dpms_ext"
4392 with_dpms="$withval"; with_dpms_req="$withval"
4399 case "$with_dpms" in
4404 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4405 echo "configure:4417: checking for DPMS headers" >&5
4406 d=$with_dpms/include
4408 X_CFLAGS="-I$d $X_CFLAGS"
4409 echo "$ac_t""$d" 1>&6
4411 echo "$ac_t""not found ($d: no such directory)" 1>&6
4414 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4415 echo "configure:4427: checking for DPMS libs" >&5
4418 X_LIBS="-L$d $X_LIBS"
4419 echo "$ac_t""$d" 1>&6
4421 echo "$ac_t""not found ($d: no such directory)" 1>&6
4424 # replace the directory string with "yes".
4426 with_dpms=$with_dpms_req
4431 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4432 echo " If it is a directory, then \`DIR/include' will be added to"
4433 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4439 if test "$with_dpms" = yes; then
4441 # first check for dpms.h
4443 ac_save_CPPFLAGS="$CPPFLAGS"
4444 if test \! -z "$includedir" ; then
4445 CPPFLAGS="$CPPFLAGS -I$includedir"
4447 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4448 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4449 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4450 echo "configure:4462: checking for X11/extensions/dpms.h" >&5
4451 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4452 echo $ac_n "(cached) $ac_c" 1>&6
4454 cat > conftest.$ac_ext <<EOF
4455 #line 4467 "configure"
4456 #include "confdefs.h"
4457 #include <X11/extensions/dpms.h>
4459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4460 { (eval echo configure:4472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4462 if test -z "$ac_err"; then
4464 eval "ac_cv_header_$ac_safe=yes"
4467 echo "configure: failed program was:" >&5
4468 cat conftest.$ac_ext >&5
4470 eval "ac_cv_header_$ac_safe=no"
4474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4475 echo "$ac_t""yes" 1>&6
4478 echo "$ac_t""no" 1>&6
4481 CPPFLAGS="$ac_save_CPPFLAGS"
4483 # if that succeeded, then check for the -lXdpms
4484 if test "$have_dpms" = yes; then
4487 ac_save_CPPFLAGS="$CPPFLAGS"
4488 ac_save_LDFLAGS="$LDFLAGS"
4489 # ac_save_LIBS="$LIBS"
4491 if test \! -z "$includedir" ; then
4492 CPPFLAGS="$CPPFLAGS -I$includedir"
4494 # note: $X_CFLAGS includes $x_includes
4495 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4497 if test \! -z "$libdir" ; then
4498 LDFLAGS="$LDFLAGS -L$libdir"
4500 # note: $X_LIBS includes $x_libraries
4501 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4503 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4504 echo "configure:4516: checking for DPMSInfo in -lXdpms" >&5
4505 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4506 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4507 echo $ac_n "(cached) $ac_c" 1>&6
4509 ac_save_LIBS="$LIBS"
4510 LIBS="-lXdpms -lXext -lX11 $LIBS"
4511 cat > conftest.$ac_ext <<EOF
4512 #line 4524 "configure"
4513 #include "confdefs.h"
4514 /* Override any gcc2 internal prototype to avoid an error. */
4515 /* We use char because int might match the return type of a gcc2
4516 builtin and then its argument prototype would still apply. */
4523 if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4525 eval "ac_cv_lib_$ac_lib_var=yes"
4527 echo "configure: failed program was:" >&5
4528 cat conftest.$ac_ext >&5
4530 eval "ac_cv_lib_$ac_lib_var=no"
4533 LIBS="$ac_save_LIBS"
4536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4537 echo "$ac_t""yes" 1>&6
4538 have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
4540 echo "$ac_t""no" 1>&6
4544 CPPFLAGS="$ac_save_CPPFLAGS"
4545 LDFLAGS="$ac_save_LDFLAGS"
4546 # LIBS="$ac_save_LIBS"
4550 # if that succeeded, then we've really got it.
4551 if test "$have_dpms" = yes; then
4552 cat >> confdefs.h <<\EOF
4553 #define HAVE_DPMS_EXTENSION 1
4558 elif test "$with_dpms" != no; then
4559 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4564 ###############################################################################
4566 # Check for the XF86VMODE server extension.
4568 ###############################################################################
4571 with_xf86vmode_req=unspecified
4572 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4573 if test "${with_xf86vmode_ext+set}" = set; then
4574 withval="$with_xf86vmode_ext"
4575 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4582 case "$with_xf86vmode" in
4587 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4588 echo "configure:4600: checking for xf86vmode headers" >&5
4589 d=$with_xf86vmode/include
4591 X_CFLAGS="-I$d $X_CFLAGS"
4592 echo "$ac_t""$d" 1>&6
4594 echo "$ac_t""not found ($d: no such directory)" 1>&6
4597 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4598 echo "configure:4610: checking for xf86vmode libs" >&5
4599 d=$with_xf86vmode/lib
4601 X_LIBS="-L$d $X_LIBS"
4602 echo "$ac_t""$d" 1>&6
4604 echo "$ac_t""not found ($d: no such directory)" 1>&6
4607 # replace the directory string with "yes".
4608 with_xf86vmode_req="yes"
4609 with_xf86vmode=$with_xf86vmode_req
4614 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4615 echo " If it is a directory, then \`DIR/include' will be added to"
4616 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4622 if test "$with_xf86vmode" = yes; then
4624 # first check for xf86vmode.h
4626 ac_save_CPPFLAGS="$CPPFLAGS"
4627 if test \! -z "$includedir" ; then
4628 CPPFLAGS="$CPPFLAGS -I$includedir"
4630 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4631 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4632 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4633 echo "configure:4645: checking for X11/extensions/xf86vmode.h" >&5
4634 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4635 echo $ac_n "(cached) $ac_c" 1>&6
4637 cat > conftest.$ac_ext <<EOF
4638 #line 4650 "configure"
4639 #include "confdefs.h"
4640 #include <X11/extensions/xf86vmode.h>
4642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4643 { (eval echo configure:4655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4645 if test -z "$ac_err"; then
4647 eval "ac_cv_header_$ac_safe=yes"
4650 echo "configure: failed program was:" >&5
4651 cat conftest.$ac_ext >&5
4653 eval "ac_cv_header_$ac_safe=no"
4657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4658 echo "$ac_t""yes" 1>&6
4661 echo "$ac_t""no" 1>&6
4664 CPPFLAGS="$ac_save_CPPFLAGS"
4666 # if that succeeded, then check for the -lXxf86vm
4667 if test "$have_xf86vmode" = yes; then
4670 ac_save_CPPFLAGS="$CPPFLAGS"
4671 ac_save_LDFLAGS="$LDFLAGS"
4672 # ac_save_LIBS="$LIBS"
4674 if test \! -z "$includedir" ; then
4675 CPPFLAGS="$CPPFLAGS -I$includedir"
4677 # note: $X_CFLAGS includes $x_includes
4678 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4680 if test \! -z "$libdir" ; then
4681 LDFLAGS="$LDFLAGS -L$libdir"
4683 # note: $X_LIBS includes $x_libraries
4684 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4686 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4687 echo "configure:4699: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4688 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4689 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4690 echo $ac_n "(cached) $ac_c" 1>&6
4692 ac_save_LIBS="$LIBS"
4693 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4694 cat > conftest.$ac_ext <<EOF
4695 #line 4707 "configure"
4696 #include "confdefs.h"
4697 /* Override any gcc2 internal prototype to avoid an error. */
4698 /* We use char because int might match the return type of a gcc2
4699 builtin and then its argument prototype would still apply. */
4700 char XF86VidModeGetViewPort();
4703 XF86VidModeGetViewPort()
4706 if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4708 eval "ac_cv_lib_$ac_lib_var=yes"
4710 echo "configure: failed program was:" >&5
4711 cat conftest.$ac_ext >&5
4713 eval "ac_cv_lib_$ac_lib_var=no"
4716 LIBS="$ac_save_LIBS"
4719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4720 echo "$ac_t""yes" 1>&6
4721 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4723 echo "$ac_t""no" 1>&6
4727 CPPFLAGS="$ac_save_CPPFLAGS"
4728 LDFLAGS="$ac_save_LDFLAGS"
4729 # LIBS="$ac_save_LIBS"
4733 # if that succeeded, then we've really got it.
4734 if test "$have_xf86vmode" = yes; then
4735 cat >> confdefs.h <<\EOF
4736 #define HAVE_XF86VMODE 1
4741 elif test "$with_xf86vmode" != no; then
4742 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4747 ###############################################################################
4749 # Check for HP XHPDisableReset and XHPEnableReset.
4751 ###############################################################################
4754 ac_save_CPPFLAGS="$CPPFLAGS"
4755 if test \! -z "$includedir" ; then
4756 CPPFLAGS="$CPPFLAGS -I$includedir"
4758 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4759 cat > conftest.$ac_ext <<EOF
4760 #line 4772 "configure"
4761 #include "confdefs.h"
4762 #include <X11/XHPlib.h>
4764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4765 egrep "XHPDisableReset" >/dev/null 2>&1; then
4767 cat >> confdefs.h <<\EOF
4768 #define HAVE_XHPDISABLERESET 1
4771 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
4775 CPPFLAGS="$ac_save_CPPFLAGS"
4778 ###############################################################################
4780 # Check for /proc/interrupts.
4782 ###############################################################################
4784 have_proc_interrupts=no
4785 with_proc_interrupts_req=unspecified
4786 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4787 if test "${with_proc_interrupts+set}" = set; then
4788 withval="$with_proc_interrupts"
4789 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4791 with_proc_interrupts=yes
4795 if test "$with_proc_interrupts" = yes; then
4797 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4798 echo "configure:4810: checking whether /proc/interrupts contains keyboard data" >&5
4799 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4800 echo $ac_n "(cached) $ac_c" 1>&6
4802 ac_cv_have_proc_interrupts=no
4803 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4804 ac_cv_have_proc_interrupts=yes
4809 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
4810 have_proc_interrupts=$ac_cv_have_proc_interrupts
4812 if test "$have_proc_interrupts" = yes; then
4813 cat >> confdefs.h <<\EOF
4814 #define HAVE_PROC_INTERRUPTS 1
4819 elif test "$with_proc_interrupts" != no; then
4820 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
4825 ###############################################################################
4827 # The --enable-locking option
4829 ###############################################################################
4831 # Check whether --enable-locking or --disable-locking was given.
4832 if test "${enable_locking+set}" = set; then
4833 enableval="$enable_locking"
4834 enable_locking="$enableval"
4839 if test "$enable_locking" = yes; then
4841 elif test "$enable_locking" = no; then
4842 cat >> confdefs.h <<\EOF
4843 #define NO_LOCKING 1
4847 echo "error: must be yes or no: --enable-locking=$enable_locking"
4853 ###############################################################################
4855 # The --enable-vt-locking option
4857 ###############################################################################
4859 #ac_vt_lockswitch=no
4860 #AC_ARG_ENABLE(vt-locking,[
4861 # --enable-vt-locking Compile in support for locking Virtual Terminals.
4862 # This is the default if the system supports it, and
4863 # if locking support is included (--enable-locking.)
4864 # --disable-vt-locking Do not allow locking of VTs, even if locking is
4866 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
4867 #if test "$enable_vt_locking" = yes; then
4869 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
4870 # [AC_TRY_COMPILE([#include <fcntl.h>
4871 # #include <sys/ioctl.h>
4872 # #include <sys/vt.h>],
4873 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
4874 # [ac_cv_vt_lockswitch=yes],
4875 # [ac_cv_vt_lockswitch=no])])
4876 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
4878 #elif test "$enable_vt_locking" = no; then
4881 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
4885 #if test "$ac_vt_lockswitch" = yes; then
4886 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
4887 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
4888 # # #### but it doesn't work yet, so don't worry about that for now.
4894 ###############################################################################
4898 ###############################################################################
4902 # Solaris systems tend to come with PAM misconfigured.
4903 # Don't build it by default, even if the headers exist.
4907 # Default to building PAM support on all other systems, if it exists.
4908 with_pam_default=yes
4913 with_pam_req=unspecified
4915 # Check whether --with-pam or --without-pam was given.
4916 if test "${with_pam+set}" = set; then
4918 with_pam="$withval"; with_pam_req="$withval"
4920 with_pam=$with_pam_default
4930 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
4931 echo "configure:4943: checking for PAM headers" >&5
4934 X_CFLAGS="-I$d $X_CFLAGS"
4935 echo "$ac_t""$d" 1>&6
4937 echo "$ac_t""not found ($d: no such directory)" 1>&6
4940 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
4941 echo "configure:4953: checking for PAM libs" >&5
4944 X_LIBS="-L$d $X_LIBS"
4945 echo "$ac_t""$d" 1>&6
4947 echo "$ac_t""not found ($d: no such directory)" 1>&6
4950 # replace the directory string with "yes".
4952 with_pam=$with_pam_req
4957 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
4958 echo " If it is a directory, then \`DIR/include' will be added to"
4959 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4965 if test "$enable_locking" = yes -a "$with_pam" = yes; then
4966 echo $ac_n "checking for PAM""... $ac_c" 1>&6
4967 echo "configure:4979: checking for PAM" >&5
4968 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
4969 echo $ac_n "(cached) $ac_c" 1>&6
4972 ac_save_CPPFLAGS="$CPPFLAGS"
4973 if test \! -z "$includedir" ; then
4974 CPPFLAGS="$CPPFLAGS -I$includedir"
4976 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4977 cat > conftest.$ac_ext <<EOF
4978 #line 4990 "configure"
4979 #include "confdefs.h"
4980 #include <security/pam_appl.h>
4985 if { (eval echo configure:4997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4989 echo "configure: failed program was:" >&5
4990 cat conftest.$ac_ext >&5
4995 CPPFLAGS="$ac_save_CPPFLAGS"
4998 echo "$ac_t""$ac_cv_pam" 1>&6
4999 if test "$ac_cv_pam" = yes ; then
5001 cat >> confdefs.h <<\EOF
5005 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
5007 # libpam typically requires dlopen and dlsym. On FreeBSD,
5008 # those are in libc. On Linux and Solaris, they're in libdl.
5009 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5010 echo "configure:5022: checking for dlopen in -ldl" >&5
5011 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5012 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5013 echo $ac_n "(cached) $ac_c" 1>&6
5015 ac_save_LIBS="$LIBS"
5017 cat > conftest.$ac_ext <<EOF
5018 #line 5030 "configure"
5019 #include "confdefs.h"
5020 /* Override any gcc2 internal prototype to avoid an error. */
5021 /* We use char because int might match the return type of a gcc2
5022 builtin and then its argument prototype would still apply. */
5029 if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5031 eval "ac_cv_lib_$ac_lib_var=yes"
5033 echo "configure: failed program was:" >&5
5034 cat conftest.$ac_ext >&5
5036 eval "ac_cv_lib_$ac_lib_var=no"
5039 LIBS="$ac_save_LIBS"
5042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5043 echo "$ac_t""yes" 1>&6
5044 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5046 echo "$ac_t""no" 1>&6
5050 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5051 echo "configure:5063: checking how to call pam_strerror" >&5
5052 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5053 echo $ac_n "(cached) $ac_c" 1>&6
5055 cat > conftest.$ac_ext <<EOF
5056 #line 5068 "configure"
5057 #include "confdefs.h"
5060 #include <security/pam_appl.h>
5062 pam_handle_t *pamh = 0;
5063 char *s = pam_strerror(pamh, PAM_SUCCESS);
5066 if { (eval echo configure:5078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5068 ac_pam_strerror_args=2
5070 echo "configure: failed program was:" >&5
5071 cat conftest.$ac_ext >&5
5073 cat > conftest.$ac_ext <<EOF
5074 #line 5086 "configure"
5075 #include "confdefs.h"
5078 #include <security/pam_appl.h>
5081 pam_strerror(PAM_SUCCESS);
5084 if { (eval echo configure:5096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5086 ac_pam_strerror_args=1
5088 echo "configure: failed program was:" >&5
5089 cat conftest.$ac_ext >&5
5091 ac_pam_strerror_args=0
5096 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5099 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5100 if test "$ac_pam_strerror_args" = 1 ; then
5101 echo "$ac_t""one argument" 1>&6
5102 elif test "$ac_pam_strerror_args" = 2 ; then
5103 cat >> confdefs.h <<\EOF
5104 #define PAM_STRERROR_TWO_ARGS 1
5107 echo "$ac_t""two arguments" 1>&6
5109 echo "$ac_t""unknown" 1>&6
5115 ###############################################################################
5117 # Check for Kerberos.
5119 ###############################################################################
5123 with_kerberos_req=unspecified
5125 # Check whether --with-kerberos or --without-kerberos was given.
5126 if test "${with_kerberos+set}" = set; then
5127 withval="$with_kerberos"
5128 with_kerberos="$withval"; with_kerberos_req="$withval"
5135 case "$with_kerberos" in
5140 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5141 echo "configure:5153: checking for Kerberos headers" >&5
5142 d=$with_kerberos/include
5144 X_CFLAGS="-I$d $X_CFLAGS"
5145 echo "$ac_t""$d" 1>&6
5147 echo "$ac_t""not found ($d: no such directory)" 1>&6
5150 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5151 echo "configure:5163: checking for Kerberos libs" >&5
5152 d=$with_kerberos/lib
5154 X_LIBS="-L$d $X_LIBS"
5155 echo "$ac_t""$d" 1>&6
5157 echo "$ac_t""not found ($d: no such directory)" 1>&6
5160 # replace the directory string with "yes".
5161 with_kerberos_req="yes"
5162 with_kerberos=$with_kerberos_req
5167 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5168 echo " If it is a directory, then \`DIR/include' will be added to"
5169 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5175 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5176 echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
5177 echo "configure:5189: checking for Kerberos 4" >&5
5178 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5179 echo $ac_n "(cached) $ac_c" 1>&6
5182 ac_save_CPPFLAGS="$CPPFLAGS"
5183 if test \! -z "$includedir" ; then
5184 CPPFLAGS="$CPPFLAGS -I$includedir"
5186 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5187 cat > conftest.$ac_ext <<EOF
5188 #line 5200 "configure"
5189 #include "confdefs.h"
5195 if { (eval echo configure:5207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5199 echo "configure: failed program was:" >&5
5200 cat conftest.$ac_ext >&5
5205 CPPFLAGS="$ac_save_CPPFLAGS"
5208 echo "$ac_t""$ac_cv_kerberos" 1>&6
5209 echo $ac_n "checking for Kerberos 5""... $ac_c" 1>&6
5210 echo "configure:5222: checking for Kerberos 5" >&5
5211 if eval "test \"`echo '$''{'ac_cv_kerberos5'+set}'`\" = set"; then
5212 echo $ac_n "(cached) $ac_c" 1>&6
5215 ac_save_CPPFLAGS="$CPPFLAGS"
5216 if test \! -z "$includedir" ; then
5217 CPPFLAGS="$CPPFLAGS -I$includedir"
5219 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5220 cat > conftest.$ac_ext <<EOF
5221 #line 5233 "configure"
5222 #include "confdefs.h"
5223 #include <kerberosIV/krb.h>
5228 if { (eval echo configure:5240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5232 echo "configure: failed program was:" >&5
5233 cat conftest.$ac_ext >&5
5238 CPPFLAGS="$ac_save_CPPFLAGS"
5241 echo "$ac_t""$ac_cv_kerberos5" 1>&6
5243 if test "$ac_cv_kerberos" = yes ; then
5245 cat >> confdefs.h <<\EOF
5246 #define HAVE_KERBEROS 1
5251 if test "$ac_cv_kerberos5" = yes ; then
5254 cat >> confdefs.h <<\EOF
5255 #define HAVE_KERBEROS 1
5258 cat >> confdefs.h <<\EOF
5259 #define HAVE_KERBEROS5 1
5264 if test "$have_kerberos5" = yes ; then
5265 # from Matt Knopp <mhat@infocalypse.netlag.com>
5266 # (who got it from amu@mit.edu)
5267 PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
5268 elif test "$have_kerberos" = yes ; then
5269 # from Tim Showalter <tjs+@andrew.cmu.edu>
5270 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
5273 if test "$have_kerberos" = yes ; then
5274 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5275 echo "configure:5287: checking for res_search" >&5
5276 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5277 echo $ac_n "(cached) $ac_c" 1>&6
5279 cat > conftest.$ac_ext <<EOF
5280 #line 5292 "configure"
5281 #include "confdefs.h"
5282 /* System header to define __stub macros and hopefully few prototypes,
5283 which can conflict with char res_search(); below. */
5285 /* Override any gcc2 internal prototype to avoid an error. */
5286 /* We use char because int might match the return type of a gcc2
5287 builtin and then its argument prototype would still apply. */
5292 /* The GNU C library defines this for functions which it implements
5293 to always fail with ENOSYS. Some functions are actually named
5294 something starting with __ and the normal name is an alias. */
5295 #if defined (__stub_res_search) || defined (__stub___res_search)
5303 if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5305 eval "ac_cv_func_res_search=yes"
5307 echo "configure: failed program was:" >&5
5308 cat conftest.$ac_ext >&5
5310 eval "ac_cv_func_res_search=no"
5315 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5316 echo "$ac_t""yes" 1>&6
5319 echo "$ac_t""no" 1>&6
5320 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5321 echo "configure:5333: checking for res_search in -lresolv" >&5
5322 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5323 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5324 echo $ac_n "(cached) $ac_c" 1>&6
5326 ac_save_LIBS="$LIBS"
5327 LIBS="-lresolv $LIBS"
5328 cat > conftest.$ac_ext <<EOF
5329 #line 5341 "configure"
5330 #include "confdefs.h"
5331 /* Override any gcc2 internal prototype to avoid an error. */
5332 /* We use char because int might match the return type of a gcc2
5333 builtin and then its argument prototype would still apply. */
5340 if { (eval echo configure:5352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5342 eval "ac_cv_lib_$ac_lib_var=yes"
5344 echo "configure: failed program was:" >&5
5345 cat conftest.$ac_ext >&5
5347 eval "ac_cv_lib_$ac_lib_var=no"
5350 LIBS="$ac_save_LIBS"
5353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5354 echo "$ac_t""yes" 1>&6
5355 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
5357 echo "$ac_t""no" 1>&6
5358 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
5368 ###############################################################################
5370 # Check for the nine billion variants of shadow passwords...
5372 ###############################################################################
5377 with_shadow_req=unspecified
5379 # Check whether --with-shadow or --without-shadow was given.
5380 if test "${with_shadow+set}" = set; then
5381 withval="$with_shadow"
5382 with_shadow="$withval"; with_shadow_req="$withval"
5389 case "$with_shadow" in
5394 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
5395 echo "configure:5407: checking for shadow password headers" >&5
5396 d=$with_shadow/include
5398 X_CFLAGS="-I$d $X_CFLAGS"
5399 echo "$ac_t""$d" 1>&6
5401 echo "$ac_t""not found ($d: no such directory)" 1>&6
5404 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
5405 echo "configure:5417: checking for shadow password libs" >&5
5408 X_LIBS="-L$d $X_LIBS"
5409 echo "$ac_t""$d" 1>&6
5411 echo "$ac_t""not found ($d: no such directory)" 1>&6
5414 # replace the directory string with "yes".
5415 with_shadow_req="yes"
5416 with_shadow=$with_shadow_req
5421 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
5422 echo " If it is a directory, then \`DIR/include' will be added to"
5423 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5429 if test "$enable_locking" = no ; then
5435 ###############################################################################
5437 # Check for Sun "adjunct" passwords.
5439 ###############################################################################
5441 if test "$with_shadow" = yes ; then
5442 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
5443 echo "configure:5455: checking for Sun-style shadow passwords" >&5
5444 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
5445 echo $ac_n "(cached) $ac_c" 1>&6
5448 ac_save_CPPFLAGS="$CPPFLAGS"
5449 if test \! -z "$includedir" ; then
5450 CPPFLAGS="$CPPFLAGS -I$includedir"
5452 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5453 cat > conftest.$ac_ext <<EOF
5454 #line 5466 "configure"
5455 #include "confdefs.h"
5458 #include <sys/types.h>
5459 #include <sys/label.h>
5460 #include <sys/audit.h>
5463 struct passwd_adjunct *p = getpwanam("nobody");
5464 const char *pw = p->pwa_passwd;
5467 if { (eval echo configure:5479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5469 ac_cv_sun_adjunct=yes
5471 echo "configure: failed program was:" >&5
5472 cat conftest.$ac_ext >&5
5474 ac_cv_sun_adjunct=no
5477 CPPFLAGS="$ac_save_CPPFLAGS"
5480 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
5481 if test "$ac_cv_sun_adjunct" = yes; then
5482 have_shadow_adjunct=yes
5489 ###############################################################################
5491 # Check for DEC and SCO so-called "enhanced" security.
5493 ###############################################################################
5495 if test "$with_shadow" = yes ; then
5496 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
5497 echo "configure:5509: checking for DEC-style shadow passwords" >&5
5498 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
5499 echo $ac_n "(cached) $ac_c" 1>&6
5502 ac_save_CPPFLAGS="$CPPFLAGS"
5503 if test \! -z "$includedir" ; then
5504 CPPFLAGS="$CPPFLAGS -I$includedir"
5506 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5507 cat > conftest.$ac_ext <<EOF
5508 #line 5520 "configure"
5509 #include "confdefs.h"
5512 #include <sys/types.h>
5514 #include <sys/security.h>
5517 struct pr_passwd *p;
5519 set_auth_parameters(0, 0);
5520 check_auth_parameters();
5521 p = getprpwnam("nobody");
5522 pw = p->ufld.fd_encrypt;
5525 if { (eval echo configure:5537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5527 ac_cv_enhanced_passwd=yes
5529 echo "configure: failed program was:" >&5
5530 cat conftest.$ac_ext >&5
5532 ac_cv_enhanced_passwd=no
5535 CPPFLAGS="$ac_save_CPPFLAGS"
5538 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
5539 if test $ac_cv_enhanced_passwd = yes; then
5540 have_shadow_enhanced=yes
5544 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
5545 # (I'm told it needs -lcurses too, but I don't understand why.)
5546 # But on DEC, it's in -lsecurity.
5548 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
5549 echo "configure:5561: checking for getprpwnam in -lprot" >&5
5550 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
5551 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5552 echo $ac_n "(cached) $ac_c" 1>&6
5554 ac_save_LIBS="$LIBS"
5555 LIBS="-lprot -lx $LIBS"
5556 cat > conftest.$ac_ext <<EOF
5557 #line 5569 "configure"
5558 #include "confdefs.h"
5559 /* Override any gcc2 internal prototype to avoid an error. */
5560 /* We use char because int might match the return type of a gcc2
5561 builtin and then its argument prototype would still apply. */
5568 if { (eval echo configure:5580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5570 eval "ac_cv_lib_$ac_lib_var=yes"
5572 echo "configure: failed program was:" >&5
5573 cat conftest.$ac_ext >&5
5575 eval "ac_cv_lib_$ac_lib_var=no"
5578 LIBS="$ac_save_LIBS"
5581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5582 echo "$ac_t""yes" 1>&6
5583 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
5585 echo "$ac_t""no" 1>&6
5586 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
5587 echo "configure:5599: checking for getprpwnam in -lsecurity" >&5
5588 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
5589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5590 echo $ac_n "(cached) $ac_c" 1>&6
5592 ac_save_LIBS="$LIBS"
5593 LIBS="-lsecurity $LIBS"
5594 cat > conftest.$ac_ext <<EOF
5595 #line 5607 "configure"
5596 #include "confdefs.h"
5597 /* Override any gcc2 internal prototype to avoid an error. */
5598 /* We use char because int might match the return type of a gcc2
5599 builtin and then its argument prototype would still apply. */
5606 if { (eval echo configure:5618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5608 eval "ac_cv_lib_$ac_lib_var=yes"
5610 echo "configure: failed program was:" >&5
5611 cat conftest.$ac_ext >&5
5613 eval "ac_cv_lib_$ac_lib_var=no"
5616 LIBS="$ac_save_LIBS"
5619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5620 echo "$ac_t""yes" 1>&6
5621 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5623 echo "$ac_t""no" 1>&6
5631 ###############################################################################
5633 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
5635 ###############################################################################
5637 if test "$with_shadow" = yes ; then
5638 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5639 echo "configure:5651: checking for HP-style shadow passwords" >&5
5640 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5641 echo $ac_n "(cached) $ac_c" 1>&6
5644 ac_save_CPPFLAGS="$CPPFLAGS"
5645 if test \! -z "$includedir" ; then
5646 CPPFLAGS="$CPPFLAGS -I$includedir"
5648 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5649 cat > conftest.$ac_ext <<EOF
5650 #line 5662 "configure"
5651 #include "confdefs.h"
5654 #include <sys/types.h>
5656 #include <hpsecurity.h>
5659 struct s_passwd *p = getspwnam("nobody");
5660 const char *pw = p->pw_passwd;
5663 if { (eval echo configure:5675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5665 ac_cv_hpux_passwd=yes
5667 echo "configure: failed program was:" >&5
5668 cat conftest.$ac_ext >&5
5670 ac_cv_hpux_passwd=no
5673 CPPFLAGS="$ac_save_CPPFLAGS"
5676 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
5677 if test "$ac_cv_hpux_passwd" = yes; then
5678 have_shadow_hpux=yes
5682 # on HPUX, bigcrypt is in -lsec
5683 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
5684 echo "configure:5696: checking for bigcrypt in -lsec" >&5
5685 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
5686 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5687 echo $ac_n "(cached) $ac_c" 1>&6
5689 ac_save_LIBS="$LIBS"
5691 cat > conftest.$ac_ext <<EOF
5692 #line 5704 "configure"
5693 #include "confdefs.h"
5694 /* Override any gcc2 internal prototype to avoid an error. */
5695 /* We use char because int might match the return type of a gcc2
5696 builtin and then its argument prototype would still apply. */
5703 if { (eval echo configure:5715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5705 eval "ac_cv_lib_$ac_lib_var=yes"
5707 echo "configure: failed program was:" >&5
5708 cat conftest.$ac_ext >&5
5710 eval "ac_cv_lib_$ac_lib_var=no"
5713 LIBS="$ac_save_LIBS"
5716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5717 echo "$ac_t""yes" 1>&6
5718 PASSWD_LIBS="$PASSWD_LIBS -lsec"
5720 echo "$ac_t""no" 1>&6
5727 ###############################################################################
5729 # Check for FreeBSD-style shadow passwords.
5731 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
5732 # password systems -- except you only get stuff in the pw_passwd field
5733 # if the running program is setuid. So, guess that we've got this
5734 # lossage to contend with if /etc/master.passwd exists, and default to
5735 # a setuid installation.
5737 ###############################################################################
5739 if test "$with_shadow" = yes ; then
5740 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
5741 echo "configure:5753: checking for FreeBSD-style shadow passwords" >&5
5742 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
5743 echo $ac_n "(cached) $ac_c" 1>&6
5745 if test -f /etc/master.passwd ; then
5746 ac_cv_master_passwd=yes
5748 ac_cv_master_passwd=no
5752 echo "$ac_t""$ac_cv_master_passwd" 1>&6
5753 if test "$ac_cv_master_passwd" = yes; then
5759 ###############################################################################
5761 # Check for traditional (ha!) shadow passwords.
5763 ###############################################################################
5765 if test "$with_shadow" = yes ; then
5766 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
5767 echo "configure:5779: checking for generic shadow passwords" >&5
5768 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
5769 echo $ac_n "(cached) $ac_c" 1>&6
5772 ac_save_CPPFLAGS="$CPPFLAGS"
5773 if test \! -z "$includedir" ; then
5774 CPPFLAGS="$CPPFLAGS -I$includedir"
5776 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5777 cat > conftest.$ac_ext <<EOF
5778 #line 5790 "configure"
5779 #include "confdefs.h"
5782 #include <sys/types.h>
5786 struct spwd *p = getspnam("nobody");
5787 const char *pw = p->sp_pwdp;
5790 if { (eval echo configure:5802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5794 echo "configure: failed program was:" >&5
5795 cat conftest.$ac_ext >&5
5800 CPPFLAGS="$ac_save_CPPFLAGS"
5803 echo "$ac_t""$ac_cv_shadow" 1>&6
5804 if test "$ac_cv_shadow" = yes; then
5808 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
5810 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
5811 echo "configure:5823: checking for getspnam in -lc" >&5
5812 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
5813 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5814 echo $ac_n "(cached) $ac_c" 1>&6
5816 ac_save_LIBS="$LIBS"
5818 cat > conftest.$ac_ext <<EOF
5819 #line 5831 "configure"
5820 #include "confdefs.h"
5821 /* Override any gcc2 internal prototype to avoid an error. */
5822 /* We use char because int might match the return type of a gcc2
5823 builtin and then its argument prototype would still apply. */
5830 if { (eval echo configure:5842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5832 eval "ac_cv_lib_$ac_lib_var=yes"
5834 echo "configure: failed program was:" >&5
5835 cat conftest.$ac_ext >&5
5837 eval "ac_cv_lib_$ac_lib_var=no"
5840 LIBS="$ac_save_LIBS"
5843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5844 echo "$ac_t""yes" 1>&6
5847 echo "$ac_t""no" 1>&6
5850 if test "$have_getspnam" = no ; then
5851 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
5852 echo "configure:5864: checking for getspnam in -lgen" >&5
5853 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
5854 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5855 echo $ac_n "(cached) $ac_c" 1>&6
5857 ac_save_LIBS="$LIBS"
5859 cat > conftest.$ac_ext <<EOF
5860 #line 5872 "configure"
5861 #include "confdefs.h"
5862 /* Override any gcc2 internal prototype to avoid an error. */
5863 /* We use char because int might match the return type of a gcc2
5864 builtin and then its argument prototype would still apply. */
5871 if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5873 eval "ac_cv_lib_$ac_lib_var=yes"
5875 echo "configure: failed program was:" >&5
5876 cat conftest.$ac_ext >&5
5878 eval "ac_cv_lib_$ac_lib_var=no"
5881 LIBS="$ac_save_LIBS"
5884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5885 echo "$ac_t""yes" 1>&6
5886 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
5888 echo "$ac_t""no" 1>&6
5896 ###############################################################################
5898 # Check for other libraries needed for non-shadow passwords.
5900 ###############################################################################
5902 if test "$enable_locking" = yes ; then
5904 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
5906 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
5907 echo "configure:5919: checking for crypt in -lc" >&5
5908 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
5909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5910 echo $ac_n "(cached) $ac_c" 1>&6
5912 ac_save_LIBS="$LIBS"
5914 cat > conftest.$ac_ext <<EOF
5915 #line 5927 "configure"
5916 #include "confdefs.h"
5917 /* Override any gcc2 internal prototype to avoid an error. */
5918 /* We use char because int might match the return type of a gcc2
5919 builtin and then its argument prototype would still apply. */
5926 if { (eval echo configure:5938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5928 eval "ac_cv_lib_$ac_lib_var=yes"
5930 echo "configure: failed program was:" >&5
5931 cat conftest.$ac_ext >&5
5933 eval "ac_cv_lib_$ac_lib_var=no"
5936 LIBS="$ac_save_LIBS"
5939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5940 echo "$ac_t""yes" 1>&6
5943 echo "$ac_t""no" 1>&6
5946 if test "$have_crypt" = no ; then
5947 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
5948 echo "configure:5960: checking for crypt in -lcrypt" >&5
5949 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
5950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5951 echo $ac_n "(cached) $ac_c" 1>&6
5953 ac_save_LIBS="$LIBS"
5954 LIBS="-lcrypt $LIBS"
5955 cat > conftest.$ac_ext <<EOF
5956 #line 5968 "configure"
5957 #include "confdefs.h"
5958 /* Override any gcc2 internal prototype to avoid an error. */
5959 /* We use char because int might match the return type of a gcc2
5960 builtin and then its argument prototype would still apply. */
5967 if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5969 eval "ac_cv_lib_$ac_lib_var=yes"
5971 echo "configure: failed program was:" >&5
5972 cat conftest.$ac_ext >&5
5974 eval "ac_cv_lib_$ac_lib_var=no"
5977 LIBS="$ac_save_LIBS"
5980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5981 echo "$ac_t""yes" 1>&6
5982 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
5984 echo "$ac_t""no" 1>&6
5991 # Most of the above shadow mechanisms will have set need_setuid to yes,
5992 # if they were found. But, on some systems, we need setuid even when
5993 # using plain old vanilla passwords.
5995 if test "$enable_locking" = yes ; then
5997 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
6004 if test "$have_shadow_adjunct" = yes ; then
6005 cat >> confdefs.h <<\EOF
6006 #define HAVE_ADJUNCT_PASSWD 1
6009 elif test "$have_shadow_enhanced" = yes ; then
6010 cat >> confdefs.h <<\EOF
6011 #define HAVE_ENHANCED_PASSWD 1
6014 elif test "$have_shadow_hpux" = yes ; then
6015 cat >> confdefs.h <<\EOF
6016 #define HAVE_HPUX_PASSWD 1
6019 elif test "$have_shadow" = yes ; then
6020 cat >> confdefs.h <<\EOF
6021 #define HAVE_SHADOW_PASSWD 1
6027 ###############################################################################
6031 ###############################################################################
6034 with_motif_req=unspecified
6035 # Check whether --with-motif or --without-motif was given.
6036 if test "${with_motif+set}" = set; then
6037 withval="$with_motif"
6038 with_motif="$withval"; with_motif_req="$withval"
6045 case "$with_motif" in
6050 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
6051 echo "configure:6063: checking for Motif headers" >&5
6052 d=$with_motif/include
6054 X_CFLAGS="-I$d $X_CFLAGS"
6055 echo "$ac_t""$d" 1>&6
6057 echo "$ac_t""not found ($d: no such directory)" 1>&6
6060 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
6061 echo "configure:6073: checking for Motif libs" >&5
6064 X_LIBS="-L$d $X_LIBS"
6065 echo "$ac_t""$d" 1>&6
6067 echo "$ac_t""not found ($d: no such directory)" 1>&6
6070 # replace the directory string with "yes".
6071 with_motif_req="yes"
6072 with_motif=$with_motif_req
6077 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6078 echo " If it is a directory, then \`DIR/include' will be added to"
6079 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6085 if test "$with_motif" != yes -a "$with_motif" != no ; then
6086 echo "error: must be yes or no: --with-motif=$with_motif"
6090 if test "$with_motif" = yes; then
6093 ac_save_CPPFLAGS="$CPPFLAGS"
6094 if test \! -z "$includedir" ; then
6095 CPPFLAGS="$CPPFLAGS -I$includedir"
6097 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6098 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6099 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6100 echo "configure:6112: checking for Xm/Xm.h" >&5
6101 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6102 echo $ac_n "(cached) $ac_c" 1>&6
6104 cat > conftest.$ac_ext <<EOF
6105 #line 6117 "configure"
6106 #include "confdefs.h"
6109 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6110 { (eval echo configure:6122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6111 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6112 if test -z "$ac_err"; then
6114 eval "ac_cv_header_$ac_safe=yes"
6117 echo "configure: failed program was:" >&5
6118 cat conftest.$ac_ext >&5
6120 eval "ac_cv_header_$ac_safe=no"
6124 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6125 echo "$ac_t""yes" 1>&6
6127 cat >> confdefs.h <<\EOF
6128 #define HAVE_MOTIF 1
6131 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6133 echo "$ac_t""no" 1>&6
6136 CPPFLAGS="$ac_save_CPPFLAGS"
6140 if test "$have_motif" = yes; then
6142 ac_save_CPPFLAGS="$CPPFLAGS"
6143 if test \! -z "$includedir" ; then
6144 CPPFLAGS="$CPPFLAGS -I$includedir"
6146 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6147 ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
6148 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
6149 echo "configure:6161: checking for Xm/ComboBox.h" >&5
6150 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6151 echo $ac_n "(cached) $ac_c" 1>&6
6153 cat > conftest.$ac_ext <<EOF
6154 #line 6166 "configure"
6155 #include "confdefs.h"
6156 #include <Xm/ComboBox.h>
6158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6159 { (eval echo configure:6171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6161 if test -z "$ac_err"; then
6163 eval "ac_cv_header_$ac_safe=yes"
6166 echo "configure: failed program was:" >&5
6167 cat conftest.$ac_ext >&5
6169 eval "ac_cv_header_$ac_safe=no"
6173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6174 echo "$ac_t""yes" 1>&6
6175 cat >> confdefs.h <<\EOF
6176 #define HAVE_XMCOMBOBOX 1
6180 echo "$ac_t""no" 1>&6
6183 CPPFLAGS="$ac_save_CPPFLAGS"
6187 ###############################################################################
6189 # Check for -lgtk (and Gnome stuff)
6191 ###############################################################################
6194 with_gtk_req=unspecified
6195 # Check whether --with-gtk or --without-gtk was given.
6196 if test "${with_gtk+set}" = set; then
6198 with_gtk="$withval"; with_gtk_req="$withval"
6204 # if --with-gtk=/directory/ was specified, remember that directory so that
6205 # we can also look for the `gtk-config' program in that directory.
6221 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6222 echo "configure:6234: checking for Gtk headers" >&5
6225 X_CFLAGS="-I$d $X_CFLAGS"
6226 echo "$ac_t""$d" 1>&6
6228 echo "$ac_t""not found ($d: no such directory)" 1>&6
6231 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6232 echo "configure:6244: checking for Gtk libs" >&5
6235 X_LIBS="-L$d $X_LIBS"
6236 echo "$ac_t""$d" 1>&6
6238 echo "$ac_t""not found ($d: no such directory)" 1>&6
6241 # replace the directory string with "yes".
6243 with_gtk=$with_gtk_req
6248 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6249 echo " If it is a directory, then \`DIR/include' will be added to"
6250 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6256 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6257 echo "error: must be yes or no: --with-gtk=$with_gtk"
6262 with_gnome_req=unspecified
6263 # Check whether --with-gnome or --without-gnome was given.
6264 if test "${with_gnome+set}" = set; then
6265 withval="$with_gnome"
6266 with_gnome="$withval"; with_gnome_req="$withval"
6272 # if --with-gnome=/directory/ was specified, remember that directory so that
6273 # we can also look for the `gnome-config' program in that directory.
6274 case "$with_gnome" in
6276 gnome_dir="$with_gnome"
6284 case "$with_gnome" in
6289 echo $ac_n "checking for Gnome headers""... $ac_c" 1>&6
6290 echo "configure:6302: checking for Gnome headers" >&5
6291 d=$with_gnome/include
6293 X_CFLAGS="-I$d $X_CFLAGS"
6294 echo "$ac_t""$d" 1>&6
6296 echo "$ac_t""not found ($d: no such directory)" 1>&6
6299 echo $ac_n "checking for Gnome libs""... $ac_c" 1>&6
6300 echo "configure:6312: checking for Gnome libs" >&5
6303 X_LIBS="-L$d $X_LIBS"
6304 echo "$ac_t""$d" 1>&6
6306 echo "$ac_t""not found ($d: no such directory)" 1>&6
6309 # replace the directory string with "yes".
6310 with_gnome_req="yes"
6311 with_gnome=$with_gnome_req
6316 echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
6317 echo " If it is a directory, then \`DIR/include' will be added to"
6318 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6324 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
6325 echo "error: must be yes or no: --with-gnome=$with_gnome"
6331 if test "$with_gtk" = yes; then
6334 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6335 # for glib-config and gtk-config.
6339 if test ! -z "$gtk_dir"; then
6340 # canonicalize slashes.
6341 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6342 gtk_path="$gtk_dir:$gtk_path"
6345 if test ! -z "gnome_dir"; then
6346 # canonicalize slashes.
6347 gnome_dir=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
6348 gtk_path="$gnome_dir:$gtk_path"
6351 for ac_prog in glib-config
6353 # Extract the first word of "$ac_prog", so it can be a program name with args.
6354 set dummy $ac_prog; ac_word=$2
6355 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6356 echo "configure:6368: checking for $ac_word" >&5
6357 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6358 echo $ac_n "(cached) $ac_c" 1>&6
6360 case "$glib_config" in
6362 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6365 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6368 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6369 ac_dummy="$gtk_path"
6370 for ac_dir in $ac_dummy; do
6371 test -z "$ac_dir" && ac_dir=.
6372 if test -f $ac_dir/$ac_word; then
6373 ac_cv_path_glib_config="$ac_dir/$ac_word"
6381 glib_config="$ac_cv_path_glib_config"
6382 if test -n "$glib_config"; then
6383 echo "$ac_t""$glib_config" 1>&6
6385 echo "$ac_t""no" 1>&6
6388 test -n "$glib_config" && break
6391 for ac_prog in gtk-config
6393 # Extract the first word of "$ac_prog", so it can be a program name with args.
6394 set dummy $ac_prog; ac_word=$2
6395 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6396 echo "configure:6408: checking for $ac_word" >&5
6397 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6398 echo $ac_n "(cached) $ac_c" 1>&6
6400 case "$gtk_config" in
6402 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6405 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6408 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6409 ac_dummy="$gtk_path"
6410 for ac_dir in $ac_dummy; do
6411 test -z "$ac_dir" && ac_dir=.
6412 if test -f $ac_dir/$ac_word; then
6413 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6421 gtk_config="$ac_cv_path_gtk_config"
6422 if test -n "$gtk_config"; then
6423 echo "$ac_t""$gtk_config" 1>&6
6425 echo "$ac_t""no" 1>&6
6428 test -n "$gtk_config" && break
6432 if test "$with_gnome" = yes; then
6433 for ac_prog in gnome-config
6435 # Extract the first word of "$ac_prog", so it can be a program name with args.
6436 set dummy $ac_prog; ac_word=$2
6437 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6438 echo "configure:6450: checking for $ac_word" >&5
6439 if eval "test \"`echo '$''{'ac_cv_path_gnome_config'+set}'`\" = set"; then
6440 echo $ac_n "(cached) $ac_c" 1>&6
6442 case "$gnome_config" in
6444 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
6447 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a dos path.
6450 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6451 ac_dummy="$gtk_path"
6452 for ac_dir in $ac_dummy; do
6453 test -z "$ac_dir" && ac_dir=.
6454 if test -f $ac_dir/$ac_word; then
6455 ac_cv_path_gnome_config="$ac_dir/$ac_word"
6463 gnome_config="$ac_cv_path_gnome_config"
6464 if test -n "$gnome_config"; then
6465 echo "$ac_t""$gnome_config" 1>&6
6467 echo "$ac_t""no" 1>&6
6470 test -n "$gnome_config" && break
6475 if test -n "$glib_config" -a -n "gtk_config" ; then
6477 if test "$with_gnome" = yes -a -n "$gnome_config" ; then
6482 if test "$have_gtk" = yes; then
6483 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6484 echo "configure:6496: checking Gtk version number" >&5
6485 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6486 echo $ac_n "(cached) $ac_c" 1>&6
6488 ac_cv_gtk_version_string=`$glib_config --version`
6491 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6492 ac_gtk_version_string=$ac_cv_gtk_version_string
6495 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6496 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6498 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6499 if test -z "$ac_gtk_version"; then
6500 ac_gtk_version=unknown
6501 ac_gtk_version_string=unknown
6503 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6511 if test "$have_gtk" = yes; then
6512 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6513 echo "configure:6525: checking for Gtk includes" >&5
6514 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6515 echo $ac_n "(cached) $ac_c" 1>&6
6517 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6520 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6521 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6522 echo "configure:6534: checking for Gtk libs" >&5
6523 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6524 echo $ac_n "(cached) $ac_c" 1>&6
6526 ac_cv_gtk_config_libs=`$gtk_config --libs`
6529 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6531 ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
6532 ac_gtk_config_libs=$ac_cv_gtk_config_libs
6534 # Check for Gnome Capplet support.
6536 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6537 gnome_config_libs="capplet gnomeui"
6538 echo $ac_n "checking for Gnome capplet includes""... $ac_c" 1>&6
6539 echo "configure:6551: checking for Gnome capplet includes" >&5
6540 if eval "test \"`echo '$''{'ac_cv_gnome_config_cflags'+set}'`\" = set"; then
6541 echo $ac_n "(cached) $ac_c" 1>&6
6543 if ( $gnome_config --cflags $gnome_config_libs 2>&1 >/dev/null | \
6544 grep -q Unknown ) ; then
6545 ac_cv_gnome_config_cflags=''
6547 ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
6551 ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
6552 if test "$ac_gnome_config_cflags" = "" ; then
6554 echo "$ac_t""no" 1>&6
6556 echo "$ac_t""$ac_gnome_config_cflags" 1>&6
6560 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6561 echo $ac_n "checking for Gnome capplet libs""... $ac_c" 1>&6
6562 echo "configure:6574: checking for Gnome capplet libs" >&5
6563 if eval "test \"`echo '$''{'ac_cv_gnome_config_libs'+set}'`\" = set"; then
6564 echo $ac_n "(cached) $ac_c" 1>&6
6566 if ( $gnome_config --libs $gnome_config_libs 2>&1 >/dev/null |
6567 grep -q Unknown ) ; then
6568 ac_cv_gnome_config_libs=''
6570 ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
6574 ac_gnome_config_libs=$ac_cv_gnome_config_libs
6575 if test "$ac_gnome_config_libs" = "" ; then
6577 echo "$ac_t""no" 1>&6
6579 echo "$ac_t""$ac_gnome_config_libs" 1>&6
6584 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6585 GNOME_DATADIR=`$gnome_config --datadir`
6589 # If we have Gnome, then override the gtk-config values with
6590 # the gnome-config values.
6592 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6593 ac_gtk_config_cflags=$ac_gnome_config_cflags
6594 ac_gtk_config_libs=$ac_gnome_config_libs
6595 cat >> confdefs.h <<\EOF
6596 #define HAVE_CRAPPLET 1
6602 if test "$have_gtk" = yes; then
6603 INCLUDES="$INCLUDES $ac_gtk_config_cflags"
6604 GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
6605 cat >> confdefs.h <<\EOF
6614 ###############################################################################
6616 # Checking whether Motif is really Lesstif.
6618 ###############################################################################
6621 if test "$have_motif" = yes ; then
6622 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6623 echo "configure:6635: checking whether Motif is really LessTif" >&5
6624 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6625 echo $ac_n "(cached) $ac_c" 1>&6
6628 ac_save_CPPFLAGS="$CPPFLAGS"
6629 if test \! -z "$includedir" ; then
6630 CPPFLAGS="$CPPFLAGS -I$includedir"
6632 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6633 cat > conftest.$ac_ext <<EOF
6634 #line 6646 "configure"
6635 #include "confdefs.h"
6638 long vers = LesstifVersion;
6641 if { (eval echo configure:6653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6643 ac_cv_have_lesstif=yes
6645 echo "configure: failed program was:" >&5
6646 cat conftest.$ac_ext >&5
6648 ac_cv_have_lesstif=no
6651 CPPFLAGS="$ac_save_CPPFLAGS"
6654 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
6655 have_lesstif=$ac_cv_have_lesstif
6659 lesstif_version=unknown
6660 lesstif_version_string=unknown
6662 if test "$have_lesstif" = yes ; then
6664 echo unknown > conftest-lt
6665 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
6666 echo "configure:6678: checking LessTif version number" >&5
6667 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
6668 echo $ac_n "(cached) $ac_c" 1>&6
6671 ac_save_CPPFLAGS="$CPPFLAGS"
6672 if test \! -z "$includedir" ; then
6673 CPPFLAGS="$CPPFLAGS -I$includedir"
6675 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6676 if test "$cross_compiling" = yes; then
6677 ac_cv_lesstif_version=unknown
6678 ac_cv_lesstif_version_string=unknown
6680 cat > conftest.$ac_ext <<EOF
6681 #line 6693 "configure"
6682 #include "confdefs.h"
6686 FILE *f = fopen("conftest-lt", "w");
6688 fprintf(f, "%d %d.%d\n", LesstifVersion,
6689 LESSTIF_VERSION, LESSTIF_REVISION);
6694 if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6696 ltv=`cat conftest-lt`
6697 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
6698 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
6700 echo "configure: failed program was:" >&5
6701 cat conftest.$ac_ext >&5
6703 ac_cv_lesstif_version=unknown
6704 ac_cv_lesstif_version_string=unknown
6709 CPPFLAGS="$ac_save_CPPFLAGS"
6712 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
6714 lesstif_version=$ac_cv_lesstif_version
6715 lesstif_version_string=$ac_cv_lesstif_version_string
6720 if test "$have_motif" = yes ; then
6722 echo unknown > conftest-mt
6723 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
6724 echo "configure:6736: checking Motif version number" >&5
6725 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
6726 echo $ac_n "(cached) $ac_c" 1>&6
6729 ac_save_CPPFLAGS="$CPPFLAGS"
6730 if test \! -z "$includedir" ; then
6731 CPPFLAGS="$CPPFLAGS -I$includedir"
6733 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6734 if test "$cross_compiling" = yes; then
6735 ac_cv_motif_version=unknown
6736 ac_cv_motif_version_string=unknown
6738 cat > conftest.$ac_ext <<EOF
6739 #line 6751 "configure"
6740 #include "confdefs.h"
6744 FILE *f = fopen("conftest-mt", "w");
6746 fprintf(f, "%d %d.%d\n", XmVersion,
6747 XmVERSION, XmREVISION);
6752 if { (eval echo configure:6764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6754 mtv=`cat conftest-mt`
6755 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
6756 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
6758 echo "configure: failed program was:" >&5
6759 cat conftest.$ac_ext >&5
6761 ac_cv_motif_version=unknown
6762 ac_cv_motif_version_string=unknown
6767 CPPFLAGS="$ac_save_CPPFLAGS"
6770 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
6772 motif_version=$ac_cv_motif_version
6773 motif_version_string=$ac_cv_motif_version_string
6778 ###############################################################################
6780 # Checking whether Motif requires -lXpm.
6782 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
6783 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
6784 # of the library whether to build the XPM code into libXm, or whether
6785 # to rely on an external libXm. So the only way to tell whether XPM is
6786 # a link-time requirement is to examine libXm.a, which is very
6787 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
6788 # always link against XPM if the XPM lib exists (and this will be a
6789 # no-op if libXm happens to already have the XPM code in it.)
6791 ###############################################################################
6793 motif_requires_xpm=no
6794 if test "$have_motif" = yes ; then
6795 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
6796 echo "configure:6808: checking whether Motif requires XPM" >&5
6797 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
6799 motif_requires_xpm=yes
6800 echo "$ac_t""maybe" 1>&6
6802 echo "$ac_t""no" 1>&6
6807 ###############################################################################
6809 # Checking whether Motif requires -lXp.
6811 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
6812 # Extension". Why this extension isn't in -lXext with all the others,
6815 ###############################################################################
6818 if test "$have_motif" = yes ; then
6821 ac_save_CPPFLAGS="$CPPFLAGS"
6822 ac_save_LDFLAGS="$LDFLAGS"
6823 # ac_save_LIBS="$LIBS"
6825 if test \! -z "$includedir" ; then
6826 CPPFLAGS="$CPPFLAGS -I$includedir"
6828 # note: $X_CFLAGS includes $x_includes
6829 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6831 if test \! -z "$libdir" ; then
6832 LDFLAGS="$LDFLAGS -L$libdir"
6834 # note: $X_LIBS includes $x_libraries
6835 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6837 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
6838 echo "configure:6850: checking for XpQueryExtension in -lXp" >&5
6839 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
6840 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6841 echo $ac_n "(cached) $ac_c" 1>&6
6843 ac_save_LIBS="$LIBS"
6844 LIBS="-lXp -lX11 -lXext -lm $LIBS"
6845 cat > conftest.$ac_ext <<EOF
6846 #line 6858 "configure"
6847 #include "confdefs.h"
6848 /* Override any gcc2 internal prototype to avoid an error. */
6849 /* We use char because int might match the return type of a gcc2
6850 builtin and then its argument prototype would still apply. */
6851 char XpQueryExtension();
6857 if { (eval echo configure:6869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6859 eval "ac_cv_lib_$ac_lib_var=yes"
6861 echo "configure: failed program was:" >&5
6862 cat conftest.$ac_ext >&5
6864 eval "ac_cv_lib_$ac_lib_var=no"
6867 LIBS="$ac_save_LIBS"
6870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6871 echo "$ac_t""yes" 1>&6
6872 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
6874 echo "$ac_t""no" 1>&6
6878 CPPFLAGS="$ac_save_CPPFLAGS"
6879 LDFLAGS="$ac_save_LDFLAGS"
6880 # LIBS="$ac_save_LIBS"
6885 ###############################################################################
6887 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
6889 ###############################################################################
6892 if test "$have_motif" = yes ; then
6894 ac_save_CPPFLAGS="$CPPFLAGS"
6895 ac_save_LDFLAGS="$LDFLAGS"
6896 # ac_save_LIBS="$LIBS"
6898 if test \! -z "$includedir" ; then
6899 CPPFLAGS="$CPPFLAGS -I$includedir"
6901 # note: $X_CFLAGS includes $x_includes
6902 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6904 if test \! -z "$libdir" ; then
6905 LDFLAGS="$LDFLAGS -L$libdir"
6907 # note: $X_LIBS includes $x_libraries
6908 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6910 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
6911 echo "configure:6923: checking for _Xsetlocale in -lXintl" >&5
6912 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
6913 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6914 echo $ac_n "(cached) $ac_c" 1>&6
6916 ac_save_LIBS="$LIBS"
6917 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
6918 cat > conftest.$ac_ext <<EOF
6919 #line 6931 "configure"
6920 #include "confdefs.h"
6921 /* Override any gcc2 internal prototype to avoid an error. */
6922 /* We use char because int might match the return type of a gcc2
6923 builtin and then its argument prototype would still apply. */
6930 if { (eval echo configure:6942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6932 eval "ac_cv_lib_$ac_lib_var=yes"
6934 echo "configure: failed program was:" >&5
6935 cat conftest.$ac_ext >&5
6937 eval "ac_cv_lib_$ac_lib_var=no"
6940 LIBS="$ac_save_LIBS"
6943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6944 echo "$ac_t""yes" 1>&6
6947 echo "$ac_t""no" 1>&6
6951 CPPFLAGS="$ac_save_CPPFLAGS"
6952 LDFLAGS="$ac_save_LDFLAGS"
6953 # LIBS="$ac_save_LIBS"
6955 if test "$have_xintl" = yes; then
6956 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
6961 ###############################################################################
6963 # Check for -lGL or -lMesaGL.
6965 ###############################################################################
6969 with_gl_req=unspecified
6971 # Check whether --with-gl or --without-gl was given.
6972 if test "${with_gl+set}" = set; then
6974 with_gl="$withval"; with_gl_req="$withval"
6986 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
6987 echo "configure:6999: checking for GL headers" >&5
6990 X_CFLAGS="-I$d $X_CFLAGS"
6991 echo "$ac_t""$d" 1>&6
6993 echo "$ac_t""not found ($d: no such directory)" 1>&6
6996 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
6997 echo "configure:7009: checking for GL libs" >&5
7000 X_LIBS="-L$d $X_LIBS"
7001 echo "$ac_t""$d" 1>&6
7003 echo "$ac_t""not found ($d: no such directory)" 1>&6
7006 # replace the directory string with "yes".
7008 with_gl=$with_gl_req
7013 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
7014 echo " If it is a directory, then \`DIR/include' will be added to"
7015 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7021 ac_mesagl_version=unknown
7022 ac_mesagl_version_string=unknown
7024 if test "$with_gl" = yes; then
7026 ac_save_CPPFLAGS="$CPPFLAGS"
7027 if test \! -z "$includedir" ; then
7028 CPPFLAGS="$CPPFLAGS -I$includedir"
7030 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7031 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
7032 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
7033 echo "configure:7045: checking for GL/gl.h" >&5
7034 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7035 echo $ac_n "(cached) $ac_c" 1>&6
7037 cat > conftest.$ac_ext <<EOF
7038 #line 7050 "configure"
7039 #include "confdefs.h"
7042 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7043 { (eval echo configure:7055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7044 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7045 if test -z "$ac_err"; then
7047 eval "ac_cv_header_$ac_safe=yes"
7050 echo "configure: failed program was:" >&5
7051 cat conftest.$ac_ext >&5
7053 eval "ac_cv_header_$ac_safe=no"
7057 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7058 echo "$ac_t""yes" 1>&6
7061 echo "$ac_t""no" 1>&6
7064 CPPFLAGS="$ac_save_CPPFLAGS"
7065 if test "$have_gl" = yes ; then
7067 ac_save_CPPFLAGS="$CPPFLAGS"
7068 if test \! -z "$includedir" ; then
7069 CPPFLAGS="$CPPFLAGS -I$includedir"
7071 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7072 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
7073 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
7074 echo "configure:7086: checking for GL/glx.h" >&5
7075 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7076 echo $ac_n "(cached) $ac_c" 1>&6
7078 cat > conftest.$ac_ext <<EOF
7079 #line 7091 "configure"
7080 #include "confdefs.h"
7083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7084 { (eval echo configure:7096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7086 if test -z "$ac_err"; then
7088 eval "ac_cv_header_$ac_safe=yes"
7091 echo "configure: failed program was:" >&5
7092 cat conftest.$ac_ext >&5
7094 eval "ac_cv_header_$ac_safe=no"
7098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7099 echo "$ac_t""yes" 1>&6
7102 echo "$ac_t""no" 1>&6
7105 CPPFLAGS="$ac_save_CPPFLAGS"
7108 # If we have the headers, try and figure out which vendor it's from.
7110 if test "$have_gl" = yes ; then
7112 # We need to know whether it's MesaGL so that we know which libraries
7115 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7116 echo "configure:7128: checking whether GL is really MesaGL" >&5
7117 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7118 echo $ac_n "(cached) $ac_c" 1>&6
7120 ac_cv_have_mesa_gl=no
7122 ac_save_CPPFLAGS="$CPPFLAGS"
7123 if test \! -z "$includedir" ; then
7124 CPPFLAGS="$CPPFLAGS -I$includedir"
7126 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7127 cat > conftest.$ac_ext <<EOF
7128 #line 7140 "configure"
7129 #include "confdefs.h"
7132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7133 egrep "Mesa" >/dev/null 2>&1; then
7135 ac_cv_have_mesa_gl=yes
7139 CPPFLAGS="$ac_save_CPPFLAGS"
7143 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7144 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7151 # Some versions of MesaGL are compiled to require -lpthread.
7152 # So if the Mesa headers exist, and -lpthread exists, then always
7153 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
7155 if test "$ac_have_mesa_gl" = yes; then
7156 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7157 echo "configure:7169: checking for pthread_create in -lpthread" >&5
7158 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7159 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7160 echo $ac_n "(cached) $ac_c" 1>&6
7162 ac_save_LIBS="$LIBS"
7163 LIBS="-lpthread $LIBS"
7164 cat > conftest.$ac_ext <<EOF
7165 #line 7177 "configure"
7166 #include "confdefs.h"
7167 /* Override any gcc2 internal prototype to avoid an error. */
7168 /* We use char because int might match the return type of a gcc2
7169 builtin and then its argument prototype would still apply. */
7170 char pthread_create();
7176 if { (eval echo configure:7188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7178 eval "ac_cv_lib_$ac_lib_var=yes"
7180 echo "configure: failed program was:" >&5
7181 cat conftest.$ac_ext >&5
7183 eval "ac_cv_lib_$ac_lib_var=no"
7186 LIBS="$ac_save_LIBS"
7189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7190 echo "$ac_t""yes" 1>&6
7193 echo "$ac_t""no" 1>&6
7199 # If we have Mesa headers, check to see if we can link against -lMesaGL.
7200 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
7201 # Else, warn that GL is busted. (We have the headers, but no libs.)
7204 if test "$ac_have_mesa_gl" = yes ; then
7206 ac_save_CPPFLAGS="$CPPFLAGS"
7207 ac_save_LDFLAGS="$LDFLAGS"
7208 # ac_save_LIBS="$LIBS"
7210 if test \! -z "$includedir" ; then
7211 CPPFLAGS="$CPPFLAGS -I$includedir"
7213 # note: $X_CFLAGS includes $x_includes
7214 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7216 if test \! -z "$libdir" ; then
7217 LDFLAGS="$LDFLAGS -L$libdir"
7219 # note: $X_LIBS includes $x_libraries
7220 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7222 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
7223 echo "configure:7235: checking for glXCreateContext in -lMesaGL" >&5
7224 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7225 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7226 echo $ac_n "(cached) $ac_c" 1>&6
7228 ac_save_LIBS="$LIBS"
7229 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7230 cat > conftest.$ac_ext <<EOF
7231 #line 7243 "configure"
7232 #include "confdefs.h"
7233 /* Override any gcc2 internal prototype to avoid an error. */
7234 /* We use char because int might match the return type of a gcc2
7235 builtin and then its argument prototype would still apply. */
7236 char glXCreateContext();
7242 if { (eval echo configure:7254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7244 eval "ac_cv_lib_$ac_lib_var=yes"
7246 echo "configure: failed program was:" >&5
7247 cat conftest.$ac_ext >&5
7249 eval "ac_cv_lib_$ac_lib_var=no"
7252 LIBS="$ac_save_LIBS"
7255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7256 echo "$ac_t""yes" 1>&6
7258 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
7260 echo "$ac_t""no" 1>&6
7263 CPPFLAGS="$ac_save_CPPFLAGS"
7264 LDFLAGS="$ac_save_LDFLAGS"
7265 # LIBS="$ac_save_LIBS"
7269 if test "$gl_lib_1" = "" ; then
7271 ac_save_CPPFLAGS="$CPPFLAGS"
7272 ac_save_LDFLAGS="$LDFLAGS"
7273 # ac_save_LIBS="$LIBS"
7275 if test \! -z "$includedir" ; then
7276 CPPFLAGS="$CPPFLAGS -I$includedir"
7278 # note: $X_CFLAGS includes $x_includes
7279 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7281 if test \! -z "$libdir" ; then
7282 LDFLAGS="$LDFLAGS -L$libdir"
7284 # note: $X_LIBS includes $x_libraries
7285 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7287 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7288 echo "configure:7300: checking for glXCreateContext in -lGL" >&5
7289 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7290 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7291 echo $ac_n "(cached) $ac_c" 1>&6
7293 ac_save_LIBS="$LIBS"
7294 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7295 cat > conftest.$ac_ext <<EOF
7296 #line 7308 "configure"
7297 #include "confdefs.h"
7298 /* Override any gcc2 internal prototype to avoid an error. */
7299 /* We use char because int might match the return type of a gcc2
7300 builtin and then its argument prototype would still apply. */
7301 char glXCreateContext();
7307 if { (eval echo configure:7319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7309 eval "ac_cv_lib_$ac_lib_var=yes"
7311 echo "configure: failed program was:" >&5
7312 cat conftest.$ac_ext >&5
7314 eval "ac_cv_lib_$ac_lib_var=no"
7317 LIBS="$ac_save_LIBS"
7320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7321 echo "$ac_t""yes" 1>&6
7323 GL_LIBS="-lGL -lGLU $GL_LIBS"
7325 echo "$ac_t""no" 1>&6
7328 CPPFLAGS="$ac_save_CPPFLAGS"
7329 LDFLAGS="$ac_save_LDFLAGS"
7330 # LIBS="$ac_save_LIBS"
7334 if test "$gl_lib_1" = "" ; then
7335 # we have headers, but no libs -- bail.
7340 # linking works -- we can build the GL hacks.
7341 cat >> confdefs.h <<\EOF
7345 if test "$ac_have_mesa_gl" = yes ; then
7346 cat >> confdefs.h <<\EOF
7347 #define HAVE_MESA_GL 1
7355 # Now that we know we have GL headers and libs, do some more GL testing.
7358 if test "$have_gl" = yes ; then
7359 # If it's MesaGL, we'd like to issue a warning if the version number
7360 # is less than or equal to 2.6, because that version had a security bug.
7362 if test "$ac_have_mesa_gl" = yes; then
7364 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7365 echo "configure:7377: checking MesaGL version number" >&5
7366 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7367 echo $ac_n "(cached) $ac_c" 1>&6
7369 cat > conftest.$ac_ext <<EOF
7370 #line 7382 "configure"
7371 #include "confdefs.h"
7373 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7376 ac_save_CPPFLAGS="$CPPFLAGS"
7377 if test \! -z "$includedir" ; then
7378 CPPFLAGS="$CPPFLAGS -I$includedir"
7380 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7384 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7385 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7388 rm -f conftest.$ac_ext
7390 CPPFLAGS="$ac_save_CPPFLAGS"
7392 if test "$mglv" = ""; then
7393 ac_mesagl_version=unknown
7394 ac_mesagl_version_string=unknown
7396 ac_mesagl_version_string=$mglv
7397 maj=`echo $mglv | sed -n 's/\..*//p'`
7398 min=`echo $mglv | sed -n 's/.*\.//p'`
7399 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7400 if test -z "$ac_mesagl_version"; then
7401 ac_mesagl_version=unknown
7402 ac_mesagl_version_string=unknown
7405 ac_cv_mesagl_version=$ac_mesagl_version
7406 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7410 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7411 ac_mesagl_version=$ac_cv_mesagl_version
7412 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7416 # Check for OpenGL 1.1 features.
7419 ac_save_CPPFLAGS="$CPPFLAGS"
7420 ac_save_LDFLAGS="$LDFLAGS"
7421 # ac_save_LIBS="$LIBS"
7423 if test \! -z "$includedir" ; then
7424 CPPFLAGS="$CPPFLAGS -I$includedir"
7426 # note: $X_CFLAGS includes $x_includes
7427 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7429 if test \! -z "$libdir" ; then
7430 LDFLAGS="$LDFLAGS -L$libdir"
7432 # note: $X_LIBS includes $x_libraries
7433 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7435 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7436 echo "configure:7448: checking for glBindTexture in -l$gl_lib_1" >&5
7437 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7438 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7439 echo $ac_n "(cached) $ac_c" 1>&6
7441 ac_save_LIBS="$LIBS"
7442 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7443 cat > conftest.$ac_ext <<EOF
7444 #line 7456 "configure"
7445 #include "confdefs.h"
7446 /* Override any gcc2 internal prototype to avoid an error. */
7447 /* We use char because int might match the return type of a gcc2
7448 builtin and then its argument prototype would still apply. */
7449 char glBindTexture();
7455 if { (eval echo configure:7467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7457 eval "ac_cv_lib_$ac_lib_var=yes"
7459 echo "configure: failed program was:" >&5
7460 cat conftest.$ac_ext >&5
7462 eval "ac_cv_lib_$ac_lib_var=no"
7465 LIBS="$ac_save_LIBS"
7468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7469 echo "$ac_t""yes" 1>&6
7470 cat >> confdefs.h <<\EOF
7471 #define HAVE_GLBINDTEXTURE 1
7475 echo "$ac_t""no" 1>&6
7479 CPPFLAGS="$ac_save_CPPFLAGS"
7480 LDFLAGS="$ac_save_LDFLAGS"
7481 # LIBS="$ac_save_LIBS"
7485 # Check whether the `xscreensaver' executable should link against GL.
7486 # See comments in utils/visual-gl.c for why this is sometimes necessary.
7488 echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6
7489 echo "configure:7501: checking whether drastic GL measures must be taken" >&5
7492 echo "$ac_t""yes -- hello, SGI." 1>&6
7493 cat >> confdefs.h <<\EOF
7494 #define DAEMON_USE_GL 1
7497 SAVER_GL_SRCS='$(UTILS_SRC)/visual-gl.c'
7498 SAVER_GL_OBJS='$(UTILS_BIN)/visual-gl.o'
7499 SAVER_GL_LIBS="$GL_LIBS"
7502 echo "$ac_t""no -- non-SGI." 1>&6
7511 elif test "$with_gl" != no; then
7512 echo "error: must be yes or no: --with-gl=$with_gl"
7517 ###############################################################################
7521 ###############################################################################
7524 with_gle_req=unspecified
7526 # Check whether --with-gle or --without-gle was given.
7527 if test "${with_gle+set}" = set; then
7529 with_gle="$withval"; with_gle_req="$withval"
7541 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7542 echo "configure:7554: checking for GLE headers" >&5
7545 X_CFLAGS="-I$d $X_CFLAGS"
7546 echo "$ac_t""$d" 1>&6
7548 echo "$ac_t""not found ($d: no such directory)" 1>&6
7551 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7552 echo "configure:7564: checking for GLE libs" >&5
7555 X_LIBS="-L$d $X_LIBS"
7556 echo "$ac_t""$d" 1>&6
7558 echo "$ac_t""not found ($d: no such directory)" 1>&6
7561 # replace the directory string with "yes".
7563 with_gle=$with_gle_req
7568 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7569 echo " If it is a directory, then \`DIR/include' will be added to"
7570 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7578 if test "$with_gle" = yes; then
7581 ac_save_CPPFLAGS="$CPPFLAGS"
7582 if test \! -z "$includedir" ; then
7583 CPPFLAGS="$CPPFLAGS -I$includedir"
7585 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7586 ac_safe=`echo "GL/gle.h" | sed 'y%./+-%__p_%'`
7587 echo $ac_n "checking for GL/gle.h""... $ac_c" 1>&6
7588 echo "configure:7600: checking for GL/gle.h" >&5
7589 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7590 echo $ac_n "(cached) $ac_c" 1>&6
7592 cat > conftest.$ac_ext <<EOF
7593 #line 7605 "configure"
7594 #include "confdefs.h"
7597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7598 { (eval echo configure:7610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7600 if test -z "$ac_err"; then
7602 eval "ac_cv_header_$ac_safe=yes"
7605 echo "configure: failed program was:" >&5
7606 cat conftest.$ac_ext >&5
7608 eval "ac_cv_header_$ac_safe=no"
7612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7613 echo "$ac_t""yes" 1>&6
7616 echo "$ac_t""no" 1>&6
7619 CPPFLAGS="$ac_save_CPPFLAGS"
7620 if test "$have_gle3" = yes ; then
7624 ac_save_CPPFLAGS="$CPPFLAGS"
7625 if test \! -z "$includedir" ; then
7626 CPPFLAGS="$CPPFLAGS -I$includedir"
7628 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7629 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7630 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7631 echo "configure:7643: checking for GL/gutil.h" >&5
7632 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7633 echo $ac_n "(cached) $ac_c" 1>&6
7635 cat > conftest.$ac_ext <<EOF
7636 #line 7648 "configure"
7637 #include "confdefs.h"
7638 #include <GL/gutil.h>
7640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7641 { (eval echo configure:7653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7643 if test -z "$ac_err"; then
7645 eval "ac_cv_header_$ac_safe=yes"
7648 echo "configure: failed program was:" >&5
7649 cat conftest.$ac_ext >&5
7651 eval "ac_cv_header_$ac_safe=no"
7655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7656 echo "$ac_t""yes" 1>&6
7659 echo "$ac_t""no" 1>&6
7662 CPPFLAGS="$ac_save_CPPFLAGS"
7663 if test "$have_gle" = yes ; then
7665 ac_save_CPPFLAGS="$CPPFLAGS"
7666 if test \! -z "$includedir" ; then
7667 CPPFLAGS="$CPPFLAGS -I$includedir"
7669 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7670 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
7671 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
7672 echo "configure:7684: checking for GL/tube.h" >&5
7673 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7674 echo $ac_n "(cached) $ac_c" 1>&6
7676 cat > conftest.$ac_ext <<EOF
7677 #line 7689 "configure"
7678 #include "confdefs.h"
7679 #include <GL/tube.h>
7681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7682 { (eval echo configure:7694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7684 if test -z "$ac_err"; then
7686 eval "ac_cv_header_$ac_safe=yes"
7689 echo "configure: failed program was:" >&5
7690 cat conftest.$ac_ext >&5
7692 eval "ac_cv_header_$ac_safe=no"
7696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7697 echo "$ac_t""yes" 1>&6
7700 echo "$ac_t""no" 1>&6
7703 CPPFLAGS="$ac_save_CPPFLAGS"
7707 if test "$have_gle" = yes ; then
7711 ac_save_CPPFLAGS="$CPPFLAGS"
7712 ac_save_LDFLAGS="$LDFLAGS"
7713 # ac_save_LIBS="$LIBS"
7715 if test \! -z "$includedir" ; then
7716 CPPFLAGS="$CPPFLAGS -I$includedir"
7718 # note: $X_CFLAGS includes $x_includes
7719 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7721 if test \! -z "$libdir" ; then
7722 LDFLAGS="$LDFLAGS -L$libdir"
7724 # note: $X_LIBS includes $x_libraries
7725 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7727 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
7728 echo "configure:7740: checking for gleCreateGC in -lgle" >&5
7729 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
7730 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7731 echo $ac_n "(cached) $ac_c" 1>&6
7733 ac_save_LIBS="$LIBS"
7734 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7735 cat > conftest.$ac_ext <<EOF
7736 #line 7748 "configure"
7737 #include "confdefs.h"
7738 /* Override any gcc2 internal prototype to avoid an error. */
7739 /* We use char because int might match the return type of a gcc2
7740 builtin and then its argument prototype would still apply. */
7747 if { (eval echo configure:7759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7749 eval "ac_cv_lib_$ac_lib_var=yes"
7751 echo "configure: failed program was:" >&5
7752 cat conftest.$ac_ext >&5
7754 eval "ac_cv_lib_$ac_lib_var=no"
7757 LIBS="$ac_save_LIBS"
7760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7761 echo "$ac_t""yes" 1>&6
7762 have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
7764 echo "$ac_t""no" 1>&6
7767 CPPFLAGS="$ac_save_CPPFLAGS"
7768 LDFLAGS="$ac_save_LDFLAGS"
7769 # LIBS="$ac_save_LIBS"
7772 if test "$have_gle" = yes ; then
7776 # sometimes the libmatrix stuff is included in libgle. look there first.
7778 # I don't get it. For some reason, this test passes on SGI, as if
7779 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
7780 # Yet the link is succeeding. Why???
7782 # AC_CHECK_X_LIB(gle, uview_direction_d,
7783 # [have_gle=yes; gle_halfassed=no],
7784 # [], $GL_LIBS -lX11 -lXext -lm)
7786 # As of GLE 3 this is in libgle, and has changed name to uview_direction!
7788 if test "$have_gle3" = yes ; then
7790 ac_save_CPPFLAGS="$CPPFLAGS"
7791 ac_save_LDFLAGS="$LDFLAGS"
7792 # ac_save_LIBS="$LIBS"
7794 if test \! -z "$includedir" ; then
7795 CPPFLAGS="$CPPFLAGS -I$includedir"
7797 # note: $X_CFLAGS includes $x_includes
7798 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7800 if test \! -z "$libdir" ; then
7801 LDFLAGS="$LDFLAGS -L$libdir"
7803 # note: $X_LIBS includes $x_libraries
7804 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7806 echo $ac_n "checking for uview_direction in -lgle""... $ac_c" 1>&6
7807 echo "configure:7819: checking for uview_direction in -lgle" >&5
7808 ac_lib_var=`echo gle'_'uview_direction | sed 'y%./+-%__p_%'`
7809 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7810 echo $ac_n "(cached) $ac_c" 1>&6
7812 ac_save_LIBS="$LIBS"
7813 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7814 cat > conftest.$ac_ext <<EOF
7815 #line 7827 "configure"
7816 #include "confdefs.h"
7817 /* Override any gcc2 internal prototype to avoid an error. */
7818 /* We use char because int might match the return type of a gcc2
7819 builtin and then its argument prototype would still apply. */
7820 char uview_direction();
7826 if { (eval echo configure:7838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7828 eval "ac_cv_lib_$ac_lib_var=yes"
7830 echo "configure: failed program was:" >&5
7831 cat conftest.$ac_ext >&5
7833 eval "ac_cv_lib_$ac_lib_var=no"
7836 LIBS="$ac_save_LIBS"
7839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7840 echo "$ac_t""yes" 1>&6
7841 have_gle=yes; gle_halfassed=no
7843 echo "$ac_t""no" 1>&6
7846 CPPFLAGS="$ac_save_CPPFLAGS"
7847 LDFLAGS="$ac_save_LDFLAGS"
7848 # LIBS="$ac_save_LIBS"
7851 # if it wasn't in libgle, then look in libmatrix.
7852 if test "$have_gle" = no ; then
7854 ac_save_CPPFLAGS="$CPPFLAGS"
7855 ac_save_LDFLAGS="$LDFLAGS"
7856 # ac_save_LIBS="$LIBS"
7858 if test \! -z "$includedir" ; then
7859 CPPFLAGS="$CPPFLAGS -I$includedir"
7861 # note: $X_CFLAGS includes $x_includes
7862 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7864 if test \! -z "$libdir" ; then
7865 LDFLAGS="$LDFLAGS -L$libdir"
7867 # note: $X_LIBS includes $x_libraries
7868 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7870 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
7871 echo "configure:7883: checking for uview_direction_d in -lmatrix" >&5
7872 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
7873 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7874 echo $ac_n "(cached) $ac_c" 1>&6
7876 ac_save_LIBS="$LIBS"
7877 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
7878 cat > conftest.$ac_ext <<EOF
7879 #line 7891 "configure"
7880 #include "confdefs.h"
7881 /* Override any gcc2 internal prototype to avoid an error. */
7882 /* We use char because int might match the return type of a gcc2
7883 builtin and then its argument prototype would still apply. */
7884 char uview_direction_d();
7890 if { (eval echo configure:7902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7892 eval "ac_cv_lib_$ac_lib_var=yes"
7894 echo "configure: failed program was:" >&5
7895 cat conftest.$ac_ext >&5
7897 eval "ac_cv_lib_$ac_lib_var=no"
7900 LIBS="$ac_save_LIBS"
7903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7904 echo "$ac_t""yes" 1>&6
7905 have_gle=yes; gle_halfassed=no;
7906 GLE_LIBS="$GLE_LIBS -lmatrix"
7908 echo "$ac_t""no" 1>&6
7911 CPPFLAGS="$ac_save_CPPFLAGS"
7912 LDFLAGS="$ac_save_LDFLAGS"
7913 # LIBS="$ac_save_LIBS"
7918 if test "$have_gle" = yes ; then
7919 cat >> confdefs.h <<\EOF
7923 if test "$have_gle3" = yes ; then
7924 cat >> confdefs.h <<\EOF
7931 elif test "$with_gle" != no; then
7932 echo "error: must be yes or no: --with-gle=$with_gle"
7939 ###############################################################################
7943 ###############################################################################
7946 with_xpm_req=unspecified
7947 # Check whether --with-xpm or --without-xpm was given.
7948 if test "${with_xpm+set}" = set; then
7950 with_xpm="$withval"; with_xpm_req="$withval"
7962 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
7963 echo "configure:7975: checking for XPM headers" >&5
7966 X_CFLAGS="-I$d $X_CFLAGS"
7967 echo "$ac_t""$d" 1>&6
7969 echo "$ac_t""not found ($d: no such directory)" 1>&6
7972 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
7973 echo "configure:7985: checking for XPM libs" >&5
7976 X_LIBS="-L$d $X_LIBS"
7977 echo "$ac_t""$d" 1>&6
7979 echo "$ac_t""not found ($d: no such directory)" 1>&6
7982 # replace the directory string with "yes".
7984 with_xpm=$with_xpm_req
7989 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
7990 echo " If it is a directory, then \`DIR/include' will be added to"
7991 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7997 if test "$with_xpm" = yes; then
7999 ac_save_CPPFLAGS="$CPPFLAGS"
8000 if test \! -z "$includedir" ; then
8001 CPPFLAGS="$CPPFLAGS -I$includedir"
8003 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8004 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
8005 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
8006 echo "configure:8018: checking for X11/xpm.h" >&5
8007 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8008 echo $ac_n "(cached) $ac_c" 1>&6
8010 cat > conftest.$ac_ext <<EOF
8011 #line 8023 "configure"
8012 #include "confdefs.h"
8013 #include <X11/xpm.h>
8015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8016 { (eval echo configure:8028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8018 if test -z "$ac_err"; then
8020 eval "ac_cv_header_$ac_safe=yes"
8023 echo "configure: failed program was:" >&5
8024 cat conftest.$ac_ext >&5
8026 eval "ac_cv_header_$ac_safe=no"
8030 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8031 echo "$ac_t""yes" 1>&6
8033 cat >> confdefs.h <<\EOF
8039 echo "$ac_t""no" 1>&6
8042 CPPFLAGS="$ac_save_CPPFLAGS"
8043 elif test "$with_xpm" != no; then
8044 echo "error: must be yes or no: --with-xpm=$with_xpm"
8048 # See comment near $motif_requires_xpm, above.
8049 # Need to do this here, after both Motif and XPM have been checked for.
8051 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
8052 if test "$motif_requires_xpm" = yes ; then
8053 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
8058 ###############################################################################
8060 # Check for the XSHM server extension.
8062 ###############################################################################
8065 with_xshm_req=unspecified
8066 # Check whether --with-xshm-ext or --without-xshm-ext was given.
8067 if test "${with_xshm_ext+set}" = set; then
8068 withval="$with_xshm_ext"
8069 with_xshm="$withval"; with_xshm_req="$withval"
8076 case "$with_xshm" in
8081 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
8082 echo "configure:8094: checking for XSHM headers" >&5
8083 d=$with_xshm/include
8085 X_CFLAGS="-I$d $X_CFLAGS"
8086 echo "$ac_t""$d" 1>&6
8088 echo "$ac_t""not found ($d: no such directory)" 1>&6
8091 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
8092 echo "configure:8104: checking for XSHM libs" >&5
8095 X_LIBS="-L$d $X_LIBS"
8096 echo "$ac_t""$d" 1>&6
8098 echo "$ac_t""not found ($d: no such directory)" 1>&6
8101 # replace the directory string with "yes".
8103 with_xshm=$with_xshm_req
8108 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
8109 echo " If it is a directory, then \`DIR/include' will be added to"
8110 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8116 if test "$with_xshm" = yes; then
8118 # first check for Xshm.h.
8120 ac_save_CPPFLAGS="$CPPFLAGS"
8121 if test \! -z "$includedir" ; then
8122 CPPFLAGS="$CPPFLAGS -I$includedir"
8124 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8125 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
8126 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
8127 echo "configure:8139: checking for X11/extensions/XShm.h" >&5
8128 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8129 echo $ac_n "(cached) $ac_c" 1>&6
8131 cat > conftest.$ac_ext <<EOF
8132 #line 8144 "configure"
8133 #include "confdefs.h"
8134 #include <X11/extensions/XShm.h>
8136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8137 { (eval echo configure:8149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8139 if test -z "$ac_err"; then
8141 eval "ac_cv_header_$ac_safe=yes"
8144 echo "configure: failed program was:" >&5
8145 cat conftest.$ac_ext >&5
8147 eval "ac_cv_header_$ac_safe=no"
8151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8152 echo "$ac_t""yes" 1>&6
8155 echo "$ac_t""no" 1>&6
8158 CPPFLAGS="$ac_save_CPPFLAGS"
8160 # if that succeeded, then check for sys/ipc.h.
8161 if test "$have_xshm" = yes; then
8164 ac_save_CPPFLAGS="$CPPFLAGS"
8165 if test \! -z "$includedir" ; then
8166 CPPFLAGS="$CPPFLAGS -I$includedir"
8168 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8169 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
8170 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
8171 echo "configure:8183: checking for sys/ipc.h" >&5
8172 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8173 echo $ac_n "(cached) $ac_c" 1>&6
8175 cat > conftest.$ac_ext <<EOF
8176 #line 8188 "configure"
8177 #include "confdefs.h"
8178 #include <sys/ipc.h>
8180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8181 { (eval echo configure:8193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8183 if test -z "$ac_err"; then
8185 eval "ac_cv_header_$ac_safe=yes"
8188 echo "configure: failed program was:" >&5
8189 cat conftest.$ac_ext >&5
8191 eval "ac_cv_header_$ac_safe=no"
8195 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8196 echo "$ac_t""yes" 1>&6
8199 echo "$ac_t""no" 1>&6
8202 CPPFLAGS="$ac_save_CPPFLAGS"
8205 # if that succeeded, then check for sys/shm.h.
8206 if test "$have_xshm" = yes; then
8209 ac_save_CPPFLAGS="$CPPFLAGS"
8210 if test \! -z "$includedir" ; then
8211 CPPFLAGS="$CPPFLAGS -I$includedir"
8213 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8214 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
8215 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
8216 echo "configure:8228: checking for sys/shm.h" >&5
8217 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8218 echo $ac_n "(cached) $ac_c" 1>&6
8220 cat > conftest.$ac_ext <<EOF
8221 #line 8233 "configure"
8222 #include "confdefs.h"
8223 #include <sys/shm.h>
8225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8226 { (eval echo configure:8238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8228 if test -z "$ac_err"; then
8230 eval "ac_cv_header_$ac_safe=yes"
8233 echo "configure: failed program was:" >&5
8234 cat conftest.$ac_ext >&5
8236 eval "ac_cv_header_$ac_safe=no"
8240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8241 echo "$ac_t""yes" 1>&6
8244 echo "$ac_t""no" 1>&6
8247 CPPFLAGS="$ac_save_CPPFLAGS"
8250 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
8251 # to exist, but the library code to not exist. And even better, the library
8252 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
8253 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
8254 # that's not quite right, but close enough.)
8258 if `uname -v` -eq 3 ; then
8261 ac_save_CPPFLAGS="$CPPFLAGS"
8262 ac_save_LDFLAGS="$LDFLAGS"
8263 # ac_save_LIBS="$LIBS"
8265 if test \! -z "$includedir" ; then
8266 CPPFLAGS="$CPPFLAGS -I$includedir"
8268 # note: $X_CFLAGS includes $x_includes
8269 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8271 if test \! -z "$libdir" ; then
8272 LDFLAGS="$LDFLAGS -L$libdir"
8274 # note: $X_LIBS includes $x_libraries
8275 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8277 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
8278 echo "configure:8290: checking for XShmQueryExtension in -lXextSam" >&5
8279 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
8280 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8281 echo $ac_n "(cached) $ac_c" 1>&6
8283 ac_save_LIBS="$LIBS"
8284 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
8285 cat > conftest.$ac_ext <<EOF
8286 #line 8298 "configure"
8287 #include "confdefs.h"
8288 /* Override any gcc2 internal prototype to avoid an error. */
8289 /* We use char because int might match the return type of a gcc2
8290 builtin and then its argument prototype would still apply. */
8291 char XShmQueryExtension();
8294 XShmQueryExtension()
8297 if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8299 eval "ac_cv_lib_$ac_lib_var=yes"
8301 echo "configure: failed program was:" >&5
8302 cat conftest.$ac_ext >&5
8304 eval "ac_cv_lib_$ac_lib_var=no"
8307 LIBS="$ac_save_LIBS"
8310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8311 echo "$ac_t""yes" 1>&6
8312 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
8314 echo "$ac_t""no" 1>&6
8318 CPPFLAGS="$ac_save_CPPFLAGS"
8319 LDFLAGS="$ac_save_LDFLAGS"
8320 # LIBS="$ac_save_LIBS"
8326 # if that succeeded, then we've really got it.
8327 if test "$have_xshm" = yes; then
8328 cat >> confdefs.h <<\EOF
8329 #define HAVE_XSHM_EXTENSION 1
8334 elif test "$with_xshm" != no; then
8335 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
8340 ###############################################################################
8342 # Check for the DOUBLE-BUFFER server extension.
8344 ###############################################################################
8347 with_xdbe_req=unspecified
8348 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
8349 if test "${with_xdbe_ext+set}" = set; then
8350 withval="$with_xdbe_ext"
8351 with_xdbe="$withval"; with_xdbe_req="$withval"
8358 case "$with_xdbe" in
8363 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
8364 echo "configure:8376: checking for DOUBLE-BUFFER headers" >&5
8365 d=$with_xdbe/include
8367 X_CFLAGS="-I$d $X_CFLAGS"
8368 echo "$ac_t""$d" 1>&6
8370 echo "$ac_t""not found ($d: no such directory)" 1>&6
8373 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
8374 echo "configure:8386: checking for DOUBLE-BUFFER libs" >&5
8377 X_LIBS="-L$d $X_LIBS"
8378 echo "$ac_t""$d" 1>&6
8380 echo "$ac_t""not found ($d: no such directory)" 1>&6
8383 # replace the directory string with "yes".
8385 with_xdbe=$with_xdbe_req
8390 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
8391 echo " If it is a directory, then \`DIR/include' will be added to"
8392 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8398 if test "$with_xdbe" = yes; then
8401 ac_save_CPPFLAGS="$CPPFLAGS"
8402 if test \! -z "$includedir" ; then
8403 CPPFLAGS="$CPPFLAGS -I$includedir"
8405 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8406 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8407 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8408 echo "configure:8420: checking for X11/extensions/Xdbe.h" >&5
8409 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8410 echo $ac_n "(cached) $ac_c" 1>&6
8412 cat > conftest.$ac_ext <<EOF
8413 #line 8425 "configure"
8414 #include "confdefs.h"
8415 #include <X11/extensions/Xdbe.h>
8417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8418 { (eval echo configure:8430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8420 if test -z "$ac_err"; then
8422 eval "ac_cv_header_$ac_safe=yes"
8425 echo "configure: failed program was:" >&5
8426 cat conftest.$ac_ext >&5
8428 eval "ac_cv_header_$ac_safe=no"
8432 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8433 echo "$ac_t""yes" 1>&6
8436 echo "$ac_t""no" 1>&6
8439 CPPFLAGS="$ac_save_CPPFLAGS"
8440 if test "$have_xdbe" = yes; then
8441 cat >> confdefs.h <<\EOF
8442 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8447 elif test "$with_xdbe" != no; then
8448 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8453 ###############################################################################
8455 # Check for the SGI XReadDisplay server extension.
8457 # Note: this has to be down here, rather than up with the other server
8458 # extension tests, so that the output of `configure --help' is in the
8459 # right order. Arrgh!
8461 ###############################################################################
8464 with_readdisplay_req=unspecified
8465 # Check whether --with-readdisplay or --without-readdisplay was given.
8466 if test "${with_readdisplay+set}" = set; then
8467 withval="$with_readdisplay"
8468 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8470 with_readdisplay=yes
8475 case "$with_readdisplay" in
8480 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8481 echo "configure:8493: checking for XReadDisplay headers" >&5
8482 d=$with_readdisplay/include
8484 X_CFLAGS="-I$d $X_CFLAGS"
8485 echo "$ac_t""$d" 1>&6
8487 echo "$ac_t""not found ($d: no such directory)" 1>&6
8490 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8491 echo "configure:8503: checking for XReadDisplay libs" >&5
8492 d=$with_readdisplay/lib
8494 X_LIBS="-L$d $X_LIBS"
8495 echo "$ac_t""$d" 1>&6
8497 echo "$ac_t""not found ($d: no such directory)" 1>&6
8500 # replace the directory string with "yes".
8501 with_readdisplay_req="yes"
8502 with_readdisplay=$with_readdisplay_req
8507 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8508 echo " If it is a directory, then \`DIR/include' will be added to"
8509 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8515 if test "$with_readdisplay" = yes; then
8517 ac_save_CPPFLAGS="$CPPFLAGS"
8518 if test \! -z "$includedir" ; then
8519 CPPFLAGS="$CPPFLAGS -I$includedir"
8521 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8522 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8523 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8524 echo "configure:8536: checking for X11/extensions/readdisplay.h" >&5
8525 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8526 echo $ac_n "(cached) $ac_c" 1>&6
8528 cat > conftest.$ac_ext <<EOF
8529 #line 8541 "configure"
8530 #include "confdefs.h"
8531 #include <X11/extensions/readdisplay.h>
8533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8534 { (eval echo configure:8546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8536 if test -z "$ac_err"; then
8538 eval "ac_cv_header_$ac_safe=yes"
8541 echo "configure: failed program was:" >&5
8542 cat conftest.$ac_ext >&5
8544 eval "ac_cv_header_$ac_safe=no"
8548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8549 echo "$ac_t""yes" 1>&6
8550 cat >> confdefs.h <<\EOF
8551 #define HAVE_READ_DISPLAY_EXTENSION 1
8555 echo "$ac_t""no" 1>&6
8558 CPPFLAGS="$ac_save_CPPFLAGS"
8559 elif test "$with_readdisplay" != no; then
8560 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8565 ###############################################################################
8567 # Check for the SGI Iris Video Library.
8569 ###############################################################################
8572 with_sgivideo_req=unspecified
8573 # Check whether --with-sgivideo or --without-sgivideo was given.
8574 if test "${with_sgivideo+set}" = set; then
8575 withval="$with_sgivideo"
8576 with_sgivideo="$withval"; with_sgivideo_req="$withval"
8583 case "$with_sgivideo" in
8588 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
8589 echo "configure:8601: checking for Iris Video headers" >&5
8590 d=$with_sgivideo/include
8592 X_CFLAGS="-I$d $X_CFLAGS"
8593 echo "$ac_t""$d" 1>&6
8595 echo "$ac_t""not found ($d: no such directory)" 1>&6
8598 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
8599 echo "configure:8611: checking for Iris Video libs" >&5
8600 d=$with_sgivideo/lib
8602 X_LIBS="-L$d $X_LIBS"
8603 echo "$ac_t""$d" 1>&6
8605 echo "$ac_t""not found ($d: no such directory)" 1>&6
8608 # replace the directory string with "yes".
8609 with_sgivideo_req="yes"
8610 with_sgivideo=$with_sgivideo_req
8615 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8616 echo " If it is a directory, then \`DIR/include' will be added to"
8617 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8623 if test "$with_sgivideo" = yes; then
8625 ac_save_CPPFLAGS="$CPPFLAGS"
8626 if test \! -z "$includedir" ; then
8627 CPPFLAGS="$CPPFLAGS -I$includedir"
8629 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8630 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8631 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8632 echo "configure:8644: checking for dmedia/vl.h" >&5
8633 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8634 echo $ac_n "(cached) $ac_c" 1>&6
8636 cat > conftest.$ac_ext <<EOF
8637 #line 8649 "configure"
8638 #include "confdefs.h"
8639 #include <dmedia/vl.h>
8641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8642 { (eval echo configure:8654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8644 if test -z "$ac_err"; then
8646 eval "ac_cv_header_$ac_safe=yes"
8649 echo "configure: failed program was:" >&5
8650 cat conftest.$ac_ext >&5
8652 eval "ac_cv_header_$ac_safe=no"
8656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8657 echo "$ac_t""yes" 1>&6
8660 echo "$ac_t""no" 1>&6
8663 CPPFLAGS="$ac_save_CPPFLAGS"
8664 if test "$have_sgivideo" = yes; then
8666 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8667 echo "configure:8679: checking for vlOpenVideo in -lvl" >&5
8668 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8669 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8670 echo $ac_n "(cached) $ac_c" 1>&6
8672 ac_save_LIBS="$LIBS"
8674 cat > conftest.$ac_ext <<EOF
8675 #line 8687 "configure"
8676 #include "confdefs.h"
8677 /* Override any gcc2 internal prototype to avoid an error. */
8678 /* We use char because int might match the return type of a gcc2
8679 builtin and then its argument prototype would still apply. */
8686 if { (eval echo configure:8698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8688 eval "ac_cv_lib_$ac_lib_var=yes"
8690 echo "configure: failed program was:" >&5
8691 cat conftest.$ac_ext >&5
8693 eval "ac_cv_lib_$ac_lib_var=no"
8696 LIBS="$ac_save_LIBS"
8699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8700 echo "$ac_t""yes" 1>&6
8703 echo "$ac_t""no" 1>&6
8706 if test "$have_sgivideo" = yes; then
8707 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8708 SGI_VIDEO_LIBS="-lvl"
8709 cat >> confdefs.h <<\EOF
8710 #define HAVE_SGI_VIDEO 1
8715 elif test "$with_sgivideo" != no; then
8716 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8721 ###############################################################################
8723 # Check for a program to generate random text.
8725 # Zippy is funnier than the idiocy generally spat out by `fortune',
8726 # so try to find that, by invoking Emacs and asking it where its
8727 # libexec directory is ("yow" lives in there.)
8729 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8730 # and if so, use them.
8732 # If that doesn't work, look in /usr/games, and if it's there, use
8733 # the full pathname.
8735 ###############################################################################
8738 # Check whether --with-zippy or --without-zippy was given.
8739 if test "${with_zippy+set}" = set; then
8740 withval="$with_zippy"
8741 with_zippy_req="$withval"; with_zippy="$withval"
8747 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8752 if test -n "$with_zippy_req" ; then
8753 ac_cv_zippy_program=""
8754 case "$with_zippy_req" in
8756 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8757 echo "configure:8769: checking for $with_zippy_req" >&5
8758 if test -x "$with_zippy_req" ; then
8759 echo "$ac_t""yes" 1>&6
8761 echo "$ac_t""no" 1>&6
8767 unset ac_cv_path_zip2
8768 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8769 set dummy $with_zippy_req; ac_word=$2
8770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8771 echo "configure:8783: checking for $ac_word" >&5
8772 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8773 echo $ac_n "(cached) $ac_c" 1>&6
8777 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8780 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8783 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8785 for ac_dir in $ac_dummy; do
8786 test -z "$ac_dir" && ac_dir=.
8787 if test -f $ac_dir/$ac_word; then
8788 ac_cv_path_zip2="$ac_dir/$ac_word"
8796 zip2="$ac_cv_path_zip2"
8797 if test -n "$zip2"; then
8798 echo "$ac_t""$zip2" 1>&6
8800 echo "$ac_t""no" 1>&6
8803 if test "$zip2" = ""; then
8808 ac_cv_zippy_program="$with_zippy"
8810 elif test -n "$ac_cv_zippy_program"; then
8811 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8814 if test ! -n "$ac_cv_zippy_program"; then
8816 for ac_prog in emacs
8818 # Extract the first word of "$ac_prog", so it can be a program name with args.
8819 set dummy $ac_prog; ac_word=$2
8820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8821 echo "configure:8833: checking for $ac_word" >&5
8822 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8823 echo $ac_n "(cached) $ac_c" 1>&6
8825 if test -n "$emacs_exe"; then
8826 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8828 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8830 for ac_dir in $ac_dummy; do
8831 test -z "$ac_dir" && ac_dir=.
8832 if test -f $ac_dir/$ac_word; then
8833 ac_cv_prog_emacs_exe="$ac_prog"
8840 emacs_exe="$ac_cv_prog_emacs_exe"
8841 if test -n "$emacs_exe"; then
8842 echo "$ac_t""$emacs_exe" 1>&6
8844 echo "$ac_t""no" 1>&6
8847 test -n "$emacs_exe" && break
8850 for ac_prog in xemacs
8852 # Extract the first word of "$ac_prog", so it can be a program name with args.
8853 set dummy $ac_prog; ac_word=$2
8854 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8855 echo "configure:8867: checking for $ac_word" >&5
8856 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
8857 echo $ac_n "(cached) $ac_c" 1>&6
8859 if test -n "$xemacs_exe"; then
8860 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
8862 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8864 for ac_dir in $ac_dummy; do
8865 test -z "$ac_dir" && ac_dir=.
8866 if test -f $ac_dir/$ac_word; then
8867 ac_cv_prog_xemacs_exe="$ac_prog"
8874 xemacs_exe="$ac_cv_prog_xemacs_exe"
8875 if test -n "$xemacs_exe"; then
8876 echo "$ac_t""$xemacs_exe" 1>&6
8878 echo "$ac_t""no" 1>&6
8881 test -n "$xemacs_exe" && break
8885 ac_cv_zippy_program=""
8886 eargs='-batch -q -nw --eval'
8888 if test -n "$emacs_exe" ; then
8889 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
8890 echo "configure:8902: checking for emacs yow" >&5
8892 # get emacs to tell us where the libexec directory is.
8894 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8895 2>/dev/null | tail -1`
8896 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8898 # try running libexec/yow and see if it exits without error.
8900 if test x"$dir" != x -a -x "$dir/yow" ; then
8901 if $dir/yow >&- 2>&- ; then
8902 ac_cv_zippy_program="$dir/yow"
8903 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8905 echo "$ac_t""no" 1>&6
8910 if test -z "$ac_cv_zippy_program" ; then
8911 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
8912 echo "configure:8924: checking for xemacs yow" >&5
8913 if test -n "$xemacs_exe" ; then
8915 # get xemacs to tell us where the libexec directory is.
8917 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8918 2>/dev/null | tail -1`
8919 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8921 # try running libexec/yow and see if it exits without error.
8923 if test x"$dir" != x -a -x "$dir/yow" ; then
8924 if $dir/yow >&- 2>&- ; then
8925 ac_cv_zippy_program="$dir/yow"
8926 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8929 # in some xemacs installations, the pathname of the yow.lines file
8930 # isn't hardcoded into the yow executable, and must be passed on
8931 # the command line. See if it's in libexec/../etc/.
8935 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
8938 yowlines="$dir_up/etc/yow.lines"
8939 if $dir/yow -f $yowlines >&- 2>&- ; then
8940 ac_cv_zippy_program="$dir/yow -f $yowlines"
8941 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8944 # In newer XEmacs releases, yow.lines is in a different place,
8945 # and the easiest way to get it is by calling the new function
8946 # `locate-data-file'.
8948 yowlines=`$xemacs_exe $eargs \
8949 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
8950 2>/dev/null | tail -1`
8951 if $dir/yow -f $yowlines >&- 2>&- ; then
8952 ac_cv_zippy_program="$dir/yow -f $yowlines"
8953 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8955 echo "$ac_t""no" 1>&6
8963 # if that didn't work, try for some other programs...
8964 if test -z "$ac_cv_zippy_program" ; then
8966 for ac_prog in fortune zippy yow
8968 # Extract the first word of "$ac_prog", so it can be a program name with args.
8969 set dummy $ac_prog; ac_word=$2
8970 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8971 echo "configure:8983: checking for $ac_word" >&5
8972 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
8973 echo $ac_n "(cached) $ac_c" 1>&6
8975 if test -n "$fortune"; then
8976 ac_cv_prog_fortune="$fortune" # Let the user override the test.
8978 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8980 for ac_dir in $ac_dummy; do
8981 test -z "$ac_dir" && ac_dir=.
8982 if test -f $ac_dir/$ac_word; then
8983 ac_cv_prog_fortune="$ac_prog"
8990 fortune="$ac_cv_prog_fortune"
8991 if test -n "$fortune"; then
8992 echo "$ac_t""$fortune" 1>&6
8994 echo "$ac_t""no" 1>&6
8997 test -n "$fortune" && break
9000 # if that didn't work, try for those programs in /usr/games...
9001 if test -z "$fortune" ; then
9002 for ac_prog in fortune zippy yow
9004 # Extract the first word of "$ac_prog", so it can be a program name with args.
9005 set dummy $ac_prog; ac_word=$2
9006 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9007 echo "configure:9019: checking for $ac_word" >&5
9008 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
9009 echo $ac_n "(cached) $ac_c" 1>&6
9013 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
9016 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
9019 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9020 ac_dummy="/usr/games:/usr/local/games:$PATH"
9021 for ac_dir in $ac_dummy; do
9022 test -z "$ac_dir" && ac_dir=.
9023 if test -f $ac_dir/$ac_word; then
9024 ac_cv_path_fortune="$ac_dir/$ac_word"
9032 fortune="$ac_cv_path_fortune"
9033 if test -n "$fortune"; then
9034 echo "$ac_t""$fortune" 1>&6
9036 echo "$ac_t""no" 1>&6
9039 test -n "$fortune" && break
9041 test -n "$fortune" || fortune="fortune"
9047 if test -z "$ac_cv_zippy_program" ; then
9048 ac_cv_zippy_program=fortune
9051 cat >> confdefs.h <<EOF
9052 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
9057 ###############################################################################
9059 # Done testing. Now, set up the various -I and -L variables,
9060 # and decide which GUI program to build by default.
9062 ###############################################################################
9069 if test \! -z "$includedir" ; then
9070 INCLUDES="$INCLUDES -I$includedir"
9073 if test \! -z "$libdir" ; then
9074 LDFLAGS="$LDFLAGS -L$libdir"
9078 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9080 if test "$have_motif" = yes; then
9081 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9082 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9084 if test "$have_gtk" = yes; then
9085 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
9086 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9090 if test "$have_kerberos" = yes; then
9091 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
9092 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
9094 if test "$have_pam" = yes; then
9095 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
9096 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
9097 INSTALL_PAM="install-pam"
9099 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
9100 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
9103 if test "$enable_locking" = yes; then
9104 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
9105 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
9107 LOCK_SRCS='$(NOLOCK_SRCS_1)'
9108 LOCK_OBJS='$(NOLOCK_OBJS_1)'
9111 if test "$need_setuid" = yes; then
9113 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
9116 INSTALL_SETUID='$(INSTALL_PROGRAM)'
9120 if test "$have_gl" = yes; then
9121 GL_EXES='$(GL_EXES)'
9125 GL_KLUDGE="-${tab} "
9128 if test "$have_gle" = yes; then
9129 GLE_EXES='$(GLE_EXES)'
9130 GLE_MEN='$(GLE_MEN)'
9131 GLE_KLUDGE="${tab} "
9133 GLE_KLUDGE="-${tab} "
9137 ###############################################################################
9139 # Perform substitutions and write Makefiles.
9141 ###############################################################################
9180 APPDEFAULTS=$ac_x_app_defaults
9189 cat > confcache <<\EOF
9190 # This file is a shell script that caches the results of configure
9191 # tests run on this system so they can be shared between configure
9192 # scripts and configure runs. It is not useful on other systems.
9193 # If it contains results you don't want to keep, you may remove or edit it.
9195 # By default, configure uses ./config.cache as the cache file,
9196 # creating it if it does not exist already. You can give configure
9197 # the --cache-file=FILE option to use a different cache file; that is
9198 # what configure does when it calls configure scripts in
9199 # subdirectories, so they share the cache.
9200 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9201 # config.status only pays attention to the cache file if you give it the
9202 # --recheck option to rerun configure.
9205 # The following way of writing the cache mishandles newlines in values,
9206 # but we know of no workaround that is simple, portable, and efficient.
9207 # So, don't put newlines in cache variables' values.
9208 # Ultrix sh set writes to stderr and can't be redirected directly,
9209 # and sets the high bit in the cache file unless we assign to the vars.
9211 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9213 # `set' does not quote correctly, so add quotes (double-quote substitution
9214 # turns \\\\ into \\, and sed turns \\ into \).
9216 -e "s/'/'\\\\''/g" \
9217 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9220 # `set' quotes correctly as required by POSIX, so do not add quotes.
9221 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9224 if cmp -s $cache_file confcache; then
9227 if test -w $cache_file; then
9228 echo "updating cache $cache_file"
9229 cat confcache > $cache_file
9231 echo "not updating unwritable cache $cache_file"
9236 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9238 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9239 # Let make expand exec_prefix.
9240 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9242 # Any assignment to VPATH causes Sun make to only execute
9243 # the first set of double-colon rules, so remove it if not needed.
9244 # If there is a colon in the path, we need to keep it.
9245 if test "x$srcdir" = x.; then
9246 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9249 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9251 DEFS=-DHAVE_CONFIG_H
9253 # Without the "./", some shells look in PATH for config.status.
9254 : ${CONFIG_STATUS=./config.status}
9256 echo creating $CONFIG_STATUS
9257 rm -f $CONFIG_STATUS
9258 cat > $CONFIG_STATUS <<EOF
9260 # Generated automatically by configure.
9261 # Run this file to recreate the current configuration.
9262 # This directory was configured as follows,
9263 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9265 # $0 $ac_configure_args
9267 # Compiler output produced by configure, useful for debugging
9268 # configure, is in ./config.log if it exists.
9270 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9273 case "\$ac_option" in
9274 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9275 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9276 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9277 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9278 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9280 -help | --help | --hel | --he | --h)
9281 echo "\$ac_cs_usage"; exit 0 ;;
9282 *) echo "\$ac_cs_usage"; exit 1 ;;
9286 ac_given_srcdir=$srcdir
9287 ac_given_INSTALL="$INSTALL"
9289 trap 'rm -fr `echo "Makefile
9294 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9296 cat >> $CONFIG_STATUS <<EOF
9298 # Protect against being on the right side of a sed subst in config.status.
9299 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9300 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9304 s%@CFLAGS@%$CFLAGS%g
9305 s%@CPPFLAGS@%$CPPFLAGS%g
9306 s%@CXXFLAGS@%$CXXFLAGS%g
9307 s%@FFLAGS@%$FFLAGS%g
9309 s%@LDFLAGS@%$LDFLAGS%g
9311 s%@exec_prefix@%$exec_prefix%g
9312 s%@prefix@%$prefix%g
9313 s%@program_transform_name@%$program_transform_name%g
9314 s%@bindir@%$bindir%g
9315 s%@sbindir@%$sbindir%g
9316 s%@libexecdir@%$libexecdir%g
9317 s%@datadir@%$datadir%g
9318 s%@sysconfdir@%$sysconfdir%g
9319 s%@sharedstatedir@%$sharedstatedir%g
9320 s%@localstatedir@%$localstatedir%g
9321 s%@libdir@%$libdir%g
9322 s%@includedir@%$includedir%g
9323 s%@oldincludedir@%$oldincludedir%g
9324 s%@infodir@%$infodir%g
9325 s%@mandir@%$mandir%g
9327 s%@host_alias@%$host_alias%g
9328 s%@host_cpu@%$host_cpu%g
9329 s%@host_vendor@%$host_vendor%g
9330 s%@host_os@%$host_os%g
9333 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9334 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9335 s%@INSTALL_DATA@%$INSTALL_DATA%g
9336 s%@SET_MAKE@%$SET_MAKE%g
9338 s%@X_CFLAGS@%$X_CFLAGS%g
9339 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9340 s%@X_LIBS@%$X_LIBS%g
9341 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9342 s%@glib_config@%$glib_config%g
9343 s%@gtk_config@%$gtk_config%g
9344 s%@gnome_config@%$gnome_config%g
9346 s%@emacs_exe@%$emacs_exe%g
9347 s%@xemacs_exe@%$xemacs_exe%g
9348 s%@fortune@%$fortune%g
9349 s%@INCLUDES@%$INCLUDES%g
9350 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
9351 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
9352 s%@SAVER_LIBS@%$SAVER_LIBS%g
9353 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
9354 s%@GTK_LIBS@%$GTK_LIBS%g
9355 s%@HACK_LIBS@%$HACK_LIBS%g
9356 s%@XPM_LIBS@%$XPM_LIBS%g
9357 s%@GL_LIBS@%$GL_LIBS%g
9358 s%@GLE_LIBS@%$GLE_LIBS%g
9359 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
9360 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
9361 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
9362 s%@NEED_SETUID@%$NEED_SETUID%g
9363 s%@INSTALL_PAM@%$INSTALL_PAM%g
9364 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
9365 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
9366 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
9367 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
9368 s%@XMU_SRCS@%$XMU_SRCS%g
9369 s%@XMU_OBJS@%$XMU_OBJS%g
9370 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
9371 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
9372 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
9373 s%@LOCK_SRCS@%$LOCK_SRCS%g
9374 s%@LOCK_OBJS@%$LOCK_OBJS%g
9375 s%@GL_EXES@%$GL_EXES%g
9376 s%@GL_MEN@%$GL_MEN%g
9377 s%@GL_KLUDGE@%$GL_KLUDGE%g
9378 s%@GLE_EXES@%$GLE_EXES%g
9379 s%@GLE_MEN@%$GLE_MEN%g
9380 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
9381 s%@HACKDIR@%$HACKDIR%g
9382 s%@GNOME_DATADIR@%$GNOME_DATADIR%g
9383 s%@APPDEFAULTS@%$APPDEFAULTS%g
9384 s%@DEPEND@%$DEPEND%g
9385 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
9386 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
9391 cat >> $CONFIG_STATUS <<\EOF
9393 # Split the substitutions into bite-sized pieces for seds with
9394 # small command number limits, like on Digital OSF/1 and HP-UX.
9395 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9396 ac_file=1 # Number of current file.
9397 ac_beg=1 # First line for current file.
9398 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9401 while $ac_more_lines; do
9402 if test $ac_beg -gt 1; then
9403 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9405 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9407 if test ! -s conftest.s$ac_file; then
9409 rm -f conftest.s$ac_file
9411 if test -z "$ac_sed_cmds"; then
9412 ac_sed_cmds="sed -f conftest.s$ac_file"
9414 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9416 ac_file=`expr $ac_file + 1`
9418 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9421 if test -z "$ac_sed_cmds"; then
9426 cat >> $CONFIG_STATUS <<EOF
9428 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9433 driver/XScreenSaver.ad"}
9435 cat >> $CONFIG_STATUS <<\EOF
9436 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9437 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9439 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9440 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9441 *) ac_file_in="${ac_file}.in" ;;
9444 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9446 # Remove last slash and all that follows it. Not all systems have dirname.
9447 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9448 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9449 # The file is in a subdirectory.
9450 test ! -d "$ac_dir" && mkdir "$ac_dir"
9451 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9452 # A "../" for each directory in $ac_dir_suffix.
9453 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9455 ac_dir_suffix= ac_dots=
9458 case "$ac_given_srcdir" in
9460 if test -z "$ac_dots"; then top_srcdir=.
9461 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9462 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9464 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9465 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9468 case "$ac_given_INSTALL" in
9469 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9470 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9473 echo creating "$ac_file"
9475 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9477 *Makefile*) ac_comsub="1i\\
9478 # $configure_input" ;;
9482 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9484 s%@configure_input@%$configure_input%g
9485 s%@srcdir@%$srcdir%g
9486 s%@top_srcdir@%$top_srcdir%g
9487 s%@INSTALL@%$INSTALL%g
9488 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9492 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9493 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9495 # ac_d sets the value in "#define NAME VALUE" lines.
9496 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9497 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9500 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9501 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9502 ac_uB='\([ ]\)%\1#\2define\3'
9505 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9506 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9507 ac_eB='$%\1#\2define\3'
9511 if test "${CONFIG_HEADERS+set}" != set; then
9513 cat >> $CONFIG_STATUS <<EOF
9514 CONFIG_HEADERS="config.h"
9516 cat >> $CONFIG_STATUS <<\EOF
9518 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9519 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9521 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9522 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9523 *) ac_file_in="${ac_file}.in" ;;
9526 echo creating $ac_file
9528 rm -f conftest.frag conftest.in conftest.out
9529 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9530 cat $ac_file_inputs > conftest.in
9534 # Transform confdefs.h into a sed script conftest.vals that substitutes
9535 # the proper values into config.h.in to produce config.h. And first:
9536 # Protect against being on the right side of a sed subst in config.status.
9537 # Protect against being in an unquoted here document in config.status.
9539 cat > conftest.hdr <<\EOF
9542 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9546 sed -n -f conftest.hdr confdefs.h > conftest.vals
9549 # This sed command replaces #undef with comments. This is necessary, for
9550 # example, in the case of _POSIX_SOURCE, which is predefined and required
9551 # on some systems where configure will not decide to define it.
9552 cat >> conftest.vals <<\EOF
9553 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9556 # Break up conftest.vals because some shells have a limit on
9557 # the size of here documents, and old seds have small limits too.
9562 ac_lines=`grep -c . conftest.vals`
9563 # grep -c gives empty output for an empty file on some AIX systems.
9564 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9565 # Write a limited-size here document to conftest.frag.
9566 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9567 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9569 sed -f conftest.frag conftest.in > conftest.out
9571 mv conftest.out conftest.in
9573 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9575 mv conftest.tail conftest.vals
9579 cat >> $CONFIG_STATUS <<\EOF
9580 rm -f conftest.frag conftest.h
9581 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9582 cat conftest.in >> conftest.h
9584 if cmp -s $ac_file conftest.h 2>/dev/null; then
9585 echo "$ac_file is unchanged"
9588 # Remove last slash and all that follows it. Not all systems have dirname.
9589 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9590 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9591 # The file is in a subdirectory.
9592 test ! -d "$ac_dir" && mkdir "$ac_dir"
9595 mv conftest.h $ac_file
9600 cat >> $CONFIG_STATUS <<EOF
9603 cat >> $CONFIG_STATUS <<\EOF
9607 chmod +x $CONFIG_STATUS
9608 rm -fr confdefs* $ac_clean_files
9609 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9612 ###############################################################################
9614 # Print some warnings at the end.
9616 ###############################################################################
9618 warn_prefix_1=" Warning:"
9619 warn_prefix_2=" Note:"
9620 warn_prefix="$warn_prefix_1"
9623 warnsep=' #################################################################'
9626 if test "$warning" = no ; then
9627 echo '' ; echo "$warnsep" ; echo ''
9634 if test "$warning" = long ; then echo '' ; fi
9636 echo "$warn_prefix $@"
9643 if test "$was" != no ; then echo '' ; fi
9644 echo "$warn_prefix $@"
9653 warn_prefix="$warn_prefix_2"
9655 warn_prefix="$warn_prefix_1"
9659 warn_prefix="$warn_prefix_2"
9661 warn_prefix="$warn_prefix_1"
9665 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9666 warn 'The SGI saver extension was requested, but was not found.'
9669 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9670 warn 'The MIT saver extension was requested, but was not found.'
9673 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9674 warn 'The XIdle extension was requested, but was not found.'
9677 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9678 warn 'The XSHM extension was requested, but was not found.'
9681 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9682 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9685 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9686 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9689 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9690 warn 'The DPMS extension was requested, but was not found.'
9693 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9694 warn 'The XF86VMODE extension was requested, but was not found.'
9697 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9698 warn "Checking of /proc/interrupts was requested, but it's bogus."
9702 if test "$have_motif" = no -a "$have_gtk" = no; then
9703 warnL "Neither Motif nor Gtk seem to be available;"
9704 warn2 "the \`xscreensaver-demo' program requires one of these."
9706 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9707 warnL "Use of Motif was requested, but it wasn't found;"
9708 warn2 "Gtk will be used instead."
9710 elif test "$jurassic_gtk" = yes ; then
9714 v="$ac_gtk_version_string"
9715 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9716 warnL "Use of Gtk was requested, but its version number is unknown;"
9717 elif test "$with_gtk_req" = yes ; then
9718 warnL "Use of Gtk was requested, but it is version $v;"
9720 warnL "Gtk was found on this system, but it is version $v;"
9723 warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
9725 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9726 warnL "Use of Gtk was requested, but it wasn't found;"
9727 warn2 "Motif will be used instead."
9732 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
9733 warn 'Use of the Gnome Control Panel was requested, but the necessary'
9734 warn2 'headers and/or libraries were not found.'
9738 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9740 preferred_lesstif=0.86
9742 if test "$lesstif_version" = unknown; then
9743 warnL "Unable to determine the LessTif version number!"
9744 warn2 "Make sure you are using version $preferred_lesstif or newer."
9745 warn2 "See <http://www.lesstif.org/>."
9747 elif test \! $lesstif_version -gt 82; then
9748 warnL "LessTif version $lesstif_version_string is being used."
9749 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9750 warn2 "use with XScreenSaver; it is strongly recommended"
9751 warn2 "that you upgrade to at least version $preferred_lesstif!"
9752 warn2 "See <http://www.lesstif.org/>."
9758 if test "$have_xpm" = no ; then
9759 if test "$with_xpm_req" = yes ; then
9760 warnL 'Use of XPM was requested, but it was not found.'
9761 elif test "$with_xpm_req" = no ; then
9762 noteL 'The XPM library is not being used.'
9764 noteL 'The XPM library was not found.'
9768 warn2 'Some of the demos will not be as colorful as they'
9769 warn2 'could be. You might want to consider installing XPM'
9770 warn2 'and re-running configure. (Remember to delete the'
9771 warn2 'config.cache file first.) You can find XPM at most'
9772 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9776 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9777 preferred_mesagl=3.0
9779 if test "$ac_mesagl_version" = unknown; then
9780 warnL "Unable to determine the MesaGL version number!"
9781 warn2 "Make sure you are using version $preferred_mesagl or newer."
9783 elif test \! "$ac_mesagl_version" -gt 2006; then
9784 warnL "MesaGL version $ac_mesagl_version_string is being used."
9785 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9786 warn2 "It is strongly recommended that you upgrade to at"
9787 warn2 "least version $preferred_mesagl."
9791 if test "$have_gl" = no ; then
9792 if test "$with_gl_req" = yes ; then
9793 warnL 'Use of GL was requested, but it was not found.'
9794 elif test "$with_gl_req" = no ; then
9795 noteL 'The OpenGL 3D library is not being used.'
9797 noteL 'The OpenGL 3D library was not found.'
9800 if test "$gl_halfassed" = yes ; then
9802 warn2 'More specifically, we found the headers, but not the'
9803 warn2 'libraries; so either GL is half-installed on this'
9804 warn2 "system, or something else went wrong. The \`config.log'"
9805 warn2 'file might contain some clues.'
9809 warn2 'Those demos which use 3D will not be built or installed.'
9810 warn2 'You might want to consider installing OpenGL and'
9811 warn2 're-running configure. (Remember to delete the'
9812 warn2 "config.cache file first.) If your vendor doesn't ship"
9813 warn2 'their own implementation of OpenGL, you can get a free'
9814 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
9815 warn2 'info, see <http://www.opengl.org/>.'
9820 if test "$have_gl" = yes -a "$have_gle" = no ; then
9821 if test "$with_gle_req" = yes ; then
9822 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
9823 warn2 'it was not found (though the OpenGL library was found, and'
9824 warn2 'is being used.)'
9825 elif test "$with_gle_req" = no ; then
9826 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
9827 warn2 'library is not.'
9829 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
9833 if test "$gle_halfassed" = yes ; then
9835 warn2 'More specifically, we found the headers, but not the'
9836 warn2 'libraries; so either GLE is half-installed on this'
9837 warn2 "system, or something else went wrong. The \`config.log'"
9838 warn2 'file might contain some clues.'
9842 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
9843 warn2 'will not be built or installed. You might want to consider'
9844 warn2 'installing GLE and re-running configure. (Remember to delete'
9845 warn2 'the config.cache file first.) You can find the GLE library'
9846 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
9847 warn2 'see <http://www.opengl.org/>.'
9852 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
9853 warn 'Use of XReadDisplay was requested, but it was not found.'
9856 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
9857 warn 'Use of the Iris Video Library was requested, but it was not found.'
9860 if test -n "$with_zippy_req"; then
9861 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
9862 warnL "$with_zippy_req was requested as the Zippy program,"
9863 warn2 "but was not found. The default will be used instead."
9867 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
9868 warn 'Use of Kerberos was requested, but it was not found.'
9871 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
9872 warn 'Use of PAM was requested, but it was not found.'
9875 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
9876 warn 'Use of shadow passwords was requested, but they were not found.'
9880 # You are in a twisty maze of namespaces and syntaxes, all alike.
9881 # Fuck the skull of Unix.
9883 eval bindir=${bindir}
9884 eval bindir=${bindir}
9885 eval bindir=${bindir}
9886 eval bindir=${bindir}
9887 eval bindir=${bindir}
9888 eval bindir=${bindir}
9889 eval HACKDIR=${HACKDIR}
9890 eval HACKDIR=${HACKDIR}
9891 eval HACKDIR=${HACKDIR}
9892 eval HACKDIR=${HACKDIR}
9893 eval HACKDIR=${HACKDIR}
9894 eval HACKDIR=${HACKDIR}
9896 # canonicalize slashes.
9897 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
9898 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9901 # Sanity check the subdir
9902 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
9903 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
9905 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
9906 There will be an executable installed with that name, so
9907 that can't be the name of a directory as well. Please
9908 re-configure with a different directory name." 1>&2; exit 1; }
9915 # Now let's see if there's a previous RPM version already installed. Blargh!
9919 rpmv=`(rpm -qv xscreensaver) 2>&- | \
9920 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/'`
9923 if test \! -z "$rpmv" ; then
9924 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
9925 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
9928 warnL "There is already an installed RPM of xscreensaver $rpmv"
9929 warn2 "on this system. You might want to remove it (with"
9930 warn2 '"rpm -ve xscreensaver") before running "make install"'
9931 warn2 "from this directory."
9933 warn2 "Alternately, you could build this version of xscreensaver"
9934 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
9935 warn2 "file is included. See the RPM documentation for more info."
9938 if test "$rpmbdir" = "$rpmhdir" ; then
9939 warn2 "The RPM version was installed in $rpmbdir."
9941 warn2 "The RPM version was installed in $rpmbdir,"
9942 warn2 "with demos in $rpmhdir."
9949 # Warn about egregious GNOME bogosity.
9951 #if (rpm -qv control-center) >&- 2>&- ; then
9953 # warnL "The Gnome Control Center seems to be installed."
9955 # warn2 "Note that simply installing this version of xscreensaver"
9956 # warn2 "will not cause GNOME to know about the newly-added display"
9957 # warn2 "modes -- GNOME is just lame that way. Instead of using the"
9958 # warn2 "Control Center, try using the \`xscreensaver-demo' command."
9962 if test "${bindir}" = "${HACKDIR}" ; then
9966 if test "$do_dir_warning" = yes; then
9970 echo ' When you run "make install", the "xscreensaver",'
9971 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
9972 echo " will be installed in ${bindir}."
9974 echo " The various graphics demos (100+ different executables) will"
9975 echo " also be installed in ${HACKDIR}."
9977 echo " If you would prefer the demos to be installed elsewhere"
9978 echo " (for example, in a dedicated directory) you should re-run"
9979 echo " configure with the --enable-subdir=DIR option. For more"
9980 echo " information, run $0 --help."
9984 if test "$warning" != no; then
9985 echo '' ; echo "$warnsep" ; echo ''