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
1145 if test "$ac_gcc_accepts_std" = yes ; then
1147 # -std=c89 defines __STRICT_ANSI__, which we don't want.
1148 # (That appears to be the only additional preprocessor symbol
1149 # it defines, in addition to the syntax changes it makes.)
1151 # -std=gnu89 is no good, because // comments were a GNU
1152 # extension before they were in the ANSI C 99 spec...
1154 CC="$CC -std=c89 -U__STRICT_ANSI__"
1157 CC="$CC -Wp,-lang-c89"
1161 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1162 echo "configure:1174: checking how to run the C preprocessor" >&5
1163 # On Suns, sometimes $CPP names a directory.
1164 if test -n "$CPP" && test -d "$CPP"; then
1167 if test -z "$CPP"; then
1168 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1169 echo $ac_n "(cached) $ac_c" 1>&6
1171 # This must be in double quotes, not single quotes, because CPP may get
1172 # substituted into the Makefile and "${CC-cc}" will confuse make.
1174 # On the NeXT, cc -E runs the code through the compiler's parser,
1175 # not just through cpp.
1176 cat > conftest.$ac_ext <<EOF
1177 #line 1189 "configure"
1178 #include "confdefs.h"
1182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1183 { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1185 if test -z "$ac_err"; then
1189 echo "configure: failed program was:" >&5
1190 cat conftest.$ac_ext >&5
1192 CPP="${CC-cc} -E -traditional-cpp"
1193 cat > conftest.$ac_ext <<EOF
1194 #line 1206 "configure"
1195 #include "confdefs.h"
1199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1200 { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1202 if test -z "$ac_err"; then
1206 echo "configure: failed program was:" >&5
1207 cat conftest.$ac_ext >&5
1209 CPP="${CC-cc} -nologo -E"
1210 cat > conftest.$ac_ext <<EOF
1211 #line 1223 "configure"
1212 #include "confdefs.h"
1216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1217 { (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1219 if test -z "$ac_err"; then
1223 echo "configure: failed program was:" >&5
1224 cat conftest.$ac_ext >&5
1233 ac_cv_prog_CPP="$CPP"
1235 CPP="$ac_cv_prog_CPP"
1237 ac_cv_prog_CPP="$CPP"
1239 echo "$ac_t""$CPP" 1>&6
1241 echo $ac_n "checking for working const""... $ac_c" 1>&6
1242 echo "configure:1254: checking for working const" >&5
1243 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1244 echo $ac_n "(cached) $ac_c" 1>&6
1246 cat > conftest.$ac_ext <<EOF
1247 #line 1259 "configure"
1248 #include "confdefs.h"
1252 /* Ultrix mips cc rejects this. */
1253 typedef int charset[2]; const charset x;
1254 /* SunOS 4.1.1 cc rejects this. */
1255 char const *const *ccp;
1257 /* NEC SVR4.0.2 mips cc rejects this. */
1258 struct point {int x, y;};
1259 static struct point const zero = {0,0};
1260 /* AIX XL C 1.02.0.0 rejects this.
1261 It does not let you subtract one const X* pointer from another in an arm
1262 of an if-expression whose if-part is not a constant expression */
1263 const char *g = "string";
1264 ccp = &g + (g ? g-g : 0);
1265 /* HPUX 7.0 cc rejects these. */
1268 ccp = (char const *const *) p;
1269 { /* SCO 3.2v4 cc rejects this. */
1271 char const *s = 0 ? (char *) 0 : (char const *) 0;
1275 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1277 const int *foo = &x[0];
1280 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1281 typedef const int *iptr;
1285 { /* AIX XL C 1.02.0.0 rejects this saying
1286 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1287 struct s { int j; const int *ap[3]; };
1288 struct s *b; b->j = 5;
1290 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1296 if { (eval echo configure:1308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1300 echo "configure: failed program was:" >&5
1301 cat conftest.$ac_ext >&5
1308 echo "$ac_t""$ac_cv_c_const" 1>&6
1309 if test $ac_cv_c_const = no; then
1310 cat >> confdefs.h <<\EOF
1316 echo $ac_n "checking for inline""... $ac_c" 1>&6
1317 echo "configure:1329: checking for inline" >&5
1318 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1319 echo $ac_n "(cached) $ac_c" 1>&6
1322 for ac_kw in inline __inline__ __inline; do
1323 cat > conftest.$ac_ext <<EOF
1324 #line 1336 "configure"
1325 #include "confdefs.h"
1331 if { (eval echo configure:1343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1333 ac_cv_c_inline=$ac_kw; break
1335 echo "configure: failed program was:" >&5
1336 cat conftest.$ac_ext >&5
1343 echo "$ac_t""$ac_cv_c_inline" 1>&6
1344 case "$ac_cv_c_inline" in
1346 no) cat >> confdefs.h <<\EOF
1350 *) cat >> confdefs.h <<EOF
1351 #define inline $ac_cv_c_inline
1356 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
1357 echo $ac_n "checking for bc""... $ac_c" 1>&6
1358 echo "configure:1370: checking for bc" >&5
1359 if test "$ac_bc_result" = "15" ; then
1360 echo "$ac_t""yes" 1>&6
1362 echo "$ac_t""no" 1>&6
1364 { echo "configure: error: Your system doesn't have \"bc\", which has been a standard
1365 part of Unix since the 1970s. Come back when your vendor
1366 has grown a clue." 1>&2; exit 1; }
1370 # stuff for Makefiles
1371 # Find a good install program. We prefer a C program (faster),
1372 # so one script is as good as another. But avoid the broken or
1373 # incompatible versions:
1374 # SysV /etc/install, /usr/sbin/install
1375 # SunOS /usr/etc/install
1376 # IRIX /sbin/install
1378 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1379 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1380 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1381 # ./install, which can be erroneously created by make from ./install.sh.
1382 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1383 echo "configure:1395: checking for a BSD compatible install" >&5
1384 if test -z "$INSTALL"; then
1385 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1386 echo $ac_n "(cached) $ac_c" 1>&6
1388 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1389 for ac_dir in $PATH; do
1390 # Account for people who put trailing slashes in PATH elements.
1392 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1394 # OSF1 and SCO ODT 3.0 have their own names for install.
1395 # Don't use installbsd from OSF since it installs stuff as root
1397 for ac_prog in ginstall scoinst install; do
1398 if test -f $ac_dir/$ac_prog; then
1399 if test $ac_prog = install &&
1400 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1401 # AIX install. It has an incompatible calling convention.
1404 ac_cv_path_install="$ac_dir/$ac_prog -c"
1415 if test "${ac_cv_path_install+set}" = set; then
1416 INSTALL="$ac_cv_path_install"
1418 # As a last resort, use the slow shell script. We don't cache a
1419 # path for INSTALL within a source directory, because that will
1420 # break other packages using the cache if that directory is
1421 # removed, or if the path is relative.
1422 INSTALL="$ac_install_sh"
1425 echo "$ac_t""$INSTALL" 1>&6
1427 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1428 # It thinks the first close brace ends the variable substitution.
1429 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1431 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1433 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1435 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1436 echo "configure:1448: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1437 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1438 echo $ac_n "(cached) $ac_c" 1>&6
1440 ac_cv_install_d_creates_dirs=no
1442 if mkdir conftestdir; then
1444 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1445 if test -d dir1/dir2/. ; then
1446 ac_cv_install_d_creates_dirs=yes
1454 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1456 if test "$ac_cv_install_d_creates_dirs" = no ; then
1457 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1458 echo "configure:1470: checking whether \"mkdir -p\" creates intermediate directories" >&5
1459 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1460 echo $ac_n "(cached) $ac_c" 1>&6
1462 ac_cv_mkdir_p_creates_dirs=no
1464 if mkdir conftestdir; then
1466 mkdir -p dir1/dir2 >&- 2>&-
1467 if test -d dir1/dir2/. ; then
1468 ac_cv_mkdir_p_creates_dirs=yes
1476 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1479 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1480 INSTALL_DIRS='${INSTALL} -d'
1481 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1482 INSTALL_DIRS='mkdir -p'
1485 INSTALL_DIRS='${INSTALL} -d'
1488 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1489 echo "configure:1501: checking whether ${MAKE-make} sets \${MAKE}" >&5
1490 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1491 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1492 echo $ac_n "(cached) $ac_c" 1>&6
1494 cat > conftestmake <<\EOF
1496 @echo 'ac_maketemp="${MAKE}"'
1498 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1499 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1500 if test -n "$ac_maketemp"; then
1501 eval ac_cv_prog_make_${ac_make}_set=yes
1503 eval ac_cv_prog_make_${ac_make}_set=no
1507 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1508 echo "$ac_t""yes" 1>&6
1511 echo "$ac_t""no" 1>&6
1512 SET_MAKE="MAKE=${MAKE-make}"
1517 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1518 echo "configure:1530: checking for ANSI C header files" >&5
1519 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1520 echo $ac_n "(cached) $ac_c" 1>&6
1522 cat > conftest.$ac_ext <<EOF
1523 #line 1535 "configure"
1524 #include "confdefs.h"
1530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1531 { (eval echo configure:1543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1533 if test -z "$ac_err"; then
1535 ac_cv_header_stdc=yes
1538 echo "configure: failed program was:" >&5
1539 cat conftest.$ac_ext >&5
1541 ac_cv_header_stdc=no
1545 if test $ac_cv_header_stdc = yes; then
1546 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1547 cat > conftest.$ac_ext <<EOF
1548 #line 1560 "configure"
1549 #include "confdefs.h"
1552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1553 egrep "memchr" >/dev/null 2>&1; then
1557 ac_cv_header_stdc=no
1563 if test $ac_cv_header_stdc = yes; then
1564 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1565 cat > conftest.$ac_ext <<EOF
1566 #line 1578 "configure"
1567 #include "confdefs.h"
1570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1571 egrep "free" >/dev/null 2>&1; then
1575 ac_cv_header_stdc=no
1581 if test $ac_cv_header_stdc = yes; then
1582 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1583 if test "$cross_compiling" = yes; then
1586 cat > conftest.$ac_ext <<EOF
1587 #line 1599 "configure"
1588 #include "confdefs.h"
1590 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1591 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1592 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1593 int main () { int i; for (i = 0; i < 256; i++)
1594 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1598 if { (eval echo configure:1610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1602 echo "configure: failed program was:" >&5
1603 cat conftest.$ac_ext >&5
1605 ac_cv_header_stdc=no
1613 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1614 if test $ac_cv_header_stdc = yes; then
1615 cat >> confdefs.h <<\EOF
1616 #define STDC_HEADERS 1
1621 for ac_hdr in unistd.h
1623 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1624 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1625 echo "configure:1637: checking for $ac_hdr" >&5
1626 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1627 echo $ac_n "(cached) $ac_c" 1>&6
1629 cat > conftest.$ac_ext <<EOF
1630 #line 1642 "configure"
1631 #include "confdefs.h"
1634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1635 { (eval echo configure:1647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1637 if test -z "$ac_err"; then
1639 eval "ac_cv_header_$ac_safe=yes"
1642 echo "configure: failed program was:" >&5
1643 cat conftest.$ac_ext >&5
1645 eval "ac_cv_header_$ac_safe=no"
1649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1650 echo "$ac_t""yes" 1>&6
1651 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1652 cat >> confdefs.h <<EOF
1653 #define $ac_tr_hdr 1
1657 echo "$ac_t""no" 1>&6
1661 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1662 echo "configure:1674: checking for mode_t" >&5
1663 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1664 echo $ac_n "(cached) $ac_c" 1>&6
1666 cat > conftest.$ac_ext <<EOF
1667 #line 1679 "configure"
1668 #include "confdefs.h"
1669 #include <sys/types.h>
1675 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1676 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1678 ac_cv_type_mode_t=yes
1681 ac_cv_type_mode_t=no
1686 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1687 if test $ac_cv_type_mode_t = no; then
1688 cat >> confdefs.h <<\EOF
1694 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1695 echo "configure:1707: checking for pid_t" >&5
1696 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1697 echo $ac_n "(cached) $ac_c" 1>&6
1699 cat > conftest.$ac_ext <<EOF
1700 #line 1712 "configure"
1701 #include "confdefs.h"
1702 #include <sys/types.h>
1708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1709 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1711 ac_cv_type_pid_t=yes
1719 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1720 if test $ac_cv_type_pid_t = no; then
1721 cat >> confdefs.h <<\EOF
1727 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1728 echo "configure:1740: checking for size_t" >&5
1729 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1730 echo $ac_n "(cached) $ac_c" 1>&6
1732 cat > conftest.$ac_ext <<EOF
1733 #line 1745 "configure"
1734 #include "confdefs.h"
1735 #include <sys/types.h>
1741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1742 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1744 ac_cv_type_size_t=yes
1747 ac_cv_type_size_t=no
1752 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1753 if test $ac_cv_type_size_t = no; then
1754 cat >> confdefs.h <<\EOF
1755 #define size_t unsigned
1760 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1761 echo "configure:1773: checking return type of signal handlers" >&5
1762 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1765 cat > conftest.$ac_ext <<EOF
1766 #line 1778 "configure"
1767 #include "confdefs.h"
1768 #include <sys/types.h>
1774 extern "C" void (*signal (int, void (*)(int)))(int);
1776 void (*signal ()) ();
1783 if { (eval echo configure:1795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1785 ac_cv_type_signal=void
1787 echo "configure: failed program was:" >&5
1788 cat conftest.$ac_ext >&5
1790 ac_cv_type_signal=int
1795 echo "$ac_t""$ac_cv_type_signal" 1>&6
1796 cat >> confdefs.h <<EOF
1797 #define RETSIGTYPE $ac_cv_type_signal
1801 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1802 echo "configure:1814: checking whether time.h and sys/time.h may both be included" >&5
1803 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1804 echo $ac_n "(cached) $ac_c" 1>&6
1806 cat > conftest.$ac_ext <<EOF
1807 #line 1819 "configure"
1808 #include "confdefs.h"
1809 #include <sys/types.h>
1810 #include <sys/time.h>
1816 if { (eval echo configure:1828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1818 ac_cv_header_time=yes
1820 echo "configure: failed program was:" >&5
1821 cat conftest.$ac_ext >&5
1823 ac_cv_header_time=no
1828 echo "$ac_t""$ac_cv_header_time" 1>&6
1829 if test $ac_cv_header_time = yes; then
1830 cat >> confdefs.h <<\EOF
1831 #define TIME_WITH_SYS_TIME 1
1836 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1837 echo "configure:1849: checking for sys/wait.h that is POSIX.1 compatible" >&5
1838 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1839 echo $ac_n "(cached) $ac_c" 1>&6
1841 cat > conftest.$ac_ext <<EOF
1842 #line 1854 "configure"
1843 #include "confdefs.h"
1844 #include <sys/types.h>
1845 #include <sys/wait.h>
1847 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1850 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1855 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1858 if { (eval echo configure:1870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1860 ac_cv_header_sys_wait_h=yes
1862 echo "configure: failed program was:" >&5
1863 cat conftest.$ac_ext >&5
1865 ac_cv_header_sys_wait_h=no
1870 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1871 if test $ac_cv_header_sys_wait_h = yes; then
1872 cat >> confdefs.h <<\EOF
1873 #define HAVE_SYS_WAIT_H 1
1879 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1881 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1882 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1883 echo "configure:1895: checking for $ac_hdr that defines DIR" >&5
1884 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1885 echo $ac_n "(cached) $ac_c" 1>&6
1887 cat > conftest.$ac_ext <<EOF
1888 #line 1900 "configure"
1889 #include "confdefs.h"
1890 #include <sys/types.h>
1896 if { (eval echo configure:1908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1898 eval "ac_cv_header_dirent_$ac_safe=yes"
1900 echo "configure: failed program was:" >&5
1901 cat conftest.$ac_ext >&5
1903 eval "ac_cv_header_dirent_$ac_safe=no"
1907 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1908 echo "$ac_t""yes" 1>&6
1909 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1910 cat >> confdefs.h <<EOF
1911 #define $ac_tr_hdr 1
1913 ac_header_dirent=$ac_hdr; break
1915 echo "$ac_t""no" 1>&6
1918 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1919 if test $ac_header_dirent = dirent.h; then
1920 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1921 echo "configure:1933: checking for opendir in -ldir" >&5
1922 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1923 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1924 echo $ac_n "(cached) $ac_c" 1>&6
1926 ac_save_LIBS="$LIBS"
1928 cat > conftest.$ac_ext <<EOF
1929 #line 1941 "configure"
1930 #include "confdefs.h"
1931 /* Override any gcc2 internal prototype to avoid an error. */
1932 /* We use char because int might match the return type of a gcc2
1933 builtin and then its argument prototype would still apply. */
1940 if { (eval echo configure:1952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1942 eval "ac_cv_lib_$ac_lib_var=yes"
1944 echo "configure: failed program was:" >&5
1945 cat conftest.$ac_ext >&5
1947 eval "ac_cv_lib_$ac_lib_var=no"
1950 LIBS="$ac_save_LIBS"
1953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1954 echo "$ac_t""yes" 1>&6
1957 echo "$ac_t""no" 1>&6
1961 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1962 echo "configure:1974: checking for opendir in -lx" >&5
1963 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1964 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1965 echo $ac_n "(cached) $ac_c" 1>&6
1967 ac_save_LIBS="$LIBS"
1969 cat > conftest.$ac_ext <<EOF
1970 #line 1982 "configure"
1971 #include "confdefs.h"
1972 /* Override any gcc2 internal prototype to avoid an error. */
1973 /* We use char because int might match the return type of a gcc2
1974 builtin and then its argument prototype would still apply. */
1981 if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1983 eval "ac_cv_lib_$ac_lib_var=yes"
1985 echo "configure: failed program was:" >&5
1986 cat conftest.$ac_ext >&5
1988 eval "ac_cv_lib_$ac_lib_var=no"
1991 LIBS="$ac_save_LIBS"
1994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1995 echo "$ac_t""yes" 1>&6
1998 echo "$ac_t""no" 1>&6
2003 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
2004 echo "configure:2016: checking how to call gettimeofday" >&5
2005 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
2006 echo $ac_n "(cached) $ac_c" 1>&6
2008 cat > conftest.$ac_ext <<EOF
2009 #line 2021 "configure"
2010 #include "confdefs.h"
2012 #include <sys/time.h>
2014 struct timeval tv; struct timezone tzp;
2015 gettimeofday(&tv, &tzp);
2018 if { (eval echo configure:2030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2020 ac_gettimeofday_args=2
2022 echo "configure: failed program was:" >&5
2023 cat conftest.$ac_ext >&5
2025 cat > conftest.$ac_ext <<EOF
2026 #line 2038 "configure"
2027 #include "confdefs.h"
2029 #include <sys/time.h>
2031 struct timeval tv; gettimeofday(&tv);
2034 if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2036 ac_gettimeofday_args=1
2038 echo "configure: failed program was:" >&5
2039 cat conftest.$ac_ext >&5
2041 ac_gettimeofday_args=0
2046 ac_cv_gettimeofday_args=$ac_gettimeofday_args
2049 ac_gettimeofday_args=$ac_cv_gettimeofday_args
2050 if test "$ac_gettimeofday_args" = 1 ; then
2051 cat >> confdefs.h <<\EOF
2052 #define HAVE_GETTIMEOFDAY 1
2055 echo "$ac_t""one argument" 1>&6
2056 elif test "$ac_gettimeofday_args" = 2 ; then
2057 cat >> confdefs.h <<\EOF
2058 #define HAVE_GETTIMEOFDAY 1
2061 cat >> confdefs.h <<\EOF
2062 #define GETTIMEOFDAY_TWO_ARGS 1
2065 echo "$ac_t""two arguments" 1>&6
2067 echo "$ac_t""unknown" 1>&6
2070 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
2072 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2073 echo "configure:2085: checking for $ac_func" >&5
2074 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2075 echo $ac_n "(cached) $ac_c" 1>&6
2077 cat > conftest.$ac_ext <<EOF
2078 #line 2090 "configure"
2079 #include "confdefs.h"
2080 /* System header to define __stub macros and hopefully few prototypes,
2081 which can conflict with char $ac_func(); below. */
2083 /* Override any gcc2 internal prototype to avoid an error. */
2084 /* We use char because int might match the return type of a gcc2
2085 builtin and then its argument prototype would still apply. */
2090 /* The GNU C library defines this for functions which it implements
2091 to always fail with ENOSYS. Some functions are actually named
2092 something starting with __ and the normal name is an alias. */
2093 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2101 if { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2103 eval "ac_cv_func_$ac_func=yes"
2105 echo "configure: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
2108 eval "ac_cv_func_$ac_func=no"
2113 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2114 echo "$ac_t""yes" 1>&6
2115 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2116 cat >> confdefs.h <<EOF
2117 #define $ac_tr_func 1
2121 echo "$ac_t""no" 1>&6
2126 for ac_func in sigaction syslog realpath
2128 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2129 echo "configure:2141: checking for $ac_func" >&5
2130 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2131 echo $ac_n "(cached) $ac_c" 1>&6
2133 cat > conftest.$ac_ext <<EOF
2134 #line 2146 "configure"
2135 #include "confdefs.h"
2136 /* System header to define __stub macros and hopefully few prototypes,
2137 which can conflict with char $ac_func(); below. */
2139 /* Override any gcc2 internal prototype to avoid an error. */
2140 /* We use char because int might match the return type of a gcc2
2141 builtin and then its argument prototype would still apply. */
2146 /* The GNU C library defines this for functions which it implements
2147 to always fail with ENOSYS. Some functions are actually named
2148 something starting with __ and the normal name is an alias. */
2149 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2157 if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2159 eval "ac_cv_func_$ac_func=yes"
2161 echo "configure: failed program was:" >&5
2162 cat conftest.$ac_ext >&5
2164 eval "ac_cv_func_$ac_func=no"
2169 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2170 echo "$ac_t""yes" 1>&6
2171 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2172 cat >> confdefs.h <<EOF
2173 #define $ac_tr_func 1
2177 echo "$ac_t""no" 1>&6
2181 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2182 echo "configure:2194: checking for struct icmp" >&5
2183 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2186 cat > conftest.$ac_ext <<EOF
2187 #line 2199 "configure"
2188 #include "confdefs.h"
2196 #include <sys/types.h>
2197 #include <sys/time.h>
2198 #include <sys/ipc.h>
2199 #include <sys/shm.h>
2200 #include <sys/socket.h>
2201 #include <netinet/in_systm.h>
2202 #include <netinet/in.h>
2203 #include <netinet/ip.h>
2204 #include <netinet/ip_icmp.h>
2205 #include <netinet/udp.h>
2206 #include <arpa/inet.h>
2211 struct sockaddr_in si;
2213 i.icmp_type = ICMP_ECHO;
2218 si.sin_family = AF_INET;
2222 if { (eval echo configure:2234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2226 echo "configure: failed program was:" >&5
2227 cat conftest.$ac_ext >&5
2234 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2235 if test "$ac_cv_have_icmp" = yes ; then
2236 cat >> confdefs.h <<\EOF
2241 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2242 echo "configure:2254: checking for struct icmphdr" >&5
2243 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2246 cat > conftest.$ac_ext <<EOF
2247 #line 2259 "configure"
2248 #include "confdefs.h"
2256 #include <sys/types.h>
2257 #include <sys/time.h>
2258 #include <sys/ipc.h>
2259 #include <sys/shm.h>
2260 #include <sys/socket.h>
2261 #include <netinet/in_systm.h>
2262 #include <netinet/in.h>
2263 #include <netinet/ip.h>
2264 #include <netinet/ip_icmp.h>
2265 #include <netinet/udp.h>
2266 #include <arpa/inet.h>
2271 struct sockaddr_in si;
2277 i.un.echo.sequence = 0;
2278 si.sin_family = AF_INET;
2282 if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2284 ac_cv_have_icmphdr=yes
2286 echo "configure: failed program was:" >&5
2287 cat conftest.$ac_ext >&5
2289 ac_cv_have_icmphdr=no
2294 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2295 if test "$ac_cv_have_icmphdr" = yes ; then
2296 cat >> confdefs.h <<\EOF
2297 #define HAVE_ICMPHDR 1
2301 for ac_hdr in crypt.h sys/select.h
2303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2305 echo "configure:2317: checking for $ac_hdr" >&5
2306 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2307 echo $ac_n "(cached) $ac_c" 1>&6
2309 cat > conftest.$ac_ext <<EOF
2310 #line 2322 "configure"
2311 #include "confdefs.h"
2314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2315 { (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2317 if test -z "$ac_err"; then
2319 eval "ac_cv_header_$ac_safe=yes"
2322 echo "configure: failed program was:" >&5
2323 cat conftest.$ac_ext >&5
2325 eval "ac_cv_header_$ac_safe=no"
2329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2330 echo "$ac_t""yes" 1>&6
2331 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2332 cat >> confdefs.h <<EOF
2333 #define $ac_tr_hdr 1
2337 echo "$ac_t""no" 1>&6
2341 for ac_prog in perl5 perl
2343 # Extract the first word of "$ac_prog", so it can be a program name with args.
2344 set dummy $ac_prog; ac_word=$2
2345 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2346 echo "configure:2358: checking for $ac_word" >&5
2347 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2348 echo $ac_n "(cached) $ac_c" 1>&6
2352 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2355 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2358 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2360 for ac_dir in $ac_dummy; do
2361 test -z "$ac_dir" && ac_dir=.
2362 if test -f $ac_dir/$ac_word; then
2363 ac_cv_path_PERL="$ac_dir/$ac_word"
2371 PERL="$ac_cv_path_PERL"
2372 if test -n "$PERL"; then
2373 echo "$ac_t""$PERL" 1>&6
2375 echo "$ac_t""no" 1>&6
2378 test -n "$PERL" && break
2381 if test -z "$PERL" ; then
2384 echo $ac_n "checking perl version""... $ac_c" 1>&6
2385 echo "configure:2397: checking perl version" >&5
2386 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2387 echo $ac_n "(cached) $ac_c" 1>&6
2389 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2392 echo "$ac_t""$ac_cv_perl_version" 1>&6
2393 PERL_VERSION=$ac_cv_perl_version
2397 if test -z "$PERL" ; then
2398 # don't let it be blank...
2399 PERL=/usr/local/bin/perl5
2402 # If we find X, set shell vars x_includes and x_libraries to the
2403 # paths, otherwise set no_x=yes.
2404 # Uses ac_ vars as temps to allow command line to override cache and checks.
2405 # --without-x overrides everything else, but does not touch the cache.
2406 echo $ac_n "checking for X""... $ac_c" 1>&6
2407 echo "configure:2419: checking for X" >&5
2409 # Check whether --with-x or --without-x was given.
2410 if test "${with_x+set}" = set; then
2415 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2416 if test "x$with_x" = xno; then
2417 # The user explicitly disabled X.
2420 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2421 # Both variables are already set.
2424 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2425 echo $ac_n "(cached) $ac_c" 1>&6
2427 # One or both of the vars are not set, and there is no cached value.
2428 ac_x_includes=NO ac_x_libraries=NO
2430 if mkdir conftestdir; then
2432 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2433 cat > Imakefile <<'EOF'
2435 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2437 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2438 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2439 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2440 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2441 for ac_extension in a so sl; do
2442 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2443 test -f $ac_im_libdir/libX11.$ac_extension; then
2444 ac_im_usrlibdir=$ac_im_libdir; break
2447 # Screen out bogus values from the imake configuration. They are
2448 # bogus both because they are the default anyway, and because
2449 # using them would break gcc on systems where it needs fixed includes.
2450 case "$ac_im_incroot" in
2452 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2454 case "$ac_im_usrlibdir" in
2456 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2463 if test "$ac_x_includes" = NO; then
2464 # Guess where to find include files, by looking for this one X11 .h file.
2465 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2467 # First, try using that file with no special directory specified.
2468 cat > conftest.$ac_ext <<EOF
2469 #line 2481 "configure"
2470 #include "confdefs.h"
2471 #include <$x_direct_test_include>
2473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2474 { (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2476 if test -z "$ac_err"; then
2478 # We can compile using X headers with no special include directory.
2482 echo "configure: failed program was:" >&5
2483 cat conftest.$ac_ext >&5
2485 # Look for the header file in a standard set of common directories.
2486 # Check X11 before X11Rn because it is often a symlink to the current release.
2489 /usr/X11R6/include \
2490 /usr/X11R5/include \
2491 /usr/X11R4/include \
2494 /usr/include/X11R6 \
2495 /usr/include/X11R5 \
2496 /usr/include/X11R4 \
2498 /usr/local/X11/include \
2499 /usr/local/X11R6/include \
2500 /usr/local/X11R5/include \
2501 /usr/local/X11R4/include \
2503 /usr/local/include/X11 \
2504 /usr/local/include/X11R6 \
2505 /usr/local/include/X11R5 \
2506 /usr/local/include/X11R4 \
2510 /usr/XFree86/include/X11 \
2513 /usr/local/include \
2514 /usr/unsupported/include \
2515 /usr/athena/include \
2516 /usr/local/x11r5/include \
2517 /usr/lpp/Xamples/include \
2519 /usr/openwin/include \
2520 /usr/openwin/share/include \
2523 if test -r "$ac_dir/$x_direct_test_include"; then
2524 ac_x_includes=$ac_dir
2530 fi # $ac_x_includes = NO
2532 if test "$ac_x_libraries" = NO; then
2533 # Check for the libraries.
2535 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2536 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2538 # See if we find them without any special options.
2539 # Don't add to $LIBS permanently.
2540 ac_save_LIBS="$LIBS"
2541 LIBS="-l$x_direct_test_library $LIBS"
2542 cat > conftest.$ac_ext <<EOF
2543 #line 2555 "configure"
2544 #include "confdefs.h"
2547 ${x_direct_test_function}()
2550 if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2552 LIBS="$ac_save_LIBS"
2553 # We can link X programs with no special library path.
2556 echo "configure: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2559 LIBS="$ac_save_LIBS"
2560 # First see if replacing the include by lib works.
2561 # Check X11 before X11Rn because it is often a symlink to the current release.
2562 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2573 /usr/local/X11/lib \
2574 /usr/local/X11R6/lib \
2575 /usr/local/X11R5/lib \
2576 /usr/local/X11R4/lib \
2578 /usr/local/lib/X11 \
2579 /usr/local/lib/X11R6 \
2580 /usr/local/lib/X11R5 \
2581 /usr/local/lib/X11R4 \
2585 /usr/XFree86/lib/X11 \
2589 /usr/unsupported/lib \
2591 /usr/local/x11r5/lib \
2592 /usr/lpp/Xamples/lib \
2596 /usr/openwin/share/lib \
2599 for ac_extension in a so sl; do
2600 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2601 ac_x_libraries=$ac_dir
2608 fi # $ac_x_libraries = NO
2610 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2611 # Didn't find X anywhere. Cache the known absence of X.
2612 ac_cv_have_x="have_x=no"
2614 # Record where we found X for the cache.
2615 ac_cv_have_x="have_x=yes \
2616 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2620 eval "$ac_cv_have_x"
2623 if test "$have_x" != yes; then
2624 echo "$ac_t""$have_x" 1>&6
2627 # If each of the values was on the command line, it overrides each guess.
2628 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2629 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2630 # Update the cache value to reflect the command line values.
2631 ac_cv_have_x="have_x=yes \
2632 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2633 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2636 if test "$no_x" = yes; then
2637 # Not all programs may use this symbol, but it does not hurt to define it.
2638 cat >> confdefs.h <<\EOF
2639 #define X_DISPLAY_MISSING 1
2642 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2644 if test -n "$x_includes"; then
2645 X_CFLAGS="$X_CFLAGS -I$x_includes"
2648 # It would also be nice to do this for all -L options, not just this one.
2649 if test -n "$x_libraries"; then
2650 X_LIBS="$X_LIBS -L$x_libraries"
2651 # For Solaris; some versions of Sun CC require a space after -R and
2652 # others require no space. Words are not sufficient . . . .
2653 case "`(uname -sr) 2>/dev/null`" in
2655 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2656 echo "configure:2668: checking whether -R must be followed by a space" >&5
2657 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2658 cat > conftest.$ac_ext <<EOF
2659 #line 2671 "configure"
2660 #include "confdefs.h"
2666 if { (eval echo configure:2678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2670 echo "configure: failed program was:" >&5
2671 cat conftest.$ac_ext >&5
2676 if test $ac_R_nospace = yes; then
2677 echo "$ac_t""no" 1>&6
2678 X_LIBS="$X_LIBS -R$x_libraries"
2680 LIBS="$ac_xsave_LIBS -R $x_libraries"
2681 cat > conftest.$ac_ext <<EOF
2682 #line 2694 "configure"
2683 #include "confdefs.h"
2689 if { (eval echo configure:2701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2693 echo "configure: failed program was:" >&5
2694 cat conftest.$ac_ext >&5
2699 if test $ac_R_space = yes; then
2700 echo "$ac_t""yes" 1>&6
2701 X_LIBS="$X_LIBS -R $x_libraries"
2703 echo "$ac_t""neither works" 1>&6
2706 LIBS="$ac_xsave_LIBS"
2710 # Check for system-dependent libraries X programs must link with.
2711 # Do this before checking for the system-independent R6 libraries
2712 # (-lICE), since we may need -lsocket or whatever for X linking.
2714 if test "$ISC" = yes; then
2715 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2717 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2718 # libraries were built with DECnet support. And karl@cs.umb.edu says
2719 # the Alpha needs dnet_stub (dnet does not exist).
2720 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2721 echo "configure:2733: checking for dnet_ntoa in -ldnet" >&5
2722 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2723 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2724 echo $ac_n "(cached) $ac_c" 1>&6
2726 ac_save_LIBS="$LIBS"
2728 cat > conftest.$ac_ext <<EOF
2729 #line 2741 "configure"
2730 #include "confdefs.h"
2731 /* Override any gcc2 internal prototype to avoid an error. */
2732 /* We use char because int might match the return type of a gcc2
2733 builtin and then its argument prototype would still apply. */
2740 if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2742 eval "ac_cv_lib_$ac_lib_var=yes"
2744 echo "configure: failed program was:" >&5
2745 cat conftest.$ac_ext >&5
2747 eval "ac_cv_lib_$ac_lib_var=no"
2750 LIBS="$ac_save_LIBS"
2753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2754 echo "$ac_t""yes" 1>&6
2755 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2757 echo "$ac_t""no" 1>&6
2760 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2761 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2762 echo "configure:2774: checking for dnet_ntoa in -ldnet_stub" >&5
2763 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2764 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2765 echo $ac_n "(cached) $ac_c" 1>&6
2767 ac_save_LIBS="$LIBS"
2768 LIBS="-ldnet_stub $LIBS"
2769 cat > conftest.$ac_ext <<EOF
2770 #line 2782 "configure"
2771 #include "confdefs.h"
2772 /* Override any gcc2 internal prototype to avoid an error. */
2773 /* We use char because int might match the return type of a gcc2
2774 builtin and then its argument prototype would still apply. */
2781 if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2783 eval "ac_cv_lib_$ac_lib_var=yes"
2785 echo "configure: failed program was:" >&5
2786 cat conftest.$ac_ext >&5
2788 eval "ac_cv_lib_$ac_lib_var=no"
2791 LIBS="$ac_save_LIBS"
2794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2795 echo "$ac_t""yes" 1>&6
2796 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2798 echo "$ac_t""no" 1>&6
2803 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2804 # to get the SysV transport functions.
2805 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2807 # The nsl library prevents programs from opening the X display
2808 # on Irix 5.2, according to dickey@clark.net.
2809 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2810 echo "configure:2822: checking for gethostbyname" >&5
2811 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2812 echo $ac_n "(cached) $ac_c" 1>&6
2814 cat > conftest.$ac_ext <<EOF
2815 #line 2827 "configure"
2816 #include "confdefs.h"
2817 /* System header to define __stub macros and hopefully few prototypes,
2818 which can conflict with char gethostbyname(); below. */
2820 /* Override any gcc2 internal prototype to avoid an error. */
2821 /* We use char because int might match the return type of a gcc2
2822 builtin and then its argument prototype would still apply. */
2823 char gethostbyname();
2827 /* The GNU C library defines this for functions which it implements
2828 to always fail with ENOSYS. Some functions are actually named
2829 something starting with __ and the normal name is an alias. */
2830 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2838 if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2840 eval "ac_cv_func_gethostbyname=yes"
2842 echo "configure: failed program was:" >&5
2843 cat conftest.$ac_ext >&5
2845 eval "ac_cv_func_gethostbyname=no"
2850 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2851 echo "$ac_t""yes" 1>&6
2854 echo "$ac_t""no" 1>&6
2857 if test $ac_cv_func_gethostbyname = no; then
2858 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2859 echo "configure:2871: checking for gethostbyname in -lnsl" >&5
2860 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2861 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2862 echo $ac_n "(cached) $ac_c" 1>&6
2864 ac_save_LIBS="$LIBS"
2866 cat > conftest.$ac_ext <<EOF
2867 #line 2879 "configure"
2868 #include "confdefs.h"
2869 /* Override any gcc2 internal prototype to avoid an error. */
2870 /* We use char because int might match the return type of a gcc2
2871 builtin and then its argument prototype would still apply. */
2872 char gethostbyname();
2878 if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2880 eval "ac_cv_lib_$ac_lib_var=yes"
2882 echo "configure: failed program was:" >&5
2883 cat conftest.$ac_ext >&5
2885 eval "ac_cv_lib_$ac_lib_var=no"
2888 LIBS="$ac_save_LIBS"
2891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2892 echo "$ac_t""yes" 1>&6
2893 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2895 echo "$ac_t""no" 1>&6
2900 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2901 # socket/setsockopt and other routines are undefined under SCO ODT
2902 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2903 # on later versions), says simon@lia.di.epfl.ch: it contains
2904 # gethostby* variants that don't use the nameserver (or something).
2905 # -lsocket must be given before -lnsl if both are needed.
2906 # We assume that if connect needs -lnsl, so does gethostbyname.
2907 echo $ac_n "checking for connect""... $ac_c" 1>&6
2908 echo "configure:2920: checking for connect" >&5
2909 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2910 echo $ac_n "(cached) $ac_c" 1>&6
2912 cat > conftest.$ac_ext <<EOF
2913 #line 2925 "configure"
2914 #include "confdefs.h"
2915 /* System header to define __stub macros and hopefully few prototypes,
2916 which can conflict with char connect(); below. */
2918 /* Override any gcc2 internal prototype to avoid an error. */
2919 /* We use char because int might match the return type of a gcc2
2920 builtin and then its argument prototype would still apply. */
2925 /* The GNU C library defines this for functions which it implements
2926 to always fail with ENOSYS. Some functions are actually named
2927 something starting with __ and the normal name is an alias. */
2928 #if defined (__stub_connect) || defined (__stub___connect)
2936 if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2938 eval "ac_cv_func_connect=yes"
2940 echo "configure: failed program was:" >&5
2941 cat conftest.$ac_ext >&5
2943 eval "ac_cv_func_connect=no"
2948 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2949 echo "$ac_t""yes" 1>&6
2952 echo "$ac_t""no" 1>&6
2955 if test $ac_cv_func_connect = no; then
2956 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2957 echo "configure:2969: checking for connect in -lsocket" >&5
2958 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2959 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2960 echo $ac_n "(cached) $ac_c" 1>&6
2962 ac_save_LIBS="$LIBS"
2963 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2964 cat > conftest.$ac_ext <<EOF
2965 #line 2977 "configure"
2966 #include "confdefs.h"
2967 /* Override any gcc2 internal prototype to avoid an error. */
2968 /* We use char because int might match the return type of a gcc2
2969 builtin and then its argument prototype would still apply. */
2976 if { (eval echo configure:2988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2978 eval "ac_cv_lib_$ac_lib_var=yes"
2980 echo "configure: failed program was:" >&5
2981 cat conftest.$ac_ext >&5
2983 eval "ac_cv_lib_$ac_lib_var=no"
2986 LIBS="$ac_save_LIBS"
2989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2990 echo "$ac_t""yes" 1>&6
2991 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2993 echo "$ac_t""no" 1>&6
2998 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2999 echo $ac_n "checking for remove""... $ac_c" 1>&6
3000 echo "configure:3012: checking for remove" >&5
3001 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3002 echo $ac_n "(cached) $ac_c" 1>&6
3004 cat > conftest.$ac_ext <<EOF
3005 #line 3017 "configure"
3006 #include "confdefs.h"
3007 /* System header to define __stub macros and hopefully few prototypes,
3008 which can conflict with char remove(); below. */
3010 /* Override any gcc2 internal prototype to avoid an error. */
3011 /* We use char because int might match the return type of a gcc2
3012 builtin and then its argument prototype would still apply. */
3017 /* The GNU C library defines this for functions which it implements
3018 to always fail with ENOSYS. Some functions are actually named
3019 something starting with __ and the normal name is an alias. */
3020 #if defined (__stub_remove) || defined (__stub___remove)
3028 if { (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3030 eval "ac_cv_func_remove=yes"
3032 echo "configure: failed program was:" >&5
3033 cat conftest.$ac_ext >&5
3035 eval "ac_cv_func_remove=no"
3040 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3041 echo "$ac_t""yes" 1>&6
3044 echo "$ac_t""no" 1>&6
3047 if test $ac_cv_func_remove = no; then
3048 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3049 echo "configure:3061: checking for remove in -lposix" >&5
3050 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3052 echo $ac_n "(cached) $ac_c" 1>&6
3054 ac_save_LIBS="$LIBS"
3055 LIBS="-lposix $LIBS"
3056 cat > conftest.$ac_ext <<EOF
3057 #line 3069 "configure"
3058 #include "confdefs.h"
3059 /* Override any gcc2 internal prototype to avoid an error. */
3060 /* We use char because int might match the return type of a gcc2
3061 builtin and then its argument prototype would still apply. */
3068 if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3070 eval "ac_cv_lib_$ac_lib_var=yes"
3072 echo "configure: failed program was:" >&5
3073 cat conftest.$ac_ext >&5
3075 eval "ac_cv_lib_$ac_lib_var=no"
3078 LIBS="$ac_save_LIBS"
3081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3082 echo "$ac_t""yes" 1>&6
3083 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3085 echo "$ac_t""no" 1>&6
3090 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3091 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3092 echo "configure:3104: checking for shmat" >&5
3093 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3094 echo $ac_n "(cached) $ac_c" 1>&6
3096 cat > conftest.$ac_ext <<EOF
3097 #line 3109 "configure"
3098 #include "confdefs.h"
3099 /* System header to define __stub macros and hopefully few prototypes,
3100 which can conflict with char shmat(); below. */
3102 /* Override any gcc2 internal prototype to avoid an error. */
3103 /* We use char because int might match the return type of a gcc2
3104 builtin and then its argument prototype would still apply. */
3109 /* The GNU C library defines this for functions which it implements
3110 to always fail with ENOSYS. Some functions are actually named
3111 something starting with __ and the normal name is an alias. */
3112 #if defined (__stub_shmat) || defined (__stub___shmat)
3120 if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3122 eval "ac_cv_func_shmat=yes"
3124 echo "configure: failed program was:" >&5
3125 cat conftest.$ac_ext >&5
3127 eval "ac_cv_func_shmat=no"
3132 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3133 echo "$ac_t""yes" 1>&6
3136 echo "$ac_t""no" 1>&6
3139 if test $ac_cv_func_shmat = no; then
3140 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3141 echo "configure:3153: checking for shmat in -lipc" >&5
3142 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3143 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3144 echo $ac_n "(cached) $ac_c" 1>&6
3146 ac_save_LIBS="$LIBS"
3148 cat > conftest.$ac_ext <<EOF
3149 #line 3161 "configure"
3150 #include "confdefs.h"
3151 /* Override any gcc2 internal prototype to avoid an error. */
3152 /* We use char because int might match the return type of a gcc2
3153 builtin and then its argument prototype would still apply. */
3160 if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3162 eval "ac_cv_lib_$ac_lib_var=yes"
3164 echo "configure: failed program was:" >&5
3165 cat conftest.$ac_ext >&5
3167 eval "ac_cv_lib_$ac_lib_var=no"
3170 LIBS="$ac_save_LIBS"
3173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3174 echo "$ac_t""yes" 1>&6
3175 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3177 echo "$ac_t""no" 1>&6
3183 # Check for libraries that X11R6 Xt/Xaw programs need.
3184 ac_save_LDFLAGS="$LDFLAGS"
3185 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3186 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3187 # check for ICE first), but we must link in the order -lSM -lICE or
3188 # we get undefined symbols. So assume we have SM if we have ICE.
3189 # These have to be linked with before -lX11, unlike the other
3190 # libraries we check for below, so use a different variable.
3191 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3192 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3193 echo "configure:3205: checking for IceConnectionNumber in -lICE" >&5
3194 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3195 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3196 echo $ac_n "(cached) $ac_c" 1>&6
3198 ac_save_LIBS="$LIBS"
3199 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3200 cat > conftest.$ac_ext <<EOF
3201 #line 3213 "configure"
3202 #include "confdefs.h"
3203 /* Override any gcc2 internal prototype to avoid an error. */
3204 /* We use char because int might match the return type of a gcc2
3205 builtin and then its argument prototype would still apply. */
3206 char IceConnectionNumber();
3209 IceConnectionNumber()
3212 if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3214 eval "ac_cv_lib_$ac_lib_var=yes"
3216 echo "configure: failed program was:" >&5
3217 cat conftest.$ac_ext >&5
3219 eval "ac_cv_lib_$ac_lib_var=no"
3222 LIBS="$ac_save_LIBS"
3225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3226 echo "$ac_t""yes" 1>&6
3227 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3229 echo "$ac_t""no" 1>&6
3232 LDFLAGS="$ac_save_LDFLAGS"
3237 if test "$have_x" != yes; then
3238 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3242 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3243 echo "configure:3255: checking for X app-defaults directory" >&5
3244 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3245 echo $ac_n "(cached) $ac_c" 1>&6
3249 if mkdir conftestdir; then
3251 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3252 cat > Imakefile <<'EOF'
3254 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3256 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3257 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3258 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3263 if test x"$ac_x_app_defaults" = x; then
3265 # Look for the directory under a standard set of common directories.
3266 # Check X11 before X11Rn because it's often a symlink to the current release.
3268 /usr/X11/lib/app-defaults \
3269 /usr/X11R6/lib/app-defaults \
3270 /usr/X11R6/lib/X11/app-defaults \
3271 /usr/X11R5/lib/app-defaults \
3272 /usr/X11R5/lib/X11/app-defaults \
3273 /usr/X11R4/lib/app-defaults \
3274 /usr/X11R4/lib/X11/app-defaults \
3276 /usr/lib/X11/app-defaults \
3277 /usr/lib/X11R6/app-defaults \
3278 /usr/lib/X11R5/app-defaults \
3279 /usr/lib/X11R4/app-defaults \
3281 /usr/local/X11/lib/app-defaults \
3282 /usr/local/X11R6/lib/app-defaults \
3283 /usr/local/X11R5/lib/app-defaults \
3284 /usr/local/X11R4/lib/app-defaults \
3286 /usr/local/lib/X11/app-defaults \
3287 /usr/local/lib/X11R6/app-defaults \
3288 /usr/local/lib/X11R6/X11/app-defaults \
3289 /usr/local/lib/X11R5/app-defaults \
3290 /usr/local/lib/X11R5/X11/app-defaults \
3291 /usr/local/lib/X11R4/app-defaults \
3292 /usr/local/lib/X11R4/X11/app-defaults \
3294 /usr/X386/lib/X11/app-defaults \
3295 /usr/x386/lib/X11/app-defaults \
3296 /usr/XFree86/lib/X11/app-defaults \
3298 /usr/lib/X11/app-defaults \
3299 /usr/local/lib/X11/app-defaults \
3300 /usr/unsupported/lib/X11/app-defaults \
3301 /usr/athena/lib/X11/app-defaults \
3302 /usr/local/x11r5/lib/X11/app-defaults \
3303 /usr/lpp/Xamples/lib/X11/app-defaults \
3304 /lib/usr/lib/X11/app-defaults \
3306 /usr/openwin/lib/app-defaults \
3307 /usr/openwin/lib/X11/app-defaults \
3308 /usr/openwin/share/lib/app-defaults \
3309 /usr/openwin/share/lib/X11/app-defaults \
3311 /X11R6/lib/app-defaults \
3312 /X11R5/lib/app-defaults \
3313 /X11R4/lib/app-defaults \
3316 if test -d "$ac_dir"; then
3317 ac_x_app_defaults=$ac_dir
3323 if test x"$ac_x_app_defaults" = x; then
3324 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3326 # Record where we found app-defaults for the cache.
3327 ac_cv_x_app_defaults="$ac_x_app_defaults"
3331 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3332 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3336 # The following arcana was gleaned from conversations with
3337 # Eric Schwartz <erics@col.hp.com>:
3339 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3340 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3341 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3342 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3343 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3344 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3345 # you don't need any -I or -L arguments.
3347 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3348 # are the same division as 10.x. However, there are no symlinks to
3349 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3350 # arguments are always necessary.
3352 # However, X11R6 was available on HPUX 9.x as a patch: if that
3353 # patch was installed, then all of X11R6 went in to
3354 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3356 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3357 # whether R5 was available as a patch; R6 undoubtedly was not.)
3359 # So. We try and use the highest numbered pair of
3360 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3361 # that are available. We do not mix and match different versions
3364 # Question I still don't know the answer to: (do you?)
3366 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3367 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3368 # that contrib directory? Did it contain so-called "standard"
3369 # X11R6, or did it include Xaw and Xmu as well? If the former,
3370 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3371 # be a situation where one had to reach into the R5 headers and
3372 # libs to find Xmu? That is, must both R6 and R5 directories
3373 # be on the -I and -L lists in that case?
3375 for version in X11R6 X11R5 X11R4 ; do
3376 # if either pair of directories exists...
3377 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3379 # if contrib exists, use it...
3380 if test -d /usr/contrib/$version/lib ; then
3381 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3382 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3384 # if the "standard" one exists, use it.
3385 if test -d /usr/lib/$version ; then
3386 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3387 X_LIBS="$X_LIBS -L/usr/lib/$version"
3389 # since at least one of the pair exists, go no farther.
3394 # Now find Motif. Thanks for not making xmkmf find this by
3395 # default, you losers.
3397 if test -d /usr/lib/Motif1.2 ; then
3398 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3399 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3400 elif test -d /usr/lib/Motif1.1 ; then
3401 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3402 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3405 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3407 if test -d /opt/Mesa/lib ; then
3408 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3409 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3412 if test -d /opt/xpm/lib/X11 ; then
3413 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3414 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3417 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3418 # in /usr/local/, unless there is already an xscreensaver in
3419 # /usr/local/bin/. This can be overridden with the --prefix arg
3420 # to configure. I'm not sure this is the right thing to do, but
3421 # Richard Lloyd says so...
3423 if test \! -x /usr/local/bin/xscreensaver ; then
3424 ac_default_prefix=/opt/xscreensaver
3430 # Thanks for not making xmkmf find this by default, pinheads.
3431 # And thanks for moving things around again, too. Is this
3432 # really the standard location now? What happened to the
3433 # joke that this kind of thing went in /opt?
3434 # cthomp says "answer: CDE (Common Disorganized Environment)"
3436 if test -f /usr/dt/include/Xm/Xm.h ; then
3437 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3438 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3440 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3441 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3442 echo "configure:3454: checking for regcmp in -lgen" >&5
3443 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3444 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3445 echo $ac_n "(cached) $ac_c" 1>&6
3447 ac_save_LIBS="$LIBS"
3449 cat > conftest.$ac_ext <<EOF
3450 #line 3462 "configure"
3451 #include "confdefs.h"
3452 /* Override any gcc2 internal prototype to avoid an error. */
3453 /* We use char because int might match the return type of a gcc2
3454 builtin and then its argument prototype would still apply. */
3461 if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3463 eval "ac_cv_lib_$ac_lib_var=yes"
3465 echo "configure: failed program was:" >&5
3466 cat conftest.$ac_ext >&5
3468 eval "ac_cv_lib_$ac_lib_var=no"
3471 LIBS="$ac_save_LIBS"
3474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3475 echo "$ac_t""yes" 1>&6
3476 X_LIBS="$X_LIBS -lgen"
3478 echo "$ac_t""no" 1>&6
3484 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3485 echo "configure:3497: checking for XPointer" >&5
3486 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3487 echo $ac_n "(cached) $ac_c" 1>&6
3490 ac_save_CPPFLAGS="$CPPFLAGS"
3491 if test \! -z "$includedir" ; then
3492 CPPFLAGS="$CPPFLAGS -I$includedir"
3494 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3495 cat > conftest.$ac_ext <<EOF
3496 #line 3508 "configure"
3497 #include "confdefs.h"
3498 #include <X11/Xlib.h>
3500 XPointer foo = (XPointer) 0;
3503 if { (eval echo configure:3515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3507 echo "configure: failed program was:" >&5
3508 cat conftest.$ac_ext >&5
3513 CPPFLAGS="$ac_save_CPPFLAGS"
3516 echo "$ac_t""$ac_cv_xpointer" 1>&6
3517 if test "$ac_cv_xpointer" != yes; then
3518 cat >> confdefs.h <<\EOF
3519 #define XPointer char*
3526 ###############################################################################
3528 # Check for -lXmu (some fucked up vendors don't ship it...)
3530 ###############################################################################
3534 ac_save_CPPFLAGS="$CPPFLAGS"
3535 if test \! -z "$includedir" ; then
3536 CPPFLAGS="$CPPFLAGS -I$includedir"
3538 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3539 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3540 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3541 echo "configure:3553: checking for X11/Xmu/Error.h" >&5
3542 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3543 echo $ac_n "(cached) $ac_c" 1>&6
3545 cat > conftest.$ac_ext <<EOF
3546 #line 3558 "configure"
3547 #include "confdefs.h"
3548 #include <X11/Xmu/Error.h>
3550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3551 { (eval echo configure:3563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3553 if test -z "$ac_err"; then
3555 eval "ac_cv_header_$ac_safe=yes"
3558 echo "configure: failed program was:" >&5
3559 cat conftest.$ac_ext >&5
3561 eval "ac_cv_header_$ac_safe=no"
3565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3566 echo "$ac_t""yes" 1>&6
3569 echo "$ac_t""no" 1>&6
3572 CPPFLAGS="$ac_save_CPPFLAGS"
3573 if test "$have_xmu" = no ; then
3574 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3575 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3579 SAVER_LIBS="-lXmu $SAVER_LIBS"
3580 HACK_LIBS="-lXmu $HACK_LIBS"
3581 MOTIF_LIBS="-lXmu $MOTIF_LIBS"
3582 GTK_LIBS="-lXmu $GTK_LIBS"
3583 cat >> confdefs.h <<\EOF
3590 ###############################################################################
3592 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3593 # See comp.windows.x FAQ question 124. The right fix is to
3594 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3596 ###############################################################################
3598 if test "$have_xmu" = yes ; then
3601 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3602 echo "configure:3614: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3603 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3604 echo $ac_n "(cached) $ac_c" 1>&6
3606 ac_save_LDFLAGS="$LDFLAGS"
3607 if test \! -z "$x_libraries" ; then
3608 LDFLAGS="$LDFLAGS -L$x_libraries"
3610 # Note: this trick never works! (Generally.)
3611 # We're only getting away with using AC_TRY_LINK
3612 # with X libraries because we know it's SunOS.
3613 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3614 cat > conftest.$ac_ext <<EOF
3615 #line 3627 "configure"
3616 #include "confdefs.h"
3622 if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3624 ac_cv_sunos_xmu_bug=no
3626 echo "configure: failed program was:" >&5
3627 cat conftest.$ac_ext >&5
3629 ac_cv_sunos_xmu_bug=yes
3632 LDFLAGS="$ac_save_LDFLAGS"
3635 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3636 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3637 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3638 echo "configure:3650: checking whether the compiler understands -static" >&5
3639 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3640 echo $ac_n "(cached) $ac_c" 1>&6
3642 ac_save_LDFLAGS="$LDFLAGS"
3643 LDFLAGS="$LDFLAGS -static"
3644 cat > conftest.$ac_ext <<EOF
3645 #line 3657 "configure"
3646 #include "confdefs.h"
3652 if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3656 echo "configure: failed program was:" >&5
3657 cat conftest.$ac_ext >&5
3662 LDFLAGS="$ac_save_LDFLAGS"
3665 echo "$ac_t""$ac_cv_ld_static" 1>&6
3666 if test "$ac_cv_ld_static" = yes ; then
3667 LDFLAGS="$LDFLAGS -static"
3669 LDFLAGS="$LDFLAGS -Bstatic"
3677 ###############################################################################
3679 # Handle the --enable-subdir option
3681 ###############################################################################
3683 # Check whether --enable-subdir or --disable-subdir was given.
3684 if test "${enable_subdir+set}" = set; then
3685 enableval="$enable_subdir"
3686 enable_subdir="$enableval"
3691 if test x"$enable_subdir" = xno; then
3693 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
3694 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
3697 # there must be a better way than this...
3698 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
3700 HACKDIR=$enable_subdir
3703 HACKDIR='${bindir}/'$enable_subdir
3707 # canonicalize slashes.
3708 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3711 ###############################################################################
3713 # Check for the SGI SCREEN_SAVER server extension.
3715 ###############################################################################
3718 with_sgi_req=unspecified
3719 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3720 if test "${with_sgi_ext+set}" = set; then
3721 withval="$with_sgi_ext"
3722 with_sgi="$withval"; with_sgi_req="$withval"
3734 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3735 echo "configure:3747: checking for SGI SCREEN_SAVER headers" >&5
3738 X_CFLAGS="-I$d $X_CFLAGS"
3739 echo "$ac_t""$d" 1>&6
3741 echo "$ac_t""not found ($d: no such directory)" 1>&6
3744 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3745 echo "configure:3757: checking for SGI SCREEN_SAVER libs" >&5
3748 X_LIBS="-L$d $X_LIBS"
3749 echo "$ac_t""$d" 1>&6
3751 echo "$ac_t""not found ($d: no such directory)" 1>&6
3754 # replace the directory string with "yes".
3756 with_sgi=$with_sgi_req
3761 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3762 echo " If it is a directory, then \`DIR/include' will be added to"
3763 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3769 if test "$with_sgi" = yes; then
3771 ac_save_CPPFLAGS="$CPPFLAGS"
3772 if test \! -z "$includedir" ; then
3773 CPPFLAGS="$CPPFLAGS -I$includedir"
3775 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3776 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3777 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3778 echo "configure:3790: checking for X11/extensions/XScreenSaver.h" >&5
3779 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3780 echo $ac_n "(cached) $ac_c" 1>&6
3782 cat > conftest.$ac_ext <<EOF
3783 #line 3795 "configure"
3784 #include "confdefs.h"
3785 #include <X11/extensions/XScreenSaver.h>
3787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3788 { (eval echo configure:3800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3790 if test -z "$ac_err"; then
3792 eval "ac_cv_header_$ac_safe=yes"
3795 echo "configure: failed program was:" >&5
3796 cat conftest.$ac_ext >&5
3798 eval "ac_cv_header_$ac_safe=no"
3802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3803 echo "$ac_t""yes" 1>&6
3805 cat >> confdefs.h <<\EOF
3806 #define HAVE_SGI_SAVER_EXTENSION 1
3810 echo "$ac_t""no" 1>&6
3813 CPPFLAGS="$ac_save_CPPFLAGS"
3815 elif test "$with_sgi" != no; then
3816 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3821 ###############################################################################
3823 # Check for the MIT-SCREEN-SAVER server extension.
3825 ###############################################################################
3828 with_mit_req=unspecified
3829 # Check whether --with-mit-ext or --without-mit-ext was given.
3830 if test "${with_mit_ext+set}" = set; then
3831 withval="$with_mit_ext"
3832 with_mit="$withval"; with_mit_req="$withval"
3844 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3845 echo "configure:3857: checking for MIT-SCREEN-SAVER headers" >&5
3848 X_CFLAGS="-I$d $X_CFLAGS"
3849 echo "$ac_t""$d" 1>&6
3851 echo "$ac_t""not found ($d: no such directory)" 1>&6
3854 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3855 echo "configure:3867: checking for MIT-SCREEN-SAVER libs" >&5
3858 X_LIBS="-L$d $X_LIBS"
3859 echo "$ac_t""$d" 1>&6
3861 echo "$ac_t""not found ($d: no such directory)" 1>&6
3864 # replace the directory string with "yes".
3866 with_mit=$with_mit_req
3871 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3872 echo " If it is a directory, then \`DIR/include' will be added to"
3873 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3879 if test "$with_mit" = yes; then
3881 ac_save_CPPFLAGS="$CPPFLAGS"
3882 if test \! -z "$includedir" ; then
3883 CPPFLAGS="$CPPFLAGS -I$includedir"
3885 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3886 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3887 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3888 echo "configure:3900: checking for X11/extensions/scrnsaver.h" >&5
3889 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3890 echo $ac_n "(cached) $ac_c" 1>&6
3892 cat > conftest.$ac_ext <<EOF
3893 #line 3905 "configure"
3894 #include "confdefs.h"
3895 #include <X11/extensions/scrnsaver.h>
3897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3898 { (eval echo configure:3910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3900 if test -z "$ac_err"; then
3902 eval "ac_cv_header_$ac_safe=yes"
3905 echo "configure: failed program was:" >&5
3906 cat conftest.$ac_ext >&5
3908 eval "ac_cv_header_$ac_safe=no"
3912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3913 echo "$ac_t""yes" 1>&6
3916 echo "$ac_t""no" 1>&6
3919 CPPFLAGS="$ac_save_CPPFLAGS"
3921 # Now check to see if it's really in the library; XF86Free-3.3 ships
3922 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3924 if test "$have_mit" = yes; then
3926 ac_save_CPPFLAGS="$CPPFLAGS"
3927 ac_save_LDFLAGS="$LDFLAGS"
3928 # ac_save_LIBS="$LIBS"
3930 if test \! -z "$includedir" ; then
3931 CPPFLAGS="$CPPFLAGS -I$includedir"
3933 # note: $X_CFLAGS includes $x_includes
3934 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3936 if test \! -z "$libdir" ; then
3937 LDFLAGS="$LDFLAGS -L$libdir"
3939 # note: $X_LIBS includes $x_libraries
3940 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3942 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3943 echo "configure:3955: checking for XScreenSaverRegister in -lXext" >&5
3944 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3946 echo $ac_n "(cached) $ac_c" 1>&6
3948 ac_save_LIBS="$LIBS"
3949 LIBS="-lXext -lm $LIBS"
3950 cat > conftest.$ac_ext <<EOF
3951 #line 3963 "configure"
3952 #include "confdefs.h"
3953 /* Override any gcc2 internal prototype to avoid an error. */
3954 /* We use char because int might match the return type of a gcc2
3955 builtin and then its argument prototype would still apply. */
3956 char XScreenSaverRegister();
3959 XScreenSaverRegister()
3962 if { (eval echo configure:3974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3964 eval "ac_cv_lib_$ac_lib_var=yes"
3966 echo "configure: failed program was:" >&5
3967 cat conftest.$ac_ext >&5
3969 eval "ac_cv_lib_$ac_lib_var=no"
3972 LIBS="$ac_save_LIBS"
3975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3976 echo "$ac_t""yes" 1>&6
3979 echo "$ac_t""no" 1>&6
3983 CPPFLAGS="$ac_save_CPPFLAGS"
3984 LDFLAGS="$ac_save_LDFLAGS"
3985 # LIBS="$ac_save_LIBS"
3988 if test "$have_mit" = no; then
3989 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3990 # of in Xext. Thank you master, may I have another.
3992 ac_save_CPPFLAGS="$CPPFLAGS"
3993 ac_save_LDFLAGS="$LDFLAGS"
3994 # ac_save_LIBS="$LIBS"
3996 if test \! -z "$includedir" ; then
3997 CPPFLAGS="$CPPFLAGS -I$includedir"
3999 # note: $X_CFLAGS includes $x_includes
4000 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4002 if test \! -z "$libdir" ; then
4003 LDFLAGS="$LDFLAGS -L$libdir"
4005 # note: $X_LIBS includes $x_libraries
4006 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4008 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
4009 echo "configure:4021: checking for XScreenSaverRegister in -lXExExt" >&5
4010 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4011 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4012 echo $ac_n "(cached) $ac_c" 1>&6
4014 ac_save_LIBS="$LIBS"
4015 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
4016 cat > conftest.$ac_ext <<EOF
4017 #line 4029 "configure"
4018 #include "confdefs.h"
4019 /* Override any gcc2 internal prototype to avoid an error. */
4020 /* We use char because int might match the return type of a gcc2
4021 builtin and then its argument prototype would still apply. */
4022 char XScreenSaverRegister();
4025 XScreenSaverRegister()
4028 if { (eval echo configure:4040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4030 eval "ac_cv_lib_$ac_lib_var=yes"
4032 echo "configure: failed program was:" >&5
4033 cat conftest.$ac_ext >&5
4035 eval "ac_cv_lib_$ac_lib_var=no"
4038 LIBS="$ac_save_LIBS"
4041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4042 echo "$ac_t""yes" 1>&6
4043 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
4045 echo "$ac_t""no" 1>&6
4049 CPPFLAGS="$ac_save_CPPFLAGS"
4050 LDFLAGS="$ac_save_LDFLAGS"
4051 # LIBS="$ac_save_LIBS"
4055 if test "$have_mit" = no; then
4056 # Double fuck! Looks like some versions of XFree86 (whichever version
4057 # it is that comes with RedHat Linux 2.0 -- I can't find a version
4058 # number) put this garbage in Xss instead of Xext. Thank you master,
4059 # may I have another.
4061 ac_save_CPPFLAGS="$CPPFLAGS"
4062 ac_save_LDFLAGS="$LDFLAGS"
4063 # ac_save_LIBS="$LIBS"
4065 if test \! -z "$includedir" ; then
4066 CPPFLAGS="$CPPFLAGS -I$includedir"
4068 # note: $X_CFLAGS includes $x_includes
4069 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4071 if test \! -z "$libdir" ; then
4072 LDFLAGS="$LDFLAGS -L$libdir"
4074 # note: $X_LIBS includes $x_libraries
4075 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4077 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4078 echo "configure:4090: checking for XScreenSaverRegister in -lXss" >&5
4079 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4080 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4081 echo $ac_n "(cached) $ac_c" 1>&6
4083 ac_save_LIBS="$LIBS"
4084 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4085 cat > conftest.$ac_ext <<EOF
4086 #line 4098 "configure"
4087 #include "confdefs.h"
4088 /* Override any gcc2 internal prototype to avoid an error. */
4089 /* We use char because int might match the return type of a gcc2
4090 builtin and then its argument prototype would still apply. */
4091 char XScreenSaverRegister();
4094 XScreenSaverRegister()
4097 if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4099 eval "ac_cv_lib_$ac_lib_var=yes"
4101 echo "configure: failed program was:" >&5
4102 cat conftest.$ac_ext >&5
4104 eval "ac_cv_lib_$ac_lib_var=no"
4107 LIBS="$ac_save_LIBS"
4110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4111 echo "$ac_t""yes" 1>&6
4112 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4114 echo "$ac_t""no" 1>&6
4118 CPPFLAGS="$ac_save_CPPFLAGS"
4119 LDFLAGS="$ac_save_LDFLAGS"
4120 # LIBS="$ac_save_LIBS"
4124 if test "$have_mit" = yes; then
4125 cat >> confdefs.h <<\EOF
4126 #define HAVE_MIT_SAVER_EXTENSION 1
4133 elif test "$with_mit" != no; then
4134 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4139 ###############################################################################
4141 # Check for the XIDLE server extension.
4143 ###############################################################################
4146 with_xidle_req=unspecified
4147 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4148 if test "${with_xidle_ext+set}" = set; then
4149 withval="$with_xidle_ext"
4150 with_xidle="$withval"; with_xidle_req="$withval"
4157 case "$with_xidle" in
4162 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4163 echo "configure:4175: checking for XIDLE headers" >&5
4164 d=$with_xidle/include
4166 X_CFLAGS="-I$d $X_CFLAGS"
4167 echo "$ac_t""$d" 1>&6
4169 echo "$ac_t""not found ($d: no such directory)" 1>&6
4172 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4173 echo "configure:4185: checking for XIDLE libs" >&5
4176 X_LIBS="-L$d $X_LIBS"
4177 echo "$ac_t""$d" 1>&6
4179 echo "$ac_t""not found ($d: no such directory)" 1>&6
4182 # replace the directory string with "yes".
4183 with_xidle_req="yes"
4184 with_xidle=$with_xidle_req
4189 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4190 echo " If it is a directory, then \`DIR/include' will be added to"
4191 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4197 if test "$with_xidle" = yes; then
4199 ac_save_CPPFLAGS="$CPPFLAGS"
4200 if test \! -z "$includedir" ; then
4201 CPPFLAGS="$CPPFLAGS -I$includedir"
4203 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4204 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4205 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4206 echo "configure:4218: checking for X11/extensions/xidle.h" >&5
4207 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4208 echo $ac_n "(cached) $ac_c" 1>&6
4210 cat > conftest.$ac_ext <<EOF
4211 #line 4223 "configure"
4212 #include "confdefs.h"
4213 #include <X11/extensions/xidle.h>
4215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4216 { (eval echo configure:4228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4218 if test -z "$ac_err"; then
4220 eval "ac_cv_header_$ac_safe=yes"
4223 echo "configure: failed program was:" >&5
4224 cat conftest.$ac_ext >&5
4226 eval "ac_cv_header_$ac_safe=no"
4230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4231 echo "$ac_t""yes" 1>&6
4233 cat >> confdefs.h <<\EOF
4234 #define HAVE_XIDLE_EXTENSION 1
4238 echo "$ac_t""no" 1>&6
4241 CPPFLAGS="$ac_save_CPPFLAGS"
4242 elif test "$with_xidle" != no; then
4243 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4248 ###############################################################################
4250 # Check for the SGI-VIDEO-CONTROL server extension.
4252 ###############################################################################
4255 with_sgivc_req=unspecified
4256 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4257 if test "${with_sgivc_ext+set}" = set; then
4258 withval="$with_sgivc_ext"
4259 with_sgivc="$withval"; with_sgivc_req="$withval"
4266 case "$with_sgivc" in
4271 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4272 echo "configure:4284: checking for SGI-VIDEO-CONTROL headers" >&5
4273 d=$with_sgivc/include
4275 X_CFLAGS="-I$d $X_CFLAGS"
4276 echo "$ac_t""$d" 1>&6
4278 echo "$ac_t""not found ($d: no such directory)" 1>&6
4281 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4282 echo "configure:4294: checking for SGI-VIDEO-CONTROL libs" >&5
4285 X_LIBS="-L$d $X_LIBS"
4286 echo "$ac_t""$d" 1>&6
4288 echo "$ac_t""not found ($d: no such directory)" 1>&6
4291 # replace the directory string with "yes".
4292 with_sgivc_req="yes"
4293 with_sgivc=$with_sgivc_req
4298 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4299 echo " If it is a directory, then \`DIR/include' will be added to"
4300 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4306 if test "$with_sgivc" = yes; then
4308 # first check for XSGIvc.h
4310 ac_save_CPPFLAGS="$CPPFLAGS"
4311 if test \! -z "$includedir" ; then
4312 CPPFLAGS="$CPPFLAGS -I$includedir"
4314 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4315 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4316 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4317 echo "configure:4329: checking for X11/extensions/XSGIvc.h" >&5
4318 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4319 echo $ac_n "(cached) $ac_c" 1>&6
4321 cat > conftest.$ac_ext <<EOF
4322 #line 4334 "configure"
4323 #include "confdefs.h"
4324 #include <X11/extensions/XSGIvc.h>
4326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4327 { (eval echo configure:4339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4329 if test -z "$ac_err"; then
4331 eval "ac_cv_header_$ac_safe=yes"
4334 echo "configure: failed program was:" >&5
4335 cat conftest.$ac_ext >&5
4337 eval "ac_cv_header_$ac_safe=no"
4341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4342 echo "$ac_t""yes" 1>&6
4345 echo "$ac_t""no" 1>&6
4348 CPPFLAGS="$ac_save_CPPFLAGS"
4350 # if that succeeded, then check for the -lXsgivc
4351 if test "$have_sgivc" = yes; then
4354 ac_save_CPPFLAGS="$CPPFLAGS"
4355 ac_save_LDFLAGS="$LDFLAGS"
4356 # ac_save_LIBS="$LIBS"
4358 if test \! -z "$includedir" ; then
4359 CPPFLAGS="$CPPFLAGS -I$includedir"
4361 # note: $X_CFLAGS includes $x_includes
4362 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4364 if test \! -z "$libdir" ; then
4365 LDFLAGS="$LDFLAGS -L$libdir"
4367 # note: $X_LIBS includes $x_libraries
4368 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4370 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4371 echo "configure:4383: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4372 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4373 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4374 echo $ac_n "(cached) $ac_c" 1>&6
4376 ac_save_LIBS="$LIBS"
4377 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4378 cat > conftest.$ac_ext <<EOF
4379 #line 4391 "configure"
4380 #include "confdefs.h"
4381 /* Override any gcc2 internal prototype to avoid an error. */
4382 /* We use char because int might match the return type of a gcc2
4383 builtin and then its argument prototype would still apply. */
4384 char XSGIvcQueryGammaMap();
4387 XSGIvcQueryGammaMap()
4390 if { (eval echo configure:4402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4392 eval "ac_cv_lib_$ac_lib_var=yes"
4394 echo "configure: failed program was:" >&5
4395 cat conftest.$ac_ext >&5
4397 eval "ac_cv_lib_$ac_lib_var=no"
4400 LIBS="$ac_save_LIBS"
4403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4404 echo "$ac_t""yes" 1>&6
4405 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4407 echo "$ac_t""no" 1>&6
4411 CPPFLAGS="$ac_save_CPPFLAGS"
4412 LDFLAGS="$ac_save_LDFLAGS"
4413 # LIBS="$ac_save_LIBS"
4417 # if that succeeded, then we've really got it.
4418 if test "$have_sgivc" = yes; then
4419 cat >> confdefs.h <<\EOF
4420 #define HAVE_SGI_VC_EXTENSION 1
4425 elif test "$with_sgivc" != no; then
4426 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4431 ###############################################################################
4433 # Check for the DPMS server extension.
4435 ###############################################################################
4438 with_dpms_req=unspecified
4439 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4440 if test "${with_dpms_ext+set}" = set; then
4441 withval="$with_dpms_ext"
4442 with_dpms="$withval"; with_dpms_req="$withval"
4449 case "$with_dpms" in
4454 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4455 echo "configure:4467: checking for DPMS headers" >&5
4456 d=$with_dpms/include
4458 X_CFLAGS="-I$d $X_CFLAGS"
4459 echo "$ac_t""$d" 1>&6
4461 echo "$ac_t""not found ($d: no such directory)" 1>&6
4464 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4465 echo "configure:4477: checking for DPMS libs" >&5
4468 X_LIBS="-L$d $X_LIBS"
4469 echo "$ac_t""$d" 1>&6
4471 echo "$ac_t""not found ($d: no such directory)" 1>&6
4474 # replace the directory string with "yes".
4476 with_dpms=$with_dpms_req
4481 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4482 echo " If it is a directory, then \`DIR/include' will be added to"
4483 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4489 if test "$with_dpms" = yes; then
4491 # first check for dpms.h
4493 ac_save_CPPFLAGS="$CPPFLAGS"
4494 if test \! -z "$includedir" ; then
4495 CPPFLAGS="$CPPFLAGS -I$includedir"
4497 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4498 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4499 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4500 echo "configure:4512: checking for X11/extensions/dpms.h" >&5
4501 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4502 echo $ac_n "(cached) $ac_c" 1>&6
4504 cat > conftest.$ac_ext <<EOF
4505 #line 4517 "configure"
4506 #include "confdefs.h"
4507 #include <X11/extensions/dpms.h>
4509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4510 { (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4511 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4512 if test -z "$ac_err"; then
4514 eval "ac_cv_header_$ac_safe=yes"
4517 echo "configure: failed program was:" >&5
4518 cat conftest.$ac_ext >&5
4520 eval "ac_cv_header_$ac_safe=no"
4524 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4525 echo "$ac_t""yes" 1>&6
4528 echo "$ac_t""no" 1>&6
4531 CPPFLAGS="$ac_save_CPPFLAGS"
4533 # if that succeeded, then check for the DPMS code in the libraries
4534 if test "$have_dpms" = yes; then
4536 # first look in -lXext (this is where it is with XFree86 4.0)
4539 ac_save_CPPFLAGS="$CPPFLAGS"
4540 ac_save_LDFLAGS="$LDFLAGS"
4541 # ac_save_LIBS="$LIBS"
4543 if test \! -z "$includedir" ; then
4544 CPPFLAGS="$CPPFLAGS -I$includedir"
4546 # note: $X_CFLAGS includes $x_includes
4547 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4549 if test \! -z "$libdir" ; then
4550 LDFLAGS="$LDFLAGS -L$libdir"
4552 # note: $X_LIBS includes $x_libraries
4553 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4555 echo $ac_n "checking for DPMSInfo in -lXext""... $ac_c" 1>&6
4556 echo "configure:4568: checking for DPMSInfo in -lXext" >&5
4557 ac_lib_var=`echo Xext'_'DPMSInfo | sed 'y%./+-%__p_%'`
4558 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4559 echo $ac_n "(cached) $ac_c" 1>&6
4561 ac_save_LIBS="$LIBS"
4562 LIBS="-lXext -lXext -lX11 $LIBS"
4563 cat > conftest.$ac_ext <<EOF
4564 #line 4576 "configure"
4565 #include "confdefs.h"
4566 /* Override any gcc2 internal prototype to avoid an error. */
4567 /* We use char because int might match the return type of a gcc2
4568 builtin and then its argument prototype would still apply. */
4575 if { (eval echo configure:4587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4577 eval "ac_cv_lib_$ac_lib_var=yes"
4579 echo "configure: failed program was:" >&5
4580 cat conftest.$ac_ext >&5
4582 eval "ac_cv_lib_$ac_lib_var=no"
4585 LIBS="$ac_save_LIBS"
4588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4589 echo "$ac_t""yes" 1>&6
4592 echo "$ac_t""no" 1>&6
4596 CPPFLAGS="$ac_save_CPPFLAGS"
4597 LDFLAGS="$ac_save_LDFLAGS"
4598 # LIBS="$ac_save_LIBS"
4601 # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
4602 if test "$have_dpms" = no; then
4604 ac_save_CPPFLAGS="$CPPFLAGS"
4605 ac_save_LDFLAGS="$LDFLAGS"
4606 # ac_save_LIBS="$LIBS"
4608 if test \! -z "$includedir" ; then
4609 CPPFLAGS="$CPPFLAGS -I$includedir"
4611 # note: $X_CFLAGS includes $x_includes
4612 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4614 if test \! -z "$libdir" ; then
4615 LDFLAGS="$LDFLAGS -L$libdir"
4617 # note: $X_LIBS includes $x_libraries
4618 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4620 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4621 echo "configure:4633: checking for DPMSInfo in -lXdpms" >&5
4622 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4623 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4624 echo $ac_n "(cached) $ac_c" 1>&6
4626 ac_save_LIBS="$LIBS"
4627 LIBS="-lXdpms -lXext -lX11 $LIBS"
4628 cat > conftest.$ac_ext <<EOF
4629 #line 4641 "configure"
4630 #include "confdefs.h"
4631 /* Override any gcc2 internal prototype to avoid an error. */
4632 /* We use char because int might match the return type of a gcc2
4633 builtin and then its argument prototype would still apply. */
4640 if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4642 eval "ac_cv_lib_$ac_lib_var=yes"
4644 echo "configure: failed program was:" >&5
4645 cat conftest.$ac_ext >&5
4647 eval "ac_cv_lib_$ac_lib_var=no"
4650 LIBS="$ac_save_LIBS"
4653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4654 echo "$ac_t""yes" 1>&6
4655 have_dpms=yes; XDPMS_LIBS="-lXdpms"
4657 echo "$ac_t""no" 1>&6
4661 CPPFLAGS="$ac_save_CPPFLAGS"
4662 LDFLAGS="$ac_save_LDFLAGS"
4663 # LIBS="$ac_save_LIBS"
4669 # if that succeeded, then we've really got it.
4670 if test "$have_dpms" = yes; then
4671 cat >> confdefs.h <<\EOF
4672 #define HAVE_DPMS_EXTENSION 1
4677 elif test "$with_dpms" != no; then
4678 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4683 ###############################################################################
4685 # Check for the XF86VMODE server extension.
4687 ###############################################################################
4690 with_xf86vmode_req=unspecified
4691 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4692 if test "${with_xf86vmode_ext+set}" = set; then
4693 withval="$with_xf86vmode_ext"
4694 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4701 case "$with_xf86vmode" in
4706 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4707 echo "configure:4719: checking for xf86vmode headers" >&5
4708 d=$with_xf86vmode/include
4710 X_CFLAGS="-I$d $X_CFLAGS"
4711 echo "$ac_t""$d" 1>&6
4713 echo "$ac_t""not found ($d: no such directory)" 1>&6
4716 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4717 echo "configure:4729: checking for xf86vmode libs" >&5
4718 d=$with_xf86vmode/lib
4720 X_LIBS="-L$d $X_LIBS"
4721 echo "$ac_t""$d" 1>&6
4723 echo "$ac_t""not found ($d: no such directory)" 1>&6
4726 # replace the directory string with "yes".
4727 with_xf86vmode_req="yes"
4728 with_xf86vmode=$with_xf86vmode_req
4733 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4734 echo " If it is a directory, then \`DIR/include' will be added to"
4735 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4741 if test "$with_xf86vmode" = yes; then
4743 # first check for xf86vmode.h
4745 ac_save_CPPFLAGS="$CPPFLAGS"
4746 if test \! -z "$includedir" ; then
4747 CPPFLAGS="$CPPFLAGS -I$includedir"
4749 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4750 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4751 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4752 echo "configure:4764: checking for X11/extensions/xf86vmode.h" >&5
4753 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4754 echo $ac_n "(cached) $ac_c" 1>&6
4756 cat > conftest.$ac_ext <<EOF
4757 #line 4769 "configure"
4758 #include "confdefs.h"
4759 #include <X11/extensions/xf86vmode.h>
4761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4762 { (eval echo configure:4774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4764 if test -z "$ac_err"; then
4766 eval "ac_cv_header_$ac_safe=yes"
4769 echo "configure: failed program was:" >&5
4770 cat conftest.$ac_ext >&5
4772 eval "ac_cv_header_$ac_safe=no"
4776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4777 echo "$ac_t""yes" 1>&6
4780 echo "$ac_t""no" 1>&6
4783 CPPFLAGS="$ac_save_CPPFLAGS"
4785 # if that succeeded, then check for the -lXxf86vm
4786 if test "$have_xf86vmode" = yes; then
4789 ac_save_CPPFLAGS="$CPPFLAGS"
4790 ac_save_LDFLAGS="$LDFLAGS"
4791 # ac_save_LIBS="$LIBS"
4793 if test \! -z "$includedir" ; then
4794 CPPFLAGS="$CPPFLAGS -I$includedir"
4796 # note: $X_CFLAGS includes $x_includes
4797 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4799 if test \! -z "$libdir" ; then
4800 LDFLAGS="$LDFLAGS -L$libdir"
4802 # note: $X_LIBS includes $x_libraries
4803 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4805 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4806 echo "configure:4818: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4807 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4808 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4809 echo $ac_n "(cached) $ac_c" 1>&6
4811 ac_save_LIBS="$LIBS"
4812 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4813 cat > conftest.$ac_ext <<EOF
4814 #line 4826 "configure"
4815 #include "confdefs.h"
4816 /* Override any gcc2 internal prototype to avoid an error. */
4817 /* We use char because int might match the return type of a gcc2
4818 builtin and then its argument prototype would still apply. */
4819 char XF86VidModeGetViewPort();
4822 XF86VidModeGetViewPort()
4825 if { (eval echo configure:4837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4827 eval "ac_cv_lib_$ac_lib_var=yes"
4829 echo "configure: failed program was:" >&5
4830 cat conftest.$ac_ext >&5
4832 eval "ac_cv_lib_$ac_lib_var=no"
4835 LIBS="$ac_save_LIBS"
4838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4839 echo "$ac_t""yes" 1>&6
4840 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4842 echo "$ac_t""no" 1>&6
4846 CPPFLAGS="$ac_save_CPPFLAGS"
4847 LDFLAGS="$ac_save_LDFLAGS"
4848 # LIBS="$ac_save_LIBS"
4852 # if that succeeded, then we've really got it.
4853 if test "$have_xf86vmode" = yes; then
4854 cat >> confdefs.h <<\EOF
4855 #define HAVE_XF86VMODE 1
4860 elif test "$with_xf86vmode" != no; then
4861 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4866 ###############################################################################
4868 # Check for HP XHPDisableReset and XHPEnableReset.
4870 ###############################################################################
4873 ac_save_CPPFLAGS="$CPPFLAGS"
4874 if test \! -z "$includedir" ; then
4875 CPPFLAGS="$CPPFLAGS -I$includedir"
4877 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4878 cat > conftest.$ac_ext <<EOF
4879 #line 4891 "configure"
4880 #include "confdefs.h"
4881 #include <X11/XHPlib.h>
4883 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4884 egrep "XHPDisableReset" >/dev/null 2>&1; then
4886 cat >> confdefs.h <<\EOF
4887 #define HAVE_XHPDISABLERESET 1
4890 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
4894 CPPFLAGS="$ac_save_CPPFLAGS"
4897 ###############################################################################
4899 # Check for /proc/interrupts.
4901 ###############################################################################
4903 have_proc_interrupts=no
4904 with_proc_interrupts_req=unspecified
4905 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4906 if test "${with_proc_interrupts+set}" = set; then
4907 withval="$with_proc_interrupts"
4908 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4910 with_proc_interrupts=yes
4914 if test "$with_proc_interrupts" = yes; then
4916 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4917 echo "configure:4929: checking whether /proc/interrupts contains keyboard data" >&5
4918 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4919 echo $ac_n "(cached) $ac_c" 1>&6
4921 ac_cv_have_proc_interrupts=no
4922 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4923 ac_cv_have_proc_interrupts=yes
4928 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
4929 have_proc_interrupts=$ac_cv_have_proc_interrupts
4931 if test "$have_proc_interrupts" = yes; then
4932 cat >> confdefs.h <<\EOF
4933 #define HAVE_PROC_INTERRUPTS 1
4938 elif test "$with_proc_interrupts" != no; then
4939 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
4944 ###############################################################################
4946 # The --enable-locking option
4948 ###############################################################################
4950 # Check whether --enable-locking or --disable-locking was given.
4951 if test "${enable_locking+set}" = set; then
4952 enableval="$enable_locking"
4953 enable_locking="$enableval"
4958 if test "$enable_locking" = yes; then
4960 elif test "$enable_locking" = no; then
4961 cat >> confdefs.h <<\EOF
4962 #define NO_LOCKING 1
4966 echo "error: must be yes or no: --enable-locking=$enable_locking"
4972 ###############################################################################
4974 # The --enable-vt-locking option
4976 ###############################################################################
4978 #ac_vt_lockswitch=no
4979 #AC_ARG_ENABLE(vt-locking,[
4980 # --enable-vt-locking Compile in support for locking Virtual Terminals.
4981 # This is the default if the system supports it, and
4982 # if locking support is included (--enable-locking.)
4983 # --disable-vt-locking Do not allow locking of VTs, even if locking is
4985 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
4986 #if test "$enable_vt_locking" = yes; then
4988 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
4989 # [AC_TRY_COMPILE([#include <fcntl.h>
4990 # #include <sys/ioctl.h>
4991 # #include <sys/vt.h>],
4992 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
4993 # [ac_cv_vt_lockswitch=yes],
4994 # [ac_cv_vt_lockswitch=no])])
4995 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
4997 #elif test "$enable_vt_locking" = no; then
5000 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
5004 #if test "$ac_vt_lockswitch" = yes; then
5005 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
5006 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
5007 # # #### but it doesn't work yet, so don't worry about that for now.
5013 ###############################################################################
5017 ###############################################################################
5021 # Solaris systems tend to come with PAM misconfigured.
5022 # Don't build it by default, even if the headers exist.
5026 # Default to building PAM support on all other systems, if it exists.
5027 with_pam_default=yes
5032 with_pam_req=unspecified
5034 # Check whether --with-pam or --without-pam was given.
5035 if test "${with_pam+set}" = set; then
5037 with_pam="$withval"; with_pam_req="$withval"
5039 with_pam=$with_pam_default
5049 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
5050 echo "configure:5062: checking for PAM headers" >&5
5053 X_CFLAGS="-I$d $X_CFLAGS"
5054 echo "$ac_t""$d" 1>&6
5056 echo "$ac_t""not found ($d: no such directory)" 1>&6
5059 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
5060 echo "configure:5072: checking for PAM libs" >&5
5063 X_LIBS="-L$d $X_LIBS"
5064 echo "$ac_t""$d" 1>&6
5066 echo "$ac_t""not found ($d: no such directory)" 1>&6
5069 # replace the directory string with "yes".
5071 with_pam=$with_pam_req
5076 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
5077 echo " If it is a directory, then \`DIR/include' will be added to"
5078 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5084 if test "$enable_locking" = yes -a "$with_pam" = yes; then
5085 echo $ac_n "checking for PAM""... $ac_c" 1>&6
5086 echo "configure:5098: checking for PAM" >&5
5087 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
5088 echo $ac_n "(cached) $ac_c" 1>&6
5091 ac_save_CPPFLAGS="$CPPFLAGS"
5092 if test \! -z "$includedir" ; then
5093 CPPFLAGS="$CPPFLAGS -I$includedir"
5095 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5096 cat > conftest.$ac_ext <<EOF
5097 #line 5109 "configure"
5098 #include "confdefs.h"
5099 #include <security/pam_appl.h>
5104 if { (eval echo configure:5116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5108 echo "configure: failed program was:" >&5
5109 cat conftest.$ac_ext >&5
5114 CPPFLAGS="$ac_save_CPPFLAGS"
5117 echo "$ac_t""$ac_cv_pam" 1>&6
5118 if test "$ac_cv_pam" = yes ; then
5120 cat >> confdefs.h <<\EOF
5124 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
5126 # libpam typically requires dlopen and dlsym. On FreeBSD,
5127 # those are in libc. On Linux and Solaris, they're in libdl.
5128 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5129 echo "configure:5141: checking for dlopen in -ldl" >&5
5130 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5131 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5132 echo $ac_n "(cached) $ac_c" 1>&6
5134 ac_save_LIBS="$LIBS"
5136 cat > conftest.$ac_ext <<EOF
5137 #line 5149 "configure"
5138 #include "confdefs.h"
5139 /* Override any gcc2 internal prototype to avoid an error. */
5140 /* We use char because int might match the return type of a gcc2
5141 builtin and then its argument prototype would still apply. */
5148 if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5150 eval "ac_cv_lib_$ac_lib_var=yes"
5152 echo "configure: failed program was:" >&5
5153 cat conftest.$ac_ext >&5
5155 eval "ac_cv_lib_$ac_lib_var=no"
5158 LIBS="$ac_save_LIBS"
5161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5162 echo "$ac_t""yes" 1>&6
5163 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5165 echo "$ac_t""no" 1>&6
5169 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5170 echo "configure:5182: checking how to call pam_strerror" >&5
5171 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5172 echo $ac_n "(cached) $ac_c" 1>&6
5174 cat > conftest.$ac_ext <<EOF
5175 #line 5187 "configure"
5176 #include "confdefs.h"
5179 #include <security/pam_appl.h>
5181 pam_handle_t *pamh = 0;
5182 char *s = pam_strerror(pamh, PAM_SUCCESS);
5185 if { (eval echo configure:5197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5187 ac_pam_strerror_args=2
5189 echo "configure: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5192 cat > conftest.$ac_ext <<EOF
5193 #line 5205 "configure"
5194 #include "confdefs.h"
5197 #include <security/pam_appl.h>
5200 pam_strerror(PAM_SUCCESS);
5203 if { (eval echo configure:5215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5205 ac_pam_strerror_args=1
5207 echo "configure: failed program was:" >&5
5208 cat conftest.$ac_ext >&5
5210 ac_pam_strerror_args=0
5215 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5218 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5219 if test "$ac_pam_strerror_args" = 1 ; then
5220 echo "$ac_t""one argument" 1>&6
5221 elif test "$ac_pam_strerror_args" = 2 ; then
5222 cat >> confdefs.h <<\EOF
5223 #define PAM_STRERROR_TWO_ARGS 1
5226 echo "$ac_t""two arguments" 1>&6
5228 echo "$ac_t""unknown" 1>&6
5234 ###############################################################################
5236 # Check for Kerberos.
5238 ###############################################################################
5242 with_kerberos_req=unspecified
5244 # Check whether --with-kerberos or --without-kerberos was given.
5245 if test "${with_kerberos+set}" = set; then
5246 withval="$with_kerberos"
5247 with_kerberos="$withval"; with_kerberos_req="$withval"
5254 case "$with_kerberos" in
5259 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5260 echo "configure:5272: checking for Kerberos headers" >&5
5261 d=$with_kerberos/include
5263 X_CFLAGS="-I$d $X_CFLAGS"
5264 echo "$ac_t""$d" 1>&6
5266 echo "$ac_t""not found ($d: no such directory)" 1>&6
5269 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5270 echo "configure:5282: checking for Kerberos libs" >&5
5271 d=$with_kerberos/lib
5273 X_LIBS="-L$d $X_LIBS"
5274 echo "$ac_t""$d" 1>&6
5276 echo "$ac_t""not found ($d: no such directory)" 1>&6
5279 # replace the directory string with "yes".
5280 with_kerberos_req="yes"
5281 with_kerberos=$with_kerberos_req
5286 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5287 echo " If it is a directory, then \`DIR/include' will be added to"
5288 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5294 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5295 echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
5296 echo "configure:5308: checking for Kerberos 4" >&5
5297 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5298 echo $ac_n "(cached) $ac_c" 1>&6
5301 ac_save_CPPFLAGS="$CPPFLAGS"
5302 if test \! -z "$includedir" ; then
5303 CPPFLAGS="$CPPFLAGS -I$includedir"
5305 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5306 cat > conftest.$ac_ext <<EOF
5307 #line 5319 "configure"
5308 #include "confdefs.h"
5314 if { (eval echo configure:5326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5318 echo "configure: failed program was:" >&5
5319 cat conftest.$ac_ext >&5
5324 CPPFLAGS="$ac_save_CPPFLAGS"
5327 echo "$ac_t""$ac_cv_kerberos" 1>&6
5328 echo $ac_n "checking for Kerberos 5""... $ac_c" 1>&6
5329 echo "configure:5341: checking for Kerberos 5" >&5
5330 if eval "test \"`echo '$''{'ac_cv_kerberos5'+set}'`\" = set"; then
5331 echo $ac_n "(cached) $ac_c" 1>&6
5334 ac_save_CPPFLAGS="$CPPFLAGS"
5335 if test \! -z "$includedir" ; then
5336 CPPFLAGS="$CPPFLAGS -I$includedir"
5338 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5339 cat > conftest.$ac_ext <<EOF
5340 #line 5352 "configure"
5341 #include "confdefs.h"
5342 #include <kerberosIV/krb.h>
5347 if { (eval echo configure:5359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5351 echo "configure: failed program was:" >&5
5352 cat conftest.$ac_ext >&5
5357 CPPFLAGS="$ac_save_CPPFLAGS"
5360 echo "$ac_t""$ac_cv_kerberos5" 1>&6
5362 if test "$ac_cv_kerberos" = yes ; then
5364 cat >> confdefs.h <<\EOF
5365 #define HAVE_KERBEROS 1
5370 if test "$ac_cv_kerberos5" = yes ; then
5373 cat >> confdefs.h <<\EOF
5374 #define HAVE_KERBEROS 1
5377 cat >> confdefs.h <<\EOF
5378 #define HAVE_KERBEROS5 1
5383 if test "$have_kerberos5" = yes ; then
5384 # from Matt Knopp <mhat@infocalypse.netlag.com>
5385 # (who got it from amu@mit.edu)
5386 PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
5387 elif test "$have_kerberos" = yes ; then
5388 # from Tim Showalter <tjs+@andrew.cmu.edu>
5389 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
5392 if test "$have_kerberos" = yes ; then
5393 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5394 echo "configure:5406: checking for res_search" >&5
5395 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5396 echo $ac_n "(cached) $ac_c" 1>&6
5398 cat > conftest.$ac_ext <<EOF
5399 #line 5411 "configure"
5400 #include "confdefs.h"
5401 /* System header to define __stub macros and hopefully few prototypes,
5402 which can conflict with char res_search(); below. */
5404 /* Override any gcc2 internal prototype to avoid an error. */
5405 /* We use char because int might match the return type of a gcc2
5406 builtin and then its argument prototype would still apply. */
5411 /* The GNU C library defines this for functions which it implements
5412 to always fail with ENOSYS. Some functions are actually named
5413 something starting with __ and the normal name is an alias. */
5414 #if defined (__stub_res_search) || defined (__stub___res_search)
5422 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5424 eval "ac_cv_func_res_search=yes"
5426 echo "configure: failed program was:" >&5
5427 cat conftest.$ac_ext >&5
5429 eval "ac_cv_func_res_search=no"
5434 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5435 echo "$ac_t""yes" 1>&6
5438 echo "$ac_t""no" 1>&6
5439 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5440 echo "configure:5452: checking for res_search in -lresolv" >&5
5441 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5442 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5443 echo $ac_n "(cached) $ac_c" 1>&6
5445 ac_save_LIBS="$LIBS"
5446 LIBS="-lresolv $LIBS"
5447 cat > conftest.$ac_ext <<EOF
5448 #line 5460 "configure"
5449 #include "confdefs.h"
5450 /* Override any gcc2 internal prototype to avoid an error. */
5451 /* We use char because int might match the return type of a gcc2
5452 builtin and then its argument prototype would still apply. */
5459 if { (eval echo configure:5471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5461 eval "ac_cv_lib_$ac_lib_var=yes"
5463 echo "configure: failed program was:" >&5
5464 cat conftest.$ac_ext >&5
5466 eval "ac_cv_lib_$ac_lib_var=no"
5469 LIBS="$ac_save_LIBS"
5472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5473 echo "$ac_t""yes" 1>&6
5474 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
5476 echo "$ac_t""no" 1>&6
5477 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
5487 ###############################################################################
5489 # Check for the nine billion variants of shadow passwords...
5491 ###############################################################################
5496 with_shadow_req=unspecified
5498 # Check whether --with-shadow or --without-shadow was given.
5499 if test "${with_shadow+set}" = set; then
5500 withval="$with_shadow"
5501 with_shadow="$withval"; with_shadow_req="$withval"
5508 case "$with_shadow" in
5513 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
5514 echo "configure:5526: checking for shadow password headers" >&5
5515 d=$with_shadow/include
5517 X_CFLAGS="-I$d $X_CFLAGS"
5518 echo "$ac_t""$d" 1>&6
5520 echo "$ac_t""not found ($d: no such directory)" 1>&6
5523 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
5524 echo "configure:5536: checking for shadow password libs" >&5
5527 X_LIBS="-L$d $X_LIBS"
5528 echo "$ac_t""$d" 1>&6
5530 echo "$ac_t""not found ($d: no such directory)" 1>&6
5533 # replace the directory string with "yes".
5534 with_shadow_req="yes"
5535 with_shadow=$with_shadow_req
5540 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
5541 echo " If it is a directory, then \`DIR/include' will be added to"
5542 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5548 if test "$enable_locking" = no ; then
5554 ###############################################################################
5556 # Check for Sun "adjunct" passwords.
5558 ###############################################################################
5560 if test "$with_shadow" = yes ; then
5561 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
5562 echo "configure:5574: checking for Sun-style shadow passwords" >&5
5563 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
5564 echo $ac_n "(cached) $ac_c" 1>&6
5567 ac_save_CPPFLAGS="$CPPFLAGS"
5568 if test \! -z "$includedir" ; then
5569 CPPFLAGS="$CPPFLAGS -I$includedir"
5571 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5572 cat > conftest.$ac_ext <<EOF
5573 #line 5585 "configure"
5574 #include "confdefs.h"
5577 #include <sys/types.h>
5578 #include <sys/label.h>
5579 #include <sys/audit.h>
5582 struct passwd_adjunct *p = getpwanam("nobody");
5583 const char *pw = p->pwa_passwd;
5586 if { (eval echo configure:5598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5588 ac_cv_sun_adjunct=yes
5590 echo "configure: failed program was:" >&5
5591 cat conftest.$ac_ext >&5
5593 ac_cv_sun_adjunct=no
5596 CPPFLAGS="$ac_save_CPPFLAGS"
5599 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
5600 if test "$ac_cv_sun_adjunct" = yes; then
5601 have_shadow_adjunct=yes
5608 ###############################################################################
5610 # Check for DEC and SCO so-called "enhanced" security.
5612 ###############################################################################
5614 if test "$with_shadow" = yes ; then
5615 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
5616 echo "configure:5628: checking for DEC-style shadow passwords" >&5
5617 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
5618 echo $ac_n "(cached) $ac_c" 1>&6
5621 ac_save_CPPFLAGS="$CPPFLAGS"
5622 if test \! -z "$includedir" ; then
5623 CPPFLAGS="$CPPFLAGS -I$includedir"
5625 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5626 cat > conftest.$ac_ext <<EOF
5627 #line 5639 "configure"
5628 #include "confdefs.h"
5631 #include <sys/types.h>
5633 #include <sys/security.h>
5636 struct pr_passwd *p;
5638 set_auth_parameters(0, 0);
5639 check_auth_parameters();
5640 p = getprpwnam("nobody");
5641 pw = p->ufld.fd_encrypt;
5644 if { (eval echo configure:5656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5646 ac_cv_enhanced_passwd=yes
5648 echo "configure: failed program was:" >&5
5649 cat conftest.$ac_ext >&5
5651 ac_cv_enhanced_passwd=no
5654 CPPFLAGS="$ac_save_CPPFLAGS"
5657 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
5658 if test $ac_cv_enhanced_passwd = yes; then
5659 have_shadow_enhanced=yes
5663 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
5664 # (I'm told it needs -lcurses too, but I don't understand why.)
5665 # But on DEC, it's in -lsecurity.
5667 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
5668 echo "configure:5680: checking for getprpwnam in -lprot" >&5
5669 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
5670 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5671 echo $ac_n "(cached) $ac_c" 1>&6
5673 ac_save_LIBS="$LIBS"
5674 LIBS="-lprot -lx $LIBS"
5675 cat > conftest.$ac_ext <<EOF
5676 #line 5688 "configure"
5677 #include "confdefs.h"
5678 /* Override any gcc2 internal prototype to avoid an error. */
5679 /* We use char because int might match the return type of a gcc2
5680 builtin and then its argument prototype would still apply. */
5687 if { (eval echo configure:5699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5689 eval "ac_cv_lib_$ac_lib_var=yes"
5691 echo "configure: failed program was:" >&5
5692 cat conftest.$ac_ext >&5
5694 eval "ac_cv_lib_$ac_lib_var=no"
5697 LIBS="$ac_save_LIBS"
5700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5701 echo "$ac_t""yes" 1>&6
5702 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
5704 echo "$ac_t""no" 1>&6
5705 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
5706 echo "configure:5718: checking for getprpwnam in -lsecurity" >&5
5707 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
5708 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5709 echo $ac_n "(cached) $ac_c" 1>&6
5711 ac_save_LIBS="$LIBS"
5712 LIBS="-lsecurity $LIBS"
5713 cat > conftest.$ac_ext <<EOF
5714 #line 5726 "configure"
5715 #include "confdefs.h"
5716 /* Override any gcc2 internal prototype to avoid an error. */
5717 /* We use char because int might match the return type of a gcc2
5718 builtin and then its argument prototype would still apply. */
5725 if { (eval echo configure:5737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5727 eval "ac_cv_lib_$ac_lib_var=yes"
5729 echo "configure: failed program was:" >&5
5730 cat conftest.$ac_ext >&5
5732 eval "ac_cv_lib_$ac_lib_var=no"
5735 LIBS="$ac_save_LIBS"
5738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5739 echo "$ac_t""yes" 1>&6
5740 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5742 echo "$ac_t""no" 1>&6
5750 ###############################################################################
5752 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
5754 ###############################################################################
5756 if test "$with_shadow" = yes ; then
5757 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5758 echo "configure:5770: checking for HP-style shadow passwords" >&5
5759 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5760 echo $ac_n "(cached) $ac_c" 1>&6
5763 ac_save_CPPFLAGS="$CPPFLAGS"
5764 if test \! -z "$includedir" ; then
5765 CPPFLAGS="$CPPFLAGS -I$includedir"
5767 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5768 cat > conftest.$ac_ext <<EOF
5769 #line 5781 "configure"
5770 #include "confdefs.h"
5773 #include <sys/types.h>
5775 #include <hpsecurity.h>
5778 struct s_passwd *p = getspwnam("nobody");
5779 const char *pw = p->pw_passwd;
5782 if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5784 ac_cv_hpux_passwd=yes
5786 echo "configure: failed program was:" >&5
5787 cat conftest.$ac_ext >&5
5789 ac_cv_hpux_passwd=no
5792 CPPFLAGS="$ac_save_CPPFLAGS"
5795 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
5796 if test "$ac_cv_hpux_passwd" = yes; then
5797 have_shadow_hpux=yes
5801 # on HPUX, bigcrypt is in -lsec
5802 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
5803 echo "configure:5815: checking for bigcrypt in -lsec" >&5
5804 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
5805 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5806 echo $ac_n "(cached) $ac_c" 1>&6
5808 ac_save_LIBS="$LIBS"
5810 cat > conftest.$ac_ext <<EOF
5811 #line 5823 "configure"
5812 #include "confdefs.h"
5813 /* Override any gcc2 internal prototype to avoid an error. */
5814 /* We use char because int might match the return type of a gcc2
5815 builtin and then its argument prototype would still apply. */
5822 if { (eval echo configure:5834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5824 eval "ac_cv_lib_$ac_lib_var=yes"
5826 echo "configure: failed program was:" >&5
5827 cat conftest.$ac_ext >&5
5829 eval "ac_cv_lib_$ac_lib_var=no"
5832 LIBS="$ac_save_LIBS"
5835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5836 echo "$ac_t""yes" 1>&6
5837 PASSWD_LIBS="$PASSWD_LIBS -lsec"
5839 echo "$ac_t""no" 1>&6
5846 ###############################################################################
5848 # Check for FreeBSD-style shadow passwords.
5850 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
5851 # password systems -- except you only get stuff in the pw_passwd field
5852 # if the running program is setuid. So, guess that we've got this
5853 # lossage to contend with if /etc/master.passwd exists, and default to
5854 # a setuid installation.
5856 ###############################################################################
5858 if test "$with_shadow" = yes ; then
5859 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
5860 echo "configure:5872: checking for FreeBSD-style shadow passwords" >&5
5861 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
5862 echo $ac_n "(cached) $ac_c" 1>&6
5864 if test -f /etc/master.passwd ; then
5865 ac_cv_master_passwd=yes
5867 ac_cv_master_passwd=no
5871 echo "$ac_t""$ac_cv_master_passwd" 1>&6
5872 if test "$ac_cv_master_passwd" = yes; then
5878 ###############################################################################
5880 # Check for traditional (ha!) shadow passwords.
5882 ###############################################################################
5884 if test "$with_shadow" = yes ; then
5885 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
5886 echo "configure:5898: checking for generic shadow passwords" >&5
5887 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
5888 echo $ac_n "(cached) $ac_c" 1>&6
5891 ac_save_CPPFLAGS="$CPPFLAGS"
5892 if test \! -z "$includedir" ; then
5893 CPPFLAGS="$CPPFLAGS -I$includedir"
5895 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5896 cat > conftest.$ac_ext <<EOF
5897 #line 5909 "configure"
5898 #include "confdefs.h"
5901 #include <sys/types.h>
5905 struct spwd *p = getspnam("nobody");
5906 const char *pw = p->sp_pwdp;
5909 if { (eval echo configure:5921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5913 echo "configure: failed program was:" >&5
5914 cat conftest.$ac_ext >&5
5919 CPPFLAGS="$ac_save_CPPFLAGS"
5922 echo "$ac_t""$ac_cv_shadow" 1>&6
5923 if test "$ac_cv_shadow" = yes; then
5927 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
5929 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
5930 echo "configure:5942: checking for getspnam in -lc" >&5
5931 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
5932 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5933 echo $ac_n "(cached) $ac_c" 1>&6
5935 ac_save_LIBS="$LIBS"
5937 cat > conftest.$ac_ext <<EOF
5938 #line 5950 "configure"
5939 #include "confdefs.h"
5940 /* Override any gcc2 internal prototype to avoid an error. */
5941 /* We use char because int might match the return type of a gcc2
5942 builtin and then its argument prototype would still apply. */
5949 if { (eval echo configure:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5951 eval "ac_cv_lib_$ac_lib_var=yes"
5953 echo "configure: failed program was:" >&5
5954 cat conftest.$ac_ext >&5
5956 eval "ac_cv_lib_$ac_lib_var=no"
5959 LIBS="$ac_save_LIBS"
5962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5963 echo "$ac_t""yes" 1>&6
5966 echo "$ac_t""no" 1>&6
5969 if test "$have_getspnam" = no ; then
5970 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
5971 echo "configure:5983: checking for getspnam in -lgen" >&5
5972 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
5973 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5974 echo $ac_n "(cached) $ac_c" 1>&6
5976 ac_save_LIBS="$LIBS"
5978 cat > conftest.$ac_ext <<EOF
5979 #line 5991 "configure"
5980 #include "confdefs.h"
5981 /* Override any gcc2 internal prototype to avoid an error. */
5982 /* We use char because int might match the return type of a gcc2
5983 builtin and then its argument prototype would still apply. */
5990 if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5992 eval "ac_cv_lib_$ac_lib_var=yes"
5994 echo "configure: failed program was:" >&5
5995 cat conftest.$ac_ext >&5
5997 eval "ac_cv_lib_$ac_lib_var=no"
6000 LIBS="$ac_save_LIBS"
6003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6004 echo "$ac_t""yes" 1>&6
6005 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
6007 echo "$ac_t""no" 1>&6
6015 ###############################################################################
6017 # Check for other libraries needed for non-shadow passwords.
6019 ###############################################################################
6021 if test "$enable_locking" = yes ; then
6023 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
6025 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
6026 echo "configure:6038: checking for crypt in -lc" >&5
6027 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
6028 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6029 echo $ac_n "(cached) $ac_c" 1>&6
6031 ac_save_LIBS="$LIBS"
6033 cat > conftest.$ac_ext <<EOF
6034 #line 6046 "configure"
6035 #include "confdefs.h"
6036 /* Override any gcc2 internal prototype to avoid an error. */
6037 /* We use char because int might match the return type of a gcc2
6038 builtin and then its argument prototype would still apply. */
6045 if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6047 eval "ac_cv_lib_$ac_lib_var=yes"
6049 echo "configure: failed program was:" >&5
6050 cat conftest.$ac_ext >&5
6052 eval "ac_cv_lib_$ac_lib_var=no"
6055 LIBS="$ac_save_LIBS"
6058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6059 echo "$ac_t""yes" 1>&6
6062 echo "$ac_t""no" 1>&6
6065 if test "$have_crypt" = no ; then
6066 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6067 echo "configure:6079: checking for crypt in -lcrypt" >&5
6068 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6069 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6070 echo $ac_n "(cached) $ac_c" 1>&6
6072 ac_save_LIBS="$LIBS"
6073 LIBS="-lcrypt $LIBS"
6074 cat > conftest.$ac_ext <<EOF
6075 #line 6087 "configure"
6076 #include "confdefs.h"
6077 /* Override any gcc2 internal prototype to avoid an error. */
6078 /* We use char because int might match the return type of a gcc2
6079 builtin and then its argument prototype would still apply. */
6086 if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6088 eval "ac_cv_lib_$ac_lib_var=yes"
6090 echo "configure: failed program was:" >&5
6091 cat conftest.$ac_ext >&5
6093 eval "ac_cv_lib_$ac_lib_var=no"
6096 LIBS="$ac_save_LIBS"
6099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6100 echo "$ac_t""yes" 1>&6
6101 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
6103 echo "$ac_t""no" 1>&6
6110 # Most of the above shadow mechanisms will have set need_setuid to yes,
6111 # if they were found. But, on some systems, we need setuid even when
6112 # using plain old vanilla passwords.
6114 if test "$enable_locking" = yes ; then
6116 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
6123 if test "$have_shadow_adjunct" = yes ; then
6124 cat >> confdefs.h <<\EOF
6125 #define HAVE_ADJUNCT_PASSWD 1
6128 elif test "$have_shadow_enhanced" = yes ; then
6129 cat >> confdefs.h <<\EOF
6130 #define HAVE_ENHANCED_PASSWD 1
6133 elif test "$have_shadow_hpux" = yes ; then
6134 cat >> confdefs.h <<\EOF
6135 #define HAVE_HPUX_PASSWD 1
6138 elif test "$have_shadow" = yes ; then
6139 cat >> confdefs.h <<\EOF
6140 #define HAVE_SHADOW_PASSWD 1
6146 ###############################################################################
6150 ###############################################################################
6153 with_motif_req=unspecified
6154 # Check whether --with-motif or --without-motif was given.
6155 if test "${with_motif+set}" = set; then
6156 withval="$with_motif"
6157 with_motif="$withval"; with_motif_req="$withval"
6164 case "$with_motif" in
6169 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
6170 echo "configure:6182: checking for Motif headers" >&5
6171 d=$with_motif/include
6173 X_CFLAGS="-I$d $X_CFLAGS"
6174 echo "$ac_t""$d" 1>&6
6176 echo "$ac_t""not found ($d: no such directory)" 1>&6
6179 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
6180 echo "configure:6192: checking for Motif libs" >&5
6183 X_LIBS="-L$d $X_LIBS"
6184 echo "$ac_t""$d" 1>&6
6186 echo "$ac_t""not found ($d: no such directory)" 1>&6
6189 # replace the directory string with "yes".
6190 with_motif_req="yes"
6191 with_motif=$with_motif_req
6196 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6197 echo " If it is a directory, then \`DIR/include' will be added to"
6198 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6204 if test "$with_motif" != yes -a "$with_motif" != no ; then
6205 echo "error: must be yes or no: --with-motif=$with_motif"
6209 if test "$with_motif" = yes; then
6212 ac_save_CPPFLAGS="$CPPFLAGS"
6213 if test \! -z "$includedir" ; then
6214 CPPFLAGS="$CPPFLAGS -I$includedir"
6216 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6217 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6218 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6219 echo "configure:6231: checking for Xm/Xm.h" >&5
6220 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6221 echo $ac_n "(cached) $ac_c" 1>&6
6223 cat > conftest.$ac_ext <<EOF
6224 #line 6236 "configure"
6225 #include "confdefs.h"
6228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6229 { (eval echo configure:6241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6231 if test -z "$ac_err"; then
6233 eval "ac_cv_header_$ac_safe=yes"
6236 echo "configure: failed program was:" >&5
6237 cat conftest.$ac_ext >&5
6239 eval "ac_cv_header_$ac_safe=no"
6243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6244 echo "$ac_t""yes" 1>&6
6246 cat >> confdefs.h <<\EOF
6247 #define HAVE_MOTIF 1
6250 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6252 echo "$ac_t""no" 1>&6
6255 CPPFLAGS="$ac_save_CPPFLAGS"
6259 if test "$have_motif" = yes; then
6261 ac_save_CPPFLAGS="$CPPFLAGS"
6262 if test \! -z "$includedir" ; then
6263 CPPFLAGS="$CPPFLAGS -I$includedir"
6265 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6266 ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
6267 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
6268 echo "configure:6280: checking for Xm/ComboBox.h" >&5
6269 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6270 echo $ac_n "(cached) $ac_c" 1>&6
6272 cat > conftest.$ac_ext <<EOF
6273 #line 6285 "configure"
6274 #include "confdefs.h"
6275 #include <Xm/ComboBox.h>
6277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6278 { (eval echo configure:6290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6280 if test -z "$ac_err"; then
6282 eval "ac_cv_header_$ac_safe=yes"
6285 echo "configure: failed program was:" >&5
6286 cat conftest.$ac_ext >&5
6288 eval "ac_cv_header_$ac_safe=no"
6292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6293 echo "$ac_t""yes" 1>&6
6294 cat >> confdefs.h <<\EOF
6295 #define HAVE_XMCOMBOBOX 1
6299 echo "$ac_t""no" 1>&6
6302 CPPFLAGS="$ac_save_CPPFLAGS"
6306 ###############################################################################
6308 # Check for -lgtk (and Gnome stuff)
6310 ###############################################################################
6313 with_gtk_req=unspecified
6314 # Check whether --with-gtk or --without-gtk was given.
6315 if test "${with_gtk+set}" = set; then
6317 with_gtk="$withval"; with_gtk_req="$withval"
6323 # if --with-gtk=/directory/ was specified, remember that directory so that
6324 # we can also look for the `gtk-config' program in that directory.
6340 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6341 echo "configure:6353: checking for Gtk headers" >&5
6344 X_CFLAGS="-I$d $X_CFLAGS"
6345 echo "$ac_t""$d" 1>&6
6347 echo "$ac_t""not found ($d: no such directory)" 1>&6
6350 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6351 echo "configure:6363: checking for Gtk libs" >&5
6354 X_LIBS="-L$d $X_LIBS"
6355 echo "$ac_t""$d" 1>&6
6357 echo "$ac_t""not found ($d: no such directory)" 1>&6
6360 # replace the directory string with "yes".
6362 with_gtk=$with_gtk_req
6367 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6368 echo " If it is a directory, then \`DIR/include' will be added to"
6369 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6375 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6376 echo "error: must be yes or no: --with-gtk=$with_gtk"
6381 with_gnome_req=unspecified
6382 # Check whether --with-gnome or --without-gnome was given.
6383 if test "${with_gnome+set}" = set; then
6384 withval="$with_gnome"
6385 with_gnome="$withval"; with_gnome_req="$withval"
6391 # if --with-gnome=/directory/ was specified, remember that directory so that
6392 # we can also look for the `gnome-config' program in that directory.
6393 case "$with_gnome" in
6395 gnome_dir="$with_gnome"
6403 case "$with_gnome" in
6408 echo $ac_n "checking for Gnome headers""... $ac_c" 1>&6
6409 echo "configure:6421: checking for Gnome headers" >&5
6410 d=$with_gnome/include
6412 X_CFLAGS="-I$d $X_CFLAGS"
6413 echo "$ac_t""$d" 1>&6
6415 echo "$ac_t""not found ($d: no such directory)" 1>&6
6418 echo $ac_n "checking for Gnome libs""... $ac_c" 1>&6
6419 echo "configure:6431: checking for Gnome libs" >&5
6422 X_LIBS="-L$d $X_LIBS"
6423 echo "$ac_t""$d" 1>&6
6425 echo "$ac_t""not found ($d: no such directory)" 1>&6
6428 # replace the directory string with "yes".
6429 with_gnome_req="yes"
6430 with_gnome=$with_gnome_req
6435 echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
6436 echo " If it is a directory, then \`DIR/include' will be added to"
6437 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6443 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
6444 echo "error: must be yes or no: --with-gnome=$with_gnome"
6450 if test "$with_gtk" = yes; then
6453 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6454 # for glib-config and gtk-config.
6458 if test ! -z "$gtk_dir"; then
6459 # canonicalize slashes.
6460 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6461 gtk_path="$gtk_dir:$gtk_path"
6464 if test ! -z "gnome_dir"; then
6465 # canonicalize slashes.
6466 gnome_dir=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
6467 gtk_path="$gnome_dir:$gtk_path"
6470 for ac_prog in glib12-config glib-config
6472 # Extract the first word of "$ac_prog", so it can be a program name with args.
6473 set dummy $ac_prog; ac_word=$2
6474 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6475 echo "configure:6487: checking for $ac_word" >&5
6476 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6477 echo $ac_n "(cached) $ac_c" 1>&6
6479 case "$glib_config" in
6481 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6484 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6487 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6488 ac_dummy="$gtk_path"
6489 for ac_dir in $ac_dummy; do
6490 test -z "$ac_dir" && ac_dir=.
6491 if test -f $ac_dir/$ac_word; then
6492 ac_cv_path_glib_config="$ac_dir/$ac_word"
6500 glib_config="$ac_cv_path_glib_config"
6501 if test -n "$glib_config"; then
6502 echo "$ac_t""$glib_config" 1>&6
6504 echo "$ac_t""no" 1>&6
6507 test -n "$glib_config" && break
6510 for ac_prog in gtk12-config gtk-config
6512 # Extract the first word of "$ac_prog", so it can be a program name with args.
6513 set dummy $ac_prog; ac_word=$2
6514 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6515 echo "configure:6527: checking for $ac_word" >&5
6516 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6517 echo $ac_n "(cached) $ac_c" 1>&6
6519 case "$gtk_config" in
6521 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6524 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6527 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6528 ac_dummy="$gtk_path"
6529 for ac_dir in $ac_dummy; do
6530 test -z "$ac_dir" && ac_dir=.
6531 if test -f $ac_dir/$ac_word; then
6532 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6540 gtk_config="$ac_cv_path_gtk_config"
6541 if test -n "$gtk_config"; then
6542 echo "$ac_t""$gtk_config" 1>&6
6544 echo "$ac_t""no" 1>&6
6547 test -n "$gtk_config" && break
6551 if test "$with_gnome" = yes; then
6552 for ac_prog in gnome-config
6554 # Extract the first word of "$ac_prog", so it can be a program name with args.
6555 set dummy $ac_prog; ac_word=$2
6556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6557 echo "configure:6569: checking for $ac_word" >&5
6558 if eval "test \"`echo '$''{'ac_cv_path_gnome_config'+set}'`\" = set"; then
6559 echo $ac_n "(cached) $ac_c" 1>&6
6561 case "$gnome_config" in
6563 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
6566 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a dos path.
6569 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6570 ac_dummy="$gtk_path"
6571 for ac_dir in $ac_dummy; do
6572 test -z "$ac_dir" && ac_dir=.
6573 if test -f $ac_dir/$ac_word; then
6574 ac_cv_path_gnome_config="$ac_dir/$ac_word"
6582 gnome_config="$ac_cv_path_gnome_config"
6583 if test -n "$gnome_config"; then
6584 echo "$ac_t""$gnome_config" 1>&6
6586 echo "$ac_t""no" 1>&6
6589 test -n "$gnome_config" && break
6594 if test -n "$glib_config" -a -n "gtk_config" ; then
6596 if test "$with_gnome" = yes -a -n "$gnome_config" ; then
6601 if test "$have_gtk" = yes; then
6602 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6603 echo "configure:6615: checking Gtk version number" >&5
6604 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6605 echo $ac_n "(cached) $ac_c" 1>&6
6607 ac_cv_gtk_version_string=`$gtk_config --version`
6610 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6611 ac_gtk_version_string=$ac_cv_gtk_version_string
6614 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6615 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6617 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6618 if test -z "$ac_gtk_version"; then
6619 ac_gtk_version=unknown
6620 ac_gtk_version_string=unknown
6622 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6630 if test "$have_gtk" = yes; then
6631 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6632 echo "configure:6644: checking for Gtk includes" >&5
6633 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6634 echo $ac_n "(cached) $ac_c" 1>&6
6636 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6639 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6640 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6641 echo "configure:6653: checking for Gtk libs" >&5
6642 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6643 echo $ac_n "(cached) $ac_c" 1>&6
6645 ac_cv_gtk_config_libs=`$gtk_config --libs`
6648 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6650 ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
6651 ac_gtk_config_libs=$ac_cv_gtk_config_libs
6653 # Check for Gnome Capplet support.
6655 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6656 gnome_config_libs="capplet gnomeui"
6657 echo $ac_n "checking for Gnome capplet includes""... $ac_c" 1>&6
6658 echo "configure:6670: checking for Gnome capplet includes" >&5
6659 if eval "test \"`echo '$''{'ac_cv_gnome_config_cflags'+set}'`\" = set"; then
6660 echo $ac_n "(cached) $ac_c" 1>&6
6662 if ( $gnome_config --cflags $gnome_config_libs 2>&1 >/dev/null | \
6663 grep Unknown >/dev/null ) ; then
6664 ac_cv_gnome_config_cflags=''
6666 ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
6670 ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
6671 if test "$ac_gnome_config_cflags" = "" ; then
6673 echo "$ac_t""no" 1>&6
6675 echo "$ac_t""$ac_gnome_config_cflags" 1>&6
6679 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6680 echo $ac_n "checking for Gnome capplet libs""... $ac_c" 1>&6
6681 echo "configure:6693: checking for Gnome capplet libs" >&5
6682 if eval "test \"`echo '$''{'ac_cv_gnome_config_libs'+set}'`\" = set"; then
6683 echo $ac_n "(cached) $ac_c" 1>&6
6685 if ( $gnome_config --libs $gnome_config_libs 2>&1 >/dev/null |
6686 grep Unknown >/dev/null ) ; then
6687 ac_cv_gnome_config_libs=''
6689 ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
6693 ac_gnome_config_libs=$ac_cv_gnome_config_libs
6694 if test "$ac_gnome_config_libs" = "" ; then
6696 echo "$ac_t""no" 1>&6
6698 echo "$ac_t""$ac_gnome_config_libs" 1>&6
6703 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6704 GNOME_DATADIR=`$gnome_config --datadir`
6708 # If we have Gnome, then override the gtk-config values with
6709 # the gnome-config values.
6711 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6712 ac_gtk_config_cflags=$ac_gnome_config_cflags
6713 ac_gtk_config_libs=$ac_gnome_config_libs
6714 cat >> confdefs.h <<\EOF
6715 #define HAVE_CRAPPLET 1
6721 if test "$have_gtk" = yes; then
6722 INCLUDES="$INCLUDES $ac_gtk_config_cflags"
6723 GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
6724 cat >> confdefs.h <<\EOF
6733 ###############################################################################
6735 # Checking whether Motif is really Lesstif.
6737 ###############################################################################
6740 if test "$have_motif" = yes ; then
6741 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6742 echo "configure:6754: checking whether Motif is really LessTif" >&5
6743 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6744 echo $ac_n "(cached) $ac_c" 1>&6
6747 ac_save_CPPFLAGS="$CPPFLAGS"
6748 if test \! -z "$includedir" ; then
6749 CPPFLAGS="$CPPFLAGS -I$includedir"
6751 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6752 cat > conftest.$ac_ext <<EOF
6753 #line 6765 "configure"
6754 #include "confdefs.h"
6757 long vers = LesstifVersion;
6760 if { (eval echo configure:6772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6762 ac_cv_have_lesstif=yes
6764 echo "configure: failed program was:" >&5
6765 cat conftest.$ac_ext >&5
6767 ac_cv_have_lesstif=no
6770 CPPFLAGS="$ac_save_CPPFLAGS"
6773 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
6774 have_lesstif=$ac_cv_have_lesstif
6778 lesstif_version=unknown
6779 lesstif_version_string=unknown
6781 if test "$have_lesstif" = yes ; then
6783 echo unknown > conftest-lt
6784 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
6785 echo "configure:6797: checking LessTif version number" >&5
6786 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
6787 echo $ac_n "(cached) $ac_c" 1>&6
6790 ac_save_CPPFLAGS="$CPPFLAGS"
6791 if test \! -z "$includedir" ; then
6792 CPPFLAGS="$CPPFLAGS -I$includedir"
6794 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6795 if test "$cross_compiling" = yes; then
6796 ac_cv_lesstif_version=unknown
6797 ac_cv_lesstif_version_string=unknown
6799 cat > conftest.$ac_ext <<EOF
6800 #line 6812 "configure"
6801 #include "confdefs.h"
6805 FILE *f = fopen("conftest-lt", "w");
6807 fprintf(f, "%d %d.%d\n", LesstifVersion,
6808 LESSTIF_VERSION, LESSTIF_REVISION);
6813 if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6815 ltv=`cat conftest-lt`
6816 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
6817 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
6819 echo "configure: failed program was:" >&5
6820 cat conftest.$ac_ext >&5
6822 ac_cv_lesstif_version=unknown
6823 ac_cv_lesstif_version_string=unknown
6828 CPPFLAGS="$ac_save_CPPFLAGS"
6831 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
6833 lesstif_version=$ac_cv_lesstif_version
6834 lesstif_version_string=$ac_cv_lesstif_version_string
6839 if test "$have_motif" = yes ; then
6841 echo unknown > conftest-mt
6842 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
6843 echo "configure:6855: checking Motif version number" >&5
6844 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
6845 echo $ac_n "(cached) $ac_c" 1>&6
6848 ac_save_CPPFLAGS="$CPPFLAGS"
6849 if test \! -z "$includedir" ; then
6850 CPPFLAGS="$CPPFLAGS -I$includedir"
6852 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6853 if test "$cross_compiling" = yes; then
6854 ac_cv_motif_version=unknown
6855 ac_cv_motif_version_string=unknown
6857 cat > conftest.$ac_ext <<EOF
6858 #line 6870 "configure"
6859 #include "confdefs.h"
6863 FILE *f = fopen("conftest-mt", "w");
6865 fprintf(f, "%d %d.%d\n", XmVersion,
6866 XmVERSION, XmREVISION);
6871 if { (eval echo configure:6883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6873 mtv=`cat conftest-mt`
6874 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
6875 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
6877 echo "configure: failed program was:" >&5
6878 cat conftest.$ac_ext >&5
6880 ac_cv_motif_version=unknown
6881 ac_cv_motif_version_string=unknown
6886 CPPFLAGS="$ac_save_CPPFLAGS"
6889 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
6891 motif_version=$ac_cv_motif_version
6892 motif_version_string=$ac_cv_motif_version_string
6897 ###############################################################################
6899 # Checking whether Motif requires -lXpm.
6901 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
6902 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
6903 # of the library whether to build the XPM code into libXm, or whether
6904 # to rely on an external libXm. So the only way to tell whether XPM is
6905 # a link-time requirement is to examine libXm.a, which is very
6906 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
6907 # always link against XPM if the XPM lib exists (and this will be a
6908 # no-op if libXm happens to already have the XPM code in it.)
6910 ###############################################################################
6912 motif_requires_xpm=no
6913 if test "$have_motif" = yes ; then
6914 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
6915 echo "configure:6927: checking whether Motif requires XPM" >&5
6916 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
6918 motif_requires_xpm=yes
6919 echo "$ac_t""maybe" 1>&6
6921 echo "$ac_t""no" 1>&6
6926 ###############################################################################
6928 # Checking whether Motif requires -lXp.
6930 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
6931 # Extension". Why this extension isn't in -lXext with all the others,
6934 ###############################################################################
6937 if test "$have_motif" = yes ; then
6940 ac_save_CPPFLAGS="$CPPFLAGS"
6941 ac_save_LDFLAGS="$LDFLAGS"
6942 # ac_save_LIBS="$LIBS"
6944 if test \! -z "$includedir" ; then
6945 CPPFLAGS="$CPPFLAGS -I$includedir"
6947 # note: $X_CFLAGS includes $x_includes
6948 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6950 if test \! -z "$libdir" ; then
6951 LDFLAGS="$LDFLAGS -L$libdir"
6953 # note: $X_LIBS includes $x_libraries
6954 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6956 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
6957 echo "configure:6969: checking for XpQueryExtension in -lXp" >&5
6958 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
6959 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6960 echo $ac_n "(cached) $ac_c" 1>&6
6962 ac_save_LIBS="$LIBS"
6963 LIBS="-lXp -lX11 -lXext -lm $LIBS"
6964 cat > conftest.$ac_ext <<EOF
6965 #line 6977 "configure"
6966 #include "confdefs.h"
6967 /* Override any gcc2 internal prototype to avoid an error. */
6968 /* We use char because int might match the return type of a gcc2
6969 builtin and then its argument prototype would still apply. */
6970 char XpQueryExtension();
6976 if { (eval echo configure:6988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6978 eval "ac_cv_lib_$ac_lib_var=yes"
6980 echo "configure: failed program was:" >&5
6981 cat conftest.$ac_ext >&5
6983 eval "ac_cv_lib_$ac_lib_var=no"
6986 LIBS="$ac_save_LIBS"
6989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6990 echo "$ac_t""yes" 1>&6
6991 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
6993 echo "$ac_t""no" 1>&6
6997 CPPFLAGS="$ac_save_CPPFLAGS"
6998 LDFLAGS="$ac_save_LDFLAGS"
6999 # LIBS="$ac_save_LIBS"
7004 ###############################################################################
7006 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
7008 ###############################################################################
7011 if test "$have_motif" = yes ; then
7013 ac_save_CPPFLAGS="$CPPFLAGS"
7014 ac_save_LDFLAGS="$LDFLAGS"
7015 # ac_save_LIBS="$LIBS"
7017 if test \! -z "$includedir" ; then
7018 CPPFLAGS="$CPPFLAGS -I$includedir"
7020 # note: $X_CFLAGS includes $x_includes
7021 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7023 if test \! -z "$libdir" ; then
7024 LDFLAGS="$LDFLAGS -L$libdir"
7026 # note: $X_LIBS includes $x_libraries
7027 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7029 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
7030 echo "configure:7042: checking for _Xsetlocale in -lXintl" >&5
7031 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
7032 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7033 echo $ac_n "(cached) $ac_c" 1>&6
7035 ac_save_LIBS="$LIBS"
7036 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
7037 cat > conftest.$ac_ext <<EOF
7038 #line 7050 "configure"
7039 #include "confdefs.h"
7040 /* Override any gcc2 internal prototype to avoid an error. */
7041 /* We use char because int might match the return type of a gcc2
7042 builtin and then its argument prototype would still apply. */
7049 if { (eval echo configure:7061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7051 eval "ac_cv_lib_$ac_lib_var=yes"
7053 echo "configure: failed program was:" >&5
7054 cat conftest.$ac_ext >&5
7056 eval "ac_cv_lib_$ac_lib_var=no"
7059 LIBS="$ac_save_LIBS"
7062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7063 echo "$ac_t""yes" 1>&6
7066 echo "$ac_t""no" 1>&6
7070 CPPFLAGS="$ac_save_CPPFLAGS"
7071 LDFLAGS="$ac_save_LDFLAGS"
7072 # LIBS="$ac_save_LIBS"
7074 if test "$have_xintl" = yes; then
7075 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
7080 ###############################################################################
7082 # Check for -lGL or -lMesaGL.
7084 ###############################################################################
7088 with_gl_req=unspecified
7090 # Check whether --with-gl or --without-gl was given.
7091 if test "${with_gl+set}" = set; then
7093 with_gl="$withval"; with_gl_req="$withval"
7105 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
7106 echo "configure:7118: checking for GL headers" >&5
7109 X_CFLAGS="-I$d $X_CFLAGS"
7110 echo "$ac_t""$d" 1>&6
7112 echo "$ac_t""not found ($d: no such directory)" 1>&6
7115 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
7116 echo "configure:7128: checking for GL libs" >&5
7119 X_LIBS="-L$d $X_LIBS"
7120 echo "$ac_t""$d" 1>&6
7122 echo "$ac_t""not found ($d: no such directory)" 1>&6
7125 # replace the directory string with "yes".
7127 with_gl=$with_gl_req
7132 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
7133 echo " If it is a directory, then \`DIR/include' will be added to"
7134 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7140 ac_mesagl_version=unknown
7141 ac_mesagl_version_string=unknown
7143 if test "$with_gl" = yes; then
7145 ac_save_CPPFLAGS="$CPPFLAGS"
7146 if test \! -z "$includedir" ; then
7147 CPPFLAGS="$CPPFLAGS -I$includedir"
7149 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7150 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
7151 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
7152 echo "configure:7164: checking for GL/gl.h" >&5
7153 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7154 echo $ac_n "(cached) $ac_c" 1>&6
7156 cat > conftest.$ac_ext <<EOF
7157 #line 7169 "configure"
7158 #include "confdefs.h"
7161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7162 { (eval echo configure:7174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7164 if test -z "$ac_err"; then
7166 eval "ac_cv_header_$ac_safe=yes"
7169 echo "configure: failed program was:" >&5
7170 cat conftest.$ac_ext >&5
7172 eval "ac_cv_header_$ac_safe=no"
7176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7177 echo "$ac_t""yes" 1>&6
7180 echo "$ac_t""no" 1>&6
7183 CPPFLAGS="$ac_save_CPPFLAGS"
7184 if test "$have_gl" = yes ; then
7186 ac_save_CPPFLAGS="$CPPFLAGS"
7187 if test \! -z "$includedir" ; then
7188 CPPFLAGS="$CPPFLAGS -I$includedir"
7190 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7191 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
7192 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
7193 echo "configure:7205: checking for GL/glx.h" >&5
7194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7195 echo $ac_n "(cached) $ac_c" 1>&6
7197 cat > conftest.$ac_ext <<EOF
7198 #line 7210 "configure"
7199 #include "confdefs.h"
7202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7203 { (eval echo configure:7215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7205 if test -z "$ac_err"; then
7207 eval "ac_cv_header_$ac_safe=yes"
7210 echo "configure: failed program was:" >&5
7211 cat conftest.$ac_ext >&5
7213 eval "ac_cv_header_$ac_safe=no"
7217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7218 echo "$ac_t""yes" 1>&6
7221 echo "$ac_t""no" 1>&6
7224 CPPFLAGS="$ac_save_CPPFLAGS"
7227 # If we have the headers, try and figure out which vendor it's from.
7229 if test "$have_gl" = yes ; then
7231 # We need to know whether it's MesaGL so that we know which libraries
7234 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7235 echo "configure:7247: checking whether GL is really MesaGL" >&5
7236 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7237 echo $ac_n "(cached) $ac_c" 1>&6
7239 ac_cv_have_mesa_gl=no
7241 ac_save_CPPFLAGS="$CPPFLAGS"
7242 if test \! -z "$includedir" ; then
7243 CPPFLAGS="$CPPFLAGS -I$includedir"
7245 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7246 cat > conftest.$ac_ext <<EOF
7247 #line 7259 "configure"
7248 #include "confdefs.h"
7251 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7252 egrep "Mesa|MESA" >/dev/null 2>&1; then
7254 ac_cv_have_mesa_gl=yes
7258 CPPFLAGS="$ac_save_CPPFLAGS"
7262 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7263 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7270 # Some versions of MesaGL are compiled to require -lpthread.
7271 # So if the Mesa headers exist, and -lpthread exists, then always
7272 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
7274 if test "$ac_have_mesa_gl" = yes; then
7275 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7276 echo "configure:7288: checking for pthread_create in -lpthread" >&5
7277 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7278 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7279 echo $ac_n "(cached) $ac_c" 1>&6
7281 ac_save_LIBS="$LIBS"
7282 LIBS="-lpthread $LIBS"
7283 cat > conftest.$ac_ext <<EOF
7284 #line 7296 "configure"
7285 #include "confdefs.h"
7286 /* Override any gcc2 internal prototype to avoid an error. */
7287 /* We use char because int might match the return type of a gcc2
7288 builtin and then its argument prototype would still apply. */
7289 char pthread_create();
7295 if { (eval echo configure:7307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7297 eval "ac_cv_lib_$ac_lib_var=yes"
7299 echo "configure: failed program was:" >&5
7300 cat conftest.$ac_ext >&5
7302 eval "ac_cv_lib_$ac_lib_var=no"
7305 LIBS="$ac_save_LIBS"
7308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7309 echo "$ac_t""yes" 1>&6
7312 echo "$ac_t""no" 1>&6
7318 # If we have Mesa headers, check to see if we can link against -lMesaGL.
7319 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
7320 # Else, warn that GL is busted. (We have the headers, but no libs.)
7323 if test "$ac_have_mesa_gl" = yes ; then
7325 ac_save_CPPFLAGS="$CPPFLAGS"
7326 ac_save_LDFLAGS="$LDFLAGS"
7327 # ac_save_LIBS="$LIBS"
7329 if test \! -z "$includedir" ; then
7330 CPPFLAGS="$CPPFLAGS -I$includedir"
7332 # note: $X_CFLAGS includes $x_includes
7333 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7335 if test \! -z "$libdir" ; then
7336 LDFLAGS="$LDFLAGS -L$libdir"
7338 # note: $X_LIBS includes $x_libraries
7339 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7341 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
7342 echo "configure:7354: checking for glXCreateContext in -lMesaGL" >&5
7343 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7344 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7345 echo $ac_n "(cached) $ac_c" 1>&6
7347 ac_save_LIBS="$LIBS"
7348 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7349 cat > conftest.$ac_ext <<EOF
7350 #line 7362 "configure"
7351 #include "confdefs.h"
7352 /* Override any gcc2 internal prototype to avoid an error. */
7353 /* We use char because int might match the return type of a gcc2
7354 builtin and then its argument prototype would still apply. */
7355 char glXCreateContext();
7361 if { (eval echo configure:7373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7363 eval "ac_cv_lib_$ac_lib_var=yes"
7365 echo "configure: failed program was:" >&5
7366 cat conftest.$ac_ext >&5
7368 eval "ac_cv_lib_$ac_lib_var=no"
7371 LIBS="$ac_save_LIBS"
7374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7375 echo "$ac_t""yes" 1>&6
7377 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
7379 echo "$ac_t""no" 1>&6
7382 CPPFLAGS="$ac_save_CPPFLAGS"
7383 LDFLAGS="$ac_save_LDFLAGS"
7384 # LIBS="$ac_save_LIBS"
7388 if test "$gl_lib_1" = "" ; then
7390 ac_save_CPPFLAGS="$CPPFLAGS"
7391 ac_save_LDFLAGS="$LDFLAGS"
7392 # ac_save_LIBS="$LIBS"
7394 if test \! -z "$includedir" ; then
7395 CPPFLAGS="$CPPFLAGS -I$includedir"
7397 # note: $X_CFLAGS includes $x_includes
7398 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7400 if test \! -z "$libdir" ; then
7401 LDFLAGS="$LDFLAGS -L$libdir"
7403 # note: $X_LIBS includes $x_libraries
7404 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7406 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7407 echo "configure:7419: checking for glXCreateContext in -lGL" >&5
7408 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7409 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7410 echo $ac_n "(cached) $ac_c" 1>&6
7412 ac_save_LIBS="$LIBS"
7413 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7414 cat > conftest.$ac_ext <<EOF
7415 #line 7427 "configure"
7416 #include "confdefs.h"
7417 /* Override any gcc2 internal prototype to avoid an error. */
7418 /* We use char because int might match the return type of a gcc2
7419 builtin and then its argument prototype would still apply. */
7420 char glXCreateContext();
7426 if { (eval echo configure:7438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7428 eval "ac_cv_lib_$ac_lib_var=yes"
7430 echo "configure: failed program was:" >&5
7431 cat conftest.$ac_ext >&5
7433 eval "ac_cv_lib_$ac_lib_var=no"
7436 LIBS="$ac_save_LIBS"
7439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7440 echo "$ac_t""yes" 1>&6
7442 GL_LIBS="-lGL -lGLU $GL_LIBS"
7444 echo "$ac_t""no" 1>&6
7447 CPPFLAGS="$ac_save_CPPFLAGS"
7448 LDFLAGS="$ac_save_LDFLAGS"
7449 # LIBS="$ac_save_LIBS"
7453 if test "$gl_lib_1" = "" ; then
7454 # we have headers, but no libs -- bail.
7459 # linking works -- we can build the GL hacks.
7460 cat >> confdefs.h <<\EOF
7464 if test "$ac_have_mesa_gl" = yes ; then
7465 cat >> confdefs.h <<\EOF
7466 #define HAVE_MESA_GL 1
7474 # Now that we know we have GL headers and libs, do some more GL testing.
7477 if test "$have_gl" = yes ; then
7478 # If it's MesaGL, we'd like to issue a warning if the version number
7479 # is less than or equal to 2.6, because that version had a security bug.
7481 if test "$ac_have_mesa_gl" = yes; then
7483 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7484 echo "configure:7496: checking MesaGL version number" >&5
7485 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7486 echo $ac_n "(cached) $ac_c" 1>&6
7488 cat > conftest.$ac_ext <<EOF
7489 #line 7501 "configure"
7490 #include "confdefs.h"
7492 #ifndef MESA_MAJOR_VERSION
7493 # include <GL/xmesa.h>
7494 # define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
7495 # define MESA_MINOR_VERSION XMESA_MINOR_VERSION
7497 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7500 ac_save_CPPFLAGS="$CPPFLAGS"
7501 if test \! -z "$includedir" ; then
7502 CPPFLAGS="$CPPFLAGS -I$includedir"
7504 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7508 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7509 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7512 rm -f conftest.$ac_ext
7514 CPPFLAGS="$ac_save_CPPFLAGS"
7516 if test "$mglv" = ""; then
7517 ac_mesagl_version=unknown
7518 ac_mesagl_version_string=unknown
7520 ac_mesagl_version_string=$mglv
7521 maj=`echo $mglv | sed -n 's/\..*//p'`
7522 min=`echo $mglv | sed -n 's/.*\.//p'`
7523 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7524 if test -z "$ac_mesagl_version"; then
7525 ac_mesagl_version=unknown
7526 ac_mesagl_version_string=unknown
7529 ac_cv_mesagl_version=$ac_mesagl_version
7530 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7534 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7535 ac_mesagl_version=$ac_cv_mesagl_version
7536 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7540 # Check for OpenGL 1.1 features.
7543 ac_save_CPPFLAGS="$CPPFLAGS"
7544 ac_save_LDFLAGS="$LDFLAGS"
7545 # ac_save_LIBS="$LIBS"
7547 if test \! -z "$includedir" ; then
7548 CPPFLAGS="$CPPFLAGS -I$includedir"
7550 # note: $X_CFLAGS includes $x_includes
7551 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7553 if test \! -z "$libdir" ; then
7554 LDFLAGS="$LDFLAGS -L$libdir"
7556 # note: $X_LIBS includes $x_libraries
7557 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7559 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7560 echo "configure:7572: checking for glBindTexture in -l$gl_lib_1" >&5
7561 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7562 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7563 echo $ac_n "(cached) $ac_c" 1>&6
7565 ac_save_LIBS="$LIBS"
7566 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7567 cat > conftest.$ac_ext <<EOF
7568 #line 7580 "configure"
7569 #include "confdefs.h"
7570 /* Override any gcc2 internal prototype to avoid an error. */
7571 /* We use char because int might match the return type of a gcc2
7572 builtin and then its argument prototype would still apply. */
7573 char glBindTexture();
7579 if { (eval echo configure:7591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7581 eval "ac_cv_lib_$ac_lib_var=yes"
7583 echo "configure: failed program was:" >&5
7584 cat conftest.$ac_ext >&5
7586 eval "ac_cv_lib_$ac_lib_var=no"
7589 LIBS="$ac_save_LIBS"
7592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7593 echo "$ac_t""yes" 1>&6
7594 cat >> confdefs.h <<\EOF
7595 #define HAVE_GLBINDTEXTURE 1
7599 echo "$ac_t""no" 1>&6
7603 CPPFLAGS="$ac_save_CPPFLAGS"
7604 LDFLAGS="$ac_save_LDFLAGS"
7605 # LIBS="$ac_save_LIBS"
7609 elif test "$with_gl" != no; then
7610 echo "error: must be yes or no: --with-gl=$with_gl"
7615 ###############################################################################
7619 ###############################################################################
7622 with_gle_req=unspecified
7624 # Check whether --with-gle or --without-gle was given.
7625 if test "${with_gle+set}" = set; then
7627 with_gle="$withval"; with_gle_req="$withval"
7639 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7640 echo "configure:7652: checking for GLE headers" >&5
7643 X_CFLAGS="-I$d $X_CFLAGS"
7644 echo "$ac_t""$d" 1>&6
7646 echo "$ac_t""not found ($d: no such directory)" 1>&6
7649 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7650 echo "configure:7662: checking for GLE libs" >&5
7653 X_LIBS="-L$d $X_LIBS"
7654 echo "$ac_t""$d" 1>&6
7656 echo "$ac_t""not found ($d: no such directory)" 1>&6
7659 # replace the directory string with "yes".
7661 with_gle=$with_gle_req
7666 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7667 echo " If it is a directory, then \`DIR/include' will be added to"
7668 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7676 if test "$with_gle" = yes; then
7679 ac_save_CPPFLAGS="$CPPFLAGS"
7680 if test \! -z "$includedir" ; then
7681 CPPFLAGS="$CPPFLAGS -I$includedir"
7683 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7684 ac_safe=`echo "GL/gle.h" | sed 'y%./+-%__p_%'`
7685 echo $ac_n "checking for GL/gle.h""... $ac_c" 1>&6
7686 echo "configure:7698: checking for GL/gle.h" >&5
7687 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7688 echo $ac_n "(cached) $ac_c" 1>&6
7690 cat > conftest.$ac_ext <<EOF
7691 #line 7703 "configure"
7692 #include "confdefs.h"
7695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7696 { (eval echo configure:7708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7698 if test -z "$ac_err"; then
7700 eval "ac_cv_header_$ac_safe=yes"
7703 echo "configure: failed program was:" >&5
7704 cat conftest.$ac_ext >&5
7706 eval "ac_cv_header_$ac_safe=no"
7710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7711 echo "$ac_t""yes" 1>&6
7714 echo "$ac_t""no" 1>&6
7717 CPPFLAGS="$ac_save_CPPFLAGS"
7718 if test "$have_gle3" = yes ; then
7722 ac_save_CPPFLAGS="$CPPFLAGS"
7723 if test \! -z "$includedir" ; then
7724 CPPFLAGS="$CPPFLAGS -I$includedir"
7726 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7727 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7728 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7729 echo "configure:7741: checking for GL/gutil.h" >&5
7730 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7731 echo $ac_n "(cached) $ac_c" 1>&6
7733 cat > conftest.$ac_ext <<EOF
7734 #line 7746 "configure"
7735 #include "confdefs.h"
7736 #include <GL/gutil.h>
7738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7739 { (eval echo configure:7751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7741 if test -z "$ac_err"; then
7743 eval "ac_cv_header_$ac_safe=yes"
7746 echo "configure: failed program was:" >&5
7747 cat conftest.$ac_ext >&5
7749 eval "ac_cv_header_$ac_safe=no"
7753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7754 echo "$ac_t""yes" 1>&6
7757 echo "$ac_t""no" 1>&6
7760 CPPFLAGS="$ac_save_CPPFLAGS"
7761 if test "$have_gle" = yes ; then
7763 ac_save_CPPFLAGS="$CPPFLAGS"
7764 if test \! -z "$includedir" ; then
7765 CPPFLAGS="$CPPFLAGS -I$includedir"
7767 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7768 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
7769 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
7770 echo "configure:7782: checking for GL/tube.h" >&5
7771 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7772 echo $ac_n "(cached) $ac_c" 1>&6
7774 cat > conftest.$ac_ext <<EOF
7775 #line 7787 "configure"
7776 #include "confdefs.h"
7777 #include <GL/tube.h>
7779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7780 { (eval echo configure:7792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7782 if test -z "$ac_err"; then
7784 eval "ac_cv_header_$ac_safe=yes"
7787 echo "configure: failed program was:" >&5
7788 cat conftest.$ac_ext >&5
7790 eval "ac_cv_header_$ac_safe=no"
7794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7795 echo "$ac_t""yes" 1>&6
7798 echo "$ac_t""no" 1>&6
7801 CPPFLAGS="$ac_save_CPPFLAGS"
7805 if test "$have_gle" = yes ; then
7809 ac_save_CPPFLAGS="$CPPFLAGS"
7810 ac_save_LDFLAGS="$LDFLAGS"
7811 # ac_save_LIBS="$LIBS"
7813 if test \! -z "$includedir" ; then
7814 CPPFLAGS="$CPPFLAGS -I$includedir"
7816 # note: $X_CFLAGS includes $x_includes
7817 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7819 if test \! -z "$libdir" ; then
7820 LDFLAGS="$LDFLAGS -L$libdir"
7822 # note: $X_LIBS includes $x_libraries
7823 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7825 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
7826 echo "configure:7838: checking for gleCreateGC in -lgle" >&5
7827 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
7828 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7829 echo $ac_n "(cached) $ac_c" 1>&6
7831 ac_save_LIBS="$LIBS"
7832 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7833 cat > conftest.$ac_ext <<EOF
7834 #line 7846 "configure"
7835 #include "confdefs.h"
7836 /* Override any gcc2 internal prototype to avoid an error. */
7837 /* We use char because int might match the return type of a gcc2
7838 builtin and then its argument prototype would still apply. */
7845 if { (eval echo configure:7857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7847 eval "ac_cv_lib_$ac_lib_var=yes"
7849 echo "configure: failed program was:" >&5
7850 cat conftest.$ac_ext >&5
7852 eval "ac_cv_lib_$ac_lib_var=no"
7855 LIBS="$ac_save_LIBS"
7858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7859 echo "$ac_t""yes" 1>&6
7860 have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
7862 echo "$ac_t""no" 1>&6
7865 CPPFLAGS="$ac_save_CPPFLAGS"
7866 LDFLAGS="$ac_save_LDFLAGS"
7867 # LIBS="$ac_save_LIBS"
7870 if test "$have_gle" = yes ; then
7874 # sometimes the libmatrix stuff is included in libgle. look there first.
7876 # I don't get it. For some reason, this test passes on SGI, as if
7877 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
7878 # Yet the link is succeeding. Why???
7880 # AC_CHECK_X_LIB(gle, uview_direction_d,
7881 # [have_gle=yes; gle_halfassed=no],
7882 # [], $GL_LIBS -lX11 -lXext -lm)
7884 # As of GLE 3 this is in libgle, and has changed name to uview_direction!
7886 if test "$have_gle3" = yes ; then
7888 ac_save_CPPFLAGS="$CPPFLAGS"
7889 ac_save_LDFLAGS="$LDFLAGS"
7890 # ac_save_LIBS="$LIBS"
7892 if test \! -z "$includedir" ; then
7893 CPPFLAGS="$CPPFLAGS -I$includedir"
7895 # note: $X_CFLAGS includes $x_includes
7896 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7898 if test \! -z "$libdir" ; then
7899 LDFLAGS="$LDFLAGS -L$libdir"
7901 # note: $X_LIBS includes $x_libraries
7902 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7904 echo $ac_n "checking for uview_direction in -lgle""... $ac_c" 1>&6
7905 echo "configure:7917: checking for uview_direction in -lgle" >&5
7906 ac_lib_var=`echo gle'_'uview_direction | sed 'y%./+-%__p_%'`
7907 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7908 echo $ac_n "(cached) $ac_c" 1>&6
7910 ac_save_LIBS="$LIBS"
7911 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7912 cat > conftest.$ac_ext <<EOF
7913 #line 7925 "configure"
7914 #include "confdefs.h"
7915 /* Override any gcc2 internal prototype to avoid an error. */
7916 /* We use char because int might match the return type of a gcc2
7917 builtin and then its argument prototype would still apply. */
7918 char uview_direction();
7924 if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7926 eval "ac_cv_lib_$ac_lib_var=yes"
7928 echo "configure: failed program was:" >&5
7929 cat conftest.$ac_ext >&5
7931 eval "ac_cv_lib_$ac_lib_var=no"
7934 LIBS="$ac_save_LIBS"
7937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7938 echo "$ac_t""yes" 1>&6
7939 have_gle=yes; gle_halfassed=no
7941 echo "$ac_t""no" 1>&6
7944 CPPFLAGS="$ac_save_CPPFLAGS"
7945 LDFLAGS="$ac_save_LDFLAGS"
7946 # LIBS="$ac_save_LIBS"
7949 # if it wasn't in libgle, then look in libmatrix.
7950 if test "$have_gle" = no ; then
7952 ac_save_CPPFLAGS="$CPPFLAGS"
7953 ac_save_LDFLAGS="$LDFLAGS"
7954 # ac_save_LIBS="$LIBS"
7956 if test \! -z "$includedir" ; then
7957 CPPFLAGS="$CPPFLAGS -I$includedir"
7959 # note: $X_CFLAGS includes $x_includes
7960 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7962 if test \! -z "$libdir" ; then
7963 LDFLAGS="$LDFLAGS -L$libdir"
7965 # note: $X_LIBS includes $x_libraries
7966 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7968 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
7969 echo "configure:7981: checking for uview_direction_d in -lmatrix" >&5
7970 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
7971 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7972 echo $ac_n "(cached) $ac_c" 1>&6
7974 ac_save_LIBS="$LIBS"
7975 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
7976 cat > conftest.$ac_ext <<EOF
7977 #line 7989 "configure"
7978 #include "confdefs.h"
7979 /* Override any gcc2 internal prototype to avoid an error. */
7980 /* We use char because int might match the return type of a gcc2
7981 builtin and then its argument prototype would still apply. */
7982 char uview_direction_d();
7988 if { (eval echo configure:8000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7990 eval "ac_cv_lib_$ac_lib_var=yes"
7992 echo "configure: failed program was:" >&5
7993 cat conftest.$ac_ext >&5
7995 eval "ac_cv_lib_$ac_lib_var=no"
7998 LIBS="$ac_save_LIBS"
8001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8002 echo "$ac_t""yes" 1>&6
8003 have_gle=yes; gle_halfassed=no;
8004 GLE_LIBS="$GLE_LIBS -lmatrix"
8006 echo "$ac_t""no" 1>&6
8009 CPPFLAGS="$ac_save_CPPFLAGS"
8010 LDFLAGS="$ac_save_LDFLAGS"
8011 # LIBS="$ac_save_LIBS"
8016 if test "$have_gle" = yes ; then
8017 cat >> confdefs.h <<\EOF
8021 if test "$have_gle3" = yes ; then
8022 cat >> confdefs.h <<\EOF
8029 elif test "$with_gle" != no; then
8030 echo "error: must be yes or no: --with-gle=$with_gle"
8037 ###############################################################################
8041 ###############################################################################
8044 with_xpm_req=unspecified
8045 # Check whether --with-xpm or --without-xpm was given.
8046 if test "${with_xpm+set}" = set; then
8048 with_xpm="$withval"; with_xpm_req="$withval"
8060 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
8061 echo "configure:8073: checking for XPM headers" >&5
8064 X_CFLAGS="-I$d $X_CFLAGS"
8065 echo "$ac_t""$d" 1>&6
8067 echo "$ac_t""not found ($d: no such directory)" 1>&6
8070 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
8071 echo "configure:8083: checking for XPM libs" >&5
8074 X_LIBS="-L$d $X_LIBS"
8075 echo "$ac_t""$d" 1>&6
8077 echo "$ac_t""not found ($d: no such directory)" 1>&6
8080 # replace the directory string with "yes".
8082 with_xpm=$with_xpm_req
8087 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
8088 echo " If it is a directory, then \`DIR/include' will be added to"
8089 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8095 if test "$with_xpm" = yes; then
8097 ac_save_CPPFLAGS="$CPPFLAGS"
8098 if test \! -z "$includedir" ; then
8099 CPPFLAGS="$CPPFLAGS -I$includedir"
8101 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8102 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
8103 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
8104 echo "configure:8116: checking for X11/xpm.h" >&5
8105 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8106 echo $ac_n "(cached) $ac_c" 1>&6
8108 cat > conftest.$ac_ext <<EOF
8109 #line 8121 "configure"
8110 #include "confdefs.h"
8111 #include <X11/xpm.h>
8113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8114 { (eval echo configure:8126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8116 if test -z "$ac_err"; then
8118 eval "ac_cv_header_$ac_safe=yes"
8121 echo "configure: failed program was:" >&5
8122 cat conftest.$ac_ext >&5
8124 eval "ac_cv_header_$ac_safe=no"
8128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8129 echo "$ac_t""yes" 1>&6
8131 cat >> confdefs.h <<\EOF
8137 echo "$ac_t""no" 1>&6
8140 CPPFLAGS="$ac_save_CPPFLAGS"
8141 elif test "$with_xpm" != no; then
8142 echo "error: must be yes or no: --with-xpm=$with_xpm"
8146 # See comment near $motif_requires_xpm, above.
8147 # Need to do this here, after both Motif and XPM have been checked for.
8149 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
8150 if test "$motif_requires_xpm" = yes ; then
8151 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
8156 ###############################################################################
8158 # Check for the XSHM server extension.
8160 ###############################################################################
8163 with_xshm_req=unspecified
8164 # Check whether --with-xshm-ext or --without-xshm-ext was given.
8165 if test "${with_xshm_ext+set}" = set; then
8166 withval="$with_xshm_ext"
8167 with_xshm="$withval"; with_xshm_req="$withval"
8174 case "$with_xshm" in
8179 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
8180 echo "configure:8192: checking for XSHM headers" >&5
8181 d=$with_xshm/include
8183 X_CFLAGS="-I$d $X_CFLAGS"
8184 echo "$ac_t""$d" 1>&6
8186 echo "$ac_t""not found ($d: no such directory)" 1>&6
8189 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
8190 echo "configure:8202: checking for XSHM libs" >&5
8193 X_LIBS="-L$d $X_LIBS"
8194 echo "$ac_t""$d" 1>&6
8196 echo "$ac_t""not found ($d: no such directory)" 1>&6
8199 # replace the directory string with "yes".
8201 with_xshm=$with_xshm_req
8206 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
8207 echo " If it is a directory, then \`DIR/include' will be added to"
8208 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8214 if test "$with_xshm" = yes; then
8216 # first check for Xshm.h.
8218 ac_save_CPPFLAGS="$CPPFLAGS"
8219 if test \! -z "$includedir" ; then
8220 CPPFLAGS="$CPPFLAGS -I$includedir"
8222 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8223 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
8224 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
8225 echo "configure:8237: checking for X11/extensions/XShm.h" >&5
8226 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8227 echo $ac_n "(cached) $ac_c" 1>&6
8229 cat > conftest.$ac_ext <<EOF
8230 #line 8242 "configure"
8231 #include "confdefs.h"
8232 #include <X11/extensions/XShm.h>
8234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8235 { (eval echo configure:8247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8237 if test -z "$ac_err"; then
8239 eval "ac_cv_header_$ac_safe=yes"
8242 echo "configure: failed program was:" >&5
8243 cat conftest.$ac_ext >&5
8245 eval "ac_cv_header_$ac_safe=no"
8249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8250 echo "$ac_t""yes" 1>&6
8253 echo "$ac_t""no" 1>&6
8256 CPPFLAGS="$ac_save_CPPFLAGS"
8258 # if that succeeded, then check for sys/ipc.h.
8259 if test "$have_xshm" = yes; then
8262 ac_save_CPPFLAGS="$CPPFLAGS"
8263 if test \! -z "$includedir" ; then
8264 CPPFLAGS="$CPPFLAGS -I$includedir"
8266 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8267 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
8268 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
8269 echo "configure:8281: checking for sys/ipc.h" >&5
8270 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8271 echo $ac_n "(cached) $ac_c" 1>&6
8273 cat > conftest.$ac_ext <<EOF
8274 #line 8286 "configure"
8275 #include "confdefs.h"
8276 #include <sys/ipc.h>
8278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8279 { (eval echo configure:8291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8281 if test -z "$ac_err"; then
8283 eval "ac_cv_header_$ac_safe=yes"
8286 echo "configure: failed program was:" >&5
8287 cat conftest.$ac_ext >&5
8289 eval "ac_cv_header_$ac_safe=no"
8293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8294 echo "$ac_t""yes" 1>&6
8297 echo "$ac_t""no" 1>&6
8300 CPPFLAGS="$ac_save_CPPFLAGS"
8303 # if that succeeded, then check for sys/shm.h.
8304 if test "$have_xshm" = yes; then
8307 ac_save_CPPFLAGS="$CPPFLAGS"
8308 if test \! -z "$includedir" ; then
8309 CPPFLAGS="$CPPFLAGS -I$includedir"
8311 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8312 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
8313 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
8314 echo "configure:8326: checking for sys/shm.h" >&5
8315 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8316 echo $ac_n "(cached) $ac_c" 1>&6
8318 cat > conftest.$ac_ext <<EOF
8319 #line 8331 "configure"
8320 #include "confdefs.h"
8321 #include <sys/shm.h>
8323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8324 { (eval echo configure:8336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8326 if test -z "$ac_err"; then
8328 eval "ac_cv_header_$ac_safe=yes"
8331 echo "configure: failed program was:" >&5
8332 cat conftest.$ac_ext >&5
8334 eval "ac_cv_header_$ac_safe=no"
8338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8339 echo "$ac_t""yes" 1>&6
8342 echo "$ac_t""no" 1>&6
8345 CPPFLAGS="$ac_save_CPPFLAGS"
8348 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
8349 # to exist, but the library code to not exist. And even better, the library
8350 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
8351 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
8352 # that's not quite right, but close enough.)
8356 if `uname -v` -eq 3 ; then
8359 ac_save_CPPFLAGS="$CPPFLAGS"
8360 ac_save_LDFLAGS="$LDFLAGS"
8361 # ac_save_LIBS="$LIBS"
8363 if test \! -z "$includedir" ; then
8364 CPPFLAGS="$CPPFLAGS -I$includedir"
8366 # note: $X_CFLAGS includes $x_includes
8367 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8369 if test \! -z "$libdir" ; then
8370 LDFLAGS="$LDFLAGS -L$libdir"
8372 # note: $X_LIBS includes $x_libraries
8373 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8375 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
8376 echo "configure:8388: checking for XShmQueryExtension in -lXextSam" >&5
8377 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
8378 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8379 echo $ac_n "(cached) $ac_c" 1>&6
8381 ac_save_LIBS="$LIBS"
8382 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
8383 cat > conftest.$ac_ext <<EOF
8384 #line 8396 "configure"
8385 #include "confdefs.h"
8386 /* Override any gcc2 internal prototype to avoid an error. */
8387 /* We use char because int might match the return type of a gcc2
8388 builtin and then its argument prototype would still apply. */
8389 char XShmQueryExtension();
8392 XShmQueryExtension()
8395 if { (eval echo configure:8407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8397 eval "ac_cv_lib_$ac_lib_var=yes"
8399 echo "configure: failed program was:" >&5
8400 cat conftest.$ac_ext >&5
8402 eval "ac_cv_lib_$ac_lib_var=no"
8405 LIBS="$ac_save_LIBS"
8408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8409 echo "$ac_t""yes" 1>&6
8410 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
8412 echo "$ac_t""no" 1>&6
8416 CPPFLAGS="$ac_save_CPPFLAGS"
8417 LDFLAGS="$ac_save_LDFLAGS"
8418 # LIBS="$ac_save_LIBS"
8424 # if that succeeded, then we've really got it.
8425 if test "$have_xshm" = yes; then
8426 cat >> confdefs.h <<\EOF
8427 #define HAVE_XSHM_EXTENSION 1
8432 elif test "$with_xshm" != no; then
8433 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
8438 ###############################################################################
8440 # Check for the DOUBLE-BUFFER server extension.
8442 ###############################################################################
8445 with_xdbe_req=unspecified
8446 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
8447 if test "${with_xdbe_ext+set}" = set; then
8448 withval="$with_xdbe_ext"
8449 with_xdbe="$withval"; with_xdbe_req="$withval"
8456 case "$with_xdbe" in
8461 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
8462 echo "configure:8474: checking for DOUBLE-BUFFER headers" >&5
8463 d=$with_xdbe/include
8465 X_CFLAGS="-I$d $X_CFLAGS"
8466 echo "$ac_t""$d" 1>&6
8468 echo "$ac_t""not found ($d: no such directory)" 1>&6
8471 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
8472 echo "configure:8484: checking for DOUBLE-BUFFER libs" >&5
8475 X_LIBS="-L$d $X_LIBS"
8476 echo "$ac_t""$d" 1>&6
8478 echo "$ac_t""not found ($d: no such directory)" 1>&6
8481 # replace the directory string with "yes".
8483 with_xdbe=$with_xdbe_req
8488 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
8489 echo " If it is a directory, then \`DIR/include' will be added to"
8490 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8496 if test "$with_xdbe" = yes; then
8499 ac_save_CPPFLAGS="$CPPFLAGS"
8500 if test \! -z "$includedir" ; then
8501 CPPFLAGS="$CPPFLAGS -I$includedir"
8503 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8504 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8505 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8506 echo "configure:8518: checking for X11/extensions/Xdbe.h" >&5
8507 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8508 echo $ac_n "(cached) $ac_c" 1>&6
8510 cat > conftest.$ac_ext <<EOF
8511 #line 8523 "configure"
8512 #include "confdefs.h"
8513 #include <X11/extensions/Xdbe.h>
8515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8516 { (eval echo configure:8528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8518 if test -z "$ac_err"; then
8520 eval "ac_cv_header_$ac_safe=yes"
8523 echo "configure: failed program was:" >&5
8524 cat conftest.$ac_ext >&5
8526 eval "ac_cv_header_$ac_safe=no"
8530 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8531 echo "$ac_t""yes" 1>&6
8534 echo "$ac_t""no" 1>&6
8537 CPPFLAGS="$ac_save_CPPFLAGS"
8538 if test "$have_xdbe" = yes; then
8539 cat >> confdefs.h <<\EOF
8540 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8545 elif test "$with_xdbe" != no; then
8546 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8551 ###############################################################################
8553 # Check for the SGI XReadDisplay server extension.
8555 # Note: this has to be down here, rather than up with the other server
8556 # extension tests, so that the output of `configure --help' is in the
8557 # right order. Arrgh!
8559 ###############################################################################
8562 with_readdisplay_req=unspecified
8563 # Check whether --with-readdisplay or --without-readdisplay was given.
8564 if test "${with_readdisplay+set}" = set; then
8565 withval="$with_readdisplay"
8566 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8568 with_readdisplay=yes
8573 case "$with_readdisplay" in
8578 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8579 echo "configure:8591: checking for XReadDisplay headers" >&5
8580 d=$with_readdisplay/include
8582 X_CFLAGS="-I$d $X_CFLAGS"
8583 echo "$ac_t""$d" 1>&6
8585 echo "$ac_t""not found ($d: no such directory)" 1>&6
8588 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8589 echo "configure:8601: checking for XReadDisplay libs" >&5
8590 d=$with_readdisplay/lib
8592 X_LIBS="-L$d $X_LIBS"
8593 echo "$ac_t""$d" 1>&6
8595 echo "$ac_t""not found ($d: no such directory)" 1>&6
8598 # replace the directory string with "yes".
8599 with_readdisplay_req="yes"
8600 with_readdisplay=$with_readdisplay_req
8605 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8606 echo " If it is a directory, then \`DIR/include' will be added to"
8607 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8613 if test "$with_readdisplay" = yes; then
8615 ac_save_CPPFLAGS="$CPPFLAGS"
8616 if test \! -z "$includedir" ; then
8617 CPPFLAGS="$CPPFLAGS -I$includedir"
8619 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8620 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8621 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8622 echo "configure:8634: checking for X11/extensions/readdisplay.h" >&5
8623 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8624 echo $ac_n "(cached) $ac_c" 1>&6
8626 cat > conftest.$ac_ext <<EOF
8627 #line 8639 "configure"
8628 #include "confdefs.h"
8629 #include <X11/extensions/readdisplay.h>
8631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8632 { (eval echo configure:8644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8634 if test -z "$ac_err"; then
8636 eval "ac_cv_header_$ac_safe=yes"
8639 echo "configure: failed program was:" >&5
8640 cat conftest.$ac_ext >&5
8642 eval "ac_cv_header_$ac_safe=no"
8646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8647 echo "$ac_t""yes" 1>&6
8648 cat >> confdefs.h <<\EOF
8649 #define HAVE_READ_DISPLAY_EXTENSION 1
8653 echo "$ac_t""no" 1>&6
8656 CPPFLAGS="$ac_save_CPPFLAGS"
8657 elif test "$with_readdisplay" != no; then
8658 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8663 ###############################################################################
8665 # Check for the SGI Iris Video Library.
8667 ###############################################################################
8670 with_sgivideo_req=unspecified
8671 # Check whether --with-sgivideo or --without-sgivideo was given.
8672 if test "${with_sgivideo+set}" = set; then
8673 withval="$with_sgivideo"
8674 with_sgivideo="$withval"; with_sgivideo_req="$withval"
8681 case "$with_sgivideo" in
8686 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
8687 echo "configure:8699: checking for Iris Video headers" >&5
8688 d=$with_sgivideo/include
8690 X_CFLAGS="-I$d $X_CFLAGS"
8691 echo "$ac_t""$d" 1>&6
8693 echo "$ac_t""not found ($d: no such directory)" 1>&6
8696 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
8697 echo "configure:8709: checking for Iris Video libs" >&5
8698 d=$with_sgivideo/lib
8700 X_LIBS="-L$d $X_LIBS"
8701 echo "$ac_t""$d" 1>&6
8703 echo "$ac_t""not found ($d: no such directory)" 1>&6
8706 # replace the directory string with "yes".
8707 with_sgivideo_req="yes"
8708 with_sgivideo=$with_sgivideo_req
8713 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8714 echo " If it is a directory, then \`DIR/include' will be added to"
8715 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8721 if test "$with_sgivideo" = yes; then
8723 ac_save_CPPFLAGS="$CPPFLAGS"
8724 if test \! -z "$includedir" ; then
8725 CPPFLAGS="$CPPFLAGS -I$includedir"
8727 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8728 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8729 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8730 echo "configure:8742: checking for dmedia/vl.h" >&5
8731 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8732 echo $ac_n "(cached) $ac_c" 1>&6
8734 cat > conftest.$ac_ext <<EOF
8735 #line 8747 "configure"
8736 #include "confdefs.h"
8737 #include <dmedia/vl.h>
8739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8740 { (eval echo configure:8752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8742 if test -z "$ac_err"; then
8744 eval "ac_cv_header_$ac_safe=yes"
8747 echo "configure: failed program was:" >&5
8748 cat conftest.$ac_ext >&5
8750 eval "ac_cv_header_$ac_safe=no"
8754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8755 echo "$ac_t""yes" 1>&6
8758 echo "$ac_t""no" 1>&6
8761 CPPFLAGS="$ac_save_CPPFLAGS"
8762 if test "$have_sgivideo" = yes; then
8764 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8765 echo "configure:8777: checking for vlOpenVideo in -lvl" >&5
8766 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8767 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8768 echo $ac_n "(cached) $ac_c" 1>&6
8770 ac_save_LIBS="$LIBS"
8772 cat > conftest.$ac_ext <<EOF
8773 #line 8785 "configure"
8774 #include "confdefs.h"
8775 /* Override any gcc2 internal prototype to avoid an error. */
8776 /* We use char because int might match the return type of a gcc2
8777 builtin and then its argument prototype would still apply. */
8784 if { (eval echo configure:8796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8786 eval "ac_cv_lib_$ac_lib_var=yes"
8788 echo "configure: failed program was:" >&5
8789 cat conftest.$ac_ext >&5
8791 eval "ac_cv_lib_$ac_lib_var=no"
8794 LIBS="$ac_save_LIBS"
8797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8798 echo "$ac_t""yes" 1>&6
8801 echo "$ac_t""no" 1>&6
8804 if test "$have_sgivideo" = yes; then
8805 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8806 SGI_VIDEO_LIBS="-lvl"
8807 cat >> confdefs.h <<\EOF
8808 #define HAVE_SGI_VIDEO 1
8813 elif test "$with_sgivideo" != no; then
8814 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8819 ###############################################################################
8821 # Check for a program to generate random text.
8823 # Zippy is funnier than the idiocy generally spat out by `fortune',
8824 # so try to find that, by invoking Emacs and asking it where its
8825 # libexec directory is ("yow" lives in there.)
8827 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8828 # and if so, use them.
8830 # If that doesn't work, look in /usr/games, and if it's there, use
8831 # the full pathname.
8833 ###############################################################################
8836 # Check whether --with-zippy or --without-zippy was given.
8837 if test "${with_zippy+set}" = set; then
8838 withval="$with_zippy"
8839 with_zippy_req="$withval"; with_zippy="$withval"
8845 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8850 if test -n "$with_zippy_req" ; then
8851 ac_cv_zippy_program=""
8852 case "$with_zippy_req" in
8854 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8855 echo "configure:8867: checking for $with_zippy_req" >&5
8856 if test -x "$with_zippy_req" ; then
8857 echo "$ac_t""yes" 1>&6
8859 echo "$ac_t""no" 1>&6
8865 unset ac_cv_path_zip2
8866 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8867 set dummy $with_zippy_req; ac_word=$2
8868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8869 echo "configure:8881: checking for $ac_word" >&5
8870 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8871 echo $ac_n "(cached) $ac_c" 1>&6
8875 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8878 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8881 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8883 for ac_dir in $ac_dummy; do
8884 test -z "$ac_dir" && ac_dir=.
8885 if test -f $ac_dir/$ac_word; then
8886 ac_cv_path_zip2="$ac_dir/$ac_word"
8894 zip2="$ac_cv_path_zip2"
8895 if test -n "$zip2"; then
8896 echo "$ac_t""$zip2" 1>&6
8898 echo "$ac_t""no" 1>&6
8901 if test "$zip2" = ""; then
8906 ac_cv_zippy_program="$with_zippy"
8908 elif test -n "$ac_cv_zippy_program"; then
8909 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8912 if test ! -n "$ac_cv_zippy_program"; then
8914 for ac_prog in emacs
8916 # Extract the first word of "$ac_prog", so it can be a program name with args.
8917 set dummy $ac_prog; ac_word=$2
8918 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8919 echo "configure:8931: checking for $ac_word" >&5
8920 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8921 echo $ac_n "(cached) $ac_c" 1>&6
8923 if test -n "$emacs_exe"; then
8924 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8926 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8928 for ac_dir in $ac_dummy; do
8929 test -z "$ac_dir" && ac_dir=.
8930 if test -f $ac_dir/$ac_word; then
8931 ac_cv_prog_emacs_exe="$ac_prog"
8938 emacs_exe="$ac_cv_prog_emacs_exe"
8939 if test -n "$emacs_exe"; then
8940 echo "$ac_t""$emacs_exe" 1>&6
8942 echo "$ac_t""no" 1>&6
8945 test -n "$emacs_exe" && break
8948 for ac_prog in xemacs
8950 # Extract the first word of "$ac_prog", so it can be a program name with args.
8951 set dummy $ac_prog; ac_word=$2
8952 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8953 echo "configure:8965: checking for $ac_word" >&5
8954 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
8955 echo $ac_n "(cached) $ac_c" 1>&6
8957 if test -n "$xemacs_exe"; then
8958 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
8960 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8962 for ac_dir in $ac_dummy; do
8963 test -z "$ac_dir" && ac_dir=.
8964 if test -f $ac_dir/$ac_word; then
8965 ac_cv_prog_xemacs_exe="$ac_prog"
8972 xemacs_exe="$ac_cv_prog_xemacs_exe"
8973 if test -n "$xemacs_exe"; then
8974 echo "$ac_t""$xemacs_exe" 1>&6
8976 echo "$ac_t""no" 1>&6
8979 test -n "$xemacs_exe" && break
8983 ac_cv_zippy_program=""
8984 eargs='-batch -q -nw --eval'
8986 if test -n "$emacs_exe" ; then
8987 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
8988 echo "configure:9000: checking for emacs yow" >&5
8990 # get emacs to tell us where the libexec directory is.
8992 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
8993 2>/dev/null | tail -1`
8994 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
8996 # try running libexec/yow and see if it exits without error.
8998 if test x"$dir" != x -a -x "$dir/yow" ; then
8999 if $dir/yow >&- 2>&- ; then
9000 ac_cv_zippy_program="$dir/yow"
9001 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9003 echo "$ac_t""no" 1>&6
9008 if test -z "$ac_cv_zippy_program" ; then
9009 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
9010 echo "configure:9022: checking for xemacs yow" >&5
9011 if test -n "$xemacs_exe" ; then
9013 # get xemacs to tell us where the libexec directory is.
9015 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
9016 2>/dev/null | tail -1`
9017 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
9019 # try running libexec/yow and see if it exits without error.
9021 if test x"$dir" != x -a -x "$dir/yow" ; then
9022 if $dir/yow >&- 2>&- ; then
9023 ac_cv_zippy_program="$dir/yow"
9024 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9027 # in some xemacs installations, the pathname of the yow.lines file
9028 # isn't hardcoded into the yow executable, and must be passed on
9029 # the command line. See if it's in libexec/../etc/.
9033 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
9036 yowlines="$dir_up/etc/yow.lines"
9037 if $dir/yow -f $yowlines >&- 2>&- ; then
9038 ac_cv_zippy_program="$dir/yow -f $yowlines"
9039 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9042 # In newer XEmacs releases, yow.lines is in a different place,
9043 # and the easiest way to get it is by calling the new function
9044 # `locate-data-file'.
9046 yowlines=`$xemacs_exe $eargs \
9047 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
9048 2>/dev/null | tail -1`
9049 if $dir/yow -f $yowlines >&- 2>&- ; then
9050 ac_cv_zippy_program="$dir/yow -f $yowlines"
9051 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9053 echo "$ac_t""no" 1>&6
9061 # if that didn't work, try for some other programs...
9062 if test -z "$ac_cv_zippy_program" ; then
9064 for ac_prog in fortune zippy yow
9066 # Extract the first word of "$ac_prog", so it can be a program name with args.
9067 set dummy $ac_prog; ac_word=$2
9068 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9069 echo "configure:9081: checking for $ac_word" >&5
9070 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
9071 echo $ac_n "(cached) $ac_c" 1>&6
9073 if test -n "$fortune"; then
9074 ac_cv_prog_fortune="$fortune" # Let the user override the test.
9076 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9078 for ac_dir in $ac_dummy; do
9079 test -z "$ac_dir" && ac_dir=.
9080 if test -f $ac_dir/$ac_word; then
9081 ac_cv_prog_fortune="$ac_prog"
9088 fortune="$ac_cv_prog_fortune"
9089 if test -n "$fortune"; then
9090 echo "$ac_t""$fortune" 1>&6
9092 echo "$ac_t""no" 1>&6
9095 test -n "$fortune" && break
9098 # if that didn't work, try for those programs in /usr/games...
9099 if test -z "$fortune" ; then
9100 for ac_prog in fortune zippy yow
9102 # Extract the first word of "$ac_prog", so it can be a program name with args.
9103 set dummy $ac_prog; ac_word=$2
9104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9105 echo "configure:9117: checking for $ac_word" >&5
9106 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
9107 echo $ac_n "(cached) $ac_c" 1>&6
9111 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
9114 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
9117 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9118 ac_dummy="/usr/games:/usr/local/games:$PATH"
9119 for ac_dir in $ac_dummy; do
9120 test -z "$ac_dir" && ac_dir=.
9121 if test -f $ac_dir/$ac_word; then
9122 ac_cv_path_fortune="$ac_dir/$ac_word"
9130 fortune="$ac_cv_path_fortune"
9131 if test -n "$fortune"; then
9132 echo "$ac_t""$fortune" 1>&6
9134 echo "$ac_t""no" 1>&6
9137 test -n "$fortune" && break
9139 test -n "$fortune" || fortune="fortune"
9145 if test -z "$ac_cv_zippy_program" ; then
9146 ac_cv_zippy_program=fortune
9149 cat >> confdefs.h <<EOF
9150 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
9155 ###############################################################################
9157 # Done testing. Now, set up the various -I and -L variables,
9158 # and decide which GUI program to build by default.
9160 ###############################################################################
9167 if test \! -z "$includedir" ; then
9168 INCLUDES="$INCLUDES -I$includedir"
9171 if test \! -z "$libdir" ; then
9172 LDFLAGS="$LDFLAGS -L$libdir"
9176 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9178 if test "$have_motif" = yes; then
9179 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9180 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9182 if test "$have_gtk" = yes; then
9183 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
9184 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9188 if test "$have_kerberos" = yes; then
9189 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
9190 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
9192 if test "$have_pam" = yes; then
9193 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
9194 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
9195 INSTALL_PAM="install-pam"
9197 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
9198 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
9201 if test "$enable_locking" = yes; then
9202 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
9203 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
9205 LOCK_SRCS='$(NOLOCK_SRCS_1)'
9206 LOCK_OBJS='$(NOLOCK_OBJS_1)'
9209 if test "$need_setuid" = yes; then
9211 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
9214 INSTALL_SETUID='$(INSTALL_PROGRAM)'
9218 if test "$have_gl" = yes; then
9219 GL_EXES='$(GL_EXES)'
9223 GL_KLUDGE="-${tab} "
9226 if test "$have_gle" = yes; then
9227 GLE_EXES='$(GLE_EXES)'
9228 GLE_MEN='$(GLE_MEN)'
9229 GLE_KLUDGE="${tab} "
9231 GLE_KLUDGE="-${tab} "
9235 ###############################################################################
9237 # Perform substitutions and write Makefiles.
9239 ###############################################################################
9279 APPDEFAULTS=$ac_x_app_defaults
9288 cat > confcache <<\EOF
9289 # This file is a shell script that caches the results of configure
9290 # tests run on this system so they can be shared between configure
9291 # scripts and configure runs. It is not useful on other systems.
9292 # If it contains results you don't want to keep, you may remove or edit it.
9294 # By default, configure uses ./config.cache as the cache file,
9295 # creating it if it does not exist already. You can give configure
9296 # the --cache-file=FILE option to use a different cache file; that is
9297 # what configure does when it calls configure scripts in
9298 # subdirectories, so they share the cache.
9299 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9300 # config.status only pays attention to the cache file if you give it the
9301 # --recheck option to rerun configure.
9304 # The following way of writing the cache mishandles newlines in values,
9305 # but we know of no workaround that is simple, portable, and efficient.
9306 # So, don't put newlines in cache variables' values.
9307 # Ultrix sh set writes to stderr and can't be redirected directly,
9308 # and sets the high bit in the cache file unless we assign to the vars.
9310 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9312 # `set' does not quote correctly, so add quotes (double-quote substitution
9313 # turns \\\\ into \\, and sed turns \\ into \).
9315 -e "s/'/'\\\\''/g" \
9316 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9319 # `set' quotes correctly as required by POSIX, so do not add quotes.
9320 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9323 if cmp -s $cache_file confcache; then
9326 if test -w $cache_file; then
9327 echo "updating cache $cache_file"
9328 cat confcache > $cache_file
9330 echo "not updating unwritable cache $cache_file"
9335 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9337 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9338 # Let make expand exec_prefix.
9339 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9341 # Any assignment to VPATH causes Sun make to only execute
9342 # the first set of double-colon rules, so remove it if not needed.
9343 # If there is a colon in the path, we need to keep it.
9344 if test "x$srcdir" = x.; then
9345 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9348 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9350 DEFS=-DHAVE_CONFIG_H
9352 # Without the "./", some shells look in PATH for config.status.
9353 : ${CONFIG_STATUS=./config.status}
9355 echo creating $CONFIG_STATUS
9356 rm -f $CONFIG_STATUS
9357 cat > $CONFIG_STATUS <<EOF
9359 # Generated automatically by configure.
9360 # Run this file to recreate the current configuration.
9361 # This directory was configured as follows,
9362 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9364 # $0 $ac_configure_args
9366 # Compiler output produced by configure, useful for debugging
9367 # configure, is in ./config.log if it exists.
9369 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9372 case "\$ac_option" in
9373 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9374 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9375 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9376 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9377 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9379 -help | --help | --hel | --he | --h)
9380 echo "\$ac_cs_usage"; exit 0 ;;
9381 *) echo "\$ac_cs_usage"; exit 1 ;;
9385 ac_given_srcdir=$srcdir
9386 ac_given_INSTALL="$INSTALL"
9388 trap 'rm -fr `echo "Makefile
9393 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9395 cat >> $CONFIG_STATUS <<EOF
9397 # Protect against being on the right side of a sed subst in config.status.
9398 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9399 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9403 s%@CFLAGS@%$CFLAGS%g
9404 s%@CPPFLAGS@%$CPPFLAGS%g
9405 s%@CXXFLAGS@%$CXXFLAGS%g
9406 s%@FFLAGS@%$FFLAGS%g
9408 s%@LDFLAGS@%$LDFLAGS%g
9410 s%@exec_prefix@%$exec_prefix%g
9411 s%@prefix@%$prefix%g
9412 s%@program_transform_name@%$program_transform_name%g
9413 s%@bindir@%$bindir%g
9414 s%@sbindir@%$sbindir%g
9415 s%@libexecdir@%$libexecdir%g
9416 s%@datadir@%$datadir%g
9417 s%@sysconfdir@%$sysconfdir%g
9418 s%@sharedstatedir@%$sharedstatedir%g
9419 s%@localstatedir@%$localstatedir%g
9420 s%@libdir@%$libdir%g
9421 s%@includedir@%$includedir%g
9422 s%@oldincludedir@%$oldincludedir%g
9423 s%@infodir@%$infodir%g
9424 s%@mandir@%$mandir%g
9426 s%@host_alias@%$host_alias%g
9427 s%@host_cpu@%$host_cpu%g
9428 s%@host_vendor@%$host_vendor%g
9429 s%@host_os@%$host_os%g
9432 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9433 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9434 s%@INSTALL_DATA@%$INSTALL_DATA%g
9435 s%@SET_MAKE@%$SET_MAKE%g
9437 s%@X_CFLAGS@%$X_CFLAGS%g
9438 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9439 s%@X_LIBS@%$X_LIBS%g
9440 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9441 s%@glib_config@%$glib_config%g
9442 s%@gtk_config@%$gtk_config%g
9443 s%@gnome_config@%$gnome_config%g
9445 s%@emacs_exe@%$emacs_exe%g
9446 s%@xemacs_exe@%$xemacs_exe%g
9447 s%@fortune@%$fortune%g
9448 s%@INCLUDES@%$INCLUDES%g
9449 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
9450 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
9451 s%@SAVER_LIBS@%$SAVER_LIBS%g
9452 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
9453 s%@GTK_LIBS@%$GTK_LIBS%g
9454 s%@HACK_LIBS@%$HACK_LIBS%g
9455 s%@XPM_LIBS@%$XPM_LIBS%g
9456 s%@GL_LIBS@%$GL_LIBS%g
9457 s%@GLE_LIBS@%$GLE_LIBS%g
9458 s%@XDPMS_LIBS@%$XDPMS_LIBS%g
9459 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
9460 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
9461 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
9462 s%@NEED_SETUID@%$NEED_SETUID%g
9463 s%@INSTALL_PAM@%$INSTALL_PAM%g
9464 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
9465 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
9466 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
9467 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
9468 s%@XMU_SRCS@%$XMU_SRCS%g
9469 s%@XMU_OBJS@%$XMU_OBJS%g
9470 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
9471 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
9472 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
9473 s%@LOCK_SRCS@%$LOCK_SRCS%g
9474 s%@LOCK_OBJS@%$LOCK_OBJS%g
9475 s%@GL_EXES@%$GL_EXES%g
9476 s%@GL_MEN@%$GL_MEN%g
9477 s%@GL_KLUDGE@%$GL_KLUDGE%g
9478 s%@GLE_EXES@%$GLE_EXES%g
9479 s%@GLE_MEN@%$GLE_MEN%g
9480 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
9481 s%@HACKDIR@%$HACKDIR%g
9482 s%@GNOME_DATADIR@%$GNOME_DATADIR%g
9483 s%@APPDEFAULTS@%$APPDEFAULTS%g
9484 s%@DEPEND@%$DEPEND%g
9485 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
9486 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
9491 cat >> $CONFIG_STATUS <<\EOF
9493 # Split the substitutions into bite-sized pieces for seds with
9494 # small command number limits, like on Digital OSF/1 and HP-UX.
9495 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9496 ac_file=1 # Number of current file.
9497 ac_beg=1 # First line for current file.
9498 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9501 while $ac_more_lines; do
9502 if test $ac_beg -gt 1; then
9503 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9505 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9507 if test ! -s conftest.s$ac_file; then
9509 rm -f conftest.s$ac_file
9511 if test -z "$ac_sed_cmds"; then
9512 ac_sed_cmds="sed -f conftest.s$ac_file"
9514 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9516 ac_file=`expr $ac_file + 1`
9518 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9521 if test -z "$ac_sed_cmds"; then
9526 cat >> $CONFIG_STATUS <<EOF
9528 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9533 driver/XScreenSaver.ad"}
9535 cat >> $CONFIG_STATUS <<\EOF
9536 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9537 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9539 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9540 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9541 *) ac_file_in="${ac_file}.in" ;;
9544 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9546 # Remove last slash and all that follows it. Not all systems have dirname.
9547 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9548 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9549 # The file is in a subdirectory.
9550 test ! -d "$ac_dir" && mkdir "$ac_dir"
9551 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9552 # A "../" for each directory in $ac_dir_suffix.
9553 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9555 ac_dir_suffix= ac_dots=
9558 case "$ac_given_srcdir" in
9560 if test -z "$ac_dots"; then top_srcdir=.
9561 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9562 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9564 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9565 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9568 case "$ac_given_INSTALL" in
9569 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9570 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9573 echo creating "$ac_file"
9575 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9577 *Makefile*) ac_comsub="1i\\
9578 # $configure_input" ;;
9582 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9584 s%@configure_input@%$configure_input%g
9585 s%@srcdir@%$srcdir%g
9586 s%@top_srcdir@%$top_srcdir%g
9587 s%@INSTALL@%$INSTALL%g
9588 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9592 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9593 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9595 # ac_d sets the value in "#define NAME VALUE" lines.
9596 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9597 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9600 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9601 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9602 ac_uB='\([ ]\)%\1#\2define\3'
9605 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9606 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9607 ac_eB='$%\1#\2define\3'
9611 if test "${CONFIG_HEADERS+set}" != set; then
9613 cat >> $CONFIG_STATUS <<EOF
9614 CONFIG_HEADERS="config.h"
9616 cat >> $CONFIG_STATUS <<\EOF
9618 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9619 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9621 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9622 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9623 *) ac_file_in="${ac_file}.in" ;;
9626 echo creating $ac_file
9628 rm -f conftest.frag conftest.in conftest.out
9629 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9630 cat $ac_file_inputs > conftest.in
9634 # Transform confdefs.h into a sed script conftest.vals that substitutes
9635 # the proper values into config.h.in to produce config.h. And first:
9636 # Protect against being on the right side of a sed subst in config.status.
9637 # Protect against being in an unquoted here document in config.status.
9639 cat > conftest.hdr <<\EOF
9642 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9646 sed -n -f conftest.hdr confdefs.h > conftest.vals
9649 # This sed command replaces #undef with comments. This is necessary, for
9650 # example, in the case of _POSIX_SOURCE, which is predefined and required
9651 # on some systems where configure will not decide to define it.
9652 cat >> conftest.vals <<\EOF
9653 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9656 # Break up conftest.vals because some shells have a limit on
9657 # the size of here documents, and old seds have small limits too.
9662 ac_lines=`grep -c . conftest.vals`
9663 # grep -c gives empty output for an empty file on some AIX systems.
9664 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9665 # Write a limited-size here document to conftest.frag.
9666 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9667 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9669 sed -f conftest.frag conftest.in > conftest.out
9671 mv conftest.out conftest.in
9673 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9675 mv conftest.tail conftest.vals
9679 cat >> $CONFIG_STATUS <<\EOF
9680 rm -f conftest.frag conftest.h
9681 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9682 cat conftest.in >> conftest.h
9684 if cmp -s $ac_file conftest.h 2>/dev/null; then
9685 echo "$ac_file is unchanged"
9688 # Remove last slash and all that follows it. Not all systems have dirname.
9689 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9690 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9691 # The file is in a subdirectory.
9692 test ! -d "$ac_dir" && mkdir "$ac_dir"
9695 mv conftest.h $ac_file
9700 cat >> $CONFIG_STATUS <<EOF
9703 cat >> $CONFIG_STATUS <<\EOF
9707 chmod +x $CONFIG_STATUS
9708 rm -fr confdefs* $ac_clean_files
9709 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9712 ###############################################################################
9714 # Print some warnings at the end.
9716 ###############################################################################
9718 warn_prefix_1=" Warning:"
9719 warn_prefix_2=" Note:"
9720 warn_prefix="$warn_prefix_1"
9723 warnsep=' #################################################################'
9726 if test "$warning" = no ; then
9727 echo '' ; echo "$warnsep" ; echo ''
9734 if test "$warning" = long ; then echo '' ; fi
9737 echo "$warn_prefix $rest"
9744 if test "$was" != no ; then echo '' ; fi
9746 echo "$warn_prefix $rest"
9756 warn_prefix="$warn_prefix_2"
9758 warn_prefix="$warn_prefix_1"
9762 warn_prefix="$warn_prefix_2"
9764 warn_prefix="$warn_prefix_1"
9768 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9769 warn 'The SGI saver extension was requested, but was not found.'
9772 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9773 warn 'The MIT saver extension was requested, but was not found.'
9776 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9777 warn 'The XIdle extension was requested, but was not found.'
9780 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9781 warn 'The XSHM extension was requested, but was not found.'
9784 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9785 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9788 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9789 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9792 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9793 warn 'The DPMS extension was requested, but was not found.'
9796 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9797 warn 'The XF86VMODE extension was requested, but was not found.'
9800 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9801 warn "Checking of /proc/interrupts was requested, but it's bogus."
9805 if test "$have_motif" = no -a "$have_gtk" = no; then
9806 warnL "Neither Motif nor Gtk seem to be available;"
9807 warn2 "the \`xscreensaver-demo' program requires one of these."
9809 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9810 warnL "Use of Motif was requested, but it wasn't found;"
9811 warn2 "Gtk will be used instead."
9813 elif test "$jurassic_gtk" = yes ; then
9817 v="$ac_gtk_version_string"
9818 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9819 warnL "Use of Gtk was requested, but its version number is unknown;"
9820 elif test "$with_gtk_req" = yes ; then
9821 warnL "Use of Gtk was requested, but it is version $v;"
9823 warnL "Gtk was found on this system, but it is version $v;"
9826 warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
9828 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9829 warnL "Use of Gtk was requested, but it wasn't found;"
9830 warn2 "Motif will be used instead."
9835 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
9836 warn 'Use of the Gnome Control Panel was requested, but the necessary'
9837 warn2 'headers and/or libraries were not found.'
9841 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9843 preferred_lesstif=0.86
9845 if test "$lesstif_version" = unknown; then
9846 warnL "Unable to determine the LessTif version number!"
9847 warn2 "Make sure you are using version $preferred_lesstif or newer."
9848 warn2 "See <http://www.lesstif.org/>."
9850 elif test \! $lesstif_version -gt 82; then
9851 warnL "LessTif version $lesstif_version_string is being used."
9852 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9853 warn2 "use with XScreenSaver; it is strongly recommended"
9854 warn2 "that you upgrade to at least version $preferred_lesstif!"
9855 warn2 "See <http://www.lesstif.org/>."
9861 if test "$have_xpm" = no ; then
9862 if test "$with_xpm_req" = yes ; then
9863 warnL 'Use of XPM was requested, but it was not found.'
9864 elif test "$with_xpm_req" = no ; then
9865 noteL 'The XPM library is not being used.'
9867 noteL 'The XPM library was not found.'
9871 warn2 'Some of the demos will not be as colorful as they'
9872 warn2 'could be. You might want to consider installing XPM'
9873 warn2 'and re-running configure. (Remember to delete the'
9874 warn2 'config.cache file first.) You can find XPM at most'
9875 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9879 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9880 preferred_mesagl=3.0
9882 if test "$ac_mesagl_version" = unknown; then
9883 warnL "Unable to determine the MesaGL version number!"
9884 warn2 "Make sure you are using version $preferred_mesagl or newer."
9886 elif test \! "$ac_mesagl_version" -gt 2006; then
9887 warnL "MesaGL version $ac_mesagl_version_string is being used."
9888 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9889 warn2 "It is strongly recommended that you upgrade to at"
9890 warn2 "least version $preferred_mesagl."
9894 if test "$have_gl" = no ; then
9895 if test "$with_gl_req" = yes ; then
9896 warnL 'Use of GL was requested, but it was not found.'
9897 elif test "$with_gl_req" = no ; then
9898 noteL 'The OpenGL 3D library is not being used.'
9900 noteL 'The OpenGL 3D library was not found.'
9903 if test "$gl_halfassed" = yes ; then
9905 warn2 'More specifically, we found the headers, but not the'
9906 warn2 'libraries; so either GL is half-installed on this'
9907 warn2 "system, or something else went wrong. The \`config.log'"
9908 warn2 'file might contain some clues.'
9912 warn2 'Those demos which use 3D will not be built or installed.'
9913 warn2 'You might want to consider installing OpenGL and'
9914 warn2 're-running configure. (Remember to delete the'
9915 warn2 "config.cache file first.) If your vendor doesn't ship"
9916 warn2 'their own implementation of OpenGL, you can get a free'
9917 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
9918 warn2 'info, see <http://www.opengl.org/>.'
9923 if test "$have_gl" = yes -a "$have_gle" = no ; then
9924 if test "$with_gle_req" = yes ; then
9925 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
9926 warn2 'it was not found (though the OpenGL library was found, and'
9927 warn2 'is being used.)'
9928 elif test "$with_gle_req" = no ; then
9929 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
9930 warn2 'library is not.'
9932 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
9936 if test "$gle_halfassed" = yes ; then
9938 warn2 'More specifically, we found the headers, but not the'
9939 warn2 'libraries; so either GLE is half-installed on this'
9940 warn2 "system, or something else went wrong. The \`config.log'"
9941 warn2 'file might contain some clues.'
9945 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
9946 warn2 'will not be built or installed. You might want to consider'
9947 warn2 'installing GLE and re-running configure. (Remember to delete'
9948 warn2 'the config.cache file first.) You can find the GLE library'
9949 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
9950 warn2 'see <http://www.opengl.org/>.'
9955 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
9956 warn 'Use of XReadDisplay was requested, but it was not found.'
9959 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
9960 warn 'Use of the Iris Video Library was requested, but it was not found.'
9963 if test -n "$with_zippy_req"; then
9964 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
9965 warnL "$with_zippy_req was requested as the Zippy program,"
9966 warn2 "but was not found. The default will be used instead."
9970 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
9971 warn 'Use of Kerberos was requested, but it was not found.'
9974 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
9975 warn 'Use of PAM was requested, but it was not found.'
9978 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
9979 warn 'Use of shadow passwords was requested, but they were not found.'
9983 # You are in a twisty maze of namespaces and syntaxes, all alike.
9984 # Fuck the skull of Unix.
9986 eval bindir=${bindir}
9987 eval bindir=${bindir}
9988 eval bindir=${bindir}
9989 eval bindir=${bindir}
9990 eval bindir=${bindir}
9991 eval bindir=${bindir}
9992 eval HACKDIR=${HACKDIR}
9993 eval HACKDIR=${HACKDIR}
9994 eval HACKDIR=${HACKDIR}
9995 eval HACKDIR=${HACKDIR}
9996 eval HACKDIR=${HACKDIR}
9997 eval HACKDIR=${HACKDIR}
9999 # canonicalize slashes.
10000 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
10001 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10004 # Sanity check the subdir
10005 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
10006 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
10008 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
10009 There will be an executable installed with that name, so
10010 that can't be the name of a directory as well. Please
10011 re-configure with a different directory name." 1>&2; exit 1; }
10018 # Now let's see if there's a previous RPM version already installed. Blargh!
10022 rpmv=`(rpm -qv xscreensaver) 2>&- | \
10023 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/'`
10026 if test \! -z "$rpmv" ; then
10027 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
10028 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
10031 warnL "There is already an installed RPM of xscreensaver $rpmv"
10032 warn2 "on this system. You might want to remove it (with"
10033 warn2 '"rpm -ve xscreensaver") before running "make install"'
10034 warn2 "from this directory."
10036 warn2 "Alternately, you could build this version of xscreensaver"
10037 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
10038 warn2 "file is included. See the RPM documentation for more info."
10041 if test "$rpmbdir" = "$rpmhdir" ; then
10042 warn2 "The RPM version was installed in $rpmbdir."
10044 warn2 "The RPM version was installed in $rpmbdir,"
10045 warn2 "with demos in $rpmhdir."
10052 # Warn about egregious GNOME bogosity.
10054 #if (rpm -qv control-center) >&- 2>&- ; then
10056 # warnL "The Gnome Control Center seems to be installed."
10058 # warn2 "Note that simply installing this version of xscreensaver"
10059 # warn2 "will not cause GNOME to know about the newly-added display"
10060 # warn2 "modes -- GNOME is just lame that way. Instead of using the"
10061 # warn2 "Control Center, try using the \`xscreensaver-demo' command."
10065 if test "${bindir}" = "${HACKDIR}" ; then
10069 if test "$do_dir_warning" = yes; then
10073 echo ' When you run "make install", the "xscreensaver",'
10074 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
10075 echo " will be installed in ${bindir}."
10077 echo " The various graphics demos (100+ different executables) will"
10078 echo " also be installed in ${HACKDIR}."
10080 echo " If you would prefer the demos to be installed elsewhere"
10081 echo " (for example, in a dedicated directory) you should re-run"
10082 echo " configure with the --enable-subdir=DIR option. For more"
10083 echo " information, run $0 --help."
10087 if test "$warning" != no; then
10088 echo '' ; echo "$warnsep" ; echo ''