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."
80 --with-gl Build those demos which depend on OpenGL."
82 --with-gle Build those demos which depend on GLE
83 (the OpenGL "extrusion" library.)"
85 --with-xpm Include support for XPM files in some demos."
87 --with-xshm-ext Include support for the XSHM extension."
89 --with-xdbe-ext Include support for the DOUBLE-BUFFER extension."
91 --with-readdisplay Include support for the XReadDisplay extension."
93 --with-sgivideo Include support for SGI's Iris Video Library."
96 --with-zippy=PROGRAM Some demos are able to run an external program and
97 display its text; this names the program to use by
98 default (though it can be overridden with X
99 resources.) If you don't specify this, the default
100 is to use \"yow\" from the Emacs distribution (if you
101 have it) or else to use \"fortune\".
104 # Initialize some variables set by options.
105 # The variables have the same names as the options, with
106 # dashes changed to underlines.
108 cache_file=./config.cache
117 program_transform_name=s,x,x,
125 bindir='${exec_prefix}/bin'
126 sbindir='${exec_prefix}/sbin'
127 libexecdir='${exec_prefix}/libexec'
128 datadir='${prefix}/share'
129 sysconfdir='${prefix}/etc'
130 sharedstatedir='${prefix}/com'
131 localstatedir='${prefix}/var'
132 libdir='${exec_prefix}/lib'
133 includedir='${prefix}/include'
134 oldincludedir='/usr/include'
135 infodir='${prefix}/info'
136 mandir='${prefix}/man'
138 # Initialize some other variables.
141 SHELL=${CONFIG_SHELL-/bin/sh}
142 # Maximum number of lines to put in a shell here document.
149 # If the previous option needs an argument, assign it.
150 if test -n "$ac_prev"; then
151 eval "$ac_prev=\$ac_option"
157 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
161 # Accept the important Cygnus configure options, so we can diagnose typos.
165 -bindir | --bindir | --bindi | --bind | --bin | --bi)
167 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
168 bindir="$ac_optarg" ;;
170 -build | --build | --buil | --bui | --bu)
172 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
173 build="$ac_optarg" ;;
175 -cache-file | --cache-file | --cache-fil | --cache-fi \
176 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
177 ac_prev=cache_file ;;
178 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
179 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
180 cache_file="$ac_optarg" ;;
182 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
184 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
186 datadir="$ac_optarg" ;;
188 -disable-* | --disable-*)
189 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
190 # Reject names that are not valid shell variable names.
191 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
192 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
194 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
195 eval "enable_${ac_feature}=no" ;;
197 -enable-* | --enable-*)
198 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
199 # Reject names that are not valid shell variable names.
200 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
201 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
203 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
208 eval "enable_${ac_feature}='$ac_optarg'" ;;
210 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
211 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
212 | --exec | --exe | --ex)
213 ac_prev=exec_prefix ;;
214 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
215 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
216 | --exec=* | --exe=* | --ex=*)
217 exec_prefix="$ac_optarg" ;;
219 -gas | --gas | --ga | --g)
220 # Obsolete; use --with-gas.
223 -help | --help | --hel | --he)
224 # Omit some internal or obsolete options to make the list less imposing.
225 # This message is too long to be a string in the A/UX 3.1 sh.
227 Usage: configure [options] [host]
228 Options: [defaults in brackets after descriptions]
232 --cache-file=FILE cache test results in FILE
233 --help print this message
234 --no-create do not create output files
235 --quiet, --silent do not print \`checking...' messages
236 --version print the version of autoconf that created configure
238 Directory and file names:
240 --prefix=PREFIX install architecture-independent files in PREFIX
242 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
244 --bindir=DIR user executables in DIR [EPREFIX/bin]
245 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
246 --includedir=DIR C header files in DIR [PREFIX/include]
247 --x-includes=DIR X include files are in DIR
248 --x-libraries=DIR X library files are in DIR
249 --mandir=DIR man documentation in DIR [PREFIX/man]
250 --srcdir=DIR find the sources in DIR [configure dir or ..]
251 --program-prefix=PREFIX prepend PREFIX to installed program names
252 --program-suffix=SUFFIX append SUFFIX to installed program names
253 --program-transform-name=PROGRAM
254 run sed PROGRAM on installed program names
260 --build=BUILD configure for building on BUILD [BUILD=HOST]
261 --host=HOST configure for HOST [guessed]
262 --target=TARGET configure for TARGET [TARGET=HOST]
264 if test -n "$ac_help"; then
269 -host | --host | --hos | --ho)
271 -host=* | --host=* | --hos=* | --ho=*)
274 -includedir | --includedir | --includedi | --included | --include \
275 | --includ | --inclu | --incl | --inc)
276 ac_prev=includedir ;;
277 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
278 | --includ=* | --inclu=* | --incl=* | --inc=*)
279 includedir="$ac_optarg" ;;
281 -infodir | --infodir | --infodi | --infod | --info | --inf)
283 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
284 infodir="$ac_optarg" ;;
286 -libdir | --libdir | --libdi | --libd)
288 -libdir=* | --libdir=* | --libdi=* | --libd=*)
289 libdir="$ac_optarg" ;;
291 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
292 | --libexe | --libex | --libe)
293 ac_prev=libexecdir ;;
294 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
295 | --libexe=* | --libex=* | --libe=*)
296 libexecdir="$ac_optarg" ;;
298 -localstatedir | --localstatedir | --localstatedi | --localstated \
299 | --localstate | --localstat | --localsta | --localst \
300 | --locals | --local | --loca | --loc | --lo)
301 ac_prev=localstatedir ;;
302 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
303 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
304 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
305 localstatedir="$ac_optarg" ;;
307 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
309 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
310 mandir="$ac_optarg" ;;
313 # Obsolete; use --without-fp.
316 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
320 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
321 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
324 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
325 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
326 | --oldin | --oldi | --old | --ol | --o)
327 ac_prev=oldincludedir ;;
328 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
329 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
330 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
331 oldincludedir="$ac_optarg" ;;
333 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
335 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
336 prefix="$ac_optarg" ;;
338 -program-prefix | --program-prefix | --program-prefi | --program-pref \
339 | --program-pre | --program-pr | --program-p)
340 ac_prev=program_prefix ;;
341 -program-prefix=* | --program-prefix=* | --program-prefi=* \
342 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
343 program_prefix="$ac_optarg" ;;
345 -program-suffix | --program-suffix | --program-suffi | --program-suff \
346 | --program-suf | --program-su | --program-s)
347 ac_prev=program_suffix ;;
348 -program-suffix=* | --program-suffix=* | --program-suffi=* \
349 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
350 program_suffix="$ac_optarg" ;;
352 -program-transform-name | --program-transform-name \
353 | --program-transform-nam | --program-transform-na \
354 | --program-transform-n | --program-transform- \
355 | --program-transform | --program-transfor \
356 | --program-transfo | --program-transf \
357 | --program-trans | --program-tran \
358 | --progr-tra | --program-tr | --program-t)
359 ac_prev=program_transform_name ;;
360 -program-transform-name=* | --program-transform-name=* \
361 | --program-transform-nam=* | --program-transform-na=* \
362 | --program-transform-n=* | --program-transform-=* \
363 | --program-transform=* | --program-transfor=* \
364 | --program-transfo=* | --program-transf=* \
365 | --program-trans=* | --program-tran=* \
366 | --progr-tra=* | --program-tr=* | --program-t=*)
367 program_transform_name="$ac_optarg" ;;
369 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
370 | -silent | --silent | --silen | --sile | --sil)
373 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
375 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
377 sbindir="$ac_optarg" ;;
379 -sharedstatedir | --sharedstatedir | --sharedstatedi \
380 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
381 | --sharedst | --shareds | --shared | --share | --shar \
383 ac_prev=sharedstatedir ;;
384 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
385 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
386 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
388 sharedstatedir="$ac_optarg" ;;
390 -site | --site | --sit)
392 -site=* | --site=* | --sit=*)
395 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
397 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
398 srcdir="$ac_optarg" ;;
400 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
401 | --syscon | --sysco | --sysc | --sys | --sy)
402 ac_prev=sysconfdir ;;
403 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
404 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
405 sysconfdir="$ac_optarg" ;;
407 -target | --target | --targe | --targ | --tar | --ta | --t)
409 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
410 target="$ac_optarg" ;;
412 -v | -verbose | --verbose | --verbos | --verbo | --verb)
415 -version | --version | --versio | --versi | --vers)
416 echo "configure generated by autoconf version 2.13"
420 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
421 # Reject names that are not valid shell variable names.
422 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
423 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
425 ac_package=`echo $ac_package| sed 's/-/_/g'`
430 eval "with_${ac_package}='$ac_optarg'" ;;
432 -without-* | --without-*)
433 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
434 # Reject names that are not valid shell variable names.
435 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
436 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
438 ac_package=`echo $ac_package| sed 's/-/_/g'`
439 eval "with_${ac_package}=no" ;;
442 # Obsolete; use --with-x.
445 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
446 | --x-incl | --x-inc | --x-in | --x-i)
447 ac_prev=x_includes ;;
448 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
449 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
450 x_includes="$ac_optarg" ;;
452 -x-libraries | --x-libraries | --x-librarie | --x-librari \
453 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
454 ac_prev=x_libraries ;;
455 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
456 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
457 x_libraries="$ac_optarg" ;;
459 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
463 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
464 echo "configure: warning: $ac_option: invalid host type" 1>&2
466 if test "x$nonopt" != xNONE; then
467 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
475 if test -n "$ac_prev"; then
476 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
479 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
481 # File descriptor usage:
484 # 2 errors and warnings
485 # 3 some systems may open it to /dev/tty
486 # 4 used on the Kubota Titan
487 # 6 checking for... messages and results
488 # 5 compiler messages saved in config.log
489 if test "$silent" = yes; then
497 This file contains any messages produced by compilers while
498 running configure, to aid debugging if configure makes a mistake.
501 # Strip out --no-create and --no-recursion so they do not pile up.
502 # Also quote any args containing shell metacharacters.
507 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
508 | --no-cr | --no-c) ;;
509 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
510 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
511 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
512 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
513 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
518 # Only set these to C if already set. These must not be set unconditionally
519 # because not all systems understand e.g. LANG=C (notably SCO).
520 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
521 # Non-C LC_CTYPE values break the ctype check.
522 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
523 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
524 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
525 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
527 # confdefs.h avoids OS command line length limits that DEFS can exceed.
528 rm -rf conftest* confdefs.h
529 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
532 # A filename unique to this package, relative to the directory that
533 # configure is in, which we can look for to find out if srcdir is correct.
534 ac_unique_file=driver/subprocs.c
536 # Find the source files, if location was not specified.
537 if test -z "$srcdir"; then
538 ac_srcdir_defaulted=yes
539 # Try the directory containing this script, then its parent.
541 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
542 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
544 if test ! -r $srcdir/$ac_unique_file; then
548 ac_srcdir_defaulted=no
550 if test ! -r $srcdir/$ac_unique_file; then
551 if test "$ac_srcdir_defaulted" = yes; then
552 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
554 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
557 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
559 # Prefer explicitly selected file to automatically selected ones.
560 if test -z "$CONFIG_SITE"; then
561 if test "x$prefix" != xNONE; then
562 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
564 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
567 for ac_site_file in $CONFIG_SITE; do
568 if test -r "$ac_site_file"; then
569 echo "loading site script $ac_site_file"
574 if test -r "$cache_file"; then
575 echo "loading cache $cache_file"
578 echo "creating cache $cache_file"
583 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
584 ac_cpp='$CPP $CPPFLAGS'
585 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
586 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
587 cross_compiling=$ac_cv_prog_cc_cross
591 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
592 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
593 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
600 ac_n= ac_c='\c' ac_t=
606 echo "current directory: `pwd`"
607 echo "command line was: $0 $@"
610 # After checking to see that --srcdir is correct (which AC_INIT does)
611 # check for some random other files that come later in the tar file,
612 # to make sure everything is here.
614 for d in driver utils hacks hacks/glx ; do
615 f=$srcdir/$d/Makefile.in
616 if test \! -r $f ; then
618 echo "ERROR: The package is incomplete: $f does not exist."
619 echo " This probably means that your download was truncated."
626 ###############################################################################
628 # Function to figure out how to run the compiler.
630 ###############################################################################
635 ###############################################################################
637 # Function to figure out how to create directory trees.
639 ###############################################################################
644 ###############################################################################
646 # Function to check whether gettimeofday() exists, and how to call it.
647 # This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
649 ###############################################################################
654 ###############################################################################
656 # Function to find perl5 (defines PERL and PERL_VERSION.)
658 ###############################################################################
660 # M4 sucks!! perl sucks too!!
662 perl_version_cmd='print $]'
668 ###############################################################################
670 # Functions to check how to do ICMP PING requests.
672 ###############################################################################
679 ###############################################################################
681 # Functions to check for various X11 crap.
683 ###############################################################################
685 # Try and find the app-defaults directory.
686 # It sucks that autoconf doesn't do this already...
698 # Random special-cases for X on certain pathological OSes.
699 # You know who you are.
705 ###############################################################################
707 # Some utility functions to make checking for X things easier.
709 ###############################################################################
711 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
715 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
719 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
724 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
725 # Use this sparingly; it probably doesn't work very well on X programs.
729 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
730 # (But not the -L directories!)
736 # Usage: HANDLE_X_PATH_ARG([variable_name],
737 # [--command-line-option],
738 # [descriptive string])
740 # All of the --with options take three forms:
742 # --with-foo (or --with-foo=yes)
743 # --without-foo (or --with-foo=no)
746 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
747 # a directory (string beginning with a slash) it checks to see whether
748 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
755 ###############################################################################
756 ###############################################################################
758 # End of function definitions. Now start actually executing stuff.
760 ###############################################################################
761 ###############################################################################
763 # random compiler setup
765 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
766 if test -f $ac_dir/install-sh; then
768 ac_install_sh="$ac_aux_dir/install-sh -c"
770 elif test -f $ac_dir/install.sh; then
772 ac_install_sh="$ac_aux_dir/install.sh -c"
776 if test -z "$ac_aux_dir"; then
777 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
779 ac_config_guess=$ac_aux_dir/config.guess
780 ac_config_sub=$ac_aux_dir/config.sub
781 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
784 # Make sure we can run config.sub.
785 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
786 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
789 echo $ac_n "checking host system type""... $ac_c" 1>&6
790 echo "configure:802: checking host system type" >&5
793 case "$host_alias" in
797 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
798 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
800 *) host_alias=$nonopt ;;
804 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
805 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
806 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
807 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
808 echo "$ac_t""$host" 1>&6
810 # Extract the first word of "gcc", so it can be a program name with args.
811 set dummy gcc; ac_word=$2
812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
813 echo "configure:825: checking for $ac_word" >&5
814 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
815 echo $ac_n "(cached) $ac_c" 1>&6
817 if test -n "$CC"; then
818 ac_cv_prog_CC="$CC" # Let the user override the test.
820 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
822 for ac_dir in $ac_dummy; do
823 test -z "$ac_dir" && ac_dir=.
824 if test -f $ac_dir/$ac_word; then
833 if test -n "$CC"; then
834 echo "$ac_t""$CC" 1>&6
836 echo "$ac_t""no" 1>&6
839 if test -z "$CC"; then
840 # Extract the first word of "cc", so it can be a program name with args.
841 set dummy cc; ac_word=$2
842 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
843 echo "configure:855: checking for $ac_word" >&5
844 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
845 echo $ac_n "(cached) $ac_c" 1>&6
847 if test -n "$CC"; then
848 ac_cv_prog_CC="$CC" # Let the user override the test.
850 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
853 for ac_dir in $ac_dummy; do
854 test -z "$ac_dir" && ac_dir=.
855 if test -f $ac_dir/$ac_word; then
856 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
865 if test $ac_prog_rejected = yes; then
866 # We found a bogon in the path, so make sure we never use it.
867 set dummy $ac_cv_prog_CC
869 if test $# -gt 0; then
870 # We chose a different compiler from the bogus one.
871 # However, it has the same basename, so the bogon will be chosen
872 # first if we set CC to just the basename; use the full file name.
874 set dummy "$ac_dir/$ac_word" "$@"
882 if test -n "$CC"; then
883 echo "$ac_t""$CC" 1>&6
885 echo "$ac_t""no" 1>&6
888 if test -z "$CC"; then
891 # Extract the first word of "cl", so it can be a program name with args.
892 set dummy cl; ac_word=$2
893 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
894 echo "configure:906: checking for $ac_word" >&5
895 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
896 echo $ac_n "(cached) $ac_c" 1>&6
898 if test -n "$CC"; then
899 ac_cv_prog_CC="$CC" # Let the user override the test.
901 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
903 for ac_dir in $ac_dummy; do
904 test -z "$ac_dir" && ac_dir=.
905 if test -f $ac_dir/$ac_word; then
914 if test -n "$CC"; then
915 echo "$ac_t""$CC" 1>&6
917 echo "$ac_t""no" 1>&6
922 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
925 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
926 echo "configure:938: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
929 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
930 ac_cpp='$CPP $CPPFLAGS'
931 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
932 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
933 cross_compiling=$ac_cv_prog_cc_cross
935 cat > conftest.$ac_ext << EOF
937 #line 949 "configure"
938 #include "confdefs.h"
942 if { (eval echo configure:954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
943 ac_cv_prog_cc_works=yes
944 # If we can't run a trivial program, we are probably using a cross compiler.
945 if (./conftest; exit) 2>/dev/null; then
946 ac_cv_prog_cc_cross=no
948 ac_cv_prog_cc_cross=yes
951 echo "configure: failed program was:" >&5
952 cat conftest.$ac_ext >&5
953 ac_cv_prog_cc_works=no
957 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
958 ac_cpp='$CPP $CPPFLAGS'
959 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
960 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
961 cross_compiling=$ac_cv_prog_cc_cross
963 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
964 if test $ac_cv_prog_cc_works = no; then
965 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
967 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
968 echo "configure:980: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
969 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
970 cross_compiling=$ac_cv_prog_cc_cross
972 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
973 echo "configure:985: checking whether we are using GNU C" >&5
974 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
975 echo $ac_n "(cached) $ac_c" 1>&6
977 cat > conftest.c <<EOF
982 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
989 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
991 if test $ac_cv_prog_gcc = yes; then
997 ac_test_CFLAGS="${CFLAGS+set}"
998 ac_save_CFLAGS="$CFLAGS"
1000 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1001 echo "configure:1013: checking whether ${CC-cc} accepts -g" >&5
1002 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1003 echo $ac_n "(cached) $ac_c" 1>&6
1005 echo 'void f(){}' > conftest.c
1006 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1015 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1016 if test "$ac_test_CFLAGS" = set; then
1017 CFLAGS="$ac_save_CFLAGS"
1018 elif test $ac_cv_prog_cc_g = yes; then
1019 if test "$GCC" = yes; then
1025 if test "$GCC" = yes; then
1033 if test -z "$GCC"; then
1034 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
1035 echo "configure:1047: checking how to request ANSI compilation" >&5
1038 echo "$ac_t""HPUX: adding -Ae" 1>&6
1042 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
1043 CC="$CC -qlanglvl=ansi -qhalt=e"
1047 echo "$ac_t""DEC: adding -std1" 1>&6
1052 echo "$ac_t""no idea" 1>&6
1057 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
1058 echo "configure:1070: checking whether the compiler works on ANSI C" >&5
1059 if test "$cross_compiling" = yes; then
1060 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1062 cat > conftest.$ac_ext <<EOF
1063 #line 1075 "configure"
1064 #include "confdefs.h"
1065 main(int ac, char **av) { return 0; }
1067 if { (eval echo configure:1079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1069 echo "$ac_t""yes" 1>&6
1071 echo "configure: failed program was:" >&5
1072 cat conftest.$ac_ext >&5
1074 echo "$ac_t""no" 1>&6
1075 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1081 if test -n "$GCC"; then
1082 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
1083 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
1084 echo "$ac_t""Disabling C++ comments in ANSI C code." 1>&6
1085 CC="$CC -Wp,-lang-c89"
1088 *-irix5* |*-irix6.0-3* )
1089 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1090 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1093 # if test -z "$GCC"; then
1094 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1095 # CC="$CC -migrate -w0 -verbose -warnprotos"
1101 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1102 echo "configure:1114: checking how to run the C preprocessor" >&5
1103 # On Suns, sometimes $CPP names a directory.
1104 if test -n "$CPP" && test -d "$CPP"; then
1107 if test -z "$CPP"; then
1108 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1109 echo $ac_n "(cached) $ac_c" 1>&6
1111 # This must be in double quotes, not single quotes, because CPP may get
1112 # substituted into the Makefile and "${CC-cc}" will confuse make.
1114 # On the NeXT, cc -E runs the code through the compiler's parser,
1115 # not just through cpp.
1116 cat > conftest.$ac_ext <<EOF
1117 #line 1129 "configure"
1118 #include "confdefs.h"
1122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1123 { (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1125 if test -z "$ac_err"; then
1129 echo "configure: failed program was:" >&5
1130 cat conftest.$ac_ext >&5
1132 CPP="${CC-cc} -E -traditional-cpp"
1133 cat > conftest.$ac_ext <<EOF
1134 #line 1146 "configure"
1135 #include "confdefs.h"
1139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1140 { (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1142 if test -z "$ac_err"; then
1146 echo "configure: failed program was:" >&5
1147 cat conftest.$ac_ext >&5
1149 CPP="${CC-cc} -nologo -E"
1150 cat > conftest.$ac_ext <<EOF
1151 #line 1163 "configure"
1152 #include "confdefs.h"
1156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1157 { (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1159 if test -z "$ac_err"; then
1163 echo "configure: failed program was:" >&5
1164 cat conftest.$ac_ext >&5
1173 ac_cv_prog_CPP="$CPP"
1175 CPP="$ac_cv_prog_CPP"
1177 ac_cv_prog_CPP="$CPP"
1179 echo "$ac_t""$CPP" 1>&6
1181 echo $ac_n "checking for working const""... $ac_c" 1>&6
1182 echo "configure:1194: checking for working const" >&5
1183 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1184 echo $ac_n "(cached) $ac_c" 1>&6
1186 cat > conftest.$ac_ext <<EOF
1187 #line 1199 "configure"
1188 #include "confdefs.h"
1192 /* Ultrix mips cc rejects this. */
1193 typedef int charset[2]; const charset x;
1194 /* SunOS 4.1.1 cc rejects this. */
1195 char const *const *ccp;
1197 /* NEC SVR4.0.2 mips cc rejects this. */
1198 struct point {int x, y;};
1199 static struct point const zero = {0,0};
1200 /* AIX XL C 1.02.0.0 rejects this.
1201 It does not let you subtract one const X* pointer from another in an arm
1202 of an if-expression whose if-part is not a constant expression */
1203 const char *g = "string";
1204 ccp = &g + (g ? g-g : 0);
1205 /* HPUX 7.0 cc rejects these. */
1208 ccp = (char const *const *) p;
1209 { /* SCO 3.2v4 cc rejects this. */
1211 char const *s = 0 ? (char *) 0 : (char const *) 0;
1215 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1217 const int *foo = &x[0];
1220 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1221 typedef const int *iptr;
1225 { /* AIX XL C 1.02.0.0 rejects this saying
1226 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1227 struct s { int j; const int *ap[3]; };
1228 struct s *b; b->j = 5;
1230 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1236 if { (eval echo configure:1248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1240 echo "configure: failed program was:" >&5
1241 cat conftest.$ac_ext >&5
1248 echo "$ac_t""$ac_cv_c_const" 1>&6
1249 if test $ac_cv_c_const = no; then
1250 cat >> confdefs.h <<\EOF
1256 echo $ac_n "checking for inline""... $ac_c" 1>&6
1257 echo "configure:1269: checking for inline" >&5
1258 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1259 echo $ac_n "(cached) $ac_c" 1>&6
1262 for ac_kw in inline __inline__ __inline; do
1263 cat > conftest.$ac_ext <<EOF
1264 #line 1276 "configure"
1265 #include "confdefs.h"
1271 if { (eval echo configure:1283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1273 ac_cv_c_inline=$ac_kw; break
1275 echo "configure: failed program was:" >&5
1276 cat conftest.$ac_ext >&5
1283 echo "$ac_t""$ac_cv_c_inline" 1>&6
1284 case "$ac_cv_c_inline" in
1286 no) cat >> confdefs.h <<\EOF
1290 *) cat >> confdefs.h <<EOF
1291 #define inline $ac_cv_c_inline
1297 # stuff for Makefiles
1298 # Find a good install program. We prefer a C program (faster),
1299 # so one script is as good as another. But avoid the broken or
1300 # incompatible versions:
1301 # SysV /etc/install, /usr/sbin/install
1302 # SunOS /usr/etc/install
1303 # IRIX /sbin/install
1305 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1306 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1307 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1308 # ./install, which can be erroneously created by make from ./install.sh.
1309 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1310 echo "configure:1322: checking for a BSD compatible install" >&5
1311 if test -z "$INSTALL"; then
1312 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1313 echo $ac_n "(cached) $ac_c" 1>&6
1315 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1316 for ac_dir in $PATH; do
1317 # Account for people who put trailing slashes in PATH elements.
1319 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1321 # OSF1 and SCO ODT 3.0 have their own names for install.
1322 # Don't use installbsd from OSF since it installs stuff as root
1324 for ac_prog in ginstall scoinst install; do
1325 if test -f $ac_dir/$ac_prog; then
1326 if test $ac_prog = install &&
1327 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1328 # AIX install. It has an incompatible calling convention.
1331 ac_cv_path_install="$ac_dir/$ac_prog -c"
1342 if test "${ac_cv_path_install+set}" = set; then
1343 INSTALL="$ac_cv_path_install"
1345 # As a last resort, use the slow shell script. We don't cache a
1346 # path for INSTALL within a source directory, because that will
1347 # break other packages using the cache if that directory is
1348 # removed, or if the path is relative.
1349 INSTALL="$ac_install_sh"
1352 echo "$ac_t""$INSTALL" 1>&6
1354 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1355 # It thinks the first close brace ends the variable substitution.
1356 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1358 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1360 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1362 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1363 echo "configure:1375: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1364 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1365 echo $ac_n "(cached) $ac_c" 1>&6
1367 ac_cv_install_d_creates_dirs=no
1369 if mkdir conftestdir; then
1371 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1372 if test -d dir1/dir2/. ; then
1373 ac_cv_install_d_creates_dirs=yes
1381 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1383 if test "$ac_cv_install_d_creates_dirs" = no ; then
1384 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1385 echo "configure:1397: checking whether \"mkdir -p\" creates intermediate directories" >&5
1386 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1387 echo $ac_n "(cached) $ac_c" 1>&6
1389 ac_cv_mkdir_p_creates_dirs=no
1391 if mkdir conftestdir; then
1393 mkdir -p dir1/dir2 >&- 2>&-
1394 if test -d dir1/dir2/. ; then
1395 ac_cv_mkdir_p_creates_dirs=yes
1403 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1406 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1407 INSTALL_DIRS='${INSTALL} -d'
1408 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1409 INSTALL_DIRS='mkdir -p'
1412 INSTALL_DIRS='${INSTALL} -d'
1415 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1416 echo "configure:1428: checking whether ${MAKE-make} sets \${MAKE}" >&5
1417 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1418 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1419 echo $ac_n "(cached) $ac_c" 1>&6
1421 cat > conftestmake <<\EOF
1423 @echo 'ac_maketemp="${MAKE}"'
1425 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1426 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1427 if test -n "$ac_maketemp"; then
1428 eval ac_cv_prog_make_${ac_make}_set=yes
1430 eval ac_cv_prog_make_${ac_make}_set=no
1434 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1435 echo "$ac_t""yes" 1>&6
1438 echo "$ac_t""no" 1>&6
1439 SET_MAKE="MAKE=${MAKE-make}"
1444 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1445 echo "configure:1457: checking for ANSI C header files" >&5
1446 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1447 echo $ac_n "(cached) $ac_c" 1>&6
1449 cat > conftest.$ac_ext <<EOF
1450 #line 1462 "configure"
1451 #include "confdefs.h"
1457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1458 { (eval echo configure:1470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1460 if test -z "$ac_err"; then
1462 ac_cv_header_stdc=yes
1465 echo "configure: failed program was:" >&5
1466 cat conftest.$ac_ext >&5
1468 ac_cv_header_stdc=no
1472 if test $ac_cv_header_stdc = yes; then
1473 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1474 cat > conftest.$ac_ext <<EOF
1475 #line 1487 "configure"
1476 #include "confdefs.h"
1479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1480 egrep "memchr" >/dev/null 2>&1; then
1484 ac_cv_header_stdc=no
1490 if test $ac_cv_header_stdc = yes; then
1491 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1492 cat > conftest.$ac_ext <<EOF
1493 #line 1505 "configure"
1494 #include "confdefs.h"
1497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1498 egrep "free" >/dev/null 2>&1; then
1502 ac_cv_header_stdc=no
1508 if test $ac_cv_header_stdc = yes; then
1509 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1510 if test "$cross_compiling" = yes; then
1513 cat > conftest.$ac_ext <<EOF
1514 #line 1526 "configure"
1515 #include "confdefs.h"
1517 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1518 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1519 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1520 int main () { int i; for (i = 0; i < 256; i++)
1521 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1525 if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1529 echo "configure: failed program was:" >&5
1530 cat conftest.$ac_ext >&5
1532 ac_cv_header_stdc=no
1540 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1541 if test $ac_cv_header_stdc = yes; then
1542 cat >> confdefs.h <<\EOF
1543 #define STDC_HEADERS 1
1548 for ac_hdr in unistd.h
1550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1552 echo "configure:1564: checking for $ac_hdr" >&5
1553 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1554 echo $ac_n "(cached) $ac_c" 1>&6
1556 cat > conftest.$ac_ext <<EOF
1557 #line 1569 "configure"
1558 #include "confdefs.h"
1561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1562 { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1564 if test -z "$ac_err"; then
1566 eval "ac_cv_header_$ac_safe=yes"
1569 echo "configure: failed program was:" >&5
1570 cat conftest.$ac_ext >&5
1572 eval "ac_cv_header_$ac_safe=no"
1576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1577 echo "$ac_t""yes" 1>&6
1578 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1579 cat >> confdefs.h <<EOF
1580 #define $ac_tr_hdr 1
1584 echo "$ac_t""no" 1>&6
1588 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1589 echo "configure:1601: checking for mode_t" >&5
1590 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1591 echo $ac_n "(cached) $ac_c" 1>&6
1593 cat > conftest.$ac_ext <<EOF
1594 #line 1606 "configure"
1595 #include "confdefs.h"
1596 #include <sys/types.h>
1602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1603 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1605 ac_cv_type_mode_t=yes
1608 ac_cv_type_mode_t=no
1613 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1614 if test $ac_cv_type_mode_t = no; then
1615 cat >> confdefs.h <<\EOF
1621 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1622 echo "configure:1634: checking for pid_t" >&5
1623 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1624 echo $ac_n "(cached) $ac_c" 1>&6
1626 cat > conftest.$ac_ext <<EOF
1627 #line 1639 "configure"
1628 #include "confdefs.h"
1629 #include <sys/types.h>
1635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1636 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1638 ac_cv_type_pid_t=yes
1646 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1647 if test $ac_cv_type_pid_t = no; then
1648 cat >> confdefs.h <<\EOF
1654 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1655 echo "configure:1667: checking for size_t" >&5
1656 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1657 echo $ac_n "(cached) $ac_c" 1>&6
1659 cat > conftest.$ac_ext <<EOF
1660 #line 1672 "configure"
1661 #include "confdefs.h"
1662 #include <sys/types.h>
1668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1669 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1671 ac_cv_type_size_t=yes
1674 ac_cv_type_size_t=no
1679 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1680 if test $ac_cv_type_size_t = no; then
1681 cat >> confdefs.h <<\EOF
1682 #define size_t unsigned
1687 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1688 echo "configure:1700: checking return type of signal handlers" >&5
1689 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1690 echo $ac_n "(cached) $ac_c" 1>&6
1692 cat > conftest.$ac_ext <<EOF
1693 #line 1705 "configure"
1694 #include "confdefs.h"
1695 #include <sys/types.h>
1701 extern "C" void (*signal (int, void (*)(int)))(int);
1703 void (*signal ()) ();
1710 if { (eval echo configure:1722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1712 ac_cv_type_signal=void
1714 echo "configure: failed program was:" >&5
1715 cat conftest.$ac_ext >&5
1717 ac_cv_type_signal=int
1722 echo "$ac_t""$ac_cv_type_signal" 1>&6
1723 cat >> confdefs.h <<EOF
1724 #define RETSIGTYPE $ac_cv_type_signal
1728 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1729 echo "configure:1741: checking whether time.h and sys/time.h may both be included" >&5
1730 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1731 echo $ac_n "(cached) $ac_c" 1>&6
1733 cat > conftest.$ac_ext <<EOF
1734 #line 1746 "configure"
1735 #include "confdefs.h"
1736 #include <sys/types.h>
1737 #include <sys/time.h>
1743 if { (eval echo configure:1755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1745 ac_cv_header_time=yes
1747 echo "configure: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1750 ac_cv_header_time=no
1755 echo "$ac_t""$ac_cv_header_time" 1>&6
1756 if test $ac_cv_header_time = yes; then
1757 cat >> confdefs.h <<\EOF
1758 #define TIME_WITH_SYS_TIME 1
1763 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1764 echo "configure:1776: checking for sys/wait.h that is POSIX.1 compatible" >&5
1765 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1766 echo $ac_n "(cached) $ac_c" 1>&6
1768 cat > conftest.$ac_ext <<EOF
1769 #line 1781 "configure"
1770 #include "confdefs.h"
1771 #include <sys/types.h>
1772 #include <sys/wait.h>
1774 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1777 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1782 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1785 if { (eval echo configure:1797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1787 ac_cv_header_sys_wait_h=yes
1789 echo "configure: failed program was:" >&5
1790 cat conftest.$ac_ext >&5
1792 ac_cv_header_sys_wait_h=no
1797 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1798 if test $ac_cv_header_sys_wait_h = yes; then
1799 cat >> confdefs.h <<\EOF
1800 #define HAVE_SYS_WAIT_H 1
1806 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1808 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1809 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1810 echo "configure:1822: checking for $ac_hdr that defines DIR" >&5
1811 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1812 echo $ac_n "(cached) $ac_c" 1>&6
1814 cat > conftest.$ac_ext <<EOF
1815 #line 1827 "configure"
1816 #include "confdefs.h"
1817 #include <sys/types.h>
1823 if { (eval echo configure:1835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1825 eval "ac_cv_header_dirent_$ac_safe=yes"
1827 echo "configure: failed program was:" >&5
1828 cat conftest.$ac_ext >&5
1830 eval "ac_cv_header_dirent_$ac_safe=no"
1834 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1835 echo "$ac_t""yes" 1>&6
1836 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1837 cat >> confdefs.h <<EOF
1838 #define $ac_tr_hdr 1
1840 ac_header_dirent=$ac_hdr; break
1842 echo "$ac_t""no" 1>&6
1845 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1846 if test $ac_header_dirent = dirent.h; then
1847 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1848 echo "configure:1860: checking for opendir in -ldir" >&5
1849 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1851 echo $ac_n "(cached) $ac_c" 1>&6
1853 ac_save_LIBS="$LIBS"
1855 cat > conftest.$ac_ext <<EOF
1856 #line 1868 "configure"
1857 #include "confdefs.h"
1858 /* Override any gcc2 internal prototype to avoid an error. */
1859 /* We use char because int might match the return type of a gcc2
1860 builtin and then its argument prototype would still apply. */
1867 if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1869 eval "ac_cv_lib_$ac_lib_var=yes"
1871 echo "configure: failed program was:" >&5
1872 cat conftest.$ac_ext >&5
1874 eval "ac_cv_lib_$ac_lib_var=no"
1877 LIBS="$ac_save_LIBS"
1880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1881 echo "$ac_t""yes" 1>&6
1884 echo "$ac_t""no" 1>&6
1888 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1889 echo "configure:1901: checking for opendir in -lx" >&5
1890 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1891 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1892 echo $ac_n "(cached) $ac_c" 1>&6
1894 ac_save_LIBS="$LIBS"
1896 cat > conftest.$ac_ext <<EOF
1897 #line 1909 "configure"
1898 #include "confdefs.h"
1899 /* Override any gcc2 internal prototype to avoid an error. */
1900 /* We use char because int might match the return type of a gcc2
1901 builtin and then its argument prototype would still apply. */
1908 if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1910 eval "ac_cv_lib_$ac_lib_var=yes"
1912 echo "configure: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1915 eval "ac_cv_lib_$ac_lib_var=no"
1918 LIBS="$ac_save_LIBS"
1921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1922 echo "$ac_t""yes" 1>&6
1925 echo "$ac_t""no" 1>&6
1930 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1931 echo "configure:1943: checking how to call gettimeofday" >&5
1932 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1933 echo $ac_n "(cached) $ac_c" 1>&6
1935 cat > conftest.$ac_ext <<EOF
1936 #line 1948 "configure"
1937 #include "confdefs.h"
1939 #include <sys/time.h>
1941 struct timeval tv; struct timezone tzp;
1942 gettimeofday(&tv, &tzp);
1945 if { (eval echo configure:1957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1947 ac_gettimeofday_args=2
1949 echo "configure: failed program was:" >&5
1950 cat conftest.$ac_ext >&5
1952 cat > conftest.$ac_ext <<EOF
1953 #line 1965 "configure"
1954 #include "confdefs.h"
1956 #include <sys/time.h>
1958 struct timeval tv; gettimeofday(&tv);
1961 if { (eval echo configure:1973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1963 ac_gettimeofday_args=1
1965 echo "configure: failed program was:" >&5
1966 cat conftest.$ac_ext >&5
1968 ac_gettimeofday_args=0
1973 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1976 ac_gettimeofday_args=$ac_cv_gettimeofday_args
1977 if test "$ac_gettimeofday_args" = 1 ; then
1978 cat >> confdefs.h <<\EOF
1979 #define HAVE_GETTIMEOFDAY 1
1982 echo "$ac_t""one argument" 1>&6
1983 elif test "$ac_gettimeofday_args" = 2 ; then
1984 cat >> confdefs.h <<\EOF
1985 #define HAVE_GETTIMEOFDAY 1
1988 cat >> confdefs.h <<\EOF
1989 #define GETTIMEOFDAY_TWO_ARGS 1
1992 echo "$ac_t""two arguments" 1>&6
1994 echo "$ac_t""unknown" 1>&6
1997 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
1999 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2000 echo "configure:2012: checking for $ac_func" >&5
2001 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2002 echo $ac_n "(cached) $ac_c" 1>&6
2004 cat > conftest.$ac_ext <<EOF
2005 #line 2017 "configure"
2006 #include "confdefs.h"
2007 /* System header to define __stub macros and hopefully few prototypes,
2008 which can conflict with char $ac_func(); below. */
2010 /* Override any gcc2 internal prototype to avoid an error. */
2011 /* We use char because int might match the return type of a gcc2
2012 builtin and then its argument prototype would still apply. */
2017 /* The GNU C library defines this for functions which it implements
2018 to always fail with ENOSYS. Some functions are actually named
2019 something starting with __ and the normal name is an alias. */
2020 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2028 if { (eval echo configure:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2030 eval "ac_cv_func_$ac_func=yes"
2032 echo "configure: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2035 eval "ac_cv_func_$ac_func=no"
2040 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2041 echo "$ac_t""yes" 1>&6
2042 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2043 cat >> confdefs.h <<EOF
2044 #define $ac_tr_func 1
2048 echo "$ac_t""no" 1>&6
2053 for ac_func in sigaction syslog realpath
2055 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2056 echo "configure:2068: checking for $ac_func" >&5
2057 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2058 echo $ac_n "(cached) $ac_c" 1>&6
2060 cat > conftest.$ac_ext <<EOF
2061 #line 2073 "configure"
2062 #include "confdefs.h"
2063 /* System header to define __stub macros and hopefully few prototypes,
2064 which can conflict with char $ac_func(); below. */
2066 /* Override any gcc2 internal prototype to avoid an error. */
2067 /* We use char because int might match the return type of a gcc2
2068 builtin and then its argument prototype would still apply. */
2073 /* The GNU C library defines this for functions which it implements
2074 to always fail with ENOSYS. Some functions are actually named
2075 something starting with __ and the normal name is an alias. */
2076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2084 if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2086 eval "ac_cv_func_$ac_func=yes"
2088 echo "configure: failed program was:" >&5
2089 cat conftest.$ac_ext >&5
2091 eval "ac_cv_func_$ac_func=no"
2096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2097 echo "$ac_t""yes" 1>&6
2098 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2099 cat >> confdefs.h <<EOF
2100 #define $ac_tr_func 1
2104 echo "$ac_t""no" 1>&6
2108 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2109 echo "configure:2121: checking for struct icmp" >&5
2110 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2111 echo $ac_n "(cached) $ac_c" 1>&6
2113 cat > conftest.$ac_ext <<EOF
2114 #line 2126 "configure"
2115 #include "confdefs.h"
2123 #include <sys/types.h>
2124 #include <sys/time.h>
2125 #include <sys/ipc.h>
2126 #include <sys/shm.h>
2127 #include <sys/socket.h>
2128 #include <netinet/in_systm.h>
2129 #include <netinet/in.h>
2130 #include <netinet/ip.h>
2131 #include <netinet/ip_icmp.h>
2132 #include <netinet/udp.h>
2133 #include <arpa/inet.h>
2138 struct sockaddr_in si;
2140 i.icmp_type = ICMP_ECHO;
2145 si.sin_family = AF_INET;
2149 if { (eval echo configure:2161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2153 echo "configure: failed program was:" >&5
2154 cat conftest.$ac_ext >&5
2161 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2162 if test "$ac_cv_have_icmp" = yes ; then
2163 cat >> confdefs.h <<\EOF
2168 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2169 echo "configure:2181: checking for struct icmphdr" >&5
2170 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2171 echo $ac_n "(cached) $ac_c" 1>&6
2173 cat > conftest.$ac_ext <<EOF
2174 #line 2186 "configure"
2175 #include "confdefs.h"
2183 #include <sys/types.h>
2184 #include <sys/time.h>
2185 #include <sys/ipc.h>
2186 #include <sys/shm.h>
2187 #include <sys/socket.h>
2188 #include <netinet/in_systm.h>
2189 #include <netinet/in.h>
2190 #include <netinet/ip.h>
2191 #include <netinet/ip_icmp.h>
2192 #include <netinet/udp.h>
2193 #include <arpa/inet.h>
2198 struct sockaddr_in si;
2204 i.un.echo.sequence = 0;
2205 si.sin_family = AF_INET;
2209 if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2211 ac_cv_have_icmphdr=yes
2213 echo "configure: failed program was:" >&5
2214 cat conftest.$ac_ext >&5
2216 ac_cv_have_icmphdr=no
2221 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2222 if test "$ac_cv_have_icmphdr" = yes ; then
2223 cat >> confdefs.h <<\EOF
2224 #define HAVE_ICMPHDR 1
2228 for ac_hdr in crypt.h sys/select.h
2230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2232 echo "configure:2244: checking for $ac_hdr" >&5
2233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2234 echo $ac_n "(cached) $ac_c" 1>&6
2236 cat > conftest.$ac_ext <<EOF
2237 #line 2249 "configure"
2238 #include "confdefs.h"
2241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2242 { (eval echo configure:2254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2244 if test -z "$ac_err"; then
2246 eval "ac_cv_header_$ac_safe=yes"
2249 echo "configure: failed program was:" >&5
2250 cat conftest.$ac_ext >&5
2252 eval "ac_cv_header_$ac_safe=no"
2256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2257 echo "$ac_t""yes" 1>&6
2258 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2259 cat >> confdefs.h <<EOF
2260 #define $ac_tr_hdr 1
2264 echo "$ac_t""no" 1>&6
2268 for ac_prog in perl5 perl
2270 # Extract the first word of "$ac_prog", so it can be a program name with args.
2271 set dummy $ac_prog; ac_word=$2
2272 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2273 echo "configure:2285: checking for $ac_word" >&5
2274 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2275 echo $ac_n "(cached) $ac_c" 1>&6
2279 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2282 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2285 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2287 for ac_dir in $ac_dummy; do
2288 test -z "$ac_dir" && ac_dir=.
2289 if test -f $ac_dir/$ac_word; then
2290 ac_cv_path_PERL="$ac_dir/$ac_word"
2298 PERL="$ac_cv_path_PERL"
2299 if test -n "$PERL"; then
2300 echo "$ac_t""$PERL" 1>&6
2302 echo "$ac_t""no" 1>&6
2305 test -n "$PERL" && break
2308 if test -z "$PERL" ; then
2311 echo $ac_n "checking perl version""... $ac_c" 1>&6
2312 echo "configure:2324: checking perl version" >&5
2313 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2314 echo $ac_n "(cached) $ac_c" 1>&6
2316 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2319 echo "$ac_t""$ac_cv_perl_version" 1>&6
2320 PERL_VERSION=$ac_cv_perl_version
2324 if test -z "$PERL" ; then
2325 # don't let it be blank...
2326 PERL=/usr/local/bin/perl5
2329 # If we find X, set shell vars x_includes and x_libraries to the
2330 # paths, otherwise set no_x=yes.
2331 # Uses ac_ vars as temps to allow command line to override cache and checks.
2332 # --without-x overrides everything else, but does not touch the cache.
2333 echo $ac_n "checking for X""... $ac_c" 1>&6
2334 echo "configure:2346: checking for X" >&5
2336 # Check whether --with-x or --without-x was given.
2337 if test "${with_x+set}" = set; then
2342 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2343 if test "x$with_x" = xno; then
2344 # The user explicitly disabled X.
2347 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2348 # Both variables are already set.
2351 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2352 echo $ac_n "(cached) $ac_c" 1>&6
2354 # One or both of the vars are not set, and there is no cached value.
2355 ac_x_includes=NO ac_x_libraries=NO
2357 if mkdir conftestdir; then
2359 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2360 cat > Imakefile <<'EOF'
2362 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2364 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2365 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2366 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2367 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2368 for ac_extension in a so sl; do
2369 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2370 test -f $ac_im_libdir/libX11.$ac_extension; then
2371 ac_im_usrlibdir=$ac_im_libdir; break
2374 # Screen out bogus values from the imake configuration. They are
2375 # bogus both because they are the default anyway, and because
2376 # using them would break gcc on systems where it needs fixed includes.
2377 case "$ac_im_incroot" in
2379 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2381 case "$ac_im_usrlibdir" in
2383 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2390 if test "$ac_x_includes" = NO; then
2391 # Guess where to find include files, by looking for this one X11 .h file.
2392 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2394 # First, try using that file with no special directory specified.
2395 cat > conftest.$ac_ext <<EOF
2396 #line 2408 "configure"
2397 #include "confdefs.h"
2398 #include <$x_direct_test_include>
2400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2401 { (eval echo configure:2413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2403 if test -z "$ac_err"; then
2405 # We can compile using X headers with no special include directory.
2409 echo "configure: failed program was:" >&5
2410 cat conftest.$ac_ext >&5
2412 # Look for the header file in a standard set of common directories.
2413 # Check X11 before X11Rn because it is often a symlink to the current release.
2416 /usr/X11R6/include \
2417 /usr/X11R5/include \
2418 /usr/X11R4/include \
2421 /usr/include/X11R6 \
2422 /usr/include/X11R5 \
2423 /usr/include/X11R4 \
2425 /usr/local/X11/include \
2426 /usr/local/X11R6/include \
2427 /usr/local/X11R5/include \
2428 /usr/local/X11R4/include \
2430 /usr/local/include/X11 \
2431 /usr/local/include/X11R6 \
2432 /usr/local/include/X11R5 \
2433 /usr/local/include/X11R4 \
2437 /usr/XFree86/include/X11 \
2440 /usr/local/include \
2441 /usr/unsupported/include \
2442 /usr/athena/include \
2443 /usr/local/x11r5/include \
2444 /usr/lpp/Xamples/include \
2446 /usr/openwin/include \
2447 /usr/openwin/share/include \
2450 if test -r "$ac_dir/$x_direct_test_include"; then
2451 ac_x_includes=$ac_dir
2457 fi # $ac_x_includes = NO
2459 if test "$ac_x_libraries" = NO; then
2460 # Check for the libraries.
2462 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2463 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2465 # See if we find them without any special options.
2466 # Don't add to $LIBS permanently.
2467 ac_save_LIBS="$LIBS"
2468 LIBS="-l$x_direct_test_library $LIBS"
2469 cat > conftest.$ac_ext <<EOF
2470 #line 2482 "configure"
2471 #include "confdefs.h"
2474 ${x_direct_test_function}()
2477 if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2479 LIBS="$ac_save_LIBS"
2480 # We can link X programs with no special library path.
2483 echo "configure: failed program was:" >&5
2484 cat conftest.$ac_ext >&5
2486 LIBS="$ac_save_LIBS"
2487 # First see if replacing the include by lib works.
2488 # Check X11 before X11Rn because it is often a symlink to the current release.
2489 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2500 /usr/local/X11/lib \
2501 /usr/local/X11R6/lib \
2502 /usr/local/X11R5/lib \
2503 /usr/local/X11R4/lib \
2505 /usr/local/lib/X11 \
2506 /usr/local/lib/X11R6 \
2507 /usr/local/lib/X11R5 \
2508 /usr/local/lib/X11R4 \
2512 /usr/XFree86/lib/X11 \
2516 /usr/unsupported/lib \
2518 /usr/local/x11r5/lib \
2519 /usr/lpp/Xamples/lib \
2523 /usr/openwin/share/lib \
2526 for ac_extension in a so sl; do
2527 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2528 ac_x_libraries=$ac_dir
2535 fi # $ac_x_libraries = NO
2537 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2538 # Didn't find X anywhere. Cache the known absence of X.
2539 ac_cv_have_x="have_x=no"
2541 # Record where we found X for the cache.
2542 ac_cv_have_x="have_x=yes \
2543 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2547 eval "$ac_cv_have_x"
2550 if test "$have_x" != yes; then
2551 echo "$ac_t""$have_x" 1>&6
2554 # If each of the values was on the command line, it overrides each guess.
2555 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2556 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2557 # Update the cache value to reflect the command line values.
2558 ac_cv_have_x="have_x=yes \
2559 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2560 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2563 if test "$no_x" = yes; then
2564 # Not all programs may use this symbol, but it does not hurt to define it.
2565 cat >> confdefs.h <<\EOF
2566 #define X_DISPLAY_MISSING 1
2569 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2571 if test -n "$x_includes"; then
2572 X_CFLAGS="$X_CFLAGS -I$x_includes"
2575 # It would also be nice to do this for all -L options, not just this one.
2576 if test -n "$x_libraries"; then
2577 X_LIBS="$X_LIBS -L$x_libraries"
2578 # For Solaris; some versions of Sun CC require a space after -R and
2579 # others require no space. Words are not sufficient . . . .
2580 case "`(uname -sr) 2>/dev/null`" in
2582 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2583 echo "configure:2595: checking whether -R must be followed by a space" >&5
2584 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2585 cat > conftest.$ac_ext <<EOF
2586 #line 2598 "configure"
2587 #include "confdefs.h"
2593 if { (eval echo configure:2605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2597 echo "configure: failed program was:" >&5
2598 cat conftest.$ac_ext >&5
2603 if test $ac_R_nospace = yes; then
2604 echo "$ac_t""no" 1>&6
2605 X_LIBS="$X_LIBS -R$x_libraries"
2607 LIBS="$ac_xsave_LIBS -R $x_libraries"
2608 cat > conftest.$ac_ext <<EOF
2609 #line 2621 "configure"
2610 #include "confdefs.h"
2616 if { (eval echo configure:2628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2620 echo "configure: failed program was:" >&5
2621 cat conftest.$ac_ext >&5
2626 if test $ac_R_space = yes; then
2627 echo "$ac_t""yes" 1>&6
2628 X_LIBS="$X_LIBS -R $x_libraries"
2630 echo "$ac_t""neither works" 1>&6
2633 LIBS="$ac_xsave_LIBS"
2637 # Check for system-dependent libraries X programs must link with.
2638 # Do this before checking for the system-independent R6 libraries
2639 # (-lICE), since we may need -lsocket or whatever for X linking.
2641 if test "$ISC" = yes; then
2642 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2644 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2645 # libraries were built with DECnet support. And karl@cs.umb.edu says
2646 # the Alpha needs dnet_stub (dnet does not exist).
2647 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2648 echo "configure:2660: checking for dnet_ntoa in -ldnet" >&5
2649 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2650 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2651 echo $ac_n "(cached) $ac_c" 1>&6
2653 ac_save_LIBS="$LIBS"
2655 cat > conftest.$ac_ext <<EOF
2656 #line 2668 "configure"
2657 #include "confdefs.h"
2658 /* Override any gcc2 internal prototype to avoid an error. */
2659 /* We use char because int might match the return type of a gcc2
2660 builtin and then its argument prototype would still apply. */
2667 if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2669 eval "ac_cv_lib_$ac_lib_var=yes"
2671 echo "configure: failed program was:" >&5
2672 cat conftest.$ac_ext >&5
2674 eval "ac_cv_lib_$ac_lib_var=no"
2677 LIBS="$ac_save_LIBS"
2680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2681 echo "$ac_t""yes" 1>&6
2682 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2684 echo "$ac_t""no" 1>&6
2687 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2688 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2689 echo "configure:2701: checking for dnet_ntoa in -ldnet_stub" >&5
2690 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2691 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2692 echo $ac_n "(cached) $ac_c" 1>&6
2694 ac_save_LIBS="$LIBS"
2695 LIBS="-ldnet_stub $LIBS"
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2709 "configure"
2698 #include "confdefs.h"
2699 /* Override any gcc2 internal prototype to avoid an error. */
2700 /* We use char because int might match the return type of a gcc2
2701 builtin and then its argument prototype would still apply. */
2708 if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2710 eval "ac_cv_lib_$ac_lib_var=yes"
2712 echo "configure: failed program was:" >&5
2713 cat conftest.$ac_ext >&5
2715 eval "ac_cv_lib_$ac_lib_var=no"
2718 LIBS="$ac_save_LIBS"
2721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2722 echo "$ac_t""yes" 1>&6
2723 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2725 echo "$ac_t""no" 1>&6
2730 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2731 # to get the SysV transport functions.
2732 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2734 # The nsl library prevents programs from opening the X display
2735 # on Irix 5.2, according to dickey@clark.net.
2736 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2737 echo "configure:2749: checking for gethostbyname" >&5
2738 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2739 echo $ac_n "(cached) $ac_c" 1>&6
2741 cat > conftest.$ac_ext <<EOF
2742 #line 2754 "configure"
2743 #include "confdefs.h"
2744 /* System header to define __stub macros and hopefully few prototypes,
2745 which can conflict with char gethostbyname(); below. */
2747 /* Override any gcc2 internal prototype to avoid an error. */
2748 /* We use char because int might match the return type of a gcc2
2749 builtin and then its argument prototype would still apply. */
2750 char gethostbyname();
2754 /* The GNU C library defines this for functions which it implements
2755 to always fail with ENOSYS. Some functions are actually named
2756 something starting with __ and the normal name is an alias. */
2757 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2765 if { (eval echo configure:2777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2767 eval "ac_cv_func_gethostbyname=yes"
2769 echo "configure: failed program was:" >&5
2770 cat conftest.$ac_ext >&5
2772 eval "ac_cv_func_gethostbyname=no"
2777 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2778 echo "$ac_t""yes" 1>&6
2781 echo "$ac_t""no" 1>&6
2784 if test $ac_cv_func_gethostbyname = no; then
2785 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2786 echo "configure:2798: checking for gethostbyname in -lnsl" >&5
2787 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2788 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2789 echo $ac_n "(cached) $ac_c" 1>&6
2791 ac_save_LIBS="$LIBS"
2793 cat > conftest.$ac_ext <<EOF
2794 #line 2806 "configure"
2795 #include "confdefs.h"
2796 /* Override any gcc2 internal prototype to avoid an error. */
2797 /* We use char because int might match the return type of a gcc2
2798 builtin and then its argument prototype would still apply. */
2799 char gethostbyname();
2805 if { (eval echo configure:2817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2807 eval "ac_cv_lib_$ac_lib_var=yes"
2809 echo "configure: failed program was:" >&5
2810 cat conftest.$ac_ext >&5
2812 eval "ac_cv_lib_$ac_lib_var=no"
2815 LIBS="$ac_save_LIBS"
2818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2819 echo "$ac_t""yes" 1>&6
2820 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2822 echo "$ac_t""no" 1>&6
2827 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2828 # socket/setsockopt and other routines are undefined under SCO ODT
2829 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2830 # on later versions), says simon@lia.di.epfl.ch: it contains
2831 # gethostby* variants that don't use the nameserver (or something).
2832 # -lsocket must be given before -lnsl if both are needed.
2833 # We assume that if connect needs -lnsl, so does gethostbyname.
2834 echo $ac_n "checking for connect""... $ac_c" 1>&6
2835 echo "configure:2847: checking for connect" >&5
2836 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2837 echo $ac_n "(cached) $ac_c" 1>&6
2839 cat > conftest.$ac_ext <<EOF
2840 #line 2852 "configure"
2841 #include "confdefs.h"
2842 /* System header to define __stub macros and hopefully few prototypes,
2843 which can conflict with char connect(); below. */
2845 /* Override any gcc2 internal prototype to avoid an error. */
2846 /* We use char because int might match the return type of a gcc2
2847 builtin and then its argument prototype would still apply. */
2852 /* The GNU C library defines this for functions which it implements
2853 to always fail with ENOSYS. Some functions are actually named
2854 something starting with __ and the normal name is an alias. */
2855 #if defined (__stub_connect) || defined (__stub___connect)
2863 if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2865 eval "ac_cv_func_connect=yes"
2867 echo "configure: failed program was:" >&5
2868 cat conftest.$ac_ext >&5
2870 eval "ac_cv_func_connect=no"
2875 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2876 echo "$ac_t""yes" 1>&6
2879 echo "$ac_t""no" 1>&6
2882 if test $ac_cv_func_connect = no; then
2883 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2884 echo "configure:2896: checking for connect in -lsocket" >&5
2885 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2886 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2887 echo $ac_n "(cached) $ac_c" 1>&6
2889 ac_save_LIBS="$LIBS"
2890 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2891 cat > conftest.$ac_ext <<EOF
2892 #line 2904 "configure"
2893 #include "confdefs.h"
2894 /* Override any gcc2 internal prototype to avoid an error. */
2895 /* We use char because int might match the return type of a gcc2
2896 builtin and then its argument prototype would still apply. */
2903 if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2905 eval "ac_cv_lib_$ac_lib_var=yes"
2907 echo "configure: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2910 eval "ac_cv_lib_$ac_lib_var=no"
2913 LIBS="$ac_save_LIBS"
2916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2917 echo "$ac_t""yes" 1>&6
2918 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2920 echo "$ac_t""no" 1>&6
2925 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2926 echo $ac_n "checking for remove""... $ac_c" 1>&6
2927 echo "configure:2939: checking for remove" >&5
2928 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2929 echo $ac_n "(cached) $ac_c" 1>&6
2931 cat > conftest.$ac_ext <<EOF
2932 #line 2944 "configure"
2933 #include "confdefs.h"
2934 /* System header to define __stub macros and hopefully few prototypes,
2935 which can conflict with char remove(); below. */
2937 /* Override any gcc2 internal prototype to avoid an error. */
2938 /* We use char because int might match the return type of a gcc2
2939 builtin and then its argument prototype would still apply. */
2944 /* The GNU C library defines this for functions which it implements
2945 to always fail with ENOSYS. Some functions are actually named
2946 something starting with __ and the normal name is an alias. */
2947 #if defined (__stub_remove) || defined (__stub___remove)
2955 if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2957 eval "ac_cv_func_remove=yes"
2959 echo "configure: failed program was:" >&5
2960 cat conftest.$ac_ext >&5
2962 eval "ac_cv_func_remove=no"
2967 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2968 echo "$ac_t""yes" 1>&6
2971 echo "$ac_t""no" 1>&6
2974 if test $ac_cv_func_remove = no; then
2975 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2976 echo "configure:2988: checking for remove in -lposix" >&5
2977 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2978 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2979 echo $ac_n "(cached) $ac_c" 1>&6
2981 ac_save_LIBS="$LIBS"
2982 LIBS="-lposix $LIBS"
2983 cat > conftest.$ac_ext <<EOF
2984 #line 2996 "configure"
2985 #include "confdefs.h"
2986 /* Override any gcc2 internal prototype to avoid an error. */
2987 /* We use char because int might match the return type of a gcc2
2988 builtin and then its argument prototype would still apply. */
2995 if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2997 eval "ac_cv_lib_$ac_lib_var=yes"
2999 echo "configure: failed program was:" >&5
3000 cat conftest.$ac_ext >&5
3002 eval "ac_cv_lib_$ac_lib_var=no"
3005 LIBS="$ac_save_LIBS"
3008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3009 echo "$ac_t""yes" 1>&6
3010 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3012 echo "$ac_t""no" 1>&6
3017 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3018 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3019 echo "configure:3031: checking for shmat" >&5
3020 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3021 echo $ac_n "(cached) $ac_c" 1>&6
3023 cat > conftest.$ac_ext <<EOF
3024 #line 3036 "configure"
3025 #include "confdefs.h"
3026 /* System header to define __stub macros and hopefully few prototypes,
3027 which can conflict with char shmat(); below. */
3029 /* Override any gcc2 internal prototype to avoid an error. */
3030 /* We use char because int might match the return type of a gcc2
3031 builtin and then its argument prototype would still apply. */
3036 /* The GNU C library defines this for functions which it implements
3037 to always fail with ENOSYS. Some functions are actually named
3038 something starting with __ and the normal name is an alias. */
3039 #if defined (__stub_shmat) || defined (__stub___shmat)
3047 if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3049 eval "ac_cv_func_shmat=yes"
3051 echo "configure: failed program was:" >&5
3052 cat conftest.$ac_ext >&5
3054 eval "ac_cv_func_shmat=no"
3059 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3060 echo "$ac_t""yes" 1>&6
3063 echo "$ac_t""no" 1>&6
3066 if test $ac_cv_func_shmat = no; then
3067 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3068 echo "configure:3080: checking for shmat in -lipc" >&5
3069 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3071 echo $ac_n "(cached) $ac_c" 1>&6
3073 ac_save_LIBS="$LIBS"
3075 cat > conftest.$ac_ext <<EOF
3076 #line 3088 "configure"
3077 #include "confdefs.h"
3078 /* Override any gcc2 internal prototype to avoid an error. */
3079 /* We use char because int might match the return type of a gcc2
3080 builtin and then its argument prototype would still apply. */
3087 if { (eval echo configure:3099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3089 eval "ac_cv_lib_$ac_lib_var=yes"
3091 echo "configure: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3094 eval "ac_cv_lib_$ac_lib_var=no"
3097 LIBS="$ac_save_LIBS"
3100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3101 echo "$ac_t""yes" 1>&6
3102 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3104 echo "$ac_t""no" 1>&6
3110 # Check for libraries that X11R6 Xt/Xaw programs need.
3111 ac_save_LDFLAGS="$LDFLAGS"
3112 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3113 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3114 # check for ICE first), but we must link in the order -lSM -lICE or
3115 # we get undefined symbols. So assume we have SM if we have ICE.
3116 # These have to be linked with before -lX11, unlike the other
3117 # libraries we check for below, so use a different variable.
3118 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3119 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3120 echo "configure:3132: checking for IceConnectionNumber in -lICE" >&5
3121 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3122 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3123 echo $ac_n "(cached) $ac_c" 1>&6
3125 ac_save_LIBS="$LIBS"
3126 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3127 cat > conftest.$ac_ext <<EOF
3128 #line 3140 "configure"
3129 #include "confdefs.h"
3130 /* Override any gcc2 internal prototype to avoid an error. */
3131 /* We use char because int might match the return type of a gcc2
3132 builtin and then its argument prototype would still apply. */
3133 char IceConnectionNumber();
3136 IceConnectionNumber()
3139 if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3141 eval "ac_cv_lib_$ac_lib_var=yes"
3143 echo "configure: failed program was:" >&5
3144 cat conftest.$ac_ext >&5
3146 eval "ac_cv_lib_$ac_lib_var=no"
3149 LIBS="$ac_save_LIBS"
3152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3153 echo "$ac_t""yes" 1>&6
3154 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3156 echo "$ac_t""no" 1>&6
3159 LDFLAGS="$ac_save_LDFLAGS"
3164 if test "$have_x" != yes; then
3165 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3169 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3170 echo "configure:3182: checking for X app-defaults directory" >&5
3171 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3172 echo $ac_n "(cached) $ac_c" 1>&6
3176 if mkdir conftestdir; then
3178 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3179 cat > Imakefile <<'EOF'
3181 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3183 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3184 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3185 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3190 if test x"$ac_x_app_defaults" = x; then
3192 # Look for the directory under a standard set of common directories.
3193 # Check X11 before X11Rn because it's often a symlink to the current release.
3195 /usr/X11/lib/app-defaults \
3196 /usr/X11R6/lib/app-defaults \
3197 /usr/X11R6/lib/X11/app-defaults \
3198 /usr/X11R5/lib/app-defaults \
3199 /usr/X11R5/lib/X11/app-defaults \
3200 /usr/X11R4/lib/app-defaults \
3201 /usr/X11R4/lib/X11/app-defaults \
3203 /usr/lib/X11/app-defaults \
3204 /usr/lib/X11R6/app-defaults \
3205 /usr/lib/X11R5/app-defaults \
3206 /usr/lib/X11R4/app-defaults \
3208 /usr/local/X11/lib/app-defaults \
3209 /usr/local/X11R6/lib/app-defaults \
3210 /usr/local/X11R5/lib/app-defaults \
3211 /usr/local/X11R4/lib/app-defaults \
3213 /usr/local/lib/X11/app-defaults \
3214 /usr/local/lib/X11R6/app-defaults \
3215 /usr/local/lib/X11R6/X11/app-defaults \
3216 /usr/local/lib/X11R5/app-defaults \
3217 /usr/local/lib/X11R5/X11/app-defaults \
3218 /usr/local/lib/X11R4/app-defaults \
3219 /usr/local/lib/X11R4/X11/app-defaults \
3221 /usr/X386/lib/X11/app-defaults \
3222 /usr/x386/lib/X11/app-defaults \
3223 /usr/XFree86/lib/X11/app-defaults \
3225 /usr/lib/X11/app-defaults \
3226 /usr/local/lib/X11/app-defaults \
3227 /usr/unsupported/lib/X11/app-defaults \
3228 /usr/athena/lib/X11/app-defaults \
3229 /usr/local/x11r5/lib/X11/app-defaults \
3230 /usr/lpp/Xamples/lib/X11/app-defaults \
3231 /lib/usr/lib/X11/app-defaults \
3233 /usr/openwin/lib/app-defaults \
3234 /usr/openwin/lib/X11/app-defaults \
3235 /usr/openwin/share/lib/app-defaults \
3236 /usr/openwin/share/lib/X11/app-defaults \
3238 /X11R6/lib/app-defaults \
3239 /X11R5/lib/app-defaults \
3240 /X11R4/lib/app-defaults \
3243 if test -d "$ac_dir"; then
3244 ac_x_app_defaults=$ac_dir
3250 if test x"$ac_x_app_defaults" = x; then
3251 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3253 # Record where we found app-defaults for the cache.
3254 ac_cv_x_app_defaults="$ac_x_app_defaults"
3258 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3259 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3263 # The following arcana was gleaned from conversations with
3264 # Eric Schwartz <erics@col.hp.com>:
3266 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3267 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3268 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3269 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3270 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3271 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3272 # you don't need any -I or -L arguments.
3274 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3275 # are the same division as 10.x. However, there are no symlinks to
3276 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3277 # arguments are always necessary.
3279 # However, X11R6 was available on HPUX 9.x as a patch: if that
3280 # patch was installed, then all of X11R6 went in to
3281 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3283 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3284 # whether R5 was available as a patch; R6 undoubtedly was not.)
3286 # So. We try and use the highest numbered pair of
3287 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3288 # that are available. We do not mix and match different versions
3291 # Question I still don't know the answer to: (do you?)
3293 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3294 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3295 # that contrib directory? Did it contain so-called "standard"
3296 # X11R6, or did it include Xaw and Xmu as well? If the former,
3297 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3298 # be a situation where one had to reach into the R5 headers and
3299 # libs to find Xmu? That is, must both R6 and R5 directories
3300 # be on the -I and -L lists in that case?
3302 for version in X11R6 X11R5 X11R4 ; do
3303 # if either pair of directories exists...
3304 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3306 # if contrib exists, use it...
3307 if test -d /usr/contrib/$version/lib ; then
3308 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3309 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3311 # if the "standard" one exists, use it.
3312 if test -d /usr/lib/$version ; then
3313 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3314 X_LIBS="$X_LIBS -L/usr/lib/$version"
3316 # since at least one of the pair exists, go no farther.
3321 # Now find Motif. Thanks for not making xmkmf find this by
3322 # default, you losers.
3324 if test -d /usr/lib/Motif1.2 ; then
3325 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3326 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3327 elif test -d /usr/lib/Motif1.1 ; then
3328 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3329 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3332 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3334 if test -d /opt/Mesa/lib ; then
3335 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3336 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3339 if test -d /opt/xpm/lib/X11 ; then
3340 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3341 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3344 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3345 # in /usr/local/, unless there is already an xscreensaver in
3346 # /usr/local/bin/. This can be overridden with the --prefix arg
3347 # to configure. I'm not sure this is the right thing to do, but
3348 # Richard Lloyd says so...
3350 if test \! -x /usr/local/bin/xscreensaver ; then
3351 ac_default_prefix=/opt/xscreensaver
3357 # Thanks for not making xmkmf find this by default, pinheads.
3358 # And thanks for moving things around again, too. Is this
3359 # really the standard location now? What happened to the
3360 # joke that this kind of thing went in /opt?
3361 # cthomp says "answer: CDE (Common Disorganized Environment)"
3363 if test -f /usr/dt/include/Xm/Xm.h ; then
3364 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3365 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3367 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3368 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3369 echo "configure:3381: checking for regcmp in -lgen" >&5
3370 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3371 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3372 echo $ac_n "(cached) $ac_c" 1>&6
3374 ac_save_LIBS="$LIBS"
3376 cat > conftest.$ac_ext <<EOF
3377 #line 3389 "configure"
3378 #include "confdefs.h"
3379 /* Override any gcc2 internal prototype to avoid an error. */
3380 /* We use char because int might match the return type of a gcc2
3381 builtin and then its argument prototype would still apply. */
3388 if { (eval echo configure:3400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3390 eval "ac_cv_lib_$ac_lib_var=yes"
3392 echo "configure: failed program was:" >&5
3393 cat conftest.$ac_ext >&5
3395 eval "ac_cv_lib_$ac_lib_var=no"
3398 LIBS="$ac_save_LIBS"
3401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3402 echo "$ac_t""yes" 1>&6
3403 X_LIBS="$X_LIBS -lgen"
3405 echo "$ac_t""no" 1>&6
3411 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3412 echo "configure:3424: checking for XPointer" >&5
3413 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3414 echo $ac_n "(cached) $ac_c" 1>&6
3417 ac_save_CPPFLAGS="$CPPFLAGS"
3418 if test \! -z "$includedir" ; then
3419 CPPFLAGS="$CPPFLAGS -I$includedir"
3421 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3422 cat > conftest.$ac_ext <<EOF
3423 #line 3435 "configure"
3424 #include "confdefs.h"
3425 #include <X11/Xlib.h>
3427 XPointer foo = (XPointer) 0;
3430 if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3434 echo "configure: failed program was:" >&5
3435 cat conftest.$ac_ext >&5
3440 CPPFLAGS="$ac_save_CPPFLAGS"
3443 echo "$ac_t""$ac_cv_xpointer" 1>&6
3444 if test "$ac_cv_xpointer" != yes; then
3445 cat >> confdefs.h <<\EOF
3446 #define XPointer char*
3453 ###############################################################################
3455 # Check for -lXmu (some fucked up vendors don't ship it...)
3457 ###############################################################################
3461 ac_save_CPPFLAGS="$CPPFLAGS"
3462 if test \! -z "$includedir" ; then
3463 CPPFLAGS="$CPPFLAGS -I$includedir"
3465 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3466 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3467 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3468 echo "configure:3480: checking for X11/Xmu/Error.h" >&5
3469 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3470 echo $ac_n "(cached) $ac_c" 1>&6
3472 cat > conftest.$ac_ext <<EOF
3473 #line 3485 "configure"
3474 #include "confdefs.h"
3475 #include <X11/Xmu/Error.h>
3477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3478 { (eval echo configure:3490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3480 if test -z "$ac_err"; then
3482 eval "ac_cv_header_$ac_safe=yes"
3485 echo "configure: failed program was:" >&5
3486 cat conftest.$ac_ext >&5
3488 eval "ac_cv_header_$ac_safe=no"
3492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3493 echo "$ac_t""yes" 1>&6
3496 echo "$ac_t""no" 1>&6
3499 CPPFLAGS="$ac_save_CPPFLAGS"
3500 if test "$have_xmu" = no ; then
3501 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3502 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3506 SAVER_LIBS="-lXmu $SAVER_LIBS"
3507 HACK_LIBS="-lXmu $HACK_LIBS"
3508 MOTIF_LIBS="-lXmu $MOTIF_LIBS"
3509 GTK_LIBS="-lXmu $GTK_LIBS"
3510 cat >> confdefs.h <<\EOF
3517 ###############################################################################
3519 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3520 # See comp.windows.x FAQ question 124. The right fix is to
3521 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3523 ###############################################################################
3525 if test "$have_xmu" = yes ; then
3528 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3529 echo "configure:3541: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3530 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3531 echo $ac_n "(cached) $ac_c" 1>&6
3533 ac_save_LDFLAGS="$LDFLAGS"
3534 if test \! -z "$x_libraries" ; then
3535 LDFLAGS="$LDFLAGS -L$x_libraries"
3537 # Note: this trick never works! (Generally.)
3538 # We're only getting away with using AC_TRY_LINK
3539 # with X libraries because we know it's SunOS.
3540 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3541 cat > conftest.$ac_ext <<EOF
3542 #line 3554 "configure"
3543 #include "confdefs.h"
3549 if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3551 ac_cv_sunos_xmu_bug=no
3553 echo "configure: failed program was:" >&5
3554 cat conftest.$ac_ext >&5
3556 ac_cv_sunos_xmu_bug=yes
3559 LDFLAGS="$ac_save_LDFLAGS"
3562 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3563 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3564 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3565 echo "configure:3577: checking whether the compiler understands -static" >&5
3566 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3567 echo $ac_n "(cached) $ac_c" 1>&6
3569 ac_save_LDFLAGS="$LDFLAGS"
3570 LDFLAGS="$LDFLAGS -static"
3571 cat > conftest.$ac_ext <<EOF
3572 #line 3584 "configure"
3573 #include "confdefs.h"
3579 if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3583 echo "configure: failed program was:" >&5
3584 cat conftest.$ac_ext >&5
3589 LDFLAGS="$ac_save_LDFLAGS"
3592 echo "$ac_t""$ac_cv_ld_static" 1>&6
3593 if test "$ac_cv_ld_static" = yes ; then
3594 LDFLAGS="$LDFLAGS -static"
3596 LDFLAGS="$LDFLAGS -Bstatic"
3604 ###############################################################################
3606 # Handle the --enable-subdir option
3608 ###############################################################################
3610 # Check whether --enable-subdir or --disable-subdir was given.
3611 if test "${enable_subdir+set}" = set; then
3612 enableval="$enable_subdir"
3613 enable_subdir="$enableval"
3618 if test x"$enable_subdir" = xno; then
3620 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
3621 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
3624 # there must be a better way than this...
3625 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
3627 HACKDIR=$enable_subdir
3630 HACKDIR='${bindir}/'$enable_subdir
3634 # canonicalize slashes.
3635 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3638 ###############################################################################
3640 # Check for the SGI SCREEN_SAVER server extension.
3642 ###############################################################################
3645 with_sgi_req=unspecified
3646 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3647 if test "${with_sgi_ext+set}" = set; then
3648 withval="$with_sgi_ext"
3649 with_sgi="$withval"; with_sgi_req="$withval"
3661 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3662 echo "configure:3674: checking for SGI SCREEN_SAVER headers" >&5
3665 X_CFLAGS="-I$d $X_CFLAGS"
3666 echo "$ac_t""$d" 1>&6
3668 echo "$ac_t""not found ($d: no such directory)" 1>&6
3671 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3672 echo "configure:3684: checking for SGI SCREEN_SAVER libs" >&5
3675 X_LIBS="-L$d $X_LIBS"
3676 echo "$ac_t""$d" 1>&6
3678 echo "$ac_t""not found ($d: no such directory)" 1>&6
3681 # replace the directory string with "yes".
3683 with_sgi=$with_sgi_req
3688 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3689 echo " If it is a directory, then \`DIR/include' will be added to"
3690 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3696 if test "$with_sgi" = yes; then
3698 ac_save_CPPFLAGS="$CPPFLAGS"
3699 if test \! -z "$includedir" ; then
3700 CPPFLAGS="$CPPFLAGS -I$includedir"
3702 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3703 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3704 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3705 echo "configure:3717: checking for X11/extensions/XScreenSaver.h" >&5
3706 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3707 echo $ac_n "(cached) $ac_c" 1>&6
3709 cat > conftest.$ac_ext <<EOF
3710 #line 3722 "configure"
3711 #include "confdefs.h"
3712 #include <X11/extensions/XScreenSaver.h>
3714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3715 { (eval echo configure:3727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3717 if test -z "$ac_err"; then
3719 eval "ac_cv_header_$ac_safe=yes"
3722 echo "configure: failed program was:" >&5
3723 cat conftest.$ac_ext >&5
3725 eval "ac_cv_header_$ac_safe=no"
3729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3730 echo "$ac_t""yes" 1>&6
3732 cat >> confdefs.h <<\EOF
3733 #define HAVE_SGI_SAVER_EXTENSION 1
3737 echo "$ac_t""no" 1>&6
3740 CPPFLAGS="$ac_save_CPPFLAGS"
3742 elif test "$with_sgi" != no; then
3743 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3748 ###############################################################################
3750 # Check for the MIT-SCREEN-SAVER server extension.
3752 ###############################################################################
3755 with_mit_req=unspecified
3756 # Check whether --with-mit-ext or --without-mit-ext was given.
3757 if test "${with_mit_ext+set}" = set; then
3758 withval="$with_mit_ext"
3759 with_mit="$withval"; with_mit_req="$withval"
3771 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3772 echo "configure:3784: checking for MIT-SCREEN-SAVER headers" >&5
3775 X_CFLAGS="-I$d $X_CFLAGS"
3776 echo "$ac_t""$d" 1>&6
3778 echo "$ac_t""not found ($d: no such directory)" 1>&6
3781 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3782 echo "configure:3794: checking for MIT-SCREEN-SAVER libs" >&5
3785 X_LIBS="-L$d $X_LIBS"
3786 echo "$ac_t""$d" 1>&6
3788 echo "$ac_t""not found ($d: no such directory)" 1>&6
3791 # replace the directory string with "yes".
3793 with_mit=$with_mit_req
3798 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3799 echo " If it is a directory, then \`DIR/include' will be added to"
3800 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3806 if test "$with_mit" = yes; then
3808 ac_save_CPPFLAGS="$CPPFLAGS"
3809 if test \! -z "$includedir" ; then
3810 CPPFLAGS="$CPPFLAGS -I$includedir"
3812 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3813 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3814 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3815 echo "configure:3827: checking for X11/extensions/scrnsaver.h" >&5
3816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3817 echo $ac_n "(cached) $ac_c" 1>&6
3819 cat > conftest.$ac_ext <<EOF
3820 #line 3832 "configure"
3821 #include "confdefs.h"
3822 #include <X11/extensions/scrnsaver.h>
3824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3825 { (eval echo configure:3837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3827 if test -z "$ac_err"; then
3829 eval "ac_cv_header_$ac_safe=yes"
3832 echo "configure: failed program was:" >&5
3833 cat conftest.$ac_ext >&5
3835 eval "ac_cv_header_$ac_safe=no"
3839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3840 echo "$ac_t""yes" 1>&6
3843 echo "$ac_t""no" 1>&6
3846 CPPFLAGS="$ac_save_CPPFLAGS"
3848 # Now check to see if it's really in the library; XF86Free-3.3 ships
3849 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3851 if test "$have_mit" = yes; then
3853 ac_save_CPPFLAGS="$CPPFLAGS"
3854 ac_save_LDFLAGS="$LDFLAGS"
3855 # ac_save_LIBS="$LIBS"
3857 if test \! -z "$includedir" ; then
3858 CPPFLAGS="$CPPFLAGS -I$includedir"
3860 # note: $X_CFLAGS includes $x_includes
3861 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3863 if test \! -z "$libdir" ; then
3864 LDFLAGS="$LDFLAGS -L$libdir"
3866 # note: $X_LIBS includes $x_libraries
3867 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3869 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3870 echo "configure:3882: checking for XScreenSaverRegister in -lXext" >&5
3871 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3872 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3873 echo $ac_n "(cached) $ac_c" 1>&6
3875 ac_save_LIBS="$LIBS"
3876 LIBS="-lXext -lm $LIBS"
3877 cat > conftest.$ac_ext <<EOF
3878 #line 3890 "configure"
3879 #include "confdefs.h"
3880 /* Override any gcc2 internal prototype to avoid an error. */
3881 /* We use char because int might match the return type of a gcc2
3882 builtin and then its argument prototype would still apply. */
3883 char XScreenSaverRegister();
3886 XScreenSaverRegister()
3889 if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3891 eval "ac_cv_lib_$ac_lib_var=yes"
3893 echo "configure: failed program was:" >&5
3894 cat conftest.$ac_ext >&5
3896 eval "ac_cv_lib_$ac_lib_var=no"
3899 LIBS="$ac_save_LIBS"
3902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3903 echo "$ac_t""yes" 1>&6
3906 echo "$ac_t""no" 1>&6
3910 CPPFLAGS="$ac_save_CPPFLAGS"
3911 LDFLAGS="$ac_save_LDFLAGS"
3912 # LIBS="$ac_save_LIBS"
3915 if test "$have_mit" = no; then
3916 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3917 # of in Xext. Thank you master, may I have another.
3919 ac_save_CPPFLAGS="$CPPFLAGS"
3920 ac_save_LDFLAGS="$LDFLAGS"
3921 # ac_save_LIBS="$LIBS"
3923 if test \! -z "$includedir" ; then
3924 CPPFLAGS="$CPPFLAGS -I$includedir"
3926 # note: $X_CFLAGS includes $x_includes
3927 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3929 if test \! -z "$libdir" ; then
3930 LDFLAGS="$LDFLAGS -L$libdir"
3932 # note: $X_LIBS includes $x_libraries
3933 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3935 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3936 echo "configure:3948: checking for XScreenSaverRegister in -lXExExt" >&5
3937 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3938 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3939 echo $ac_n "(cached) $ac_c" 1>&6
3941 ac_save_LIBS="$LIBS"
3942 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3943 cat > conftest.$ac_ext <<EOF
3944 #line 3956 "configure"
3945 #include "confdefs.h"
3946 /* Override any gcc2 internal prototype to avoid an error. */
3947 /* We use char because int might match the return type of a gcc2
3948 builtin and then its argument prototype would still apply. */
3949 char XScreenSaverRegister();
3952 XScreenSaverRegister()
3955 if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3957 eval "ac_cv_lib_$ac_lib_var=yes"
3959 echo "configure: failed program was:" >&5
3960 cat conftest.$ac_ext >&5
3962 eval "ac_cv_lib_$ac_lib_var=no"
3965 LIBS="$ac_save_LIBS"
3968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3969 echo "$ac_t""yes" 1>&6
3970 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3972 echo "$ac_t""no" 1>&6
3976 CPPFLAGS="$ac_save_CPPFLAGS"
3977 LDFLAGS="$ac_save_LDFLAGS"
3978 # LIBS="$ac_save_LIBS"
3982 if test "$have_mit" = no; then
3983 # Double fuck! Looks like some versions of XFree86 (whichever version
3984 # it is that comes with RedHat Linux 2.0 -- I can't find a version
3985 # number) put this garbage in Xss instead of Xext. Thank you master,
3986 # may I have another.
3988 ac_save_CPPFLAGS="$CPPFLAGS"
3989 ac_save_LDFLAGS="$LDFLAGS"
3990 # ac_save_LIBS="$LIBS"
3992 if test \! -z "$includedir" ; then
3993 CPPFLAGS="$CPPFLAGS -I$includedir"
3995 # note: $X_CFLAGS includes $x_includes
3996 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3998 if test \! -z "$libdir" ; then
3999 LDFLAGS="$LDFLAGS -L$libdir"
4001 # note: $X_LIBS includes $x_libraries
4002 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4004 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4005 echo "configure:4017: checking for XScreenSaverRegister in -lXss" >&5
4006 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4007 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4008 echo $ac_n "(cached) $ac_c" 1>&6
4010 ac_save_LIBS="$LIBS"
4011 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4012 cat > conftest.$ac_ext <<EOF
4013 #line 4025 "configure"
4014 #include "confdefs.h"
4015 /* Override any gcc2 internal prototype to avoid an error. */
4016 /* We use char because int might match the return type of a gcc2
4017 builtin and then its argument prototype would still apply. */
4018 char XScreenSaverRegister();
4021 XScreenSaverRegister()
4024 if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4026 eval "ac_cv_lib_$ac_lib_var=yes"
4028 echo "configure: failed program was:" >&5
4029 cat conftest.$ac_ext >&5
4031 eval "ac_cv_lib_$ac_lib_var=no"
4034 LIBS="$ac_save_LIBS"
4037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4038 echo "$ac_t""yes" 1>&6
4039 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4041 echo "$ac_t""no" 1>&6
4045 CPPFLAGS="$ac_save_CPPFLAGS"
4046 LDFLAGS="$ac_save_LDFLAGS"
4047 # LIBS="$ac_save_LIBS"
4051 if test "$have_mit" = yes; then
4052 cat >> confdefs.h <<\EOF
4053 #define HAVE_MIT_SAVER_EXTENSION 1
4060 elif test "$with_mit" != no; then
4061 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4066 ###############################################################################
4068 # Check for the XIDLE server extension.
4070 ###############################################################################
4073 with_xidle_req=unspecified
4074 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4075 if test "${with_xidle_ext+set}" = set; then
4076 withval="$with_xidle_ext"
4077 with_xidle="$withval"; with_xidle_req="$withval"
4084 case "$with_xidle" in
4089 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4090 echo "configure:4102: checking for XIDLE headers" >&5
4091 d=$with_xidle/include
4093 X_CFLAGS="-I$d $X_CFLAGS"
4094 echo "$ac_t""$d" 1>&6
4096 echo "$ac_t""not found ($d: no such directory)" 1>&6
4099 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4100 echo "configure:4112: checking for XIDLE libs" >&5
4103 X_LIBS="-L$d $X_LIBS"
4104 echo "$ac_t""$d" 1>&6
4106 echo "$ac_t""not found ($d: no such directory)" 1>&6
4109 # replace the directory string with "yes".
4110 with_xidle_req="yes"
4111 with_xidle=$with_xidle_req
4116 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4117 echo " If it is a directory, then \`DIR/include' will be added to"
4118 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4124 if test "$with_xidle" = yes; then
4126 ac_save_CPPFLAGS="$CPPFLAGS"
4127 if test \! -z "$includedir" ; then
4128 CPPFLAGS="$CPPFLAGS -I$includedir"
4130 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4131 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4132 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4133 echo "configure:4145: checking for X11/extensions/xidle.h" >&5
4134 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4135 echo $ac_n "(cached) $ac_c" 1>&6
4137 cat > conftest.$ac_ext <<EOF
4138 #line 4150 "configure"
4139 #include "confdefs.h"
4140 #include <X11/extensions/xidle.h>
4142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4143 { (eval echo configure:4155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4145 if test -z "$ac_err"; then
4147 eval "ac_cv_header_$ac_safe=yes"
4150 echo "configure: failed program was:" >&5
4151 cat conftest.$ac_ext >&5
4153 eval "ac_cv_header_$ac_safe=no"
4157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4158 echo "$ac_t""yes" 1>&6
4160 cat >> confdefs.h <<\EOF
4161 #define HAVE_XIDLE_EXTENSION 1
4165 echo "$ac_t""no" 1>&6
4168 CPPFLAGS="$ac_save_CPPFLAGS"
4169 elif test "$with_xidle" != no; then
4170 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4175 ###############################################################################
4177 # Check for the SGI-VIDEO-CONTROL server extension.
4179 ###############################################################################
4182 with_sgivc_req=unspecified
4183 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4184 if test "${with_sgivc_ext+set}" = set; then
4185 withval="$with_sgivc_ext"
4186 with_sgivc="$withval"; with_sgivc_req="$withval"
4193 case "$with_sgivc" in
4198 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4199 echo "configure:4211: checking for SGI-VIDEO-CONTROL headers" >&5
4200 d=$with_sgivc/include
4202 X_CFLAGS="-I$d $X_CFLAGS"
4203 echo "$ac_t""$d" 1>&6
4205 echo "$ac_t""not found ($d: no such directory)" 1>&6
4208 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4209 echo "configure:4221: checking for SGI-VIDEO-CONTROL libs" >&5
4212 X_LIBS="-L$d $X_LIBS"
4213 echo "$ac_t""$d" 1>&6
4215 echo "$ac_t""not found ($d: no such directory)" 1>&6
4218 # replace the directory string with "yes".
4219 with_sgivc_req="yes"
4220 with_sgivc=$with_sgivc_req
4225 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4226 echo " If it is a directory, then \`DIR/include' will be added to"
4227 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4233 if test "$with_sgivc" = yes; then
4235 # first check for XSGIvc.h
4237 ac_save_CPPFLAGS="$CPPFLAGS"
4238 if test \! -z "$includedir" ; then
4239 CPPFLAGS="$CPPFLAGS -I$includedir"
4241 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4242 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4243 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4244 echo "configure:4256: checking for X11/extensions/XSGIvc.h" >&5
4245 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4246 echo $ac_n "(cached) $ac_c" 1>&6
4248 cat > conftest.$ac_ext <<EOF
4249 #line 4261 "configure"
4250 #include "confdefs.h"
4251 #include <X11/extensions/XSGIvc.h>
4253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4254 { (eval echo configure:4266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4256 if test -z "$ac_err"; then
4258 eval "ac_cv_header_$ac_safe=yes"
4261 echo "configure: failed program was:" >&5
4262 cat conftest.$ac_ext >&5
4264 eval "ac_cv_header_$ac_safe=no"
4268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4269 echo "$ac_t""yes" 1>&6
4272 echo "$ac_t""no" 1>&6
4275 CPPFLAGS="$ac_save_CPPFLAGS"
4277 # if that succeeded, then check for the -lXsgivc
4278 if test "$have_sgivc" = yes; then
4281 ac_save_CPPFLAGS="$CPPFLAGS"
4282 ac_save_LDFLAGS="$LDFLAGS"
4283 # ac_save_LIBS="$LIBS"
4285 if test \! -z "$includedir" ; then
4286 CPPFLAGS="$CPPFLAGS -I$includedir"
4288 # note: $X_CFLAGS includes $x_includes
4289 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4291 if test \! -z "$libdir" ; then
4292 LDFLAGS="$LDFLAGS -L$libdir"
4294 # note: $X_LIBS includes $x_libraries
4295 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4297 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4298 echo "configure:4310: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4299 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4300 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4301 echo $ac_n "(cached) $ac_c" 1>&6
4303 ac_save_LIBS="$LIBS"
4304 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4305 cat > conftest.$ac_ext <<EOF
4306 #line 4318 "configure"
4307 #include "confdefs.h"
4308 /* Override any gcc2 internal prototype to avoid an error. */
4309 /* We use char because int might match the return type of a gcc2
4310 builtin and then its argument prototype would still apply. */
4311 char XSGIvcQueryGammaMap();
4314 XSGIvcQueryGammaMap()
4317 if { (eval echo configure:4329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4319 eval "ac_cv_lib_$ac_lib_var=yes"
4321 echo "configure: failed program was:" >&5
4322 cat conftest.$ac_ext >&5
4324 eval "ac_cv_lib_$ac_lib_var=no"
4327 LIBS="$ac_save_LIBS"
4330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4331 echo "$ac_t""yes" 1>&6
4332 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4334 echo "$ac_t""no" 1>&6
4338 CPPFLAGS="$ac_save_CPPFLAGS"
4339 LDFLAGS="$ac_save_LDFLAGS"
4340 # LIBS="$ac_save_LIBS"
4344 # if that succeeded, then we've really got it.
4345 if test "$have_sgivc" = yes; then
4346 cat >> confdefs.h <<\EOF
4347 #define HAVE_SGI_VC_EXTENSION 1
4352 elif test "$with_sgivc" != no; then
4353 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4358 ###############################################################################
4360 # Check for the DPMS server extension.
4362 ###############################################################################
4365 with_dpms_req=unspecified
4366 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4367 if test "${with_dpms_ext+set}" = set; then
4368 withval="$with_dpms_ext"
4369 with_dpms="$withval"; with_dpms_req="$withval"
4376 case "$with_dpms" in
4381 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4382 echo "configure:4394: checking for DPMS headers" >&5
4383 d=$with_dpms/include
4385 X_CFLAGS="-I$d $X_CFLAGS"
4386 echo "$ac_t""$d" 1>&6
4388 echo "$ac_t""not found ($d: no such directory)" 1>&6
4391 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4392 echo "configure:4404: checking for DPMS libs" >&5
4395 X_LIBS="-L$d $X_LIBS"
4396 echo "$ac_t""$d" 1>&6
4398 echo "$ac_t""not found ($d: no such directory)" 1>&6
4401 # replace the directory string with "yes".
4403 with_dpms=$with_dpms_req
4408 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4409 echo " If it is a directory, then \`DIR/include' will be added to"
4410 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4416 if test "$with_dpms" = yes; then
4418 # first check for dpms.h
4420 ac_save_CPPFLAGS="$CPPFLAGS"
4421 if test \! -z "$includedir" ; then
4422 CPPFLAGS="$CPPFLAGS -I$includedir"
4424 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4425 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4426 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4427 echo "configure:4439: checking for X11/extensions/dpms.h" >&5
4428 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4429 echo $ac_n "(cached) $ac_c" 1>&6
4431 cat > conftest.$ac_ext <<EOF
4432 #line 4444 "configure"
4433 #include "confdefs.h"
4434 #include <X11/extensions/dpms.h>
4436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4437 { (eval echo configure:4449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4439 if test -z "$ac_err"; then
4441 eval "ac_cv_header_$ac_safe=yes"
4444 echo "configure: failed program was:" >&5
4445 cat conftest.$ac_ext >&5
4447 eval "ac_cv_header_$ac_safe=no"
4451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4452 echo "$ac_t""yes" 1>&6
4455 echo "$ac_t""no" 1>&6
4458 CPPFLAGS="$ac_save_CPPFLAGS"
4460 # if that succeeded, then check for the -lXdpms
4461 if test "$have_dpms" = yes; then
4464 ac_save_CPPFLAGS="$CPPFLAGS"
4465 ac_save_LDFLAGS="$LDFLAGS"
4466 # ac_save_LIBS="$LIBS"
4468 if test \! -z "$includedir" ; then
4469 CPPFLAGS="$CPPFLAGS -I$includedir"
4471 # note: $X_CFLAGS includes $x_includes
4472 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4474 if test \! -z "$libdir" ; then
4475 LDFLAGS="$LDFLAGS -L$libdir"
4477 # note: $X_LIBS includes $x_libraries
4478 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4480 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4481 echo "configure:4493: checking for DPMSInfo in -lXdpms" >&5
4482 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4483 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4484 echo $ac_n "(cached) $ac_c" 1>&6
4486 ac_save_LIBS="$LIBS"
4487 LIBS="-lXdpms -lXext -lX11 $LIBS"
4488 cat > conftest.$ac_ext <<EOF
4489 #line 4501 "configure"
4490 #include "confdefs.h"
4491 /* Override any gcc2 internal prototype to avoid an error. */
4492 /* We use char because int might match the return type of a gcc2
4493 builtin and then its argument prototype would still apply. */
4500 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4502 eval "ac_cv_lib_$ac_lib_var=yes"
4504 echo "configure: failed program was:" >&5
4505 cat conftest.$ac_ext >&5
4507 eval "ac_cv_lib_$ac_lib_var=no"
4510 LIBS="$ac_save_LIBS"
4513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4514 echo "$ac_t""yes" 1>&6
4515 have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
4517 echo "$ac_t""no" 1>&6
4521 CPPFLAGS="$ac_save_CPPFLAGS"
4522 LDFLAGS="$ac_save_LDFLAGS"
4523 # LIBS="$ac_save_LIBS"
4527 # if that succeeded, then we've really got it.
4528 if test "$have_dpms" = yes; then
4529 cat >> confdefs.h <<\EOF
4530 #define HAVE_DPMS_EXTENSION 1
4535 elif test "$with_dpms" != no; then
4536 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4541 ###############################################################################
4543 # Check for the XF86VMODE server extension.
4545 ###############################################################################
4548 with_xf86vmode_req=unspecified
4549 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4550 if test "${with_xf86vmode_ext+set}" = set; then
4551 withval="$with_xf86vmode_ext"
4552 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4559 case "$with_xf86vmode" in
4564 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4565 echo "configure:4577: checking for xf86vmode headers" >&5
4566 d=$with_xf86vmode/include
4568 X_CFLAGS="-I$d $X_CFLAGS"
4569 echo "$ac_t""$d" 1>&6
4571 echo "$ac_t""not found ($d: no such directory)" 1>&6
4574 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4575 echo "configure:4587: checking for xf86vmode libs" >&5
4576 d=$with_xf86vmode/lib
4578 X_LIBS="-L$d $X_LIBS"
4579 echo "$ac_t""$d" 1>&6
4581 echo "$ac_t""not found ($d: no such directory)" 1>&6
4584 # replace the directory string with "yes".
4585 with_xf86vmode_req="yes"
4586 with_xf86vmode=$with_xf86vmode_req
4591 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4592 echo " If it is a directory, then \`DIR/include' will be added to"
4593 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4599 if test "$with_xf86vmode" = yes; then
4601 # first check for xf86vmode.h
4603 ac_save_CPPFLAGS="$CPPFLAGS"
4604 if test \! -z "$includedir" ; then
4605 CPPFLAGS="$CPPFLAGS -I$includedir"
4607 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4608 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4609 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4610 echo "configure:4622: checking for X11/extensions/xf86vmode.h" >&5
4611 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4612 echo $ac_n "(cached) $ac_c" 1>&6
4614 cat > conftest.$ac_ext <<EOF
4615 #line 4627 "configure"
4616 #include "confdefs.h"
4617 #include <X11/extensions/xf86vmode.h>
4619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4620 { (eval echo configure:4632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4622 if test -z "$ac_err"; then
4624 eval "ac_cv_header_$ac_safe=yes"
4627 echo "configure: failed program was:" >&5
4628 cat conftest.$ac_ext >&5
4630 eval "ac_cv_header_$ac_safe=no"
4634 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4635 echo "$ac_t""yes" 1>&6
4638 echo "$ac_t""no" 1>&6
4641 CPPFLAGS="$ac_save_CPPFLAGS"
4643 # if that succeeded, then check for the -lXxf86vm
4644 if test "$have_xf86vmode" = yes; then
4647 ac_save_CPPFLAGS="$CPPFLAGS"
4648 ac_save_LDFLAGS="$LDFLAGS"
4649 # ac_save_LIBS="$LIBS"
4651 if test \! -z "$includedir" ; then
4652 CPPFLAGS="$CPPFLAGS -I$includedir"
4654 # note: $X_CFLAGS includes $x_includes
4655 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4657 if test \! -z "$libdir" ; then
4658 LDFLAGS="$LDFLAGS -L$libdir"
4660 # note: $X_LIBS includes $x_libraries
4661 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4663 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4664 echo "configure:4676: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4665 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4666 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4667 echo $ac_n "(cached) $ac_c" 1>&6
4669 ac_save_LIBS="$LIBS"
4670 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4671 cat > conftest.$ac_ext <<EOF
4672 #line 4684 "configure"
4673 #include "confdefs.h"
4674 /* Override any gcc2 internal prototype to avoid an error. */
4675 /* We use char because int might match the return type of a gcc2
4676 builtin and then its argument prototype would still apply. */
4677 char XF86VidModeGetViewPort();
4680 XF86VidModeGetViewPort()
4683 if { (eval echo configure:4695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4685 eval "ac_cv_lib_$ac_lib_var=yes"
4687 echo "configure: failed program was:" >&5
4688 cat conftest.$ac_ext >&5
4690 eval "ac_cv_lib_$ac_lib_var=no"
4693 LIBS="$ac_save_LIBS"
4696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4697 echo "$ac_t""yes" 1>&6
4698 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4700 echo "$ac_t""no" 1>&6
4704 CPPFLAGS="$ac_save_CPPFLAGS"
4705 LDFLAGS="$ac_save_LDFLAGS"
4706 # LIBS="$ac_save_LIBS"
4710 # if that succeeded, then we've really got it.
4711 if test "$have_xf86vmode" = yes; then
4712 cat >> confdefs.h <<\EOF
4713 #define HAVE_XF86VMODE 1
4718 elif test "$with_xf86vmode" != no; then
4719 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4724 ###############################################################################
4726 # Check for HP XHPDisableReset and XHPEnableReset.
4728 ###############################################################################
4731 ac_save_CPPFLAGS="$CPPFLAGS"
4732 if test \! -z "$includedir" ; then
4733 CPPFLAGS="$CPPFLAGS -I$includedir"
4735 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4736 cat > conftest.$ac_ext <<EOF
4737 #line 4749 "configure"
4738 #include "confdefs.h"
4739 #include <X11/XHPlib.h>
4741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4742 egrep "XHPDisableReset" >/dev/null 2>&1; then
4744 cat >> confdefs.h <<\EOF
4745 #define HAVE_XHPDISABLERESET 1
4748 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
4752 CPPFLAGS="$ac_save_CPPFLAGS"
4755 ###############################################################################
4757 # Check for /proc/interrupts.
4759 ###############################################################################
4761 have_proc_interrupts=no
4762 with_proc_interrupts_req=unspecified
4763 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4764 if test "${with_proc_interrupts+set}" = set; then
4765 withval="$with_proc_interrupts"
4766 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4768 with_proc_interrupts=yes
4772 if test "$with_proc_interrupts" = yes; then
4774 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4775 echo "configure:4787: checking whether /proc/interrupts contains keyboard data" >&5
4776 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4777 echo $ac_n "(cached) $ac_c" 1>&6
4779 ac_cv_have_proc_interrupts=no
4780 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4781 ac_cv_have_proc_interrupts=yes
4786 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
4787 have_proc_interrupts=$ac_cv_have_proc_interrupts
4789 if test "$have_proc_interrupts" = yes; then
4790 cat >> confdefs.h <<\EOF
4791 #define HAVE_PROC_INTERRUPTS 1
4796 elif test "$with_proc_interrupts" != no; then
4797 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
4802 ###############################################################################
4804 # The --enable-locking option
4806 ###############################################################################
4808 # Check whether --enable-locking or --disable-locking was given.
4809 if test "${enable_locking+set}" = set; then
4810 enableval="$enable_locking"
4811 enable_locking="$enableval"
4816 if test "$enable_locking" = yes; then
4818 elif test "$enable_locking" = no; then
4819 cat >> confdefs.h <<\EOF
4820 #define NO_LOCKING 1
4824 echo "error: must be yes or no: --enable-locking=$enable_locking"
4830 ###############################################################################
4832 # The --enable-vt-locking option
4834 ###############################################################################
4836 #ac_vt_lockswitch=no
4837 #AC_ARG_ENABLE(vt-locking,[
4838 # --enable-vt-locking Compile in support for locking Virtual Terminals.
4839 # This is the default if the system supports it, and
4840 # if locking support is included (--enable-locking.)
4841 # --disable-vt-locking Do not allow locking of VTs, even if locking is
4843 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
4844 #if test "$enable_vt_locking" = yes; then
4846 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
4847 # [AC_TRY_COMPILE([#include <fcntl.h>
4848 # #include <sys/ioctl.h>
4849 # #include <sys/vt.h>],
4850 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
4851 # [ac_cv_vt_lockswitch=yes],
4852 # [ac_cv_vt_lockswitch=no])])
4853 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
4855 #elif test "$enable_vt_locking" = no; then
4858 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
4862 #if test "$ac_vt_lockswitch" = yes; then
4863 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
4864 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
4865 # # #### but it doesn't work yet, so don't worry about that for now.
4871 ###############################################################################
4875 ###############################################################################
4879 # Solaris systems tend to come with PAM misconfigured.
4880 # Don't build it by default, even if the headers exist.
4884 # Default to building PAM support on all other systems, if it exists.
4885 with_pam_default=yes
4890 with_pam_req=unspecified
4892 # Check whether --with-pam or --without-pam was given.
4893 if test "${with_pam+set}" = set; then
4895 with_pam="$withval"; with_pam_req="$withval"
4897 with_pam=$with_pam_default
4907 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
4908 echo "configure:4920: checking for PAM headers" >&5
4911 X_CFLAGS="-I$d $X_CFLAGS"
4912 echo "$ac_t""$d" 1>&6
4914 echo "$ac_t""not found ($d: no such directory)" 1>&6
4917 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
4918 echo "configure:4930: checking for PAM libs" >&5
4921 X_LIBS="-L$d $X_LIBS"
4922 echo "$ac_t""$d" 1>&6
4924 echo "$ac_t""not found ($d: no such directory)" 1>&6
4927 # replace the directory string with "yes".
4929 with_pam=$with_pam_req
4934 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
4935 echo " If it is a directory, then \`DIR/include' will be added to"
4936 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4942 if test "$enable_locking" = yes -a "$with_pam" = yes; then
4943 echo $ac_n "checking for PAM""... $ac_c" 1>&6
4944 echo "configure:4956: checking for PAM" >&5
4945 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
4946 echo $ac_n "(cached) $ac_c" 1>&6
4949 ac_save_CPPFLAGS="$CPPFLAGS"
4950 if test \! -z "$includedir" ; then
4951 CPPFLAGS="$CPPFLAGS -I$includedir"
4953 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4954 cat > conftest.$ac_ext <<EOF
4955 #line 4967 "configure"
4956 #include "confdefs.h"
4957 #include <security/pam_appl.h>
4962 if { (eval echo configure:4974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4966 echo "configure: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
4972 CPPFLAGS="$ac_save_CPPFLAGS"
4975 echo "$ac_t""$ac_cv_pam" 1>&6
4976 if test "$ac_cv_pam" = yes ; then
4978 cat >> confdefs.h <<\EOF
4982 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
4984 # libpam typically requires dlopen and dlsym. On FreeBSD,
4985 # those are in libc. On Linux and Solaris, they're in libdl.
4986 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4987 echo "configure:4999: checking for dlopen in -ldl" >&5
4988 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4989 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4990 echo $ac_n "(cached) $ac_c" 1>&6
4992 ac_save_LIBS="$LIBS"
4994 cat > conftest.$ac_ext <<EOF
4995 #line 5007 "configure"
4996 #include "confdefs.h"
4997 /* Override any gcc2 internal prototype to avoid an error. */
4998 /* We use char because int might match the return type of a gcc2
4999 builtin and then its argument prototype would still apply. */
5006 if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5008 eval "ac_cv_lib_$ac_lib_var=yes"
5010 echo "configure: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5013 eval "ac_cv_lib_$ac_lib_var=no"
5016 LIBS="$ac_save_LIBS"
5019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5020 echo "$ac_t""yes" 1>&6
5021 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5023 echo "$ac_t""no" 1>&6
5027 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5028 echo "configure:5040: checking how to call pam_strerror" >&5
5029 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5030 echo $ac_n "(cached) $ac_c" 1>&6
5032 cat > conftest.$ac_ext <<EOF
5033 #line 5045 "configure"
5034 #include "confdefs.h"
5037 #include <security/pam_appl.h>
5039 pam_handle_t *pamh = 0;
5040 char *s = pam_strerror(pamh, PAM_SUCCESS);
5043 if { (eval echo configure:5055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5045 ac_pam_strerror_args=2
5047 echo "configure: failed program was:" >&5
5048 cat conftest.$ac_ext >&5
5050 cat > conftest.$ac_ext <<EOF
5051 #line 5063 "configure"
5052 #include "confdefs.h"
5055 #include <security/pam_appl.h>
5058 pam_strerror(PAM_SUCCESS);
5061 if { (eval echo configure:5073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5063 ac_pam_strerror_args=1
5065 echo "configure: failed program was:" >&5
5066 cat conftest.$ac_ext >&5
5068 ac_pam_strerror_args=0
5073 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5076 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5077 if test "$ac_pam_strerror_args" = 1 ; then
5078 echo "$ac_t""one argument" 1>&6
5079 elif test "$ac_pam_strerror_args" = 2 ; then
5080 cat >> confdefs.h <<\EOF
5081 #define PAM_STRERROR_TWO_ARGS 1
5084 echo "$ac_t""two arguments" 1>&6
5086 echo "$ac_t""unknown" 1>&6
5092 ###############################################################################
5094 # Check for Kerberos.
5096 ###############################################################################
5099 with_kerberos_req=unspecified
5101 # Check whether --with-kerberos or --without-kerberos was given.
5102 if test "${with_kerberos+set}" = set; then
5103 withval="$with_kerberos"
5104 with_kerberos="$withval"; with_kerberos_req="$withval"
5111 case "$with_kerberos" in
5116 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5117 echo "configure:5129: checking for Kerberos headers" >&5
5118 d=$with_kerberos/include
5120 X_CFLAGS="-I$d $X_CFLAGS"
5121 echo "$ac_t""$d" 1>&6
5123 echo "$ac_t""not found ($d: no such directory)" 1>&6
5126 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5127 echo "configure:5139: checking for Kerberos libs" >&5
5128 d=$with_kerberos/lib
5130 X_LIBS="-L$d $X_LIBS"
5131 echo "$ac_t""$d" 1>&6
5133 echo "$ac_t""not found ($d: no such directory)" 1>&6
5136 # replace the directory string with "yes".
5137 with_kerberos_req="yes"
5138 with_kerberos=$with_kerberos_req
5143 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5144 echo " If it is a directory, then \`DIR/include' will be added to"
5145 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5151 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5152 echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
5153 echo "configure:5165: checking for Kerberos" >&5
5154 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5155 echo $ac_n "(cached) $ac_c" 1>&6
5158 ac_save_CPPFLAGS="$CPPFLAGS"
5159 if test \! -z "$includedir" ; then
5160 CPPFLAGS="$CPPFLAGS -I$includedir"
5162 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5163 cat > conftest.$ac_ext <<EOF
5164 #line 5176 "configure"
5165 #include "confdefs.h"
5171 if { (eval echo configure:5183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5175 echo "configure: failed program was:" >&5
5176 cat conftest.$ac_ext >&5
5181 CPPFLAGS="$ac_save_CPPFLAGS"
5184 echo "$ac_t""$ac_cv_kerberos" 1>&6
5185 if test "$ac_cv_kerberos" = yes ; then
5187 cat >> confdefs.h <<\EOF
5188 #define HAVE_KERBEROS 1
5192 # from Tim Showalter <tjs+@andrew.cmu.edu>
5193 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
5194 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5195 echo "configure:5207: checking for res_search" >&5
5196 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5197 echo $ac_n "(cached) $ac_c" 1>&6
5199 cat > conftest.$ac_ext <<EOF
5200 #line 5212 "configure"
5201 #include "confdefs.h"
5202 /* System header to define __stub macros and hopefully few prototypes,
5203 which can conflict with char res_search(); below. */
5205 /* Override any gcc2 internal prototype to avoid an error. */
5206 /* We use char because int might match the return type of a gcc2
5207 builtin and then its argument prototype would still apply. */
5212 /* The GNU C library defines this for functions which it implements
5213 to always fail with ENOSYS. Some functions are actually named
5214 something starting with __ and the normal name is an alias. */
5215 #if defined (__stub_res_search) || defined (__stub___res_search)
5223 if { (eval echo configure:5235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5225 eval "ac_cv_func_res_search=yes"
5227 echo "configure: failed program was:" >&5
5228 cat conftest.$ac_ext >&5
5230 eval "ac_cv_func_res_search=no"
5235 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5236 echo "$ac_t""yes" 1>&6
5239 echo "$ac_t""no" 1>&6
5240 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5241 echo "configure:5253: checking for res_search in -lresolv" >&5
5242 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5243 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5244 echo $ac_n "(cached) $ac_c" 1>&6
5246 ac_save_LIBS="$LIBS"
5247 LIBS="-lresolv $LIBS"
5248 cat > conftest.$ac_ext <<EOF
5249 #line 5261 "configure"
5250 #include "confdefs.h"
5251 /* Override any gcc2 internal prototype to avoid an error. */
5252 /* We use char because int might match the return type of a gcc2
5253 builtin and then its argument prototype would still apply. */
5260 if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5262 eval "ac_cv_lib_$ac_lib_var=yes"
5264 echo "configure: failed program was:" >&5
5265 cat conftest.$ac_ext >&5
5267 eval "ac_cv_lib_$ac_lib_var=no"
5270 LIBS="$ac_save_LIBS"
5273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5274 echo "$ac_t""yes" 1>&6
5275 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
5277 echo "$ac_t""no" 1>&6
5278 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
5289 ###############################################################################
5291 # Check for the nine billion variants of shadow passwords...
5293 ###############################################################################
5298 with_shadow_req=unspecified
5300 # Check whether --with-shadow or --without-shadow was given.
5301 if test "${with_shadow+set}" = set; then
5302 withval="$with_shadow"
5303 with_shadow="$withval"; with_shadow_req="$withval"
5310 case "$with_shadow" in
5315 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
5316 echo "configure:5328: checking for shadow password headers" >&5
5317 d=$with_shadow/include
5319 X_CFLAGS="-I$d $X_CFLAGS"
5320 echo "$ac_t""$d" 1>&6
5322 echo "$ac_t""not found ($d: no such directory)" 1>&6
5325 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
5326 echo "configure:5338: checking for shadow password libs" >&5
5329 X_LIBS="-L$d $X_LIBS"
5330 echo "$ac_t""$d" 1>&6
5332 echo "$ac_t""not found ($d: no such directory)" 1>&6
5335 # replace the directory string with "yes".
5336 with_shadow_req="yes"
5337 with_shadow=$with_shadow_req
5342 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
5343 echo " If it is a directory, then \`DIR/include' will be added to"
5344 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5350 if test "$enable_locking" = no ; then
5356 ###############################################################################
5358 # Check for Sun "adjunct" passwords.
5360 ###############################################################################
5362 if test "$with_shadow" = yes ; then
5363 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
5364 echo "configure:5376: checking for Sun-style shadow passwords" >&5
5365 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
5366 echo $ac_n "(cached) $ac_c" 1>&6
5369 ac_save_CPPFLAGS="$CPPFLAGS"
5370 if test \! -z "$includedir" ; then
5371 CPPFLAGS="$CPPFLAGS -I$includedir"
5373 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5374 cat > conftest.$ac_ext <<EOF
5375 #line 5387 "configure"
5376 #include "confdefs.h"
5379 #include <sys/types.h>
5380 #include <sys/label.h>
5381 #include <sys/audit.h>
5384 struct passwd_adjunct *p = getpwanam("nobody");
5385 const char *pw = p->pwa_passwd;
5388 if { (eval echo configure:5400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5390 ac_cv_sun_adjunct=yes
5392 echo "configure: failed program was:" >&5
5393 cat conftest.$ac_ext >&5
5395 ac_cv_sun_adjunct=no
5398 CPPFLAGS="$ac_save_CPPFLAGS"
5401 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
5402 if test "$ac_cv_sun_adjunct" = yes; then
5403 have_shadow_adjunct=yes
5410 ###############################################################################
5412 # Check for DEC and SCO so-called "enhanced" security.
5414 ###############################################################################
5416 if test "$with_shadow" = yes ; then
5417 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
5418 echo "configure:5430: checking for DEC-style shadow passwords" >&5
5419 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
5420 echo $ac_n "(cached) $ac_c" 1>&6
5423 ac_save_CPPFLAGS="$CPPFLAGS"
5424 if test \! -z "$includedir" ; then
5425 CPPFLAGS="$CPPFLAGS -I$includedir"
5427 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5428 cat > conftest.$ac_ext <<EOF
5429 #line 5441 "configure"
5430 #include "confdefs.h"
5433 #include <sys/types.h>
5435 #include <sys/security.h>
5438 struct pr_passwd *p;
5440 set_auth_parameters(0, 0);
5441 check_auth_parameters();
5442 p = getprpwnam("nobody");
5443 pw = p->ufld.fd_encrypt;
5446 if { (eval echo configure:5458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5448 ac_cv_enhanced_passwd=yes
5450 echo "configure: failed program was:" >&5
5451 cat conftest.$ac_ext >&5
5453 ac_cv_enhanced_passwd=no
5456 CPPFLAGS="$ac_save_CPPFLAGS"
5459 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
5460 if test $ac_cv_enhanced_passwd = yes; then
5461 have_shadow_enhanced=yes
5465 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
5466 # (I'm told it needs -lcurses too, but I don't understand why.)
5467 # But on DEC, it's in -lsecurity.
5469 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
5470 echo "configure:5482: checking for getprpwnam in -lprot" >&5
5471 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
5472 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5473 echo $ac_n "(cached) $ac_c" 1>&6
5475 ac_save_LIBS="$LIBS"
5476 LIBS="-lprot -lx $LIBS"
5477 cat > conftest.$ac_ext <<EOF
5478 #line 5490 "configure"
5479 #include "confdefs.h"
5480 /* Override any gcc2 internal prototype to avoid an error. */
5481 /* We use char because int might match the return type of a gcc2
5482 builtin and then its argument prototype would still apply. */
5489 if { (eval echo configure:5501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5491 eval "ac_cv_lib_$ac_lib_var=yes"
5493 echo "configure: failed program was:" >&5
5494 cat conftest.$ac_ext >&5
5496 eval "ac_cv_lib_$ac_lib_var=no"
5499 LIBS="$ac_save_LIBS"
5502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5503 echo "$ac_t""yes" 1>&6
5504 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
5506 echo "$ac_t""no" 1>&6
5507 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
5508 echo "configure:5520: checking for getprpwnam in -lsecurity" >&5
5509 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
5510 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5511 echo $ac_n "(cached) $ac_c" 1>&6
5513 ac_save_LIBS="$LIBS"
5514 LIBS="-lsecurity $LIBS"
5515 cat > conftest.$ac_ext <<EOF
5516 #line 5528 "configure"
5517 #include "confdefs.h"
5518 /* Override any gcc2 internal prototype to avoid an error. */
5519 /* We use char because int might match the return type of a gcc2
5520 builtin and then its argument prototype would still apply. */
5527 if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5529 eval "ac_cv_lib_$ac_lib_var=yes"
5531 echo "configure: failed program was:" >&5
5532 cat conftest.$ac_ext >&5
5534 eval "ac_cv_lib_$ac_lib_var=no"
5537 LIBS="$ac_save_LIBS"
5540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5541 echo "$ac_t""yes" 1>&6
5542 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5544 echo "$ac_t""no" 1>&6
5552 ###############################################################################
5554 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
5556 ###############################################################################
5558 if test "$with_shadow" = yes ; then
5559 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5560 echo "configure:5572: checking for HP-style shadow passwords" >&5
5561 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5562 echo $ac_n "(cached) $ac_c" 1>&6
5565 ac_save_CPPFLAGS="$CPPFLAGS"
5566 if test \! -z "$includedir" ; then
5567 CPPFLAGS="$CPPFLAGS -I$includedir"
5569 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5570 cat > conftest.$ac_ext <<EOF
5571 #line 5583 "configure"
5572 #include "confdefs.h"
5575 #include <sys/types.h>
5577 #include <hpsecurity.h>
5580 struct s_passwd *p = getspwnam("nobody");
5581 const char *pw = p->pw_passwd;
5584 if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5586 ac_cv_hpux_passwd=yes
5588 echo "configure: failed program was:" >&5
5589 cat conftest.$ac_ext >&5
5591 ac_cv_hpux_passwd=no
5594 CPPFLAGS="$ac_save_CPPFLAGS"
5597 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
5598 if test "$ac_cv_hpux_passwd" = yes; then
5599 have_shadow_hpux=yes
5603 # on HPUX, bigcrypt is in -lsec
5604 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
5605 echo "configure:5617: checking for bigcrypt in -lsec" >&5
5606 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
5607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5608 echo $ac_n "(cached) $ac_c" 1>&6
5610 ac_save_LIBS="$LIBS"
5612 cat > conftest.$ac_ext <<EOF
5613 #line 5625 "configure"
5614 #include "confdefs.h"
5615 /* Override any gcc2 internal prototype to avoid an error. */
5616 /* We use char because int might match the return type of a gcc2
5617 builtin and then its argument prototype would still apply. */
5624 if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5626 eval "ac_cv_lib_$ac_lib_var=yes"
5628 echo "configure: failed program was:" >&5
5629 cat conftest.$ac_ext >&5
5631 eval "ac_cv_lib_$ac_lib_var=no"
5634 LIBS="$ac_save_LIBS"
5637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5638 echo "$ac_t""yes" 1>&6
5639 PASSWD_LIBS="$PASSWD_LIBS -lsec"
5641 echo "$ac_t""no" 1>&6
5648 ###############################################################################
5650 # Check for FreeBSD-style shadow passwords.
5652 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
5653 # password systems -- except you only get stuff in the pw_passwd field
5654 # if the running program is setuid. So, guess that we've got this
5655 # lossage to contend with if /etc/master.passwd exists, and default to
5656 # a setuid installation.
5658 ###############################################################################
5660 if test "$with_shadow" = yes ; then
5661 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
5662 echo "configure:5674: checking for FreeBSD-style shadow passwords" >&5
5663 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
5664 echo $ac_n "(cached) $ac_c" 1>&6
5666 if test -f /etc/master.passwd ; then
5667 ac_cv_master_passwd=yes
5669 ac_cv_master_passwd=no
5673 echo "$ac_t""$ac_cv_master_passwd" 1>&6
5674 if test "$ac_cv_master_passwd" = yes; then
5680 ###############################################################################
5682 # Check for traditional (ha!) shadow passwords.
5684 ###############################################################################
5686 if test "$with_shadow" = yes ; then
5687 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
5688 echo "configure:5700: checking for generic shadow passwords" >&5
5689 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
5690 echo $ac_n "(cached) $ac_c" 1>&6
5693 ac_save_CPPFLAGS="$CPPFLAGS"
5694 if test \! -z "$includedir" ; then
5695 CPPFLAGS="$CPPFLAGS -I$includedir"
5697 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5698 cat > conftest.$ac_ext <<EOF
5699 #line 5711 "configure"
5700 #include "confdefs.h"
5703 #include <sys/types.h>
5707 struct spwd *p = getspnam("nobody");
5708 const char *pw = p->sp_pwdp;
5711 if { (eval echo configure:5723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5715 echo "configure: failed program was:" >&5
5716 cat conftest.$ac_ext >&5
5721 CPPFLAGS="$ac_save_CPPFLAGS"
5724 echo "$ac_t""$ac_cv_shadow" 1>&6
5725 if test "$ac_cv_shadow" = yes; then
5729 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
5731 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
5732 echo "configure:5744: checking for getspnam in -lc" >&5
5733 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
5734 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5735 echo $ac_n "(cached) $ac_c" 1>&6
5737 ac_save_LIBS="$LIBS"
5739 cat > conftest.$ac_ext <<EOF
5740 #line 5752 "configure"
5741 #include "confdefs.h"
5742 /* Override any gcc2 internal prototype to avoid an error. */
5743 /* We use char because int might match the return type of a gcc2
5744 builtin and then its argument prototype would still apply. */
5751 if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5753 eval "ac_cv_lib_$ac_lib_var=yes"
5755 echo "configure: failed program was:" >&5
5756 cat conftest.$ac_ext >&5
5758 eval "ac_cv_lib_$ac_lib_var=no"
5761 LIBS="$ac_save_LIBS"
5764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5765 echo "$ac_t""yes" 1>&6
5768 echo "$ac_t""no" 1>&6
5771 if test "$have_getspnam" = no ; then
5772 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
5773 echo "configure:5785: checking for getspnam in -lgen" >&5
5774 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
5775 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5776 echo $ac_n "(cached) $ac_c" 1>&6
5778 ac_save_LIBS="$LIBS"
5780 cat > conftest.$ac_ext <<EOF
5781 #line 5793 "configure"
5782 #include "confdefs.h"
5783 /* Override any gcc2 internal prototype to avoid an error. */
5784 /* We use char because int might match the return type of a gcc2
5785 builtin and then its argument prototype would still apply. */
5792 if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5794 eval "ac_cv_lib_$ac_lib_var=yes"
5796 echo "configure: failed program was:" >&5
5797 cat conftest.$ac_ext >&5
5799 eval "ac_cv_lib_$ac_lib_var=no"
5802 LIBS="$ac_save_LIBS"
5805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5806 echo "$ac_t""yes" 1>&6
5807 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
5809 echo "$ac_t""no" 1>&6
5817 ###############################################################################
5819 # Check for other libraries needed for non-shadow passwords.
5821 ###############################################################################
5823 if test "$enable_locking" = yes ; then
5825 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
5827 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
5828 echo "configure:5840: checking for crypt in -lc" >&5
5829 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
5830 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5831 echo $ac_n "(cached) $ac_c" 1>&6
5833 ac_save_LIBS="$LIBS"
5835 cat > conftest.$ac_ext <<EOF
5836 #line 5848 "configure"
5837 #include "confdefs.h"
5838 /* Override any gcc2 internal prototype to avoid an error. */
5839 /* We use char because int might match the return type of a gcc2
5840 builtin and then its argument prototype would still apply. */
5847 if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5849 eval "ac_cv_lib_$ac_lib_var=yes"
5851 echo "configure: failed program was:" >&5
5852 cat conftest.$ac_ext >&5
5854 eval "ac_cv_lib_$ac_lib_var=no"
5857 LIBS="$ac_save_LIBS"
5860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5861 echo "$ac_t""yes" 1>&6
5864 echo "$ac_t""no" 1>&6
5867 if test "$have_crypt" = no ; then
5868 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
5869 echo "configure:5881: checking for crypt in -lcrypt" >&5
5870 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
5871 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5872 echo $ac_n "(cached) $ac_c" 1>&6
5874 ac_save_LIBS="$LIBS"
5875 LIBS="-lcrypt $LIBS"
5876 cat > conftest.$ac_ext <<EOF
5877 #line 5889 "configure"
5878 #include "confdefs.h"
5879 /* Override any gcc2 internal prototype to avoid an error. */
5880 /* We use char because int might match the return type of a gcc2
5881 builtin and then its argument prototype would still apply. */
5888 if { (eval echo configure:5900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5890 eval "ac_cv_lib_$ac_lib_var=yes"
5892 echo "configure: failed program was:" >&5
5893 cat conftest.$ac_ext >&5
5895 eval "ac_cv_lib_$ac_lib_var=no"
5898 LIBS="$ac_save_LIBS"
5901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5902 echo "$ac_t""yes" 1>&6
5903 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
5905 echo "$ac_t""no" 1>&6
5912 # Most of the above shadow mechanisms will have set need_setuid to yes,
5913 # if they were found. But, on some systems, we need setuid even when
5914 # using plain old vanilla passwords.
5916 if test "$enable_locking" = yes ; then
5918 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
5925 if test "$have_shadow_adjunct" = yes ; then
5926 cat >> confdefs.h <<\EOF
5927 #define HAVE_ADJUNCT_PASSWD 1
5930 elif test "$have_shadow_enhanced" = yes ; then
5931 cat >> confdefs.h <<\EOF
5932 #define HAVE_ENHANCED_PASSWD 1
5935 elif test "$have_shadow_hpux" = yes ; then
5936 cat >> confdefs.h <<\EOF
5937 #define HAVE_HPUX_PASSWD 1
5940 elif test "$have_shadow" = yes ; then
5941 cat >> confdefs.h <<\EOF
5942 #define HAVE_SHADOW_PASSWD 1
5948 ###############################################################################
5952 ###############################################################################
5955 with_motif_req=unspecified
5956 # Check whether --with-motif or --without-motif was given.
5957 if test "${with_motif+set}" = set; then
5958 withval="$with_motif"
5959 with_motif="$withval"; with_motif_req="$withval"
5966 case "$with_motif" in
5971 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
5972 echo "configure:5984: checking for Motif headers" >&5
5973 d=$with_motif/include
5975 X_CFLAGS="-I$d $X_CFLAGS"
5976 echo "$ac_t""$d" 1>&6
5978 echo "$ac_t""not found ($d: no such directory)" 1>&6
5981 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
5982 echo "configure:5994: checking for Motif libs" >&5
5985 X_LIBS="-L$d $X_LIBS"
5986 echo "$ac_t""$d" 1>&6
5988 echo "$ac_t""not found ($d: no such directory)" 1>&6
5991 # replace the directory string with "yes".
5992 with_motif_req="yes"
5993 with_motif=$with_motif_req
5998 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
5999 echo " If it is a directory, then \`DIR/include' will be added to"
6000 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6006 if test "$with_motif" != yes -a "$with_motif" != no ; then
6007 echo "error: must be yes or no: --with-motif=$with_motif"
6011 if test "$with_motif" = yes; then
6014 ac_save_CPPFLAGS="$CPPFLAGS"
6015 if test \! -z "$includedir" ; then
6016 CPPFLAGS="$CPPFLAGS -I$includedir"
6018 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6019 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6020 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6021 echo "configure:6033: checking for Xm/Xm.h" >&5
6022 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6023 echo $ac_n "(cached) $ac_c" 1>&6
6025 cat > conftest.$ac_ext <<EOF
6026 #line 6038 "configure"
6027 #include "confdefs.h"
6030 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6031 { (eval echo configure:6043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6032 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6033 if test -z "$ac_err"; then
6035 eval "ac_cv_header_$ac_safe=yes"
6038 echo "configure: failed program was:" >&5
6039 cat conftest.$ac_ext >&5
6041 eval "ac_cv_header_$ac_safe=no"
6045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6046 echo "$ac_t""yes" 1>&6
6048 cat >> confdefs.h <<\EOF
6049 #define HAVE_MOTIF 1
6052 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6054 echo "$ac_t""no" 1>&6
6057 CPPFLAGS="$ac_save_CPPFLAGS"
6061 if test "$have_motif" = yes; then
6063 ac_save_CPPFLAGS="$CPPFLAGS"
6064 if test \! -z "$includedir" ; then
6065 CPPFLAGS="$CPPFLAGS -I$includedir"
6067 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6068 ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
6069 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
6070 echo "configure:6082: checking for Xm/ComboBox.h" >&5
6071 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6072 echo $ac_n "(cached) $ac_c" 1>&6
6074 cat > conftest.$ac_ext <<EOF
6075 #line 6087 "configure"
6076 #include "confdefs.h"
6077 #include <Xm/ComboBox.h>
6079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6080 { (eval echo configure:6092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6082 if test -z "$ac_err"; then
6084 eval "ac_cv_header_$ac_safe=yes"
6087 echo "configure: failed program was:" >&5
6088 cat conftest.$ac_ext >&5
6090 eval "ac_cv_header_$ac_safe=no"
6094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6095 echo "$ac_t""yes" 1>&6
6096 cat >> confdefs.h <<\EOF
6097 #define HAVE_XMCOMBOBOX 1
6101 echo "$ac_t""no" 1>&6
6104 CPPFLAGS="$ac_save_CPPFLAGS"
6108 ###############################################################################
6112 ###############################################################################
6115 with_gtk_req=unspecified
6116 # Check whether --with-gtk or --without-gtk was given.
6117 if test "${with_gtk+set}" = set; then
6119 with_gtk="$withval"; with_gtk_req="$withval"
6125 # if --with-gtk=/directory/ was specified, remember that directory so that
6126 # we can also look for the `gtk-config' program in that directory.
6142 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6143 echo "configure:6155: checking for Gtk headers" >&5
6146 X_CFLAGS="-I$d $X_CFLAGS"
6147 echo "$ac_t""$d" 1>&6
6149 echo "$ac_t""not found ($d: no such directory)" 1>&6
6152 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6153 echo "configure:6165: checking for Gtk libs" >&5
6156 X_LIBS="-L$d $X_LIBS"
6157 echo "$ac_t""$d" 1>&6
6159 echo "$ac_t""not found ($d: no such directory)" 1>&6
6162 # replace the directory string with "yes".
6164 with_gtk=$with_gtk_req
6169 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6170 echo " If it is a directory, then \`DIR/include' will be added to"
6171 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6177 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6178 echo "error: must be yes or no: --with-gtk=$with_gtk"
6183 if test "$with_gtk" = yes; then
6186 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6187 # for glib-config and gtk-config.
6191 if test ! -z "$gtk_dir"; then
6192 # canonicalize slashes.
6193 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6194 gtk_path="$gtk_dir:$gtk_dir:$gtk_path"
6197 for ac_prog in glib-config
6199 # Extract the first word of "$ac_prog", so it can be a program name with args.
6200 set dummy $ac_prog; ac_word=$2
6201 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6202 echo "configure:6214: checking for $ac_word" >&5
6203 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6204 echo $ac_n "(cached) $ac_c" 1>&6
6206 case "$glib_config" in
6208 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6211 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6215 ac_dummy="$gtk_path"
6216 for ac_dir in $ac_dummy; do
6217 test -z "$ac_dir" && ac_dir=.
6218 if test -f $ac_dir/$ac_word; then
6219 ac_cv_path_glib_config="$ac_dir/$ac_word"
6227 glib_config="$ac_cv_path_glib_config"
6228 if test -n "$glib_config"; then
6229 echo "$ac_t""$glib_config" 1>&6
6231 echo "$ac_t""no" 1>&6
6234 test -n "$glib_config" && break
6237 for ac_prog in gtk-config
6239 # Extract the first word of "$ac_prog", so it can be a program name with args.
6240 set dummy $ac_prog; ac_word=$2
6241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6242 echo "configure:6254: checking for $ac_word" >&5
6243 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6244 echo $ac_n "(cached) $ac_c" 1>&6
6246 case "$gtk_config" in
6248 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6251 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6254 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6255 ac_dummy="$gtk_path"
6256 for ac_dir in $ac_dummy; do
6257 test -z "$ac_dir" && ac_dir=.
6258 if test -f $ac_dir/$ac_word; then
6259 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6267 gtk_config="$ac_cv_path_gtk_config"
6268 if test -n "$gtk_config"; then
6269 echo "$ac_t""$gtk_config" 1>&6
6271 echo "$ac_t""no" 1>&6
6274 test -n "$gtk_config" && break
6278 if test -n "$glib_config" -a -n "gtk_config" ; then
6281 if test "$have_gtk" = yes; then
6282 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6283 echo "configure:6295: checking Gtk version number" >&5
6284 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6285 echo $ac_n "(cached) $ac_c" 1>&6
6287 ac_cv_gtk_version_string=`$glib_config --version`
6290 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6291 ac_gtk_version_string=$ac_cv_gtk_version_string
6294 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6295 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6297 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6298 if test -z "$ac_gtk_version"; then
6299 ac_gtk_version=unknown
6300 ac_gtk_version_string=unknown
6302 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6308 if test "$have_gtk" = yes; then
6309 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6310 echo "configure:6322: checking for Gtk includes" >&5
6311 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6312 echo $ac_n "(cached) $ac_c" 1>&6
6314 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6317 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6318 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6319 echo "configure:6331: checking for Gtk libs" >&5
6320 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6321 echo $ac_n "(cached) $ac_c" 1>&6
6323 ac_cv_gtk_config_libs=`$gtk_config --libs`
6326 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6327 INCLUDES="$INCLUDES $ac_cv_gtk_config_cflags"
6328 GTK_LIBS="$GTK_LIBS $ac_cv_gtk_config_libs"
6329 cat >> confdefs.h <<\EOF
6337 ###############################################################################
6339 # Checking whether Motif is really Lesstif.
6341 ###############################################################################
6344 if test "$have_motif" = yes ; then
6345 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6346 echo "configure:6358: checking whether Motif is really LessTif" >&5
6347 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6348 echo $ac_n "(cached) $ac_c" 1>&6
6351 ac_save_CPPFLAGS="$CPPFLAGS"
6352 if test \! -z "$includedir" ; then
6353 CPPFLAGS="$CPPFLAGS -I$includedir"
6355 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6356 cat > conftest.$ac_ext <<EOF
6357 #line 6369 "configure"
6358 #include "confdefs.h"
6361 long vers = LesstifVersion;
6364 if { (eval echo configure:6376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6366 ac_cv_have_lesstif=yes
6368 echo "configure: failed program was:" >&5
6369 cat conftest.$ac_ext >&5
6371 ac_cv_have_lesstif=no
6374 CPPFLAGS="$ac_save_CPPFLAGS"
6377 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
6378 have_lesstif=$ac_cv_have_lesstif
6382 lesstif_version=unknown
6383 lesstif_version_string=unknown
6385 if test "$have_lesstif" = yes ; then
6387 echo unknown > conftest-lt
6388 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
6389 echo "configure:6401: checking LessTif version number" >&5
6390 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
6391 echo $ac_n "(cached) $ac_c" 1>&6
6394 ac_save_CPPFLAGS="$CPPFLAGS"
6395 if test \! -z "$includedir" ; then
6396 CPPFLAGS="$CPPFLAGS -I$includedir"
6398 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6399 if test "$cross_compiling" = yes; then
6400 ac_cv_lesstif_version=unknown
6401 ac_cv_lesstif_version_string=unknown
6403 cat > conftest.$ac_ext <<EOF
6404 #line 6416 "configure"
6405 #include "confdefs.h"
6409 FILE *f = fopen("conftest-lt", "w");
6411 fprintf(f, "%d %d.%d\n", LesstifVersion,
6412 LESSTIF_VERSION, LESSTIF_REVISION);
6417 if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6419 ltv=`cat conftest-lt`
6420 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
6421 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
6423 echo "configure: failed program was:" >&5
6424 cat conftest.$ac_ext >&5
6426 ac_cv_lesstif_version=unknown
6427 ac_cv_lesstif_version_string=unknown
6432 CPPFLAGS="$ac_save_CPPFLAGS"
6435 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
6437 lesstif_version=$ac_cv_lesstif_version
6438 lesstif_version_string=$ac_cv_lesstif_version_string
6443 if test "$have_motif" = yes ; then
6445 echo unknown > conftest-mt
6446 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
6447 echo "configure:6459: checking Motif version number" >&5
6448 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
6449 echo $ac_n "(cached) $ac_c" 1>&6
6452 ac_save_CPPFLAGS="$CPPFLAGS"
6453 if test \! -z "$includedir" ; then
6454 CPPFLAGS="$CPPFLAGS -I$includedir"
6456 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6457 if test "$cross_compiling" = yes; then
6458 ac_cv_motif_version=unknown
6459 ac_cv_motif_version_string=unknown
6461 cat > conftest.$ac_ext <<EOF
6462 #line 6474 "configure"
6463 #include "confdefs.h"
6467 FILE *f = fopen("conftest-mt", "w");
6469 fprintf(f, "%d %d.%d\n", XmVersion,
6470 XmVERSION, XmREVISION);
6475 if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6477 mtv=`cat conftest-mt`
6478 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
6479 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
6481 echo "configure: failed program was:" >&5
6482 cat conftest.$ac_ext >&5
6484 ac_cv_motif_version=unknown
6485 ac_cv_motif_version_string=unknown
6490 CPPFLAGS="$ac_save_CPPFLAGS"
6493 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
6495 motif_version=$ac_cv_motif_version
6496 motif_version_string=$ac_cv_motif_version_string
6501 ###############################################################################
6503 # Checking whether Motif requires -lXpm.
6505 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
6506 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
6507 # of the library whether to build the XPM code into libXm, or whether
6508 # to rely on an external libXm. So the only way to tell whether XPM is
6509 # a link-time requirement is to examine libXm.a, which is very
6510 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
6511 # always link against XPM if the XPM lib exists (and this will be a
6512 # no-op if libXm happens to already have the XPM code in it.)
6514 ###############################################################################
6516 motif_requires_xpm=no
6517 if test "$have_motif" = yes ; then
6518 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
6519 echo "configure:6531: checking whether Motif requires XPM" >&5
6520 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
6522 motif_requires_xpm=yes
6523 echo "$ac_t""maybe" 1>&6
6525 echo "$ac_t""no" 1>&6
6530 ###############################################################################
6532 # Checking whether Motif requires -lXp.
6534 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
6535 # Extension". Why this extension isn't in -lXext with all the others,
6538 ###############################################################################
6541 if test "$have_motif" = yes ; then
6544 ac_save_CPPFLAGS="$CPPFLAGS"
6545 ac_save_LDFLAGS="$LDFLAGS"
6546 # ac_save_LIBS="$LIBS"
6548 if test \! -z "$includedir" ; then
6549 CPPFLAGS="$CPPFLAGS -I$includedir"
6551 # note: $X_CFLAGS includes $x_includes
6552 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6554 if test \! -z "$libdir" ; then
6555 LDFLAGS="$LDFLAGS -L$libdir"
6557 # note: $X_LIBS includes $x_libraries
6558 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6560 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
6561 echo "configure:6573: checking for XpQueryExtension in -lXp" >&5
6562 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
6563 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6564 echo $ac_n "(cached) $ac_c" 1>&6
6566 ac_save_LIBS="$LIBS"
6567 LIBS="-lXp -lX11 -lXext -lm $LIBS"
6568 cat > conftest.$ac_ext <<EOF
6569 #line 6581 "configure"
6570 #include "confdefs.h"
6571 /* Override any gcc2 internal prototype to avoid an error. */
6572 /* We use char because int might match the return type of a gcc2
6573 builtin and then its argument prototype would still apply. */
6574 char XpQueryExtension();
6580 if { (eval echo configure:6592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6582 eval "ac_cv_lib_$ac_lib_var=yes"
6584 echo "configure: failed program was:" >&5
6585 cat conftest.$ac_ext >&5
6587 eval "ac_cv_lib_$ac_lib_var=no"
6590 LIBS="$ac_save_LIBS"
6593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6594 echo "$ac_t""yes" 1>&6
6595 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
6597 echo "$ac_t""no" 1>&6
6601 CPPFLAGS="$ac_save_CPPFLAGS"
6602 LDFLAGS="$ac_save_LDFLAGS"
6603 # LIBS="$ac_save_LIBS"
6608 ###############################################################################
6610 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
6612 ###############################################################################
6615 if test "$have_motif" = yes ; then
6617 ac_save_CPPFLAGS="$CPPFLAGS"
6618 ac_save_LDFLAGS="$LDFLAGS"
6619 # ac_save_LIBS="$LIBS"
6621 if test \! -z "$includedir" ; then
6622 CPPFLAGS="$CPPFLAGS -I$includedir"
6624 # note: $X_CFLAGS includes $x_includes
6625 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6627 if test \! -z "$libdir" ; then
6628 LDFLAGS="$LDFLAGS -L$libdir"
6630 # note: $X_LIBS includes $x_libraries
6631 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6633 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
6634 echo "configure:6646: checking for _Xsetlocale in -lXintl" >&5
6635 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
6636 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6637 echo $ac_n "(cached) $ac_c" 1>&6
6639 ac_save_LIBS="$LIBS"
6640 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
6641 cat > conftest.$ac_ext <<EOF
6642 #line 6654 "configure"
6643 #include "confdefs.h"
6644 /* Override any gcc2 internal prototype to avoid an error. */
6645 /* We use char because int might match the return type of a gcc2
6646 builtin and then its argument prototype would still apply. */
6653 if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6655 eval "ac_cv_lib_$ac_lib_var=yes"
6657 echo "configure: failed program was:" >&5
6658 cat conftest.$ac_ext >&5
6660 eval "ac_cv_lib_$ac_lib_var=no"
6663 LIBS="$ac_save_LIBS"
6666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6667 echo "$ac_t""yes" 1>&6
6670 echo "$ac_t""no" 1>&6
6674 CPPFLAGS="$ac_save_CPPFLAGS"
6675 LDFLAGS="$ac_save_LDFLAGS"
6676 # LIBS="$ac_save_LIBS"
6678 if test "$have_xintl" = yes; then
6679 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
6684 ###############################################################################
6686 # Check for -lGL or -lMesaGL.
6688 ###############################################################################
6692 with_gl_req=unspecified
6694 # Check whether --with-gl or --without-gl was given.
6695 if test "${with_gl+set}" = set; then
6697 with_gl="$withval"; with_gl_req="$withval"
6709 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
6710 echo "configure:6722: checking for GL headers" >&5
6713 X_CFLAGS="-I$d $X_CFLAGS"
6714 echo "$ac_t""$d" 1>&6
6716 echo "$ac_t""not found ($d: no such directory)" 1>&6
6719 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
6720 echo "configure:6732: checking for GL libs" >&5
6723 X_LIBS="-L$d $X_LIBS"
6724 echo "$ac_t""$d" 1>&6
6726 echo "$ac_t""not found ($d: no such directory)" 1>&6
6729 # replace the directory string with "yes".
6731 with_gl=$with_gl_req
6736 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
6737 echo " If it is a directory, then \`DIR/include' will be added to"
6738 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6744 ac_mesagl_version=unknown
6745 ac_mesagl_version_string=unknown
6747 if test "$with_gl" = yes; then
6749 ac_save_CPPFLAGS="$CPPFLAGS"
6750 if test \! -z "$includedir" ; then
6751 CPPFLAGS="$CPPFLAGS -I$includedir"
6753 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6754 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
6755 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
6756 echo "configure:6768: checking for GL/gl.h" >&5
6757 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6758 echo $ac_n "(cached) $ac_c" 1>&6
6760 cat > conftest.$ac_ext <<EOF
6761 #line 6773 "configure"
6762 #include "confdefs.h"
6765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6766 { (eval echo configure:6778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6768 if test -z "$ac_err"; then
6770 eval "ac_cv_header_$ac_safe=yes"
6773 echo "configure: failed program was:" >&5
6774 cat conftest.$ac_ext >&5
6776 eval "ac_cv_header_$ac_safe=no"
6780 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6781 echo "$ac_t""yes" 1>&6
6784 echo "$ac_t""no" 1>&6
6787 CPPFLAGS="$ac_save_CPPFLAGS"
6788 if test "$have_gl" = yes ; then
6790 ac_save_CPPFLAGS="$CPPFLAGS"
6791 if test \! -z "$includedir" ; then
6792 CPPFLAGS="$CPPFLAGS -I$includedir"
6794 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6795 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
6796 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
6797 echo "configure:6809: checking for GL/glx.h" >&5
6798 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6799 echo $ac_n "(cached) $ac_c" 1>&6
6801 cat > conftest.$ac_ext <<EOF
6802 #line 6814 "configure"
6803 #include "confdefs.h"
6806 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6807 { (eval echo configure:6819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6808 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6809 if test -z "$ac_err"; then
6811 eval "ac_cv_header_$ac_safe=yes"
6814 echo "configure: failed program was:" >&5
6815 cat conftest.$ac_ext >&5
6817 eval "ac_cv_header_$ac_safe=no"
6821 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6822 echo "$ac_t""yes" 1>&6
6825 echo "$ac_t""no" 1>&6
6828 CPPFLAGS="$ac_save_CPPFLAGS"
6831 # If we have the headers, try and figure out which vendor it's from.
6833 if test "$have_gl" = yes ; then
6835 # We need to know whether it's MesaGL so that we know which libraries
6838 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
6839 echo "configure:6851: checking whether GL is really MesaGL" >&5
6840 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
6841 echo $ac_n "(cached) $ac_c" 1>&6
6843 ac_cv_have_mesa_gl=no
6845 ac_save_CPPFLAGS="$CPPFLAGS"
6846 if test \! -z "$includedir" ; then
6847 CPPFLAGS="$CPPFLAGS -I$includedir"
6849 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6850 cat > conftest.$ac_ext <<EOF
6851 #line 6863 "configure"
6852 #include "confdefs.h"
6855 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6856 egrep "Mesa" >/dev/null 2>&1; then
6858 ac_cv_have_mesa_gl=yes
6862 CPPFLAGS="$ac_save_CPPFLAGS"
6866 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
6867 ac_have_mesa_gl=$ac_cv_have_mesa_gl
6874 # Some versions of MesaGL are compiled to require -lpthread.
6875 # So if the Mesa headers exist, and -lpthread exists, then always
6876 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
6878 if test "$ac_have_mesa_gl" = yes; then
6879 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
6880 echo "configure:6892: checking for pthread_create in -lpthread" >&5
6881 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
6882 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6883 echo $ac_n "(cached) $ac_c" 1>&6
6885 ac_save_LIBS="$LIBS"
6886 LIBS="-lpthread $LIBS"
6887 cat > conftest.$ac_ext <<EOF
6888 #line 6900 "configure"
6889 #include "confdefs.h"
6890 /* Override any gcc2 internal prototype to avoid an error. */
6891 /* We use char because int might match the return type of a gcc2
6892 builtin and then its argument prototype would still apply. */
6893 char pthread_create();
6899 if { (eval echo configure:6911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6901 eval "ac_cv_lib_$ac_lib_var=yes"
6903 echo "configure: failed program was:" >&5
6904 cat conftest.$ac_ext >&5
6906 eval "ac_cv_lib_$ac_lib_var=no"
6909 LIBS="$ac_save_LIBS"
6912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6913 echo "$ac_t""yes" 1>&6
6916 echo "$ac_t""no" 1>&6
6922 # If we have Mesa headers, check to see if we can link against -lMesaGL.
6923 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
6924 # Else, warn that GL is busted. (We have the headers, but no libs.)
6927 if test "$ac_have_mesa_gl" = yes ; then
6929 ac_save_CPPFLAGS="$CPPFLAGS"
6930 ac_save_LDFLAGS="$LDFLAGS"
6931 # ac_save_LIBS="$LIBS"
6933 if test \! -z "$includedir" ; then
6934 CPPFLAGS="$CPPFLAGS -I$includedir"
6936 # note: $X_CFLAGS includes $x_includes
6937 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6939 if test \! -z "$libdir" ; then
6940 LDFLAGS="$LDFLAGS -L$libdir"
6942 # note: $X_LIBS includes $x_libraries
6943 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6945 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
6946 echo "configure:6958: checking for glXCreateContext in -lMesaGL" >&5
6947 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
6948 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6949 echo $ac_n "(cached) $ac_c" 1>&6
6951 ac_save_LIBS="$LIBS"
6952 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
6953 cat > conftest.$ac_ext <<EOF
6954 #line 6966 "configure"
6955 #include "confdefs.h"
6956 /* Override any gcc2 internal prototype to avoid an error. */
6957 /* We use char because int might match the return type of a gcc2
6958 builtin and then its argument prototype would still apply. */
6959 char glXCreateContext();
6965 if { (eval echo configure:6977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6967 eval "ac_cv_lib_$ac_lib_var=yes"
6969 echo "configure: failed program was:" >&5
6970 cat conftest.$ac_ext >&5
6972 eval "ac_cv_lib_$ac_lib_var=no"
6975 LIBS="$ac_save_LIBS"
6978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6979 echo "$ac_t""yes" 1>&6
6981 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
6983 echo "$ac_t""no" 1>&6
6986 CPPFLAGS="$ac_save_CPPFLAGS"
6987 LDFLAGS="$ac_save_LDFLAGS"
6988 # LIBS="$ac_save_LIBS"
6992 if test "$gl_lib_1" = "" ; then
6994 ac_save_CPPFLAGS="$CPPFLAGS"
6995 ac_save_LDFLAGS="$LDFLAGS"
6996 # ac_save_LIBS="$LIBS"
6998 if test \! -z "$includedir" ; then
6999 CPPFLAGS="$CPPFLAGS -I$includedir"
7001 # note: $X_CFLAGS includes $x_includes
7002 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7004 if test \! -z "$libdir" ; then
7005 LDFLAGS="$LDFLAGS -L$libdir"
7007 # note: $X_LIBS includes $x_libraries
7008 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7010 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7011 echo "configure:7023: checking for glXCreateContext in -lGL" >&5
7012 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7013 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7014 echo $ac_n "(cached) $ac_c" 1>&6
7016 ac_save_LIBS="$LIBS"
7017 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7018 cat > conftest.$ac_ext <<EOF
7019 #line 7031 "configure"
7020 #include "confdefs.h"
7021 /* Override any gcc2 internal prototype to avoid an error. */
7022 /* We use char because int might match the return type of a gcc2
7023 builtin and then its argument prototype would still apply. */
7024 char glXCreateContext();
7030 if { (eval echo configure:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7032 eval "ac_cv_lib_$ac_lib_var=yes"
7034 echo "configure: failed program was:" >&5
7035 cat conftest.$ac_ext >&5
7037 eval "ac_cv_lib_$ac_lib_var=no"
7040 LIBS="$ac_save_LIBS"
7043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7044 echo "$ac_t""yes" 1>&6
7046 GL_LIBS="-lGL -lGLU $GL_LIBS"
7048 echo "$ac_t""no" 1>&6
7051 CPPFLAGS="$ac_save_CPPFLAGS"
7052 LDFLAGS="$ac_save_LDFLAGS"
7053 # LIBS="$ac_save_LIBS"
7057 if test "$gl_lib_1" = "" ; then
7058 # we have headers, but no libs -- bail.
7063 # linking works -- we can build the GL hacks.
7064 cat >> confdefs.h <<\EOF
7068 if test "$ac_have_mesa_gl" = yes ; then
7069 cat >> confdefs.h <<\EOF
7070 #define HAVE_MESA_GL 1
7078 # Now that we know we have GL headers and libs, do some more GL testing.
7081 if test "$have_gl" = yes ; then
7082 # If it's MesaGL, we'd like to issue a warning if the version number
7083 # is less than or equal to 2.6, because that version had a security bug.
7085 if test "$ac_have_mesa_gl" = yes; then
7087 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7088 echo "configure:7100: checking MesaGL version number" >&5
7089 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7090 echo $ac_n "(cached) $ac_c" 1>&6
7092 cat > conftest.$ac_ext <<EOF
7093 #line 7105 "configure"
7094 #include "confdefs.h"
7096 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7099 ac_save_CPPFLAGS="$CPPFLAGS"
7100 if test \! -z "$includedir" ; then
7101 CPPFLAGS="$CPPFLAGS -I$includedir"
7103 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7107 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7108 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7111 rm -f conftest.$ac_ext
7113 CPPFLAGS="$ac_save_CPPFLAGS"
7115 if test "$mglv" = ""; then
7116 ac_mesagl_version=unknown
7117 ac_mesagl_version_string=unknown
7119 ac_mesagl_version_string=$mglv
7120 maj=`echo $mglv | sed -n 's/\..*//p'`
7121 min=`echo $mglv | sed -n 's/.*\.//p'`
7122 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7123 if test -z "$ac_mesagl_version"; then
7124 ac_mesagl_version=unknown
7125 ac_mesagl_version_string=unknown
7128 ac_cv_mesagl_version=$ac_mesagl_version
7129 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7133 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7134 ac_mesagl_version=$ac_cv_mesagl_version
7135 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7139 # Check for OpenGL 1.1 features.
7142 ac_save_CPPFLAGS="$CPPFLAGS"
7143 ac_save_LDFLAGS="$LDFLAGS"
7144 # ac_save_LIBS="$LIBS"
7146 if test \! -z "$includedir" ; then
7147 CPPFLAGS="$CPPFLAGS -I$includedir"
7149 # note: $X_CFLAGS includes $x_includes
7150 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7152 if test \! -z "$libdir" ; then
7153 LDFLAGS="$LDFLAGS -L$libdir"
7155 # note: $X_LIBS includes $x_libraries
7156 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7158 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7159 echo "configure:7171: checking for glBindTexture in -l$gl_lib_1" >&5
7160 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7161 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7162 echo $ac_n "(cached) $ac_c" 1>&6
7164 ac_save_LIBS="$LIBS"
7165 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7166 cat > conftest.$ac_ext <<EOF
7167 #line 7179 "configure"
7168 #include "confdefs.h"
7169 /* Override any gcc2 internal prototype to avoid an error. */
7170 /* We use char because int might match the return type of a gcc2
7171 builtin and then its argument prototype would still apply. */
7172 char glBindTexture();
7178 if { (eval echo configure:7190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7180 eval "ac_cv_lib_$ac_lib_var=yes"
7182 echo "configure: failed program was:" >&5
7183 cat conftest.$ac_ext >&5
7185 eval "ac_cv_lib_$ac_lib_var=no"
7188 LIBS="$ac_save_LIBS"
7191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7192 echo "$ac_t""yes" 1>&6
7193 cat >> confdefs.h <<\EOF
7194 #define HAVE_GLBINDTEXTURE 1
7198 echo "$ac_t""no" 1>&6
7202 CPPFLAGS="$ac_save_CPPFLAGS"
7203 LDFLAGS="$ac_save_LDFLAGS"
7204 # LIBS="$ac_save_LIBS"
7208 # Check whether the `xscreensaver' executable should link against GL.
7209 # See comments in utils/visual-gl.c for why this is sometimes necessary.
7211 echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6
7212 echo "configure:7224: checking whether drastic GL measures must be taken" >&5
7215 echo "$ac_t""yes -- hello, SGI." 1>&6
7216 cat >> confdefs.h <<\EOF
7217 #define DAEMON_USE_GL 1
7220 SAVER_GL_SRCS='$(UTILS_SRC)/visual-gl.c'
7221 SAVER_GL_OBJS='$(UTILS_BIN)/visual-gl.o'
7222 SAVER_GL_LIBS="$GL_LIBS"
7225 echo "$ac_t""no -- non-SGI." 1>&6
7234 elif test "$with_gl" != no; then
7235 echo "error: must be yes or no: --with-gl=$with_gl"
7240 ###############################################################################
7244 ###############################################################################
7247 with_gle_req=unspecified
7249 # Check whether --with-gle or --without-gle was given.
7250 if test "${with_gle+set}" = set; then
7252 with_gle="$withval"; with_gle_req="$withval"
7264 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7265 echo "configure:7277: checking for GLE headers" >&5
7268 X_CFLAGS="-I$d $X_CFLAGS"
7269 echo "$ac_t""$d" 1>&6
7271 echo "$ac_t""not found ($d: no such directory)" 1>&6
7274 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7275 echo "configure:7287: checking for GLE libs" >&5
7278 X_LIBS="-L$d $X_LIBS"
7279 echo "$ac_t""$d" 1>&6
7281 echo "$ac_t""not found ($d: no such directory)" 1>&6
7284 # replace the directory string with "yes".
7286 with_gle=$with_gle_req
7291 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7292 echo " If it is a directory, then \`DIR/include' will be added to"
7293 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7301 if test "$with_gle" = yes; then
7304 ac_save_CPPFLAGS="$CPPFLAGS"
7305 if test \! -z "$includedir" ; then
7306 CPPFLAGS="$CPPFLAGS -I$includedir"
7308 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7309 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7310 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7311 echo "configure:7323: checking for GL/gutil.h" >&5
7312 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7313 echo $ac_n "(cached) $ac_c" 1>&6
7315 cat > conftest.$ac_ext <<EOF
7316 #line 7328 "configure"
7317 #include "confdefs.h"
7318 #include <GL/gutil.h>
7320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7321 { (eval echo configure:7333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7323 if test -z "$ac_err"; then
7325 eval "ac_cv_header_$ac_safe=yes"
7328 echo "configure: failed program was:" >&5
7329 cat conftest.$ac_ext >&5
7331 eval "ac_cv_header_$ac_safe=no"
7335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7336 echo "$ac_t""yes" 1>&6
7339 echo "$ac_t""no" 1>&6
7342 CPPFLAGS="$ac_save_CPPFLAGS"
7343 if test "$have_gle" = yes ; then
7345 ac_save_CPPFLAGS="$CPPFLAGS"
7346 if test \! -z "$includedir" ; then
7347 CPPFLAGS="$CPPFLAGS -I$includedir"
7349 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7350 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
7351 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
7352 echo "configure:7364: checking for GL/tube.h" >&5
7353 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7354 echo $ac_n "(cached) $ac_c" 1>&6
7356 cat > conftest.$ac_ext <<EOF
7357 #line 7369 "configure"
7358 #include "confdefs.h"
7359 #include <GL/tube.h>
7361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7362 { (eval echo configure:7374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7364 if test -z "$ac_err"; then
7366 eval "ac_cv_header_$ac_safe=yes"
7369 echo "configure: failed program was:" >&5
7370 cat conftest.$ac_ext >&5
7372 eval "ac_cv_header_$ac_safe=no"
7376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7377 echo "$ac_t""yes" 1>&6
7380 echo "$ac_t""no" 1>&6
7383 CPPFLAGS="$ac_save_CPPFLAGS"
7386 if test "$have_gle" = yes ; then
7390 ac_save_CPPFLAGS="$CPPFLAGS"
7391 ac_save_LDFLAGS="$LDFLAGS"
7392 # ac_save_LIBS="$LIBS"
7394 if test \! -z "$includedir" ; then
7395 CPPFLAGS="$CPPFLAGS -I$includedir"
7397 # note: $X_CFLAGS includes $x_includes
7398 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7400 if test \! -z "$libdir" ; then
7401 LDFLAGS="$LDFLAGS -L$libdir"
7403 # note: $X_LIBS includes $x_libraries
7404 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7406 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
7407 echo "configure:7419: checking for gleCreateGC in -lgle" >&5
7408 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
7409 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7410 echo $ac_n "(cached) $ac_c" 1>&6
7412 ac_save_LIBS="$LIBS"
7413 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7414 cat > conftest.$ac_ext <<EOF
7415 #line 7427 "configure"
7416 #include "confdefs.h"
7417 /* Override any gcc2 internal prototype to avoid an error. */
7418 /* We use char because int might match the return type of a gcc2
7419 builtin and then its argument prototype would still apply. */
7426 if { (eval echo configure:7438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7428 eval "ac_cv_lib_$ac_lib_var=yes"
7430 echo "configure: failed program was:" >&5
7431 cat conftest.$ac_ext >&5
7433 eval "ac_cv_lib_$ac_lib_var=no"
7436 LIBS="$ac_save_LIBS"
7439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7440 echo "$ac_t""yes" 1>&6
7441 have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
7443 echo "$ac_t""no" 1>&6
7446 CPPFLAGS="$ac_save_CPPFLAGS"
7447 LDFLAGS="$ac_save_LDFLAGS"
7448 # LIBS="$ac_save_LIBS"
7451 if test "$have_gle" = yes ; then
7455 # sometimes the libmatrix stuff is included in libgle. look there first.
7457 # I don't get it. For some reason, this test passes on SGI, as if
7458 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
7459 # Yet the link is succeeding. Why???
7461 # AC_CHECK_X_LIB(gle, uview_direction_d,
7462 # [have_gle=yes; gle_halfassed=no],
7463 # [], $GL_LIBS -lX11 -lXext -lm)
7465 # if it wasn't in libgle, then look in libmatrix.
7466 if test "$have_gle" = no ; then
7468 ac_save_CPPFLAGS="$CPPFLAGS"
7469 ac_save_LDFLAGS="$LDFLAGS"
7470 # ac_save_LIBS="$LIBS"
7472 if test \! -z "$includedir" ; then
7473 CPPFLAGS="$CPPFLAGS -I$includedir"
7475 # note: $X_CFLAGS includes $x_includes
7476 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7478 if test \! -z "$libdir" ; then
7479 LDFLAGS="$LDFLAGS -L$libdir"
7481 # note: $X_LIBS includes $x_libraries
7482 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7484 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
7485 echo "configure:7497: checking for uview_direction_d in -lmatrix" >&5
7486 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
7487 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7488 echo $ac_n "(cached) $ac_c" 1>&6
7490 ac_save_LIBS="$LIBS"
7491 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
7492 cat > conftest.$ac_ext <<EOF
7493 #line 7505 "configure"
7494 #include "confdefs.h"
7495 /* Override any gcc2 internal prototype to avoid an error. */
7496 /* We use char because int might match the return type of a gcc2
7497 builtin and then its argument prototype would still apply. */
7498 char uview_direction_d();
7504 if { (eval echo configure:7516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7506 eval "ac_cv_lib_$ac_lib_var=yes"
7508 echo "configure: failed program was:" >&5
7509 cat conftest.$ac_ext >&5
7511 eval "ac_cv_lib_$ac_lib_var=no"
7514 LIBS="$ac_save_LIBS"
7517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7518 echo "$ac_t""yes" 1>&6
7519 have_gle=yes; gle_halfassed=no;
7520 GLE_LIBS="$GLE_LIBS -lmatrix"
7522 echo "$ac_t""no" 1>&6
7525 CPPFLAGS="$ac_save_CPPFLAGS"
7526 LDFLAGS="$ac_save_LDFLAGS"
7527 # LIBS="$ac_save_LIBS"
7532 if test "$have_gle" = yes ; then
7533 cat >> confdefs.h <<\EOF
7539 elif test "$with_gle" != no; then
7540 echo "error: must be yes or no: --with-gle=$with_gle"
7547 ###############################################################################
7551 ###############################################################################
7554 with_xpm_req=unspecified
7555 # Check whether --with-xpm or --without-xpm was given.
7556 if test "${with_xpm+set}" = set; then
7558 with_xpm="$withval"; with_xpm_req="$withval"
7570 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
7571 echo "configure:7583: checking for XPM headers" >&5
7574 X_CFLAGS="-I$d $X_CFLAGS"
7575 echo "$ac_t""$d" 1>&6
7577 echo "$ac_t""not found ($d: no such directory)" 1>&6
7580 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
7581 echo "configure:7593: checking for XPM libs" >&5
7584 X_LIBS="-L$d $X_LIBS"
7585 echo "$ac_t""$d" 1>&6
7587 echo "$ac_t""not found ($d: no such directory)" 1>&6
7590 # replace the directory string with "yes".
7592 with_xpm=$with_xpm_req
7597 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
7598 echo " If it is a directory, then \`DIR/include' will be added to"
7599 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7605 if test "$with_xpm" = yes; then
7607 ac_save_CPPFLAGS="$CPPFLAGS"
7608 if test \! -z "$includedir" ; then
7609 CPPFLAGS="$CPPFLAGS -I$includedir"
7611 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7612 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
7613 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
7614 echo "configure:7626: checking for X11/xpm.h" >&5
7615 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7616 echo $ac_n "(cached) $ac_c" 1>&6
7618 cat > conftest.$ac_ext <<EOF
7619 #line 7631 "configure"
7620 #include "confdefs.h"
7621 #include <X11/xpm.h>
7623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7624 { (eval echo configure:7636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7626 if test -z "$ac_err"; then
7628 eval "ac_cv_header_$ac_safe=yes"
7631 echo "configure: failed program was:" >&5
7632 cat conftest.$ac_ext >&5
7634 eval "ac_cv_header_$ac_safe=no"
7638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7639 echo "$ac_t""yes" 1>&6
7641 cat >> confdefs.h <<\EOF
7647 echo "$ac_t""no" 1>&6
7650 CPPFLAGS="$ac_save_CPPFLAGS"
7651 elif test "$with_xpm" != no; then
7652 echo "error: must be yes or no: --with-xpm=$with_xpm"
7656 # See comment near $motif_requires_xpm, above.
7657 # Need to do this here, after both Motif and XPM have been checked for.
7659 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
7660 if test "$motif_requires_xpm" = yes ; then
7661 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
7666 ###############################################################################
7668 # Check for the XSHM server extension.
7670 ###############################################################################
7673 with_xshm_req=unspecified
7674 # Check whether --with-xshm-ext or --without-xshm-ext was given.
7675 if test "${with_xshm_ext+set}" = set; then
7676 withval="$with_xshm_ext"
7677 with_xshm="$withval"; with_xshm_req="$withval"
7684 case "$with_xshm" in
7689 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
7690 echo "configure:7702: checking for XSHM headers" >&5
7691 d=$with_xshm/include
7693 X_CFLAGS="-I$d $X_CFLAGS"
7694 echo "$ac_t""$d" 1>&6
7696 echo "$ac_t""not found ($d: no such directory)" 1>&6
7699 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
7700 echo "configure:7712: checking for XSHM libs" >&5
7703 X_LIBS="-L$d $X_LIBS"
7704 echo "$ac_t""$d" 1>&6
7706 echo "$ac_t""not found ($d: no such directory)" 1>&6
7709 # replace the directory string with "yes".
7711 with_xshm=$with_xshm_req
7716 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
7717 echo " If it is a directory, then \`DIR/include' will be added to"
7718 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7724 if test "$with_xshm" = yes; then
7726 # first check for Xshm.h.
7728 ac_save_CPPFLAGS="$CPPFLAGS"
7729 if test \! -z "$includedir" ; then
7730 CPPFLAGS="$CPPFLAGS -I$includedir"
7732 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7733 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
7734 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
7735 echo "configure:7747: checking for X11/extensions/XShm.h" >&5
7736 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7737 echo $ac_n "(cached) $ac_c" 1>&6
7739 cat > conftest.$ac_ext <<EOF
7740 #line 7752 "configure"
7741 #include "confdefs.h"
7742 #include <X11/extensions/XShm.h>
7744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7745 { (eval echo configure:7757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7747 if test -z "$ac_err"; then
7749 eval "ac_cv_header_$ac_safe=yes"
7752 echo "configure: failed program was:" >&5
7753 cat conftest.$ac_ext >&5
7755 eval "ac_cv_header_$ac_safe=no"
7759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7760 echo "$ac_t""yes" 1>&6
7763 echo "$ac_t""no" 1>&6
7766 CPPFLAGS="$ac_save_CPPFLAGS"
7768 # if that succeeded, then check for sys/ipc.h.
7769 if test "$have_xshm" = yes; then
7772 ac_save_CPPFLAGS="$CPPFLAGS"
7773 if test \! -z "$includedir" ; then
7774 CPPFLAGS="$CPPFLAGS -I$includedir"
7776 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7777 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
7778 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
7779 echo "configure:7791: checking for sys/ipc.h" >&5
7780 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7781 echo $ac_n "(cached) $ac_c" 1>&6
7783 cat > conftest.$ac_ext <<EOF
7784 #line 7796 "configure"
7785 #include "confdefs.h"
7786 #include <sys/ipc.h>
7788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7789 { (eval echo configure:7801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7791 if test -z "$ac_err"; then
7793 eval "ac_cv_header_$ac_safe=yes"
7796 echo "configure: failed program was:" >&5
7797 cat conftest.$ac_ext >&5
7799 eval "ac_cv_header_$ac_safe=no"
7803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7804 echo "$ac_t""yes" 1>&6
7807 echo "$ac_t""no" 1>&6
7810 CPPFLAGS="$ac_save_CPPFLAGS"
7813 # if that succeeded, then check for sys/shm.h.
7814 if test "$have_xshm" = yes; then
7817 ac_save_CPPFLAGS="$CPPFLAGS"
7818 if test \! -z "$includedir" ; then
7819 CPPFLAGS="$CPPFLAGS -I$includedir"
7821 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7822 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
7823 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
7824 echo "configure:7836: checking for sys/shm.h" >&5
7825 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7826 echo $ac_n "(cached) $ac_c" 1>&6
7828 cat > conftest.$ac_ext <<EOF
7829 #line 7841 "configure"
7830 #include "confdefs.h"
7831 #include <sys/shm.h>
7833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7834 { (eval echo configure:7846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7836 if test -z "$ac_err"; then
7838 eval "ac_cv_header_$ac_safe=yes"
7841 echo "configure: failed program was:" >&5
7842 cat conftest.$ac_ext >&5
7844 eval "ac_cv_header_$ac_safe=no"
7848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7849 echo "$ac_t""yes" 1>&6
7852 echo "$ac_t""no" 1>&6
7855 CPPFLAGS="$ac_save_CPPFLAGS"
7858 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
7859 # to exist, but the library code to not exist. And even better, the library
7860 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
7861 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
7862 # that's not quite right, but close enough.)
7866 if `uname -v` -eq 3 ; then
7869 ac_save_CPPFLAGS="$CPPFLAGS"
7870 ac_save_LDFLAGS="$LDFLAGS"
7871 # ac_save_LIBS="$LIBS"
7873 if test \! -z "$includedir" ; then
7874 CPPFLAGS="$CPPFLAGS -I$includedir"
7876 # note: $X_CFLAGS includes $x_includes
7877 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7879 if test \! -z "$libdir" ; then
7880 LDFLAGS="$LDFLAGS -L$libdir"
7882 # note: $X_LIBS includes $x_libraries
7883 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7885 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
7886 echo "configure:7898: checking for XShmQueryExtension in -lXextSam" >&5
7887 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
7888 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7889 echo $ac_n "(cached) $ac_c" 1>&6
7891 ac_save_LIBS="$LIBS"
7892 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
7893 cat > conftest.$ac_ext <<EOF
7894 #line 7906 "configure"
7895 #include "confdefs.h"
7896 /* Override any gcc2 internal prototype to avoid an error. */
7897 /* We use char because int might match the return type of a gcc2
7898 builtin and then its argument prototype would still apply. */
7899 char XShmQueryExtension();
7902 XShmQueryExtension()
7905 if { (eval echo configure:7917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7907 eval "ac_cv_lib_$ac_lib_var=yes"
7909 echo "configure: failed program was:" >&5
7910 cat conftest.$ac_ext >&5
7912 eval "ac_cv_lib_$ac_lib_var=no"
7915 LIBS="$ac_save_LIBS"
7918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7919 echo "$ac_t""yes" 1>&6
7920 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
7922 echo "$ac_t""no" 1>&6
7926 CPPFLAGS="$ac_save_CPPFLAGS"
7927 LDFLAGS="$ac_save_LDFLAGS"
7928 # LIBS="$ac_save_LIBS"
7934 # if that succeeded, then we've really got it.
7935 if test "$have_xshm" = yes; then
7936 cat >> confdefs.h <<\EOF
7937 #define HAVE_XSHM_EXTENSION 1
7942 elif test "$with_xshm" != no; then
7943 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
7948 ###############################################################################
7950 # Check for the DOUBLE-BUFFER server extension.
7952 ###############################################################################
7955 with_xdbe_req=unspecified
7956 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
7957 if test "${with_xdbe_ext+set}" = set; then
7958 withval="$with_xdbe_ext"
7959 with_xdbe="$withval"; with_xdbe_req="$withval"
7966 case "$with_xdbe" in
7971 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
7972 echo "configure:7984: checking for DOUBLE-BUFFER headers" >&5
7973 d=$with_xdbe/include
7975 X_CFLAGS="-I$d $X_CFLAGS"
7976 echo "$ac_t""$d" 1>&6
7978 echo "$ac_t""not found ($d: no such directory)" 1>&6
7981 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
7982 echo "configure:7994: checking for DOUBLE-BUFFER libs" >&5
7985 X_LIBS="-L$d $X_LIBS"
7986 echo "$ac_t""$d" 1>&6
7988 echo "$ac_t""not found ($d: no such directory)" 1>&6
7991 # replace the directory string with "yes".
7993 with_xdbe=$with_xdbe_req
7998 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
7999 echo " If it is a directory, then \`DIR/include' will be added to"
8000 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8006 if test "$with_xdbe" = yes; then
8009 ac_save_CPPFLAGS="$CPPFLAGS"
8010 if test \! -z "$includedir" ; then
8011 CPPFLAGS="$CPPFLAGS -I$includedir"
8013 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8014 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8015 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8016 echo "configure:8028: checking for X11/extensions/Xdbe.h" >&5
8017 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8018 echo $ac_n "(cached) $ac_c" 1>&6
8020 cat > conftest.$ac_ext <<EOF
8021 #line 8033 "configure"
8022 #include "confdefs.h"
8023 #include <X11/extensions/Xdbe.h>
8025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8026 { (eval echo configure:8038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8028 if test -z "$ac_err"; then
8030 eval "ac_cv_header_$ac_safe=yes"
8033 echo "configure: failed program was:" >&5
8034 cat conftest.$ac_ext >&5
8036 eval "ac_cv_header_$ac_safe=no"
8040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8041 echo "$ac_t""yes" 1>&6
8044 echo "$ac_t""no" 1>&6
8047 CPPFLAGS="$ac_save_CPPFLAGS"
8048 if test "$have_xdbe" = yes; then
8049 cat >> confdefs.h <<\EOF
8050 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8055 elif test "$with_xdbe" != no; then
8056 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8061 ###############################################################################
8063 # Check for the SGI XReadDisplay server extension.
8065 # Note: this has to be down here, rather than up with the other server
8066 # extension tests, so that the output of `configure --help' is in the
8067 # right order. Arrgh!
8069 ###############################################################################
8072 with_readdisplay_req=unspecified
8073 # Check whether --with-readdisplay or --without-readdisplay was given.
8074 if test "${with_readdisplay+set}" = set; then
8075 withval="$with_readdisplay"
8076 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8078 with_readdisplay=yes
8083 case "$with_readdisplay" in
8088 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8089 echo "configure:8101: checking for XReadDisplay headers" >&5
8090 d=$with_readdisplay/include
8092 X_CFLAGS="-I$d $X_CFLAGS"
8093 echo "$ac_t""$d" 1>&6
8095 echo "$ac_t""not found ($d: no such directory)" 1>&6
8098 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8099 echo "configure:8111: checking for XReadDisplay libs" >&5
8100 d=$with_readdisplay/lib
8102 X_LIBS="-L$d $X_LIBS"
8103 echo "$ac_t""$d" 1>&6
8105 echo "$ac_t""not found ($d: no such directory)" 1>&6
8108 # replace the directory string with "yes".
8109 with_readdisplay_req="yes"
8110 with_readdisplay=$with_readdisplay_req
8115 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8116 echo " If it is a directory, then \`DIR/include' will be added to"
8117 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8123 if test "$with_readdisplay" = yes; then
8125 ac_save_CPPFLAGS="$CPPFLAGS"
8126 if test \! -z "$includedir" ; then
8127 CPPFLAGS="$CPPFLAGS -I$includedir"
8129 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8130 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8131 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8132 echo "configure:8144: checking for X11/extensions/readdisplay.h" >&5
8133 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8134 echo $ac_n "(cached) $ac_c" 1>&6
8136 cat > conftest.$ac_ext <<EOF
8137 #line 8149 "configure"
8138 #include "confdefs.h"
8139 #include <X11/extensions/readdisplay.h>
8141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8142 { (eval echo configure:8154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8144 if test -z "$ac_err"; then
8146 eval "ac_cv_header_$ac_safe=yes"
8149 echo "configure: failed program was:" >&5
8150 cat conftest.$ac_ext >&5
8152 eval "ac_cv_header_$ac_safe=no"
8156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8157 echo "$ac_t""yes" 1>&6
8158 cat >> confdefs.h <<\EOF
8159 #define HAVE_READ_DISPLAY_EXTENSION 1
8163 echo "$ac_t""no" 1>&6
8166 CPPFLAGS="$ac_save_CPPFLAGS"
8167 elif test "$with_readdisplay" != no; then
8168 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8173 ###############################################################################
8175 # Check for the SGI Iris Video Library.
8177 ###############################################################################
8180 with_sgivideo_req=unspecified
8181 # Check whether --with-sgivideo or --without-sgivideo was given.
8182 if test "${with_sgivideo+set}" = set; then
8183 withval="$with_sgivideo"
8184 with_sgivideo="$withval"; with_sgivideo_req="$withval"
8191 case "$with_sgivideo" in
8196 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
8197 echo "configure:8209: checking for Iris Video headers" >&5
8198 d=$with_sgivideo/include
8200 X_CFLAGS="-I$d $X_CFLAGS"
8201 echo "$ac_t""$d" 1>&6
8203 echo "$ac_t""not found ($d: no such directory)" 1>&6
8206 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
8207 echo "configure:8219: checking for Iris Video libs" >&5
8208 d=$with_sgivideo/lib
8210 X_LIBS="-L$d $X_LIBS"
8211 echo "$ac_t""$d" 1>&6
8213 echo "$ac_t""not found ($d: no such directory)" 1>&6
8216 # replace the directory string with "yes".
8217 with_sgivideo_req="yes"
8218 with_sgivideo=$with_sgivideo_req
8223 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8224 echo " If it is a directory, then \`DIR/include' will be added to"
8225 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8231 if test "$with_sgivideo" = yes; then
8233 ac_save_CPPFLAGS="$CPPFLAGS"
8234 if test \! -z "$includedir" ; then
8235 CPPFLAGS="$CPPFLAGS -I$includedir"
8237 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8238 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8239 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8240 echo "configure:8252: checking for dmedia/vl.h" >&5
8241 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8242 echo $ac_n "(cached) $ac_c" 1>&6
8244 cat > conftest.$ac_ext <<EOF
8245 #line 8257 "configure"
8246 #include "confdefs.h"
8247 #include <dmedia/vl.h>
8249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8250 { (eval echo configure:8262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8252 if test -z "$ac_err"; then
8254 eval "ac_cv_header_$ac_safe=yes"
8257 echo "configure: failed program was:" >&5
8258 cat conftest.$ac_ext >&5
8260 eval "ac_cv_header_$ac_safe=no"
8264 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8265 echo "$ac_t""yes" 1>&6
8268 echo "$ac_t""no" 1>&6
8271 CPPFLAGS="$ac_save_CPPFLAGS"
8272 if test "$have_sgivideo" = yes; then
8274 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8275 echo "configure:8287: checking for vlOpenVideo in -lvl" >&5
8276 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8277 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8278 echo $ac_n "(cached) $ac_c" 1>&6
8280 ac_save_LIBS="$LIBS"
8282 cat > conftest.$ac_ext <<EOF
8283 #line 8295 "configure"
8284 #include "confdefs.h"
8285 /* Override any gcc2 internal prototype to avoid an error. */
8286 /* We use char because int might match the return type of a gcc2
8287 builtin and then its argument prototype would still apply. */
8294 if { (eval echo configure:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8296 eval "ac_cv_lib_$ac_lib_var=yes"
8298 echo "configure: failed program was:" >&5
8299 cat conftest.$ac_ext >&5
8301 eval "ac_cv_lib_$ac_lib_var=no"
8304 LIBS="$ac_save_LIBS"
8307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8308 echo "$ac_t""yes" 1>&6
8311 echo "$ac_t""no" 1>&6
8314 if test "$have_sgivideo" = yes; then
8315 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8316 SGI_VIDEO_LIBS="-lvl"
8317 cat >> confdefs.h <<\EOF
8318 #define HAVE_SGI_VIDEO 1
8323 elif test "$with_sgivideo" != no; then
8324 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8329 ###############################################################################
8331 # Check for a program to generate random text.
8333 # Zippy is funnier than the idiocy generally spat out by `fortune',
8334 # so try to find that, by invoking Emacs and asking it where its
8335 # libexec directory is ("yow" lives in there.)
8337 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8338 # and if so, use them.
8340 # If that doesn't work, look in /usr/games, and if it's there, use
8341 # the full pathname.
8343 ###############################################################################
8346 # Check whether --with-zippy or --without-zippy was given.
8347 if test "${with_zippy+set}" = set; then
8348 withval="$with_zippy"
8349 with_zippy_req="$withval"; with_zippy="$withval"
8355 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8360 if test -n "$with_zippy_req" ; then
8361 ac_cv_zippy_program=""
8362 case "$with_zippy_req" in
8364 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8365 echo "configure:8377: checking for $with_zippy_req" >&5
8366 if test -x "$with_zippy_req" ; then
8367 echo "$ac_t""yes" 1>&6
8369 echo "$ac_t""no" 1>&6
8375 unset ac_cv_path_zip2
8376 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8377 set dummy $with_zippy_req; ac_word=$2
8378 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8379 echo "configure:8391: checking for $ac_word" >&5
8380 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8381 echo $ac_n "(cached) $ac_c" 1>&6
8385 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8388 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8391 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8393 for ac_dir in $ac_dummy; do
8394 test -z "$ac_dir" && ac_dir=.
8395 if test -f $ac_dir/$ac_word; then
8396 ac_cv_path_zip2="$ac_dir/$ac_word"
8404 zip2="$ac_cv_path_zip2"
8405 if test -n "$zip2"; then
8406 echo "$ac_t""$zip2" 1>&6
8408 echo "$ac_t""no" 1>&6
8411 if test "$zip2" = ""; then
8416 ac_cv_zippy_program="$with_zippy"
8418 elif test -n "$ac_cv_zippy_program"; then
8419 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8422 if test ! -n "$ac_cv_zippy_program"; then
8424 for ac_prog in emacs
8426 # Extract the first word of "$ac_prog", so it can be a program name with args.
8427 set dummy $ac_prog; ac_word=$2
8428 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8429 echo "configure:8441: checking for $ac_word" >&5
8430 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8431 echo $ac_n "(cached) $ac_c" 1>&6
8433 if test -n "$emacs_exe"; then
8434 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8436 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8438 for ac_dir in $ac_dummy; do
8439 test -z "$ac_dir" && ac_dir=.
8440 if test -f $ac_dir/$ac_word; then
8441 ac_cv_prog_emacs_exe="$ac_prog"
8448 emacs_exe="$ac_cv_prog_emacs_exe"
8449 if test -n "$emacs_exe"; then
8450 echo "$ac_t""$emacs_exe" 1>&6
8452 echo "$ac_t""no" 1>&6
8455 test -n "$emacs_exe" && break
8458 for ac_prog in xemacs
8460 # Extract the first word of "$ac_prog", so it can be a program name with args.
8461 set dummy $ac_prog; ac_word=$2
8462 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8463 echo "configure:8475: checking for $ac_word" >&5
8464 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
8465 echo $ac_n "(cached) $ac_c" 1>&6
8467 if test -n "$xemacs_exe"; then
8468 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
8470 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8472 for ac_dir in $ac_dummy; do
8473 test -z "$ac_dir" && ac_dir=.
8474 if test -f $ac_dir/$ac_word; then
8475 ac_cv_prog_xemacs_exe="$ac_prog"
8482 xemacs_exe="$ac_cv_prog_xemacs_exe"
8483 if test -n "$xemacs_exe"; then
8484 echo "$ac_t""$xemacs_exe" 1>&6
8486 echo "$ac_t""no" 1>&6
8489 test -n "$xemacs_exe" && break
8493 ac_cv_zippy_program=""
8494 eargs='-batch -q -nw --eval'
8496 if test -n "$emacs_exe" ; then
8497 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
8498 echo "configure:8510: checking for emacs yow" >&5
8500 # get emacs to tell us where the libexec directory is.
8502 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8503 2>/dev/null | tail -1`
8504 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8506 # try running libexec/yow and see if it exits without error.
8508 if test x"$dir" != x -a -x "$dir/yow" ; then
8509 if $dir/yow >&- 2>&- ; then
8510 ac_cv_zippy_program="$dir/yow"
8511 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8513 echo "$ac_t""no" 1>&6
8518 if test -z "$ac_cv_zippy_program" ; then
8519 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
8520 echo "configure:8532: checking for xemacs yow" >&5
8521 if test -n "$xemacs_exe" ; then
8523 # get xemacs to tell us where the libexec directory is.
8525 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8526 2>/dev/null | tail -1`
8527 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8529 # try running libexec/yow and see if it exits without error.
8531 if test x"$dir" != x -a -x "$dir/yow" ; then
8532 if $dir/yow >&- 2>&- ; then
8533 ac_cv_zippy_program="$dir/yow"
8534 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8537 # in some xemacs installations, the pathname of the yow.lines file
8538 # isn't hardcoded into the yow executable, and must be passed on
8539 # the command line. See if it's in libexec/../etc/.
8543 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
8546 yowlines="$dir_up/etc/yow.lines"
8547 if $dir/yow -f $yowlines >&- 2>&- ; then
8548 ac_cv_zippy_program="$dir/yow -f $yowlines"
8549 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8552 # In newer XEmacs releases, yow.lines is in a different place,
8553 # and the easiest way to get it is by calling the new function
8554 # `locate-data-file'.
8556 yowlines=`$xemacs_exe $eargs \
8557 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
8558 2>/dev/null | tail -1`
8559 if $dir/yow -f $yowlines >&- 2>&- ; then
8560 ac_cv_zippy_program="$dir/yow -f $yowlines"
8561 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8563 echo "$ac_t""no" 1>&6
8571 # if that didn't work, try for some other programs...
8572 if test -z "$ac_cv_zippy_program" ; then
8574 for ac_prog in fortune zippy yow
8576 # Extract the first word of "$ac_prog", so it can be a program name with args.
8577 set dummy $ac_prog; ac_word=$2
8578 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8579 echo "configure:8591: checking for $ac_word" >&5
8580 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
8581 echo $ac_n "(cached) $ac_c" 1>&6
8583 if test -n "$fortune"; then
8584 ac_cv_prog_fortune="$fortune" # Let the user override the test.
8586 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8588 for ac_dir in $ac_dummy; do
8589 test -z "$ac_dir" && ac_dir=.
8590 if test -f $ac_dir/$ac_word; then
8591 ac_cv_prog_fortune="$ac_prog"
8598 fortune="$ac_cv_prog_fortune"
8599 if test -n "$fortune"; then
8600 echo "$ac_t""$fortune" 1>&6
8602 echo "$ac_t""no" 1>&6
8605 test -n "$fortune" && break
8608 # if that didn't work, try for those programs in /usr/games...
8609 if test -z "$fortune" ; then
8610 for ac_prog in fortune zippy yow
8612 # Extract the first word of "$ac_prog", so it can be a program name with args.
8613 set dummy $ac_prog; ac_word=$2
8614 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8615 echo "configure:8627: checking for $ac_word" >&5
8616 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
8617 echo $ac_n "(cached) $ac_c" 1>&6
8621 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
8624 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
8627 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8628 ac_dummy="/usr/games:/usr/local/games:$PATH"
8629 for ac_dir in $ac_dummy; do
8630 test -z "$ac_dir" && ac_dir=.
8631 if test -f $ac_dir/$ac_word; then
8632 ac_cv_path_fortune="$ac_dir/$ac_word"
8640 fortune="$ac_cv_path_fortune"
8641 if test -n "$fortune"; then
8642 echo "$ac_t""$fortune" 1>&6
8644 echo "$ac_t""no" 1>&6
8647 test -n "$fortune" && break
8649 test -n "$fortune" || fortune="fortune"
8655 if test -z "$ac_cv_zippy_program" ; then
8656 ac_cv_zippy_program=fortune
8659 cat >> confdefs.h <<EOF
8660 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
8665 ###############################################################################
8667 # Done testing. Now, set up the various -I and -L variables,
8668 # and decide which GUI program to build by default.
8670 ###############################################################################
8677 if test \! -z "$includedir" ; then
8678 INCLUDES="$INCLUDES -I$includedir"
8681 if test \! -z "$libdir" ; then
8682 LDFLAGS="$LDFLAGS -L$libdir"
8687 if test "$have_motif" = yes; then
8688 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
8689 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8691 if test "$have_gtk" = yes; then
8692 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
8693 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8697 if test "$have_kerberos" = yes; then
8698 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
8699 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
8701 if test "$have_pam" = yes; then
8702 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
8703 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
8704 INSTALL_PAM="install-pam"
8706 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
8707 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
8710 if test "$enable_locking" = yes; then
8711 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
8712 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
8714 LOCK_SRCS='$(NOLOCK_SRCS_1)'
8715 LOCK_OBJS='$(NOLOCK_OBJS_1)'
8718 if test "$need_setuid" = yes; then
8720 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
8723 INSTALL_SETUID='$(INSTALL_PROGRAM)'
8727 if test "$have_gl" = yes; then
8728 GL_EXES='$(GL_EXES)'
8732 GL_KLUDGE="-${tab} "
8735 if test "$have_gle" = yes; then
8736 GLE_EXES='$(GLE_EXES)'
8737 GLE_MEN='$(GLE_MEN)'
8738 GLE_KLUDGE="${tab} "
8740 GLE_KLUDGE="-${tab} "
8744 ###############################################################################
8746 # Perform substitutions and write Makefiles.
8748 ###############################################################################
8786 APPDEFAULTS=$ac_x_app_defaults
8795 cat > confcache <<\EOF
8796 # This file is a shell script that caches the results of configure
8797 # tests run on this system so they can be shared between configure
8798 # scripts and configure runs. It is not useful on other systems.
8799 # If it contains results you don't want to keep, you may remove or edit it.
8801 # By default, configure uses ./config.cache as the cache file,
8802 # creating it if it does not exist already. You can give configure
8803 # the --cache-file=FILE option to use a different cache file; that is
8804 # what configure does when it calls configure scripts in
8805 # subdirectories, so they share the cache.
8806 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8807 # config.status only pays attention to the cache file if you give it the
8808 # --recheck option to rerun configure.
8811 # The following way of writing the cache mishandles newlines in values,
8812 # but we know of no workaround that is simple, portable, and efficient.
8813 # So, don't put newlines in cache variables' values.
8814 # Ultrix sh set writes to stderr and can't be redirected directly,
8815 # and sets the high bit in the cache file unless we assign to the vars.
8817 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8819 # `set' does not quote correctly, so add quotes (double-quote substitution
8820 # turns \\\\ into \\, and sed turns \\ into \).
8822 -e "s/'/'\\\\''/g" \
8823 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8826 # `set' quotes correctly as required by POSIX, so do not add quotes.
8827 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8830 if cmp -s $cache_file confcache; then
8833 if test -w $cache_file; then
8834 echo "updating cache $cache_file"
8835 cat confcache > $cache_file
8837 echo "not updating unwritable cache $cache_file"
8842 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8844 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8845 # Let make expand exec_prefix.
8846 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8848 # Any assignment to VPATH causes Sun make to only execute
8849 # the first set of double-colon rules, so remove it if not needed.
8850 # If there is a colon in the path, we need to keep it.
8851 if test "x$srcdir" = x.; then
8852 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8855 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8857 DEFS=-DHAVE_CONFIG_H
8859 # Without the "./", some shells look in PATH for config.status.
8860 : ${CONFIG_STATUS=./config.status}
8862 echo creating $CONFIG_STATUS
8863 rm -f $CONFIG_STATUS
8864 cat > $CONFIG_STATUS <<EOF
8866 # Generated automatically by configure.
8867 # Run this file to recreate the current configuration.
8868 # This directory was configured as follows,
8869 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8871 # $0 $ac_configure_args
8873 # Compiler output produced by configure, useful for debugging
8874 # configure, is in ./config.log if it exists.
8876 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8879 case "\$ac_option" in
8880 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8881 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8882 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8883 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8884 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8886 -help | --help | --hel | --he | --h)
8887 echo "\$ac_cs_usage"; exit 0 ;;
8888 *) echo "\$ac_cs_usage"; exit 1 ;;
8892 ac_given_srcdir=$srcdir
8893 ac_given_INSTALL="$INSTALL"
8895 trap 'rm -fr `echo "Makefile
8900 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8902 cat >> $CONFIG_STATUS <<EOF
8904 # Protect against being on the right side of a sed subst in config.status.
8905 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8906 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8910 s%@CFLAGS@%$CFLAGS%g
8911 s%@CPPFLAGS@%$CPPFLAGS%g
8912 s%@CXXFLAGS@%$CXXFLAGS%g
8913 s%@FFLAGS@%$FFLAGS%g
8915 s%@LDFLAGS@%$LDFLAGS%g
8917 s%@exec_prefix@%$exec_prefix%g
8918 s%@prefix@%$prefix%g
8919 s%@program_transform_name@%$program_transform_name%g
8920 s%@bindir@%$bindir%g
8921 s%@sbindir@%$sbindir%g
8922 s%@libexecdir@%$libexecdir%g
8923 s%@datadir@%$datadir%g
8924 s%@sysconfdir@%$sysconfdir%g
8925 s%@sharedstatedir@%$sharedstatedir%g
8926 s%@localstatedir@%$localstatedir%g
8927 s%@libdir@%$libdir%g
8928 s%@includedir@%$includedir%g
8929 s%@oldincludedir@%$oldincludedir%g
8930 s%@infodir@%$infodir%g
8931 s%@mandir@%$mandir%g
8933 s%@host_alias@%$host_alias%g
8934 s%@host_cpu@%$host_cpu%g
8935 s%@host_vendor@%$host_vendor%g
8936 s%@host_os@%$host_os%g
8939 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8940 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8941 s%@INSTALL_DATA@%$INSTALL_DATA%g
8942 s%@SET_MAKE@%$SET_MAKE%g
8944 s%@X_CFLAGS@%$X_CFLAGS%g
8945 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
8946 s%@X_LIBS@%$X_LIBS%g
8947 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
8948 s%@glib_config@%$glib_config%g
8949 s%@gtk_config@%$gtk_config%g
8951 s%@emacs_exe@%$emacs_exe%g
8952 s%@xemacs_exe@%$xemacs_exe%g
8953 s%@fortune@%$fortune%g
8954 s%@INCLUDES@%$INCLUDES%g
8955 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
8956 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
8957 s%@SAVER_LIBS@%$SAVER_LIBS%g
8958 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
8959 s%@GTK_LIBS@%$GTK_LIBS%g
8960 s%@HACK_LIBS@%$HACK_LIBS%g
8961 s%@XPM_LIBS@%$XPM_LIBS%g
8962 s%@GL_LIBS@%$GL_LIBS%g
8963 s%@GLE_LIBS@%$GLE_LIBS%g
8964 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
8965 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
8966 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
8967 s%@NEED_SETUID@%$NEED_SETUID%g
8968 s%@INSTALL_PAM@%$INSTALL_PAM%g
8969 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
8970 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
8971 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
8972 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
8973 s%@XMU_SRCS@%$XMU_SRCS%g
8974 s%@XMU_OBJS@%$XMU_OBJS%g
8975 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
8976 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
8977 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
8978 s%@LOCK_SRCS@%$LOCK_SRCS%g
8979 s%@LOCK_OBJS@%$LOCK_OBJS%g
8980 s%@GL_EXES@%$GL_EXES%g
8981 s%@GL_MEN@%$GL_MEN%g
8982 s%@GL_KLUDGE@%$GL_KLUDGE%g
8983 s%@GLE_EXES@%$GLE_EXES%g
8984 s%@GLE_MEN@%$GLE_MEN%g
8985 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
8986 s%@HACKDIR@%$HACKDIR%g
8987 s%@APPDEFAULTS@%$APPDEFAULTS%g
8988 s%@DEPEND@%$DEPEND%g
8989 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
8990 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
8995 cat >> $CONFIG_STATUS <<\EOF
8997 # Split the substitutions into bite-sized pieces for seds with
8998 # small command number limits, like on Digital OSF/1 and HP-UX.
8999 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9000 ac_file=1 # Number of current file.
9001 ac_beg=1 # First line for current file.
9002 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9005 while $ac_more_lines; do
9006 if test $ac_beg -gt 1; then
9007 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9009 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9011 if test ! -s conftest.s$ac_file; then
9013 rm -f conftest.s$ac_file
9015 if test -z "$ac_sed_cmds"; then
9016 ac_sed_cmds="sed -f conftest.s$ac_file"
9018 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9020 ac_file=`expr $ac_file + 1`
9022 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9025 if test -z "$ac_sed_cmds"; then
9030 cat >> $CONFIG_STATUS <<EOF
9032 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9037 driver/XScreenSaver.ad"}
9039 cat >> $CONFIG_STATUS <<\EOF
9040 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9041 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9043 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9044 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9045 *) ac_file_in="${ac_file}.in" ;;
9048 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9050 # Remove last slash and all that follows it. Not all systems have dirname.
9051 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9052 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9053 # The file is in a subdirectory.
9054 test ! -d "$ac_dir" && mkdir "$ac_dir"
9055 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9056 # A "../" for each directory in $ac_dir_suffix.
9057 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9059 ac_dir_suffix= ac_dots=
9062 case "$ac_given_srcdir" in
9064 if test -z "$ac_dots"; then top_srcdir=.
9065 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9066 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9068 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9069 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9072 case "$ac_given_INSTALL" in
9073 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9074 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9077 echo creating "$ac_file"
9079 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9081 *Makefile*) ac_comsub="1i\\
9082 # $configure_input" ;;
9086 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9088 s%@configure_input@%$configure_input%g
9089 s%@srcdir@%$srcdir%g
9090 s%@top_srcdir@%$top_srcdir%g
9091 s%@INSTALL@%$INSTALL%g
9092 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9096 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9097 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9099 # ac_d sets the value in "#define NAME VALUE" lines.
9100 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9101 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9104 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9105 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9106 ac_uB='\([ ]\)%\1#\2define\3'
9109 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9110 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9111 ac_eB='$%\1#\2define\3'
9115 if test "${CONFIG_HEADERS+set}" != set; then
9117 cat >> $CONFIG_STATUS <<EOF
9118 CONFIG_HEADERS="config.h"
9120 cat >> $CONFIG_STATUS <<\EOF
9122 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9123 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9125 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9126 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9127 *) ac_file_in="${ac_file}.in" ;;
9130 echo creating $ac_file
9132 rm -f conftest.frag conftest.in conftest.out
9133 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9134 cat $ac_file_inputs > conftest.in
9138 # Transform confdefs.h into a sed script conftest.vals that substitutes
9139 # the proper values into config.h.in to produce config.h. And first:
9140 # Protect against being on the right side of a sed subst in config.status.
9141 # Protect against being in an unquoted here document in config.status.
9143 cat > conftest.hdr <<\EOF
9146 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9150 sed -n -f conftest.hdr confdefs.h > conftest.vals
9153 # This sed command replaces #undef with comments. This is necessary, for
9154 # example, in the case of _POSIX_SOURCE, which is predefined and required
9155 # on some systems where configure will not decide to define it.
9156 cat >> conftest.vals <<\EOF
9157 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9160 # Break up conftest.vals because some shells have a limit on
9161 # the size of here documents, and old seds have small limits too.
9166 ac_lines=`grep -c . conftest.vals`
9167 # grep -c gives empty output for an empty file on some AIX systems.
9168 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9169 # Write a limited-size here document to conftest.frag.
9170 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9171 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9173 sed -f conftest.frag conftest.in > conftest.out
9175 mv conftest.out conftest.in
9177 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9179 mv conftest.tail conftest.vals
9183 cat >> $CONFIG_STATUS <<\EOF
9184 rm -f conftest.frag conftest.h
9185 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9186 cat conftest.in >> conftest.h
9188 if cmp -s $ac_file conftest.h 2>/dev/null; then
9189 echo "$ac_file is unchanged"
9192 # Remove last slash and all that follows it. Not all systems have dirname.
9193 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9194 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9195 # The file is in a subdirectory.
9196 test ! -d "$ac_dir" && mkdir "$ac_dir"
9199 mv conftest.h $ac_file
9204 cat >> $CONFIG_STATUS <<EOF
9207 cat >> $CONFIG_STATUS <<\EOF
9211 chmod +x $CONFIG_STATUS
9212 rm -fr confdefs* $ac_clean_files
9213 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9216 ###############################################################################
9218 # Print some warnings at the end.
9220 ###############################################################################
9222 warn_prefix_1=" Warning:"
9223 warn_prefix_2=" Note:"
9224 warn_prefix="$warn_prefix_1"
9227 warnsep=' #################################################################'
9230 if test "$warning" = no ; then
9231 echo '' ; echo "$warnsep" ; echo ''
9238 if test "$warning" = long ; then echo '' ; fi
9240 echo "$warn_prefix $@"
9247 if test "$was" != no ; then echo '' ; fi
9248 echo "$warn_prefix $@"
9257 warn_prefix="$warn_prefix_2"
9259 warn_prefix="$warn_prefix_1"
9263 warn_prefix="$warn_prefix_2"
9265 warn_prefix="$warn_prefix_1"
9269 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9270 warn 'The SGI saver extension was requested, but was not found.'
9273 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9274 warn 'The MIT saver extension was requested, but was not found.'
9277 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9278 warn 'The XIdle extension was requested, but was not found.'
9281 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9282 warn 'The XSHM extension was requested, but was not found.'
9285 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9286 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9289 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9290 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9293 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9294 warn 'The DPMS extension was requested, but was not found.'
9297 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9298 warn 'The XF86VMODE extension was requested, but was not found.'
9301 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9302 warn "Checking of /proc/interrupts was requested, but it's bogus."
9306 if test "$have_motif" = no -a "$have_gtk" = no; then
9307 warnL "Neither Motif nor Gtk seem to be available;"
9308 warn2 "the \`xscreensaver-demo' program requires one of these."
9310 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9311 warnL "Use of Motif was requested, but it wasn't found;"
9312 warn2 "Gtk will be used instead."
9314 elif test "$jurassic_gtk" = yes ; then
9318 v="$ac_gtk_version_string"
9319 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9320 warnL "Use of Gtk was requested, but its version number is unknown;"
9321 elif test "$with_gtk_req" = yes ; then
9322 warnL "Use of Gtk was requested, but it is version $v;"
9324 warnL "Gtk was found on this system, but it is version $v;"
9327 warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
9329 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9330 warnL "Use of Gtk was requested, but it wasn't found;"
9331 warn2 "Motif will be used instead."
9336 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9338 preferred_lesstif=0.86
9340 if test "$lesstif_version" = unknown; then
9341 warnL "Unable to determine the LessTif version number!"
9342 warn2 "Make sure you are using version $preferred_lesstif or newer."
9343 warn2 "See <http://www.lesstif.org/>."
9345 elif test \! $lesstif_version -gt 82; then
9346 warnL "LessTif version $lesstif_version_string is being used."
9347 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9348 warn2 "use with XScreenSaver; it is strongly recommended"
9349 warn2 "that you upgrade to at least version $preferred_lesstif!"
9350 warn2 "See <http://www.lesstif.org/>."
9356 if test "$have_xpm" = no ; then
9357 if test "$with_xpm_req" = yes ; then
9358 warnL 'Use of XPM was requested, but it was not found.'
9359 elif test "$with_xpm_req" = no ; then
9360 noteL 'The XPM library is not being used.'
9362 noteL 'The XPM library was not found.'
9366 warn2 'Some of the demos will not be as colorful as they'
9367 warn2 'could be. You might want to consider installing XPM'
9368 warn2 'and re-running configure. (Remember to delete the'
9369 warn2 'config.cache file first.) You can find XPM at most'
9370 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9374 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9375 preferred_mesagl=3.0
9377 if test "$ac_mesagl_version" = unknown; then
9378 warnL "Unable to determine the MesaGL version number!"
9379 warn2 "Make sure you are using version $preferred_mesagl or newer."
9381 elif test \! "$ac_mesagl_version" -gt 2006; then
9382 warnL "MesaGL version $ac_mesagl_version_string is being used."
9383 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9384 warn2 "It is strongly recommended that you upgrade to at"
9385 warn2 "least version $preferred_mesagl."
9389 if test "$have_gl" = no ; then
9390 if test "$with_gl_req" = yes ; then
9391 warnL 'Use of GL was requested, but it was not found.'
9392 elif test "$with_gl_req" = no ; then
9393 noteL 'The OpenGL 3D library is not being used.'
9395 noteL 'The OpenGL 3D library was not found.'
9398 if test "$gl_halfassed" = yes ; then
9400 warn2 'More specifically, we found the headers, but not the'
9401 warn2 'libraries; so either GL is half-installed on this'
9402 warn2 "system, or something else went wrong. The \`config.log'"
9403 warn2 'file might contain some clues.'
9407 warn2 'Those demos which use 3D will not be built or installed.'
9408 warn2 'You might want to consider installing OpenGL and'
9409 warn2 're-running configure. (Remember to delete the'
9410 warn2 "config.cache file first.) If your vendor doesn't ship"
9411 warn2 'their own implementation of OpenGL, you can get a free'
9412 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
9413 warn2 'info, see <http://www.opengl.org/>.'
9418 if test "$have_gl" = yes -a "$have_gle" = no ; then
9419 if test "$with_gle_req" = yes ; then
9420 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
9421 warn2 'it was not found (though the OpenGL library was found, and'
9422 warn2 'is being used.)'
9423 elif test "$with_gle_req" = no ; then
9424 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
9425 warn2 'library is not.'
9427 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
9431 if test "$gle_halfassed" = yes ; then
9433 warn2 'More specifically, we found the headers, but not the'
9434 warn2 'libraries; so either GLE is half-installed on this'
9435 warn2 "system, or something else went wrong. The \`config.log'"
9436 warn2 'file might contain some clues.'
9440 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
9441 warn2 'will not be built or installed. You might want to consider'
9442 warn2 'installing GLE and re-running configure. (Remember to delete'
9443 warn2 'the config.cache file first.) You can find the GLE library'
9444 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
9445 warn2 'see <http://www.opengl.org/>.'
9450 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
9451 warn 'Use of XReadDisplay was requested, but it was not found.'
9454 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
9455 warn 'Use of the Iris Video Library was requested, but it was not found.'
9458 if test -n "$with_zippy_req"; then
9459 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
9460 warnL "$with_zippy_req was requested as the Zippy program,"
9461 warn2 "but was not found. The default will be used instead."
9465 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
9466 warn 'Use of Kerberos was requested, but it was not found.'
9469 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
9470 warn 'Use of PAM was requested, but it was not found.'
9473 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
9474 warn 'Use of shadow passwords was requested, but they were not found.'
9478 # You are in a twisty maze of namespaces and syntaxes, all alike.
9479 # Fuck the skull of Unix.
9481 eval bindir=${bindir}
9482 eval bindir=${bindir}
9483 eval bindir=${bindir}
9484 eval bindir=${bindir}
9485 eval bindir=${bindir}
9486 eval bindir=${bindir}
9487 eval HACKDIR=${HACKDIR}
9488 eval HACKDIR=${HACKDIR}
9489 eval HACKDIR=${HACKDIR}
9490 eval HACKDIR=${HACKDIR}
9491 eval HACKDIR=${HACKDIR}
9492 eval HACKDIR=${HACKDIR}
9494 # canonicalize slashes.
9495 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
9496 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9499 # Sanity check the subdir
9500 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
9501 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
9503 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
9504 There will be an executable installed with that name, so
9505 that can't be the name of a directory as well. Please
9506 re-configure with a different directory name." 1>&2; exit 1; }
9513 # Now let's see if there's a previous RPM version already installed. Blargh!
9517 rpmv=`(rpm -qv xscreensaver) 2>&- | \
9518 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-[0-9][0-9]*$/\1/'`
9521 if test \! -z "$rpmv" ; then
9522 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
9523 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
9526 warnL "There is already an installed RPM of xscreensaver $rpmv"
9527 warn2 "on this system. You might want to remove it (with"
9528 warn2 '"rpm -ve xscreensaver") before running "make install"'
9529 warn2 "from this directory."
9531 warn2 "Alternately, you could build this version of xscreensaver"
9532 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
9533 warn2 "file is included. See the RPM documentation for more info."
9536 if test "$rpmbdir" = "$rpmhdir" ; then
9537 warn2 "The RPM version was installed in $rpmbdir."
9539 warn2 "The RPM version was installed in $rpmbdir,"
9540 warn2 "with demos in $rpmhdir."
9547 # Warn about egregious GNOME bogosity.
9549 if (rpm -qv control-center) >&- 2>&- ; then
9551 warnL "The Gnome Control Center seems to be installed."
9553 warn2 "Note that simply installing this version of xscreensaver"
9554 warn2 "will not cause GNOME to know about the newly-added display"
9555 warn2 "modes -- GNOME is just lame that way. Instead of using the"
9556 warn2 "Control Center, try using the \`xscreensaver-demo' command."
9560 if test "${bindir}" = "${HACKDIR}" ; then
9564 if test "$do_dir_warning" = yes; then
9568 echo ' When you run "make install", the "xscreensaver",'
9569 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
9570 echo " will be installed in ${bindir}."
9572 echo " The various graphics demos (100+ different executables) will"
9573 echo " also be installed in ${HACKDIR}."
9575 echo " If you would prefer the demos to be installed elsewhere"
9576 echo " (for example, in a dedicated directory) you should re-run"
9577 echo " configure with the --enable-subdir=DIR option. For more"
9578 echo " information, run $0 --help."
9582 if test "$warning" != no; then
9583 echo '' ; echo "$warnsep" ; echo ''