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 # Functions to figure out how to disable // comments in ANSI C code.
641 # (With recent gcc, this is done with "-std=c89". With older gcc, this
642 # is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
643 # gcc. Old gcc doesn't support -std, and new gcc doesn't support -lang.
644 # so much for compatibility!)
646 ###############################################################################
653 ###############################################################################
655 # Function to figure out how to create directory trees.
657 ###############################################################################
662 ###############################################################################
664 # Function to check whether gettimeofday() exists, and how to call it.
665 # This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
667 ###############################################################################
672 ###############################################################################
674 # Function to find perl5 (defines PERL and PERL_VERSION.)
676 ###############################################################################
678 # M4 sucks!! perl sucks too!!
680 perl_version_cmd='print $]'
686 ###############################################################################
688 # Function to demand "bc". Losers.
690 ###############################################################################
694 ###############################################################################
696 # Functions to check how to do ICMP PING requests.
698 ###############################################################################
705 ###############################################################################
707 # Functions to check for various X11 crap.
709 ###############################################################################
711 # Try and find the app-defaults directory.
712 # It sucks that autoconf doesn't do this already...
724 # Random special-cases for X on certain pathological OSes.
725 # You know who you are.
731 ###############################################################################
733 # Some utility functions to make checking for X things easier.
735 ###############################################################################
737 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
741 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
745 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
750 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
751 # Use this sparingly; it probably doesn't work very well on X programs.
755 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
756 # (But not the -L directories!)
762 # Usage: HANDLE_X_PATH_ARG([variable_name],
763 # [--command-line-option],
764 # [descriptive string])
766 # All of the --with options take three forms:
768 # --with-foo (or --with-foo=yes)
769 # --without-foo (or --with-foo=no)
772 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
773 # a directory (string beginning with a slash) it checks to see whether
774 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
781 ###############################################################################
782 ###############################################################################
784 # End of function definitions. Now start actually executing stuff.
786 ###############################################################################
787 ###############################################################################
789 # random compiler setup
791 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
792 if test -f $ac_dir/install-sh; then
794 ac_install_sh="$ac_aux_dir/install-sh -c"
796 elif test -f $ac_dir/install.sh; then
798 ac_install_sh="$ac_aux_dir/install.sh -c"
802 if test -z "$ac_aux_dir"; then
803 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
805 ac_config_guess=$ac_aux_dir/config.guess
806 ac_config_sub=$ac_aux_dir/config.sub
807 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
810 # Make sure we can run config.sub.
811 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
812 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
815 echo $ac_n "checking host system type""... $ac_c" 1>&6
816 echo "configure:828: checking host system type" >&5
819 case "$host_alias" in
823 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
824 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
826 *) host_alias=$nonopt ;;
830 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
831 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
832 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
833 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
834 echo "$ac_t""$host" 1>&6
836 # Extract the first word of "gcc", so it can be a program name with args.
837 set dummy gcc; ac_word=$2
838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
839 echo "configure:851: checking for $ac_word" >&5
840 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
841 echo $ac_n "(cached) $ac_c" 1>&6
843 if test -n "$CC"; then
844 ac_cv_prog_CC="$CC" # Let the user override the test.
846 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
848 for ac_dir in $ac_dummy; do
849 test -z "$ac_dir" && ac_dir=.
850 if test -f $ac_dir/$ac_word; then
859 if test -n "$CC"; then
860 echo "$ac_t""$CC" 1>&6
862 echo "$ac_t""no" 1>&6
865 if test -z "$CC"; then
866 # Extract the first word of "cc", so it can be a program name with args.
867 set dummy cc; ac_word=$2
868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
869 echo "configure:881: checking for $ac_word" >&5
870 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
871 echo $ac_n "(cached) $ac_c" 1>&6
873 if test -n "$CC"; then
874 ac_cv_prog_CC="$CC" # Let the user override the test.
876 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
879 for ac_dir in $ac_dummy; do
880 test -z "$ac_dir" && ac_dir=.
881 if test -f $ac_dir/$ac_word; then
882 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
891 if test $ac_prog_rejected = yes; then
892 # We found a bogon in the path, so make sure we never use it.
893 set dummy $ac_cv_prog_CC
895 if test $# -gt 0; then
896 # We chose a different compiler from the bogus one.
897 # However, it has the same basename, so the bogon will be chosen
898 # first if we set CC to just the basename; use the full file name.
900 set dummy "$ac_dir/$ac_word" "$@"
908 if test -n "$CC"; then
909 echo "$ac_t""$CC" 1>&6
911 echo "$ac_t""no" 1>&6
914 if test -z "$CC"; then
917 # Extract the first word of "cl", so it can be a program name with args.
918 set dummy cl; ac_word=$2
919 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
920 echo "configure:932: checking for $ac_word" >&5
921 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
922 echo $ac_n "(cached) $ac_c" 1>&6
924 if test -n "$CC"; then
925 ac_cv_prog_CC="$CC" # Let the user override the test.
927 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
929 for ac_dir in $ac_dummy; do
930 test -z "$ac_dir" && ac_dir=.
931 if test -f $ac_dir/$ac_word; then
940 if test -n "$CC"; then
941 echo "$ac_t""$CC" 1>&6
943 echo "$ac_t""no" 1>&6
948 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
951 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
952 echo "configure:964: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
955 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
956 ac_cpp='$CPP $CPPFLAGS'
957 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
958 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
959 cross_compiling=$ac_cv_prog_cc_cross
961 cat > conftest.$ac_ext << EOF
963 #line 975 "configure"
964 #include "confdefs.h"
968 if { (eval echo configure:980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
969 ac_cv_prog_cc_works=yes
970 # If we can't run a trivial program, we are probably using a cross compiler.
971 if (./conftest; exit) 2>/dev/null; then
972 ac_cv_prog_cc_cross=no
974 ac_cv_prog_cc_cross=yes
977 echo "configure: failed program was:" >&5
978 cat conftest.$ac_ext >&5
979 ac_cv_prog_cc_works=no
983 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
984 ac_cpp='$CPP $CPPFLAGS'
985 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
986 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
987 cross_compiling=$ac_cv_prog_cc_cross
989 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
990 if test $ac_cv_prog_cc_works = no; then
991 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
993 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
994 echo "configure:1006: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
995 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
996 cross_compiling=$ac_cv_prog_cc_cross
998 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
999 echo "configure:1011: checking whether we are using GNU C" >&5
1000 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1001 echo $ac_n "(cached) $ac_c" 1>&6
1003 cat > conftest.c <<EOF
1008 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1015 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1017 if test $ac_cv_prog_gcc = yes; then
1023 ac_test_CFLAGS="${CFLAGS+set}"
1024 ac_save_CFLAGS="$CFLAGS"
1026 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1027 echo "configure:1039: checking whether ${CC-cc} accepts -g" >&5
1028 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1029 echo $ac_n "(cached) $ac_c" 1>&6
1031 echo 'void f(){}' > conftest.c
1032 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1041 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1042 if test "$ac_test_CFLAGS" = set; then
1043 CFLAGS="$ac_save_CFLAGS"
1044 elif test $ac_cv_prog_cc_g = yes; then
1045 if test "$GCC" = yes; then
1051 if test "$GCC" = yes; then
1059 if test -z "$GCC"; then
1060 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
1061 echo "configure:1073: checking how to request ANSI compilation" >&5
1064 echo "$ac_t""HPUX: adding -Ae" 1>&6
1068 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
1069 CC="$CC -qlanglvl=ansi -qhalt=e"
1073 echo "$ac_t""DEC: adding -std1" 1>&6
1078 echo "$ac_t""no idea" 1>&6
1083 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
1084 echo "configure:1096: checking whether the compiler works on ANSI C" >&5
1085 if test "$cross_compiling" = yes; then
1086 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1088 cat > conftest.$ac_ext <<EOF
1089 #line 1101 "configure"
1090 #include "confdefs.h"
1091 main(int ac, char **av) { return 0; }
1093 if { (eval echo configure:1105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1095 echo "$ac_t""yes" 1>&6
1097 echo "configure: failed program was:" >&5
1098 cat conftest.$ac_ext >&5
1100 echo "$ac_t""no" 1>&6
1101 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1107 if test -n "$GCC"; then
1108 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
1109 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
1112 *-irix5* |*-irix6.0-3* )
1113 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1114 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1117 # if test -z "$GCC"; then
1118 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1119 # CC="$CC -migrate -w0 -verbose -warnprotos"
1125 if test -n "$GCC"; then
1126 if test -n "$GCC"; then
1127 echo $ac_n "checking whether gcc accepts -std""... $ac_c" 1>&6
1128 echo "configure:1140: checking whether gcc accepts -std" >&5
1129 if eval "test \"`echo '$''{'ac_cv_gcc_accepts_std'+set}'`\" = set"; then
1130 echo $ac_n "(cached) $ac_c" 1>&6
1132 if ( gcc -E -std=c89 - </dev/null 2>&1 >/dev/null | \
1133 grep unrecognized >/dev/null ); then
1134 ac_cv_gcc_accepts_std=no
1136 ac_cv_gcc_accepts_std=yes
1140 echo "$ac_t""$ac_cv_gcc_accepts_std" 1>&6
1141 ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
1144 echo "$ac_t""Disabling C++ comments in ANSI C code." 1>&6
1146 # The reason that // comments are banned from xscreensaver is that gcc is
1147 # basically the only compiler in the world that supports them in C code.
1148 # All other vendors support them only in their C++ compilers, not in their
1149 # ANSI C compilers. This means that it's a portability problem: every time
1150 # these comments have snuck into the xscreensaver source code, I've gotten
1151 # complaints about it the next day. So we turn off support for them in gcc
1152 # as well to prevent them from accidentially slipping in.
1154 if test "$ac_gcc_accepts_std" = yes ; then
1156 # -std=c89 defines __STRICT_ANSI__, which we don't want.
1157 # (That appears to be the only additional preprocessor symbol
1158 # it defines, in addition to the syntax changes it makes.)
1160 # -std=gnu89 is no good, because // comments were a GNU extension
1161 # before they were in the ANSI C 99 spec... (gcc 2.96 permits //
1162 # with -std=gnu89 but not with -std=c89.)
1164 CC="$CC -std=c89 -U__STRICT_ANSI__"
1167 CC="$CC -Wp,-lang-c89"
1171 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1172 echo "configure:1184: checking how to run the C preprocessor" >&5
1173 # On Suns, sometimes $CPP names a directory.
1174 if test -n "$CPP" && test -d "$CPP"; then
1177 if test -z "$CPP"; then
1178 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1179 echo $ac_n "(cached) $ac_c" 1>&6
1181 # This must be in double quotes, not single quotes, because CPP may get
1182 # substituted into the Makefile and "${CC-cc}" will confuse make.
1184 # On the NeXT, cc -E runs the code through the compiler's parser,
1185 # not just through cpp.
1186 cat > conftest.$ac_ext <<EOF
1187 #line 1199 "configure"
1188 #include "confdefs.h"
1192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1193 { (eval echo configure:1205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1195 if test -z "$ac_err"; then
1199 echo "configure: failed program was:" >&5
1200 cat conftest.$ac_ext >&5
1202 CPP="${CC-cc} -E -traditional-cpp"
1203 cat > conftest.$ac_ext <<EOF
1204 #line 1216 "configure"
1205 #include "confdefs.h"
1209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1210 { (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1212 if test -z "$ac_err"; then
1216 echo "configure: failed program was:" >&5
1217 cat conftest.$ac_ext >&5
1219 CPP="${CC-cc} -nologo -E"
1220 cat > conftest.$ac_ext <<EOF
1221 #line 1233 "configure"
1222 #include "confdefs.h"
1226 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1227 { (eval echo configure:1239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1228 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1229 if test -z "$ac_err"; then
1233 echo "configure: failed program was:" >&5
1234 cat conftest.$ac_ext >&5
1243 ac_cv_prog_CPP="$CPP"
1245 CPP="$ac_cv_prog_CPP"
1247 ac_cv_prog_CPP="$CPP"
1249 echo "$ac_t""$CPP" 1>&6
1251 echo $ac_n "checking for working const""... $ac_c" 1>&6
1252 echo "configure:1264: checking for working const" >&5
1253 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1254 echo $ac_n "(cached) $ac_c" 1>&6
1256 cat > conftest.$ac_ext <<EOF
1257 #line 1269 "configure"
1258 #include "confdefs.h"
1262 /* Ultrix mips cc rejects this. */
1263 typedef int charset[2]; const charset x;
1264 /* SunOS 4.1.1 cc rejects this. */
1265 char const *const *ccp;
1267 /* NEC SVR4.0.2 mips cc rejects this. */
1268 struct point {int x, y;};
1269 static struct point const zero = {0,0};
1270 /* AIX XL C 1.02.0.0 rejects this.
1271 It does not let you subtract one const X* pointer from another in an arm
1272 of an if-expression whose if-part is not a constant expression */
1273 const char *g = "string";
1274 ccp = &g + (g ? g-g : 0);
1275 /* HPUX 7.0 cc rejects these. */
1278 ccp = (char const *const *) p;
1279 { /* SCO 3.2v4 cc rejects this. */
1281 char const *s = 0 ? (char *) 0 : (char const *) 0;
1285 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1287 const int *foo = &x[0];
1290 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1291 typedef const int *iptr;
1295 { /* AIX XL C 1.02.0.0 rejects this saying
1296 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1297 struct s { int j; const int *ap[3]; };
1298 struct s *b; b->j = 5;
1300 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1306 if { (eval echo configure:1318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1310 echo "configure: failed program was:" >&5
1311 cat conftest.$ac_ext >&5
1318 echo "$ac_t""$ac_cv_c_const" 1>&6
1319 if test $ac_cv_c_const = no; then
1320 cat >> confdefs.h <<\EOF
1326 echo $ac_n "checking for inline""... $ac_c" 1>&6
1327 echo "configure:1339: checking for inline" >&5
1328 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1329 echo $ac_n "(cached) $ac_c" 1>&6
1332 for ac_kw in inline __inline__ __inline; do
1333 cat > conftest.$ac_ext <<EOF
1334 #line 1346 "configure"
1335 #include "confdefs.h"
1341 if { (eval echo configure:1353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1343 ac_cv_c_inline=$ac_kw; break
1345 echo "configure: failed program was:" >&5
1346 cat conftest.$ac_ext >&5
1353 echo "$ac_t""$ac_cv_c_inline" 1>&6
1354 case "$ac_cv_c_inline" in
1356 no) cat >> confdefs.h <<\EOF
1360 *) cat >> confdefs.h <<EOF
1361 #define inline $ac_cv_c_inline
1366 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
1367 echo $ac_n "checking for bc""... $ac_c" 1>&6
1368 echo "configure:1380: checking for bc" >&5
1369 if test "$ac_bc_result" = "15" ; then
1370 echo "$ac_t""yes" 1>&6
1372 echo "$ac_t""no" 1>&6
1374 { echo "configure: error: Your system doesn't have \"bc\", which has been a standard
1375 part of Unix since the 1970s. Come back when your vendor
1376 has grown a clue." 1>&2; exit 1; }
1380 # stuff for Makefiles
1381 # Find a good install program. We prefer a C program (faster),
1382 # so one script is as good as another. But avoid the broken or
1383 # incompatible versions:
1384 # SysV /etc/install, /usr/sbin/install
1385 # SunOS /usr/etc/install
1386 # IRIX /sbin/install
1388 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1389 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1390 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1391 # ./install, which can be erroneously created by make from ./install.sh.
1392 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1393 echo "configure:1405: checking for a BSD compatible install" >&5
1394 if test -z "$INSTALL"; then
1395 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1396 echo $ac_n "(cached) $ac_c" 1>&6
1398 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1399 for ac_dir in $PATH; do
1400 # Account for people who put trailing slashes in PATH elements.
1402 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1404 # OSF1 and SCO ODT 3.0 have their own names for install.
1405 # Don't use installbsd from OSF since it installs stuff as root
1407 for ac_prog in ginstall scoinst install; do
1408 if test -f $ac_dir/$ac_prog; then
1409 if test $ac_prog = install &&
1410 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1411 # AIX install. It has an incompatible calling convention.
1414 ac_cv_path_install="$ac_dir/$ac_prog -c"
1425 if test "${ac_cv_path_install+set}" = set; then
1426 INSTALL="$ac_cv_path_install"
1428 # As a last resort, use the slow shell script. We don't cache a
1429 # path for INSTALL within a source directory, because that will
1430 # break other packages using the cache if that directory is
1431 # removed, or if the path is relative.
1432 INSTALL="$ac_install_sh"
1435 echo "$ac_t""$INSTALL" 1>&6
1437 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1438 # It thinks the first close brace ends the variable substitution.
1439 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1441 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1443 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1445 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1446 echo "configure:1458: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1447 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1448 echo $ac_n "(cached) $ac_c" 1>&6
1450 ac_cv_install_d_creates_dirs=no
1452 if mkdir conftestdir; then
1454 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1455 if test -d dir1/dir2/. ; then
1456 ac_cv_install_d_creates_dirs=yes
1464 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1466 if test "$ac_cv_install_d_creates_dirs" = no ; then
1467 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1468 echo "configure:1480: checking whether \"mkdir -p\" creates intermediate directories" >&5
1469 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1470 echo $ac_n "(cached) $ac_c" 1>&6
1472 ac_cv_mkdir_p_creates_dirs=no
1474 if mkdir conftestdir; then
1476 mkdir -p dir1/dir2 >&- 2>&-
1477 if test -d dir1/dir2/. ; then
1478 ac_cv_mkdir_p_creates_dirs=yes
1486 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1489 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1490 INSTALL_DIRS='${INSTALL} -d'
1491 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1492 INSTALL_DIRS='mkdir -p'
1495 INSTALL_DIRS='${INSTALL} -d'
1498 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1499 echo "configure:1511: checking whether ${MAKE-make} sets \${MAKE}" >&5
1500 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1501 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1502 echo $ac_n "(cached) $ac_c" 1>&6
1504 cat > conftestmake <<\EOF
1506 @echo 'ac_maketemp="${MAKE}"'
1508 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1509 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1510 if test -n "$ac_maketemp"; then
1511 eval ac_cv_prog_make_${ac_make}_set=yes
1513 eval ac_cv_prog_make_${ac_make}_set=no
1517 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1518 echo "$ac_t""yes" 1>&6
1521 echo "$ac_t""no" 1>&6
1522 SET_MAKE="MAKE=${MAKE-make}"
1527 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1528 echo "configure:1540: checking for ANSI C header files" >&5
1529 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1530 echo $ac_n "(cached) $ac_c" 1>&6
1532 cat > conftest.$ac_ext <<EOF
1533 #line 1545 "configure"
1534 #include "confdefs.h"
1540 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1541 { (eval echo configure:1553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1542 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1543 if test -z "$ac_err"; then
1545 ac_cv_header_stdc=yes
1548 echo "configure: failed program was:" >&5
1549 cat conftest.$ac_ext >&5
1551 ac_cv_header_stdc=no
1555 if test $ac_cv_header_stdc = yes; then
1556 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1557 cat > conftest.$ac_ext <<EOF
1558 #line 1570 "configure"
1559 #include "confdefs.h"
1562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1563 egrep "memchr" >/dev/null 2>&1; then
1567 ac_cv_header_stdc=no
1573 if test $ac_cv_header_stdc = yes; then
1574 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1575 cat > conftest.$ac_ext <<EOF
1576 #line 1588 "configure"
1577 #include "confdefs.h"
1580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1581 egrep "free" >/dev/null 2>&1; then
1585 ac_cv_header_stdc=no
1591 if test $ac_cv_header_stdc = yes; then
1592 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1593 if test "$cross_compiling" = yes; then
1596 cat > conftest.$ac_ext <<EOF
1597 #line 1609 "configure"
1598 #include "confdefs.h"
1600 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1601 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1602 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1603 int main () { int i; for (i = 0; i < 256; i++)
1604 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1608 if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1612 echo "configure: failed program was:" >&5
1613 cat conftest.$ac_ext >&5
1615 ac_cv_header_stdc=no
1623 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1624 if test $ac_cv_header_stdc = yes; then
1625 cat >> confdefs.h <<\EOF
1626 #define STDC_HEADERS 1
1631 for ac_hdr in unistd.h
1633 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1634 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1635 echo "configure:1647: checking for $ac_hdr" >&5
1636 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1637 echo $ac_n "(cached) $ac_c" 1>&6
1639 cat > conftest.$ac_ext <<EOF
1640 #line 1652 "configure"
1641 #include "confdefs.h"
1644 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1645 { (eval echo configure:1657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1646 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1647 if test -z "$ac_err"; then
1649 eval "ac_cv_header_$ac_safe=yes"
1652 echo "configure: failed program was:" >&5
1653 cat conftest.$ac_ext >&5
1655 eval "ac_cv_header_$ac_safe=no"
1659 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1660 echo "$ac_t""yes" 1>&6
1661 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1662 cat >> confdefs.h <<EOF
1663 #define $ac_tr_hdr 1
1667 echo "$ac_t""no" 1>&6
1671 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1672 echo "configure:1684: checking for mode_t" >&5
1673 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1674 echo $ac_n "(cached) $ac_c" 1>&6
1676 cat > conftest.$ac_ext <<EOF
1677 #line 1689 "configure"
1678 #include "confdefs.h"
1679 #include <sys/types.h>
1685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1686 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1688 ac_cv_type_mode_t=yes
1691 ac_cv_type_mode_t=no
1696 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1697 if test $ac_cv_type_mode_t = no; then
1698 cat >> confdefs.h <<\EOF
1704 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1705 echo "configure:1717: checking for pid_t" >&5
1706 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1707 echo $ac_n "(cached) $ac_c" 1>&6
1709 cat > conftest.$ac_ext <<EOF
1710 #line 1722 "configure"
1711 #include "confdefs.h"
1712 #include <sys/types.h>
1718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1719 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1721 ac_cv_type_pid_t=yes
1729 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1730 if test $ac_cv_type_pid_t = no; then
1731 cat >> confdefs.h <<\EOF
1737 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1738 echo "configure:1750: checking for size_t" >&5
1739 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1740 echo $ac_n "(cached) $ac_c" 1>&6
1742 cat > conftest.$ac_ext <<EOF
1743 #line 1755 "configure"
1744 #include "confdefs.h"
1745 #include <sys/types.h>
1751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1752 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1754 ac_cv_type_size_t=yes
1757 ac_cv_type_size_t=no
1762 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1763 if test $ac_cv_type_size_t = no; then
1764 cat >> confdefs.h <<\EOF
1765 #define size_t unsigned
1770 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1771 echo "configure:1783: checking return type of signal handlers" >&5
1772 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1773 echo $ac_n "(cached) $ac_c" 1>&6
1775 cat > conftest.$ac_ext <<EOF
1776 #line 1788 "configure"
1777 #include "confdefs.h"
1778 #include <sys/types.h>
1784 extern "C" void (*signal (int, void (*)(int)))(int);
1786 void (*signal ()) ();
1793 if { (eval echo configure:1805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1795 ac_cv_type_signal=void
1797 echo "configure: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1800 ac_cv_type_signal=int
1805 echo "$ac_t""$ac_cv_type_signal" 1>&6
1806 cat >> confdefs.h <<EOF
1807 #define RETSIGTYPE $ac_cv_type_signal
1811 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1812 echo "configure:1824: checking whether time.h and sys/time.h may both be included" >&5
1813 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1814 echo $ac_n "(cached) $ac_c" 1>&6
1816 cat > conftest.$ac_ext <<EOF
1817 #line 1829 "configure"
1818 #include "confdefs.h"
1819 #include <sys/types.h>
1820 #include <sys/time.h>
1826 if { (eval echo configure:1838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1828 ac_cv_header_time=yes
1830 echo "configure: failed program was:" >&5
1831 cat conftest.$ac_ext >&5
1833 ac_cv_header_time=no
1838 echo "$ac_t""$ac_cv_header_time" 1>&6
1839 if test $ac_cv_header_time = yes; then
1840 cat >> confdefs.h <<\EOF
1841 #define TIME_WITH_SYS_TIME 1
1846 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1847 echo "configure:1859: checking for sys/wait.h that is POSIX.1 compatible" >&5
1848 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1849 echo $ac_n "(cached) $ac_c" 1>&6
1851 cat > conftest.$ac_ext <<EOF
1852 #line 1864 "configure"
1853 #include "confdefs.h"
1854 #include <sys/types.h>
1855 #include <sys/wait.h>
1857 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1860 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1865 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1868 if { (eval echo configure:1880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1870 ac_cv_header_sys_wait_h=yes
1872 echo "configure: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
1875 ac_cv_header_sys_wait_h=no
1880 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1881 if test $ac_cv_header_sys_wait_h = yes; then
1882 cat >> confdefs.h <<\EOF
1883 #define HAVE_SYS_WAIT_H 1
1889 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1891 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1892 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1893 echo "configure:1905: checking for $ac_hdr that defines DIR" >&5
1894 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1895 echo $ac_n "(cached) $ac_c" 1>&6
1897 cat > conftest.$ac_ext <<EOF
1898 #line 1910 "configure"
1899 #include "confdefs.h"
1900 #include <sys/types.h>
1906 if { (eval echo configure:1918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1908 eval "ac_cv_header_dirent_$ac_safe=yes"
1910 echo "configure: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
1913 eval "ac_cv_header_dirent_$ac_safe=no"
1917 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1918 echo "$ac_t""yes" 1>&6
1919 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1920 cat >> confdefs.h <<EOF
1921 #define $ac_tr_hdr 1
1923 ac_header_dirent=$ac_hdr; break
1925 echo "$ac_t""no" 1>&6
1928 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1929 if test $ac_header_dirent = dirent.h; then
1930 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1931 echo "configure:1943: checking for opendir in -ldir" >&5
1932 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1933 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1934 echo $ac_n "(cached) $ac_c" 1>&6
1936 ac_save_LIBS="$LIBS"
1938 cat > conftest.$ac_ext <<EOF
1939 #line 1951 "configure"
1940 #include "confdefs.h"
1941 /* Override any gcc2 internal prototype to avoid an error. */
1942 /* We use char because int might match the return type of a gcc2
1943 builtin and then its argument prototype would still apply. */
1950 if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1952 eval "ac_cv_lib_$ac_lib_var=yes"
1954 echo "configure: failed program was:" >&5
1955 cat conftest.$ac_ext >&5
1957 eval "ac_cv_lib_$ac_lib_var=no"
1960 LIBS="$ac_save_LIBS"
1963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1964 echo "$ac_t""yes" 1>&6
1967 echo "$ac_t""no" 1>&6
1971 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1972 echo "configure:1984: checking for opendir in -lx" >&5
1973 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1974 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1975 echo $ac_n "(cached) $ac_c" 1>&6
1977 ac_save_LIBS="$LIBS"
1979 cat > conftest.$ac_ext <<EOF
1980 #line 1992 "configure"
1981 #include "confdefs.h"
1982 /* Override any gcc2 internal prototype to avoid an error. */
1983 /* We use char because int might match the return type of a gcc2
1984 builtin and then its argument prototype would still apply. */
1991 if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1993 eval "ac_cv_lib_$ac_lib_var=yes"
1995 echo "configure: failed program was:" >&5
1996 cat conftest.$ac_ext >&5
1998 eval "ac_cv_lib_$ac_lib_var=no"
2001 LIBS="$ac_save_LIBS"
2004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2005 echo "$ac_t""yes" 1>&6
2008 echo "$ac_t""no" 1>&6
2013 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
2014 echo "configure:2026: checking how to call gettimeofday" >&5
2015 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
2016 echo $ac_n "(cached) $ac_c" 1>&6
2018 cat > conftest.$ac_ext <<EOF
2019 #line 2031 "configure"
2020 #include "confdefs.h"
2022 #include <sys/time.h>
2024 struct timeval tv; struct timezone tzp;
2025 gettimeofday(&tv, &tzp);
2028 if { (eval echo configure:2040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2030 ac_gettimeofday_args=2
2032 echo "configure: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2035 cat > conftest.$ac_ext <<EOF
2036 #line 2048 "configure"
2037 #include "confdefs.h"
2039 #include <sys/time.h>
2041 struct timeval tv; gettimeofday(&tv);
2044 if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2046 ac_gettimeofday_args=1
2048 echo "configure: failed program was:" >&5
2049 cat conftest.$ac_ext >&5
2051 ac_gettimeofday_args=0
2056 ac_cv_gettimeofday_args=$ac_gettimeofday_args
2059 ac_gettimeofday_args=$ac_cv_gettimeofday_args
2060 if test "$ac_gettimeofday_args" = 1 ; then
2061 cat >> confdefs.h <<\EOF
2062 #define HAVE_GETTIMEOFDAY 1
2065 echo "$ac_t""one argument" 1>&6
2066 elif test "$ac_gettimeofday_args" = 2 ; then
2067 cat >> confdefs.h <<\EOF
2068 #define HAVE_GETTIMEOFDAY 1
2071 cat >> confdefs.h <<\EOF
2072 #define GETTIMEOFDAY_TWO_ARGS 1
2075 echo "$ac_t""two arguments" 1>&6
2077 echo "$ac_t""unknown" 1>&6
2080 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
2082 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2083 echo "configure:2095: checking for $ac_func" >&5
2084 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2087 cat > conftest.$ac_ext <<EOF
2088 #line 2100 "configure"
2089 #include "confdefs.h"
2090 /* System header to define __stub macros and hopefully few prototypes,
2091 which can conflict with char $ac_func(); below. */
2093 /* Override any gcc2 internal prototype to avoid an error. */
2094 /* We use char because int might match the return type of a gcc2
2095 builtin and then its argument prototype would still apply. */
2100 /* The GNU C library defines this for functions which it implements
2101 to always fail with ENOSYS. Some functions are actually named
2102 something starting with __ and the normal name is an alias. */
2103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2111 if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2113 eval "ac_cv_func_$ac_func=yes"
2115 echo "configure: failed program was:" >&5
2116 cat conftest.$ac_ext >&5
2118 eval "ac_cv_func_$ac_func=no"
2123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2124 echo "$ac_t""yes" 1>&6
2125 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2126 cat >> confdefs.h <<EOF
2127 #define $ac_tr_func 1
2131 echo "$ac_t""no" 1>&6
2136 for ac_func in sigaction syslog realpath
2138 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2139 echo "configure:2151: checking for $ac_func" >&5
2140 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2141 echo $ac_n "(cached) $ac_c" 1>&6
2143 cat > conftest.$ac_ext <<EOF
2144 #line 2156 "configure"
2145 #include "confdefs.h"
2146 /* System header to define __stub macros and hopefully few prototypes,
2147 which can conflict with char $ac_func(); below. */
2149 /* Override any gcc2 internal prototype to avoid an error. */
2150 /* We use char because int might match the return type of a gcc2
2151 builtin and then its argument prototype would still apply. */
2156 /* The GNU C library defines this for functions which it implements
2157 to always fail with ENOSYS. Some functions are actually named
2158 something starting with __ and the normal name is an alias. */
2159 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2167 if { (eval echo configure:2179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2169 eval "ac_cv_func_$ac_func=yes"
2171 echo "configure: failed program was:" >&5
2172 cat conftest.$ac_ext >&5
2174 eval "ac_cv_func_$ac_func=no"
2179 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2180 echo "$ac_t""yes" 1>&6
2181 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2182 cat >> confdefs.h <<EOF
2183 #define $ac_tr_func 1
2187 echo "$ac_t""no" 1>&6
2191 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2192 echo "configure:2204: checking for struct icmp" >&5
2193 if eval "test \"`echo '$''{'ac_cv_have_icmp'+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;
2223 i.icmp_type = ICMP_ECHO;
2228 si.sin_family = AF_INET;
2229 #if defined(__DECC) || defined(_IP_VHL)
2237 if { (eval echo configure:2249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2241 echo "configure: failed program was:" >&5
2242 cat conftest.$ac_ext >&5
2249 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2250 if test "$ac_cv_have_icmp" = yes ; then
2251 cat >> confdefs.h <<\EOF
2256 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2257 echo "configure:2269: checking for struct icmphdr" >&5
2258 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2259 echo $ac_n "(cached) $ac_c" 1>&6
2261 cat > conftest.$ac_ext <<EOF
2262 #line 2274 "configure"
2263 #include "confdefs.h"
2271 #include <sys/types.h>
2272 #include <sys/time.h>
2273 #include <sys/ipc.h>
2274 #include <sys/shm.h>
2275 #include <sys/socket.h>
2276 #include <netinet/in_systm.h>
2277 #include <netinet/in.h>
2278 #include <netinet/ip.h>
2279 #include <netinet/ip_icmp.h>
2280 #include <netinet/udp.h>
2281 #include <arpa/inet.h>
2286 struct sockaddr_in si;
2292 i.un.echo.sequence = 0;
2293 si.sin_family = AF_INET;
2297 if { (eval echo configure:2309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2299 ac_cv_have_icmphdr=yes
2301 echo "configure: failed program was:" >&5
2302 cat conftest.$ac_ext >&5
2304 ac_cv_have_icmphdr=no
2309 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2310 if test "$ac_cv_have_icmphdr" = yes ; then
2311 cat >> confdefs.h <<\EOF
2312 #define HAVE_ICMPHDR 1
2316 for ac_hdr in crypt.h sys/select.h
2318 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2319 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2320 echo "configure:2332: checking for $ac_hdr" >&5
2321 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2322 echo $ac_n "(cached) $ac_c" 1>&6
2324 cat > conftest.$ac_ext <<EOF
2325 #line 2337 "configure"
2326 #include "confdefs.h"
2329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2330 { (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2332 if test -z "$ac_err"; then
2334 eval "ac_cv_header_$ac_safe=yes"
2337 echo "configure: failed program was:" >&5
2338 cat conftest.$ac_ext >&5
2340 eval "ac_cv_header_$ac_safe=no"
2344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2345 echo "$ac_t""yes" 1>&6
2346 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2347 cat >> confdefs.h <<EOF
2348 #define $ac_tr_hdr 1
2352 echo "$ac_t""no" 1>&6
2356 for ac_prog in perl5 perl
2358 # Extract the first word of "$ac_prog", so it can be a program name with args.
2359 set dummy $ac_prog; ac_word=$2
2360 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2361 echo "configure:2373: checking for $ac_word" >&5
2362 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2363 echo $ac_n "(cached) $ac_c" 1>&6
2367 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2370 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2373 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2375 for ac_dir in $ac_dummy; do
2376 test -z "$ac_dir" && ac_dir=.
2377 if test -f $ac_dir/$ac_word; then
2378 ac_cv_path_PERL="$ac_dir/$ac_word"
2386 PERL="$ac_cv_path_PERL"
2387 if test -n "$PERL"; then
2388 echo "$ac_t""$PERL" 1>&6
2390 echo "$ac_t""no" 1>&6
2393 test -n "$PERL" && break
2396 if test -z "$PERL" ; then
2399 echo $ac_n "checking perl version""... $ac_c" 1>&6
2400 echo "configure:2412: checking perl version" >&5
2401 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2402 echo $ac_n "(cached) $ac_c" 1>&6
2404 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2407 echo "$ac_t""$ac_cv_perl_version" 1>&6
2408 PERL_VERSION=$ac_cv_perl_version
2412 if test -z "$PERL" ; then
2413 # don't let it be blank...
2414 PERL=/usr/local/bin/perl5
2417 # If we find X, set shell vars x_includes and x_libraries to the
2418 # paths, otherwise set no_x=yes.
2419 # Uses ac_ vars as temps to allow command line to override cache and checks.
2420 # --without-x overrides everything else, but does not touch the cache.
2421 echo $ac_n "checking for X""... $ac_c" 1>&6
2422 echo "configure:2434: checking for X" >&5
2424 # Check whether --with-x or --without-x was given.
2425 if test "${with_x+set}" = set; then
2430 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2431 if test "x$with_x" = xno; then
2432 # The user explicitly disabled X.
2435 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2436 # Both variables are already set.
2439 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2440 echo $ac_n "(cached) $ac_c" 1>&6
2442 # One or both of the vars are not set, and there is no cached value.
2443 ac_x_includes=NO ac_x_libraries=NO
2445 if mkdir conftestdir; then
2447 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2448 cat > Imakefile <<'EOF'
2450 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2452 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2453 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2454 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2455 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2456 for ac_extension in a so sl; do
2457 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2458 test -f $ac_im_libdir/libX11.$ac_extension; then
2459 ac_im_usrlibdir=$ac_im_libdir; break
2462 # Screen out bogus values from the imake configuration. They are
2463 # bogus both because they are the default anyway, and because
2464 # using them would break gcc on systems where it needs fixed includes.
2465 case "$ac_im_incroot" in
2467 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2469 case "$ac_im_usrlibdir" in
2471 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2478 if test "$ac_x_includes" = NO; then
2479 # Guess where to find include files, by looking for this one X11 .h file.
2480 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2482 # First, try using that file with no special directory specified.
2483 cat > conftest.$ac_ext <<EOF
2484 #line 2496 "configure"
2485 #include "confdefs.h"
2486 #include <$x_direct_test_include>
2488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2489 { (eval echo configure:2501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2491 if test -z "$ac_err"; then
2493 # We can compile using X headers with no special include directory.
2497 echo "configure: failed program was:" >&5
2498 cat conftest.$ac_ext >&5
2500 # Look for the header file in a standard set of common directories.
2501 # Check X11 before X11Rn because it is often a symlink to the current release.
2504 /usr/X11R6/include \
2505 /usr/X11R5/include \
2506 /usr/X11R4/include \
2509 /usr/include/X11R6 \
2510 /usr/include/X11R5 \
2511 /usr/include/X11R4 \
2513 /usr/local/X11/include \
2514 /usr/local/X11R6/include \
2515 /usr/local/X11R5/include \
2516 /usr/local/X11R4/include \
2518 /usr/local/include/X11 \
2519 /usr/local/include/X11R6 \
2520 /usr/local/include/X11R5 \
2521 /usr/local/include/X11R4 \
2525 /usr/XFree86/include/X11 \
2528 /usr/local/include \
2529 /usr/unsupported/include \
2530 /usr/athena/include \
2531 /usr/local/x11r5/include \
2532 /usr/lpp/Xamples/include \
2534 /usr/openwin/include \
2535 /usr/openwin/share/include \
2538 if test -r "$ac_dir/$x_direct_test_include"; then
2539 ac_x_includes=$ac_dir
2545 fi # $ac_x_includes = NO
2547 if test "$ac_x_libraries" = NO; then
2548 # Check for the libraries.
2550 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2551 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2553 # See if we find them without any special options.
2554 # Don't add to $LIBS permanently.
2555 ac_save_LIBS="$LIBS"
2556 LIBS="-l$x_direct_test_library $LIBS"
2557 cat > conftest.$ac_ext <<EOF
2558 #line 2570 "configure"
2559 #include "confdefs.h"
2562 ${x_direct_test_function}()
2565 if { (eval echo configure:2577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2567 LIBS="$ac_save_LIBS"
2568 # We can link X programs with no special library path.
2571 echo "configure: failed program was:" >&5
2572 cat conftest.$ac_ext >&5
2574 LIBS="$ac_save_LIBS"
2575 # First see if replacing the include by lib works.
2576 # Check X11 before X11Rn because it is often a symlink to the current release.
2577 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2588 /usr/local/X11/lib \
2589 /usr/local/X11R6/lib \
2590 /usr/local/X11R5/lib \
2591 /usr/local/X11R4/lib \
2593 /usr/local/lib/X11 \
2594 /usr/local/lib/X11R6 \
2595 /usr/local/lib/X11R5 \
2596 /usr/local/lib/X11R4 \
2600 /usr/XFree86/lib/X11 \
2604 /usr/unsupported/lib \
2606 /usr/local/x11r5/lib \
2607 /usr/lpp/Xamples/lib \
2611 /usr/openwin/share/lib \
2614 for ac_extension in a so sl; do
2615 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2616 ac_x_libraries=$ac_dir
2623 fi # $ac_x_libraries = NO
2625 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2626 # Didn't find X anywhere. Cache the known absence of X.
2627 ac_cv_have_x="have_x=no"
2629 # Record where we found X for the cache.
2630 ac_cv_have_x="have_x=yes \
2631 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2635 eval "$ac_cv_have_x"
2638 if test "$have_x" != yes; then
2639 echo "$ac_t""$have_x" 1>&6
2642 # If each of the values was on the command line, it overrides each guess.
2643 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2644 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2645 # Update the cache value to reflect the command line values.
2646 ac_cv_have_x="have_x=yes \
2647 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2648 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2651 if test "$no_x" = yes; then
2652 # Not all programs may use this symbol, but it does not hurt to define it.
2653 cat >> confdefs.h <<\EOF
2654 #define X_DISPLAY_MISSING 1
2657 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2659 if test -n "$x_includes"; then
2660 X_CFLAGS="$X_CFLAGS -I$x_includes"
2663 # It would also be nice to do this for all -L options, not just this one.
2664 if test -n "$x_libraries"; then
2665 X_LIBS="$X_LIBS -L$x_libraries"
2666 # For Solaris; some versions of Sun CC require a space after -R and
2667 # others require no space. Words are not sufficient . . . .
2668 case "`(uname -sr) 2>/dev/null`" in
2670 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2671 echo "configure:2683: checking whether -R must be followed by a space" >&5
2672 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2673 cat > conftest.$ac_ext <<EOF
2674 #line 2686 "configure"
2675 #include "confdefs.h"
2681 if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2685 echo "configure: failed program was:" >&5
2686 cat conftest.$ac_ext >&5
2691 if test $ac_R_nospace = yes; then
2692 echo "$ac_t""no" 1>&6
2693 X_LIBS="$X_LIBS -R$x_libraries"
2695 LIBS="$ac_xsave_LIBS -R $x_libraries"
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2709 "configure"
2698 #include "confdefs.h"
2704 if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2708 echo "configure: failed program was:" >&5
2709 cat conftest.$ac_ext >&5
2714 if test $ac_R_space = yes; then
2715 echo "$ac_t""yes" 1>&6
2716 X_LIBS="$X_LIBS -R $x_libraries"
2718 echo "$ac_t""neither works" 1>&6
2721 LIBS="$ac_xsave_LIBS"
2725 # Check for system-dependent libraries X programs must link with.
2726 # Do this before checking for the system-independent R6 libraries
2727 # (-lICE), since we may need -lsocket or whatever for X linking.
2729 if test "$ISC" = yes; then
2730 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2732 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2733 # libraries were built with DECnet support. And karl@cs.umb.edu says
2734 # the Alpha needs dnet_stub (dnet does not exist).
2735 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2736 echo "configure:2748: checking for dnet_ntoa in -ldnet" >&5
2737 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2739 echo $ac_n "(cached) $ac_c" 1>&6
2741 ac_save_LIBS="$LIBS"
2743 cat > conftest.$ac_ext <<EOF
2744 #line 2756 "configure"
2745 #include "confdefs.h"
2746 /* Override any gcc2 internal prototype to avoid an error. */
2747 /* We use char because int might match the return type of a gcc2
2748 builtin and then its argument prototype would still apply. */
2755 if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2757 eval "ac_cv_lib_$ac_lib_var=yes"
2759 echo "configure: failed program was:" >&5
2760 cat conftest.$ac_ext >&5
2762 eval "ac_cv_lib_$ac_lib_var=no"
2765 LIBS="$ac_save_LIBS"
2768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2769 echo "$ac_t""yes" 1>&6
2770 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2772 echo "$ac_t""no" 1>&6
2775 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2776 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2777 echo "configure:2789: checking for dnet_ntoa in -ldnet_stub" >&5
2778 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2780 echo $ac_n "(cached) $ac_c" 1>&6
2782 ac_save_LIBS="$LIBS"
2783 LIBS="-ldnet_stub $LIBS"
2784 cat > conftest.$ac_ext <<EOF
2785 #line 2797 "configure"
2786 #include "confdefs.h"
2787 /* Override any gcc2 internal prototype to avoid an error. */
2788 /* We use char because int might match the return type of a gcc2
2789 builtin and then its argument prototype would still apply. */
2796 if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2798 eval "ac_cv_lib_$ac_lib_var=yes"
2800 echo "configure: failed program was:" >&5
2801 cat conftest.$ac_ext >&5
2803 eval "ac_cv_lib_$ac_lib_var=no"
2806 LIBS="$ac_save_LIBS"
2809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2810 echo "$ac_t""yes" 1>&6
2811 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2813 echo "$ac_t""no" 1>&6
2818 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2819 # to get the SysV transport functions.
2820 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2822 # The nsl library prevents programs from opening the X display
2823 # on Irix 5.2, according to dickey@clark.net.
2824 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2825 echo "configure:2837: checking for gethostbyname" >&5
2826 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2827 echo $ac_n "(cached) $ac_c" 1>&6
2829 cat > conftest.$ac_ext <<EOF
2830 #line 2842 "configure"
2831 #include "confdefs.h"
2832 /* System header to define __stub macros and hopefully few prototypes,
2833 which can conflict with char gethostbyname(); below. */
2835 /* Override any gcc2 internal prototype to avoid an error. */
2836 /* We use char because int might match the return type of a gcc2
2837 builtin and then its argument prototype would still apply. */
2838 char gethostbyname();
2842 /* The GNU C library defines this for functions which it implements
2843 to always fail with ENOSYS. Some functions are actually named
2844 something starting with __ and the normal name is an alias. */
2845 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2853 if { (eval echo configure:2865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2855 eval "ac_cv_func_gethostbyname=yes"
2857 echo "configure: failed program was:" >&5
2858 cat conftest.$ac_ext >&5
2860 eval "ac_cv_func_gethostbyname=no"
2865 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2866 echo "$ac_t""yes" 1>&6
2869 echo "$ac_t""no" 1>&6
2872 if test $ac_cv_func_gethostbyname = no; then
2873 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2874 echo "configure:2886: checking for gethostbyname in -lnsl" >&5
2875 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2876 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2877 echo $ac_n "(cached) $ac_c" 1>&6
2879 ac_save_LIBS="$LIBS"
2881 cat > conftest.$ac_ext <<EOF
2882 #line 2894 "configure"
2883 #include "confdefs.h"
2884 /* Override any gcc2 internal prototype to avoid an error. */
2885 /* We use char because int might match the return type of a gcc2
2886 builtin and then its argument prototype would still apply. */
2887 char gethostbyname();
2893 if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2895 eval "ac_cv_lib_$ac_lib_var=yes"
2897 echo "configure: failed program was:" >&5
2898 cat conftest.$ac_ext >&5
2900 eval "ac_cv_lib_$ac_lib_var=no"
2903 LIBS="$ac_save_LIBS"
2906 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2907 echo "$ac_t""yes" 1>&6
2908 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2910 echo "$ac_t""no" 1>&6
2915 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2916 # socket/setsockopt and other routines are undefined under SCO ODT
2917 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2918 # on later versions), says simon@lia.di.epfl.ch: it contains
2919 # gethostby* variants that don't use the nameserver (or something).
2920 # -lsocket must be given before -lnsl if both are needed.
2921 # We assume that if connect needs -lnsl, so does gethostbyname.
2922 echo $ac_n "checking for connect""... $ac_c" 1>&6
2923 echo "configure:2935: checking for connect" >&5
2924 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2925 echo $ac_n "(cached) $ac_c" 1>&6
2927 cat > conftest.$ac_ext <<EOF
2928 #line 2940 "configure"
2929 #include "confdefs.h"
2930 /* System header to define __stub macros and hopefully few prototypes,
2931 which can conflict with char connect(); below. */
2933 /* Override any gcc2 internal prototype to avoid an error. */
2934 /* We use char because int might match the return type of a gcc2
2935 builtin and then its argument prototype would still apply. */
2940 /* The GNU C library defines this for functions which it implements
2941 to always fail with ENOSYS. Some functions are actually named
2942 something starting with __ and the normal name is an alias. */
2943 #if defined (__stub_connect) || defined (__stub___connect)
2951 if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2953 eval "ac_cv_func_connect=yes"
2955 echo "configure: failed program was:" >&5
2956 cat conftest.$ac_ext >&5
2958 eval "ac_cv_func_connect=no"
2963 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2964 echo "$ac_t""yes" 1>&6
2967 echo "$ac_t""no" 1>&6
2970 if test $ac_cv_func_connect = no; then
2971 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2972 echo "configure:2984: checking for connect in -lsocket" >&5
2973 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2974 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2975 echo $ac_n "(cached) $ac_c" 1>&6
2977 ac_save_LIBS="$LIBS"
2978 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2979 cat > conftest.$ac_ext <<EOF
2980 #line 2992 "configure"
2981 #include "confdefs.h"
2982 /* Override any gcc2 internal prototype to avoid an error. */
2983 /* We use char because int might match the return type of a gcc2
2984 builtin and then its argument prototype would still apply. */
2991 if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2993 eval "ac_cv_lib_$ac_lib_var=yes"
2995 echo "configure: failed program was:" >&5
2996 cat conftest.$ac_ext >&5
2998 eval "ac_cv_lib_$ac_lib_var=no"
3001 LIBS="$ac_save_LIBS"
3004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3005 echo "$ac_t""yes" 1>&6
3006 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3008 echo "$ac_t""no" 1>&6
3013 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3014 echo $ac_n "checking for remove""... $ac_c" 1>&6
3015 echo "configure:3027: checking for remove" >&5
3016 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3017 echo $ac_n "(cached) $ac_c" 1>&6
3019 cat > conftest.$ac_ext <<EOF
3020 #line 3032 "configure"
3021 #include "confdefs.h"
3022 /* System header to define __stub macros and hopefully few prototypes,
3023 which can conflict with char remove(); below. */
3025 /* Override any gcc2 internal prototype to avoid an error. */
3026 /* We use char because int might match the return type of a gcc2
3027 builtin and then its argument prototype would still apply. */
3032 /* The GNU C library defines this for functions which it implements
3033 to always fail with ENOSYS. Some functions are actually named
3034 something starting with __ and the normal name is an alias. */
3035 #if defined (__stub_remove) || defined (__stub___remove)
3043 if { (eval echo configure:3055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3045 eval "ac_cv_func_remove=yes"
3047 echo "configure: failed program was:" >&5
3048 cat conftest.$ac_ext >&5
3050 eval "ac_cv_func_remove=no"
3055 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3056 echo "$ac_t""yes" 1>&6
3059 echo "$ac_t""no" 1>&6
3062 if test $ac_cv_func_remove = no; then
3063 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3064 echo "configure:3076: checking for remove in -lposix" >&5
3065 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3066 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3067 echo $ac_n "(cached) $ac_c" 1>&6
3069 ac_save_LIBS="$LIBS"
3070 LIBS="-lposix $LIBS"
3071 cat > conftest.$ac_ext <<EOF
3072 #line 3084 "configure"
3073 #include "confdefs.h"
3074 /* Override any gcc2 internal prototype to avoid an error. */
3075 /* We use char because int might match the return type of a gcc2
3076 builtin and then its argument prototype would still apply. */
3083 if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3085 eval "ac_cv_lib_$ac_lib_var=yes"
3087 echo "configure: failed program was:" >&5
3088 cat conftest.$ac_ext >&5
3090 eval "ac_cv_lib_$ac_lib_var=no"
3093 LIBS="$ac_save_LIBS"
3096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3097 echo "$ac_t""yes" 1>&6
3098 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3100 echo "$ac_t""no" 1>&6
3105 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3106 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3107 echo "configure:3119: checking for shmat" >&5
3108 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3109 echo $ac_n "(cached) $ac_c" 1>&6
3111 cat > conftest.$ac_ext <<EOF
3112 #line 3124 "configure"
3113 #include "confdefs.h"
3114 /* System header to define __stub macros and hopefully few prototypes,
3115 which can conflict with char shmat(); below. */
3117 /* Override any gcc2 internal prototype to avoid an error. */
3118 /* We use char because int might match the return type of a gcc2
3119 builtin and then its argument prototype would still apply. */
3124 /* The GNU C library defines this for functions which it implements
3125 to always fail with ENOSYS. Some functions are actually named
3126 something starting with __ and the normal name is an alias. */
3127 #if defined (__stub_shmat) || defined (__stub___shmat)
3135 if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3137 eval "ac_cv_func_shmat=yes"
3139 echo "configure: failed program was:" >&5
3140 cat conftest.$ac_ext >&5
3142 eval "ac_cv_func_shmat=no"
3147 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3148 echo "$ac_t""yes" 1>&6
3151 echo "$ac_t""no" 1>&6
3154 if test $ac_cv_func_shmat = no; then
3155 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3156 echo "configure:3168: checking for shmat in -lipc" >&5
3157 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3158 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3159 echo $ac_n "(cached) $ac_c" 1>&6
3161 ac_save_LIBS="$LIBS"
3163 cat > conftest.$ac_ext <<EOF
3164 #line 3176 "configure"
3165 #include "confdefs.h"
3166 /* Override any gcc2 internal prototype to avoid an error. */
3167 /* We use char because int might match the return type of a gcc2
3168 builtin and then its argument prototype would still apply. */
3175 if { (eval echo configure:3187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3177 eval "ac_cv_lib_$ac_lib_var=yes"
3179 echo "configure: failed program was:" >&5
3180 cat conftest.$ac_ext >&5
3182 eval "ac_cv_lib_$ac_lib_var=no"
3185 LIBS="$ac_save_LIBS"
3188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3189 echo "$ac_t""yes" 1>&6
3190 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3192 echo "$ac_t""no" 1>&6
3198 # Check for libraries that X11R6 Xt/Xaw programs need.
3199 ac_save_LDFLAGS="$LDFLAGS"
3200 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3201 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3202 # check for ICE first), but we must link in the order -lSM -lICE or
3203 # we get undefined symbols. So assume we have SM if we have ICE.
3204 # These have to be linked with before -lX11, unlike the other
3205 # libraries we check for below, so use a different variable.
3206 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3207 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3208 echo "configure:3220: checking for IceConnectionNumber in -lICE" >&5
3209 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3210 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3211 echo $ac_n "(cached) $ac_c" 1>&6
3213 ac_save_LIBS="$LIBS"
3214 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3215 cat > conftest.$ac_ext <<EOF
3216 #line 3228 "configure"
3217 #include "confdefs.h"
3218 /* Override any gcc2 internal prototype to avoid an error. */
3219 /* We use char because int might match the return type of a gcc2
3220 builtin and then its argument prototype would still apply. */
3221 char IceConnectionNumber();
3224 IceConnectionNumber()
3227 if { (eval echo configure:3239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3229 eval "ac_cv_lib_$ac_lib_var=yes"
3231 echo "configure: failed program was:" >&5
3232 cat conftest.$ac_ext >&5
3234 eval "ac_cv_lib_$ac_lib_var=no"
3237 LIBS="$ac_save_LIBS"
3240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3241 echo "$ac_t""yes" 1>&6
3242 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3244 echo "$ac_t""no" 1>&6
3247 LDFLAGS="$ac_save_LDFLAGS"
3252 if test "$have_x" != yes; then
3253 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3257 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3258 echo "configure:3270: checking for X app-defaults directory" >&5
3259 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3260 echo $ac_n "(cached) $ac_c" 1>&6
3264 if mkdir conftestdir; then
3266 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3267 cat > Imakefile <<'EOF'
3269 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3271 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3272 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3273 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3278 if test x"$ac_x_app_defaults" = x; then
3280 # Look for the directory under a standard set of common directories.
3281 # Check X11 before X11Rn because it's often a symlink to the current release.
3283 /usr/X11/lib/app-defaults \
3284 /usr/X11R6/lib/app-defaults \
3285 /usr/X11R6/lib/X11/app-defaults \
3286 /usr/X11R5/lib/app-defaults \
3287 /usr/X11R5/lib/X11/app-defaults \
3288 /usr/X11R4/lib/app-defaults \
3289 /usr/X11R4/lib/X11/app-defaults \
3291 /usr/lib/X11/app-defaults \
3292 /usr/lib/X11R6/app-defaults \
3293 /usr/lib/X11R5/app-defaults \
3294 /usr/lib/X11R4/app-defaults \
3296 /usr/local/X11/lib/app-defaults \
3297 /usr/local/X11R6/lib/app-defaults \
3298 /usr/local/X11R5/lib/app-defaults \
3299 /usr/local/X11R4/lib/app-defaults \
3301 /usr/local/lib/X11/app-defaults \
3302 /usr/local/lib/X11R6/app-defaults \
3303 /usr/local/lib/X11R6/X11/app-defaults \
3304 /usr/local/lib/X11R5/app-defaults \
3305 /usr/local/lib/X11R5/X11/app-defaults \
3306 /usr/local/lib/X11R4/app-defaults \
3307 /usr/local/lib/X11R4/X11/app-defaults \
3309 /usr/X386/lib/X11/app-defaults \
3310 /usr/x386/lib/X11/app-defaults \
3311 /usr/XFree86/lib/X11/app-defaults \
3313 /usr/lib/X11/app-defaults \
3314 /usr/local/lib/X11/app-defaults \
3315 /usr/unsupported/lib/X11/app-defaults \
3316 /usr/athena/lib/X11/app-defaults \
3317 /usr/local/x11r5/lib/X11/app-defaults \
3318 /usr/lpp/Xamples/lib/X11/app-defaults \
3319 /lib/usr/lib/X11/app-defaults \
3321 /usr/openwin/lib/app-defaults \
3322 /usr/openwin/lib/X11/app-defaults \
3323 /usr/openwin/share/lib/app-defaults \
3324 /usr/openwin/share/lib/X11/app-defaults \
3326 /X11R6/lib/app-defaults \
3327 /X11R5/lib/app-defaults \
3328 /X11R4/lib/app-defaults \
3331 if test -d "$ac_dir"; then
3332 ac_x_app_defaults=$ac_dir
3338 if test x"$ac_x_app_defaults" = x; then
3339 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3341 # Record where we found app-defaults for the cache.
3342 ac_cv_x_app_defaults="$ac_x_app_defaults"
3346 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3347 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3351 # The following arcana was gleaned from conversations with
3352 # Eric Schwartz <erics@col.hp.com>:
3354 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3355 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3356 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3357 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3358 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3359 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3360 # you don't need any -I or -L arguments.
3362 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3363 # are the same division as 10.x. However, there are no symlinks to
3364 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3365 # arguments are always necessary.
3367 # However, X11R6 was available on HPUX 9.x as a patch: if that
3368 # patch was installed, then all of X11R6 went in to
3369 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3371 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3372 # whether R5 was available as a patch; R6 undoubtedly was not.)
3374 # So. We try and use the highest numbered pair of
3375 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3376 # that are available. We do not mix and match different versions
3379 # Question I still don't know the answer to: (do you?)
3381 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3382 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3383 # that contrib directory? Did it contain so-called "standard"
3384 # X11R6, or did it include Xaw and Xmu as well? If the former,
3385 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3386 # be a situation where one had to reach into the R5 headers and
3387 # libs to find Xmu? That is, must both R6 and R5 directories
3388 # be on the -I and -L lists in that case?
3390 for version in X11R6 X11R5 X11R4 ; do
3391 # if either pair of directories exists...
3392 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3394 # if contrib exists, use it...
3395 if test -d /usr/contrib/$version/lib ; then
3396 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3397 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3399 # if the "standard" one exists, use it.
3400 if test -d /usr/lib/$version ; then
3401 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3402 X_LIBS="$X_LIBS -L/usr/lib/$version"
3404 # since at least one of the pair exists, go no farther.
3409 # Now find Motif. Thanks for not making xmkmf find this by
3410 # default, you losers.
3412 if test -d /usr/lib/Motif1.2 ; then
3413 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3414 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3415 elif test -d /usr/lib/Motif1.1 ; then
3416 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3417 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3420 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3422 if test -d /opt/Mesa/lib ; then
3423 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3424 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3427 if test -d /opt/xpm/lib/X11 ; then
3428 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3429 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3432 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3433 # in /usr/local/, unless there is already an xscreensaver in
3434 # /usr/local/bin/. This can be overridden with the --prefix arg
3435 # to configure. I'm not sure this is the right thing to do, but
3436 # Richard Lloyd says so...
3438 if test \! -x /usr/local/bin/xscreensaver ; then
3439 ac_default_prefix=/opt/xscreensaver
3445 # Thanks for not making xmkmf find this by default, pinheads.
3446 # And thanks for moving things around again, too. Is this
3447 # really the standard location now? What happened to the
3448 # joke that this kind of thing went in /opt?
3449 # cthomp says "answer: CDE (Common Disorganized Environment)"
3451 if test -f /usr/dt/include/Xm/Xm.h ; then
3452 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3453 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3455 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3456 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3457 echo "configure:3469: checking for regcmp in -lgen" >&5
3458 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3459 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3460 echo $ac_n "(cached) $ac_c" 1>&6
3462 ac_save_LIBS="$LIBS"
3464 cat > conftest.$ac_ext <<EOF
3465 #line 3477 "configure"
3466 #include "confdefs.h"
3467 /* Override any gcc2 internal prototype to avoid an error. */
3468 /* We use char because int might match the return type of a gcc2
3469 builtin and then its argument prototype would still apply. */
3476 if { (eval echo configure:3488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3478 eval "ac_cv_lib_$ac_lib_var=yes"
3480 echo "configure: failed program was:" >&5
3481 cat conftest.$ac_ext >&5
3483 eval "ac_cv_lib_$ac_lib_var=no"
3486 LIBS="$ac_save_LIBS"
3489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3490 echo "$ac_t""yes" 1>&6
3491 X_LIBS="$X_LIBS -lgen"
3493 echo "$ac_t""no" 1>&6
3499 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3500 echo "configure:3512: checking for XPointer" >&5
3501 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3502 echo $ac_n "(cached) $ac_c" 1>&6
3505 ac_save_CPPFLAGS="$CPPFLAGS"
3506 if test \! -z "$includedir" ; then
3507 CPPFLAGS="$CPPFLAGS -I$includedir"
3509 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3510 cat > conftest.$ac_ext <<EOF
3511 #line 3523 "configure"
3512 #include "confdefs.h"
3513 #include <X11/Xlib.h>
3515 XPointer foo = (XPointer) 0;
3518 if { (eval echo configure:3530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3522 echo "configure: failed program was:" >&5
3523 cat conftest.$ac_ext >&5
3528 CPPFLAGS="$ac_save_CPPFLAGS"
3531 echo "$ac_t""$ac_cv_xpointer" 1>&6
3532 if test "$ac_cv_xpointer" != yes; then
3533 cat >> confdefs.h <<\EOF
3534 #define XPointer char*
3541 ###############################################################################
3543 # Check for -lXmu (some fucked up vendors don't ship it...)
3545 ###############################################################################
3549 ac_save_CPPFLAGS="$CPPFLAGS"
3550 if test \! -z "$includedir" ; then
3551 CPPFLAGS="$CPPFLAGS -I$includedir"
3553 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3554 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3555 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3556 echo "configure:3568: checking for X11/Xmu/Error.h" >&5
3557 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3558 echo $ac_n "(cached) $ac_c" 1>&6
3560 cat > conftest.$ac_ext <<EOF
3561 #line 3573 "configure"
3562 #include "confdefs.h"
3563 #include <X11/Xmu/Error.h>
3565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3566 { (eval echo configure:3578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3568 if test -z "$ac_err"; then
3570 eval "ac_cv_header_$ac_safe=yes"
3573 echo "configure: failed program was:" >&5
3574 cat conftest.$ac_ext >&5
3576 eval "ac_cv_header_$ac_safe=no"
3580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3581 echo "$ac_t""yes" 1>&6
3584 echo "$ac_t""no" 1>&6
3587 CPPFLAGS="$ac_save_CPPFLAGS"
3588 if test "$have_xmu" = no ; then
3589 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3590 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3594 SAVER_LIBS="-lXmu $SAVER_LIBS"
3595 HACK_LIBS="-lXmu $HACK_LIBS"
3596 MOTIF_LIBS="-lXmu $MOTIF_LIBS"
3597 GTK_LIBS="-lXmu $GTK_LIBS"
3598 cat >> confdefs.h <<\EOF
3605 ###############################################################################
3607 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3608 # See comp.windows.x FAQ question 124. The right fix is to
3609 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3611 ###############################################################################
3613 if test "$have_xmu" = yes ; then
3616 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3617 echo "configure:3629: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3618 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3619 echo $ac_n "(cached) $ac_c" 1>&6
3621 ac_save_LDFLAGS="$LDFLAGS"
3622 if test \! -z "$x_libraries" ; then
3623 LDFLAGS="$LDFLAGS -L$x_libraries"
3625 # Note: this trick never works! (Generally.)
3626 # We're only getting away with using AC_TRY_LINK
3627 # with X libraries because we know it's SunOS.
3628 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3629 cat > conftest.$ac_ext <<EOF
3630 #line 3642 "configure"
3631 #include "confdefs.h"
3637 if { (eval echo configure:3649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3639 ac_cv_sunos_xmu_bug=no
3641 echo "configure: failed program was:" >&5
3642 cat conftest.$ac_ext >&5
3644 ac_cv_sunos_xmu_bug=yes
3647 LDFLAGS="$ac_save_LDFLAGS"
3650 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3651 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3652 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3653 echo "configure:3665: checking whether the compiler understands -static" >&5
3654 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3655 echo $ac_n "(cached) $ac_c" 1>&6
3657 ac_save_LDFLAGS="$LDFLAGS"
3658 LDFLAGS="$LDFLAGS -static"
3659 cat > conftest.$ac_ext <<EOF
3660 #line 3672 "configure"
3661 #include "confdefs.h"
3667 if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3671 echo "configure: failed program was:" >&5
3672 cat conftest.$ac_ext >&5
3677 LDFLAGS="$ac_save_LDFLAGS"
3680 echo "$ac_t""$ac_cv_ld_static" 1>&6
3681 if test "$ac_cv_ld_static" = yes ; then
3682 LDFLAGS="$LDFLAGS -static"
3684 LDFLAGS="$LDFLAGS -Bstatic"
3692 ###############################################################################
3694 # Handle the --enable-subdir option
3696 ###############################################################################
3698 # Check whether --enable-subdir or --disable-subdir was given.
3699 if test "${enable_subdir+set}" = set; then
3700 enableval="$enable_subdir"
3701 enable_subdir="$enableval"
3706 if test x"$enable_subdir" = xno; then
3708 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
3709 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
3712 # there must be a better way than this...
3713 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
3715 HACKDIR=$enable_subdir
3718 HACKDIR='${bindir}/'$enable_subdir
3722 # canonicalize slashes.
3723 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3726 ###############################################################################
3728 # Check for the SGI SCREEN_SAVER server extension.
3730 ###############################################################################
3733 with_sgi_req=unspecified
3734 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3735 if test "${with_sgi_ext+set}" = set; then
3736 withval="$with_sgi_ext"
3737 with_sgi="$withval"; with_sgi_req="$withval"
3749 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3750 echo "configure:3762: checking for SGI SCREEN_SAVER headers" >&5
3753 X_CFLAGS="-I$d $X_CFLAGS"
3754 echo "$ac_t""$d" 1>&6
3756 echo "$ac_t""not found ($d: no such directory)" 1>&6
3759 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3760 echo "configure:3772: checking for SGI SCREEN_SAVER libs" >&5
3763 X_LIBS="-L$d $X_LIBS"
3764 echo "$ac_t""$d" 1>&6
3766 echo "$ac_t""not found ($d: no such directory)" 1>&6
3769 # replace the directory string with "yes".
3771 with_sgi=$with_sgi_req
3776 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3777 echo " If it is a directory, then \`DIR/include' will be added to"
3778 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3784 if test "$with_sgi" = yes; then
3786 ac_save_CPPFLAGS="$CPPFLAGS"
3787 if test \! -z "$includedir" ; then
3788 CPPFLAGS="$CPPFLAGS -I$includedir"
3790 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3791 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3792 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3793 echo "configure:3805: checking for X11/extensions/XScreenSaver.h" >&5
3794 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3795 echo $ac_n "(cached) $ac_c" 1>&6
3797 cat > conftest.$ac_ext <<EOF
3798 #line 3810 "configure"
3799 #include "confdefs.h"
3800 #include <X11/extensions/XScreenSaver.h>
3802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3803 { (eval echo configure:3815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3805 if test -z "$ac_err"; then
3807 eval "ac_cv_header_$ac_safe=yes"
3810 echo "configure: failed program was:" >&5
3811 cat conftest.$ac_ext >&5
3813 eval "ac_cv_header_$ac_safe=no"
3817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3818 echo "$ac_t""yes" 1>&6
3820 cat >> confdefs.h <<\EOF
3821 #define HAVE_SGI_SAVER_EXTENSION 1
3825 echo "$ac_t""no" 1>&6
3828 CPPFLAGS="$ac_save_CPPFLAGS"
3830 elif test "$with_sgi" != no; then
3831 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3836 ###############################################################################
3838 # Check for the MIT-SCREEN-SAVER server extension.
3840 ###############################################################################
3843 with_mit_req=unspecified
3844 # Check whether --with-mit-ext or --without-mit-ext was given.
3845 if test "${with_mit_ext+set}" = set; then
3846 withval="$with_mit_ext"
3847 with_mit="$withval"; with_mit_req="$withval"
3859 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3860 echo "configure:3872: checking for MIT-SCREEN-SAVER headers" >&5
3863 X_CFLAGS="-I$d $X_CFLAGS"
3864 echo "$ac_t""$d" 1>&6
3866 echo "$ac_t""not found ($d: no such directory)" 1>&6
3869 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3870 echo "configure:3882: checking for MIT-SCREEN-SAVER libs" >&5
3873 X_LIBS="-L$d $X_LIBS"
3874 echo "$ac_t""$d" 1>&6
3876 echo "$ac_t""not found ($d: no such directory)" 1>&6
3879 # replace the directory string with "yes".
3881 with_mit=$with_mit_req
3886 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3887 echo " If it is a directory, then \`DIR/include' will be added to"
3888 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3894 if test "$with_mit" = yes; then
3896 ac_save_CPPFLAGS="$CPPFLAGS"
3897 if test \! -z "$includedir" ; then
3898 CPPFLAGS="$CPPFLAGS -I$includedir"
3900 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3901 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3902 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3903 echo "configure:3915: checking for X11/extensions/scrnsaver.h" >&5
3904 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3905 echo $ac_n "(cached) $ac_c" 1>&6
3907 cat > conftest.$ac_ext <<EOF
3908 #line 3920 "configure"
3909 #include "confdefs.h"
3910 #include <X11/extensions/scrnsaver.h>
3912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3913 { (eval echo configure:3925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3915 if test -z "$ac_err"; then
3917 eval "ac_cv_header_$ac_safe=yes"
3920 echo "configure: failed program was:" >&5
3921 cat conftest.$ac_ext >&5
3923 eval "ac_cv_header_$ac_safe=no"
3927 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3928 echo "$ac_t""yes" 1>&6
3931 echo "$ac_t""no" 1>&6
3934 CPPFLAGS="$ac_save_CPPFLAGS"
3936 # Now check to see if it's really in the library; XF86Free-3.3 ships
3937 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3939 if test "$have_mit" = yes; then
3941 ac_save_CPPFLAGS="$CPPFLAGS"
3942 ac_save_LDFLAGS="$LDFLAGS"
3943 # ac_save_LIBS="$LIBS"
3945 if test \! -z "$includedir" ; then
3946 CPPFLAGS="$CPPFLAGS -I$includedir"
3948 # note: $X_CFLAGS includes $x_includes
3949 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3951 if test \! -z "$libdir" ; then
3952 LDFLAGS="$LDFLAGS -L$libdir"
3954 # note: $X_LIBS includes $x_libraries
3955 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3957 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3958 echo "configure:3970: checking for XScreenSaverRegister in -lXext" >&5
3959 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3960 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3961 echo $ac_n "(cached) $ac_c" 1>&6
3963 ac_save_LIBS="$LIBS"
3964 LIBS="-lXext -lm $LIBS"
3965 cat > conftest.$ac_ext <<EOF
3966 #line 3978 "configure"
3967 #include "confdefs.h"
3968 /* Override any gcc2 internal prototype to avoid an error. */
3969 /* We use char because int might match the return type of a gcc2
3970 builtin and then its argument prototype would still apply. */
3971 char XScreenSaverRegister();
3974 XScreenSaverRegister()
3977 if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3979 eval "ac_cv_lib_$ac_lib_var=yes"
3981 echo "configure: failed program was:" >&5
3982 cat conftest.$ac_ext >&5
3984 eval "ac_cv_lib_$ac_lib_var=no"
3987 LIBS="$ac_save_LIBS"
3990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3991 echo "$ac_t""yes" 1>&6
3994 echo "$ac_t""no" 1>&6
3998 CPPFLAGS="$ac_save_CPPFLAGS"
3999 LDFLAGS="$ac_save_LDFLAGS"
4000 # LIBS="$ac_save_LIBS"
4003 if test "$have_mit" = no; then
4004 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
4005 # of in Xext. Thank you master, may I have another.
4007 ac_save_CPPFLAGS="$CPPFLAGS"
4008 ac_save_LDFLAGS="$LDFLAGS"
4009 # ac_save_LIBS="$LIBS"
4011 if test \! -z "$includedir" ; then
4012 CPPFLAGS="$CPPFLAGS -I$includedir"
4014 # note: $X_CFLAGS includes $x_includes
4015 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4017 if test \! -z "$libdir" ; then
4018 LDFLAGS="$LDFLAGS -L$libdir"
4020 # note: $X_LIBS includes $x_libraries
4021 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4023 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
4024 echo "configure:4036: checking for XScreenSaverRegister in -lXExExt" >&5
4025 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4026 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4027 echo $ac_n "(cached) $ac_c" 1>&6
4029 ac_save_LIBS="$LIBS"
4030 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
4031 cat > conftest.$ac_ext <<EOF
4032 #line 4044 "configure"
4033 #include "confdefs.h"
4034 /* Override any gcc2 internal prototype to avoid an error. */
4035 /* We use char because int might match the return type of a gcc2
4036 builtin and then its argument prototype would still apply. */
4037 char XScreenSaverRegister();
4040 XScreenSaverRegister()
4043 if { (eval echo configure:4055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4045 eval "ac_cv_lib_$ac_lib_var=yes"
4047 echo "configure: failed program was:" >&5
4048 cat conftest.$ac_ext >&5
4050 eval "ac_cv_lib_$ac_lib_var=no"
4053 LIBS="$ac_save_LIBS"
4056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4057 echo "$ac_t""yes" 1>&6
4058 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
4060 echo "$ac_t""no" 1>&6
4064 CPPFLAGS="$ac_save_CPPFLAGS"
4065 LDFLAGS="$ac_save_LDFLAGS"
4066 # LIBS="$ac_save_LIBS"
4070 if test "$have_mit" = no; then
4071 # Double fuck! Looks like some versions of XFree86 (whichever version
4072 # it is that comes with RedHat Linux 2.0 -- I can't find a version
4073 # number) put this garbage in Xss instead of Xext. Thank you master,
4074 # may I have another.
4076 ac_save_CPPFLAGS="$CPPFLAGS"
4077 ac_save_LDFLAGS="$LDFLAGS"
4078 # ac_save_LIBS="$LIBS"
4080 if test \! -z "$includedir" ; then
4081 CPPFLAGS="$CPPFLAGS -I$includedir"
4083 # note: $X_CFLAGS includes $x_includes
4084 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4086 if test \! -z "$libdir" ; then
4087 LDFLAGS="$LDFLAGS -L$libdir"
4089 # note: $X_LIBS includes $x_libraries
4090 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4092 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4093 echo "configure:4105: checking for XScreenSaverRegister in -lXss" >&5
4094 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4095 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4096 echo $ac_n "(cached) $ac_c" 1>&6
4098 ac_save_LIBS="$LIBS"
4099 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4100 cat > conftest.$ac_ext <<EOF
4101 #line 4113 "configure"
4102 #include "confdefs.h"
4103 /* Override any gcc2 internal prototype to avoid an error. */
4104 /* We use char because int might match the return type of a gcc2
4105 builtin and then its argument prototype would still apply. */
4106 char XScreenSaverRegister();
4109 XScreenSaverRegister()
4112 if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4114 eval "ac_cv_lib_$ac_lib_var=yes"
4116 echo "configure: failed program was:" >&5
4117 cat conftest.$ac_ext >&5
4119 eval "ac_cv_lib_$ac_lib_var=no"
4122 LIBS="$ac_save_LIBS"
4125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4126 echo "$ac_t""yes" 1>&6
4127 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4129 echo "$ac_t""no" 1>&6
4133 CPPFLAGS="$ac_save_CPPFLAGS"
4134 LDFLAGS="$ac_save_LDFLAGS"
4135 # LIBS="$ac_save_LIBS"
4139 if test "$have_mit" = yes; then
4140 cat >> confdefs.h <<\EOF
4141 #define HAVE_MIT_SAVER_EXTENSION 1
4148 elif test "$with_mit" != no; then
4149 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4154 ###############################################################################
4156 # Check for the XIDLE server extension.
4158 ###############################################################################
4161 with_xidle_req=unspecified
4162 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4163 if test "${with_xidle_ext+set}" = set; then
4164 withval="$with_xidle_ext"
4165 with_xidle="$withval"; with_xidle_req="$withval"
4172 case "$with_xidle" in
4177 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4178 echo "configure:4190: checking for XIDLE headers" >&5
4179 d=$with_xidle/include
4181 X_CFLAGS="-I$d $X_CFLAGS"
4182 echo "$ac_t""$d" 1>&6
4184 echo "$ac_t""not found ($d: no such directory)" 1>&6
4187 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4188 echo "configure:4200: checking for XIDLE libs" >&5
4191 X_LIBS="-L$d $X_LIBS"
4192 echo "$ac_t""$d" 1>&6
4194 echo "$ac_t""not found ($d: no such directory)" 1>&6
4197 # replace the directory string with "yes".
4198 with_xidle_req="yes"
4199 with_xidle=$with_xidle_req
4204 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4205 echo " If it is a directory, then \`DIR/include' will be added to"
4206 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4212 if test "$with_xidle" = yes; then
4214 ac_save_CPPFLAGS="$CPPFLAGS"
4215 if test \! -z "$includedir" ; then
4216 CPPFLAGS="$CPPFLAGS -I$includedir"
4218 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4219 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4220 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4221 echo "configure:4233: checking for X11/extensions/xidle.h" >&5
4222 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4223 echo $ac_n "(cached) $ac_c" 1>&6
4225 cat > conftest.$ac_ext <<EOF
4226 #line 4238 "configure"
4227 #include "confdefs.h"
4228 #include <X11/extensions/xidle.h>
4230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4231 { (eval echo configure:4243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4233 if test -z "$ac_err"; then
4235 eval "ac_cv_header_$ac_safe=yes"
4238 echo "configure: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
4241 eval "ac_cv_header_$ac_safe=no"
4245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4246 echo "$ac_t""yes" 1>&6
4248 cat >> confdefs.h <<\EOF
4249 #define HAVE_XIDLE_EXTENSION 1
4253 echo "$ac_t""no" 1>&6
4256 CPPFLAGS="$ac_save_CPPFLAGS"
4257 elif test "$with_xidle" != no; then
4258 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4263 ###############################################################################
4265 # Check for the SGI-VIDEO-CONTROL server extension.
4267 ###############################################################################
4270 with_sgivc_req=unspecified
4271 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4272 if test "${with_sgivc_ext+set}" = set; then
4273 withval="$with_sgivc_ext"
4274 with_sgivc="$withval"; with_sgivc_req="$withval"
4281 case "$with_sgivc" in
4286 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4287 echo "configure:4299: checking for SGI-VIDEO-CONTROL headers" >&5
4288 d=$with_sgivc/include
4290 X_CFLAGS="-I$d $X_CFLAGS"
4291 echo "$ac_t""$d" 1>&6
4293 echo "$ac_t""not found ($d: no such directory)" 1>&6
4296 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4297 echo "configure:4309: checking for SGI-VIDEO-CONTROL libs" >&5
4300 X_LIBS="-L$d $X_LIBS"
4301 echo "$ac_t""$d" 1>&6
4303 echo "$ac_t""not found ($d: no such directory)" 1>&6
4306 # replace the directory string with "yes".
4307 with_sgivc_req="yes"
4308 with_sgivc=$with_sgivc_req
4313 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4314 echo " If it is a directory, then \`DIR/include' will be added to"
4315 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4321 if test "$with_sgivc" = yes; then
4323 # first check for XSGIvc.h
4325 ac_save_CPPFLAGS="$CPPFLAGS"
4326 if test \! -z "$includedir" ; then
4327 CPPFLAGS="$CPPFLAGS -I$includedir"
4329 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4330 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4331 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4332 echo "configure:4344: checking for X11/extensions/XSGIvc.h" >&5
4333 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4334 echo $ac_n "(cached) $ac_c" 1>&6
4336 cat > conftest.$ac_ext <<EOF
4337 #line 4349 "configure"
4338 #include "confdefs.h"
4339 #include <X11/extensions/XSGIvc.h>
4341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4342 { (eval echo configure:4354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4344 if test -z "$ac_err"; then
4346 eval "ac_cv_header_$ac_safe=yes"
4349 echo "configure: failed program was:" >&5
4350 cat conftest.$ac_ext >&5
4352 eval "ac_cv_header_$ac_safe=no"
4356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4357 echo "$ac_t""yes" 1>&6
4360 echo "$ac_t""no" 1>&6
4363 CPPFLAGS="$ac_save_CPPFLAGS"
4365 # if that succeeded, then check for the -lXsgivc
4366 if test "$have_sgivc" = yes; then
4369 ac_save_CPPFLAGS="$CPPFLAGS"
4370 ac_save_LDFLAGS="$LDFLAGS"
4371 # ac_save_LIBS="$LIBS"
4373 if test \! -z "$includedir" ; then
4374 CPPFLAGS="$CPPFLAGS -I$includedir"
4376 # note: $X_CFLAGS includes $x_includes
4377 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4379 if test \! -z "$libdir" ; then
4380 LDFLAGS="$LDFLAGS -L$libdir"
4382 # note: $X_LIBS includes $x_libraries
4383 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4385 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4386 echo "configure:4398: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4387 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4388 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4389 echo $ac_n "(cached) $ac_c" 1>&6
4391 ac_save_LIBS="$LIBS"
4392 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4393 cat > conftest.$ac_ext <<EOF
4394 #line 4406 "configure"
4395 #include "confdefs.h"
4396 /* Override any gcc2 internal prototype to avoid an error. */
4397 /* We use char because int might match the return type of a gcc2
4398 builtin and then its argument prototype would still apply. */
4399 char XSGIvcQueryGammaMap();
4402 XSGIvcQueryGammaMap()
4405 if { (eval echo configure:4417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4407 eval "ac_cv_lib_$ac_lib_var=yes"
4409 echo "configure: failed program was:" >&5
4410 cat conftest.$ac_ext >&5
4412 eval "ac_cv_lib_$ac_lib_var=no"
4415 LIBS="$ac_save_LIBS"
4418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4419 echo "$ac_t""yes" 1>&6
4420 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4422 echo "$ac_t""no" 1>&6
4426 CPPFLAGS="$ac_save_CPPFLAGS"
4427 LDFLAGS="$ac_save_LDFLAGS"
4428 # LIBS="$ac_save_LIBS"
4432 # if that succeeded, then we've really got it.
4433 if test "$have_sgivc" = yes; then
4434 cat >> confdefs.h <<\EOF
4435 #define HAVE_SGI_VC_EXTENSION 1
4440 elif test "$with_sgivc" != no; then
4441 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4446 ###############################################################################
4448 # Check for the DPMS server extension.
4450 ###############################################################################
4453 with_dpms_req=unspecified
4454 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4455 if test "${with_dpms_ext+set}" = set; then
4456 withval="$with_dpms_ext"
4457 with_dpms="$withval"; with_dpms_req="$withval"
4464 case "$with_dpms" in
4469 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4470 echo "configure:4482: checking for DPMS headers" >&5
4471 d=$with_dpms/include
4473 X_CFLAGS="-I$d $X_CFLAGS"
4474 echo "$ac_t""$d" 1>&6
4476 echo "$ac_t""not found ($d: no such directory)" 1>&6
4479 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4480 echo "configure:4492: checking for DPMS libs" >&5
4483 X_LIBS="-L$d $X_LIBS"
4484 echo "$ac_t""$d" 1>&6
4486 echo "$ac_t""not found ($d: no such directory)" 1>&6
4489 # replace the directory string with "yes".
4491 with_dpms=$with_dpms_req
4496 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4497 echo " If it is a directory, then \`DIR/include' will be added to"
4498 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4504 if test "$with_dpms" = yes; then
4506 # first check for dpms.h
4508 ac_save_CPPFLAGS="$CPPFLAGS"
4509 if test \! -z "$includedir" ; then
4510 CPPFLAGS="$CPPFLAGS -I$includedir"
4512 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4513 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4514 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4515 echo "configure:4527: checking for X11/extensions/dpms.h" >&5
4516 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4517 echo $ac_n "(cached) $ac_c" 1>&6
4519 cat > conftest.$ac_ext <<EOF
4520 #line 4532 "configure"
4521 #include "confdefs.h"
4522 #include <X11/extensions/dpms.h>
4524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525 { (eval echo configure:4537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4527 if test -z "$ac_err"; then
4529 eval "ac_cv_header_$ac_safe=yes"
4532 echo "configure: failed program was:" >&5
4533 cat conftest.$ac_ext >&5
4535 eval "ac_cv_header_$ac_safe=no"
4539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4540 echo "$ac_t""yes" 1>&6
4543 echo "$ac_t""no" 1>&6
4546 CPPFLAGS="$ac_save_CPPFLAGS"
4548 # if that succeeded, then check for the DPMS code in the libraries
4549 if test "$have_dpms" = yes; then
4551 # first look in -lXext (this is where it is with XFree86 4.0)
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 -lXext""... $ac_c" 1>&6
4571 echo "configure:4583: checking for DPMSInfo in -lXext" >&5
4572 ac_lib_var=`echo Xext'_'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="-lXext -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
4607 echo "$ac_t""no" 1>&6
4611 CPPFLAGS="$ac_save_CPPFLAGS"
4612 LDFLAGS="$ac_save_LDFLAGS"
4613 # LIBS="$ac_save_LIBS"
4616 # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
4617 if test "$have_dpms" = no; then
4619 ac_save_CPPFLAGS="$CPPFLAGS"
4620 ac_save_LDFLAGS="$LDFLAGS"
4621 # ac_save_LIBS="$LIBS"
4623 if test \! -z "$includedir" ; then
4624 CPPFLAGS="$CPPFLAGS -I$includedir"
4626 # note: $X_CFLAGS includes $x_includes
4627 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4629 if test \! -z "$libdir" ; then
4630 LDFLAGS="$LDFLAGS -L$libdir"
4632 # note: $X_LIBS includes $x_libraries
4633 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4635 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4636 echo "configure:4648: checking for DPMSInfo in -lXdpms" >&5
4637 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4638 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4639 echo $ac_n "(cached) $ac_c" 1>&6
4641 ac_save_LIBS="$LIBS"
4642 LIBS="-lXdpms -lXext -lX11 $LIBS"
4643 cat > conftest.$ac_ext <<EOF
4644 #line 4656 "configure"
4645 #include "confdefs.h"
4646 /* Override any gcc2 internal prototype to avoid an error. */
4647 /* We use char because int might match the return type of a gcc2
4648 builtin and then its argument prototype would still apply. */
4655 if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4657 eval "ac_cv_lib_$ac_lib_var=yes"
4659 echo "configure: failed program was:" >&5
4660 cat conftest.$ac_ext >&5
4662 eval "ac_cv_lib_$ac_lib_var=no"
4665 LIBS="$ac_save_LIBS"
4668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4669 echo "$ac_t""yes" 1>&6
4670 have_dpms=yes; XDPMS_LIBS="-lXdpms"
4672 echo "$ac_t""no" 1>&6
4676 CPPFLAGS="$ac_save_CPPFLAGS"
4677 LDFLAGS="$ac_save_LDFLAGS"
4678 # LIBS="$ac_save_LIBS"
4684 # if that succeeded, then we've really got it.
4685 if test "$have_dpms" = yes; then
4686 cat >> confdefs.h <<\EOF
4687 #define HAVE_DPMS_EXTENSION 1
4692 elif test "$with_dpms" != no; then
4693 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4698 ###############################################################################
4700 # Check for the XF86VMODE server extension.
4702 ###############################################################################
4705 with_xf86vmode_req=unspecified
4706 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4707 if test "${with_xf86vmode_ext+set}" = set; then
4708 withval="$with_xf86vmode_ext"
4709 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4716 case "$with_xf86vmode" in
4721 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4722 echo "configure:4734: checking for xf86vmode headers" >&5
4723 d=$with_xf86vmode/include
4725 X_CFLAGS="-I$d $X_CFLAGS"
4726 echo "$ac_t""$d" 1>&6
4728 echo "$ac_t""not found ($d: no such directory)" 1>&6
4731 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4732 echo "configure:4744: checking for xf86vmode libs" >&5
4733 d=$with_xf86vmode/lib
4735 X_LIBS="-L$d $X_LIBS"
4736 echo "$ac_t""$d" 1>&6
4738 echo "$ac_t""not found ($d: no such directory)" 1>&6
4741 # replace the directory string with "yes".
4742 with_xf86vmode_req="yes"
4743 with_xf86vmode=$with_xf86vmode_req
4748 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4749 echo " If it is a directory, then \`DIR/include' will be added to"
4750 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4756 if test "$with_xf86vmode" = yes; then
4758 # first check for xf86vmode.h
4760 ac_save_CPPFLAGS="$CPPFLAGS"
4761 if test \! -z "$includedir" ; then
4762 CPPFLAGS="$CPPFLAGS -I$includedir"
4764 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4765 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4766 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4767 echo "configure:4779: checking for X11/extensions/xf86vmode.h" >&5
4768 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4769 echo $ac_n "(cached) $ac_c" 1>&6
4771 cat > conftest.$ac_ext <<EOF
4772 #line 4784 "configure"
4773 #include "confdefs.h"
4774 #include <X11/extensions/xf86vmode.h>
4776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4777 { (eval echo configure:4789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4779 if test -z "$ac_err"; then
4781 eval "ac_cv_header_$ac_safe=yes"
4784 echo "configure: failed program was:" >&5
4785 cat conftest.$ac_ext >&5
4787 eval "ac_cv_header_$ac_safe=no"
4791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4792 echo "$ac_t""yes" 1>&6
4795 echo "$ac_t""no" 1>&6
4798 CPPFLAGS="$ac_save_CPPFLAGS"
4800 # if that succeeded, then check for the -lXxf86vm
4801 if test "$have_xf86vmode" = yes; then
4804 ac_save_CPPFLAGS="$CPPFLAGS"
4805 ac_save_LDFLAGS="$LDFLAGS"
4806 # ac_save_LIBS="$LIBS"
4808 if test \! -z "$includedir" ; then
4809 CPPFLAGS="$CPPFLAGS -I$includedir"
4811 # note: $X_CFLAGS includes $x_includes
4812 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4814 if test \! -z "$libdir" ; then
4815 LDFLAGS="$LDFLAGS -L$libdir"
4817 # note: $X_LIBS includes $x_libraries
4818 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4820 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4821 echo "configure:4833: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4822 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4823 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4824 echo $ac_n "(cached) $ac_c" 1>&6
4826 ac_save_LIBS="$LIBS"
4827 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4828 cat > conftest.$ac_ext <<EOF
4829 #line 4841 "configure"
4830 #include "confdefs.h"
4831 /* Override any gcc2 internal prototype to avoid an error. */
4832 /* We use char because int might match the return type of a gcc2
4833 builtin and then its argument prototype would still apply. */
4834 char XF86VidModeGetViewPort();
4837 XF86VidModeGetViewPort()
4840 if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4842 eval "ac_cv_lib_$ac_lib_var=yes"
4844 echo "configure: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
4847 eval "ac_cv_lib_$ac_lib_var=no"
4850 LIBS="$ac_save_LIBS"
4853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4854 echo "$ac_t""yes" 1>&6
4855 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4857 echo "$ac_t""no" 1>&6
4861 CPPFLAGS="$ac_save_CPPFLAGS"
4862 LDFLAGS="$ac_save_LDFLAGS"
4863 # LIBS="$ac_save_LIBS"
4867 # if that succeeded, then we've really got it.
4868 if test "$have_xf86vmode" = yes; then
4869 cat >> confdefs.h <<\EOF
4870 #define HAVE_XF86VMODE 1
4875 elif test "$with_xf86vmode" != no; then
4876 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4881 ###############################################################################
4883 # Check for HP XHPDisableReset and XHPEnableReset.
4885 ###############################################################################
4888 ac_save_CPPFLAGS="$CPPFLAGS"
4889 if test \! -z "$includedir" ; then
4890 CPPFLAGS="$CPPFLAGS -I$includedir"
4892 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4893 cat > conftest.$ac_ext <<EOF
4894 #line 4906 "configure"
4895 #include "confdefs.h"
4896 #include <X11/XHPlib.h>
4898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4899 egrep "XHPDisableReset" >/dev/null 2>&1; then
4901 cat >> confdefs.h <<\EOF
4902 #define HAVE_XHPDISABLERESET 1
4905 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
4909 CPPFLAGS="$ac_save_CPPFLAGS"
4912 ###############################################################################
4914 # Check for /proc/interrupts.
4916 ###############################################################################
4918 have_proc_interrupts=no
4919 with_proc_interrupts_req=unspecified
4920 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4921 if test "${with_proc_interrupts+set}" = set; then
4922 withval="$with_proc_interrupts"
4923 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4925 with_proc_interrupts=yes
4929 if test "$with_proc_interrupts" = yes; then
4931 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4932 echo "configure:4944: checking whether /proc/interrupts contains keyboard data" >&5
4933 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4934 echo $ac_n "(cached) $ac_c" 1>&6
4936 ac_cv_have_proc_interrupts=no
4937 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4938 ac_cv_have_proc_interrupts=yes
4943 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
4944 have_proc_interrupts=$ac_cv_have_proc_interrupts
4946 if test "$have_proc_interrupts" = yes; then
4947 cat >> confdefs.h <<\EOF
4948 #define HAVE_PROC_INTERRUPTS 1
4953 elif test "$with_proc_interrupts" != no; then
4954 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
4959 ###############################################################################
4961 # The --enable-locking option
4963 ###############################################################################
4965 # Check whether --enable-locking or --disable-locking was given.
4966 if test "${enable_locking+set}" = set; then
4967 enableval="$enable_locking"
4968 enable_locking="$enableval"
4973 if test "$enable_locking" = yes; then
4975 elif test "$enable_locking" = no; then
4976 cat >> confdefs.h <<\EOF
4977 #define NO_LOCKING 1
4981 echo "error: must be yes or no: --enable-locking=$enable_locking"
4987 ###############################################################################
4989 # The --enable-vt-locking option
4991 ###############################################################################
4993 #ac_vt_lockswitch=no
4994 #AC_ARG_ENABLE(vt-locking,[
4995 # --enable-vt-locking Compile in support for locking Virtual Terminals.
4996 # This is the default if the system supports it, and
4997 # if locking support is included (--enable-locking.)
4998 # --disable-vt-locking Do not allow locking of VTs, even if locking is
5000 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
5001 #if test "$enable_vt_locking" = yes; then
5003 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
5004 # [AC_TRY_COMPILE([#include <fcntl.h>
5005 # #include <sys/ioctl.h>
5006 # #include <sys/vt.h>],
5007 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
5008 # [ac_cv_vt_lockswitch=yes],
5009 # [ac_cv_vt_lockswitch=no])])
5010 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
5012 #elif test "$enable_vt_locking" = no; then
5015 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
5019 #if test "$ac_vt_lockswitch" = yes; then
5020 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
5021 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
5022 # # #### but it doesn't work yet, so don't worry about that for now.
5028 ###############################################################################
5032 ###############################################################################
5036 # Solaris systems tend to come with PAM misconfigured.
5037 # Don't build it by default, even if the headers exist.
5041 # Default to building PAM support on all other systems, if it exists.
5042 with_pam_default=yes
5047 with_pam_req=unspecified
5049 # Check whether --with-pam or --without-pam was given.
5050 if test "${with_pam+set}" = set; then
5052 with_pam="$withval"; with_pam_req="$withval"
5054 with_pam=$with_pam_default
5064 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
5065 echo "configure:5077: checking for PAM headers" >&5
5068 X_CFLAGS="-I$d $X_CFLAGS"
5069 echo "$ac_t""$d" 1>&6
5071 echo "$ac_t""not found ($d: no such directory)" 1>&6
5074 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
5075 echo "configure:5087: checking for PAM libs" >&5
5078 X_LIBS="-L$d $X_LIBS"
5079 echo "$ac_t""$d" 1>&6
5081 echo "$ac_t""not found ($d: no such directory)" 1>&6
5084 # replace the directory string with "yes".
5086 with_pam=$with_pam_req
5091 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
5092 echo " If it is a directory, then \`DIR/include' will be added to"
5093 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5099 if test "$enable_locking" = yes -a "$with_pam" = yes; then
5100 echo $ac_n "checking for PAM""... $ac_c" 1>&6
5101 echo "configure:5113: checking for PAM" >&5
5102 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
5103 echo $ac_n "(cached) $ac_c" 1>&6
5106 ac_save_CPPFLAGS="$CPPFLAGS"
5107 if test \! -z "$includedir" ; then
5108 CPPFLAGS="$CPPFLAGS -I$includedir"
5110 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5111 cat > conftest.$ac_ext <<EOF
5112 #line 5124 "configure"
5113 #include "confdefs.h"
5114 #include <security/pam_appl.h>
5119 if { (eval echo configure:5131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5123 echo "configure: failed program was:" >&5
5124 cat conftest.$ac_ext >&5
5129 CPPFLAGS="$ac_save_CPPFLAGS"
5132 echo "$ac_t""$ac_cv_pam" 1>&6
5133 if test "$ac_cv_pam" = yes ; then
5135 cat >> confdefs.h <<\EOF
5139 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
5141 # libpam typically requires dlopen and dlsym. On FreeBSD,
5142 # those are in libc. On Linux and Solaris, they're in libdl.
5143 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5144 echo "configure:5156: checking for dlopen in -ldl" >&5
5145 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5146 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5147 echo $ac_n "(cached) $ac_c" 1>&6
5149 ac_save_LIBS="$LIBS"
5151 cat > conftest.$ac_ext <<EOF
5152 #line 5164 "configure"
5153 #include "confdefs.h"
5154 /* Override any gcc2 internal prototype to avoid an error. */
5155 /* We use char because int might match the return type of a gcc2
5156 builtin and then its argument prototype would still apply. */
5163 if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5165 eval "ac_cv_lib_$ac_lib_var=yes"
5167 echo "configure: failed program was:" >&5
5168 cat conftest.$ac_ext >&5
5170 eval "ac_cv_lib_$ac_lib_var=no"
5173 LIBS="$ac_save_LIBS"
5176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5177 echo "$ac_t""yes" 1>&6
5178 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5180 echo "$ac_t""no" 1>&6
5184 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5185 echo "configure:5197: checking how to call pam_strerror" >&5
5186 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5187 echo $ac_n "(cached) $ac_c" 1>&6
5189 cat > conftest.$ac_ext <<EOF
5190 #line 5202 "configure"
5191 #include "confdefs.h"
5194 #include <security/pam_appl.h>
5196 pam_handle_t *pamh = 0;
5197 char *s = pam_strerror(pamh, PAM_SUCCESS);
5200 if { (eval echo configure:5212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5202 ac_pam_strerror_args=2
5204 echo "configure: failed program was:" >&5
5205 cat conftest.$ac_ext >&5
5207 cat > conftest.$ac_ext <<EOF
5208 #line 5220 "configure"
5209 #include "confdefs.h"
5212 #include <security/pam_appl.h>
5215 pam_strerror(PAM_SUCCESS);
5218 if { (eval echo configure:5230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5220 ac_pam_strerror_args=1
5222 echo "configure: failed program was:" >&5
5223 cat conftest.$ac_ext >&5
5225 ac_pam_strerror_args=0
5230 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5233 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5234 if test "$ac_pam_strerror_args" = 1 ; then
5235 echo "$ac_t""one argument" 1>&6
5236 elif test "$ac_pam_strerror_args" = 2 ; then
5237 cat >> confdefs.h <<\EOF
5238 #define PAM_STRERROR_TWO_ARGS 1
5241 echo "$ac_t""two arguments" 1>&6
5243 echo "$ac_t""unknown" 1>&6
5249 ###############################################################################
5251 # Check for Kerberos.
5253 ###############################################################################
5257 with_kerberos_req=unspecified
5259 # Check whether --with-kerberos or --without-kerberos was given.
5260 if test "${with_kerberos+set}" = set; then
5261 withval="$with_kerberos"
5262 with_kerberos="$withval"; with_kerberos_req="$withval"
5269 case "$with_kerberos" in
5274 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5275 echo "configure:5287: checking for Kerberos headers" >&5
5276 d=$with_kerberos/include
5278 X_CFLAGS="-I$d $X_CFLAGS"
5279 echo "$ac_t""$d" 1>&6
5281 echo "$ac_t""not found ($d: no such directory)" 1>&6
5284 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5285 echo "configure:5297: checking for Kerberos libs" >&5
5286 d=$with_kerberos/lib
5288 X_LIBS="-L$d $X_LIBS"
5289 echo "$ac_t""$d" 1>&6
5291 echo "$ac_t""not found ($d: no such directory)" 1>&6
5294 # replace the directory string with "yes".
5295 with_kerberos_req="yes"
5296 with_kerberos=$with_kerberos_req
5301 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5302 echo " If it is a directory, then \`DIR/include' will be added to"
5303 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5309 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5310 echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
5311 echo "configure:5323: checking for Kerberos 4" >&5
5312 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5313 echo $ac_n "(cached) $ac_c" 1>&6
5316 ac_save_CPPFLAGS="$CPPFLAGS"
5317 if test \! -z "$includedir" ; then
5318 CPPFLAGS="$CPPFLAGS -I$includedir"
5320 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5321 cat > conftest.$ac_ext <<EOF
5322 #line 5334 "configure"
5323 #include "confdefs.h"
5329 if { (eval echo configure:5341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5333 echo "configure: failed program was:" >&5
5334 cat conftest.$ac_ext >&5
5339 CPPFLAGS="$ac_save_CPPFLAGS"
5342 echo "$ac_t""$ac_cv_kerberos" 1>&6
5343 echo $ac_n "checking for Kerberos 5""... $ac_c" 1>&6
5344 echo "configure:5356: checking for Kerberos 5" >&5
5345 if eval "test \"`echo '$''{'ac_cv_kerberos5'+set}'`\" = set"; then
5346 echo $ac_n "(cached) $ac_c" 1>&6
5349 ac_save_CPPFLAGS="$CPPFLAGS"
5350 if test \! -z "$includedir" ; then
5351 CPPFLAGS="$CPPFLAGS -I$includedir"
5353 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5354 cat > conftest.$ac_ext <<EOF
5355 #line 5367 "configure"
5356 #include "confdefs.h"
5357 #include <kerberosIV/krb.h>
5362 if { (eval echo configure:5374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5366 echo "configure: failed program was:" >&5
5367 cat conftest.$ac_ext >&5
5372 CPPFLAGS="$ac_save_CPPFLAGS"
5375 echo "$ac_t""$ac_cv_kerberos5" 1>&6
5377 if test "$ac_cv_kerberos" = yes ; then
5379 cat >> confdefs.h <<\EOF
5380 #define HAVE_KERBEROS 1
5385 if test "$ac_cv_kerberos5" = yes ; then
5388 cat >> confdefs.h <<\EOF
5389 #define HAVE_KERBEROS 1
5392 cat >> confdefs.h <<\EOF
5393 #define HAVE_KERBEROS5 1
5398 if test "$have_kerberos5" = yes ; then
5399 # from Matt Knopp <mhat@infocalypse.netlag.com>
5400 # (who got it from amu@mit.edu)
5401 PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
5402 elif test "$have_kerberos" = yes ; then
5403 # from Tim Showalter <tjs+@andrew.cmu.edu>
5404 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
5407 if test "$have_kerberos" = yes ; then
5408 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5409 echo "configure:5421: checking for res_search" >&5
5410 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5411 echo $ac_n "(cached) $ac_c" 1>&6
5413 cat > conftest.$ac_ext <<EOF
5414 #line 5426 "configure"
5415 #include "confdefs.h"
5416 /* System header to define __stub macros and hopefully few prototypes,
5417 which can conflict with char res_search(); below. */
5419 /* Override any gcc2 internal prototype to avoid an error. */
5420 /* We use char because int might match the return type of a gcc2
5421 builtin and then its argument prototype would still apply. */
5426 /* The GNU C library defines this for functions which it implements
5427 to always fail with ENOSYS. Some functions are actually named
5428 something starting with __ and the normal name is an alias. */
5429 #if defined (__stub_res_search) || defined (__stub___res_search)
5437 if { (eval echo configure:5449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5439 eval "ac_cv_func_res_search=yes"
5441 echo "configure: failed program was:" >&5
5442 cat conftest.$ac_ext >&5
5444 eval "ac_cv_func_res_search=no"
5449 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5450 echo "$ac_t""yes" 1>&6
5453 echo "$ac_t""no" 1>&6
5454 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5455 echo "configure:5467: checking for res_search in -lresolv" >&5
5456 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5457 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5458 echo $ac_n "(cached) $ac_c" 1>&6
5460 ac_save_LIBS="$LIBS"
5461 LIBS="-lresolv $LIBS"
5462 cat > conftest.$ac_ext <<EOF
5463 #line 5475 "configure"
5464 #include "confdefs.h"
5465 /* Override any gcc2 internal prototype to avoid an error. */
5466 /* We use char because int might match the return type of a gcc2
5467 builtin and then its argument prototype would still apply. */
5474 if { (eval echo configure:5486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5476 eval "ac_cv_lib_$ac_lib_var=yes"
5478 echo "configure: failed program was:" >&5
5479 cat conftest.$ac_ext >&5
5481 eval "ac_cv_lib_$ac_lib_var=no"
5484 LIBS="$ac_save_LIBS"
5487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5488 echo "$ac_t""yes" 1>&6
5489 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
5491 echo "$ac_t""no" 1>&6
5492 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
5502 ###############################################################################
5504 # Check for the nine billion variants of shadow passwords...
5506 ###############################################################################
5511 with_shadow_req=unspecified
5513 # Check whether --with-shadow or --without-shadow was given.
5514 if test "${with_shadow+set}" = set; then
5515 withval="$with_shadow"
5516 with_shadow="$withval"; with_shadow_req="$withval"
5523 case "$with_shadow" in
5528 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
5529 echo "configure:5541: checking for shadow password headers" >&5
5530 d=$with_shadow/include
5532 X_CFLAGS="-I$d $X_CFLAGS"
5533 echo "$ac_t""$d" 1>&6
5535 echo "$ac_t""not found ($d: no such directory)" 1>&6
5538 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
5539 echo "configure:5551: checking for shadow password libs" >&5
5542 X_LIBS="-L$d $X_LIBS"
5543 echo "$ac_t""$d" 1>&6
5545 echo "$ac_t""not found ($d: no such directory)" 1>&6
5548 # replace the directory string with "yes".
5549 with_shadow_req="yes"
5550 with_shadow=$with_shadow_req
5555 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
5556 echo " If it is a directory, then \`DIR/include' will be added to"
5557 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5563 if test "$enable_locking" = no ; then
5569 ###############################################################################
5571 # Check for Sun "adjunct" passwords.
5573 ###############################################################################
5575 if test "$with_shadow" = yes ; then
5576 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
5577 echo "configure:5589: checking for Sun-style shadow passwords" >&5
5578 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
5579 echo $ac_n "(cached) $ac_c" 1>&6
5582 ac_save_CPPFLAGS="$CPPFLAGS"
5583 if test \! -z "$includedir" ; then
5584 CPPFLAGS="$CPPFLAGS -I$includedir"
5586 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5587 cat > conftest.$ac_ext <<EOF
5588 #line 5600 "configure"
5589 #include "confdefs.h"
5592 #include <sys/types.h>
5593 #include <sys/label.h>
5594 #include <sys/audit.h>
5597 struct passwd_adjunct *p = getpwanam("nobody");
5598 const char *pw = p->pwa_passwd;
5601 if { (eval echo configure:5613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5603 ac_cv_sun_adjunct=yes
5605 echo "configure: failed program was:" >&5
5606 cat conftest.$ac_ext >&5
5608 ac_cv_sun_adjunct=no
5611 CPPFLAGS="$ac_save_CPPFLAGS"
5614 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
5615 if test "$ac_cv_sun_adjunct" = yes; then
5616 have_shadow_adjunct=yes
5623 ###############################################################################
5625 # Check for DEC and SCO so-called "enhanced" security.
5627 ###############################################################################
5629 if test "$with_shadow" = yes ; then
5630 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
5631 echo "configure:5643: checking for DEC-style shadow passwords" >&5
5632 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
5633 echo $ac_n "(cached) $ac_c" 1>&6
5636 ac_save_CPPFLAGS="$CPPFLAGS"
5637 if test \! -z "$includedir" ; then
5638 CPPFLAGS="$CPPFLAGS -I$includedir"
5640 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5641 cat > conftest.$ac_ext <<EOF
5642 #line 5654 "configure"
5643 #include "confdefs.h"
5646 #include <sys/types.h>
5648 #include <sys/security.h>
5651 struct pr_passwd *p;
5653 set_auth_parameters(0, 0);
5654 check_auth_parameters();
5655 p = getprpwnam("nobody");
5656 pw = p->ufld.fd_encrypt;
5659 if { (eval echo configure:5671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5661 ac_cv_enhanced_passwd=yes
5663 echo "configure: failed program was:" >&5
5664 cat conftest.$ac_ext >&5
5666 ac_cv_enhanced_passwd=no
5669 CPPFLAGS="$ac_save_CPPFLAGS"
5672 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
5673 if test $ac_cv_enhanced_passwd = yes; then
5674 have_shadow_enhanced=yes
5678 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
5679 # (I'm told it needs -lcurses too, but I don't understand why.)
5680 # But on DEC, it's in -lsecurity.
5682 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
5683 echo "configure:5695: checking for getprpwnam in -lprot" >&5
5684 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
5685 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5686 echo $ac_n "(cached) $ac_c" 1>&6
5688 ac_save_LIBS="$LIBS"
5689 LIBS="-lprot -lx $LIBS"
5690 cat > conftest.$ac_ext <<EOF
5691 #line 5703 "configure"
5692 #include "confdefs.h"
5693 /* Override any gcc2 internal prototype to avoid an error. */
5694 /* We use char because int might match the return type of a gcc2
5695 builtin and then its argument prototype would still apply. */
5702 if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5704 eval "ac_cv_lib_$ac_lib_var=yes"
5706 echo "configure: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5709 eval "ac_cv_lib_$ac_lib_var=no"
5712 LIBS="$ac_save_LIBS"
5715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5716 echo "$ac_t""yes" 1>&6
5717 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
5719 echo "$ac_t""no" 1>&6
5720 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
5721 echo "configure:5733: checking for getprpwnam in -lsecurity" >&5
5722 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
5723 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5724 echo $ac_n "(cached) $ac_c" 1>&6
5726 ac_save_LIBS="$LIBS"
5727 LIBS="-lsecurity $LIBS"
5728 cat > conftest.$ac_ext <<EOF
5729 #line 5741 "configure"
5730 #include "confdefs.h"
5731 /* Override any gcc2 internal prototype to avoid an error. */
5732 /* We use char because int might match the return type of a gcc2
5733 builtin and then its argument prototype would still apply. */
5740 if { (eval echo configure:5752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5742 eval "ac_cv_lib_$ac_lib_var=yes"
5744 echo "configure: failed program was:" >&5
5745 cat conftest.$ac_ext >&5
5747 eval "ac_cv_lib_$ac_lib_var=no"
5750 LIBS="$ac_save_LIBS"
5753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5754 echo "$ac_t""yes" 1>&6
5755 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5757 echo "$ac_t""no" 1>&6
5765 ###############################################################################
5767 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
5769 ###############################################################################
5771 if test "$with_shadow" = yes ; then
5772 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5773 echo "configure:5785: checking for HP-style shadow passwords" >&5
5774 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5775 echo $ac_n "(cached) $ac_c" 1>&6
5778 ac_save_CPPFLAGS="$CPPFLAGS"
5779 if test \! -z "$includedir" ; then
5780 CPPFLAGS="$CPPFLAGS -I$includedir"
5782 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5783 cat > conftest.$ac_ext <<EOF
5784 #line 5796 "configure"
5785 #include "confdefs.h"
5788 #include <sys/types.h>
5790 #include <hpsecurity.h>
5793 struct s_passwd *p = getspwnam("nobody");
5794 const char *pw = p->pw_passwd;
5797 if { (eval echo configure:5809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5799 ac_cv_hpux_passwd=yes
5801 echo "configure: failed program was:" >&5
5802 cat conftest.$ac_ext >&5
5804 ac_cv_hpux_passwd=no
5807 CPPFLAGS="$ac_save_CPPFLAGS"
5810 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
5811 if test "$ac_cv_hpux_passwd" = yes; then
5812 have_shadow_hpux=yes
5816 # on HPUX, bigcrypt is in -lsec
5817 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
5818 echo "configure:5830: checking for bigcrypt in -lsec" >&5
5819 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
5820 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5821 echo $ac_n "(cached) $ac_c" 1>&6
5823 ac_save_LIBS="$LIBS"
5825 cat > conftest.$ac_ext <<EOF
5826 #line 5838 "configure"
5827 #include "confdefs.h"
5828 /* Override any gcc2 internal prototype to avoid an error. */
5829 /* We use char because int might match the return type of a gcc2
5830 builtin and then its argument prototype would still apply. */
5837 if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5839 eval "ac_cv_lib_$ac_lib_var=yes"
5841 echo "configure: failed program was:" >&5
5842 cat conftest.$ac_ext >&5
5844 eval "ac_cv_lib_$ac_lib_var=no"
5847 LIBS="$ac_save_LIBS"
5850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5851 echo "$ac_t""yes" 1>&6
5852 PASSWD_LIBS="$PASSWD_LIBS -lsec"
5854 echo "$ac_t""no" 1>&6
5861 ###############################################################################
5863 # Check for FreeBSD-style shadow passwords.
5865 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
5866 # password systems -- except you only get stuff in the pw_passwd field
5867 # if the running program is setuid. So, guess that we've got this
5868 # lossage to contend with if /etc/master.passwd exists, and default to
5869 # a setuid installation.
5871 ###############################################################################
5873 if test "$with_shadow" = yes ; then
5874 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
5875 echo "configure:5887: checking for FreeBSD-style shadow passwords" >&5
5876 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
5877 echo $ac_n "(cached) $ac_c" 1>&6
5879 if test -f /etc/master.passwd ; then
5880 ac_cv_master_passwd=yes
5882 ac_cv_master_passwd=no
5886 echo "$ac_t""$ac_cv_master_passwd" 1>&6
5887 if test "$ac_cv_master_passwd" = yes; then
5893 ###############################################################################
5895 # Check for traditional (ha!) shadow passwords.
5897 ###############################################################################
5899 if test "$with_shadow" = yes ; then
5900 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
5901 echo "configure:5913: checking for generic shadow passwords" >&5
5902 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
5903 echo $ac_n "(cached) $ac_c" 1>&6
5906 ac_save_CPPFLAGS="$CPPFLAGS"
5907 if test \! -z "$includedir" ; then
5908 CPPFLAGS="$CPPFLAGS -I$includedir"
5910 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5911 cat > conftest.$ac_ext <<EOF
5912 #line 5924 "configure"
5913 #include "confdefs.h"
5916 #include <sys/types.h>
5920 struct spwd *p = getspnam("nobody");
5921 const char *pw = p->sp_pwdp;
5924 if { (eval echo configure:5936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5928 echo "configure: failed program was:" >&5
5929 cat conftest.$ac_ext >&5
5934 CPPFLAGS="$ac_save_CPPFLAGS"
5937 echo "$ac_t""$ac_cv_shadow" 1>&6
5938 if test "$ac_cv_shadow" = yes; then
5942 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
5944 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
5945 echo "configure:5957: checking for getspnam in -lc" >&5
5946 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
5947 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5948 echo $ac_n "(cached) $ac_c" 1>&6
5950 ac_save_LIBS="$LIBS"
5952 cat > conftest.$ac_ext <<EOF
5953 #line 5965 "configure"
5954 #include "confdefs.h"
5955 /* Override any gcc2 internal prototype to avoid an error. */
5956 /* We use char because int might match the return type of a gcc2
5957 builtin and then its argument prototype would still apply. */
5964 if { (eval echo configure:5976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5966 eval "ac_cv_lib_$ac_lib_var=yes"
5968 echo "configure: failed program was:" >&5
5969 cat conftest.$ac_ext >&5
5971 eval "ac_cv_lib_$ac_lib_var=no"
5974 LIBS="$ac_save_LIBS"
5977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5978 echo "$ac_t""yes" 1>&6
5981 echo "$ac_t""no" 1>&6
5984 if test "$have_getspnam" = no ; then
5985 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
5986 echo "configure:5998: checking for getspnam in -lgen" >&5
5987 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
5988 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5989 echo $ac_n "(cached) $ac_c" 1>&6
5991 ac_save_LIBS="$LIBS"
5993 cat > conftest.$ac_ext <<EOF
5994 #line 6006 "configure"
5995 #include "confdefs.h"
5996 /* Override any gcc2 internal prototype to avoid an error. */
5997 /* We use char because int might match the return type of a gcc2
5998 builtin and then its argument prototype would still apply. */
6005 if { (eval echo configure:6017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6007 eval "ac_cv_lib_$ac_lib_var=yes"
6009 echo "configure: failed program was:" >&5
6010 cat conftest.$ac_ext >&5
6012 eval "ac_cv_lib_$ac_lib_var=no"
6015 LIBS="$ac_save_LIBS"
6018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6019 echo "$ac_t""yes" 1>&6
6020 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
6022 echo "$ac_t""no" 1>&6
6030 ###############################################################################
6032 # Check for other libraries needed for non-shadow passwords.
6034 ###############################################################################
6036 if test "$enable_locking" = yes ; then
6038 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
6040 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
6041 echo "configure:6053: checking for crypt in -lc" >&5
6042 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
6043 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6044 echo $ac_n "(cached) $ac_c" 1>&6
6046 ac_save_LIBS="$LIBS"
6048 cat > conftest.$ac_ext <<EOF
6049 #line 6061 "configure"
6050 #include "confdefs.h"
6051 /* Override any gcc2 internal prototype to avoid an error. */
6052 /* We use char because int might match the return type of a gcc2
6053 builtin and then its argument prototype would still apply. */
6060 if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6062 eval "ac_cv_lib_$ac_lib_var=yes"
6064 echo "configure: failed program was:" >&5
6065 cat conftest.$ac_ext >&5
6067 eval "ac_cv_lib_$ac_lib_var=no"
6070 LIBS="$ac_save_LIBS"
6073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6074 echo "$ac_t""yes" 1>&6
6077 echo "$ac_t""no" 1>&6
6080 if test "$have_crypt" = no ; then
6081 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6082 echo "configure:6094: checking for crypt in -lcrypt" >&5
6083 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6084 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6085 echo $ac_n "(cached) $ac_c" 1>&6
6087 ac_save_LIBS="$LIBS"
6088 LIBS="-lcrypt $LIBS"
6089 cat > conftest.$ac_ext <<EOF
6090 #line 6102 "configure"
6091 #include "confdefs.h"
6092 /* Override any gcc2 internal prototype to avoid an error. */
6093 /* We use char because int might match the return type of a gcc2
6094 builtin and then its argument prototype would still apply. */
6101 if { (eval echo configure:6113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6103 eval "ac_cv_lib_$ac_lib_var=yes"
6105 echo "configure: failed program was:" >&5
6106 cat conftest.$ac_ext >&5
6108 eval "ac_cv_lib_$ac_lib_var=no"
6111 LIBS="$ac_save_LIBS"
6114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6115 echo "$ac_t""yes" 1>&6
6116 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
6118 echo "$ac_t""no" 1>&6
6125 # Most of the above shadow mechanisms will have set need_setuid to yes,
6126 # if they were found. But, on some systems, we need setuid even when
6127 # using plain old vanilla passwords.
6129 if test "$enable_locking" = yes ; then
6131 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
6138 if test "$have_shadow_adjunct" = yes ; then
6139 cat >> confdefs.h <<\EOF
6140 #define HAVE_ADJUNCT_PASSWD 1
6143 elif test "$have_shadow_enhanced" = yes ; then
6144 cat >> confdefs.h <<\EOF
6145 #define HAVE_ENHANCED_PASSWD 1
6148 elif test "$have_shadow_hpux" = yes ; then
6149 cat >> confdefs.h <<\EOF
6150 #define HAVE_HPUX_PASSWD 1
6153 elif test "$have_shadow" = yes ; then
6154 cat >> confdefs.h <<\EOF
6155 #define HAVE_SHADOW_PASSWD 1
6161 ###############################################################################
6165 ###############################################################################
6168 with_motif_req=unspecified
6169 # Check whether --with-motif or --without-motif was given.
6170 if test "${with_motif+set}" = set; then
6171 withval="$with_motif"
6172 with_motif="$withval"; with_motif_req="$withval"
6179 case "$with_motif" in
6184 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
6185 echo "configure:6197: checking for Motif headers" >&5
6186 d=$with_motif/include
6188 X_CFLAGS="-I$d $X_CFLAGS"
6189 echo "$ac_t""$d" 1>&6
6191 echo "$ac_t""not found ($d: no such directory)" 1>&6
6194 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
6195 echo "configure:6207: checking for Motif libs" >&5
6198 X_LIBS="-L$d $X_LIBS"
6199 echo "$ac_t""$d" 1>&6
6201 echo "$ac_t""not found ($d: no such directory)" 1>&6
6204 # replace the directory string with "yes".
6205 with_motif_req="yes"
6206 with_motif=$with_motif_req
6211 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6212 echo " If it is a directory, then \`DIR/include' will be added to"
6213 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6219 if test "$with_motif" != yes -a "$with_motif" != no ; then
6220 echo "error: must be yes or no: --with-motif=$with_motif"
6224 if test "$with_motif" = yes; then
6227 ac_save_CPPFLAGS="$CPPFLAGS"
6228 if test \! -z "$includedir" ; then
6229 CPPFLAGS="$CPPFLAGS -I$includedir"
6231 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6232 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6233 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6234 echo "configure:6246: checking for Xm/Xm.h" >&5
6235 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6236 echo $ac_n "(cached) $ac_c" 1>&6
6238 cat > conftest.$ac_ext <<EOF
6239 #line 6251 "configure"
6240 #include "confdefs.h"
6243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6244 { (eval echo configure:6256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6246 if test -z "$ac_err"; then
6248 eval "ac_cv_header_$ac_safe=yes"
6251 echo "configure: failed program was:" >&5
6252 cat conftest.$ac_ext >&5
6254 eval "ac_cv_header_$ac_safe=no"
6258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6259 echo "$ac_t""yes" 1>&6
6261 cat >> confdefs.h <<\EOF
6262 #define HAVE_MOTIF 1
6265 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6267 echo "$ac_t""no" 1>&6
6270 CPPFLAGS="$ac_save_CPPFLAGS"
6274 if test "$have_motif" = yes; then
6276 ac_save_CPPFLAGS="$CPPFLAGS"
6277 if test \! -z "$includedir" ; then
6278 CPPFLAGS="$CPPFLAGS -I$includedir"
6280 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6281 ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
6282 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
6283 echo "configure:6295: checking for Xm/ComboBox.h" >&5
6284 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6285 echo $ac_n "(cached) $ac_c" 1>&6
6287 cat > conftest.$ac_ext <<EOF
6288 #line 6300 "configure"
6289 #include "confdefs.h"
6290 #include <Xm/ComboBox.h>
6292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6293 { (eval echo configure:6305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6295 if test -z "$ac_err"; then
6297 eval "ac_cv_header_$ac_safe=yes"
6300 echo "configure: failed program was:" >&5
6301 cat conftest.$ac_ext >&5
6303 eval "ac_cv_header_$ac_safe=no"
6307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6308 echo "$ac_t""yes" 1>&6
6309 cat >> confdefs.h <<\EOF
6310 #define HAVE_XMCOMBOBOX 1
6314 echo "$ac_t""no" 1>&6
6317 CPPFLAGS="$ac_save_CPPFLAGS"
6321 ###############################################################################
6323 # Check for -lgtk (and Gnome stuff)
6325 ###############################################################################
6328 with_gtk_req=unspecified
6329 # Check whether --with-gtk or --without-gtk was given.
6330 if test "${with_gtk+set}" = set; then
6332 with_gtk="$withval"; with_gtk_req="$withval"
6338 # if --with-gtk=/directory/ was specified, remember that directory so that
6339 # we can also look for the `gtk-config' program in that directory.
6355 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6356 echo "configure:6368: checking for Gtk headers" >&5
6359 X_CFLAGS="-I$d $X_CFLAGS"
6360 echo "$ac_t""$d" 1>&6
6362 echo "$ac_t""not found ($d: no such directory)" 1>&6
6365 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6366 echo "configure:6378: checking for Gtk libs" >&5
6369 X_LIBS="-L$d $X_LIBS"
6370 echo "$ac_t""$d" 1>&6
6372 echo "$ac_t""not found ($d: no such directory)" 1>&6
6375 # replace the directory string with "yes".
6377 with_gtk=$with_gtk_req
6382 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6383 echo " If it is a directory, then \`DIR/include' will be added to"
6384 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6390 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6391 echo "error: must be yes or no: --with-gtk=$with_gtk"
6396 with_gnome_req=unspecified
6397 # Check whether --with-gnome or --without-gnome was given.
6398 if test "${with_gnome+set}" = set; then
6399 withval="$with_gnome"
6400 with_gnome="$withval"; with_gnome_req="$withval"
6406 # if --with-gnome=/directory/ was specified, remember that directory so that
6407 # we can also look for the `gnome-config' program in that directory.
6408 case "$with_gnome" in
6410 gnome_dir="$with_gnome"
6418 case "$with_gnome" in
6423 echo $ac_n "checking for Gnome headers""... $ac_c" 1>&6
6424 echo "configure:6436: checking for Gnome headers" >&5
6425 d=$with_gnome/include
6427 X_CFLAGS="-I$d $X_CFLAGS"
6428 echo "$ac_t""$d" 1>&6
6430 echo "$ac_t""not found ($d: no such directory)" 1>&6
6433 echo $ac_n "checking for Gnome libs""... $ac_c" 1>&6
6434 echo "configure:6446: checking for Gnome libs" >&5
6437 X_LIBS="-L$d $X_LIBS"
6438 echo "$ac_t""$d" 1>&6
6440 echo "$ac_t""not found ($d: no such directory)" 1>&6
6443 # replace the directory string with "yes".
6444 with_gnome_req="yes"
6445 with_gnome=$with_gnome_req
6450 echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
6451 echo " If it is a directory, then \`DIR/include' will be added to"
6452 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6458 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
6459 echo "error: must be yes or no: --with-gnome=$with_gnome"
6465 if test "$with_gtk" = yes; then
6468 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6469 # for glib-config and gtk-config.
6473 if test ! -z "$gtk_dir"; then
6474 # canonicalize slashes.
6475 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6476 gtk_path="$gtk_dir:$gtk_path"
6479 if test ! -z "gnome_dir"; then
6480 # canonicalize slashes.
6481 gnome_dir=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
6482 gtk_path="$gnome_dir:$gtk_path"
6485 for ac_prog in glib12-config glib-config
6487 # Extract the first word of "$ac_prog", so it can be a program name with args.
6488 set dummy $ac_prog; ac_word=$2
6489 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6490 echo "configure:6502: checking for $ac_word" >&5
6491 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6492 echo $ac_n "(cached) $ac_c" 1>&6
6494 case "$glib_config" in
6496 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6499 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6502 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6503 ac_dummy="$gtk_path"
6504 for ac_dir in $ac_dummy; do
6505 test -z "$ac_dir" && ac_dir=.
6506 if test -f $ac_dir/$ac_word; then
6507 ac_cv_path_glib_config="$ac_dir/$ac_word"
6515 glib_config="$ac_cv_path_glib_config"
6516 if test -n "$glib_config"; then
6517 echo "$ac_t""$glib_config" 1>&6
6519 echo "$ac_t""no" 1>&6
6522 test -n "$glib_config" && break
6525 for ac_prog in gtk12-config gtk-config
6527 # Extract the first word of "$ac_prog", so it can be a program name with args.
6528 set dummy $ac_prog; ac_word=$2
6529 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6530 echo "configure:6542: checking for $ac_word" >&5
6531 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6532 echo $ac_n "(cached) $ac_c" 1>&6
6534 case "$gtk_config" in
6536 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6539 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6542 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6543 ac_dummy="$gtk_path"
6544 for ac_dir in $ac_dummy; do
6545 test -z "$ac_dir" && ac_dir=.
6546 if test -f $ac_dir/$ac_word; then
6547 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6555 gtk_config="$ac_cv_path_gtk_config"
6556 if test -n "$gtk_config"; then
6557 echo "$ac_t""$gtk_config" 1>&6
6559 echo "$ac_t""no" 1>&6
6562 test -n "$gtk_config" && break
6566 if test "$with_gnome" = yes; then
6567 for ac_prog in gnome-config
6569 # Extract the first word of "$ac_prog", so it can be a program name with args.
6570 set dummy $ac_prog; ac_word=$2
6571 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6572 echo "configure:6584: checking for $ac_word" >&5
6573 if eval "test \"`echo '$''{'ac_cv_path_gnome_config'+set}'`\" = set"; then
6574 echo $ac_n "(cached) $ac_c" 1>&6
6576 case "$gnome_config" in
6578 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
6581 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a dos path.
6584 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6585 ac_dummy="$gtk_path"
6586 for ac_dir in $ac_dummy; do
6587 test -z "$ac_dir" && ac_dir=.
6588 if test -f $ac_dir/$ac_word; then
6589 ac_cv_path_gnome_config="$ac_dir/$ac_word"
6597 gnome_config="$ac_cv_path_gnome_config"
6598 if test -n "$gnome_config"; then
6599 echo "$ac_t""$gnome_config" 1>&6
6601 echo "$ac_t""no" 1>&6
6604 test -n "$gnome_config" && break
6609 if test -n "$glib_config" -a -n "gtk_config" ; then
6611 if test "$with_gnome" = yes -a -n "$gnome_config" ; then
6616 if test "$have_gtk" = yes; then
6617 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6618 echo "configure:6630: checking Gtk version number" >&5
6619 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6620 echo $ac_n "(cached) $ac_c" 1>&6
6622 ac_cv_gtk_version_string=`$gtk_config --version`
6625 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6626 ac_gtk_version_string=$ac_cv_gtk_version_string
6629 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6630 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6632 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6633 if test -z "$ac_gtk_version"; then
6634 ac_gtk_version=unknown
6635 ac_gtk_version_string=unknown
6637 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6645 if test "$have_gtk" = yes; then
6646 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6647 echo "configure:6659: checking for Gtk includes" >&5
6648 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6649 echo $ac_n "(cached) $ac_c" 1>&6
6651 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6654 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6655 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6656 echo "configure:6668: checking for Gtk libs" >&5
6657 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6658 echo $ac_n "(cached) $ac_c" 1>&6
6660 ac_cv_gtk_config_libs=`$gtk_config --libs`
6663 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6665 ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
6666 ac_gtk_config_libs=$ac_cv_gtk_config_libs
6668 # Check for Gnome Capplet support.
6670 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6671 gnome_config_libs="capplet gnomeui"
6672 echo $ac_n "checking for Gnome capplet includes""... $ac_c" 1>&6
6673 echo "configure:6685: checking for Gnome capplet includes" >&5
6674 if eval "test \"`echo '$''{'ac_cv_gnome_config_cflags'+set}'`\" = set"; then
6675 echo $ac_n "(cached) $ac_c" 1>&6
6677 if ( $gnome_config --cflags $gnome_config_libs 2>&1 >/dev/null | \
6678 grep Unknown >/dev/null ) ; then
6679 ac_cv_gnome_config_cflags=''
6681 ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
6685 ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
6686 if test "$ac_gnome_config_cflags" = "" ; then
6688 echo "$ac_t""no" 1>&6
6690 echo "$ac_t""$ac_gnome_config_cflags" 1>&6
6694 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6695 echo $ac_n "checking for Gnome capplet libs""... $ac_c" 1>&6
6696 echo "configure:6708: checking for Gnome capplet libs" >&5
6697 if eval "test \"`echo '$''{'ac_cv_gnome_config_libs'+set}'`\" = set"; then
6698 echo $ac_n "(cached) $ac_c" 1>&6
6700 if ( $gnome_config --libs $gnome_config_libs 2>&1 >/dev/null |
6701 grep Unknown >/dev/null ) ; then
6702 ac_cv_gnome_config_libs=''
6704 ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
6708 ac_gnome_config_libs=$ac_cv_gnome_config_libs
6709 if test "$ac_gnome_config_libs" = "" ; then
6711 echo "$ac_t""no" 1>&6
6713 echo "$ac_t""$ac_gnome_config_libs" 1>&6
6718 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6719 GNOME_DATADIR=`$gnome_config --datadir`
6723 # If we have Gnome, then override the gtk-config values with
6724 # the gnome-config values.
6726 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6727 ac_gtk_config_cflags=$ac_gnome_config_cflags
6728 ac_gtk_config_libs=$ac_gnome_config_libs
6729 cat >> confdefs.h <<\EOF
6730 #define HAVE_CRAPPLET 1
6736 if test "$have_gtk" = yes; then
6737 INCLUDES="$INCLUDES $ac_gtk_config_cflags"
6738 GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
6739 cat >> confdefs.h <<\EOF
6748 ###############################################################################
6750 # Checking whether Motif is really Lesstif.
6752 ###############################################################################
6755 if test "$have_motif" = yes ; then
6756 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6757 echo "configure:6769: checking whether Motif is really LessTif" >&5
6758 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6759 echo $ac_n "(cached) $ac_c" 1>&6
6762 ac_save_CPPFLAGS="$CPPFLAGS"
6763 if test \! -z "$includedir" ; then
6764 CPPFLAGS="$CPPFLAGS -I$includedir"
6766 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6767 cat > conftest.$ac_ext <<EOF
6768 #line 6780 "configure"
6769 #include "confdefs.h"
6772 long vers = LesstifVersion;
6775 if { (eval echo configure:6787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6777 ac_cv_have_lesstif=yes
6779 echo "configure: failed program was:" >&5
6780 cat conftest.$ac_ext >&5
6782 ac_cv_have_lesstif=no
6785 CPPFLAGS="$ac_save_CPPFLAGS"
6788 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
6789 have_lesstif=$ac_cv_have_lesstif
6793 lesstif_version=unknown
6794 lesstif_version_string=unknown
6796 if test "$have_lesstif" = yes ; then
6798 echo unknown > conftest-lt
6799 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
6800 echo "configure:6812: checking LessTif version number" >&5
6801 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
6802 echo $ac_n "(cached) $ac_c" 1>&6
6805 ac_save_CPPFLAGS="$CPPFLAGS"
6806 if test \! -z "$includedir" ; then
6807 CPPFLAGS="$CPPFLAGS -I$includedir"
6809 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6810 if test "$cross_compiling" = yes; then
6811 ac_cv_lesstif_version=unknown
6812 ac_cv_lesstif_version_string=unknown
6814 cat > conftest.$ac_ext <<EOF
6815 #line 6827 "configure"
6816 #include "confdefs.h"
6820 FILE *f = fopen("conftest-lt", "w");
6822 fprintf(f, "%d %d.%d\n", LesstifVersion,
6823 LESSTIF_VERSION, LESSTIF_REVISION);
6828 if { (eval echo configure:6840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6830 ltv=`cat conftest-lt`
6831 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
6832 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
6834 echo "configure: failed program was:" >&5
6835 cat conftest.$ac_ext >&5
6837 ac_cv_lesstif_version=unknown
6838 ac_cv_lesstif_version_string=unknown
6843 CPPFLAGS="$ac_save_CPPFLAGS"
6846 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
6848 lesstif_version=$ac_cv_lesstif_version
6849 lesstif_version_string=$ac_cv_lesstif_version_string
6854 if test "$have_motif" = yes ; then
6856 echo unknown > conftest-mt
6857 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
6858 echo "configure:6870: checking Motif version number" >&5
6859 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
6860 echo $ac_n "(cached) $ac_c" 1>&6
6863 ac_save_CPPFLAGS="$CPPFLAGS"
6864 if test \! -z "$includedir" ; then
6865 CPPFLAGS="$CPPFLAGS -I$includedir"
6867 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6868 if test "$cross_compiling" = yes; then
6869 ac_cv_motif_version=unknown
6870 ac_cv_motif_version_string=unknown
6872 cat > conftest.$ac_ext <<EOF
6873 #line 6885 "configure"
6874 #include "confdefs.h"
6878 FILE *f = fopen("conftest-mt", "w");
6880 fprintf(f, "%d %d.%d\n", XmVersion,
6881 XmVERSION, XmREVISION);
6886 if { (eval echo configure:6898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6888 mtv=`cat conftest-mt`
6889 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
6890 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
6892 echo "configure: failed program was:" >&5
6893 cat conftest.$ac_ext >&5
6895 ac_cv_motif_version=unknown
6896 ac_cv_motif_version_string=unknown
6901 CPPFLAGS="$ac_save_CPPFLAGS"
6904 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
6906 motif_version=$ac_cv_motif_version
6907 motif_version_string=$ac_cv_motif_version_string
6912 ###############################################################################
6914 # Checking whether Motif requires -lXpm.
6916 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
6917 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
6918 # of the library whether to build the XPM code into libXm, or whether
6919 # to rely on an external libXm. So the only way to tell whether XPM is
6920 # a link-time requirement is to examine libXm.a, which is very
6921 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
6922 # always link against XPM if the XPM lib exists (and this will be a
6923 # no-op if libXm happens to already have the XPM code in it.)
6925 ###############################################################################
6927 motif_requires_xpm=no
6928 if test "$have_motif" = yes ; then
6929 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
6930 echo "configure:6942: checking whether Motif requires XPM" >&5
6931 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
6933 motif_requires_xpm=yes
6934 echo "$ac_t""maybe" 1>&6
6936 echo "$ac_t""no" 1>&6
6941 ###############################################################################
6943 # Checking whether Motif requires -lXp.
6945 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
6946 # Extension". Why this extension isn't in -lXext with all the others,
6949 ###############################################################################
6952 if test "$have_motif" = yes ; then
6955 ac_save_CPPFLAGS="$CPPFLAGS"
6956 ac_save_LDFLAGS="$LDFLAGS"
6957 # ac_save_LIBS="$LIBS"
6959 if test \! -z "$includedir" ; then
6960 CPPFLAGS="$CPPFLAGS -I$includedir"
6962 # note: $X_CFLAGS includes $x_includes
6963 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6965 if test \! -z "$libdir" ; then
6966 LDFLAGS="$LDFLAGS -L$libdir"
6968 # note: $X_LIBS includes $x_libraries
6969 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6971 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
6972 echo "configure:6984: checking for XpQueryExtension in -lXp" >&5
6973 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
6974 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6975 echo $ac_n "(cached) $ac_c" 1>&6
6977 ac_save_LIBS="$LIBS"
6978 LIBS="-lXp -lX11 -lXext -lm $LIBS"
6979 cat > conftest.$ac_ext <<EOF
6980 #line 6992 "configure"
6981 #include "confdefs.h"
6982 /* Override any gcc2 internal prototype to avoid an error. */
6983 /* We use char because int might match the return type of a gcc2
6984 builtin and then its argument prototype would still apply. */
6985 char XpQueryExtension();
6991 if { (eval echo configure:7003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6993 eval "ac_cv_lib_$ac_lib_var=yes"
6995 echo "configure: failed program was:" >&5
6996 cat conftest.$ac_ext >&5
6998 eval "ac_cv_lib_$ac_lib_var=no"
7001 LIBS="$ac_save_LIBS"
7004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7005 echo "$ac_t""yes" 1>&6
7006 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
7008 echo "$ac_t""no" 1>&6
7012 CPPFLAGS="$ac_save_CPPFLAGS"
7013 LDFLAGS="$ac_save_LDFLAGS"
7014 # LIBS="$ac_save_LIBS"
7019 ###############################################################################
7021 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
7023 ###############################################################################
7026 if test "$have_motif" = yes ; then
7028 ac_save_CPPFLAGS="$CPPFLAGS"
7029 ac_save_LDFLAGS="$LDFLAGS"
7030 # ac_save_LIBS="$LIBS"
7032 if test \! -z "$includedir" ; then
7033 CPPFLAGS="$CPPFLAGS -I$includedir"
7035 # note: $X_CFLAGS includes $x_includes
7036 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7038 if test \! -z "$libdir" ; then
7039 LDFLAGS="$LDFLAGS -L$libdir"
7041 # note: $X_LIBS includes $x_libraries
7042 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7044 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
7045 echo "configure:7057: checking for _Xsetlocale in -lXintl" >&5
7046 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
7047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7048 echo $ac_n "(cached) $ac_c" 1>&6
7050 ac_save_LIBS="$LIBS"
7051 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
7052 cat > conftest.$ac_ext <<EOF
7053 #line 7065 "configure"
7054 #include "confdefs.h"
7055 /* Override any gcc2 internal prototype to avoid an error. */
7056 /* We use char because int might match the return type of a gcc2
7057 builtin and then its argument prototype would still apply. */
7064 if { (eval echo configure:7076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7066 eval "ac_cv_lib_$ac_lib_var=yes"
7068 echo "configure: failed program was:" >&5
7069 cat conftest.$ac_ext >&5
7071 eval "ac_cv_lib_$ac_lib_var=no"
7074 LIBS="$ac_save_LIBS"
7077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7078 echo "$ac_t""yes" 1>&6
7081 echo "$ac_t""no" 1>&6
7085 CPPFLAGS="$ac_save_CPPFLAGS"
7086 LDFLAGS="$ac_save_LDFLAGS"
7087 # LIBS="$ac_save_LIBS"
7089 if test "$have_xintl" = yes; then
7090 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
7095 ###############################################################################
7097 # Check for -lGL or -lMesaGL.
7099 ###############################################################################
7103 with_gl_req=unspecified
7105 # Check whether --with-gl or --without-gl was given.
7106 if test "${with_gl+set}" = set; then
7108 with_gl="$withval"; with_gl_req="$withval"
7120 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
7121 echo "configure:7133: checking for GL headers" >&5
7124 X_CFLAGS="-I$d $X_CFLAGS"
7125 echo "$ac_t""$d" 1>&6
7127 echo "$ac_t""not found ($d: no such directory)" 1>&6
7130 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
7131 echo "configure:7143: checking for GL libs" >&5
7134 X_LIBS="-L$d $X_LIBS"
7135 echo "$ac_t""$d" 1>&6
7137 echo "$ac_t""not found ($d: no such directory)" 1>&6
7140 # replace the directory string with "yes".
7142 with_gl=$with_gl_req
7147 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
7148 echo " If it is a directory, then \`DIR/include' will be added to"
7149 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7155 ac_mesagl_version=unknown
7156 ac_mesagl_version_string=unknown
7158 if test "$with_gl" = yes; then
7160 ac_save_CPPFLAGS="$CPPFLAGS"
7161 if test \! -z "$includedir" ; then
7162 CPPFLAGS="$CPPFLAGS -I$includedir"
7164 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7165 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
7166 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
7167 echo "configure:7179: checking for GL/gl.h" >&5
7168 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7169 echo $ac_n "(cached) $ac_c" 1>&6
7171 cat > conftest.$ac_ext <<EOF
7172 #line 7184 "configure"
7173 #include "confdefs.h"
7176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7177 { (eval echo configure:7189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7179 if test -z "$ac_err"; then
7181 eval "ac_cv_header_$ac_safe=yes"
7184 echo "configure: failed program was:" >&5
7185 cat conftest.$ac_ext >&5
7187 eval "ac_cv_header_$ac_safe=no"
7191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7192 echo "$ac_t""yes" 1>&6
7195 echo "$ac_t""no" 1>&6
7198 CPPFLAGS="$ac_save_CPPFLAGS"
7199 if test "$have_gl" = yes ; then
7201 ac_save_CPPFLAGS="$CPPFLAGS"
7202 if test \! -z "$includedir" ; then
7203 CPPFLAGS="$CPPFLAGS -I$includedir"
7205 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7206 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
7207 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
7208 echo "configure:7220: checking for GL/glx.h" >&5
7209 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7210 echo $ac_n "(cached) $ac_c" 1>&6
7212 cat > conftest.$ac_ext <<EOF
7213 #line 7225 "configure"
7214 #include "confdefs.h"
7217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7218 { (eval echo configure:7230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7220 if test -z "$ac_err"; then
7222 eval "ac_cv_header_$ac_safe=yes"
7225 echo "configure: failed program was:" >&5
7226 cat conftest.$ac_ext >&5
7228 eval "ac_cv_header_$ac_safe=no"
7232 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7233 echo "$ac_t""yes" 1>&6
7236 echo "$ac_t""no" 1>&6
7239 CPPFLAGS="$ac_save_CPPFLAGS"
7242 # If we have the headers, try and figure out which vendor it's from.
7244 if test "$have_gl" = yes ; then
7246 # We need to know whether it's MesaGL so that we know which libraries
7249 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7250 echo "configure:7262: checking whether GL is really MesaGL" >&5
7251 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7252 echo $ac_n "(cached) $ac_c" 1>&6
7254 ac_cv_have_mesa_gl=no
7256 ac_save_CPPFLAGS="$CPPFLAGS"
7257 if test \! -z "$includedir" ; then
7258 CPPFLAGS="$CPPFLAGS -I$includedir"
7260 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7261 cat > conftest.$ac_ext <<EOF
7262 #line 7274 "configure"
7263 #include "confdefs.h"
7266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7267 egrep "Mesa|MESA" >/dev/null 2>&1; then
7269 ac_cv_have_mesa_gl=yes
7273 CPPFLAGS="$ac_save_CPPFLAGS"
7277 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7278 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7285 # Some versions of MesaGL are compiled to require -lpthread.
7286 # So if the Mesa headers exist, and -lpthread exists, then always
7287 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
7289 if test "$ac_have_mesa_gl" = yes; then
7290 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7291 echo "configure:7303: checking for pthread_create in -lpthread" >&5
7292 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7294 echo $ac_n "(cached) $ac_c" 1>&6
7296 ac_save_LIBS="$LIBS"
7297 LIBS="-lpthread $LIBS"
7298 cat > conftest.$ac_ext <<EOF
7299 #line 7311 "configure"
7300 #include "confdefs.h"
7301 /* Override any gcc2 internal prototype to avoid an error. */
7302 /* We use char because int might match the return type of a gcc2
7303 builtin and then its argument prototype would still apply. */
7304 char pthread_create();
7310 if { (eval echo configure:7322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7312 eval "ac_cv_lib_$ac_lib_var=yes"
7314 echo "configure: failed program was:" >&5
7315 cat conftest.$ac_ext >&5
7317 eval "ac_cv_lib_$ac_lib_var=no"
7320 LIBS="$ac_save_LIBS"
7323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7324 echo "$ac_t""yes" 1>&6
7327 echo "$ac_t""no" 1>&6
7333 # If we have Mesa headers, check to see if we can link against -lMesaGL.
7334 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
7335 # Else, warn that GL is busted. (We have the headers, but no libs.)
7338 if test "$ac_have_mesa_gl" = yes ; 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 -lMesaGL""... $ac_c" 1>&6
7357 echo "configure:7369: checking for glXCreateContext in -lMesaGL" >&5
7358 ac_lib_var=`echo MesaGL'_'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="-lMesaGL -lMesaGLU $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="-lMesaGL -lMesaGLU $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
7405 ac_save_CPPFLAGS="$CPPFLAGS"
7406 ac_save_LDFLAGS="$LDFLAGS"
7407 # ac_save_LIBS="$LIBS"
7409 if test \! -z "$includedir" ; then
7410 CPPFLAGS="$CPPFLAGS -I$includedir"
7412 # note: $X_CFLAGS includes $x_includes
7413 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7415 if test \! -z "$libdir" ; then
7416 LDFLAGS="$LDFLAGS -L$libdir"
7418 # note: $X_LIBS includes $x_libraries
7419 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7421 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7422 echo "configure:7434: checking for glXCreateContext in -lGL" >&5
7423 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7424 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7425 echo $ac_n "(cached) $ac_c" 1>&6
7427 ac_save_LIBS="$LIBS"
7428 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7429 cat > conftest.$ac_ext <<EOF
7430 #line 7442 "configure"
7431 #include "confdefs.h"
7432 /* Override any gcc2 internal prototype to avoid an error. */
7433 /* We use char because int might match the return type of a gcc2
7434 builtin and then its argument prototype would still apply. */
7435 char glXCreateContext();
7441 if { (eval echo configure:7453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7443 eval "ac_cv_lib_$ac_lib_var=yes"
7445 echo "configure: failed program was:" >&5
7446 cat conftest.$ac_ext >&5
7448 eval "ac_cv_lib_$ac_lib_var=no"
7451 LIBS="$ac_save_LIBS"
7454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7455 echo "$ac_t""yes" 1>&6
7457 GL_LIBS="-lGL -lGLU $GL_LIBS"
7459 echo "$ac_t""no" 1>&6
7462 CPPFLAGS="$ac_save_CPPFLAGS"
7463 LDFLAGS="$ac_save_LDFLAGS"
7464 # LIBS="$ac_save_LIBS"
7468 if test "$gl_lib_1" = "" ; then
7469 # we have headers, but no libs -- bail.
7474 # linking works -- we can build the GL hacks.
7475 cat >> confdefs.h <<\EOF
7479 if test "$ac_have_mesa_gl" = yes ; then
7480 cat >> confdefs.h <<\EOF
7481 #define HAVE_MESA_GL 1
7489 # Now that we know we have GL headers and libs, do some more GL testing.
7492 if test "$have_gl" = yes ; then
7493 # If it's MesaGL, we'd like to issue a warning if the version number
7494 # is less than or equal to 2.6, because that version had a security bug.
7496 if test "$ac_have_mesa_gl" = yes; then
7498 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7499 echo "configure:7511: checking MesaGL version number" >&5
7500 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7501 echo $ac_n "(cached) $ac_c" 1>&6
7503 cat > conftest.$ac_ext <<EOF
7504 #line 7516 "configure"
7505 #include "confdefs.h"
7507 #ifndef MESA_MAJOR_VERSION
7508 # include <GL/xmesa.h>
7509 # define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
7510 # define MESA_MINOR_VERSION XMESA_MINOR_VERSION
7512 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7515 ac_save_CPPFLAGS="$CPPFLAGS"
7516 if test \! -z "$includedir" ; then
7517 CPPFLAGS="$CPPFLAGS -I$includedir"
7519 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7523 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7524 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7527 rm -f conftest.$ac_ext
7529 CPPFLAGS="$ac_save_CPPFLAGS"
7531 if test "$mglv" = ""; then
7532 ac_mesagl_version=unknown
7533 ac_mesagl_version_string=unknown
7535 ac_mesagl_version_string=$mglv
7536 maj=`echo $mglv | sed -n 's/\..*//p'`
7537 min=`echo $mglv | sed -n 's/.*\.//p'`
7538 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7539 if test -z "$ac_mesagl_version"; then
7540 ac_mesagl_version=unknown
7541 ac_mesagl_version_string=unknown
7544 ac_cv_mesagl_version=$ac_mesagl_version
7545 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7549 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7550 ac_mesagl_version=$ac_cv_mesagl_version
7551 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7555 # Check for OpenGL 1.1 features.
7558 ac_save_CPPFLAGS="$CPPFLAGS"
7559 ac_save_LDFLAGS="$LDFLAGS"
7560 # ac_save_LIBS="$LIBS"
7562 if test \! -z "$includedir" ; then
7563 CPPFLAGS="$CPPFLAGS -I$includedir"
7565 # note: $X_CFLAGS includes $x_includes
7566 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7568 if test \! -z "$libdir" ; then
7569 LDFLAGS="$LDFLAGS -L$libdir"
7571 # note: $X_LIBS includes $x_libraries
7572 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7574 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7575 echo "configure:7587: checking for glBindTexture in -l$gl_lib_1" >&5
7576 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7577 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7578 echo $ac_n "(cached) $ac_c" 1>&6
7580 ac_save_LIBS="$LIBS"
7581 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7582 cat > conftest.$ac_ext <<EOF
7583 #line 7595 "configure"
7584 #include "confdefs.h"
7585 /* Override any gcc2 internal prototype to avoid an error. */
7586 /* We use char because int might match the return type of a gcc2
7587 builtin and then its argument prototype would still apply. */
7588 char glBindTexture();
7594 if { (eval echo configure:7606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7596 eval "ac_cv_lib_$ac_lib_var=yes"
7598 echo "configure: failed program was:" >&5
7599 cat conftest.$ac_ext >&5
7601 eval "ac_cv_lib_$ac_lib_var=no"
7604 LIBS="$ac_save_LIBS"
7607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7608 echo "$ac_t""yes" 1>&6
7609 cat >> confdefs.h <<\EOF
7610 #define HAVE_GLBINDTEXTURE 1
7614 echo "$ac_t""no" 1>&6
7618 CPPFLAGS="$ac_save_CPPFLAGS"
7619 LDFLAGS="$ac_save_LDFLAGS"
7620 # LIBS="$ac_save_LIBS"
7624 elif test "$with_gl" != no; then
7625 echo "error: must be yes or no: --with-gl=$with_gl"
7630 ###############################################################################
7634 ###############################################################################
7637 with_gle_req=unspecified
7639 # Check whether --with-gle or --without-gle was given.
7640 if test "${with_gle+set}" = set; then
7642 with_gle="$withval"; with_gle_req="$withval"
7654 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7655 echo "configure:7667: checking for GLE headers" >&5
7658 X_CFLAGS="-I$d $X_CFLAGS"
7659 echo "$ac_t""$d" 1>&6
7661 echo "$ac_t""not found ($d: no such directory)" 1>&6
7664 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7665 echo "configure:7677: checking for GLE libs" >&5
7668 X_LIBS="-L$d $X_LIBS"
7669 echo "$ac_t""$d" 1>&6
7671 echo "$ac_t""not found ($d: no such directory)" 1>&6
7674 # replace the directory string with "yes".
7676 with_gle=$with_gle_req
7681 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7682 echo " If it is a directory, then \`DIR/include' will be added to"
7683 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7691 if test "$with_gle" = yes; then
7694 ac_save_CPPFLAGS="$CPPFLAGS"
7695 if test \! -z "$includedir" ; then
7696 CPPFLAGS="$CPPFLAGS -I$includedir"
7698 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7699 ac_safe=`echo "GL/gle.h" | sed 'y%./+-%__p_%'`
7700 echo $ac_n "checking for GL/gle.h""... $ac_c" 1>&6
7701 echo "configure:7713: checking for GL/gle.h" >&5
7702 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7703 echo $ac_n "(cached) $ac_c" 1>&6
7705 cat > conftest.$ac_ext <<EOF
7706 #line 7718 "configure"
7707 #include "confdefs.h"
7710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7711 { (eval echo configure:7723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7713 if test -z "$ac_err"; then
7715 eval "ac_cv_header_$ac_safe=yes"
7718 echo "configure: failed program was:" >&5
7719 cat conftest.$ac_ext >&5
7721 eval "ac_cv_header_$ac_safe=no"
7725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7726 echo "$ac_t""yes" 1>&6
7729 echo "$ac_t""no" 1>&6
7732 CPPFLAGS="$ac_save_CPPFLAGS"
7733 if test "$have_gle3" = yes ; then
7737 ac_save_CPPFLAGS="$CPPFLAGS"
7738 if test \! -z "$includedir" ; then
7739 CPPFLAGS="$CPPFLAGS -I$includedir"
7741 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7742 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7743 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7744 echo "configure:7756: checking for GL/gutil.h" >&5
7745 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7746 echo $ac_n "(cached) $ac_c" 1>&6
7748 cat > conftest.$ac_ext <<EOF
7749 #line 7761 "configure"
7750 #include "confdefs.h"
7751 #include <GL/gutil.h>
7753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7754 { (eval echo configure:7766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7756 if test -z "$ac_err"; then
7758 eval "ac_cv_header_$ac_safe=yes"
7761 echo "configure: failed program was:" >&5
7762 cat conftest.$ac_ext >&5
7764 eval "ac_cv_header_$ac_safe=no"
7768 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7769 echo "$ac_t""yes" 1>&6
7772 echo "$ac_t""no" 1>&6
7775 CPPFLAGS="$ac_save_CPPFLAGS"
7776 if test "$have_gle" = yes ; then
7778 ac_save_CPPFLAGS="$CPPFLAGS"
7779 if test \! -z "$includedir" ; then
7780 CPPFLAGS="$CPPFLAGS -I$includedir"
7782 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7783 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
7784 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
7785 echo "configure:7797: checking for GL/tube.h" >&5
7786 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7787 echo $ac_n "(cached) $ac_c" 1>&6
7789 cat > conftest.$ac_ext <<EOF
7790 #line 7802 "configure"
7791 #include "confdefs.h"
7792 #include <GL/tube.h>
7794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7795 { (eval echo configure:7807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7797 if test -z "$ac_err"; then
7799 eval "ac_cv_header_$ac_safe=yes"
7802 echo "configure: failed program was:" >&5
7803 cat conftest.$ac_ext >&5
7805 eval "ac_cv_header_$ac_safe=no"
7809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7810 echo "$ac_t""yes" 1>&6
7813 echo "$ac_t""no" 1>&6
7816 CPPFLAGS="$ac_save_CPPFLAGS"
7820 if test "$have_gle" = yes ; then
7824 ac_save_CPPFLAGS="$CPPFLAGS"
7825 ac_save_LDFLAGS="$LDFLAGS"
7826 # ac_save_LIBS="$LIBS"
7828 if test \! -z "$includedir" ; then
7829 CPPFLAGS="$CPPFLAGS -I$includedir"
7831 # note: $X_CFLAGS includes $x_includes
7832 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7834 if test \! -z "$libdir" ; then
7835 LDFLAGS="$LDFLAGS -L$libdir"
7837 # note: $X_LIBS includes $x_libraries
7838 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7840 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
7841 echo "configure:7853: checking for gleCreateGC in -lgle" >&5
7842 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
7843 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7844 echo $ac_n "(cached) $ac_c" 1>&6
7846 ac_save_LIBS="$LIBS"
7847 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7848 cat > conftest.$ac_ext <<EOF
7849 #line 7861 "configure"
7850 #include "confdefs.h"
7851 /* Override any gcc2 internal prototype to avoid an error. */
7852 /* We use char because int might match the return type of a gcc2
7853 builtin and then its argument prototype would still apply. */
7860 if { (eval echo configure:7872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7862 eval "ac_cv_lib_$ac_lib_var=yes"
7864 echo "configure: failed program was:" >&5
7865 cat conftest.$ac_ext >&5
7867 eval "ac_cv_lib_$ac_lib_var=no"
7870 LIBS="$ac_save_LIBS"
7873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7874 echo "$ac_t""yes" 1>&6
7875 have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
7877 echo "$ac_t""no" 1>&6
7880 CPPFLAGS="$ac_save_CPPFLAGS"
7881 LDFLAGS="$ac_save_LDFLAGS"
7882 # LIBS="$ac_save_LIBS"
7885 if test "$have_gle" = yes ; then
7889 # sometimes the libmatrix stuff is included in libgle. look there first.
7891 # I don't get it. For some reason, this test passes on SGI, as if
7892 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
7893 # Yet the link is succeeding. Why???
7895 # AC_CHECK_X_LIB(gle, uview_direction_d,
7896 # [have_gle=yes; gle_halfassed=no],
7897 # [], $GL_LIBS -lX11 -lXext -lm)
7899 # As of GLE 3 this is in libgle, and has changed name to uview_direction!
7901 if test "$have_gle3" = yes ; then
7903 ac_save_CPPFLAGS="$CPPFLAGS"
7904 ac_save_LDFLAGS="$LDFLAGS"
7905 # ac_save_LIBS="$LIBS"
7907 if test \! -z "$includedir" ; then
7908 CPPFLAGS="$CPPFLAGS -I$includedir"
7910 # note: $X_CFLAGS includes $x_includes
7911 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7913 if test \! -z "$libdir" ; then
7914 LDFLAGS="$LDFLAGS -L$libdir"
7916 # note: $X_LIBS includes $x_libraries
7917 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7919 echo $ac_n "checking for uview_direction in -lgle""... $ac_c" 1>&6
7920 echo "configure:7932: checking for uview_direction in -lgle" >&5
7921 ac_lib_var=`echo gle'_'uview_direction | sed 'y%./+-%__p_%'`
7922 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7923 echo $ac_n "(cached) $ac_c" 1>&6
7925 ac_save_LIBS="$LIBS"
7926 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7927 cat > conftest.$ac_ext <<EOF
7928 #line 7940 "configure"
7929 #include "confdefs.h"
7930 /* Override any gcc2 internal prototype to avoid an error. */
7931 /* We use char because int might match the return type of a gcc2
7932 builtin and then its argument prototype would still apply. */
7933 char uview_direction();
7939 if { (eval echo configure:7951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7941 eval "ac_cv_lib_$ac_lib_var=yes"
7943 echo "configure: failed program was:" >&5
7944 cat conftest.$ac_ext >&5
7946 eval "ac_cv_lib_$ac_lib_var=no"
7949 LIBS="$ac_save_LIBS"
7952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7953 echo "$ac_t""yes" 1>&6
7954 have_gle=yes; gle_halfassed=no
7956 echo "$ac_t""no" 1>&6
7959 CPPFLAGS="$ac_save_CPPFLAGS"
7960 LDFLAGS="$ac_save_LDFLAGS"
7961 # LIBS="$ac_save_LIBS"
7964 # if it wasn't in libgle, then look in libmatrix.
7965 if test "$have_gle" = no ; then
7967 ac_save_CPPFLAGS="$CPPFLAGS"
7968 ac_save_LDFLAGS="$LDFLAGS"
7969 # ac_save_LIBS="$LIBS"
7971 if test \! -z "$includedir" ; then
7972 CPPFLAGS="$CPPFLAGS -I$includedir"
7974 # note: $X_CFLAGS includes $x_includes
7975 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7977 if test \! -z "$libdir" ; then
7978 LDFLAGS="$LDFLAGS -L$libdir"
7980 # note: $X_LIBS includes $x_libraries
7981 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7983 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
7984 echo "configure:7996: checking for uview_direction_d in -lmatrix" >&5
7985 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
7986 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7987 echo $ac_n "(cached) $ac_c" 1>&6
7989 ac_save_LIBS="$LIBS"
7990 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
7991 cat > conftest.$ac_ext <<EOF
7992 #line 8004 "configure"
7993 #include "confdefs.h"
7994 /* Override any gcc2 internal prototype to avoid an error. */
7995 /* We use char because int might match the return type of a gcc2
7996 builtin and then its argument prototype would still apply. */
7997 char uview_direction_d();
8003 if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8005 eval "ac_cv_lib_$ac_lib_var=yes"
8007 echo "configure: failed program was:" >&5
8008 cat conftest.$ac_ext >&5
8010 eval "ac_cv_lib_$ac_lib_var=no"
8013 LIBS="$ac_save_LIBS"
8016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8017 echo "$ac_t""yes" 1>&6
8018 have_gle=yes; gle_halfassed=no;
8019 GLE_LIBS="$GLE_LIBS -lmatrix"
8021 echo "$ac_t""no" 1>&6
8024 CPPFLAGS="$ac_save_CPPFLAGS"
8025 LDFLAGS="$ac_save_LDFLAGS"
8026 # LIBS="$ac_save_LIBS"
8031 if test "$have_gle" = yes ; then
8032 cat >> confdefs.h <<\EOF
8036 if test "$have_gle3" = yes ; then
8037 cat >> confdefs.h <<\EOF
8044 elif test "$with_gle" != no; then
8045 echo "error: must be yes or no: --with-gle=$with_gle"
8052 ###############################################################################
8056 ###############################################################################
8059 with_xpm_req=unspecified
8060 # Check whether --with-xpm or --without-xpm was given.
8061 if test "${with_xpm+set}" = set; then
8063 with_xpm="$withval"; with_xpm_req="$withval"
8075 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
8076 echo "configure:8088: checking for XPM headers" >&5
8079 X_CFLAGS="-I$d $X_CFLAGS"
8080 echo "$ac_t""$d" 1>&6
8082 echo "$ac_t""not found ($d: no such directory)" 1>&6
8085 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
8086 echo "configure:8098: checking for XPM libs" >&5
8089 X_LIBS="-L$d $X_LIBS"
8090 echo "$ac_t""$d" 1>&6
8092 echo "$ac_t""not found ($d: no such directory)" 1>&6
8095 # replace the directory string with "yes".
8097 with_xpm=$with_xpm_req
8102 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
8103 echo " If it is a directory, then \`DIR/include' will be added to"
8104 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8110 if test "$with_xpm" = yes; then
8112 ac_save_CPPFLAGS="$CPPFLAGS"
8113 if test \! -z "$includedir" ; then
8114 CPPFLAGS="$CPPFLAGS -I$includedir"
8116 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8117 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
8118 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
8119 echo "configure:8131: checking for X11/xpm.h" >&5
8120 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8121 echo $ac_n "(cached) $ac_c" 1>&6
8123 cat > conftest.$ac_ext <<EOF
8124 #line 8136 "configure"
8125 #include "confdefs.h"
8126 #include <X11/xpm.h>
8128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8129 { (eval echo configure:8141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8131 if test -z "$ac_err"; then
8133 eval "ac_cv_header_$ac_safe=yes"
8136 echo "configure: failed program was:" >&5
8137 cat conftest.$ac_ext >&5
8139 eval "ac_cv_header_$ac_safe=no"
8143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8144 echo "$ac_t""yes" 1>&6
8146 cat >> confdefs.h <<\EOF
8152 echo "$ac_t""no" 1>&6
8155 CPPFLAGS="$ac_save_CPPFLAGS"
8156 elif test "$with_xpm" != no; then
8157 echo "error: must be yes or no: --with-xpm=$with_xpm"
8161 # See comment near $motif_requires_xpm, above.
8162 # Need to do this here, after both Motif and XPM have been checked for.
8164 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
8165 if test "$motif_requires_xpm" = yes ; then
8166 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
8171 ###############################################################################
8173 # Check for the XSHM server extension.
8175 ###############################################################################
8178 with_xshm_req=unspecified
8179 # Check whether --with-xshm-ext or --without-xshm-ext was given.
8180 if test "${with_xshm_ext+set}" = set; then
8181 withval="$with_xshm_ext"
8182 with_xshm="$withval"; with_xshm_req="$withval"
8189 case "$with_xshm" in
8194 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
8195 echo "configure:8207: checking for XSHM headers" >&5
8196 d=$with_xshm/include
8198 X_CFLAGS="-I$d $X_CFLAGS"
8199 echo "$ac_t""$d" 1>&6
8201 echo "$ac_t""not found ($d: no such directory)" 1>&6
8204 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
8205 echo "configure:8217: checking for XSHM libs" >&5
8208 X_LIBS="-L$d $X_LIBS"
8209 echo "$ac_t""$d" 1>&6
8211 echo "$ac_t""not found ($d: no such directory)" 1>&6
8214 # replace the directory string with "yes".
8216 with_xshm=$with_xshm_req
8221 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
8222 echo " If it is a directory, then \`DIR/include' will be added to"
8223 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8229 if test "$with_xshm" = yes; then
8231 # first check for Xshm.h.
8233 ac_save_CPPFLAGS="$CPPFLAGS"
8234 if test \! -z "$includedir" ; then
8235 CPPFLAGS="$CPPFLAGS -I$includedir"
8237 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8238 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
8239 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
8240 echo "configure:8252: checking for X11/extensions/XShm.h" >&5
8241 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8242 echo $ac_n "(cached) $ac_c" 1>&6
8244 cat > conftest.$ac_ext <<EOF
8245 #line 8257 "configure"
8246 #include "confdefs.h"
8247 #include <X11/extensions/XShm.h>
8249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8250 { (eval echo configure:8262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8252 if test -z "$ac_err"; then
8254 eval "ac_cv_header_$ac_safe=yes"
8257 echo "configure: failed program was:" >&5
8258 cat conftest.$ac_ext >&5
8260 eval "ac_cv_header_$ac_safe=no"
8264 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8265 echo "$ac_t""yes" 1>&6
8268 echo "$ac_t""no" 1>&6
8271 CPPFLAGS="$ac_save_CPPFLAGS"
8273 # if that succeeded, then check for sys/ipc.h.
8274 if test "$have_xshm" = yes; then
8277 ac_save_CPPFLAGS="$CPPFLAGS"
8278 if test \! -z "$includedir" ; then
8279 CPPFLAGS="$CPPFLAGS -I$includedir"
8281 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8282 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
8283 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
8284 echo "configure:8296: checking for sys/ipc.h" >&5
8285 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8286 echo $ac_n "(cached) $ac_c" 1>&6
8288 cat > conftest.$ac_ext <<EOF
8289 #line 8301 "configure"
8290 #include "confdefs.h"
8291 #include <sys/ipc.h>
8293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8294 { (eval echo configure:8306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8296 if test -z "$ac_err"; then
8298 eval "ac_cv_header_$ac_safe=yes"
8301 echo "configure: failed program was:" >&5
8302 cat conftest.$ac_ext >&5
8304 eval "ac_cv_header_$ac_safe=no"
8308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8309 echo "$ac_t""yes" 1>&6
8312 echo "$ac_t""no" 1>&6
8315 CPPFLAGS="$ac_save_CPPFLAGS"
8318 # if that succeeded, then check for sys/shm.h.
8319 if test "$have_xshm" = yes; then
8322 ac_save_CPPFLAGS="$CPPFLAGS"
8323 if test \! -z "$includedir" ; then
8324 CPPFLAGS="$CPPFLAGS -I$includedir"
8326 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8327 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
8328 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
8329 echo "configure:8341: checking for sys/shm.h" >&5
8330 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8331 echo $ac_n "(cached) $ac_c" 1>&6
8333 cat > conftest.$ac_ext <<EOF
8334 #line 8346 "configure"
8335 #include "confdefs.h"
8336 #include <sys/shm.h>
8338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8339 { (eval echo configure:8351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8341 if test -z "$ac_err"; then
8343 eval "ac_cv_header_$ac_safe=yes"
8346 echo "configure: failed program was:" >&5
8347 cat conftest.$ac_ext >&5
8349 eval "ac_cv_header_$ac_safe=no"
8353 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8354 echo "$ac_t""yes" 1>&6
8357 echo "$ac_t""no" 1>&6
8360 CPPFLAGS="$ac_save_CPPFLAGS"
8363 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
8364 # to exist, but the library code to not exist. And even better, the library
8365 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
8366 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
8367 # that's not quite right, but close enough.)
8371 if `uname -v` -eq 3 ; then
8374 ac_save_CPPFLAGS="$CPPFLAGS"
8375 ac_save_LDFLAGS="$LDFLAGS"
8376 # ac_save_LIBS="$LIBS"
8378 if test \! -z "$includedir" ; then
8379 CPPFLAGS="$CPPFLAGS -I$includedir"
8381 # note: $X_CFLAGS includes $x_includes
8382 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8384 if test \! -z "$libdir" ; then
8385 LDFLAGS="$LDFLAGS -L$libdir"
8387 # note: $X_LIBS includes $x_libraries
8388 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8390 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
8391 echo "configure:8403: checking for XShmQueryExtension in -lXextSam" >&5
8392 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
8393 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8394 echo $ac_n "(cached) $ac_c" 1>&6
8396 ac_save_LIBS="$LIBS"
8397 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
8398 cat > conftest.$ac_ext <<EOF
8399 #line 8411 "configure"
8400 #include "confdefs.h"
8401 /* Override any gcc2 internal prototype to avoid an error. */
8402 /* We use char because int might match the return type of a gcc2
8403 builtin and then its argument prototype would still apply. */
8404 char XShmQueryExtension();
8407 XShmQueryExtension()
8410 if { (eval echo configure:8422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8412 eval "ac_cv_lib_$ac_lib_var=yes"
8414 echo "configure: failed program was:" >&5
8415 cat conftest.$ac_ext >&5
8417 eval "ac_cv_lib_$ac_lib_var=no"
8420 LIBS="$ac_save_LIBS"
8423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8424 echo "$ac_t""yes" 1>&6
8425 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
8427 echo "$ac_t""no" 1>&6
8431 CPPFLAGS="$ac_save_CPPFLAGS"
8432 LDFLAGS="$ac_save_LDFLAGS"
8433 # LIBS="$ac_save_LIBS"
8439 # if that succeeded, then we've really got it.
8440 if test "$have_xshm" = yes; then
8441 cat >> confdefs.h <<\EOF
8442 #define HAVE_XSHM_EXTENSION 1
8447 elif test "$with_xshm" != no; then
8448 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
8453 ###############################################################################
8455 # Check for the DOUBLE-BUFFER server extension.
8457 ###############################################################################
8460 with_xdbe_req=unspecified
8461 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
8462 if test "${with_xdbe_ext+set}" = set; then
8463 withval="$with_xdbe_ext"
8464 with_xdbe="$withval"; with_xdbe_req="$withval"
8471 case "$with_xdbe" in
8476 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
8477 echo "configure:8489: checking for DOUBLE-BUFFER headers" >&5
8478 d=$with_xdbe/include
8480 X_CFLAGS="-I$d $X_CFLAGS"
8481 echo "$ac_t""$d" 1>&6
8483 echo "$ac_t""not found ($d: no such directory)" 1>&6
8486 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
8487 echo "configure:8499: checking for DOUBLE-BUFFER libs" >&5
8490 X_LIBS="-L$d $X_LIBS"
8491 echo "$ac_t""$d" 1>&6
8493 echo "$ac_t""not found ($d: no such directory)" 1>&6
8496 # replace the directory string with "yes".
8498 with_xdbe=$with_xdbe_req
8503 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
8504 echo " If it is a directory, then \`DIR/include' will be added to"
8505 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8511 if test "$with_xdbe" = yes; then
8514 ac_save_CPPFLAGS="$CPPFLAGS"
8515 if test \! -z "$includedir" ; then
8516 CPPFLAGS="$CPPFLAGS -I$includedir"
8518 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8519 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8520 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8521 echo "configure:8533: checking for X11/extensions/Xdbe.h" >&5
8522 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8523 echo $ac_n "(cached) $ac_c" 1>&6
8525 cat > conftest.$ac_ext <<EOF
8526 #line 8538 "configure"
8527 #include "confdefs.h"
8528 #include <X11/extensions/Xdbe.h>
8530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8531 { (eval echo configure:8543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8533 if test -z "$ac_err"; then
8535 eval "ac_cv_header_$ac_safe=yes"
8538 echo "configure: failed program was:" >&5
8539 cat conftest.$ac_ext >&5
8541 eval "ac_cv_header_$ac_safe=no"
8545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8546 echo "$ac_t""yes" 1>&6
8549 echo "$ac_t""no" 1>&6
8552 CPPFLAGS="$ac_save_CPPFLAGS"
8553 if test "$have_xdbe" = yes; then
8554 cat >> confdefs.h <<\EOF
8555 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8560 elif test "$with_xdbe" != no; then
8561 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8566 ###############################################################################
8568 # Check for the SGI XReadDisplay server extension.
8570 # Note: this has to be down here, rather than up with the other server
8571 # extension tests, so that the output of `configure --help' is in the
8572 # right order. Arrgh!
8574 ###############################################################################
8577 with_readdisplay_req=unspecified
8578 # Check whether --with-readdisplay or --without-readdisplay was given.
8579 if test "${with_readdisplay+set}" = set; then
8580 withval="$with_readdisplay"
8581 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8583 with_readdisplay=yes
8588 case "$with_readdisplay" in
8593 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8594 echo "configure:8606: checking for XReadDisplay headers" >&5
8595 d=$with_readdisplay/include
8597 X_CFLAGS="-I$d $X_CFLAGS"
8598 echo "$ac_t""$d" 1>&6
8600 echo "$ac_t""not found ($d: no such directory)" 1>&6
8603 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8604 echo "configure:8616: checking for XReadDisplay libs" >&5
8605 d=$with_readdisplay/lib
8607 X_LIBS="-L$d $X_LIBS"
8608 echo "$ac_t""$d" 1>&6
8610 echo "$ac_t""not found ($d: no such directory)" 1>&6
8613 # replace the directory string with "yes".
8614 with_readdisplay_req="yes"
8615 with_readdisplay=$with_readdisplay_req
8620 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8621 echo " If it is a directory, then \`DIR/include' will be added to"
8622 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8628 if test "$with_readdisplay" = yes; then
8630 ac_save_CPPFLAGS="$CPPFLAGS"
8631 if test \! -z "$includedir" ; then
8632 CPPFLAGS="$CPPFLAGS -I$includedir"
8634 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8635 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8636 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8637 echo "configure:8649: checking for X11/extensions/readdisplay.h" >&5
8638 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8639 echo $ac_n "(cached) $ac_c" 1>&6
8641 cat > conftest.$ac_ext <<EOF
8642 #line 8654 "configure"
8643 #include "confdefs.h"
8644 #include <X11/extensions/readdisplay.h>
8646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8647 { (eval echo configure:8659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8649 if test -z "$ac_err"; then
8651 eval "ac_cv_header_$ac_safe=yes"
8654 echo "configure: failed program was:" >&5
8655 cat conftest.$ac_ext >&5
8657 eval "ac_cv_header_$ac_safe=no"
8661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8662 echo "$ac_t""yes" 1>&6
8663 cat >> confdefs.h <<\EOF
8664 #define HAVE_READ_DISPLAY_EXTENSION 1
8668 echo "$ac_t""no" 1>&6
8671 CPPFLAGS="$ac_save_CPPFLAGS"
8672 elif test "$with_readdisplay" != no; then
8673 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8678 ###############################################################################
8680 # Check for the SGI Iris Video Library.
8682 ###############################################################################
8685 with_sgivideo_req=unspecified
8686 # Check whether --with-sgivideo or --without-sgivideo was given.
8687 if test "${with_sgivideo+set}" = set; then
8688 withval="$with_sgivideo"
8689 with_sgivideo="$withval"; with_sgivideo_req="$withval"
8696 case "$with_sgivideo" in
8701 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
8702 echo "configure:8714: checking for Iris Video headers" >&5
8703 d=$with_sgivideo/include
8705 X_CFLAGS="-I$d $X_CFLAGS"
8706 echo "$ac_t""$d" 1>&6
8708 echo "$ac_t""not found ($d: no such directory)" 1>&6
8711 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
8712 echo "configure:8724: checking for Iris Video libs" >&5
8713 d=$with_sgivideo/lib
8715 X_LIBS="-L$d $X_LIBS"
8716 echo "$ac_t""$d" 1>&6
8718 echo "$ac_t""not found ($d: no such directory)" 1>&6
8721 # replace the directory string with "yes".
8722 with_sgivideo_req="yes"
8723 with_sgivideo=$with_sgivideo_req
8728 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8729 echo " If it is a directory, then \`DIR/include' will be added to"
8730 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8736 if test "$with_sgivideo" = yes; then
8738 ac_save_CPPFLAGS="$CPPFLAGS"
8739 if test \! -z "$includedir" ; then
8740 CPPFLAGS="$CPPFLAGS -I$includedir"
8742 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8743 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8744 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8745 echo "configure:8757: checking for dmedia/vl.h" >&5
8746 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8747 echo $ac_n "(cached) $ac_c" 1>&6
8749 cat > conftest.$ac_ext <<EOF
8750 #line 8762 "configure"
8751 #include "confdefs.h"
8752 #include <dmedia/vl.h>
8754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8755 { (eval echo configure:8767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8757 if test -z "$ac_err"; then
8759 eval "ac_cv_header_$ac_safe=yes"
8762 echo "configure: failed program was:" >&5
8763 cat conftest.$ac_ext >&5
8765 eval "ac_cv_header_$ac_safe=no"
8769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8770 echo "$ac_t""yes" 1>&6
8773 echo "$ac_t""no" 1>&6
8776 CPPFLAGS="$ac_save_CPPFLAGS"
8777 if test "$have_sgivideo" = yes; then
8779 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8780 echo "configure:8792: checking for vlOpenVideo in -lvl" >&5
8781 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8783 echo $ac_n "(cached) $ac_c" 1>&6
8785 ac_save_LIBS="$LIBS"
8787 cat > conftest.$ac_ext <<EOF
8788 #line 8800 "configure"
8789 #include "confdefs.h"
8790 /* Override any gcc2 internal prototype to avoid an error. */
8791 /* We use char because int might match the return type of a gcc2
8792 builtin and then its argument prototype would still apply. */
8799 if { (eval echo configure:8811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8801 eval "ac_cv_lib_$ac_lib_var=yes"
8803 echo "configure: failed program was:" >&5
8804 cat conftest.$ac_ext >&5
8806 eval "ac_cv_lib_$ac_lib_var=no"
8809 LIBS="$ac_save_LIBS"
8812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8813 echo "$ac_t""yes" 1>&6
8816 echo "$ac_t""no" 1>&6
8819 if test "$have_sgivideo" = yes; then
8820 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8821 SGI_VIDEO_LIBS="-lvl"
8822 cat >> confdefs.h <<\EOF
8823 #define HAVE_SGI_VIDEO 1
8828 elif test "$with_sgivideo" != no; then
8829 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8834 ###############################################################################
8836 # Check for a program to generate random text.
8838 # Zippy is funnier than the idiocy generally spat out by `fortune',
8839 # so try to find that, by invoking Emacs and asking it where its
8840 # libexec directory is ("yow" lives in there.)
8842 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8843 # and if so, use them.
8845 # If that doesn't work, look in /usr/games, and if it's there, use
8846 # the full pathname.
8848 ###############################################################################
8851 # Check whether --with-zippy or --without-zippy was given.
8852 if test "${with_zippy+set}" = set; then
8853 withval="$with_zippy"
8854 with_zippy_req="$withval"; with_zippy="$withval"
8860 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8865 if test -n "$with_zippy_req" ; then
8866 ac_cv_zippy_program=""
8867 case "$with_zippy_req" in
8869 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8870 echo "configure:8882: checking for $with_zippy_req" >&5
8871 if test -x "$with_zippy_req" ; then
8872 echo "$ac_t""yes" 1>&6
8874 echo "$ac_t""no" 1>&6
8880 unset ac_cv_path_zip2
8881 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8882 set dummy $with_zippy_req; ac_word=$2
8883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8884 echo "configure:8896: checking for $ac_word" >&5
8885 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8886 echo $ac_n "(cached) $ac_c" 1>&6
8890 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8893 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8896 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8898 for ac_dir in $ac_dummy; do
8899 test -z "$ac_dir" && ac_dir=.
8900 if test -f $ac_dir/$ac_word; then
8901 ac_cv_path_zip2="$ac_dir/$ac_word"
8909 zip2="$ac_cv_path_zip2"
8910 if test -n "$zip2"; then
8911 echo "$ac_t""$zip2" 1>&6
8913 echo "$ac_t""no" 1>&6
8916 if test "$zip2" = ""; then
8921 ac_cv_zippy_program="$with_zippy"
8923 elif test -n "$ac_cv_zippy_program"; then
8924 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8927 if test ! -n "$ac_cv_zippy_program"; then
8929 for ac_prog in emacs
8931 # Extract the first word of "$ac_prog", so it can be a program name with args.
8932 set dummy $ac_prog; ac_word=$2
8933 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8934 echo "configure:8946: checking for $ac_word" >&5
8935 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8936 echo $ac_n "(cached) $ac_c" 1>&6
8938 if test -n "$emacs_exe"; then
8939 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8941 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8943 for ac_dir in $ac_dummy; do
8944 test -z "$ac_dir" && ac_dir=.
8945 if test -f $ac_dir/$ac_word; then
8946 ac_cv_prog_emacs_exe="$ac_prog"
8953 emacs_exe="$ac_cv_prog_emacs_exe"
8954 if test -n "$emacs_exe"; then
8955 echo "$ac_t""$emacs_exe" 1>&6
8957 echo "$ac_t""no" 1>&6
8960 test -n "$emacs_exe" && break
8963 for ac_prog in xemacs
8965 # Extract the first word of "$ac_prog", so it can be a program name with args.
8966 set dummy $ac_prog; ac_word=$2
8967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8968 echo "configure:8980: checking for $ac_word" >&5
8969 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
8970 echo $ac_n "(cached) $ac_c" 1>&6
8972 if test -n "$xemacs_exe"; then
8973 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
8975 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8977 for ac_dir in $ac_dummy; do
8978 test -z "$ac_dir" && ac_dir=.
8979 if test -f $ac_dir/$ac_word; then
8980 ac_cv_prog_xemacs_exe="$ac_prog"
8987 xemacs_exe="$ac_cv_prog_xemacs_exe"
8988 if test -n "$xemacs_exe"; then
8989 echo "$ac_t""$xemacs_exe" 1>&6
8991 echo "$ac_t""no" 1>&6
8994 test -n "$xemacs_exe" && break
8998 ac_cv_zippy_program=""
8999 eargs='-batch -q -nw --eval'
9001 if test -n "$emacs_exe" ; then
9002 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
9003 echo "configure:9015: checking for emacs yow" >&5
9005 # get emacs to tell us where the libexec directory is.
9007 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
9008 2>/dev/null | tail -1`
9009 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
9011 # try running libexec/yow and see if it exits without error.
9013 if test x"$dir" != x -a -x "$dir/yow" ; then
9014 if $dir/yow >&- 2>&- ; then
9015 ac_cv_zippy_program="$dir/yow"
9016 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9018 echo "$ac_t""no" 1>&6
9023 if test -z "$ac_cv_zippy_program" ; then
9024 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
9025 echo "configure:9037: checking for xemacs yow" >&5
9026 if test -n "$xemacs_exe" ; then
9028 # get xemacs to tell us where the libexec directory is.
9030 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
9031 2>/dev/null | tail -1`
9032 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
9034 # try running libexec/yow and see if it exits without error.
9036 if test x"$dir" != x -a -x "$dir/yow" ; then
9037 if $dir/yow >&- 2>&- ; then
9038 ac_cv_zippy_program="$dir/yow"
9039 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9042 # in some xemacs installations, the pathname of the yow.lines file
9043 # isn't hardcoded into the yow executable, and must be passed on
9044 # the command line. See if it's in libexec/../etc/.
9048 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
9051 yowlines="$dir_up/etc/yow.lines"
9052 if $dir/yow -f $yowlines >&- 2>&- ; then
9053 ac_cv_zippy_program="$dir/yow -f $yowlines"
9054 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9057 # In newer XEmacs releases, yow.lines is in a different place,
9058 # and the easiest way to get it is by calling the new function
9059 # `locate-data-file'.
9061 yowlines=`$xemacs_exe $eargs \
9062 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
9063 2>/dev/null | tail -1`
9064 if $dir/yow -f $yowlines >&- 2>&- ; then
9065 ac_cv_zippy_program="$dir/yow -f $yowlines"
9066 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9068 echo "$ac_t""no" 1>&6
9076 # if that didn't work, try for some other programs...
9077 if test -z "$ac_cv_zippy_program" ; then
9079 for ac_prog in fortune zippy yow
9081 # Extract the first word of "$ac_prog", so it can be a program name with args.
9082 set dummy $ac_prog; ac_word=$2
9083 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9084 echo "configure:9096: checking for $ac_word" >&5
9085 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
9086 echo $ac_n "(cached) $ac_c" 1>&6
9088 if test -n "$fortune"; then
9089 ac_cv_prog_fortune="$fortune" # Let the user override the test.
9091 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9093 for ac_dir in $ac_dummy; do
9094 test -z "$ac_dir" && ac_dir=.
9095 if test -f $ac_dir/$ac_word; then
9096 ac_cv_prog_fortune="$ac_prog"
9103 fortune="$ac_cv_prog_fortune"
9104 if test -n "$fortune"; then
9105 echo "$ac_t""$fortune" 1>&6
9107 echo "$ac_t""no" 1>&6
9110 test -n "$fortune" && break
9113 # if that didn't work, try for those programs in /usr/games...
9114 if test -z "$fortune" ; then
9115 for ac_prog in fortune zippy yow
9117 # Extract the first word of "$ac_prog", so it can be a program name with args.
9118 set dummy $ac_prog; ac_word=$2
9119 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9120 echo "configure:9132: checking for $ac_word" >&5
9121 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
9122 echo $ac_n "(cached) $ac_c" 1>&6
9126 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
9129 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
9132 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9133 ac_dummy="/usr/games:/usr/local/games:$PATH"
9134 for ac_dir in $ac_dummy; do
9135 test -z "$ac_dir" && ac_dir=.
9136 if test -f $ac_dir/$ac_word; then
9137 ac_cv_path_fortune="$ac_dir/$ac_word"
9145 fortune="$ac_cv_path_fortune"
9146 if test -n "$fortune"; then
9147 echo "$ac_t""$fortune" 1>&6
9149 echo "$ac_t""no" 1>&6
9152 test -n "$fortune" && break
9154 test -n "$fortune" || fortune="fortune"
9160 if test -z "$ac_cv_zippy_program" ; then
9161 ac_cv_zippy_program=fortune
9164 cat >> confdefs.h <<EOF
9165 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
9170 ###############################################################################
9172 # Done testing. Now, set up the various -I and -L variables,
9173 # and decide which GUI program to build by default.
9175 ###############################################################################
9182 if test \! -z "$includedir" ; then
9183 INCLUDES="$INCLUDES -I$includedir"
9186 if test \! -z "$libdir" ; then
9187 LDFLAGS="$LDFLAGS -L$libdir"
9191 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9193 if test "$have_motif" = yes; then
9194 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9195 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9197 if test "$have_gtk" = yes; then
9198 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
9199 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9203 if test "$have_kerberos" = yes; then
9204 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
9205 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
9207 if test "$have_pam" = yes; then
9208 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
9209 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
9210 INSTALL_PAM="install-pam"
9212 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
9213 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
9216 if test "$enable_locking" = yes; then
9217 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
9218 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
9220 LOCK_SRCS='$(NOLOCK_SRCS_1)'
9221 LOCK_OBJS='$(NOLOCK_OBJS_1)'
9224 if test "$need_setuid" = yes; then
9226 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
9229 INSTALL_SETUID='$(INSTALL_PROGRAM)'
9233 if test "$have_gl" = yes; then
9234 GL_EXES='$(GL_EXES)'
9238 GL_KLUDGE="-${tab} "
9241 if test "$have_gle" = yes; then
9242 GLE_EXES='$(GLE_EXES)'
9243 GLE_MEN='$(GLE_MEN)'
9244 GLE_KLUDGE="${tab} "
9246 GLE_KLUDGE="-${tab} "
9250 ###############################################################################
9252 # Perform substitutions and write Makefiles.
9254 ###############################################################################
9294 APPDEFAULTS=$ac_x_app_defaults
9303 cat > confcache <<\EOF
9304 # This file is a shell script that caches the results of configure
9305 # tests run on this system so they can be shared between configure
9306 # scripts and configure runs. It is not useful on other systems.
9307 # If it contains results you don't want to keep, you may remove or edit it.
9309 # By default, configure uses ./config.cache as the cache file,
9310 # creating it if it does not exist already. You can give configure
9311 # the --cache-file=FILE option to use a different cache file; that is
9312 # what configure does when it calls configure scripts in
9313 # subdirectories, so they share the cache.
9314 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9315 # config.status only pays attention to the cache file if you give it the
9316 # --recheck option to rerun configure.
9319 # The following way of writing the cache mishandles newlines in values,
9320 # but we know of no workaround that is simple, portable, and efficient.
9321 # So, don't put newlines in cache variables' values.
9322 # Ultrix sh set writes to stderr and can't be redirected directly,
9323 # and sets the high bit in the cache file unless we assign to the vars.
9325 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9327 # `set' does not quote correctly, so add quotes (double-quote substitution
9328 # turns \\\\ into \\, and sed turns \\ into \).
9330 -e "s/'/'\\\\''/g" \
9331 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9334 # `set' quotes correctly as required by POSIX, so do not add quotes.
9335 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9338 if cmp -s $cache_file confcache; then
9341 if test -w $cache_file; then
9342 echo "updating cache $cache_file"
9343 cat confcache > $cache_file
9345 echo "not updating unwritable cache $cache_file"
9350 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9352 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9353 # Let make expand exec_prefix.
9354 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9356 # Any assignment to VPATH causes Sun make to only execute
9357 # the first set of double-colon rules, so remove it if not needed.
9358 # If there is a colon in the path, we need to keep it.
9359 if test "x$srcdir" = x.; then
9360 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9363 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9365 DEFS=-DHAVE_CONFIG_H
9367 # Without the "./", some shells look in PATH for config.status.
9368 : ${CONFIG_STATUS=./config.status}
9370 echo creating $CONFIG_STATUS
9371 rm -f $CONFIG_STATUS
9372 cat > $CONFIG_STATUS <<EOF
9374 # Generated automatically by configure.
9375 # Run this file to recreate the current configuration.
9376 # This directory was configured as follows,
9377 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9379 # $0 $ac_configure_args
9381 # Compiler output produced by configure, useful for debugging
9382 # configure, is in ./config.log if it exists.
9384 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9387 case "\$ac_option" in
9388 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9389 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9390 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9391 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9392 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9394 -help | --help | --hel | --he | --h)
9395 echo "\$ac_cs_usage"; exit 0 ;;
9396 *) echo "\$ac_cs_usage"; exit 1 ;;
9400 ac_given_srcdir=$srcdir
9401 ac_given_INSTALL="$INSTALL"
9403 trap 'rm -fr `echo "Makefile
9408 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9410 cat >> $CONFIG_STATUS <<EOF
9412 # Protect against being on the right side of a sed subst in config.status.
9413 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9414 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9418 s%@CFLAGS@%$CFLAGS%g
9419 s%@CPPFLAGS@%$CPPFLAGS%g
9420 s%@CXXFLAGS@%$CXXFLAGS%g
9421 s%@FFLAGS@%$FFLAGS%g
9423 s%@LDFLAGS@%$LDFLAGS%g
9425 s%@exec_prefix@%$exec_prefix%g
9426 s%@prefix@%$prefix%g
9427 s%@program_transform_name@%$program_transform_name%g
9428 s%@bindir@%$bindir%g
9429 s%@sbindir@%$sbindir%g
9430 s%@libexecdir@%$libexecdir%g
9431 s%@datadir@%$datadir%g
9432 s%@sysconfdir@%$sysconfdir%g
9433 s%@sharedstatedir@%$sharedstatedir%g
9434 s%@localstatedir@%$localstatedir%g
9435 s%@libdir@%$libdir%g
9436 s%@includedir@%$includedir%g
9437 s%@oldincludedir@%$oldincludedir%g
9438 s%@infodir@%$infodir%g
9439 s%@mandir@%$mandir%g
9441 s%@host_alias@%$host_alias%g
9442 s%@host_cpu@%$host_cpu%g
9443 s%@host_vendor@%$host_vendor%g
9444 s%@host_os@%$host_os%g
9447 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9448 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9449 s%@INSTALL_DATA@%$INSTALL_DATA%g
9450 s%@SET_MAKE@%$SET_MAKE%g
9452 s%@X_CFLAGS@%$X_CFLAGS%g
9453 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9454 s%@X_LIBS@%$X_LIBS%g
9455 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9456 s%@glib_config@%$glib_config%g
9457 s%@gtk_config@%$gtk_config%g
9458 s%@gnome_config@%$gnome_config%g
9460 s%@emacs_exe@%$emacs_exe%g
9461 s%@xemacs_exe@%$xemacs_exe%g
9462 s%@fortune@%$fortune%g
9463 s%@INCLUDES@%$INCLUDES%g
9464 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
9465 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
9466 s%@SAVER_LIBS@%$SAVER_LIBS%g
9467 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
9468 s%@GTK_LIBS@%$GTK_LIBS%g
9469 s%@HACK_LIBS@%$HACK_LIBS%g
9470 s%@XPM_LIBS@%$XPM_LIBS%g
9471 s%@GL_LIBS@%$GL_LIBS%g
9472 s%@GLE_LIBS@%$GLE_LIBS%g
9473 s%@XDPMS_LIBS@%$XDPMS_LIBS%g
9474 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
9475 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
9476 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
9477 s%@NEED_SETUID@%$NEED_SETUID%g
9478 s%@INSTALL_PAM@%$INSTALL_PAM%g
9479 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
9480 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
9481 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
9482 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
9483 s%@XMU_SRCS@%$XMU_SRCS%g
9484 s%@XMU_OBJS@%$XMU_OBJS%g
9485 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
9486 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
9487 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
9488 s%@LOCK_SRCS@%$LOCK_SRCS%g
9489 s%@LOCK_OBJS@%$LOCK_OBJS%g
9490 s%@GL_EXES@%$GL_EXES%g
9491 s%@GL_MEN@%$GL_MEN%g
9492 s%@GL_KLUDGE@%$GL_KLUDGE%g
9493 s%@GLE_EXES@%$GLE_EXES%g
9494 s%@GLE_MEN@%$GLE_MEN%g
9495 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
9496 s%@HACKDIR@%$HACKDIR%g
9497 s%@GNOME_DATADIR@%$GNOME_DATADIR%g
9498 s%@APPDEFAULTS@%$APPDEFAULTS%g
9499 s%@DEPEND@%$DEPEND%g
9500 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
9501 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
9506 cat >> $CONFIG_STATUS <<\EOF
9508 # Split the substitutions into bite-sized pieces for seds with
9509 # small command number limits, like on Digital OSF/1 and HP-UX.
9510 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9511 ac_file=1 # Number of current file.
9512 ac_beg=1 # First line for current file.
9513 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9516 while $ac_more_lines; do
9517 if test $ac_beg -gt 1; then
9518 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9520 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9522 if test ! -s conftest.s$ac_file; then
9524 rm -f conftest.s$ac_file
9526 if test -z "$ac_sed_cmds"; then
9527 ac_sed_cmds="sed -f conftest.s$ac_file"
9529 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9531 ac_file=`expr $ac_file + 1`
9533 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9536 if test -z "$ac_sed_cmds"; then
9541 cat >> $CONFIG_STATUS <<EOF
9543 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9548 driver/XScreenSaver.ad"}
9550 cat >> $CONFIG_STATUS <<\EOF
9551 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9552 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9554 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9555 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9556 *) ac_file_in="${ac_file}.in" ;;
9559 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9561 # Remove last slash and all that follows it. Not all systems have dirname.
9562 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9563 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9564 # The file is in a subdirectory.
9565 test ! -d "$ac_dir" && mkdir "$ac_dir"
9566 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9567 # A "../" for each directory in $ac_dir_suffix.
9568 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9570 ac_dir_suffix= ac_dots=
9573 case "$ac_given_srcdir" in
9575 if test -z "$ac_dots"; then top_srcdir=.
9576 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9577 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9579 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9580 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9583 case "$ac_given_INSTALL" in
9584 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9585 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9588 echo creating "$ac_file"
9590 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9592 *Makefile*) ac_comsub="1i\\
9593 # $configure_input" ;;
9597 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9599 s%@configure_input@%$configure_input%g
9600 s%@srcdir@%$srcdir%g
9601 s%@top_srcdir@%$top_srcdir%g
9602 s%@INSTALL@%$INSTALL%g
9603 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9607 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9608 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9610 # ac_d sets the value in "#define NAME VALUE" lines.
9611 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9612 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9615 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9616 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9617 ac_uB='\([ ]\)%\1#\2define\3'
9620 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9621 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9622 ac_eB='$%\1#\2define\3'
9626 if test "${CONFIG_HEADERS+set}" != set; then
9628 cat >> $CONFIG_STATUS <<EOF
9629 CONFIG_HEADERS="config.h"
9631 cat >> $CONFIG_STATUS <<\EOF
9633 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9634 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9636 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9637 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9638 *) ac_file_in="${ac_file}.in" ;;
9641 echo creating $ac_file
9643 rm -f conftest.frag conftest.in conftest.out
9644 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9645 cat $ac_file_inputs > conftest.in
9649 # Transform confdefs.h into a sed script conftest.vals that substitutes
9650 # the proper values into config.h.in to produce config.h. And first:
9651 # Protect against being on the right side of a sed subst in config.status.
9652 # Protect against being in an unquoted here document in config.status.
9654 cat > conftest.hdr <<\EOF
9657 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9661 sed -n -f conftest.hdr confdefs.h > conftest.vals
9664 # This sed command replaces #undef with comments. This is necessary, for
9665 # example, in the case of _POSIX_SOURCE, which is predefined and required
9666 # on some systems where configure will not decide to define it.
9667 cat >> conftest.vals <<\EOF
9668 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9671 # Break up conftest.vals because some shells have a limit on
9672 # the size of here documents, and old seds have small limits too.
9677 ac_lines=`grep -c . conftest.vals`
9678 # grep -c gives empty output for an empty file on some AIX systems.
9679 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9680 # Write a limited-size here document to conftest.frag.
9681 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9682 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9684 sed -f conftest.frag conftest.in > conftest.out
9686 mv conftest.out conftest.in
9688 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9690 mv conftest.tail conftest.vals
9694 cat >> $CONFIG_STATUS <<\EOF
9695 rm -f conftest.frag conftest.h
9696 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9697 cat conftest.in >> conftest.h
9699 if cmp -s $ac_file conftest.h 2>/dev/null; then
9700 echo "$ac_file is unchanged"
9703 # Remove last slash and all that follows it. Not all systems have dirname.
9704 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9705 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9706 # The file is in a subdirectory.
9707 test ! -d "$ac_dir" && mkdir "$ac_dir"
9710 mv conftest.h $ac_file
9715 cat >> $CONFIG_STATUS <<EOF
9718 cat >> $CONFIG_STATUS <<\EOF
9722 chmod +x $CONFIG_STATUS
9723 rm -fr confdefs* $ac_clean_files
9724 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9727 ###############################################################################
9729 # Print some warnings at the end.
9731 ###############################################################################
9733 warn_prefix_1=" Warning:"
9734 warn_prefix_2=" Note:"
9735 warn_prefix="$warn_prefix_1"
9738 warnsep=' #################################################################'
9741 if test "$warning" = no ; then
9742 echo '' ; echo "$warnsep" ; echo ''
9749 if test "$warning" = long ; then echo '' ; fi
9752 echo "$warn_prefix $rest"
9759 if test "$was" != no ; then echo '' ; fi
9761 echo "$warn_prefix $rest"
9771 warn_prefix="$warn_prefix_2"
9773 warn_prefix="$warn_prefix_1"
9777 warn_prefix="$warn_prefix_2"
9779 warn_prefix="$warn_prefix_1"
9783 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9784 warn 'The SGI saver extension was requested, but was not found.'
9787 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9788 warn 'The MIT saver extension was requested, but was not found.'
9791 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9792 warn 'The XIdle extension was requested, but was not found.'
9795 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9796 warn 'The XSHM extension was requested, but was not found.'
9799 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9800 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9803 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9804 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9807 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9808 warn 'The DPMS extension was requested, but was not found.'
9811 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9812 warn 'The XF86VMODE extension was requested, but was not found.'
9815 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9816 warn "Checking of /proc/interrupts was requested, but it's bogus."
9820 if test "$have_motif" = no -a "$have_gtk" = no; then
9821 warnL "Neither Motif nor Gtk seem to be available;"
9822 warn2 "the \`xscreensaver-demo' program requires one of these."
9824 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9825 warnL "Use of Motif was requested, but it wasn't found;"
9826 warn2 "Gtk will be used instead."
9828 elif test "$jurassic_gtk" = yes ; then
9832 v="$ac_gtk_version_string"
9833 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9834 warnL "Use of Gtk was requested, but its version number is unknown;"
9835 elif test "$with_gtk_req" = yes ; then
9836 warnL "Use of Gtk was requested, but it is version $v;"
9838 warnL "Gtk was found on this system, but it is version $v;"
9841 warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
9843 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9844 warnL "Use of Gtk was requested, but it wasn't found;"
9845 warn2 "Motif will be used instead."
9850 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
9851 warn 'Use of the Gnome Control Panel was requested, but the necessary'
9852 warn2 'headers and/or libraries were not found.'
9856 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9858 preferred_lesstif=0.86
9860 if test "$lesstif_version" = unknown; then
9861 warnL "Unable to determine the LessTif version number!"
9862 warn2 "Make sure you are using version $preferred_lesstif or newer."
9863 warn2 "See <http://www.lesstif.org/>."
9865 elif test \! $lesstif_version -gt 82; then
9866 warnL "LessTif version $lesstif_version_string is being used."
9867 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9868 warn2 "use with XScreenSaver; it is strongly recommended"
9869 warn2 "that you upgrade to at least version $preferred_lesstif!"
9870 warn2 "See <http://www.lesstif.org/>."
9876 if test "$have_xpm" = no ; then
9877 if test "$with_xpm_req" = yes ; then
9878 warnL 'Use of XPM was requested, but it was not found.'
9879 elif test "$with_xpm_req" = no ; then
9880 noteL 'The XPM library is not being used.'
9882 noteL 'The XPM library was not found.'
9886 warn2 'Some of the demos will not be as colorful as they'
9887 warn2 'could be. You might want to consider installing XPM'
9888 warn2 'and re-running configure. (Remember to delete the'
9889 warn2 'config.cache file first.) You can find XPM at most'
9890 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9894 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9895 preferred_mesagl=3.0
9897 if test "$ac_mesagl_version" = unknown; then
9898 warnL "Unable to determine the MesaGL version number!"
9899 warn2 "Make sure you are using version $preferred_mesagl or newer."
9901 elif test \! "$ac_mesagl_version" -gt 2006; then
9902 warnL "MesaGL version $ac_mesagl_version_string is being used."
9903 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9904 warn2 "It is strongly recommended that you upgrade to at"
9905 warn2 "least version $preferred_mesagl."
9909 if test "$have_gl" = no ; then
9910 if test "$with_gl_req" = yes ; then
9911 warnL 'Use of GL was requested, but it was not found.'
9912 elif test "$with_gl_req" = no ; then
9913 noteL 'The OpenGL 3D library is not being used.'
9915 noteL 'The OpenGL 3D library was not found.'
9918 if test "$gl_halfassed" = yes ; then
9920 warn2 'More specifically, we found the headers, but not the'
9921 warn2 'libraries; so either GL is half-installed on this'
9922 warn2 "system, or something else went wrong. The \`config.log'"
9923 warn2 'file might contain some clues.'
9927 warn2 'Those demos which use 3D will not be built or installed.'
9928 warn2 'You might want to consider installing OpenGL and'
9929 warn2 're-running configure. (Remember to delete the'
9930 warn2 "config.cache file first.) If your vendor doesn't ship"
9931 warn2 'their own implementation of OpenGL, you can get a free'
9932 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
9933 warn2 'info, see <http://www.opengl.org/>.'
9938 if test "$have_gl" = yes -a "$have_gle" = no ; then
9939 if test "$with_gle_req" = yes ; then
9940 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
9941 warn2 'it was not found (though the OpenGL library was found, and'
9942 warn2 'is being used.)'
9943 elif test "$with_gle_req" = no ; then
9944 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
9945 warn2 'library is not.'
9947 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
9951 if test "$gle_halfassed" = yes ; then
9953 warn2 'More specifically, we found the headers, but not the'
9954 warn2 'libraries; so either GLE is half-installed on this'
9955 warn2 "system, or something else went wrong. The \`config.log'"
9956 warn2 'file might contain some clues.'
9960 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
9961 warn2 'will not be built or installed. You might want to consider'
9962 warn2 'installing GLE and re-running configure. (Remember to delete'
9963 warn2 'the config.cache file first.) You can find the GLE library'
9964 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
9965 warn2 'see <http://www.opengl.org/>.'
9970 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
9971 warn 'Use of XReadDisplay was requested, but it was not found.'
9974 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
9975 warn 'Use of the Iris Video Library was requested, but it was not found.'
9978 if test -n "$with_zippy_req"; then
9979 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
9980 warnL "$with_zippy_req was requested as the Zippy program,"
9981 warn2 "but was not found. The default will be used instead."
9985 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
9986 warn 'Use of Kerberos was requested, but it was not found.'
9989 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
9990 warn 'Use of PAM was requested, but it was not found.'
9993 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
9994 warn 'Use of shadow passwords was requested, but they were not found.'
9998 # You are in a twisty maze of namespaces and syntaxes, all alike.
9999 # Fuck the skull of Unix.
10001 eval bindir=${bindir}
10002 eval bindir=${bindir}
10003 eval bindir=${bindir}
10004 eval bindir=${bindir}
10005 eval bindir=${bindir}
10006 eval bindir=${bindir}
10007 eval HACKDIR=${HACKDIR}
10008 eval HACKDIR=${HACKDIR}
10009 eval HACKDIR=${HACKDIR}
10010 eval HACKDIR=${HACKDIR}
10011 eval HACKDIR=${HACKDIR}
10012 eval HACKDIR=${HACKDIR}
10014 # canonicalize slashes.
10015 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
10016 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10019 # Sanity check the subdir
10020 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
10021 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
10023 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
10024 There will be an executable installed with that name, so
10025 that can't be the name of a directory as well. Please
10026 re-configure with a different directory name." 1>&2; exit 1; }
10033 # Now let's see if there's a previous RPM version already installed. Blargh!
10037 rpmv=`(rpm -qv xscreensaver) 2>&- | \
10038 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/'`
10041 if test \! -z "$rpmv" ; then
10042 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
10043 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
10046 warnL "There is already an installed RPM of xscreensaver $rpmv"
10047 warn2 "on this system. You might want to remove it (with"
10048 warn2 '"rpm -ve xscreensaver") before running "make install"'
10049 warn2 "from this directory."
10051 warn2 "Alternately, you could build this version of xscreensaver"
10052 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
10053 warn2 "file is included. See the RPM documentation for more info."
10056 if test "$rpmbdir" = "$rpmhdir" ; then
10057 warn2 "The RPM version was installed in $rpmbdir."
10059 warn2 "The RPM version was installed in $rpmbdir,"
10060 warn2 "with demos in $rpmhdir."
10067 # Warn about egregious GNOME bogosity.
10069 #if (rpm -qv control-center) >&- 2>&- ; then
10071 # warnL "The Gnome Control Center seems to be installed."
10073 # warn2 "Note that simply installing this version of xscreensaver"
10074 # warn2 "will not cause GNOME to know about the newly-added display"
10075 # warn2 "modes -- GNOME is just lame that way. Instead of using the"
10076 # warn2 "Control Center, try using the \`xscreensaver-demo' command."
10080 if test "${bindir}" = "${HACKDIR}" ; then
10084 if test "$do_dir_warning" = yes; then
10088 echo ' When you run "make install", the "xscreensaver",'
10089 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
10090 echo " will be installed in ${bindir}."
10092 echo " The various graphics demos (100+ different executables) will"
10093 echo " also be installed in ${HACKDIR}."
10095 echo " If you would prefer the demos to be installed elsewhere"
10096 echo " (for example, in a dedicated directory) you should re-run"
10097 echo " configure with the --enable-subdir=DIR option. For more"
10098 echo " information, run $0 --help."
10102 if test "$warning" != no; then
10103 echo '' ; echo "$warnsep" ; echo ''