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-xf86gamma-ext Include support for XFree86 gamma fading."
56 --with-proc-interrupts Include support for consulting the /proc/interrupts
57 file to notice keyboard activity."
60 Screen locking options:
62 --enable-locking Compile in support for locking the display.
63 --disable-locking Do not allow locking at all.
66 --with-pam Include support for PAM (Pluggable Auth Modules.)"
68 --with-kerberos Include support for Kerberos authentication."
70 --with-shadow Include support for shadow password authentication."
73 User interface options:
75 --with-motif Use the Motif toolkit for the user interface."
77 --with-gtk Use the Gtk toolkit for the user interface."
79 --with-gnome Include support for the Gnome Control Center."
84 --with-gl Build those demos which depend on OpenGL."
86 --with-gle Build those demos which depend on GLE
87 (the OpenGL "extrusion" library.)"
89 --with-xpm Include support for XPM files in some demos."
91 --with-xshm-ext Include support for the XSHM extension."
93 --with-xdbe-ext Include support for the DOUBLE-BUFFER extension."
95 --with-readdisplay Include support for the XReadDisplay extension."
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 -ieee" 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}"
1529 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
1530 # That's wrong: it should be set to '${INSTALL}', so that one can
1531 # implement the "install-strip" target properly (strip executables,
1532 # but do not try to strip scripts.)
1534 INSTALL_SCRIPT='${INSTALL}'
1537 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1538 echo "configure:1550: checking for ANSI C header files" >&5
1539 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1540 echo $ac_n "(cached) $ac_c" 1>&6
1542 cat > conftest.$ac_ext <<EOF
1543 #line 1555 "configure"
1544 #include "confdefs.h"
1550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1551 { (eval echo configure:1563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1553 if test -z "$ac_err"; then
1555 ac_cv_header_stdc=yes
1558 echo "configure: failed program was:" >&5
1559 cat conftest.$ac_ext >&5
1561 ac_cv_header_stdc=no
1565 if test $ac_cv_header_stdc = yes; then
1566 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1567 cat > conftest.$ac_ext <<EOF
1568 #line 1580 "configure"
1569 #include "confdefs.h"
1572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1573 egrep "memchr" >/dev/null 2>&1; then
1577 ac_cv_header_stdc=no
1583 if test $ac_cv_header_stdc = yes; then
1584 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1585 cat > conftest.$ac_ext <<EOF
1586 #line 1598 "configure"
1587 #include "confdefs.h"
1590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1591 egrep "free" >/dev/null 2>&1; then
1595 ac_cv_header_stdc=no
1601 if test $ac_cv_header_stdc = yes; then
1602 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1603 if test "$cross_compiling" = yes; then
1606 cat > conftest.$ac_ext <<EOF
1607 #line 1619 "configure"
1608 #include "confdefs.h"
1610 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1611 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1612 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1613 int main () { int i; for (i = 0; i < 256; i++)
1614 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1618 if { (eval echo configure:1630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1622 echo "configure: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
1625 ac_cv_header_stdc=no
1633 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1634 if test $ac_cv_header_stdc = yes; then
1635 cat >> confdefs.h <<\EOF
1636 #define STDC_HEADERS 1
1641 for ac_hdr in unistd.h
1643 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1644 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1645 echo "configure:1657: checking for $ac_hdr" >&5
1646 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1647 echo $ac_n "(cached) $ac_c" 1>&6
1649 cat > conftest.$ac_ext <<EOF
1650 #line 1662 "configure"
1651 #include "confdefs.h"
1654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1655 { (eval echo configure:1667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1657 if test -z "$ac_err"; then
1659 eval "ac_cv_header_$ac_safe=yes"
1662 echo "configure: failed program was:" >&5
1663 cat conftest.$ac_ext >&5
1665 eval "ac_cv_header_$ac_safe=no"
1669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1670 echo "$ac_t""yes" 1>&6
1671 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1672 cat >> confdefs.h <<EOF
1673 #define $ac_tr_hdr 1
1677 echo "$ac_t""no" 1>&6
1681 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1682 echo "configure:1694: checking for mode_t" >&5
1683 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1684 echo $ac_n "(cached) $ac_c" 1>&6
1686 cat > conftest.$ac_ext <<EOF
1687 #line 1699 "configure"
1688 #include "confdefs.h"
1689 #include <sys/types.h>
1695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1696 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1698 ac_cv_type_mode_t=yes
1701 ac_cv_type_mode_t=no
1706 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1707 if test $ac_cv_type_mode_t = no; then
1708 cat >> confdefs.h <<\EOF
1714 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1715 echo "configure:1727: checking for pid_t" >&5
1716 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1717 echo $ac_n "(cached) $ac_c" 1>&6
1719 cat > conftest.$ac_ext <<EOF
1720 #line 1732 "configure"
1721 #include "confdefs.h"
1722 #include <sys/types.h>
1728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1729 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1731 ac_cv_type_pid_t=yes
1739 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1740 if test $ac_cv_type_pid_t = no; then
1741 cat >> confdefs.h <<\EOF
1747 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1748 echo "configure:1760: checking for size_t" >&5
1749 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1750 echo $ac_n "(cached) $ac_c" 1>&6
1752 cat > conftest.$ac_ext <<EOF
1753 #line 1765 "configure"
1754 #include "confdefs.h"
1755 #include <sys/types.h>
1761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1762 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1764 ac_cv_type_size_t=yes
1767 ac_cv_type_size_t=no
1772 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1773 if test $ac_cv_type_size_t = no; then
1774 cat >> confdefs.h <<\EOF
1775 #define size_t unsigned
1780 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1781 echo "configure:1793: checking return type of signal handlers" >&5
1782 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1783 echo $ac_n "(cached) $ac_c" 1>&6
1785 cat > conftest.$ac_ext <<EOF
1786 #line 1798 "configure"
1787 #include "confdefs.h"
1788 #include <sys/types.h>
1794 extern "C" void (*signal (int, void (*)(int)))(int);
1796 void (*signal ()) ();
1803 if { (eval echo configure:1815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1805 ac_cv_type_signal=void
1807 echo "configure: failed program was:" >&5
1808 cat conftest.$ac_ext >&5
1810 ac_cv_type_signal=int
1815 echo "$ac_t""$ac_cv_type_signal" 1>&6
1816 cat >> confdefs.h <<EOF
1817 #define RETSIGTYPE $ac_cv_type_signal
1821 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1822 echo "configure:1834: checking whether time.h and sys/time.h may both be included" >&5
1823 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1824 echo $ac_n "(cached) $ac_c" 1>&6
1826 cat > conftest.$ac_ext <<EOF
1827 #line 1839 "configure"
1828 #include "confdefs.h"
1829 #include <sys/types.h>
1830 #include <sys/time.h>
1836 if { (eval echo configure:1848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1838 ac_cv_header_time=yes
1840 echo "configure: failed program was:" >&5
1841 cat conftest.$ac_ext >&5
1843 ac_cv_header_time=no
1848 echo "$ac_t""$ac_cv_header_time" 1>&6
1849 if test $ac_cv_header_time = yes; then
1850 cat >> confdefs.h <<\EOF
1851 #define TIME_WITH_SYS_TIME 1
1856 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1857 echo "configure:1869: checking for sys/wait.h that is POSIX.1 compatible" >&5
1858 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1859 echo $ac_n "(cached) $ac_c" 1>&6
1861 cat > conftest.$ac_ext <<EOF
1862 #line 1874 "configure"
1863 #include "confdefs.h"
1864 #include <sys/types.h>
1865 #include <sys/wait.h>
1867 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1870 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1875 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1878 if { (eval echo configure:1890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1880 ac_cv_header_sys_wait_h=yes
1882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1885 ac_cv_header_sys_wait_h=no
1890 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1891 if test $ac_cv_header_sys_wait_h = yes; then
1892 cat >> confdefs.h <<\EOF
1893 #define HAVE_SYS_WAIT_H 1
1899 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1901 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1902 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1903 echo "configure:1915: checking for $ac_hdr that defines DIR" >&5
1904 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1905 echo $ac_n "(cached) $ac_c" 1>&6
1907 cat > conftest.$ac_ext <<EOF
1908 #line 1920 "configure"
1909 #include "confdefs.h"
1910 #include <sys/types.h>
1916 if { (eval echo configure:1928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1918 eval "ac_cv_header_dirent_$ac_safe=yes"
1920 echo "configure: failed program was:" >&5
1921 cat conftest.$ac_ext >&5
1923 eval "ac_cv_header_dirent_$ac_safe=no"
1927 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1928 echo "$ac_t""yes" 1>&6
1929 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1930 cat >> confdefs.h <<EOF
1931 #define $ac_tr_hdr 1
1933 ac_header_dirent=$ac_hdr; break
1935 echo "$ac_t""no" 1>&6
1938 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1939 if test $ac_header_dirent = dirent.h; then
1940 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1941 echo "configure:1953: checking for opendir in -ldir" >&5
1942 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1943 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1944 echo $ac_n "(cached) $ac_c" 1>&6
1946 ac_save_LIBS="$LIBS"
1948 cat > conftest.$ac_ext <<EOF
1949 #line 1961 "configure"
1950 #include "confdefs.h"
1951 /* Override any gcc2 internal prototype to avoid an error. */
1952 /* We use char because int might match the return type of a gcc2
1953 builtin and then its argument prototype would still apply. */
1960 if { (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1962 eval "ac_cv_lib_$ac_lib_var=yes"
1964 echo "configure: failed program was:" >&5
1965 cat conftest.$ac_ext >&5
1967 eval "ac_cv_lib_$ac_lib_var=no"
1970 LIBS="$ac_save_LIBS"
1973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1974 echo "$ac_t""yes" 1>&6
1977 echo "$ac_t""no" 1>&6
1981 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1982 echo "configure:1994: checking for opendir in -lx" >&5
1983 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1985 echo $ac_n "(cached) $ac_c" 1>&6
1987 ac_save_LIBS="$LIBS"
1989 cat > conftest.$ac_ext <<EOF
1990 #line 2002 "configure"
1991 #include "confdefs.h"
1992 /* Override any gcc2 internal prototype to avoid an error. */
1993 /* We use char because int might match the return type of a gcc2
1994 builtin and then its argument prototype would still apply. */
2001 if { (eval echo configure:2013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2003 eval "ac_cv_lib_$ac_lib_var=yes"
2005 echo "configure: failed program was:" >&5
2006 cat conftest.$ac_ext >&5
2008 eval "ac_cv_lib_$ac_lib_var=no"
2011 LIBS="$ac_save_LIBS"
2014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2015 echo "$ac_t""yes" 1>&6
2018 echo "$ac_t""no" 1>&6
2023 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
2024 echo "configure:2036: checking how to call gettimeofday" >&5
2025 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
2026 echo $ac_n "(cached) $ac_c" 1>&6
2028 cat > conftest.$ac_ext <<EOF
2029 #line 2041 "configure"
2030 #include "confdefs.h"
2032 #include <sys/time.h>
2034 struct timeval tv; struct timezone tzp;
2035 gettimeofday(&tv, &tzp);
2038 if { (eval echo configure:2050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2040 ac_gettimeofday_args=2
2042 echo "configure: failed program was:" >&5
2043 cat conftest.$ac_ext >&5
2045 cat > conftest.$ac_ext <<EOF
2046 #line 2058 "configure"
2047 #include "confdefs.h"
2049 #include <sys/time.h>
2051 struct timeval tv; gettimeofday(&tv);
2054 if { (eval echo configure:2066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2056 ac_gettimeofday_args=1
2058 echo "configure: failed program was:" >&5
2059 cat conftest.$ac_ext >&5
2061 ac_gettimeofday_args=0
2066 ac_cv_gettimeofday_args=$ac_gettimeofday_args
2069 ac_gettimeofday_args=$ac_cv_gettimeofday_args
2070 if test "$ac_gettimeofday_args" = 1 ; then
2071 cat >> confdefs.h <<\EOF
2072 #define HAVE_GETTIMEOFDAY 1
2075 echo "$ac_t""one argument" 1>&6
2076 elif test "$ac_gettimeofday_args" = 2 ; then
2077 cat >> confdefs.h <<\EOF
2078 #define HAVE_GETTIMEOFDAY 1
2081 cat >> confdefs.h <<\EOF
2082 #define GETTIMEOFDAY_TWO_ARGS 1
2085 echo "$ac_t""two arguments" 1>&6
2087 echo "$ac_t""unknown" 1>&6
2090 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
2092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2093 echo "configure:2105: checking for $ac_func" >&5
2094 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2095 echo $ac_n "(cached) $ac_c" 1>&6
2097 cat > conftest.$ac_ext <<EOF
2098 #line 2110 "configure"
2099 #include "confdefs.h"
2100 /* System header to define __stub macros and hopefully few prototypes,
2101 which can conflict with char $ac_func(); below. */
2103 /* Override any gcc2 internal prototype to avoid an error. */
2104 /* We use char because int might match the return type of a gcc2
2105 builtin and then its argument prototype would still apply. */
2110 /* The GNU C library defines this for functions which it implements
2111 to always fail with ENOSYS. Some functions are actually named
2112 something starting with __ and the normal name is an alias. */
2113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2121 if { (eval echo configure:2133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2123 eval "ac_cv_func_$ac_func=yes"
2125 echo "configure: failed program was:" >&5
2126 cat conftest.$ac_ext >&5
2128 eval "ac_cv_func_$ac_func=no"
2133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2134 echo "$ac_t""yes" 1>&6
2135 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2136 cat >> confdefs.h <<EOF
2137 #define $ac_tr_func 1
2141 echo "$ac_t""no" 1>&6
2146 for ac_func in sigaction syslog realpath setrlimit
2148 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2149 echo "configure:2161: checking for $ac_func" >&5
2150 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2151 echo $ac_n "(cached) $ac_c" 1>&6
2153 cat > conftest.$ac_ext <<EOF
2154 #line 2166 "configure"
2155 #include "confdefs.h"
2156 /* System header to define __stub macros and hopefully few prototypes,
2157 which can conflict with char $ac_func(); below. */
2159 /* Override any gcc2 internal prototype to avoid an error. */
2160 /* We use char because int might match the return type of a gcc2
2161 builtin and then its argument prototype would still apply. */
2166 /* The GNU C library defines this for functions which it implements
2167 to always fail with ENOSYS. Some functions are actually named
2168 something starting with __ and the normal name is an alias. */
2169 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2177 if { (eval echo configure:2189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2179 eval "ac_cv_func_$ac_func=yes"
2181 echo "configure: failed program was:" >&5
2182 cat conftest.$ac_ext >&5
2184 eval "ac_cv_func_$ac_func=no"
2189 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2190 echo "$ac_t""yes" 1>&6
2191 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2192 cat >> confdefs.h <<EOF
2193 #define $ac_tr_func 1
2197 echo "$ac_t""no" 1>&6
2201 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2202 echo "configure:2214: checking for struct icmp" >&5
2203 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2204 echo $ac_n "(cached) $ac_c" 1>&6
2206 cat > conftest.$ac_ext <<EOF
2207 #line 2219 "configure"
2208 #include "confdefs.h"
2216 #include <sys/types.h>
2217 #include <sys/time.h>
2218 #include <sys/ipc.h>
2219 #include <sys/shm.h>
2220 #include <sys/socket.h>
2221 #include <netinet/in_systm.h>
2222 #include <netinet/in.h>
2223 #include <netinet/ip.h>
2224 #include <netinet/ip_icmp.h>
2225 #include <netinet/udp.h>
2226 #include <arpa/inet.h>
2231 struct sockaddr_in si;
2233 i.icmp_type = ICMP_ECHO;
2238 si.sin_family = AF_INET;
2239 #if defined(__DECC) || defined(_IP_VHL)
2247 if { (eval echo configure:2259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2251 echo "configure: failed program was:" >&5
2252 cat conftest.$ac_ext >&5
2259 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2260 if test "$ac_cv_have_icmp" = yes ; then
2261 cat >> confdefs.h <<\EOF
2266 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2267 echo "configure:2279: checking for struct icmphdr" >&5
2268 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2269 echo $ac_n "(cached) $ac_c" 1>&6
2271 cat > conftest.$ac_ext <<EOF
2272 #line 2284 "configure"
2273 #include "confdefs.h"
2281 #include <sys/types.h>
2282 #include <sys/time.h>
2283 #include <sys/ipc.h>
2284 #include <sys/shm.h>
2285 #include <sys/socket.h>
2286 #include <netinet/in_systm.h>
2287 #include <netinet/in.h>
2288 #include <netinet/ip.h>
2289 #include <netinet/ip_icmp.h>
2290 #include <netinet/udp.h>
2291 #include <arpa/inet.h>
2296 struct sockaddr_in si;
2302 i.un.echo.sequence = 0;
2303 si.sin_family = AF_INET;
2307 if { (eval echo configure:2319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2309 ac_cv_have_icmphdr=yes
2311 echo "configure: failed program was:" >&5
2312 cat conftest.$ac_ext >&5
2314 ac_cv_have_icmphdr=no
2319 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2320 if test "$ac_cv_have_icmphdr" = yes ; then
2321 cat >> confdefs.h <<\EOF
2322 #define HAVE_ICMPHDR 1
2326 for ac_hdr in crypt.h sys/select.h
2328 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2329 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2330 echo "configure:2342: checking for $ac_hdr" >&5
2331 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
2334 cat > conftest.$ac_ext <<EOF
2335 #line 2347 "configure"
2336 #include "confdefs.h"
2339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2340 { (eval echo configure:2352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2342 if test -z "$ac_err"; then
2344 eval "ac_cv_header_$ac_safe=yes"
2347 echo "configure: failed program was:" >&5
2348 cat conftest.$ac_ext >&5
2350 eval "ac_cv_header_$ac_safe=no"
2354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2355 echo "$ac_t""yes" 1>&6
2356 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2357 cat >> confdefs.h <<EOF
2358 #define $ac_tr_hdr 1
2362 echo "$ac_t""no" 1>&6
2366 for ac_prog in perl5 perl
2368 # Extract the first word of "$ac_prog", so it can be a program name with args.
2369 set dummy $ac_prog; ac_word=$2
2370 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2371 echo "configure:2383: checking for $ac_word" >&5
2372 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2377 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2380 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2383 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2385 for ac_dir in $ac_dummy; do
2386 test -z "$ac_dir" && ac_dir=.
2387 if test -f $ac_dir/$ac_word; then
2388 ac_cv_path_PERL="$ac_dir/$ac_word"
2396 PERL="$ac_cv_path_PERL"
2397 if test -n "$PERL"; then
2398 echo "$ac_t""$PERL" 1>&6
2400 echo "$ac_t""no" 1>&6
2403 test -n "$PERL" && break
2406 if test -z "$PERL" ; then
2409 echo $ac_n "checking perl version""... $ac_c" 1>&6
2410 echo "configure:2422: checking perl version" >&5
2411 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2412 echo $ac_n "(cached) $ac_c" 1>&6
2414 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2417 echo "$ac_t""$ac_cv_perl_version" 1>&6
2418 PERL_VERSION=$ac_cv_perl_version
2422 if test -z "$PERL" ; then
2423 # don't let it be blank...
2427 # If we find X, set shell vars x_includes and x_libraries to the
2428 # paths, otherwise set no_x=yes.
2429 # Uses ac_ vars as temps to allow command line to override cache and checks.
2430 # --without-x overrides everything else, but does not touch the cache.
2431 echo $ac_n "checking for X""... $ac_c" 1>&6
2432 echo "configure:2444: checking for X" >&5
2434 # Check whether --with-x or --without-x was given.
2435 if test "${with_x+set}" = set; then
2440 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2441 if test "x$with_x" = xno; then
2442 # The user explicitly disabled X.
2445 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2446 # Both variables are already set.
2449 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2450 echo $ac_n "(cached) $ac_c" 1>&6
2452 # One or both of the vars are not set, and there is no cached value.
2453 ac_x_includes=NO ac_x_libraries=NO
2455 if mkdir conftestdir; then
2457 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2458 cat > Imakefile <<'EOF'
2460 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2462 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2463 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2464 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2465 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2466 for ac_extension in a so sl; do
2467 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2468 test -f $ac_im_libdir/libX11.$ac_extension; then
2469 ac_im_usrlibdir=$ac_im_libdir; break
2472 # Screen out bogus values from the imake configuration. They are
2473 # bogus both because they are the default anyway, and because
2474 # using them would break gcc on systems where it needs fixed includes.
2475 case "$ac_im_incroot" in
2477 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2479 case "$ac_im_usrlibdir" in
2481 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2488 if test "$ac_x_includes" = NO; then
2489 # Guess where to find include files, by looking for this one X11 .h file.
2490 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2492 # First, try using that file with no special directory specified.
2493 cat > conftest.$ac_ext <<EOF
2494 #line 2506 "configure"
2495 #include "confdefs.h"
2496 #include <$x_direct_test_include>
2498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2499 { (eval echo configure:2511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2501 if test -z "$ac_err"; then
2503 # We can compile using X headers with no special include directory.
2507 echo "configure: failed program was:" >&5
2508 cat conftest.$ac_ext >&5
2510 # Look for the header file in a standard set of common directories.
2511 # Check X11 before X11Rn because it is often a symlink to the current release.
2514 /usr/X11R6/include \
2515 /usr/X11R5/include \
2516 /usr/X11R4/include \
2519 /usr/include/X11R6 \
2520 /usr/include/X11R5 \
2521 /usr/include/X11R4 \
2523 /usr/local/X11/include \
2524 /usr/local/X11R6/include \
2525 /usr/local/X11R5/include \
2526 /usr/local/X11R4/include \
2528 /usr/local/include/X11 \
2529 /usr/local/include/X11R6 \
2530 /usr/local/include/X11R5 \
2531 /usr/local/include/X11R4 \
2535 /usr/XFree86/include/X11 \
2538 /usr/local/include \
2539 /usr/unsupported/include \
2540 /usr/athena/include \
2541 /usr/local/x11r5/include \
2542 /usr/lpp/Xamples/include \
2544 /usr/openwin/include \
2545 /usr/openwin/share/include \
2548 if test -r "$ac_dir/$x_direct_test_include"; then
2549 ac_x_includes=$ac_dir
2555 fi # $ac_x_includes = NO
2557 if test "$ac_x_libraries" = NO; then
2558 # Check for the libraries.
2560 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2561 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2563 # See if we find them without any special options.
2564 # Don't add to $LIBS permanently.
2565 ac_save_LIBS="$LIBS"
2566 LIBS="-l$x_direct_test_library $LIBS"
2567 cat > conftest.$ac_ext <<EOF
2568 #line 2580 "configure"
2569 #include "confdefs.h"
2572 ${x_direct_test_function}()
2575 if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2577 LIBS="$ac_save_LIBS"
2578 # We can link X programs with no special library path.
2581 echo "configure: failed program was:" >&5
2582 cat conftest.$ac_ext >&5
2584 LIBS="$ac_save_LIBS"
2585 # First see if replacing the include by lib works.
2586 # Check X11 before X11Rn because it is often a symlink to the current release.
2587 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2598 /usr/local/X11/lib \
2599 /usr/local/X11R6/lib \
2600 /usr/local/X11R5/lib \
2601 /usr/local/X11R4/lib \
2603 /usr/local/lib/X11 \
2604 /usr/local/lib/X11R6 \
2605 /usr/local/lib/X11R5 \
2606 /usr/local/lib/X11R4 \
2610 /usr/XFree86/lib/X11 \
2614 /usr/unsupported/lib \
2616 /usr/local/x11r5/lib \
2617 /usr/lpp/Xamples/lib \
2621 /usr/openwin/share/lib \
2624 for ac_extension in a so sl; do
2625 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2626 ac_x_libraries=$ac_dir
2633 fi # $ac_x_libraries = NO
2635 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2636 # Didn't find X anywhere. Cache the known absence of X.
2637 ac_cv_have_x="have_x=no"
2639 # Record where we found X for the cache.
2640 ac_cv_have_x="have_x=yes \
2641 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2645 eval "$ac_cv_have_x"
2648 if test "$have_x" != yes; then
2649 echo "$ac_t""$have_x" 1>&6
2652 # If each of the values was on the command line, it overrides each guess.
2653 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2654 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2655 # Update the cache value to reflect the command line values.
2656 ac_cv_have_x="have_x=yes \
2657 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2658 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2661 if test "$no_x" = yes; then
2662 # Not all programs may use this symbol, but it does not hurt to define it.
2663 cat >> confdefs.h <<\EOF
2664 #define X_DISPLAY_MISSING 1
2667 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2669 if test -n "$x_includes"; then
2670 X_CFLAGS="$X_CFLAGS -I$x_includes"
2673 # It would also be nice to do this for all -L options, not just this one.
2674 if test -n "$x_libraries"; then
2675 X_LIBS="$X_LIBS -L$x_libraries"
2676 # For Solaris; some versions of Sun CC require a space after -R and
2677 # others require no space. Words are not sufficient . . . .
2678 case "`(uname -sr) 2>/dev/null`" in
2680 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2681 echo "configure:2693: checking whether -R must be followed by a space" >&5
2682 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2683 cat > conftest.$ac_ext <<EOF
2684 #line 2696 "configure"
2685 #include "confdefs.h"
2691 if { (eval echo configure:2703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2695 echo "configure: failed program was:" >&5
2696 cat conftest.$ac_ext >&5
2701 if test $ac_R_nospace = yes; then
2702 echo "$ac_t""no" 1>&6
2703 X_LIBS="$X_LIBS -R$x_libraries"
2705 LIBS="$ac_xsave_LIBS -R $x_libraries"
2706 cat > conftest.$ac_ext <<EOF
2707 #line 2719 "configure"
2708 #include "confdefs.h"
2714 if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2718 echo "configure: failed program was:" >&5
2719 cat conftest.$ac_ext >&5
2724 if test $ac_R_space = yes; then
2725 echo "$ac_t""yes" 1>&6
2726 X_LIBS="$X_LIBS -R $x_libraries"
2728 echo "$ac_t""neither works" 1>&6
2731 LIBS="$ac_xsave_LIBS"
2735 # Check for system-dependent libraries X programs must link with.
2736 # Do this before checking for the system-independent R6 libraries
2737 # (-lICE), since we may need -lsocket or whatever for X linking.
2739 if test "$ISC" = yes; then
2740 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2742 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2743 # libraries were built with DECnet support. And karl@cs.umb.edu says
2744 # the Alpha needs dnet_stub (dnet does not exist).
2745 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2746 echo "configure:2758: checking for dnet_ntoa in -ldnet" >&5
2747 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2748 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2749 echo $ac_n "(cached) $ac_c" 1>&6
2751 ac_save_LIBS="$LIBS"
2753 cat > conftest.$ac_ext <<EOF
2754 #line 2766 "configure"
2755 #include "confdefs.h"
2756 /* Override any gcc2 internal prototype to avoid an error. */
2757 /* We use char because int might match the return type of a gcc2
2758 builtin and then its argument prototype would still apply. */
2765 if { (eval echo configure:2777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2767 eval "ac_cv_lib_$ac_lib_var=yes"
2769 echo "configure: failed program was:" >&5
2770 cat conftest.$ac_ext >&5
2772 eval "ac_cv_lib_$ac_lib_var=no"
2775 LIBS="$ac_save_LIBS"
2778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2779 echo "$ac_t""yes" 1>&6
2780 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2782 echo "$ac_t""no" 1>&6
2785 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2786 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2787 echo "configure:2799: checking for dnet_ntoa in -ldnet_stub" >&5
2788 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2789 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2790 echo $ac_n "(cached) $ac_c" 1>&6
2792 ac_save_LIBS="$LIBS"
2793 LIBS="-ldnet_stub $LIBS"
2794 cat > conftest.$ac_ext <<EOF
2795 #line 2807 "configure"
2796 #include "confdefs.h"
2797 /* Override any gcc2 internal prototype to avoid an error. */
2798 /* We use char because int might match the return type of a gcc2
2799 builtin and then its argument prototype would still apply. */
2806 if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2808 eval "ac_cv_lib_$ac_lib_var=yes"
2810 echo "configure: failed program was:" >&5
2811 cat conftest.$ac_ext >&5
2813 eval "ac_cv_lib_$ac_lib_var=no"
2816 LIBS="$ac_save_LIBS"
2819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2820 echo "$ac_t""yes" 1>&6
2821 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2823 echo "$ac_t""no" 1>&6
2828 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2829 # to get the SysV transport functions.
2830 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2832 # The nsl library prevents programs from opening the X display
2833 # on Irix 5.2, according to dickey@clark.net.
2834 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2835 echo "configure:2847: checking for gethostbyname" >&5
2836 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2837 echo $ac_n "(cached) $ac_c" 1>&6
2839 cat > conftest.$ac_ext <<EOF
2840 #line 2852 "configure"
2841 #include "confdefs.h"
2842 /* System header to define __stub macros and hopefully few prototypes,
2843 which can conflict with char gethostbyname(); below. */
2845 /* Override any gcc2 internal prototype to avoid an error. */
2846 /* We use char because int might match the return type of a gcc2
2847 builtin and then its argument prototype would still apply. */
2848 char gethostbyname();
2852 /* The GNU C library defines this for functions which it implements
2853 to always fail with ENOSYS. Some functions are actually named
2854 something starting with __ and the normal name is an alias. */
2855 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2863 if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2865 eval "ac_cv_func_gethostbyname=yes"
2867 echo "configure: failed program was:" >&5
2868 cat conftest.$ac_ext >&5
2870 eval "ac_cv_func_gethostbyname=no"
2875 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2876 echo "$ac_t""yes" 1>&6
2879 echo "$ac_t""no" 1>&6
2882 if test $ac_cv_func_gethostbyname = no; then
2883 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2884 echo "configure:2896: checking for gethostbyname in -lnsl" >&5
2885 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2886 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2887 echo $ac_n "(cached) $ac_c" 1>&6
2889 ac_save_LIBS="$LIBS"
2891 cat > conftest.$ac_ext <<EOF
2892 #line 2904 "configure"
2893 #include "confdefs.h"
2894 /* Override any gcc2 internal prototype to avoid an error. */
2895 /* We use char because int might match the return type of a gcc2
2896 builtin and then its argument prototype would still apply. */
2897 char gethostbyname();
2903 if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2905 eval "ac_cv_lib_$ac_lib_var=yes"
2907 echo "configure: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2910 eval "ac_cv_lib_$ac_lib_var=no"
2913 LIBS="$ac_save_LIBS"
2916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2917 echo "$ac_t""yes" 1>&6
2918 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2920 echo "$ac_t""no" 1>&6
2925 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2926 # socket/setsockopt and other routines are undefined under SCO ODT
2927 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2928 # on later versions), says simon@lia.di.epfl.ch: it contains
2929 # gethostby* variants that don't use the nameserver (or something).
2930 # -lsocket must be given before -lnsl if both are needed.
2931 # We assume that if connect needs -lnsl, so does gethostbyname.
2932 echo $ac_n "checking for connect""... $ac_c" 1>&6
2933 echo "configure:2945: checking for connect" >&5
2934 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2935 echo $ac_n "(cached) $ac_c" 1>&6
2937 cat > conftest.$ac_ext <<EOF
2938 #line 2950 "configure"
2939 #include "confdefs.h"
2940 /* System header to define __stub macros and hopefully few prototypes,
2941 which can conflict with char connect(); below. */
2943 /* Override any gcc2 internal prototype to avoid an error. */
2944 /* We use char because int might match the return type of a gcc2
2945 builtin and then its argument prototype would still apply. */
2950 /* The GNU C library defines this for functions which it implements
2951 to always fail with ENOSYS. Some functions are actually named
2952 something starting with __ and the normal name is an alias. */
2953 #if defined (__stub_connect) || defined (__stub___connect)
2961 if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2963 eval "ac_cv_func_connect=yes"
2965 echo "configure: failed program was:" >&5
2966 cat conftest.$ac_ext >&5
2968 eval "ac_cv_func_connect=no"
2973 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2974 echo "$ac_t""yes" 1>&6
2977 echo "$ac_t""no" 1>&6
2980 if test $ac_cv_func_connect = no; then
2981 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2982 echo "configure:2994: checking for connect in -lsocket" >&5
2983 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2985 echo $ac_n "(cached) $ac_c" 1>&6
2987 ac_save_LIBS="$LIBS"
2988 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2989 cat > conftest.$ac_ext <<EOF
2990 #line 3002 "configure"
2991 #include "confdefs.h"
2992 /* Override any gcc2 internal prototype to avoid an error. */
2993 /* We use char because int might match the return type of a gcc2
2994 builtin and then its argument prototype would still apply. */
3001 if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3003 eval "ac_cv_lib_$ac_lib_var=yes"
3005 echo "configure: failed program was:" >&5
3006 cat conftest.$ac_ext >&5
3008 eval "ac_cv_lib_$ac_lib_var=no"
3011 LIBS="$ac_save_LIBS"
3014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3015 echo "$ac_t""yes" 1>&6
3016 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3018 echo "$ac_t""no" 1>&6
3023 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3024 echo $ac_n "checking for remove""... $ac_c" 1>&6
3025 echo "configure:3037: checking for remove" >&5
3026 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3027 echo $ac_n "(cached) $ac_c" 1>&6
3029 cat > conftest.$ac_ext <<EOF
3030 #line 3042 "configure"
3031 #include "confdefs.h"
3032 /* System header to define __stub macros and hopefully few prototypes,
3033 which can conflict with char remove(); below. */
3035 /* Override any gcc2 internal prototype to avoid an error. */
3036 /* We use char because int might match the return type of a gcc2
3037 builtin and then its argument prototype would still apply. */
3042 /* The GNU C library defines this for functions which it implements
3043 to always fail with ENOSYS. Some functions are actually named
3044 something starting with __ and the normal name is an alias. */
3045 #if defined (__stub_remove) || defined (__stub___remove)
3053 if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3055 eval "ac_cv_func_remove=yes"
3057 echo "configure: failed program was:" >&5
3058 cat conftest.$ac_ext >&5
3060 eval "ac_cv_func_remove=no"
3065 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3066 echo "$ac_t""yes" 1>&6
3069 echo "$ac_t""no" 1>&6
3072 if test $ac_cv_func_remove = no; then
3073 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3074 echo "configure:3086: checking for remove in -lposix" >&5
3075 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3076 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3077 echo $ac_n "(cached) $ac_c" 1>&6
3079 ac_save_LIBS="$LIBS"
3080 LIBS="-lposix $LIBS"
3081 cat > conftest.$ac_ext <<EOF
3082 #line 3094 "configure"
3083 #include "confdefs.h"
3084 /* Override any gcc2 internal prototype to avoid an error. */
3085 /* We use char because int might match the return type of a gcc2
3086 builtin and then its argument prototype would still apply. */
3093 if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3095 eval "ac_cv_lib_$ac_lib_var=yes"
3097 echo "configure: failed program was:" >&5
3098 cat conftest.$ac_ext >&5
3100 eval "ac_cv_lib_$ac_lib_var=no"
3103 LIBS="$ac_save_LIBS"
3106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3107 echo "$ac_t""yes" 1>&6
3108 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3110 echo "$ac_t""no" 1>&6
3115 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3116 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3117 echo "configure:3129: checking for shmat" >&5
3118 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3119 echo $ac_n "(cached) $ac_c" 1>&6
3121 cat > conftest.$ac_ext <<EOF
3122 #line 3134 "configure"
3123 #include "confdefs.h"
3124 /* System header to define __stub macros and hopefully few prototypes,
3125 which can conflict with char shmat(); below. */
3127 /* Override any gcc2 internal prototype to avoid an error. */
3128 /* We use char because int might match the return type of a gcc2
3129 builtin and then its argument prototype would still apply. */
3134 /* The GNU C library defines this for functions which it implements
3135 to always fail with ENOSYS. Some functions are actually named
3136 something starting with __ and the normal name is an alias. */
3137 #if defined (__stub_shmat) || defined (__stub___shmat)
3145 if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3147 eval "ac_cv_func_shmat=yes"
3149 echo "configure: failed program was:" >&5
3150 cat conftest.$ac_ext >&5
3152 eval "ac_cv_func_shmat=no"
3157 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3158 echo "$ac_t""yes" 1>&6
3161 echo "$ac_t""no" 1>&6
3164 if test $ac_cv_func_shmat = no; then
3165 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3166 echo "configure:3178: checking for shmat in -lipc" >&5
3167 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3168 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3169 echo $ac_n "(cached) $ac_c" 1>&6
3171 ac_save_LIBS="$LIBS"
3173 cat > conftest.$ac_ext <<EOF
3174 #line 3186 "configure"
3175 #include "confdefs.h"
3176 /* Override any gcc2 internal prototype to avoid an error. */
3177 /* We use char because int might match the return type of a gcc2
3178 builtin and then its argument prototype would still apply. */
3185 if { (eval echo configure:3197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3187 eval "ac_cv_lib_$ac_lib_var=yes"
3189 echo "configure: failed program was:" >&5
3190 cat conftest.$ac_ext >&5
3192 eval "ac_cv_lib_$ac_lib_var=no"
3195 LIBS="$ac_save_LIBS"
3198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3199 echo "$ac_t""yes" 1>&6
3200 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3202 echo "$ac_t""no" 1>&6
3208 # Check for libraries that X11R6 Xt/Xaw programs need.
3209 ac_save_LDFLAGS="$LDFLAGS"
3210 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3211 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3212 # check for ICE first), but we must link in the order -lSM -lICE or
3213 # we get undefined symbols. So assume we have SM if we have ICE.
3214 # These have to be linked with before -lX11, unlike the other
3215 # libraries we check for below, so use a different variable.
3216 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3217 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3218 echo "configure:3230: checking for IceConnectionNumber in -lICE" >&5
3219 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3220 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3221 echo $ac_n "(cached) $ac_c" 1>&6
3223 ac_save_LIBS="$LIBS"
3224 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3225 cat > conftest.$ac_ext <<EOF
3226 #line 3238 "configure"
3227 #include "confdefs.h"
3228 /* Override any gcc2 internal prototype to avoid an error. */
3229 /* We use char because int might match the return type of a gcc2
3230 builtin and then its argument prototype would still apply. */
3231 char IceConnectionNumber();
3234 IceConnectionNumber()
3237 if { (eval echo configure:3249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3239 eval "ac_cv_lib_$ac_lib_var=yes"
3241 echo "configure: failed program was:" >&5
3242 cat conftest.$ac_ext >&5
3244 eval "ac_cv_lib_$ac_lib_var=no"
3247 LIBS="$ac_save_LIBS"
3250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3251 echo "$ac_t""yes" 1>&6
3252 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3254 echo "$ac_t""no" 1>&6
3257 LDFLAGS="$ac_save_LDFLAGS"
3262 if test "$have_x" != yes; then
3263 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3267 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3268 echo "configure:3280: checking for X app-defaults directory" >&5
3269 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3270 echo $ac_n "(cached) $ac_c" 1>&6
3274 if mkdir conftestdir; then
3276 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3277 cat > Imakefile <<'EOF'
3279 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3281 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3282 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3283 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3288 if test x"$ac_x_app_defaults" = x; then
3290 # Look for the directory under a standard set of common directories.
3291 # Check X11 before X11Rn because it's often a symlink to the current release.
3293 /usr/X11/lib/app-defaults \
3294 /usr/X11R6/lib/app-defaults \
3295 /usr/X11R6/lib/X11/app-defaults \
3296 /usr/X11R5/lib/app-defaults \
3297 /usr/X11R5/lib/X11/app-defaults \
3298 /usr/X11R4/lib/app-defaults \
3299 /usr/X11R4/lib/X11/app-defaults \
3301 /usr/lib/X11/app-defaults \
3302 /usr/lib/X11R6/app-defaults \
3303 /usr/lib/X11R5/app-defaults \
3304 /usr/lib/X11R4/app-defaults \
3306 /usr/local/X11/lib/app-defaults \
3307 /usr/local/X11R6/lib/app-defaults \
3308 /usr/local/X11R5/lib/app-defaults \
3309 /usr/local/X11R4/lib/app-defaults \
3311 /usr/local/lib/X11/app-defaults \
3312 /usr/local/lib/X11R6/app-defaults \
3313 /usr/local/lib/X11R6/X11/app-defaults \
3314 /usr/local/lib/X11R5/app-defaults \
3315 /usr/local/lib/X11R5/X11/app-defaults \
3316 /usr/local/lib/X11R4/app-defaults \
3317 /usr/local/lib/X11R4/X11/app-defaults \
3319 /usr/X386/lib/X11/app-defaults \
3320 /usr/x386/lib/X11/app-defaults \
3321 /usr/XFree86/lib/X11/app-defaults \
3323 /usr/lib/X11/app-defaults \
3324 /usr/local/lib/X11/app-defaults \
3325 /usr/unsupported/lib/X11/app-defaults \
3326 /usr/athena/lib/X11/app-defaults \
3327 /usr/local/x11r5/lib/X11/app-defaults \
3328 /usr/lpp/Xamples/lib/X11/app-defaults \
3329 /lib/usr/lib/X11/app-defaults \
3331 /usr/openwin/lib/app-defaults \
3332 /usr/openwin/lib/X11/app-defaults \
3333 /usr/openwin/share/lib/app-defaults \
3334 /usr/openwin/share/lib/X11/app-defaults \
3336 /X11R6/lib/app-defaults \
3337 /X11R5/lib/app-defaults \
3338 /X11R4/lib/app-defaults \
3341 if test -d "$ac_dir"; then
3342 ac_x_app_defaults=$ac_dir
3348 if test x"$ac_x_app_defaults" = x; then
3349 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3351 # Record where we found app-defaults for the cache.
3352 ac_cv_x_app_defaults="$ac_x_app_defaults"
3356 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3357 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3361 # The following arcana was gleaned from conversations with
3362 # Eric Schwartz <erics@col.hp.com>:
3364 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3365 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3366 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3367 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3368 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3369 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3370 # you don't need any -I or -L arguments.
3372 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3373 # are the same division as 10.x. However, there are no symlinks to
3374 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3375 # arguments are always necessary.
3377 # However, X11R6 was available on HPUX 9.x as a patch: if that
3378 # patch was installed, then all of X11R6 went in to
3379 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3381 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3382 # whether R5 was available as a patch; R6 undoubtedly was not.)
3384 # So. We try and use the highest numbered pair of
3385 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3386 # that are available. We do not mix and match different versions
3389 # Question I still don't know the answer to: (do you?)
3391 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3392 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3393 # that contrib directory? Did it contain so-called "standard"
3394 # X11R6, or did it include Xaw and Xmu as well? If the former,
3395 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3396 # be a situation where one had to reach into the R5 headers and
3397 # libs to find Xmu? That is, must both R6 and R5 directories
3398 # be on the -I and -L lists in that case?
3400 for version in X11R6 X11R5 X11R4 ; do
3401 # if either pair of directories exists...
3402 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib
3404 # if contrib exists, use it...
3405 if test -d /usr/contrib/$version/lib ; then
3406 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3407 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3409 # if the "standard" one exists, use it.
3410 if test -d /usr/lib/$version ; then
3411 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3412 X_LIBS="$X_LIBS -L/usr/lib/$version"
3414 # since at least one of the pair exists, go no farther.
3419 # Now find Motif. Thanks for not making xmkmf find this by
3420 # default, you losers.
3422 if test -d /usr/lib/Motif1.2 ; then
3423 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3424 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3425 elif test -d /usr/lib/Motif1.1 ; then
3426 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3427 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3430 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3432 if test -d /opt/Mesa/lib ; then
3433 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3434 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3437 if test -d /opt/xpm/lib/X11 ; then
3438 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3439 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3442 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3443 # in /usr/local/, unless there is already an xscreensaver in
3444 # /usr/local/bin/. This can be overridden with the --prefix arg
3445 # to configure. I'm not sure this is the right thing to do, but
3446 # Richard Lloyd says so...
3448 if test \! -x /usr/local/bin/xscreensaver ; then
3449 ac_default_prefix=/opt/xscreensaver
3455 # Thanks for not making xmkmf find this by default, pinheads.
3456 # And thanks for moving things around again, too. Is this
3457 # really the standard location now? What happened to the
3458 # joke that this kind of thing went in /opt?
3459 # cthomp says "answer: CDE (Common Disorganized Environment)"
3461 if test -f /usr/dt/include/Xm/Xm.h ; then
3462 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3463 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3465 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3466 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3467 echo "configure:3479: checking for regcmp in -lgen" >&5
3468 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3469 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3470 echo $ac_n "(cached) $ac_c" 1>&6
3472 ac_save_LIBS="$LIBS"
3474 cat > conftest.$ac_ext <<EOF
3475 #line 3487 "configure"
3476 #include "confdefs.h"
3477 /* Override any gcc2 internal prototype to avoid an error. */
3478 /* We use char because int might match the return type of a gcc2
3479 builtin and then its argument prototype would still apply. */
3486 if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3488 eval "ac_cv_lib_$ac_lib_var=yes"
3490 echo "configure: failed program was:" >&5
3491 cat conftest.$ac_ext >&5
3493 eval "ac_cv_lib_$ac_lib_var=no"
3496 LIBS="$ac_save_LIBS"
3499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3500 echo "$ac_t""yes" 1>&6
3501 X_LIBS="$X_LIBS -lgen"
3503 echo "$ac_t""no" 1>&6
3509 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3510 echo "configure:3522: checking for XPointer" >&5
3511 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3512 echo $ac_n "(cached) $ac_c" 1>&6
3515 ac_save_CPPFLAGS="$CPPFLAGS"
3516 if test \! -z "$includedir" ; then
3517 CPPFLAGS="$CPPFLAGS -I$includedir"
3519 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3520 cat > conftest.$ac_ext <<EOF
3521 #line 3533 "configure"
3522 #include "confdefs.h"
3523 #include <X11/Xlib.h>
3525 XPointer foo = (XPointer) 0;
3528 if { (eval echo configure:3540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3532 echo "configure: failed program was:" >&5
3533 cat conftest.$ac_ext >&5
3538 CPPFLAGS="$ac_save_CPPFLAGS"
3541 echo "$ac_t""$ac_cv_xpointer" 1>&6
3542 if test "$ac_cv_xpointer" != yes; then
3543 cat >> confdefs.h <<\EOF
3544 #define XPointer char*
3551 ###############################################################################
3553 # Check for -lXmu (some fucked up vendors don't ship it...)
3555 ###############################################################################
3559 ac_save_CPPFLAGS="$CPPFLAGS"
3560 if test \! -z "$includedir" ; then
3561 CPPFLAGS="$CPPFLAGS -I$includedir"
3563 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3564 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3565 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3566 echo "configure:3578: checking for X11/Xmu/Error.h" >&5
3567 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3568 echo $ac_n "(cached) $ac_c" 1>&6
3570 cat > conftest.$ac_ext <<EOF
3571 #line 3583 "configure"
3572 #include "confdefs.h"
3573 #include <X11/Xmu/Error.h>
3575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3576 { (eval echo configure:3588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3578 if test -z "$ac_err"; then
3580 eval "ac_cv_header_$ac_safe=yes"
3583 echo "configure: failed program was:" >&5
3584 cat conftest.$ac_ext >&5
3586 eval "ac_cv_header_$ac_safe=no"
3590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3591 echo "$ac_t""yes" 1>&6
3594 echo "$ac_t""no" 1>&6
3597 CPPFLAGS="$ac_save_CPPFLAGS"
3598 if test "$have_xmu" = no ; then
3599 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3600 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3606 cat >> confdefs.h <<\EOF
3613 ###############################################################################
3615 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3616 # See comp.windows.x FAQ question 124. The right fix is to
3617 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3619 ###############################################################################
3621 if test "$have_xmu" = yes ; then
3624 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3625 echo "configure:3637: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3626 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3627 echo $ac_n "(cached) $ac_c" 1>&6
3629 ac_save_LDFLAGS="$LDFLAGS"
3630 if test \! -z "$x_libraries" ; then
3631 LDFLAGS="$LDFLAGS -L$x_libraries"
3633 # Note: this trick never works! (Generally.)
3634 # We're only getting away with using AC_TRY_LINK
3635 # with X libraries because we know it's SunOS.
3636 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3637 cat > conftest.$ac_ext <<EOF
3638 #line 3650 "configure"
3639 #include "confdefs.h"
3645 if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3647 ac_cv_sunos_xmu_bug=no
3649 echo "configure: failed program was:" >&5
3650 cat conftest.$ac_ext >&5
3652 ac_cv_sunos_xmu_bug=yes
3655 LDFLAGS="$ac_save_LDFLAGS"
3658 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3659 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3660 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3661 echo "configure:3673: checking whether the compiler understands -static" >&5
3662 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3663 echo $ac_n "(cached) $ac_c" 1>&6
3665 ac_save_LDFLAGS="$LDFLAGS"
3666 LDFLAGS="$LDFLAGS -static"
3667 cat > conftest.$ac_ext <<EOF
3668 #line 3680 "configure"
3669 #include "confdefs.h"
3675 if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3679 echo "configure: failed program was:" >&5
3680 cat conftest.$ac_ext >&5
3685 LDFLAGS="$ac_save_LDFLAGS"
3688 echo "$ac_t""$ac_cv_ld_static" 1>&6
3689 if test "$ac_cv_ld_static" = yes ; then
3690 LDFLAGS="$LDFLAGS -static"
3692 LDFLAGS="$LDFLAGS -Bstatic"
3700 ###############################################################################
3702 # Handle the --enable-subdir option
3704 ###############################################################################
3706 # Check whether --enable-subdir or --disable-subdir was given.
3707 if test "${enable_subdir+set}" = set; then
3708 enableval="$enable_subdir"
3709 enable_subdir="$enableval"
3714 if test x"$enable_subdir" = xno; then
3716 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
3717 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
3720 # there must be a better way than this...
3721 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
3723 HACKDIR=$enable_subdir
3726 HACKDIR='${bindir}/'$enable_subdir
3730 # canonicalize slashes.
3731 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3734 ###############################################################################
3736 # Check for the SGI SCREEN_SAVER server extension.
3738 ###############################################################################
3741 with_sgi_req=unspecified
3742 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3743 if test "${with_sgi_ext+set}" = set; then
3744 withval="$with_sgi_ext"
3745 with_sgi="$withval"; with_sgi_req="$withval"
3757 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3758 echo "configure:3770: checking for SGI SCREEN_SAVER headers" >&5
3761 X_CFLAGS="-I$d $X_CFLAGS"
3762 echo "$ac_t""$d" 1>&6
3764 echo "$ac_t""not found ($d: no such directory)" 1>&6
3767 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3768 echo "configure:3780: checking for SGI SCREEN_SAVER libs" >&5
3771 X_LIBS="-L$d $X_LIBS"
3772 echo "$ac_t""$d" 1>&6
3774 echo "$ac_t""not found ($d: no such directory)" 1>&6
3777 # replace the directory string with "yes".
3779 with_sgi=$with_sgi_req
3784 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3785 echo " If it is a directory, then \`DIR/include' will be added to"
3786 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3792 if test "$with_sgi" = yes; then
3794 ac_save_CPPFLAGS="$CPPFLAGS"
3795 if test \! -z "$includedir" ; then
3796 CPPFLAGS="$CPPFLAGS -I$includedir"
3798 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3799 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3800 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3801 echo "configure:3813: checking for X11/extensions/XScreenSaver.h" >&5
3802 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3803 echo $ac_n "(cached) $ac_c" 1>&6
3805 cat > conftest.$ac_ext <<EOF
3806 #line 3818 "configure"
3807 #include "confdefs.h"
3808 #include <X11/extensions/XScreenSaver.h>
3810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3811 { (eval echo configure:3823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3813 if test -z "$ac_err"; then
3815 eval "ac_cv_header_$ac_safe=yes"
3818 echo "configure: failed program was:" >&5
3819 cat conftest.$ac_ext >&5
3821 eval "ac_cv_header_$ac_safe=no"
3825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3826 echo "$ac_t""yes" 1>&6
3828 cat >> confdefs.h <<\EOF
3829 #define HAVE_SGI_SAVER_EXTENSION 1
3833 echo "$ac_t""no" 1>&6
3836 CPPFLAGS="$ac_save_CPPFLAGS"
3838 elif test "$with_sgi" != no; then
3839 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3844 ###############################################################################
3846 # Check for the MIT-SCREEN-SAVER server extension.
3848 ###############################################################################
3851 with_mit_req=unspecified
3852 # Check whether --with-mit-ext or --without-mit-ext was given.
3853 if test "${with_mit_ext+set}" = set; then
3854 withval="$with_mit_ext"
3855 with_mit="$withval"; with_mit_req="$withval"
3867 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3868 echo "configure:3880: checking for MIT-SCREEN-SAVER headers" >&5
3871 X_CFLAGS="-I$d $X_CFLAGS"
3872 echo "$ac_t""$d" 1>&6
3874 echo "$ac_t""not found ($d: no such directory)" 1>&6
3877 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3878 echo "configure:3890: checking for MIT-SCREEN-SAVER libs" >&5
3881 X_LIBS="-L$d $X_LIBS"
3882 echo "$ac_t""$d" 1>&6
3884 echo "$ac_t""not found ($d: no such directory)" 1>&6
3887 # replace the directory string with "yes".
3889 with_mit=$with_mit_req
3894 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3895 echo " If it is a directory, then \`DIR/include' will be added to"
3896 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3902 if test "$with_mit" = yes; then
3904 ac_save_CPPFLAGS="$CPPFLAGS"
3905 if test \! -z "$includedir" ; then
3906 CPPFLAGS="$CPPFLAGS -I$includedir"
3908 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3909 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3910 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3911 echo "configure:3923: checking for X11/extensions/scrnsaver.h" >&5
3912 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3913 echo $ac_n "(cached) $ac_c" 1>&6
3915 cat > conftest.$ac_ext <<EOF
3916 #line 3928 "configure"
3917 #include "confdefs.h"
3918 #include <X11/extensions/scrnsaver.h>
3920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3921 { (eval echo configure:3933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3923 if test -z "$ac_err"; then
3925 eval "ac_cv_header_$ac_safe=yes"
3928 echo "configure: failed program was:" >&5
3929 cat conftest.$ac_ext >&5
3931 eval "ac_cv_header_$ac_safe=no"
3935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3936 echo "$ac_t""yes" 1>&6
3939 echo "$ac_t""no" 1>&6
3942 CPPFLAGS="$ac_save_CPPFLAGS"
3944 # Now check to see if it's really in the library; XF86Free-3.3 ships
3945 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3947 if test "$have_mit" = yes; then
3949 ac_save_CPPFLAGS="$CPPFLAGS"
3950 ac_save_LDFLAGS="$LDFLAGS"
3951 # ac_save_LIBS="$LIBS"
3953 if test \! -z "$includedir" ; then
3954 CPPFLAGS="$CPPFLAGS -I$includedir"
3956 # note: $X_CFLAGS includes $x_includes
3957 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3959 if test \! -z "$libdir" ; then
3960 LDFLAGS="$LDFLAGS -L$libdir"
3962 # note: $X_LIBS includes $x_libraries
3963 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
3965 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3966 echo "configure:3978: checking for XScreenSaverRegister in -lXext" >&5
3967 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3968 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3969 echo $ac_n "(cached) $ac_c" 1>&6
3971 ac_save_LIBS="$LIBS"
3972 LIBS="-lXext -lm $LIBS"
3973 cat > conftest.$ac_ext <<EOF
3974 #line 3986 "configure"
3975 #include "confdefs.h"
3976 /* Override any gcc2 internal prototype to avoid an error. */
3977 /* We use char because int might match the return type of a gcc2
3978 builtin and then its argument prototype would still apply. */
3979 char XScreenSaverRegister();
3982 XScreenSaverRegister()
3985 if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3987 eval "ac_cv_lib_$ac_lib_var=yes"
3989 echo "configure: failed program was:" >&5
3990 cat conftest.$ac_ext >&5
3992 eval "ac_cv_lib_$ac_lib_var=no"
3995 LIBS="$ac_save_LIBS"
3998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3999 echo "$ac_t""yes" 1>&6
4002 echo "$ac_t""no" 1>&6
4006 CPPFLAGS="$ac_save_CPPFLAGS"
4007 LDFLAGS="$ac_save_LDFLAGS"
4008 # LIBS="$ac_save_LIBS"
4011 if test "$have_mit" = no; then
4012 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
4013 # of in Xext. Thank you master, may I have another.
4015 ac_save_CPPFLAGS="$CPPFLAGS"
4016 ac_save_LDFLAGS="$LDFLAGS"
4017 # ac_save_LIBS="$LIBS"
4019 if test \! -z "$includedir" ; then
4020 CPPFLAGS="$CPPFLAGS -I$includedir"
4022 # note: $X_CFLAGS includes $x_includes
4023 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4025 if test \! -z "$libdir" ; then
4026 LDFLAGS="$LDFLAGS -L$libdir"
4028 # note: $X_LIBS includes $x_libraries
4029 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4031 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
4032 echo "configure:4044: checking for XScreenSaverRegister in -lXExExt" >&5
4033 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4034 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4035 echo $ac_n "(cached) $ac_c" 1>&6
4037 ac_save_LIBS="$LIBS"
4038 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
4039 cat > conftest.$ac_ext <<EOF
4040 #line 4052 "configure"
4041 #include "confdefs.h"
4042 /* Override any gcc2 internal prototype to avoid an error. */
4043 /* We use char because int might match the return type of a gcc2
4044 builtin and then its argument prototype would still apply. */
4045 char XScreenSaverRegister();
4048 XScreenSaverRegister()
4051 if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4053 eval "ac_cv_lib_$ac_lib_var=yes"
4055 echo "configure: failed program was:" >&5
4056 cat conftest.$ac_ext >&5
4058 eval "ac_cv_lib_$ac_lib_var=no"
4061 LIBS="$ac_save_LIBS"
4064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4065 echo "$ac_t""yes" 1>&6
4066 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
4068 echo "$ac_t""no" 1>&6
4072 CPPFLAGS="$ac_save_CPPFLAGS"
4073 LDFLAGS="$ac_save_LDFLAGS"
4074 # LIBS="$ac_save_LIBS"
4078 if test "$have_mit" = no; then
4079 # Double fuck! Looks like some versions of XFree86 (whichever version
4080 # it is that comes with RedHat Linux 2.0 -- I can't find a version
4081 # number) put this garbage in Xss instead of Xext. Thank you master,
4082 # may I have another.
4084 ac_save_CPPFLAGS="$CPPFLAGS"
4085 ac_save_LDFLAGS="$LDFLAGS"
4086 # ac_save_LIBS="$LIBS"
4088 if test \! -z "$includedir" ; then
4089 CPPFLAGS="$CPPFLAGS -I$includedir"
4091 # note: $X_CFLAGS includes $x_includes
4092 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4094 if test \! -z "$libdir" ; then
4095 LDFLAGS="$LDFLAGS -L$libdir"
4097 # note: $X_LIBS includes $x_libraries
4098 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4100 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4101 echo "configure:4113: checking for XScreenSaverRegister in -lXss" >&5
4102 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4104 echo $ac_n "(cached) $ac_c" 1>&6
4106 ac_save_LIBS="$LIBS"
4107 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4108 cat > conftest.$ac_ext <<EOF
4109 #line 4121 "configure"
4110 #include "confdefs.h"
4111 /* Override any gcc2 internal prototype to avoid an error. */
4112 /* We use char because int might match the return type of a gcc2
4113 builtin and then its argument prototype would still apply. */
4114 char XScreenSaverRegister();
4117 XScreenSaverRegister()
4120 if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4122 eval "ac_cv_lib_$ac_lib_var=yes"
4124 echo "configure: failed program was:" >&5
4125 cat conftest.$ac_ext >&5
4127 eval "ac_cv_lib_$ac_lib_var=no"
4130 LIBS="$ac_save_LIBS"
4133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4134 echo "$ac_t""yes" 1>&6
4135 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4137 echo "$ac_t""no" 1>&6
4141 CPPFLAGS="$ac_save_CPPFLAGS"
4142 LDFLAGS="$ac_save_LDFLAGS"
4143 # LIBS="$ac_save_LIBS"
4147 if test "$have_mit" = yes; then
4148 cat >> confdefs.h <<\EOF
4149 #define HAVE_MIT_SAVER_EXTENSION 1
4156 elif test "$with_mit" != no; then
4157 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4162 ###############################################################################
4164 # Check for the XIDLE server extension.
4166 ###############################################################################
4169 with_xidle_req=unspecified
4170 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4171 if test "${with_xidle_ext+set}" = set; then
4172 withval="$with_xidle_ext"
4173 with_xidle="$withval"; with_xidle_req="$withval"
4180 case "$with_xidle" in
4185 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4186 echo "configure:4198: checking for XIDLE headers" >&5
4187 d=$with_xidle/include
4189 X_CFLAGS="-I$d $X_CFLAGS"
4190 echo "$ac_t""$d" 1>&6
4192 echo "$ac_t""not found ($d: no such directory)" 1>&6
4195 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4196 echo "configure:4208: checking for XIDLE libs" >&5
4199 X_LIBS="-L$d $X_LIBS"
4200 echo "$ac_t""$d" 1>&6
4202 echo "$ac_t""not found ($d: no such directory)" 1>&6
4205 # replace the directory string with "yes".
4206 with_xidle_req="yes"
4207 with_xidle=$with_xidle_req
4212 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4213 echo " If it is a directory, then \`DIR/include' will be added to"
4214 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4220 if test "$with_xidle" = yes; then
4222 ac_save_CPPFLAGS="$CPPFLAGS"
4223 if test \! -z "$includedir" ; then
4224 CPPFLAGS="$CPPFLAGS -I$includedir"
4226 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4227 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4228 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4229 echo "configure:4241: checking for X11/extensions/xidle.h" >&5
4230 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4231 echo $ac_n "(cached) $ac_c" 1>&6
4233 cat > conftest.$ac_ext <<EOF
4234 #line 4246 "configure"
4235 #include "confdefs.h"
4236 #include <X11/extensions/xidle.h>
4238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4239 { (eval echo configure:4251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4241 if test -z "$ac_err"; then
4243 eval "ac_cv_header_$ac_safe=yes"
4246 echo "configure: failed program was:" >&5
4247 cat conftest.$ac_ext >&5
4249 eval "ac_cv_header_$ac_safe=no"
4253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4254 echo "$ac_t""yes" 1>&6
4256 cat >> confdefs.h <<\EOF
4257 #define HAVE_XIDLE_EXTENSION 1
4261 echo "$ac_t""no" 1>&6
4264 CPPFLAGS="$ac_save_CPPFLAGS"
4265 elif test "$with_xidle" != no; then
4266 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4271 ###############################################################################
4273 # Check for the SGI-VIDEO-CONTROL server extension.
4275 ###############################################################################
4278 with_sgivc_req=unspecified
4279 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4280 if test "${with_sgivc_ext+set}" = set; then
4281 withval="$with_sgivc_ext"
4282 with_sgivc="$withval"; with_sgivc_req="$withval"
4289 case "$with_sgivc" in
4294 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4295 echo "configure:4307: checking for SGI-VIDEO-CONTROL headers" >&5
4296 d=$with_sgivc/include
4298 X_CFLAGS="-I$d $X_CFLAGS"
4299 echo "$ac_t""$d" 1>&6
4301 echo "$ac_t""not found ($d: no such directory)" 1>&6
4304 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4305 echo "configure:4317: checking for SGI-VIDEO-CONTROL libs" >&5
4308 X_LIBS="-L$d $X_LIBS"
4309 echo "$ac_t""$d" 1>&6
4311 echo "$ac_t""not found ($d: no such directory)" 1>&6
4314 # replace the directory string with "yes".
4315 with_sgivc_req="yes"
4316 with_sgivc=$with_sgivc_req
4321 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4322 echo " If it is a directory, then \`DIR/include' will be added to"
4323 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4329 if test "$with_sgivc" = yes; then
4331 # first check for XSGIvc.h
4333 ac_save_CPPFLAGS="$CPPFLAGS"
4334 if test \! -z "$includedir" ; then
4335 CPPFLAGS="$CPPFLAGS -I$includedir"
4337 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4338 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4339 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4340 echo "configure:4352: checking for X11/extensions/XSGIvc.h" >&5
4341 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4342 echo $ac_n "(cached) $ac_c" 1>&6
4344 cat > conftest.$ac_ext <<EOF
4345 #line 4357 "configure"
4346 #include "confdefs.h"
4347 #include <X11/extensions/XSGIvc.h>
4349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4350 { (eval echo configure:4362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4352 if test -z "$ac_err"; then
4354 eval "ac_cv_header_$ac_safe=yes"
4357 echo "configure: failed program was:" >&5
4358 cat conftest.$ac_ext >&5
4360 eval "ac_cv_header_$ac_safe=no"
4364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4365 echo "$ac_t""yes" 1>&6
4368 echo "$ac_t""no" 1>&6
4371 CPPFLAGS="$ac_save_CPPFLAGS"
4373 # if that succeeded, then check for the -lXsgivc
4374 if test "$have_sgivc" = yes; then
4377 ac_save_CPPFLAGS="$CPPFLAGS"
4378 ac_save_LDFLAGS="$LDFLAGS"
4379 # ac_save_LIBS="$LIBS"
4381 if test \! -z "$includedir" ; then
4382 CPPFLAGS="$CPPFLAGS -I$includedir"
4384 # note: $X_CFLAGS includes $x_includes
4385 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4387 if test \! -z "$libdir" ; then
4388 LDFLAGS="$LDFLAGS -L$libdir"
4390 # note: $X_LIBS includes $x_libraries
4391 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4393 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4394 echo "configure:4406: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4395 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4396 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4397 echo $ac_n "(cached) $ac_c" 1>&6
4399 ac_save_LIBS="$LIBS"
4400 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4414 "configure"
4403 #include "confdefs.h"
4404 /* Override any gcc2 internal prototype to avoid an error. */
4405 /* We use char because int might match the return type of a gcc2
4406 builtin and then its argument prototype would still apply. */
4407 char XSGIvcQueryGammaMap();
4410 XSGIvcQueryGammaMap()
4413 if { (eval echo configure:4425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4415 eval "ac_cv_lib_$ac_lib_var=yes"
4417 echo "configure: failed program was:" >&5
4418 cat conftest.$ac_ext >&5
4420 eval "ac_cv_lib_$ac_lib_var=no"
4423 LIBS="$ac_save_LIBS"
4426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4427 echo "$ac_t""yes" 1>&6
4428 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4430 echo "$ac_t""no" 1>&6
4434 CPPFLAGS="$ac_save_CPPFLAGS"
4435 LDFLAGS="$ac_save_LDFLAGS"
4436 # LIBS="$ac_save_LIBS"
4440 # if that succeeded, then we've really got it.
4441 if test "$have_sgivc" = yes; then
4442 cat >> confdefs.h <<\EOF
4443 #define HAVE_SGI_VC_EXTENSION 1
4448 elif test "$with_sgivc" != no; then
4449 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4454 ###############################################################################
4456 # Check for the DPMS server extension.
4458 ###############################################################################
4461 with_dpms_req=unspecified
4462 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4463 if test "${with_dpms_ext+set}" = set; then
4464 withval="$with_dpms_ext"
4465 with_dpms="$withval"; with_dpms_req="$withval"
4472 case "$with_dpms" in
4477 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4478 echo "configure:4490: checking for DPMS headers" >&5
4479 d=$with_dpms/include
4481 X_CFLAGS="-I$d $X_CFLAGS"
4482 echo "$ac_t""$d" 1>&6
4484 echo "$ac_t""not found ($d: no such directory)" 1>&6
4487 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4488 echo "configure:4500: checking for DPMS libs" >&5
4491 X_LIBS="-L$d $X_LIBS"
4492 echo "$ac_t""$d" 1>&6
4494 echo "$ac_t""not found ($d: no such directory)" 1>&6
4497 # replace the directory string with "yes".
4499 with_dpms=$with_dpms_req
4504 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4505 echo " If it is a directory, then \`DIR/include' will be added to"
4506 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4512 if test "$with_dpms" = yes; then
4514 # first check for dpms.h
4516 ac_save_CPPFLAGS="$CPPFLAGS"
4517 if test \! -z "$includedir" ; then
4518 CPPFLAGS="$CPPFLAGS -I$includedir"
4520 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4521 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4522 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4523 echo "configure:4535: checking for X11/extensions/dpms.h" >&5
4524 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4525 echo $ac_n "(cached) $ac_c" 1>&6
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4540 "configure"
4529 #include "confdefs.h"
4530 #include <X11/extensions/dpms.h>
4532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4533 { (eval echo configure:4545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4535 if test -z "$ac_err"; then
4537 eval "ac_cv_header_$ac_safe=yes"
4540 echo "configure: failed program was:" >&5
4541 cat conftest.$ac_ext >&5
4543 eval "ac_cv_header_$ac_safe=no"
4547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4548 echo "$ac_t""yes" 1>&6
4551 echo "$ac_t""no" 1>&6
4554 CPPFLAGS="$ac_save_CPPFLAGS"
4556 # if that succeeded, then check for the DPMS code in the libraries
4557 if test "$have_dpms" = yes; then
4559 # first look in -lXext (this is where it is with XFree86 4.0)
4562 ac_save_CPPFLAGS="$CPPFLAGS"
4563 ac_save_LDFLAGS="$LDFLAGS"
4564 # ac_save_LIBS="$LIBS"
4566 if test \! -z "$includedir" ; then
4567 CPPFLAGS="$CPPFLAGS -I$includedir"
4569 # note: $X_CFLAGS includes $x_includes
4570 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4572 if test \! -z "$libdir" ; then
4573 LDFLAGS="$LDFLAGS -L$libdir"
4575 # note: $X_LIBS includes $x_libraries
4576 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4578 echo $ac_n "checking for DPMSInfo in -lXext""... $ac_c" 1>&6
4579 echo "configure:4591: checking for DPMSInfo in -lXext" >&5
4580 ac_lib_var=`echo Xext'_'DPMSInfo | sed 'y%./+-%__p_%'`
4581 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4582 echo $ac_n "(cached) $ac_c" 1>&6
4584 ac_save_LIBS="$LIBS"
4585 LIBS="-lXext -lXext -lX11 $LIBS"
4586 cat > conftest.$ac_ext <<EOF
4587 #line 4599 "configure"
4588 #include "confdefs.h"
4589 /* Override any gcc2 internal prototype to avoid an error. */
4590 /* We use char because int might match the return type of a gcc2
4591 builtin and then its argument prototype would still apply. */
4598 if { (eval echo configure:4610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4600 eval "ac_cv_lib_$ac_lib_var=yes"
4602 echo "configure: failed program was:" >&5
4603 cat conftest.$ac_ext >&5
4605 eval "ac_cv_lib_$ac_lib_var=no"
4608 LIBS="$ac_save_LIBS"
4611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4612 echo "$ac_t""yes" 1>&6
4615 echo "$ac_t""no" 1>&6
4619 CPPFLAGS="$ac_save_CPPFLAGS"
4620 LDFLAGS="$ac_save_LDFLAGS"
4621 # LIBS="$ac_save_LIBS"
4624 # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
4625 if test "$have_dpms" = no; then
4627 ac_save_CPPFLAGS="$CPPFLAGS"
4628 ac_save_LDFLAGS="$LDFLAGS"
4629 # ac_save_LIBS="$LIBS"
4631 if test \! -z "$includedir" ; then
4632 CPPFLAGS="$CPPFLAGS -I$includedir"
4634 # note: $X_CFLAGS includes $x_includes
4635 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4637 if test \! -z "$libdir" ; then
4638 LDFLAGS="$LDFLAGS -L$libdir"
4640 # note: $X_LIBS includes $x_libraries
4641 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4643 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4644 echo "configure:4656: checking for DPMSInfo in -lXdpms" >&5
4645 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4646 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4647 echo $ac_n "(cached) $ac_c" 1>&6
4649 ac_save_LIBS="$LIBS"
4650 LIBS="-lXdpms -lXext -lX11 $LIBS"
4651 cat > conftest.$ac_ext <<EOF
4652 #line 4664 "configure"
4653 #include "confdefs.h"
4654 /* Override any gcc2 internal prototype to avoid an error. */
4655 /* We use char because int might match the return type of a gcc2
4656 builtin and then its argument prototype would still apply. */
4663 if { (eval echo configure:4675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4665 eval "ac_cv_lib_$ac_lib_var=yes"
4667 echo "configure: failed program was:" >&5
4668 cat conftest.$ac_ext >&5
4670 eval "ac_cv_lib_$ac_lib_var=no"
4673 LIBS="$ac_save_LIBS"
4676 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4677 echo "$ac_t""yes" 1>&6
4678 have_dpms=yes; XDPMS_LIBS="-lXdpms"
4680 echo "$ac_t""no" 1>&6
4684 CPPFLAGS="$ac_save_CPPFLAGS"
4685 LDFLAGS="$ac_save_LDFLAGS"
4686 # LIBS="$ac_save_LIBS"
4692 # if that succeeded, then we've really got it.
4693 if test "$have_dpms" = yes; then
4694 cat >> confdefs.h <<\EOF
4695 #define HAVE_DPMS_EXTENSION 1
4700 elif test "$with_dpms" != no; then
4701 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4706 ###############################################################################
4708 # Check for the XF86VMODE server extension (for virtual screens.)
4710 ###############################################################################
4713 with_xf86vmode_req=unspecified
4714 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
4715 if test "${with_xf86vmode_ext+set}" = set; then
4716 withval="$with_xf86vmode_ext"
4717 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
4724 case "$with_xf86vmode" in
4729 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
4730 echo "configure:4742: checking for xf86vmode headers" >&5
4731 d=$with_xf86vmode/include
4733 X_CFLAGS="-I$d $X_CFLAGS"
4734 echo "$ac_t""$d" 1>&6
4736 echo "$ac_t""not found ($d: no such directory)" 1>&6
4739 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
4740 echo "configure:4752: checking for xf86vmode libs" >&5
4741 d=$with_xf86vmode/lib
4743 X_LIBS="-L$d $X_LIBS"
4744 echo "$ac_t""$d" 1>&6
4746 echo "$ac_t""not found ($d: no such directory)" 1>&6
4749 # replace the directory string with "yes".
4750 with_xf86vmode_req="yes"
4751 with_xf86vmode=$with_xf86vmode_req
4756 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
4757 echo " If it is a directory, then \`DIR/include' will be added to"
4758 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4764 if test "$with_xf86vmode" = yes; then
4766 # first check for xf86vmode.h
4768 ac_save_CPPFLAGS="$CPPFLAGS"
4769 if test \! -z "$includedir" ; then
4770 CPPFLAGS="$CPPFLAGS -I$includedir"
4772 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4773 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4774 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4775 echo "configure:4787: checking for X11/extensions/xf86vmode.h" >&5
4776 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4777 echo $ac_n "(cached) $ac_c" 1>&6
4779 cat > conftest.$ac_ext <<EOF
4780 #line 4792 "configure"
4781 #include "confdefs.h"
4782 #include <X11/extensions/xf86vmode.h>
4784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4785 { (eval echo configure:4797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4787 if test -z "$ac_err"; then
4789 eval "ac_cv_header_$ac_safe=yes"
4792 echo "configure: failed program was:" >&5
4793 cat conftest.$ac_ext >&5
4795 eval "ac_cv_header_$ac_safe=no"
4799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4800 echo "$ac_t""yes" 1>&6
4803 echo "$ac_t""no" 1>&6
4806 CPPFLAGS="$ac_save_CPPFLAGS"
4808 # if that succeeded, then check for the -lXxf86vm
4809 if test "$have_xf86vmode" = yes; then
4812 ac_save_CPPFLAGS="$CPPFLAGS"
4813 ac_save_LDFLAGS="$LDFLAGS"
4814 # ac_save_LIBS="$LIBS"
4816 if test \! -z "$includedir" ; then
4817 CPPFLAGS="$CPPFLAGS -I$includedir"
4819 # note: $X_CFLAGS includes $x_includes
4820 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4822 if test \! -z "$libdir" ; then
4823 LDFLAGS="$LDFLAGS -L$libdir"
4825 # note: $X_LIBS includes $x_libraries
4826 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4828 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
4829 echo "configure:4841: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
4830 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
4831 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4832 echo $ac_n "(cached) $ac_c" 1>&6
4834 ac_save_LIBS="$LIBS"
4835 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
4836 cat > conftest.$ac_ext <<EOF
4837 #line 4849 "configure"
4838 #include "confdefs.h"
4839 /* Override any gcc2 internal prototype to avoid an error. */
4840 /* We use char because int might match the return type of a gcc2
4841 builtin and then its argument prototype would still apply. */
4842 char XF86VidModeGetViewPort();
4845 XF86VidModeGetViewPort()
4848 if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4850 eval "ac_cv_lib_$ac_lib_var=yes"
4852 echo "configure: failed program was:" >&5
4853 cat conftest.$ac_ext >&5
4855 eval "ac_cv_lib_$ac_lib_var=no"
4858 LIBS="$ac_save_LIBS"
4861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4862 echo "$ac_t""yes" 1>&6
4863 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
4865 echo "$ac_t""no" 1>&6
4869 CPPFLAGS="$ac_save_CPPFLAGS"
4870 LDFLAGS="$ac_save_LDFLAGS"
4871 # LIBS="$ac_save_LIBS"
4875 # if that succeeded, then we've really got it.
4876 if test "$have_xf86vmode" = yes; then
4877 cat >> confdefs.h <<\EOF
4878 #define HAVE_XF86VMODE 1
4883 elif test "$with_xf86vmode" != no; then
4884 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
4889 ###############################################################################
4891 # Check for the XF86VMODE server extension (for gamma fading.)
4893 ###############################################################################
4896 with_xf86gamma_req=unspecified
4897 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
4898 if test "${with_xf86gamma_ext+set}" = set; then
4899 withval="$with_xf86gamma_ext"
4900 with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
4907 case "$with_xf86gamma" in
4912 echo $ac_n "checking for xf86gamma headers""... $ac_c" 1>&6
4913 echo "configure:4925: checking for xf86gamma headers" >&5
4914 d=$with_xf86gamma/include
4916 X_CFLAGS="-I$d $X_CFLAGS"
4917 echo "$ac_t""$d" 1>&6
4919 echo "$ac_t""not found ($d: no such directory)" 1>&6
4922 echo $ac_n "checking for xf86gamma libs""... $ac_c" 1>&6
4923 echo "configure:4935: checking for xf86gamma libs" >&5
4924 d=$with_xf86gamma/lib
4926 X_LIBS="-L$d $X_LIBS"
4927 echo "$ac_t""$d" 1>&6
4929 echo "$ac_t""not found ($d: no such directory)" 1>&6
4932 # replace the directory string with "yes".
4933 with_xf86gamma_req="yes"
4934 with_xf86gamma=$with_xf86gamma_req
4939 echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
4940 echo " If it is a directory, then \`DIR/include' will be added to"
4941 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4947 if test "$with_xf86gamma" = yes; then
4949 # first check for xf86vmode.h, if we haven't already
4950 if test "$have_xf86vmode" = yes; then
4954 ac_save_CPPFLAGS="$CPPFLAGS"
4955 if test \! -z "$includedir" ; then
4956 CPPFLAGS="$CPPFLAGS -I$includedir"
4958 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4959 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
4960 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
4961 echo "configure:4973: checking for X11/extensions/xf86vmode.h" >&5
4962 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4963 echo $ac_n "(cached) $ac_c" 1>&6
4965 cat > conftest.$ac_ext <<EOF
4966 #line 4978 "configure"
4967 #include "confdefs.h"
4968 #include <X11/extensions/xf86vmode.h>
4970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4971 { (eval echo configure:4983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4973 if test -z "$ac_err"; then
4975 eval "ac_cv_header_$ac_safe=yes"
4978 echo "configure: failed program was:" >&5
4979 cat conftest.$ac_ext >&5
4981 eval "ac_cv_header_$ac_safe=no"
4985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4986 echo "$ac_t""yes" 1>&6
4989 echo "$ac_t""no" 1>&6
4992 CPPFLAGS="$ac_save_CPPFLAGS"
4995 # if that succeeded, then check for the -lXxf86vm
4996 if test "$have_xf86gamma" = yes; then
4999 ac_save_CPPFLAGS="$CPPFLAGS"
5000 ac_save_LDFLAGS="$LDFLAGS"
5001 # ac_save_LIBS="$LIBS"
5003 if test \! -z "$includedir" ; then
5004 CPPFLAGS="$CPPFLAGS -I$includedir"
5006 # note: $X_CFLAGS includes $x_includes
5007 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5009 if test \! -z "$libdir" ; then
5010 LDFLAGS="$LDFLAGS -L$libdir"
5012 # note: $X_LIBS includes $x_libraries
5013 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
5015 echo $ac_n "checking for XF86VidModeSetGamma in -lXxf86vm""... $ac_c" 1>&6
5016 echo "configure:5028: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
5017 ac_lib_var=`echo Xxf86vm'_'XF86VidModeSetGamma | sed 'y%./+-%__p_%'`
5018 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5019 echo $ac_n "(cached) $ac_c" 1>&6
5021 ac_save_LIBS="$LIBS"
5022 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
5023 cat > conftest.$ac_ext <<EOF
5024 #line 5036 "configure"
5025 #include "confdefs.h"
5026 /* Override any gcc2 internal prototype to avoid an error. */
5027 /* We use char because int might match the return type of a gcc2
5028 builtin and then its argument prototype would still apply. */
5029 char XF86VidModeSetGamma();
5032 XF86VidModeSetGamma()
5035 if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5037 eval "ac_cv_lib_$ac_lib_var=yes"
5039 echo "configure: failed program was:" >&5
5040 cat conftest.$ac_ext >&5
5042 eval "ac_cv_lib_$ac_lib_var=no"
5045 LIBS="$ac_save_LIBS"
5048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5049 echo "$ac_t""yes" 1>&6
5052 echo "$ac_t""no" 1>&6
5056 CPPFLAGS="$ac_save_CPPFLAGS"
5057 LDFLAGS="$ac_save_LDFLAGS"
5058 # LIBS="$ac_save_LIBS"
5062 # pull in the lib, if we haven't already
5063 if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
5064 SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
5067 # if that succeeded, then we've really got it.
5068 if test "$have_xf86gamma" = yes; then
5069 cat >> confdefs.h <<\EOF
5070 #define HAVE_XF86VMODE_GAMMA 1
5075 elif test "$with_xf86gamma" != no; then
5076 echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
5081 ###############################################################################
5083 # Check for HP XHPDisableReset and XHPEnableReset.
5085 ###############################################################################
5088 ac_save_CPPFLAGS="$CPPFLAGS"
5089 if test \! -z "$includedir" ; then
5090 CPPFLAGS="$CPPFLAGS -I$includedir"
5092 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5093 cat > conftest.$ac_ext <<EOF
5094 #line 5106 "configure"
5095 #include "confdefs.h"
5096 #include <X11/XHPlib.h>
5098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5099 egrep "XHPDisableReset" >/dev/null 2>&1; then
5101 cat >> confdefs.h <<\EOF
5102 #define HAVE_XHPDISABLERESET 1
5105 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
5109 CPPFLAGS="$ac_save_CPPFLAGS"
5112 ###############################################################################
5114 # Check for /proc/interrupts.
5116 ###############################################################################
5118 have_proc_interrupts=no
5119 with_proc_interrupts_req=unspecified
5120 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
5121 if test "${with_proc_interrupts+set}" = set; then
5122 withval="$with_proc_interrupts"
5123 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
5125 with_proc_interrupts=yes
5129 if test "$with_proc_interrupts" = yes; then
5131 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
5132 echo "configure:5144: checking whether /proc/interrupts contains keyboard data" >&5
5133 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
5134 echo $ac_n "(cached) $ac_c" 1>&6
5136 ac_cv_have_proc_interrupts=no
5137 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
5138 ac_cv_have_proc_interrupts=yes
5143 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
5144 have_proc_interrupts=$ac_cv_have_proc_interrupts
5146 if test "$have_proc_interrupts" = yes; then
5147 cat >> confdefs.h <<\EOF
5148 #define HAVE_PROC_INTERRUPTS 1
5153 elif test "$with_proc_interrupts" != no; then
5154 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
5159 ###############################################################################
5161 # The --enable-locking option
5163 ###############################################################################
5165 # Check whether --enable-locking or --disable-locking was given.
5166 if test "${enable_locking+set}" = set; then
5167 enableval="$enable_locking"
5168 enable_locking="$enableval"
5173 if test "$enable_locking" = yes; then
5175 elif test "$enable_locking" = no; then
5176 cat >> confdefs.h <<\EOF
5177 #define NO_LOCKING 1
5181 echo "error: must be yes or no: --enable-locking=$enable_locking"
5187 ###############################################################################
5189 # The --enable-vt-locking option
5191 ###############################################################################
5193 #ac_vt_lockswitch=no
5194 #AC_ARG_ENABLE(vt-locking,[
5195 # --enable-vt-locking Compile in support for locking Virtual Terminals.
5196 # This is the default if the system supports it, and
5197 # if locking support is included (--enable-locking.)
5198 # --disable-vt-locking Do not allow locking of VTs, even if locking is
5200 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
5201 #if test "$enable_vt_locking" = yes; then
5203 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
5204 # [AC_TRY_COMPILE([#include <fcntl.h>
5205 # #include <sys/ioctl.h>
5206 # #include <sys/vt.h>],
5207 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
5208 # [ac_cv_vt_lockswitch=yes],
5209 # [ac_cv_vt_lockswitch=no])])
5210 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
5212 #elif test "$enable_vt_locking" = no; then
5215 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
5219 #if test "$ac_vt_lockswitch" = yes; then
5220 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
5221 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
5222 # # #### but it doesn't work yet, so don't worry about that for now.
5228 ###############################################################################
5232 ###############################################################################
5236 # Solaris systems tend to come with PAM misconfigured.
5237 # Don't build it by default, even if the headers exist.
5241 # Default to building PAM support on all other systems, if it exists.
5242 with_pam_default=yes
5247 with_pam_req=unspecified
5249 # Check whether --with-pam or --without-pam was given.
5250 if test "${with_pam+set}" = set; then
5252 with_pam="$withval"; with_pam_req="$withval"
5254 with_pam=$with_pam_default
5264 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
5265 echo "configure:5277: checking for PAM headers" >&5
5268 X_CFLAGS="-I$d $X_CFLAGS"
5269 echo "$ac_t""$d" 1>&6
5271 echo "$ac_t""not found ($d: no such directory)" 1>&6
5274 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
5275 echo "configure:5287: checking for PAM libs" >&5
5278 X_LIBS="-L$d $X_LIBS"
5279 echo "$ac_t""$d" 1>&6
5281 echo "$ac_t""not found ($d: no such directory)" 1>&6
5284 # replace the directory string with "yes".
5286 with_pam=$with_pam_req
5291 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
5292 echo " If it is a directory, then \`DIR/include' will be added to"
5293 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5299 if test "$enable_locking" = yes -a "$with_pam" = yes; then
5300 echo $ac_n "checking for PAM""... $ac_c" 1>&6
5301 echo "configure:5313: checking for PAM" >&5
5302 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
5303 echo $ac_n "(cached) $ac_c" 1>&6
5306 ac_save_CPPFLAGS="$CPPFLAGS"
5307 if test \! -z "$includedir" ; then
5308 CPPFLAGS="$CPPFLAGS -I$includedir"
5310 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5311 cat > conftest.$ac_ext <<EOF
5312 #line 5324 "configure"
5313 #include "confdefs.h"
5314 #include <security/pam_appl.h>
5319 if { (eval echo configure:5331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5323 echo "configure: failed program was:" >&5
5324 cat conftest.$ac_ext >&5
5329 CPPFLAGS="$ac_save_CPPFLAGS"
5332 echo "$ac_t""$ac_cv_pam" 1>&6
5333 if test "$ac_cv_pam" = yes ; then
5335 cat >> confdefs.h <<\EOF
5339 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
5341 # libpam typically requires dlopen and dlsym. On FreeBSD,
5342 # those are in libc. On Linux and Solaris, they're in libdl.
5343 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5344 echo "configure:5356: checking for dlopen in -ldl" >&5
5345 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5346 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5347 echo $ac_n "(cached) $ac_c" 1>&6
5349 ac_save_LIBS="$LIBS"
5351 cat > conftest.$ac_ext <<EOF
5352 #line 5364 "configure"
5353 #include "confdefs.h"
5354 /* Override any gcc2 internal prototype to avoid an error. */
5355 /* We use char because int might match the return type of a gcc2
5356 builtin and then its argument prototype would still apply. */
5363 if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5365 eval "ac_cv_lib_$ac_lib_var=yes"
5367 echo "configure: failed program was:" >&5
5368 cat conftest.$ac_ext >&5
5370 eval "ac_cv_lib_$ac_lib_var=no"
5373 LIBS="$ac_save_LIBS"
5376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5377 echo "$ac_t""yes" 1>&6
5378 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5380 echo "$ac_t""no" 1>&6
5384 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5385 echo "configure:5397: checking how to call pam_strerror" >&5
5386 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5387 echo $ac_n "(cached) $ac_c" 1>&6
5389 cat > conftest.$ac_ext <<EOF
5390 #line 5402 "configure"
5391 #include "confdefs.h"
5394 #include <security/pam_appl.h>
5396 pam_handle_t *pamh = 0;
5397 char *s = pam_strerror(pamh, PAM_SUCCESS);
5400 if { (eval echo configure:5412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5402 ac_pam_strerror_args=2
5404 echo "configure: failed program was:" >&5
5405 cat conftest.$ac_ext >&5
5407 cat > conftest.$ac_ext <<EOF
5408 #line 5420 "configure"
5409 #include "confdefs.h"
5412 #include <security/pam_appl.h>
5415 pam_strerror(PAM_SUCCESS);
5418 if { (eval echo configure:5430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5420 ac_pam_strerror_args=1
5422 echo "configure: failed program was:" >&5
5423 cat conftest.$ac_ext >&5
5425 ac_pam_strerror_args=0
5430 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5433 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5434 if test "$ac_pam_strerror_args" = 1 ; then
5435 echo "$ac_t""one argument" 1>&6
5436 elif test "$ac_pam_strerror_args" = 2 ; then
5437 cat >> confdefs.h <<\EOF
5438 #define PAM_STRERROR_TWO_ARGS 1
5441 echo "$ac_t""two arguments" 1>&6
5443 echo "$ac_t""unknown" 1>&6
5449 ###############################################################################
5451 # Check for Kerberos.
5453 ###############################################################################
5457 with_kerberos_req=unspecified
5459 # Check whether --with-kerberos or --without-kerberos was given.
5460 if test "${with_kerberos+set}" = set; then
5461 withval="$with_kerberos"
5462 with_kerberos="$withval"; with_kerberos_req="$withval"
5469 case "$with_kerberos" in
5474 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5475 echo "configure:5487: checking for Kerberos headers" >&5
5476 d=$with_kerberos/include
5478 X_CFLAGS="-I$d $X_CFLAGS"
5479 echo "$ac_t""$d" 1>&6
5481 echo "$ac_t""not found ($d: no such directory)" 1>&6
5484 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5485 echo "configure:5497: checking for Kerberos libs" >&5
5486 d=$with_kerberos/lib
5488 X_LIBS="-L$d $X_LIBS"
5489 echo "$ac_t""$d" 1>&6
5491 echo "$ac_t""not found ($d: no such directory)" 1>&6
5494 # replace the directory string with "yes".
5495 with_kerberos_req="yes"
5496 with_kerberos=$with_kerberos_req
5501 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5502 echo " If it is a directory, then \`DIR/include' will be added to"
5503 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5509 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5510 echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
5511 echo "configure:5523: checking for Kerberos 4" >&5
5512 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5513 echo $ac_n "(cached) $ac_c" 1>&6
5516 ac_save_CPPFLAGS="$CPPFLAGS"
5517 if test \! -z "$includedir" ; then
5518 CPPFLAGS="$CPPFLAGS -I$includedir"
5520 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5521 cat > conftest.$ac_ext <<EOF
5522 #line 5534 "configure"
5523 #include "confdefs.h"
5529 if { (eval echo configure:5541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5533 echo "configure: failed program was:" >&5
5534 cat conftest.$ac_ext >&5
5539 CPPFLAGS="$ac_save_CPPFLAGS"
5542 echo "$ac_t""$ac_cv_kerberos" 1>&6
5543 echo $ac_n "checking for Kerberos 5""... $ac_c" 1>&6
5544 echo "configure:5556: checking for Kerberos 5" >&5
5545 if eval "test \"`echo '$''{'ac_cv_kerberos5'+set}'`\" = set"; then
5546 echo $ac_n "(cached) $ac_c" 1>&6
5549 ac_save_CPPFLAGS="$CPPFLAGS"
5550 if test \! -z "$includedir" ; then
5551 CPPFLAGS="$CPPFLAGS -I$includedir"
5553 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5554 cat > conftest.$ac_ext <<EOF
5555 #line 5567 "configure"
5556 #include "confdefs.h"
5557 #include <kerberosIV/krb.h>
5562 if { (eval echo configure:5574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5566 echo "configure: failed program was:" >&5
5567 cat conftest.$ac_ext >&5
5572 CPPFLAGS="$ac_save_CPPFLAGS"
5575 echo "$ac_t""$ac_cv_kerberos5" 1>&6
5577 if test "$ac_cv_kerberos" = yes ; then
5579 cat >> confdefs.h <<\EOF
5580 #define HAVE_KERBEROS 1
5585 if test "$ac_cv_kerberos5" = yes ; then
5588 cat >> confdefs.h <<\EOF
5589 #define HAVE_KERBEROS 1
5592 cat >> confdefs.h <<\EOF
5593 #define HAVE_KERBEROS5 1
5598 if test "$have_kerberos5" = yes ; then
5599 # from Matt Knopp <mhat@infocalypse.netlag.com>
5600 # (who got it from amu@mit.edu)
5601 PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
5602 elif test "$have_kerberos" = yes ; then
5603 # from Tim Showalter <tjs+@andrew.cmu.edu>
5604 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
5607 if test "$have_kerberos" = yes ; then
5608 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5609 echo "configure:5621: checking for res_search" >&5
5610 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5611 echo $ac_n "(cached) $ac_c" 1>&6
5613 cat > conftest.$ac_ext <<EOF
5614 #line 5626 "configure"
5615 #include "confdefs.h"
5616 /* System header to define __stub macros and hopefully few prototypes,
5617 which can conflict with char res_search(); below. */
5619 /* Override any gcc2 internal prototype to avoid an error. */
5620 /* We use char because int might match the return type of a gcc2
5621 builtin and then its argument prototype would still apply. */
5626 /* The GNU C library defines this for functions which it implements
5627 to always fail with ENOSYS. Some functions are actually named
5628 something starting with __ and the normal name is an alias. */
5629 #if defined (__stub_res_search) || defined (__stub___res_search)
5637 if { (eval echo configure:5649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5639 eval "ac_cv_func_res_search=yes"
5641 echo "configure: failed program was:" >&5
5642 cat conftest.$ac_ext >&5
5644 eval "ac_cv_func_res_search=no"
5649 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5650 echo "$ac_t""yes" 1>&6
5653 echo "$ac_t""no" 1>&6
5654 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5655 echo "configure:5667: checking for res_search in -lresolv" >&5
5656 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5657 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5658 echo $ac_n "(cached) $ac_c" 1>&6
5660 ac_save_LIBS="$LIBS"
5661 LIBS="-lresolv $LIBS"
5662 cat > conftest.$ac_ext <<EOF
5663 #line 5675 "configure"
5664 #include "confdefs.h"
5665 /* Override any gcc2 internal prototype to avoid an error. */
5666 /* We use char because int might match the return type of a gcc2
5667 builtin and then its argument prototype would still apply. */
5674 if { (eval echo configure:5686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5676 eval "ac_cv_lib_$ac_lib_var=yes"
5678 echo "configure: failed program was:" >&5
5679 cat conftest.$ac_ext >&5
5681 eval "ac_cv_lib_$ac_lib_var=no"
5684 LIBS="$ac_save_LIBS"
5687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5688 echo "$ac_t""yes" 1>&6
5689 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
5691 echo "$ac_t""no" 1>&6
5692 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
5702 ###############################################################################
5704 # Check for the nine billion variants of shadow passwords...
5706 ###############################################################################
5711 with_shadow_req=unspecified
5713 # Check whether --with-shadow or --without-shadow was given.
5714 if test "${with_shadow+set}" = set; then
5715 withval="$with_shadow"
5716 with_shadow="$withval"; with_shadow_req="$withval"
5723 case "$with_shadow" in
5728 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
5729 echo "configure:5741: checking for shadow password headers" >&5
5730 d=$with_shadow/include
5732 X_CFLAGS="-I$d $X_CFLAGS"
5733 echo "$ac_t""$d" 1>&6
5735 echo "$ac_t""not found ($d: no such directory)" 1>&6
5738 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
5739 echo "configure:5751: checking for shadow password libs" >&5
5742 X_LIBS="-L$d $X_LIBS"
5743 echo "$ac_t""$d" 1>&6
5745 echo "$ac_t""not found ($d: no such directory)" 1>&6
5748 # replace the directory string with "yes".
5749 with_shadow_req="yes"
5750 with_shadow=$with_shadow_req
5755 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
5756 echo " If it is a directory, then \`DIR/include' will be added to"
5757 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5763 if test "$enable_locking" = no ; then
5769 ###############################################################################
5771 # Check for Sun "adjunct" passwords.
5773 ###############################################################################
5775 if test "$with_shadow" = yes ; then
5776 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
5777 echo "configure:5789: checking for Sun-style shadow passwords" >&5
5778 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
5779 echo $ac_n "(cached) $ac_c" 1>&6
5782 ac_save_CPPFLAGS="$CPPFLAGS"
5783 if test \! -z "$includedir" ; then
5784 CPPFLAGS="$CPPFLAGS -I$includedir"
5786 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5787 cat > conftest.$ac_ext <<EOF
5788 #line 5800 "configure"
5789 #include "confdefs.h"
5792 #include <sys/types.h>
5793 #include <sys/label.h>
5794 #include <sys/audit.h>
5797 struct passwd_adjunct *p = getpwanam("nobody");
5798 const char *pw = p->pwa_passwd;
5801 if { (eval echo configure:5813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5803 ac_cv_sun_adjunct=yes
5805 echo "configure: failed program was:" >&5
5806 cat conftest.$ac_ext >&5
5808 ac_cv_sun_adjunct=no
5811 CPPFLAGS="$ac_save_CPPFLAGS"
5814 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
5815 if test "$ac_cv_sun_adjunct" = yes; then
5816 have_shadow_adjunct=yes
5823 ###############################################################################
5825 # Check for DEC and SCO so-called "enhanced" security.
5827 ###############################################################################
5829 if test "$with_shadow" = yes ; then
5830 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
5831 echo "configure:5843: checking for DEC-style shadow passwords" >&5
5832 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
5833 echo $ac_n "(cached) $ac_c" 1>&6
5836 ac_save_CPPFLAGS="$CPPFLAGS"
5837 if test \! -z "$includedir" ; then
5838 CPPFLAGS="$CPPFLAGS -I$includedir"
5840 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5841 cat > conftest.$ac_ext <<EOF
5842 #line 5854 "configure"
5843 #include "confdefs.h"
5846 #include <sys/types.h>
5848 #include <sys/security.h>
5851 struct pr_passwd *p;
5853 set_auth_parameters(0, 0);
5854 check_auth_parameters();
5855 p = getprpwnam("nobody");
5856 pw = p->ufld.fd_encrypt;
5859 if { (eval echo configure:5871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5861 ac_cv_enhanced_passwd=yes
5863 echo "configure: failed program was:" >&5
5864 cat conftest.$ac_ext >&5
5866 ac_cv_enhanced_passwd=no
5869 CPPFLAGS="$ac_save_CPPFLAGS"
5872 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
5873 if test $ac_cv_enhanced_passwd = yes; then
5874 have_shadow_enhanced=yes
5878 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
5879 # (I'm told it needs -lcurses too, but I don't understand why.)
5880 # But on DEC, it's in -lsecurity.
5882 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
5883 echo "configure:5895: checking for getprpwnam in -lprot" >&5
5884 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
5885 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5886 echo $ac_n "(cached) $ac_c" 1>&6
5888 ac_save_LIBS="$LIBS"
5889 LIBS="-lprot -lx $LIBS"
5890 cat > conftest.$ac_ext <<EOF
5891 #line 5903 "configure"
5892 #include "confdefs.h"
5893 /* Override any gcc2 internal prototype to avoid an error. */
5894 /* We use char because int might match the return type of a gcc2
5895 builtin and then its argument prototype would still apply. */
5902 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5904 eval "ac_cv_lib_$ac_lib_var=yes"
5906 echo "configure: failed program was:" >&5
5907 cat conftest.$ac_ext >&5
5909 eval "ac_cv_lib_$ac_lib_var=no"
5912 LIBS="$ac_save_LIBS"
5915 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5916 echo "$ac_t""yes" 1>&6
5917 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
5919 echo "$ac_t""no" 1>&6
5920 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
5921 echo "configure:5933: checking for getprpwnam in -lsecurity" >&5
5922 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
5923 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5924 echo $ac_n "(cached) $ac_c" 1>&6
5926 ac_save_LIBS="$LIBS"
5927 LIBS="-lsecurity $LIBS"
5928 cat > conftest.$ac_ext <<EOF
5929 #line 5941 "configure"
5930 #include "confdefs.h"
5931 /* Override any gcc2 internal prototype to avoid an error. */
5932 /* We use char because int might match the return type of a gcc2
5933 builtin and then its argument prototype would still apply. */
5940 if { (eval echo configure:5952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5942 eval "ac_cv_lib_$ac_lib_var=yes"
5944 echo "configure: failed program was:" >&5
5945 cat conftest.$ac_ext >&5
5947 eval "ac_cv_lib_$ac_lib_var=no"
5950 LIBS="$ac_save_LIBS"
5953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5954 echo "$ac_t""yes" 1>&6
5955 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
5957 echo "$ac_t""no" 1>&6
5965 ###############################################################################
5967 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
5969 ###############################################################################
5971 if test "$with_shadow" = yes ; then
5972 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
5973 echo "configure:5985: checking for HP-style shadow passwords" >&5
5974 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
5975 echo $ac_n "(cached) $ac_c" 1>&6
5978 ac_save_CPPFLAGS="$CPPFLAGS"
5979 if test \! -z "$includedir" ; then
5980 CPPFLAGS="$CPPFLAGS -I$includedir"
5982 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5983 cat > conftest.$ac_ext <<EOF
5984 #line 5996 "configure"
5985 #include "confdefs.h"
5988 #include <sys/types.h>
5990 #include <hpsecurity.h>
5993 struct s_passwd *p = getspwnam("nobody");
5994 const char *pw = p->pw_passwd;
5997 if { (eval echo configure:6009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5999 ac_cv_hpux_passwd=yes
6001 echo "configure: failed program was:" >&5
6002 cat conftest.$ac_ext >&5
6004 ac_cv_hpux_passwd=no
6007 CPPFLAGS="$ac_save_CPPFLAGS"
6010 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
6011 if test "$ac_cv_hpux_passwd" = yes; then
6012 have_shadow_hpux=yes
6016 # on HPUX, bigcrypt is in -lsec
6017 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
6018 echo "configure:6030: checking for bigcrypt in -lsec" >&5
6019 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
6020 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6021 echo $ac_n "(cached) $ac_c" 1>&6
6023 ac_save_LIBS="$LIBS"
6025 cat > conftest.$ac_ext <<EOF
6026 #line 6038 "configure"
6027 #include "confdefs.h"
6028 /* Override any gcc2 internal prototype to avoid an error. */
6029 /* We use char because int might match the return type of a gcc2
6030 builtin and then its argument prototype would still apply. */
6037 if { (eval echo configure:6049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6039 eval "ac_cv_lib_$ac_lib_var=yes"
6041 echo "configure: failed program was:" >&5
6042 cat conftest.$ac_ext >&5
6044 eval "ac_cv_lib_$ac_lib_var=no"
6047 LIBS="$ac_save_LIBS"
6050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6051 echo "$ac_t""yes" 1>&6
6052 PASSWD_LIBS="$PASSWD_LIBS -lsec"
6054 echo "$ac_t""no" 1>&6
6061 ###############################################################################
6063 # Check for FreeBSD-style shadow passwords.
6065 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
6066 # password systems -- except you only get stuff in the pw_passwd field
6067 # if the running program is setuid. So, guess that we've got this
6068 # lossage to contend with if /etc/master.passwd exists, and default to
6069 # a setuid installation.
6071 ###############################################################################
6073 if test "$with_shadow" = yes ; then
6074 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
6075 echo "configure:6087: checking for FreeBSD-style shadow passwords" >&5
6076 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
6077 echo $ac_n "(cached) $ac_c" 1>&6
6079 if test -f /etc/master.passwd ; then
6080 ac_cv_master_passwd=yes
6082 ac_cv_master_passwd=no
6086 echo "$ac_t""$ac_cv_master_passwd" 1>&6
6087 if test "$ac_cv_master_passwd" = yes; then
6093 ###############################################################################
6095 # Check for traditional (ha!) shadow passwords.
6097 ###############################################################################
6099 if test "$with_shadow" = yes ; then
6100 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
6101 echo "configure:6113: checking for generic shadow passwords" >&5
6102 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
6103 echo $ac_n "(cached) $ac_c" 1>&6
6106 ac_save_CPPFLAGS="$CPPFLAGS"
6107 if test \! -z "$includedir" ; then
6108 CPPFLAGS="$CPPFLAGS -I$includedir"
6110 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6111 cat > conftest.$ac_ext <<EOF
6112 #line 6124 "configure"
6113 #include "confdefs.h"
6116 #include <sys/types.h>
6120 struct spwd *p = getspnam("nobody");
6121 const char *pw = p->sp_pwdp;
6124 if { (eval echo configure:6136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6128 echo "configure: failed program was:" >&5
6129 cat conftest.$ac_ext >&5
6134 CPPFLAGS="$ac_save_CPPFLAGS"
6137 echo "$ac_t""$ac_cv_shadow" 1>&6
6138 if test "$ac_cv_shadow" = yes; then
6142 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
6144 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
6145 echo "configure:6157: checking for getspnam in -lc" >&5
6146 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
6147 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6148 echo $ac_n "(cached) $ac_c" 1>&6
6150 ac_save_LIBS="$LIBS"
6152 cat > conftest.$ac_ext <<EOF
6153 #line 6165 "configure"
6154 #include "confdefs.h"
6155 /* Override any gcc2 internal prototype to avoid an error. */
6156 /* We use char because int might match the return type of a gcc2
6157 builtin and then its argument prototype would still apply. */
6164 if { (eval echo configure:6176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6166 eval "ac_cv_lib_$ac_lib_var=yes"
6168 echo "configure: failed program was:" >&5
6169 cat conftest.$ac_ext >&5
6171 eval "ac_cv_lib_$ac_lib_var=no"
6174 LIBS="$ac_save_LIBS"
6177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6178 echo "$ac_t""yes" 1>&6
6181 echo "$ac_t""no" 1>&6
6184 if test "$have_getspnam" = no ; then
6185 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
6186 echo "configure:6198: checking for getspnam in -lgen" >&5
6187 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
6188 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6189 echo $ac_n "(cached) $ac_c" 1>&6
6191 ac_save_LIBS="$LIBS"
6193 cat > conftest.$ac_ext <<EOF
6194 #line 6206 "configure"
6195 #include "confdefs.h"
6196 /* Override any gcc2 internal prototype to avoid an error. */
6197 /* We use char because int might match the return type of a gcc2
6198 builtin and then its argument prototype would still apply. */
6205 if { (eval echo configure:6217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6207 eval "ac_cv_lib_$ac_lib_var=yes"
6209 echo "configure: failed program was:" >&5
6210 cat conftest.$ac_ext >&5
6212 eval "ac_cv_lib_$ac_lib_var=no"
6215 LIBS="$ac_save_LIBS"
6218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6219 echo "$ac_t""yes" 1>&6
6220 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
6222 echo "$ac_t""no" 1>&6
6230 ###############################################################################
6232 # Check for other libraries needed for non-shadow passwords.
6234 ###############################################################################
6236 if test "$enable_locking" = yes ; then
6238 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
6240 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
6241 echo "configure:6253: checking for crypt in -lc" >&5
6242 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
6243 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6244 echo $ac_n "(cached) $ac_c" 1>&6
6246 ac_save_LIBS="$LIBS"
6248 cat > conftest.$ac_ext <<EOF
6249 #line 6261 "configure"
6250 #include "confdefs.h"
6251 /* Override any gcc2 internal prototype to avoid an error. */
6252 /* We use char because int might match the return type of a gcc2
6253 builtin and then its argument prototype would still apply. */
6260 if { (eval echo configure:6272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6262 eval "ac_cv_lib_$ac_lib_var=yes"
6264 echo "configure: failed program was:" >&5
6265 cat conftest.$ac_ext >&5
6267 eval "ac_cv_lib_$ac_lib_var=no"
6270 LIBS="$ac_save_LIBS"
6273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6274 echo "$ac_t""yes" 1>&6
6277 echo "$ac_t""no" 1>&6
6280 if test "$have_crypt" = no ; then
6281 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6282 echo "configure:6294: checking for crypt in -lcrypt" >&5
6283 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6284 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6285 echo $ac_n "(cached) $ac_c" 1>&6
6287 ac_save_LIBS="$LIBS"
6288 LIBS="-lcrypt $LIBS"
6289 cat > conftest.$ac_ext <<EOF
6290 #line 6302 "configure"
6291 #include "confdefs.h"
6292 /* Override any gcc2 internal prototype to avoid an error. */
6293 /* We use char because int might match the return type of a gcc2
6294 builtin and then its argument prototype would still apply. */
6301 if { (eval echo configure:6313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6303 eval "ac_cv_lib_$ac_lib_var=yes"
6305 echo "configure: failed program was:" >&5
6306 cat conftest.$ac_ext >&5
6308 eval "ac_cv_lib_$ac_lib_var=no"
6311 LIBS="$ac_save_LIBS"
6314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6315 echo "$ac_t""yes" 1>&6
6316 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
6318 echo "$ac_t""no" 1>&6
6325 # Most of the above shadow mechanisms will have set need_setuid to yes,
6326 # if they were found. But, on some systems, we need setuid even when
6327 # using plain old vanilla passwords.
6329 if test "$enable_locking" = yes ; then
6331 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
6338 if test "$have_shadow_adjunct" = yes ; then
6339 cat >> confdefs.h <<\EOF
6340 #define HAVE_ADJUNCT_PASSWD 1
6343 elif test "$have_shadow_enhanced" = yes ; then
6344 cat >> confdefs.h <<\EOF
6345 #define HAVE_ENHANCED_PASSWD 1
6348 elif test "$have_shadow_hpux" = yes ; then
6349 cat >> confdefs.h <<\EOF
6350 #define HAVE_HPUX_PASSWD 1
6353 elif test "$have_shadow" = yes ; then
6354 cat >> confdefs.h <<\EOF
6355 #define HAVE_SHADOW_PASSWD 1
6361 ###############################################################################
6365 ###############################################################################
6368 with_motif_req=unspecified
6369 # Check whether --with-motif or --without-motif was given.
6370 if test "${with_motif+set}" = set; then
6371 withval="$with_motif"
6372 with_motif="$withval"; with_motif_req="$withval"
6379 case "$with_motif" in
6384 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
6385 echo "configure:6397: checking for Motif headers" >&5
6386 d=$with_motif/include
6388 X_CFLAGS="-I$d $X_CFLAGS"
6389 echo "$ac_t""$d" 1>&6
6391 echo "$ac_t""not found ($d: no such directory)" 1>&6
6394 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
6395 echo "configure:6407: checking for Motif libs" >&5
6398 X_LIBS="-L$d $X_LIBS"
6399 echo "$ac_t""$d" 1>&6
6401 echo "$ac_t""not found ($d: no such directory)" 1>&6
6404 # replace the directory string with "yes".
6405 with_motif_req="yes"
6406 with_motif=$with_motif_req
6411 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6412 echo " If it is a directory, then \`DIR/include' will be added to"
6413 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6419 if test "$with_motif" != yes -a "$with_motif" != no ; then
6420 echo "error: must be yes or no: --with-motif=$with_motif"
6424 if test "$with_motif" = yes; then
6427 ac_save_CPPFLAGS="$CPPFLAGS"
6428 if test \! -z "$includedir" ; then
6429 CPPFLAGS="$CPPFLAGS -I$includedir"
6431 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6432 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6433 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6434 echo "configure:6446: checking for Xm/Xm.h" >&5
6435 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6436 echo $ac_n "(cached) $ac_c" 1>&6
6438 cat > conftest.$ac_ext <<EOF
6439 #line 6451 "configure"
6440 #include "confdefs.h"
6443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6444 { (eval echo configure:6456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6446 if test -z "$ac_err"; then
6448 eval "ac_cv_header_$ac_safe=yes"
6451 echo "configure: failed program was:" >&5
6452 cat conftest.$ac_ext >&5
6454 eval "ac_cv_header_$ac_safe=no"
6458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6459 echo "$ac_t""yes" 1>&6
6461 cat >> confdefs.h <<\EOF
6462 #define HAVE_MOTIF 1
6465 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6467 echo "$ac_t""no" 1>&6
6470 CPPFLAGS="$ac_save_CPPFLAGS"
6474 if test "$have_motif" = yes; then
6476 ac_save_CPPFLAGS="$CPPFLAGS"
6477 if test \! -z "$includedir" ; then
6478 CPPFLAGS="$CPPFLAGS -I$includedir"
6480 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6481 ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
6482 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
6483 echo "configure:6495: checking for Xm/ComboBox.h" >&5
6484 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6485 echo $ac_n "(cached) $ac_c" 1>&6
6487 cat > conftest.$ac_ext <<EOF
6488 #line 6500 "configure"
6489 #include "confdefs.h"
6490 #include <Xm/ComboBox.h>
6492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6493 { (eval echo configure:6505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6495 if test -z "$ac_err"; then
6497 eval "ac_cv_header_$ac_safe=yes"
6500 echo "configure: failed program was:" >&5
6501 cat conftest.$ac_ext >&5
6503 eval "ac_cv_header_$ac_safe=no"
6507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6508 echo "$ac_t""yes" 1>&6
6509 cat >> confdefs.h <<\EOF
6510 #define HAVE_XMCOMBOBOX 1
6514 echo "$ac_t""no" 1>&6
6517 CPPFLAGS="$ac_save_CPPFLAGS"
6521 ###############################################################################
6523 # Check for -lgtk (and Gnome stuff)
6525 ###############################################################################
6528 with_gtk_req=unspecified
6529 # Check whether --with-gtk or --without-gtk was given.
6530 if test "${with_gtk+set}" = set; then
6532 with_gtk="$withval"; with_gtk_req="$withval"
6538 # if --with-gtk=/directory/ was specified, remember that directory so that
6539 # we can also look for the `gtk-config' program in that directory.
6555 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6556 echo "configure:6568: checking for Gtk headers" >&5
6559 X_CFLAGS="-I$d $X_CFLAGS"
6560 echo "$ac_t""$d" 1>&6
6562 echo "$ac_t""not found ($d: no such directory)" 1>&6
6565 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6566 echo "configure:6578: checking for Gtk libs" >&5
6569 X_LIBS="-L$d $X_LIBS"
6570 echo "$ac_t""$d" 1>&6
6572 echo "$ac_t""not found ($d: no such directory)" 1>&6
6575 # replace the directory string with "yes".
6577 with_gtk=$with_gtk_req
6582 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6583 echo " If it is a directory, then \`DIR/include' will be added to"
6584 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6590 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6591 echo "error: must be yes or no: --with-gtk=$with_gtk"
6596 with_gnome_req=unspecified
6597 # Check whether --with-gnome or --without-gnome was given.
6598 if test "${with_gnome+set}" = set; then
6599 withval="$with_gnome"
6600 with_gnome="$withval"; with_gnome_req="$withval"
6606 # if --with-gnome=/directory/ was specified, remember that directory so that
6607 # we can also look for the `gnome-config' program in that directory.
6608 case "$with_gnome" in
6610 gnome_dir="$with_gnome"
6618 case "$with_gnome" in
6623 echo $ac_n "checking for Gnome headers""... $ac_c" 1>&6
6624 echo "configure:6636: checking for Gnome headers" >&5
6625 d=$with_gnome/include
6627 X_CFLAGS="-I$d $X_CFLAGS"
6628 echo "$ac_t""$d" 1>&6
6630 echo "$ac_t""not found ($d: no such directory)" 1>&6
6633 echo $ac_n "checking for Gnome libs""... $ac_c" 1>&6
6634 echo "configure:6646: checking for Gnome libs" >&5
6637 X_LIBS="-L$d $X_LIBS"
6638 echo "$ac_t""$d" 1>&6
6640 echo "$ac_t""not found ($d: no such directory)" 1>&6
6643 # replace the directory string with "yes".
6644 with_gnome_req="yes"
6645 with_gnome=$with_gnome_req
6650 echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
6651 echo " If it is a directory, then \`DIR/include' will be added to"
6652 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6658 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
6659 echo "error: must be yes or no: --with-gnome=$with_gnome"
6665 if test "$with_gtk" = yes; then
6668 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
6669 # for glib-config and gtk-config.
6673 if test ! -z "$gtk_dir"; then
6674 # canonicalize slashes.
6675 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
6676 gtk_path="$gtk_dir:$gtk_path"
6679 if test ! -z "gnome_dir"; then
6680 # canonicalize slashes.
6681 gnome_dir=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
6682 gtk_path="$gnome_dir:$gtk_path"
6685 for ac_prog in glib12-config glib-config
6687 # Extract the first word of "$ac_prog", so it can be a program name with args.
6688 set dummy $ac_prog; ac_word=$2
6689 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6690 echo "configure:6702: checking for $ac_word" >&5
6691 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
6692 echo $ac_n "(cached) $ac_c" 1>&6
6694 case "$glib_config" in
6696 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
6699 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
6702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6703 ac_dummy="$gtk_path"
6704 for ac_dir in $ac_dummy; do
6705 test -z "$ac_dir" && ac_dir=.
6706 if test -f $ac_dir/$ac_word; then
6707 ac_cv_path_glib_config="$ac_dir/$ac_word"
6715 glib_config="$ac_cv_path_glib_config"
6716 if test -n "$glib_config"; then
6717 echo "$ac_t""$glib_config" 1>&6
6719 echo "$ac_t""no" 1>&6
6722 test -n "$glib_config" && break
6725 for ac_prog in gtk12-config gtk-config
6727 # Extract the first word of "$ac_prog", so it can be a program name with args.
6728 set dummy $ac_prog; ac_word=$2
6729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6730 echo "configure:6742: checking for $ac_word" >&5
6731 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
6732 echo $ac_n "(cached) $ac_c" 1>&6
6734 case "$gtk_config" in
6736 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
6739 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
6742 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6743 ac_dummy="$gtk_path"
6744 for ac_dir in $ac_dummy; do
6745 test -z "$ac_dir" && ac_dir=.
6746 if test -f $ac_dir/$ac_word; then
6747 ac_cv_path_gtk_config="$ac_dir/$ac_word"
6755 gtk_config="$ac_cv_path_gtk_config"
6756 if test -n "$gtk_config"; then
6757 echo "$ac_t""$gtk_config" 1>&6
6759 echo "$ac_t""no" 1>&6
6762 test -n "$gtk_config" && break
6766 if test "$with_gnome" = yes; then
6767 for ac_prog in gnome-config
6769 # Extract the first word of "$ac_prog", so it can be a program name with args.
6770 set dummy $ac_prog; ac_word=$2
6771 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6772 echo "configure:6784: checking for $ac_word" >&5
6773 if eval "test \"`echo '$''{'ac_cv_path_gnome_config'+set}'`\" = set"; then
6774 echo $ac_n "(cached) $ac_c" 1>&6
6776 case "$gnome_config" in
6778 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
6781 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a dos path.
6784 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6785 ac_dummy="$gtk_path"
6786 for ac_dir in $ac_dummy; do
6787 test -z "$ac_dir" && ac_dir=.
6788 if test -f $ac_dir/$ac_word; then
6789 ac_cv_path_gnome_config="$ac_dir/$ac_word"
6797 gnome_config="$ac_cv_path_gnome_config"
6798 if test -n "$gnome_config"; then
6799 echo "$ac_t""$gnome_config" 1>&6
6801 echo "$ac_t""no" 1>&6
6804 test -n "$gnome_config" && break
6809 if test -n "$glib_config" -a -n "gtk_config" ; then
6811 if test "$with_gnome" = yes -a -n "$gnome_config" ; then
6816 if test "$have_gtk" = yes; then
6817 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
6818 echo "configure:6830: checking Gtk version number" >&5
6819 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
6820 echo $ac_n "(cached) $ac_c" 1>&6
6822 ac_cv_gtk_version_string=`$gtk_config --version`
6825 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
6826 ac_gtk_version_string=$ac_cv_gtk_version_string
6829 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
6830 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
6832 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
6833 if test -z "$ac_gtk_version"; then
6834 ac_gtk_version=unknown
6835 ac_gtk_version_string=unknown
6837 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
6845 if test "$have_gtk" = yes; then
6846 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
6847 echo "configure:6859: checking for Gtk includes" >&5
6848 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
6849 echo $ac_n "(cached) $ac_c" 1>&6
6851 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
6854 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
6855 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6856 echo "configure:6868: checking for Gtk libs" >&5
6857 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
6858 echo $ac_n "(cached) $ac_c" 1>&6
6860 ac_cv_gtk_config_libs=`$gtk_config --libs`
6863 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
6865 ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
6866 ac_gtk_config_libs=$ac_cv_gtk_config_libs
6868 # Check for Gnome Capplet support.
6870 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6871 gnome_config_libs="capplet gnomeui"
6872 echo $ac_n "checking for Gnome capplet includes""... $ac_c" 1>&6
6873 echo "configure:6885: checking for Gnome capplet includes" >&5
6874 if eval "test \"`echo '$''{'ac_cv_gnome_config_cflags'+set}'`\" = set"; then
6875 echo $ac_n "(cached) $ac_c" 1>&6
6877 if ( $gnome_config --cflags $gnome_config_libs 2>&1 >/dev/null | \
6878 grep Unknown >/dev/null ) ; then
6879 ac_cv_gnome_config_cflags=''
6881 ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
6885 ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
6886 if test "$ac_gnome_config_cflags" = "" ; then
6888 echo "$ac_t""no" 1>&6
6890 echo "$ac_t""$ac_gnome_config_cflags" 1>&6
6894 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6895 echo $ac_n "checking for Gnome capplet libs""... $ac_c" 1>&6
6896 echo "configure:6908: checking for Gnome capplet libs" >&5
6897 if eval "test \"`echo '$''{'ac_cv_gnome_config_libs'+set}'`\" = set"; then
6898 echo $ac_n "(cached) $ac_c" 1>&6
6900 if ( $gnome_config --libs $gnome_config_libs 2>&1 >/dev/null |
6901 grep Unknown >/dev/null ) ; then
6902 ac_cv_gnome_config_libs=''
6904 ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
6908 ac_gnome_config_libs=$ac_cv_gnome_config_libs
6909 if test "$ac_gnome_config_libs" = "" ; then
6911 echo "$ac_t""no" 1>&6
6913 echo "$ac_t""$ac_gnome_config_libs" 1>&6
6918 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6919 GNOME_DATADIR=`$gnome_config --datadir`
6923 # If we have Gnome, then override the gtk-config values with
6924 # the gnome-config values.
6926 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
6927 ac_gtk_config_cflags=$ac_gnome_config_cflags
6928 ac_gtk_config_libs=$ac_gnome_config_libs
6929 cat >> confdefs.h <<\EOF
6930 #define HAVE_CRAPPLET 1
6936 if test "$have_gtk" = yes; then
6937 INCLUDES="$INCLUDES $ac_gtk_config_cflags"
6938 GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
6939 cat >> confdefs.h <<\EOF
6948 # Check for the Gnome Help Browser.
6950 if test "$have_gnome" = yes; then
6951 # Extract the first word of "gnome-help-browser", so it can be a program name with args.
6952 set dummy gnome-help-browser; ac_word=$2
6953 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6954 echo "configure:6966: checking for $ac_word" >&5
6955 if eval "test \"`echo '$''{'ac_cv_prog_have_gnome_help'+set}'`\" = set"; then
6956 echo $ac_n "(cached) $ac_c" 1>&6
6958 if test -n "$have_gnome_help"; then
6959 ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
6961 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6963 for ac_dir in $ac_dummy; do
6964 test -z "$ac_dir" && ac_dir=.
6965 if test -f $ac_dir/$ac_word; then
6966 ac_cv_prog_have_gnome_help="yes"
6971 test -z "$ac_cv_prog_have_gnome_help" && ac_cv_prog_have_gnome_help="no"
6974 have_gnome_help="$ac_cv_prog_have_gnome_help"
6975 if test -n "$have_gnome_help"; then
6976 echo "$ac_t""$have_gnome_help" 1>&6
6978 echo "$ac_t""no" 1>&6
6986 ###############################################################################
6988 # Checking whether Motif is really Lesstif.
6990 ###############################################################################
6993 if test "$have_motif" = yes ; then
6994 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
6995 echo "configure:7007: checking whether Motif is really LessTif" >&5
6996 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
6997 echo $ac_n "(cached) $ac_c" 1>&6
7000 ac_save_CPPFLAGS="$CPPFLAGS"
7001 if test \! -z "$includedir" ; then
7002 CPPFLAGS="$CPPFLAGS -I$includedir"
7004 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7005 cat > conftest.$ac_ext <<EOF
7006 #line 7018 "configure"
7007 #include "confdefs.h"
7010 long vers = LesstifVersion;
7013 if { (eval echo configure:7025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7015 ac_cv_have_lesstif=yes
7017 echo "configure: failed program was:" >&5
7018 cat conftest.$ac_ext >&5
7020 ac_cv_have_lesstif=no
7023 CPPFLAGS="$ac_save_CPPFLAGS"
7026 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
7027 have_lesstif=$ac_cv_have_lesstif
7031 lesstif_version=unknown
7032 lesstif_version_string=unknown
7034 if test "$have_lesstif" = yes ; then
7036 echo unknown > conftest-lt
7037 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
7038 echo "configure:7050: checking LessTif version number" >&5
7039 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
7040 echo $ac_n "(cached) $ac_c" 1>&6
7043 ac_save_CPPFLAGS="$CPPFLAGS"
7044 if test \! -z "$includedir" ; then
7045 CPPFLAGS="$CPPFLAGS -I$includedir"
7047 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7048 if test "$cross_compiling" = yes; then
7049 ac_cv_lesstif_version=unknown
7050 ac_cv_lesstif_version_string=unknown
7052 cat > conftest.$ac_ext <<EOF
7053 #line 7065 "configure"
7054 #include "confdefs.h"
7058 FILE *f = fopen("conftest-lt", "w");
7060 fprintf(f, "%d %d.%d\n", LesstifVersion,
7061 LESSTIF_VERSION, LESSTIF_REVISION);
7066 if { (eval echo configure:7078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7068 ltv=`cat conftest-lt`
7069 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
7070 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
7072 echo "configure: failed program was:" >&5
7073 cat conftest.$ac_ext >&5
7075 ac_cv_lesstif_version=unknown
7076 ac_cv_lesstif_version_string=unknown
7081 CPPFLAGS="$ac_save_CPPFLAGS"
7084 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
7086 lesstif_version=$ac_cv_lesstif_version
7087 lesstif_version_string=$ac_cv_lesstif_version_string
7092 if test "$have_motif" = yes ; then
7094 echo unknown > conftest-mt
7095 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
7096 echo "configure:7108: checking Motif version number" >&5
7097 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
7098 echo $ac_n "(cached) $ac_c" 1>&6
7101 ac_save_CPPFLAGS="$CPPFLAGS"
7102 if test \! -z "$includedir" ; then
7103 CPPFLAGS="$CPPFLAGS -I$includedir"
7105 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7106 if test "$cross_compiling" = yes; then
7107 ac_cv_motif_version=unknown
7108 ac_cv_motif_version_string=unknown
7110 cat > conftest.$ac_ext <<EOF
7111 #line 7123 "configure"
7112 #include "confdefs.h"
7116 FILE *f = fopen("conftest-mt", "w");
7118 fprintf(f, "%d %d.%d\n", XmVersion,
7119 XmVERSION, XmREVISION);
7124 if { (eval echo configure:7136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7126 mtv=`cat conftest-mt`
7127 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
7128 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
7130 echo "configure: failed program was:" >&5
7131 cat conftest.$ac_ext >&5
7133 ac_cv_motif_version=unknown
7134 ac_cv_motif_version_string=unknown
7139 CPPFLAGS="$ac_save_CPPFLAGS"
7142 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
7144 motif_version=$ac_cv_motif_version
7145 motif_version_string=$ac_cv_motif_version_string
7150 ###############################################################################
7152 # Checking whether Motif requires -lXpm.
7154 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
7155 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
7156 # of the library whether to build the XPM code into libXm, or whether
7157 # to rely on an external libXm. So the only way to tell whether XPM is
7158 # a link-time requirement is to examine libXm.a, which is very
7159 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
7160 # always link against XPM if the XPM lib exists (and this will be a
7161 # no-op if libXm happens to already have the XPM code in it.)
7163 ###############################################################################
7165 motif_requires_xpm=no
7166 if test "$have_motif" = yes ; then
7167 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
7168 echo "configure:7180: checking whether Motif requires XPM" >&5
7169 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
7171 motif_requires_xpm=yes
7172 echo "$ac_t""maybe" 1>&6
7174 echo "$ac_t""no" 1>&6
7179 ###############################################################################
7181 # Checking whether Motif requires -lXp.
7183 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
7184 # Extension". Why this extension isn't in -lXext with all the others,
7187 ###############################################################################
7190 if test "$have_motif" = yes ; then
7193 ac_save_CPPFLAGS="$CPPFLAGS"
7194 ac_save_LDFLAGS="$LDFLAGS"
7195 # ac_save_LIBS="$LIBS"
7197 if test \! -z "$includedir" ; then
7198 CPPFLAGS="$CPPFLAGS -I$includedir"
7200 # note: $X_CFLAGS includes $x_includes
7201 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7203 if test \! -z "$libdir" ; then
7204 LDFLAGS="$LDFLAGS -L$libdir"
7206 # note: $X_LIBS includes $x_libraries
7207 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7209 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
7210 echo "configure:7222: checking for XpQueryExtension in -lXp" >&5
7211 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
7212 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7213 echo $ac_n "(cached) $ac_c" 1>&6
7215 ac_save_LIBS="$LIBS"
7216 LIBS="-lXp -lX11 -lXext -lm $LIBS"
7217 cat > conftest.$ac_ext <<EOF
7218 #line 7230 "configure"
7219 #include "confdefs.h"
7220 /* Override any gcc2 internal prototype to avoid an error. */
7221 /* We use char because int might match the return type of a gcc2
7222 builtin and then its argument prototype would still apply. */
7223 char XpQueryExtension();
7229 if { (eval echo configure:7241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7231 eval "ac_cv_lib_$ac_lib_var=yes"
7233 echo "configure: failed program was:" >&5
7234 cat conftest.$ac_ext >&5
7236 eval "ac_cv_lib_$ac_lib_var=no"
7239 LIBS="$ac_save_LIBS"
7242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7243 echo "$ac_t""yes" 1>&6
7244 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
7246 echo "$ac_t""no" 1>&6
7250 CPPFLAGS="$ac_save_CPPFLAGS"
7251 LDFLAGS="$ac_save_LDFLAGS"
7252 # LIBS="$ac_save_LIBS"
7257 ###############################################################################
7259 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
7261 ###############################################################################
7264 if test "$have_motif" = yes ; then
7266 ac_save_CPPFLAGS="$CPPFLAGS"
7267 ac_save_LDFLAGS="$LDFLAGS"
7268 # ac_save_LIBS="$LIBS"
7270 if test \! -z "$includedir" ; then
7271 CPPFLAGS="$CPPFLAGS -I$includedir"
7273 # note: $X_CFLAGS includes $x_includes
7274 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7276 if test \! -z "$libdir" ; then
7277 LDFLAGS="$LDFLAGS -L$libdir"
7279 # note: $X_LIBS includes $x_libraries
7280 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7282 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
7283 echo "configure:7295: checking for _Xsetlocale in -lXintl" >&5
7284 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
7285 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7286 echo $ac_n "(cached) $ac_c" 1>&6
7288 ac_save_LIBS="$LIBS"
7289 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
7290 cat > conftest.$ac_ext <<EOF
7291 #line 7303 "configure"
7292 #include "confdefs.h"
7293 /* Override any gcc2 internal prototype to avoid an error. */
7294 /* We use char because int might match the return type of a gcc2
7295 builtin and then its argument prototype would still apply. */
7302 if { (eval echo configure:7314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7304 eval "ac_cv_lib_$ac_lib_var=yes"
7306 echo "configure: failed program was:" >&5
7307 cat conftest.$ac_ext >&5
7309 eval "ac_cv_lib_$ac_lib_var=no"
7312 LIBS="$ac_save_LIBS"
7315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7316 echo "$ac_t""yes" 1>&6
7319 echo "$ac_t""no" 1>&6
7323 CPPFLAGS="$ac_save_CPPFLAGS"
7324 LDFLAGS="$ac_save_LDFLAGS"
7325 # LIBS="$ac_save_LIBS"
7327 if test "$have_xintl" = yes; then
7328 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
7333 ###############################################################################
7335 # Check for -lGL or -lMesaGL.
7337 ###############################################################################
7341 with_gl_req=unspecified
7343 # Check whether --with-gl or --without-gl was given.
7344 if test "${with_gl+set}" = set; then
7346 with_gl="$withval"; with_gl_req="$withval"
7358 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
7359 echo "configure:7371: checking for GL headers" >&5
7362 X_CFLAGS="-I$d $X_CFLAGS"
7363 echo "$ac_t""$d" 1>&6
7365 echo "$ac_t""not found ($d: no such directory)" 1>&6
7368 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
7369 echo "configure:7381: checking for GL libs" >&5
7372 X_LIBS="-L$d $X_LIBS"
7373 echo "$ac_t""$d" 1>&6
7375 echo "$ac_t""not found ($d: no such directory)" 1>&6
7378 # replace the directory string with "yes".
7380 with_gl=$with_gl_req
7385 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
7386 echo " If it is a directory, then \`DIR/include' will be added to"
7387 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7393 ac_mesagl_version=unknown
7394 ac_mesagl_version_string=unknown
7396 if test "$with_gl" = yes; then
7398 ac_save_CPPFLAGS="$CPPFLAGS"
7399 if test \! -z "$includedir" ; then
7400 CPPFLAGS="$CPPFLAGS -I$includedir"
7402 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7403 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
7404 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
7405 echo "configure:7417: checking for GL/gl.h" >&5
7406 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7407 echo $ac_n "(cached) $ac_c" 1>&6
7409 cat > conftest.$ac_ext <<EOF
7410 #line 7422 "configure"
7411 #include "confdefs.h"
7414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7415 { (eval echo configure:7427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7417 if test -z "$ac_err"; then
7419 eval "ac_cv_header_$ac_safe=yes"
7422 echo "configure: failed program was:" >&5
7423 cat conftest.$ac_ext >&5
7425 eval "ac_cv_header_$ac_safe=no"
7429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7430 echo "$ac_t""yes" 1>&6
7433 echo "$ac_t""no" 1>&6
7436 CPPFLAGS="$ac_save_CPPFLAGS"
7437 if test "$have_gl" = yes ; then
7439 ac_save_CPPFLAGS="$CPPFLAGS"
7440 if test \! -z "$includedir" ; then
7441 CPPFLAGS="$CPPFLAGS -I$includedir"
7443 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7444 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
7445 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
7446 echo "configure:7458: checking for GL/glx.h" >&5
7447 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7448 echo $ac_n "(cached) $ac_c" 1>&6
7450 cat > conftest.$ac_ext <<EOF
7451 #line 7463 "configure"
7452 #include "confdefs.h"
7455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7456 { (eval echo configure:7468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7458 if test -z "$ac_err"; then
7460 eval "ac_cv_header_$ac_safe=yes"
7463 echo "configure: failed program was:" >&5
7464 cat conftest.$ac_ext >&5
7466 eval "ac_cv_header_$ac_safe=no"
7470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7471 echo "$ac_t""yes" 1>&6
7474 echo "$ac_t""no" 1>&6
7477 CPPFLAGS="$ac_save_CPPFLAGS"
7480 # If we have the headers, try and figure out which vendor it's from.
7482 if test "$have_gl" = yes ; then
7484 # We need to know whether it's MesaGL so that we know which libraries
7487 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
7488 echo "configure:7500: checking whether GL is really MesaGL" >&5
7489 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
7490 echo $ac_n "(cached) $ac_c" 1>&6
7492 ac_cv_have_mesa_gl=no
7494 ac_save_CPPFLAGS="$CPPFLAGS"
7495 if test \! -z "$includedir" ; then
7496 CPPFLAGS="$CPPFLAGS -I$includedir"
7498 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7499 cat > conftest.$ac_ext <<EOF
7500 #line 7512 "configure"
7501 #include "confdefs.h"
7504 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7505 egrep "Mesa|MESA" >/dev/null 2>&1; then
7507 ac_cv_have_mesa_gl=yes
7511 CPPFLAGS="$ac_save_CPPFLAGS"
7515 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
7516 ac_have_mesa_gl=$ac_cv_have_mesa_gl
7523 # Some versions of MesaGL are compiled to require -lpthread.
7524 # So if the Mesa headers exist, and -lpthread exists, then always
7525 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
7527 if test "$ac_have_mesa_gl" = yes; then
7528 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
7529 echo "configure:7541: checking for pthread_create in -lpthread" >&5
7530 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
7531 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7532 echo $ac_n "(cached) $ac_c" 1>&6
7534 ac_save_LIBS="$LIBS"
7535 LIBS="-lpthread $LIBS"
7536 cat > conftest.$ac_ext <<EOF
7537 #line 7549 "configure"
7538 #include "confdefs.h"
7539 /* Override any gcc2 internal prototype to avoid an error. */
7540 /* We use char because int might match the return type of a gcc2
7541 builtin and then its argument prototype would still apply. */
7542 char pthread_create();
7548 if { (eval echo configure:7560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7550 eval "ac_cv_lib_$ac_lib_var=yes"
7552 echo "configure: failed program was:" >&5
7553 cat conftest.$ac_ext >&5
7555 eval "ac_cv_lib_$ac_lib_var=no"
7558 LIBS="$ac_save_LIBS"
7561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7562 echo "$ac_t""yes" 1>&6
7565 echo "$ac_t""no" 1>&6
7571 # If we have Mesa headers, check to see if we can link against -lMesaGL.
7572 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
7573 # Else, warn that GL is busted. (We have the headers, but no libs.)
7576 if test "$ac_have_mesa_gl" = yes ; then
7578 ac_save_CPPFLAGS="$CPPFLAGS"
7579 ac_save_LDFLAGS="$LDFLAGS"
7580 # ac_save_LIBS="$LIBS"
7582 if test \! -z "$includedir" ; then
7583 CPPFLAGS="$CPPFLAGS -I$includedir"
7585 # note: $X_CFLAGS includes $x_includes
7586 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7588 if test \! -z "$libdir" ; then
7589 LDFLAGS="$LDFLAGS -L$libdir"
7591 # note: $X_LIBS includes $x_libraries
7592 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7594 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
7595 echo "configure:7607: checking for glXCreateContext in -lMesaGL" >&5
7596 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7597 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7598 echo $ac_n "(cached) $ac_c" 1>&6
7600 ac_save_LIBS="$LIBS"
7601 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7602 cat > conftest.$ac_ext <<EOF
7603 #line 7615 "configure"
7604 #include "confdefs.h"
7605 /* Override any gcc2 internal prototype to avoid an error. */
7606 /* We use char because int might match the return type of a gcc2
7607 builtin and then its argument prototype would still apply. */
7608 char glXCreateContext();
7614 if { (eval echo configure:7626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7616 eval "ac_cv_lib_$ac_lib_var=yes"
7618 echo "configure: failed program was:" >&5
7619 cat conftest.$ac_ext >&5
7621 eval "ac_cv_lib_$ac_lib_var=no"
7624 LIBS="$ac_save_LIBS"
7627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7628 echo "$ac_t""yes" 1>&6
7630 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
7632 echo "$ac_t""no" 1>&6
7635 CPPFLAGS="$ac_save_CPPFLAGS"
7636 LDFLAGS="$ac_save_LDFLAGS"
7637 # LIBS="$ac_save_LIBS"
7641 if test "$gl_lib_1" = "" ; then
7643 ac_save_CPPFLAGS="$CPPFLAGS"
7644 ac_save_LDFLAGS="$LDFLAGS"
7645 # ac_save_LIBS="$LIBS"
7647 if test \! -z "$includedir" ; then
7648 CPPFLAGS="$CPPFLAGS -I$includedir"
7650 # note: $X_CFLAGS includes $x_includes
7651 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7653 if test \! -z "$libdir" ; then
7654 LDFLAGS="$LDFLAGS -L$libdir"
7656 # note: $X_LIBS includes $x_libraries
7657 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7659 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
7660 echo "configure:7672: checking for glXCreateContext in -lGL" >&5
7661 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
7662 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7663 echo $ac_n "(cached) $ac_c" 1>&6
7665 ac_save_LIBS="$LIBS"
7666 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
7667 cat > conftest.$ac_ext <<EOF
7668 #line 7680 "configure"
7669 #include "confdefs.h"
7670 /* Override any gcc2 internal prototype to avoid an error. */
7671 /* We use char because int might match the return type of a gcc2
7672 builtin and then its argument prototype would still apply. */
7673 char glXCreateContext();
7679 if { (eval echo configure:7691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7681 eval "ac_cv_lib_$ac_lib_var=yes"
7683 echo "configure: failed program was:" >&5
7684 cat conftest.$ac_ext >&5
7686 eval "ac_cv_lib_$ac_lib_var=no"
7689 LIBS="$ac_save_LIBS"
7692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7693 echo "$ac_t""yes" 1>&6
7695 GL_LIBS="-lGL -lGLU $GL_LIBS"
7697 echo "$ac_t""no" 1>&6
7700 CPPFLAGS="$ac_save_CPPFLAGS"
7701 LDFLAGS="$ac_save_LDFLAGS"
7702 # LIBS="$ac_save_LIBS"
7706 if test "$gl_lib_1" = "" ; then
7707 # we have headers, but no libs -- bail.
7712 # linking works -- we can build the GL hacks.
7713 cat >> confdefs.h <<\EOF
7717 if test "$ac_have_mesa_gl" = yes ; then
7718 cat >> confdefs.h <<\EOF
7719 #define HAVE_MESA_GL 1
7727 # Now that we know we have GL headers and libs, do some more GL testing.
7730 if test "$have_gl" = yes ; then
7731 # If it's MesaGL, we'd like to issue a warning if the version number
7732 # is less than or equal to 2.6, because that version had a security bug.
7734 if test "$ac_have_mesa_gl" = yes; then
7736 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
7737 echo "configure:7749: checking MesaGL version number" >&5
7738 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
7739 echo $ac_n "(cached) $ac_c" 1>&6
7741 cat > conftest.$ac_ext <<EOF
7742 #line 7754 "configure"
7743 #include "confdefs.h"
7745 #ifndef MESA_MAJOR_VERSION
7746 # include <GL/xmesa.h>
7747 # define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
7748 # define MESA_MINOR_VERSION XMESA_MINOR_VERSION
7750 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
7753 ac_save_CPPFLAGS="$CPPFLAGS"
7754 if test \! -z "$includedir" ; then
7755 CPPFLAGS="$CPPFLAGS -I$includedir"
7757 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7761 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
7762 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
7765 rm -f conftest.$ac_ext
7767 CPPFLAGS="$ac_save_CPPFLAGS"
7769 if test "$mglv" = ""; then
7770 ac_mesagl_version=unknown
7771 ac_mesagl_version_string=unknown
7773 ac_mesagl_version_string=$mglv
7774 maj=`echo $mglv | sed -n 's/\..*//p'`
7775 min=`echo $mglv | sed -n 's/.*\.//p'`
7776 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
7777 if test -z "$ac_mesagl_version"; then
7778 ac_mesagl_version=unknown
7779 ac_mesagl_version_string=unknown
7782 ac_cv_mesagl_version=$ac_mesagl_version
7783 ac_cv_mesagl_version_string=$ac_mesagl_version_string
7787 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
7788 ac_mesagl_version=$ac_cv_mesagl_version
7789 ac_mesagl_version_string=$ac_cv_mesagl_version_string
7793 # Check for OpenGL 1.1 features.
7796 ac_save_CPPFLAGS="$CPPFLAGS"
7797 ac_save_LDFLAGS="$LDFLAGS"
7798 # ac_save_LIBS="$LIBS"
7800 if test \! -z "$includedir" ; then
7801 CPPFLAGS="$CPPFLAGS -I$includedir"
7803 # note: $X_CFLAGS includes $x_includes
7804 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7806 if test \! -z "$libdir" ; then
7807 LDFLAGS="$LDFLAGS -L$libdir"
7809 # note: $X_LIBS includes $x_libraries
7810 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7812 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
7813 echo "configure:7825: checking for glBindTexture in -l$gl_lib_1" >&5
7814 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
7815 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7816 echo $ac_n "(cached) $ac_c" 1>&6
7818 ac_save_LIBS="$LIBS"
7819 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
7820 cat > conftest.$ac_ext <<EOF
7821 #line 7833 "configure"
7822 #include "confdefs.h"
7823 /* Override any gcc2 internal prototype to avoid an error. */
7824 /* We use char because int might match the return type of a gcc2
7825 builtin and then its argument prototype would still apply. */
7826 char glBindTexture();
7832 if { (eval echo configure:7844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7834 eval "ac_cv_lib_$ac_lib_var=yes"
7836 echo "configure: failed program was:" >&5
7837 cat conftest.$ac_ext >&5
7839 eval "ac_cv_lib_$ac_lib_var=no"
7842 LIBS="$ac_save_LIBS"
7845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7846 echo "$ac_t""yes" 1>&6
7847 cat >> confdefs.h <<\EOF
7848 #define HAVE_GLBINDTEXTURE 1
7852 echo "$ac_t""no" 1>&6
7856 CPPFLAGS="$ac_save_CPPFLAGS"
7857 LDFLAGS="$ac_save_LDFLAGS"
7858 # LIBS="$ac_save_LIBS"
7862 elif test "$with_gl" != no; then
7863 echo "error: must be yes or no: --with-gl=$with_gl"
7868 ###############################################################################
7872 ###############################################################################
7875 with_gle_req=unspecified
7877 # Check whether --with-gle or --without-gle was given.
7878 if test "${with_gle+set}" = set; then
7880 with_gle="$withval"; with_gle_req="$withval"
7892 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
7893 echo "configure:7905: checking for GLE headers" >&5
7896 X_CFLAGS="-I$d $X_CFLAGS"
7897 echo "$ac_t""$d" 1>&6
7899 echo "$ac_t""not found ($d: no such directory)" 1>&6
7902 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
7903 echo "configure:7915: checking for GLE libs" >&5
7906 X_LIBS="-L$d $X_LIBS"
7907 echo "$ac_t""$d" 1>&6
7909 echo "$ac_t""not found ($d: no such directory)" 1>&6
7912 # replace the directory string with "yes".
7914 with_gle=$with_gle_req
7919 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
7920 echo " If it is a directory, then \`DIR/include' will be added to"
7921 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7929 if test "$with_gle" = yes; then
7932 ac_save_CPPFLAGS="$CPPFLAGS"
7933 if test \! -z "$includedir" ; then
7934 CPPFLAGS="$CPPFLAGS -I$includedir"
7936 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7937 ac_safe=`echo "GL/gle.h" | sed 'y%./+-%__p_%'`
7938 echo $ac_n "checking for GL/gle.h""... $ac_c" 1>&6
7939 echo "configure:7951: checking for GL/gle.h" >&5
7940 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7941 echo $ac_n "(cached) $ac_c" 1>&6
7943 cat > conftest.$ac_ext <<EOF
7944 #line 7956 "configure"
7945 #include "confdefs.h"
7948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7949 { (eval echo configure:7961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7951 if test -z "$ac_err"; then
7953 eval "ac_cv_header_$ac_safe=yes"
7956 echo "configure: failed program was:" >&5
7957 cat conftest.$ac_ext >&5
7959 eval "ac_cv_header_$ac_safe=no"
7963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7964 echo "$ac_t""yes" 1>&6
7967 echo "$ac_t""no" 1>&6
7970 CPPFLAGS="$ac_save_CPPFLAGS"
7971 if test "$have_gle3" = yes ; then
7975 ac_save_CPPFLAGS="$CPPFLAGS"
7976 if test \! -z "$includedir" ; then
7977 CPPFLAGS="$CPPFLAGS -I$includedir"
7979 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7980 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
7981 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
7982 echo "configure:7994: checking for GL/gutil.h" >&5
7983 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7984 echo $ac_n "(cached) $ac_c" 1>&6
7986 cat > conftest.$ac_ext <<EOF
7987 #line 7999 "configure"
7988 #include "confdefs.h"
7989 #include <GL/gutil.h>
7991 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7992 { (eval echo configure:8004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7993 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7994 if test -z "$ac_err"; then
7996 eval "ac_cv_header_$ac_safe=yes"
7999 echo "configure: failed program was:" >&5
8000 cat conftest.$ac_ext >&5
8002 eval "ac_cv_header_$ac_safe=no"
8006 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8007 echo "$ac_t""yes" 1>&6
8010 echo "$ac_t""no" 1>&6
8013 CPPFLAGS="$ac_save_CPPFLAGS"
8014 if test "$have_gle" = yes ; then
8016 ac_save_CPPFLAGS="$CPPFLAGS"
8017 if test \! -z "$includedir" ; then
8018 CPPFLAGS="$CPPFLAGS -I$includedir"
8020 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8021 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
8022 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
8023 echo "configure:8035: checking for GL/tube.h" >&5
8024 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8025 echo $ac_n "(cached) $ac_c" 1>&6
8027 cat > conftest.$ac_ext <<EOF
8028 #line 8040 "configure"
8029 #include "confdefs.h"
8030 #include <GL/tube.h>
8032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8033 { (eval echo configure:8045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8035 if test -z "$ac_err"; then
8037 eval "ac_cv_header_$ac_safe=yes"
8040 echo "configure: failed program was:" >&5
8041 cat conftest.$ac_ext >&5
8043 eval "ac_cv_header_$ac_safe=no"
8047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8048 echo "$ac_t""yes" 1>&6
8051 echo "$ac_t""no" 1>&6
8054 CPPFLAGS="$ac_save_CPPFLAGS"
8058 if test "$have_gle" = yes ; then
8062 ac_save_CPPFLAGS="$CPPFLAGS"
8063 ac_save_LDFLAGS="$LDFLAGS"
8064 # ac_save_LIBS="$LIBS"
8066 if test \! -z "$includedir" ; then
8067 CPPFLAGS="$CPPFLAGS -I$includedir"
8069 # note: $X_CFLAGS includes $x_includes
8070 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8072 if test \! -z "$libdir" ; then
8073 LDFLAGS="$LDFLAGS -L$libdir"
8075 # note: $X_LIBS includes $x_libraries
8076 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8078 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
8079 echo "configure:8091: checking for gleCreateGC in -lgle" >&5
8080 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
8081 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8082 echo $ac_n "(cached) $ac_c" 1>&6
8084 ac_save_LIBS="$LIBS"
8085 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
8086 cat > conftest.$ac_ext <<EOF
8087 #line 8099 "configure"
8088 #include "confdefs.h"
8089 /* Override any gcc2 internal prototype to avoid an error. */
8090 /* We use char because int might match the return type of a gcc2
8091 builtin and then its argument prototype would still apply. */
8098 if { (eval echo configure:8110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8100 eval "ac_cv_lib_$ac_lib_var=yes"
8102 echo "configure: failed program was:" >&5
8103 cat conftest.$ac_ext >&5
8105 eval "ac_cv_lib_$ac_lib_var=no"
8108 LIBS="$ac_save_LIBS"
8111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8112 echo "$ac_t""yes" 1>&6
8113 have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
8115 echo "$ac_t""no" 1>&6
8118 CPPFLAGS="$ac_save_CPPFLAGS"
8119 LDFLAGS="$ac_save_LDFLAGS"
8120 # LIBS="$ac_save_LIBS"
8123 if test "$have_gle" = yes ; then
8127 # sometimes the libmatrix stuff is included in libgle. look there first.
8129 # I don't get it. For some reason, this test passes on SGI, as if
8130 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
8131 # Yet the link is succeeding. Why???
8133 # AC_CHECK_X_LIB(gle, uview_direction_d,
8134 # [have_gle=yes; gle_halfassed=no],
8135 # [], $GL_LIBS -lX11 -lXext -lm)
8137 # As of GLE 3 this is in libgle, and has changed name to uview_direction!
8139 if test "$have_gle3" = yes ; then
8141 ac_save_CPPFLAGS="$CPPFLAGS"
8142 ac_save_LDFLAGS="$LDFLAGS"
8143 # ac_save_LIBS="$LIBS"
8145 if test \! -z "$includedir" ; then
8146 CPPFLAGS="$CPPFLAGS -I$includedir"
8148 # note: $X_CFLAGS includes $x_includes
8149 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8151 if test \! -z "$libdir" ; then
8152 LDFLAGS="$LDFLAGS -L$libdir"
8154 # note: $X_LIBS includes $x_libraries
8155 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8157 echo $ac_n "checking for uview_direction in -lgle""... $ac_c" 1>&6
8158 echo "configure:8170: checking for uview_direction in -lgle" >&5
8159 ac_lib_var=`echo gle'_'uview_direction | sed 'y%./+-%__p_%'`
8160 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8161 echo $ac_n "(cached) $ac_c" 1>&6
8163 ac_save_LIBS="$LIBS"
8164 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
8165 cat > conftest.$ac_ext <<EOF
8166 #line 8178 "configure"
8167 #include "confdefs.h"
8168 /* Override any gcc2 internal prototype to avoid an error. */
8169 /* We use char because int might match the return type of a gcc2
8170 builtin and then its argument prototype would still apply. */
8171 char uview_direction();
8177 if { (eval echo configure:8189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8179 eval "ac_cv_lib_$ac_lib_var=yes"
8181 echo "configure: failed program was:" >&5
8182 cat conftest.$ac_ext >&5
8184 eval "ac_cv_lib_$ac_lib_var=no"
8187 LIBS="$ac_save_LIBS"
8190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8191 echo "$ac_t""yes" 1>&6
8192 have_gle=yes; gle_halfassed=no
8194 echo "$ac_t""no" 1>&6
8197 CPPFLAGS="$ac_save_CPPFLAGS"
8198 LDFLAGS="$ac_save_LDFLAGS"
8199 # LIBS="$ac_save_LIBS"
8202 # if it wasn't in libgle, then look in libmatrix.
8203 if test "$have_gle" = no ; then
8205 ac_save_CPPFLAGS="$CPPFLAGS"
8206 ac_save_LDFLAGS="$LDFLAGS"
8207 # ac_save_LIBS="$LIBS"
8209 if test \! -z "$includedir" ; then
8210 CPPFLAGS="$CPPFLAGS -I$includedir"
8212 # note: $X_CFLAGS includes $x_includes
8213 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8215 if test \! -z "$libdir" ; then
8216 LDFLAGS="$LDFLAGS -L$libdir"
8218 # note: $X_LIBS includes $x_libraries
8219 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8221 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
8222 echo "configure:8234: checking for uview_direction_d in -lmatrix" >&5
8223 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
8224 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8225 echo $ac_n "(cached) $ac_c" 1>&6
8227 ac_save_LIBS="$LIBS"
8228 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
8229 cat > conftest.$ac_ext <<EOF
8230 #line 8242 "configure"
8231 #include "confdefs.h"
8232 /* Override any gcc2 internal prototype to avoid an error. */
8233 /* We use char because int might match the return type of a gcc2
8234 builtin and then its argument prototype would still apply. */
8235 char uview_direction_d();
8241 if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8243 eval "ac_cv_lib_$ac_lib_var=yes"
8245 echo "configure: failed program was:" >&5
8246 cat conftest.$ac_ext >&5
8248 eval "ac_cv_lib_$ac_lib_var=no"
8251 LIBS="$ac_save_LIBS"
8254 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8255 echo "$ac_t""yes" 1>&6
8256 have_gle=yes; gle_halfassed=no;
8257 GLE_LIBS="$GLE_LIBS -lmatrix"
8259 echo "$ac_t""no" 1>&6
8262 CPPFLAGS="$ac_save_CPPFLAGS"
8263 LDFLAGS="$ac_save_LDFLAGS"
8264 # LIBS="$ac_save_LIBS"
8269 if test "$have_gle" = yes ; then
8270 cat >> confdefs.h <<\EOF
8274 if test "$have_gle3" = yes ; then
8275 cat >> confdefs.h <<\EOF
8282 elif test "$with_gle" != no; then
8283 echo "error: must be yes or no: --with-gle=$with_gle"
8290 ###############################################################################
8294 ###############################################################################
8297 with_xpm_req=unspecified
8298 # Check whether --with-xpm or --without-xpm was given.
8299 if test "${with_xpm+set}" = set; then
8301 with_xpm="$withval"; with_xpm_req="$withval"
8313 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
8314 echo "configure:8326: checking for XPM headers" >&5
8317 X_CFLAGS="-I$d $X_CFLAGS"
8318 echo "$ac_t""$d" 1>&6
8320 echo "$ac_t""not found ($d: no such directory)" 1>&6
8323 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
8324 echo "configure:8336: checking for XPM libs" >&5
8327 X_LIBS="-L$d $X_LIBS"
8328 echo "$ac_t""$d" 1>&6
8330 echo "$ac_t""not found ($d: no such directory)" 1>&6
8333 # replace the directory string with "yes".
8335 with_xpm=$with_xpm_req
8340 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
8341 echo " If it is a directory, then \`DIR/include' will be added to"
8342 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8348 if test "$with_xpm" = yes; then
8350 ac_save_CPPFLAGS="$CPPFLAGS"
8351 if test \! -z "$includedir" ; then
8352 CPPFLAGS="$CPPFLAGS -I$includedir"
8354 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8355 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
8356 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
8357 echo "configure:8369: checking for X11/xpm.h" >&5
8358 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8359 echo $ac_n "(cached) $ac_c" 1>&6
8361 cat > conftest.$ac_ext <<EOF
8362 #line 8374 "configure"
8363 #include "confdefs.h"
8364 #include <X11/xpm.h>
8366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8367 { (eval echo configure:8379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8369 if test -z "$ac_err"; then
8371 eval "ac_cv_header_$ac_safe=yes"
8374 echo "configure: failed program was:" >&5
8375 cat conftest.$ac_ext >&5
8377 eval "ac_cv_header_$ac_safe=no"
8381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8382 echo "$ac_t""yes" 1>&6
8384 cat >> confdefs.h <<\EOF
8390 echo "$ac_t""no" 1>&6
8393 CPPFLAGS="$ac_save_CPPFLAGS"
8394 elif test "$with_xpm" != no; then
8395 echo "error: must be yes or no: --with-xpm=$with_xpm"
8399 # See comment near $motif_requires_xpm, above.
8400 # Need to do this here, after both Motif and XPM have been checked for.
8402 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
8403 if test "$motif_requires_xpm" = yes ; then
8404 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
8409 ###############################################################################
8411 # Check for the XSHM server extension.
8413 ###############################################################################
8416 with_xshm_req=unspecified
8417 # Check whether --with-xshm-ext or --without-xshm-ext was given.
8418 if test "${with_xshm_ext+set}" = set; then
8419 withval="$with_xshm_ext"
8420 with_xshm="$withval"; with_xshm_req="$withval"
8427 case "$with_xshm" in
8432 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
8433 echo "configure:8445: checking for XSHM headers" >&5
8434 d=$with_xshm/include
8436 X_CFLAGS="-I$d $X_CFLAGS"
8437 echo "$ac_t""$d" 1>&6
8439 echo "$ac_t""not found ($d: no such directory)" 1>&6
8442 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
8443 echo "configure:8455: checking for XSHM libs" >&5
8446 X_LIBS="-L$d $X_LIBS"
8447 echo "$ac_t""$d" 1>&6
8449 echo "$ac_t""not found ($d: no such directory)" 1>&6
8452 # replace the directory string with "yes".
8454 with_xshm=$with_xshm_req
8459 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
8460 echo " If it is a directory, then \`DIR/include' will be added to"
8461 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8467 if test "$with_xshm" = yes; then
8469 # first check for Xshm.h.
8471 ac_save_CPPFLAGS="$CPPFLAGS"
8472 if test \! -z "$includedir" ; then
8473 CPPFLAGS="$CPPFLAGS -I$includedir"
8475 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8476 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
8477 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
8478 echo "configure:8490: checking for X11/extensions/XShm.h" >&5
8479 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8480 echo $ac_n "(cached) $ac_c" 1>&6
8482 cat > conftest.$ac_ext <<EOF
8483 #line 8495 "configure"
8484 #include "confdefs.h"
8485 #include <X11/extensions/XShm.h>
8487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8488 { (eval echo configure:8500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8490 if test -z "$ac_err"; then
8492 eval "ac_cv_header_$ac_safe=yes"
8495 echo "configure: failed program was:" >&5
8496 cat conftest.$ac_ext >&5
8498 eval "ac_cv_header_$ac_safe=no"
8502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8503 echo "$ac_t""yes" 1>&6
8506 echo "$ac_t""no" 1>&6
8509 CPPFLAGS="$ac_save_CPPFLAGS"
8511 # if that succeeded, then check for sys/ipc.h.
8512 if test "$have_xshm" = yes; then
8515 ac_save_CPPFLAGS="$CPPFLAGS"
8516 if test \! -z "$includedir" ; then
8517 CPPFLAGS="$CPPFLAGS -I$includedir"
8519 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8520 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
8521 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
8522 echo "configure:8534: checking for sys/ipc.h" >&5
8523 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8524 echo $ac_n "(cached) $ac_c" 1>&6
8526 cat > conftest.$ac_ext <<EOF
8527 #line 8539 "configure"
8528 #include "confdefs.h"
8529 #include <sys/ipc.h>
8531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8532 { (eval echo configure:8544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8534 if test -z "$ac_err"; then
8536 eval "ac_cv_header_$ac_safe=yes"
8539 echo "configure: failed program was:" >&5
8540 cat conftest.$ac_ext >&5
8542 eval "ac_cv_header_$ac_safe=no"
8546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8547 echo "$ac_t""yes" 1>&6
8550 echo "$ac_t""no" 1>&6
8553 CPPFLAGS="$ac_save_CPPFLAGS"
8556 # if that succeeded, then check for sys/shm.h.
8557 if test "$have_xshm" = yes; then
8560 ac_save_CPPFLAGS="$CPPFLAGS"
8561 if test \! -z "$includedir" ; then
8562 CPPFLAGS="$CPPFLAGS -I$includedir"
8564 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8565 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
8566 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
8567 echo "configure:8579: checking for sys/shm.h" >&5
8568 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8569 echo $ac_n "(cached) $ac_c" 1>&6
8571 cat > conftest.$ac_ext <<EOF
8572 #line 8584 "configure"
8573 #include "confdefs.h"
8574 #include <sys/shm.h>
8576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8577 { (eval echo configure:8589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8579 if test -z "$ac_err"; then
8581 eval "ac_cv_header_$ac_safe=yes"
8584 echo "configure: failed program was:" >&5
8585 cat conftest.$ac_ext >&5
8587 eval "ac_cv_header_$ac_safe=no"
8591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8592 echo "$ac_t""yes" 1>&6
8595 echo "$ac_t""no" 1>&6
8598 CPPFLAGS="$ac_save_CPPFLAGS"
8601 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
8602 # to exist, but the library code to not exist. And even better, the library
8603 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
8604 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
8605 # that's not quite right, but close enough.)
8609 if `uname -v` -eq 3 ; then
8612 ac_save_CPPFLAGS="$CPPFLAGS"
8613 ac_save_LDFLAGS="$LDFLAGS"
8614 # ac_save_LIBS="$LIBS"
8616 if test \! -z "$includedir" ; then
8617 CPPFLAGS="$CPPFLAGS -I$includedir"
8619 # note: $X_CFLAGS includes $x_includes
8620 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8622 if test \! -z "$libdir" ; then
8623 LDFLAGS="$LDFLAGS -L$libdir"
8625 # note: $X_LIBS includes $x_libraries
8626 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8628 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
8629 echo "configure:8641: checking for XShmQueryExtension in -lXextSam" >&5
8630 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
8631 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8632 echo $ac_n "(cached) $ac_c" 1>&6
8634 ac_save_LIBS="$LIBS"
8635 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
8636 cat > conftest.$ac_ext <<EOF
8637 #line 8649 "configure"
8638 #include "confdefs.h"
8639 /* Override any gcc2 internal prototype to avoid an error. */
8640 /* We use char because int might match the return type of a gcc2
8641 builtin and then its argument prototype would still apply. */
8642 char XShmQueryExtension();
8645 XShmQueryExtension()
8648 if { (eval echo configure:8660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8650 eval "ac_cv_lib_$ac_lib_var=yes"
8652 echo "configure: failed program was:" >&5
8653 cat conftest.$ac_ext >&5
8655 eval "ac_cv_lib_$ac_lib_var=no"
8658 LIBS="$ac_save_LIBS"
8661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8662 echo "$ac_t""yes" 1>&6
8663 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
8665 echo "$ac_t""no" 1>&6
8669 CPPFLAGS="$ac_save_CPPFLAGS"
8670 LDFLAGS="$ac_save_LDFLAGS"
8671 # LIBS="$ac_save_LIBS"
8677 # if that succeeded, then we've really got it.
8678 if test "$have_xshm" = yes; then
8679 cat >> confdefs.h <<\EOF
8680 #define HAVE_XSHM_EXTENSION 1
8685 elif test "$with_xshm" != no; then
8686 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
8691 ###############################################################################
8693 # Check for the DOUBLE-BUFFER server extension.
8695 ###############################################################################
8698 with_xdbe_req=unspecified
8699 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
8700 if test "${with_xdbe_ext+set}" = set; then
8701 withval="$with_xdbe_ext"
8702 with_xdbe="$withval"; with_xdbe_req="$withval"
8709 case "$with_xdbe" in
8714 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
8715 echo "configure:8727: checking for DOUBLE-BUFFER headers" >&5
8716 d=$with_xdbe/include
8718 X_CFLAGS="-I$d $X_CFLAGS"
8719 echo "$ac_t""$d" 1>&6
8721 echo "$ac_t""not found ($d: no such directory)" 1>&6
8724 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
8725 echo "configure:8737: checking for DOUBLE-BUFFER libs" >&5
8728 X_LIBS="-L$d $X_LIBS"
8729 echo "$ac_t""$d" 1>&6
8731 echo "$ac_t""not found ($d: no such directory)" 1>&6
8734 # replace the directory string with "yes".
8736 with_xdbe=$with_xdbe_req
8741 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
8742 echo " If it is a directory, then \`DIR/include' will be added to"
8743 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8749 if test "$with_xdbe" = yes; then
8752 ac_save_CPPFLAGS="$CPPFLAGS"
8753 if test \! -z "$includedir" ; then
8754 CPPFLAGS="$CPPFLAGS -I$includedir"
8756 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8757 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
8758 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
8759 echo "configure:8771: checking for X11/extensions/Xdbe.h" >&5
8760 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8761 echo $ac_n "(cached) $ac_c" 1>&6
8763 cat > conftest.$ac_ext <<EOF
8764 #line 8776 "configure"
8765 #include "confdefs.h"
8766 #include <X11/extensions/Xdbe.h>
8768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8769 { (eval echo configure:8781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8771 if test -z "$ac_err"; then
8773 eval "ac_cv_header_$ac_safe=yes"
8776 echo "configure: failed program was:" >&5
8777 cat conftest.$ac_ext >&5
8779 eval "ac_cv_header_$ac_safe=no"
8783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8784 echo "$ac_t""yes" 1>&6
8787 echo "$ac_t""no" 1>&6
8790 CPPFLAGS="$ac_save_CPPFLAGS"
8791 if test "$have_xdbe" = yes; then
8792 cat >> confdefs.h <<\EOF
8793 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
8798 elif test "$with_xdbe" != no; then
8799 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
8804 ###############################################################################
8806 # Check for the SGI XReadDisplay server extension.
8808 # Note: this has to be down here, rather than up with the other server
8809 # extension tests, so that the output of `configure --help' is in the
8810 # right order. Arrgh!
8812 ###############################################################################
8815 with_readdisplay_req=unspecified
8816 # Check whether --with-readdisplay or --without-readdisplay was given.
8817 if test "${with_readdisplay+set}" = set; then
8818 withval="$with_readdisplay"
8819 with_readdisplay="$withval"; with_readdisplay_req="$withval"
8821 with_readdisplay=yes
8826 case "$with_readdisplay" in
8831 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
8832 echo "configure:8844: checking for XReadDisplay headers" >&5
8833 d=$with_readdisplay/include
8835 X_CFLAGS="-I$d $X_CFLAGS"
8836 echo "$ac_t""$d" 1>&6
8838 echo "$ac_t""not found ($d: no such directory)" 1>&6
8841 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
8842 echo "configure:8854: checking for XReadDisplay libs" >&5
8843 d=$with_readdisplay/lib
8845 X_LIBS="-L$d $X_LIBS"
8846 echo "$ac_t""$d" 1>&6
8848 echo "$ac_t""not found ($d: no such directory)" 1>&6
8851 # replace the directory string with "yes".
8852 with_readdisplay_req="yes"
8853 with_readdisplay=$with_readdisplay_req
8858 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
8859 echo " If it is a directory, then \`DIR/include' will be added to"
8860 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8866 if test "$with_readdisplay" = yes; then
8868 ac_save_CPPFLAGS="$CPPFLAGS"
8869 if test \! -z "$includedir" ; then
8870 CPPFLAGS="$CPPFLAGS -I$includedir"
8872 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8873 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
8874 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
8875 echo "configure:8887: checking for X11/extensions/readdisplay.h" >&5
8876 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8877 echo $ac_n "(cached) $ac_c" 1>&6
8879 cat > conftest.$ac_ext <<EOF
8880 #line 8892 "configure"
8881 #include "confdefs.h"
8882 #include <X11/extensions/readdisplay.h>
8884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8885 { (eval echo configure:8897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8887 if test -z "$ac_err"; then
8889 eval "ac_cv_header_$ac_safe=yes"
8892 echo "configure: failed program was:" >&5
8893 cat conftest.$ac_ext >&5
8895 eval "ac_cv_header_$ac_safe=no"
8899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8900 echo "$ac_t""yes" 1>&6
8901 cat >> confdefs.h <<\EOF
8902 #define HAVE_READ_DISPLAY_EXTENSION 1
8906 echo "$ac_t""no" 1>&6
8909 CPPFLAGS="$ac_save_CPPFLAGS"
8910 elif test "$with_readdisplay" != no; then
8911 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
8916 ###############################################################################
8918 # Check for a program to generate random text.
8920 # Zippy is funnier than the idiocy generally spat out by `fortune',
8921 # so try to find that, by invoking Emacs and asking it where its
8922 # libexec directory is ("yow" lives in there.)
8924 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
8925 # and if so, use them.
8927 # If that doesn't work, look in /usr/games, and if it's there, use
8928 # the full pathname.
8930 ###############################################################################
8933 # Check whether --with-zippy or --without-zippy was given.
8934 if test "${with_zippy+set}" = set; then
8935 withval="$with_zippy"
8936 with_zippy_req="$withval"; with_zippy="$withval"
8942 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
8947 if test -n "$with_zippy_req" ; then
8948 ac_cv_zippy_program=""
8949 case "$with_zippy_req" in
8951 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
8952 echo "configure:8964: checking for $with_zippy_req" >&5
8953 if test -x "$with_zippy_req" ; then
8954 echo "$ac_t""yes" 1>&6
8956 echo "$ac_t""no" 1>&6
8962 unset ac_cv_path_zip2
8963 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
8964 set dummy $with_zippy_req; ac_word=$2
8965 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8966 echo "configure:8978: checking for $ac_word" >&5
8967 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
8968 echo $ac_n "(cached) $ac_c" 1>&6
8972 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
8975 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
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_path_zip2="$ac_dir/$ac_word"
8991 zip2="$ac_cv_path_zip2"
8992 if test -n "$zip2"; then
8993 echo "$ac_t""$zip2" 1>&6
8995 echo "$ac_t""no" 1>&6
8998 if test "$zip2" = ""; then
9003 ac_cv_zippy_program="$with_zippy"
9005 elif test -n "$ac_cv_zippy_program"; then
9006 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
9009 if test ! -n "$ac_cv_zippy_program"; then
9011 for ac_prog in emacs
9013 # Extract the first word of "$ac_prog", so it can be a program name with args.
9014 set dummy $ac_prog; ac_word=$2
9015 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9016 echo "configure:9028: checking for $ac_word" >&5
9017 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
9018 echo $ac_n "(cached) $ac_c" 1>&6
9020 if test -n "$emacs_exe"; then
9021 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
9023 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9025 for ac_dir in $ac_dummy; do
9026 test -z "$ac_dir" && ac_dir=.
9027 if test -f $ac_dir/$ac_word; then
9028 ac_cv_prog_emacs_exe="$ac_prog"
9035 emacs_exe="$ac_cv_prog_emacs_exe"
9036 if test -n "$emacs_exe"; then
9037 echo "$ac_t""$emacs_exe" 1>&6
9039 echo "$ac_t""no" 1>&6
9042 test -n "$emacs_exe" && break
9045 for ac_prog in xemacs
9047 # Extract the first word of "$ac_prog", so it can be a program name with args.
9048 set dummy $ac_prog; ac_word=$2
9049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9050 echo "configure:9062: checking for $ac_word" >&5
9051 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
9052 echo $ac_n "(cached) $ac_c" 1>&6
9054 if test -n "$xemacs_exe"; then
9055 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
9057 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9059 for ac_dir in $ac_dummy; do
9060 test -z "$ac_dir" && ac_dir=.
9061 if test -f $ac_dir/$ac_word; then
9062 ac_cv_prog_xemacs_exe="$ac_prog"
9069 xemacs_exe="$ac_cv_prog_xemacs_exe"
9070 if test -n "$xemacs_exe"; then
9071 echo "$ac_t""$xemacs_exe" 1>&6
9073 echo "$ac_t""no" 1>&6
9076 test -n "$xemacs_exe" && break
9080 ac_cv_zippy_program=""
9081 eargs='-batch -q -nw --eval'
9083 if test -n "$emacs_exe" ; then
9084 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
9085 echo "configure:9097: checking for emacs yow" >&5
9087 # get emacs to tell us where the libexec directory is.
9089 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
9090 2>/dev/null | tail -1`
9091 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
9093 # try running libexec/yow and see if it exits without error.
9095 if test x"$dir" != x -a -x "$dir/yow" ; then
9096 if $dir/yow >&- 2>&- ; then
9097 ac_cv_zippy_program="$dir/yow"
9098 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9100 echo "$ac_t""no" 1>&6
9105 if test -z "$ac_cv_zippy_program" ; then
9106 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
9107 echo "configure:9119: checking for xemacs yow" >&5
9108 if test -n "$xemacs_exe" ; then
9110 # get xemacs to tell us where the libexec directory is.
9112 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
9113 2>/dev/null | tail -1`
9114 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
9116 # try running libexec/yow and see if it exits without error.
9118 if test x"$dir" != x -a -x "$dir/yow" ; then
9119 if $dir/yow >&- 2>&- ; then
9120 ac_cv_zippy_program="$dir/yow"
9121 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9124 # in some xemacs installations, the pathname of the yow.lines file
9125 # isn't hardcoded into the yow executable, and must be passed on
9126 # the command line. See if it's in libexec/../etc/.
9130 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
9133 yowlines="$dir_up/etc/yow.lines"
9134 if $dir/yow -f $yowlines >&- 2>&- ; then
9135 ac_cv_zippy_program="$dir/yow -f $yowlines"
9136 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9139 # In newer XEmacs releases, yow.lines is in a different place,
9140 # and the easiest way to get it is by calling the new function
9141 # `locate-data-file'.
9143 yowlines=`$xemacs_exe $eargs \
9144 '(princ (concat (locate-data-file "yow.lines") "\n"))' \
9145 2>/dev/null | tail -1`
9146 if $dir/yow -f $yowlines >&- 2>&- ; then
9147 ac_cv_zippy_program="$dir/yow -f $yowlines"
9148 echo "$ac_t""$ac_cv_zippy_program" 1>&6
9150 echo "$ac_t""no" 1>&6
9158 # if that didn't work, try for some other programs...
9159 if test -z "$ac_cv_zippy_program" ; then
9161 for ac_prog in fortune zippy yow
9163 # Extract the first word of "$ac_prog", so it can be a program name with args.
9164 set dummy $ac_prog; ac_word=$2
9165 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9166 echo "configure:9178: checking for $ac_word" >&5
9167 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
9168 echo $ac_n "(cached) $ac_c" 1>&6
9170 if test -n "$fortune"; then
9171 ac_cv_prog_fortune="$fortune" # Let the user override the test.
9173 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9175 for ac_dir in $ac_dummy; do
9176 test -z "$ac_dir" && ac_dir=.
9177 if test -f $ac_dir/$ac_word; then
9178 ac_cv_prog_fortune="$ac_prog"
9185 fortune="$ac_cv_prog_fortune"
9186 if test -n "$fortune"; then
9187 echo "$ac_t""$fortune" 1>&6
9189 echo "$ac_t""no" 1>&6
9192 test -n "$fortune" && break
9195 # if that didn't work, try for those programs in /usr/games...
9196 if test -z "$fortune" ; then
9197 for ac_prog in fortune zippy yow
9199 # Extract the first word of "$ac_prog", so it can be a program name with args.
9200 set dummy $ac_prog; ac_word=$2
9201 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9202 echo "configure:9214: checking for $ac_word" >&5
9203 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
9204 echo $ac_n "(cached) $ac_c" 1>&6
9208 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
9211 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
9214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9215 ac_dummy="/usr/games:/usr/local/games:$PATH"
9216 for ac_dir in $ac_dummy; do
9217 test -z "$ac_dir" && ac_dir=.
9218 if test -f $ac_dir/$ac_word; then
9219 ac_cv_path_fortune="$ac_dir/$ac_word"
9227 fortune="$ac_cv_path_fortune"
9228 if test -n "$fortune"; then
9229 echo "$ac_t""$fortune" 1>&6
9231 echo "$ac_t""no" 1>&6
9234 test -n "$fortune" && break
9236 test -n "$fortune" || fortune="fortune"
9242 if test -z "$ac_cv_zippy_program" ; then
9243 ac_cv_zippy_program=fortune
9246 cat >> confdefs.h <<EOF
9247 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
9252 ###############################################################################
9254 # Check whether it's ok to install some hacks as setuid (e.g., "sonar")
9255 # This should be safe, but let's give people the option.
9257 ###############################################################################
9259 setuid_hacks_default=no
9260 setuid_hacks="$setuid_hacks_default"
9261 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
9262 if test "${with_setuid_hacks+set}" = set; then
9263 withval="$with_setuid_hacks"
9264 setuid_hacks="$withval"
9266 setuid_hacks="$setuid_hacks_default"
9271 case "$setuid_hacks" in
9276 echo $ac_n "checking for setuid hacks headers""... $ac_c" 1>&6
9277 echo "configure:9289: checking for setuid hacks headers" >&5
9278 d=$setuid_hacks/include
9280 X_CFLAGS="-I$d $X_CFLAGS"
9281 echo "$ac_t""$d" 1>&6
9283 echo "$ac_t""not found ($d: no such directory)" 1>&6
9286 echo $ac_n "checking for setuid hacks libs""... $ac_c" 1>&6
9287 echo "configure:9299: checking for setuid hacks libs" >&5
9290 X_LIBS="-L$d $X_LIBS"
9291 echo "$ac_t""$d" 1>&6
9293 echo "$ac_t""not found ($d: no such directory)" 1>&6
9296 # replace the directory string with "yes".
9297 setuid_hacks_req="yes"
9298 setuid_hacks=$setuid_hacks_req
9303 echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
9304 echo " If it is a directory, then \`DIR/include' will be added to"
9305 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9311 if test "$setuid_hacks" = yes; then
9313 elif test "$setuid_hacks" != no; then
9314 echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
9319 ###############################################################################
9321 # Done testing. Now, set up the various -I and -L variables,
9322 # and decide which GUI program to build by default.
9324 ###############################################################################
9331 if test \! -z "$includedir" ; then
9332 INCLUDES="$INCLUDES -I$includedir"
9335 if test \! -z "$libdir" ; then
9336 LDFLAGS="$LDFLAGS -L$libdir"
9340 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9342 if test "$have_motif" = yes; then
9343 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9344 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9346 if test "$have_gtk" = yes; then
9347 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
9348 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9352 if test "$have_kerberos" = yes; then
9353 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
9354 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
9356 if test "$have_pam" = yes; then
9357 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
9358 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
9359 INSTALL_PAM="install-pam"
9361 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
9362 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
9365 if test "$enable_locking" = yes; then
9366 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
9367 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
9369 LOCK_SRCS='$(NOLOCK_SRCS_1)'
9370 LOCK_OBJS='$(NOLOCK_OBJS_1)'
9373 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
9375 if test "$need_setuid" = yes; then
9381 if test "$setuid_hacks" = yes; then
9388 if test "$have_gl" = yes; then
9389 GL_EXES='$(GL_EXES)'
9390 GL_UTIL_EXES='$(GL_UTIL_EXES)'
9394 GL_KLUDGE="-${tab} "
9397 if test "$have_gle" = yes; then
9398 GLE_EXES='$(GLE_EXES)'
9399 GLE_MEN='$(GLE_MEN)'
9400 GLE_KLUDGE="${tab} "
9402 GLE_KLUDGE="-${tab} "
9406 # Another substitution in the XScreenSaver.ad.in file:
9408 if test "$have_gnome_help" = yes; then
9417 ###############################################################################
9419 # Perform substitutions and write Makefiles.
9421 ###############################################################################
9464 APPDEFAULTS=$ac_x_app_defaults
9473 cat > confcache <<\EOF
9474 # This file is a shell script that caches the results of configure
9475 # tests run on this system so they can be shared between configure
9476 # scripts and configure runs. It is not useful on other systems.
9477 # If it contains results you don't want to keep, you may remove or edit it.
9479 # By default, configure uses ./config.cache as the cache file,
9480 # creating it if it does not exist already. You can give configure
9481 # the --cache-file=FILE option to use a different cache file; that is
9482 # what configure does when it calls configure scripts in
9483 # subdirectories, so they share the cache.
9484 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9485 # config.status only pays attention to the cache file if you give it the
9486 # --recheck option to rerun configure.
9489 # The following way of writing the cache mishandles newlines in values,
9490 # but we know of no workaround that is simple, portable, and efficient.
9491 # So, don't put newlines in cache variables' values.
9492 # Ultrix sh set writes to stderr and can't be redirected directly,
9493 # and sets the high bit in the cache file unless we assign to the vars.
9495 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9497 # `set' does not quote correctly, so add quotes (double-quote substitution
9498 # turns \\\\ into \\, and sed turns \\ into \).
9500 -e "s/'/'\\\\''/g" \
9501 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9504 # `set' quotes correctly as required by POSIX, so do not add quotes.
9505 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9508 if cmp -s $cache_file confcache; then
9511 if test -w $cache_file; then
9512 echo "updating cache $cache_file"
9513 cat confcache > $cache_file
9515 echo "not updating unwritable cache $cache_file"
9520 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9522 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9523 # Let make expand exec_prefix.
9524 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9526 # Any assignment to VPATH causes Sun make to only execute
9527 # the first set of double-colon rules, so remove it if not needed.
9528 # If there is a colon in the path, we need to keep it.
9529 if test "x$srcdir" = x.; then
9530 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9533 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9535 DEFS=-DHAVE_CONFIG_H
9537 # Without the "./", some shells look in PATH for config.status.
9538 : ${CONFIG_STATUS=./config.status}
9540 echo creating $CONFIG_STATUS
9541 rm -f $CONFIG_STATUS
9542 cat > $CONFIG_STATUS <<EOF
9544 # Generated automatically by configure.
9545 # Run this file to recreate the current configuration.
9546 # This directory was configured as follows,
9547 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9549 # $0 $ac_configure_args
9551 # Compiler output produced by configure, useful for debugging
9552 # configure, is in ./config.log if it exists.
9554 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9557 case "\$ac_option" in
9558 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9559 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9560 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9561 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9562 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9564 -help | --help | --hel | --he | --h)
9565 echo "\$ac_cs_usage"; exit 0 ;;
9566 *) echo "\$ac_cs_usage"; exit 1 ;;
9570 ac_given_srcdir=$srcdir
9571 ac_given_INSTALL="$INSTALL"
9573 trap 'rm -fr `echo "Makefile
9578 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9580 cat >> $CONFIG_STATUS <<EOF
9582 # Protect against being on the right side of a sed subst in config.status.
9583 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9584 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9588 s%@CFLAGS@%$CFLAGS%g
9589 s%@CPPFLAGS@%$CPPFLAGS%g
9590 s%@CXXFLAGS@%$CXXFLAGS%g
9591 s%@FFLAGS@%$FFLAGS%g
9593 s%@LDFLAGS@%$LDFLAGS%g
9595 s%@exec_prefix@%$exec_prefix%g
9596 s%@prefix@%$prefix%g
9597 s%@program_transform_name@%$program_transform_name%g
9598 s%@bindir@%$bindir%g
9599 s%@sbindir@%$sbindir%g
9600 s%@libexecdir@%$libexecdir%g
9601 s%@datadir@%$datadir%g
9602 s%@sysconfdir@%$sysconfdir%g
9603 s%@sharedstatedir@%$sharedstatedir%g
9604 s%@localstatedir@%$localstatedir%g
9605 s%@libdir@%$libdir%g
9606 s%@includedir@%$includedir%g
9607 s%@oldincludedir@%$oldincludedir%g
9608 s%@infodir@%$infodir%g
9609 s%@mandir@%$mandir%g
9611 s%@host_alias@%$host_alias%g
9612 s%@host_cpu@%$host_cpu%g
9613 s%@host_vendor@%$host_vendor%g
9614 s%@host_os@%$host_os%g
9617 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9618 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9619 s%@INSTALL_DATA@%$INSTALL_DATA%g
9620 s%@SET_MAKE@%$SET_MAKE%g
9622 s%@X_CFLAGS@%$X_CFLAGS%g
9623 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9624 s%@X_LIBS@%$X_LIBS%g
9625 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9626 s%@glib_config@%$glib_config%g
9627 s%@gtk_config@%$gtk_config%g
9628 s%@gnome_config@%$gnome_config%g
9629 s%@have_gnome_help@%$have_gnome_help%g
9631 s%@emacs_exe@%$emacs_exe%g
9632 s%@xemacs_exe@%$xemacs_exe%g
9633 s%@fortune@%$fortune%g
9634 s%@INCLUDES@%$INCLUDES%g
9635 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
9636 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
9637 s%@SAVER_LIBS@%$SAVER_LIBS%g
9638 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
9639 s%@GTK_LIBS@%$GTK_LIBS%g
9640 s%@HACK_LIBS@%$HACK_LIBS%g
9641 s%@XPM_LIBS@%$XPM_LIBS%g
9642 s%@GL_LIBS@%$GL_LIBS%g
9643 s%@GLE_LIBS@%$GLE_LIBS%g
9644 s%@XDPMS_LIBS@%$XDPMS_LIBS%g
9645 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
9646 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
9647 s%@SETUID_HACKS@%$SETUID_HACKS%g
9648 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
9649 s%@NEED_SETUID@%$NEED_SETUID%g
9650 s%@INSTALL_PAM@%$INSTALL_PAM%g
9651 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
9652 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
9653 s%@XMU_SRCS@%$XMU_SRCS%g
9654 s%@XMU_OBJS@%$XMU_OBJS%g
9655 s%@XMU_LIBS@%$XMU_LIBS%g
9656 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
9657 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
9658 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
9659 s%@LOCK_SRCS@%$LOCK_SRCS%g
9660 s%@LOCK_OBJS@%$LOCK_OBJS%g
9661 s%@GL_EXES@%$GL_EXES%g
9662 s%@GL_UTIL_EXES@%$GL_UTIL_EXES%g
9663 s%@GL_MEN@%$GL_MEN%g
9664 s%@GL_KLUDGE@%$GL_KLUDGE%g
9665 s%@GLE_EXES@%$GLE_EXES%g
9666 s%@GLE_MEN@%$GLE_MEN%g
9667 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
9668 s%@GNOMEHELP_Y@%$GNOMEHELP_Y%g
9669 s%@GNOMEHELP_N@%$GNOMEHELP_N%g
9670 s%@HACKDIR@%$HACKDIR%g
9671 s%@GNOME_DATADIR@%$GNOME_DATADIR%g
9672 s%@APPDEFAULTS@%$APPDEFAULTS%g
9673 s%@DEPEND@%$DEPEND%g
9674 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
9675 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
9680 cat >> $CONFIG_STATUS <<\EOF
9682 # Split the substitutions into bite-sized pieces for seds with
9683 # small command number limits, like on Digital OSF/1 and HP-UX.
9684 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9685 ac_file=1 # Number of current file.
9686 ac_beg=1 # First line for current file.
9687 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9690 while $ac_more_lines; do
9691 if test $ac_beg -gt 1; then
9692 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9694 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9696 if test ! -s conftest.s$ac_file; then
9698 rm -f conftest.s$ac_file
9700 if test -z "$ac_sed_cmds"; then
9701 ac_sed_cmds="sed -f conftest.s$ac_file"
9703 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9705 ac_file=`expr $ac_file + 1`
9707 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9710 if test -z "$ac_sed_cmds"; then
9715 cat >> $CONFIG_STATUS <<EOF
9717 CONFIG_FILES=\${CONFIG_FILES-"Makefile
9722 driver/XScreenSaver.ad"}
9724 cat >> $CONFIG_STATUS <<\EOF
9725 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9726 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9728 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9729 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9730 *) ac_file_in="${ac_file}.in" ;;
9733 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9735 # Remove last slash and all that follows it. Not all systems have dirname.
9736 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9737 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9738 # The file is in a subdirectory.
9739 test ! -d "$ac_dir" && mkdir "$ac_dir"
9740 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9741 # A "../" for each directory in $ac_dir_suffix.
9742 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9744 ac_dir_suffix= ac_dots=
9747 case "$ac_given_srcdir" in
9749 if test -z "$ac_dots"; then top_srcdir=.
9750 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9751 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9753 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9754 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9757 case "$ac_given_INSTALL" in
9758 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9759 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9762 echo creating "$ac_file"
9764 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9766 *Makefile*) ac_comsub="1i\\
9767 # $configure_input" ;;
9771 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9773 s%@configure_input@%$configure_input%g
9774 s%@srcdir@%$srcdir%g
9775 s%@top_srcdir@%$top_srcdir%g
9776 s%@INSTALL@%$INSTALL%g
9777 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9781 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9782 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9784 # ac_d sets the value in "#define NAME VALUE" lines.
9785 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9786 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9789 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9790 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9791 ac_uB='\([ ]\)%\1#\2define\3'
9794 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9795 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9796 ac_eB='$%\1#\2define\3'
9800 if test "${CONFIG_HEADERS+set}" != set; then
9802 cat >> $CONFIG_STATUS <<EOF
9803 CONFIG_HEADERS="config.h"
9805 cat >> $CONFIG_STATUS <<\EOF
9807 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9808 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9810 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9811 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9812 *) ac_file_in="${ac_file}.in" ;;
9815 echo creating $ac_file
9817 rm -f conftest.frag conftest.in conftest.out
9818 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9819 cat $ac_file_inputs > conftest.in
9823 # Transform confdefs.h into a sed script conftest.vals that substitutes
9824 # the proper values into config.h.in to produce config.h. And first:
9825 # Protect against being on the right side of a sed subst in config.status.
9826 # Protect against being in an unquoted here document in config.status.
9828 cat > conftest.hdr <<\EOF
9831 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9835 sed -n -f conftest.hdr confdefs.h > conftest.vals
9838 # This sed command replaces #undef with comments. This is necessary, for
9839 # example, in the case of _POSIX_SOURCE, which is predefined and required
9840 # on some systems where configure will not decide to define it.
9841 cat >> conftest.vals <<\EOF
9842 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9845 # Break up conftest.vals because some shells have a limit on
9846 # the size of here documents, and old seds have small limits too.
9851 ac_lines=`grep -c . conftest.vals`
9852 # grep -c gives empty output for an empty file on some AIX systems.
9853 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9854 # Write a limited-size here document to conftest.frag.
9855 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9856 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9858 sed -f conftest.frag conftest.in > conftest.out
9860 mv conftest.out conftest.in
9862 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9864 mv conftest.tail conftest.vals
9868 cat >> $CONFIG_STATUS <<\EOF
9869 rm -f conftest.frag conftest.h
9870 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9871 cat conftest.in >> conftest.h
9873 if cmp -s $ac_file conftest.h 2>/dev/null; then
9874 echo "$ac_file is unchanged"
9877 # Remove last slash and all that follows it. Not all systems have dirname.
9878 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9879 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9880 # The file is in a subdirectory.
9881 test ! -d "$ac_dir" && mkdir "$ac_dir"
9884 mv conftest.h $ac_file
9889 cat >> $CONFIG_STATUS <<EOF
9892 cat >> $CONFIG_STATUS <<\EOF
9896 chmod +x $CONFIG_STATUS
9897 rm -fr confdefs* $ac_clean_files
9898 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9901 ###############################################################################
9903 # Print some warnings at the end.
9905 ###############################################################################
9907 warn_prefix_1=" Warning:"
9908 warn_prefix_2=" Note:"
9909 warn_prefix="$warn_prefix_1"
9912 warnsep=' #################################################################'
9915 if test "$warning" = no ; then
9916 echo '' ; echo "$warnsep" ; echo ''
9923 if test "$warning" = long ; then echo '' ; fi
9926 echo "$warn_prefix $rest"
9933 if test "$was" != no ; then echo '' ; fi
9935 echo "$warn_prefix $rest"
9945 warn_prefix="$warn_prefix_2"
9947 warn_prefix="$warn_prefix_1"
9951 warn_prefix="$warn_prefix_2"
9953 warn_prefix="$warn_prefix_1"
9957 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
9958 warn 'The SGI saver extension was requested, but was not found.'
9961 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
9962 warn 'The MIT saver extension was requested, but was not found.'
9965 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
9966 warn 'The XIdle extension was requested, but was not found.'
9969 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
9970 warn 'The XSHM extension was requested, but was not found.'
9973 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
9974 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
9977 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
9978 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
9981 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
9982 warn 'The DPMS extension was requested, but was not found.'
9985 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
9986 warn 'The XF86VMODE extension was requested, but was not found.'
9989 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
9990 warn "Checking of /proc/interrupts was requested, but it's bogus."
9994 if test "$have_motif" = no -a "$have_gtk" = no; then
9995 warnL "Neither Motif nor Gtk seem to be available;"
9996 warn2 "the \`xscreensaver-demo' program requires one of these."
9998 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
9999 warnL "Use of Motif was requested, but it wasn't found;"
10000 warn2 "Gtk will be used instead."
10002 elif test "$jurassic_gtk" = yes ; then
10006 v="$ac_gtk_version_string"
10007 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
10008 warnL "Use of Gtk was requested, but its version number is unknown;"
10009 elif test "$with_gtk_req" = yes ; then
10010 warnL "Use of Gtk was requested, but it is version $v;"
10012 warnL "Gtk was found on this system, but it is version $v;"
10015 warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
10017 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
10018 warnL "Use of Gtk was requested, but it wasn't found;"
10019 warn2 "Motif will be used instead."
10024 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
10025 warn 'Use of the Gnome Control Panel was requested, but the necessary'
10026 warn2 'headers and/or libraries were not found.'
10030 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
10032 preferred_lesstif=0.86
10034 if test "$lesstif_version" = unknown; then
10035 warnL "Unable to determine the LessTif version number!"
10036 warn2 "Make sure you are using version $preferred_lesstif or newer."
10037 warn2 "See <http://www.lesstif.org/>."
10039 elif test \! $lesstif_version -gt 82; then
10040 warnL "LessTif version $lesstif_version_string is being used."
10041 warn2 "LessTif versions 0.82 and earlier are too buggy to"
10042 warn2 "use with XScreenSaver; it is strongly recommended"
10043 warn2 "that you upgrade to at least version $preferred_lesstif!"
10044 warn2 "See <http://www.lesstif.org/>."
10050 if test "$have_xpm" = no ; then
10051 if test "$with_xpm_req" = yes ; then
10052 warnL 'Use of XPM was requested, but it was not found.'
10053 elif test "$with_xpm_req" = no ; then
10054 noteL 'The XPM library is not being used.'
10056 noteL 'The XPM library was not found.'
10060 warn2 'Some of the demos will not be as colorful as they'
10061 warn2 'could be. You might want to consider installing XPM'
10062 warn2 'and re-running configure. (Remember to delete the'
10063 warn2 'config.cache file first.) You can find XPM at most'
10064 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
10068 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
10069 preferred_mesagl=3.4
10070 mgv="$ac_mesagl_version_string"
10071 pgl="$preferred_mesagl"
10073 if test "$ac_mesagl_version" = unknown; then
10074 warnL "Unable to determine the MesaGL version number!"
10075 warn2 "Make sure you are using version $preferred_mesagl or newer."
10077 elif test \! "$ac_mesagl_version" -gt 2006; then
10078 warnL "MesaGL version $mgv is being used. MesaGL 2.6 and earlier"
10079 warn2 "have a security bug. It is strongly recommended that you"
10080 warn2 "upgrade to at least version $preferred_mesagl."
10082 elif test \! "$ac_mesagl_version" -gt 3003; then
10083 warnL "MesaGL version $mgv is being used. That version has some"
10084 warn2 "bugs; it is recommended that you upgrade to $pgl or newer."
10088 if test "$have_gl" = no ; then
10089 if test "$with_gl_req" = yes ; then
10090 warnL 'Use of GL was requested, but it was not found.'
10091 elif test "$with_gl_req" = no ; then
10092 noteL 'The OpenGL 3D library is not being used.'
10094 noteL 'The OpenGL 3D library was not found.'
10097 if test "$gl_halfassed" = yes ; then
10099 warn2 'More specifically, we found the headers, but not the'
10100 warn2 'libraries; so either GL is half-installed on this'
10101 warn2 "system, or something else went wrong. The \`config.log'"
10102 warn2 'file might contain some clues.'
10106 warn2 'Those demos which use 3D will not be built or installed.'
10107 warn2 'You might want to consider installing OpenGL and'
10108 warn2 're-running configure. (Remember to delete the'
10109 warn2 "config.cache file first.) If your vendor doesn't ship"
10110 warn2 'their own implementation of OpenGL, you can get a free'
10111 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
10112 warn2 'info, see <http://www.opengl.org/>.'
10117 if test "$have_gl" = yes -a "$have_gle" = no ; then
10118 if test "$with_gle_req" = yes ; then
10119 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
10120 warn2 'it was not found (though the OpenGL library was found, and'
10121 warn2 'is being used.)'
10122 elif test "$with_gle_req" = no ; then
10123 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
10124 warn2 'library is not.'
10126 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
10130 if test "$gle_halfassed" = yes ; then
10132 warn2 'More specifically, we found the headers, but not the'
10133 warn2 'libraries; so either GLE is half-installed on this'
10134 warn2 "system, or something else went wrong. The \`config.log'"
10135 warn2 'file might contain some clues.'
10139 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
10140 warn2 'will not be built or installed. You might want to consider'
10141 warn2 'installing GLE and re-running configure. (Remember to delete'
10142 warn2 'the config.cache file first.) You can find the GLE library'
10143 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
10144 warn2 'see <http://www.opengl.org/>.'
10149 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
10150 warn 'Use of XReadDisplay was requested, but it was not found.'
10153 if test -n "$with_zippy_req"; then
10154 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
10155 warnL "$with_zippy_req was requested as the Zippy program,"
10156 warn2 "but was not found. The default will be used instead."
10160 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
10161 warn 'Use of Kerberos was requested, but it was not found.'
10164 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
10165 warn 'Use of PAM was requested, but it was not found.'
10168 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
10169 warn 'Use of shadow passwords was requested, but they were not found.'
10173 # You are in a twisty maze of namespaces and syntaxes, all alike.
10174 # Fuck the skull of Unix.
10176 eval bindir=${bindir}
10177 eval bindir=${bindir}
10178 eval bindir=${bindir}
10179 eval bindir=${bindir}
10180 eval bindir=${bindir}
10181 eval bindir=${bindir}
10182 eval HACKDIR=${HACKDIR}
10183 eval HACKDIR=${HACKDIR}
10184 eval HACKDIR=${HACKDIR}
10185 eval HACKDIR=${HACKDIR}
10186 eval HACKDIR=${HACKDIR}
10187 eval HACKDIR=${HACKDIR}
10189 # canonicalize slashes.
10190 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
10191 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10194 # Sanity check the subdir
10195 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
10196 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
10198 { echo "configure: error: \"--enable-subdir=${bindir}/${bad_choice}\" won't work.
10199 There will be an executable installed with that name, so
10200 that can't be the name of a directory as well. Please
10201 re-configure with a different directory name." 1>&2; exit 1; }
10208 # Now let's see if there's a previous RPM version already installed. Blargh!
10212 rpmv=`(rpm -qv xscreensaver) 2>&- | \
10213 sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
10216 if test \! -z "$rpmv" ; then
10217 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
10218 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
10221 warnL "There is already an installed RPM of xscreensaver $rpmv"
10222 warn2 "on this system. You might want to remove it (with"
10223 warn2 '"rpm -ve xscreensaver") before running "make install"'
10224 warn2 "from this directory."
10226 warn2 "Alternately, you could build this version of xscreensaver"
10227 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
10228 warn2 "file is included. See the RPM documentation for more info."
10231 if test "$rpmbdir" = "$rpmhdir" ; then
10232 warn2 "The RPM version was installed in $rpmbdir."
10234 warn2 "The RPM version was installed in $rpmbdir,"
10235 warn2 "with demos in $rpmhdir."
10242 # Warn about egregious GNOME bogosity.
10244 #if (rpm -qv control-center) >&- 2>&- ; then
10246 # warnL "The Gnome Control Center seems to be installed."
10248 # warn2 "Note that simply installing this version of xscreensaver"
10249 # warn2 "will not cause GNOME to know about the newly-added display"
10250 # warn2 "modes -- GNOME is just lame that way. Instead of using the"
10251 # warn2 "Control Center, try using the \`xscreensaver-demo' command."
10255 if test "${bindir}" = "${HACKDIR}" ; then
10259 if test "$do_dir_warning" = yes; then
10263 echo ' When you run "make install", the "xscreensaver",'
10264 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
10265 echo " will be installed in ${bindir}."
10267 echo " The various graphics demos (120+ different executables) will"
10268 echo " also be installed in ${HACKDIR}."
10270 echo " If you would prefer the demos to be installed elsewhere"
10271 echo " (for example, in a dedicated directory) you should re-run"
10272 echo " configure with the --enable-subdir=DIR option. For more"
10273 echo " information, run $0 --help."
10277 if test "$warning" != no; then
10278 echo '' ; echo "$warnsep" ; echo ''