3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
18 --enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir',
19 instead of putting them in bindir itself. You can
20 specify the name of the subdirectory. For example,
21 \`--exec-prefix=/usr/local --enable-subdir=demos'
22 would put xscreensaver in /usr/local/bin/, and would
23 put the demos in /usr/local/bin/demos/. (If DIR
24 begins with /, then bindir will not be prepended.)
26 --disable-subdir Just put the demos in \`bindir' (this is the default.)
29 Except where noted, all of the --with options below can also take a
30 directory argument: for example, \`--with-motif=/opt/Motif'. That would
31 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
32 to be added to the -L list, assuming those directories exist.
34 By default, support for each of these options will be built in, if the
35 relevant library routines exist. At run time, they will then be used
36 only if the X server being used supports them. Each --with option has
37 a corresponding --without option, to override building support for them
40 Screen blanking and idle-detection options:
42 --with-sgi-ext Include support for the SGI SCREEN_SAVER extension."
44 --with-mit-ext Include support for the MIT-SCREEN-SAVER extension."
46 --with-xidle-ext Include support for the XIDLE extension."
48 --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL extension."
50 --with-dpms-ext Include support for the DPMS extension."
52 --with-xf86vmode-ext Include support for XFree86 virtual screens."
54 --with-proc-interrupts Include support for consulting the /proc/interrupts
55 file to notice keyboard activity."
58 Screen locking options:
60 --enable-locking Compile in support for locking the display.
61 --disable-locking Do not allow locking at all.
64 --with-pam Include support for PAM (Pluggable Auth Modules.)"
66 --with-kerberos Include support for Kerberos authentication."
68 --with-shadow Include support for shadow password authentication."
71 User interface options:
73 --with-motif Use the Motif toolkit for the user interface."
75 --with-gtk Use the Gtk toolkit for the user interface."
77 --with-gnome Include support for the Gnome Control Center."
82 --with-gl Build those demos which depend on OpenGL."
84 --with-gle Build those demos which depend on GLE
85 (the OpenGL "extrusion" library.)"
87 --with-xpm Include support for XPM files in some demos."
89 --with-xshm-ext Include support for the XSHM extension."
91 --with-xdbe-ext Include support for the DOUBLE-BUFFER extension."
93 --with-readdisplay Include support for the XReadDisplay extension."
95 --with-sgivideo Include support for SGI's Iris Video Library."
98 --with-zippy=PROGRAM Some demos are able to run an external program and
99 display its text; this names the program to use by
100 default (though it can be overridden with X
101 resources.) If you don't specify this, the default
102 is to use \"yow\" from the Emacs distribution (if you
103 have it) or else to use \"fortune\".
106 # Initialize some variables set by options.
107 # The variables have the same names as the options, with
108 # dashes changed to underlines.
110 cache_file=./config.cache
119 program_transform_name=s,x,x,
127 bindir='${exec_prefix}/bin'
128 sbindir='${exec_prefix}/sbin'
129 libexecdir='${exec_prefix}/libexec'
130 datadir='${prefix}/share'
131 sysconfdir='${prefix}/etc'
132 sharedstatedir='${prefix}/com'
133 localstatedir='${prefix}/var'
134 libdir='${exec_prefix}/lib'
135 includedir='${prefix}/include'
136 oldincludedir='/usr/include'
137 infodir='${prefix}/info'
138 mandir='${prefix}/man'
140 # Initialize some other variables.
143 SHELL=${CONFIG_SHELL-/bin/sh}
144 # Maximum number of lines to put in a shell here document.
151 # If the previous option needs an argument, assign it.
152 if test -n "$ac_prev"; then
153 eval "$ac_prev=\$ac_option"
159 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
163 # Accept the important Cygnus configure options, so we can diagnose typos.
167 -bindir | --bindir | --bindi | --bind | --bin | --bi)
169 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
170 bindir="$ac_optarg" ;;
172 -build | --build | --buil | --bui | --bu)
174 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
175 build="$ac_optarg" ;;
177 -cache-file | --cache-file | --cache-fil | --cache-fi \
178 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
179 ac_prev=cache_file ;;
180 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
181 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
182 cache_file="$ac_optarg" ;;
184 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
186 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
188 datadir="$ac_optarg" ;;
190 -disable-* | --disable-*)
191 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
192 # Reject names that are not valid shell variable names.
193 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
194 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
196 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
197 eval "enable_${ac_feature}=no" ;;
199 -enable-* | --enable-*)
200 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
201 # Reject names that are not valid shell variable names.
202 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
203 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
205 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
210 eval "enable_${ac_feature}='$ac_optarg'" ;;
212 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
213 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
214 | --exec | --exe | --ex)
215 ac_prev=exec_prefix ;;
216 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
217 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
218 | --exec=* | --exe=* | --ex=*)
219 exec_prefix="$ac_optarg" ;;
221 -gas | --gas | --ga | --g)
222 # Obsolete; use --with-gas.
225 -help | --help | --hel | --he)
226 # Omit some internal or obsolete options to make the list less imposing.
227 # This message is too long to be a string in the A/UX 3.1 sh.
229 Usage: configure [options] [host]
230 Options: [defaults in brackets after descriptions]
234 --cache-file=FILE cache test results in FILE
235 --help print this message
236 --no-create do not create output files
237 --quiet, --silent do not print \`checking...' messages
238 --version print the version of autoconf that created configure
240 Directory and file names:
242 --prefix=PREFIX install architecture-independent files in PREFIX
244 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
246 --bindir=DIR user executables in DIR [EPREFIX/bin]
247 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
248 --includedir=DIR C header files in DIR [PREFIX/include]
249 --x-includes=DIR X include files are in DIR
250 --x-libraries=DIR X library files are in DIR
251 --mandir=DIR man documentation in DIR [PREFIX/man]
252 --srcdir=DIR find the sources in DIR [configure dir or ..]
253 --program-prefix=PREFIX prepend PREFIX to installed program names
254 --program-suffix=SUFFIX append SUFFIX to installed program names
255 --program-transform-name=PROGRAM
256 run sed PROGRAM on installed program names
262 --build=BUILD configure for building on BUILD [BUILD=HOST]
263 --host=HOST configure for HOST [guessed]
264 --target=TARGET configure for TARGET [TARGET=HOST]
266 if test -n "$ac_help"; then
271 -host | --host | --hos | --ho)
273 -host=* | --host=* | --hos=* | --ho=*)
276 -includedir | --includedir | --includedi | --included | --include \
277 | --includ | --inclu | --incl | --inc)
278 ac_prev=includedir ;;
279 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
280 | --includ=* | --inclu=* | --incl=* | --inc=*)
281 includedir="$ac_optarg" ;;
283 -infodir | --infodir | --infodi | --infod | --info | --inf)
285 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
286 infodir="$ac_optarg" ;;
288 -libdir | --libdir | --libdi | --libd)
290 -libdir=* | --libdir=* | --libdi=* | --libd=*)
291 libdir="$ac_optarg" ;;
293 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
294 | --libexe | --libex | --libe)
295 ac_prev=libexecdir ;;
296 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
297 | --libexe=* | --libex=* | --libe=*)
298 libexecdir="$ac_optarg" ;;
300 -localstatedir | --localstatedir | --localstatedi | --localstated \
301 | --localstate | --localstat | --localsta | --localst \
302 | --locals | --local | --loca | --loc | --lo)
303 ac_prev=localstatedir ;;
304 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
305 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
306 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
307 localstatedir="$ac_optarg" ;;
309 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
311 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
312 mandir="$ac_optarg" ;;
315 # Obsolete; use --without-fp.
318 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
323 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
326 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
327 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
328 | --oldin | --oldi | --old | --ol | --o)
329 ac_prev=oldincludedir ;;
330 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
331 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
332 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
333 oldincludedir="$ac_optarg" ;;
335 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
337 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
338 prefix="$ac_optarg" ;;
340 -program-prefix | --program-prefix | --program-prefi | --program-pref \
341 | --program-pre | --program-pr | --program-p)
342 ac_prev=program_prefix ;;
343 -program-prefix=* | --program-prefix=* | --program-prefi=* \
344 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
345 program_prefix="$ac_optarg" ;;
347 -program-suffix | --program-suffix | --program-suffi | --program-suff \
348 | --program-suf | --program-su | --program-s)
349 ac_prev=program_suffix ;;
350 -program-suffix=* | --program-suffix=* | --program-suffi=* \
351 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
352 program_suffix="$ac_optarg" ;;
354 -program-transform-name | --program-transform-name \
355 | --program-transform-nam | --program-transform-na \
356 | --program-transform-n | --program-transform- \
357 | --program-transform | --program-transfor \
358 | --program-transfo | --program-transf \
359 | --program-trans | --program-tran \
360 | --progr-tra | --program-tr | --program-t)
361 ac_prev=program_transform_name ;;
362 -program-transform-name=* | --program-transform-name=* \
363 | --program-transform-nam=* | --program-transform-na=* \
364 | --program-transform-n=* | --program-transform-=* \
365 | --program-transform=* | --program-transfor=* \
366 | --program-transfo=* | --program-transf=* \
367 | --program-trans=* | --program-tran=* \
368 | --progr-tra=* | --program-tr=* | --program-t=*)
369 program_transform_name="$ac_optarg" ;;
371 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
372 | -silent | --silent | --silen | --sile | --sil)
375 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
377 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
379 sbindir="$ac_optarg" ;;
381 -sharedstatedir | --sharedstatedir | --sharedstatedi \
382 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
383 | --sharedst | --shareds | --shared | --share | --shar \
385 ac_prev=sharedstatedir ;;
386 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
387 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
388 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
390 sharedstatedir="$ac_optarg" ;;
392 -site | --site | --sit)
394 -site=* | --site=* | --sit=*)
397 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
399 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
400 srcdir="$ac_optarg" ;;
402 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
403 | --syscon | --sysco | --sysc | --sys | --sy)
404 ac_prev=sysconfdir ;;
405 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
406 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
407 sysconfdir="$ac_optarg" ;;
409 -target | --target | --targe | --targ | --tar | --ta | --t)
411 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
412 target="$ac_optarg" ;;
414 -v | -verbose | --verbose | --verbos | --verbo | --verb)
417 -version | --version | --versio | --versi | --vers)
418 echo "configure generated by autoconf version 2.13"
422 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
423 # Reject names that are not valid shell variable names.
424 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
425 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
427 ac_package=`echo $ac_package| sed 's/-/_/g'`
432 eval "with_${ac_package}='$ac_optarg'" ;;
434 -without-* | --without-*)
435 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
436 # Reject names that are not valid shell variable names.
437 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
438 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
440 ac_package=`echo $ac_package| sed 's/-/_/g'`
441 eval "with_${ac_package}=no" ;;
444 # Obsolete; use --with-x.
447 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
448 | --x-incl | --x-inc | --x-in | --x-i)
449 ac_prev=x_includes ;;
450 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
451 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
452 x_includes="$ac_optarg" ;;
454 -x-libraries | --x-libraries | --x-librarie | --x-librari \
455 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
456 ac_prev=x_libraries ;;
457 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
458 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
459 x_libraries="$ac_optarg" ;;
461 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
465 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
466 echo "configure: warning: $ac_option: invalid host type" 1>&2
468 if test "x$nonopt" != xNONE; then
469 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
477 if test -n "$ac_prev"; then
478 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
481 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
483 # File descriptor usage:
486 # 2 errors and warnings
487 # 3 some systems may open it to /dev/tty
488 # 4 used on the Kubota Titan
489 # 6 checking for... messages and results
490 # 5 compiler messages saved in config.log
491 if test "$silent" = yes; then
499 This file contains any messages produced by compilers while
500 running configure, to aid debugging if configure makes a mistake.
503 # Strip out --no-create and --no-recursion so they do not pile up.
504 # Also quote any args containing shell metacharacters.
509 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
510 | --no-cr | --no-c) ;;
511 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
512 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
513 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
514 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
515 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
520 # Only set these to C if already set. These must not be set unconditionally
521 # because not all systems understand e.g. LANG=C (notably SCO).
522 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
523 # Non-C LC_CTYPE values break the ctype check.
524 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
525 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
526 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
527 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
529 # confdefs.h avoids OS command line length limits that DEFS can exceed.
530 rm -rf conftest* confdefs.h
531 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
534 # A filename unique to this package, relative to the directory that
535 # configure is in, which we can look for to find out if srcdir is correct.
536 ac_unique_file=driver/subprocs.c
538 # Find the source files, if location was not specified.
539 if test -z "$srcdir"; then
540 ac_srcdir_defaulted=yes
541 # Try the directory containing this script, then its parent.
543 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
544 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
546 if test ! -r $srcdir/$ac_unique_file; then
550 ac_srcdir_defaulted=no
552 if test ! -r $srcdir/$ac_unique_file; then
553 if test "$ac_srcdir_defaulted" = yes; then
554 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
556 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
559 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
561 # Prefer explicitly selected file to automatically selected ones.
562 if test -z "$CONFIG_SITE"; then
563 if test "x$prefix" != xNONE; then
564 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
566 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
569 for ac_site_file in $CONFIG_SITE; do
570 if test -r "$ac_site_file"; then
571 echo "loading site script $ac_site_file"
576 if test -r "$cache_file"; then
577 echo "loading cache $cache_file"
580 echo "creating cache $cache_file"
585 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
586 ac_cpp='$CPP $CPPFLAGS'
587 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
588 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
589 cross_compiling=$ac_cv_prog_cc_cross
593 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
594 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
595 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
602 ac_n= ac_c='\c' ac_t=
608 echo "current directory: `pwd`"
609 echo "command line was: $0 $@"
612 # After checking to see that --srcdir is correct (which AC_INIT does)
613 # check for some random other files that come later in the tar file,
614 # to make sure everything is here.
616 for d in driver utils hacks hacks/glx ; do
617 f=$srcdir/$d/Makefile.in
618 if test \! -r $f ; then
620 echo "ERROR: The package is incomplete: $f does not exist."
621 echo " This probably means that your download was truncated."
628 ###############################################################################
630 # Function to figure out how to run the compiler.
632 ###############################################################################
637 ###############################################################################
639 # Function to figure out how to create directory trees.
641 ###############################################################################
646 ###############################################################################
648 # Function to check whether gettimeofday() exists, and how to call it.
649 # This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
651 ###############################################################################
656 ###############################################################################
658 # Function to find perl5 (defines PERL and PERL_VERSION.)
660 ###############################################################################
662 # M4 sucks!! perl sucks too!!
664 perl_version_cmd='print $]'
670 ###############################################################################
672 # Function to demand "bc". Losers.
674 ###############################################################################
678 ###############################################################################
680 # Functions to check how to do ICMP PING requests.
682 ###############################################################################
689 ###############################################################################
691 # Functions to check for various X11 crap.
693 ###############################################################################
695 # Try and find the app-defaults directory.
696 # It sucks that autoconf doesn't do this already...
708 # Random special-cases for X on certain pathological OSes.
709 # You know who you are.
715 ###############################################################################
717 # Some utility functions to make checking for X things easier.
719 ###############################################################################
721 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
725 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
729 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
734 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
735 # Use this sparingly; it probably doesn't work very well on X programs.
739 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
740 # (But not the -L directories!)
746 # Usage: HANDLE_X_PATH_ARG([variable_name],
747 # [--command-line-option],
748 # [descriptive string])
750 # All of the --with options take three forms:
752 # --with-foo (or --with-foo=yes)
753 # --without-foo (or --with-foo=no)
756 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
757 # a directory (string beginning with a slash) it checks to see whether
758 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
765 ###############################################################################
766 ###############################################################################
768 # End of function definitions. Now start actually executing stuff.
770 ###############################################################################
771 ###############################################################################
773 # random compiler setup
775 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
776 if test -f $ac_dir/install-sh; then
778 ac_install_sh="$ac_aux_dir/install-sh -c"
780 elif test -f $ac_dir/install.sh; then
782 ac_install_sh="$ac_aux_dir/install.sh -c"
786 if test -z "$ac_aux_dir"; then
787 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
789 ac_config_guess=$ac_aux_dir/config.guess
790 ac_config_sub=$ac_aux_dir/config.sub
791 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
794 # Make sure we can run config.sub.
795 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
796 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
799 echo $ac_n "checking host system type""... $ac_c" 1>&6
800 echo "configure:812: checking host system type" >&5
803 case "$host_alias" in
807 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
808 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
810 *) host_alias=$nonopt ;;
814 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
815 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
816 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
817 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
818 echo "$ac_t""$host" 1>&6
820 # Extract the first word of "gcc", so it can be a program name with args.
821 set dummy gcc; ac_word=$2
822 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
823 echo "configure:835: checking for $ac_word" >&5
824 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
825 echo $ac_n "(cached) $ac_c" 1>&6
827 if test -n "$CC"; then
828 ac_cv_prog_CC="$CC" # Let the user override the test.
830 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
832 for ac_dir in $ac_dummy; do
833 test -z "$ac_dir" && ac_dir=.
834 if test -f $ac_dir/$ac_word; then
843 if test -n "$CC"; then
844 echo "$ac_t""$CC" 1>&6
846 echo "$ac_t""no" 1>&6
849 if test -z "$CC"; then
850 # Extract the first word of "cc", so it can be a program name with args.
851 set dummy cc; ac_word=$2
852 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
853 echo "configure:865: checking for $ac_word" >&5
854 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
855 echo $ac_n "(cached) $ac_c" 1>&6
857 if test -n "$CC"; then
858 ac_cv_prog_CC="$CC" # Let the user override the test.
860 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
863 for ac_dir in $ac_dummy; do
864 test -z "$ac_dir" && ac_dir=.
865 if test -f $ac_dir/$ac_word; then
866 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
875 if test $ac_prog_rejected = yes; then
876 # We found a bogon in the path, so make sure we never use it.
877 set dummy $ac_cv_prog_CC
879 if test $# -gt 0; then
880 # We chose a different compiler from the bogus one.
881 # However, it has the same basename, so the bogon will be chosen
882 # first if we set CC to just the basename; use the full file name.
884 set dummy "$ac_dir/$ac_word" "$@"
892 if test -n "$CC"; then
893 echo "$ac_t""$CC" 1>&6
895 echo "$ac_t""no" 1>&6
898 if test -z "$CC"; then
901 # Extract the first word of "cl", so it can be a program name with args.
902 set dummy cl; ac_word=$2
903 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
904 echo "configure:916: checking for $ac_word" >&5
905 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
906 echo $ac_n "(cached) $ac_c" 1>&6
908 if test -n "$CC"; then
909 ac_cv_prog_CC="$CC" # Let the user override the test.
911 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
913 for ac_dir in $ac_dummy; do
914 test -z "$ac_dir" && ac_dir=.
915 if test -f $ac_dir/$ac_word; then
924 if test -n "$CC"; then
925 echo "$ac_t""$CC" 1>&6
927 echo "$ac_t""no" 1>&6
932 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
935 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
936 echo "configure:948: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
939 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
940 ac_cpp='$CPP $CPPFLAGS'
941 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
942 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
943 cross_compiling=$ac_cv_prog_cc_cross
945 cat > conftest.$ac_ext << EOF
947 #line 959 "configure"
948 #include "confdefs.h"
952 if { (eval echo configure:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
953 ac_cv_prog_cc_works=yes
954 # If we can't run a trivial program, we are probably using a cross compiler.
955 if (./conftest; exit) 2>/dev/null; then
956 ac_cv_prog_cc_cross=no
958 ac_cv_prog_cc_cross=yes
961 echo "configure: failed program was:" >&5
962 cat conftest.$ac_ext >&5
963 ac_cv_prog_cc_works=no
967 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
968 ac_cpp='$CPP $CPPFLAGS'
969 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
970 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
971 cross_compiling=$ac_cv_prog_cc_cross
973 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
974 if test $ac_cv_prog_cc_works = no; then
975 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
977 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
978 echo "configure:990: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
979 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
980 cross_compiling=$ac_cv_prog_cc_cross
982 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
983 echo "configure:995: checking whether we are using GNU C" >&5
984 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
985 echo $ac_n "(cached) $ac_c" 1>&6
987 cat > conftest.c <<EOF
992 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
999 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1001 if test $ac_cv_prog_gcc = yes; then
1007 ac_test_CFLAGS="${CFLAGS+set}"
1008 ac_save_CFLAGS="$CFLAGS"
1010 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1011 echo "configure:1023: checking whether ${CC-cc} accepts -g" >&5
1012 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1013 echo $ac_n "(cached) $ac_c" 1>&6
1015 echo 'void f(){}' > conftest.c
1016 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1025 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1026 if test "$ac_test_CFLAGS" = set; then
1027 CFLAGS="$ac_save_CFLAGS"
1028 elif test $ac_cv_prog_cc_g = yes; then
1029 if test "$GCC" = yes; then
1035 if test "$GCC" = yes; then
1043 if test -z "$GCC"; then
1044 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
1045 echo "configure:1057: checking how to request ANSI compilation" >&5
1048 echo "$ac_t""HPUX: adding -Ae" 1>&6
1052 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
1053 CC="$CC -qlanglvl=ansi -qhalt=e"
1057 echo "$ac_t""DEC: adding -std1" 1>&6
1062 echo "$ac_t""no idea" 1>&6
1067 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
1068 echo "configure:1080: checking whether the compiler works on ANSI C" >&5
1069 if test "$cross_compiling" = yes; then
1070 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1072 cat > conftest.$ac_ext <<EOF
1073 #line 1085 "configure"
1074 #include "confdefs.h"
1075 main(int ac, char **av) { return 0; }
1077 if { (eval echo configure:1089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1079 echo "$ac_t""yes" 1>&6
1081 echo "configure: failed program was:" >&5
1082 cat conftest.$ac_ext >&5
1084 echo "$ac_t""no" 1>&6
1085 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1091 if test -n "$GCC"; then
1092 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
1093 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
1094 echo "$ac_t""Disabling C++ comments in ANSI C code." 1>&6
1095 CC="$CC -Wp,-lang-c89"
1098 *-irix5* |*-irix6.0-3* )
1099 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1100 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1103 # if test -z "$GCC"; then
1104 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1105 # CC="$CC -migrate -w0 -verbose -warnprotos"
1111 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1112 echo "configure:1124: checking how to run the C preprocessor" >&5
1113 # On Suns, sometimes $CPP names a directory.
1114 if test -n "$CPP" && test -d "$CPP"; then
1117 if test -z "$CPP"; then
1118 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1119 echo $ac_n "(cached) $ac_c" 1>&6
1121 # This must be in double quotes, not single quotes, because CPP may get
1122 # substituted into the Makefile and "${CC-cc}" will confuse make.
1124 # On the NeXT, cc -E runs the code through the compiler's parser,
1125 # not just through cpp.
1126 cat > conftest.$ac_ext <<EOF
1127 #line 1139 "configure"
1128 #include "confdefs.h"
1132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1133 { (eval echo configure:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1135 if test -z "$ac_err"; then
1139 echo "configure: failed program was:" >&5
1140 cat conftest.$ac_ext >&5
1142 CPP="${CC-cc} -E -traditional-cpp"
1143 cat > conftest.$ac_ext <<EOF
1144 #line 1156 "configure"
1145 #include "confdefs.h"
1149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1150 { (eval echo configure:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1152 if test -z "$ac_err"; then
1156 echo "configure: failed program was:" >&5
1157 cat conftest.$ac_ext >&5
1159 CPP="${CC-cc} -nologo -E"
1160 cat > conftest.$ac_ext <<EOF
1161 #line 1173 "configure"
1162 #include "confdefs.h"
1166 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1167 { (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1168 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1169 if test -z "$ac_err"; then
1173 echo "configure: failed program was:" >&5
1174 cat conftest.$ac_ext >&5
1183 ac_cv_prog_CPP="$CPP"
1185 CPP="$ac_cv_prog_CPP"
1187 ac_cv_prog_CPP="$CPP"
1189 echo "$ac_t""$CPP" 1>&6
1191 echo $ac_n "checking for working const""... $ac_c" 1>&6
1192 echo "configure:1204: checking for working const" >&5
1193 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1194 echo $ac_n "(cached) $ac_c" 1>&6
1196 cat > conftest.$ac_ext <<EOF
1197 #line 1209 "configure"
1198 #include "confdefs.h"
1202 /* Ultrix mips cc rejects this. */
1203 typedef int charset[2]; const charset x;
1204 /* SunOS 4.1.1 cc rejects this. */
1205 char const *const *ccp;
1207 /* NEC SVR4.0.2 mips cc rejects this. */
1208 struct point {int x, y;};
1209 static struct point const zero = {0,0};
1210 /* AIX XL C 1.02.0.0 rejects this.
1211 It does not let you subtract one const X* pointer from another in an arm
1212 of an if-expression whose if-part is not a constant expression */
1213 const char *g = "string";
1214 ccp = &g + (g ? g-g : 0);
1215 /* HPUX 7.0 cc rejects these. */
1218 ccp = (char const *const *) p;
1219 { /* SCO 3.2v4 cc rejects this. */
1221 char const *s = 0 ? (char *) 0 : (char const *) 0;
1225 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1227 const int *foo = &x[0];
1230 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1231 typedef const int *iptr;
1235 { /* AIX XL C 1.02.0.0 rejects this saying
1236 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1237 struct s { int j; const int *ap[3]; };
1238 struct s *b; b->j = 5;
1240 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1246 if { (eval echo configure:1258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1250 echo "configure: failed program was:" >&5
1251 cat conftest.$ac_ext >&5
1258 echo "$ac_t""$ac_cv_c_const" 1>&6
1259 if test $ac_cv_c_const = no; then
1260 cat >> confdefs.h <<\EOF
1266 echo $ac_n "checking for inline""... $ac_c" 1>&6
1267 echo "configure:1279: checking for inline" >&5
1268 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1269 echo $ac_n "(cached) $ac_c" 1>&6
1272 for ac_kw in inline __inline__ __inline; do
1273 cat > conftest.$ac_ext <<EOF
1274 #line 1286 "configure"
1275 #include "confdefs.h"
1281 if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1283 ac_cv_c_inline=$ac_kw; break
1285 echo "configure: failed program was:" >&5
1286 cat conftest.$ac_ext >&5
1293 echo "$ac_t""$ac_cv_c_inline" 1>&6
1294 case "$ac_cv_c_inline" in
1296 no) cat >> confdefs.h <<\EOF
1300 *) cat >> confdefs.h <<EOF
1301 #define inline $ac_cv_c_inline
1306 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
1307 echo $ac_n "checking for bc""... $ac_c" 1>&6
1308 echo "configure:1320: checking for bc" >&5
1309 if test "$ac_bc_result" = "15" ; then
1310 echo "$ac_t""yes" 1>&6
1312 echo "$ac_t""no" 1>&6
1314 { echo "configure: error: Your system doesn't have \"bc\", which has been a standard
1315 part of Unix since the 1970s. Come back when your vendor
1316 has grown a clue." 1>&2; exit 1; }
1320 # stuff for Makefiles
1321 # Find a good install program. We prefer a C program (faster),
1322 # so one script is as good as another. But avoid the broken or
1323 # incompatible versions:
1324 # SysV /etc/install, /usr/sbin/install
1325 # SunOS /usr/etc/install
1326 # IRIX /sbin/install
1328 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1329 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1330 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1331 # ./install, which can be erroneously created by make from ./install.sh.
1332 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1333 echo "configure:1345: checking for a BSD compatible install" >&5
1334 if test -z "$INSTALL"; then
1335 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1336 echo $ac_n "(cached) $ac_c" 1>&6
1338 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1339 for ac_dir in $PATH; do
1340 # Account for people who put trailing slashes in PATH elements.
1342 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1344 # OSF1 and SCO ODT 3.0 have their own names for install.
1345 # Don't use installbsd from OSF since it installs stuff as root
1347 for ac_prog in ginstall scoinst install; do
1348 if test -f $ac_dir/$ac_prog; then
1349 if test $ac_prog = install &&
1350 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1351 # AIX install. It has an incompatible calling convention.
1354 ac_cv_path_install="$ac_dir/$ac_prog -c"
1365 if test "${ac_cv_path_install+set}" = set; then
1366 INSTALL="$ac_cv_path_install"
1368 # As a last resort, use the slow shell script. We don't cache a
1369 # path for INSTALL within a source directory, because that will
1370 # break other packages using the cache if that directory is
1371 # removed, or if the path is relative.
1372 INSTALL="$ac_install_sh"
1375 echo "$ac_t""$INSTALL" 1>&6
1377 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1378 # It thinks the first close brace ends the variable substitution.
1379 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1381 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1383 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1385 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1386 echo "configure:1398: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1387 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1388 echo $ac_n "(cached) $ac_c" 1>&6
1390 ac_cv_install_d_creates_dirs=no
1392 if mkdir conftestdir; then
1394 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1395 if test -d dir1/dir2/. ; then
1396 ac_cv_install_d_creates_dirs=yes
1404 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1406 if test "$ac_cv_install_d_creates_dirs" = no ; then
1407 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1408 echo "configure:1420: checking whether \"mkdir -p\" creates intermediate directories" >&5
1409 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1410 echo $ac_n "(cached) $ac_c" 1>&6
1412 ac_cv_mkdir_p_creates_dirs=no
1414 if mkdir conftestdir; then
1416 mkdir -p dir1/dir2 >&- 2>&-
1417 if test -d dir1/dir2/. ; then
1418 ac_cv_mkdir_p_creates_dirs=yes
1426 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1429 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1430 INSTALL_DIRS='${INSTALL} -d'
1431 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1432 INSTALL_DIRS='mkdir -p'
1435 INSTALL_DIRS='${INSTALL} -d'
1438 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1439 echo "configure:1451: checking whether ${MAKE-make} sets \${MAKE}" >&5
1440 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1441 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1442 echo $ac_n "(cached) $ac_c" 1>&6
1444 cat > conftestmake <<\EOF
1446 @echo 'ac_maketemp="${MAKE}"'
1448 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1449 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1450 if test -n "$ac_maketemp"; then
1451 eval ac_cv_prog_make_${ac_make}_set=yes
1453 eval ac_cv_prog_make_${ac_make}_set=no
1457 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1458 echo "$ac_t""yes" 1>&6
1461 echo "$ac_t""no" 1>&6
1462 SET_MAKE="MAKE=${MAKE-make}"
1467 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1468 echo "configure:1480: checking for ANSI C header files" >&5
1469 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1470 echo $ac_n "(cached) $ac_c" 1>&6
1472 cat > conftest.$ac_ext <<EOF
1473 #line 1485 "configure"
1474 #include "confdefs.h"
1480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1481 { (eval echo configure:1493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1483 if test -z "$ac_err"; then
1485 ac_cv_header_stdc=yes
1488 echo "configure: failed program was:" >&5
1489 cat conftest.$ac_ext >&5
1491 ac_cv_header_stdc=no
1495 if test $ac_cv_header_stdc = yes; then
1496 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1497 cat > conftest.$ac_ext <<EOF
1498 #line 1510 "configure"
1499 #include "confdefs.h"
1502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1503 egrep "memchr" >/dev/null 2>&1; then
1507 ac_cv_header_stdc=no
1513 if test $ac_cv_header_stdc = yes; then
1514 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1515 cat > conftest.$ac_ext <<EOF
1516 #line 1528 "configure"
1517 #include "confdefs.h"
1520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1521 egrep "free" >/dev/null 2>&1; then
1525 ac_cv_header_stdc=no
1531 if test $ac_cv_header_stdc = yes; then
1532 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1533 if test "$cross_compiling" = yes; then
1536 cat > conftest.$ac_ext <<EOF
1537 #line 1549 "configure"
1538 #include "confdefs.h"
1540 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1541 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1542 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1543 int main () { int i; for (i = 0; i < 256; i++)
1544 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1548 if { (eval echo configure:1560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1552 echo "configure: failed program was:" >&5
1553 cat conftest.$ac_ext >&5
1555 ac_cv_header_stdc=no
1563 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1564 if test $ac_cv_header_stdc = yes; then
1565 cat >> confdefs.h <<\EOF
1566 #define STDC_HEADERS 1
1571 for ac_hdr in unistd.h
1573 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1574 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1575 echo "configure:1587: checking for $ac_hdr" >&5
1576 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1577 echo $ac_n "(cached) $ac_c" 1>&6
1579 cat > conftest.$ac_ext <<EOF
1580 #line 1592 "configure"
1581 #include "confdefs.h"
1584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1585 { (eval echo configure:1597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1587 if test -z "$ac_err"; then
1589 eval "ac_cv_header_$ac_safe=yes"
1592 echo "configure: failed program was:" >&5
1593 cat conftest.$ac_ext >&5
1595 eval "ac_cv_header_$ac_safe=no"
1599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1600 echo "$ac_t""yes" 1>&6
1601 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1602 cat >> confdefs.h <<EOF
1603 #define $ac_tr_hdr 1
1607 echo "$ac_t""no" 1>&6
1611 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1612 echo "configure:1624: checking for mode_t" >&5
1613 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1614 echo $ac_n "(cached) $ac_c" 1>&6
1616 cat > conftest.$ac_ext <<EOF
1617 #line 1629 "configure"
1618 #include "confdefs.h"
1619 #include <sys/types.h>
1625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1626 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1628 ac_cv_type_mode_t=yes
1631 ac_cv_type_mode_t=no
1636 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1637 if test $ac_cv_type_mode_t = no; then
1638 cat >> confdefs.h <<\EOF
1644 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1645 echo "configure:1657: checking for pid_t" >&5
1646 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1647 echo $ac_n "(cached) $ac_c" 1>&6
1649 cat > conftest.$ac_ext <<EOF
1650 #line 1662 "configure"
1651 #include "confdefs.h"
1652 #include <sys/types.h>
1658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1659 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1661 ac_cv_type_pid_t=yes
1669 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1670 if test $ac_cv_type_pid_t = no; then
1671 cat >> confdefs.h <<\EOF
1677 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1678 echo "configure:1690: checking for size_t" >&5
1679 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1682 cat > conftest.$ac_ext <<EOF
1683 #line 1695 "configure"
1684 #include "confdefs.h"
1685 #include <sys/types.h>
1691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1692 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1694 ac_cv_type_size_t=yes
1697 ac_cv_type_size_t=no
1702 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1703 if test $ac_cv_type_size_t = no; then
1704 cat >> confdefs.h <<\EOF
1705 #define size_t unsigned
1710 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1711 echo "configure:1723: checking return type of signal handlers" >&5
1712 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1713 echo $ac_n "(cached) $ac_c" 1>&6
1715 cat > conftest.$ac_ext <<EOF
1716 #line 1728 "configure"
1717 #include "confdefs.h"
1718 #include <sys/types.h>
1724 extern "C" void (*signal (int, void (*)(int)))(int);
1726 void (*signal ()) ();
1733 if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1735 ac_cv_type_signal=void
1737 echo "configure: failed program was:" >&5
1738 cat conftest.$ac_ext >&5
1740 ac_cv_type_signal=int
1745 echo "$ac_t""$ac_cv_type_signal" 1>&6
1746 cat >> confdefs.h <<EOF
1747 #define RETSIGTYPE $ac_cv_type_signal
1751 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1752 echo "configure:1764: checking whether time.h and sys/time.h may both be included" >&5
1753 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1754 echo $ac_n "(cached) $ac_c" 1>&6
1756 cat > conftest.$ac_ext <<EOF
1757 #line 1769 "configure"
1758 #include "confdefs.h"
1759 #include <sys/types.h>
1760 #include <sys/time.h>
1766 if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1768 ac_cv_header_time=yes
1770 echo "configure: failed program was:" >&5
1771 cat conftest.$ac_ext >&5
1773 ac_cv_header_time=no
1778 echo "$ac_t""$ac_cv_header_time" 1>&6
1779 if test $ac_cv_header_time = yes; then
1780 cat >> confdefs.h <<\EOF
1781 #define TIME_WITH_SYS_TIME 1
1786 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1787 echo "configure:1799: checking for sys/wait.h that is POSIX.1 compatible" >&5
1788 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1789 echo $ac_n "(cached) $ac_c" 1>&6
1791 cat > conftest.$ac_ext <<EOF
1792 #line 1804 "configure"
1793 #include "confdefs.h"
1794 #include <sys/types.h>
1795 #include <sys/wait.h>
1797 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1800 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1805 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1808 if { (eval echo configure:1820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1810 ac_cv_header_sys_wait_h=yes
1812 echo "configure: failed program was:" >&5
1813 cat conftest.$ac_ext >&5
1815 ac_cv_header_sys_wait_h=no
1820 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1821 if test $ac_cv_header_sys_wait_h = yes; then
1822 cat >> confdefs.h <<\EOF
1823 #define HAVE_SYS_WAIT_H 1
1829 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1832 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1833 echo "configure:1845: checking for $ac_hdr that defines DIR" >&5
1834 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1835 echo $ac_n "(cached) $ac_c" 1>&6
1837 cat > conftest.$ac_ext <<EOF
1838 #line 1850 "configure"
1839 #include "confdefs.h"
1840 #include <sys/types.h>
1846 if { (eval echo configure:1858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1848 eval "ac_cv_header_dirent_$ac_safe=yes"
1850 echo "configure: failed program was:" >&5
1851 cat conftest.$ac_ext >&5
1853 eval "ac_cv_header_dirent_$ac_safe=no"
1857 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1858 echo "$ac_t""yes" 1>&6
1859 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1860 cat >> confdefs.h <<EOF
1861 #define $ac_tr_hdr 1
1863 ac_header_dirent=$ac_hdr; break
1865 echo "$ac_t""no" 1>&6
1868 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1869 if test $ac_header_dirent = dirent.h; then
1870 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1871 echo "configure:1883: checking for opendir in -ldir" >&5
1872 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1873 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1874 echo $ac_n "(cached) $ac_c" 1>&6
1876 ac_save_LIBS="$LIBS"
1878 cat > conftest.$ac_ext <<EOF
1879 #line 1891 "configure"
1880 #include "confdefs.h"
1881 /* Override any gcc2 internal prototype to avoid an error. */
1882 /* We use char because int might match the return type of a gcc2
1883 builtin and then its argument prototype would still apply. */
1890 if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1892 eval "ac_cv_lib_$ac_lib_var=yes"
1894 echo "configure: failed program was:" >&5
1895 cat conftest.$ac_ext >&5
1897 eval "ac_cv_lib_$ac_lib_var=no"
1900 LIBS="$ac_save_LIBS"
1903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1904 echo "$ac_t""yes" 1>&6
1907 echo "$ac_t""no" 1>&6
1911 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1912 echo "configure:1924: checking for opendir in -lx" >&5
1913 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1914 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1915 echo $ac_n "(cached) $ac_c" 1>&6
1917 ac_save_LIBS="$LIBS"
1919 cat > conftest.$ac_ext <<EOF
1920 #line 1932 "configure"
1921 #include "confdefs.h"
1922 /* Override any gcc2 internal prototype to avoid an error. */
1923 /* We use char because int might match the return type of a gcc2
1924 builtin and then its argument prototype would still apply. */
1931 if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1933 eval "ac_cv_lib_$ac_lib_var=yes"
1935 echo "configure: failed program was:" >&5
1936 cat conftest.$ac_ext >&5
1938 eval "ac_cv_lib_$ac_lib_var=no"
1941 LIBS="$ac_save_LIBS"
1944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1945 echo "$ac_t""yes" 1>&6
1948 echo "$ac_t""no" 1>&6
1953 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1954 echo "configure:1966: checking how to call gettimeofday" >&5
1955 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1956 echo $ac_n "(cached) $ac_c" 1>&6
1958 cat > conftest.$ac_ext <<EOF
1959 #line 1971 "configure"
1960 #include "confdefs.h"
1962 #include <sys/time.h>
1964 struct timeval tv; struct timezone tzp;
1965 gettimeofday(&tv, &tzp);
1968 if { (eval echo configure:1980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1970 ac_gettimeofday_args=2
1972 echo "configure: failed program was:" >&5
1973 cat conftest.$ac_ext >&5
1975 cat > conftest.$ac_ext <<EOF
1976 #line 1988 "configure"
1977 #include "confdefs.h"
1979 #include <sys/time.h>
1981 struct timeval tv; gettimeofday(&tv);
1984 if { (eval echo configure:1996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1986 ac_gettimeofday_args=1
1988 echo "configure: failed program was:" >&5
1989 cat conftest.$ac_ext >&5
1991 ac_gettimeofday_args=0
1996 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1999 ac_gettimeofday_args=$ac_cv_gettimeofday_args
2000 if test "$ac_gettimeofday_args" = 1 ; then
2001 cat >> confdefs.h <<\EOF
2002 #define HAVE_GETTIMEOFDAY 1
2005 echo "$ac_t""one argument" 1>&6
2006 elif test "$ac_gettimeofday_args" = 2 ; then
2007 cat >> confdefs.h <<\EOF
2008 #define HAVE_GETTIMEOFDAY 1
2011 cat >> confdefs.h <<\EOF
2012 #define GETTIMEOFDAY_TWO_ARGS 1
2015 echo "$ac_t""two arguments" 1>&6
2017 echo "$ac_t""unknown" 1>&6
2020 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
2022 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2023 echo "configure:2035: checking for $ac_func" >&5
2024 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2025 echo $ac_n "(cached) $ac_c" 1>&6
2027 cat > conftest.$ac_ext <<EOF
2028 #line 2040 "configure"
2029 #include "confdefs.h"
2030 /* System header to define __stub macros and hopefully few prototypes,
2031 which can conflict with char $ac_func(); below. */
2033 /* Override any gcc2 internal prototype to avoid an error. */
2034 /* We use char because int might match the return type of a gcc2
2035 builtin and then its argument prototype would still apply. */
2040 /* The GNU C library defines this for functions which it implements
2041 to always fail with ENOSYS. Some functions are actually named
2042 something starting with __ and the normal name is an alias. */
2043 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2051 if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2053 eval "ac_cv_func_$ac_func=yes"
2055 echo "configure: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2058 eval "ac_cv_func_$ac_func=no"
2063 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2064 echo "$ac_t""yes" 1>&6
2065 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2066 cat >> confdefs.h <<EOF
2067 #define $ac_tr_func 1
2071 echo "$ac_t""no" 1>&6
2076 for ac_func in sigaction syslog realpath
2078 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2079 echo "configure:2091: checking for $ac_func" >&5
2080 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2081 echo $ac_n "(cached) $ac_c" 1>&6
2083 cat > conftest.$ac_ext <<EOF
2084 #line 2096 "configure"
2085 #include "confdefs.h"
2086 /* System header to define __stub macros and hopefully few prototypes,
2087 which can conflict with char $ac_func(); below. */
2089 /* Override any gcc2 internal prototype to avoid an error. */
2090 /* We use char because int might match the return type of a gcc2
2091 builtin and then its argument prototype would still apply. */
2096 /* The GNU C library defines this for functions which it implements
2097 to always fail with ENOSYS. Some functions are actually named
2098 something starting with __ and the normal name is an alias. */
2099 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2107 if { (eval echo configure:2119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2109 eval "ac_cv_func_$ac_func=yes"
2111 echo "configure: failed program was:" >&5
2112 cat conftest.$ac_ext >&5
2114 eval "ac_cv_func_$ac_func=no"
2119 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2120 echo "$ac_t""yes" 1>&6
2121 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2122 cat >> confdefs.h <<EOF
2123 #define $ac_tr_func 1
2127 echo "$ac_t""no" 1>&6
2131 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2132 echo "configure:2144: checking for struct icmp" >&5
2133 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2134 echo $ac_n "(cached) $ac_c" 1>&6
2136 cat > conftest.$ac_ext <<EOF
2137 #line 2149 "configure"
2138 #include "confdefs.h"
2146 #include <sys/types.h>
2147 #include <sys/time.h>
2148 #include <sys/ipc.h>
2149 #include <sys/shm.h>
2150 #include <sys/socket.h>
2151 #include <netinet/in_systm.h>
2152 #include <netinet/in.h>
2153 #include <netinet/ip.h>
2154 #include <netinet/ip_icmp.h>
2155 #include <netinet/udp.h>
2156 #include <arpa/inet.h>
2161 struct sockaddr_in si;
2163 i.icmp_type = ICMP_ECHO;
2168 si.sin_family = AF_INET;
2172 if { (eval echo configure:2184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2176 echo "configure: failed program was:" >&5
2177 cat conftest.$ac_ext >&5
2184 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2185 if test "$ac_cv_have_icmp" = yes ; then
2186 cat >> confdefs.h <<\EOF
2191 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2192 echo "configure:2204: checking for struct icmphdr" >&5
2193 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2194 echo $ac_n "(cached) $ac_c" 1>&6
2196 cat > conftest.$ac_ext <<EOF
2197 #line 2209 "configure"
2198 #include "confdefs.h"
2206 #include <sys/types.h>
2207 #include <sys/time.h>
2208 #include <sys/ipc.h>
2209 #include <sys/shm.h>
2210 #include <sys/socket.h>
2211 #include <netinet/in_systm.h>
2212 #include <netinet/in.h>
2213 #include <netinet/ip.h>
2214 #include <netinet/ip_icmp.h>
2215 #include <netinet/udp.h>
2216 #include <arpa/inet.h>
2221 struct sockaddr_in si;
2227 i.un.echo.sequence = 0;
2228 si.sin_family = AF_INET;
2232 if { (eval echo configure:2244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2234 ac_cv_have_icmphdr=yes
2236 echo "configure: failed program was:" >&5
2237 cat conftest.$ac_ext >&5
2239 ac_cv_have_icmphdr=no
2244 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2245 if test "$ac_cv_have_icmphdr" = yes ; then
2246 cat >> confdefs.h <<\EOF
2247 #define HAVE_ICMPHDR 1
2251 for ac_hdr in crypt.h sys/select.h
2253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2255 echo "configure:2267: checking for $ac_hdr" >&5
2256 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2257 echo $ac_n "(cached) $ac_c" 1>&6
2259 cat > conftest.$ac_ext <<EOF
2260 #line 2272 "configure"
2261 #include "confdefs.h"
2264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2265 { (eval echo configure:2277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2267 if test -z "$ac_err"; then
2269 eval "ac_cv_header_$ac_safe=yes"
2272 echo "configure: failed program was:" >&5
2273 cat conftest.$ac_ext >&5
2275 eval "ac_cv_header_$ac_safe=no"
2279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2280 echo "$ac_t""yes" 1>&6
2281 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2282 cat >> confdefs.h <<EOF
2283 #define $ac_tr_hdr 1
2287 echo "$ac_t""no" 1>&6
2291 for ac_prog in perl5 perl
2293 # Extract the first word of "$ac_prog", so it can be a program name with args.
2294 set dummy $ac_prog; ac_word=$2
2295 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2296 echo "configure:2308: checking for $ac_word" >&5
2297 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2298 echo $ac_n "(cached) $ac_c" 1>&6
2302 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2305 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2308 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2310 for ac_dir in $ac_dummy; do
2311 test -z "$ac_dir" && ac_dir=.
2312 if test -f $ac_dir/$ac_word; then
2313 ac_cv_path_PERL="$ac_dir/$ac_word"
2321 PERL="$ac_cv_path_PERL"
2322 if test -n "$PERL"; then
2323 echo "$ac_t""$PERL" 1>&6
2325 echo "$ac_t""no" 1>&6
2328 test -n "$PERL" && break
2331 if test -z "$PERL" ; then
2334 echo $ac_n "checking perl version""... $ac_c" 1>&6
2335 echo "configure:2347: checking perl version" >&5
2336 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
2339 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2342 echo "$ac_t""$ac_cv_perl_version" 1>&6
2343 PERL_VERSION=$ac_cv_perl_version
2347 if test -z "$PERL" ; then
2348 # don't let it be blank...
2349 PERL=/usr/local/bin/perl5
2352 # If we find X, set shell vars x_includes and x_libraries to the
2353 # paths, otherwise set no_x=yes.
2354 # Uses ac_ vars as temps to allow command line to override cache and checks.
2355 # --without-x overrides everything else, but does not touch the cache.
2356 echo $ac_n "checking for X""... $ac_c" 1>&6
2357 echo "configure:2369: checking for X" >&5
2359 # Check whether --with-x or --without-x was given.
2360 if test "${with_x+set}" = set; then
2365 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2366 if test "x$with_x" = xno; then
2367 # The user explicitly disabled X.
2370 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2371 # Both variables are already set.
2374 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2375 echo $ac_n "(cached) $ac_c" 1>&6
2377 # One or both of the vars are not set, and there is no cached value.
2378 ac_x_includes=NO ac_x_libraries=NO
2380 if mkdir conftestdir; then
2382 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2383 cat > Imakefile <<'EOF'
2385 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2387 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2388 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2389 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2390 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2391 for ac_extension in a so sl; do
2392 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2393 test -f $ac_im_libdir/libX11.$ac_extension; then
2394 ac_im_usrlibdir=$ac_im_libdir; break
2397 # Screen out bogus values from the imake configuration. They are
2398 # bogus both because they are the default anyway, and because
2399 # using them would break gcc on systems where it needs fixed includes.
2400 case "$ac_im_incroot" in
2402 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2404 case "$ac_im_usrlibdir" in
2406 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2413 if test "$ac_x_includes" = NO; then
2414 # Guess where to find include files, by looking for this one X11 .h file.
2415 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2417 # First, try using that file with no special directory specified.
2418 cat > conftest.$ac_ext <<EOF
2419 #line 2431 "configure"
2420 #include "confdefs.h"
2421 #include <$x_direct_test_include>
2423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2424 { (eval echo configure:2436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2426 if test -z "$ac_err"; then
2428 # We can compile using X headers with no special include directory.
2432 echo "configure: failed program was:" >&5
2433 cat conftest.$ac_ext >&5
2435 # Look for the header file in a standard set of common directories.
2436 # Check X11 before X11Rn because it is often a symlink to the current release.
2439 /usr/X11R6/include \
2440 /usr/X11R5/include \
2441 /usr/X11R4/include \
2444 /usr/include/X11R6 \
2445 /usr/include/X11R5 \
2446 /usr/include/X11R4 \
2448 /usr/local/X11/include \
2449 /usr/local/X11R6/include \
2450 /usr/local/X11R5/include \
2451 /usr/local/X11R4/include \
2453 /usr/local/include/X11 \
2454 /usr/local/include/X11R6 \
2455 /usr/local/include/X11R5 \
2456 /usr/local/include/X11R4 \
2460 /usr/XFree86/include/X11 \
2463 /usr/local/include \
2464 /usr/unsupported/include \
2465 /usr/athena/include \
2466 /usr/local/x11r5/include \
2467 /usr/lpp/Xamples/include \
2469 /usr/openwin/include \
2470 /usr/openwin/share/include \
2473 if test -r "$ac_dir/$x_direct_test_include"; then
2474 ac_x_includes=$ac_dir
2480 fi # $ac_x_includes = NO
2482 if test "$ac_x_libraries" = NO; then
2483 # Check for the libraries.
2485 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2486 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2488 # See if we find them without any special options.
2489 # Don't add to $LIBS permanently.
2490 ac_save_LIBS="$LIBS"
2491 LIBS="-l$x_direct_test_library $LIBS"
2492 cat > conftest.$ac_ext <<EOF
2493 #line 2505 "configure"
2494 #include "confdefs.h"
2497 ${x_direct_test_function}()
2500 if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2502 LIBS="$ac_save_LIBS"
2503 # We can link X programs with no special library path.
2506 echo "configure: failed program was:" >&5
2507 cat conftest.$ac_ext >&5
2509 LIBS="$ac_save_LIBS"
2510 # First see if replacing the include by lib works.
2511 # Check X11 before X11Rn because it is often a symlink to the current release.
2512 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2523 /usr/local/X11/lib \
2524 /usr/local/X11R6/lib \
2525 /usr/local/X11R5/lib \
2526 /usr/local/X11R4/lib \
2528 /usr/local/lib/X11 \
2529 /usr/local/lib/X11R6 \
2530 /usr/local/lib/X11R5 \
2531 /usr/local/lib/X11R4 \
2535 /usr/XFree86/lib/X11 \
2539 /usr/unsupported/lib \
2541 /usr/local/x11r5/lib \
2542 /usr/lpp/Xamples/lib \
2546 /usr/openwin/share/lib \
2549 for ac_extension in a so sl; do
2550 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2551 ac_x_libraries=$ac_dir
2558 fi # $ac_x_libraries = NO
2560 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2561 # Didn't find X anywhere. Cache the known absence of X.
2562 ac_cv_have_x="have_x=no"
2564 # Record where we found X for the cache.
2565 ac_cv_have_x="have_x=yes \
2566 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2570 eval "$ac_cv_have_x"
2573 if test "$have_x" != yes; then
2574 echo "$ac_t""$have_x" 1>&6
2577 # If each of the values was on the command line, it overrides each guess.
2578 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2579 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2580 # Update the cache value to reflect the command line values.
2581 ac_cv_have_x="have_x=yes \
2582 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2583 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2586 if test "$no_x" = yes; then
2587 # Not all programs may use this symbol, but it does not hurt to define it.
2588 cat >> confdefs.h <<\EOF
2589 #define X_DISPLAY_MISSING 1
2592 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2594 if test -n "$x_includes"; then
2595 X_CFLAGS="$X_CFLAGS -I$x_includes"
2598 # It would also be nice to do this for all -L options, not just this one.
2599 if test -n "$x_libraries"; then
2600 X_LIBS="$X_LIBS -L$x_libraries"
2601 # For Solaris; some versions of Sun CC require a space after -R and
2602 # others require no space. Words are not sufficient . . . .
2603 case "`(uname -sr) 2>/dev/null`" in
2605 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2606 echo "configure:2618: checking whether -R must be followed by a space" >&5
2607 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2608 cat > conftest.$ac_ext <<EOF
2609 #line 2621 "configure"
2610 #include "confdefs.h"
2616 if { (eval echo configure:2628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2620 echo "configure: failed program was:" >&5
2621 cat conftest.$ac_ext >&5
2626 if test $ac_R_nospace = yes; then
2627 echo "$ac_t""no" 1>&6
2628 X_LIBS="$X_LIBS -R$x_libraries"
2630 LIBS="$ac_xsave_LIBS -R $x_libraries"
2631 cat > conftest.$ac_ext <<EOF
2632 #line 2644 "configure"
2633 #include "confdefs.h"
2639 if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2643 echo "configure: failed program was:" >&5
2644 cat conftest.$ac_ext >&5
2649 if test $ac_R_space = yes; then
2650 echo "$ac_t""yes" 1>&6
2651 X_LIBS="$X_LIBS -R $x_libraries"
2653 echo "$ac_t""neither works" 1>&6
2656 LIBS="$ac_xsave_LIBS"
2660 # Check for system-dependent libraries X programs must link with.
2661 # Do this before checking for the system-independent R6 libraries
2662 # (-lICE), since we may need -lsocket or whatever for X linking.
2664 if test "$ISC" = yes; then
2665 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2667 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2668 # libraries were built with DECnet support. And karl@cs.umb.edu says
2669 # the Alpha needs dnet_stub (dnet does not exist).
2670 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2671 echo "configure:2683: checking for dnet_ntoa in -ldnet" >&5
2672 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2674 echo $ac_n "(cached) $ac_c" 1>&6
2676 ac_save_LIBS="$LIBS"
2678 cat > conftest.$ac_ext <<EOF
2679 #line 2691 "configure"
2680 #include "confdefs.h"
2681 /* Override any gcc2 internal prototype to avoid an error. */
2682 /* We use char because int might match the return type of a gcc2
2683 builtin and then its argument prototype would still apply. */
2690 if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2692 eval "ac_cv_lib_$ac_lib_var=yes"
2694 echo "configure: failed program was:" >&5
2695 cat conftest.$ac_ext >&5
2697 eval "ac_cv_lib_$ac_lib_var=no"
2700 LIBS="$ac_save_LIBS"
2703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2704 echo "$ac_t""yes" 1>&6
2705 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2707 echo "$ac_t""no" 1>&6
2710 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2711 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2712 echo "configure:2724: checking for dnet_ntoa in -ldnet_stub" >&5
2713 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2714 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2715 echo $ac_n "(cached) $ac_c" 1>&6
2717 ac_save_LIBS="$LIBS"
2718 LIBS="-ldnet_stub $LIBS"
2719 cat > conftest.$ac_ext <<EOF
2720 #line 2732 "configure"
2721 #include "confdefs.h"
2722 /* Override any gcc2 internal prototype to avoid an error. */
2723 /* We use char because int might match the return type of a gcc2
2724 builtin and then its argument prototype would still apply. */
2731 if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2733 eval "ac_cv_lib_$ac_lib_var=yes"
2735 echo "configure: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
2738 eval "ac_cv_lib_$ac_lib_var=no"
2741 LIBS="$ac_save_LIBS"
2744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2745 echo "$ac_t""yes" 1>&6
2746 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2748 echo "$ac_t""no" 1>&6
2753 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2754 # to get the SysV transport functions.
2755 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2757 # The nsl library prevents programs from opening the X display
2758 # on Irix 5.2, according to dickey@clark.net.
2759 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2760 echo "configure:2772: checking for gethostbyname" >&5
2761 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2762 echo $ac_n "(cached) $ac_c" 1>&6
2764 cat > conftest.$ac_ext <<EOF
2765 #line 2777 "configure"
2766 #include "confdefs.h"
2767 /* System header to define __stub macros and hopefully few prototypes,
2768 which can conflict with char gethostbyname(); below. */
2770 /* Override any gcc2 internal prototype to avoid an error. */
2771 /* We use char because int might match the return type of a gcc2
2772 builtin and then its argument prototype would still apply. */
2773 char gethostbyname();
2777 /* The GNU C library defines this for functions which it implements
2778 to always fail with ENOSYS. Some functions are actually named
2779 something starting with __ and the normal name is an alias. */
2780 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2788 if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2790 eval "ac_cv_func_gethostbyname=yes"
2792 echo "configure: failed program was:" >&5
2793 cat conftest.$ac_ext >&5
2795 eval "ac_cv_func_gethostbyname=no"
2800 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2801 echo "$ac_t""yes" 1>&6
2804 echo "$ac_t""no" 1>&6
2807 if test $ac_cv_func_gethostbyname = no; then
2808 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2809 echo "configure:2821: checking for gethostbyname in -lnsl" >&5
2810 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2811 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2812 echo $ac_n "(cached) $ac_c" 1>&6
2814 ac_save_LIBS="$LIBS"
2816 cat > conftest.$ac_ext <<EOF
2817 #line 2829 "configure"
2818 #include "confdefs.h"
2819 /* Override any gcc2 internal prototype to avoid an error. */
2820 /* We use char because int might match the return type of a gcc2
2821 builtin and then its argument prototype would still apply. */
2822 char gethostbyname();
2828 if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2830 eval "ac_cv_lib_$ac_lib_var=yes"
2832 echo "configure: failed program was:" >&5
2833 cat conftest.$ac_ext >&5
2835 eval "ac_cv_lib_$ac_lib_var=no"
2838 LIBS="$ac_save_LIBS"
2841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2842 echo "$ac_t""yes" 1>&6
2843 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2845 echo "$ac_t""no" 1>&6
2850 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2851 # socket/setsockopt and other routines are undefined under SCO ODT
2852 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2853 # on later versions), says simon@lia.di.epfl.ch: it contains
2854 # gethostby* variants that don't use the nameserver (or something).
2855 # -lsocket must be given before -lnsl if both are needed.
2856 # We assume that if connect needs -lnsl, so does gethostbyname.
2857 echo $ac_n "checking for connect""... $ac_c" 1>&6
2858 echo "configure:2870: checking for connect" >&5
2859 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2860 echo $ac_n "(cached) $ac_c" 1>&6
2862 cat > conftest.$ac_ext <<EOF
2863 #line 2875 "configure"
2864 #include "confdefs.h"
2865 /* System header to define __stub macros and hopefully few prototypes,
2866 which can conflict with char connect(); below. */
2868 /* Override any gcc2 internal prototype to avoid an error. */
2869 /* We use char because int might match the return type of a gcc2
2870 builtin and then its argument prototype would still apply. */
2875 /* The GNU C library defines this for functions which it implements
2876 to always fail with ENOSYS. Some functions are actually named
2877 something starting with __ and the normal name is an alias. */
2878 #if defined (__stub_connect) || defined (__stub___connect)
2886 if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2888 eval "ac_cv_func_connect=yes"
2890 echo "configure: failed program was:" >&5
2891 cat conftest.$ac_ext >&5
2893 eval "ac_cv_func_connect=no"
2898 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2899 echo "$ac_t""yes" 1>&6
2902 echo "$ac_t""no" 1>&6
2905 if test $ac_cv_func_connect = no; then
2906 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2907 echo "configure:2919: checking for connect in -lsocket" >&5
2908 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2910 echo $ac_n "(cached) $ac_c" 1>&6
2912 ac_save_LIBS="$LIBS"
2913 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2914 cat > conftest.$ac_ext <<EOF
2915 #line 2927 "configure"
2916 #include "confdefs.h"
2917 /* Override any gcc2 internal prototype to avoid an error. */
2918 /* We use char because int might match the return type of a gcc2
2919 builtin and then its argument prototype would still apply. */
2926 if { (eval echo configure:2938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2928 eval "ac_cv_lib_$ac_lib_var=yes"
2930 echo "configure: failed program was:" >&5
2931 cat conftest.$ac_ext >&5
2933 eval "ac_cv_lib_$ac_lib_var=no"
2936 LIBS="$ac_save_LIBS"
2939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2940 echo "$ac_t""yes" 1>&6
2941 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2943 echo "$ac_t""no" 1>&6
2948 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2949 echo $ac_n "checking for remove""... $ac_c" 1>&6
2950 echo "configure:2962: checking for remove" >&5
2951 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2952 echo $ac_n "(cached) $ac_c" 1>&6
2954 cat > conftest.$ac_ext <<EOF
2955 #line 2967 "configure"
2956 #include "confdefs.h"
2957 /* System header to define __stub macros and hopefully few prototypes,
2958 which can conflict with char remove(); below. */
2960 /* Override any gcc2 internal prototype to avoid an error. */
2961 /* We use char because int might match the return type of a gcc2
2962 builtin and then its argument prototype would still apply. */
2967 /* The GNU C library defines this for functions which it implements
2968 to always fail with ENOSYS. Some functions are actually named
2969 something starting with __ and the normal name is an alias. */
2970 #if defined (__stub_remove) || defined (__stub___remove)
2978 if { (eval echo configure:2990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2980 eval "ac_cv_func_remove=yes"
2982 echo "configure: failed program was:" >&5
2983 cat conftest.$ac_ext >&5
2985 eval "ac_cv_func_remove=no"
2990 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2991 echo "$ac_t""yes" 1>&6
2994 echo "$ac_t""no" 1>&6
2997 if test $ac_cv_func_remove = no; then
2998 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2999 echo "configure:3011: checking for remove in -lposix" >&5
3000 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3001 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3002 echo $ac_n "(cached) $ac_c" 1>&6
3004 ac_save_LIBS="$LIBS"
3005 LIBS="-lposix $LIBS"
3006 cat > conftest.$ac_ext <<EOF
3007 #line 3019 "configure"
3008 #include "confdefs.h"
3009 /* Override any gcc2 internal prototype to avoid an error. */
3010 /* We use char because int might match the return type of a gcc2
3011 builtin and then its argument prototype would still apply. */
3018 if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3020 eval "ac_cv_lib_$ac_lib_var=yes"
3022 echo "configure: failed program was:" >&5
3023 cat conftest.$ac_ext >&5
3025 eval "ac_cv_lib_$ac_lib_var=no"
3028 LIBS="$ac_save_LIBS"
3031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3032 echo "$ac_t""yes" 1>&6
3033 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3035 echo "$ac_t""no" 1>&6
3040 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3041 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3042 echo "configure:3054: checking for shmat" >&5
3043 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3044 echo $ac_n "(cached) $ac_c" 1>&6
3046 cat > conftest.$ac_ext <<EOF
3047 #line 3059 "configure"
3048 #include "confdefs.h"
3049 /* System header to define __stub macros and hopefully few prototypes,
3050 which can conflict with char shmat(); below. */
3052 /* Override any gcc2 internal prototype to avoid an error. */
3053 /* We use char because int might match the return type of a gcc2
3054 builtin and then its argument prototype would still apply. */
3059 /* The GNU C library defines this for functions which it implements
3060 to always fail with ENOSYS. Some functions are actually named
3061 something starting with __ and the normal name is an alias. */
3062 #if defined (__stub_shmat) || defined (__stub___shmat)
3070 if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3072 eval "ac_cv_func_shmat=yes"
3074 echo "configure: failed program was:" >&5
3075 cat conftest.$ac_ext >&5
3077 eval "ac_cv_func_shmat=no"
3082 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3083 echo "$ac_t""yes" 1>&6
3086 echo "$ac_t""no" 1>&6
3089 if test $ac_cv_func_shmat = no; then
3090 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3091 echo "configure:3103: checking for shmat in -lipc" >&5
3092 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3093 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3094 echo $ac_n "(cached) $ac_c" 1>&6
3096 ac_save_LIBS="$LIBS"
3098 cat > conftest.$ac_ext <<EOF
3099 #line 3111 "configure"
3100 #include "confdefs.h"
3101 /* Override any gcc2 internal prototype to avoid an error. */
3102 /* We use char because int might match the return type of a gcc2
3103 builtin and then its argument prototype would still apply. */
3110 if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3112 eval "ac_cv_lib_$ac_lib_var=yes"
3114 echo "configure: failed program was:" >&5
3115 cat conftest.$ac_ext >&5
3117 eval "ac_cv_lib_$ac_lib_var=no"
3120 LIBS="$ac_save_LIBS"
3123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3124 echo "$ac_t""yes" 1>&6
3125 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3127 echo "$ac_t""no" 1>&6
3133 # Check for libraries that X11R6 Xt/Xaw programs need.
3134 ac_save_LDFLAGS="$LDFLAGS"
3135 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3136 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3137 # check for ICE first), but we must link in the order -lSM -lICE or
3138 # we get undefined symbols. So assume we have SM if we have ICE.
3139 # These have to be linked with before -lX11, unlike the other
3140 # libraries we check for below, so use a different variable.
3141 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3142 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3143 echo "configure:3155: checking for IceConnectionNumber in -lICE" >&5
3144 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3145 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3146 echo $ac_n "(cached) $ac_c" 1>&6
3148 ac_save_LIBS="$LIBS"
3149 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3150 cat > conftest.$ac_ext <<EOF
3151 #line 3163 "configure"
3152 #include "confdefs.h"
3153 /* Override any gcc2 internal prototype to avoid an error. */
3154 /* We use char because int might match the return type of a gcc2
3155 builtin and then its argument prototype would still apply. */
3156 char IceConnectionNumber();
3159 IceConnectionNumber()
3162 if { (eval echo configure:3174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3164 eval "ac_cv_lib_$ac_lib_var=yes"
3166 echo "configure: failed program was:" >&5
3167 cat conftest.$ac_ext >&5
3169 eval "ac_cv_lib_$ac_lib_var=no"
3172 LIBS="$ac_save_LIBS"
3175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3176 echo "$ac_t""yes" 1>&6
3177 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3179 echo "$ac_t""no" 1>&6
3182 LDFLAGS="$ac_save_LDFLAGS"
3187 if test "$have_x" != yes; then
3188 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3192 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3193 echo "configure:3205: checking for X app-defaults directory" >&5
3194 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3195 echo $ac_n "(cached) $ac_c" 1>&6
3199 if mkdir conftestdir; then
3201 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3202 cat > Imakefile <<'EOF'
3204 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3206 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3207 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3208 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3213 if test x"$ac_x_app_defaults" = x; then
3215 # Look for the directory under a standard set of common directories.
3216 # Check X11 before X11Rn because it's often a symlink to the current release.
3218 /usr/X11/lib/app-defaults \
3219 /usr/X11R6/lib/app-defaults \
3220 /usr/X11R6/lib/X11/app-defaults \
3221 /usr/X11R5/lib/app-defaults \
3222 /usr/X11R5/lib/X11/app-defaults \
3223 /usr/X11R4/lib/app-defaults \
3224 /usr/X11R4/lib/X11/app-defaults \
3226 /usr/lib/X11/app-defaults \
3227 /usr/lib/X11R6/app-defaults \
3228 /usr/lib/X11R5/app-defaults \
3229 /usr/lib/X11R4/app-defaults \
3231 /usr/local/X11/lib/app-defaults \
3232 /usr/local/X11R6/lib/app-defaults \
3233 /usr/local/X11R5/lib/app-defaults \
3234 /usr/local/X11R4/lib/app-defaults \
3236 /usr/local/lib/X11/app-defaults \
3237 /usr/local/lib/X11R6/app-defaults \
3238 /usr/local/lib/X11R6/X11/app-defaults \
3239 /usr/local/lib/X11R5/app-defaults \
3240 /usr/local/lib/X11R5/X11/app-defaults \
3241 /usr/local/lib/X11R4/app-defaults \
3242 /usr/local/lib/X11R4/X11/app-defaults \
3244 /usr/X386/lib/X11/app-defaults \
3245 /usr/x386/lib/X11/app-defaults \
3246 /usr/XFree86/lib/X11/app-defaults \
3248 /usr/lib/X11/app-defaults \
3249 /usr/local/lib/X11/app-defaults \
3250 /usr/unsupported/lib/X11/app-defaults \
3251 /usr/athena/lib/X11/app-defaults \
3252 /usr/local/x11r5/lib/X11/app-defaults \
3253 /usr/lpp/Xamples/lib/X11/app-defaults \
3254 /lib/usr/lib/X11/app-defaults \
3256 /usr/openwin/lib/app-defaults \
3257 /usr/openwin/lib/X11/app-defaults \
3258 /usr/openwin/share/lib/app-defaults \
3259 /usr/openwin/share/lib/X11/app-defaults \
3261 /X11R6/lib/app-defaults \
3262 /X11R5/lib/app-defaults \
3263 /X11R4/lib/app-defaults \
3266 if test -d "$ac_dir"; then
3267 ac_x_app_defaults=$ac_dir
3273 if test x"$ac_x_app_defaults" = x; then
3274 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3276 # Record where we found app-defaults for the cache.
3277 ac_cv_x_app_defaults="$ac_x_app_defaults"
3281 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3282 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3286 # The following arcana was gleaned from conversations with
3287 # Eric Schwartz <erics@col.hp.com>:
3289 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3290 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3291 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3292 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3293 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3294 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3295 # you don't need any -I or -L arguments.
3297 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3298 # are the same division as 10.x. However, there are no symlinks to
3299 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3300 # arguments are always necessary.
3302 # However, X11R6 was available on HPUX 9.x as a patch: if that
3303 # patch was installed, then all of X11R6 went in to
3304 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3306 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3307 # whether R5 was available as a patch; R6 undoubtedly was not.)
3309 # So. We try and use the highest numbered pair of
3310 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3311 # that are available. We do not mix and match different versions
3314 # Question I still don't know the answer to: (do you?)
3316 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3317 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3318 # that contrib directory? Did it contain so-called "standard"
3319 # X11R6, or did it include Xaw and Xmu as well? If the former,
3320 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3321 # be a situation where one had to reach into the R5 headers and
3322 # libs to find Xmu? That is, must both R6 and R5 directories
3323 # be on the -I and -L lists in that case?
3325 for version in X11R6 X11R5 X11R4 ; do
3326 # if either pair of directories exists...
3327 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3329 # if contrib exists, use it...
3330 if test -d /usr/contrib/$version/lib ; then
3331 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3332 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3334 # if the "standard" one exists, use it.
3335 if test -d /usr/lib/$version ; then
3336 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3337 X_LIBS="$X_LIBS -L/usr/lib/$version"
3339 # since at least one of the pair exists, go no farther.
3344 # Now find Motif. Thanks for not making xmkmf find this by
3345 # default, you losers.
3347 if test -d /usr/lib/Motif1.2 ; then
3348 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3349 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3350 elif test -d /usr/lib/Motif1.1 ; then
3351 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3352 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3355 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3357 if test -d /opt/Mesa/lib ; then
3358 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3359 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3362 if test -d /opt/xpm/lib/X11 ; then
3363 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3364 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3367 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3368 # in /usr/local/, unless there is already an xscreensaver in
3369 # /usr/local/bin/. This can be overridden with the --prefix arg
3370 # to configure. I'm not sure this is the right thing to do, but
3371 # Richard Lloyd says so...
3373 if test \! -x /usr/local/bin/xscreensaver ; then
3374 ac_default_prefix=/opt/xscreensaver
3380 # Thanks for not making xmkmf find this by default, pinheads.
3381 # And thanks for moving things around again, too. Is this
3382 # really the standard location now? What happened to the
3383 # joke that this kind of thing went in /opt?
3384 # cthomp says "answer: CDE (Common Disorganized Environment)"
3386 if test -f /usr/dt/include/Xm/Xm.h ; then
3387 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3388 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3390 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3391 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3392 echo "configure:3404: checking for regcmp in -lgen" >&5
3393 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3395 echo $ac_n "(cached) $ac_c" 1>&6
3397 ac_save_LIBS="$LIBS"
3399 cat > conftest.$ac_ext <<EOF
3400 #line 3412 "configure"
3401 #include "confdefs.h"
3402 /* Override any gcc2 internal prototype to avoid an error. */
3403 /* We use char because int might match the return type of a gcc2
3404 builtin and then its argument prototype would still apply. */
3411 if { (eval echo configure:3423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3413 eval "ac_cv_lib_$ac_lib_var=yes"
3415 echo "configure: failed program was:" >&5
3416 cat conftest.$ac_ext >&5
3418 eval "ac_cv_lib_$ac_lib_var=no"
3421 LIBS="$ac_save_LIBS"
3424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3425 echo "$ac_t""yes" 1>&6
3426 X_LIBS="$X_LIBS -lgen"
3428 echo "$ac_t""no" 1>&6
3434 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3435 echo "configure:3447: checking for XPointer" >&5
3436 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3437 echo $ac_n "(cached) $ac_c" 1>&6
3440 ac_save_CPPFLAGS="$CPPFLAGS"
3441 if test \! -z "$includedir" ; then
3442 CPPFLAGS="$CPPFLAGS -I$includedir"
3444 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3445 cat > conftest.$ac_ext <<EOF
3446 #line 3458 "configure"
3447 #include "confdefs.h"
3448 #include <X11/Xlib.h>
3450 XPointer foo = (XPointer) 0;
3453 if { (eval echo configure:3465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3457 echo "configure: failed program was:" >&5
3458 cat conftest.$ac_ext >&5
3463 CPPFLAGS="$ac_save_CPPFLAGS"
3466 echo "$ac_t""$ac_cv_xpointer" 1>&6
3467 if test "$ac_cv_xpointer" != yes; then
3468 cat >> confdefs.h <<\EOF
3469 #define XPointer char*
3476 ###############################################################################
3478 # Check for -lXmu (some fucked up vendors don't ship it...)
3480 ###############################################################################
3484 ac_save_CPPFLAGS="$CPPFLAGS"
3485 if test \! -z "$includedir" ; then
3486 CPPFLAGS="$CPPFLAGS -I$includedir"
3488 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3489 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3490 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3491 echo "configure:3503: checking for X11/Xmu/Error.h" >&5
3492 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3493 echo $ac_n "(cached) $ac_c" 1>&6
3495 cat > conftest.$ac_ext <<EOF
3496 #line 3508 "configure"
3497 #include "confdefs.h"
3498 #include <X11/Xmu/Error.h>
3500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3501 { (eval echo configure:3513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3503 if test -z "$ac_err"; then
3505 eval "ac_cv_header_$ac_safe=yes"
3508 echo "configure: failed program was:" >&5
3509 cat conftest.$ac_ext >&5
3511 eval "ac_cv_header_$ac_safe=no"
3515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3516 echo "$ac_t""yes" 1>&6
3519 echo "$ac_t""no" 1>&6
3522 CPPFLAGS="$ac_save_CPPFLAGS"
3523 if test "$have_xmu" = no ; then
3524 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3525 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3529 SAVER_LIBS="-lXmu $SAVER_LIBS"
3530 HACK_LIBS="-lXmu $HACK_LIBS"
3531 MOTIF_LIBS="-lXmu $MOTIF_LIBS"
3532 GTK_LIBS="-lXmu $GTK_LIBS"
3533 cat >> confdefs.h <<\EOF
3540 ###############################################################################
3542 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3543 # See comp.windows.x FAQ question 124. The right fix is to
3544 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3546 ###############################################################################
3548 if test "$have_xmu" = yes ; then
3551 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3552 echo "configure:3564: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3553 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3554 echo $ac_n "(cached) $ac_c" 1>&6
3556 ac_save_LDFLAGS="$LDFLAGS"
3557 if test \! -z "$x_libraries" ; then
3558 LDFLAGS="$LDFLAGS -L$x_libraries"
3560 # Note: this trick never works! (Generally.)
3561 # We're only getting away with using AC_TRY_LINK
3562 # with X libraries because we know it's SunOS.
3563 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3564 cat > conftest.$ac_ext <<EOF
3565 #line 3577 "configure"
3566 #include "confdefs.h"
3572 if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3574 ac_cv_sunos_xmu_bug=no
3576 echo "configure: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3579 ac_cv_sunos_xmu_bug=yes
3582 LDFLAGS="$ac_save_LDFLAGS"
3585 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3586 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3587 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3588 echo "configure:3600: checking whether the compiler understands -static" >&5
3589 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3590 echo $ac_n "(cached) $ac_c" 1>&6
3592 ac_save_LDFLAGS="$LDFLAGS"
3593 LDFLAGS="$LDFLAGS -static"
3594 cat > conftest.$ac_ext <<EOF
3595 #line 3607 "configure"
3596 #include "confdefs.h"
3602 if { (eval echo configure:3614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3606 echo "configure: failed program was:" >&5
3607 cat conftest.$ac_ext >&5
3612 LDFLAGS="$ac_save_LDFLAGS"
3615 echo "$ac_t""$ac_cv_ld_static" 1>&6
3616 if test "$ac_cv_ld_static" = yes ; then
3617 LDFLAGS="$LDFLAGS -static"
3619 LDFLAGS="$LDFLAGS -Bstatic"
3627 ###############################################################################
3629 # Handle the --enable-subdir option
3631 ###############################################################################
3633 # Check whether --enable-subdir or --disable-subdir was given.
3634 if test "${enable_subdir+set}" = set; then
3635 enableval="$enable_subdir"
3636 enable_subdir="$enableval"
3641 if test x"$enable_subdir" = xno; then
3643 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
3644 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
3647 # there must be a better way than this...
3648 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
3650 HACKDIR=$enable_subdir
3653 HACKDIR='${bindir}/'$enable_subdir
3657 # canonicalize slashes.
3658 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3661 ###############################################################################
3663 # Check for the SGI SCREEN_SAVER server extension.
3665 ###############################################################################
3668 with_sgi_req=unspecified
3669 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3670 if test "${with_sgi_ext+set}" = set; then
3671 withval="$with_sgi_ext"
3672 with_sgi="$withval"; with_sgi_req="$withval"
3684 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3685 echo "configure:3697: checking for SGI SCREEN_SAVER headers" >&5
3688 X_CFLAGS="-I$d $X_CFLAGS"
3689 echo "$ac_t""$d" 1>&6
3691 echo "$ac_t""not found ($d: no such directory)" 1>&6
3694 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3695 echo "configure:3707: checking for SGI SCREEN_SAVER libs" >&5
3698 X_LIBS="-L$d $X_LIBS"
3699 echo "$ac_t""$d" 1>&6
3701 echo "$ac_t""not found ($d: no such directory)" 1>&6
3704 # replace the directory string with "yes".
3706 with_sgi=$with_sgi_req
3711 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3712 echo " If it is a directory, then \`DIR/include' will be added to"
3713 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3719 if test "$with_sgi" = yes; then
3721 ac_save_CPPFLAGS="$CPPFLAGS"
3722 if test \! -z "$includedir" ; then
3723 CPPFLAGS="$CPPFLAGS -I$includedir"
3725 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3726 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3727 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3728 echo "configure:3740: checking for X11/extensions/XScreenSaver.h" >&5
3729 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3730 echo $ac_n "(cached) $ac_c" 1>&6
3732 cat > conftest.$ac_ext <<EOF
3733 #line 3745 "configure"
3734 #include "confdefs.h"
3735 #include <X11/extensions/XScreenSaver.h>
3737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3738 { (eval echo configure:3750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3740 if test -z "$ac_err"; then
3742 eval "ac_cv_header_$ac_safe=yes"
3745 echo "configure: failed program was:" >&5
3746 cat conftest.$ac_ext >&5
3748 eval "ac_cv_header_$ac_safe=no"
3752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3753 echo "$ac_t""yes" 1>&6
3755 cat >> confdefs.h <<\EOF
3756 #define HAVE_SGI_SAVER_EXTENSION 1
3760 echo "$ac_t""no" 1>&6
3763 CPPFLAGS="$ac_save_CPPFLAGS"
3765 elif test "$with_sgi" != no; then
3766 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3771 ###############################################################################
3773 # Check for the MIT-SCREEN-SAVER server extension.
3775 ###############################################################################
3778 with_mit_req=unspecified
3779 # Check whether --with-mit-ext or --without-mit-ext was given.
3780 if test "${with_mit_ext+set}" = set; then
3781 withval="$with_mit_ext"
3782 with_mit="$withval"; with_mit_req="$withval"
3794 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3795 echo "configure:3807: checking for MIT-SCREEN-SAVER headers" >&5
3798 X_CFLAGS="-I$d $X_CFLAGS"
3799 echo "$ac_t""$d" 1>&6
3801 echo "$ac_t""not found ($d: no such directory)" 1>&6
3804 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3805 echo "configure:3817: checking for MIT-SCREEN-SAVER libs" >&5
3808 X_LIBS="-L$d $X_LIBS"
3809 echo "$ac_t""$d" 1>&6
3811 echo "$ac_t""not found ($d: no such directory)" 1>&6
3814 # replace the directory string with "yes".
3816 with_mit=$with_mit_req
3821 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3822 echo " If it is a directory, then \`DIR/include' will be added to"
3823 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3829 if test "$with_mit" = yes; then
3831 ac_save_CPPFLAGS="$CPPFLAGS"
3832 if test \! -z "$includedir" ; then
3833 CPPFLAGS="$CPPFLAGS -I$includedir"
3835 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3836 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3837 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3838 echo "configure:3850: checking for X11/extensions/scrnsaver.h" >&5
3839 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3840 echo $ac_n "(cached) $ac_c" 1>&6
3842 cat > conftest.$ac_ext <<EOF
3843 #line 3855 "configure"
3844 #include "confdefs.h"
3845 #include <X11/extensions/scrnsaver.h>
3847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3848 { (eval echo configure:3860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3850 if test -z "$ac_err"; then
3852 eval "ac_cv_header_$ac_safe=yes"
3855 echo "configure: failed program was:" >&5
3856 cat conftest.$ac_ext >&5
3858 eval "ac_cv_header_$ac_safe=no"
3862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3863 echo "$ac_t""yes" 1>&6
3866 echo "$ac_t""no" 1>&6
3869 CPPFLAGS="$ac_save_CPPFLAGS"
3871 # Now check to see if it's really in the library; XF86Free-3.3 ships
3872 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3874 if test "$have_mit" = yes; then
3876 ac_save_CPPFLAGS="$CPPFLAGS"
3877 ac_save_LDFLAGS="$LDFLAGS"
3878 # ac_save_LIBS="$LIBS"
3880 if test \! -z "$includedir" ; then
3881 CPPFLAGS="$CPPFLAGS -I$includedir"
3883 # note: $X_CFLAGS includes $x_includes
3884 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3886 if test \! -z "$libdir" ; then
3887 LDFLAGS="$LDFLAGS -L$libdir"
3889 # note: $X_LIBS includes $x_libraries
3890 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3892 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3893 echo "configure:3905: checking for XScreenSaverRegister in -lXext" >&5
3894 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3895 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3896 echo $ac_n "(cached) $ac_c" 1>&6
3898 ac_save_LIBS="$LIBS"
3899 LIBS="-lXext -lm $LIBS"
3900 cat > conftest.$ac_ext <<EOF
3901 #line 3913 "configure"
3902 #include "confdefs.h"
3903 /* Override any gcc2 internal prototype to avoid an error. */
3904 /* We use char because int might match the return type of a gcc2
3905 builtin and then its argument prototype would still apply. */
3906 char XScreenSaverRegister();
3909 XScreenSaverRegister()
3912 if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3914 eval "ac_cv_lib_$ac_lib_var=yes"
3916 echo "configure: failed program was:" >&5
3917 cat conftest.$ac_ext >&5
3919 eval "ac_cv_lib_$ac_lib_var=no"
3922 LIBS="$ac_save_LIBS"
3925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3926 echo "$ac_t""yes" 1>&6
3929 echo "$ac_t""no" 1>&6
3933 CPPFLAGS="$ac_save_CPPFLAGS"
3934 LDFLAGS="$ac_save_LDFLAGS"
3935 # LIBS="$ac_save_LIBS"
3938 if test "$have_mit" = no; then
3939 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3940 # of in Xext. Thank you master, may I have another.
3942 ac_save_CPPFLAGS="$CPPFLAGS"
3943 ac_save_LDFLAGS="$LDFLAGS"
3944 # ac_save_LIBS="$LIBS"
3946 if test \! -z "$includedir" ; then
3947 CPPFLAGS="$CPPFLAGS -I$includedir"
3949 # note: $X_CFLAGS includes $x_includes
3950 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3952 if test \! -z "$libdir" ; then
3953 LDFLAGS="$LDFLAGS -L$libdir"
3955 # note: $X_LIBS includes $x_libraries
3956 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3958 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3959 echo "configure:3971: checking for XScreenSaverRegister in -lXExExt" >&5
3960 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3961 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3962 echo $ac_n "(cached) $ac_c" 1>&6
3964 ac_save_LIBS="$LIBS"
3965 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3966 cat > conftest.$ac_ext <<EOF
3967 #line 3979 "configure"
3968 #include "confdefs.h"
3969 /* Override any gcc2 internal prototype to avoid an error. */
3970 /* We use char because int might match the return type of a gcc2
3971 builtin and then its argument prototype would still apply. */
3972 char XScreenSaverRegister();
3975 XScreenSaverRegister()
3978 if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3980 eval "ac_cv_lib_$ac_lib_var=yes"
3982 echo "configure: failed program was:" >&5
3983 cat conftest.$ac_ext >&5
3985 eval "ac_cv_lib_$ac_lib_var=no"
3988 LIBS="$ac_save_LIBS"
3991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3992 echo "$ac_t""yes" 1>&6
3993 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3995 echo "$ac_t""no" 1>&6
3999 CPPFLAGS="$ac_save_CPPFLAGS"
4000 LDFLAGS="$ac_save_LDFLAGS"
4001 # LIBS="$ac_save_LIBS"
4005 if test "$have_mit" = no; then
4006 # Double fuck! Looks like some versions of XFree86 (whichever version
4007 # it is that comes with RedHat Linux 2.0 -- I can't find a version
4008 # number) put this garbage in Xss instead of Xext. Thank you master,
4009 # may I have another.
4011 ac_save_CPPFLAGS="$CPPFLAGS"
4012 ac_save_LDFLAGS="$LDFLAGS"
4013 # ac_save_LIBS="$LIBS"
4015 if test \! -z "$includedir" ; then
4016 CPPFLAGS="$CPPFLAGS -I$includedir"
4018 # note: $X_CFLAGS includes $x_includes
4019 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4021 if test \! -z "$libdir" ; then
4022 LDFLAGS="$LDFLAGS -L$libdir"
4024 # note: $X_LIBS includes $x_libraries
4025 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4027 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4028 echo "configure:4040: checking for XScreenSaverRegister in -lXss" >&5
4029 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4030 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4031 echo $ac_n "(cached) $ac_c" 1>&6
4033 ac_save_LIBS="$LIBS"
4034 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4035 cat > conftest.$ac_ext <<EOF
4036 #line 4048 "configure"
4037 #include "confdefs.h"
4038 /* Override any gcc2 internal prototype to avoid an error. */
4039 /* We use char because int might match the return type of a gcc2
4040 builtin and then its argument prototype would still apply. */
4041 char XScreenSaverRegister();
4044 XScreenSaverRegister()
4047 if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4049 eval "ac_cv_lib_$ac_lib_var=yes"
4051 echo "configure: failed program was:" >&5
4052 cat conftest.$ac_ext >&5
4054 eval "ac_cv_lib_$ac_lib_var=no"
4057 LIBS="$ac_save_LIBS"
4060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4061 echo "$ac_t""yes" 1>&6
4062 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4064 echo "$ac_t""no" 1>&6
4068 CPPFLAGS="$ac_save_CPPFLAGS"
4069 LDFLAGS="$ac_save_LDFLAGS"
4070 # LIBS="$ac_save_LIBS"
4074 if test "$have_mit" = yes; then
4075 cat >> confdefs.h <<\EOF
4076 #define HAVE_MIT_SAVER_EXTENSION 1
4083 elif test "$with_mit" != no; then
4084 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4089 ###############################################################################
4091 # Check for the XIDLE server extension.
4093 ###############################################################################
4096 with_xidle_req=unspecified
4097 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4098 if test "${with_xidle_ext+set}" = set; then
4099 withval="$with_xidle_ext"
4100 with_xidle="$withval"; with_xidle_req="$withval"
4107 case "$with_xidle" in
4112 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4113 echo "configure:4125: checking for XIDLE headers" >&5
4114 d=$with_xidle/include
4116 X_CFLAGS="-I$d $X_CFLAGS"
4117 echo "$ac_t""$d" 1>&6
4119 echo "$ac_t""not found ($d: no such directory)" 1>&6
4122 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4123 echo "configure:4135: checking for XIDLE libs" >&5
4126 X_LIBS="-L$d $X_LIBS"
4127 echo "$ac_t""$d" 1>&6
4129 echo "$ac_t""not found ($d: no such directory)" 1>&6
4132 # replace the directory string with "yes".
4133 with_xidle_req="yes"
4134 with_xidle=$with_xidle_req
4139 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4140 echo " If it is a directory, then \`DIR/include' will be added to"
4141 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4147 if test "$with_xidle" = yes; then
4149 ac_save_CPPFLAGS="$CPPFLAGS"
4150 if test \! -z "$includedir" ; then
4151 CPPFLAGS="$CPPFLAGS -I$includedir"
4153 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4154 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4155 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4156 echo "configure:4168: checking for X11/extensions/xidle.h" >&5
4157 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4158 echo $ac_n "(cached) $ac_c" 1>&6
4160 cat > conftest.$ac_ext <<EOF
4161 #line 4173 "configure"
4162 #include "confdefs.h"
4163 #include <X11/extensions/xidle.h>
4165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4166 { (eval echo configure:4178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4168 if test -z "$ac_err"; then
4170 eval "ac_cv_header_$ac_safe=yes"
4173 echo "configure: failed program was:" >&5
4174 cat conftest.$ac_ext >&5
4176 eval "ac_cv_header_$ac_safe=no"
4180 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4181 echo "$ac_t""yes" 1>&6
4183 cat >> confdefs.h <<\EOF
4184 #define HAVE_XIDLE_EXTENSION 1
4188 echo "$ac_t""no" 1>&6
4191 CPPFLAGS="$ac_save_CPPFLAGS"
4192 elif test "$with_xidle" != no; then
4193 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4198 ###############################################################################
4200 # Check for the SGI-VIDEO-CONTROL server extension.
4202 ###############################################################################
4205 with_sgivc_req=unspecified
4206 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4207 if test "${with_sgivc_ext+set}" = set; then
4208 withval="$with_sgivc_ext"
4209 with_sgivc="$withval"; with_sgivc_req="$withval"
4216 case "$with_sgivc" in
4221 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4222 echo "configure:4234: checking for SGI-VIDEO-CONTROL headers" >&5
4223 d=$with_sgivc/include
4225 X_CFLAGS="-I$d $X_CFLAGS"
4226 echo "$ac_t""$d" 1>&6
4228 echo "$ac_t""not found ($d: no such directory)" 1>&6
4231 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4232 echo "configure:4244: checking for SGI-VIDEO-CONTROL libs" >&5
4235 X_LIBS="-L$d $X_LIBS"
4236 echo "$ac_t""$d" 1>&6
4238 echo "$ac_t""not found ($d: no such directory)" 1>&6
4241 # replace the directory string with "yes".
4242 with_sgivc_req="yes"
4243 with_sgivc=$with_sgivc_req
4248 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4249 echo " If it is a directory, then \`DIR/include' will be added to"
4250 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4256 if test "$with_sgivc" = yes; then
4258 # first check for XSGIvc.h
4260 ac_save_CPPFLAGS="$CPPFLAGS"
4261 if test \! -z "$includedir" ; then
4262 CPPFLAGS="$CPPFLAGS -I$includedir"
4264 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4265 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4266 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4267 echo "configure:4279: checking for X11/extensions/XSGIvc.h" >&5
4268 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4269 echo $ac_n "(cached) $ac_c" 1>&6
4271 cat > conftest.$ac_ext <<EOF
4272 #line 4284 "configure"
4273 #include "confdefs.h"
4274 #include <X11/extensions/XSGIvc.h>
4276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4277 { (eval echo configure:4289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4279 if test -z "$ac_err"; then
4281 eval "ac_cv_header_$ac_safe=yes"
4284 echo "configure: failed program was:" >&5
4285 cat conftest.$ac_ext >&5
4287 eval "ac_cv_header_$ac_safe=no"
4291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4292 echo "$ac_t""yes" 1>&6
4295 echo "$ac_t""no" 1>&6
4298 CPPFLAGS="$ac_save_CPPFLAGS"
4300 # if that succeeded, then check for the -lXsgivc
4301 if test "$have_sgivc" = yes; then
4304 ac_save_CPPFLAGS="$CPPFLAGS"
4305 ac_save_LDFLAGS="$LDFLAGS"
4306 # ac_save_LIBS="$LIBS"
4308 if test \! -z "$includedir" ; then
4309 CPPFLAGS="$CPPFLAGS -I$includedir"
4311 # note: $X_CFLAGS includes $x_includes
4312 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4314 if test \! -z "$libdir" ; then
4315 LDFLAGS="$LDFLAGS -L$libdir"
4317 # note: $X_LIBS includes $x_libraries
4318 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4320 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4321 echo "configure:4333: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4322 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4323 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4324 echo $ac_n "(cached) $ac_c" 1>&6
4326 ac_save_LIBS="$LIBS"
4327 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4328 cat > conftest.$ac_ext <<EOF
4329 #line 4341 "configure"
4330 #include "confdefs.h"
4331 /* Override any gcc2 internal prototype to avoid an error. */
4332 /* We use char because int might match the return type of a gcc2
4333 builtin and then its argument prototype would still apply. */
4334 char XSGIvcQueryGammaMap();
4337 XSGIvcQueryGammaMap()
4340 if { (eval echo configure:4352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4342 eval "ac_cv_lib_$ac_lib_var=yes"
4344 echo "configure: failed program was:" >&5
4345 cat conftest.$ac_ext >&5
4347 eval "ac_cv_lib_$ac_lib_var=no"
4350 LIBS="$ac_save_LIBS"
4353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4354 echo "$ac_t""yes" 1>&6
4355 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4357 echo "$ac_t""no" 1>&6
4361 CPPFLAGS="$ac_save_CPPFLAGS"
4362 LDFLAGS="$ac_save_LDFLAGS"
4363 # LIBS="$ac_save_LIBS"
4367 # if that succeeded, then we've really got it.
4368 if test "$have_sgivc" = yes; then
4369 cat >> confdefs.h <<\EOF
4370 #define HAVE_SGI_VC_EXTENSION 1
4375 elif test "$with_sgivc" != no; then
4376 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4381 ###############################################################################
4383 # Check for the DPMS server extension.
4385 ###############################################################################
4388 with_dpms_req=unspecified
4389 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4390 if test "${with_dpms_ext+set}" = set; then
4391 withval="$with_dpms_ext"
4392 with_dpms="$withval"; with_dpms_req="$withval"
4399 case "$with_dpms" in
4404 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4405 echo "configure:4417: checking for DPMS headers" >&5
4406 d=$with_dpms/include
4408 X_CFLAGS="-I$d $X_CFLAGS"
4409 echo "$ac_t""$d" 1>&6
4411 echo "$ac_t""not found ($d: no such directory)" 1>&6
4414 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4415 echo "configure:4427: checking for DPMS libs" >&5
4418 X_LIBS="-L$d $X_LIBS"
4419 echo "$ac_t""$d" 1>&6
4421 echo "$ac_t""not found ($d: no such directory)" 1>&6
4424 # replace the directory string with "yes".
4426 with_dpms=$with_dpms_req
4431 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4432 echo " If it is a directory, then \`DIR/include' will be added to"
4433 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4439 if test "$with_dpms" = yes; then
4441 # first check for dpms.h
4443 ac_save_CPPFLAGS="$CPPFLAGS"
4444 if test \! -z "$includedir" ; then
4445 CPPFLAGS="$CPPFLAGS -I$includedir"
4447 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4448 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4449 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4450 echo "configure:4462: checking for X11/extensions/dpms.h" >&5
4451 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4452 echo $ac_n "(cached) $ac_c" 1>&6
4454 cat > conftest.$ac_ext <<EOF
4455 #line 4467 "configure"
4456 #include "confdefs.h"
4457 #include <X11/extensions/dpms.h>
4459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4460 { (eval echo configure:4472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4462 if test -z "$ac_err"; then
4464 eval "ac_cv_header_$ac_safe=yes"
4467 echo "configure: failed program was:" >&5
4468 cat conftest.$ac_ext >&5
4470 eval "ac_cv_header_$ac_safe=no"
4474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4475 echo "$ac_t""yes" 1>&6
4478 echo "$ac_t""no" 1>&6
4481 CPPFLAGS="$ac_save_CPPFLAGS"
4483 # if that succeeded, then check for the DPMS code in the libraries
4484 if test "$have_dpms" = yes; then
4486 # first look in -lXext (this is where it is with XFree86 4.0)
4489 ac_save_CPPFLAGS="$CPPFLAGS"
4490 ac_save_LDFLAGS="$LDFLAGS"
4491 # ac_save_LIBS="$LIBS"
4493 if test \! -z "$includedir" ; then
4494 CPPFLAGS="$CPPFLAGS -I$includedir"
4496 # note: $X_CFLAGS includes $x_includes
4497 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4499 if test \! -z "$libdir" ; then
4500 LDFLAGS="$LDFLAGS -L$libdir"
4502 # note: $X_LIBS includes $x_libraries
4503 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4505 echo $ac_n "checking for DPMSInfo in -lXext""... $ac_c" 1>&6
4506 echo "configure:4518: checking for DPMSInfo in -lXext" >&5
4507 ac_lib_var=`echo Xext'_'DPMSInfo | sed 'y%./+-%__p_%'`
4508 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4509 echo $ac_n "(cached) $ac_c" 1>&6
4511 ac_save_LIBS="$LIBS"
4512 LIBS="-lXext -lXext -lX11 $LIBS"
4513 cat > conftest.$ac_ext <<EOF
4514 #line 4526 "configure"
4515 #include "confdefs.h"
4516 /* Override any gcc2 internal prototype to avoid an error. */
4517 /* We use char because int might match the return type of a gcc2
4518 builtin and then its argument prototype would still apply. */
4525 if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4527 eval "ac_cv_lib_$ac_lib_var=yes"
4529 echo "configure: failed program was:" >&5
4530 cat conftest.$ac_ext >&5
4532 eval "ac_cv_lib_$ac_lib_var=no"
4535 LIBS="$ac_save_LIBS"
4538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4539 echo "$ac_t""yes" 1>&6
4542 echo "$ac_t""no" 1>&6
4546 CPPFLAGS="$ac_save_CPPFLAGS"
4547 LDFLAGS="$ac_save_LDFLAGS"
4548 # LIBS="$ac_save_LIBS"
4551 # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
4552 if test "$have_dpms" = no; then
4554 ac_save_CPPFLAGS="$CPPFLAGS"
4555 ac_save_LDFLAGS="$LDFLAGS"
4556 # ac_save_LIBS="$LIBS"
4558 if test \! -z "$includedir" ; then
4559 CPPFLAGS="$CPPFLAGS -I$includedir"
4561 # note: $X_CFLAGS includes $x_includes
4562 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4564 if test \! -z "$libdir" ; then
4565 LDFLAGS="$LDFLAGS -L$libdir"
4567 # note: $X_LIBS includes $x_libraries
4568 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4570 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4571 echo "configure:4583: checking for DPMSInfo in -lXdpms" >&5
4572 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4573 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4574 echo $ac_n "(cached) $ac_c" 1>&6
4576 ac_save_LIBS="$LIBS"
4577 LIBS="-lXdpms -lXext -lX11 $LIBS"
4578 cat > conftest.$ac_ext <<EOF
4579 #line 4591 "configure"
4580 #include "confdefs.h"
4581 /* Override any gcc2 internal prototype to avoid an error. */
4582 /* We use char because int might match the return type of a gcc2
4583 builtin and then its argument prototype would still apply. */
4590 if { (eval echo configure:4602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4592 eval "ac_cv_lib_$ac_lib_var=yes"
4594 echo "configure: failed program was:" >&5
4595 cat conftest.$ac_ext >&5
4597 eval "ac_cv_lib_$ac_lib_var=no"
4600 LIBS="$ac_save_LIBS"
4603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4604 echo "$ac_t""yes" 1>&6
4605 have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
4607 echo "$ac_t""no" 1>&6
4611 CPPFLAGS="$ac_save_CPPFLAGS"
4612 LDFLAGS="$ac_save_LDFLAGS"
4613 # LIBS="$ac_save_LIBS"
4619 # if that succeeded, then we've really got it.
4620 if test "$have_dpms" = yes; then
4621 cat >> confdefs.h <<\EOF
4622 #define HAVE_DPMS_EXTENSION 1
4627 elif test "$with_dpms" != no; then
4628 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4633 ###############################################################################
4635 # Check for the XF86VMODE server extension.
4637 ###############################################################################
4640 with_xf86vmode_req=unspecified
4641 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4642 if test "${with_xf86vmode_ext+set}" = set; then
4643 withval="$with_xf86vmode_ext"
4644 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4651 case "$with_xf86vmode" in
4656 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4657 echo "configure:4669: checking for xf86vmode headers" >&5
4658 d=$with_xf86vmode/include
4660 X_CFLAGS="-I$d $X_CFLAGS"
4661 echo "$ac_t""$d" 1>&6
4663 echo "$ac_t""not found ($d: no such directory)" 1>&6
4666 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4667 echo "configure:4679: checking for xf86vmode libs" >&5
4668 d=$with_xf86vmode/lib
4670 X_LIBS="-L$d $X_LIBS"
4671 echo "$ac_t""$d" 1>&6
4673 echo "$ac_t""not found ($d: no such directory)" 1>&6
4676 # replace the directory string with "yes".
4677 with_xf86vmode_req="yes"
4678 with_xf86vmode=$with_xf86vmode_req
4683 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4684 echo " If it is a directory, then \`DIR/include' will be added to"
4685 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4691 if test "$with_xf86vmode" = yes; then
4693 # first check for xf86vmode.h
4695 ac_save_CPPFLAGS="$CPPFLAGS"
4696 if test \! -z "$includedir" ; then
4697 CPPFLAGS="$CPPFLAGS -I$includedir"
4699 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4700 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4701 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4702 echo "configure:4714: checking for X11/extensions/xf86vmode.h" >&5
4703 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4704 echo $ac_n "(cached) $ac_c" 1>&6
4706 cat > conftest.$ac_ext <<EOF
4707 #line 4719 "configure"
4708 #include "confdefs.h"
4709 #include <X11/extensions/xf86vmode.h>
4711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4712 { (eval echo configure:4724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4714 if test -z "$ac_err"; then
4716 eval "ac_cv_header_$ac_safe=yes"
4719 echo "configure: failed program was:" >&5
4720 cat conftest.$ac_ext >&5
4722 eval "ac_cv_header_$ac_safe=no"
4726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4727 echo "$ac_t""yes" 1>&6
4730 echo "$ac_t""no" 1>&6
4733 CPPFLAGS="$ac_save_CPPFLAGS"
4735 # if that succeeded, then check for the -lXxf86vm
4736 if test "$have_xf86vmode" = yes; then
4739 ac_save_CPPFLAGS="$CPPFLAGS"
4740 ac_save_LDFLAGS="$LDFLAGS"
4741 # ac_save_LIBS="$LIBS"
4743 if test \! -z "$includedir" ; then
4744 CPPFLAGS="$CPPFLAGS -I$includedir"
4746 # note: $X_CFLAGS includes $x_includes
4747 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4749 if test \! -z "$libdir" ; then
4750 LDFLAGS="$LDFLAGS -L$libdir"
4752 # note: $X_LIBS includes $x_libraries
4753 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4755 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4756 echo "configure:4768: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4757 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4758 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4759 echo $ac_n "(cached) $ac_c" 1>&6
4761 ac_save_LIBS="$LIBS"
4762 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4763 cat > conftest.$ac_ext <<EOF
4764 #line 4776 "configure"
4765 #include "confdefs.h"
4766 /* Override any gcc2 internal prototype to avoid an error. */
4767 /* We use char because int might match the return type of a gcc2
4768 builtin and then its argument prototype would still apply. */
4769 char XF86VidModeGetViewPort();
4772 XF86VidModeGetViewPort()
4775 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4777 eval "ac_cv_lib_$ac_lib_var=yes"
4779 echo "configure: failed program was:" >&5
4780 cat conftest.$ac_ext >&5
4782 eval "ac_cv_lib_$ac_lib_var=no"
4785 LIBS="$ac_save_LIBS"
4788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4789 echo "$ac_t""yes" 1>&6
4790 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4792 echo "$ac_t""no" 1>&6
4796 CPPFLAGS="$ac_save_CPPFLAGS"
4797 LDFLAGS="$ac_save_LDFLAGS"
4798 # LIBS="$ac_save_LIBS"
4802 # if that succeeded, then we've really got it.
4803 if test "$have_xf86vmode" = yes; then
4804 cat >> confdefs.h <<\EOF
4805 #define HAVE_XF86VMODE 1
4810 elif test "$with_xf86vmode" != no; then
4811 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4816 ###############################################################################
4818 # Check for HP XHPDisableReset and XHPEnableReset.
4820 ###############################################################################
4823 ac_save_CPPFLAGS="$CPPFLAGS"
4824 if test \! -z "$includedir" ; then
4825 CPPFLAGS="$CPPFLAGS -I$includedir"
4827 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4828 cat > conftest.$ac_ext <<EOF
4829 #line 4841 "configure"
4830 #include "confdefs.h"
4831 #include <X11/XHPlib.h>
4833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4834 egrep "XHPDisableReset" >/dev/null 2>&1; then
4836 cat >> confdefs.h <<\EOF
4837 #define HAVE_XHPDISABLERESET 1
4840 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
4844 CPPFLAGS="$ac_save_CPPFLAGS"
4847 ###############################################################################
4849 # Check for /proc/interrupts.
4851 ###############################################################################
4853 have_proc_interrupts=no
4854 with_proc_interrupts_req=unspecified
4855 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4856 if test "${with_proc_interrupts+set}" = set; then
4857 withval="$with_proc_interrupts"
4858 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4860 with_proc_interrupts=yes
4864 if test "$with_proc_interrupts" = yes; then
4866 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4867 echo "configure:4879: checking whether /proc/interrupts contains keyboard data" >&5
4868 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4869 echo $ac_n "(cached) $ac_c" 1>&6
4871 ac_cv_have_proc_interrupts=no
4872 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4873 ac_cv_have_proc_interrupts=yes
4878 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
4879 have_proc_interrupts=$ac_cv_have_proc_interrupts
4881 if test "$have_proc_interrupts" = yes; then
4882 cat >> confdefs.h <<\EOF
4883 #define HAVE_PROC_INTERRUPTS 1
4888 elif test "$with_proc_interrupts" != no; then
4889 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
4894 ###############################################################################
4896 # The --enable-locking option
4898 ###############################################################################
4900 # Check whether --enable-locking or --disable-locking was given.
4901 if test "${enable_locking+set}" = set; then
4902 enableval="$enable_locking"
4903 enable_locking="$enableval"
4908 if test "$enable_locking" = yes; then
4910 elif test "$enable_locking" = no; then
4911 cat >> confdefs.h <<\EOF
4912 #define NO_LOCKING 1
4916 echo "error: must be yes or no: --enable-locking=$enable_locking"
4922 ###############################################################################
4924 # The --enable-vt-locking option
4926 ###############################################################################
4928 #ac_vt_lockswitch=no
4929 #AC_ARG_ENABLE(vt-locking,[
4930 # --enable-vt-locking Compile in support for locking Virtual Terminals.
4931 # This is the default if the system supports it, and
4932 # if locking support is included (--enable-locking.)
4933 # --disable-vt-locking Do not allow locking of VTs, even if locking is
4935 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
4936 #if test "$enable_vt_locking" = yes; then
4938 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
4939 # [AC_TRY_COMPILE([#include <fcntl.h>
4940 # #include <sys/ioctl.h>
4941 # #include <sys/vt.h>],
4942 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
4943 # [ac_cv_vt_lockswitch=yes],
4944 # [ac_cv_vt_lockswitch=no])])
4945 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
4947 #elif test "$enable_vt_locking" = no; then
4950 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
4954 #if test "$ac_vt_lockswitch" = yes; then
4955 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
4956 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
4957 # # #### but it doesn't work yet, so don't worry about that for now.
4963 ###############################################################################
4967 ###############################################################################
4971 # Solaris systems tend to come with PAM misconfigured.
4972 # Don't build it by default, even if the headers exist.
4976 # Default to building PAM support on all other systems, if it exists.
4977 with_pam_default=yes
4982 with_pam_req=unspecified
4984 # Check whether --with-pam or --without-pam was given.
4985 if test "${with_pam+set}" = set; then
4987 with_pam="$withval"; with_pam_req="$withval"
4989 with_pam=$with_pam_default
4999 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
5000 echo "configure:5012: checking for PAM headers" >&5
5003 X_CFLAGS="-I$d $X_CFLAGS"
5004 echo "$ac_t""$d" 1>&6
5006 echo "$ac_t""not found ($d: no such directory)" 1>&6
5009 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
5010 echo "configure:5022: checking for PAM libs" >&5
5013 X_LIBS="-L$d $X_LIBS"
5014 echo "$ac_t""$d" 1>&6
5016 echo "$ac_t""not found ($d: no such directory)" 1>&6
5019 # replace the directory string with "yes".
5021 with_pam=$with_pam_req
5026 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
5027 echo " If it is a directory, then \`DIR/include' will be added to"
5028 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5034 if test "$enable_locking" = yes -a "$with_pam" = yes; then
5035 echo $ac_n "checking for PAM""... $ac_c" 1>&6
5036 echo "configure:5048: checking for PAM" >&5
5037 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
5038 echo $ac_n "(cached) $ac_c" 1>&6
5041 ac_save_CPPFLAGS="$CPPFLAGS"
5042 if test \! -z "$includedir" ; then
5043 CPPFLAGS="$CPPFLAGS -I$includedir"
5045 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5046 cat > conftest.$ac_ext <<EOF
5047 #line 5059 "configure"
5048 #include "confdefs.h"
5049 #include <security/pam_appl.h>
5054 if { (eval echo configure:5066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5058 echo "configure: failed program was:" >&5
5059 cat conftest.$ac_ext >&5
5064 CPPFLAGS="$ac_save_CPPFLAGS"
5067 echo "$ac_t""$ac_cv_pam" 1>&6
5068 if test "$ac_cv_pam" = yes ; then
5070 cat >> confdefs.h <<\EOF
5074 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
5076 # libpam typically requires dlopen and dlsym. On FreeBSD,
5077 # those are in libc. On Linux and Solaris, they're in libdl.
5078 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5079 echo "configure:5091: checking for dlopen in -ldl" >&5
5080 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5081 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5082 echo $ac_n "(cached) $ac_c" 1>&6
5084 ac_save_LIBS="$LIBS"
5086 cat > conftest.$ac_ext <<EOF
5087 #line 5099 "configure"
5088 #include "confdefs.h"
5089 /* Override any gcc2 internal prototype to avoid an error. */
5090 /* We use char because int might match the return type of a gcc2
5091 builtin and then its argument prototype would still apply. */
5098 if { (eval echo configure:5110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5100 eval "ac_cv_lib_$ac_lib_var=yes"
5102 echo "configure: failed program was:" >&5
5103 cat conftest.$ac_ext >&5
5105 eval "ac_cv_lib_$ac_lib_var=no"
5108 LIBS="$ac_save_LIBS"
5111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5112 echo "$ac_t""yes" 1>&6
5113 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5115 echo "$ac_t""no" 1>&6
5119 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5120 echo "configure:5132: checking how to call pam_strerror" >&5
5121 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5122 echo $ac_n "(cached) $ac_c" 1>&6
5124 cat > conftest.$ac_ext <<EOF
5125 #line 5137 "configure"
5126 #include "confdefs.h"
5129 #include <security/pam_appl.h>
5131 pam_handle_t *pamh = 0;
5132 char *s = pam_strerror(pamh, PAM_SUCCESS);
5135 if { (eval echo configure:5147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5137 ac_pam_strerror_args=2
5139 echo "configure: failed program was:" >&5
5140 cat conftest.$ac_ext >&5
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5155 "configure"
5144 #include "confdefs.h"
5147 #include <security/pam_appl.h>
5150 pam_strerror(PAM_SUCCESS);
5153 if { (eval echo configure:5165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5155 ac_pam_strerror_args=1
5157 echo "configure: failed program was:" >&5
5158 cat conftest.$ac_ext >&5
5160 ac_pam_strerror_args=0
5165 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5168 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5169 if test "$ac_pam_strerror_args" = 1 ; then
5170 echo "$ac_t""one argument" 1>&6
5171 elif test "$ac_pam_strerror_args" = 2 ; then
5172 cat >> confdefs.h <<\EOF
5173 #define PAM_STRERROR_TWO_ARGS 1
5176 echo "$ac_t""two arguments" 1>&6
5178 echo "$ac_t""unknown" 1>&6
5184 ###############################################################################
5186 # Check for Kerberos.
5188 ###############################################################################
5192 with_kerberos_req=unspecified
5194 # Check whether --with-kerberos or --without-kerberos was given.
5195 if test "${with_kerberos+set}" = set; then
5196 withval="$with_kerberos"
5197 with_kerberos="$withval"; with_kerberos_req="$withval"
5204 case "$with_kerberos" in
5209 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5210 echo "configure:5222: checking for Kerberos headers" >&5
5211 d=$with_kerberos/include
5213 X_CFLAGS="-I$d $X_CFLAGS"
5214 echo "$ac_t""$d" 1>&6
5216 echo "$ac_t""not found ($d: no such directory)" 1>&6
5219 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5220 echo "configure:5232: checking for Kerberos libs" >&5
5221 d=$with_kerberos/lib
5223 X_LIBS="-L$d $X_LIBS"
5224 echo "$ac_t""$d" 1>&6
5226 echo "$ac_t""not found ($d: no such directory)" 1>&6
5229 # replace the directory string with "yes".
5230 with_kerberos_req="yes"
5231 with_kerberos=$with_kerberos_req
5236 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5237 echo " If it is a directory, then \`DIR/include' will be added to"
5238 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5244 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5245 echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
5246 echo "configure:5258: checking for Kerberos 4" >&5
5247 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5248 echo $ac_n "(cached) $ac_c" 1>&6
5251 ac_save_CPPFLAGS="$CPPFLAGS"
5252 if test \! -z "$includedir" ; then
5253 CPPFLAGS="$CPPFLAGS -I$includedir"
5255 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5256 cat > conftest.$ac_ext <<EOF
5257 #line 5269 "configure"
5258 #include "confdefs.h"
5264 if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5268 echo "configure: failed program was:" >&5
5269 cat conftest.$ac_ext >&5
5274 CPPFLAGS="$ac_save_CPPFLAGS"
5277 echo "$ac_t""$ac_cv_kerberos" 1>&6
5278 echo $ac_n "checking for Kerberos 5""... $ac_c" 1>&6
5279 echo "configure:5291: checking for Kerberos 5" >&5
5280 if eval "test \"`echo '$''{'ac_cv_kerberos5'+set}'`\" = set"; then
5281 echo $ac_n "(cached) $ac_c" 1>&6
5284 ac_save_CPPFLAGS="$CPPFLAGS"
5285 if test \! -z "$includedir" ; then
5286 CPPFLAGS="$CPPFLAGS -I$includedir"
5288 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5289 cat > conftest.$ac_ext <<EOF
5290 #line 5302 "configure"
5291 #include "confdefs.h"
5292 #include <kerberosIV/krb.h>
5297 if { (eval echo configure:5309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5301 echo "configure: failed program was:" >&5
5302 cat conftest.$ac_ext >&5
5307 CPPFLAGS="$ac_save_CPPFLAGS"
5310 echo "$ac_t""$ac_cv_kerberos5" 1>&6
5312 if test "$ac_cv_kerberos" = yes ; then
5314 cat >> confdefs.h <<\EOF
5315 #define HAVE_KERBEROS 1
5320 if test "$ac_cv_kerberos5" = yes ; then
5323 cat >> confdefs.h <<\EOF
5324 #define HAVE_KERBEROS 1
5327 cat >> confdefs.h <<\EOF
5328 #define HAVE_KERBEROS5 1
5333 if test "$have_kerberos5" = yes ; then
5334 # from Matt Knopp <mhat@infocalypse.netlag.com>
5335 # (who got it from amu@mit.edu)
5336 PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
5337 elif test "$have_kerberos" = yes ; then
5338 # from Tim Showalter <tjs+@andrew.cmu.edu>
5339 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
5342 if test "$have_kerberos" = yes ; then
5343 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5344 echo "configure:5356: checking for res_search" >&5
5345 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5346 echo $ac_n "(cached) $ac_c" 1>&6
5348 cat > conftest.$ac_ext <<EOF
5349 #line 5361 "configure"
5350 #include "confdefs.h"
5351 /* System header to define __stub macros and hopefully few prototypes,
5352 which can conflict with char res_search(); below. */
5354 /* Override any gcc2 internal prototype to avoid an error. */
5355 /* We use char because int might match the return type of a gcc2
5356 builtin and then its argument prototype would still apply. */
5361 /* The GNU C library defines this for functions which it implements
5362 to always fail with ENOSYS. Some functions are actually named
5363 something starting with __ and the normal name is an alias. */
5364 #if defined (__stub_res_search) || defined (__stub___res_search)
5372 if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5374 eval "ac_cv_func_res_search=yes"
5376 echo "configure: failed program was:" >&5
5377 cat conftest.$ac_ext >&5
5379 eval "ac_cv_func_res_search=no"
5384 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5385 echo "$ac_t""yes" 1>&6
5388 echo "$ac_t""no" 1>&6
5389 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5390 echo "configure:5402: checking for res_search in -lresolv" >&5
5391 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5392 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5393 echo $ac_n "(cached) $ac_c" 1>&6
5395 ac_save_LIBS="$LIBS"
5396 LIBS="-lresolv $LIBS"
5397 cat > conftest.$ac_ext <<EOF
5398 #line 5410 "configure"
5399 #include "confdefs.h"
5400 /* Override any gcc2 internal prototype to avoid an error. */
5401 /* We use char because int might match the return type of a gcc2
5402 builtin and then its argument prototype would still apply. */
5409 if { (eval echo configure:5421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411 eval "ac_cv_lib_$ac_lib_var=yes"
5413 echo "configure: failed program was:" >&5
5414 cat conftest.$ac_ext >&5
5416 eval "ac_cv_lib_$ac_lib_var=no"
5419 LIBS="$ac_save_LIBS"
5422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5423 echo "$ac_t""yes" 1>&6
5424 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
5426 echo "$ac_t""no" 1>&6
5427 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
5437 ###############################################################################
5439 # Check for the nine billion variants of shadow passwords...
5441 ###############################################################################
5446 with_shadow_req=unspecified
5448 # Check whether --with-shadow or --without-shadow was given.
5449 if test "${with_shadow+set}" = set; then
5450 withval="$with_shadow"
5451 with_shadow="$withval"; with_shadow_req="$withval"
5458 case "$with_shadow" in
5463 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
5464 echo "configure:5476: checking for shadow password headers" >&5
5465 d=$with_shadow/include
5467 X_CFLAGS="-I$d $X_CFLAGS"
5468 echo "$ac_t""$d" 1>&6
5470 echo "$ac_t""not found ($d: no such directory)" 1>&6
5473 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
5474 echo "configure:5486: checking for shadow password libs" >&5
5477 X_LIBS="-L$d $X_LIBS"
5478 echo "$ac_t""$d" 1>&6
5480 echo "$ac_t""not found ($d: no such directory)" 1>&6
5483 # replace the directory string with "yes".
5484 with_shadow_req="yes"
5485 with_shadow=$with_shadow_req
5490 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
5491 echo " If it is a directory, then \`DIR/include' will be added to"
5492 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5498 if test "$enable_locking" = no ; then
5504 ###############################################################################
5506 # Check for Sun "adjunct" passwords.
5508 ###############################################################################
5510 if test "$with_shadow" = yes ; then
5511 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
5512 echo "configure:5524: checking for Sun-style shadow passwords" >&5
5513 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
5514 echo $ac_n "(cached) $ac_c" 1>&6
5517 ac_save_CPPFLAGS="$CPPFLAGS"
5518 if test \! -z "$includedir" ; then
5519 CPPFLAGS="$CPPFLAGS -I$includedir"
5521 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5522 cat > conftest.$ac_ext <<EOF
5523 #line 5535 "configure"
5524 #include "confdefs.h"
5527 #include <sys/types.h>
5528 #include <sys/label.h>
5529 #include <sys/audit.h>
5532 struct passwd_adjunct *p = getpwanam("nobody");
5533 const char *pw = p->pwa_passwd;
5536 if { (eval echo configure:5548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5538 ac_cv_sun_adjunct=yes
5540 echo "configure: failed program was:" >&5
5541 cat conftest.$ac_ext >&5
5543 ac_cv_sun_adjunct=no
5546 CPPFLAGS="$ac_save_CPPFLAGS"
5549 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
5550 if test "$ac_cv_sun_adjunct" = yes; then
5551 have_shadow_adjunct=yes
5558 ###############################################################################
5560 # Check for DEC and SCO so-called "enhanced" security.
5562 ###############################################################################
5564 if test "$with_shadow" = yes ; then
5565 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
5566 echo "configure:5578: checking for DEC-style shadow passwords" >&5
5567 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
5568 echo $ac_n "(cached) $ac_c" 1>&6
5571 ac_save_CPPFLAGS="$CPPFLAGS"
5572 if test \! -z "$includedir" ; then
5573 CPPFLAGS="$CPPFLAGS -I$includedir"
5575 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5576 cat > conftest.$ac_ext <<EOF
5577 #line 5589 "configure"
5578 #include "confdefs.h"
5581 #include <sys/types.h>
5583 #include <sys/security.h>
5586 struct pr_passwd *p;
5588 set_auth_parameters(0, 0);
5589 check_auth_parameters();
5590 p = getprpwnam("nobody");
5591 pw = p->ufld.fd_encrypt;
5594 if { (eval echo configure:5606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5596 ac_cv_enhanced_passwd=yes
5598 echo "configure: failed program was:" >&5
5599 cat conftest.$ac_ext >&5
5601 ac_cv_enhanced_passwd=no
5604 CPPFLAGS="$ac_save_CPPFLAGS"
5607 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
5608 if test $ac_cv_enhanced_passwd = yes; then
5609 have_shadow_enhanced=yes
5613 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
5614 # (I'm told it needs -lcurses too, but I don't understand why.)
5615 # But on DEC, it's in -lsecurity.
5617 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
5618 echo "configure:5630: checking for getprpwnam in -lprot" >&5
5619 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
5620 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5621 echo $ac_n "(cached) $ac_c" 1>&6
5623 ac_save_LIBS="$LIBS"
5624 LIBS="-lprot -lx $LIBS"
5625 cat > conftest.$ac_ext <<EOF
5626 #line 5638 "configure"
5627 #include "confdefs.h"
5628 /* Override any gcc2 internal prototype to avoid an error. */
5629 /* We use char because int might match the return type of a gcc2
5630 builtin and then its argument prototype would still apply. */
5637 if { (eval echo configure:5649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5639 eval "ac_cv_lib_$ac_lib_var=yes"
5641 echo "configure: failed program was:" >&5
5642 cat conftest.$ac_ext >&5
5644 eval "ac_cv_lib_$ac_lib_var=no"
5647 LIBS="$ac_save_LIBS"
5650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5651 echo "$ac_t""yes" 1>&6
5652 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
5654 echo "$ac_t""no" 1>&6
5655 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
5656 echo "configure:5668: checking for getprpwnam in -lsecurity" >&5
5657 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
5658 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5659 echo $ac_n "(cached) $ac_c" 1>&6
5661 ac_save_LIBS="$LIBS"
5662 LIBS="-lsecurity $LIBS"
5663 cat > conftest.$ac_ext <<EOF
5664 #line 5676 "configure"
5665 #include "confdefs.h"
5666 /* Override any gcc2 internal prototype to avoid an error. */
5667 /* We use char because int might match the return type of a gcc2
5668 builtin and then its argument prototype would still apply. */
5675 if { (eval echo configure:5687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5677 eval "ac_cv_lib_$ac_lib_var=yes"
5679 echo "configure: failed program was:" >&5
5680 cat conftest.$ac_ext >&5
5682 eval "ac_cv_lib_$ac_lib_var=no"
5685 LIBS="$ac_save_LIBS"
5688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5689 echo "$ac_t""yes" 1>&6
5690 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5692 echo "$ac_t""no" 1>&6
5700 ###############################################################################
5702 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
5704 ###############################################################################
5706 if test "$with_shadow" = yes ; then
5707 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5708 echo "configure:5720: checking for HP-style shadow passwords" >&5
5709 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5710 echo $ac_n "(cached) $ac_c" 1>&6
5713 ac_save_CPPFLAGS="$CPPFLAGS"
5714 if test \! -z "$includedir" ; then
5715 CPPFLAGS="$CPPFLAGS -I$includedir"
5717 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5718 cat > conftest.$ac_ext <<EOF
5719 #line 5731 "configure"
5720 #include "confdefs.h"
5723 #include <sys/types.h>
5725 #include <hpsecurity.h>
5728 struct s_passwd *p = getspwnam("nobody");
5729 const char *pw = p->pw_passwd;
5732 if { (eval echo configure:5744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5734 ac_cv_hpux_passwd=yes
5736 echo "configure: failed program was:" >&5
5737 cat conftest.$ac_ext >&5
5739 ac_cv_hpux_passwd=no
5742 CPPFLAGS="$ac_save_CPPFLAGS"
5745 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
5746 if test "$ac_cv_hpux_passwd" = yes; then
5747 have_shadow_hpux=yes
5751 # on HPUX, bigcrypt is in -lsec
5752 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
5753 echo "configure:5765: checking for bigcrypt in -lsec" >&5
5754 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
5755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5756 echo $ac_n "(cached) $ac_c" 1>&6
5758 ac_save_LIBS="$LIBS"
5760 cat > conftest.$ac_ext <<EOF
5761 #line 5773 "configure"
5762 #include "confdefs.h"
5763 /* Override any gcc2 internal prototype to avoid an error. */
5764 /* We use char because int might match the return type of a gcc2
5765 builtin and then its argument prototype would still apply. */
5772 if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5774 eval "ac_cv_lib_$ac_lib_var=yes"
5776 echo "configure: failed program was:" >&5
5777 cat conftest.$ac_ext >&5
5779 eval "ac_cv_lib_$ac_lib_var=no"
5782 LIBS="$ac_save_LIBS"
5785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5786 echo "$ac_t""yes" 1>&6
5787 PASSWD_LIBS="$PASSWD_LIBS -lsec"
5789 echo "$ac_t""no" 1>&6
5796 ###############################################################################
5798 # Check for FreeBSD-style shadow passwords.
5800 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
5801 # password systems -- except you only get stuff in the pw_passwd field
5802 # if the running program is setuid. So, guess that we've got this
5803 # lossage to contend with if /etc/master.passwd exists, and default to
5804 # a setuid installation.
5806 ###############################################################################
5808 if test "$with_shadow" = yes ; then
5809 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
5810 echo "configure:5822: checking for FreeBSD-style shadow passwords" >&5
5811 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
5812 echo $ac_n "(cached) $ac_c" 1>&6
5814 if test -f /etc/master.passwd ; then
5815 ac_cv_master_passwd=yes
5817 ac_cv_master_passwd=no
5821 echo "$ac_t""$ac_cv_master_passwd" 1>&6
5822 if test "$ac_cv_master_passwd" = yes; then
5828 ###############################################################################
5830 # Check for traditional (ha!) shadow passwords.
5832 ###############################################################################
5834 if test "$with_shadow" = yes ; then
5835 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
5836 echo "configure:5848: checking for generic shadow passwords" >&5
5837 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
5838 echo $ac_n "(cached) $ac_c" 1>&6
5841 ac_save_CPPFLAGS="$CPPFLAGS"
5842 if test \! -z "$includedir" ; then
5843 CPPFLAGS="$CPPFLAGS -I$includedir"
5845 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5846 cat > conftest.$ac_ext <<EOF
5847 #line 5859 "configure"
5848 #include "confdefs.h"
5851 #include <sys/types.h>
5855 struct spwd *p = getspnam("nobody");
5856 const char *pw = p->sp_pwdp;
5859 if { (eval echo configure:5871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5863 echo "configure: failed program was:" >&5
5864 cat conftest.$ac_ext >&5
5869 CPPFLAGS="$ac_save_CPPFLAGS"
5872 echo "$ac_t""$ac_cv_shadow" 1>&6
5873 if test "$ac_cv_shadow" = yes; then
5877 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
5879 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
5880 echo "configure:5892: checking for getspnam in -lc" >&5
5881 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
5882 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5883 echo $ac_n "(cached) $ac_c" 1>&6
5885 ac_save_LIBS="$LIBS"
5887 cat > conftest.$ac_ext <<EOF
5888 #line 5900 "configure"
5889 #include "confdefs.h"
5890 /* Override any gcc2 internal prototype to avoid an error. */
5891 /* We use char because int might match the return type of a gcc2
5892 builtin and then its argument prototype would still apply. */
5899 if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5901 eval "ac_cv_lib_$ac_lib_var=yes"
5903 echo "configure: failed program was:" >&5
5904 cat conftest.$ac_ext >&5
5906 eval "ac_cv_lib_$ac_lib_var=no"
5909 LIBS="$ac_save_LIBS"
5912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5913 echo "$ac_t""yes" 1>&6
5916 echo "$ac_t""no" 1>&6
5919 if test "$have_getspnam" = no ; then
5920 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
5921 echo "configure:5933: checking for getspnam in -lgen" >&5
5922 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
5923 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5924 echo $ac_n "(cached) $ac_c" 1>&6
5926 ac_save_LIBS="$LIBS"
5928 cat > conftest.$ac_ext <<EOF
5929 #line 5941 "configure"
5930 #include "confdefs.h"
5931 /* Override any gcc2 internal prototype to avoid an error. */
5932 /* We use char because int might match the return type of a gcc2
5933 builtin and then its argument prototype would still apply. */
5940 if { (eval echo configure:5952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5942 eval "ac_cv_lib_$ac_lib_var=yes"
5944 echo "configure: failed program was:" >&5
5945 cat conftest.$ac_ext >&5
5947 eval "ac_cv_lib_$ac_lib_var=no"
5950 LIBS="$ac_save_LIBS"
5953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5954 echo "$ac_t""yes" 1>&6
5955 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
5957 echo "$ac_t""no" 1>&6
5965 ###############################################################################
5967 # Check for other libraries needed for non-shadow passwords.
5969 ###############################################################################
5971 if test "$enable_locking" = yes ; then
5973 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
5975 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
5976 echo "configure:5988: checking for crypt in -lc" >&5
5977 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
5978 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5979 echo $ac_n "(cached) $ac_c" 1>&6
5981 ac_save_LIBS="$LIBS"
5983 cat > conftest.$ac_ext <<EOF
5984 #line 5996 "configure"
5985 #include "confdefs.h"
5986 /* Override any gcc2 internal prototype to avoid an error. */
5987 /* We use char because int might match the return type of a gcc2
5988 builtin and then its argument prototype would still apply. */
5995 if { (eval echo configure:6007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5997 eval "ac_cv_lib_$ac_lib_var=yes"
5999 echo "configure: failed program was:" >&5
6000 cat conftest.$ac_ext >&5
6002 eval "ac_cv_lib_$ac_lib_var=no"
6005 LIBS="$ac_save_LIBS"
6008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6009 echo "$ac_t""yes" 1>&6
6012 echo "$ac_t""no" 1>&6
6015 if test "$have_crypt" = no ; then
6016 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6017 echo "configure:6029: checking for crypt in -lcrypt" >&5
6018 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6019 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6020 echo $ac_n "(cached) $ac_c" 1>&6
6022 ac_save_LIBS="$LIBS"
6023 LIBS="-lcrypt $LIBS"
6024 cat > conftest.$ac_ext <<EOF
6025 #line 6037 "configure"
6026 #include "confdefs.h"
6027 /* Override any gcc2 internal prototype to avoid an error. */
6028 /* We use char because int might match the return type of a gcc2
6029 builtin and then its argument prototype would still apply. */
6036 if { (eval echo configure:6048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6038 eval "ac_cv_lib_$ac_lib_var=yes"
6040 echo "configure: failed program was:" >&5
6041 cat conftest.$ac_ext >&5
6043 eval "ac_cv_lib_$ac_lib_var=no"
6046 LIBS="$ac_save_LIBS"
6049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6050 echo "$ac_t""yes" 1>&6
6051 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
6053 echo "$ac_t""no" 1>&6
6060 # Most of the above shadow mechanisms will have set need_setuid to yes,
6061 # if they were found. But, on some systems, we need setuid even when
6062 # using plain old vanilla passwords.
6064 if test "$enable_locking" = yes ; then
6066 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
6073 if test "$have_shadow_adjunct" = yes ; then
6074 cat >> confdefs.h <<\EOF
6075 #define HAVE_ADJUNCT_PASSWD 1
6078 elif test "$have_shadow_enhanced" = yes ; then
6079 cat >> confdefs.h <<\EOF
6080 #define HAVE_ENHANCED_PASSWD 1
6083 elif test "$have_shadow_hpux" = yes ; then
6084 cat >> confdefs.h <<\EOF
6085 #define HAVE_HPUX_PASSWD 1
6088 elif test "$have_shadow" = yes ; then
6089 cat >> confdefs.h <<\EOF
6090 #define HAVE_SHADOW_PASSWD 1
6096 ###############################################################################
6100 ###############################################################################
6103 with_motif_req=unspecified
6104 # Check whether --with-motif or --without-motif was given.
6105 if test "${with_motif+set}" = set; then
6106 withval="$with_motif"
6107 with_motif="$withval"; with_motif_req="$withval"
6114 case "$with_motif" in
6119 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
6120 echo "configure:6132: checking for Motif headers" >&5
6121 d=$with_motif/include
6123 X_CFLAGS="-I$d $X_CFLAGS"
6124 echo "$ac_t""$d" 1>&6
6126 echo "$ac_t""not found ($d: no such directory)" 1>&6
6129 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
6130 echo "configure:6142: checking for Motif libs" >&5
6133 X_LIBS="-L$d $X_LIBS"
6134 echo "$ac_t""$d" 1>&6
6136 echo "$ac_t""not found ($d: no such directory)" 1>&6
6139 # replace the directory string with "yes".
6140 with_motif_req="yes"
6141 with_motif=$with_motif_req
6146 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6147 echo " If it is a directory, then \`DIR/include' will be added to"
6148 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6154 if test "$with_motif" != yes -a "$with_motif" != no ; then
6155 echo "error: must be yes or no: --with-motif=$with_motif"
6159 if test "$with_motif" = yes; then
6162 ac_save_CPPFLAGS="$CPPFLAGS"
6163 if test \! -z "$includedir" ; then
6164 CPPFLAGS="$CPPFLAGS -I$includedir"
6166 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6167 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6168 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6169 echo "configure:6181: checking for Xm/Xm.h" >&5
6170 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6171 echo $ac_n "(cached) $ac_c" 1>&6
6173 cat > conftest.$ac_ext <<EOF
6174 #line 6186 "configure"
6175 #include "confdefs.h"
6178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6179 { (eval echo configure:6191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6181 if test -z "$ac_err"; then
6183 eval "ac_cv_header_$ac_safe=yes"
6186 echo "configure: failed program was:" >&5
6187 cat conftest.$ac_ext >&5
6189 eval "ac_cv_header_$ac_safe=no"
6193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6194 echo "$ac_t""yes" 1>&6
6196 cat >> confdefs.h <<\EOF
6197 #define HAVE_MOTIF 1
6200 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6202 echo "$ac_t""no" 1>&6
6205 CPPFLAGS="$ac_save_CPPFLAGS"
6209 if test "$have_motif" = yes; then
6211 ac_save_CPPFLAGS="$CPPFLAGS"
6212 if test \! -z "$includedir" ; then
6213 CPPFLAGS="$CPPFLAGS -I$includedir"
6215 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6216 ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
6217 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
6218 echo "configure:6230: checking for Xm/ComboBox.h" >&5
6219 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6220 echo $ac_n "(cached) $ac_c" 1>&6
6222 cat > conftest.$ac_ext <<EOF
6223 #line 6235 "configure"
6224 #include "confdefs.h"
6225 #include <Xm/ComboBox.h>
6227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6228 { (eval echo configure:6240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6230 if test -z "$ac_err"; then
6232 eval "ac_cv_header_$ac_safe=yes"
6235 echo "configure: failed program was:" >&5
6236 cat conftest.$ac_ext >&5
6238 eval "ac_cv_header_$ac_safe=no"
6242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6243 echo "$ac_t""yes" 1>&6
6244 cat >> confdefs.h <<\EOF
6245 #define HAVE_XMCOMBOBOX 1
6249 echo "$ac_t""no" 1>&6
6252 CPPFLAGS="$ac_save_CPPFLAGS"
6256 ###############################################################################
6258 # Check for -lgtk (and Gnome stuff)
6260 ###############################################################################
6263 with_gtk_req=unspecified
6264 # Check whether --with-gtk or --without-gtk was given.
6265 if test "${with_gtk+set}" = set; then
6267 with_gtk="$withval"; with_gtk_req="$withval"
6273 # if --with-gtk=/directory/ was specified, remember that directory so that
6274 # we can also look for the `gtk-config' program in that directory.
6290 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6291 echo "configure:6303: checking for Gtk headers" >&5
6294 X_CFLAGS="-I$d $X_CFLAGS"
6295 echo "$ac_t""$d" 1>&6
6297 echo "$ac_t""not found ($d: no such directory)" 1>&6
6300 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6301 echo "configure:6313: checking for Gtk libs" >&5
6304 X_LIBS="-L$d $X_LIBS"
6305 echo "$ac_t""$d" 1>&6
6307 echo "$ac_t""not found ($d: no such directory)" 1>&6
6310 # replace the directory string with "yes".
6312 with_gtk=$with_gtk_req
6317 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6318 echo " If it is a directory, then \`DIR/include' will be added to"
6319 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6325 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6326 echo "error: must be yes or no: --with-gtk=$with_gtk"
6331 with_gnome_req=unspecified
6332 # Check whether --with-gnome or --without-gnome was given.
6333 if test "${with_gnome+set}" = set; then
6334 withval="$with_gnome"
6335 with_gnome="$withval"; with_gnome_req="$withval"
6341 # if --with-gnome=/directory/ was specified, remember that directory so that
6342 # we can also look for the `gnome-config' program in that directory.
6343 case "$with_gnome" in
6345 gnome_dir="$with_gnome"
6353 case "$with_gnome" in
6358 echo $ac_n "checking for Gnome headers""... $ac_c" 1>&6
6359 echo "configure:6371: checking for Gnome headers" >&5
6360 d=$with_gnome/include
6362 X_CFLAGS="-I$d $X_CFLAGS"
6363 echo "$ac_t""$d" 1>&6
6365 echo "$ac_t""not found ($d: no such directory)" 1>&6
6368 echo $ac_n "checking for Gnome libs""... $ac_c" 1>&6
6369 echo "configure:6381: checking for Gnome libs" >&5
6372 X_LIBS="-L$d $X_LIBS"
6373 echo "$ac_t""$d" 1>&6
6375 echo "$ac_t""not found ($d: no such directory)" 1>&6
6378 # replace the directory string with "yes".
6379 with_gnome_req="yes"
6380 with_gnome=$with_gnome_req
6385 echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
6386 echo " If it is a directory, then \`DIR/include' will be added to"
6387 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6393 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
6394 echo "error: must be yes or no: --with-gnome=$with_gnome"
6400 if test "$with_gtk" = yes; then
6403 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6404 # for glib-config and gtk-config.
6408 if test ! -z "$gtk_dir"; then
6409 # canonicalize slashes.
6410 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6411 gtk_path="$gtk_dir:$gtk_path"
6414 if test ! -z "gnome_dir"; then
6415 # canonicalize slashes.
6416 gnome_dir=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
6417 gtk_path="$gnome_dir:$gtk_path"
6420 for ac_prog in glib12-config glib-config
6422 # Extract the first word of "$ac_prog", so it can be a program name with args.
6423 set dummy $ac_prog; ac_word=$2
6424 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6425 echo "configure:6437: checking for $ac_word" >&5
6426 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6427 echo $ac_n "(cached) $ac_c" 1>&6
6429 case "$glib_config" in
6431 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6434 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6437 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6438 ac_dummy="$gtk_path"
6439 for ac_dir in $ac_dummy; do
6440 test -z "$ac_dir" && ac_dir=.
6441 if test -f $ac_dir/$ac_word; then
6442 ac_cv_path_glib_config="$ac_dir/$ac_word"
6450 glib_config="$ac_cv_path_glib_config"
6451 if test -n "$glib_config"; then
6452 echo "$ac_t""$glib_config" 1>&6
6454 echo "$ac_t""no" 1>&6
6457 test -n "$glib_config" && break
6460 for ac_prog in gtk12-config gtk-config
6462 # Extract the first word of "$ac_prog", so it can be a program name with args.
6463 set dummy $ac_prog; ac_word=$2
6464 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6465 echo "configure:6477: checking for $ac_word" >&5
6466 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6467 echo $ac_n "(cached) $ac_c" 1>&6
6469 case "$gtk_config" in
6471 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6474 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6477 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6478 ac_dummy="$gtk_path"
6479 for ac_dir in $ac_dummy; do
6480 test -z "$ac_dir" && ac_dir=.
6481 if test -f $ac_dir/$ac_word; then
6482 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6490 gtk_config="$ac_cv_path_gtk_config"
6491 if test -n "$gtk_config"; then
6492 echo "$ac_t""$gtk_config" 1>&6
6494 echo "$ac_t""no" 1>&6
6497 test -n "$gtk_config" && break
6501 if test "$with_gnome" = yes; then
6502 for ac_prog in gnome-config
6504 # Extract the first word of "$ac_prog", so it can be a program name with args.
6505 set dummy $ac_prog; ac_word=$2
6506 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6507 echo "configure:6519: checking for $ac_word" >&5
6508 if eval "test \"`echo '$''{'ac_cv_path_gnome_config'+set}'`\" = set"; then
6509 echo $ac_n "(cached) $ac_c" 1>&6
6511 case "$gnome_config" in
6513 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
6516 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a dos path.
6519 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6520 ac_dummy="$gtk_path"
6521 for ac_dir in $ac_dummy; do
6522 test -z "$ac_dir" && ac_dir=.
6523 if test -f $ac_dir/$ac_word; then
6524 ac_cv_path_gnome_config="$ac_dir/$ac_word"
6532 gnome_config="$ac_cv_path_gnome_config"
6533 if test -n "$gnome_config"; then
6534 echo "$ac_t""$gnome_config" 1>&6
6536 echo "$ac_t""no" 1>&6
6539 test -n "$gnome_config" && break
6544 if test -n "$glib_config" -a -n "gtk_config" ; then
6546 if test "$with_gnome" = yes -a -n "$gnome_config" ; then
6551 if test "$have_gtk" = yes; then
6552 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6553 echo "configure:6565: checking Gtk version number" >&5
6554 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6555 echo $ac_n "(cached) $ac_c" 1>&6
6557 ac_cv_gtk_version_string=`$gtk_config --version`
6560 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6561 ac_gtk_version_string=$ac_cv_gtk_version_string
6564 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6565 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6567 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6568 if test -z "$ac_gtk_version"; then
6569 ac_gtk_version=unknown
6570 ac_gtk_version_string=unknown
6572 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6580 if test "$have_gtk" = yes; then
6581 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6582 echo "configure:6594: checking for Gtk includes" >&5
6583 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6584 echo $ac_n "(cached) $ac_c" 1>&6
6586 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6589 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6590 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6591 echo "configure:6603: checking for Gtk libs" >&5
6592 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6593 echo $ac_n "(cached) $ac_c" 1>&6
6595 ac_cv_gtk_config_libs=`$gtk_config --libs`
6598 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6600 ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
6601 ac_gtk_config_libs=$ac_cv_gtk_config_libs
6603 # Check for Gnome Capplet support.
6605 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6606 gnome_config_libs="capplet gnomeui"
6607 echo $ac_n "checking for Gnome capplet includes""... $ac_c" 1>&6
6608 echo "configure:6620: checking for Gnome capplet includes" >&5
6609 if eval "test \"`echo '$''{'ac_cv_gnome_config_cflags'+set}'`\" = set"; then
6610 echo $ac_n "(cached) $ac_c" 1>&6
6612 if ( $gnome_config --cflags $gnome_config_libs 2>&1 >/dev/null | \
6613 grep Unknown >/dev/null ) ; then
6614 ac_cv_gnome_config_cflags=''
6616 ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
6620 ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
6621 if test "$ac_gnome_config_cflags" = "" ; then
6623 echo "$ac_t""no" 1>&6
6625 echo "$ac_t""$ac_gnome_config_cflags" 1>&6
6629 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6630 echo $ac_n "checking for Gnome capplet libs""... $ac_c" 1>&6
6631 echo "configure:6643: checking for Gnome capplet libs" >&5
6632 if eval "test \"`echo '$''{'ac_cv_gnome_config_libs'+set}'`\" = set"; then
6633 echo $ac_n "(cached) $ac_c" 1>&6
6635 if ( $gnome_config --libs $gnome_config_libs 2>&1 >/dev/null |
6636 grep Unknown >/dev/null ) ; then
6637 ac_cv_gnome_config_libs=''
6639 ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
6643 ac_gnome_config_libs=$ac_cv_gnome_config_libs
6644 if test "$ac_gnome_config_libs" = "" ; then
6646 echo "$ac_t""no" 1>&6
6648 echo "$ac_t""$ac_gnome_config_libs" 1>&6
6653 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6654 GNOME_DATADIR=`$gnome_config --datadir`
6658 # If we have Gnome, then override the gtk-config values with
6659 # the gnome-config values.
6661 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6662 ac_gtk_config_cflags=$ac_gnome_config_cflags
6663 ac_gtk_config_libs=$ac_gnome_config_libs
6664 cat >> confdefs.h <<\EOF
6665 #define HAVE_CRAPPLET 1
6671 if test "$have_gtk" = yes; then
6672 INCLUDES="$INCLUDES $ac_gtk_config_cflags"
6673 GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
6674 cat >> confdefs.h <<\EOF
6683 ###############################################################################
6685 # Checking whether Motif is really Lesstif.
6687 ###############################################################################
6690 if test "$have_motif" = yes ; then
6691 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6692 echo "configure:6704: checking whether Motif is really LessTif" >&5
6693 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6694 echo $ac_n "(cached) $ac_c" 1>&6
6697 ac_save_CPPFLAGS="$CPPFLAGS"
6698 if test \! -z "$includedir" ; then
6699 CPPFLAGS="$CPPFLAGS -I$includedir"
6701 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6702 cat > conftest.$ac_ext <<EOF
6703 #line 6715 "configure"
6704 #include "confdefs.h"
6707 long vers = LesstifVersion;
6710 if { (eval echo configure:6722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6712 ac_cv_have_lesstif=yes
6714 echo "configure: failed program was:" >&5
6715 cat conftest.$ac_ext >&5
6717 ac_cv_have_lesstif=no
6720 CPPFLAGS="$ac_save_CPPFLAGS"
6723 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
6724 have_lesstif=$ac_cv_have_lesstif
6728 lesstif_version=unknown
6729 lesstif_version_string=unknown
6731 if test "$have_lesstif" = yes ; then
6733 echo unknown > conftest-lt
6734 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
6735 echo "configure:6747: checking LessTif version number" >&5
6736 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
6737 echo $ac_n "(cached) $ac_c" 1>&6
6740 ac_save_CPPFLAGS="$CPPFLAGS"
6741 if test \! -z "$includedir" ; then
6742 CPPFLAGS="$CPPFLAGS -I$includedir"
6744 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6745 if test "$cross_compiling" = yes; then
6746 ac_cv_lesstif_version=unknown
6747 ac_cv_lesstif_version_string=unknown
6749 cat > conftest.$ac_ext <<EOF
6750 #line 6762 "configure"
6751 #include "confdefs.h"
6755 FILE *f = fopen("conftest-lt", "w");
6757 fprintf(f, "%d %d.%d\n", LesstifVersion,
6758 LESSTIF_VERSION, LESSTIF_REVISION);
6763 if { (eval echo configure:6775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6765 ltv=`cat conftest-lt`
6766 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
6767 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
6769 echo "configure: failed program was:" >&5
6770 cat conftest.$ac_ext >&5
6772 ac_cv_lesstif_version=unknown
6773 ac_cv_lesstif_version_string=unknown
6778 CPPFLAGS="$ac_save_CPPFLAGS"
6781 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
6783 lesstif_version=$ac_cv_lesstif_version
6784 lesstif_version_string=$ac_cv_lesstif_version_string
6789 if test "$have_motif" = yes ; then
6791 echo unknown > conftest-mt
6792 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
6793 echo "configure:6805: checking Motif version number" >&5
6794 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
6795 echo $ac_n "(cached) $ac_c" 1>&6
6798 ac_save_CPPFLAGS="$CPPFLAGS"
6799 if test \! -z "$includedir" ; then
6800 CPPFLAGS="$CPPFLAGS -I$includedir"
6802 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6803 if test "$cross_compiling" = yes; then
6804 ac_cv_motif_version=unknown
6805 ac_cv_motif_version_string=unknown
6807 cat > conftest.$ac_ext <<EOF
6808 #line 6820 "configure"
6809 #include "confdefs.h"
6813 FILE *f = fopen("conftest-mt", "w");
6815 fprintf(f, "%d %d.%d\n", XmVersion,
6816 XmVERSION, XmREVISION);
6821 if { (eval echo configure:6833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6823 mtv=`cat conftest-mt`
6824 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
6825 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
6827 echo "configure: failed program was:" >&5
6828 cat conftest.$ac_ext >&5
6830 ac_cv_motif_version=unknown
6831 ac_cv_motif_version_string=unknown
6836 CPPFLAGS="$ac_save_CPPFLAGS"
6839 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
6841 motif_version=$ac_cv_motif_version
6842 motif_version_string=$ac_cv_motif_version_string
6847 ###############################################################################
6849 # Checking whether Motif requires -lXpm.
6851 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
6852 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
6853 # of the library whether to build the XPM code into libXm, or whether
6854 # to rely on an external libXm. So the only way to tell whether XPM is
6855 # a link-time requirement is to examine libXm.a, which is very
6856 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
6857 # always link against XPM if the XPM lib exists (and this will be a
6858 # no-op if libXm happens to already have the XPM code in it.)
6860 ###############################################################################
6862 motif_requires_xpm=no
6863 if test "$have_motif" = yes ; then
6864 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
6865 echo "configure:6877: checking whether Motif requires XPM" >&5
6866 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
6868 motif_requires_xpm=yes
6869 echo "$ac_t""maybe" 1>&6
6871 echo "$ac_t""no" 1>&6
6876 ###############################################################################
6878 # Checking whether Motif requires -lXp.
6880 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
6881 # Extension". Why this extension isn't in -lXext with all the others,
6884 ###############################################################################
6887 if test "$have_motif" = yes ; then
6890 ac_save_CPPFLAGS="$CPPFLAGS"
6891 ac_save_LDFLAGS="$LDFLAGS"
6892 # ac_save_LIBS="$LIBS"
6894 if test \! -z "$includedir" ; then
6895 CPPFLAGS="$CPPFLAGS -I$includedir"
6897 # note: $X_CFLAGS includes $x_includes
6898 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6900 if test \! -z "$libdir" ; then
6901 LDFLAGS="$LDFLAGS -L$libdir"
6903 # note: $X_LIBS includes $x_libraries
6904 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6906 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
6907 echo "configure:6919: checking for XpQueryExtension in -lXp" >&5
6908 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
6909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6910 echo $ac_n "(cached) $ac_c" 1>&6
6912 ac_save_LIBS="$LIBS"
6913 LIBS="-lXp -lX11 -lXext -lm $LIBS"
6914 cat > conftest.$ac_ext <<EOF
6915 #line 6927 "configure"
6916 #include "confdefs.h"
6917 /* Override any gcc2 internal prototype to avoid an error. */
6918 /* We use char because int might match the return type of a gcc2
6919 builtin and then its argument prototype would still apply. */
6920 char XpQueryExtension();
6926 if { (eval echo configure:6938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6928 eval "ac_cv_lib_$ac_lib_var=yes"
6930 echo "configure: failed program was:" >&5
6931 cat conftest.$ac_ext >&5
6933 eval "ac_cv_lib_$ac_lib_var=no"
6936 LIBS="$ac_save_LIBS"
6939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6940 echo "$ac_t""yes" 1>&6
6941 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
6943 echo "$ac_t""no" 1>&6
6947 CPPFLAGS="$ac_save_CPPFLAGS"
6948 LDFLAGS="$ac_save_LDFLAGS"
6949 # LIBS="$ac_save_LIBS"
6954 ###############################################################################
6956 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
6958 ###############################################################################
6961 if test "$have_motif" = yes ; then
6963 ac_save_CPPFLAGS="$CPPFLAGS"
6964 ac_save_LDFLAGS="$LDFLAGS"
6965 # ac_save_LIBS="$LIBS"
6967 if test \! -z "$includedir" ; then
6968 CPPFLAGS="$CPPFLAGS -I$includedir"
6970 # note: $X_CFLAGS includes $x_includes
6971 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6973 if test \! -z "$libdir" ; then
6974 LDFLAGS="$LDFLAGS -L$libdir"
6976 # note: $X_LIBS includes $x_libraries
6977 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6979 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
6980 echo "configure:6992: checking for _Xsetlocale in -lXintl" >&5
6981 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
6982 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6983 echo $ac_n "(cached) $ac_c" 1>&6
6985 ac_save_LIBS="$LIBS"
6986 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
6987 cat > conftest.$ac_ext <<EOF
6988 #line 7000 "configure"
6989 #include "confdefs.h"
6990 /* Override any gcc2 internal prototype to avoid an error. */
6991 /* We use char because int might match the return type of a gcc2
6992 builtin and then its argument prototype would still apply. */
6999 if { (eval echo configure:7011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7001 eval "ac_cv_lib_$ac_lib_var=yes"
7003 echo "configure: failed program was:" >&5
7004 cat conftest.$ac_ext >&5
7006 eval "ac_cv_lib_$ac_lib_var=no"
7009 LIBS="$ac_save_LIBS"
7012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7013 echo "$ac_t""yes" 1>&6
7016 echo "$ac_t""no" 1>&6
7020 CPPFLAGS="$ac_save_CPPFLAGS"
7021 LDFLAGS="$ac_save_LDFLAGS"
7022 # LIBS="$ac_save_LIBS"
7024 if test "$have_xintl" = yes; then
7025 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
7030 ###############################################################################
7032 # Check for -lGL or -lMesaGL.
7034 ###############################################################################
7038 with_gl_req=unspecified
7040 # Check whether --with-gl or --without-gl was given.
7041 if test "${with_gl+set}" = set; then
7043 with_gl="$withval"; with_gl_req="$withval"
7055 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
7056 echo "configure:7068: checking for GL headers" >&5
7059 X_CFLAGS="-I$d $X_CFLAGS"
7060 echo "$ac_t""$d" 1>&6
7062 echo "$ac_t""not found ($d: no such directory)" 1>&6
7065 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
7066 echo "configure:7078: checking for GL libs" >&5
7069 X_LIBS="-L$d $X_LIBS"
7070 echo "$ac_t""$d" 1>&6
7072 echo "$ac_t""not found ($d: no such directory)" 1>&6
7075 # replace the directory string with "yes".
7077 with_gl=$with_gl_req
7082 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
7083 echo " If it is a directory, then \`DIR/include' will be added to"
7084 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7090 ac_mesagl_version=unknown
7091 ac_mesagl_version_string=unknown
7093 if test "$with_gl" = yes; then
7095 ac_save_CPPFLAGS="$CPPFLAGS"
7096 if test \! -z "$includedir" ; then
7097 CPPFLAGS="$CPPFLAGS -I$includedir"
7099 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7100 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
7101 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
7102 echo "configure:7114: checking for GL/gl.h" >&5
7103 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7104 echo $ac_n "(cached) $ac_c" 1>&6
7106 cat > conftest.$ac_ext <<EOF
7107 #line 7119 "configure"
7108 #include "confdefs.h"
7111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7112 { (eval echo configure:7124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7114 if test -z "$ac_err"; then
7116 eval "ac_cv_header_$ac_safe=yes"
7119 echo "configure: failed program was:" >&5
7120 cat conftest.$ac_ext >&5
7122 eval "ac_cv_header_$ac_safe=no"
7126 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7127 echo "$ac_t""yes" 1>&6
7130 echo "$ac_t""no" 1>&6
7133 CPPFLAGS="$ac_save_CPPFLAGS"
7134 if test "$have_gl" = yes ; then
7136 ac_save_CPPFLAGS="$CPPFLAGS"
7137 if test \! -z "$includedir" ; then
7138 CPPFLAGS="$CPPFLAGS -I$includedir"
7140 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7141 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
7142 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
7143 echo "configure:7155: checking for GL/glx.h" >&5
7144 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7145 echo $ac_n "(cached) $ac_c" 1>&6
7147 cat > conftest.$ac_ext <<EOF
7148 #line 7160 "configure"
7149 #include "confdefs.h"
7152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7153 { (eval echo configure:7165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7155 if test -z "$ac_err"; then
7157 eval "ac_cv_header_$ac_safe=yes"
7160 echo "configure: failed program was:" >&5
7161 cat conftest.$ac_ext >&5
7163 eval "ac_cv_header_$ac_safe=no"
7167 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7168 echo "$ac_t""yes" 1>&6
7171 echo "$ac_t""no" 1>&6
7174 CPPFLAGS="$ac_save_CPPFLAGS"
7177 # If we have the headers, try and figure out which vendor it's from.
7179 if test "$have_gl" = yes ; then
7181 # We need to know whether it's MesaGL so that we know which libraries
7184 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7185 echo "configure:7197: checking whether GL is really MesaGL" >&5
7186 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7187 echo $ac_n "(cached) $ac_c" 1>&6
7189 ac_cv_have_mesa_gl=no
7191 ac_save_CPPFLAGS="$CPPFLAGS"
7192 if test \! -z "$includedir" ; then
7193 CPPFLAGS="$CPPFLAGS -I$includedir"
7195 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7196 cat > conftest.$ac_ext <<EOF
7197 #line 7209 "configure"
7198 #include "confdefs.h"
7201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7202 egrep "Mesa" >/dev/null 2>&1; then
7204 ac_cv_have_mesa_gl=yes
7208 CPPFLAGS="$ac_save_CPPFLAGS"
7212 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7213 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7220 # Some versions of MesaGL are compiled to require -lpthread.
7221 # So if the Mesa headers exist, and -lpthread exists, then always
7222 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
7224 if test "$ac_have_mesa_gl" = yes; then
7225 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7226 echo "configure:7238: checking for pthread_create in -lpthread" >&5
7227 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7228 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7229 echo $ac_n "(cached) $ac_c" 1>&6
7231 ac_save_LIBS="$LIBS"
7232 LIBS="-lpthread $LIBS"
7233 cat > conftest.$ac_ext <<EOF
7234 #line 7246 "configure"
7235 #include "confdefs.h"
7236 /* Override any gcc2 internal prototype to avoid an error. */
7237 /* We use char because int might match the return type of a gcc2
7238 builtin and then its argument prototype would still apply. */
7239 char pthread_create();
7245 if { (eval echo configure:7257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7247 eval "ac_cv_lib_$ac_lib_var=yes"
7249 echo "configure: failed program was:" >&5
7250 cat conftest.$ac_ext >&5
7252 eval "ac_cv_lib_$ac_lib_var=no"
7255 LIBS="$ac_save_LIBS"
7258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7259 echo "$ac_t""yes" 1>&6
7262 echo "$ac_t""no" 1>&6
7268 # If we have Mesa headers, check to see if we can link against -lMesaGL.
7269 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
7270 # Else, warn that GL is busted. (We have the headers, but no libs.)
7273 if test "$ac_have_mesa_gl" = yes ; then
7275 ac_save_CPPFLAGS="$CPPFLAGS"
7276 ac_save_LDFLAGS="$LDFLAGS"
7277 # ac_save_LIBS="$LIBS"
7279 if test \! -z "$includedir" ; then
7280 CPPFLAGS="$CPPFLAGS -I$includedir"
7282 # note: $X_CFLAGS includes $x_includes
7283 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7285 if test \! -z "$libdir" ; then
7286 LDFLAGS="$LDFLAGS -L$libdir"
7288 # note: $X_LIBS includes $x_libraries
7289 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7291 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
7292 echo "configure:7304: checking for glXCreateContext in -lMesaGL" >&5
7293 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7294 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7295 echo $ac_n "(cached) $ac_c" 1>&6
7297 ac_save_LIBS="$LIBS"
7298 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7299 cat > conftest.$ac_ext <<EOF
7300 #line 7312 "configure"
7301 #include "confdefs.h"
7302 /* Override any gcc2 internal prototype to avoid an error. */
7303 /* We use char because int might match the return type of a gcc2
7304 builtin and then its argument prototype would still apply. */
7305 char glXCreateContext();
7311 if { (eval echo configure:7323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7313 eval "ac_cv_lib_$ac_lib_var=yes"
7315 echo "configure: failed program was:" >&5
7316 cat conftest.$ac_ext >&5
7318 eval "ac_cv_lib_$ac_lib_var=no"
7321 LIBS="$ac_save_LIBS"
7324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7325 echo "$ac_t""yes" 1>&6
7327 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
7329 echo "$ac_t""no" 1>&6
7332 CPPFLAGS="$ac_save_CPPFLAGS"
7333 LDFLAGS="$ac_save_LDFLAGS"
7334 # LIBS="$ac_save_LIBS"
7338 if test "$gl_lib_1" = "" ; then
7340 ac_save_CPPFLAGS="$CPPFLAGS"
7341 ac_save_LDFLAGS="$LDFLAGS"
7342 # ac_save_LIBS="$LIBS"
7344 if test \! -z "$includedir" ; then
7345 CPPFLAGS="$CPPFLAGS -I$includedir"
7347 # note: $X_CFLAGS includes $x_includes
7348 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7350 if test \! -z "$libdir" ; then
7351 LDFLAGS="$LDFLAGS -L$libdir"
7353 # note: $X_LIBS includes $x_libraries
7354 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7356 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7357 echo "configure:7369: checking for glXCreateContext in -lGL" >&5
7358 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7359 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7360 echo $ac_n "(cached) $ac_c" 1>&6
7362 ac_save_LIBS="$LIBS"
7363 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7364 cat > conftest.$ac_ext <<EOF
7365 #line 7377 "configure"
7366 #include "confdefs.h"
7367 /* Override any gcc2 internal prototype to avoid an error. */
7368 /* We use char because int might match the return type of a gcc2
7369 builtin and then its argument prototype would still apply. */
7370 char glXCreateContext();
7376 if { (eval echo configure:7388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7378 eval "ac_cv_lib_$ac_lib_var=yes"
7380 echo "configure: failed program was:" >&5
7381 cat conftest.$ac_ext >&5
7383 eval "ac_cv_lib_$ac_lib_var=no"
7386 LIBS="$ac_save_LIBS"
7389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7390 echo "$ac_t""yes" 1>&6
7392 GL_LIBS="-lGL -lGLU $GL_LIBS"
7394 echo "$ac_t""no" 1>&6
7397 CPPFLAGS="$ac_save_CPPFLAGS"
7398 LDFLAGS="$ac_save_LDFLAGS"
7399 # LIBS="$ac_save_LIBS"
7403 if test "$gl_lib_1" = "" ; then
7404 # we have headers, but no libs -- bail.
7409 # linking works -- we can build the GL hacks.
7410 cat >> confdefs.h <<\EOF
7414 if test "$ac_have_mesa_gl" = yes ; then
7415 cat >> confdefs.h <<\EOF
7416 #define HAVE_MESA_GL 1
7424 # Now that we know we have GL headers and libs, do some more GL testing.
7427 if test "$have_gl" = yes ; then
7428 # If it's MesaGL, we'd like to issue a warning if the version number
7429 # is less than or equal to 2.6, because that version had a security bug.
7431 if test "$ac_have_mesa_gl" = yes; then
7433 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7434 echo "configure:7446: checking MesaGL version number" >&5
7435 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7436 echo $ac_n "(cached) $ac_c" 1>&6
7438 cat > conftest.$ac_ext <<EOF
7439 #line 7451 "configure"
7440 #include "confdefs.h"
7442 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7445 ac_save_CPPFLAGS="$CPPFLAGS"
7446 if test \! -z "$includedir" ; then
7447 CPPFLAGS="$CPPFLAGS -I$includedir"
7449 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7453 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7454 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7457 rm -f conftest.$ac_ext
7459 CPPFLAGS="$ac_save_CPPFLAGS"
7461 if test "$mglv" = ""; then
7462 ac_mesagl_version=unknown
7463 ac_mesagl_version_string=unknown
7465 ac_mesagl_version_string=$mglv
7466 maj=`echo $mglv | sed -n 's/\..*//p'`
7467 min=`echo $mglv | sed -n 's/.*\.//p'`
7468 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7469 if test -z "$ac_mesagl_version"; then
7470 ac_mesagl_version=unknown
7471 ac_mesagl_version_string=unknown
7474 ac_cv_mesagl_version=$ac_mesagl_version
7475 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7479 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7480 ac_mesagl_version=$ac_cv_mesagl_version
7481 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7485 # Check for OpenGL 1.1 features.
7488 ac_save_CPPFLAGS="$CPPFLAGS"
7489 ac_save_LDFLAGS="$LDFLAGS"
7490 # ac_save_LIBS="$LIBS"
7492 if test \! -z "$includedir" ; then
7493 CPPFLAGS="$CPPFLAGS -I$includedir"
7495 # note: $X_CFLAGS includes $x_includes
7496 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7498 if test \! -z "$libdir" ; then
7499 LDFLAGS="$LDFLAGS -L$libdir"
7501 # note: $X_LIBS includes $x_libraries
7502 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7504 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7505 echo "configure:7517: checking for glBindTexture in -l$gl_lib_1" >&5
7506 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7507 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7508 echo $ac_n "(cached) $ac_c" 1>&6
7510 ac_save_LIBS="$LIBS"
7511 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7512 cat > conftest.$ac_ext <<EOF
7513 #line 7525 "configure"
7514 #include "confdefs.h"
7515 /* Override any gcc2 internal prototype to avoid an error. */
7516 /* We use char because int might match the return type of a gcc2
7517 builtin and then its argument prototype would still apply. */
7518 char glBindTexture();
7524 if { (eval echo configure:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7526 eval "ac_cv_lib_$ac_lib_var=yes"
7528 echo "configure: failed program was:" >&5
7529 cat conftest.$ac_ext >&5
7531 eval "ac_cv_lib_$ac_lib_var=no"
7534 LIBS="$ac_save_LIBS"
7537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7538 echo "$ac_t""yes" 1>&6
7539 cat >> confdefs.h <<\EOF
7540 #define HAVE_GLBINDTEXTURE 1
7544 echo "$ac_t""no" 1>&6
7548 CPPFLAGS="$ac_save_CPPFLAGS"
7549 LDFLAGS="$ac_save_LDFLAGS"
7550 # LIBS="$ac_save_LIBS"
7554 elif test "$with_gl" != no; then
7555 echo "error: must be yes or no: --with-gl=$with_gl"
7560 ###############################################################################
7564 ###############################################################################
7567 with_gle_req=unspecified
7569 # Check whether --with-gle or --without-gle was given.
7570 if test "${with_gle+set}" = set; then
7572 with_gle="$withval"; with_gle_req="$withval"
7584 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7585 echo "configure:7597: checking for GLE headers" >&5
7588 X_CFLAGS="-I$d $X_CFLAGS"
7589 echo "$ac_t""$d" 1>&6
7591 echo "$ac_t""not found ($d: no such directory)" 1>&6
7594 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7595 echo "configure:7607: checking for GLE libs" >&5
7598 X_LIBS="-L$d $X_LIBS"
7599 echo "$ac_t""$d" 1>&6
7601 echo "$ac_t""not found ($d: no such directory)" 1>&6
7604 # replace the directory string with "yes".
7606 with_gle=$with_gle_req
7611 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7612 echo " If it is a directory, then \`DIR/include' will be added to"
7613 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7621 if test "$with_gle" = yes; then
7624 ac_save_CPPFLAGS="$CPPFLAGS"
7625 if test \! -z "$includedir" ; then
7626 CPPFLAGS="$CPPFLAGS -I$includedir"
7628 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7629 ac_safe=`echo "GL/gle.h" | sed 'y%./+-%__p_%'`
7630 echo $ac_n "checking for GL/gle.h""... $ac_c" 1>&6
7631 echo "configure:7643: checking for GL/gle.h" >&5
7632 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7633 echo $ac_n "(cached) $ac_c" 1>&6
7635 cat > conftest.$ac_ext <<EOF
7636 #line 7648 "configure"
7637 #include "confdefs.h"
7640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7641 { (eval echo configure:7653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7643 if test -z "$ac_err"; then
7645 eval "ac_cv_header_$ac_safe=yes"
7648 echo "configure: failed program was:" >&5
7649 cat conftest.$ac_ext >&5
7651 eval "ac_cv_header_$ac_safe=no"
7655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7656 echo "$ac_t""yes" 1>&6
7659 echo "$ac_t""no" 1>&6
7662 CPPFLAGS="$ac_save_CPPFLAGS"
7663 if test "$have_gle3" = yes ; then
7667 ac_save_CPPFLAGS="$CPPFLAGS"
7668 if test \! -z "$includedir" ; then
7669 CPPFLAGS="$CPPFLAGS -I$includedir"
7671 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7672 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7673 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7674 echo "configure:7686: checking for GL/gutil.h" >&5
7675 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7676 echo $ac_n "(cached) $ac_c" 1>&6
7678 cat > conftest.$ac_ext <<EOF
7679 #line 7691 "configure"
7680 #include "confdefs.h"
7681 #include <GL/gutil.h>
7683 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7684 { (eval echo configure:7696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7685 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7686 if test -z "$ac_err"; then
7688 eval "ac_cv_header_$ac_safe=yes"
7691 echo "configure: failed program was:" >&5
7692 cat conftest.$ac_ext >&5
7694 eval "ac_cv_header_$ac_safe=no"
7698 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7699 echo "$ac_t""yes" 1>&6
7702 echo "$ac_t""no" 1>&6
7705 CPPFLAGS="$ac_save_CPPFLAGS"
7706 if test "$have_gle" = yes ; then
7708 ac_save_CPPFLAGS="$CPPFLAGS"
7709 if test \! -z "$includedir" ; then
7710 CPPFLAGS="$CPPFLAGS -I$includedir"
7712 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7713 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
7714 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
7715 echo "configure:7727: checking for GL/tube.h" >&5
7716 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7717 echo $ac_n "(cached) $ac_c" 1>&6
7719 cat > conftest.$ac_ext <<EOF
7720 #line 7732 "configure"
7721 #include "confdefs.h"
7722 #include <GL/tube.h>
7724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7725 { (eval echo configure:7737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7727 if test -z "$ac_err"; then
7729 eval "ac_cv_header_$ac_safe=yes"
7732 echo "configure: failed program was:" >&5
7733 cat conftest.$ac_ext >&5
7735 eval "ac_cv_header_$ac_safe=no"
7739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7740 echo "$ac_t""yes" 1>&6
7743 echo "$ac_t""no" 1>&6
7746 CPPFLAGS="$ac_save_CPPFLAGS"
7750 if test "$have_gle" = yes ; then
7754 ac_save_CPPFLAGS="$CPPFLAGS"
7755 ac_save_LDFLAGS="$LDFLAGS"
7756 # ac_save_LIBS="$LIBS"
7758 if test \! -z "$includedir" ; then
7759 CPPFLAGS="$CPPFLAGS -I$includedir"
7761 # note: $X_CFLAGS includes $x_includes
7762 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7764 if test \! -z "$libdir" ; then
7765 LDFLAGS="$LDFLAGS -L$libdir"
7767 # note: $X_LIBS includes $x_libraries
7768 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7770 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
7771 echo "configure:7783: checking for gleCreateGC in -lgle" >&5
7772 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
7773 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7774 echo $ac_n "(cached) $ac_c" 1>&6
7776 ac_save_LIBS="$LIBS"
7777 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7778 cat > conftest.$ac_ext <<EOF
7779 #line 7791 "configure"
7780 #include "confdefs.h"
7781 /* Override any gcc2 internal prototype to avoid an error. */
7782 /* We use char because int might match the return type of a gcc2
7783 builtin and then its argument prototype would still apply. */
7790 if { (eval echo configure:7802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7792 eval "ac_cv_lib_$ac_lib_var=yes"
7794 echo "configure: failed program was:" >&5
7795 cat conftest.$ac_ext >&5
7797 eval "ac_cv_lib_$ac_lib_var=no"
7800 LIBS="$ac_save_LIBS"
7803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7804 echo "$ac_t""yes" 1>&6
7805 have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
7807 echo "$ac_t""no" 1>&6
7810 CPPFLAGS="$ac_save_CPPFLAGS"
7811 LDFLAGS="$ac_save_LDFLAGS"
7812 # LIBS="$ac_save_LIBS"
7815 if test "$have_gle" = yes ; then
7819 # sometimes the libmatrix stuff is included in libgle. look there first.
7821 # I don't get it. For some reason, this test passes on SGI, as if
7822 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
7823 # Yet the link is succeeding. Why???
7825 # AC_CHECK_X_LIB(gle, uview_direction_d,
7826 # [have_gle=yes; gle_halfassed=no],
7827 # [], $GL_LIBS -lX11 -lXext -lm)
7829 # As of GLE 3 this is in libgle, and has changed name to uview_direction!
7831 if test "$have_gle3" = yes ; then
7833 ac_save_CPPFLAGS="$CPPFLAGS"
7834 ac_save_LDFLAGS="$LDFLAGS"
7835 # ac_save_LIBS="$LIBS"
7837 if test \! -z "$includedir" ; then
7838 CPPFLAGS="$CPPFLAGS -I$includedir"
7840 # note: $X_CFLAGS includes $x_includes
7841 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7843 if test \! -z "$libdir" ; then
7844 LDFLAGS="$LDFLAGS -L$libdir"
7846 # note: $X_LIBS includes $x_libraries
7847 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7849 echo $ac_n "checking for uview_direction in -lgle""... $ac_c" 1>&6
7850 echo "configure:7862: checking for uview_direction in -lgle" >&5
7851 ac_lib_var=`echo gle'_'uview_direction | sed 'y%./+-%__p_%'`
7852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7853 echo $ac_n "(cached) $ac_c" 1>&6
7855 ac_save_LIBS="$LIBS"
7856 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7857 cat > conftest.$ac_ext <<EOF
7858 #line 7870 "configure"
7859 #include "confdefs.h"
7860 /* Override any gcc2 internal prototype to avoid an error. */
7861 /* We use char because int might match the return type of a gcc2
7862 builtin and then its argument prototype would still apply. */
7863 char uview_direction();
7869 if { (eval echo configure:7881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7871 eval "ac_cv_lib_$ac_lib_var=yes"
7873 echo "configure: failed program was:" >&5
7874 cat conftest.$ac_ext >&5
7876 eval "ac_cv_lib_$ac_lib_var=no"
7879 LIBS="$ac_save_LIBS"
7882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7883 echo "$ac_t""yes" 1>&6
7884 have_gle=yes; gle_halfassed=no
7886 echo "$ac_t""no" 1>&6
7889 CPPFLAGS="$ac_save_CPPFLAGS"
7890 LDFLAGS="$ac_save_LDFLAGS"
7891 # LIBS="$ac_save_LIBS"
7894 # if it wasn't in libgle, then look in libmatrix.
7895 if test "$have_gle" = no ; then
7897 ac_save_CPPFLAGS="$CPPFLAGS"
7898 ac_save_LDFLAGS="$LDFLAGS"
7899 # ac_save_LIBS="$LIBS"
7901 if test \! -z "$includedir" ; then
7902 CPPFLAGS="$CPPFLAGS -I$includedir"
7904 # note: $X_CFLAGS includes $x_includes
7905 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7907 if test \! -z "$libdir" ; then
7908 LDFLAGS="$LDFLAGS -L$libdir"
7910 # note: $X_LIBS includes $x_libraries
7911 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7913 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
7914 echo "configure:7926: checking for uview_direction_d in -lmatrix" >&5
7915 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
7916 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7917 echo $ac_n "(cached) $ac_c" 1>&6
7919 ac_save_LIBS="$LIBS"
7920 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
7921 cat > conftest.$ac_ext <<EOF
7922 #line 7934 "configure"
7923 #include "confdefs.h"
7924 /* Override any gcc2 internal prototype to avoid an error. */
7925 /* We use char because int might match the return type of a gcc2
7926 builtin and then its argument prototype would still apply. */
7927 char uview_direction_d();
7933 if { (eval echo configure:7945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7935 eval "ac_cv_lib_$ac_lib_var=yes"
7937 echo "configure: failed program was:" >&5
7938 cat conftest.$ac_ext >&5
7940 eval "ac_cv_lib_$ac_lib_var=no"
7943 LIBS="$ac_save_LIBS"
7946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7947 echo "$ac_t""yes" 1>&6
7948 have_gle=yes; gle_halfassed=no;
7949 GLE_LIBS="$GLE_LIBS -lmatrix"
7951 echo "$ac_t""no" 1>&6
7954 CPPFLAGS="$ac_save_CPPFLAGS"
7955 LDFLAGS="$ac_save_LDFLAGS"
7956 # LIBS="$ac_save_LIBS"
7961 if test "$have_gle" = yes ; then
7962 cat >> confdefs.h <<\EOF
7966 if test "$have_gle3" = yes ; then
7967 cat >> confdefs.h <<\EOF
7974 elif test "$with_gle" != no; then
7975 echo "error: must be yes or no: --with-gle=$with_gle"
7982 ###############################################################################
7986 ###############################################################################
7989 with_xpm_req=unspecified
7990 # Check whether --with-xpm or --without-xpm was given.
7991 if test "${with_xpm+set}" = set; then
7993 with_xpm="$withval"; with_xpm_req="$withval"
8005 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
8006 echo "configure:8018: checking for XPM headers" >&5
8009 X_CFLAGS="-I$d $X_CFLAGS"
8010 echo "$ac_t""$d" 1>&6
8012 echo "$ac_t""not found ($d: no such directory)" 1>&6
8015 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
8016 echo "configure:8028: checking for XPM libs" >&5
8019 X_LIBS="-L$d $X_LIBS"
8020 echo "$ac_t""$d" 1>&6
8022 echo "$ac_t""not found ($d: no such directory)" 1>&6
8025 # replace the directory string with "yes".
8027 with_xpm=$with_xpm_req
8032 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
8033 echo " If it is a directory, then \`DIR/include' will be added to"
8034 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8040 if test "$with_xpm" = yes; then
8042 ac_save_CPPFLAGS="$CPPFLAGS"
8043 if test \! -z "$includedir" ; then
8044 CPPFLAGS="$CPPFLAGS -I$includedir"
8046 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8047 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
8048 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
8049 echo "configure:8061: checking for X11/xpm.h" >&5
8050 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8051 echo $ac_n "(cached) $ac_c" 1>&6
8053 cat > conftest.$ac_ext <<EOF
8054 #line 8066 "configure"
8055 #include "confdefs.h"
8056 #include <X11/xpm.h>
8058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8059 { (eval echo configure:8071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8061 if test -z "$ac_err"; then
8063 eval "ac_cv_header_$ac_safe=yes"
8066 echo "configure: failed program was:" >&5
8067 cat conftest.$ac_ext >&5
8069 eval "ac_cv_header_$ac_safe=no"
8073 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8074 echo "$ac_t""yes" 1>&6
8076 cat >> confdefs.h <<\EOF
8082 echo "$ac_t""no" 1>&6
8085 CPPFLAGS="$ac_save_CPPFLAGS"
8086 elif test "$with_xpm" != no; then
8087 echo "error: must be yes or no: --with-xpm=$with_xpm"
8091 # See comment near $motif_requires_xpm, above.
8092 # Need to do this here, after both Motif and XPM have been checked for.
8094 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
8095 if test "$motif_requires_xpm" = yes ; then
8096 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
8101 ###############################################################################
8103 # Check for the XSHM server extension.
8105 ###############################################################################
8108 with_xshm_req=unspecified
8109 # Check whether --with-xshm-ext or --without-xshm-ext was given.
8110 if test "${with_xshm_ext+set}" = set; then
8111 withval="$with_xshm_ext"
8112 with_xshm="$withval"; with_xshm_req="$withval"
8119 case "$with_xshm" in
8124 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
8125 echo "configure:8137: checking for XSHM headers" >&5
8126 d=$with_xshm/include
8128 X_CFLAGS="-I$d $X_CFLAGS"
8129 echo "$ac_t""$d" 1>&6
8131 echo "$ac_t""not found ($d: no such directory)" 1>&6
8134 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
8135 echo "configure:8147: checking for XSHM libs" >&5
8138 X_LIBS="-L$d $X_LIBS"
8139 echo "$ac_t""$d" 1>&6
8141 echo "$ac_t""not found ($d: no such directory)" 1>&6
8144 # replace the directory string with "yes".
8146 with_xshm=$with_xshm_req
8151 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
8152 echo " If it is a directory, then \`DIR/include' will be added to"
8153 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8159 if test "$with_xshm" = yes; then
8161 # first check for Xshm.h.
8163 ac_save_CPPFLAGS="$CPPFLAGS"
8164 if test \! -z "$includedir" ; then
8165 CPPFLAGS="$CPPFLAGS -I$includedir"
8167 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8168 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
8169 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
8170 echo "configure:8182: checking for X11/extensions/XShm.h" >&5
8171 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8172 echo $ac_n "(cached) $ac_c" 1>&6
8174 cat > conftest.$ac_ext <<EOF
8175 #line 8187 "configure"
8176 #include "confdefs.h"
8177 #include <X11/extensions/XShm.h>
8179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8180 { (eval echo configure:8192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8182 if test -z "$ac_err"; then
8184 eval "ac_cv_header_$ac_safe=yes"
8187 echo "configure: failed program was:" >&5
8188 cat conftest.$ac_ext >&5
8190 eval "ac_cv_header_$ac_safe=no"
8194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8195 echo "$ac_t""yes" 1>&6
8198 echo "$ac_t""no" 1>&6
8201 CPPFLAGS="$ac_save_CPPFLAGS"
8203 # if that succeeded, then check for sys/ipc.h.
8204 if test "$have_xshm" = yes; then
8207 ac_save_CPPFLAGS="$CPPFLAGS"
8208 if test \! -z "$includedir" ; then
8209 CPPFLAGS="$CPPFLAGS -I$includedir"
8211 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8212 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
8213 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
8214 echo "configure:8226: checking for sys/ipc.h" >&5
8215 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8216 echo $ac_n "(cached) $ac_c" 1>&6
8218 cat > conftest.$ac_ext <<EOF
8219 #line 8231 "configure"
8220 #include "confdefs.h"
8221 #include <sys/ipc.h>
8223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8224 { (eval echo configure:8236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8226 if test -z "$ac_err"; then
8228 eval "ac_cv_header_$ac_safe=yes"
8231 echo "configure: failed program was:" >&5
8232 cat conftest.$ac_ext >&5
8234 eval "ac_cv_header_$ac_safe=no"
8238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8239 echo "$ac_t""yes" 1>&6
8242 echo "$ac_t""no" 1>&6
8245 CPPFLAGS="$ac_save_CPPFLAGS"
8248 # if that succeeded, then check for sys/shm.h.
8249 if test "$have_xshm" = yes; then
8252 ac_save_CPPFLAGS="$CPPFLAGS"
8253 if test \! -z "$includedir" ; then
8254 CPPFLAGS="$CPPFLAGS -I$includedir"
8256 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8257 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
8258 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
8259 echo "configure:8271: checking for sys/shm.h" >&5
8260 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8261 echo $ac_n "(cached) $ac_c" 1>&6
8263 cat > conftest.$ac_ext <<EOF
8264 #line 8276 "configure"
8265 #include "confdefs.h"
8266 #include <sys/shm.h>
8268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8269 { (eval echo configure:8281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8271 if test -z "$ac_err"; then
8273 eval "ac_cv_header_$ac_safe=yes"
8276 echo "configure: failed program was:" >&5
8277 cat conftest.$ac_ext >&5
8279 eval "ac_cv_header_$ac_safe=no"
8283 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8284 echo "$ac_t""yes" 1>&6
8287 echo "$ac_t""no" 1>&6
8290 CPPFLAGS="$ac_save_CPPFLAGS"
8293 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
8294 # to exist, but the library code to not exist. And even better, the library
8295 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
8296 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
8297 # that's not quite right, but close enough.)
8301 if `uname -v` -eq 3 ; then
8304 ac_save_CPPFLAGS="$CPPFLAGS"
8305 ac_save_LDFLAGS="$LDFLAGS"
8306 # ac_save_LIBS="$LIBS"
8308 if test \! -z "$includedir" ; then
8309 CPPFLAGS="$CPPFLAGS -I$includedir"
8311 # note: $X_CFLAGS includes $x_includes
8312 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8314 if test \! -z "$libdir" ; then
8315 LDFLAGS="$LDFLAGS -L$libdir"
8317 # note: $X_LIBS includes $x_libraries
8318 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8320 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
8321 echo "configure:8333: checking for XShmQueryExtension in -lXextSam" >&5
8322 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
8323 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8324 echo $ac_n "(cached) $ac_c" 1>&6
8326 ac_save_LIBS="$LIBS"
8327 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
8328 cat > conftest.$ac_ext <<EOF
8329 #line 8341 "configure"
8330 #include "confdefs.h"
8331 /* Override any gcc2 internal prototype to avoid an error. */
8332 /* We use char because int might match the return type of a gcc2
8333 builtin and then its argument prototype would still apply. */
8334 char XShmQueryExtension();
8337 XShmQueryExtension()
8340 if { (eval echo configure:8352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8342 eval "ac_cv_lib_$ac_lib_var=yes"
8344 echo "configure: failed program was:" >&5
8345 cat conftest.$ac_ext >&5
8347 eval "ac_cv_lib_$ac_lib_var=no"
8350 LIBS="$ac_save_LIBS"
8353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8354 echo "$ac_t""yes" 1>&6
8355 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
8357 echo "$ac_t""no" 1>&6
8361 CPPFLAGS="$ac_save_CPPFLAGS"
8362 LDFLAGS="$ac_save_LDFLAGS"
8363 # LIBS="$ac_save_LIBS"
8369 # if that succeeded, then we've really got it.
8370 if test "$have_xshm" = yes; then
8371 cat >> confdefs.h <<\EOF
8372 #define HAVE_XSHM_EXTENSION 1
8377 elif test "$with_xshm" != no; then
8378 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
8383 ###############################################################################
8385 # Check for the DOUBLE-BUFFER server extension.
8387 ###############################################################################
8390 with_xdbe_req=unspecified
8391 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
8392 if test "${with_xdbe_ext+set}" = set; then
8393 withval="$with_xdbe_ext"
8394 with_xdbe="$withval"; with_xdbe_req="$withval"
8401 case "$with_xdbe" in
8406 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
8407 echo "configure:8419: checking for DOUBLE-BUFFER headers" >&5
8408 d=$with_xdbe/include
8410 X_CFLAGS="-I$d $X_CFLAGS"
8411 echo "$ac_t""$d" 1>&6
8413 echo "$ac_t""not found ($d: no such directory)" 1>&6
8416 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
8417 echo "configure:8429: checking for DOUBLE-BUFFER libs" >&5
8420 X_LIBS="-L$d $X_LIBS"
8421 echo "$ac_t""$d" 1>&6
8423 echo "$ac_t""not found ($d: no such directory)" 1>&6
8426 # replace the directory string with "yes".
8428 with_xdbe=$with_xdbe_req
8433 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
8434 echo " If it is a directory, then \`DIR/include' will be added to"
8435 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8441 if test "$with_xdbe" = yes; then
8444 ac_save_CPPFLAGS="$CPPFLAGS"
8445 if test \! -z "$includedir" ; then
8446 CPPFLAGS="$CPPFLAGS -I$includedir"
8448 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8449 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8450 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8451 echo "configure:8463: checking for X11/extensions/Xdbe.h" >&5
8452 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8453 echo $ac_n "(cached) $ac_c" 1>&6
8455 cat > conftest.$ac_ext <<EOF
8456 #line 8468 "configure"
8457 #include "confdefs.h"
8458 #include <X11/extensions/Xdbe.h>
8460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8461 { (eval echo configure:8473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8463 if test -z "$ac_err"; then
8465 eval "ac_cv_header_$ac_safe=yes"
8468 echo "configure: failed program was:" >&5
8469 cat conftest.$ac_ext >&5
8471 eval "ac_cv_header_$ac_safe=no"
8475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8476 echo "$ac_t""yes" 1>&6
8479 echo "$ac_t""no" 1>&6
8482 CPPFLAGS="$ac_save_CPPFLAGS"
8483 if test "$have_xdbe" = yes; then
8484 cat >> confdefs.h <<\EOF
8485 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8490 elif test "$with_xdbe" != no; then
8491 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8496 ###############################################################################
8498 # Check for the SGI XReadDisplay server extension.
8500 # Note: this has to be down here, rather than up with the other server
8501 # extension tests, so that the output of `configure --help' is in the
8502 # right order. Arrgh!
8504 ###############################################################################
8507 with_readdisplay_req=unspecified
8508 # Check whether --with-readdisplay or --without-readdisplay was given.
8509 if test "${with_readdisplay+set}" = set; then
8510 withval="$with_readdisplay"
8511 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8513 with_readdisplay=yes
8518 case "$with_readdisplay" in
8523 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8524 echo "configure:8536: checking for XReadDisplay headers" >&5
8525 d=$with_readdisplay/include
8527 X_CFLAGS="-I$d $X_CFLAGS"
8528 echo "$ac_t""$d" 1>&6
8530 echo "$ac_t""not found ($d: no such directory)" 1>&6
8533 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8534 echo "configure:8546: checking for XReadDisplay libs" >&5
8535 d=$with_readdisplay/lib
8537 X_LIBS="-L$d $X_LIBS"
8538 echo "$ac_t""$d" 1>&6
8540 echo "$ac_t""not found ($d: no such directory)" 1>&6
8543 # replace the directory string with "yes".
8544 with_readdisplay_req="yes"
8545 with_readdisplay=$with_readdisplay_req
8550 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8551 echo " If it is a directory, then \`DIR/include' will be added to"
8552 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8558 if test "$with_readdisplay" = yes; then
8560 ac_save_CPPFLAGS="$CPPFLAGS"
8561 if test \! -z "$includedir" ; then
8562 CPPFLAGS="$CPPFLAGS -I$includedir"
8564 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8565 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8566 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8567 echo "configure:8579: checking for X11/extensions/readdisplay.h" >&5
8568 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8569 echo $ac_n "(cached) $ac_c" 1>&6
8571 cat > conftest.$ac_ext <<EOF
8572 #line 8584 "configure"
8573 #include "confdefs.h"
8574 #include <X11/extensions/readdisplay.h>
8576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8577 { (eval echo configure:8589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8579 if test -z "$ac_err"; then
8581 eval "ac_cv_header_$ac_safe=yes"
8584 echo "configure: failed program was:" >&5
8585 cat conftest.$ac_ext >&5
8587 eval "ac_cv_header_$ac_safe=no"
8591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8592 echo "$ac_t""yes" 1>&6
8593 cat >> confdefs.h <<\EOF
8594 #define HAVE_READ_DISPLAY_EXTENSION 1
8598 echo "$ac_t""no" 1>&6
8601 CPPFLAGS="$ac_save_CPPFLAGS"
8602 elif test "$with_readdisplay" != no; then
8603 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8608 ###############################################################################
8610 # Check for the SGI Iris Video Library.
8612 ###############################################################################
8615 with_sgivideo_req=unspecified
8616 # Check whether --with-sgivideo or --without-sgivideo was given.
8617 if test "${with_sgivideo+set}" = set; then
8618 withval="$with_sgivideo"
8619 with_sgivideo="$withval"; with_sgivideo_req="$withval"
8626 case "$with_sgivideo" in
8631 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
8632 echo "configure:8644: checking for Iris Video headers" >&5
8633 d=$with_sgivideo/include
8635 X_CFLAGS="-I$d $X_CFLAGS"
8636 echo "$ac_t""$d" 1>&6
8638 echo "$ac_t""not found ($d: no such directory)" 1>&6
8641 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
8642 echo "configure:8654: checking for Iris Video libs" >&5
8643 d=$with_sgivideo/lib
8645 X_LIBS="-L$d $X_LIBS"
8646 echo "$ac_t""$d" 1>&6
8648 echo "$ac_t""not found ($d: no such directory)" 1>&6
8651 # replace the directory string with "yes".
8652 with_sgivideo_req="yes"
8653 with_sgivideo=$with_sgivideo_req
8658 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8659 echo " If it is a directory, then \`DIR/include' will be added to"
8660 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8666 if test "$with_sgivideo" = yes; then
8668 ac_save_CPPFLAGS="$CPPFLAGS"
8669 if test \! -z "$includedir" ; then
8670 CPPFLAGS="$CPPFLAGS -I$includedir"
8672 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8673 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8674 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8675 echo "configure:8687: checking for dmedia/vl.h" >&5
8676 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8677 echo $ac_n "(cached) $ac_c" 1>&6
8679 cat > conftest.$ac_ext <<EOF
8680 #line 8692 "configure"
8681 #include "confdefs.h"
8682 #include <dmedia/vl.h>
8684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8685 { (eval echo configure:8697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8686 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8687 if test -z "$ac_err"; then
8689 eval "ac_cv_header_$ac_safe=yes"
8692 echo "configure: failed program was:" >&5
8693 cat conftest.$ac_ext >&5
8695 eval "ac_cv_header_$ac_safe=no"
8699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8700 echo "$ac_t""yes" 1>&6
8703 echo "$ac_t""no" 1>&6
8706 CPPFLAGS="$ac_save_CPPFLAGS"
8707 if test "$have_sgivideo" = yes; then
8709 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8710 echo "configure:8722: checking for vlOpenVideo in -lvl" >&5
8711 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8712 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8713 echo $ac_n "(cached) $ac_c" 1>&6
8715 ac_save_LIBS="$LIBS"
8717 cat > conftest.$ac_ext <<EOF
8718 #line 8730 "configure"
8719 #include "confdefs.h"
8720 /* Override any gcc2 internal prototype to avoid an error. */
8721 /* We use char because int might match the return type of a gcc2
8722 builtin and then its argument prototype would still apply. */
8729 if { (eval echo configure:8741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8731 eval "ac_cv_lib_$ac_lib_var=yes"
8733 echo "configure: failed program was:" >&5
8734 cat conftest.$ac_ext >&5
8736 eval "ac_cv_lib_$ac_lib_var=no"
8739 LIBS="$ac_save_LIBS"
8742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8743 echo "$ac_t""yes" 1>&6
8746 echo "$ac_t""no" 1>&6
8749 if test "$have_sgivideo" = yes; then
8750 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8751 SGI_VIDEO_LIBS="-lvl"
8752 cat >> confdefs.h <<\EOF
8753 #define HAVE_SGI_VIDEO 1
8758 elif test "$with_sgivideo" != no; then
8759 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8764 ###############################################################################
8766 # Check for a program to generate random text.
8768 # Zippy is funnier than the idiocy generally spat out by `fortune',
8769 # so try to find that, by invoking Emacs and asking it where its
8770 # libexec directory is ("yow" lives in there.)
8772 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8773 # and if so, use them.
8775 # If that doesn't work, look in /usr/games, and if it's there, use
8776 # the full pathname.
8778 ###############################################################################
8781 # Check whether --with-zippy or --without-zippy was given.
8782 if test "${with_zippy+set}" = set; then
8783 withval="$with_zippy"
8784 with_zippy_req="$withval"; with_zippy="$withval"
8790 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8795 if test -n "$with_zippy_req" ; then
8796 ac_cv_zippy_program=""
8797 case "$with_zippy_req" in
8799 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8800 echo "configure:8812: checking for $with_zippy_req" >&5
8801 if test -x "$with_zippy_req" ; then
8802 echo "$ac_t""yes" 1>&6
8804 echo "$ac_t""no" 1>&6
8810 unset ac_cv_path_zip2
8811 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8812 set dummy $with_zippy_req; ac_word=$2
8813 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8814 echo "configure:8826: checking for $ac_word" >&5
8815 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8816 echo $ac_n "(cached) $ac_c" 1>&6
8820 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8823 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8826 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8828 for ac_dir in $ac_dummy; do
8829 test -z "$ac_dir" && ac_dir=.
8830 if test -f $ac_dir/$ac_word; then
8831 ac_cv_path_zip2="$ac_dir/$ac_word"
8839 zip2="$ac_cv_path_zip2"
8840 if test -n "$zip2"; then
8841 echo "$ac_t""$zip2" 1>&6
8843 echo "$ac_t""no" 1>&6
8846 if test "$zip2" = ""; then
8851 ac_cv_zippy_program="$with_zippy"
8853 elif test -n "$ac_cv_zippy_program"; then
8854 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8857 if test ! -n "$ac_cv_zippy_program"; then
8859 for ac_prog in emacs
8861 # Extract the first word of "$ac_prog", so it can be a program name with args.
8862 set dummy $ac_prog; ac_word=$2
8863 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8864 echo "configure:8876: checking for $ac_word" >&5
8865 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8866 echo $ac_n "(cached) $ac_c" 1>&6
8868 if test -n "$emacs_exe"; then
8869 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8871 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8873 for ac_dir in $ac_dummy; do
8874 test -z "$ac_dir" && ac_dir=.
8875 if test -f $ac_dir/$ac_word; then
8876 ac_cv_prog_emacs_exe="$ac_prog"
8883 emacs_exe="$ac_cv_prog_emacs_exe"
8884 if test -n "$emacs_exe"; then
8885 echo "$ac_t""$emacs_exe" 1>&6
8887 echo "$ac_t""no" 1>&6
8890 test -n "$emacs_exe" && break
8893 for ac_prog in xemacs
8895 # Extract the first word of "$ac_prog", so it can be a program name with args.
8896 set dummy $ac_prog; ac_word=$2
8897 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8898 echo "configure:8910: checking for $ac_word" >&5
8899 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
8900 echo $ac_n "(cached) $ac_c" 1>&6
8902 if test -n "$xemacs_exe"; then
8903 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
8905 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8907 for ac_dir in $ac_dummy; do
8908 test -z "$ac_dir" && ac_dir=.
8909 if test -f $ac_dir/$ac_word; then
8910 ac_cv_prog_xemacs_exe="$ac_prog"
8917 xemacs_exe="$ac_cv_prog_xemacs_exe"
8918 if test -n "$xemacs_exe"; then
8919 echo "$ac_t""$xemacs_exe" 1>&6
8921 echo "$ac_t""no" 1>&6
8924 test -n "$xemacs_exe" && break
8928 ac_cv_zippy_program=""
8929 eargs='-batch -q -nw --eval'
8931 if test -n "$emacs_exe" ; then
8932 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
8933 echo "configure:8945: checking for emacs yow" >&5
8935 # get emacs to tell us where the libexec directory is.
8937 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8938 2>/dev/null | tail -1`
8939 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8941 # try running libexec/yow and see if it exits without error.
8943 if test x"$dir" != x -a -x "$dir/yow" ; then
8944 if $dir/yow >&- 2>&- ; then
8945 ac_cv_zippy_program="$dir/yow"
8946 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8948 echo "$ac_t""no" 1>&6
8953 if test -z "$ac_cv_zippy_program" ; then
8954 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
8955 echo "configure:8967: checking for xemacs yow" >&5
8956 if test -n "$xemacs_exe" ; then
8958 # get xemacs to tell us where the libexec directory is.
8960 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8961 2>/dev/null | tail -1`
8962 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8964 # try running libexec/yow and see if it exits without error.
8966 if test x"$dir" != x -a -x "$dir/yow" ; then
8967 if $dir/yow >&- 2>&- ; then
8968 ac_cv_zippy_program="$dir/yow"
8969 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8972 # in some xemacs installations, the pathname of the yow.lines file
8973 # isn't hardcoded into the yow executable, and must be passed on
8974 # the command line. See if it's in libexec/../etc/.
8978 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
8981 yowlines="$dir_up/etc/yow.lines"
8982 if $dir/yow -f $yowlines >&- 2>&- ; then
8983 ac_cv_zippy_program="$dir/yow -f $yowlines"
8984 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8987 # In newer XEmacs releases, yow.lines is in a different place,
8988 # and the easiest way to get it is by calling the new function
8989 # `locate-data-file'.
8991 yowlines=`$xemacs_exe $eargs \
8992 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
8993 2>/dev/null | tail -1`
8994 if $dir/yow -f $yowlines >&- 2>&- ; then
8995 ac_cv_zippy_program="$dir/yow -f $yowlines"
8996 echo "$ac_t""$ac_cv_zippy_program" 1>&6
8998 echo "$ac_t""no" 1>&6
9006 # if that didn't work, try for some other programs...
9007 if test -z "$ac_cv_zippy_program" ; then
9009 for ac_prog in fortune zippy yow
9011 # Extract the first word of "$ac_prog", so it can be a program name with args.
9012 set dummy $ac_prog; ac_word=$2
9013 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9014 echo "configure:9026: checking for $ac_word" >&5
9015 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
9016 echo $ac_n "(cached) $ac_c" 1>&6
9018 if test -n "$fortune"; then
9019 ac_cv_prog_fortune="$fortune" # Let the user override the test.
9021 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9023 for ac_dir in $ac_dummy; do
9024 test -z "$ac_dir" && ac_dir=.
9025 if test -f $ac_dir/$ac_word; then
9026 ac_cv_prog_fortune="$ac_prog"
9033 fortune="$ac_cv_prog_fortune"
9034 if test -n "$fortune"; then
9035 echo "$ac_t""$fortune" 1>&6
9037 echo "$ac_t""no" 1>&6
9040 test -n "$fortune" && break
9043 # if that didn't work, try for those programs in /usr/games...
9044 if test -z "$fortune" ; then
9045 for ac_prog in fortune zippy yow
9047 # Extract the first word of "$ac_prog", so it can be a program name with args.
9048 set dummy $ac_prog; ac_word=$2
9049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9050 echo "configure:9062: checking for $ac_word" >&5
9051 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
9052 echo $ac_n "(cached) $ac_c" 1>&6
9056 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
9059 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
9062 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9063 ac_dummy="/usr/games:/usr/local/games:$PATH"
9064 for ac_dir in $ac_dummy; do
9065 test -z "$ac_dir" && ac_dir=.
9066 if test -f $ac_dir/$ac_word; then
9067 ac_cv_path_fortune="$ac_dir/$ac_word"
9075 fortune="$ac_cv_path_fortune"
9076 if test -n "$fortune"; then
9077 echo "$ac_t""$fortune" 1>&6
9079 echo "$ac_t""no" 1>&6
9082 test -n "$fortune" && break
9084 test -n "$fortune" || fortune="fortune"
9090 if test -z "$ac_cv_zippy_program" ; then
9091 ac_cv_zippy_program=fortune
9094 cat >> confdefs.h <<EOF
9095 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
9100 ###############################################################################
9102 # Done testing. Now, set up the various -I and -L variables,
9103 # and decide which GUI program to build by default.
9105 ###############################################################################
9112 if test \! -z "$includedir" ; then
9113 INCLUDES="$INCLUDES -I$includedir"
9116 if test \! -z "$libdir" ; then
9117 LDFLAGS="$LDFLAGS -L$libdir"
9121 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9123 if test "$have_motif" = yes; then
9124 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9125 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9127 if test "$have_gtk" = yes; then
9128 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
9129 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9133 if test "$have_kerberos" = yes; then
9134 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
9135 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
9137 if test "$have_pam" = yes; then
9138 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
9139 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
9140 INSTALL_PAM="install-pam"
9142 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
9143 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
9146 if test "$enable_locking" = yes; then
9147 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
9148 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
9150 LOCK_SRCS='$(NOLOCK_SRCS_1)'
9151 LOCK_OBJS='$(NOLOCK_OBJS_1)'
9154 if test "$need_setuid" = yes; then
9156 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
9159 INSTALL_SETUID='$(INSTALL_PROGRAM)'
9163 if test "$have_gl" = yes; then
9164 GL_EXES='$(GL_EXES)'
9168 GL_KLUDGE="-${tab} "
9171 if test "$have_gle" = yes; then
9172 GLE_EXES='$(GLE_EXES)'
9173 GLE_MEN='$(GLE_MEN)'
9174 GLE_KLUDGE="${tab} "
9176 GLE_KLUDGE="-${tab} "
9180 ###############################################################################
9182 # Perform substitutions and write Makefiles.
9184 ###############################################################################
9223 APPDEFAULTS=$ac_x_app_defaults
9232 cat > confcache <<\EOF
9233 # This file is a shell script that caches the results of configure
9234 # tests run on this system so they can be shared between configure
9235 # scripts and configure runs. It is not useful on other systems.
9236 # If it contains results you don't want to keep, you may remove or edit it.
9238 # By default, configure uses ./config.cache as the cache file,
9239 # creating it if it does not exist already. You can give configure
9240 # the --cache-file=FILE option to use a different cache file; that is
9241 # what configure does when it calls configure scripts in
9242 # subdirectories, so they share the cache.
9243 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9244 # config.status only pays attention to the cache file if you give it the
9245 # --recheck option to rerun configure.
9248 # The following way of writing the cache mishandles newlines in values,
9249 # but we know of no workaround that is simple, portable, and efficient.
9250 # So, don't put newlines in cache variables' values.
9251 # Ultrix sh set writes to stderr and can't be redirected directly,
9252 # and sets the high bit in the cache file unless we assign to the vars.
9254 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9256 # `set' does not quote correctly, so add quotes (double-quote substitution
9257 # turns \\\\ into \\, and sed turns \\ into \).
9259 -e "s/'/'\\\\''/g" \
9260 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9263 # `set' quotes correctly as required by POSIX, so do not add quotes.
9264 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9267 if cmp -s $cache_file confcache; then
9270 if test -w $cache_file; then
9271 echo "updating cache $cache_file"
9272 cat confcache > $cache_file
9274 echo "not updating unwritable cache $cache_file"
9279 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9281 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9282 # Let make expand exec_prefix.
9283 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9285 # Any assignment to VPATH causes Sun make to only execute
9286 # the first set of double-colon rules, so remove it if not needed.
9287 # If there is a colon in the path, we need to keep it.
9288 if test "x$srcdir" = x.; then
9289 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9292 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9294 DEFS=-DHAVE_CONFIG_H
9296 # Without the "./", some shells look in PATH for config.status.
9297 : ${CONFIG_STATUS=./config.status}
9299 echo creating $CONFIG_STATUS
9300 rm -f $CONFIG_STATUS
9301 cat > $CONFIG_STATUS <<EOF
9303 # Generated automatically by configure.
9304 # Run this file to recreate the current configuration.
9305 # This directory was configured as follows,
9306 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9308 # $0 $ac_configure_args
9310 # Compiler output produced by configure, useful for debugging
9311 # configure, is in ./config.log if it exists.
9313 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9316 case "\$ac_option" in
9317 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9318 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9319 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9320 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9321 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9323 -help | --help | --hel | --he | --h)
9324 echo "\$ac_cs_usage"; exit 0 ;;
9325 *) echo "\$ac_cs_usage"; exit 1 ;;
9329 ac_given_srcdir=$srcdir
9330 ac_given_INSTALL="$INSTALL"
9332 trap 'rm -fr `echo "Makefile
9337 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9339 cat >> $CONFIG_STATUS <<EOF
9341 # Protect against being on the right side of a sed subst in config.status.
9342 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9343 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9347 s%@CFLAGS@%$CFLAGS%g
9348 s%@CPPFLAGS@%$CPPFLAGS%g
9349 s%@CXXFLAGS@%$CXXFLAGS%g
9350 s%@FFLAGS@%$FFLAGS%g
9352 s%@LDFLAGS@%$LDFLAGS%g
9354 s%@exec_prefix@%$exec_prefix%g
9355 s%@prefix@%$prefix%g
9356 s%@program_transform_name@%$program_transform_name%g
9357 s%@bindir@%$bindir%g
9358 s%@sbindir@%$sbindir%g
9359 s%@libexecdir@%$libexecdir%g
9360 s%@datadir@%$datadir%g
9361 s%@sysconfdir@%$sysconfdir%g
9362 s%@sharedstatedir@%$sharedstatedir%g
9363 s%@localstatedir@%$localstatedir%g
9364 s%@libdir@%$libdir%g
9365 s%@includedir@%$includedir%g
9366 s%@oldincludedir@%$oldincludedir%g
9367 s%@infodir@%$infodir%g
9368 s%@mandir@%$mandir%g
9370 s%@host_alias@%$host_alias%g
9371 s%@host_cpu@%$host_cpu%g
9372 s%@host_vendor@%$host_vendor%g
9373 s%@host_os@%$host_os%g
9376 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9377 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9378 s%@INSTALL_DATA@%$INSTALL_DATA%g
9379 s%@SET_MAKE@%$SET_MAKE%g
9381 s%@X_CFLAGS@%$X_CFLAGS%g
9382 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9383 s%@X_LIBS@%$X_LIBS%g
9384 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9385 s%@glib_config@%$glib_config%g
9386 s%@gtk_config@%$gtk_config%g
9387 s%@gnome_config@%$gnome_config%g
9389 s%@emacs_exe@%$emacs_exe%g
9390 s%@xemacs_exe@%$xemacs_exe%g
9391 s%@fortune@%$fortune%g
9392 s%@INCLUDES@%$INCLUDES%g
9393 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
9394 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
9395 s%@SAVER_LIBS@%$SAVER_LIBS%g
9396 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
9397 s%@GTK_LIBS@%$GTK_LIBS%g
9398 s%@HACK_LIBS@%$HACK_LIBS%g
9399 s%@XPM_LIBS@%$XPM_LIBS%g
9400 s%@GL_LIBS@%$GL_LIBS%g
9401 s%@GLE_LIBS@%$GLE_LIBS%g
9402 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
9403 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
9404 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
9405 s%@NEED_SETUID@%$NEED_SETUID%g
9406 s%@INSTALL_PAM@%$INSTALL_PAM%g
9407 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
9408 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
9409 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
9410 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
9411 s%@XMU_SRCS@%$XMU_SRCS%g
9412 s%@XMU_OBJS@%$XMU_OBJS%g
9413 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
9414 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
9415 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
9416 s%@LOCK_SRCS@%$LOCK_SRCS%g
9417 s%@LOCK_OBJS@%$LOCK_OBJS%g
9418 s%@GL_EXES@%$GL_EXES%g
9419 s%@GL_MEN@%$GL_MEN%g
9420 s%@GL_KLUDGE@%$GL_KLUDGE%g
9421 s%@GLE_EXES@%$GLE_EXES%g
9422 s%@GLE_MEN@%$GLE_MEN%g
9423 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
9424 s%@HACKDIR@%$HACKDIR%g
9425 s%@GNOME_DATADIR@%$GNOME_DATADIR%g
9426 s%@APPDEFAULTS@%$APPDEFAULTS%g
9427 s%@DEPEND@%$DEPEND%g
9428 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
9429 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
9434 cat >> $CONFIG_STATUS <<\EOF
9436 # Split the substitutions into bite-sized pieces for seds with
9437 # small command number limits, like on Digital OSF/1 and HP-UX.
9438 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9439 ac_file=1 # Number of current file.
9440 ac_beg=1 # First line for current file.
9441 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9444 while $ac_more_lines; do
9445 if test $ac_beg -gt 1; then
9446 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9448 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9450 if test ! -s conftest.s$ac_file; then
9452 rm -f conftest.s$ac_file
9454 if test -z "$ac_sed_cmds"; then
9455 ac_sed_cmds="sed -f conftest.s$ac_file"
9457 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9459 ac_file=`expr $ac_file + 1`
9461 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9464 if test -z "$ac_sed_cmds"; then
9469 cat >> $CONFIG_STATUS <<EOF
9471 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9476 driver/XScreenSaver.ad"}
9478 cat >> $CONFIG_STATUS <<\EOF
9479 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9480 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9482 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9483 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9484 *) ac_file_in="${ac_file}.in" ;;
9487 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9489 # Remove last slash and all that follows it. Not all systems have dirname.
9490 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9491 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9492 # The file is in a subdirectory.
9493 test ! -d "$ac_dir" && mkdir "$ac_dir"
9494 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9495 # A "../" for each directory in $ac_dir_suffix.
9496 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9498 ac_dir_suffix= ac_dots=
9501 case "$ac_given_srcdir" in
9503 if test -z "$ac_dots"; then top_srcdir=.
9504 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9505 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9507 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9508 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9511 case "$ac_given_INSTALL" in
9512 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9513 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9516 echo creating "$ac_file"
9518 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9520 *Makefile*) ac_comsub="1i\\
9521 # $configure_input" ;;
9525 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9527 s%@configure_input@%$configure_input%g
9528 s%@srcdir@%$srcdir%g
9529 s%@top_srcdir@%$top_srcdir%g
9530 s%@INSTALL@%$INSTALL%g
9531 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9535 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9536 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9538 # ac_d sets the value in "#define NAME VALUE" lines.
9539 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9540 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9543 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9544 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9545 ac_uB='\([ ]\)%\1#\2define\3'
9548 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9549 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9550 ac_eB='$%\1#\2define\3'
9554 if test "${CONFIG_HEADERS+set}" != set; then
9556 cat >> $CONFIG_STATUS <<EOF
9557 CONFIG_HEADERS="config.h"
9559 cat >> $CONFIG_STATUS <<\EOF
9561 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9562 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9564 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9565 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9566 *) ac_file_in="${ac_file}.in" ;;
9569 echo creating $ac_file
9571 rm -f conftest.frag conftest.in conftest.out
9572 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9573 cat $ac_file_inputs > conftest.in
9577 # Transform confdefs.h into a sed script conftest.vals that substitutes
9578 # the proper values into config.h.in to produce config.h. And first:
9579 # Protect against being on the right side of a sed subst in config.status.
9580 # Protect against being in an unquoted here document in config.status.
9582 cat > conftest.hdr <<\EOF
9585 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9589 sed -n -f conftest.hdr confdefs.h > conftest.vals
9592 # This sed command replaces #undef with comments. This is necessary, for
9593 # example, in the case of _POSIX_SOURCE, which is predefined and required
9594 # on some systems where configure will not decide to define it.
9595 cat >> conftest.vals <<\EOF
9596 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9599 # Break up conftest.vals because some shells have a limit on
9600 # the size of here documents, and old seds have small limits too.
9605 ac_lines=`grep -c . conftest.vals`
9606 # grep -c gives empty output for an empty file on some AIX systems.
9607 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9608 # Write a limited-size here document to conftest.frag.
9609 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9610 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9612 sed -f conftest.frag conftest.in > conftest.out
9614 mv conftest.out conftest.in
9616 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9618 mv conftest.tail conftest.vals
9622 cat >> $CONFIG_STATUS <<\EOF
9623 rm -f conftest.frag conftest.h
9624 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9625 cat conftest.in >> conftest.h
9627 if cmp -s $ac_file conftest.h 2>/dev/null; then
9628 echo "$ac_file is unchanged"
9631 # Remove last slash and all that follows it. Not all systems have dirname.
9632 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9633 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9634 # The file is in a subdirectory.
9635 test ! -d "$ac_dir" && mkdir "$ac_dir"
9638 mv conftest.h $ac_file
9643 cat >> $CONFIG_STATUS <<EOF
9646 cat >> $CONFIG_STATUS <<\EOF
9650 chmod +x $CONFIG_STATUS
9651 rm -fr confdefs* $ac_clean_files
9652 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9655 ###############################################################################
9657 # Print some warnings at the end.
9659 ###############################################################################
9661 warn_prefix_1=" Warning:"
9662 warn_prefix_2=" Note:"
9663 warn_prefix="$warn_prefix_1"
9666 warnsep=' #################################################################'
9669 if test "$warning" = no ; then
9670 echo '' ; echo "$warnsep" ; echo ''
9677 if test "$warning" = long ; then echo '' ; fi
9679 echo "$warn_prefix $@"
9686 if test "$was" != no ; then echo '' ; fi
9687 echo "$warn_prefix $@"
9696 warn_prefix="$warn_prefix_2"
9698 warn_prefix="$warn_prefix_1"
9702 warn_prefix="$warn_prefix_2"
9704 warn_prefix="$warn_prefix_1"
9708 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9709 warn 'The SGI saver extension was requested, but was not found.'
9712 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9713 warn 'The MIT saver extension was requested, but was not found.'
9716 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9717 warn 'The XIdle extension was requested, but was not found.'
9720 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9721 warn 'The XSHM extension was requested, but was not found.'
9724 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9725 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9728 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9729 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9732 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9733 warn 'The DPMS extension was requested, but was not found.'
9736 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9737 warn 'The XF86VMODE extension was requested, but was not found.'
9740 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9741 warn "Checking of /proc/interrupts was requested, but it's bogus."
9745 if test "$have_motif" = no -a "$have_gtk" = no; then
9746 warnL "Neither Motif nor Gtk seem to be available;"
9747 warn2 "the \`xscreensaver-demo' program requires one of these."
9749 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9750 warnL "Use of Motif was requested, but it wasn't found;"
9751 warn2 "Gtk will be used instead."
9753 elif test "$jurassic_gtk" = yes ; then
9757 v="$ac_gtk_version_string"
9758 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9759 warnL "Use of Gtk was requested, but its version number is unknown;"
9760 elif test "$with_gtk_req" = yes ; then
9761 warnL "Use of Gtk was requested, but it is version $v;"
9763 warnL "Gtk was found on this system, but it is version $v;"
9766 warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
9768 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9769 warnL "Use of Gtk was requested, but it wasn't found;"
9770 warn2 "Motif will be used instead."
9775 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
9776 warn 'Use of the Gnome Control Panel was requested, but the necessary'
9777 warn2 'headers and/or libraries were not found.'
9781 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9783 preferred_lesstif=0.86
9785 if test "$lesstif_version" = unknown; then
9786 warnL "Unable to determine the LessTif version number!"
9787 warn2 "Make sure you are using version $preferred_lesstif or newer."
9788 warn2 "See <http://www.lesstif.org/>."
9790 elif test \! $lesstif_version -gt 82; then
9791 warnL "LessTif version $lesstif_version_string is being used."
9792 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9793 warn2 "use with XScreenSaver; it is strongly recommended"
9794 warn2 "that you upgrade to at least version $preferred_lesstif!"
9795 warn2 "See <http://www.lesstif.org/>."
9801 if test "$have_xpm" = no ; then
9802 if test "$with_xpm_req" = yes ; then
9803 warnL 'Use of XPM was requested, but it was not found.'
9804 elif test "$with_xpm_req" = no ; then
9805 noteL 'The XPM library is not being used.'
9807 noteL 'The XPM library was not found.'
9811 warn2 'Some of the demos will not be as colorful as they'
9812 warn2 'could be. You might want to consider installing XPM'
9813 warn2 'and re-running configure. (Remember to delete the'
9814 warn2 'config.cache file first.) You can find XPM at most'
9815 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9819 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9820 preferred_mesagl=3.0
9822 if test "$ac_mesagl_version" = unknown; then
9823 warnL "Unable to determine the MesaGL version number!"
9824 warn2 "Make sure you are using version $preferred_mesagl or newer."
9826 elif test \! "$ac_mesagl_version" -gt 2006; then
9827 warnL "MesaGL version $ac_mesagl_version_string is being used."
9828 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9829 warn2 "It is strongly recommended that you upgrade to at"
9830 warn2 "least version $preferred_mesagl."
9834 if test "$have_gl" = no ; then
9835 if test "$with_gl_req" = yes ; then
9836 warnL 'Use of GL was requested, but it was not found.'
9837 elif test "$with_gl_req" = no ; then
9838 noteL 'The OpenGL 3D library is not being used.'
9840 noteL 'The OpenGL 3D library was not found.'
9843 if test "$gl_halfassed" = yes ; then
9845 warn2 'More specifically, we found the headers, but not the'
9846 warn2 'libraries; so either GL is half-installed on this'
9847 warn2 "system, or something else went wrong. The \`config.log'"
9848 warn2 'file might contain some clues.'
9852 warn2 'Those demos which use 3D will not be built or installed.'
9853 warn2 'You might want to consider installing OpenGL and'
9854 warn2 're-running configure. (Remember to delete the'
9855 warn2 "config.cache file first.) If your vendor doesn't ship"
9856 warn2 'their own implementation of OpenGL, you can get a free'
9857 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
9858 warn2 'info, see <http://www.opengl.org/>.'
9863 if test "$have_gl" = yes -a "$have_gle" = no ; then
9864 if test "$with_gle_req" = yes ; then
9865 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
9866 warn2 'it was not found (though the OpenGL library was found, and'
9867 warn2 'is being used.)'
9868 elif test "$with_gle_req" = no ; then
9869 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
9870 warn2 'library is not.'
9872 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
9876 if test "$gle_halfassed" = yes ; then
9878 warn2 'More specifically, we found the headers, but not the'
9879 warn2 'libraries; so either GLE is half-installed on this'
9880 warn2 "system, or something else went wrong. The \`config.log'"
9881 warn2 'file might contain some clues.'
9885 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
9886 warn2 'will not be built or installed. You might want to consider'
9887 warn2 'installing GLE and re-running configure. (Remember to delete'
9888 warn2 'the config.cache file first.) You can find the GLE library'
9889 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
9890 warn2 'see <http://www.opengl.org/>.'
9895 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
9896 warn 'Use of XReadDisplay was requested, but it was not found.'
9899 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
9900 warn 'Use of the Iris Video Library was requested, but it was not found.'
9903 if test -n "$with_zippy_req"; then
9904 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
9905 warnL "$with_zippy_req was requested as the Zippy program,"
9906 warn2 "but was not found. The default will be used instead."
9910 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
9911 warn 'Use of Kerberos was requested, but it was not found.'
9914 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
9915 warn 'Use of PAM was requested, but it was not found.'
9918 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
9919 warn 'Use of shadow passwords was requested, but they were not found.'
9923 # You are in a twisty maze of namespaces and syntaxes, all alike.
9924 # Fuck the skull of Unix.
9926 eval bindir=${bindir}
9927 eval bindir=${bindir}
9928 eval bindir=${bindir}
9929 eval bindir=${bindir}
9930 eval bindir=${bindir}
9931 eval bindir=${bindir}
9932 eval HACKDIR=${HACKDIR}
9933 eval HACKDIR=${HACKDIR}
9934 eval HACKDIR=${HACKDIR}
9935 eval HACKDIR=${HACKDIR}
9936 eval HACKDIR=${HACKDIR}
9937 eval HACKDIR=${HACKDIR}
9939 # canonicalize slashes.
9940 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
9941 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9944 # Sanity check the subdir
9945 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
9946 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
9948 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
9949 There will be an executable installed with that name, so
9950 that can't be the name of a directory as well. Please
9951 re-configure with a different directory name." 1>&2; exit 1; }
9958 # Now let's see if there's a previous RPM version already installed. Blargh!
9962 rpmv=`(rpm -qv xscreensaver) 2>&- | \
9963 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/'`
9966 if test \! -z "$rpmv" ; then
9967 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
9968 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
9971 warnL "There is already an installed RPM of xscreensaver $rpmv"
9972 warn2 "on this system. You might want to remove it (with"
9973 warn2 '"rpm -ve xscreensaver") before running "make install"'
9974 warn2 "from this directory."
9976 warn2 "Alternately, you could build this version of xscreensaver"
9977 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
9978 warn2 "file is included. See the RPM documentation for more info."
9981 if test "$rpmbdir" = "$rpmhdir" ; then
9982 warn2 "The RPM version was installed in $rpmbdir."
9984 warn2 "The RPM version was installed in $rpmbdir,"
9985 warn2 "with demos in $rpmhdir."
9992 # Warn about egregious GNOME bogosity.
9994 #if (rpm -qv control-center) >&- 2>&- ; then
9996 # warnL "The Gnome Control Center seems to be installed."
9998 # warn2 "Note that simply installing this version of xscreensaver"
9999 # warn2 "will not cause GNOME to know about the newly-added display"
10000 # warn2 "modes -- GNOME is just lame that way. Instead of using the"
10001 # warn2 "Control Center, try using the \`xscreensaver-demo' command."
10005 if test "${bindir}" = "${HACKDIR}" ; then
10009 if test "$do_dir_warning" = yes; then
10013 echo ' When you run "make install", the "xscreensaver",'
10014 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
10015 echo " will be installed in ${bindir}."
10017 echo " The various graphics demos (100+ different executables) will"
10018 echo " also be installed in ${HACKDIR}."
10020 echo " If you would prefer the demos to be installed elsewhere"
10021 echo " (for example, in a dedicated directory) you should re-run"
10022 echo " configure with the --enable-subdir=DIR option. For more"
10023 echo " information, run $0 --help."
10027 if test "$warning" != no; then
10028 echo '' ; echo "$warnsep" ; echo ''