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\"."
105 --with-setuid-hacks Allow some demos to be installed \`setuid root'
106 (which is needed in order to ping other hosts.)
109 # Initialize some variables set by options.
110 # The variables have the same names as the options, with
111 # dashes changed to underlines.
113 cache_file=./config.cache
122 program_transform_name=s,x,x,
130 bindir='${exec_prefix}/bin'
131 sbindir='${exec_prefix}/sbin'
132 libexecdir='${exec_prefix}/libexec'
133 datadir='${prefix}/share'
134 sysconfdir='${prefix}/etc'
135 sharedstatedir='${prefix}/com'
136 localstatedir='${prefix}/var'
137 libdir='${exec_prefix}/lib'
138 includedir='${prefix}/include'
139 oldincludedir='/usr/include'
140 infodir='${prefix}/info'
141 mandir='${prefix}/man'
143 # Initialize some other variables.
146 SHELL=${CONFIG_SHELL-/bin/sh}
147 # Maximum number of lines to put in a shell here document.
154 # If the previous option needs an argument, assign it.
155 if test -n "$ac_prev"; then
156 eval "$ac_prev=\$ac_option"
162 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
166 # Accept the important Cygnus configure options, so we can diagnose typos.
170 -bindir | --bindir | --bindi | --bind | --bin | --bi)
172 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173 bindir="$ac_optarg" ;;
175 -build | --build | --buil | --bui | --bu)
177 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178 build="$ac_optarg" ;;
180 -cache-file | --cache-file | --cache-fil | --cache-fi \
181 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182 ac_prev=cache_file ;;
183 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185 cache_file="$ac_optarg" ;;
187 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
189 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
191 datadir="$ac_optarg" ;;
193 -disable-* | --disable-*)
194 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
195 # Reject names that are not valid shell variable names.
196 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
197 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
199 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
200 eval "enable_${ac_feature}=no" ;;
202 -enable-* | --enable-*)
203 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
204 # Reject names that are not valid shell variable names.
205 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
206 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
208 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
213 eval "enable_${ac_feature}='$ac_optarg'" ;;
215 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
216 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
217 | --exec | --exe | --ex)
218 ac_prev=exec_prefix ;;
219 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
220 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
221 | --exec=* | --exe=* | --ex=*)
222 exec_prefix="$ac_optarg" ;;
224 -gas | --gas | --ga | --g)
225 # Obsolete; use --with-gas.
228 -help | --help | --hel | --he)
229 # Omit some internal or obsolete options to make the list less imposing.
230 # This message is too long to be a string in the A/UX 3.1 sh.
232 Usage: configure [options] [host]
233 Options: [defaults in brackets after descriptions]
237 --cache-file=FILE cache test results in FILE
238 --help print this message
239 --no-create do not create output files
240 --quiet, --silent do not print \`checking...' messages
241 --version print the version of autoconf that created configure
243 Directory and file names:
245 --prefix=PREFIX install architecture-independent files in PREFIX
247 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
249 --bindir=DIR user executables in DIR [EPREFIX/bin]
250 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
251 --includedir=DIR C header files in DIR [PREFIX/include]
252 --x-includes=DIR X include files are in DIR
253 --x-libraries=DIR X library files are in DIR
254 --mandir=DIR man documentation in DIR [PREFIX/man]
255 --srcdir=DIR find the sources in DIR [configure dir or ..]
256 --program-prefix=PREFIX prepend PREFIX to installed program names
257 --program-suffix=SUFFIX append SUFFIX to installed program names
258 --program-transform-name=PROGRAM
259 run sed PROGRAM on installed program names
265 --build=BUILD configure for building on BUILD [BUILD=HOST]
266 --host=HOST configure for HOST [guessed]
267 --target=TARGET configure for TARGET [TARGET=HOST]
269 if test -n "$ac_help"; then
274 -host | --host | --hos | --ho)
276 -host=* | --host=* | --hos=* | --ho=*)
279 -includedir | --includedir | --includedi | --included | --include \
280 | --includ | --inclu | --incl | --inc)
281 ac_prev=includedir ;;
282 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283 | --includ=* | --inclu=* | --incl=* | --inc=*)
284 includedir="$ac_optarg" ;;
286 -infodir | --infodir | --infodi | --infod | --info | --inf)
288 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
289 infodir="$ac_optarg" ;;
291 -libdir | --libdir | --libdi | --libd)
293 -libdir=* | --libdir=* | --libdi=* | --libd=*)
294 libdir="$ac_optarg" ;;
296 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297 | --libexe | --libex | --libe)
298 ac_prev=libexecdir ;;
299 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300 | --libexe=* | --libex=* | --libe=*)
301 libexecdir="$ac_optarg" ;;
303 -localstatedir | --localstatedir | --localstatedi | --localstated \
304 | --localstate | --localstat | --localsta | --localst \
305 | --locals | --local | --loca | --loc | --lo)
306 ac_prev=localstatedir ;;
307 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
310 localstatedir="$ac_optarg" ;;
312 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
315 mandir="$ac_optarg" ;;
318 # Obsolete; use --without-fp.
321 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
325 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
329 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331 | --oldin | --oldi | --old | --ol | --o)
332 ac_prev=oldincludedir ;;
333 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
336 oldincludedir="$ac_optarg" ;;
338 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
341 prefix="$ac_optarg" ;;
343 -program-prefix | --program-prefix | --program-prefi | --program-pref \
344 | --program-pre | --program-pr | --program-p)
345 ac_prev=program_prefix ;;
346 -program-prefix=* | --program-prefix=* | --program-prefi=* \
347 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
348 program_prefix="$ac_optarg" ;;
350 -program-suffix | --program-suffix | --program-suffi | --program-suff \
351 | --program-suf | --program-su | --program-s)
352 ac_prev=program_suffix ;;
353 -program-suffix=* | --program-suffix=* | --program-suffi=* \
354 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
355 program_suffix="$ac_optarg" ;;
357 -program-transform-name | --program-transform-name \
358 | --program-transform-nam | --program-transform-na \
359 | --program-transform-n | --program-transform- \
360 | --program-transform | --program-transfor \
361 | --program-transfo | --program-transf \
362 | --program-trans | --program-tran \
363 | --progr-tra | --program-tr | --program-t)
364 ac_prev=program_transform_name ;;
365 -program-transform-name=* | --program-transform-name=* \
366 | --program-transform-nam=* | --program-transform-na=* \
367 | --program-transform-n=* | --program-transform-=* \
368 | --program-transform=* | --program-transfor=* \
369 | --program-transfo=* | --program-transf=* \
370 | --program-trans=* | --program-tran=* \
371 | --progr-tra=* | --program-tr=* | --program-t=*)
372 program_transform_name="$ac_optarg" ;;
374 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375 | -silent | --silent | --silen | --sile | --sil)
378 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382 sbindir="$ac_optarg" ;;
384 -sharedstatedir | --sharedstatedir | --sharedstatedi \
385 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386 | --sharedst | --shareds | --shared | --share | --shar \
388 ac_prev=sharedstatedir ;;
389 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393 sharedstatedir="$ac_optarg" ;;
395 -site | --site | --sit)
397 -site=* | --site=* | --sit=*)
400 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
403 srcdir="$ac_optarg" ;;
405 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406 | --syscon | --sysco | --sysc | --sys | --sy)
407 ac_prev=sysconfdir ;;
408 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
410 sysconfdir="$ac_optarg" ;;
412 -target | --target | --targe | --targ | --tar | --ta | --t)
414 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
415 target="$ac_optarg" ;;
417 -v | -verbose | --verbose | --verbos | --verbo | --verb)
420 -version | --version | --versio | --versi | --vers)
421 echo "configure generated by autoconf version 2.13"
425 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
426 # Reject names that are not valid shell variable names.
427 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
428 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
430 ac_package=`echo $ac_package| sed 's/-/_/g'`
435 eval "with_${ac_package}='$ac_optarg'" ;;
437 -without-* | --without-*)
438 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
439 # Reject names that are not valid shell variable names.
440 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
441 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
443 ac_package=`echo $ac_package| sed 's/-/_/g'`
444 eval "with_${ac_package}=no" ;;
447 # Obsolete; use --with-x.
450 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451 | --x-incl | --x-inc | --x-in | --x-i)
452 ac_prev=x_includes ;;
453 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455 x_includes="$ac_optarg" ;;
457 -x-libraries | --x-libraries | --x-librarie | --x-librari \
458 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459 ac_prev=x_libraries ;;
460 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462 x_libraries="$ac_optarg" ;;
464 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
468 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
469 echo "configure: warning: $ac_option: invalid host type" 1>&2
471 if test "x$nonopt" != xNONE; then
472 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
480 if test -n "$ac_prev"; then
481 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
484 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
486 # File descriptor usage:
489 # 2 errors and warnings
490 # 3 some systems may open it to /dev/tty
491 # 4 used on the Kubota Titan
492 # 6 checking for... messages and results
493 # 5 compiler messages saved in config.log
494 if test "$silent" = yes; then
502 This file contains any messages produced by compilers while
503 running configure, to aid debugging if configure makes a mistake.
506 # Strip out --no-create and --no-recursion so they do not pile up.
507 # Also quote any args containing shell metacharacters.
512 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
513 | --no-cr | --no-c) ;;
514 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
515 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
516 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
517 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
518 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
523 # Only set these to C if already set. These must not be set unconditionally
524 # because not all systems understand e.g. LANG=C (notably SCO).
525 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
526 # Non-C LC_CTYPE values break the ctype check.
527 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
528 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
529 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
530 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
532 # confdefs.h avoids OS command line length limits that DEFS can exceed.
533 rm -rf conftest* confdefs.h
534 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
537 # A filename unique to this package, relative to the directory that
538 # configure is in, which we can look for to find out if srcdir is correct.
539 ac_unique_file=driver/subprocs.c
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543 ac_srcdir_defaulted=yes
544 # Try the directory containing this script, then its parent.
546 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
547 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
549 if test ! -r $srcdir/$ac_unique_file; then
553 ac_srcdir_defaulted=no
555 if test ! -r $srcdir/$ac_unique_file; then
556 if test "$ac_srcdir_defaulted" = yes; then
557 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
559 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
562 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
564 # Prefer explicitly selected file to automatically selected ones.
565 if test -z "$CONFIG_SITE"; then
566 if test "x$prefix" != xNONE; then
567 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
569 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
572 for ac_site_file in $CONFIG_SITE; do
573 if test -r "$ac_site_file"; then
574 echo "loading site script $ac_site_file"
579 if test -r "$cache_file"; then
580 echo "loading cache $cache_file"
583 echo "creating cache $cache_file"
588 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
589 ac_cpp='$CPP $CPPFLAGS'
590 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
591 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
592 cross_compiling=$ac_cv_prog_cc_cross
596 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
597 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
598 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
605 ac_n= ac_c='\c' ac_t=
611 echo "current directory: `pwd`"
612 echo "command line was: $0 $@"
615 # After checking to see that --srcdir is correct (which AC_INIT does)
616 # check for some random other files that come later in the tar file,
617 # to make sure everything is here.
619 for d in driver utils hacks hacks/glx ; do
620 f=$srcdir/$d/Makefile.in
621 if test \! -r $f ; then
623 echo "ERROR: The package is incomplete: $f does not exist."
624 echo " This probably means that your download was truncated."
631 ###############################################################################
633 # Function to figure out how to run the compiler.
635 ###############################################################################
640 ###############################################################################
642 # Functions to figure out how to disable // comments in ANSI C code.
644 # (With recent gcc, this is done with "-std=c89". With older gcc, this
645 # is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
646 # gcc. Old gcc doesn't support -std, and new gcc doesn't support -lang.
647 # so much for compatibility!)
649 ###############################################################################
656 ###############################################################################
658 # Function to figure out how to create directory trees.
660 ###############################################################################
665 ###############################################################################
667 # Function to check whether gettimeofday() exists, and how to call it.
668 # This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
670 ###############################################################################
675 ###############################################################################
677 # Function to find perl5 (defines PERL and PERL_VERSION.)
679 ###############################################################################
681 # M4 sucks!! perl sucks too!!
683 perl_version_cmd='print $]'
689 ###############################################################################
691 # Function to demand "bc". Losers.
693 ###############################################################################
697 ###############################################################################
699 # Functions to check how to do ICMP PING requests.
701 ###############################################################################
708 ###############################################################################
710 # Functions to check for various X11 crap.
712 ###############################################################################
714 # Try and find the app-defaults directory.
715 # It sucks that autoconf doesn't do this already...
727 # Random special-cases for X on certain pathological OSes.
728 # You know who you are.
734 ###############################################################################
736 # Some utility functions to make checking for X things easier.
738 ###############################################################################
740 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
744 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
748 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
753 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
754 # Use this sparingly; it probably doesn't work very well on X programs.
758 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
759 # (But not the -L directories!)
765 # Usage: HANDLE_X_PATH_ARG([variable_name],
766 # [--command-line-option],
767 # [descriptive string])
769 # All of the --with options take three forms:
771 # --with-foo (or --with-foo=yes)
772 # --without-foo (or --with-foo=no)
775 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
776 # a directory (string beginning with a slash) it checks to see whether
777 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
784 ###############################################################################
785 ###############################################################################
787 # End of function definitions. Now start actually executing stuff.
789 ###############################################################################
790 ###############################################################################
792 # random compiler setup
794 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
795 if test -f $ac_dir/install-sh; then
797 ac_install_sh="$ac_aux_dir/install-sh -c"
799 elif test -f $ac_dir/install.sh; then
801 ac_install_sh="$ac_aux_dir/install.sh -c"
805 if test -z "$ac_aux_dir"; then
806 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
808 ac_config_guess=$ac_aux_dir/config.guess
809 ac_config_sub=$ac_aux_dir/config.sub
810 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
813 # Make sure we can run config.sub.
814 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
815 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
818 echo $ac_n "checking host system type""... $ac_c" 1>&6
819 echo "configure:831: checking host system type" >&5
822 case "$host_alias" in
826 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
827 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
829 *) host_alias=$nonopt ;;
833 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
834 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
835 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
836 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
837 echo "$ac_t""$host" 1>&6
839 # Extract the first word of "gcc", so it can be a program name with args.
840 set dummy gcc; ac_word=$2
841 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
842 echo "configure:854: checking for $ac_word" >&5
843 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
844 echo $ac_n "(cached) $ac_c" 1>&6
846 if test -n "$CC"; then
847 ac_cv_prog_CC="$CC" # Let the user override the test.
849 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
851 for ac_dir in $ac_dummy; do
852 test -z "$ac_dir" && ac_dir=.
853 if test -f $ac_dir/$ac_word; then
862 if test -n "$CC"; then
863 echo "$ac_t""$CC" 1>&6
865 echo "$ac_t""no" 1>&6
868 if test -z "$CC"; then
869 # Extract the first word of "cc", so it can be a program name with args.
870 set dummy cc; ac_word=$2
871 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
872 echo "configure:884: checking for $ac_word" >&5
873 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
874 echo $ac_n "(cached) $ac_c" 1>&6
876 if test -n "$CC"; then
877 ac_cv_prog_CC="$CC" # Let the user override the test.
879 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
882 for ac_dir in $ac_dummy; do
883 test -z "$ac_dir" && ac_dir=.
884 if test -f $ac_dir/$ac_word; then
885 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
894 if test $ac_prog_rejected = yes; then
895 # We found a bogon in the path, so make sure we never use it.
896 set dummy $ac_cv_prog_CC
898 if test $# -gt 0; then
899 # We chose a different compiler from the bogus one.
900 # However, it has the same basename, so the bogon will be chosen
901 # first if we set CC to just the basename; use the full file name.
903 set dummy "$ac_dir/$ac_word" "$@"
911 if test -n "$CC"; then
912 echo "$ac_t""$CC" 1>&6
914 echo "$ac_t""no" 1>&6
917 if test -z "$CC"; then
920 # Extract the first word of "cl", so it can be a program name with args.
921 set dummy cl; ac_word=$2
922 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
923 echo "configure:935: checking for $ac_word" >&5
924 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
925 echo $ac_n "(cached) $ac_c" 1>&6
927 if test -n "$CC"; then
928 ac_cv_prog_CC="$CC" # Let the user override the test.
930 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
932 for ac_dir in $ac_dummy; do
933 test -z "$ac_dir" && ac_dir=.
934 if test -f $ac_dir/$ac_word; then
943 if test -n "$CC"; then
944 echo "$ac_t""$CC" 1>&6
946 echo "$ac_t""no" 1>&6
951 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
954 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
955 echo "configure:967: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
958 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
959 ac_cpp='$CPP $CPPFLAGS'
960 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
961 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
962 cross_compiling=$ac_cv_prog_cc_cross
964 cat > conftest.$ac_ext << EOF
966 #line 978 "configure"
967 #include "confdefs.h"
971 if { (eval echo configure:983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
972 ac_cv_prog_cc_works=yes
973 # If we can't run a trivial program, we are probably using a cross compiler.
974 if (./conftest; exit) 2>/dev/null; then
975 ac_cv_prog_cc_cross=no
977 ac_cv_prog_cc_cross=yes
980 echo "configure: failed program was:" >&5
981 cat conftest.$ac_ext >&5
982 ac_cv_prog_cc_works=no
986 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
987 ac_cpp='$CPP $CPPFLAGS'
988 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
989 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
990 cross_compiling=$ac_cv_prog_cc_cross
992 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
993 if test $ac_cv_prog_cc_works = no; then
994 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
996 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
997 echo "configure:1009: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
998 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
999 cross_compiling=$ac_cv_prog_cc_cross
1001 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1002 echo "configure:1014: checking whether we are using GNU C" >&5
1003 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1004 echo $ac_n "(cached) $ac_c" 1>&6
1006 cat > conftest.c <<EOF
1011 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1018 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1020 if test $ac_cv_prog_gcc = yes; then
1026 ac_test_CFLAGS="${CFLAGS+set}"
1027 ac_save_CFLAGS="$CFLAGS"
1029 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1030 echo "configure:1042: checking whether ${CC-cc} accepts -g" >&5
1031 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1032 echo $ac_n "(cached) $ac_c" 1>&6
1034 echo 'void f(){}' > conftest.c
1035 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1044 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1045 if test "$ac_test_CFLAGS" = set; then
1046 CFLAGS="$ac_save_CFLAGS"
1047 elif test $ac_cv_prog_cc_g = yes; then
1048 if test "$GCC" = yes; then
1054 if test "$GCC" = yes; then
1062 if test -z "$GCC"; then
1063 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
1064 echo "configure:1076: checking how to request ANSI compilation" >&5
1067 echo "$ac_t""HPUX: adding -Ae" 1>&6
1071 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
1072 CC="$CC -qlanglvl=ansi -qhalt=e"
1076 echo "$ac_t""DEC: adding -std1" 1>&6
1081 echo "$ac_t""no idea" 1>&6
1086 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
1087 echo "configure:1099: checking whether the compiler works on ANSI C" >&5
1088 if test "$cross_compiling" = yes; then
1089 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1091 cat > conftest.$ac_ext <<EOF
1092 #line 1104 "configure"
1093 #include "confdefs.h"
1094 main(int ac, char **av) { return 0; }
1096 if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1098 echo "$ac_t""yes" 1>&6
1100 echo "configure: failed program was:" >&5
1101 cat conftest.$ac_ext >&5
1103 echo "$ac_t""no" 1>&6
1104 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1110 if test -n "$GCC"; then
1111 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
1112 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
1115 *-irix5* |*-irix6.0-3* )
1116 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1117 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1120 # if test -z "$GCC"; then
1121 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1122 # CC="$CC -migrate -w0 -verbose -warnprotos"
1128 if test -n "$GCC"; then
1129 if test -n "$GCC"; then
1130 echo $ac_n "checking whether gcc accepts -std""... $ac_c" 1>&6
1131 echo "configure:1143: checking whether gcc accepts -std" >&5
1132 if eval "test \"`echo '$''{'ac_cv_gcc_accepts_std'+set}'`\" = set"; then
1133 echo $ac_n "(cached) $ac_c" 1>&6
1135 if ( gcc -E -std=c89 - </dev/null 2>&1 >/dev/null | \
1136 grep unrecognized >/dev/null ); then
1137 ac_cv_gcc_accepts_std=no
1139 ac_cv_gcc_accepts_std=yes
1143 echo "$ac_t""$ac_cv_gcc_accepts_std" 1>&6
1144 ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
1147 echo "$ac_t""Disabling C++ comments in ANSI C code." 1>&6
1149 # The reason that // comments are banned from xscreensaver is that gcc is
1150 # basically the only compiler in the world that supports them in C code.
1151 # All other vendors support them only in their C++ compilers, not in their
1152 # ANSI C compilers. This means that it's a portability problem: every time
1153 # these comments have snuck into the xscreensaver source code, I've gotten
1154 # complaints about it the next day. So we turn off support for them in gcc
1155 # as well to prevent them from accidentially slipping in.
1157 if test "$ac_gcc_accepts_std" = yes ; then
1159 # -std=c89 defines __STRICT_ANSI__, which we don't want.
1160 # (That appears to be the only additional preprocessor symbol
1161 # it defines, in addition to the syntax changes it makes.)
1163 # -std=gnu89 is no good, because // comments were a GNU extension
1164 # before they were in the ANSI C 99 spec... (gcc 2.96 permits //
1165 # with -std=gnu89 but not with -std=c89.)
1167 CC="$CC -std=c89 -U__STRICT_ANSI__"
1170 CC="$CC -Wp,-lang-c89"
1174 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1175 echo "configure:1187: checking how to run the C preprocessor" >&5
1176 # On Suns, sometimes $CPP names a directory.
1177 if test -n "$CPP" && test -d "$CPP"; then
1180 if test -z "$CPP"; then
1181 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1182 echo $ac_n "(cached) $ac_c" 1>&6
1184 # This must be in double quotes, not single quotes, because CPP may get
1185 # substituted into the Makefile and "${CC-cc}" will confuse make.
1187 # On the NeXT, cc -E runs the code through the compiler's parser,
1188 # not just through cpp.
1189 cat > conftest.$ac_ext <<EOF
1190 #line 1202 "configure"
1191 #include "confdefs.h"
1195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1196 { (eval echo configure:1208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1198 if test -z "$ac_err"; then
1202 echo "configure: failed program was:" >&5
1203 cat conftest.$ac_ext >&5
1205 CPP="${CC-cc} -E -traditional-cpp"
1206 cat > conftest.$ac_ext <<EOF
1207 #line 1219 "configure"
1208 #include "confdefs.h"
1212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1213 { (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1215 if test -z "$ac_err"; then
1219 echo "configure: failed program was:" >&5
1220 cat conftest.$ac_ext >&5
1222 CPP="${CC-cc} -nologo -E"
1223 cat > conftest.$ac_ext <<EOF
1224 #line 1236 "configure"
1225 #include "confdefs.h"
1229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1230 { (eval echo configure:1242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1232 if test -z "$ac_err"; then
1236 echo "configure: failed program was:" >&5
1237 cat conftest.$ac_ext >&5
1246 ac_cv_prog_CPP="$CPP"
1248 CPP="$ac_cv_prog_CPP"
1250 ac_cv_prog_CPP="$CPP"
1252 echo "$ac_t""$CPP" 1>&6
1254 echo $ac_n "checking for working const""... $ac_c" 1>&6
1255 echo "configure:1267: checking for working const" >&5
1256 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1257 echo $ac_n "(cached) $ac_c" 1>&6
1259 cat > conftest.$ac_ext <<EOF
1260 #line 1272 "configure"
1261 #include "confdefs.h"
1265 /* Ultrix mips cc rejects this. */
1266 typedef int charset[2]; const charset x;
1267 /* SunOS 4.1.1 cc rejects this. */
1268 char const *const *ccp;
1270 /* NEC SVR4.0.2 mips cc rejects this. */
1271 struct point {int x, y;};
1272 static struct point const zero = {0,0};
1273 /* AIX XL C 1.02.0.0 rejects this.
1274 It does not let you subtract one const X* pointer from another in an arm
1275 of an if-expression whose if-part is not a constant expression */
1276 const char *g = "string";
1277 ccp = &g + (g ? g-g : 0);
1278 /* HPUX 7.0 cc rejects these. */
1281 ccp = (char const *const *) p;
1282 { /* SCO 3.2v4 cc rejects this. */
1284 char const *s = 0 ? (char *) 0 : (char const *) 0;
1288 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1290 const int *foo = &x[0];
1293 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1294 typedef const int *iptr;
1298 { /* AIX XL C 1.02.0.0 rejects this saying
1299 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1300 struct s { int j; const int *ap[3]; };
1301 struct s *b; b->j = 5;
1303 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1309 if { (eval echo configure:1321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
1321 echo "$ac_t""$ac_cv_c_const" 1>&6
1322 if test $ac_cv_c_const = no; then
1323 cat >> confdefs.h <<\EOF
1329 echo $ac_n "checking for inline""... $ac_c" 1>&6
1330 echo "configure:1342: checking for inline" >&5
1331 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1332 echo $ac_n "(cached) $ac_c" 1>&6
1335 for ac_kw in inline __inline__ __inline; do
1336 cat > conftest.$ac_ext <<EOF
1337 #line 1349 "configure"
1338 #include "confdefs.h"
1344 if { (eval echo configure:1356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1346 ac_cv_c_inline=$ac_kw; break
1348 echo "configure: failed program was:" >&5
1349 cat conftest.$ac_ext >&5
1356 echo "$ac_t""$ac_cv_c_inline" 1>&6
1357 case "$ac_cv_c_inline" in
1359 no) cat >> confdefs.h <<\EOF
1363 *) cat >> confdefs.h <<EOF
1364 #define inline $ac_cv_c_inline
1369 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
1370 echo $ac_n "checking for bc""... $ac_c" 1>&6
1371 echo "configure:1383: checking for bc" >&5
1372 if test "$ac_bc_result" = "15" ; then
1373 echo "$ac_t""yes" 1>&6
1375 echo "$ac_t""no" 1>&6
1377 { echo "configure: error: Your system doesn't have \"bc\", which has been a standard
1378 part of Unix since the 1970s. Come back when your vendor
1379 has grown a clue." 1>&2; exit 1; }
1383 # stuff for Makefiles
1384 # Find a good install program. We prefer a C program (faster),
1385 # so one script is as good as another. But avoid the broken or
1386 # incompatible versions:
1387 # SysV /etc/install, /usr/sbin/install
1388 # SunOS /usr/etc/install
1389 # IRIX /sbin/install
1391 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1392 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1393 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1394 # ./install, which can be erroneously created by make from ./install.sh.
1395 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1396 echo "configure:1408: checking for a BSD compatible install" >&5
1397 if test -z "$INSTALL"; then
1398 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1401 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1402 for ac_dir in $PATH; do
1403 # Account for people who put trailing slashes in PATH elements.
1405 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1407 # OSF1 and SCO ODT 3.0 have their own names for install.
1408 # Don't use installbsd from OSF since it installs stuff as root
1410 for ac_prog in ginstall scoinst install; do
1411 if test -f $ac_dir/$ac_prog; then
1412 if test $ac_prog = install &&
1413 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1414 # AIX install. It has an incompatible calling convention.
1417 ac_cv_path_install="$ac_dir/$ac_prog -c"
1428 if test "${ac_cv_path_install+set}" = set; then
1429 INSTALL="$ac_cv_path_install"
1431 # As a last resort, use the slow shell script. We don't cache a
1432 # path for INSTALL within a source directory, because that will
1433 # break other packages using the cache if that directory is
1434 # removed, or if the path is relative.
1435 INSTALL="$ac_install_sh"
1438 echo "$ac_t""$INSTALL" 1>&6
1440 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1441 # It thinks the first close brace ends the variable substitution.
1442 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1444 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1446 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1448 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1449 echo "configure:1461: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1450 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1451 echo $ac_n "(cached) $ac_c" 1>&6
1453 ac_cv_install_d_creates_dirs=no
1455 if mkdir conftestdir; then
1457 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1458 if test -d dir1/dir2/. ; then
1459 ac_cv_install_d_creates_dirs=yes
1467 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1469 if test "$ac_cv_install_d_creates_dirs" = no ; then
1470 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1471 echo "configure:1483: checking whether \"mkdir -p\" creates intermediate directories" >&5
1472 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1473 echo $ac_n "(cached) $ac_c" 1>&6
1475 ac_cv_mkdir_p_creates_dirs=no
1477 if mkdir conftestdir; then
1479 mkdir -p dir1/dir2 >&- 2>&-
1480 if test -d dir1/dir2/. ; then
1481 ac_cv_mkdir_p_creates_dirs=yes
1489 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1492 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1493 INSTALL_DIRS='${INSTALL} -d'
1494 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1495 INSTALL_DIRS='mkdir -p'
1498 INSTALL_DIRS='${INSTALL} -d'
1501 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1502 echo "configure:1514: checking whether ${MAKE-make} sets \${MAKE}" >&5
1503 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1504 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1505 echo $ac_n "(cached) $ac_c" 1>&6
1507 cat > conftestmake <<\EOF
1509 @echo 'ac_maketemp="${MAKE}"'
1511 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1512 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1513 if test -n "$ac_maketemp"; then
1514 eval ac_cv_prog_make_${ac_make}_set=yes
1516 eval ac_cv_prog_make_${ac_make}_set=no
1520 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1521 echo "$ac_t""yes" 1>&6
1524 echo "$ac_t""no" 1>&6
1525 SET_MAKE="MAKE=${MAKE-make}"
1530 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1531 echo "configure:1543: checking for ANSI C header files" >&5
1532 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1533 echo $ac_n "(cached) $ac_c" 1>&6
1535 cat > conftest.$ac_ext <<EOF
1536 #line 1548 "configure"
1537 #include "confdefs.h"
1543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1544 { (eval echo configure:1556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1546 if test -z "$ac_err"; then
1548 ac_cv_header_stdc=yes
1551 echo "configure: failed program was:" >&5
1552 cat conftest.$ac_ext >&5
1554 ac_cv_header_stdc=no
1558 if test $ac_cv_header_stdc = yes; then
1559 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1560 cat > conftest.$ac_ext <<EOF
1561 #line 1573 "configure"
1562 #include "confdefs.h"
1565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1566 egrep "memchr" >/dev/null 2>&1; then
1570 ac_cv_header_stdc=no
1576 if test $ac_cv_header_stdc = yes; then
1577 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1578 cat > conftest.$ac_ext <<EOF
1579 #line 1591 "configure"
1580 #include "confdefs.h"
1583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1584 egrep "free" >/dev/null 2>&1; then
1588 ac_cv_header_stdc=no
1594 if test $ac_cv_header_stdc = yes; then
1595 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1596 if test "$cross_compiling" = yes; then
1599 cat > conftest.$ac_ext <<EOF
1600 #line 1612 "configure"
1601 #include "confdefs.h"
1603 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1604 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1605 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1606 int main () { int i; for (i = 0; i < 256; i++)
1607 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1611 if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1615 echo "configure: failed program was:" >&5
1616 cat conftest.$ac_ext >&5
1618 ac_cv_header_stdc=no
1626 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1627 if test $ac_cv_header_stdc = yes; then
1628 cat >> confdefs.h <<\EOF
1629 #define STDC_HEADERS 1
1634 for ac_hdr in unistd.h
1636 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1637 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1638 echo "configure:1650: checking for $ac_hdr" >&5
1639 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1640 echo $ac_n "(cached) $ac_c" 1>&6
1642 cat > conftest.$ac_ext <<EOF
1643 #line 1655 "configure"
1644 #include "confdefs.h"
1647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1648 { (eval echo configure:1660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1650 if test -z "$ac_err"; then
1652 eval "ac_cv_header_$ac_safe=yes"
1655 echo "configure: failed program was:" >&5
1656 cat conftest.$ac_ext >&5
1658 eval "ac_cv_header_$ac_safe=no"
1662 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1663 echo "$ac_t""yes" 1>&6
1664 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1665 cat >> confdefs.h <<EOF
1666 #define $ac_tr_hdr 1
1670 echo "$ac_t""no" 1>&6
1674 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1675 echo "configure:1687: checking for mode_t" >&5
1676 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1677 echo $ac_n "(cached) $ac_c" 1>&6
1679 cat > conftest.$ac_ext <<EOF
1680 #line 1692 "configure"
1681 #include "confdefs.h"
1682 #include <sys/types.h>
1688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1689 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1691 ac_cv_type_mode_t=yes
1694 ac_cv_type_mode_t=no
1699 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1700 if test $ac_cv_type_mode_t = no; then
1701 cat >> confdefs.h <<\EOF
1707 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1708 echo "configure:1720: checking for pid_t" >&5
1709 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1712 cat > conftest.$ac_ext <<EOF
1713 #line 1725 "configure"
1714 #include "confdefs.h"
1715 #include <sys/types.h>
1721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1722 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1724 ac_cv_type_pid_t=yes
1732 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1733 if test $ac_cv_type_pid_t = no; then
1734 cat >> confdefs.h <<\EOF
1740 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1741 echo "configure:1753: checking for size_t" >&5
1742 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1743 echo $ac_n "(cached) $ac_c" 1>&6
1745 cat > conftest.$ac_ext <<EOF
1746 #line 1758 "configure"
1747 #include "confdefs.h"
1748 #include <sys/types.h>
1754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1755 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1757 ac_cv_type_size_t=yes
1760 ac_cv_type_size_t=no
1765 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1766 if test $ac_cv_type_size_t = no; then
1767 cat >> confdefs.h <<\EOF
1768 #define size_t unsigned
1773 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1774 echo "configure:1786: checking return type of signal handlers" >&5
1775 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1778 cat > conftest.$ac_ext <<EOF
1779 #line 1791 "configure"
1780 #include "confdefs.h"
1781 #include <sys/types.h>
1787 extern "C" void (*signal (int, void (*)(int)))(int);
1789 void (*signal ()) ();
1796 if { (eval echo configure:1808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1798 ac_cv_type_signal=void
1800 echo "configure: failed program was:" >&5
1801 cat conftest.$ac_ext >&5
1803 ac_cv_type_signal=int
1808 echo "$ac_t""$ac_cv_type_signal" 1>&6
1809 cat >> confdefs.h <<EOF
1810 #define RETSIGTYPE $ac_cv_type_signal
1814 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1815 echo "configure:1827: checking whether time.h and sys/time.h may both be included" >&5
1816 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1819 cat > conftest.$ac_ext <<EOF
1820 #line 1832 "configure"
1821 #include "confdefs.h"
1822 #include <sys/types.h>
1823 #include <sys/time.h>
1829 if { (eval echo configure:1841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1831 ac_cv_header_time=yes
1833 echo "configure: failed program was:" >&5
1834 cat conftest.$ac_ext >&5
1836 ac_cv_header_time=no
1841 echo "$ac_t""$ac_cv_header_time" 1>&6
1842 if test $ac_cv_header_time = yes; then
1843 cat >> confdefs.h <<\EOF
1844 #define TIME_WITH_SYS_TIME 1
1849 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1850 echo "configure:1862: checking for sys/wait.h that is POSIX.1 compatible" >&5
1851 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1852 echo $ac_n "(cached) $ac_c" 1>&6
1854 cat > conftest.$ac_ext <<EOF
1855 #line 1867 "configure"
1856 #include "confdefs.h"
1857 #include <sys/types.h>
1858 #include <sys/wait.h>
1860 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1863 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1868 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1871 if { (eval echo configure:1883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1873 ac_cv_header_sys_wait_h=yes
1875 echo "configure: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
1878 ac_cv_header_sys_wait_h=no
1883 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1884 if test $ac_cv_header_sys_wait_h = yes; then
1885 cat >> confdefs.h <<\EOF
1886 #define HAVE_SYS_WAIT_H 1
1892 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1895 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1896 echo "configure:1908: checking for $ac_hdr that defines DIR" >&5
1897 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1898 echo $ac_n "(cached) $ac_c" 1>&6
1900 cat > conftest.$ac_ext <<EOF
1901 #line 1913 "configure"
1902 #include "confdefs.h"
1903 #include <sys/types.h>
1909 if { (eval echo configure:1921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1911 eval "ac_cv_header_dirent_$ac_safe=yes"
1913 echo "configure: failed program was:" >&5
1914 cat conftest.$ac_ext >&5
1916 eval "ac_cv_header_dirent_$ac_safe=no"
1920 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1921 echo "$ac_t""yes" 1>&6
1922 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1923 cat >> confdefs.h <<EOF
1924 #define $ac_tr_hdr 1
1926 ac_header_dirent=$ac_hdr; break
1928 echo "$ac_t""no" 1>&6
1931 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1932 if test $ac_header_dirent = dirent.h; then
1933 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1934 echo "configure:1946: checking for opendir in -ldir" >&5
1935 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1936 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1937 echo $ac_n "(cached) $ac_c" 1>&6
1939 ac_save_LIBS="$LIBS"
1941 cat > conftest.$ac_ext <<EOF
1942 #line 1954 "configure"
1943 #include "confdefs.h"
1944 /* Override any gcc2 internal prototype to avoid an error. */
1945 /* We use char because int might match the return type of a gcc2
1946 builtin and then its argument prototype would still apply. */
1953 if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1955 eval "ac_cv_lib_$ac_lib_var=yes"
1957 echo "configure: failed program was:" >&5
1958 cat conftest.$ac_ext >&5
1960 eval "ac_cv_lib_$ac_lib_var=no"
1963 LIBS="$ac_save_LIBS"
1966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1967 echo "$ac_t""yes" 1>&6
1970 echo "$ac_t""no" 1>&6
1974 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1975 echo "configure:1987: checking for opendir in -lx" >&5
1976 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1977 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1978 echo $ac_n "(cached) $ac_c" 1>&6
1980 ac_save_LIBS="$LIBS"
1982 cat > conftest.$ac_ext <<EOF
1983 #line 1995 "configure"
1984 #include "confdefs.h"
1985 /* Override any gcc2 internal prototype to avoid an error. */
1986 /* We use char because int might match the return type of a gcc2
1987 builtin and then its argument prototype would still apply. */
1994 if { (eval echo configure:2006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1996 eval "ac_cv_lib_$ac_lib_var=yes"
1998 echo "configure: failed program was:" >&5
1999 cat conftest.$ac_ext >&5
2001 eval "ac_cv_lib_$ac_lib_var=no"
2004 LIBS="$ac_save_LIBS"
2007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2008 echo "$ac_t""yes" 1>&6
2011 echo "$ac_t""no" 1>&6
2016 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
2017 echo "configure:2029: checking how to call gettimeofday" >&5
2018 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
2019 echo $ac_n "(cached) $ac_c" 1>&6
2021 cat > conftest.$ac_ext <<EOF
2022 #line 2034 "configure"
2023 #include "confdefs.h"
2025 #include <sys/time.h>
2027 struct timeval tv; struct timezone tzp;
2028 gettimeofday(&tv, &tzp);
2031 if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2033 ac_gettimeofday_args=2
2035 echo "configure: failed program was:" >&5
2036 cat conftest.$ac_ext >&5
2038 cat > conftest.$ac_ext <<EOF
2039 #line 2051 "configure"
2040 #include "confdefs.h"
2042 #include <sys/time.h>
2044 struct timeval tv; gettimeofday(&tv);
2047 if { (eval echo configure:2059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2049 ac_gettimeofday_args=1
2051 echo "configure: failed program was:" >&5
2052 cat conftest.$ac_ext >&5
2054 ac_gettimeofday_args=0
2059 ac_cv_gettimeofday_args=$ac_gettimeofday_args
2062 ac_gettimeofday_args=$ac_cv_gettimeofday_args
2063 if test "$ac_gettimeofday_args" = 1 ; then
2064 cat >> confdefs.h <<\EOF
2065 #define HAVE_GETTIMEOFDAY 1
2068 echo "$ac_t""one argument" 1>&6
2069 elif test "$ac_gettimeofday_args" = 2 ; then
2070 cat >> confdefs.h <<\EOF
2071 #define HAVE_GETTIMEOFDAY 1
2074 cat >> confdefs.h <<\EOF
2075 #define GETTIMEOFDAY_TWO_ARGS 1
2078 echo "$ac_t""two arguments" 1>&6
2080 echo "$ac_t""unknown" 1>&6
2083 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
2085 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2086 echo "configure:2098: checking for $ac_func" >&5
2087 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2088 echo $ac_n "(cached) $ac_c" 1>&6
2090 cat > conftest.$ac_ext <<EOF
2091 #line 2103 "configure"
2092 #include "confdefs.h"
2093 /* System header to define __stub macros and hopefully few prototypes,
2094 which can conflict with char $ac_func(); below. */
2096 /* Override any gcc2 internal prototype to avoid an error. */
2097 /* We use char because int might match the return type of a gcc2
2098 builtin and then its argument prototype would still apply. */
2103 /* The GNU C library defines this for functions which it implements
2104 to always fail with ENOSYS. Some functions are actually named
2105 something starting with __ and the normal name is an alias. */
2106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2114 if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2116 eval "ac_cv_func_$ac_func=yes"
2118 echo "configure: failed program was:" >&5
2119 cat conftest.$ac_ext >&5
2121 eval "ac_cv_func_$ac_func=no"
2126 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2127 echo "$ac_t""yes" 1>&6
2128 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2129 cat >> confdefs.h <<EOF
2130 #define $ac_tr_func 1
2134 echo "$ac_t""no" 1>&6
2139 for ac_func in sigaction syslog realpath
2141 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2142 echo "configure:2154: checking for $ac_func" >&5
2143 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2144 echo $ac_n "(cached) $ac_c" 1>&6
2146 cat > conftest.$ac_ext <<EOF
2147 #line 2159 "configure"
2148 #include "confdefs.h"
2149 /* System header to define __stub macros and hopefully few prototypes,
2150 which can conflict with char $ac_func(); below. */
2152 /* Override any gcc2 internal prototype to avoid an error. */
2153 /* We use char because int might match the return type of a gcc2
2154 builtin and then its argument prototype would still apply. */
2159 /* The GNU C library defines this for functions which it implements
2160 to always fail with ENOSYS. Some functions are actually named
2161 something starting with __ and the normal name is an alias. */
2162 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2170 if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2172 eval "ac_cv_func_$ac_func=yes"
2174 echo "configure: failed program was:" >&5
2175 cat conftest.$ac_ext >&5
2177 eval "ac_cv_func_$ac_func=no"
2182 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2183 echo "$ac_t""yes" 1>&6
2184 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2185 cat >> confdefs.h <<EOF
2186 #define $ac_tr_func 1
2190 echo "$ac_t""no" 1>&6
2194 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2195 echo "configure:2207: checking for struct icmp" >&5
2196 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2197 echo $ac_n "(cached) $ac_c" 1>&6
2199 cat > conftest.$ac_ext <<EOF
2200 #line 2212 "configure"
2201 #include "confdefs.h"
2209 #include <sys/types.h>
2210 #include <sys/time.h>
2211 #include <sys/ipc.h>
2212 #include <sys/shm.h>
2213 #include <sys/socket.h>
2214 #include <netinet/in_systm.h>
2215 #include <netinet/in.h>
2216 #include <netinet/ip.h>
2217 #include <netinet/ip_icmp.h>
2218 #include <netinet/udp.h>
2219 #include <arpa/inet.h>
2224 struct sockaddr_in si;
2226 i.icmp_type = ICMP_ECHO;
2231 si.sin_family = AF_INET;
2232 #if defined(__DECC) || defined(_IP_VHL)
2240 if { (eval echo configure:2252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2244 echo "configure: failed program was:" >&5
2245 cat conftest.$ac_ext >&5
2252 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2253 if test "$ac_cv_have_icmp" = yes ; then
2254 cat >> confdefs.h <<\EOF
2259 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2260 echo "configure:2272: checking for struct icmphdr" >&5
2261 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2262 echo $ac_n "(cached) $ac_c" 1>&6
2264 cat > conftest.$ac_ext <<EOF
2265 #line 2277 "configure"
2266 #include "confdefs.h"
2274 #include <sys/types.h>
2275 #include <sys/time.h>
2276 #include <sys/ipc.h>
2277 #include <sys/shm.h>
2278 #include <sys/socket.h>
2279 #include <netinet/in_systm.h>
2280 #include <netinet/in.h>
2281 #include <netinet/ip.h>
2282 #include <netinet/ip_icmp.h>
2283 #include <netinet/udp.h>
2284 #include <arpa/inet.h>
2289 struct sockaddr_in si;
2295 i.un.echo.sequence = 0;
2296 si.sin_family = AF_INET;
2300 if { (eval echo configure:2312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2302 ac_cv_have_icmphdr=yes
2304 echo "configure: failed program was:" >&5
2305 cat conftest.$ac_ext >&5
2307 ac_cv_have_icmphdr=no
2312 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2313 if test "$ac_cv_have_icmphdr" = yes ; then
2314 cat >> confdefs.h <<\EOF
2315 #define HAVE_ICMPHDR 1
2319 for ac_hdr in crypt.h sys/select.h
2321 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2322 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2323 echo "configure:2335: checking for $ac_hdr" >&5
2324 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2325 echo $ac_n "(cached) $ac_c" 1>&6
2327 cat > conftest.$ac_ext <<EOF
2328 #line 2340 "configure"
2329 #include "confdefs.h"
2332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2333 { (eval echo configure:2345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2335 if test -z "$ac_err"; then
2337 eval "ac_cv_header_$ac_safe=yes"
2340 echo "configure: failed program was:" >&5
2341 cat conftest.$ac_ext >&5
2343 eval "ac_cv_header_$ac_safe=no"
2347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2348 echo "$ac_t""yes" 1>&6
2349 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2350 cat >> confdefs.h <<EOF
2351 #define $ac_tr_hdr 1
2355 echo "$ac_t""no" 1>&6
2359 for ac_prog in perl5 perl
2361 # Extract the first word of "$ac_prog", so it can be a program name with args.
2362 set dummy $ac_prog; ac_word=$2
2363 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2364 echo "configure:2376: checking for $ac_word" >&5
2365 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2366 echo $ac_n "(cached) $ac_c" 1>&6
2370 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2373 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2376 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2378 for ac_dir in $ac_dummy; do
2379 test -z "$ac_dir" && ac_dir=.
2380 if test -f $ac_dir/$ac_word; then
2381 ac_cv_path_PERL="$ac_dir/$ac_word"
2389 PERL="$ac_cv_path_PERL"
2390 if test -n "$PERL"; then
2391 echo "$ac_t""$PERL" 1>&6
2393 echo "$ac_t""no" 1>&6
2396 test -n "$PERL" && break
2399 if test -z "$PERL" ; then
2402 echo $ac_n "checking perl version""... $ac_c" 1>&6
2403 echo "configure:2415: checking perl version" >&5
2404 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2405 echo $ac_n "(cached) $ac_c" 1>&6
2407 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2410 echo "$ac_t""$ac_cv_perl_version" 1>&6
2411 PERL_VERSION=$ac_cv_perl_version
2415 if test -z "$PERL" ; then
2416 # don't let it be blank...
2420 # If we find X, set shell vars x_includes and x_libraries to the
2421 # paths, otherwise set no_x=yes.
2422 # Uses ac_ vars as temps to allow command line to override cache and checks.
2423 # --without-x overrides everything else, but does not touch the cache.
2424 echo $ac_n "checking for X""... $ac_c" 1>&6
2425 echo "configure:2437: checking for X" >&5
2427 # Check whether --with-x or --without-x was given.
2428 if test "${with_x+set}" = set; then
2433 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2434 if test "x$with_x" = xno; then
2435 # The user explicitly disabled X.
2438 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2439 # Both variables are already set.
2442 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2443 echo $ac_n "(cached) $ac_c" 1>&6
2445 # One or both of the vars are not set, and there is no cached value.
2446 ac_x_includes=NO ac_x_libraries=NO
2448 if mkdir conftestdir; then
2450 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2451 cat > Imakefile <<'EOF'
2453 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2455 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2456 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2457 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2458 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2459 for ac_extension in a so sl; do
2460 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2461 test -f $ac_im_libdir/libX11.$ac_extension; then
2462 ac_im_usrlibdir=$ac_im_libdir; break
2465 # Screen out bogus values from the imake configuration. They are
2466 # bogus both because they are the default anyway, and because
2467 # using them would break gcc on systems where it needs fixed includes.
2468 case "$ac_im_incroot" in
2470 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2472 case "$ac_im_usrlibdir" in
2474 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2481 if test "$ac_x_includes" = NO; then
2482 # Guess where to find include files, by looking for this one X11 .h file.
2483 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2485 # First, try using that file with no special directory specified.
2486 cat > conftest.$ac_ext <<EOF
2487 #line 2499 "configure"
2488 #include "confdefs.h"
2489 #include <$x_direct_test_include>
2491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2492 { (eval echo configure:2504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2494 if test -z "$ac_err"; then
2496 # We can compile using X headers with no special include directory.
2500 echo "configure: failed program was:" >&5
2501 cat conftest.$ac_ext >&5
2503 # Look for the header file in a standard set of common directories.
2504 # Check X11 before X11Rn because it is often a symlink to the current release.
2507 /usr/X11R6/include \
2508 /usr/X11R5/include \
2509 /usr/X11R4/include \
2512 /usr/include/X11R6 \
2513 /usr/include/X11R5 \
2514 /usr/include/X11R4 \
2516 /usr/local/X11/include \
2517 /usr/local/X11R6/include \
2518 /usr/local/X11R5/include \
2519 /usr/local/X11R4/include \
2521 /usr/local/include/X11 \
2522 /usr/local/include/X11R6 \
2523 /usr/local/include/X11R5 \
2524 /usr/local/include/X11R4 \
2528 /usr/XFree86/include/X11 \
2531 /usr/local/include \
2532 /usr/unsupported/include \
2533 /usr/athena/include \
2534 /usr/local/x11r5/include \
2535 /usr/lpp/Xamples/include \
2537 /usr/openwin/include \
2538 /usr/openwin/share/include \
2541 if test -r "$ac_dir/$x_direct_test_include"; then
2542 ac_x_includes=$ac_dir
2548 fi # $ac_x_includes = NO
2550 if test "$ac_x_libraries" = NO; then
2551 # Check for the libraries.
2553 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2554 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2556 # See if we find them without any special options.
2557 # Don't add to $LIBS permanently.
2558 ac_save_LIBS="$LIBS"
2559 LIBS="-l$x_direct_test_library $LIBS"
2560 cat > conftest.$ac_ext <<EOF
2561 #line 2573 "configure"
2562 #include "confdefs.h"
2565 ${x_direct_test_function}()
2568 if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2570 LIBS="$ac_save_LIBS"
2571 # We can link X programs with no special library path.
2574 echo "configure: failed program was:" >&5
2575 cat conftest.$ac_ext >&5
2577 LIBS="$ac_save_LIBS"
2578 # First see if replacing the include by lib works.
2579 # Check X11 before X11Rn because it is often a symlink to the current release.
2580 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2591 /usr/local/X11/lib \
2592 /usr/local/X11R6/lib \
2593 /usr/local/X11R5/lib \
2594 /usr/local/X11R4/lib \
2596 /usr/local/lib/X11 \
2597 /usr/local/lib/X11R6 \
2598 /usr/local/lib/X11R5 \
2599 /usr/local/lib/X11R4 \
2603 /usr/XFree86/lib/X11 \
2607 /usr/unsupported/lib \
2609 /usr/local/x11r5/lib \
2610 /usr/lpp/Xamples/lib \
2614 /usr/openwin/share/lib \
2617 for ac_extension in a so sl; do
2618 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2619 ac_x_libraries=$ac_dir
2626 fi # $ac_x_libraries = NO
2628 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2629 # Didn't find X anywhere. Cache the known absence of X.
2630 ac_cv_have_x="have_x=no"
2632 # Record where we found X for the cache.
2633 ac_cv_have_x="have_x=yes \
2634 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2638 eval "$ac_cv_have_x"
2641 if test "$have_x" != yes; then
2642 echo "$ac_t""$have_x" 1>&6
2645 # If each of the values was on the command line, it overrides each guess.
2646 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2647 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2648 # Update the cache value to reflect the command line values.
2649 ac_cv_have_x="have_x=yes \
2650 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2651 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2654 if test "$no_x" = yes; then
2655 # Not all programs may use this symbol, but it does not hurt to define it.
2656 cat >> confdefs.h <<\EOF
2657 #define X_DISPLAY_MISSING 1
2660 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2662 if test -n "$x_includes"; then
2663 X_CFLAGS="$X_CFLAGS -I$x_includes"
2666 # It would also be nice to do this for all -L options, not just this one.
2667 if test -n "$x_libraries"; then
2668 X_LIBS="$X_LIBS -L$x_libraries"
2669 # For Solaris; some versions of Sun CC require a space after -R and
2670 # others require no space. Words are not sufficient . . . .
2671 case "`(uname -sr) 2>/dev/null`" in
2673 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2674 echo "configure:2686: checking whether -R must be followed by a space" >&5
2675 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2676 cat > conftest.$ac_ext <<EOF
2677 #line 2689 "configure"
2678 #include "confdefs.h"
2684 if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2688 echo "configure: failed program was:" >&5
2689 cat conftest.$ac_ext >&5
2694 if test $ac_R_nospace = yes; then
2695 echo "$ac_t""no" 1>&6
2696 X_LIBS="$X_LIBS -R$x_libraries"
2698 LIBS="$ac_xsave_LIBS -R $x_libraries"
2699 cat > conftest.$ac_ext <<EOF
2700 #line 2712 "configure"
2701 #include "confdefs.h"
2707 if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2711 echo "configure: failed program was:" >&5
2712 cat conftest.$ac_ext >&5
2717 if test $ac_R_space = yes; then
2718 echo "$ac_t""yes" 1>&6
2719 X_LIBS="$X_LIBS -R $x_libraries"
2721 echo "$ac_t""neither works" 1>&6
2724 LIBS="$ac_xsave_LIBS"
2728 # Check for system-dependent libraries X programs must link with.
2729 # Do this before checking for the system-independent R6 libraries
2730 # (-lICE), since we may need -lsocket or whatever for X linking.
2732 if test "$ISC" = yes; then
2733 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2735 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2736 # libraries were built with DECnet support. And karl@cs.umb.edu says
2737 # the Alpha needs dnet_stub (dnet does not exist).
2738 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2739 echo "configure:2751: checking for dnet_ntoa in -ldnet" >&5
2740 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2741 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2742 echo $ac_n "(cached) $ac_c" 1>&6
2744 ac_save_LIBS="$LIBS"
2746 cat > conftest.$ac_ext <<EOF
2747 #line 2759 "configure"
2748 #include "confdefs.h"
2749 /* Override any gcc2 internal prototype to avoid an error. */
2750 /* We use char because int might match the return type of a gcc2
2751 builtin and then its argument prototype would still apply. */
2758 if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2760 eval "ac_cv_lib_$ac_lib_var=yes"
2762 echo "configure: failed program was:" >&5
2763 cat conftest.$ac_ext >&5
2765 eval "ac_cv_lib_$ac_lib_var=no"
2768 LIBS="$ac_save_LIBS"
2771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2772 echo "$ac_t""yes" 1>&6
2773 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2775 echo "$ac_t""no" 1>&6
2778 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2779 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2780 echo "configure:2792: checking for dnet_ntoa in -ldnet_stub" >&5
2781 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2783 echo $ac_n "(cached) $ac_c" 1>&6
2785 ac_save_LIBS="$LIBS"
2786 LIBS="-ldnet_stub $LIBS"
2787 cat > conftest.$ac_ext <<EOF
2788 #line 2800 "configure"
2789 #include "confdefs.h"
2790 /* Override any gcc2 internal prototype to avoid an error. */
2791 /* We use char because int might match the return type of a gcc2
2792 builtin and then its argument prototype would still apply. */
2799 if { (eval echo configure:2811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2801 eval "ac_cv_lib_$ac_lib_var=yes"
2803 echo "configure: failed program was:" >&5
2804 cat conftest.$ac_ext >&5
2806 eval "ac_cv_lib_$ac_lib_var=no"
2809 LIBS="$ac_save_LIBS"
2812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2813 echo "$ac_t""yes" 1>&6
2814 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2816 echo "$ac_t""no" 1>&6
2821 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2822 # to get the SysV transport functions.
2823 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2825 # The nsl library prevents programs from opening the X display
2826 # on Irix 5.2, according to dickey@clark.net.
2827 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2828 echo "configure:2840: checking for gethostbyname" >&5
2829 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2830 echo $ac_n "(cached) $ac_c" 1>&6
2832 cat > conftest.$ac_ext <<EOF
2833 #line 2845 "configure"
2834 #include "confdefs.h"
2835 /* System header to define __stub macros and hopefully few prototypes,
2836 which can conflict with char gethostbyname(); below. */
2838 /* Override any gcc2 internal prototype to avoid an error. */
2839 /* We use char because int might match the return type of a gcc2
2840 builtin and then its argument prototype would still apply. */
2841 char gethostbyname();
2845 /* The GNU C library defines this for functions which it implements
2846 to always fail with ENOSYS. Some functions are actually named
2847 something starting with __ and the normal name is an alias. */
2848 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2856 if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2858 eval "ac_cv_func_gethostbyname=yes"
2860 echo "configure: failed program was:" >&5
2861 cat conftest.$ac_ext >&5
2863 eval "ac_cv_func_gethostbyname=no"
2868 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2869 echo "$ac_t""yes" 1>&6
2872 echo "$ac_t""no" 1>&6
2875 if test $ac_cv_func_gethostbyname = no; then
2876 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2877 echo "configure:2889: checking for gethostbyname in -lnsl" >&5
2878 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2879 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2880 echo $ac_n "(cached) $ac_c" 1>&6
2882 ac_save_LIBS="$LIBS"
2884 cat > conftest.$ac_ext <<EOF
2885 #line 2897 "configure"
2886 #include "confdefs.h"
2887 /* Override any gcc2 internal prototype to avoid an error. */
2888 /* We use char because int might match the return type of a gcc2
2889 builtin and then its argument prototype would still apply. */
2890 char gethostbyname();
2896 if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2898 eval "ac_cv_lib_$ac_lib_var=yes"
2900 echo "configure: failed program was:" >&5
2901 cat conftest.$ac_ext >&5
2903 eval "ac_cv_lib_$ac_lib_var=no"
2906 LIBS="$ac_save_LIBS"
2909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2910 echo "$ac_t""yes" 1>&6
2911 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2913 echo "$ac_t""no" 1>&6
2918 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2919 # socket/setsockopt and other routines are undefined under SCO ODT
2920 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2921 # on later versions), says simon@lia.di.epfl.ch: it contains
2922 # gethostby* variants that don't use the nameserver (or something).
2923 # -lsocket must be given before -lnsl if both are needed.
2924 # We assume that if connect needs -lnsl, so does gethostbyname.
2925 echo $ac_n "checking for connect""... $ac_c" 1>&6
2926 echo "configure:2938: checking for connect" >&5
2927 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2928 echo $ac_n "(cached) $ac_c" 1>&6
2930 cat > conftest.$ac_ext <<EOF
2931 #line 2943 "configure"
2932 #include "confdefs.h"
2933 /* System header to define __stub macros and hopefully few prototypes,
2934 which can conflict with char connect(); below. */
2936 /* Override any gcc2 internal prototype to avoid an error. */
2937 /* We use char because int might match the return type of a gcc2
2938 builtin and then its argument prototype would still apply. */
2943 /* The GNU C library defines this for functions which it implements
2944 to always fail with ENOSYS. Some functions are actually named
2945 something starting with __ and the normal name is an alias. */
2946 #if defined (__stub_connect) || defined (__stub___connect)
2954 if { (eval echo configure:2966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2956 eval "ac_cv_func_connect=yes"
2958 echo "configure: failed program was:" >&5
2959 cat conftest.$ac_ext >&5
2961 eval "ac_cv_func_connect=no"
2966 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2967 echo "$ac_t""yes" 1>&6
2970 echo "$ac_t""no" 1>&6
2973 if test $ac_cv_func_connect = no; then
2974 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2975 echo "configure:2987: checking for connect in -lsocket" >&5
2976 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2977 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2978 echo $ac_n "(cached) $ac_c" 1>&6
2980 ac_save_LIBS="$LIBS"
2981 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2982 cat > conftest.$ac_ext <<EOF
2983 #line 2995 "configure"
2984 #include "confdefs.h"
2985 /* Override any gcc2 internal prototype to avoid an error. */
2986 /* We use char because int might match the return type of a gcc2
2987 builtin and then its argument prototype would still apply. */
2994 if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2996 eval "ac_cv_lib_$ac_lib_var=yes"
2998 echo "configure: failed program was:" >&5
2999 cat conftest.$ac_ext >&5
3001 eval "ac_cv_lib_$ac_lib_var=no"
3004 LIBS="$ac_save_LIBS"
3007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3008 echo "$ac_t""yes" 1>&6
3009 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3011 echo "$ac_t""no" 1>&6
3016 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3017 echo $ac_n "checking for remove""... $ac_c" 1>&6
3018 echo "configure:3030: checking for remove" >&5
3019 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3020 echo $ac_n "(cached) $ac_c" 1>&6
3022 cat > conftest.$ac_ext <<EOF
3023 #line 3035 "configure"
3024 #include "confdefs.h"
3025 /* System header to define __stub macros and hopefully few prototypes,
3026 which can conflict with char remove(); below. */
3028 /* Override any gcc2 internal prototype to avoid an error. */
3029 /* We use char because int might match the return type of a gcc2
3030 builtin and then its argument prototype would still apply. */
3035 /* The GNU C library defines this for functions which it implements
3036 to always fail with ENOSYS. Some functions are actually named
3037 something starting with __ and the normal name is an alias. */
3038 #if defined (__stub_remove) || defined (__stub___remove)
3046 if { (eval echo configure:3058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3048 eval "ac_cv_func_remove=yes"
3050 echo "configure: failed program was:" >&5
3051 cat conftest.$ac_ext >&5
3053 eval "ac_cv_func_remove=no"
3058 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3059 echo "$ac_t""yes" 1>&6
3062 echo "$ac_t""no" 1>&6
3065 if test $ac_cv_func_remove = no; then
3066 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3067 echo "configure:3079: checking for remove in -lposix" >&5
3068 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3069 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3070 echo $ac_n "(cached) $ac_c" 1>&6
3072 ac_save_LIBS="$LIBS"
3073 LIBS="-lposix $LIBS"
3074 cat > conftest.$ac_ext <<EOF
3075 #line 3087 "configure"
3076 #include "confdefs.h"
3077 /* Override any gcc2 internal prototype to avoid an error. */
3078 /* We use char because int might match the return type of a gcc2
3079 builtin and then its argument prototype would still apply. */
3086 if { (eval echo configure:3098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3088 eval "ac_cv_lib_$ac_lib_var=yes"
3090 echo "configure: failed program was:" >&5
3091 cat conftest.$ac_ext >&5
3093 eval "ac_cv_lib_$ac_lib_var=no"
3096 LIBS="$ac_save_LIBS"
3099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3100 echo "$ac_t""yes" 1>&6
3101 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3103 echo "$ac_t""no" 1>&6
3108 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3109 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3110 echo "configure:3122: checking for shmat" >&5
3111 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3112 echo $ac_n "(cached) $ac_c" 1>&6
3114 cat > conftest.$ac_ext <<EOF
3115 #line 3127 "configure"
3116 #include "confdefs.h"
3117 /* System header to define __stub macros and hopefully few prototypes,
3118 which can conflict with char shmat(); below. */
3120 /* Override any gcc2 internal prototype to avoid an error. */
3121 /* We use char because int might match the return type of a gcc2
3122 builtin and then its argument prototype would still apply. */
3127 /* The GNU C library defines this for functions which it implements
3128 to always fail with ENOSYS. Some functions are actually named
3129 something starting with __ and the normal name is an alias. */
3130 #if defined (__stub_shmat) || defined (__stub___shmat)
3138 if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3140 eval "ac_cv_func_shmat=yes"
3142 echo "configure: failed program was:" >&5
3143 cat conftest.$ac_ext >&5
3145 eval "ac_cv_func_shmat=no"
3150 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3151 echo "$ac_t""yes" 1>&6
3154 echo "$ac_t""no" 1>&6
3157 if test $ac_cv_func_shmat = no; then
3158 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3159 echo "configure:3171: checking for shmat in -lipc" >&5
3160 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3161 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3162 echo $ac_n "(cached) $ac_c" 1>&6
3164 ac_save_LIBS="$LIBS"
3166 cat > conftest.$ac_ext <<EOF
3167 #line 3179 "configure"
3168 #include "confdefs.h"
3169 /* Override any gcc2 internal prototype to avoid an error. */
3170 /* We use char because int might match the return type of a gcc2
3171 builtin and then its argument prototype would still apply. */
3178 if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3180 eval "ac_cv_lib_$ac_lib_var=yes"
3182 echo "configure: failed program was:" >&5
3183 cat conftest.$ac_ext >&5
3185 eval "ac_cv_lib_$ac_lib_var=no"
3188 LIBS="$ac_save_LIBS"
3191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3192 echo "$ac_t""yes" 1>&6
3193 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3195 echo "$ac_t""no" 1>&6
3201 # Check for libraries that X11R6 Xt/Xaw programs need.
3202 ac_save_LDFLAGS="$LDFLAGS"
3203 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3204 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3205 # check for ICE first), but we must link in the order -lSM -lICE or
3206 # we get undefined symbols. So assume we have SM if we have ICE.
3207 # These have to be linked with before -lX11, unlike the other
3208 # libraries we check for below, so use a different variable.
3209 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3210 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3211 echo "configure:3223: checking for IceConnectionNumber in -lICE" >&5
3212 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3213 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3214 echo $ac_n "(cached) $ac_c" 1>&6
3216 ac_save_LIBS="$LIBS"
3217 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3218 cat > conftest.$ac_ext <<EOF
3219 #line 3231 "configure"
3220 #include "confdefs.h"
3221 /* Override any gcc2 internal prototype to avoid an error. */
3222 /* We use char because int might match the return type of a gcc2
3223 builtin and then its argument prototype would still apply. */
3224 char IceConnectionNumber();
3227 IceConnectionNumber()
3230 if { (eval echo configure:3242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3232 eval "ac_cv_lib_$ac_lib_var=yes"
3234 echo "configure: failed program was:" >&5
3235 cat conftest.$ac_ext >&5
3237 eval "ac_cv_lib_$ac_lib_var=no"
3240 LIBS="$ac_save_LIBS"
3243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3244 echo "$ac_t""yes" 1>&6
3245 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3247 echo "$ac_t""no" 1>&6
3250 LDFLAGS="$ac_save_LDFLAGS"
3255 if test "$have_x" != yes; then
3256 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3260 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3261 echo "configure:3273: checking for X app-defaults directory" >&5
3262 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3263 echo $ac_n "(cached) $ac_c" 1>&6
3267 if mkdir conftestdir; then
3269 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3270 cat > Imakefile <<'EOF'
3272 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3274 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3275 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3276 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3281 if test x"$ac_x_app_defaults" = x; then
3283 # Look for the directory under a standard set of common directories.
3284 # Check X11 before X11Rn because it's often a symlink to the current release.
3286 /usr/X11/lib/app-defaults \
3287 /usr/X11R6/lib/app-defaults \
3288 /usr/X11R6/lib/X11/app-defaults \
3289 /usr/X11R5/lib/app-defaults \
3290 /usr/X11R5/lib/X11/app-defaults \
3291 /usr/X11R4/lib/app-defaults \
3292 /usr/X11R4/lib/X11/app-defaults \
3294 /usr/lib/X11/app-defaults \
3295 /usr/lib/X11R6/app-defaults \
3296 /usr/lib/X11R5/app-defaults \
3297 /usr/lib/X11R4/app-defaults \
3299 /usr/local/X11/lib/app-defaults \
3300 /usr/local/X11R6/lib/app-defaults \
3301 /usr/local/X11R5/lib/app-defaults \
3302 /usr/local/X11R4/lib/app-defaults \
3304 /usr/local/lib/X11/app-defaults \
3305 /usr/local/lib/X11R6/app-defaults \
3306 /usr/local/lib/X11R6/X11/app-defaults \
3307 /usr/local/lib/X11R5/app-defaults \
3308 /usr/local/lib/X11R5/X11/app-defaults \
3309 /usr/local/lib/X11R4/app-defaults \
3310 /usr/local/lib/X11R4/X11/app-defaults \
3312 /usr/X386/lib/X11/app-defaults \
3313 /usr/x386/lib/X11/app-defaults \
3314 /usr/XFree86/lib/X11/app-defaults \
3316 /usr/lib/X11/app-defaults \
3317 /usr/local/lib/X11/app-defaults \
3318 /usr/unsupported/lib/X11/app-defaults \
3319 /usr/athena/lib/X11/app-defaults \
3320 /usr/local/x11r5/lib/X11/app-defaults \
3321 /usr/lpp/Xamples/lib/X11/app-defaults \
3322 /lib/usr/lib/X11/app-defaults \
3324 /usr/openwin/lib/app-defaults \
3325 /usr/openwin/lib/X11/app-defaults \
3326 /usr/openwin/share/lib/app-defaults \
3327 /usr/openwin/share/lib/X11/app-defaults \
3329 /X11R6/lib/app-defaults \
3330 /X11R5/lib/app-defaults \
3331 /X11R4/lib/app-defaults \
3334 if test -d "$ac_dir"; then
3335 ac_x_app_defaults=$ac_dir
3341 if test x"$ac_x_app_defaults" = x; then
3342 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3344 # Record where we found app-defaults for the cache.
3345 ac_cv_x_app_defaults="$ac_x_app_defaults"
3349 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3350 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3354 # The following arcana was gleaned from conversations with
3355 # Eric Schwartz <erics@col.hp.com>:
3357 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3358 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3359 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3360 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3361 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3362 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3363 # you don't need any -I or -L arguments.
3365 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3366 # are the same division as 10.x. However, there are no symlinks to
3367 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3368 # arguments are always necessary.
3370 # However, X11R6 was available on HPUX 9.x as a patch: if that
3371 # patch was installed, then all of X11R6 went in to
3372 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3374 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3375 # whether R5 was available as a patch; R6 undoubtedly was not.)
3377 # So. We try and use the highest numbered pair of
3378 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3379 # that are available. We do not mix and match different versions
3382 # Question I still don't know the answer to: (do you?)
3384 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3385 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3386 # that contrib directory? Did it contain so-called "standard"
3387 # X11R6, or did it include Xaw and Xmu as well? If the former,
3388 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3389 # be a situation where one had to reach into the R5 headers and
3390 # libs to find Xmu? That is, must both R6 and R5 directories
3391 # be on the -I and -L lists in that case?
3393 for version in X11R6 X11R5 X11R4 ; do
3394 # if either pair of directories exists...
3395 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3397 # if contrib exists, use it...
3398 if test -d /usr/contrib/$version/lib ; then
3399 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3400 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3402 # if the "standard" one exists, use it.
3403 if test -d /usr/lib/$version ; then
3404 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3405 X_LIBS="$X_LIBS -L/usr/lib/$version"
3407 # since at least one of the pair exists, go no farther.
3412 # Now find Motif. Thanks for not making xmkmf find this by
3413 # default, you losers.
3415 if test -d /usr/lib/Motif1.2 ; then
3416 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3417 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3418 elif test -d /usr/lib/Motif1.1 ; then
3419 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3420 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3423 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3425 if test -d /opt/Mesa/lib ; then
3426 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3427 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3430 if test -d /opt/xpm/lib/X11 ; then
3431 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3432 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3435 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3436 # in /usr/local/, unless there is already an xscreensaver in
3437 # /usr/local/bin/. This can be overridden with the --prefix arg
3438 # to configure. I'm not sure this is the right thing to do, but
3439 # Richard Lloyd says so...
3441 if test \! -x /usr/local/bin/xscreensaver ; then
3442 ac_default_prefix=/opt/xscreensaver
3448 # Thanks for not making xmkmf find this by default, pinheads.
3449 # And thanks for moving things around again, too. Is this
3450 # really the standard location now? What happened to the
3451 # joke that this kind of thing went in /opt?
3452 # cthomp says "answer: CDE (Common Disorganized Environment)"
3454 if test -f /usr/dt/include/Xm/Xm.h ; then
3455 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3456 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3458 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3459 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3460 echo "configure:3472: checking for regcmp in -lgen" >&5
3461 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3462 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3463 echo $ac_n "(cached) $ac_c" 1>&6
3465 ac_save_LIBS="$LIBS"
3467 cat > conftest.$ac_ext <<EOF
3468 #line 3480 "configure"
3469 #include "confdefs.h"
3470 /* Override any gcc2 internal prototype to avoid an error. */
3471 /* We use char because int might match the return type of a gcc2
3472 builtin and then its argument prototype would still apply. */
3479 if { (eval echo configure:3491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3481 eval "ac_cv_lib_$ac_lib_var=yes"
3483 echo "configure: failed program was:" >&5
3484 cat conftest.$ac_ext >&5
3486 eval "ac_cv_lib_$ac_lib_var=no"
3489 LIBS="$ac_save_LIBS"
3492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3493 echo "$ac_t""yes" 1>&6
3494 X_LIBS="$X_LIBS -lgen"
3496 echo "$ac_t""no" 1>&6
3502 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3503 echo "configure:3515: checking for XPointer" >&5
3504 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3505 echo $ac_n "(cached) $ac_c" 1>&6
3508 ac_save_CPPFLAGS="$CPPFLAGS"
3509 if test \! -z "$includedir" ; then
3510 CPPFLAGS="$CPPFLAGS -I$includedir"
3512 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3513 cat > conftest.$ac_ext <<EOF
3514 #line 3526 "configure"
3515 #include "confdefs.h"
3516 #include <X11/Xlib.h>
3518 XPointer foo = (XPointer) 0;
3521 if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3525 echo "configure: failed program was:" >&5
3526 cat conftest.$ac_ext >&5
3531 CPPFLAGS="$ac_save_CPPFLAGS"
3534 echo "$ac_t""$ac_cv_xpointer" 1>&6
3535 if test "$ac_cv_xpointer" != yes; then
3536 cat >> confdefs.h <<\EOF
3537 #define XPointer char*
3544 ###############################################################################
3546 # Check for -lXmu (some fucked up vendors don't ship it...)
3548 ###############################################################################
3552 ac_save_CPPFLAGS="$CPPFLAGS"
3553 if test \! -z "$includedir" ; then
3554 CPPFLAGS="$CPPFLAGS -I$includedir"
3556 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3557 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3558 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3559 echo "configure:3571: checking for X11/Xmu/Error.h" >&5
3560 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3561 echo $ac_n "(cached) $ac_c" 1>&6
3563 cat > conftest.$ac_ext <<EOF
3564 #line 3576 "configure"
3565 #include "confdefs.h"
3566 #include <X11/Xmu/Error.h>
3568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3569 { (eval echo configure:3581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3571 if test -z "$ac_err"; then
3573 eval "ac_cv_header_$ac_safe=yes"
3576 echo "configure: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3579 eval "ac_cv_header_$ac_safe=no"
3583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3584 echo "$ac_t""yes" 1>&6
3587 echo "$ac_t""no" 1>&6
3590 CPPFLAGS="$ac_save_CPPFLAGS"
3591 if test "$have_xmu" = no ; then
3592 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3593 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3597 SAVER_LIBS="-lXmu $SAVER_LIBS"
3598 HACK_LIBS="-lXmu $HACK_LIBS"
3599 MOTIF_LIBS="-lXmu $MOTIF_LIBS"
3600 GTK_LIBS="-lXmu $GTK_LIBS"
3601 cat >> confdefs.h <<\EOF
3608 ###############################################################################
3610 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3611 # See comp.windows.x FAQ question 124. The right fix is to
3612 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3614 ###############################################################################
3616 if test "$have_xmu" = yes ; then
3619 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3620 echo "configure:3632: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3621 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3622 echo $ac_n "(cached) $ac_c" 1>&6
3624 ac_save_LDFLAGS="$LDFLAGS"
3625 if test \! -z "$x_libraries" ; then
3626 LDFLAGS="$LDFLAGS -L$x_libraries"
3628 # Note: this trick never works! (Generally.)
3629 # We're only getting away with using AC_TRY_LINK
3630 # with X libraries because we know it's SunOS.
3631 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3632 cat > conftest.$ac_ext <<EOF
3633 #line 3645 "configure"
3634 #include "confdefs.h"
3640 if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3642 ac_cv_sunos_xmu_bug=no
3644 echo "configure: failed program was:" >&5
3645 cat conftest.$ac_ext >&5
3647 ac_cv_sunos_xmu_bug=yes
3650 LDFLAGS="$ac_save_LDFLAGS"
3653 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3654 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3655 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3656 echo "configure:3668: checking whether the compiler understands -static" >&5
3657 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3658 echo $ac_n "(cached) $ac_c" 1>&6
3660 ac_save_LDFLAGS="$LDFLAGS"
3661 LDFLAGS="$LDFLAGS -static"
3662 cat > conftest.$ac_ext <<EOF
3663 #line 3675 "configure"
3664 #include "confdefs.h"
3670 if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3674 echo "configure: failed program was:" >&5
3675 cat conftest.$ac_ext >&5
3680 LDFLAGS="$ac_save_LDFLAGS"
3683 echo "$ac_t""$ac_cv_ld_static" 1>&6
3684 if test "$ac_cv_ld_static" = yes ; then
3685 LDFLAGS="$LDFLAGS -static"
3687 LDFLAGS="$LDFLAGS -Bstatic"
3695 ###############################################################################
3697 # Handle the --enable-subdir option
3699 ###############################################################################
3701 # Check whether --enable-subdir or --disable-subdir was given.
3702 if test "${enable_subdir+set}" = set; then
3703 enableval="$enable_subdir"
3704 enable_subdir="$enableval"
3709 if test x"$enable_subdir" = xno; then
3711 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
3712 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
3715 # there must be a better way than this...
3716 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
3718 HACKDIR=$enable_subdir
3721 HACKDIR='${bindir}/'$enable_subdir
3725 # canonicalize slashes.
3726 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3729 ###############################################################################
3731 # Check for the SGI SCREEN_SAVER server extension.
3733 ###############################################################################
3736 with_sgi_req=unspecified
3737 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3738 if test "${with_sgi_ext+set}" = set; then
3739 withval="$with_sgi_ext"
3740 with_sgi="$withval"; with_sgi_req="$withval"
3752 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3753 echo "configure:3765: checking for SGI SCREEN_SAVER headers" >&5
3756 X_CFLAGS="-I$d $X_CFLAGS"
3757 echo "$ac_t""$d" 1>&6
3759 echo "$ac_t""not found ($d: no such directory)" 1>&6
3762 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3763 echo "configure:3775: checking for SGI SCREEN_SAVER libs" >&5
3766 X_LIBS="-L$d $X_LIBS"
3767 echo "$ac_t""$d" 1>&6
3769 echo "$ac_t""not found ($d: no such directory)" 1>&6
3772 # replace the directory string with "yes".
3774 with_sgi=$with_sgi_req
3779 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3780 echo " If it is a directory, then \`DIR/include' will be added to"
3781 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3787 if test "$with_sgi" = yes; then
3789 ac_save_CPPFLAGS="$CPPFLAGS"
3790 if test \! -z "$includedir" ; then
3791 CPPFLAGS="$CPPFLAGS -I$includedir"
3793 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3794 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3795 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3796 echo "configure:3808: checking for X11/extensions/XScreenSaver.h" >&5
3797 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3798 echo $ac_n "(cached) $ac_c" 1>&6
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3813 "configure"
3802 #include "confdefs.h"
3803 #include <X11/extensions/XScreenSaver.h>
3805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3806 { (eval echo configure:3818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3808 if test -z "$ac_err"; then
3810 eval "ac_cv_header_$ac_safe=yes"
3813 echo "configure: failed program was:" >&5
3814 cat conftest.$ac_ext >&5
3816 eval "ac_cv_header_$ac_safe=no"
3820 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3821 echo "$ac_t""yes" 1>&6
3823 cat >> confdefs.h <<\EOF
3824 #define HAVE_SGI_SAVER_EXTENSION 1
3828 echo "$ac_t""no" 1>&6
3831 CPPFLAGS="$ac_save_CPPFLAGS"
3833 elif test "$with_sgi" != no; then
3834 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3839 ###############################################################################
3841 # Check for the MIT-SCREEN-SAVER server extension.
3843 ###############################################################################
3846 with_mit_req=unspecified
3847 # Check whether --with-mit-ext or --without-mit-ext was given.
3848 if test "${with_mit_ext+set}" = set; then
3849 withval="$with_mit_ext"
3850 with_mit="$withval"; with_mit_req="$withval"
3862 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3863 echo "configure:3875: checking for MIT-SCREEN-SAVER headers" >&5
3866 X_CFLAGS="-I$d $X_CFLAGS"
3867 echo "$ac_t""$d" 1>&6
3869 echo "$ac_t""not found ($d: no such directory)" 1>&6
3872 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3873 echo "configure:3885: checking for MIT-SCREEN-SAVER libs" >&5
3876 X_LIBS="-L$d $X_LIBS"
3877 echo "$ac_t""$d" 1>&6
3879 echo "$ac_t""not found ($d: no such directory)" 1>&6
3882 # replace the directory string with "yes".
3884 with_mit=$with_mit_req
3889 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3890 echo " If it is a directory, then \`DIR/include' will be added to"
3891 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3897 if test "$with_mit" = yes; then
3899 ac_save_CPPFLAGS="$CPPFLAGS"
3900 if test \! -z "$includedir" ; then
3901 CPPFLAGS="$CPPFLAGS -I$includedir"
3903 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3904 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3905 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3906 echo "configure:3918: checking for X11/extensions/scrnsaver.h" >&5
3907 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3908 echo $ac_n "(cached) $ac_c" 1>&6
3910 cat > conftest.$ac_ext <<EOF
3911 #line 3923 "configure"
3912 #include "confdefs.h"
3913 #include <X11/extensions/scrnsaver.h>
3915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3916 { (eval echo configure:3928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3918 if test -z "$ac_err"; then
3920 eval "ac_cv_header_$ac_safe=yes"
3923 echo "configure: failed program was:" >&5
3924 cat conftest.$ac_ext >&5
3926 eval "ac_cv_header_$ac_safe=no"
3930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3931 echo "$ac_t""yes" 1>&6
3934 echo "$ac_t""no" 1>&6
3937 CPPFLAGS="$ac_save_CPPFLAGS"
3939 # Now check to see if it's really in the library; XF86Free-3.3 ships
3940 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3942 if test "$have_mit" = yes; then
3944 ac_save_CPPFLAGS="$CPPFLAGS"
3945 ac_save_LDFLAGS="$LDFLAGS"
3946 # ac_save_LIBS="$LIBS"
3948 if test \! -z "$includedir" ; then
3949 CPPFLAGS="$CPPFLAGS -I$includedir"
3951 # note: $X_CFLAGS includes $x_includes
3952 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3954 if test \! -z "$libdir" ; then
3955 LDFLAGS="$LDFLAGS -L$libdir"
3957 # note: $X_LIBS includes $x_libraries
3958 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3960 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3961 echo "configure:3973: checking for XScreenSaverRegister in -lXext" >&5
3962 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3963 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3964 echo $ac_n "(cached) $ac_c" 1>&6
3966 ac_save_LIBS="$LIBS"
3967 LIBS="-lXext -lm $LIBS"
3968 cat > conftest.$ac_ext <<EOF
3969 #line 3981 "configure"
3970 #include "confdefs.h"
3971 /* Override any gcc2 internal prototype to avoid an error. */
3972 /* We use char because int might match the return type of a gcc2
3973 builtin and then its argument prototype would still apply. */
3974 char XScreenSaverRegister();
3977 XScreenSaverRegister()
3980 if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3982 eval "ac_cv_lib_$ac_lib_var=yes"
3984 echo "configure: failed program was:" >&5
3985 cat conftest.$ac_ext >&5
3987 eval "ac_cv_lib_$ac_lib_var=no"
3990 LIBS="$ac_save_LIBS"
3993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3994 echo "$ac_t""yes" 1>&6
3997 echo "$ac_t""no" 1>&6
4001 CPPFLAGS="$ac_save_CPPFLAGS"
4002 LDFLAGS="$ac_save_LDFLAGS"
4003 # LIBS="$ac_save_LIBS"
4006 if test "$have_mit" = no; then
4007 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
4008 # of in Xext. Thank you master, may I have another.
4010 ac_save_CPPFLAGS="$CPPFLAGS"
4011 ac_save_LDFLAGS="$LDFLAGS"
4012 # ac_save_LIBS="$LIBS"
4014 if test \! -z "$includedir" ; then
4015 CPPFLAGS="$CPPFLAGS -I$includedir"
4017 # note: $X_CFLAGS includes $x_includes
4018 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4020 if test \! -z "$libdir" ; then
4021 LDFLAGS="$LDFLAGS -L$libdir"
4023 # note: $X_LIBS includes $x_libraries
4024 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4026 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
4027 echo "configure:4039: checking for XScreenSaverRegister in -lXExExt" >&5
4028 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4029 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4030 echo $ac_n "(cached) $ac_c" 1>&6
4032 ac_save_LIBS="$LIBS"
4033 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
4034 cat > conftest.$ac_ext <<EOF
4035 #line 4047 "configure"
4036 #include "confdefs.h"
4037 /* Override any gcc2 internal prototype to avoid an error. */
4038 /* We use char because int might match the return type of a gcc2
4039 builtin and then its argument prototype would still apply. */
4040 char XScreenSaverRegister();
4043 XScreenSaverRegister()
4046 if { (eval echo configure:4058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4048 eval "ac_cv_lib_$ac_lib_var=yes"
4050 echo "configure: failed program was:" >&5
4051 cat conftest.$ac_ext >&5
4053 eval "ac_cv_lib_$ac_lib_var=no"
4056 LIBS="$ac_save_LIBS"
4059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4060 echo "$ac_t""yes" 1>&6
4061 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
4063 echo "$ac_t""no" 1>&6
4067 CPPFLAGS="$ac_save_CPPFLAGS"
4068 LDFLAGS="$ac_save_LDFLAGS"
4069 # LIBS="$ac_save_LIBS"
4073 if test "$have_mit" = no; then
4074 # Double fuck! Looks like some versions of XFree86 (whichever version
4075 # it is that comes with RedHat Linux 2.0 -- I can't find a version
4076 # number) put this garbage in Xss instead of Xext. Thank you master,
4077 # may I have another.
4079 ac_save_CPPFLAGS="$CPPFLAGS"
4080 ac_save_LDFLAGS="$LDFLAGS"
4081 # ac_save_LIBS="$LIBS"
4083 if test \! -z "$includedir" ; then
4084 CPPFLAGS="$CPPFLAGS -I$includedir"
4086 # note: $X_CFLAGS includes $x_includes
4087 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4089 if test \! -z "$libdir" ; then
4090 LDFLAGS="$LDFLAGS -L$libdir"
4092 # note: $X_LIBS includes $x_libraries
4093 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4095 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4096 echo "configure:4108: checking for XScreenSaverRegister in -lXss" >&5
4097 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4098 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4099 echo $ac_n "(cached) $ac_c" 1>&6
4101 ac_save_LIBS="$LIBS"
4102 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4103 cat > conftest.$ac_ext <<EOF
4104 #line 4116 "configure"
4105 #include "confdefs.h"
4106 /* Override any gcc2 internal prototype to avoid an error. */
4107 /* We use char because int might match the return type of a gcc2
4108 builtin and then its argument prototype would still apply. */
4109 char XScreenSaverRegister();
4112 XScreenSaverRegister()
4115 if { (eval echo configure:4127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4117 eval "ac_cv_lib_$ac_lib_var=yes"
4119 echo "configure: failed program was:" >&5
4120 cat conftest.$ac_ext >&5
4122 eval "ac_cv_lib_$ac_lib_var=no"
4125 LIBS="$ac_save_LIBS"
4128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4129 echo "$ac_t""yes" 1>&6
4130 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4132 echo "$ac_t""no" 1>&6
4136 CPPFLAGS="$ac_save_CPPFLAGS"
4137 LDFLAGS="$ac_save_LDFLAGS"
4138 # LIBS="$ac_save_LIBS"
4142 if test "$have_mit" = yes; then
4143 cat >> confdefs.h <<\EOF
4144 #define HAVE_MIT_SAVER_EXTENSION 1
4151 elif test "$with_mit" != no; then
4152 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4157 ###############################################################################
4159 # Check for the XIDLE server extension.
4161 ###############################################################################
4164 with_xidle_req=unspecified
4165 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4166 if test "${with_xidle_ext+set}" = set; then
4167 withval="$with_xidle_ext"
4168 with_xidle="$withval"; with_xidle_req="$withval"
4175 case "$with_xidle" in
4180 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4181 echo "configure:4193: checking for XIDLE headers" >&5
4182 d=$with_xidle/include
4184 X_CFLAGS="-I$d $X_CFLAGS"
4185 echo "$ac_t""$d" 1>&6
4187 echo "$ac_t""not found ($d: no such directory)" 1>&6
4190 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4191 echo "configure:4203: checking for XIDLE libs" >&5
4194 X_LIBS="-L$d $X_LIBS"
4195 echo "$ac_t""$d" 1>&6
4197 echo "$ac_t""not found ($d: no such directory)" 1>&6
4200 # replace the directory string with "yes".
4201 with_xidle_req="yes"
4202 with_xidle=$with_xidle_req
4207 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4208 echo " If it is a directory, then \`DIR/include' will be added to"
4209 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4215 if test "$with_xidle" = yes; then
4217 ac_save_CPPFLAGS="$CPPFLAGS"
4218 if test \! -z "$includedir" ; then
4219 CPPFLAGS="$CPPFLAGS -I$includedir"
4221 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4222 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4223 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4224 echo "configure:4236: checking for X11/extensions/xidle.h" >&5
4225 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4226 echo $ac_n "(cached) $ac_c" 1>&6
4228 cat > conftest.$ac_ext <<EOF
4229 #line 4241 "configure"
4230 #include "confdefs.h"
4231 #include <X11/extensions/xidle.h>
4233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4234 { (eval echo configure:4246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4236 if test -z "$ac_err"; then
4238 eval "ac_cv_header_$ac_safe=yes"
4241 echo "configure: failed program was:" >&5
4242 cat conftest.$ac_ext >&5
4244 eval "ac_cv_header_$ac_safe=no"
4248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4249 echo "$ac_t""yes" 1>&6
4251 cat >> confdefs.h <<\EOF
4252 #define HAVE_XIDLE_EXTENSION 1
4256 echo "$ac_t""no" 1>&6
4259 CPPFLAGS="$ac_save_CPPFLAGS"
4260 elif test "$with_xidle" != no; then
4261 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4266 ###############################################################################
4268 # Check for the SGI-VIDEO-CONTROL server extension.
4270 ###############################################################################
4273 with_sgivc_req=unspecified
4274 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4275 if test "${with_sgivc_ext+set}" = set; then
4276 withval="$with_sgivc_ext"
4277 with_sgivc="$withval"; with_sgivc_req="$withval"
4284 case "$with_sgivc" in
4289 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4290 echo "configure:4302: checking for SGI-VIDEO-CONTROL headers" >&5
4291 d=$with_sgivc/include
4293 X_CFLAGS="-I$d $X_CFLAGS"
4294 echo "$ac_t""$d" 1>&6
4296 echo "$ac_t""not found ($d: no such directory)" 1>&6
4299 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4300 echo "configure:4312: checking for SGI-VIDEO-CONTROL libs" >&5
4303 X_LIBS="-L$d $X_LIBS"
4304 echo "$ac_t""$d" 1>&6
4306 echo "$ac_t""not found ($d: no such directory)" 1>&6
4309 # replace the directory string with "yes".
4310 with_sgivc_req="yes"
4311 with_sgivc=$with_sgivc_req
4316 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4317 echo " If it is a directory, then \`DIR/include' will be added to"
4318 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4324 if test "$with_sgivc" = yes; then
4326 # first check for XSGIvc.h
4328 ac_save_CPPFLAGS="$CPPFLAGS"
4329 if test \! -z "$includedir" ; then
4330 CPPFLAGS="$CPPFLAGS -I$includedir"
4332 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4333 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4334 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4335 echo "configure:4347: checking for X11/extensions/XSGIvc.h" >&5
4336 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4337 echo $ac_n "(cached) $ac_c" 1>&6
4339 cat > conftest.$ac_ext <<EOF
4340 #line 4352 "configure"
4341 #include "confdefs.h"
4342 #include <X11/extensions/XSGIvc.h>
4344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4345 { (eval echo configure:4357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4347 if test -z "$ac_err"; then
4349 eval "ac_cv_header_$ac_safe=yes"
4352 echo "configure: failed program was:" >&5
4353 cat conftest.$ac_ext >&5
4355 eval "ac_cv_header_$ac_safe=no"
4359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4360 echo "$ac_t""yes" 1>&6
4363 echo "$ac_t""no" 1>&6
4366 CPPFLAGS="$ac_save_CPPFLAGS"
4368 # if that succeeded, then check for the -lXsgivc
4369 if test "$have_sgivc" = yes; then
4372 ac_save_CPPFLAGS="$CPPFLAGS"
4373 ac_save_LDFLAGS="$LDFLAGS"
4374 # ac_save_LIBS="$LIBS"
4376 if test \! -z "$includedir" ; then
4377 CPPFLAGS="$CPPFLAGS -I$includedir"
4379 # note: $X_CFLAGS includes $x_includes
4380 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4382 if test \! -z "$libdir" ; then
4383 LDFLAGS="$LDFLAGS -L$libdir"
4385 # note: $X_LIBS includes $x_libraries
4386 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4388 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4389 echo "configure:4401: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4390 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4391 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4392 echo $ac_n "(cached) $ac_c" 1>&6
4394 ac_save_LIBS="$LIBS"
4395 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4396 cat > conftest.$ac_ext <<EOF
4397 #line 4409 "configure"
4398 #include "confdefs.h"
4399 /* Override any gcc2 internal prototype to avoid an error. */
4400 /* We use char because int might match the return type of a gcc2
4401 builtin and then its argument prototype would still apply. */
4402 char XSGIvcQueryGammaMap();
4405 XSGIvcQueryGammaMap()
4408 if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4410 eval "ac_cv_lib_$ac_lib_var=yes"
4412 echo "configure: failed program was:" >&5
4413 cat conftest.$ac_ext >&5
4415 eval "ac_cv_lib_$ac_lib_var=no"
4418 LIBS="$ac_save_LIBS"
4421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4422 echo "$ac_t""yes" 1>&6
4423 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4425 echo "$ac_t""no" 1>&6
4429 CPPFLAGS="$ac_save_CPPFLAGS"
4430 LDFLAGS="$ac_save_LDFLAGS"
4431 # LIBS="$ac_save_LIBS"
4435 # if that succeeded, then we've really got it.
4436 if test "$have_sgivc" = yes; then
4437 cat >> confdefs.h <<\EOF
4438 #define HAVE_SGI_VC_EXTENSION 1
4443 elif test "$with_sgivc" != no; then
4444 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4449 ###############################################################################
4451 # Check for the DPMS server extension.
4453 ###############################################################################
4456 with_dpms_req=unspecified
4457 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4458 if test "${with_dpms_ext+set}" = set; then
4459 withval="$with_dpms_ext"
4460 with_dpms="$withval"; with_dpms_req="$withval"
4467 case "$with_dpms" in
4472 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4473 echo "configure:4485: checking for DPMS headers" >&5
4474 d=$with_dpms/include
4476 X_CFLAGS="-I$d $X_CFLAGS"
4477 echo "$ac_t""$d" 1>&6
4479 echo "$ac_t""not found ($d: no such directory)" 1>&6
4482 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4483 echo "configure:4495: checking for DPMS libs" >&5
4486 X_LIBS="-L$d $X_LIBS"
4487 echo "$ac_t""$d" 1>&6
4489 echo "$ac_t""not found ($d: no such directory)" 1>&6
4492 # replace the directory string with "yes".
4494 with_dpms=$with_dpms_req
4499 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4500 echo " If it is a directory, then \`DIR/include' will be added to"
4501 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4507 if test "$with_dpms" = yes; then
4509 # first check for dpms.h
4511 ac_save_CPPFLAGS="$CPPFLAGS"
4512 if test \! -z "$includedir" ; then
4513 CPPFLAGS="$CPPFLAGS -I$includedir"
4515 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4516 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4517 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4518 echo "configure:4530: checking for X11/extensions/dpms.h" >&5
4519 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4520 echo $ac_n "(cached) $ac_c" 1>&6
4522 cat > conftest.$ac_ext <<EOF
4523 #line 4535 "configure"
4524 #include "confdefs.h"
4525 #include <X11/extensions/dpms.h>
4527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4528 { (eval echo configure:4540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4530 if test -z "$ac_err"; then
4532 eval "ac_cv_header_$ac_safe=yes"
4535 echo "configure: failed program was:" >&5
4536 cat conftest.$ac_ext >&5
4538 eval "ac_cv_header_$ac_safe=no"
4542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4543 echo "$ac_t""yes" 1>&6
4546 echo "$ac_t""no" 1>&6
4549 CPPFLAGS="$ac_save_CPPFLAGS"
4551 # if that succeeded, then check for the DPMS code in the libraries
4552 if test "$have_dpms" = yes; then
4554 # first look in -lXext (this is where it is with XFree86 4.0)
4557 ac_save_CPPFLAGS="$CPPFLAGS"
4558 ac_save_LDFLAGS="$LDFLAGS"
4559 # ac_save_LIBS="$LIBS"
4561 if test \! -z "$includedir" ; then
4562 CPPFLAGS="$CPPFLAGS -I$includedir"
4564 # note: $X_CFLAGS includes $x_includes
4565 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4567 if test \! -z "$libdir" ; then
4568 LDFLAGS="$LDFLAGS -L$libdir"
4570 # note: $X_LIBS includes $x_libraries
4571 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4573 echo $ac_n "checking for DPMSInfo in -lXext""... $ac_c" 1>&6
4574 echo "configure:4586: checking for DPMSInfo in -lXext" >&5
4575 ac_lib_var=`echo Xext'_'DPMSInfo | sed 'y%./+-%__p_%'`
4576 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4577 echo $ac_n "(cached) $ac_c" 1>&6
4579 ac_save_LIBS="$LIBS"
4580 LIBS="-lXext -lXext -lX11 $LIBS"
4581 cat > conftest.$ac_ext <<EOF
4582 #line 4594 "configure"
4583 #include "confdefs.h"
4584 /* Override any gcc2 internal prototype to avoid an error. */
4585 /* We use char because int might match the return type of a gcc2
4586 builtin and then its argument prototype would still apply. */
4593 if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4595 eval "ac_cv_lib_$ac_lib_var=yes"
4597 echo "configure: failed program was:" >&5
4598 cat conftest.$ac_ext >&5
4600 eval "ac_cv_lib_$ac_lib_var=no"
4603 LIBS="$ac_save_LIBS"
4606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4607 echo "$ac_t""yes" 1>&6
4610 echo "$ac_t""no" 1>&6
4614 CPPFLAGS="$ac_save_CPPFLAGS"
4615 LDFLAGS="$ac_save_LDFLAGS"
4616 # LIBS="$ac_save_LIBS"
4619 # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
4620 if test "$have_dpms" = no; then
4622 ac_save_CPPFLAGS="$CPPFLAGS"
4623 ac_save_LDFLAGS="$LDFLAGS"
4624 # ac_save_LIBS="$LIBS"
4626 if test \! -z "$includedir" ; then
4627 CPPFLAGS="$CPPFLAGS -I$includedir"
4629 # note: $X_CFLAGS includes $x_includes
4630 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4632 if test \! -z "$libdir" ; then
4633 LDFLAGS="$LDFLAGS -L$libdir"
4635 # note: $X_LIBS includes $x_libraries
4636 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4638 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4639 echo "configure:4651: checking for DPMSInfo in -lXdpms" >&5
4640 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4641 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4642 echo $ac_n "(cached) $ac_c" 1>&6
4644 ac_save_LIBS="$LIBS"
4645 LIBS="-lXdpms -lXext -lX11 $LIBS"
4646 cat > conftest.$ac_ext <<EOF
4647 #line 4659 "configure"
4648 #include "confdefs.h"
4649 /* Override any gcc2 internal prototype to avoid an error. */
4650 /* We use char because int might match the return type of a gcc2
4651 builtin and then its argument prototype would still apply. */
4658 if { (eval echo configure:4670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4660 eval "ac_cv_lib_$ac_lib_var=yes"
4662 echo "configure: failed program was:" >&5
4663 cat conftest.$ac_ext >&5
4665 eval "ac_cv_lib_$ac_lib_var=no"
4668 LIBS="$ac_save_LIBS"
4671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4672 echo "$ac_t""yes" 1>&6
4673 have_dpms=yes; XDPMS_LIBS="-lXdpms"
4675 echo "$ac_t""no" 1>&6
4679 CPPFLAGS="$ac_save_CPPFLAGS"
4680 LDFLAGS="$ac_save_LDFLAGS"
4681 # LIBS="$ac_save_LIBS"
4687 # if that succeeded, then we've really got it.
4688 if test "$have_dpms" = yes; then
4689 cat >> confdefs.h <<\EOF
4690 #define HAVE_DPMS_EXTENSION 1
4695 elif test "$with_dpms" != no; then
4696 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4701 ###############################################################################
4703 # Check for the XF86VMODE server extension.
4705 ###############################################################################
4708 with_xf86vmode_req=unspecified
4709 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4710 if test "${with_xf86vmode_ext+set}" = set; then
4711 withval="$with_xf86vmode_ext"
4712 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4719 case "$with_xf86vmode" in
4724 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4725 echo "configure:4737: checking for xf86vmode headers" >&5
4726 d=$with_xf86vmode/include
4728 X_CFLAGS="-I$d $X_CFLAGS"
4729 echo "$ac_t""$d" 1>&6
4731 echo "$ac_t""not found ($d: no such directory)" 1>&6
4734 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4735 echo "configure:4747: checking for xf86vmode libs" >&5
4736 d=$with_xf86vmode/lib
4738 X_LIBS="-L$d $X_LIBS"
4739 echo "$ac_t""$d" 1>&6
4741 echo "$ac_t""not found ($d: no such directory)" 1>&6
4744 # replace the directory string with "yes".
4745 with_xf86vmode_req="yes"
4746 with_xf86vmode=$with_xf86vmode_req
4751 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4752 echo " If it is a directory, then \`DIR/include' will be added to"
4753 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4759 if test "$with_xf86vmode" = yes; then
4761 # first check for xf86vmode.h
4763 ac_save_CPPFLAGS="$CPPFLAGS"
4764 if test \! -z "$includedir" ; then
4765 CPPFLAGS="$CPPFLAGS -I$includedir"
4767 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4768 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4769 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4770 echo "configure:4782: checking for X11/extensions/xf86vmode.h" >&5
4771 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4772 echo $ac_n "(cached) $ac_c" 1>&6
4774 cat > conftest.$ac_ext <<EOF
4775 #line 4787 "configure"
4776 #include "confdefs.h"
4777 #include <X11/extensions/xf86vmode.h>
4779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4780 { (eval echo configure:4792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4782 if test -z "$ac_err"; then
4784 eval "ac_cv_header_$ac_safe=yes"
4787 echo "configure: failed program was:" >&5
4788 cat conftest.$ac_ext >&5
4790 eval "ac_cv_header_$ac_safe=no"
4794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4795 echo "$ac_t""yes" 1>&6
4798 echo "$ac_t""no" 1>&6
4801 CPPFLAGS="$ac_save_CPPFLAGS"
4803 # if that succeeded, then check for the -lXxf86vm
4804 if test "$have_xf86vmode" = yes; then
4807 ac_save_CPPFLAGS="$CPPFLAGS"
4808 ac_save_LDFLAGS="$LDFLAGS"
4809 # ac_save_LIBS="$LIBS"
4811 if test \! -z "$includedir" ; then
4812 CPPFLAGS="$CPPFLAGS -I$includedir"
4814 # note: $X_CFLAGS includes $x_includes
4815 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4817 if test \! -z "$libdir" ; then
4818 LDFLAGS="$LDFLAGS -L$libdir"
4820 # note: $X_LIBS includes $x_libraries
4821 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4823 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4824 echo "configure:4836: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4825 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4826 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4827 echo $ac_n "(cached) $ac_c" 1>&6
4829 ac_save_LIBS="$LIBS"
4830 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4831 cat > conftest.$ac_ext <<EOF
4832 #line 4844 "configure"
4833 #include "confdefs.h"
4834 /* Override any gcc2 internal prototype to avoid an error. */
4835 /* We use char because int might match the return type of a gcc2
4836 builtin and then its argument prototype would still apply. */
4837 char XF86VidModeGetViewPort();
4840 XF86VidModeGetViewPort()
4843 if { (eval echo configure:4855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4845 eval "ac_cv_lib_$ac_lib_var=yes"
4847 echo "configure: failed program was:" >&5
4848 cat conftest.$ac_ext >&5
4850 eval "ac_cv_lib_$ac_lib_var=no"
4853 LIBS="$ac_save_LIBS"
4856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4857 echo "$ac_t""yes" 1>&6
4858 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4860 echo "$ac_t""no" 1>&6
4864 CPPFLAGS="$ac_save_CPPFLAGS"
4865 LDFLAGS="$ac_save_LDFLAGS"
4866 # LIBS="$ac_save_LIBS"
4870 # if that succeeded, then we've really got it.
4871 if test "$have_xf86vmode" = yes; then
4872 cat >> confdefs.h <<\EOF
4873 #define HAVE_XF86VMODE 1
4878 elif test "$with_xf86vmode" != no; then
4879 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4884 ###############################################################################
4886 # Check for HP XHPDisableReset and XHPEnableReset.
4888 ###############################################################################
4891 ac_save_CPPFLAGS="$CPPFLAGS"
4892 if test \! -z "$includedir" ; then
4893 CPPFLAGS="$CPPFLAGS -I$includedir"
4895 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4896 cat > conftest.$ac_ext <<EOF
4897 #line 4909 "configure"
4898 #include "confdefs.h"
4899 #include <X11/XHPlib.h>
4901 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4902 egrep "XHPDisableReset" >/dev/null 2>&1; then
4904 cat >> confdefs.h <<\EOF
4905 #define HAVE_XHPDISABLERESET 1
4908 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
4912 CPPFLAGS="$ac_save_CPPFLAGS"
4915 ###############################################################################
4917 # Check for /proc/interrupts.
4919 ###############################################################################
4921 have_proc_interrupts=no
4922 with_proc_interrupts_req=unspecified
4923 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4924 if test "${with_proc_interrupts+set}" = set; then
4925 withval="$with_proc_interrupts"
4926 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4928 with_proc_interrupts=yes
4932 if test "$with_proc_interrupts" = yes; then
4934 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4935 echo "configure:4947: checking whether /proc/interrupts contains keyboard data" >&5
4936 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4937 echo $ac_n "(cached) $ac_c" 1>&6
4939 ac_cv_have_proc_interrupts=no
4940 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4941 ac_cv_have_proc_interrupts=yes
4946 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
4947 have_proc_interrupts=$ac_cv_have_proc_interrupts
4949 if test "$have_proc_interrupts" = yes; then
4950 cat >> confdefs.h <<\EOF
4951 #define HAVE_PROC_INTERRUPTS 1
4956 elif test "$with_proc_interrupts" != no; then
4957 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
4962 ###############################################################################
4964 # The --enable-locking option
4966 ###############################################################################
4968 # Check whether --enable-locking or --disable-locking was given.
4969 if test "${enable_locking+set}" = set; then
4970 enableval="$enable_locking"
4971 enable_locking="$enableval"
4976 if test "$enable_locking" = yes; then
4978 elif test "$enable_locking" = no; then
4979 cat >> confdefs.h <<\EOF
4980 #define NO_LOCKING 1
4984 echo "error: must be yes or no: --enable-locking=$enable_locking"
4990 ###############################################################################
4992 # The --enable-vt-locking option
4994 ###############################################################################
4996 #ac_vt_lockswitch=no
4997 #AC_ARG_ENABLE(vt-locking,[
4998 # --enable-vt-locking Compile in support for locking Virtual Terminals.
4999 # This is the default if the system supports it, and
5000 # if locking support is included (--enable-locking.)
5001 # --disable-vt-locking Do not allow locking of VTs, even if locking is
5003 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
5004 #if test "$enable_vt_locking" = yes; then
5006 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
5007 # [AC_TRY_COMPILE([#include <fcntl.h>
5008 # #include <sys/ioctl.h>
5009 # #include <sys/vt.h>],
5010 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
5011 # [ac_cv_vt_lockswitch=yes],
5012 # [ac_cv_vt_lockswitch=no])])
5013 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
5015 #elif test "$enable_vt_locking" = no; then
5018 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
5022 #if test "$ac_vt_lockswitch" = yes; then
5023 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
5024 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
5025 # # #### but it doesn't work yet, so don't worry about that for now.
5031 ###############################################################################
5035 ###############################################################################
5039 # Solaris systems tend to come with PAM misconfigured.
5040 # Don't build it by default, even if the headers exist.
5044 # Default to building PAM support on all other systems, if it exists.
5045 with_pam_default=yes
5050 with_pam_req=unspecified
5052 # Check whether --with-pam or --without-pam was given.
5053 if test "${with_pam+set}" = set; then
5055 with_pam="$withval"; with_pam_req="$withval"
5057 with_pam=$with_pam_default
5067 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
5068 echo "configure:5080: checking for PAM headers" >&5
5071 X_CFLAGS="-I$d $X_CFLAGS"
5072 echo "$ac_t""$d" 1>&6
5074 echo "$ac_t""not found ($d: no such directory)" 1>&6
5077 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
5078 echo "configure:5090: checking for PAM libs" >&5
5081 X_LIBS="-L$d $X_LIBS"
5082 echo "$ac_t""$d" 1>&6
5084 echo "$ac_t""not found ($d: no such directory)" 1>&6
5087 # replace the directory string with "yes".
5089 with_pam=$with_pam_req
5094 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
5095 echo " If it is a directory, then \`DIR/include' will be added to"
5096 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5102 if test "$enable_locking" = yes -a "$with_pam" = yes; then
5103 echo $ac_n "checking for PAM""... $ac_c" 1>&6
5104 echo "configure:5116: checking for PAM" >&5
5105 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
5106 echo $ac_n "(cached) $ac_c" 1>&6
5109 ac_save_CPPFLAGS="$CPPFLAGS"
5110 if test \! -z "$includedir" ; then
5111 CPPFLAGS="$CPPFLAGS -I$includedir"
5113 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5114 cat > conftest.$ac_ext <<EOF
5115 #line 5127 "configure"
5116 #include "confdefs.h"
5117 #include <security/pam_appl.h>
5122 if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5126 echo "configure: failed program was:" >&5
5127 cat conftest.$ac_ext >&5
5132 CPPFLAGS="$ac_save_CPPFLAGS"
5135 echo "$ac_t""$ac_cv_pam" 1>&6
5136 if test "$ac_cv_pam" = yes ; then
5138 cat >> confdefs.h <<\EOF
5142 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
5144 # libpam typically requires dlopen and dlsym. On FreeBSD,
5145 # those are in libc. On Linux and Solaris, they're in libdl.
5146 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5147 echo "configure:5159: checking for dlopen in -ldl" >&5
5148 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5149 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5150 echo $ac_n "(cached) $ac_c" 1>&6
5152 ac_save_LIBS="$LIBS"
5154 cat > conftest.$ac_ext <<EOF
5155 #line 5167 "configure"
5156 #include "confdefs.h"
5157 /* Override any gcc2 internal prototype to avoid an error. */
5158 /* We use char because int might match the return type of a gcc2
5159 builtin and then its argument prototype would still apply. */
5166 if { (eval echo configure:5178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5168 eval "ac_cv_lib_$ac_lib_var=yes"
5170 echo "configure: failed program was:" >&5
5171 cat conftest.$ac_ext >&5
5173 eval "ac_cv_lib_$ac_lib_var=no"
5176 LIBS="$ac_save_LIBS"
5179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5180 echo "$ac_t""yes" 1>&6
5181 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5183 echo "$ac_t""no" 1>&6
5187 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5188 echo "configure:5200: checking how to call pam_strerror" >&5
5189 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5190 echo $ac_n "(cached) $ac_c" 1>&6
5192 cat > conftest.$ac_ext <<EOF
5193 #line 5205 "configure"
5194 #include "confdefs.h"
5197 #include <security/pam_appl.h>
5199 pam_handle_t *pamh = 0;
5200 char *s = pam_strerror(pamh, PAM_SUCCESS);
5203 if { (eval echo configure:5215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5205 ac_pam_strerror_args=2
5207 echo "configure: failed program was:" >&5
5208 cat conftest.$ac_ext >&5
5210 cat > conftest.$ac_ext <<EOF
5211 #line 5223 "configure"
5212 #include "confdefs.h"
5215 #include <security/pam_appl.h>
5218 pam_strerror(PAM_SUCCESS);
5221 if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5223 ac_pam_strerror_args=1
5225 echo "configure: failed program was:" >&5
5226 cat conftest.$ac_ext >&5
5228 ac_pam_strerror_args=0
5233 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5236 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5237 if test "$ac_pam_strerror_args" = 1 ; then
5238 echo "$ac_t""one argument" 1>&6
5239 elif test "$ac_pam_strerror_args" = 2 ; then
5240 cat >> confdefs.h <<\EOF
5241 #define PAM_STRERROR_TWO_ARGS 1
5244 echo "$ac_t""two arguments" 1>&6
5246 echo "$ac_t""unknown" 1>&6
5252 ###############################################################################
5254 # Check for Kerberos.
5256 ###############################################################################
5260 with_kerberos_req=unspecified
5262 # Check whether --with-kerberos or --without-kerberos was given.
5263 if test "${with_kerberos+set}" = set; then
5264 withval="$with_kerberos"
5265 with_kerberos="$withval"; with_kerberos_req="$withval"
5272 case "$with_kerberos" in
5277 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5278 echo "configure:5290: checking for Kerberos headers" >&5
5279 d=$with_kerberos/include
5281 X_CFLAGS="-I$d $X_CFLAGS"
5282 echo "$ac_t""$d" 1>&6
5284 echo "$ac_t""not found ($d: no such directory)" 1>&6
5287 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5288 echo "configure:5300: checking for Kerberos libs" >&5
5289 d=$with_kerberos/lib
5291 X_LIBS="-L$d $X_LIBS"
5292 echo "$ac_t""$d" 1>&6
5294 echo "$ac_t""not found ($d: no such directory)" 1>&6
5297 # replace the directory string with "yes".
5298 with_kerberos_req="yes"
5299 with_kerberos=$with_kerberos_req
5304 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5305 echo " If it is a directory, then \`DIR/include' will be added to"
5306 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5312 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5313 echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
5314 echo "configure:5326: checking for Kerberos 4" >&5
5315 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5316 echo $ac_n "(cached) $ac_c" 1>&6
5319 ac_save_CPPFLAGS="$CPPFLAGS"
5320 if test \! -z "$includedir" ; then
5321 CPPFLAGS="$CPPFLAGS -I$includedir"
5323 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5324 cat > conftest.$ac_ext <<EOF
5325 #line 5337 "configure"
5326 #include "confdefs.h"
5332 if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5336 echo "configure: failed program was:" >&5
5337 cat conftest.$ac_ext >&5
5342 CPPFLAGS="$ac_save_CPPFLAGS"
5345 echo "$ac_t""$ac_cv_kerberos" 1>&6
5346 echo $ac_n "checking for Kerberos 5""... $ac_c" 1>&6
5347 echo "configure:5359: checking for Kerberos 5" >&5
5348 if eval "test \"`echo '$''{'ac_cv_kerberos5'+set}'`\" = set"; then
5349 echo $ac_n "(cached) $ac_c" 1>&6
5352 ac_save_CPPFLAGS="$CPPFLAGS"
5353 if test \! -z "$includedir" ; then
5354 CPPFLAGS="$CPPFLAGS -I$includedir"
5356 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5357 cat > conftest.$ac_ext <<EOF
5358 #line 5370 "configure"
5359 #include "confdefs.h"
5360 #include <kerberosIV/krb.h>
5365 if { (eval echo configure:5377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5369 echo "configure: failed program was:" >&5
5370 cat conftest.$ac_ext >&5
5375 CPPFLAGS="$ac_save_CPPFLAGS"
5378 echo "$ac_t""$ac_cv_kerberos5" 1>&6
5380 if test "$ac_cv_kerberos" = yes ; then
5382 cat >> confdefs.h <<\EOF
5383 #define HAVE_KERBEROS 1
5388 if test "$ac_cv_kerberos5" = yes ; then
5391 cat >> confdefs.h <<\EOF
5392 #define HAVE_KERBEROS 1
5395 cat >> confdefs.h <<\EOF
5396 #define HAVE_KERBEROS5 1
5401 if test "$have_kerberos5" = yes ; then
5402 # from Matt Knopp <mhat@infocalypse.netlag.com>
5403 # (who got it from amu@mit.edu)
5404 PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
5405 elif test "$have_kerberos" = yes ; then
5406 # from Tim Showalter <tjs+@andrew.cmu.edu>
5407 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
5410 if test "$have_kerberos" = yes ; then
5411 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5412 echo "configure:5424: checking for res_search" >&5
5413 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5414 echo $ac_n "(cached) $ac_c" 1>&6
5416 cat > conftest.$ac_ext <<EOF
5417 #line 5429 "configure"
5418 #include "confdefs.h"
5419 /* System header to define __stub macros and hopefully few prototypes,
5420 which can conflict with char res_search(); below. */
5422 /* Override any gcc2 internal prototype to avoid an error. */
5423 /* We use char because int might match the return type of a gcc2
5424 builtin and then its argument prototype would still apply. */
5429 /* The GNU C library defines this for functions which it implements
5430 to always fail with ENOSYS. Some functions are actually named
5431 something starting with __ and the normal name is an alias. */
5432 #if defined (__stub_res_search) || defined (__stub___res_search)
5440 if { (eval echo configure:5452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5442 eval "ac_cv_func_res_search=yes"
5444 echo "configure: failed program was:" >&5
5445 cat conftest.$ac_ext >&5
5447 eval "ac_cv_func_res_search=no"
5452 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5453 echo "$ac_t""yes" 1>&6
5456 echo "$ac_t""no" 1>&6
5457 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5458 echo "configure:5470: checking for res_search in -lresolv" >&5
5459 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5460 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5461 echo $ac_n "(cached) $ac_c" 1>&6
5463 ac_save_LIBS="$LIBS"
5464 LIBS="-lresolv $LIBS"
5465 cat > conftest.$ac_ext <<EOF
5466 #line 5478 "configure"
5467 #include "confdefs.h"
5468 /* Override any gcc2 internal prototype to avoid an error. */
5469 /* We use char because int might match the return type of a gcc2
5470 builtin and then its argument prototype would still apply. */
5477 if { (eval echo configure:5489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5479 eval "ac_cv_lib_$ac_lib_var=yes"
5481 echo "configure: failed program was:" >&5
5482 cat conftest.$ac_ext >&5
5484 eval "ac_cv_lib_$ac_lib_var=no"
5487 LIBS="$ac_save_LIBS"
5490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5491 echo "$ac_t""yes" 1>&6
5492 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
5494 echo "$ac_t""no" 1>&6
5495 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
5505 ###############################################################################
5507 # Check for the nine billion variants of shadow passwords...
5509 ###############################################################################
5514 with_shadow_req=unspecified
5516 # Check whether --with-shadow or --without-shadow was given.
5517 if test "${with_shadow+set}" = set; then
5518 withval="$with_shadow"
5519 with_shadow="$withval"; with_shadow_req="$withval"
5526 case "$with_shadow" in
5531 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
5532 echo "configure:5544: checking for shadow password headers" >&5
5533 d=$with_shadow/include
5535 X_CFLAGS="-I$d $X_CFLAGS"
5536 echo "$ac_t""$d" 1>&6
5538 echo "$ac_t""not found ($d: no such directory)" 1>&6
5541 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
5542 echo "configure:5554: checking for shadow password libs" >&5
5545 X_LIBS="-L$d $X_LIBS"
5546 echo "$ac_t""$d" 1>&6
5548 echo "$ac_t""not found ($d: no such directory)" 1>&6
5551 # replace the directory string with "yes".
5552 with_shadow_req="yes"
5553 with_shadow=$with_shadow_req
5558 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
5559 echo " If it is a directory, then \`DIR/include' will be added to"
5560 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5566 if test "$enable_locking" = no ; then
5572 ###############################################################################
5574 # Check for Sun "adjunct" passwords.
5576 ###############################################################################
5578 if test "$with_shadow" = yes ; then
5579 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
5580 echo "configure:5592: checking for Sun-style shadow passwords" >&5
5581 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
5582 echo $ac_n "(cached) $ac_c" 1>&6
5585 ac_save_CPPFLAGS="$CPPFLAGS"
5586 if test \! -z "$includedir" ; then
5587 CPPFLAGS="$CPPFLAGS -I$includedir"
5589 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5590 cat > conftest.$ac_ext <<EOF
5591 #line 5603 "configure"
5592 #include "confdefs.h"
5595 #include <sys/types.h>
5596 #include <sys/label.h>
5597 #include <sys/audit.h>
5600 struct passwd_adjunct *p = getpwanam("nobody");
5601 const char *pw = p->pwa_passwd;
5604 if { (eval echo configure:5616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5606 ac_cv_sun_adjunct=yes
5608 echo "configure: failed program was:" >&5
5609 cat conftest.$ac_ext >&5
5611 ac_cv_sun_adjunct=no
5614 CPPFLAGS="$ac_save_CPPFLAGS"
5617 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
5618 if test "$ac_cv_sun_adjunct" = yes; then
5619 have_shadow_adjunct=yes
5626 ###############################################################################
5628 # Check for DEC and SCO so-called "enhanced" security.
5630 ###############################################################################
5632 if test "$with_shadow" = yes ; then
5633 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
5634 echo "configure:5646: checking for DEC-style shadow passwords" >&5
5635 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
5636 echo $ac_n "(cached) $ac_c" 1>&6
5639 ac_save_CPPFLAGS="$CPPFLAGS"
5640 if test \! -z "$includedir" ; then
5641 CPPFLAGS="$CPPFLAGS -I$includedir"
5643 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5644 cat > conftest.$ac_ext <<EOF
5645 #line 5657 "configure"
5646 #include "confdefs.h"
5649 #include <sys/types.h>
5651 #include <sys/security.h>
5654 struct pr_passwd *p;
5656 set_auth_parameters(0, 0);
5657 check_auth_parameters();
5658 p = getprpwnam("nobody");
5659 pw = p->ufld.fd_encrypt;
5662 if { (eval echo configure:5674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5664 ac_cv_enhanced_passwd=yes
5666 echo "configure: failed program was:" >&5
5667 cat conftest.$ac_ext >&5
5669 ac_cv_enhanced_passwd=no
5672 CPPFLAGS="$ac_save_CPPFLAGS"
5675 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
5676 if test $ac_cv_enhanced_passwd = yes; then
5677 have_shadow_enhanced=yes
5681 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
5682 # (I'm told it needs -lcurses too, but I don't understand why.)
5683 # But on DEC, it's in -lsecurity.
5685 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
5686 echo "configure:5698: checking for getprpwnam in -lprot" >&5
5687 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
5688 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5689 echo $ac_n "(cached) $ac_c" 1>&6
5691 ac_save_LIBS="$LIBS"
5692 LIBS="-lprot -lx $LIBS"
5693 cat > conftest.$ac_ext <<EOF
5694 #line 5706 "configure"
5695 #include "confdefs.h"
5696 /* Override any gcc2 internal prototype to avoid an error. */
5697 /* We use char because int might match the return type of a gcc2
5698 builtin and then its argument prototype would still apply. */
5705 if { (eval echo configure:5717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5707 eval "ac_cv_lib_$ac_lib_var=yes"
5709 echo "configure: failed program was:" >&5
5710 cat conftest.$ac_ext >&5
5712 eval "ac_cv_lib_$ac_lib_var=no"
5715 LIBS="$ac_save_LIBS"
5718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5719 echo "$ac_t""yes" 1>&6
5720 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
5722 echo "$ac_t""no" 1>&6
5723 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
5724 echo "configure:5736: checking for getprpwnam in -lsecurity" >&5
5725 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
5726 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5727 echo $ac_n "(cached) $ac_c" 1>&6
5729 ac_save_LIBS="$LIBS"
5730 LIBS="-lsecurity $LIBS"
5731 cat > conftest.$ac_ext <<EOF
5732 #line 5744 "configure"
5733 #include "confdefs.h"
5734 /* Override any gcc2 internal prototype to avoid an error. */
5735 /* We use char because int might match the return type of a gcc2
5736 builtin and then its argument prototype would still apply. */
5743 if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5745 eval "ac_cv_lib_$ac_lib_var=yes"
5747 echo "configure: failed program was:" >&5
5748 cat conftest.$ac_ext >&5
5750 eval "ac_cv_lib_$ac_lib_var=no"
5753 LIBS="$ac_save_LIBS"
5756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5757 echo "$ac_t""yes" 1>&6
5758 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5760 echo "$ac_t""no" 1>&6
5768 ###############################################################################
5770 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
5772 ###############################################################################
5774 if test "$with_shadow" = yes ; then
5775 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5776 echo "configure:5788: checking for HP-style shadow passwords" >&5
5777 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5778 echo $ac_n "(cached) $ac_c" 1>&6
5781 ac_save_CPPFLAGS="$CPPFLAGS"
5782 if test \! -z "$includedir" ; then
5783 CPPFLAGS="$CPPFLAGS -I$includedir"
5785 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5786 cat > conftest.$ac_ext <<EOF
5787 #line 5799 "configure"
5788 #include "confdefs.h"
5791 #include <sys/types.h>
5793 #include <hpsecurity.h>
5796 struct s_passwd *p = getspwnam("nobody");
5797 const char *pw = p->pw_passwd;
5800 if { (eval echo configure:5812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5802 ac_cv_hpux_passwd=yes
5804 echo "configure: failed program was:" >&5
5805 cat conftest.$ac_ext >&5
5807 ac_cv_hpux_passwd=no
5810 CPPFLAGS="$ac_save_CPPFLAGS"
5813 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
5814 if test "$ac_cv_hpux_passwd" = yes; then
5815 have_shadow_hpux=yes
5819 # on HPUX, bigcrypt is in -lsec
5820 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
5821 echo "configure:5833: checking for bigcrypt in -lsec" >&5
5822 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
5823 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5824 echo $ac_n "(cached) $ac_c" 1>&6
5826 ac_save_LIBS="$LIBS"
5828 cat > conftest.$ac_ext <<EOF
5829 #line 5841 "configure"
5830 #include "confdefs.h"
5831 /* Override any gcc2 internal prototype to avoid an error. */
5832 /* We use char because int might match the return type of a gcc2
5833 builtin and then its argument prototype would still apply. */
5840 if { (eval echo configure:5852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5842 eval "ac_cv_lib_$ac_lib_var=yes"
5844 echo "configure: failed program was:" >&5
5845 cat conftest.$ac_ext >&5
5847 eval "ac_cv_lib_$ac_lib_var=no"
5850 LIBS="$ac_save_LIBS"
5853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5854 echo "$ac_t""yes" 1>&6
5855 PASSWD_LIBS="$PASSWD_LIBS -lsec"
5857 echo "$ac_t""no" 1>&6
5864 ###############################################################################
5866 # Check for FreeBSD-style shadow passwords.
5868 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
5869 # password systems -- except you only get stuff in the pw_passwd field
5870 # if the running program is setuid. So, guess that we've got this
5871 # lossage to contend with if /etc/master.passwd exists, and default to
5872 # a setuid installation.
5874 ###############################################################################
5876 if test "$with_shadow" = yes ; then
5877 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
5878 echo "configure:5890: checking for FreeBSD-style shadow passwords" >&5
5879 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
5880 echo $ac_n "(cached) $ac_c" 1>&6
5882 if test -f /etc/master.passwd ; then
5883 ac_cv_master_passwd=yes
5885 ac_cv_master_passwd=no
5889 echo "$ac_t""$ac_cv_master_passwd" 1>&6
5890 if test "$ac_cv_master_passwd" = yes; then
5896 ###############################################################################
5898 # Check for traditional (ha!) shadow passwords.
5900 ###############################################################################
5902 if test "$with_shadow" = yes ; then
5903 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
5904 echo "configure:5916: checking for generic shadow passwords" >&5
5905 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
5906 echo $ac_n "(cached) $ac_c" 1>&6
5909 ac_save_CPPFLAGS="$CPPFLAGS"
5910 if test \! -z "$includedir" ; then
5911 CPPFLAGS="$CPPFLAGS -I$includedir"
5913 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5914 cat > conftest.$ac_ext <<EOF
5915 #line 5927 "configure"
5916 #include "confdefs.h"
5919 #include <sys/types.h>
5923 struct spwd *p = getspnam("nobody");
5924 const char *pw = p->sp_pwdp;
5927 if { (eval echo configure:5939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5931 echo "configure: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
5937 CPPFLAGS="$ac_save_CPPFLAGS"
5940 echo "$ac_t""$ac_cv_shadow" 1>&6
5941 if test "$ac_cv_shadow" = yes; then
5945 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
5947 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
5948 echo "configure:5960: checking for getspnam in -lc" >&5
5949 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
5950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5951 echo $ac_n "(cached) $ac_c" 1>&6
5953 ac_save_LIBS="$LIBS"
5955 cat > conftest.$ac_ext <<EOF
5956 #line 5968 "configure"
5957 #include "confdefs.h"
5958 /* Override any gcc2 internal prototype to avoid an error. */
5959 /* We use char because int might match the return type of a gcc2
5960 builtin and then its argument prototype would still apply. */
5967 if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5969 eval "ac_cv_lib_$ac_lib_var=yes"
5971 echo "configure: failed program was:" >&5
5972 cat conftest.$ac_ext >&5
5974 eval "ac_cv_lib_$ac_lib_var=no"
5977 LIBS="$ac_save_LIBS"
5980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5981 echo "$ac_t""yes" 1>&6
5984 echo "$ac_t""no" 1>&6
5987 if test "$have_getspnam" = no ; then
5988 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
5989 echo "configure:6001: checking for getspnam in -lgen" >&5
5990 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
5991 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5992 echo $ac_n "(cached) $ac_c" 1>&6
5994 ac_save_LIBS="$LIBS"
5996 cat > conftest.$ac_ext <<EOF
5997 #line 6009 "configure"
5998 #include "confdefs.h"
5999 /* Override any gcc2 internal prototype to avoid an error. */
6000 /* We use char because int might match the return type of a gcc2
6001 builtin and then its argument prototype would still apply. */
6008 if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6010 eval "ac_cv_lib_$ac_lib_var=yes"
6012 echo "configure: failed program was:" >&5
6013 cat conftest.$ac_ext >&5
6015 eval "ac_cv_lib_$ac_lib_var=no"
6018 LIBS="$ac_save_LIBS"
6021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6022 echo "$ac_t""yes" 1>&6
6023 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
6025 echo "$ac_t""no" 1>&6
6033 ###############################################################################
6035 # Check for other libraries needed for non-shadow passwords.
6037 ###############################################################################
6039 if test "$enable_locking" = yes ; then
6041 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
6043 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
6044 echo "configure:6056: checking for crypt in -lc" >&5
6045 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
6046 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6047 echo $ac_n "(cached) $ac_c" 1>&6
6049 ac_save_LIBS="$LIBS"
6051 cat > conftest.$ac_ext <<EOF
6052 #line 6064 "configure"
6053 #include "confdefs.h"
6054 /* Override any gcc2 internal prototype to avoid an error. */
6055 /* We use char because int might match the return type of a gcc2
6056 builtin and then its argument prototype would still apply. */
6063 if { (eval echo configure:6075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6065 eval "ac_cv_lib_$ac_lib_var=yes"
6067 echo "configure: failed program was:" >&5
6068 cat conftest.$ac_ext >&5
6070 eval "ac_cv_lib_$ac_lib_var=no"
6073 LIBS="$ac_save_LIBS"
6076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6077 echo "$ac_t""yes" 1>&6
6080 echo "$ac_t""no" 1>&6
6083 if test "$have_crypt" = no ; then
6084 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6085 echo "configure:6097: checking for crypt in -lcrypt" >&5
6086 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6088 echo $ac_n "(cached) $ac_c" 1>&6
6090 ac_save_LIBS="$LIBS"
6091 LIBS="-lcrypt $LIBS"
6092 cat > conftest.$ac_ext <<EOF
6093 #line 6105 "configure"
6094 #include "confdefs.h"
6095 /* Override any gcc2 internal prototype to avoid an error. */
6096 /* We use char because int might match the return type of a gcc2
6097 builtin and then its argument prototype would still apply. */
6104 if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6106 eval "ac_cv_lib_$ac_lib_var=yes"
6108 echo "configure: failed program was:" >&5
6109 cat conftest.$ac_ext >&5
6111 eval "ac_cv_lib_$ac_lib_var=no"
6114 LIBS="$ac_save_LIBS"
6117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6118 echo "$ac_t""yes" 1>&6
6119 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
6121 echo "$ac_t""no" 1>&6
6128 # Most of the above shadow mechanisms will have set need_setuid to yes,
6129 # if they were found. But, on some systems, we need setuid even when
6130 # using plain old vanilla passwords.
6132 if test "$enable_locking" = yes ; then
6134 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
6141 if test "$have_shadow_adjunct" = yes ; then
6142 cat >> confdefs.h <<\EOF
6143 #define HAVE_ADJUNCT_PASSWD 1
6146 elif test "$have_shadow_enhanced" = yes ; then
6147 cat >> confdefs.h <<\EOF
6148 #define HAVE_ENHANCED_PASSWD 1
6151 elif test "$have_shadow_hpux" = yes ; then
6152 cat >> confdefs.h <<\EOF
6153 #define HAVE_HPUX_PASSWD 1
6156 elif test "$have_shadow" = yes ; then
6157 cat >> confdefs.h <<\EOF
6158 #define HAVE_SHADOW_PASSWD 1
6164 ###############################################################################
6168 ###############################################################################
6171 with_motif_req=unspecified
6172 # Check whether --with-motif or --without-motif was given.
6173 if test "${with_motif+set}" = set; then
6174 withval="$with_motif"
6175 with_motif="$withval"; with_motif_req="$withval"
6182 case "$with_motif" in
6187 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
6188 echo "configure:6200: checking for Motif headers" >&5
6189 d=$with_motif/include
6191 X_CFLAGS="-I$d $X_CFLAGS"
6192 echo "$ac_t""$d" 1>&6
6194 echo "$ac_t""not found ($d: no such directory)" 1>&6
6197 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
6198 echo "configure:6210: checking for Motif libs" >&5
6201 X_LIBS="-L$d $X_LIBS"
6202 echo "$ac_t""$d" 1>&6
6204 echo "$ac_t""not found ($d: no such directory)" 1>&6
6207 # replace the directory string with "yes".
6208 with_motif_req="yes"
6209 with_motif=$with_motif_req
6214 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6215 echo " If it is a directory, then \`DIR/include' will be added to"
6216 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6222 if test "$with_motif" != yes -a "$with_motif" != no ; then
6223 echo "error: must be yes or no: --with-motif=$with_motif"
6227 if test "$with_motif" = yes; then
6230 ac_save_CPPFLAGS="$CPPFLAGS"
6231 if test \! -z "$includedir" ; then
6232 CPPFLAGS="$CPPFLAGS -I$includedir"
6234 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6235 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6236 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6237 echo "configure:6249: checking for Xm/Xm.h" >&5
6238 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6239 echo $ac_n "(cached) $ac_c" 1>&6
6241 cat > conftest.$ac_ext <<EOF
6242 #line 6254 "configure"
6243 #include "confdefs.h"
6246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6247 { (eval echo configure:6259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6249 if test -z "$ac_err"; then
6251 eval "ac_cv_header_$ac_safe=yes"
6254 echo "configure: failed program was:" >&5
6255 cat conftest.$ac_ext >&5
6257 eval "ac_cv_header_$ac_safe=no"
6261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6262 echo "$ac_t""yes" 1>&6
6264 cat >> confdefs.h <<\EOF
6265 #define HAVE_MOTIF 1
6268 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6270 echo "$ac_t""no" 1>&6
6273 CPPFLAGS="$ac_save_CPPFLAGS"
6277 if test "$have_motif" = yes; then
6279 ac_save_CPPFLAGS="$CPPFLAGS"
6280 if test \! -z "$includedir" ; then
6281 CPPFLAGS="$CPPFLAGS -I$includedir"
6283 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6284 ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
6285 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
6286 echo "configure:6298: checking for Xm/ComboBox.h" >&5
6287 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6288 echo $ac_n "(cached) $ac_c" 1>&6
6290 cat > conftest.$ac_ext <<EOF
6291 #line 6303 "configure"
6292 #include "confdefs.h"
6293 #include <Xm/ComboBox.h>
6295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6296 { (eval echo configure:6308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6298 if test -z "$ac_err"; then
6300 eval "ac_cv_header_$ac_safe=yes"
6303 echo "configure: failed program was:" >&5
6304 cat conftest.$ac_ext >&5
6306 eval "ac_cv_header_$ac_safe=no"
6310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6311 echo "$ac_t""yes" 1>&6
6312 cat >> confdefs.h <<\EOF
6313 #define HAVE_XMCOMBOBOX 1
6317 echo "$ac_t""no" 1>&6
6320 CPPFLAGS="$ac_save_CPPFLAGS"
6324 ###############################################################################
6326 # Check for -lgtk (and Gnome stuff)
6328 ###############################################################################
6331 with_gtk_req=unspecified
6332 # Check whether --with-gtk or --without-gtk was given.
6333 if test "${with_gtk+set}" = set; then
6335 with_gtk="$withval"; with_gtk_req="$withval"
6341 # if --with-gtk=/directory/ was specified, remember that directory so that
6342 # we can also look for the `gtk-config' program in that directory.
6358 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6359 echo "configure:6371: checking for Gtk headers" >&5
6362 X_CFLAGS="-I$d $X_CFLAGS"
6363 echo "$ac_t""$d" 1>&6
6365 echo "$ac_t""not found ($d: no such directory)" 1>&6
6368 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6369 echo "configure:6381: checking for Gtk libs" >&5
6372 X_LIBS="-L$d $X_LIBS"
6373 echo "$ac_t""$d" 1>&6
6375 echo "$ac_t""not found ($d: no such directory)" 1>&6
6378 # replace the directory string with "yes".
6380 with_gtk=$with_gtk_req
6385 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6386 echo " If it is a directory, then \`DIR/include' will be added to"
6387 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6393 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6394 echo "error: must be yes or no: --with-gtk=$with_gtk"
6399 with_gnome_req=unspecified
6400 # Check whether --with-gnome or --without-gnome was given.
6401 if test "${with_gnome+set}" = set; then
6402 withval="$with_gnome"
6403 with_gnome="$withval"; with_gnome_req="$withval"
6409 # if --with-gnome=/directory/ was specified, remember that directory so that
6410 # we can also look for the `gnome-config' program in that directory.
6411 case "$with_gnome" in
6413 gnome_dir="$with_gnome"
6421 case "$with_gnome" in
6426 echo $ac_n "checking for Gnome headers""... $ac_c" 1>&6
6427 echo "configure:6439: checking for Gnome headers" >&5
6428 d=$with_gnome/include
6430 X_CFLAGS="-I$d $X_CFLAGS"
6431 echo "$ac_t""$d" 1>&6
6433 echo "$ac_t""not found ($d: no such directory)" 1>&6
6436 echo $ac_n "checking for Gnome libs""... $ac_c" 1>&6
6437 echo "configure:6449: checking for Gnome libs" >&5
6440 X_LIBS="-L$d $X_LIBS"
6441 echo "$ac_t""$d" 1>&6
6443 echo "$ac_t""not found ($d: no such directory)" 1>&6
6446 # replace the directory string with "yes".
6447 with_gnome_req="yes"
6448 with_gnome=$with_gnome_req
6453 echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
6454 echo " If it is a directory, then \`DIR/include' will be added to"
6455 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6461 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
6462 echo "error: must be yes or no: --with-gnome=$with_gnome"
6468 if test "$with_gtk" = yes; then
6471 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6472 # for glib-config and gtk-config.
6476 if test ! -z "$gtk_dir"; then
6477 # canonicalize slashes.
6478 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6479 gtk_path="$gtk_dir:$gtk_path"
6482 if test ! -z "gnome_dir"; then
6483 # canonicalize slashes.
6484 gnome_dir=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
6485 gtk_path="$gnome_dir:$gtk_path"
6488 for ac_prog in glib12-config glib-config
6490 # Extract the first word of "$ac_prog", so it can be a program name with args.
6491 set dummy $ac_prog; ac_word=$2
6492 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6493 echo "configure:6505: checking for $ac_word" >&5
6494 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6495 echo $ac_n "(cached) $ac_c" 1>&6
6497 case "$glib_config" in
6499 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6502 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6505 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6506 ac_dummy="$gtk_path"
6507 for ac_dir in $ac_dummy; do
6508 test -z "$ac_dir" && ac_dir=.
6509 if test -f $ac_dir/$ac_word; then
6510 ac_cv_path_glib_config="$ac_dir/$ac_word"
6518 glib_config="$ac_cv_path_glib_config"
6519 if test -n "$glib_config"; then
6520 echo "$ac_t""$glib_config" 1>&6
6522 echo "$ac_t""no" 1>&6
6525 test -n "$glib_config" && break
6528 for ac_prog in gtk12-config gtk-config
6530 # Extract the first word of "$ac_prog", so it can be a program name with args.
6531 set dummy $ac_prog; ac_word=$2
6532 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6533 echo "configure:6545: checking for $ac_word" >&5
6534 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6535 echo $ac_n "(cached) $ac_c" 1>&6
6537 case "$gtk_config" in
6539 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6542 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6546 ac_dummy="$gtk_path"
6547 for ac_dir in $ac_dummy; do
6548 test -z "$ac_dir" && ac_dir=.
6549 if test -f $ac_dir/$ac_word; then
6550 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6558 gtk_config="$ac_cv_path_gtk_config"
6559 if test -n "$gtk_config"; then
6560 echo "$ac_t""$gtk_config" 1>&6
6562 echo "$ac_t""no" 1>&6
6565 test -n "$gtk_config" && break
6569 if test "$with_gnome" = yes; then
6570 for ac_prog in gnome-config
6572 # Extract the first word of "$ac_prog", so it can be a program name with args.
6573 set dummy $ac_prog; ac_word=$2
6574 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6575 echo "configure:6587: checking for $ac_word" >&5
6576 if eval "test \"`echo '$''{'ac_cv_path_gnome_config'+set}'`\" = set"; then
6577 echo $ac_n "(cached) $ac_c" 1>&6
6579 case "$gnome_config" in
6581 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
6584 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a dos path.
6587 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6588 ac_dummy="$gtk_path"
6589 for ac_dir in $ac_dummy; do
6590 test -z "$ac_dir" && ac_dir=.
6591 if test -f $ac_dir/$ac_word; then
6592 ac_cv_path_gnome_config="$ac_dir/$ac_word"
6600 gnome_config="$ac_cv_path_gnome_config"
6601 if test -n "$gnome_config"; then
6602 echo "$ac_t""$gnome_config" 1>&6
6604 echo "$ac_t""no" 1>&6
6607 test -n "$gnome_config" && break
6612 if test -n "$glib_config" -a -n "gtk_config" ; then
6614 if test "$with_gnome" = yes -a -n "$gnome_config" ; then
6619 if test "$have_gtk" = yes; then
6620 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6621 echo "configure:6633: checking Gtk version number" >&5
6622 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6623 echo $ac_n "(cached) $ac_c" 1>&6
6625 ac_cv_gtk_version_string=`$gtk_config --version`
6628 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6629 ac_gtk_version_string=$ac_cv_gtk_version_string
6632 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6633 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6635 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6636 if test -z "$ac_gtk_version"; then
6637 ac_gtk_version=unknown
6638 ac_gtk_version_string=unknown
6640 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6648 if test "$have_gtk" = yes; then
6649 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6650 echo "configure:6662: checking for Gtk includes" >&5
6651 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6652 echo $ac_n "(cached) $ac_c" 1>&6
6654 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6657 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6658 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6659 echo "configure:6671: checking for Gtk libs" >&5
6660 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6661 echo $ac_n "(cached) $ac_c" 1>&6
6663 ac_cv_gtk_config_libs=`$gtk_config --libs`
6666 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6668 ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
6669 ac_gtk_config_libs=$ac_cv_gtk_config_libs
6671 # Check for Gnome Capplet support.
6673 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6674 gnome_config_libs="capplet gnomeui"
6675 echo $ac_n "checking for Gnome capplet includes""... $ac_c" 1>&6
6676 echo "configure:6688: checking for Gnome capplet includes" >&5
6677 if eval "test \"`echo '$''{'ac_cv_gnome_config_cflags'+set}'`\" = set"; then
6678 echo $ac_n "(cached) $ac_c" 1>&6
6680 if ( $gnome_config --cflags $gnome_config_libs 2>&1 >/dev/null | \
6681 grep Unknown >/dev/null ) ; then
6682 ac_cv_gnome_config_cflags=''
6684 ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
6688 ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
6689 if test "$ac_gnome_config_cflags" = "" ; then
6691 echo "$ac_t""no" 1>&6
6693 echo "$ac_t""$ac_gnome_config_cflags" 1>&6
6697 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6698 echo $ac_n "checking for Gnome capplet libs""... $ac_c" 1>&6
6699 echo "configure:6711: checking for Gnome capplet libs" >&5
6700 if eval "test \"`echo '$''{'ac_cv_gnome_config_libs'+set}'`\" = set"; then
6701 echo $ac_n "(cached) $ac_c" 1>&6
6703 if ( $gnome_config --libs $gnome_config_libs 2>&1 >/dev/null |
6704 grep Unknown >/dev/null ) ; then
6705 ac_cv_gnome_config_libs=''
6707 ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
6711 ac_gnome_config_libs=$ac_cv_gnome_config_libs
6712 if test "$ac_gnome_config_libs" = "" ; then
6714 echo "$ac_t""no" 1>&6
6716 echo "$ac_t""$ac_gnome_config_libs" 1>&6
6721 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6722 GNOME_DATADIR=`$gnome_config --datadir`
6726 # If we have Gnome, then override the gtk-config values with
6727 # the gnome-config values.
6729 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6730 ac_gtk_config_cflags=$ac_gnome_config_cflags
6731 ac_gtk_config_libs=$ac_gnome_config_libs
6732 cat >> confdefs.h <<\EOF
6733 #define HAVE_CRAPPLET 1
6739 if test "$have_gtk" = yes; then
6740 INCLUDES="$INCLUDES $ac_gtk_config_cflags"
6741 GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
6742 cat >> confdefs.h <<\EOF
6751 ###############################################################################
6753 # Checking whether Motif is really Lesstif.
6755 ###############################################################################
6758 if test "$have_motif" = yes ; then
6759 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6760 echo "configure:6772: checking whether Motif is really LessTif" >&5
6761 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6762 echo $ac_n "(cached) $ac_c" 1>&6
6765 ac_save_CPPFLAGS="$CPPFLAGS"
6766 if test \! -z "$includedir" ; then
6767 CPPFLAGS="$CPPFLAGS -I$includedir"
6769 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6770 cat > conftest.$ac_ext <<EOF
6771 #line 6783 "configure"
6772 #include "confdefs.h"
6775 long vers = LesstifVersion;
6778 if { (eval echo configure:6790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6780 ac_cv_have_lesstif=yes
6782 echo "configure: failed program was:" >&5
6783 cat conftest.$ac_ext >&5
6785 ac_cv_have_lesstif=no
6788 CPPFLAGS="$ac_save_CPPFLAGS"
6791 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
6792 have_lesstif=$ac_cv_have_lesstif
6796 lesstif_version=unknown
6797 lesstif_version_string=unknown
6799 if test "$have_lesstif" = yes ; then
6801 echo unknown > conftest-lt
6802 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
6803 echo "configure:6815: checking LessTif version number" >&5
6804 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
6805 echo $ac_n "(cached) $ac_c" 1>&6
6808 ac_save_CPPFLAGS="$CPPFLAGS"
6809 if test \! -z "$includedir" ; then
6810 CPPFLAGS="$CPPFLAGS -I$includedir"
6812 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6813 if test "$cross_compiling" = yes; then
6814 ac_cv_lesstif_version=unknown
6815 ac_cv_lesstif_version_string=unknown
6817 cat > conftest.$ac_ext <<EOF
6818 #line 6830 "configure"
6819 #include "confdefs.h"
6823 FILE *f = fopen("conftest-lt", "w");
6825 fprintf(f, "%d %d.%d\n", LesstifVersion,
6826 LESSTIF_VERSION, LESSTIF_REVISION);
6831 if { (eval echo configure:6843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6833 ltv=`cat conftest-lt`
6834 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
6835 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
6837 echo "configure: failed program was:" >&5
6838 cat conftest.$ac_ext >&5
6840 ac_cv_lesstif_version=unknown
6841 ac_cv_lesstif_version_string=unknown
6846 CPPFLAGS="$ac_save_CPPFLAGS"
6849 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
6851 lesstif_version=$ac_cv_lesstif_version
6852 lesstif_version_string=$ac_cv_lesstif_version_string
6857 if test "$have_motif" = yes ; then
6859 echo unknown > conftest-mt
6860 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
6861 echo "configure:6873: checking Motif version number" >&5
6862 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
6863 echo $ac_n "(cached) $ac_c" 1>&6
6866 ac_save_CPPFLAGS="$CPPFLAGS"
6867 if test \! -z "$includedir" ; then
6868 CPPFLAGS="$CPPFLAGS -I$includedir"
6870 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6871 if test "$cross_compiling" = yes; then
6872 ac_cv_motif_version=unknown
6873 ac_cv_motif_version_string=unknown
6875 cat > conftest.$ac_ext <<EOF
6876 #line 6888 "configure"
6877 #include "confdefs.h"
6881 FILE *f = fopen("conftest-mt", "w");
6883 fprintf(f, "%d %d.%d\n", XmVersion,
6884 XmVERSION, XmREVISION);
6889 if { (eval echo configure:6901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6891 mtv=`cat conftest-mt`
6892 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
6893 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
6895 echo "configure: failed program was:" >&5
6896 cat conftest.$ac_ext >&5
6898 ac_cv_motif_version=unknown
6899 ac_cv_motif_version_string=unknown
6904 CPPFLAGS="$ac_save_CPPFLAGS"
6907 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
6909 motif_version=$ac_cv_motif_version
6910 motif_version_string=$ac_cv_motif_version_string
6915 ###############################################################################
6917 # Checking whether Motif requires -lXpm.
6919 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
6920 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
6921 # of the library whether to build the XPM code into libXm, or whether
6922 # to rely on an external libXm. So the only way to tell whether XPM is
6923 # a link-time requirement is to examine libXm.a, which is very
6924 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
6925 # always link against XPM if the XPM lib exists (and this will be a
6926 # no-op if libXm happens to already have the XPM code in it.)
6928 ###############################################################################
6930 motif_requires_xpm=no
6931 if test "$have_motif" = yes ; then
6932 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
6933 echo "configure:6945: checking whether Motif requires XPM" >&5
6934 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
6936 motif_requires_xpm=yes
6937 echo "$ac_t""maybe" 1>&6
6939 echo "$ac_t""no" 1>&6
6944 ###############################################################################
6946 # Checking whether Motif requires -lXp.
6948 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
6949 # Extension". Why this extension isn't in -lXext with all the others,
6952 ###############################################################################
6955 if test "$have_motif" = yes ; then
6958 ac_save_CPPFLAGS="$CPPFLAGS"
6959 ac_save_LDFLAGS="$LDFLAGS"
6960 # ac_save_LIBS="$LIBS"
6962 if test \! -z "$includedir" ; then
6963 CPPFLAGS="$CPPFLAGS -I$includedir"
6965 # note: $X_CFLAGS includes $x_includes
6966 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6968 if test \! -z "$libdir" ; then
6969 LDFLAGS="$LDFLAGS -L$libdir"
6971 # note: $X_LIBS includes $x_libraries
6972 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
6974 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
6975 echo "configure:6987: checking for XpQueryExtension in -lXp" >&5
6976 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
6977 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6978 echo $ac_n "(cached) $ac_c" 1>&6
6980 ac_save_LIBS="$LIBS"
6981 LIBS="-lXp -lX11 -lXext -lm $LIBS"
6982 cat > conftest.$ac_ext <<EOF
6983 #line 6995 "configure"
6984 #include "confdefs.h"
6985 /* Override any gcc2 internal prototype to avoid an error. */
6986 /* We use char because int might match the return type of a gcc2
6987 builtin and then its argument prototype would still apply. */
6988 char XpQueryExtension();
6994 if { (eval echo configure:7006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6996 eval "ac_cv_lib_$ac_lib_var=yes"
6998 echo "configure: failed program was:" >&5
6999 cat conftest.$ac_ext >&5
7001 eval "ac_cv_lib_$ac_lib_var=no"
7004 LIBS="$ac_save_LIBS"
7007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7008 echo "$ac_t""yes" 1>&6
7009 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
7011 echo "$ac_t""no" 1>&6
7015 CPPFLAGS="$ac_save_CPPFLAGS"
7016 LDFLAGS="$ac_save_LDFLAGS"
7017 # LIBS="$ac_save_LIBS"
7022 ###############################################################################
7024 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
7026 ###############################################################################
7029 if test "$have_motif" = yes ; then
7031 ac_save_CPPFLAGS="$CPPFLAGS"
7032 ac_save_LDFLAGS="$LDFLAGS"
7033 # ac_save_LIBS="$LIBS"
7035 if test \! -z "$includedir" ; then
7036 CPPFLAGS="$CPPFLAGS -I$includedir"
7038 # note: $X_CFLAGS includes $x_includes
7039 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7041 if test \! -z "$libdir" ; then
7042 LDFLAGS="$LDFLAGS -L$libdir"
7044 # note: $X_LIBS includes $x_libraries
7045 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7047 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
7048 echo "configure:7060: checking for _Xsetlocale in -lXintl" >&5
7049 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
7050 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7051 echo $ac_n "(cached) $ac_c" 1>&6
7053 ac_save_LIBS="$LIBS"
7054 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
7055 cat > conftest.$ac_ext <<EOF
7056 #line 7068 "configure"
7057 #include "confdefs.h"
7058 /* Override any gcc2 internal prototype to avoid an error. */
7059 /* We use char because int might match the return type of a gcc2
7060 builtin and then its argument prototype would still apply. */
7067 if { (eval echo configure:7079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7069 eval "ac_cv_lib_$ac_lib_var=yes"
7071 echo "configure: failed program was:" >&5
7072 cat conftest.$ac_ext >&5
7074 eval "ac_cv_lib_$ac_lib_var=no"
7077 LIBS="$ac_save_LIBS"
7080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7081 echo "$ac_t""yes" 1>&6
7084 echo "$ac_t""no" 1>&6
7088 CPPFLAGS="$ac_save_CPPFLAGS"
7089 LDFLAGS="$ac_save_LDFLAGS"
7090 # LIBS="$ac_save_LIBS"
7092 if test "$have_xintl" = yes; then
7093 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
7098 ###############################################################################
7100 # Check for -lGL or -lMesaGL.
7102 ###############################################################################
7106 with_gl_req=unspecified
7108 # Check whether --with-gl or --without-gl was given.
7109 if test "${with_gl+set}" = set; then
7111 with_gl="$withval"; with_gl_req="$withval"
7123 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
7124 echo "configure:7136: checking for GL headers" >&5
7127 X_CFLAGS="-I$d $X_CFLAGS"
7128 echo "$ac_t""$d" 1>&6
7130 echo "$ac_t""not found ($d: no such directory)" 1>&6
7133 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
7134 echo "configure:7146: checking for GL libs" >&5
7137 X_LIBS="-L$d $X_LIBS"
7138 echo "$ac_t""$d" 1>&6
7140 echo "$ac_t""not found ($d: no such directory)" 1>&6
7143 # replace the directory string with "yes".
7145 with_gl=$with_gl_req
7150 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
7151 echo " If it is a directory, then \`DIR/include' will be added to"
7152 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7158 ac_mesagl_version=unknown
7159 ac_mesagl_version_string=unknown
7161 if test "$with_gl" = yes; then
7163 ac_save_CPPFLAGS="$CPPFLAGS"
7164 if test \! -z "$includedir" ; then
7165 CPPFLAGS="$CPPFLAGS -I$includedir"
7167 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7168 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
7169 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
7170 echo "configure:7182: checking for GL/gl.h" >&5
7171 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7172 echo $ac_n "(cached) $ac_c" 1>&6
7174 cat > conftest.$ac_ext <<EOF
7175 #line 7187 "configure"
7176 #include "confdefs.h"
7179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7180 { (eval echo configure:7192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7182 if test -z "$ac_err"; then
7184 eval "ac_cv_header_$ac_safe=yes"
7187 echo "configure: failed program was:" >&5
7188 cat conftest.$ac_ext >&5
7190 eval "ac_cv_header_$ac_safe=no"
7194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7195 echo "$ac_t""yes" 1>&6
7198 echo "$ac_t""no" 1>&6
7201 CPPFLAGS="$ac_save_CPPFLAGS"
7202 if test "$have_gl" = yes ; then
7204 ac_save_CPPFLAGS="$CPPFLAGS"
7205 if test \! -z "$includedir" ; then
7206 CPPFLAGS="$CPPFLAGS -I$includedir"
7208 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7209 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
7210 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
7211 echo "configure:7223: checking for GL/glx.h" >&5
7212 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7213 echo $ac_n "(cached) $ac_c" 1>&6
7215 cat > conftest.$ac_ext <<EOF
7216 #line 7228 "configure"
7217 #include "confdefs.h"
7220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7221 { (eval echo configure:7233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7223 if test -z "$ac_err"; then
7225 eval "ac_cv_header_$ac_safe=yes"
7228 echo "configure: failed program was:" >&5
7229 cat conftest.$ac_ext >&5
7231 eval "ac_cv_header_$ac_safe=no"
7235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7236 echo "$ac_t""yes" 1>&6
7239 echo "$ac_t""no" 1>&6
7242 CPPFLAGS="$ac_save_CPPFLAGS"
7245 # If we have the headers, try and figure out which vendor it's from.
7247 if test "$have_gl" = yes ; then
7249 # We need to know whether it's MesaGL so that we know which libraries
7252 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7253 echo "configure:7265: checking whether GL is really MesaGL" >&5
7254 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7255 echo $ac_n "(cached) $ac_c" 1>&6
7257 ac_cv_have_mesa_gl=no
7259 ac_save_CPPFLAGS="$CPPFLAGS"
7260 if test \! -z "$includedir" ; then
7261 CPPFLAGS="$CPPFLAGS -I$includedir"
7263 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7264 cat > conftest.$ac_ext <<EOF
7265 #line 7277 "configure"
7266 #include "confdefs.h"
7269 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7270 egrep "Mesa|MESA" >/dev/null 2>&1; then
7272 ac_cv_have_mesa_gl=yes
7276 CPPFLAGS="$ac_save_CPPFLAGS"
7280 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7281 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7288 # Some versions of MesaGL are compiled to require -lpthread.
7289 # So if the Mesa headers exist, and -lpthread exists, then always
7290 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
7292 if test "$ac_have_mesa_gl" = yes; then
7293 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7294 echo "configure:7306: checking for pthread_create in -lpthread" >&5
7295 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7296 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7297 echo $ac_n "(cached) $ac_c" 1>&6
7299 ac_save_LIBS="$LIBS"
7300 LIBS="-lpthread $LIBS"
7301 cat > conftest.$ac_ext <<EOF
7302 #line 7314 "configure"
7303 #include "confdefs.h"
7304 /* Override any gcc2 internal prototype to avoid an error. */
7305 /* We use char because int might match the return type of a gcc2
7306 builtin and then its argument prototype would still apply. */
7307 char pthread_create();
7313 if { (eval echo configure:7325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7315 eval "ac_cv_lib_$ac_lib_var=yes"
7317 echo "configure: failed program was:" >&5
7318 cat conftest.$ac_ext >&5
7320 eval "ac_cv_lib_$ac_lib_var=no"
7323 LIBS="$ac_save_LIBS"
7326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7327 echo "$ac_t""yes" 1>&6
7330 echo "$ac_t""no" 1>&6
7336 # If we have Mesa headers, check to see if we can link against -lMesaGL.
7337 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
7338 # Else, warn that GL is busted. (We have the headers, but no libs.)
7341 if test "$ac_have_mesa_gl" = yes ; then
7343 ac_save_CPPFLAGS="$CPPFLAGS"
7344 ac_save_LDFLAGS="$LDFLAGS"
7345 # ac_save_LIBS="$LIBS"
7347 if test \! -z "$includedir" ; then
7348 CPPFLAGS="$CPPFLAGS -I$includedir"
7350 # note: $X_CFLAGS includes $x_includes
7351 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7353 if test \! -z "$libdir" ; then
7354 LDFLAGS="$LDFLAGS -L$libdir"
7356 # note: $X_LIBS includes $x_libraries
7357 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7359 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
7360 echo "configure:7372: checking for glXCreateContext in -lMesaGL" >&5
7361 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7362 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7363 echo $ac_n "(cached) $ac_c" 1>&6
7365 ac_save_LIBS="$LIBS"
7366 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7367 cat > conftest.$ac_ext <<EOF
7368 #line 7380 "configure"
7369 #include "confdefs.h"
7370 /* Override any gcc2 internal prototype to avoid an error. */
7371 /* We use char because int might match the return type of a gcc2
7372 builtin and then its argument prototype would still apply. */
7373 char glXCreateContext();
7379 if { (eval echo configure:7391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7381 eval "ac_cv_lib_$ac_lib_var=yes"
7383 echo "configure: failed program was:" >&5
7384 cat conftest.$ac_ext >&5
7386 eval "ac_cv_lib_$ac_lib_var=no"
7389 LIBS="$ac_save_LIBS"
7392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7393 echo "$ac_t""yes" 1>&6
7395 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
7397 echo "$ac_t""no" 1>&6
7400 CPPFLAGS="$ac_save_CPPFLAGS"
7401 LDFLAGS="$ac_save_LDFLAGS"
7402 # LIBS="$ac_save_LIBS"
7406 if test "$gl_lib_1" = "" ; then
7408 ac_save_CPPFLAGS="$CPPFLAGS"
7409 ac_save_LDFLAGS="$LDFLAGS"
7410 # ac_save_LIBS="$LIBS"
7412 if test \! -z "$includedir" ; then
7413 CPPFLAGS="$CPPFLAGS -I$includedir"
7415 # note: $X_CFLAGS includes $x_includes
7416 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7418 if test \! -z "$libdir" ; then
7419 LDFLAGS="$LDFLAGS -L$libdir"
7421 # note: $X_LIBS includes $x_libraries
7422 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7424 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7425 echo "configure:7437: checking for glXCreateContext in -lGL" >&5
7426 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7427 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7428 echo $ac_n "(cached) $ac_c" 1>&6
7430 ac_save_LIBS="$LIBS"
7431 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7432 cat > conftest.$ac_ext <<EOF
7433 #line 7445 "configure"
7434 #include "confdefs.h"
7435 /* Override any gcc2 internal prototype to avoid an error. */
7436 /* We use char because int might match the return type of a gcc2
7437 builtin and then its argument prototype would still apply. */
7438 char glXCreateContext();
7444 if { (eval echo configure:7456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7446 eval "ac_cv_lib_$ac_lib_var=yes"
7448 echo "configure: failed program was:" >&5
7449 cat conftest.$ac_ext >&5
7451 eval "ac_cv_lib_$ac_lib_var=no"
7454 LIBS="$ac_save_LIBS"
7457 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7458 echo "$ac_t""yes" 1>&6
7460 GL_LIBS="-lGL -lGLU $GL_LIBS"
7462 echo "$ac_t""no" 1>&6
7465 CPPFLAGS="$ac_save_CPPFLAGS"
7466 LDFLAGS="$ac_save_LDFLAGS"
7467 # LIBS="$ac_save_LIBS"
7471 if test "$gl_lib_1" = "" ; then
7472 # we have headers, but no libs -- bail.
7477 # linking works -- we can build the GL hacks.
7478 cat >> confdefs.h <<\EOF
7482 if test "$ac_have_mesa_gl" = yes ; then
7483 cat >> confdefs.h <<\EOF
7484 #define HAVE_MESA_GL 1
7492 # Now that we know we have GL headers and libs, do some more GL testing.
7495 if test "$have_gl" = yes ; then
7496 # If it's MesaGL, we'd like to issue a warning if the version number
7497 # is less than or equal to 2.6, because that version had a security bug.
7499 if test "$ac_have_mesa_gl" = yes; then
7501 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7502 echo "configure:7514: checking MesaGL version number" >&5
7503 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7504 echo $ac_n "(cached) $ac_c" 1>&6
7506 cat > conftest.$ac_ext <<EOF
7507 #line 7519 "configure"
7508 #include "confdefs.h"
7510 #ifndef MESA_MAJOR_VERSION
7511 # include <GL/xmesa.h>
7512 # define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
7513 # define MESA_MINOR_VERSION XMESA_MINOR_VERSION
7515 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7518 ac_save_CPPFLAGS="$CPPFLAGS"
7519 if test \! -z "$includedir" ; then
7520 CPPFLAGS="$CPPFLAGS -I$includedir"
7522 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7526 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7527 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7530 rm -f conftest.$ac_ext
7532 CPPFLAGS="$ac_save_CPPFLAGS"
7534 if test "$mglv" = ""; then
7535 ac_mesagl_version=unknown
7536 ac_mesagl_version_string=unknown
7538 ac_mesagl_version_string=$mglv
7539 maj=`echo $mglv | sed -n 's/\..*//p'`
7540 min=`echo $mglv | sed -n 's/.*\.//p'`
7541 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7542 if test -z "$ac_mesagl_version"; then
7543 ac_mesagl_version=unknown
7544 ac_mesagl_version_string=unknown
7547 ac_cv_mesagl_version=$ac_mesagl_version
7548 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7552 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7553 ac_mesagl_version=$ac_cv_mesagl_version
7554 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7558 # Check for OpenGL 1.1 features.
7561 ac_save_CPPFLAGS="$CPPFLAGS"
7562 ac_save_LDFLAGS="$LDFLAGS"
7563 # ac_save_LIBS="$LIBS"
7565 if test \! -z "$includedir" ; then
7566 CPPFLAGS="$CPPFLAGS -I$includedir"
7568 # note: $X_CFLAGS includes $x_includes
7569 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7571 if test \! -z "$libdir" ; then
7572 LDFLAGS="$LDFLAGS -L$libdir"
7574 # note: $X_LIBS includes $x_libraries
7575 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7577 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7578 echo "configure:7590: checking for glBindTexture in -l$gl_lib_1" >&5
7579 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7580 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7581 echo $ac_n "(cached) $ac_c" 1>&6
7583 ac_save_LIBS="$LIBS"
7584 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7585 cat > conftest.$ac_ext <<EOF
7586 #line 7598 "configure"
7587 #include "confdefs.h"
7588 /* Override any gcc2 internal prototype to avoid an error. */
7589 /* We use char because int might match the return type of a gcc2
7590 builtin and then its argument prototype would still apply. */
7591 char glBindTexture();
7597 if { (eval echo configure:7609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7599 eval "ac_cv_lib_$ac_lib_var=yes"
7601 echo "configure: failed program was:" >&5
7602 cat conftest.$ac_ext >&5
7604 eval "ac_cv_lib_$ac_lib_var=no"
7607 LIBS="$ac_save_LIBS"
7610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7611 echo "$ac_t""yes" 1>&6
7612 cat >> confdefs.h <<\EOF
7613 #define HAVE_GLBINDTEXTURE 1
7617 echo "$ac_t""no" 1>&6
7621 CPPFLAGS="$ac_save_CPPFLAGS"
7622 LDFLAGS="$ac_save_LDFLAGS"
7623 # LIBS="$ac_save_LIBS"
7627 elif test "$with_gl" != no; then
7628 echo "error: must be yes or no: --with-gl=$with_gl"
7633 ###############################################################################
7637 ###############################################################################
7640 with_gle_req=unspecified
7642 # Check whether --with-gle or --without-gle was given.
7643 if test "${with_gle+set}" = set; then
7645 with_gle="$withval"; with_gle_req="$withval"
7657 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7658 echo "configure:7670: checking for GLE headers" >&5
7661 X_CFLAGS="-I$d $X_CFLAGS"
7662 echo "$ac_t""$d" 1>&6
7664 echo "$ac_t""not found ($d: no such directory)" 1>&6
7667 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7668 echo "configure:7680: checking for GLE libs" >&5
7671 X_LIBS="-L$d $X_LIBS"
7672 echo "$ac_t""$d" 1>&6
7674 echo "$ac_t""not found ($d: no such directory)" 1>&6
7677 # replace the directory string with "yes".
7679 with_gle=$with_gle_req
7684 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7685 echo " If it is a directory, then \`DIR/include' will be added to"
7686 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7694 if test "$with_gle" = yes; then
7697 ac_save_CPPFLAGS="$CPPFLAGS"
7698 if test \! -z "$includedir" ; then
7699 CPPFLAGS="$CPPFLAGS -I$includedir"
7701 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7702 ac_safe=`echo "GL/gle.h" | sed 'y%./+-%__p_%'`
7703 echo $ac_n "checking for GL/gle.h""... $ac_c" 1>&6
7704 echo "configure:7716: checking for GL/gle.h" >&5
7705 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7706 echo $ac_n "(cached) $ac_c" 1>&6
7708 cat > conftest.$ac_ext <<EOF
7709 #line 7721 "configure"
7710 #include "confdefs.h"
7713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7714 { (eval echo configure:7726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7716 if test -z "$ac_err"; then
7718 eval "ac_cv_header_$ac_safe=yes"
7721 echo "configure: failed program was:" >&5
7722 cat conftest.$ac_ext >&5
7724 eval "ac_cv_header_$ac_safe=no"
7728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7729 echo "$ac_t""yes" 1>&6
7732 echo "$ac_t""no" 1>&6
7735 CPPFLAGS="$ac_save_CPPFLAGS"
7736 if test "$have_gle3" = yes ; then
7740 ac_save_CPPFLAGS="$CPPFLAGS"
7741 if test \! -z "$includedir" ; then
7742 CPPFLAGS="$CPPFLAGS -I$includedir"
7744 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7745 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7746 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7747 echo "configure:7759: checking for GL/gutil.h" >&5
7748 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7749 echo $ac_n "(cached) $ac_c" 1>&6
7751 cat > conftest.$ac_ext <<EOF
7752 #line 7764 "configure"
7753 #include "confdefs.h"
7754 #include <GL/gutil.h>
7756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7757 { (eval echo configure:7769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7759 if test -z "$ac_err"; then
7761 eval "ac_cv_header_$ac_safe=yes"
7764 echo "configure: failed program was:" >&5
7765 cat conftest.$ac_ext >&5
7767 eval "ac_cv_header_$ac_safe=no"
7771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7772 echo "$ac_t""yes" 1>&6
7775 echo "$ac_t""no" 1>&6
7778 CPPFLAGS="$ac_save_CPPFLAGS"
7779 if test "$have_gle" = yes ; then
7781 ac_save_CPPFLAGS="$CPPFLAGS"
7782 if test \! -z "$includedir" ; then
7783 CPPFLAGS="$CPPFLAGS -I$includedir"
7785 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7786 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
7787 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
7788 echo "configure:7800: checking for GL/tube.h" >&5
7789 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7790 echo $ac_n "(cached) $ac_c" 1>&6
7792 cat > conftest.$ac_ext <<EOF
7793 #line 7805 "configure"
7794 #include "confdefs.h"
7795 #include <GL/tube.h>
7797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7798 { (eval echo configure:7810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7800 if test -z "$ac_err"; then
7802 eval "ac_cv_header_$ac_safe=yes"
7805 echo "configure: failed program was:" >&5
7806 cat conftest.$ac_ext >&5
7808 eval "ac_cv_header_$ac_safe=no"
7812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7813 echo "$ac_t""yes" 1>&6
7816 echo "$ac_t""no" 1>&6
7819 CPPFLAGS="$ac_save_CPPFLAGS"
7823 if test "$have_gle" = yes ; then
7827 ac_save_CPPFLAGS="$CPPFLAGS"
7828 ac_save_LDFLAGS="$LDFLAGS"
7829 # ac_save_LIBS="$LIBS"
7831 if test \! -z "$includedir" ; then
7832 CPPFLAGS="$CPPFLAGS -I$includedir"
7834 # note: $X_CFLAGS includes $x_includes
7835 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7837 if test \! -z "$libdir" ; then
7838 LDFLAGS="$LDFLAGS -L$libdir"
7840 # note: $X_LIBS includes $x_libraries
7841 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7843 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
7844 echo "configure:7856: checking for gleCreateGC in -lgle" >&5
7845 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
7846 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7847 echo $ac_n "(cached) $ac_c" 1>&6
7849 ac_save_LIBS="$LIBS"
7850 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7851 cat > conftest.$ac_ext <<EOF
7852 #line 7864 "configure"
7853 #include "confdefs.h"
7854 /* Override any gcc2 internal prototype to avoid an error. */
7855 /* We use char because int might match the return type of a gcc2
7856 builtin and then its argument prototype would still apply. */
7863 if { (eval echo configure:7875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7865 eval "ac_cv_lib_$ac_lib_var=yes"
7867 echo "configure: failed program was:" >&5
7868 cat conftest.$ac_ext >&5
7870 eval "ac_cv_lib_$ac_lib_var=no"
7873 LIBS="$ac_save_LIBS"
7876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7877 echo "$ac_t""yes" 1>&6
7878 have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
7880 echo "$ac_t""no" 1>&6
7883 CPPFLAGS="$ac_save_CPPFLAGS"
7884 LDFLAGS="$ac_save_LDFLAGS"
7885 # LIBS="$ac_save_LIBS"
7888 if test "$have_gle" = yes ; then
7892 # sometimes the libmatrix stuff is included in libgle. look there first.
7894 # I don't get it. For some reason, this test passes on SGI, as if
7895 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
7896 # Yet the link is succeeding. Why???
7898 # AC_CHECK_X_LIB(gle, uview_direction_d,
7899 # [have_gle=yes; gle_halfassed=no],
7900 # [], $GL_LIBS -lX11 -lXext -lm)
7902 # As of GLE 3 this is in libgle, and has changed name to uview_direction!
7904 if test "$have_gle3" = yes ; then
7906 ac_save_CPPFLAGS="$CPPFLAGS"
7907 ac_save_LDFLAGS="$LDFLAGS"
7908 # ac_save_LIBS="$LIBS"
7910 if test \! -z "$includedir" ; then
7911 CPPFLAGS="$CPPFLAGS -I$includedir"
7913 # note: $X_CFLAGS includes $x_includes
7914 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7916 if test \! -z "$libdir" ; then
7917 LDFLAGS="$LDFLAGS -L$libdir"
7919 # note: $X_LIBS includes $x_libraries
7920 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7922 echo $ac_n "checking for uview_direction in -lgle""... $ac_c" 1>&6
7923 echo "configure:7935: checking for uview_direction in -lgle" >&5
7924 ac_lib_var=`echo gle'_'uview_direction | sed 'y%./+-%__p_%'`
7925 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7926 echo $ac_n "(cached) $ac_c" 1>&6
7928 ac_save_LIBS="$LIBS"
7929 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
7930 cat > conftest.$ac_ext <<EOF
7931 #line 7943 "configure"
7932 #include "confdefs.h"
7933 /* Override any gcc2 internal prototype to avoid an error. */
7934 /* We use char because int might match the return type of a gcc2
7935 builtin and then its argument prototype would still apply. */
7936 char uview_direction();
7942 if { (eval echo configure:7954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7944 eval "ac_cv_lib_$ac_lib_var=yes"
7946 echo "configure: failed program was:" >&5
7947 cat conftest.$ac_ext >&5
7949 eval "ac_cv_lib_$ac_lib_var=no"
7952 LIBS="$ac_save_LIBS"
7955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7956 echo "$ac_t""yes" 1>&6
7957 have_gle=yes; gle_halfassed=no
7959 echo "$ac_t""no" 1>&6
7962 CPPFLAGS="$ac_save_CPPFLAGS"
7963 LDFLAGS="$ac_save_LDFLAGS"
7964 # LIBS="$ac_save_LIBS"
7967 # if it wasn't in libgle, then look in libmatrix.
7968 if test "$have_gle" = no ; then
7970 ac_save_CPPFLAGS="$CPPFLAGS"
7971 ac_save_LDFLAGS="$LDFLAGS"
7972 # ac_save_LIBS="$LIBS"
7974 if test \! -z "$includedir" ; then
7975 CPPFLAGS="$CPPFLAGS -I$includedir"
7977 # note: $X_CFLAGS includes $x_includes
7978 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7980 if test \! -z "$libdir" ; then
7981 LDFLAGS="$LDFLAGS -L$libdir"
7983 # note: $X_LIBS includes $x_libraries
7984 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7986 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
7987 echo "configure:7999: checking for uview_direction_d in -lmatrix" >&5
7988 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
7989 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7990 echo $ac_n "(cached) $ac_c" 1>&6
7992 ac_save_LIBS="$LIBS"
7993 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
7994 cat > conftest.$ac_ext <<EOF
7995 #line 8007 "configure"
7996 #include "confdefs.h"
7997 /* Override any gcc2 internal prototype to avoid an error. */
7998 /* We use char because int might match the return type of a gcc2
7999 builtin and then its argument prototype would still apply. */
8000 char uview_direction_d();
8006 if { (eval echo configure:8018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8008 eval "ac_cv_lib_$ac_lib_var=yes"
8010 echo "configure: failed program was:" >&5
8011 cat conftest.$ac_ext >&5
8013 eval "ac_cv_lib_$ac_lib_var=no"
8016 LIBS="$ac_save_LIBS"
8019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8020 echo "$ac_t""yes" 1>&6
8021 have_gle=yes; gle_halfassed=no;
8022 GLE_LIBS="$GLE_LIBS -lmatrix"
8024 echo "$ac_t""no" 1>&6
8027 CPPFLAGS="$ac_save_CPPFLAGS"
8028 LDFLAGS="$ac_save_LDFLAGS"
8029 # LIBS="$ac_save_LIBS"
8034 if test "$have_gle" = yes ; then
8035 cat >> confdefs.h <<\EOF
8039 if test "$have_gle3" = yes ; then
8040 cat >> confdefs.h <<\EOF
8047 elif test "$with_gle" != no; then
8048 echo "error: must be yes or no: --with-gle=$with_gle"
8055 ###############################################################################
8059 ###############################################################################
8062 with_xpm_req=unspecified
8063 # Check whether --with-xpm or --without-xpm was given.
8064 if test "${with_xpm+set}" = set; then
8066 with_xpm="$withval"; with_xpm_req="$withval"
8078 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
8079 echo "configure:8091: checking for XPM headers" >&5
8082 X_CFLAGS="-I$d $X_CFLAGS"
8083 echo "$ac_t""$d" 1>&6
8085 echo "$ac_t""not found ($d: no such directory)" 1>&6
8088 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
8089 echo "configure:8101: checking for XPM libs" >&5
8092 X_LIBS="-L$d $X_LIBS"
8093 echo "$ac_t""$d" 1>&6
8095 echo "$ac_t""not found ($d: no such directory)" 1>&6
8098 # replace the directory string with "yes".
8100 with_xpm=$with_xpm_req
8105 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
8106 echo " If it is a directory, then \`DIR/include' will be added to"
8107 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8113 if test "$with_xpm" = yes; then
8115 ac_save_CPPFLAGS="$CPPFLAGS"
8116 if test \! -z "$includedir" ; then
8117 CPPFLAGS="$CPPFLAGS -I$includedir"
8119 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8120 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
8121 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
8122 echo "configure:8134: checking for X11/xpm.h" >&5
8123 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8124 echo $ac_n "(cached) $ac_c" 1>&6
8126 cat > conftest.$ac_ext <<EOF
8127 #line 8139 "configure"
8128 #include "confdefs.h"
8129 #include <X11/xpm.h>
8131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8132 { (eval echo configure:8144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8134 if test -z "$ac_err"; then
8136 eval "ac_cv_header_$ac_safe=yes"
8139 echo "configure: failed program was:" >&5
8140 cat conftest.$ac_ext >&5
8142 eval "ac_cv_header_$ac_safe=no"
8146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8147 echo "$ac_t""yes" 1>&6
8149 cat >> confdefs.h <<\EOF
8155 echo "$ac_t""no" 1>&6
8158 CPPFLAGS="$ac_save_CPPFLAGS"
8159 elif test "$with_xpm" != no; then
8160 echo "error: must be yes or no: --with-xpm=$with_xpm"
8164 # See comment near $motif_requires_xpm, above.
8165 # Need to do this here, after both Motif and XPM have been checked for.
8167 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
8168 if test "$motif_requires_xpm" = yes ; then
8169 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
8174 ###############################################################################
8176 # Check for the XSHM server extension.
8178 ###############################################################################
8181 with_xshm_req=unspecified
8182 # Check whether --with-xshm-ext or --without-xshm-ext was given.
8183 if test "${with_xshm_ext+set}" = set; then
8184 withval="$with_xshm_ext"
8185 with_xshm="$withval"; with_xshm_req="$withval"
8192 case "$with_xshm" in
8197 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
8198 echo "configure:8210: checking for XSHM headers" >&5
8199 d=$with_xshm/include
8201 X_CFLAGS="-I$d $X_CFLAGS"
8202 echo "$ac_t""$d" 1>&6
8204 echo "$ac_t""not found ($d: no such directory)" 1>&6
8207 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
8208 echo "configure:8220: checking for XSHM libs" >&5
8211 X_LIBS="-L$d $X_LIBS"
8212 echo "$ac_t""$d" 1>&6
8214 echo "$ac_t""not found ($d: no such directory)" 1>&6
8217 # replace the directory string with "yes".
8219 with_xshm=$with_xshm_req
8224 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
8225 echo " If it is a directory, then \`DIR/include' will be added to"
8226 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8232 if test "$with_xshm" = yes; then
8234 # first check for Xshm.h.
8236 ac_save_CPPFLAGS="$CPPFLAGS"
8237 if test \! -z "$includedir" ; then
8238 CPPFLAGS="$CPPFLAGS -I$includedir"
8240 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8241 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
8242 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
8243 echo "configure:8255: checking for X11/extensions/XShm.h" >&5
8244 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8245 echo $ac_n "(cached) $ac_c" 1>&6
8247 cat > conftest.$ac_ext <<EOF
8248 #line 8260 "configure"
8249 #include "confdefs.h"
8250 #include <X11/extensions/XShm.h>
8252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8253 { (eval echo configure:8265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8255 if test -z "$ac_err"; then
8257 eval "ac_cv_header_$ac_safe=yes"
8260 echo "configure: failed program was:" >&5
8261 cat conftest.$ac_ext >&5
8263 eval "ac_cv_header_$ac_safe=no"
8267 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8268 echo "$ac_t""yes" 1>&6
8271 echo "$ac_t""no" 1>&6
8274 CPPFLAGS="$ac_save_CPPFLAGS"
8276 # if that succeeded, then check for sys/ipc.h.
8277 if test "$have_xshm" = yes; then
8280 ac_save_CPPFLAGS="$CPPFLAGS"
8281 if test \! -z "$includedir" ; then
8282 CPPFLAGS="$CPPFLAGS -I$includedir"
8284 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8285 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
8286 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
8287 echo "configure:8299: checking for sys/ipc.h" >&5
8288 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8289 echo $ac_n "(cached) $ac_c" 1>&6
8291 cat > conftest.$ac_ext <<EOF
8292 #line 8304 "configure"
8293 #include "confdefs.h"
8294 #include <sys/ipc.h>
8296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8297 { (eval echo configure:8309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8298 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8299 if test -z "$ac_err"; then
8301 eval "ac_cv_header_$ac_safe=yes"
8304 echo "configure: failed program was:" >&5
8305 cat conftest.$ac_ext >&5
8307 eval "ac_cv_header_$ac_safe=no"
8311 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8312 echo "$ac_t""yes" 1>&6
8315 echo "$ac_t""no" 1>&6
8318 CPPFLAGS="$ac_save_CPPFLAGS"
8321 # if that succeeded, then check for sys/shm.h.
8322 if test "$have_xshm" = yes; then
8325 ac_save_CPPFLAGS="$CPPFLAGS"
8326 if test \! -z "$includedir" ; then
8327 CPPFLAGS="$CPPFLAGS -I$includedir"
8329 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8330 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
8331 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
8332 echo "configure:8344: checking for sys/shm.h" >&5
8333 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8334 echo $ac_n "(cached) $ac_c" 1>&6
8336 cat > conftest.$ac_ext <<EOF
8337 #line 8349 "configure"
8338 #include "confdefs.h"
8339 #include <sys/shm.h>
8341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8342 { (eval echo configure:8354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8344 if test -z "$ac_err"; then
8346 eval "ac_cv_header_$ac_safe=yes"
8349 echo "configure: failed program was:" >&5
8350 cat conftest.$ac_ext >&5
8352 eval "ac_cv_header_$ac_safe=no"
8356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8357 echo "$ac_t""yes" 1>&6
8360 echo "$ac_t""no" 1>&6
8363 CPPFLAGS="$ac_save_CPPFLAGS"
8366 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
8367 # to exist, but the library code to not exist. And even better, the library
8368 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
8369 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
8370 # that's not quite right, but close enough.)
8374 if `uname -v` -eq 3 ; then
8377 ac_save_CPPFLAGS="$CPPFLAGS"
8378 ac_save_LDFLAGS="$LDFLAGS"
8379 # ac_save_LIBS="$LIBS"
8381 if test \! -z "$includedir" ; then
8382 CPPFLAGS="$CPPFLAGS -I$includedir"
8384 # note: $X_CFLAGS includes $x_includes
8385 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8387 if test \! -z "$libdir" ; then
8388 LDFLAGS="$LDFLAGS -L$libdir"
8390 # note: $X_LIBS includes $x_libraries
8391 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8393 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
8394 echo "configure:8406: checking for XShmQueryExtension in -lXextSam" >&5
8395 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
8396 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8397 echo $ac_n "(cached) $ac_c" 1>&6
8399 ac_save_LIBS="$LIBS"
8400 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
8401 cat > conftest.$ac_ext <<EOF
8402 #line 8414 "configure"
8403 #include "confdefs.h"
8404 /* Override any gcc2 internal prototype to avoid an error. */
8405 /* We use char because int might match the return type of a gcc2
8406 builtin and then its argument prototype would still apply. */
8407 char XShmQueryExtension();
8410 XShmQueryExtension()
8413 if { (eval echo configure:8425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8415 eval "ac_cv_lib_$ac_lib_var=yes"
8417 echo "configure: failed program was:" >&5
8418 cat conftest.$ac_ext >&5
8420 eval "ac_cv_lib_$ac_lib_var=no"
8423 LIBS="$ac_save_LIBS"
8426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8427 echo "$ac_t""yes" 1>&6
8428 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
8430 echo "$ac_t""no" 1>&6
8434 CPPFLAGS="$ac_save_CPPFLAGS"
8435 LDFLAGS="$ac_save_LDFLAGS"
8436 # LIBS="$ac_save_LIBS"
8442 # if that succeeded, then we've really got it.
8443 if test "$have_xshm" = yes; then
8444 cat >> confdefs.h <<\EOF
8445 #define HAVE_XSHM_EXTENSION 1
8450 elif test "$with_xshm" != no; then
8451 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
8456 ###############################################################################
8458 # Check for the DOUBLE-BUFFER server extension.
8460 ###############################################################################
8463 with_xdbe_req=unspecified
8464 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
8465 if test "${with_xdbe_ext+set}" = set; then
8466 withval="$with_xdbe_ext"
8467 with_xdbe="$withval"; with_xdbe_req="$withval"
8474 case "$with_xdbe" in
8479 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
8480 echo "configure:8492: checking for DOUBLE-BUFFER headers" >&5
8481 d=$with_xdbe/include
8483 X_CFLAGS="-I$d $X_CFLAGS"
8484 echo "$ac_t""$d" 1>&6
8486 echo "$ac_t""not found ($d: no such directory)" 1>&6
8489 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
8490 echo "configure:8502: checking for DOUBLE-BUFFER libs" >&5
8493 X_LIBS="-L$d $X_LIBS"
8494 echo "$ac_t""$d" 1>&6
8496 echo "$ac_t""not found ($d: no such directory)" 1>&6
8499 # replace the directory string with "yes".
8501 with_xdbe=$with_xdbe_req
8506 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
8507 echo " If it is a directory, then \`DIR/include' will be added to"
8508 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8514 if test "$with_xdbe" = yes; then
8517 ac_save_CPPFLAGS="$CPPFLAGS"
8518 if test \! -z "$includedir" ; then
8519 CPPFLAGS="$CPPFLAGS -I$includedir"
8521 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8522 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8523 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8524 echo "configure:8536: checking for X11/extensions/Xdbe.h" >&5
8525 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8526 echo $ac_n "(cached) $ac_c" 1>&6
8528 cat > conftest.$ac_ext <<EOF
8529 #line 8541 "configure"
8530 #include "confdefs.h"
8531 #include <X11/extensions/Xdbe.h>
8533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8534 { (eval echo configure:8546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8536 if test -z "$ac_err"; then
8538 eval "ac_cv_header_$ac_safe=yes"
8541 echo "configure: failed program was:" >&5
8542 cat conftest.$ac_ext >&5
8544 eval "ac_cv_header_$ac_safe=no"
8548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8549 echo "$ac_t""yes" 1>&6
8552 echo "$ac_t""no" 1>&6
8555 CPPFLAGS="$ac_save_CPPFLAGS"
8556 if test "$have_xdbe" = yes; then
8557 cat >> confdefs.h <<\EOF
8558 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8563 elif test "$with_xdbe" != no; then
8564 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8569 ###############################################################################
8571 # Check for the SGI XReadDisplay server extension.
8573 # Note: this has to be down here, rather than up with the other server
8574 # extension tests, so that the output of `configure --help' is in the
8575 # right order. Arrgh!
8577 ###############################################################################
8580 with_readdisplay_req=unspecified
8581 # Check whether --with-readdisplay or --without-readdisplay was given.
8582 if test "${with_readdisplay+set}" = set; then
8583 withval="$with_readdisplay"
8584 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8586 with_readdisplay=yes
8591 case "$with_readdisplay" in
8596 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8597 echo "configure:8609: checking for XReadDisplay headers" >&5
8598 d=$with_readdisplay/include
8600 X_CFLAGS="-I$d $X_CFLAGS"
8601 echo "$ac_t""$d" 1>&6
8603 echo "$ac_t""not found ($d: no such directory)" 1>&6
8606 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8607 echo "configure:8619: checking for XReadDisplay libs" >&5
8608 d=$with_readdisplay/lib
8610 X_LIBS="-L$d $X_LIBS"
8611 echo "$ac_t""$d" 1>&6
8613 echo "$ac_t""not found ($d: no such directory)" 1>&6
8616 # replace the directory string with "yes".
8617 with_readdisplay_req="yes"
8618 with_readdisplay=$with_readdisplay_req
8623 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8624 echo " If it is a directory, then \`DIR/include' will be added to"
8625 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8631 if test "$with_readdisplay" = yes; then
8633 ac_save_CPPFLAGS="$CPPFLAGS"
8634 if test \! -z "$includedir" ; then
8635 CPPFLAGS="$CPPFLAGS -I$includedir"
8637 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8638 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8639 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8640 echo "configure:8652: checking for X11/extensions/readdisplay.h" >&5
8641 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8642 echo $ac_n "(cached) $ac_c" 1>&6
8644 cat > conftest.$ac_ext <<EOF
8645 #line 8657 "configure"
8646 #include "confdefs.h"
8647 #include <X11/extensions/readdisplay.h>
8649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8650 { (eval echo configure:8662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8652 if test -z "$ac_err"; then
8654 eval "ac_cv_header_$ac_safe=yes"
8657 echo "configure: failed program was:" >&5
8658 cat conftest.$ac_ext >&5
8660 eval "ac_cv_header_$ac_safe=no"
8664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8665 echo "$ac_t""yes" 1>&6
8666 cat >> confdefs.h <<\EOF
8667 #define HAVE_READ_DISPLAY_EXTENSION 1
8671 echo "$ac_t""no" 1>&6
8674 CPPFLAGS="$ac_save_CPPFLAGS"
8675 elif test "$with_readdisplay" != no; then
8676 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8681 ###############################################################################
8683 # Check for the SGI Iris Video Library.
8685 ###############################################################################
8688 with_sgivideo_req=unspecified
8689 # Check whether --with-sgivideo or --without-sgivideo was given.
8690 if test "${with_sgivideo+set}" = set; then
8691 withval="$with_sgivideo"
8692 with_sgivideo="$withval"; with_sgivideo_req="$withval"
8699 case "$with_sgivideo" in
8704 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
8705 echo "configure:8717: checking for Iris Video headers" >&5
8706 d=$with_sgivideo/include
8708 X_CFLAGS="-I$d $X_CFLAGS"
8709 echo "$ac_t""$d" 1>&6
8711 echo "$ac_t""not found ($d: no such directory)" 1>&6
8714 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
8715 echo "configure:8727: checking for Iris Video libs" >&5
8716 d=$with_sgivideo/lib
8718 X_LIBS="-L$d $X_LIBS"
8719 echo "$ac_t""$d" 1>&6
8721 echo "$ac_t""not found ($d: no such directory)" 1>&6
8724 # replace the directory string with "yes".
8725 with_sgivideo_req="yes"
8726 with_sgivideo=$with_sgivideo_req
8731 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
8732 echo " If it is a directory, then \`DIR/include' will be added to"
8733 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8739 if test "$with_sgivideo" = yes; then
8741 ac_save_CPPFLAGS="$CPPFLAGS"
8742 if test \! -z "$includedir" ; then
8743 CPPFLAGS="$CPPFLAGS -I$includedir"
8745 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8746 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
8747 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
8748 echo "configure:8760: checking for dmedia/vl.h" >&5
8749 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8750 echo $ac_n "(cached) $ac_c" 1>&6
8752 cat > conftest.$ac_ext <<EOF
8753 #line 8765 "configure"
8754 #include "confdefs.h"
8755 #include <dmedia/vl.h>
8757 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8758 { (eval echo configure:8770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8759 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8760 if test -z "$ac_err"; then
8762 eval "ac_cv_header_$ac_safe=yes"
8765 echo "configure: failed program was:" >&5
8766 cat conftest.$ac_ext >&5
8768 eval "ac_cv_header_$ac_safe=no"
8772 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8773 echo "$ac_t""yes" 1>&6
8776 echo "$ac_t""no" 1>&6
8779 CPPFLAGS="$ac_save_CPPFLAGS"
8780 if test "$have_sgivideo" = yes; then
8782 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
8783 echo "configure:8795: checking for vlOpenVideo in -lvl" >&5
8784 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
8785 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8786 echo $ac_n "(cached) $ac_c" 1>&6
8788 ac_save_LIBS="$LIBS"
8790 cat > conftest.$ac_ext <<EOF
8791 #line 8803 "configure"
8792 #include "confdefs.h"
8793 /* Override any gcc2 internal prototype to avoid an error. */
8794 /* We use char because int might match the return type of a gcc2
8795 builtin and then its argument prototype would still apply. */
8802 if { (eval echo configure:8814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8804 eval "ac_cv_lib_$ac_lib_var=yes"
8806 echo "configure: failed program was:" >&5
8807 cat conftest.$ac_ext >&5
8809 eval "ac_cv_lib_$ac_lib_var=no"
8812 LIBS="$ac_save_LIBS"
8815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8816 echo "$ac_t""yes" 1>&6
8819 echo "$ac_t""no" 1>&6
8822 if test "$have_sgivideo" = yes; then
8823 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
8824 SGI_VIDEO_LIBS="-lvl"
8825 cat >> confdefs.h <<\EOF
8826 #define HAVE_SGI_VIDEO 1
8831 elif test "$with_sgivideo" != no; then
8832 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
8837 ###############################################################################
8839 # Check for a program to generate random text.
8841 # Zippy is funnier than the idiocy generally spat out by `fortune',
8842 # so try to find that, by invoking Emacs and asking it where its
8843 # libexec directory is ("yow" lives in there.)
8845 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8846 # and if so, use them.
8848 # If that doesn't work, look in /usr/games, and if it's there, use
8849 # the full pathname.
8851 ###############################################################################
8854 # Check whether --with-zippy or --without-zippy was given.
8855 if test "${with_zippy+set}" = set; then
8856 withval="$with_zippy"
8857 with_zippy_req="$withval"; with_zippy="$withval"
8863 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8868 if test -n "$with_zippy_req" ; then
8869 ac_cv_zippy_program=""
8870 case "$with_zippy_req" in
8872 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8873 echo "configure:8885: checking for $with_zippy_req" >&5
8874 if test -x "$with_zippy_req" ; then
8875 echo "$ac_t""yes" 1>&6
8877 echo "$ac_t""no" 1>&6
8883 unset ac_cv_path_zip2
8884 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8885 set dummy $with_zippy_req; ac_word=$2
8886 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8887 echo "configure:8899: checking for $ac_word" >&5
8888 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8889 echo $ac_n "(cached) $ac_c" 1>&6
8893 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8896 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
8899 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8901 for ac_dir in $ac_dummy; do
8902 test -z "$ac_dir" && ac_dir=.
8903 if test -f $ac_dir/$ac_word; then
8904 ac_cv_path_zip2="$ac_dir/$ac_word"
8912 zip2="$ac_cv_path_zip2"
8913 if test -n "$zip2"; then
8914 echo "$ac_t""$zip2" 1>&6
8916 echo "$ac_t""no" 1>&6
8919 if test "$zip2" = ""; then
8924 ac_cv_zippy_program="$with_zippy"
8926 elif test -n "$ac_cv_zippy_program"; then
8927 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
8930 if test ! -n "$ac_cv_zippy_program"; then
8932 for ac_prog in emacs
8934 # Extract the first word of "$ac_prog", so it can be a program name with args.
8935 set dummy $ac_prog; ac_word=$2
8936 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8937 echo "configure:8949: checking for $ac_word" >&5
8938 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
8939 echo $ac_n "(cached) $ac_c" 1>&6
8941 if test -n "$emacs_exe"; then
8942 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
8944 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8946 for ac_dir in $ac_dummy; do
8947 test -z "$ac_dir" && ac_dir=.
8948 if test -f $ac_dir/$ac_word; then
8949 ac_cv_prog_emacs_exe="$ac_prog"
8956 emacs_exe="$ac_cv_prog_emacs_exe"
8957 if test -n "$emacs_exe"; then
8958 echo "$ac_t""$emacs_exe" 1>&6
8960 echo "$ac_t""no" 1>&6
8963 test -n "$emacs_exe" && break
8966 for ac_prog in xemacs
8968 # Extract the first word of "$ac_prog", so it can be a program name with args.
8969 set dummy $ac_prog; ac_word=$2
8970 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8971 echo "configure:8983: checking for $ac_word" >&5
8972 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
8973 echo $ac_n "(cached) $ac_c" 1>&6
8975 if test -n "$xemacs_exe"; then
8976 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
8978 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8980 for ac_dir in $ac_dummy; do
8981 test -z "$ac_dir" && ac_dir=.
8982 if test -f $ac_dir/$ac_word; then
8983 ac_cv_prog_xemacs_exe="$ac_prog"
8990 xemacs_exe="$ac_cv_prog_xemacs_exe"
8991 if test -n "$xemacs_exe"; then
8992 echo "$ac_t""$xemacs_exe" 1>&6
8994 echo "$ac_t""no" 1>&6
8997 test -n "$xemacs_exe" && break
9001 ac_cv_zippy_program=""
9002 eargs='-batch -q -nw --eval'
9004 if test -n "$emacs_exe" ; then
9005 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
9006 echo "configure:9018: checking for emacs yow" >&5
9008 # get emacs to tell us where the libexec directory is.
9010 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
9011 2>/dev/null | tail -1`
9012 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
9014 # try running libexec/yow and see if it exits without error.
9016 if test x"$dir" != x -a -x "$dir/yow" ; then
9017 if $dir/yow >&- 2>&- ; then
9018 ac_cv_zippy_program="$dir/yow"
9019 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9021 echo "$ac_t""no" 1>&6
9026 if test -z "$ac_cv_zippy_program" ; then
9027 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
9028 echo "configure:9040: checking for xemacs yow" >&5
9029 if test -n "$xemacs_exe" ; then
9031 # get xemacs to tell us where the libexec directory is.
9033 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
9034 2>/dev/null | tail -1`
9035 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
9037 # try running libexec/yow and see if it exits without error.
9039 if test x"$dir" != x -a -x "$dir/yow" ; then
9040 if $dir/yow >&- 2>&- ; then
9041 ac_cv_zippy_program="$dir/yow"
9042 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9045 # in some xemacs installations, the pathname of the yow.lines file
9046 # isn't hardcoded into the yow executable, and must be passed on
9047 # the command line. See if it's in libexec/../etc/.
9051 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
9054 yowlines="$dir_up/etc/yow.lines"
9055 if $dir/yow -f $yowlines >&- 2>&- ; then
9056 ac_cv_zippy_program="$dir/yow -f $yowlines"
9057 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9060 # In newer XEmacs releases, yow.lines is in a different place,
9061 # and the easiest way to get it is by calling the new function
9062 # `locate-data-file'.
9064 yowlines=`$xemacs_exe $eargs \
9065 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
9066 2>/dev/null | tail -1`
9067 if $dir/yow -f $yowlines >&- 2>&- ; then
9068 ac_cv_zippy_program="$dir/yow -f $yowlines"
9069 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9071 echo "$ac_t""no" 1>&6
9079 # if that didn't work, try for some other programs...
9080 if test -z "$ac_cv_zippy_program" ; then
9082 for ac_prog in fortune zippy yow
9084 # Extract the first word of "$ac_prog", so it can be a program name with args.
9085 set dummy $ac_prog; ac_word=$2
9086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9087 echo "configure:9099: checking for $ac_word" >&5
9088 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
9089 echo $ac_n "(cached) $ac_c" 1>&6
9091 if test -n "$fortune"; then
9092 ac_cv_prog_fortune="$fortune" # Let the user override the test.
9094 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9096 for ac_dir in $ac_dummy; do
9097 test -z "$ac_dir" && ac_dir=.
9098 if test -f $ac_dir/$ac_word; then
9099 ac_cv_prog_fortune="$ac_prog"
9106 fortune="$ac_cv_prog_fortune"
9107 if test -n "$fortune"; then
9108 echo "$ac_t""$fortune" 1>&6
9110 echo "$ac_t""no" 1>&6
9113 test -n "$fortune" && break
9116 # if that didn't work, try for those programs in /usr/games...
9117 if test -z "$fortune" ; then
9118 for ac_prog in fortune zippy yow
9120 # Extract the first word of "$ac_prog", so it can be a program name with args.
9121 set dummy $ac_prog; ac_word=$2
9122 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9123 echo "configure:9135: checking for $ac_word" >&5
9124 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
9125 echo $ac_n "(cached) $ac_c" 1>&6
9129 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
9132 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
9135 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9136 ac_dummy="/usr/games:/usr/local/games:$PATH"
9137 for ac_dir in $ac_dummy; do
9138 test -z "$ac_dir" && ac_dir=.
9139 if test -f $ac_dir/$ac_word; then
9140 ac_cv_path_fortune="$ac_dir/$ac_word"
9148 fortune="$ac_cv_path_fortune"
9149 if test -n "$fortune"; then
9150 echo "$ac_t""$fortune" 1>&6
9152 echo "$ac_t""no" 1>&6
9155 test -n "$fortune" && break
9157 test -n "$fortune" || fortune="fortune"
9163 if test -z "$ac_cv_zippy_program" ; then
9164 ac_cv_zippy_program=fortune
9167 cat >> confdefs.h <<EOF
9168 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
9173 ###############################################################################
9175 # Check whether it's ok to install some hacks as setuid (e.g., "sonar")
9176 # This should be safe, but let's give people the option.
9178 ###############################################################################
9180 setuid_hacks_default=no
9181 setuid_hacks="$setuid_hacks_default"
9182 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
9183 if test "${with_setuid_hacks+set}" = set; then
9184 withval="$with_setuid_hacks"
9185 setuid_hacks="$withval"
9187 setuid_hacks="$setuid_hacks_default"
9192 case "$setuid_hacks" in
9197 echo $ac_n "checking for setuid hacks headers""... $ac_c" 1>&6
9198 echo "configure:9210: checking for setuid hacks headers" >&5
9199 d=$setuid_hacks/include
9201 X_CFLAGS="-I$d $X_CFLAGS"
9202 echo "$ac_t""$d" 1>&6
9204 echo "$ac_t""not found ($d: no such directory)" 1>&6
9207 echo $ac_n "checking for setuid hacks libs""... $ac_c" 1>&6
9208 echo "configure:9220: checking for setuid hacks libs" >&5
9211 X_LIBS="-L$d $X_LIBS"
9212 echo "$ac_t""$d" 1>&6
9214 echo "$ac_t""not found ($d: no such directory)" 1>&6
9217 # replace the directory string with "yes".
9218 setuid_hacks_req="yes"
9219 setuid_hacks=$setuid_hacks_req
9224 echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
9225 echo " If it is a directory, then \`DIR/include' will be added to"
9226 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9232 if test "$setuid_hacks" = yes; then
9234 elif test "$setuid_hacks" != no; then
9235 echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
9240 ###############################################################################
9242 # Done testing. Now, set up the various -I and -L variables,
9243 # and decide which GUI program to build by default.
9245 ###############################################################################
9252 if test \! -z "$includedir" ; then
9253 INCLUDES="$INCLUDES -I$includedir"
9256 if test \! -z "$libdir" ; then
9257 LDFLAGS="$LDFLAGS -L$libdir"
9261 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9263 if test "$have_motif" = yes; then
9264 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9265 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9267 if test "$have_gtk" = yes; then
9268 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
9269 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9273 if test "$have_kerberos" = yes; then
9274 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
9275 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
9277 if test "$have_pam" = yes; then
9278 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
9279 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
9280 INSTALL_PAM="install-pam"
9282 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
9283 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
9286 if test "$enable_locking" = yes; then
9287 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
9288 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
9290 LOCK_SRCS='$(NOLOCK_SRCS_1)'
9291 LOCK_OBJS='$(NOLOCK_OBJS_1)'
9294 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
9296 if test "$need_setuid" = yes; then
9302 if test "$setuid_hacks" = yes; then
9309 if test "$have_gl" = yes; then
9310 GL_EXES='$(GL_EXES)'
9314 GL_KLUDGE="-${tab} "
9317 if test "$have_gle" = yes; then
9318 GLE_EXES='$(GLE_EXES)'
9319 GLE_MEN='$(GLE_MEN)'
9320 GLE_KLUDGE="${tab} "
9322 GLE_KLUDGE="-${tab} "
9326 ###############################################################################
9328 # Perform substitutions and write Makefiles.
9330 ###############################################################################
9371 APPDEFAULTS=$ac_x_app_defaults
9380 cat > confcache <<\EOF
9381 # This file is a shell script that caches the results of configure
9382 # tests run on this system so they can be shared between configure
9383 # scripts and configure runs. It is not useful on other systems.
9384 # If it contains results you don't want to keep, you may remove or edit it.
9386 # By default, configure uses ./config.cache as the cache file,
9387 # creating it if it does not exist already. You can give configure
9388 # the --cache-file=FILE option to use a different cache file; that is
9389 # what configure does when it calls configure scripts in
9390 # subdirectories, so they share the cache.
9391 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9392 # config.status only pays attention to the cache file if you give it the
9393 # --recheck option to rerun configure.
9396 # The following way of writing the cache mishandles newlines in values,
9397 # but we know of no workaround that is simple, portable, and efficient.
9398 # So, don't put newlines in cache variables' values.
9399 # Ultrix sh set writes to stderr and can't be redirected directly,
9400 # and sets the high bit in the cache file unless we assign to the vars.
9402 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9404 # `set' does not quote correctly, so add quotes (double-quote substitution
9405 # turns \\\\ into \\, and sed turns \\ into \).
9407 -e "s/'/'\\\\''/g" \
9408 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9411 # `set' quotes correctly as required by POSIX, so do not add quotes.
9412 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9415 if cmp -s $cache_file confcache; then
9418 if test -w $cache_file; then
9419 echo "updating cache $cache_file"
9420 cat confcache > $cache_file
9422 echo "not updating unwritable cache $cache_file"
9427 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9429 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9430 # Let make expand exec_prefix.
9431 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9433 # Any assignment to VPATH causes Sun make to only execute
9434 # the first set of double-colon rules, so remove it if not needed.
9435 # If there is a colon in the path, we need to keep it.
9436 if test "x$srcdir" = x.; then
9437 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9440 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9442 DEFS=-DHAVE_CONFIG_H
9444 # Without the "./", some shells look in PATH for config.status.
9445 : ${CONFIG_STATUS=./config.status}
9447 echo creating $CONFIG_STATUS
9448 rm -f $CONFIG_STATUS
9449 cat > $CONFIG_STATUS <<EOF
9451 # Generated automatically by configure.
9452 # Run this file to recreate the current configuration.
9453 # This directory was configured as follows,
9454 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9456 # $0 $ac_configure_args
9458 # Compiler output produced by configure, useful for debugging
9459 # configure, is in ./config.log if it exists.
9461 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9464 case "\$ac_option" in
9465 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9466 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9467 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9468 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9469 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9471 -help | --help | --hel | --he | --h)
9472 echo "\$ac_cs_usage"; exit 0 ;;
9473 *) echo "\$ac_cs_usage"; exit 1 ;;
9477 ac_given_srcdir=$srcdir
9478 ac_given_INSTALL="$INSTALL"
9480 trap 'rm -fr `echo "Makefile
9485 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9487 cat >> $CONFIG_STATUS <<EOF
9489 # Protect against being on the right side of a sed subst in config.status.
9490 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9491 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9495 s%@CFLAGS@%$CFLAGS%g
9496 s%@CPPFLAGS@%$CPPFLAGS%g
9497 s%@CXXFLAGS@%$CXXFLAGS%g
9498 s%@FFLAGS@%$FFLAGS%g
9500 s%@LDFLAGS@%$LDFLAGS%g
9502 s%@exec_prefix@%$exec_prefix%g
9503 s%@prefix@%$prefix%g
9504 s%@program_transform_name@%$program_transform_name%g
9505 s%@bindir@%$bindir%g
9506 s%@sbindir@%$sbindir%g
9507 s%@libexecdir@%$libexecdir%g
9508 s%@datadir@%$datadir%g
9509 s%@sysconfdir@%$sysconfdir%g
9510 s%@sharedstatedir@%$sharedstatedir%g
9511 s%@localstatedir@%$localstatedir%g
9512 s%@libdir@%$libdir%g
9513 s%@includedir@%$includedir%g
9514 s%@oldincludedir@%$oldincludedir%g
9515 s%@infodir@%$infodir%g
9516 s%@mandir@%$mandir%g
9518 s%@host_alias@%$host_alias%g
9519 s%@host_cpu@%$host_cpu%g
9520 s%@host_vendor@%$host_vendor%g
9521 s%@host_os@%$host_os%g
9524 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9525 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9526 s%@INSTALL_DATA@%$INSTALL_DATA%g
9527 s%@SET_MAKE@%$SET_MAKE%g
9529 s%@X_CFLAGS@%$X_CFLAGS%g
9530 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9531 s%@X_LIBS@%$X_LIBS%g
9532 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9533 s%@glib_config@%$glib_config%g
9534 s%@gtk_config@%$gtk_config%g
9535 s%@gnome_config@%$gnome_config%g
9537 s%@emacs_exe@%$emacs_exe%g
9538 s%@xemacs_exe@%$xemacs_exe%g
9539 s%@fortune@%$fortune%g
9540 s%@INCLUDES@%$INCLUDES%g
9541 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
9542 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
9543 s%@SAVER_LIBS@%$SAVER_LIBS%g
9544 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
9545 s%@GTK_LIBS@%$GTK_LIBS%g
9546 s%@HACK_LIBS@%$HACK_LIBS%g
9547 s%@XPM_LIBS@%$XPM_LIBS%g
9548 s%@GL_LIBS@%$GL_LIBS%g
9549 s%@GLE_LIBS@%$GLE_LIBS%g
9550 s%@XDPMS_LIBS@%$XDPMS_LIBS%g
9551 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
9552 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
9553 s%@SETUID_HACKS@%$SETUID_HACKS%g
9554 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
9555 s%@NEED_SETUID@%$NEED_SETUID%g
9556 s%@INSTALL_PAM@%$INSTALL_PAM%g
9557 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
9558 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
9559 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
9560 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
9561 s%@XMU_SRCS@%$XMU_SRCS%g
9562 s%@XMU_OBJS@%$XMU_OBJS%g
9563 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
9564 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
9565 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
9566 s%@LOCK_SRCS@%$LOCK_SRCS%g
9567 s%@LOCK_OBJS@%$LOCK_OBJS%g
9568 s%@GL_EXES@%$GL_EXES%g
9569 s%@GL_MEN@%$GL_MEN%g
9570 s%@GL_KLUDGE@%$GL_KLUDGE%g
9571 s%@GLE_EXES@%$GLE_EXES%g
9572 s%@GLE_MEN@%$GLE_MEN%g
9573 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
9574 s%@HACKDIR@%$HACKDIR%g
9575 s%@GNOME_DATADIR@%$GNOME_DATADIR%g
9576 s%@APPDEFAULTS@%$APPDEFAULTS%g
9577 s%@DEPEND@%$DEPEND%g
9578 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
9579 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
9584 cat >> $CONFIG_STATUS <<\EOF
9586 # Split the substitutions into bite-sized pieces for seds with
9587 # small command number limits, like on Digital OSF/1 and HP-UX.
9588 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9589 ac_file=1 # Number of current file.
9590 ac_beg=1 # First line for current file.
9591 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9594 while $ac_more_lines; do
9595 if test $ac_beg -gt 1; then
9596 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9598 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9600 if test ! -s conftest.s$ac_file; then
9602 rm -f conftest.s$ac_file
9604 if test -z "$ac_sed_cmds"; then
9605 ac_sed_cmds="sed -f conftest.s$ac_file"
9607 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9609 ac_file=`expr $ac_file + 1`
9611 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9614 if test -z "$ac_sed_cmds"; then
9619 cat >> $CONFIG_STATUS <<EOF
9621 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9626 driver/XScreenSaver.ad"}
9628 cat >> $CONFIG_STATUS <<\EOF
9629 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9630 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9632 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9633 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9634 *) ac_file_in="${ac_file}.in" ;;
9637 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9639 # Remove last slash and all that follows it. Not all systems have dirname.
9640 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9641 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9642 # The file is in a subdirectory.
9643 test ! -d "$ac_dir" && mkdir "$ac_dir"
9644 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9645 # A "../" for each directory in $ac_dir_suffix.
9646 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9648 ac_dir_suffix= ac_dots=
9651 case "$ac_given_srcdir" in
9653 if test -z "$ac_dots"; then top_srcdir=.
9654 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9655 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9657 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9658 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9661 case "$ac_given_INSTALL" in
9662 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9663 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9666 echo creating "$ac_file"
9668 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9670 *Makefile*) ac_comsub="1i\\
9671 # $configure_input" ;;
9675 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9677 s%@configure_input@%$configure_input%g
9678 s%@srcdir@%$srcdir%g
9679 s%@top_srcdir@%$top_srcdir%g
9680 s%@INSTALL@%$INSTALL%g
9681 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9685 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9686 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9688 # ac_d sets the value in "#define NAME VALUE" lines.
9689 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9690 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9693 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9694 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9695 ac_uB='\([ ]\)%\1#\2define\3'
9698 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9699 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9700 ac_eB='$%\1#\2define\3'
9704 if test "${CONFIG_HEADERS+set}" != set; then
9706 cat >> $CONFIG_STATUS <<EOF
9707 CONFIG_HEADERS="config.h"
9709 cat >> $CONFIG_STATUS <<\EOF
9711 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9712 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9714 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9715 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9716 *) ac_file_in="${ac_file}.in" ;;
9719 echo creating $ac_file
9721 rm -f conftest.frag conftest.in conftest.out
9722 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9723 cat $ac_file_inputs > conftest.in
9727 # Transform confdefs.h into a sed script conftest.vals that substitutes
9728 # the proper values into config.h.in to produce config.h. And first:
9729 # Protect against being on the right side of a sed subst in config.status.
9730 # Protect against being in an unquoted here document in config.status.
9732 cat > conftest.hdr <<\EOF
9735 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9739 sed -n -f conftest.hdr confdefs.h > conftest.vals
9742 # This sed command replaces #undef with comments. This is necessary, for
9743 # example, in the case of _POSIX_SOURCE, which is predefined and required
9744 # on some systems where configure will not decide to define it.
9745 cat >> conftest.vals <<\EOF
9746 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9749 # Break up conftest.vals because some shells have a limit on
9750 # the size of here documents, and old seds have small limits too.
9755 ac_lines=`grep -c . conftest.vals`
9756 # grep -c gives empty output for an empty file on some AIX systems.
9757 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9758 # Write a limited-size here document to conftest.frag.
9759 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9760 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9762 sed -f conftest.frag conftest.in > conftest.out
9764 mv conftest.out conftest.in
9766 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9768 mv conftest.tail conftest.vals
9772 cat >> $CONFIG_STATUS <<\EOF
9773 rm -f conftest.frag conftest.h
9774 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9775 cat conftest.in >> conftest.h
9777 if cmp -s $ac_file conftest.h 2>/dev/null; then
9778 echo "$ac_file is unchanged"
9781 # Remove last slash and all that follows it. Not all systems have dirname.
9782 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9783 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9784 # The file is in a subdirectory.
9785 test ! -d "$ac_dir" && mkdir "$ac_dir"
9788 mv conftest.h $ac_file
9793 cat >> $CONFIG_STATUS <<EOF
9796 cat >> $CONFIG_STATUS <<\EOF
9800 chmod +x $CONFIG_STATUS
9801 rm -fr confdefs* $ac_clean_files
9802 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9805 ###############################################################################
9807 # Print some warnings at the end.
9809 ###############################################################################
9811 warn_prefix_1=" Warning:"
9812 warn_prefix_2=" Note:"
9813 warn_prefix="$warn_prefix_1"
9816 warnsep=' #################################################################'
9819 if test "$warning" = no ; then
9820 echo '' ; echo "$warnsep" ; echo ''
9827 if test "$warning" = long ; then echo '' ; fi
9830 echo "$warn_prefix $rest"
9837 if test "$was" != no ; then echo '' ; fi
9839 echo "$warn_prefix $rest"
9849 warn_prefix="$warn_prefix_2"
9851 warn_prefix="$warn_prefix_1"
9855 warn_prefix="$warn_prefix_2"
9857 warn_prefix="$warn_prefix_1"
9861 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9862 warn 'The SGI saver extension was requested, but was not found.'
9865 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9866 warn 'The MIT saver extension was requested, but was not found.'
9869 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9870 warn 'The XIdle extension was requested, but was not found.'
9873 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9874 warn 'The XSHM extension was requested, but was not found.'
9877 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9878 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9881 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9882 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9885 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9886 warn 'The DPMS extension was requested, but was not found.'
9889 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9890 warn 'The XF86VMODE extension was requested, but was not found.'
9893 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9894 warn "Checking of /proc/interrupts was requested, but it's bogus."
9898 if test "$have_motif" = no -a "$have_gtk" = no; then
9899 warnL "Neither Motif nor Gtk seem to be available;"
9900 warn2 "the \`xscreensaver-demo' program requires one of these."
9902 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9903 warnL "Use of Motif was requested, but it wasn't found;"
9904 warn2 "Gtk will be used instead."
9906 elif test "$jurassic_gtk" = yes ; then
9910 v="$ac_gtk_version_string"
9911 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
9912 warnL "Use of Gtk was requested, but its version number is unknown;"
9913 elif test "$with_gtk_req" = yes ; then
9914 warnL "Use of Gtk was requested, but it is version $v;"
9916 warnL "Gtk was found on this system, but it is version $v;"
9919 warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
9921 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
9922 warnL "Use of Gtk was requested, but it wasn't found;"
9923 warn2 "Motif will be used instead."
9928 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
9929 warn 'Use of the Gnome Control Panel was requested, but the necessary'
9930 warn2 'headers and/or libraries were not found.'
9934 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
9936 preferred_lesstif=0.86
9938 if test "$lesstif_version" = unknown; then
9939 warnL "Unable to determine the LessTif version number!"
9940 warn2 "Make sure you are using version $preferred_lesstif or newer."
9941 warn2 "See <http://www.lesstif.org/>."
9943 elif test \! $lesstif_version -gt 82; then
9944 warnL "LessTif version $lesstif_version_string is being used."
9945 warn2 "LessTif versions 0.82 and earlier are too buggy to"
9946 warn2 "use with XScreenSaver; it is strongly recommended"
9947 warn2 "that you upgrade to at least version $preferred_lesstif!"
9948 warn2 "See <http://www.lesstif.org/>."
9954 if test "$have_xpm" = no ; then
9955 if test "$with_xpm_req" = yes ; then
9956 warnL 'Use of XPM was requested, but it was not found.'
9957 elif test "$with_xpm_req" = no ; then
9958 noteL 'The XPM library is not being used.'
9960 noteL 'The XPM library was not found.'
9964 warn2 'Some of the demos will not be as colorful as they'
9965 warn2 'could be. You might want to consider installing XPM'
9966 warn2 'and re-running configure. (Remember to delete the'
9967 warn2 'config.cache file first.) You can find XPM at most'
9968 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
9972 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
9973 preferred_mesagl=3.0
9975 if test "$ac_mesagl_version" = unknown; then
9976 warnL "Unable to determine the MesaGL version number!"
9977 warn2 "Make sure you are using version $preferred_mesagl or newer."
9979 elif test \! "$ac_mesagl_version" -gt 2006; then
9980 warnL "MesaGL version $ac_mesagl_version_string is being used."
9981 warn2 "MesaGL versions 2.6 and earlier have a security bug."
9982 warn2 "It is strongly recommended that you upgrade to at"
9983 warn2 "least version $preferred_mesagl."
9987 if test "$have_gl" = no ; then
9988 if test "$with_gl_req" = yes ; then
9989 warnL 'Use of GL was requested, but it was not found.'
9990 elif test "$with_gl_req" = no ; then
9991 noteL 'The OpenGL 3D library is not being used.'
9993 noteL 'The OpenGL 3D library was not found.'
9996 if test "$gl_halfassed" = yes ; then
9998 warn2 'More specifically, we found the headers, but not the'
9999 warn2 'libraries; so either GL is half-installed on this'
10000 warn2 "system, or something else went wrong. The \`config.log'"
10001 warn2 'file might contain some clues.'
10005 warn2 'Those demos which use 3D will not be built or installed.'
10006 warn2 'You might want to consider installing OpenGL and'
10007 warn2 're-running configure. (Remember to delete the'
10008 warn2 "config.cache file first.) If your vendor doesn't ship"
10009 warn2 'their own implementation of OpenGL, you can get a free'
10010 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
10011 warn2 'info, see <http://www.opengl.org/>.'
10016 if test "$have_gl" = yes -a "$have_gle" = no ; then
10017 if test "$with_gle_req" = yes ; then
10018 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
10019 warn2 'it was not found (though the OpenGL library was found, and'
10020 warn2 'is being used.)'
10021 elif test "$with_gle_req" = no ; then
10022 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
10023 warn2 'library is not.'
10025 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
10029 if test "$gle_halfassed" = yes ; then
10031 warn2 'More specifically, we found the headers, but not the'
10032 warn2 'libraries; so either GLE is half-installed on this'
10033 warn2 "system, or something else went wrong. The \`config.log'"
10034 warn2 'file might contain some clues.'
10038 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
10039 warn2 'will not be built or installed. You might want to consider'
10040 warn2 'installing GLE and re-running configure. (Remember to delete'
10041 warn2 'the config.cache file first.) You can find the GLE library'
10042 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
10043 warn2 'see <http://www.opengl.org/>.'
10048 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
10049 warn 'Use of XReadDisplay was requested, but it was not found.'
10052 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
10053 warn 'Use of the Iris Video Library was requested, but it was not found.'
10056 if test -n "$with_zippy_req"; then
10057 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
10058 warnL "$with_zippy_req was requested as the Zippy program,"
10059 warn2 "but was not found. The default will be used instead."
10063 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
10064 warn 'Use of Kerberos was requested, but it was not found.'
10067 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
10068 warn 'Use of PAM was requested, but it was not found.'
10071 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
10072 warn 'Use of shadow passwords was requested, but they were not found.'
10076 # You are in a twisty maze of namespaces and syntaxes, all alike.
10077 # Fuck the skull of Unix.
10079 eval bindir=${bindir}
10080 eval bindir=${bindir}
10081 eval bindir=${bindir}
10082 eval bindir=${bindir}
10083 eval bindir=${bindir}
10084 eval bindir=${bindir}
10085 eval HACKDIR=${HACKDIR}
10086 eval HACKDIR=${HACKDIR}
10087 eval HACKDIR=${HACKDIR}
10088 eval HACKDIR=${HACKDIR}
10089 eval HACKDIR=${HACKDIR}
10090 eval HACKDIR=${HACKDIR}
10092 # canonicalize slashes.
10093 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
10094 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10097 # Sanity check the subdir
10098 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
10099 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
10101 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
10102 There will be an executable installed with that name, so
10103 that can't be the name of a directory as well. Please
10104 re-configure with a different directory name." 1>&2; exit 1; }
10111 # Now let's see if there's a previous RPM version already installed. Blargh!
10115 rpmv=`(rpm -qv xscreensaver) 2>&- | \
10116 sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/'`
10119 if test \! -z "$rpmv" ; then
10120 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
10121 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
10124 warnL "There is already an installed RPM of xscreensaver $rpmv"
10125 warn2 "on this system. You might want to remove it (with"
10126 warn2 '"rpm -ve xscreensaver") before running "make install"'
10127 warn2 "from this directory."
10129 warn2 "Alternately, you could build this version of xscreensaver"
10130 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
10131 warn2 "file is included. See the RPM documentation for more info."
10134 if test "$rpmbdir" = "$rpmhdir" ; then
10135 warn2 "The RPM version was installed in $rpmbdir."
10137 warn2 "The RPM version was installed in $rpmbdir,"
10138 warn2 "with demos in $rpmhdir."
10145 # Warn about egregious GNOME bogosity.
10147 #if (rpm -qv control-center) >&- 2>&- ; then
10149 # warnL "The Gnome Control Center seems to be installed."
10151 # warn2 "Note that simply installing this version of xscreensaver"
10152 # warn2 "will not cause GNOME to know about the newly-added display"
10153 # warn2 "modes -- GNOME is just lame that way. Instead of using the"
10154 # warn2 "Control Center, try using the \`xscreensaver-demo' command."
10158 if test "${bindir}" = "${HACKDIR}" ; then
10162 if test "$do_dir_warning" = yes; then
10166 echo ' When you run "make install", the "xscreensaver",'
10167 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
10168 echo " will be installed in ${bindir}."
10170 echo " The various graphics demos (120+ different executables) will"
10171 echo " also be installed in ${HACKDIR}."
10173 echo " If you would prefer the demos to be installed elsewhere"
10174 echo " (for example, in a dedicated directory) you should re-run"
10175 echo " configure with the --enable-subdir=DIR option. For more"
10176 echo " information, run $0 --help."
10180 if test "$warning" != no; then
10181 echo '' ; echo "$warnsep" ; echo ''