3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
18 --enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir',
19 instead of putting them in bindir itself. You can
20 specify the name of the subdirectory. For example,
21 \`--exec-prefix=/usr/local --enable-subdir=demos'
22 would put xscreensaver in /usr/local/bin/, and would
23 put the demos in /usr/local/bin/demos/. (If DIR
24 begins with /, then bindir will not be prepended.)
26 --disable-subdir Just put the demos in \`bindir' (this is the default.)
29 Except where noted, all of the --with options below can also take a
30 directory argument: for example, \`--with-motif=/opt/Motif'. That would
31 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
32 to be added to the -L list, assuming those directories exist.
34 By default, support for each of these options will be built in, if the
35 relevant library routines exist. At run time, they will then be used
36 only if the X server being used supports them. Each --with option has
37 a corresponding --without option, to override building support for them
40 Screen blanking and idle-detection options:
42 --with-sgi-ext Include support for the SGI SCREEN_SAVER extension."
44 --with-mit-ext Include support for the MIT-SCREEN-SAVER extension."
46 --with-xidle-ext Include support for the XIDLE extension."
48 --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL extension."
50 --with-dpms-ext Include support for the DPMS extension."
52 --with-xf86vmode-ext Include support for XFree86 virtual screens."
54 --with-proc-interrupts Include support for consulting the /proc/interrupts
55 file to notice keyboard activity."
58 Screen locking options:
60 --enable-locking Compile in support for locking the display.
61 --disable-locking Do not allow locking at all.
64 --with-pam Include support for PAM (Pluggable Auth Modules.)"
66 --with-kerberos Include support for Kerberos authentication."
68 --with-shadow Include support for shadow password authentication."
71 User interface options:
73 --with-motif Use the Motif toolkit for the user interface."
75 --with-gtk Use the Gtk toolkit for the user interface."
77 --with-athena Use the Athena toolkit for the user interface."
82 --with-gl Build those demos which depend on OpenGL."
84 --with-xpm Include support for XPM files in some demos."
86 --with-xshm-ext Include support for the XSHM extension."
88 --with-xdbe-ext Include support for the DOUBLE-BUFFER extension."
90 --with-readdisplay Include support for the XReadDisplay extension."
92 --with-sgivideo Include support for SGI's Iris Video Library."
95 --with-zippy=PROGRAM Some demos are able to run an external program and
96 display its text; this names the program to use by
97 default (though it can be overridden with X
98 resources.) If you don't specify this, the default
99 is to use \"yow\" from the Emacs distribution (if you
100 have it) or else to use \"fortune\".
103 # Initialize some variables set by options.
104 # The variables have the same names as the options, with
105 # dashes changed to underlines.
107 cache_file=./config.cache
116 program_transform_name=s,x,x,
124 bindir='${exec_prefix}/bin'
125 sbindir='${exec_prefix}/sbin'
126 libexecdir='${exec_prefix}/libexec'
127 datadir='${prefix}/share'
128 sysconfdir='${prefix}/etc'
129 sharedstatedir='${prefix}/com'
130 localstatedir='${prefix}/var'
131 libdir='${exec_prefix}/lib'
132 includedir='${prefix}/include'
133 oldincludedir='/usr/include'
134 infodir='${prefix}/info'
135 mandir='${prefix}/man'
137 # Initialize some other variables.
140 SHELL=${CONFIG_SHELL-/bin/sh}
141 # Maximum number of lines to put in a shell here document.
148 # If the previous option needs an argument, assign it.
149 if test -n "$ac_prev"; then
150 eval "$ac_prev=\$ac_option"
156 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
160 # Accept the important Cygnus configure options, so we can diagnose typos.
164 -bindir | --bindir | --bindi | --bind | --bin | --bi)
166 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
167 bindir="$ac_optarg" ;;
169 -build | --build | --buil | --bui | --bu)
171 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
172 build="$ac_optarg" ;;
174 -cache-file | --cache-file | --cache-fil | --cache-fi \
175 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
176 ac_prev=cache_file ;;
177 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
178 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
179 cache_file="$ac_optarg" ;;
181 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
183 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
185 datadir="$ac_optarg" ;;
187 -disable-* | --disable-*)
188 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
189 # Reject names that are not valid shell variable names.
190 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
191 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
193 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
194 eval "enable_${ac_feature}=no" ;;
196 -enable-* | --enable-*)
197 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
198 # Reject names that are not valid shell variable names.
199 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
200 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
202 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
207 eval "enable_${ac_feature}='$ac_optarg'" ;;
209 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
210 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
211 | --exec | --exe | --ex)
212 ac_prev=exec_prefix ;;
213 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
214 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
215 | --exec=* | --exe=* | --ex=*)
216 exec_prefix="$ac_optarg" ;;
218 -gas | --gas | --ga | --g)
219 # Obsolete; use --with-gas.
222 -help | --help | --hel | --he)
223 # Omit some internal or obsolete options to make the list less imposing.
224 # This message is too long to be a string in the A/UX 3.1 sh.
226 Usage: configure [options] [host]
227 Options: [defaults in brackets after descriptions]
231 --cache-file=FILE cache test results in FILE
232 --help print this message
233 --no-create do not create output files
234 --quiet, --silent do not print \`checking...' messages
235 --version print the version of autoconf that created configure
237 Directory and file names:
239 --prefix=PREFIX install architecture-independent files in PREFIX
241 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
243 --bindir=DIR user executables in DIR [EPREFIX/bin]
244 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
245 --includedir=DIR C header files in DIR [PREFIX/include]
246 --x-includes=DIR X include files are in DIR
247 --x-libraries=DIR X library files are in DIR
248 --mandir=DIR man documentation in DIR [PREFIX/man]
249 --srcdir=DIR find the sources in DIR [configure dir or ..]
250 --program-prefix=PREFIX prepend PREFIX to installed program names
251 --program-suffix=SUFFIX append SUFFIX to installed program names
252 --program-transform-name=PROGRAM
253 run sed PROGRAM on installed program names
259 --build=BUILD configure for building on BUILD [BUILD=HOST]
260 --host=HOST configure for HOST [guessed]
261 --target=TARGET configure for TARGET [TARGET=HOST]
263 if test -n "$ac_help"; then
268 -host | --host | --hos | --ho)
270 -host=* | --host=* | --hos=* | --ho=*)
273 -includedir | --includedir | --includedi | --included | --include \
274 | --includ | --inclu | --incl | --inc)
275 ac_prev=includedir ;;
276 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
277 | --includ=* | --inclu=* | --incl=* | --inc=*)
278 includedir="$ac_optarg" ;;
280 -infodir | --infodir | --infodi | --infod | --info | --inf)
282 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
283 infodir="$ac_optarg" ;;
285 -libdir | --libdir | --libdi | --libd)
287 -libdir=* | --libdir=* | --libdi=* | --libd=*)
288 libdir="$ac_optarg" ;;
290 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
291 | --libexe | --libex | --libe)
292 ac_prev=libexecdir ;;
293 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
294 | --libexe=* | --libex=* | --libe=*)
295 libexecdir="$ac_optarg" ;;
297 -localstatedir | --localstatedir | --localstatedi | --localstated \
298 | --localstate | --localstat | --localsta | --localst \
299 | --locals | --local | --loca | --loc | --lo)
300 ac_prev=localstatedir ;;
301 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
302 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
303 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
304 localstatedir="$ac_optarg" ;;
306 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
308 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
309 mandir="$ac_optarg" ;;
312 # Obsolete; use --without-fp.
315 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
319 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
320 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
323 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
324 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
325 | --oldin | --oldi | --old | --ol | --o)
326 ac_prev=oldincludedir ;;
327 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
328 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
329 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
330 oldincludedir="$ac_optarg" ;;
332 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
334 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
335 prefix="$ac_optarg" ;;
337 -program-prefix | --program-prefix | --program-prefi | --program-pref \
338 | --program-pre | --program-pr | --program-p)
339 ac_prev=program_prefix ;;
340 -program-prefix=* | --program-prefix=* | --program-prefi=* \
341 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
342 program_prefix="$ac_optarg" ;;
344 -program-suffix | --program-suffix | --program-suffi | --program-suff \
345 | --program-suf | --program-su | --program-s)
346 ac_prev=program_suffix ;;
347 -program-suffix=* | --program-suffix=* | --program-suffi=* \
348 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
349 program_suffix="$ac_optarg" ;;
351 -program-transform-name | --program-transform-name \
352 | --program-transform-nam | --program-transform-na \
353 | --program-transform-n | --program-transform- \
354 | --program-transform | --program-transfor \
355 | --program-transfo | --program-transf \
356 | --program-trans | --program-tran \
357 | --progr-tra | --program-tr | --program-t)
358 ac_prev=program_transform_name ;;
359 -program-transform-name=* | --program-transform-name=* \
360 | --program-transform-nam=* | --program-transform-na=* \
361 | --program-transform-n=* | --program-transform-=* \
362 | --program-transform=* | --program-transfor=* \
363 | --program-transfo=* | --program-transf=* \
364 | --program-trans=* | --program-tran=* \
365 | --progr-tra=* | --program-tr=* | --program-t=*)
366 program_transform_name="$ac_optarg" ;;
368 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
369 | -silent | --silent | --silen | --sile | --sil)
372 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
374 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
376 sbindir="$ac_optarg" ;;
378 -sharedstatedir | --sharedstatedir | --sharedstatedi \
379 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
380 | --sharedst | --shareds | --shared | --share | --shar \
382 ac_prev=sharedstatedir ;;
383 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
384 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
385 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
387 sharedstatedir="$ac_optarg" ;;
389 -site | --site | --sit)
391 -site=* | --site=* | --sit=*)
394 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
396 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
397 srcdir="$ac_optarg" ;;
399 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
400 | --syscon | --sysco | --sysc | --sys | --sy)
401 ac_prev=sysconfdir ;;
402 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
403 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
404 sysconfdir="$ac_optarg" ;;
406 -target | --target | --targe | --targ | --tar | --ta | --t)
408 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
409 target="$ac_optarg" ;;
411 -v | -verbose | --verbose | --verbos | --verbo | --verb)
414 -version | --version | --versio | --versi | --vers)
415 echo "configure generated by autoconf version 2.13"
419 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
420 # Reject names that are not valid shell variable names.
421 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
422 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
424 ac_package=`echo $ac_package| sed 's/-/_/g'`
429 eval "with_${ac_package}='$ac_optarg'" ;;
431 -without-* | --without-*)
432 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
433 # Reject names that are not valid shell variable names.
434 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
435 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
437 ac_package=`echo $ac_package| sed 's/-/_/g'`
438 eval "with_${ac_package}=no" ;;
441 # Obsolete; use --with-x.
444 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
445 | --x-incl | --x-inc | --x-in | --x-i)
446 ac_prev=x_includes ;;
447 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
448 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
449 x_includes="$ac_optarg" ;;
451 -x-libraries | --x-libraries | --x-librarie | --x-librari \
452 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
453 ac_prev=x_libraries ;;
454 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
455 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
456 x_libraries="$ac_optarg" ;;
458 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
462 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
463 echo "configure: warning: $ac_option: invalid host type" 1>&2
465 if test "x$nonopt" != xNONE; then
466 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
474 if test -n "$ac_prev"; then
475 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
478 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
480 # File descriptor usage:
483 # 2 errors and warnings
484 # 3 some systems may open it to /dev/tty
485 # 4 used on the Kubota Titan
486 # 6 checking for... messages and results
487 # 5 compiler messages saved in config.log
488 if test "$silent" = yes; then
496 This file contains any messages produced by compilers while
497 running configure, to aid debugging if configure makes a mistake.
500 # Strip out --no-create and --no-recursion so they do not pile up.
501 # Also quote any args containing shell metacharacters.
506 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
507 | --no-cr | --no-c) ;;
508 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
509 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
510 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
511 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
512 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
517 # Only set these to C if already set. These must not be set unconditionally
518 # because not all systems understand e.g. LANG=C (notably SCO).
519 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
520 # Non-C LC_CTYPE values break the ctype check.
521 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
522 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
523 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
524 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
526 # confdefs.h avoids OS command line length limits that DEFS can exceed.
527 rm -rf conftest* confdefs.h
528 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
531 # A filename unique to this package, relative to the directory that
532 # configure is in, which we can look for to find out if srcdir is correct.
533 ac_unique_file=driver/subprocs.c
535 # Find the source files, if location was not specified.
536 if test -z "$srcdir"; then
537 ac_srcdir_defaulted=yes
538 # Try the directory containing this script, then its parent.
540 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
541 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
543 if test ! -r $srcdir/$ac_unique_file; then
547 ac_srcdir_defaulted=no
549 if test ! -r $srcdir/$ac_unique_file; then
550 if test "$ac_srcdir_defaulted" = yes; then
551 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
553 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
556 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
558 # Prefer explicitly selected file to automatically selected ones.
559 if test -z "$CONFIG_SITE"; then
560 if test "x$prefix" != xNONE; then
561 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
563 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
566 for ac_site_file in $CONFIG_SITE; do
567 if test -r "$ac_site_file"; then
568 echo "loading site script $ac_site_file"
573 if test -r "$cache_file"; then
574 echo "loading cache $cache_file"
577 echo "creating cache $cache_file"
582 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
583 ac_cpp='$CPP $CPPFLAGS'
584 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
585 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
586 cross_compiling=$ac_cv_prog_cc_cross
590 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
591 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
592 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
599 ac_n= ac_c='\c' ac_t=
605 echo "current directory: `pwd`"
606 echo "command line was: $0 $@"
609 # After checking to see that --srcdir is correct (which AC_INIT does)
610 # check for some random other files that come later in the tar file,
611 # to make sure everything is here.
613 for d in driver utils hacks hacks/glx ; do
614 f=$srcdir/$d/Makefile.in
615 if test \! -r $f ; then
617 echo "ERROR: The package is incomplete: $f does not exist."
618 echo " This probably means that your download was truncated."
625 ###############################################################################
627 # Function to figure out how to run the compiler.
629 ###############################################################################
634 ###############################################################################
636 # Function to figure out how to create directory trees.
638 ###############################################################################
643 ###############################################################################
645 # Function to check whether gettimeofday() exists, and how to call it.
646 # This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
648 ###############################################################################
653 ###############################################################################
655 # Function to find perl5 (defines PERL and PERL_VERSION.)
657 ###############################################################################
659 # M4 sucks!! perl sucks too!!
661 perl_version_cmd='print $]'
667 ###############################################################################
669 # Functions to check how to do ICMP PING requests.
671 ###############################################################################
678 ###############################################################################
680 # Functions to check for various X11 crap.
682 ###############################################################################
684 # Try and find the app-defaults directory.
685 # It sucks that autoconf doesn't do this already...
697 # Random special-cases for X on certain pathological OSes.
698 # You know who you are.
704 ###############################################################################
706 # Some utility functions to make checking for X things easier.
708 ###############################################################################
710 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
714 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
718 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
723 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
724 # Use this sparingly; it probably doesn't work very well on X programs.
728 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
729 # (But not the -L directories!)
735 # Usage: HANDLE_X_PATH_ARG([variable_name],
736 # [--command-line-option],
737 # [descriptive string])
739 # All of the --with options take three forms:
741 # --with-foo (or --with-foo=yes)
742 # --without-foo (or --with-foo=no)
745 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
746 # a directory (string beginning with a slash) it checks to see whether
747 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
754 ###############################################################################
755 ###############################################################################
757 # End of function definitions. Now start actually executing stuff.
759 ###############################################################################
760 ###############################################################################
762 # random compiler setup
764 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
765 if test -f $ac_dir/install-sh; then
767 ac_install_sh="$ac_aux_dir/install-sh -c"
769 elif test -f $ac_dir/install.sh; then
771 ac_install_sh="$ac_aux_dir/install.sh -c"
775 if test -z "$ac_aux_dir"; then
776 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
778 ac_config_guess=$ac_aux_dir/config.guess
779 ac_config_sub=$ac_aux_dir/config.sub
780 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
783 # Make sure we can run config.sub.
784 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
785 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
788 echo $ac_n "checking host system type""... $ac_c" 1>&6
789 echo "configure:801: checking host system type" >&5
792 case "$host_alias" in
796 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
797 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
799 *) host_alias=$nonopt ;;
803 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
804 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
805 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
806 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
807 echo "$ac_t""$host" 1>&6
809 # Extract the first word of "gcc", so it can be a program name with args.
810 set dummy gcc; ac_word=$2
811 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
812 echo "configure:824: checking for $ac_word" >&5
813 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
814 echo $ac_n "(cached) $ac_c" 1>&6
816 if test -n "$CC"; then
817 ac_cv_prog_CC="$CC" # Let the user override the test.
819 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
821 for ac_dir in $ac_dummy; do
822 test -z "$ac_dir" && ac_dir=.
823 if test -f $ac_dir/$ac_word; then
832 if test -n "$CC"; then
833 echo "$ac_t""$CC" 1>&6
835 echo "$ac_t""no" 1>&6
838 if test -z "$CC"; then
839 # Extract the first word of "cc", so it can be a program name with args.
840 set dummy cc; ac_word=$2
841 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
842 echo "configure:854: checking for $ac_word" >&5
843 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
844 echo $ac_n "(cached) $ac_c" 1>&6
846 if test -n "$CC"; then
847 ac_cv_prog_CC="$CC" # Let the user override the test.
849 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
852 for ac_dir in $ac_dummy; do
853 test -z "$ac_dir" && ac_dir=.
854 if test -f $ac_dir/$ac_word; then
855 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
864 if test $ac_prog_rejected = yes; then
865 # We found a bogon in the path, so make sure we never use it.
866 set dummy $ac_cv_prog_CC
868 if test $# -gt 0; then
869 # We chose a different compiler from the bogus one.
870 # However, it has the same basename, so the bogon will be chosen
871 # first if we set CC to just the basename; use the full file name.
873 set dummy "$ac_dir/$ac_word" "$@"
881 if test -n "$CC"; then
882 echo "$ac_t""$CC" 1>&6
884 echo "$ac_t""no" 1>&6
887 if test -z "$CC"; then
890 # Extract the first word of "cl", so it can be a program name with args.
891 set dummy cl; ac_word=$2
892 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
893 echo "configure:905: checking for $ac_word" >&5
894 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
895 echo $ac_n "(cached) $ac_c" 1>&6
897 if test -n "$CC"; then
898 ac_cv_prog_CC="$CC" # Let the user override the test.
900 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
902 for ac_dir in $ac_dummy; do
903 test -z "$ac_dir" && ac_dir=.
904 if test -f $ac_dir/$ac_word; then
913 if test -n "$CC"; then
914 echo "$ac_t""$CC" 1>&6
916 echo "$ac_t""no" 1>&6
921 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
924 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
925 echo "configure:937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
928 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
929 ac_cpp='$CPP $CPPFLAGS'
930 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
931 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
932 cross_compiling=$ac_cv_prog_cc_cross
934 cat > conftest.$ac_ext << EOF
936 #line 948 "configure"
937 #include "confdefs.h"
941 if { (eval echo configure:953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
942 ac_cv_prog_cc_works=yes
943 # If we can't run a trivial program, we are probably using a cross compiler.
944 if (./conftest; exit) 2>/dev/null; then
945 ac_cv_prog_cc_cross=no
947 ac_cv_prog_cc_cross=yes
950 echo "configure: failed program was:" >&5
951 cat conftest.$ac_ext >&5
952 ac_cv_prog_cc_works=no
956 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
957 ac_cpp='$CPP $CPPFLAGS'
958 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
959 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
960 cross_compiling=$ac_cv_prog_cc_cross
962 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
963 if test $ac_cv_prog_cc_works = no; then
964 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
966 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
967 echo "configure:979: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
968 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
969 cross_compiling=$ac_cv_prog_cc_cross
971 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
972 echo "configure:984: checking whether we are using GNU C" >&5
973 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
974 echo $ac_n "(cached) $ac_c" 1>&6
976 cat > conftest.c <<EOF
981 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
988 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
990 if test $ac_cv_prog_gcc = yes; then
996 ac_test_CFLAGS="${CFLAGS+set}"
997 ac_save_CFLAGS="$CFLAGS"
999 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1000 echo "configure:1012: checking whether ${CC-cc} accepts -g" >&5
1001 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1002 echo $ac_n "(cached) $ac_c" 1>&6
1004 echo 'void f(){}' > conftest.c
1005 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1014 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1015 if test "$ac_test_CFLAGS" = set; then
1016 CFLAGS="$ac_save_CFLAGS"
1017 elif test $ac_cv_prog_cc_g = yes; then
1018 if test "$GCC" = yes; then
1024 if test "$GCC" = yes; then
1032 if test -z "$GCC"; then
1033 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
1034 echo "configure:1046: checking how to request ANSI compilation" >&5
1037 echo "$ac_t""HPUX: adding -Ae" 1>&6
1041 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
1042 CC="$CC -qlanglvl=ansi -qhalt=e"
1046 echo "$ac_t""DEC: adding -std1" 1>&6
1051 echo "$ac_t""no idea" 1>&6
1056 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
1057 echo "configure:1069: checking whether the compiler works on ANSI C" >&5
1058 if test "$cross_compiling" = yes; then
1059 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1061 cat > conftest.$ac_ext <<EOF
1062 #line 1074 "configure"
1063 #include "confdefs.h"
1064 main(int ac, char **av) { return 0; }
1066 if { (eval echo configure:1078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1068 echo "$ac_t""yes" 1>&6
1070 echo "configure: failed program was:" >&5
1071 cat conftest.$ac_ext >&5
1073 echo "$ac_t""no" 1>&6
1074 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1080 if test -n "$GCC"; then
1081 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
1082 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
1085 *-irix5* |*-irix6.0-3* )
1086 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1087 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1090 # if test -z "$GCC"; then
1091 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1092 # CC="$CC -migrate -w0 -verbose -warnprotos"
1098 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1099 echo "configure:1111: checking how to run the C preprocessor" >&5
1100 # On Suns, sometimes $CPP names a directory.
1101 if test -n "$CPP" && test -d "$CPP"; then
1104 if test -z "$CPP"; then
1105 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1106 echo $ac_n "(cached) $ac_c" 1>&6
1108 # This must be in double quotes, not single quotes, because CPP may get
1109 # substituted into the Makefile and "${CC-cc}" will confuse make.
1111 # On the NeXT, cc -E runs the code through the compiler's parser,
1112 # not just through cpp.
1113 cat > conftest.$ac_ext <<EOF
1114 #line 1126 "configure"
1115 #include "confdefs.h"
1119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1120 { (eval echo configure:1132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1122 if test -z "$ac_err"; then
1126 echo "configure: failed program was:" >&5
1127 cat conftest.$ac_ext >&5
1129 CPP="${CC-cc} -E -traditional-cpp"
1130 cat > conftest.$ac_ext <<EOF
1131 #line 1143 "configure"
1132 #include "confdefs.h"
1136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1137 { (eval echo configure:1149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1139 if test -z "$ac_err"; then
1143 echo "configure: failed program was:" >&5
1144 cat conftest.$ac_ext >&5
1146 CPP="${CC-cc} -nologo -E"
1147 cat > conftest.$ac_ext <<EOF
1148 #line 1160 "configure"
1149 #include "confdefs.h"
1153 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1154 { (eval echo configure:1166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1155 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1156 if test -z "$ac_err"; then
1160 echo "configure: failed program was:" >&5
1161 cat conftest.$ac_ext >&5
1170 ac_cv_prog_CPP="$CPP"
1172 CPP="$ac_cv_prog_CPP"
1174 ac_cv_prog_CPP="$CPP"
1176 echo "$ac_t""$CPP" 1>&6
1178 echo $ac_n "checking for working const""... $ac_c" 1>&6
1179 echo "configure:1191: checking for working const" >&5
1180 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1181 echo $ac_n "(cached) $ac_c" 1>&6
1183 cat > conftest.$ac_ext <<EOF
1184 #line 1196 "configure"
1185 #include "confdefs.h"
1189 /* Ultrix mips cc rejects this. */
1190 typedef int charset[2]; const charset x;
1191 /* SunOS 4.1.1 cc rejects this. */
1192 char const *const *ccp;
1194 /* NEC SVR4.0.2 mips cc rejects this. */
1195 struct point {int x, y;};
1196 static struct point const zero = {0,0};
1197 /* AIX XL C 1.02.0.0 rejects this.
1198 It does not let you subtract one const X* pointer from another in an arm
1199 of an if-expression whose if-part is not a constant expression */
1200 const char *g = "string";
1201 ccp = &g + (g ? g-g : 0);
1202 /* HPUX 7.0 cc rejects these. */
1205 ccp = (char const *const *) p;
1206 { /* SCO 3.2v4 cc rejects this. */
1208 char const *s = 0 ? (char *) 0 : (char const *) 0;
1212 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1214 const int *foo = &x[0];
1217 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1218 typedef const int *iptr;
1222 { /* AIX XL C 1.02.0.0 rejects this saying
1223 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1224 struct s { int j; const int *ap[3]; };
1225 struct s *b; b->j = 5;
1227 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1233 if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1237 echo "configure: failed program was:" >&5
1238 cat conftest.$ac_ext >&5
1245 echo "$ac_t""$ac_cv_c_const" 1>&6
1246 if test $ac_cv_c_const = no; then
1247 cat >> confdefs.h <<\EOF
1253 echo $ac_n "checking for inline""... $ac_c" 1>&6
1254 echo "configure:1266: checking for inline" >&5
1255 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
1259 for ac_kw in inline __inline__ __inline; do
1260 cat > conftest.$ac_ext <<EOF
1261 #line 1273 "configure"
1262 #include "confdefs.h"
1268 if { (eval echo configure:1280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1270 ac_cv_c_inline=$ac_kw; break
1272 echo "configure: failed program was:" >&5
1273 cat conftest.$ac_ext >&5
1280 echo "$ac_t""$ac_cv_c_inline" 1>&6
1281 case "$ac_cv_c_inline" in
1283 no) cat >> confdefs.h <<\EOF
1287 *) cat >> confdefs.h <<EOF
1288 #define inline $ac_cv_c_inline
1294 # stuff for Makefiles
1295 # Find a good install program. We prefer a C program (faster),
1296 # so one script is as good as another. But avoid the broken or
1297 # incompatible versions:
1298 # SysV /etc/install, /usr/sbin/install
1299 # SunOS /usr/etc/install
1300 # IRIX /sbin/install
1302 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1303 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1304 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1305 # ./install, which can be erroneously created by make from ./install.sh.
1306 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1307 echo "configure:1319: checking for a BSD compatible install" >&5
1308 if test -z "$INSTALL"; then
1309 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1310 echo $ac_n "(cached) $ac_c" 1>&6
1312 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1313 for ac_dir in $PATH; do
1314 # Account for people who put trailing slashes in PATH elements.
1316 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1318 # OSF1 and SCO ODT 3.0 have their own names for install.
1319 # Don't use installbsd from OSF since it installs stuff as root
1321 for ac_prog in ginstall scoinst install; do
1322 if test -f $ac_dir/$ac_prog; then
1323 if test $ac_prog = install &&
1324 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1325 # AIX install. It has an incompatible calling convention.
1328 ac_cv_path_install="$ac_dir/$ac_prog -c"
1339 if test "${ac_cv_path_install+set}" = set; then
1340 INSTALL="$ac_cv_path_install"
1342 # As a last resort, use the slow shell script. We don't cache a
1343 # path for INSTALL within a source directory, because that will
1344 # break other packages using the cache if that directory is
1345 # removed, or if the path is relative.
1346 INSTALL="$ac_install_sh"
1349 echo "$ac_t""$INSTALL" 1>&6
1351 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1352 # It thinks the first close brace ends the variable substitution.
1353 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1355 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1357 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1359 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1360 echo "configure:1372: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1361 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1362 echo $ac_n "(cached) $ac_c" 1>&6
1364 ac_cv_install_d_creates_dirs=no
1366 if mkdir conftestdir; then
1368 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1369 if test -d dir1/dir2/. ; then
1370 ac_cv_install_d_creates_dirs=yes
1378 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1380 if test "$ac_cv_install_d_creates_dirs" = no ; then
1381 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1382 echo "configure:1394: checking whether \"mkdir -p\" creates intermediate directories" >&5
1383 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1384 echo $ac_n "(cached) $ac_c" 1>&6
1386 ac_cv_mkdir_p_creates_dirs=no
1388 if mkdir conftestdir; then
1390 mkdir -p dir1/dir2 >&- 2>&-
1391 if test -d dir1/dir2/. ; then
1392 ac_cv_mkdir_p_creates_dirs=yes
1400 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1403 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1404 INSTALL_DIRS='${INSTALL} -d'
1405 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1406 INSTALL_DIRS='mkdir -p'
1409 INSTALL_DIRS='${INSTALL} -d'
1412 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1413 echo "configure:1425: checking whether ${MAKE-make} sets \${MAKE}" >&5
1414 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1415 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1416 echo $ac_n "(cached) $ac_c" 1>&6
1418 cat > conftestmake <<\EOF
1420 @echo 'ac_maketemp="${MAKE}"'
1422 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1423 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1424 if test -n "$ac_maketemp"; then
1425 eval ac_cv_prog_make_${ac_make}_set=yes
1427 eval ac_cv_prog_make_${ac_make}_set=no
1431 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1432 echo "$ac_t""yes" 1>&6
1435 echo "$ac_t""no" 1>&6
1436 SET_MAKE="MAKE=${MAKE-make}"
1441 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1442 echo "configure:1454: checking for ANSI C header files" >&5
1443 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1444 echo $ac_n "(cached) $ac_c" 1>&6
1446 cat > conftest.$ac_ext <<EOF
1447 #line 1459 "configure"
1448 #include "confdefs.h"
1454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1455 { (eval echo configure:1467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1457 if test -z "$ac_err"; then
1459 ac_cv_header_stdc=yes
1462 echo "configure: failed program was:" >&5
1463 cat conftest.$ac_ext >&5
1465 ac_cv_header_stdc=no
1469 if test $ac_cv_header_stdc = yes; then
1470 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1471 cat > conftest.$ac_ext <<EOF
1472 #line 1484 "configure"
1473 #include "confdefs.h"
1476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1477 egrep "memchr" >/dev/null 2>&1; then
1481 ac_cv_header_stdc=no
1487 if test $ac_cv_header_stdc = yes; then
1488 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1489 cat > conftest.$ac_ext <<EOF
1490 #line 1502 "configure"
1491 #include "confdefs.h"
1494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1495 egrep "free" >/dev/null 2>&1; then
1499 ac_cv_header_stdc=no
1505 if test $ac_cv_header_stdc = yes; then
1506 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1507 if test "$cross_compiling" = yes; then
1510 cat > conftest.$ac_ext <<EOF
1511 #line 1523 "configure"
1512 #include "confdefs.h"
1514 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1515 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1516 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1517 int main () { int i; for (i = 0; i < 256; i++)
1518 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1522 if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1526 echo "configure: failed program was:" >&5
1527 cat conftest.$ac_ext >&5
1529 ac_cv_header_stdc=no
1537 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1538 if test $ac_cv_header_stdc = yes; then
1539 cat >> confdefs.h <<\EOF
1540 #define STDC_HEADERS 1
1545 for ac_hdr in unistd.h
1547 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1548 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1549 echo "configure:1561: checking for $ac_hdr" >&5
1550 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1551 echo $ac_n "(cached) $ac_c" 1>&6
1553 cat > conftest.$ac_ext <<EOF
1554 #line 1566 "configure"
1555 #include "confdefs.h"
1558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1559 { (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1561 if test -z "$ac_err"; then
1563 eval "ac_cv_header_$ac_safe=yes"
1566 echo "configure: failed program was:" >&5
1567 cat conftest.$ac_ext >&5
1569 eval "ac_cv_header_$ac_safe=no"
1573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1574 echo "$ac_t""yes" 1>&6
1575 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1576 cat >> confdefs.h <<EOF
1577 #define $ac_tr_hdr 1
1581 echo "$ac_t""no" 1>&6
1585 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1586 echo "configure:1598: checking for mode_t" >&5
1587 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1588 echo $ac_n "(cached) $ac_c" 1>&6
1590 cat > conftest.$ac_ext <<EOF
1591 #line 1603 "configure"
1592 #include "confdefs.h"
1593 #include <sys/types.h>
1599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1600 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1602 ac_cv_type_mode_t=yes
1605 ac_cv_type_mode_t=no
1610 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1611 if test $ac_cv_type_mode_t = no; then
1612 cat >> confdefs.h <<\EOF
1618 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1619 echo "configure:1631: checking for pid_t" >&5
1620 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1621 echo $ac_n "(cached) $ac_c" 1>&6
1623 cat > conftest.$ac_ext <<EOF
1624 #line 1636 "configure"
1625 #include "confdefs.h"
1626 #include <sys/types.h>
1632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1633 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1635 ac_cv_type_pid_t=yes
1643 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1644 if test $ac_cv_type_pid_t = no; then
1645 cat >> confdefs.h <<\EOF
1651 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1652 echo "configure:1664: checking for size_t" >&5
1653 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1654 echo $ac_n "(cached) $ac_c" 1>&6
1656 cat > conftest.$ac_ext <<EOF
1657 #line 1669 "configure"
1658 #include "confdefs.h"
1659 #include <sys/types.h>
1665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1666 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1668 ac_cv_type_size_t=yes
1671 ac_cv_type_size_t=no
1676 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1677 if test $ac_cv_type_size_t = no; then
1678 cat >> confdefs.h <<\EOF
1679 #define size_t unsigned
1684 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1685 echo "configure:1697: checking return type of signal handlers" >&5
1686 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1687 echo $ac_n "(cached) $ac_c" 1>&6
1689 cat > conftest.$ac_ext <<EOF
1690 #line 1702 "configure"
1691 #include "confdefs.h"
1692 #include <sys/types.h>
1698 extern "C" void (*signal (int, void (*)(int)))(int);
1700 void (*signal ()) ();
1707 if { (eval echo configure:1719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1709 ac_cv_type_signal=void
1711 echo "configure: failed program was:" >&5
1712 cat conftest.$ac_ext >&5
1714 ac_cv_type_signal=int
1719 echo "$ac_t""$ac_cv_type_signal" 1>&6
1720 cat >> confdefs.h <<EOF
1721 #define RETSIGTYPE $ac_cv_type_signal
1725 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1726 echo "configure:1738: checking whether time.h and sys/time.h may both be included" >&5
1727 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1728 echo $ac_n "(cached) $ac_c" 1>&6
1730 cat > conftest.$ac_ext <<EOF
1731 #line 1743 "configure"
1732 #include "confdefs.h"
1733 #include <sys/types.h>
1734 #include <sys/time.h>
1740 if { (eval echo configure:1752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1742 ac_cv_header_time=yes
1744 echo "configure: failed program was:" >&5
1745 cat conftest.$ac_ext >&5
1747 ac_cv_header_time=no
1752 echo "$ac_t""$ac_cv_header_time" 1>&6
1753 if test $ac_cv_header_time = yes; then
1754 cat >> confdefs.h <<\EOF
1755 #define TIME_WITH_SYS_TIME 1
1760 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1761 echo "configure:1773: checking for sys/wait.h that is POSIX.1 compatible" >&5
1762 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1765 cat > conftest.$ac_ext <<EOF
1766 #line 1778 "configure"
1767 #include "confdefs.h"
1768 #include <sys/types.h>
1769 #include <sys/wait.h>
1771 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1774 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1779 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1782 if { (eval echo configure:1794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1784 ac_cv_header_sys_wait_h=yes
1786 echo "configure: failed program was:" >&5
1787 cat conftest.$ac_ext >&5
1789 ac_cv_header_sys_wait_h=no
1794 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1795 if test $ac_cv_header_sys_wait_h = yes; then
1796 cat >> confdefs.h <<\EOF
1797 #define HAVE_SYS_WAIT_H 1
1803 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1805 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1806 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1807 echo "configure:1819: checking for $ac_hdr that defines DIR" >&5
1808 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1809 echo $ac_n "(cached) $ac_c" 1>&6
1811 cat > conftest.$ac_ext <<EOF
1812 #line 1824 "configure"
1813 #include "confdefs.h"
1814 #include <sys/types.h>
1820 if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1822 eval "ac_cv_header_dirent_$ac_safe=yes"
1824 echo "configure: failed program was:" >&5
1825 cat conftest.$ac_ext >&5
1827 eval "ac_cv_header_dirent_$ac_safe=no"
1831 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1832 echo "$ac_t""yes" 1>&6
1833 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1834 cat >> confdefs.h <<EOF
1835 #define $ac_tr_hdr 1
1837 ac_header_dirent=$ac_hdr; break
1839 echo "$ac_t""no" 1>&6
1842 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1843 if test $ac_header_dirent = dirent.h; then
1844 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1845 echo "configure:1857: checking for opendir in -ldir" >&5
1846 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1847 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1848 echo $ac_n "(cached) $ac_c" 1>&6
1850 ac_save_LIBS="$LIBS"
1852 cat > conftest.$ac_ext <<EOF
1853 #line 1865 "configure"
1854 #include "confdefs.h"
1855 /* Override any gcc2 internal prototype to avoid an error. */
1856 /* We use char because int might match the return type of a gcc2
1857 builtin and then its argument prototype would still apply. */
1864 if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1866 eval "ac_cv_lib_$ac_lib_var=yes"
1868 echo "configure: failed program was:" >&5
1869 cat conftest.$ac_ext >&5
1871 eval "ac_cv_lib_$ac_lib_var=no"
1874 LIBS="$ac_save_LIBS"
1877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1878 echo "$ac_t""yes" 1>&6
1881 echo "$ac_t""no" 1>&6
1885 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1886 echo "configure:1898: checking for opendir in -lx" >&5
1887 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1888 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1889 echo $ac_n "(cached) $ac_c" 1>&6
1891 ac_save_LIBS="$LIBS"
1893 cat > conftest.$ac_ext <<EOF
1894 #line 1906 "configure"
1895 #include "confdefs.h"
1896 /* Override any gcc2 internal prototype to avoid an error. */
1897 /* We use char because int might match the return type of a gcc2
1898 builtin and then its argument prototype would still apply. */
1905 if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1907 eval "ac_cv_lib_$ac_lib_var=yes"
1909 echo "configure: failed program was:" >&5
1910 cat conftest.$ac_ext >&5
1912 eval "ac_cv_lib_$ac_lib_var=no"
1915 LIBS="$ac_save_LIBS"
1918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1919 echo "$ac_t""yes" 1>&6
1922 echo "$ac_t""no" 1>&6
1927 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1928 echo "configure:1940: checking how to call gettimeofday" >&5
1929 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1930 echo $ac_n "(cached) $ac_c" 1>&6
1932 cat > conftest.$ac_ext <<EOF
1933 #line 1945 "configure"
1934 #include "confdefs.h"
1936 #include <sys/time.h>
1938 struct timeval tv; struct timezone tzp;
1939 gettimeofday(&tv, &tzp);
1942 if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1944 ac_gettimeofday_args=2
1946 echo "configure: failed program was:" >&5
1947 cat conftest.$ac_ext >&5
1949 cat > conftest.$ac_ext <<EOF
1950 #line 1962 "configure"
1951 #include "confdefs.h"
1953 #include <sys/time.h>
1955 struct timeval tv; gettimeofday(&tv);
1958 if { (eval echo configure:1970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1960 ac_gettimeofday_args=1
1962 echo "configure: failed program was:" >&5
1963 cat conftest.$ac_ext >&5
1965 ac_gettimeofday_args=0
1970 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1973 ac_gettimeofday_args=$ac_cv_gettimeofday_args
1974 if test "$ac_gettimeofday_args" = 1 ; then
1975 cat >> confdefs.h <<\EOF
1976 #define HAVE_GETTIMEOFDAY 1
1979 echo "$ac_t""one argument" 1>&6
1980 elif test "$ac_gettimeofday_args" = 2 ; then
1981 cat >> confdefs.h <<\EOF
1982 #define HAVE_GETTIMEOFDAY 1
1985 cat >> confdefs.h <<\EOF
1986 #define GETTIMEOFDAY_TWO_ARGS 1
1989 echo "$ac_t""two arguments" 1>&6
1991 echo "$ac_t""unknown" 1>&6
1994 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
1996 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1997 echo "configure:2009: checking for $ac_func" >&5
1998 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1999 echo $ac_n "(cached) $ac_c" 1>&6
2001 cat > conftest.$ac_ext <<EOF
2002 #line 2014 "configure"
2003 #include "confdefs.h"
2004 /* System header to define __stub macros and hopefully few prototypes,
2005 which can conflict with char $ac_func(); below. */
2007 /* Override any gcc2 internal prototype to avoid an error. */
2008 /* We use char because int might match the return type of a gcc2
2009 builtin and then its argument prototype would still apply. */
2014 /* The GNU C library defines this for functions which it implements
2015 to always fail with ENOSYS. Some functions are actually named
2016 something starting with __ and the normal name is an alias. */
2017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2025 if { (eval echo configure:2037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2027 eval "ac_cv_func_$ac_func=yes"
2029 echo "configure: failed program was:" >&5
2030 cat conftest.$ac_ext >&5
2032 eval "ac_cv_func_$ac_func=no"
2037 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2038 echo "$ac_t""yes" 1>&6
2039 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2040 cat >> confdefs.h <<EOF
2041 #define $ac_tr_func 1
2045 echo "$ac_t""no" 1>&6
2050 for ac_func in sigaction syslog realpath
2052 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2053 echo "configure:2065: checking for $ac_func" >&5
2054 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2055 echo $ac_n "(cached) $ac_c" 1>&6
2057 cat > conftest.$ac_ext <<EOF
2058 #line 2070 "configure"
2059 #include "confdefs.h"
2060 /* System header to define __stub macros and hopefully few prototypes,
2061 which can conflict with char $ac_func(); below. */
2063 /* Override any gcc2 internal prototype to avoid an error. */
2064 /* We use char because int might match the return type of a gcc2
2065 builtin and then its argument prototype would still apply. */
2070 /* The GNU C library defines this for functions which it implements
2071 to always fail with ENOSYS. Some functions are actually named
2072 something starting with __ and the normal name is an alias. */
2073 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2081 if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2083 eval "ac_cv_func_$ac_func=yes"
2085 echo "configure: failed program was:" >&5
2086 cat conftest.$ac_ext >&5
2088 eval "ac_cv_func_$ac_func=no"
2093 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2094 echo "$ac_t""yes" 1>&6
2095 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2096 cat >> confdefs.h <<EOF
2097 #define $ac_tr_func 1
2101 echo "$ac_t""no" 1>&6
2105 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2106 echo "configure:2118: checking for struct icmp" >&5
2107 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2108 echo $ac_n "(cached) $ac_c" 1>&6
2110 cat > conftest.$ac_ext <<EOF
2111 #line 2123 "configure"
2112 #include "confdefs.h"
2120 #include <sys/types.h>
2121 #include <sys/time.h>
2122 #include <sys/ipc.h>
2123 #include <sys/shm.h>
2124 #include <sys/socket.h>
2125 #include <netinet/in_systm.h>
2126 #include <netinet/in.h>
2127 #include <netinet/ip.h>
2128 #include <netinet/ip_icmp.h>
2129 #include <netinet/udp.h>
2130 #include <arpa/inet.h>
2135 struct sockaddr_in si;
2137 i.icmp_type = ICMP_ECHO;
2142 si.sin_family = AF_INET;
2146 if { (eval echo configure:2158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2150 echo "configure: failed program was:" >&5
2151 cat conftest.$ac_ext >&5
2158 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2159 if test "$ac_cv_have_icmp" = yes ; then
2160 cat >> confdefs.h <<\EOF
2165 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2166 echo "configure:2178: checking for struct icmphdr" >&5
2167 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2168 echo $ac_n "(cached) $ac_c" 1>&6
2170 cat > conftest.$ac_ext <<EOF
2171 #line 2183 "configure"
2172 #include "confdefs.h"
2180 #include <sys/types.h>
2181 #include <sys/time.h>
2182 #include <sys/ipc.h>
2183 #include <sys/shm.h>
2184 #include <sys/socket.h>
2185 #include <netinet/in_systm.h>
2186 #include <netinet/in.h>
2187 #include <netinet/ip.h>
2188 #include <netinet/ip_icmp.h>
2189 #include <netinet/udp.h>
2190 #include <arpa/inet.h>
2195 struct sockaddr_in si;
2201 i.un.echo.sequence = 0;
2202 si.sin_family = AF_INET;
2206 if { (eval echo configure:2218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2208 ac_cv_have_icmphdr=yes
2210 echo "configure: failed program was:" >&5
2211 cat conftest.$ac_ext >&5
2213 ac_cv_have_icmphdr=no
2218 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2219 if test "$ac_cv_have_icmphdr" = yes ; then
2220 cat >> confdefs.h <<\EOF
2221 #define HAVE_ICMPHDR 1
2225 for ac_hdr in crypt.h sys/select.h
2227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2229 echo "configure:2241: checking for $ac_hdr" >&5
2230 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2231 echo $ac_n "(cached) $ac_c" 1>&6
2233 cat > conftest.$ac_ext <<EOF
2234 #line 2246 "configure"
2235 #include "confdefs.h"
2238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2239 { (eval echo configure:2251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2241 if test -z "$ac_err"; then
2243 eval "ac_cv_header_$ac_safe=yes"
2246 echo "configure: failed program was:" >&5
2247 cat conftest.$ac_ext >&5
2249 eval "ac_cv_header_$ac_safe=no"
2253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2254 echo "$ac_t""yes" 1>&6
2255 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2256 cat >> confdefs.h <<EOF
2257 #define $ac_tr_hdr 1
2261 echo "$ac_t""no" 1>&6
2266 for ac_prog in perl5 perl
2268 # Extract the first word of "$ac_prog", so it can be a program name with args.
2269 set dummy $ac_prog; ac_word=$2
2270 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2271 echo "configure:2283: checking for $ac_word" >&5
2272 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2273 echo $ac_n "(cached) $ac_c" 1>&6
2277 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2280 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2283 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2285 for ac_dir in $ac_dummy; do
2286 test -z "$ac_dir" && ac_dir=.
2287 if test -f $ac_dir/$ac_word; then
2288 ac_cv_path_PERL="$ac_dir/$ac_word"
2296 PERL="$ac_cv_path_PERL"
2297 if test -n "$PERL"; then
2298 echo "$ac_t""$PERL" 1>&6
2300 echo "$ac_t""no" 1>&6
2303 test -n "$PERL" && break
2306 if test -z "$PERL" ; then
2309 echo $ac_n "checking perl version""... $ac_c" 1>&6
2310 echo "configure:2322: checking perl version" >&5
2311 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2312 echo $ac_n "(cached) $ac_c" 1>&6
2314 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2317 echo "$ac_t""$ac_cv_perl_version" 1>&6
2318 PERL_VERSION=$ac_cv_perl_version
2322 if test -z "$PERL" ; then
2323 # don't let it be blank...
2324 PERL=/usr/local/bin/perl5
2327 # If we find X, set shell vars x_includes and x_libraries to the
2328 # paths, otherwise set no_x=yes.
2329 # Uses ac_ vars as temps to allow command line to override cache and checks.
2330 # --without-x overrides everything else, but does not touch the cache.
2331 echo $ac_n "checking for X""... $ac_c" 1>&6
2332 echo "configure:2344: checking for X" >&5
2334 # Check whether --with-x or --without-x was given.
2335 if test "${with_x+set}" = set; then
2340 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2341 if test "x$with_x" = xno; then
2342 # The user explicitly disabled X.
2345 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2346 # Both variables are already set.
2349 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2350 echo $ac_n "(cached) $ac_c" 1>&6
2352 # One or both of the vars are not set, and there is no cached value.
2353 ac_x_includes=NO ac_x_libraries=NO
2355 if mkdir conftestdir; then
2357 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2358 cat > Imakefile <<'EOF'
2360 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2362 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2363 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2364 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2365 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2366 for ac_extension in a so sl; do
2367 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2368 test -f $ac_im_libdir/libX11.$ac_extension; then
2369 ac_im_usrlibdir=$ac_im_libdir; break
2372 # Screen out bogus values from the imake configuration. They are
2373 # bogus both because they are the default anyway, and because
2374 # using them would break gcc on systems where it needs fixed includes.
2375 case "$ac_im_incroot" in
2377 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2379 case "$ac_im_usrlibdir" in
2381 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2388 if test "$ac_x_includes" = NO; then
2389 # Guess where to find include files, by looking for this one X11 .h file.
2390 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2392 # First, try using that file with no special directory specified.
2393 cat > conftest.$ac_ext <<EOF
2394 #line 2406 "configure"
2395 #include "confdefs.h"
2396 #include <$x_direct_test_include>
2398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2399 { (eval echo configure:2411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2401 if test -z "$ac_err"; then
2403 # We can compile using X headers with no special include directory.
2407 echo "configure: failed program was:" >&5
2408 cat conftest.$ac_ext >&5
2410 # Look for the header file in a standard set of common directories.
2411 # Check X11 before X11Rn because it is often a symlink to the current release.
2414 /usr/X11R6/include \
2415 /usr/X11R5/include \
2416 /usr/X11R4/include \
2419 /usr/include/X11R6 \
2420 /usr/include/X11R5 \
2421 /usr/include/X11R4 \
2423 /usr/local/X11/include \
2424 /usr/local/X11R6/include \
2425 /usr/local/X11R5/include \
2426 /usr/local/X11R4/include \
2428 /usr/local/include/X11 \
2429 /usr/local/include/X11R6 \
2430 /usr/local/include/X11R5 \
2431 /usr/local/include/X11R4 \
2435 /usr/XFree86/include/X11 \
2438 /usr/local/include \
2439 /usr/unsupported/include \
2440 /usr/athena/include \
2441 /usr/local/x11r5/include \
2442 /usr/lpp/Xamples/include \
2444 /usr/openwin/include \
2445 /usr/openwin/share/include \
2448 if test -r "$ac_dir/$x_direct_test_include"; then
2449 ac_x_includes=$ac_dir
2455 fi # $ac_x_includes = NO
2457 if test "$ac_x_libraries" = NO; then
2458 # Check for the libraries.
2460 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2461 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2463 # See if we find them without any special options.
2464 # Don't add to $LIBS permanently.
2465 ac_save_LIBS="$LIBS"
2466 LIBS="-l$x_direct_test_library $LIBS"
2467 cat > conftest.$ac_ext <<EOF
2468 #line 2480 "configure"
2469 #include "confdefs.h"
2472 ${x_direct_test_function}()
2475 if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2477 LIBS="$ac_save_LIBS"
2478 # We can link X programs with no special library path.
2481 echo "configure: failed program was:" >&5
2482 cat conftest.$ac_ext >&5
2484 LIBS="$ac_save_LIBS"
2485 # First see if replacing the include by lib works.
2486 # Check X11 before X11Rn because it is often a symlink to the current release.
2487 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2498 /usr/local/X11/lib \
2499 /usr/local/X11R6/lib \
2500 /usr/local/X11R5/lib \
2501 /usr/local/X11R4/lib \
2503 /usr/local/lib/X11 \
2504 /usr/local/lib/X11R6 \
2505 /usr/local/lib/X11R5 \
2506 /usr/local/lib/X11R4 \
2510 /usr/XFree86/lib/X11 \
2514 /usr/unsupported/lib \
2516 /usr/local/x11r5/lib \
2517 /usr/lpp/Xamples/lib \
2521 /usr/openwin/share/lib \
2524 for ac_extension in a so sl; do
2525 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2526 ac_x_libraries=$ac_dir
2533 fi # $ac_x_libraries = NO
2535 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2536 # Didn't find X anywhere. Cache the known absence of X.
2537 ac_cv_have_x="have_x=no"
2539 # Record where we found X for the cache.
2540 ac_cv_have_x="have_x=yes \
2541 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2545 eval "$ac_cv_have_x"
2548 if test "$have_x" != yes; then
2549 echo "$ac_t""$have_x" 1>&6
2552 # If each of the values was on the command line, it overrides each guess.
2553 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2554 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2555 # Update the cache value to reflect the command line values.
2556 ac_cv_have_x="have_x=yes \
2557 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2558 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2561 if test "$no_x" = yes; then
2562 # Not all programs may use this symbol, but it does not hurt to define it.
2563 cat >> confdefs.h <<\EOF
2564 #define X_DISPLAY_MISSING 1
2567 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2569 if test -n "$x_includes"; then
2570 X_CFLAGS="$X_CFLAGS -I$x_includes"
2573 # It would also be nice to do this for all -L options, not just this one.
2574 if test -n "$x_libraries"; then
2575 X_LIBS="$X_LIBS -L$x_libraries"
2576 # For Solaris; some versions of Sun CC require a space after -R and
2577 # others require no space. Words are not sufficient . . . .
2578 case "`(uname -sr) 2>/dev/null`" in
2580 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2581 echo "configure:2593: checking whether -R must be followed by a space" >&5
2582 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2583 cat > conftest.$ac_ext <<EOF
2584 #line 2596 "configure"
2585 #include "confdefs.h"
2591 if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2595 echo "configure: failed program was:" >&5
2596 cat conftest.$ac_ext >&5
2601 if test $ac_R_nospace = yes; then
2602 echo "$ac_t""no" 1>&6
2603 X_LIBS="$X_LIBS -R$x_libraries"
2605 LIBS="$ac_xsave_LIBS -R $x_libraries"
2606 cat > conftest.$ac_ext <<EOF
2607 #line 2619 "configure"
2608 #include "confdefs.h"
2614 if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2618 echo "configure: failed program was:" >&5
2619 cat conftest.$ac_ext >&5
2624 if test $ac_R_space = yes; then
2625 echo "$ac_t""yes" 1>&6
2626 X_LIBS="$X_LIBS -R $x_libraries"
2628 echo "$ac_t""neither works" 1>&6
2631 LIBS="$ac_xsave_LIBS"
2635 # Check for system-dependent libraries X programs must link with.
2636 # Do this before checking for the system-independent R6 libraries
2637 # (-lICE), since we may need -lsocket or whatever for X linking.
2639 if test "$ISC" = yes; then
2640 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2642 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2643 # libraries were built with DECnet support. And karl@cs.umb.edu says
2644 # the Alpha needs dnet_stub (dnet does not exist).
2645 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2646 echo "configure:2658: checking for dnet_ntoa in -ldnet" >&5
2647 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2648 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2649 echo $ac_n "(cached) $ac_c" 1>&6
2651 ac_save_LIBS="$LIBS"
2653 cat > conftest.$ac_ext <<EOF
2654 #line 2666 "configure"
2655 #include "confdefs.h"
2656 /* Override any gcc2 internal prototype to avoid an error. */
2657 /* We use char because int might match the return type of a gcc2
2658 builtin and then its argument prototype would still apply. */
2665 if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2667 eval "ac_cv_lib_$ac_lib_var=yes"
2669 echo "configure: failed program was:" >&5
2670 cat conftest.$ac_ext >&5
2672 eval "ac_cv_lib_$ac_lib_var=no"
2675 LIBS="$ac_save_LIBS"
2678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2679 echo "$ac_t""yes" 1>&6
2680 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2682 echo "$ac_t""no" 1>&6
2685 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2686 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2687 echo "configure:2699: checking for dnet_ntoa in -ldnet_stub" >&5
2688 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2689 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2690 echo $ac_n "(cached) $ac_c" 1>&6
2692 ac_save_LIBS="$LIBS"
2693 LIBS="-ldnet_stub $LIBS"
2694 cat > conftest.$ac_ext <<EOF
2695 #line 2707 "configure"
2696 #include "confdefs.h"
2697 /* Override any gcc2 internal prototype to avoid an error. */
2698 /* We use char because int might match the return type of a gcc2
2699 builtin and then its argument prototype would still apply. */
2706 if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2708 eval "ac_cv_lib_$ac_lib_var=yes"
2710 echo "configure: failed program was:" >&5
2711 cat conftest.$ac_ext >&5
2713 eval "ac_cv_lib_$ac_lib_var=no"
2716 LIBS="$ac_save_LIBS"
2719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2720 echo "$ac_t""yes" 1>&6
2721 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2723 echo "$ac_t""no" 1>&6
2728 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2729 # to get the SysV transport functions.
2730 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2732 # The nsl library prevents programs from opening the X display
2733 # on Irix 5.2, according to dickey@clark.net.
2734 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2735 echo "configure:2747: checking for gethostbyname" >&5
2736 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2737 echo $ac_n "(cached) $ac_c" 1>&6
2739 cat > conftest.$ac_ext <<EOF
2740 #line 2752 "configure"
2741 #include "confdefs.h"
2742 /* System header to define __stub macros and hopefully few prototypes,
2743 which can conflict with char gethostbyname(); below. */
2745 /* Override any gcc2 internal prototype to avoid an error. */
2746 /* We use char because int might match the return type of a gcc2
2747 builtin and then its argument prototype would still apply. */
2748 char gethostbyname();
2752 /* The GNU C library defines this for functions which it implements
2753 to always fail with ENOSYS. Some functions are actually named
2754 something starting with __ and the normal name is an alias. */
2755 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2763 if { (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2765 eval "ac_cv_func_gethostbyname=yes"
2767 echo "configure: failed program was:" >&5
2768 cat conftest.$ac_ext >&5
2770 eval "ac_cv_func_gethostbyname=no"
2775 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2776 echo "$ac_t""yes" 1>&6
2779 echo "$ac_t""no" 1>&6
2782 if test $ac_cv_func_gethostbyname = no; then
2783 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2784 echo "configure:2796: checking for gethostbyname in -lnsl" >&5
2785 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2786 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2787 echo $ac_n "(cached) $ac_c" 1>&6
2789 ac_save_LIBS="$LIBS"
2791 cat > conftest.$ac_ext <<EOF
2792 #line 2804 "configure"
2793 #include "confdefs.h"
2794 /* Override any gcc2 internal prototype to avoid an error. */
2795 /* We use char because int might match the return type of a gcc2
2796 builtin and then its argument prototype would still apply. */
2797 char gethostbyname();
2803 if { (eval echo configure:2815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2805 eval "ac_cv_lib_$ac_lib_var=yes"
2807 echo "configure: failed program was:" >&5
2808 cat conftest.$ac_ext >&5
2810 eval "ac_cv_lib_$ac_lib_var=no"
2813 LIBS="$ac_save_LIBS"
2816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2817 echo "$ac_t""yes" 1>&6
2818 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2820 echo "$ac_t""no" 1>&6
2825 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2826 # socket/setsockopt and other routines are undefined under SCO ODT
2827 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2828 # on later versions), says simon@lia.di.epfl.ch: it contains
2829 # gethostby* variants that don't use the nameserver (or something).
2830 # -lsocket must be given before -lnsl if both are needed.
2831 # We assume that if connect needs -lnsl, so does gethostbyname.
2832 echo $ac_n "checking for connect""... $ac_c" 1>&6
2833 echo "configure:2845: checking for connect" >&5
2834 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2835 echo $ac_n "(cached) $ac_c" 1>&6
2837 cat > conftest.$ac_ext <<EOF
2838 #line 2850 "configure"
2839 #include "confdefs.h"
2840 /* System header to define __stub macros and hopefully few prototypes,
2841 which can conflict with char connect(); below. */
2843 /* Override any gcc2 internal prototype to avoid an error. */
2844 /* We use char because int might match the return type of a gcc2
2845 builtin and then its argument prototype would still apply. */
2850 /* The GNU C library defines this for functions which it implements
2851 to always fail with ENOSYS. Some functions are actually named
2852 something starting with __ and the normal name is an alias. */
2853 #if defined (__stub_connect) || defined (__stub___connect)
2861 if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2863 eval "ac_cv_func_connect=yes"
2865 echo "configure: failed program was:" >&5
2866 cat conftest.$ac_ext >&5
2868 eval "ac_cv_func_connect=no"
2873 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2874 echo "$ac_t""yes" 1>&6
2877 echo "$ac_t""no" 1>&6
2880 if test $ac_cv_func_connect = no; then
2881 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2882 echo "configure:2894: checking for connect in -lsocket" >&5
2883 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2884 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2885 echo $ac_n "(cached) $ac_c" 1>&6
2887 ac_save_LIBS="$LIBS"
2888 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2889 cat > conftest.$ac_ext <<EOF
2890 #line 2902 "configure"
2891 #include "confdefs.h"
2892 /* Override any gcc2 internal prototype to avoid an error. */
2893 /* We use char because int might match the return type of a gcc2
2894 builtin and then its argument prototype would still apply. */
2901 if { (eval echo configure:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2903 eval "ac_cv_lib_$ac_lib_var=yes"
2905 echo "configure: failed program was:" >&5
2906 cat conftest.$ac_ext >&5
2908 eval "ac_cv_lib_$ac_lib_var=no"
2911 LIBS="$ac_save_LIBS"
2914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2915 echo "$ac_t""yes" 1>&6
2916 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2918 echo "$ac_t""no" 1>&6
2923 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2924 echo $ac_n "checking for remove""... $ac_c" 1>&6
2925 echo "configure:2937: checking for remove" >&5
2926 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2927 echo $ac_n "(cached) $ac_c" 1>&6
2929 cat > conftest.$ac_ext <<EOF
2930 #line 2942 "configure"
2931 #include "confdefs.h"
2932 /* System header to define __stub macros and hopefully few prototypes,
2933 which can conflict with char remove(); below. */
2935 /* Override any gcc2 internal prototype to avoid an error. */
2936 /* We use char because int might match the return type of a gcc2
2937 builtin and then its argument prototype would still apply. */
2942 /* The GNU C library defines this for functions which it implements
2943 to always fail with ENOSYS. Some functions are actually named
2944 something starting with __ and the normal name is an alias. */
2945 #if defined (__stub_remove) || defined (__stub___remove)
2953 if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2955 eval "ac_cv_func_remove=yes"
2957 echo "configure: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2960 eval "ac_cv_func_remove=no"
2965 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2966 echo "$ac_t""yes" 1>&6
2969 echo "$ac_t""no" 1>&6
2972 if test $ac_cv_func_remove = no; then
2973 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2974 echo "configure:2986: checking for remove in -lposix" >&5
2975 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2976 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2977 echo $ac_n "(cached) $ac_c" 1>&6
2979 ac_save_LIBS="$LIBS"
2980 LIBS="-lposix $LIBS"
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2994 "configure"
2983 #include "confdefs.h"
2984 /* Override any gcc2 internal prototype to avoid an error. */
2985 /* We use char because int might match the return type of a gcc2
2986 builtin and then its argument prototype would still apply. */
2993 if { (eval echo configure:3005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2995 eval "ac_cv_lib_$ac_lib_var=yes"
2997 echo "configure: failed program was:" >&5
2998 cat conftest.$ac_ext >&5
3000 eval "ac_cv_lib_$ac_lib_var=no"
3003 LIBS="$ac_save_LIBS"
3006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3007 echo "$ac_t""yes" 1>&6
3008 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3010 echo "$ac_t""no" 1>&6
3015 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3016 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3017 echo "configure:3029: checking for shmat" >&5
3018 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3019 echo $ac_n "(cached) $ac_c" 1>&6
3021 cat > conftest.$ac_ext <<EOF
3022 #line 3034 "configure"
3023 #include "confdefs.h"
3024 /* System header to define __stub macros and hopefully few prototypes,
3025 which can conflict with char shmat(); below. */
3027 /* Override any gcc2 internal prototype to avoid an error. */
3028 /* We use char because int might match the return type of a gcc2
3029 builtin and then its argument prototype would still apply. */
3034 /* The GNU C library defines this for functions which it implements
3035 to always fail with ENOSYS. Some functions are actually named
3036 something starting with __ and the normal name is an alias. */
3037 #if defined (__stub_shmat) || defined (__stub___shmat)
3045 if { (eval echo configure:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3047 eval "ac_cv_func_shmat=yes"
3049 echo "configure: failed program was:" >&5
3050 cat conftest.$ac_ext >&5
3052 eval "ac_cv_func_shmat=no"
3057 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3058 echo "$ac_t""yes" 1>&6
3061 echo "$ac_t""no" 1>&6
3064 if test $ac_cv_func_shmat = no; then
3065 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3066 echo "configure:3078: checking for shmat in -lipc" >&5
3067 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3069 echo $ac_n "(cached) $ac_c" 1>&6
3071 ac_save_LIBS="$LIBS"
3073 cat > conftest.$ac_ext <<EOF
3074 #line 3086 "configure"
3075 #include "confdefs.h"
3076 /* Override any gcc2 internal prototype to avoid an error. */
3077 /* We use char because int might match the return type of a gcc2
3078 builtin and then its argument prototype would still apply. */
3085 if { (eval echo configure:3097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3087 eval "ac_cv_lib_$ac_lib_var=yes"
3089 echo "configure: failed program was:" >&5
3090 cat conftest.$ac_ext >&5
3092 eval "ac_cv_lib_$ac_lib_var=no"
3095 LIBS="$ac_save_LIBS"
3098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3099 echo "$ac_t""yes" 1>&6
3100 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3102 echo "$ac_t""no" 1>&6
3108 # Check for libraries that X11R6 Xt/Xaw programs need.
3109 ac_save_LDFLAGS="$LDFLAGS"
3110 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3111 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3112 # check for ICE first), but we must link in the order -lSM -lICE or
3113 # we get undefined symbols. So assume we have SM if we have ICE.
3114 # These have to be linked with before -lX11, unlike the other
3115 # libraries we check for below, so use a different variable.
3116 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3117 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3118 echo "configure:3130: checking for IceConnectionNumber in -lICE" >&5
3119 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3120 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3121 echo $ac_n "(cached) $ac_c" 1>&6
3123 ac_save_LIBS="$LIBS"
3124 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3125 cat > conftest.$ac_ext <<EOF
3126 #line 3138 "configure"
3127 #include "confdefs.h"
3128 /* Override any gcc2 internal prototype to avoid an error. */
3129 /* We use char because int might match the return type of a gcc2
3130 builtin and then its argument prototype would still apply. */
3131 char IceConnectionNumber();
3134 IceConnectionNumber()
3137 if { (eval echo configure:3149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3139 eval "ac_cv_lib_$ac_lib_var=yes"
3141 echo "configure: failed program was:" >&5
3142 cat conftest.$ac_ext >&5
3144 eval "ac_cv_lib_$ac_lib_var=no"
3147 LIBS="$ac_save_LIBS"
3150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3151 echo "$ac_t""yes" 1>&6
3152 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3154 echo "$ac_t""no" 1>&6
3157 LDFLAGS="$ac_save_LDFLAGS"
3162 if test "$have_x" != yes; then
3163 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3167 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3168 echo "configure:3180: checking for X app-defaults directory" >&5
3169 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3170 echo $ac_n "(cached) $ac_c" 1>&6
3174 if mkdir conftestdir; then
3176 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3177 cat > Imakefile <<'EOF'
3179 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3181 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3182 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3183 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3188 if test x"$ac_x_app_defaults" = x; then
3190 # Look for the directory under a standard set of common directories.
3191 # Check X11 before X11Rn because it's often a symlink to the current release.
3193 /usr/X11/lib/app-defaults \
3194 /usr/X11R6/lib/app-defaults \
3195 /usr/X11R6/lib/X11/app-defaults \
3196 /usr/X11R5/lib/app-defaults \
3197 /usr/X11R5/lib/X11/app-defaults \
3198 /usr/X11R4/lib/app-defaults \
3199 /usr/X11R4/lib/X11/app-defaults \
3201 /usr/lib/X11/app-defaults \
3202 /usr/lib/X11R6/app-defaults \
3203 /usr/lib/X11R5/app-defaults \
3204 /usr/lib/X11R4/app-defaults \
3206 /usr/local/X11/lib/app-defaults \
3207 /usr/local/X11R6/lib/app-defaults \
3208 /usr/local/X11R5/lib/app-defaults \
3209 /usr/local/X11R4/lib/app-defaults \
3211 /usr/local/lib/X11/app-defaults \
3212 /usr/local/lib/X11R6/app-defaults \
3213 /usr/local/lib/X11R6/X11/app-defaults \
3214 /usr/local/lib/X11R5/app-defaults \
3215 /usr/local/lib/X11R5/X11/app-defaults \
3216 /usr/local/lib/X11R4/app-defaults \
3217 /usr/local/lib/X11R4/X11/app-defaults \
3219 /usr/X386/lib/X11/app-defaults \
3220 /usr/x386/lib/X11/app-defaults \
3221 /usr/XFree86/lib/X11/app-defaults \
3223 /usr/lib/X11/app-defaults \
3224 /usr/local/lib/X11/app-defaults \
3225 /usr/unsupported/lib/X11/app-defaults \
3226 /usr/athena/lib/X11/app-defaults \
3227 /usr/local/x11r5/lib/X11/app-defaults \
3228 /usr/lpp/Xamples/lib/X11/app-defaults \
3229 /lib/usr/lib/X11/app-defaults \
3231 /usr/openwin/lib/app-defaults \
3232 /usr/openwin/lib/X11/app-defaults \
3233 /usr/openwin/share/lib/app-defaults \
3234 /usr/openwin/share/lib/X11/app-defaults \
3236 /X11R6/lib/app-defaults \
3237 /X11R5/lib/app-defaults \
3238 /X11R4/lib/app-defaults \
3241 if test -d "$ac_dir"; then
3242 ac_x_app_defaults=$ac_dir
3248 if test x"$ac_x_app_defaults" = x; then
3249 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3251 # Record where we found app-defaults for the cache.
3252 ac_cv_x_app_defaults="$ac_x_app_defaults"
3256 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3257 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3261 # The following arcana was gleaned from conversations with
3262 # Eric Schwartz <erics@col.hp.com>:
3264 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3265 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3266 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3267 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3268 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3269 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3270 # you don't need any -I or -L arguments.
3272 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3273 # are the same division as 10.x. However, there are no symlinks to
3274 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3275 # arguments are always necessary.
3277 # However, X11R6 was available on HPUX 9.x as a patch: if that
3278 # patch was installed, then all of X11R6 went in to
3279 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3281 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3282 # whether R5 was available as a patch; R6 undoubtedly was not.)
3284 # So. We try and use the highest numbered pair of
3285 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3286 # that are available. We do not mix and match different versions
3289 # Question I still don't know the answer to: (do you?)
3291 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3292 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3293 # that contrib directory? Did it contain so-called "standard"
3294 # X11R6, or did it include Xaw and Xmu as well? If the former,
3295 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3296 # be a situation where one had to reach into the R5 headers and
3297 # libs to find Xmu? That is, must both R6 and R5 directories
3298 # be on the -I and -L lists in that case?
3300 for version in X11R6 X11R5 X11R4 ; do
3301 # if either pair of directories exists...
3302 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3304 # if contrib exists, use it...
3305 if test -d /usr/contrib/$version/lib ; then
3306 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3307 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3309 # if the "standard" one exists, use it.
3310 if test -d /usr/lib/$version ; then
3311 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3312 X_LIBS="$X_LIBS -L/usr/lib/$version"
3314 # since at least one of the pair exists, go no farther.
3319 # Now find Motif. Thanks for not making xmkmf find this by
3320 # default, you losers.
3322 if test -d /usr/lib/Motif1.2 ; then
3323 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3324 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3325 elif test -d /usr/lib/Motif1.1 ; then
3326 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3327 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3330 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3332 if test -d /opt/Mesa/lib ; then
3333 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3334 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3337 if test -d /opt/xpm/lib/X11 ; then
3338 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3339 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3342 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3343 # in /usr/local/, unless there is already an xscreensaver in
3344 # /usr/local/bin/. This can be overridden with the --prefix arg
3345 # to configure. I'm not sure this is the right thing to do, but
3346 # Richard Lloyd says so...
3348 if test \! -x /usr/local/bin/xscreensaver ; then
3349 ac_default_prefix=/opt/xscreensaver
3355 # Thanks for not making xmkmf find this by default, pinheads.
3356 # And thanks for moving things around again, too. Is this
3357 # really the standard location now? What happened to the
3358 # joke that this kind of thing went in /opt?
3359 # cthomp says "answer: CDE (Common Disorganized Environment)"
3361 if test -f /usr/dt/include/Xm/Xm.h ; then
3362 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3363 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3365 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3366 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3367 echo "configure:3379: checking for regcmp in -lgen" >&5
3368 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3369 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3370 echo $ac_n "(cached) $ac_c" 1>&6
3372 ac_save_LIBS="$LIBS"
3374 cat > conftest.$ac_ext <<EOF
3375 #line 3387 "configure"
3376 #include "confdefs.h"
3377 /* Override any gcc2 internal prototype to avoid an error. */
3378 /* We use char because int might match the return type of a gcc2
3379 builtin and then its argument prototype would still apply. */
3386 if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3388 eval "ac_cv_lib_$ac_lib_var=yes"
3390 echo "configure: failed program was:" >&5
3391 cat conftest.$ac_ext >&5
3393 eval "ac_cv_lib_$ac_lib_var=no"
3396 LIBS="$ac_save_LIBS"
3399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3400 echo "$ac_t""yes" 1>&6
3401 X_LIBS="$X_LIBS -lgen"
3403 echo "$ac_t""no" 1>&6
3409 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3410 echo "configure:3422: checking for XPointer" >&5
3411 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3412 echo $ac_n "(cached) $ac_c" 1>&6
3415 ac_save_CPPFLAGS="$CPPFLAGS"
3416 if test \! -z "$includedir" ; then
3417 CPPFLAGS="$CPPFLAGS -I$includedir"
3419 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3420 cat > conftest.$ac_ext <<EOF
3421 #line 3433 "configure"
3422 #include "confdefs.h"
3423 #include <X11/Xlib.h>
3425 XPointer foo = (XPointer) 0;
3428 if { (eval echo configure:3440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3432 echo "configure: failed program was:" >&5
3433 cat conftest.$ac_ext >&5
3438 CPPFLAGS="$ac_save_CPPFLAGS"
3441 echo "$ac_t""$ac_cv_xpointer" 1>&6
3442 if test "$ac_cv_xpointer" != yes; then
3443 cat >> confdefs.h <<\EOF
3444 #define XPointer char*
3451 ###############################################################################
3453 # Check for -lXmu (some fucked up vendors don't ship it...)
3455 ###############################################################################
3459 ac_save_CPPFLAGS="$CPPFLAGS"
3460 if test \! -z "$includedir" ; then
3461 CPPFLAGS="$CPPFLAGS -I$includedir"
3463 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3464 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3465 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3466 echo "configure:3478: checking for X11/Xmu/Error.h" >&5
3467 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3468 echo $ac_n "(cached) $ac_c" 1>&6
3470 cat > conftest.$ac_ext <<EOF
3471 #line 3483 "configure"
3472 #include "confdefs.h"
3473 #include <X11/Xmu/Error.h>
3475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3476 { (eval echo configure:3488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3478 if test -z "$ac_err"; then
3480 eval "ac_cv_header_$ac_safe=yes"
3483 echo "configure: failed program was:" >&5
3484 cat conftest.$ac_ext >&5
3486 eval "ac_cv_header_$ac_safe=no"
3490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3491 echo "$ac_t""yes" 1>&6
3494 echo "$ac_t""no" 1>&6
3497 CPPFLAGS="$ac_save_CPPFLAGS"
3498 if test "$have_xmu" = no ; then
3499 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3500 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3504 SAVER_LIBS="-lXmu $SAVER_LIBS"
3505 HACK_LIBS="-lXmu $HACK_LIBS"
3506 MOTIF_LIBS="-lXmu $MOTIF_LIBS"
3507 GTK_LIBS="-lXmu $GTK_LIBS"
3508 ATHENA_LIBS="-lXmu $ATHENA_LIBS"
3509 ATHENA3D_LIBS="-lXmu $ATHENA3D_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"
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"
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"
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"
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"
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"
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 ###############################################################################
6065 ###############################################################################
6068 with_gtk_req=unspecified
6069 # Check whether --with-gtk or --without-gtk was given.
6070 if test "${with_gtk+set}" = set; then
6072 with_gtk="$withval"; with_gtk_req="$withval"
6078 # if --with-gtk=/directory/ was specified, remember that directory so that
6079 # we can also look for the `gtk-config' program in that directory.
6095 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6096 echo "configure:6108: checking for Gtk headers" >&5
6099 X_CFLAGS="-I$d $X_CFLAGS"
6100 echo "$ac_t""$d" 1>&6
6102 echo "$ac_t""not found ($d: no such directory)" 1>&6
6105 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6106 echo "configure:6118: checking for Gtk libs" >&5
6109 X_LIBS="-L$d $X_LIBS"
6110 echo "$ac_t""$d" 1>&6
6112 echo "$ac_t""not found ($d: no such directory)" 1>&6
6115 # replace the directory string with "yes".
6117 with_gtk=$with_gtk_req
6122 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6123 echo " If it is a directory, then \`DIR/include' will be added to"
6124 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6130 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6131 echo "error: must be yes or no: --with-gtk=$with_gtk"
6136 if test "$with_gtk" = yes; then
6139 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6140 # for glib-config and gtk-config.
6144 if test ! -z "$gtk_dir"; then
6145 # canonicalize slashes.
6146 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6147 gtk_path="$gtk_dir:$gtk_dir:$gtk_path"
6150 for ac_prog in glib-config
6152 # Extract the first word of "$ac_prog", so it can be a program name with args.
6153 set dummy $ac_prog; ac_word=$2
6154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6155 echo "configure:6167: checking for $ac_word" >&5
6156 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6157 echo $ac_n "(cached) $ac_c" 1>&6
6159 case "$glib_config" in
6161 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6164 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6167 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6168 ac_dummy="$gtk_path"
6169 for ac_dir in $ac_dummy; do
6170 test -z "$ac_dir" && ac_dir=.
6171 if test -f $ac_dir/$ac_word; then
6172 ac_cv_path_glib_config="$ac_dir/$ac_word"
6180 glib_config="$ac_cv_path_glib_config"
6181 if test -n "$glib_config"; then
6182 echo "$ac_t""$glib_config" 1>&6
6184 echo "$ac_t""no" 1>&6
6187 test -n "$glib_config" && break
6190 for ac_prog in gtk-config
6192 # Extract the first word of "$ac_prog", so it can be a program name with args.
6193 set dummy $ac_prog; ac_word=$2
6194 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6195 echo "configure:6207: checking for $ac_word" >&5
6196 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6197 echo $ac_n "(cached) $ac_c" 1>&6
6199 case "$gtk_config" in
6201 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6204 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6207 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6208 ac_dummy="$gtk_path"
6209 for ac_dir in $ac_dummy; do
6210 test -z "$ac_dir" && ac_dir=.
6211 if test -f $ac_dir/$ac_word; then
6212 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6220 gtk_config="$ac_cv_path_gtk_config"
6221 if test -n "$gtk_config"; then
6222 echo "$ac_t""$gtk_config" 1>&6
6224 echo "$ac_t""no" 1>&6
6227 test -n "$gtk_config" && break
6231 if test -n "$glib_config" -a -n "gtk_config" ; then
6234 if test "$have_gtk" = yes; then
6235 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6236 echo "configure:6248: checking Gtk version number" >&5
6237 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6238 echo $ac_n "(cached) $ac_c" 1>&6
6240 ac_cv_gtk_version_string=`$glib_config --version`
6243 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6244 ac_gtk_version_string=$ac_cv_gtk_version_string
6247 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6248 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6250 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6251 if test -z "$ac_gtk_version"; then
6252 ac_gtk_version=unknown
6253 ac_gtk_version_string=unknown
6255 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6261 if test "$have_gtk" = yes; then
6262 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6263 echo "configure:6275: checking for Gtk includes" >&5
6264 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6265 echo $ac_n "(cached) $ac_c" 1>&6
6267 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6270 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6271 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6272 echo "configure:6284: checking for Gtk libs" >&5
6273 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6274 echo $ac_n "(cached) $ac_c" 1>&6
6276 ac_cv_gtk_config_libs=`$gtk_config --libs`
6279 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6280 INCLUDES="$INCLUDES $ac_cv_gtk_config_cflags"
6281 GTK_LIBS="$GTK_LIBS $ac_cv_gtk_config_libs"
6282 cat >> confdefs.h <<\EOF
6290 ###############################################################################
6292 # Check for -lXaw and -lXaw3d.
6294 ###############################################################################
6298 with_athena_req=unspecified
6299 # Check whether --with-athena or --without-athena was given.
6300 if test "${with_athena+set}" = set; then
6301 withval="$with_athena"
6302 with_athena="$withval"; with_athena_req="$withval"
6309 case "$with_athena" in
6314 echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
6315 echo "configure:6327: checking for Athena headers" >&5
6316 d=$with_athena/include
6318 X_CFLAGS="-I$d $X_CFLAGS"
6319 echo "$ac_t""$d" 1>&6
6321 echo "$ac_t""not found ($d: no such directory)" 1>&6
6324 echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
6325 echo "configure:6337: checking for Athena libs" >&5
6328 X_LIBS="-L$d $X_LIBS"
6329 echo "$ac_t""$d" 1>&6
6331 echo "$ac_t""not found ($d: no such directory)" 1>&6
6334 # replace the directory string with "yes".
6335 with_athena_req="yes"
6336 with_athena=$with_athena_req
6341 echo "error: argument to --with-athena must be \"yes\", \"no\", or a directory."
6342 echo " If it is a directory, then \`DIR/include' will be added to"
6343 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6350 if test "$with_athena" != yes -a "$with_athena" != no ; then
6351 echo "error: must be yes or no: --with-athena=$with_athena"
6356 if test "$with_athena" = yes; then
6359 ac_save_CPPFLAGS="$CPPFLAGS"
6360 if test \! -z "$includedir" ; then
6361 CPPFLAGS="$CPPFLAGS -I$includedir"
6363 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6364 ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
6365 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
6366 echo "configure:6378: checking for X11/Xaw/Dialog.h" >&5
6367 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6368 echo $ac_n "(cached) $ac_c" 1>&6
6370 cat > conftest.$ac_ext <<EOF
6371 #line 6383 "configure"
6372 #include "confdefs.h"
6373 #include <X11/Xaw/Dialog.h>
6375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6376 { (eval echo configure:6388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6378 if test -z "$ac_err"; then
6380 eval "ac_cv_header_$ac_safe=yes"
6383 echo "configure: failed program was:" >&5
6384 cat conftest.$ac_ext >&5
6386 eval "ac_cv_header_$ac_safe=no"
6390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6391 echo "$ac_t""yes" 1>&6
6394 echo "$ac_t""no" 1>&6
6397 CPPFLAGS="$ac_save_CPPFLAGS"
6398 if test "$have_athena" = yes; then
6400 ac_save_CPPFLAGS="$CPPFLAGS"
6401 ac_save_LDFLAGS="$LDFLAGS"
6402 # ac_save_LIBS="$LIBS"
6404 if test \! -z "$includedir" ; then
6405 CPPFLAGS="$CPPFLAGS -I$includedir"
6407 # note: $X_CFLAGS includes $x_includes
6408 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6410 if test \! -z "$libdir" ; then
6411 LDFLAGS="$LDFLAGS -L$libdir"
6413 # note: $X_LIBS includes $x_libraries
6414 LDFLAGS="$LDFLAGS $X_LIBS"
6416 echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
6417 echo "configure:6429: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
6418 ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'`
6419 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6420 echo $ac_n "(cached) $ac_c" 1>&6
6422 ac_save_LIBS="$LIBS"
6423 LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
6424 cat > conftest.$ac_ext <<EOF
6425 #line 6437 "configure"
6426 #include "confdefs.h"
6427 /* Override any gcc2 internal prototype to avoid an error. */
6428 /* We use char because int might match the return type of a gcc2
6429 builtin and then its argument prototype would still apply. */
6430 char Xaw3dComputeTopShadowRGB();
6433 Xaw3dComputeTopShadowRGB()
6436 if { (eval echo configure:6448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6438 eval "ac_cv_lib_$ac_lib_var=yes"
6440 echo "configure: failed program was:" >&5
6441 cat conftest.$ac_ext >&5
6443 eval "ac_cv_lib_$ac_lib_var=no"
6446 LIBS="$ac_save_LIBS"
6449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6450 echo "$ac_t""yes" 1>&6
6451 have_athena=yes; have_athena3d=yes
6453 echo "$ac_t""no" 1>&6
6457 CPPFLAGS="$ac_save_CPPFLAGS"
6458 LDFLAGS="$ac_save_LDFLAGS"
6459 # LIBS="$ac_save_LIBS"
6464 if test "$have_athena" = yes; then
6465 cat >> confdefs.h <<\EOF
6466 #define HAVE_ATHENA 1
6469 ATHENA_LIBS="-lXaw $ATHENA_LIBS"
6472 if test "$have_athena3d" = yes; then
6473 ATHENA3D_LIBS="-lXaw3d $ATHENA3D_LIBS"
6477 # If we have Athena, check whether it's a version that includes
6478 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
6479 if test "$have_athena" = yes ; then
6480 echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
6481 echo "configure:6493: checking for XawViewportSetCoordinates in Viewport.h" >&5
6482 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
6483 echo $ac_n "(cached) $ac_c" 1>&6
6485 ac_cv_have_XawViewportSetCoordinates=no
6487 ac_save_CPPFLAGS="$CPPFLAGS"
6488 if test \! -z "$includedir" ; then
6489 CPPFLAGS="$CPPFLAGS -I$includedir"
6491 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6492 cat > conftest.$ac_ext <<EOF
6493 #line 6505 "configure"
6494 #include "confdefs.h"
6495 #include <X11/Xaw/Viewport.h>
6497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6498 egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then
6500 ac_cv_have_XawViewportSetCoordinates=yes
6504 CPPFLAGS="$ac_save_CPPFLAGS"
6507 echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6
6508 if test "$ac_cv_have_XawViewportSetCoordinates" = yes ; then
6509 cat >> confdefs.h <<\EOF
6510 #define HAVE_XawViewportSetCoordinates 1
6517 ###############################################################################
6519 # Checking whether Motif is really Lesstif.
6521 ###############################################################################
6524 if test "$have_motif" = yes ; then
6525 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6526 echo "configure:6538: checking whether Motif is really LessTif" >&5
6527 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6528 echo $ac_n "(cached) $ac_c" 1>&6
6531 ac_save_CPPFLAGS="$CPPFLAGS"
6532 if test \! -z "$includedir" ; then
6533 CPPFLAGS="$CPPFLAGS -I$includedir"
6535 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6536 cat > conftest.$ac_ext <<EOF
6537 #line 6549 "configure"
6538 #include "confdefs.h"
6541 long vers = LesstifVersion;
6544 if { (eval echo configure:6556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6546 ac_cv_have_lesstif=yes
6548 echo "configure: failed program was:" >&5
6549 cat conftest.$ac_ext >&5
6551 ac_cv_have_lesstif=no
6554 CPPFLAGS="$ac_save_CPPFLAGS"
6557 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
6558 have_lesstif=$ac_cv_have_lesstif
6562 lesstif_version=unknown
6563 lesstif_version_string=unknown
6565 if test "$have_lesstif" = yes ; then
6567 echo unknown > conftest-lt
6568 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
6569 echo "configure:6581: checking LessTif version number" >&5
6570 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
6571 echo $ac_n "(cached) $ac_c" 1>&6
6574 ac_save_CPPFLAGS="$CPPFLAGS"
6575 if test \! -z "$includedir" ; then
6576 CPPFLAGS="$CPPFLAGS -I$includedir"
6578 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6579 if test "$cross_compiling" = yes; then
6580 ac_cv_lesstif_version=unknown
6581 ac_cv_lesstif_version_string=unknown
6583 cat > conftest.$ac_ext <<EOF
6584 #line 6596 "configure"
6585 #include "confdefs.h"
6589 FILE *f = fopen("conftest-lt", "w");
6591 fprintf(f, "%d %d.%d\n", LesstifVersion,
6592 LESSTIF_VERSION, LESSTIF_REVISION);
6597 if { (eval echo configure:6609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6599 ltv=`cat conftest-lt`
6600 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
6601 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
6603 echo "configure: failed program was:" >&5
6604 cat conftest.$ac_ext >&5
6606 ac_cv_lesstif_version=unknown
6607 ac_cv_lesstif_version_string=unknown
6612 CPPFLAGS="$ac_save_CPPFLAGS"
6615 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
6617 lesstif_version=$ac_cv_lesstif_version
6618 lesstif_version_string=$ac_cv_lesstif_version_string
6623 if test "$have_motif" = yes ; then
6625 echo unknown > conftest-mt
6626 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
6627 echo "configure:6639: checking Motif version number" >&5
6628 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
6629 echo $ac_n "(cached) $ac_c" 1>&6
6632 ac_save_CPPFLAGS="$CPPFLAGS"
6633 if test \! -z "$includedir" ; then
6634 CPPFLAGS="$CPPFLAGS -I$includedir"
6636 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6637 if test "$cross_compiling" = yes; then
6638 ac_cv_motif_version=unknown
6639 ac_cv_motif_version_string=unknown
6641 cat > conftest.$ac_ext <<EOF
6642 #line 6654 "configure"
6643 #include "confdefs.h"
6647 FILE *f = fopen("conftest-mt", "w");
6649 fprintf(f, "%d %d.%d\n", XmVersion,
6650 XmVERSION, XmREVISION);
6655 if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6657 mtv=`cat conftest-mt`
6658 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
6659 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
6661 echo "configure: failed program was:" >&5
6662 cat conftest.$ac_ext >&5
6664 ac_cv_motif_version=unknown
6665 ac_cv_motif_version_string=unknown
6670 CPPFLAGS="$ac_save_CPPFLAGS"
6673 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
6675 motif_version=$ac_cv_motif_version
6676 motif_version_string=$ac_cv_motif_version_string
6681 ###############################################################################
6683 # Checking whether Motif requires -lXpm.
6685 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
6686 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
6687 # of the library whether to build the XPM code into libXm, or whether
6688 # to rely on an external libXm. So the only way to tell whether XPM is
6689 # a link-time requirement is to examine libXm.a, which is very
6690 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
6691 # always link against XPM if the XPM lib exists (and this will be a
6692 # no-op if libXm happens to already have the XPM code in it.)
6694 ###############################################################################
6696 motif_requires_xpm=no
6697 if test "$have_motif" = yes ; then
6698 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
6699 echo "configure:6711: checking whether Motif requires XPM" >&5
6700 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
6702 motif_requires_xpm=yes
6703 echo "$ac_t""maybe" 1>&6
6705 echo "$ac_t""no" 1>&6
6710 ###############################################################################
6712 # Checking whether Motif requires -lXp.
6714 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
6715 # Extension". Why this extension isn't in -lXext with all the others,
6718 ###############################################################################
6721 if test "$have_motif" = yes ; then
6724 ac_save_CPPFLAGS="$CPPFLAGS"
6725 ac_save_LDFLAGS="$LDFLAGS"
6726 # ac_save_LIBS="$LIBS"
6728 if test \! -z "$includedir" ; then
6729 CPPFLAGS="$CPPFLAGS -I$includedir"
6731 # note: $X_CFLAGS includes $x_includes
6732 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6734 if test \! -z "$libdir" ; then
6735 LDFLAGS="$LDFLAGS -L$libdir"
6737 # note: $X_LIBS includes $x_libraries
6738 LDFLAGS="$LDFLAGS $X_LIBS"
6740 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
6741 echo "configure:6753: checking for XpQueryExtension in -lXp" >&5
6742 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
6743 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6744 echo $ac_n "(cached) $ac_c" 1>&6
6746 ac_save_LIBS="$LIBS"
6747 LIBS="-lXp -lX11 -lXext -lm $LIBS"
6748 cat > conftest.$ac_ext <<EOF
6749 #line 6761 "configure"
6750 #include "confdefs.h"
6751 /* Override any gcc2 internal prototype to avoid an error. */
6752 /* We use char because int might match the return type of a gcc2
6753 builtin and then its argument prototype would still apply. */
6754 char XpQueryExtension();
6760 if { (eval echo configure:6772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6762 eval "ac_cv_lib_$ac_lib_var=yes"
6764 echo "configure: failed program was:" >&5
6765 cat conftest.$ac_ext >&5
6767 eval "ac_cv_lib_$ac_lib_var=no"
6770 LIBS="$ac_save_LIBS"
6773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6774 echo "$ac_t""yes" 1>&6
6775 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
6777 echo "$ac_t""no" 1>&6
6781 CPPFLAGS="$ac_save_CPPFLAGS"
6782 LDFLAGS="$ac_save_LDFLAGS"
6783 # LIBS="$ac_save_LIBS"
6788 ###############################################################################
6790 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
6792 ###############################################################################
6795 if test "$have_motif" = yes ; then
6797 ac_save_CPPFLAGS="$CPPFLAGS"
6798 ac_save_LDFLAGS="$LDFLAGS"
6799 # ac_save_LIBS="$LIBS"
6801 if test \! -z "$includedir" ; then
6802 CPPFLAGS="$CPPFLAGS -I$includedir"
6804 # note: $X_CFLAGS includes $x_includes
6805 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6807 if test \! -z "$libdir" ; then
6808 LDFLAGS="$LDFLAGS -L$libdir"
6810 # note: $X_LIBS includes $x_libraries
6811 LDFLAGS="$LDFLAGS $X_LIBS"
6813 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
6814 echo "configure:6826: checking for _Xsetlocale in -lXintl" >&5
6815 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
6816 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6817 echo $ac_n "(cached) $ac_c" 1>&6
6819 ac_save_LIBS="$LIBS"
6820 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
6821 cat > conftest.$ac_ext <<EOF
6822 #line 6834 "configure"
6823 #include "confdefs.h"
6824 /* Override any gcc2 internal prototype to avoid an error. */
6825 /* We use char because int might match the return type of a gcc2
6826 builtin and then its argument prototype would still apply. */
6833 if { (eval echo configure:6845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6835 eval "ac_cv_lib_$ac_lib_var=yes"
6837 echo "configure: failed program was:" >&5
6838 cat conftest.$ac_ext >&5
6840 eval "ac_cv_lib_$ac_lib_var=no"
6843 LIBS="$ac_save_LIBS"
6846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6847 echo "$ac_t""yes" 1>&6
6850 echo "$ac_t""no" 1>&6
6854 CPPFLAGS="$ac_save_CPPFLAGS"
6855 LDFLAGS="$ac_save_LDFLAGS"
6856 # LIBS="$ac_save_LIBS"
6858 if test "$have_xintl" = yes; then
6859 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
6864 ###############################################################################
6866 # Check for -lGL or -lMesa.
6868 ###############################################################################
6872 with_gl_req=unspecified
6873 # Check whether --with-gl or --without-gl was given.
6874 if test "${with_gl+set}" = set; then
6876 with_gl="$withval"; with_gl_req="$withval"
6888 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
6889 echo "configure:6901: checking for GL headers" >&5
6892 X_CFLAGS="-I$d $X_CFLAGS"
6893 echo "$ac_t""$d" 1>&6
6895 echo "$ac_t""not found ($d: no such directory)" 1>&6
6898 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
6899 echo "configure:6911: checking for GL libs" >&5
6902 X_LIBS="-L$d $X_LIBS"
6903 echo "$ac_t""$d" 1>&6
6905 echo "$ac_t""not found ($d: no such directory)" 1>&6
6908 # replace the directory string with "yes".
6910 with_gl=$with_gl_req
6915 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
6916 echo " If it is a directory, then \`DIR/include' will be added to"
6917 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6923 ac_mesagl_version=unknown
6924 ac_mesagl_version_string=unknown
6926 if test "$with_gl" = yes; then
6928 ac_save_CPPFLAGS="$CPPFLAGS"
6929 if test \! -z "$includedir" ; then
6930 CPPFLAGS="$CPPFLAGS -I$includedir"
6932 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6933 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
6934 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
6935 echo "configure:6947: checking for GL/gl.h" >&5
6936 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6937 echo $ac_n "(cached) $ac_c" 1>&6
6939 cat > conftest.$ac_ext <<EOF
6940 #line 6952 "configure"
6941 #include "confdefs.h"
6944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6945 { (eval echo configure:6957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6947 if test -z "$ac_err"; then
6949 eval "ac_cv_header_$ac_safe=yes"
6952 echo "configure: failed program was:" >&5
6953 cat conftest.$ac_ext >&5
6955 eval "ac_cv_header_$ac_safe=no"
6959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6960 echo "$ac_t""yes" 1>&6
6963 echo "$ac_t""no" 1>&6
6966 CPPFLAGS="$ac_save_CPPFLAGS"
6967 if test "$have_gl" = yes ; then
6969 ac_save_CPPFLAGS="$CPPFLAGS"
6970 if test \! -z "$includedir" ; then
6971 CPPFLAGS="$CPPFLAGS -I$includedir"
6973 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6974 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
6975 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
6976 echo "configure:6988: checking for GL/glx.h" >&5
6977 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6978 echo $ac_n "(cached) $ac_c" 1>&6
6980 cat > conftest.$ac_ext <<EOF
6981 #line 6993 "configure"
6982 #include "confdefs.h"
6985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6986 { (eval echo configure:6998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6988 if test -z "$ac_err"; then
6990 eval "ac_cv_header_$ac_safe=yes"
6993 echo "configure: failed program was:" >&5
6994 cat conftest.$ac_ext >&5
6996 eval "ac_cv_header_$ac_safe=no"
7000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7001 echo "$ac_t""yes" 1>&6
7004 echo "$ac_t""no" 1>&6
7007 CPPFLAGS="$ac_save_CPPFLAGS"
7010 # If we have the headers, try and figure out which vendor it's from.
7012 if test "$have_gl" = yes ; then
7014 cat >> confdefs.h <<\EOF
7019 # We need to know whether it's MesaGL so that we know which libraries
7022 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7023 echo "configure:7035: checking whether GL is really MesaGL" >&5
7024 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7025 echo $ac_n "(cached) $ac_c" 1>&6
7027 ac_cv_have_mesa_gl=no
7029 ac_save_CPPFLAGS="$CPPFLAGS"
7030 if test \! -z "$includedir" ; then
7031 CPPFLAGS="$CPPFLAGS -I$includedir"
7033 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7034 cat > conftest.$ac_ext <<EOF
7035 #line 7047 "configure"
7036 #include "confdefs.h"
7039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7040 egrep "Mesa" >/dev/null 2>&1; then
7042 ac_cv_have_mesa_gl=yes
7046 CPPFLAGS="$ac_save_CPPFLAGS"
7050 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7051 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7053 if test "$ac_have_mesa_gl" = no ; then
7055 GL_LIBS="-lGL -lGLU"
7057 cat >> confdefs.h <<\EOF
7058 #define HAVE_MESA_GL 1
7062 GL_LIBS="-lMesaGL -lMesaGLU"
7066 # If it's MesaGL, we'd like to issue a warning if the version number
7067 # is less than or equal to 2.6, because that version had a security bug.
7069 if test "$ac_have_mesa_gl" = yes; then
7071 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7072 echo "configure:7084: checking MesaGL version number" >&5
7073 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7074 echo $ac_n "(cached) $ac_c" 1>&6
7076 cat > conftest.$ac_ext <<EOF
7077 #line 7089 "configure"
7078 #include "confdefs.h"
7080 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7083 ac_save_CPPFLAGS="$CPPFLAGS"
7084 if test \! -z "$includedir" ; then
7085 CPPFLAGS="$CPPFLAGS -I$includedir"
7087 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7091 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7092 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7095 rm -f conftest.$ac_ext
7097 CPPFLAGS="$ac_save_CPPFLAGS"
7099 if test "$mglv" = ""; then
7100 ac_mesagl_version=unknown
7101 ac_mesagl_version_string=unknown
7103 ac_mesagl_version_string=$mglv
7104 maj=`echo $mglv | sed -n 's/\..*//p'`
7105 min=`echo $mglv | sed -n 's/.*\.//p'`
7106 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7107 if test -z "$ac_mesagl_version"; then
7108 ac_mesagl_version=unknown
7109 ac_mesagl_version_string=unknown
7112 ac_cv_mesagl_version=$ac_mesagl_version
7113 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7117 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7118 ac_mesagl_version=$ac_cv_mesagl_version
7119 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7123 # If it's MesaGL, check to see if it requires -lpthread.
7126 mesa_requires_pthread=no
7127 if test "$ac_have_mesa_gl" = yes; then
7129 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7130 echo "configure:7142: checking for pthread_create in -lpthread" >&5
7131 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7133 echo $ac_n "(cached) $ac_c" 1>&6
7135 ac_save_LIBS="$LIBS"
7136 LIBS="-lpthread $LIBS"
7137 cat > conftest.$ac_ext <<EOF
7138 #line 7150 "configure"
7139 #include "confdefs.h"
7140 /* Override any gcc2 internal prototype to avoid an error. */
7141 /* We use char because int might match the return type of a gcc2
7142 builtin and then its argument prototype would still apply. */
7143 char pthread_create();
7149 if { (eval echo configure:7161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7151 eval "ac_cv_lib_$ac_lib_var=yes"
7153 echo "configure: failed program was:" >&5
7154 cat conftest.$ac_ext >&5
7156 eval "ac_cv_lib_$ac_lib_var=no"
7159 LIBS="$ac_save_LIBS"
7162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7163 echo "$ac_t""yes" 1>&6
7166 echo "$ac_t""no" 1>&6
7169 if test "$have_pthread" = yes; then
7171 ac_save_CPPFLAGS="$CPPFLAGS"
7172 ac_save_LDFLAGS="$LDFLAGS"
7173 # ac_save_LIBS="$LIBS"
7175 if test \! -z "$includedir" ; then
7176 CPPFLAGS="$CPPFLAGS -I$includedir"
7178 # note: $X_CFLAGS includes $x_includes
7179 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7181 if test \! -z "$libdir" ; then
7182 LDFLAGS="$LDFLAGS -L$libdir"
7184 # note: $X_LIBS includes $x_libraries
7185 LDFLAGS="$LDFLAGS $X_LIBS"
7187 echo $ac_n "checking for gl_get_thread_context in -l$gl_lib_1""... $ac_c" 1>&6
7188 echo "configure:7200: checking for gl_get_thread_context in -l$gl_lib_1" >&5
7189 ac_lib_var=`echo $gl_lib_1'_'gl_get_thread_context | sed 'y%./+-%__p_%'`
7190 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7191 echo $ac_n "(cached) $ac_c" 1>&6
7193 ac_save_LIBS="$LIBS"
7194 LIBS="-l$gl_lib_1 $GL_LIBS -lpthread -lX11 -lXext -lm $LIBS"
7195 cat > conftest.$ac_ext <<EOF
7196 #line 7208 "configure"
7197 #include "confdefs.h"
7198 /* Override any gcc2 internal prototype to avoid an error. */
7199 /* We use char because int might match the return type of a gcc2
7200 builtin and then its argument prototype would still apply. */
7201 char gl_get_thread_context();
7204 gl_get_thread_context()
7207 if { (eval echo configure:7219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7209 eval "ac_cv_lib_$ac_lib_var=yes"
7211 echo "configure: failed program was:" >&5
7212 cat conftest.$ac_ext >&5
7214 eval "ac_cv_lib_$ac_lib_var=no"
7217 LIBS="$ac_save_LIBS"
7220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7221 echo "$ac_t""yes" 1>&6
7222 mesa_requires_pthread=yes
7224 echo "$ac_t""no" 1>&6
7228 CPPFLAGS="$ac_save_CPPFLAGS"
7229 LDFLAGS="$ac_save_LDFLAGS"
7230 # LIBS="$ac_save_LIBS"
7234 if test "$mesa_requires_pthread" = yes; then
7235 GL_LIBS="$GL_LIBS -lpthread"
7239 # Check for OpenGL 1.1 features.
7242 ac_save_CPPFLAGS="$CPPFLAGS"
7243 ac_save_LDFLAGS="$LDFLAGS"
7244 # ac_save_LIBS="$LIBS"
7246 if test \! -z "$includedir" ; then
7247 CPPFLAGS="$CPPFLAGS -I$includedir"
7249 # note: $X_CFLAGS includes $x_includes
7250 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7252 if test \! -z "$libdir" ; then
7253 LDFLAGS="$LDFLAGS -L$libdir"
7255 # note: $X_LIBS includes $x_libraries
7256 LDFLAGS="$LDFLAGS $X_LIBS"
7258 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7259 echo "configure:7271: checking for glBindTexture in -l$gl_lib_1" >&5
7260 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7262 echo $ac_n "(cached) $ac_c" 1>&6
7264 ac_save_LIBS="$LIBS"
7265 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7266 cat > conftest.$ac_ext <<EOF
7267 #line 7279 "configure"
7268 #include "confdefs.h"
7269 /* Override any gcc2 internal prototype to avoid an error. */
7270 /* We use char because int might match the return type of a gcc2
7271 builtin and then its argument prototype would still apply. */
7272 char glBindTexture();
7278 if { (eval echo configure:7290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7280 eval "ac_cv_lib_$ac_lib_var=yes"
7282 echo "configure: failed program was:" >&5
7283 cat conftest.$ac_ext >&5
7285 eval "ac_cv_lib_$ac_lib_var=no"
7288 LIBS="$ac_save_LIBS"
7291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7292 echo "$ac_t""yes" 1>&6
7293 cat >> confdefs.h <<\EOF
7294 #define HAVE_GLBINDTEXTURE 1
7298 echo "$ac_t""no" 1>&6
7302 CPPFLAGS="$ac_save_CPPFLAGS"
7303 LDFLAGS="$ac_save_LDFLAGS"
7304 # LIBS="$ac_save_LIBS"
7308 # Check whether the `xscreensaver' executable should link against GL.
7309 # See comments in utils/visual-gl.c for why this is sometimes necessary.
7311 echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6
7312 echo "configure:7324: checking whether drastic GL measures must be taken" >&5
7315 echo "$ac_t""yes -- hello, SGI." 1>&6
7316 cat >> confdefs.h <<\EOF
7317 #define DAEMON_USE_GL 1
7320 SAVER_GL_SRCS='$(UTILS_SRC)/visual-gl.c'
7321 SAVER_GL_OBJS='$(UTILS_BIN)/visual-gl.o'
7322 SAVER_GL_LIBS="$GL_LIBS"
7325 echo "$ac_t""no -- non-SGI." 1>&6
7334 elif test "$with_gl" != no; then
7335 echo "error: must be yes or no: --with-gl=$with_gl"
7340 ###############################################################################
7344 ###############################################################################
7347 with_xpm_req=unspecified
7348 # Check whether --with-xpm or --without-xpm was given.
7349 if test "${with_xpm+set}" = set; then
7351 with_xpm="$withval"; with_xpm_req="$withval"
7363 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
7364 echo "configure:7376: checking for XPM headers" >&5
7367 X_CFLAGS="-I$d $X_CFLAGS"
7368 echo "$ac_t""$d" 1>&6
7370 echo "$ac_t""not found ($d: no such directory)" 1>&6
7373 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
7374 echo "configure:7386: checking for XPM libs" >&5
7377 X_LIBS="-L$d $X_LIBS"
7378 echo "$ac_t""$d" 1>&6
7380 echo "$ac_t""not found ($d: no such directory)" 1>&6
7383 # replace the directory string with "yes".
7385 with_xpm=$with_xpm_req
7390 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
7391 echo " If it is a directory, then \`DIR/include' will be added to"
7392 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7398 if test "$with_xpm" = yes; then
7400 ac_save_CPPFLAGS="$CPPFLAGS"
7401 if test \! -z "$includedir" ; then
7402 CPPFLAGS="$CPPFLAGS -I$includedir"
7404 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7405 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
7406 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
7407 echo "configure:7419: checking for X11/xpm.h" >&5
7408 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7409 echo $ac_n "(cached) $ac_c" 1>&6
7411 cat > conftest.$ac_ext <<EOF
7412 #line 7424 "configure"
7413 #include "confdefs.h"
7414 #include <X11/xpm.h>
7416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7417 { (eval echo configure:7429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7419 if test -z "$ac_err"; then
7421 eval "ac_cv_header_$ac_safe=yes"
7424 echo "configure: failed program was:" >&5
7425 cat conftest.$ac_ext >&5
7427 eval "ac_cv_header_$ac_safe=no"
7431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7432 echo "$ac_t""yes" 1>&6
7434 cat >> confdefs.h <<\EOF
7440 echo "$ac_t""no" 1>&6
7443 CPPFLAGS="$ac_save_CPPFLAGS"
7444 elif test "$with_xpm" != no; then
7445 echo "error: must be yes or no: --with-xpm=$with_xpm"
7449 # See comment near $motif_requires_xpm, above.
7450 # Need to do this here, after both Motif and XPM have been checked for.
7452 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
7453 if test "$motif_requires_xpm" = yes ; then
7454 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
7459 ###############################################################################
7461 # Check for the XSHM server extension.
7463 ###############################################################################
7466 with_xshm_req=unspecified
7467 # Check whether --with-xshm-ext or --without-xshm-ext was given.
7468 if test "${with_xshm_ext+set}" = set; then
7469 withval="$with_xshm_ext"
7470 with_xshm="$withval"; with_xshm_req="$withval"
7477 case "$with_xshm" in
7482 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
7483 echo "configure:7495: checking for XSHM headers" >&5
7484 d=$with_xshm/include
7486 X_CFLAGS="-I$d $X_CFLAGS"
7487 echo "$ac_t""$d" 1>&6
7489 echo "$ac_t""not found ($d: no such directory)" 1>&6
7492 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
7493 echo "configure:7505: checking for XSHM libs" >&5
7496 X_LIBS="-L$d $X_LIBS"
7497 echo "$ac_t""$d" 1>&6
7499 echo "$ac_t""not found ($d: no such directory)" 1>&6
7502 # replace the directory string with "yes".
7504 with_xshm=$with_xshm_req
7509 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
7510 echo " If it is a directory, then \`DIR/include' will be added to"
7511 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7517 if test "$with_xshm" = yes; then
7519 # first check for Xshm.h.
7521 ac_save_CPPFLAGS="$CPPFLAGS"
7522 if test \! -z "$includedir" ; then
7523 CPPFLAGS="$CPPFLAGS -I$includedir"
7525 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7526 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
7527 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
7528 echo "configure:7540: checking for X11/extensions/XShm.h" >&5
7529 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7530 echo $ac_n "(cached) $ac_c" 1>&6
7532 cat > conftest.$ac_ext <<EOF
7533 #line 7545 "configure"
7534 #include "confdefs.h"
7535 #include <X11/extensions/XShm.h>
7537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7538 { (eval echo configure:7550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7540 if test -z "$ac_err"; then
7542 eval "ac_cv_header_$ac_safe=yes"
7545 echo "configure: failed program was:" >&5
7546 cat conftest.$ac_ext >&5
7548 eval "ac_cv_header_$ac_safe=no"
7552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7553 echo "$ac_t""yes" 1>&6
7556 echo "$ac_t""no" 1>&6
7559 CPPFLAGS="$ac_save_CPPFLAGS"
7561 # if that succeeded, then check for sys/ipc.h.
7562 if test "$have_xshm" = yes; then
7565 ac_save_CPPFLAGS="$CPPFLAGS"
7566 if test \! -z "$includedir" ; then
7567 CPPFLAGS="$CPPFLAGS -I$includedir"
7569 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7570 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
7571 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
7572 echo "configure:7584: checking for sys/ipc.h" >&5
7573 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7574 echo $ac_n "(cached) $ac_c" 1>&6
7576 cat > conftest.$ac_ext <<EOF
7577 #line 7589 "configure"
7578 #include "confdefs.h"
7579 #include <sys/ipc.h>
7581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7582 { (eval echo configure:7594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7584 if test -z "$ac_err"; then
7586 eval "ac_cv_header_$ac_safe=yes"
7589 echo "configure: failed program was:" >&5
7590 cat conftest.$ac_ext >&5
7592 eval "ac_cv_header_$ac_safe=no"
7596 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7597 echo "$ac_t""yes" 1>&6
7600 echo "$ac_t""no" 1>&6
7603 CPPFLAGS="$ac_save_CPPFLAGS"
7606 # if that succeeded, then check for sys/shm.h.
7607 if test "$have_xshm" = yes; then
7610 ac_save_CPPFLAGS="$CPPFLAGS"
7611 if test \! -z "$includedir" ; then
7612 CPPFLAGS="$CPPFLAGS -I$includedir"
7614 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7615 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
7616 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
7617 echo "configure:7629: checking for sys/shm.h" >&5
7618 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7619 echo $ac_n "(cached) $ac_c" 1>&6
7621 cat > conftest.$ac_ext <<EOF
7622 #line 7634 "configure"
7623 #include "confdefs.h"
7624 #include <sys/shm.h>
7626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7627 { (eval echo configure:7639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7629 if test -z "$ac_err"; then
7631 eval "ac_cv_header_$ac_safe=yes"
7634 echo "configure: failed program was:" >&5
7635 cat conftest.$ac_ext >&5
7637 eval "ac_cv_header_$ac_safe=no"
7641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7642 echo "$ac_t""yes" 1>&6
7645 echo "$ac_t""no" 1>&6
7648 CPPFLAGS="$ac_save_CPPFLAGS"
7651 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
7652 # to exist, but the library code to not exist. And even better, the library
7653 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
7654 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
7655 # that's not quite right, but close enough.)
7661 ac_save_CPPFLAGS="$CPPFLAGS"
7662 ac_save_LDFLAGS="$LDFLAGS"
7663 # ac_save_LIBS="$LIBS"
7665 if test \! -z "$includedir" ; then
7666 CPPFLAGS="$CPPFLAGS -I$includedir"
7668 # note: $X_CFLAGS includes $x_includes
7669 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7671 if test \! -z "$libdir" ; then
7672 LDFLAGS="$LDFLAGS -L$libdir"
7674 # note: $X_LIBS includes $x_libraries
7675 LDFLAGS="$LDFLAGS $X_LIBS"
7677 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
7678 echo "configure:7690: checking for XShmQueryExtension in -lXextSam" >&5
7679 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
7680 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7681 echo $ac_n "(cached) $ac_c" 1>&6
7683 ac_save_LIBS="$LIBS"
7684 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
7685 cat > conftest.$ac_ext <<EOF
7686 #line 7698 "configure"
7687 #include "confdefs.h"
7688 /* Override any gcc2 internal prototype to avoid an error. */
7689 /* We use char because int might match the return type of a gcc2
7690 builtin and then its argument prototype would still apply. */
7691 char XShmQueryExtension();
7694 XShmQueryExtension()
7697 if { (eval echo configure:7709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7699 eval "ac_cv_lib_$ac_lib_var=yes"
7701 echo "configure: failed program was:" >&5
7702 cat conftest.$ac_ext >&5
7704 eval "ac_cv_lib_$ac_lib_var=no"
7707 LIBS="$ac_save_LIBS"
7710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7711 echo "$ac_t""yes" 1>&6
7712 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
7714 echo "$ac_t""no" 1>&6
7718 CPPFLAGS="$ac_save_CPPFLAGS"
7719 LDFLAGS="$ac_save_LDFLAGS"
7720 # LIBS="$ac_save_LIBS"
7725 # if that succeeded, then we've really got it.
7726 if test "$have_xshm" = yes; then
7727 cat >> confdefs.h <<\EOF
7728 #define HAVE_XSHM_EXTENSION 1
7733 elif test "$with_xshm" != no; then
7734 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
7739 ###############################################################################
7741 # Check for the DOUBLE-BUFFER server extension.
7743 ###############################################################################
7746 with_xdbe_req=unspecified
7747 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
7748 if test "${with_xdbe_ext+set}" = set; then
7749 withval="$with_xdbe_ext"
7750 with_xdbe="$withval"; with_xdbe_req="$withval"
7757 case "$with_xdbe" in
7762 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
7763 echo "configure:7775: checking for DOUBLE-BUFFER headers" >&5
7764 d=$with_xdbe/include
7766 X_CFLAGS="-I$d $X_CFLAGS"
7767 echo "$ac_t""$d" 1>&6
7769 echo "$ac_t""not found ($d: no such directory)" 1>&6
7772 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
7773 echo "configure:7785: checking for DOUBLE-BUFFER libs" >&5
7776 X_LIBS="-L$d $X_LIBS"
7777 echo "$ac_t""$d" 1>&6
7779 echo "$ac_t""not found ($d: no such directory)" 1>&6
7782 # replace the directory string with "yes".
7784 with_xdbe=$with_xdbe_req
7789 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
7790 echo " If it is a directory, then \`DIR/include' will be added to"
7791 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7797 if test "$with_xdbe" = yes; then
7800 ac_save_CPPFLAGS="$CPPFLAGS"
7801 if test \! -z "$includedir" ; then
7802 CPPFLAGS="$CPPFLAGS -I$includedir"
7804 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7805 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
7806 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
7807 echo "configure:7819: checking for X11/extensions/Xdbe.h" >&5
7808 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7809 echo $ac_n "(cached) $ac_c" 1>&6
7811 cat > conftest.$ac_ext <<EOF
7812 #line 7824 "configure"
7813 #include "confdefs.h"
7814 #include <X11/extensions/Xdbe.h>
7816 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7817 { (eval echo configure:7829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7818 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7819 if test -z "$ac_err"; then
7821 eval "ac_cv_header_$ac_safe=yes"
7824 echo "configure: failed program was:" >&5
7825 cat conftest.$ac_ext >&5
7827 eval "ac_cv_header_$ac_safe=no"
7831 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7832 echo "$ac_t""yes" 1>&6
7835 echo "$ac_t""no" 1>&6
7838 CPPFLAGS="$ac_save_CPPFLAGS"
7839 if test "$have_xdbe" = yes; then
7840 cat >> confdefs.h <<\EOF
7841 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
7846 elif test "$with_xdbe" != no; then
7847 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
7852 ###############################################################################
7854 # Check for the SGI XReadDisplay server extension.
7856 # Note: this has to be down here, rather than up with the other server
7857 # extension tests, so that the output of `configure --help' is in the
7858 # right order. Arrgh!
7860 ###############################################################################
7863 with_readdisplay_req=unspecified
7864 # Check whether --with-readdisplay or --without-readdisplay was given.
7865 if test "${with_readdisplay+set}" = set; then
7866 withval="$with_readdisplay"
7867 with_readdisplay="$withval"; with_readdisplay_req="$withval"
7869 with_readdisplay=yes
7874 case "$with_readdisplay" in
7879 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
7880 echo "configure:7892: checking for XReadDisplay headers" >&5
7881 d=$with_readdisplay/include
7883 X_CFLAGS="-I$d $X_CFLAGS"
7884 echo "$ac_t""$d" 1>&6
7886 echo "$ac_t""not found ($d: no such directory)" 1>&6
7889 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
7890 echo "configure:7902: checking for XReadDisplay libs" >&5
7891 d=$with_readdisplay/lib
7893 X_LIBS="-L$d $X_LIBS"
7894 echo "$ac_t""$d" 1>&6
7896 echo "$ac_t""not found ($d: no such directory)" 1>&6
7899 # replace the directory string with "yes".
7900 with_readdisplay_req="yes"
7901 with_readdisplay=$with_readdisplay_req
7906 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
7907 echo " If it is a directory, then \`DIR/include' will be added to"
7908 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7914 if test "$with_readdisplay" = yes; then
7916 ac_save_CPPFLAGS="$CPPFLAGS"
7917 if test \! -z "$includedir" ; then
7918 CPPFLAGS="$CPPFLAGS -I$includedir"
7920 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7921 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
7922 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
7923 echo "configure:7935: checking for X11/extensions/readdisplay.h" >&5
7924 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7925 echo $ac_n "(cached) $ac_c" 1>&6
7927 cat > conftest.$ac_ext <<EOF
7928 #line 7940 "configure"
7929 #include "confdefs.h"
7930 #include <X11/extensions/readdisplay.h>
7932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7933 { (eval echo configure:7945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7935 if test -z "$ac_err"; then
7937 eval "ac_cv_header_$ac_safe=yes"
7940 echo "configure: failed program was:" >&5
7941 cat conftest.$ac_ext >&5
7943 eval "ac_cv_header_$ac_safe=no"
7947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7948 echo "$ac_t""yes" 1>&6
7949 cat >> confdefs.h <<\EOF
7950 #define HAVE_READ_DISPLAY_EXTENSION 1
7954 echo "$ac_t""no" 1>&6
7957 CPPFLAGS="$ac_save_CPPFLAGS"
7958 elif test "$with_readdisplay" != no; then
7959 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
7964 ###############################################################################
7966 # Check for the SGI Iris Video Library.
7968 ###############################################################################
7971 with_sgivideo_req=unspecified
7972 # Check whether --with-sgivideo or --without-sgivideo was given.
7973 if test "${with_sgivideo+set}" = set; then
7974 withval="$with_sgivideo"
7975 with_sgivideo="$withval"; with_sgivideo_req="$withval"
7982 case "$with_sgivideo" in
7987 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
7988 echo "configure:8000: checking for Iris Video headers" >&5
7989 d=$with_sgivideo/include
7991 X_CFLAGS="-I$d $X_CFLAGS"
7992 echo "$ac_t""$d" 1>&6
7994 echo "$ac_t""not found ($d: no such directory)" 1>&6
7997 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
7998 echo "configure:8010: checking for Iris Video libs" >&5
7999 d=$with_sgivideo/lib
8001 X_LIBS="-L$d $X_LIBS"
8002 echo "$ac_t""$d" 1>&6
8004 echo "$ac_t""not found ($d: no such directory)" 1>&6
8007 # replace the directory string with "yes".
8008 with_sgivideo_req="yes"
8009 with_sgivideo=$with_sgivideo_req
8014 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8015 echo " If it is a directory, then \`DIR/include' will be added to"
8016 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8022 if test "$with_sgivideo" = yes; then
8024 ac_save_CPPFLAGS="$CPPFLAGS"
8025 if test \! -z "$includedir" ; then
8026 CPPFLAGS="$CPPFLAGS -I$includedir"
8028 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8029 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8030 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8031 echo "configure:8043: checking for dmedia/vl.h" >&5
8032 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8033 echo $ac_n "(cached) $ac_c" 1>&6
8035 cat > conftest.$ac_ext <<EOF
8036 #line 8048 "configure"
8037 #include "confdefs.h"
8038 #include <dmedia/vl.h>
8040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8041 { (eval echo configure:8053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8043 if test -z "$ac_err"; then
8045 eval "ac_cv_header_$ac_safe=yes"
8048 echo "configure: failed program was:" >&5
8049 cat conftest.$ac_ext >&5
8051 eval "ac_cv_header_$ac_safe=no"
8055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8056 echo "$ac_t""yes" 1>&6
8059 echo "$ac_t""no" 1>&6
8062 CPPFLAGS="$ac_save_CPPFLAGS"
8063 if test "$have_sgivideo" = yes; then
8065 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8066 echo "configure:8078: checking for vlOpenVideo in -lvl" >&5
8067 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8069 echo $ac_n "(cached) $ac_c" 1>&6
8071 ac_save_LIBS="$LIBS"
8073 cat > conftest.$ac_ext <<EOF
8074 #line 8086 "configure"
8075 #include "confdefs.h"
8076 /* Override any gcc2 internal prototype to avoid an error. */
8077 /* We use char because int might match the return type of a gcc2
8078 builtin and then its argument prototype would still apply. */
8085 if { (eval echo configure:8097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8087 eval "ac_cv_lib_$ac_lib_var=yes"
8089 echo "configure: failed program was:" >&5
8090 cat conftest.$ac_ext >&5
8092 eval "ac_cv_lib_$ac_lib_var=no"
8095 LIBS="$ac_save_LIBS"
8098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8099 echo "$ac_t""yes" 1>&6
8102 echo "$ac_t""no" 1>&6
8105 if test "$have_sgivideo" = yes; then
8106 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8107 SGI_VIDEO_LIBS="-lvl"
8108 cat >> confdefs.h <<\EOF
8109 #define HAVE_SGI_VIDEO 1
8114 elif test "$with_sgivideo" != no; then
8115 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8120 ###############################################################################
8122 # Check for a program to generate random text.
8124 # Zippy is funnier than the idiocy generally spat out by `fortune',
8125 # so try to find that, by invoking Emacs and asking it where its
8126 # libexec directory is ("yow" lives in there.)
8128 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8129 # and if so, use them.
8131 # If that doesn't work, look in /usr/games, and if it's there, use
8132 # the full pathname.
8134 ###############################################################################
8137 # Check whether --with-zippy or --without-zippy was given.
8138 if test "${with_zippy+set}" = set; then
8139 withval="$with_zippy"
8140 with_zippy_req="$withval"; with_zippy="$withval"
8146 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8151 if test -n "$with_zippy_req" ; then
8152 ac_cv_zippy_program=""
8153 case "$with_zippy_req" in
8155 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8156 echo "configure:8168: checking for $with_zippy_req" >&5
8157 if test -x "$with_zippy_req" ; then
8158 echo "$ac_t""yes" 1>&6
8160 echo "$ac_t""no" 1>&6
8166 unset ac_cv_path_zip2
8167 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8168 set dummy $with_zippy_req; ac_word=$2
8169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8170 echo "configure:8182: checking for $ac_word" >&5
8171 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8172 echo $ac_n "(cached) $ac_c" 1>&6
8176 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8179 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8182 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8184 for ac_dir in $ac_dummy; do
8185 test -z "$ac_dir" && ac_dir=.
8186 if test -f $ac_dir/$ac_word; then
8187 ac_cv_path_zip2="$ac_dir/$ac_word"
8195 zip2="$ac_cv_path_zip2"
8196 if test -n "$zip2"; then
8197 echo "$ac_t""$zip2" 1>&6
8199 echo "$ac_t""no" 1>&6
8202 if test "$zip2" = ""; then
8207 ac_cv_zippy_program="$with_zippy"
8209 elif test -n "$ac_cv_zippy_program"; then
8210 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8213 if test ! -n "$ac_cv_zippy_program"; then
8215 for ac_prog in emacs
8217 # Extract the first word of "$ac_prog", so it can be a program name with args.
8218 set dummy $ac_prog; ac_word=$2
8219 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8220 echo "configure:8232: checking for $ac_word" >&5
8221 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8222 echo $ac_n "(cached) $ac_c" 1>&6
8224 if test -n "$emacs_exe"; then
8225 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8227 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8229 for ac_dir in $ac_dummy; do
8230 test -z "$ac_dir" && ac_dir=.
8231 if test -f $ac_dir/$ac_word; then
8232 ac_cv_prog_emacs_exe="$ac_prog"
8239 emacs_exe="$ac_cv_prog_emacs_exe"
8240 if test -n "$emacs_exe"; then
8241 echo "$ac_t""$emacs_exe" 1>&6
8243 echo "$ac_t""no" 1>&6
8246 test -n "$emacs_exe" && break
8249 for ac_prog in xemacs
8251 # Extract the first word of "$ac_prog", so it can be a program name with args.
8252 set dummy $ac_prog; ac_word=$2
8253 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8254 echo "configure:8266: checking for $ac_word" >&5
8255 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
8256 echo $ac_n "(cached) $ac_c" 1>&6
8258 if test -n "$xemacs_exe"; then
8259 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
8261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8263 for ac_dir in $ac_dummy; do
8264 test -z "$ac_dir" && ac_dir=.
8265 if test -f $ac_dir/$ac_word; then
8266 ac_cv_prog_xemacs_exe="$ac_prog"
8273 xemacs_exe="$ac_cv_prog_xemacs_exe"
8274 if test -n "$xemacs_exe"; then
8275 echo "$ac_t""$xemacs_exe" 1>&6
8277 echo "$ac_t""no" 1>&6
8280 test -n "$xemacs_exe" && break
8284 ac_cv_zippy_program=""
8285 eargs='-batch -q -nw --eval'
8287 if test -n "$emacs_exe" ; then
8288 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
8289 echo "configure:8301: checking for emacs yow" >&5
8291 # get emacs to tell us where the libexec directory is.
8293 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8294 2>/dev/null | tail -1`
8295 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8297 # try running libexec/yow and see if it exits without error.
8299 if test x"$dir" != x -a -x "$dir/yow" ; then
8300 if $dir/yow >&- 2>&- ; then
8301 ac_cv_zippy_program="$dir/yow"
8302 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8304 echo "$ac_t""no" 1>&6
8309 if test -z "$ac_cv_zippy_program" ; then
8310 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
8311 echo "configure:8323: checking for xemacs yow" >&5
8312 if test -n "$xemacs_exe" ; then
8314 # get xemacs to tell us where the libexec directory is.
8316 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8317 2>/dev/null | tail -1`
8318 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8320 # try running libexec/yow and see if it exits without error.
8322 if test x"$dir" != x -a -x "$dir/yow" ; then
8323 if $dir/yow >&- 2>&- ; then
8324 ac_cv_zippy_program="$dir/yow"
8325 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8328 # in some xemacs installations, the pathname of the yow.lines file
8329 # isn't hardcoded into the yow executable, and must be passed on
8330 # the command line. See if it's in libexec/../etc/.
8334 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
8337 yowlines="$dir_up/etc/yow.lines"
8338 if $dir/yow -f $yowlines >&- 2>&- ; then
8339 ac_cv_zippy_program="$dir/yow -f $yowlines"
8340 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8343 # In newer XEmacs releases, yow.lines is in a different place,
8344 # and the easiest way to get it is by calling the new function
8345 # `locate-data-file'.
8347 yowlines=`$xemacs_exe $eargs \
8348 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
8349 2>/dev/null | tail -1`
8350 if $dir/yow -f $yowlines >&- 2>&- ; then
8351 ac_cv_zippy_program="$dir/yow -f $yowlines"
8352 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8354 echo "$ac_t""no" 1>&6
8362 # if that didn't work, try for some other programs...
8363 if test -z "$ac_cv_zippy_program" ; then
8365 for ac_prog in fortune zippy yow
8367 # Extract the first word of "$ac_prog", so it can be a program name with args.
8368 set dummy $ac_prog; ac_word=$2
8369 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8370 echo "configure:8382: checking for $ac_word" >&5
8371 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
8372 echo $ac_n "(cached) $ac_c" 1>&6
8374 if test -n "$fortune"; then
8375 ac_cv_prog_fortune="$fortune" # Let the user override the test.
8377 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8379 for ac_dir in $ac_dummy; do
8380 test -z "$ac_dir" && ac_dir=.
8381 if test -f $ac_dir/$ac_word; then
8382 ac_cv_prog_fortune="$ac_prog"
8389 fortune="$ac_cv_prog_fortune"
8390 if test -n "$fortune"; then
8391 echo "$ac_t""$fortune" 1>&6
8393 echo "$ac_t""no" 1>&6
8396 test -n "$fortune" && break
8399 # if that didn't work, try for those programs in /usr/games...
8400 if test -z "$fortune" ; then
8401 for ac_prog in fortune zippy yow
8403 # Extract the first word of "$ac_prog", so it can be a program name with args.
8404 set dummy $ac_prog; ac_word=$2
8405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8406 echo "configure:8418: checking for $ac_word" >&5
8407 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
8408 echo $ac_n "(cached) $ac_c" 1>&6
8412 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
8415 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
8418 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8419 ac_dummy="/usr/games:/usr/local/games:$PATH"
8420 for ac_dir in $ac_dummy; do
8421 test -z "$ac_dir" && ac_dir=.
8422 if test -f $ac_dir/$ac_word; then
8423 ac_cv_path_fortune="$ac_dir/$ac_word"
8431 fortune="$ac_cv_path_fortune"
8432 if test -n "$fortune"; then
8433 echo "$ac_t""$fortune" 1>&6
8435 echo "$ac_t""no" 1>&6
8438 test -n "$fortune" && break
8440 test -n "$fortune" || fortune="fortune"
8446 if test -z "$ac_cv_zippy_program" ; then
8447 ac_cv_zippy_program=fortune
8450 cat >> confdefs.h <<EOF
8451 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
8456 ###############################################################################
8458 # Done testing. Now, set up the various -I and -L variables,
8459 # and decide which GUI program to build by default.
8461 ###############################################################################
8468 if test \! -z "$includedir" ; then
8469 INCLUDES="$INCLUDES -I$includedir"
8472 if test \! -z "$libdir" ; then
8473 LDFLAGS="$LDFLAGS -L$libdir"
8478 if test "$have_athena3d" = yes; then
8479 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw3d
8480 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8482 if test "$have_athena" = yes; then
8483 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw
8484 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8486 if test "$have_gtk" = yes; then
8487 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
8488 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8490 if test "$have_motif" = yes; then
8491 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
8492 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
8496 if test "$have_kerberos" = yes; then
8497 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
8498 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
8500 if test "$have_pam" = yes; then
8501 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
8502 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
8503 INSTALL_PAM="install-pam"
8505 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
8506 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
8509 if test "$enable_locking" = yes; then
8510 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
8511 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
8517 if test "$need_setuid" = yes; then
8519 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
8522 INSTALL_SETUID='$(INSTALL_PROGRAM)'
8526 if test "$have_gl" = yes; then
8527 GL_EXES='$(GL_EXES)'
8531 GL_KLUDGE=" -${tab} "
8535 ###############################################################################
8537 # Perform substitutions and write Makefiles.
8539 ###############################################################################
8575 APPDEFAULTS=$ac_x_app_defaults
8584 cat > confcache <<\EOF
8585 # This file is a shell script that caches the results of configure
8586 # tests run on this system so they can be shared between configure
8587 # scripts and configure runs. It is not useful on other systems.
8588 # If it contains results you don't want to keep, you may remove or edit it.
8590 # By default, configure uses ./config.cache as the cache file,
8591 # creating it if it does not exist already. You can give configure
8592 # the --cache-file=FILE option to use a different cache file; that is
8593 # what configure does when it calls configure scripts in
8594 # subdirectories, so they share the cache.
8595 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8596 # config.status only pays attention to the cache file if you give it the
8597 # --recheck option to rerun configure.
8600 # The following way of writing the cache mishandles newlines in values,
8601 # but we know of no workaround that is simple, portable, and efficient.
8602 # So, don't put newlines in cache variables' values.
8603 # Ultrix sh set writes to stderr and can't be redirected directly,
8604 # and sets the high bit in the cache file unless we assign to the vars.
8606 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8608 # `set' does not quote correctly, so add quotes (double-quote substitution
8609 # turns \\\\ into \\, and sed turns \\ into \).
8611 -e "s/'/'\\\\''/g" \
8612 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8615 # `set' quotes correctly as required by POSIX, so do not add quotes.
8616 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8619 if cmp -s $cache_file confcache; then
8622 if test -w $cache_file; then
8623 echo "updating cache $cache_file"
8624 cat confcache > $cache_file
8626 echo "not updating unwritable cache $cache_file"
8631 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8633 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8634 # Let make expand exec_prefix.
8635 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8637 # Any assignment to VPATH causes Sun make to only execute
8638 # the first set of double-colon rules, so remove it if not needed.
8639 # If there is a colon in the path, we need to keep it.
8640 if test "x$srcdir" = x.; then
8641 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8644 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8646 DEFS=-DHAVE_CONFIG_H
8648 # Without the "./", some shells look in PATH for config.status.
8649 : ${CONFIG_STATUS=./config.status}
8651 echo creating $CONFIG_STATUS
8652 rm -f $CONFIG_STATUS
8653 cat > $CONFIG_STATUS <<EOF
8655 # Generated automatically by configure.
8656 # Run this file to recreate the current configuration.
8657 # This directory was configured as follows,
8658 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8660 # $0 $ac_configure_args
8662 # Compiler output produced by configure, useful for debugging
8663 # configure, is in ./config.log if it exists.
8665 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8668 case "\$ac_option" in
8669 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8670 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8671 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8672 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8673 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8675 -help | --help | --hel | --he | --h)
8676 echo "\$ac_cs_usage"; exit 0 ;;
8677 *) echo "\$ac_cs_usage"; exit 1 ;;
8681 ac_given_srcdir=$srcdir
8682 ac_given_INSTALL="$INSTALL"
8684 trap 'rm -fr `echo "Makefile
8689 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8691 cat >> $CONFIG_STATUS <<EOF
8693 # Protect against being on the right side of a sed subst in config.status.
8694 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8695 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8699 s%@CFLAGS@%$CFLAGS%g
8700 s%@CPPFLAGS@%$CPPFLAGS%g
8701 s%@CXXFLAGS@%$CXXFLAGS%g
8702 s%@FFLAGS@%$FFLAGS%g
8704 s%@LDFLAGS@%$LDFLAGS%g
8706 s%@exec_prefix@%$exec_prefix%g
8707 s%@prefix@%$prefix%g
8708 s%@program_transform_name@%$program_transform_name%g
8709 s%@bindir@%$bindir%g
8710 s%@sbindir@%$sbindir%g
8711 s%@libexecdir@%$libexecdir%g
8712 s%@datadir@%$datadir%g
8713 s%@sysconfdir@%$sysconfdir%g
8714 s%@sharedstatedir@%$sharedstatedir%g
8715 s%@localstatedir@%$localstatedir%g
8716 s%@libdir@%$libdir%g
8717 s%@includedir@%$includedir%g
8718 s%@oldincludedir@%$oldincludedir%g
8719 s%@infodir@%$infodir%g
8720 s%@mandir@%$mandir%g
8722 s%@host_alias@%$host_alias%g
8723 s%@host_cpu@%$host_cpu%g
8724 s%@host_vendor@%$host_vendor%g
8725 s%@host_os@%$host_os%g
8728 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8729 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8730 s%@INSTALL_DATA@%$INSTALL_DATA%g
8731 s%@SET_MAKE@%$SET_MAKE%g
8733 s%@X_CFLAGS@%$X_CFLAGS%g
8734 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
8735 s%@X_LIBS@%$X_LIBS%g
8736 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
8737 s%@glib_config@%$glib_config%g
8738 s%@gtk_config@%$gtk_config%g
8740 s%@emacs_exe@%$emacs_exe%g
8741 s%@xemacs_exe@%$xemacs_exe%g
8742 s%@fortune@%$fortune%g
8743 s%@INCLUDES@%$INCLUDES%g
8744 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
8745 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
8746 s%@SAVER_LIBS@%$SAVER_LIBS%g
8747 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
8748 s%@GTK_LIBS@%$GTK_LIBS%g
8749 s%@ATHENA_LIBS@%$ATHENA_LIBS%g
8750 s%@ATHENA3D_LIBS@%$ATHENA3D_LIBS%g
8751 s%@HACK_LIBS@%$HACK_LIBS%g
8752 s%@XPM_LIBS@%$XPM_LIBS%g
8753 s%@GL_LIBS@%$GL_LIBS%g
8754 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
8755 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
8756 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
8757 s%@NEED_SETUID@%$NEED_SETUID%g
8758 s%@INSTALL_PAM@%$INSTALL_PAM%g
8759 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
8760 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
8761 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
8762 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
8763 s%@XMU_SRCS@%$XMU_SRCS%g
8764 s%@XMU_OBJS@%$XMU_OBJS%g
8765 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
8766 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
8767 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
8768 s%@LOCK_SRCS@%$LOCK_SRCS%g
8769 s%@LOCK_OBJS@%$LOCK_OBJS%g
8770 s%@GL_EXES@%$GL_EXES%g
8771 s%@GL_MEN@%$GL_MEN%g
8772 s%@GL_KLUDGE@%$GL_KLUDGE%g
8773 s%@HACKDIR@%$HACKDIR%g
8774 s%@APPDEFAULTS@%$APPDEFAULTS%g
8775 s%@DEPEND@%$DEPEND%g
8776 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
8777 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
8782 cat >> $CONFIG_STATUS <<\EOF
8784 # Split the substitutions into bite-sized pieces for seds with
8785 # small command number limits, like on Digital OSF/1 and HP-UX.
8786 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8787 ac_file=1 # Number of current file.
8788 ac_beg=1 # First line for current file.
8789 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8792 while $ac_more_lines; do
8793 if test $ac_beg -gt 1; then
8794 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8796 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8798 if test ! -s conftest.s$ac_file; then
8800 rm -f conftest.s$ac_file
8802 if test -z "$ac_sed_cmds"; then
8803 ac_sed_cmds="sed -f conftest.s$ac_file"
8805 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8807 ac_file=`expr $ac_file + 1`
8809 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8812 if test -z "$ac_sed_cmds"; then
8817 cat >> $CONFIG_STATUS <<EOF
8819 CONFIG_FILES=\${CONFIG_FILES-"Makefile
8824 driver/XScreenSaver.ad"}
8826 cat >> $CONFIG_STATUS <<\EOF
8827 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8828 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8830 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8831 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8832 *) ac_file_in="${ac_file}.in" ;;
8835 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8837 # Remove last slash and all that follows it. Not all systems have dirname.
8838 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8839 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8840 # The file is in a subdirectory.
8841 test ! -d "$ac_dir" && mkdir "$ac_dir"
8842 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8843 # A "../" for each directory in $ac_dir_suffix.
8844 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8846 ac_dir_suffix= ac_dots=
8849 case "$ac_given_srcdir" in
8851 if test -z "$ac_dots"; then top_srcdir=.
8852 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8853 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8855 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8856 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8859 case "$ac_given_INSTALL" in
8860 [/$]*) INSTALL="$ac_given_INSTALL" ;;
8861 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8864 echo creating "$ac_file"
8866 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8868 *Makefile*) ac_comsub="1i\\
8869 # $configure_input" ;;
8873 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8875 s%@configure_input@%$configure_input%g
8876 s%@srcdir@%$srcdir%g
8877 s%@top_srcdir@%$top_srcdir%g
8878 s%@INSTALL@%$INSTALL%g
8879 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8883 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8884 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8886 # ac_d sets the value in "#define NAME VALUE" lines.
8887 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8888 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8891 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8892 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8893 ac_uB='\([ ]\)%\1#\2define\3'
8896 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8897 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8898 ac_eB='$%\1#\2define\3'
8902 if test "${CONFIG_HEADERS+set}" != set; then
8904 cat >> $CONFIG_STATUS <<EOF
8905 CONFIG_HEADERS="config.h"
8907 cat >> $CONFIG_STATUS <<\EOF
8909 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8910 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8912 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8913 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8914 *) ac_file_in="${ac_file}.in" ;;
8917 echo creating $ac_file
8919 rm -f conftest.frag conftest.in conftest.out
8920 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8921 cat $ac_file_inputs > conftest.in
8925 # Transform confdefs.h into a sed script conftest.vals that substitutes
8926 # the proper values into config.h.in to produce config.h. And first:
8927 # Protect against being on the right side of a sed subst in config.status.
8928 # Protect against being in an unquoted here document in config.status.
8930 cat > conftest.hdr <<\EOF
8933 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8937 sed -n -f conftest.hdr confdefs.h > conftest.vals
8940 # This sed command replaces #undef with comments. This is necessary, for
8941 # example, in the case of _POSIX_SOURCE, which is predefined and required
8942 # on some systems where configure will not decide to define it.
8943 cat >> conftest.vals <<\EOF
8944 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8947 # Break up conftest.vals because some shells have a limit on
8948 # the size of here documents, and old seds have small limits too.
8953 ac_lines=`grep -c . conftest.vals`
8954 # grep -c gives empty output for an empty file on some AIX systems.
8955 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8956 # Write a limited-size here document to conftest.frag.
8957 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8958 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8960 sed -f conftest.frag conftest.in > conftest.out
8962 mv conftest.out conftest.in
8964 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8966 mv conftest.tail conftest.vals
8970 cat >> $CONFIG_STATUS <<\EOF
8971 rm -f conftest.frag conftest.h
8972 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8973 cat conftest.in >> conftest.h
8975 if cmp -s $ac_file conftest.h 2>/dev/null; then
8976 echo "$ac_file is unchanged"
8979 # Remove last slash and all that follows it. Not all systems have dirname.
8980 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8981 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8982 # The file is in a subdirectory.
8983 test ! -d "$ac_dir" && mkdir "$ac_dir"
8986 mv conftest.h $ac_file
8991 cat >> $CONFIG_STATUS <<EOF
8994 cat >> $CONFIG_STATUS <<\EOF
8998 chmod +x $CONFIG_STATUS
8999 rm -fr confdefs* $ac_clean_files
9000 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9003 ###############################################################################
9005 # Print some warnings at the end.
9007 ###############################################################################
9009 warn_prefix_1=" Warning:"
9010 warn_prefix_2=" Note:"
9011 warn_prefix="$warn_prefix_1"
9014 warnsep=' #################################################################'
9017 if test "$warning" = no ; then
9018 echo '' ; echo "$warnsep" ; echo ''
9025 if test "$warning" = long ; then echo '' ; fi
9027 echo "$warn_prefix $@"
9034 if test "$was" != no ; then echo '' ; fi
9035 echo "$warn_prefix $@"
9044 warn_prefix="$warn_prefix_2"
9046 warn_prefix="$warn_prefix_1"
9050 warn_prefix="$warn_prefix_2"
9052 warn_prefix="$warn_prefix_1"
9056 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9057 warn 'The SGI saver extension was requested, but was not found.'
9060 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9061 warn 'The MIT saver extension was requested, but was not found.'
9064 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9065 warn 'The XIdle extension was requested, but was not found.'
9068 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9069 warn 'The XSHM extension was requested, but was not found.'
9072 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9073 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9076 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9077 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9080 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9081 warn 'The DPMS extension was requested, but was not found.'
9084 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9085 warn 'The XF86VMODE extension was requested, but was not found.'
9088 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9089 warn "Checking of /proc/interrupts was requested, but it's bogus."
9093 if test "$have_motif" = no -a "$have_gtk" = no -a "$have_athena" = no ; then
9094 warnL "None of Motif, Gtk, or Athena widgets seem to be available;"
9095 warn2 "the \`xscreensaver-demo' program requires one of these."
9097 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9098 warnL "Use of Motif was requested, but it wasn't found;"
9099 if test "$have_gtk" = yes; then
9100 warn2 "Gtk will be used instead."
9102 warn2 "Athena will be used instead."
9105 elif test "$jurassic_gtk" = yes ; then
9109 v="$ac_gtk_version_string"
9110 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9111 warnL "Use of Gtk was requested, but its version number is unknown;"
9112 elif test "$with_gtk_req" = yes ; then
9113 warnL "Use of Gtk was requested, but it is version $v;"
9115 warnL "Gtk was found on this system, but it is version $v;"
9118 if test "$have_motif" = yes; then
9124 warn2 "Gtk $pref_gtk or newer is required. $which will be used instead."
9126 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9127 warnL "Use of Gtk was requested, but it wasn't found;"
9128 if test "$have_motif" = yes; then
9129 warn2 "Motif will be used instead."
9131 warn2 "Athena will be used instead."
9134 elif test "$with_athena_req" = yes -a "$have_athena" = no ; then
9135 warnL "Use of Athena was requested, but it wasn't found;"
9136 if test "$have_gtk" = yes; then
9137 warn2 "Gtk will be used instead."
9139 warn2 "Motif will be used instead."
9144 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9146 preferred_lesstif=0.86
9148 if test "$lesstif_version" = unknown; then
9149 warnL "Unable to determine the LessTif version number!"
9150 warn2 "Make sure you are using version $preferred_lesstif or newer."
9151 warn2 "See <http://www.lesstif.org/>."
9153 elif test \! $lesstif_version -gt 82; then
9154 warnL "LessTif version $lesstif_version_string is being used."
9155 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9156 warn2 "use with XScreenSaver; it is strongly recommended"
9157 warn2 "that you upgrade to at least version $preferred_lesstif!"
9158 warn2 "See <http://www.lesstif.org/>."
9162 if test "$have_athena" = yes -a "$have_motif" = no -a "$have_gtk" = no; then
9163 warnL "Athena widgets are being used instead of Motif or Gtk."
9164 warn2 "The \`xscreensaver-demo' program looks much better"
9165 warn2 "with Motif or Gtk. Wouldn't you rather be using Motif?"
9166 warn2 "Motif is shipped by every commercial Unix vendor,"
9167 warn2 "and there is a free implementation available as"
9168 warn2 "well: see <http://www.lesstif.org/>. Gtk is shipped"
9169 warn2 "with most Linux and BSD distributions."
9173 if test "$have_xpm" = no ; then
9174 if test "$with_xpm_req" = yes ; then
9175 warnL 'Use of XPM was requested, but it was not found.'
9176 elif test "$with_xpm_req" = no ; then
9177 noteL 'The XPM library is not being used.'
9179 noteL 'The XPM library was not found.'
9183 warn2 'Some of the demos will not be as colorful as they'
9184 warn2 'could be. You might want to consider installing XPM'
9185 warn2 'and re-running configure. (Remember to delete the'
9186 warn2 'config.cache file first.) You can find XPM at most'
9187 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9191 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9192 preferred_mesagl=3.0
9194 if test "$ac_mesagl_version" = unknown; then
9195 warnL "Unable to determine the MesaGL version number!"
9196 warn2 "Make sure you are using version $preferred_mesagl or newer."
9198 elif test \! "$ac_mesagl_version" -gt 2006; then
9199 warnL "MesaGL version $ac_mesagl_version_string is being used."
9200 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9201 warn2 "It is strongly recommended that you upgrade to at"
9202 warn2 "least version $preferred_mesagl."
9207 if test "$have_gl" = no ; then
9208 if test "$with_gl_req" = yes ; then
9209 warnL 'Use of GL was requested, but it was not found.'
9210 elif test "$with_gl_req" = no ; then
9211 noteL 'The OpenGL 3D library is not being used.'
9213 noteL 'The OpenGL 3D library was not found.'
9217 warn2 'Those demos which use 3D will not be built or installed.'
9218 warn2 'You might want to consider installing OpenGL and'
9219 warn2 're-running configure. (Remember to delete the'
9220 warn2 "config.cache file first.) If your vendor doesn't ship"
9221 warn2 'their own implementation of OpenGL, you can get a free'
9222 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
9223 warn2 'info, see <http://www.opengl.org/>.'
9227 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
9228 warn 'Use of XReadDisplay was requested, but it was not found.'
9231 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
9232 warn 'Use of the Iris Video Library was requested, but it was not found.'
9235 if test -n "$with_zippy_req"; then
9236 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
9237 warnL "$with_zippy_req was requested as the Zippy program,"
9238 warn2 "but was not found. The default will be used instead."
9242 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
9243 warn 'Use of Kerberos was requested, but it was not found.'
9246 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
9247 warn 'Use of PAM was requested, but it was not found.'
9250 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
9251 warn 'Use of shadow passwords was requested, but they were not found.'
9255 # You are in a twisty maze of namespaces and syntaxes, all alike.
9256 # Fuck the skull of Unix.
9258 eval bindir=${bindir}
9259 eval bindir=${bindir}
9260 eval bindir=${bindir}
9261 eval bindir=${bindir}
9262 eval bindir=${bindir}
9263 eval bindir=${bindir}
9264 eval HACKDIR=${HACKDIR}
9265 eval HACKDIR=${HACKDIR}
9266 eval HACKDIR=${HACKDIR}
9267 eval HACKDIR=${HACKDIR}
9268 eval HACKDIR=${HACKDIR}
9269 eval HACKDIR=${HACKDIR}
9271 # canonicalize slashes.
9272 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
9273 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9276 # Sanity check the subdir
9277 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
9278 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
9280 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
9281 There will be an executable installed with that name, so
9282 that can't be the name of a directory as well. Please
9283 re-configure with a different directory name." 1>&2; exit 1; }
9290 # Now let's see if there's a previous RPM version already installed. Blargh!
9294 rpmv=`(rpm -qv xscreensaver) 2>&- | \
9295 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-[0-9][0-9]*$/\1/'`
9298 if test \! -z "$rpmv" ; then
9299 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
9300 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
9303 warnL "There is already an installed RPM of xscreensaver $rpmv"
9304 warn2 "on this system. You might want to remove it (with"
9305 warn2 '"rpm -ve xscreensaver") before running "make install"'
9306 warn2 "from this directory."
9308 warn2 "Alternately, you could build this version of xscreensaver"
9309 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
9310 warn2 "file is included. See the RPM documentation for more info."
9313 if test "$rpmbdir" = "$rpmhdir" ; then
9314 warn2 "The RPM version was installed in $rpmbdir."
9316 warn2 "The RPM version was installed in $rpmbdir,"
9317 warn2 "with demos in $rpmhdir."
9324 # Warn about egregious GNOME bogosity.
9326 if (rpm -qv control-center) >&- 2>&- ; then
9328 warnL "The Gnome Control Center seems to be installed."
9330 warn2 "Note that simply installing this version of xscreensaver"
9331 warn2 "will not cause GNOME to know about the newly-added display"
9332 warn2 "modes -- GNOME is just lame that way. Instead of using the"
9333 warn2 "Control Center, try using the \`xscreensaver-demo' command."
9337 if test "${bindir}" = "${HACKDIR}" ; then
9341 if test "$do_dir_warning" = yes; then
9345 echo ' When you run "make install", the "xscreensaver",'
9346 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
9347 echo " will be installed in ${bindir}."
9349 echo " The various graphics demos (90+ different executables) will"
9350 echo " also be installed in ${HACKDIR}."
9352 echo " If you would prefer the demos to be installed elsewhere"
9353 echo " (for example, in a dedicated directory) you should re-run"
9354 echo " configure with the --enable-subdir=DIR option. For more"
9355 echo " information, run $0 --help."
9359 if test "$warning" != no; then
9360 echo '' ; echo "$warnsep" ; echo ''