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 --with-hackdir=DIR Where to install the hundreds of demo executables.
19 Default: \`PREFIX/lib/xscreensaver/'
24 --with-configdir=DIR Where to install the data files that describe each
25 of the display modes to the GUI.
26 Default: \`GNOMEPREFIX/control-center/screensavers/'
27 or \`PREFIX/lib/xscreensaver/config/', depending on
28 whether GNOME is available.
31 Except where noted, all of the --with options below can also take a
32 directory argument: for example, \`--with-motif=/opt/Motif'. That would
33 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
34 to be added to the -L list, assuming those directories exist.
36 By default, support for each of these options will be built in, if the
37 relevant library routines exist. At run time, they will then be used
38 only if the X server being used supports them. Each --with option has
39 a corresponding --without option, to override building support for them
42 Screen blanking and idle-detection options:
44 --with-sgi-ext Include support for the SGI SCREEN_SAVER extension."
46 --with-mit-ext Include support for the MIT-SCREEN-SAVER extension."
48 --with-xidle-ext Include support for the XIDLE extension."
50 --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL extension."
52 --with-dpms-ext Include support for the DPMS extension."
54 --with-xinerama-ext Include support for the XINERAMA extension."
56 --with-xf86vmode-ext Include support for XFree86 virtual screens."
58 --with-xf86gamma-ext Include support for XFree86 gamma fading."
60 --with-proc-interrupts Include support for consulting the /proc/interrupts
61 file to notice keyboard activity."
64 Screen locking options:
66 --enable-locking Compile in support for locking the display.
67 --disable-locking Do not allow locking at all.
70 --with-pam Include support for PAM (Pluggable Auth Modules.)"
72 --with-kerberos Include support for Kerberos authentication."
74 --with-shadow Include support for shadow password authentication."
77 User interface options:
79 --with-motif Use the Motif toolkit for the user interface."
81 --with-gtk Use the Gtk toolkit for the user interface."
83 --with-gnome Include support for the Gnome Control Center."
85 --with-xml The XML toolkit is needed for some parts of
91 --with-gl Build those demos which depend on OpenGL."
93 --with-gle Build those demos which depend on GLE
94 (the OpenGL "extrusion" library.)"
96 --with-xpm Include support for XPM files in some demos."
98 --with-xshm-ext Include support for the XSHM extension."
100 --with-xdbe-ext Include support for the DOUBLE-BUFFER extension."
102 --with-readdisplay Include support for the XReadDisplay extension."
105 --with-fortune=PROGRAM Some demos are able to run an external program and
106 display its text; this names the program to use by
107 default (though it can be overridden with X
108 resources.) Default is \"/usr/games/fortune\"."
110 --with-setuid-hacks Allow some demos to be installed \`setuid root'
111 (which is needed in order to ping other hosts.)
114 # Initialize some variables set by options.
115 # The variables have the same names as the options, with
116 # dashes changed to underlines.
118 cache_file=./config.cache
127 program_transform_name=s,x,x,
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
148 # Initialize some other variables.
151 SHELL=${CONFIG_SHELL-/bin/sh}
152 # Maximum number of lines to put in a shell here document.
159 # If the previous option needs an argument, assign it.
160 if test -n "$ac_prev"; then
161 eval "$ac_prev=\$ac_option"
167 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
171 # Accept the important Cygnus configure options, so we can diagnose typos.
175 -bindir | --bindir | --bindi | --bind | --bin | --bi)
177 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
178 bindir="$ac_optarg" ;;
180 -build | --build | --buil | --bui | --bu)
182 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
183 build="$ac_optarg" ;;
185 -cache-file | --cache-file | --cache-fil | --cache-fi \
186 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
187 ac_prev=cache_file ;;
188 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
189 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
190 cache_file="$ac_optarg" ;;
192 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
194 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
196 datadir="$ac_optarg" ;;
198 -disable-* | --disable-*)
199 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
200 # Reject names that are not valid shell variable names.
201 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
202 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
204 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
205 eval "enable_${ac_feature}=no" ;;
207 -enable-* | --enable-*)
208 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
209 # Reject names that are not valid shell variable names.
210 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
211 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
213 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
218 eval "enable_${ac_feature}='$ac_optarg'" ;;
220 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
221 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
222 | --exec | --exe | --ex)
223 ac_prev=exec_prefix ;;
224 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
225 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
226 | --exec=* | --exe=* | --ex=*)
227 exec_prefix="$ac_optarg" ;;
229 -gas | --gas | --ga | --g)
230 # Obsolete; use --with-gas.
233 -help | --help | --hel | --he)
234 # Omit some internal or obsolete options to make the list less imposing.
235 # This message is too long to be a string in the A/UX 3.1 sh.
237 Usage: configure [options] [host]
238 Options: [defaults in brackets after descriptions]
242 --cache-file=FILE cache test results in FILE
243 --help print this message
244 --no-create do not create output files
245 --quiet, --silent do not print \`checking...' messages
246 --version print the version of autoconf that created configure
248 Directory and file names:
250 --prefix=PREFIX install architecture-independent files in PREFIX
252 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
254 --bindir=DIR user executables in DIR [EPREFIX/bin]
255 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
256 --includedir=DIR C header files in DIR [PREFIX/include]
257 --x-includes=DIR X include files are in DIR
258 --x-libraries=DIR X library files are in DIR
259 --mandir=DIR man documentation in DIR [PREFIX/man]
260 --srcdir=DIR find the sources in DIR [configure dir or ..]
261 --program-prefix=PREFIX prepend PREFIX to installed program names
262 --program-suffix=SUFFIX append SUFFIX to installed program names
263 --program-transform-name=PROGRAM
264 run sed PROGRAM on installed program names
270 --build=BUILD configure for building on BUILD [BUILD=HOST]
271 --host=HOST configure for HOST [guessed]
272 --target=TARGET configure for TARGET [TARGET=HOST]
274 if test -n "$ac_help"; then
279 -host | --host | --hos | --ho)
281 -host=* | --host=* | --hos=* | --ho=*)
284 -includedir | --includedir | --includedi | --included | --include \
285 | --includ | --inclu | --incl | --inc)
286 ac_prev=includedir ;;
287 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
288 | --includ=* | --inclu=* | --incl=* | --inc=*)
289 includedir="$ac_optarg" ;;
291 -infodir | --infodir | --infodi | --infod | --info | --inf)
293 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
294 infodir="$ac_optarg" ;;
296 -libdir | --libdir | --libdi | --libd)
298 -libdir=* | --libdir=* | --libdi=* | --libd=*)
299 libdir="$ac_optarg" ;;
301 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
302 | --libexe | --libex | --libe)
303 ac_prev=libexecdir ;;
304 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
305 | --libexe=* | --libex=* | --libe=*)
306 libexecdir="$ac_optarg" ;;
308 -localstatedir | --localstatedir | --localstatedi | --localstated \
309 | --localstate | --localstat | --localsta | --localst \
310 | --locals | --local | --loca | --loc | --lo)
311 ac_prev=localstatedir ;;
312 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
313 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
314 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
315 localstatedir="$ac_optarg" ;;
317 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
319 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
320 mandir="$ac_optarg" ;;
323 # Obsolete; use --without-fp.
326 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
331 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
334 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
335 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
336 | --oldin | --oldi | --old | --ol | --o)
337 ac_prev=oldincludedir ;;
338 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
339 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
340 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
341 oldincludedir="$ac_optarg" ;;
343 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
345 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
346 prefix="$ac_optarg" ;;
348 -program-prefix | --program-prefix | --program-prefi | --program-pref \
349 | --program-pre | --program-pr | --program-p)
350 ac_prev=program_prefix ;;
351 -program-prefix=* | --program-prefix=* | --program-prefi=* \
352 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
353 program_prefix="$ac_optarg" ;;
355 -program-suffix | --program-suffix | --program-suffi | --program-suff \
356 | --program-suf | --program-su | --program-s)
357 ac_prev=program_suffix ;;
358 -program-suffix=* | --program-suffix=* | --program-suffi=* \
359 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
360 program_suffix="$ac_optarg" ;;
362 -program-transform-name | --program-transform-name \
363 | --program-transform-nam | --program-transform-na \
364 | --program-transform-n | --program-transform- \
365 | --program-transform | --program-transfor \
366 | --program-transfo | --program-transf \
367 | --program-trans | --program-tran \
368 | --progr-tra | --program-tr | --program-t)
369 ac_prev=program_transform_name ;;
370 -program-transform-name=* | --program-transform-name=* \
371 | --program-transform-nam=* | --program-transform-na=* \
372 | --program-transform-n=* | --program-transform-=* \
373 | --program-transform=* | --program-transfor=* \
374 | --program-transfo=* | --program-transf=* \
375 | --program-trans=* | --program-tran=* \
376 | --progr-tra=* | --program-tr=* | --program-t=*)
377 program_transform_name="$ac_optarg" ;;
379 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
380 | -silent | --silent | --silen | --sile | --sil)
383 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
385 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
387 sbindir="$ac_optarg" ;;
389 -sharedstatedir | --sharedstatedir | --sharedstatedi \
390 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
391 | --sharedst | --shareds | --shared | --share | --shar \
393 ac_prev=sharedstatedir ;;
394 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
395 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
396 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
398 sharedstatedir="$ac_optarg" ;;
400 -site | --site | --sit)
402 -site=* | --site=* | --sit=*)
405 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
407 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
408 srcdir="$ac_optarg" ;;
410 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
411 | --syscon | --sysco | --sysc | --sys | --sy)
412 ac_prev=sysconfdir ;;
413 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
414 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
415 sysconfdir="$ac_optarg" ;;
417 -target | --target | --targe | --targ | --tar | --ta | --t)
419 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
420 target="$ac_optarg" ;;
422 -v | -verbose | --verbose | --verbos | --verbo | --verb)
425 -version | --version | --versio | --versi | --vers)
426 echo "configure generated by autoconf version 2.13"
430 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
431 # Reject names that are not valid shell variable names.
432 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
433 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
435 ac_package=`echo $ac_package| sed 's/-/_/g'`
440 eval "with_${ac_package}='$ac_optarg'" ;;
442 -without-* | --without-*)
443 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
444 # Reject names that are not valid shell variable names.
445 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
446 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
448 ac_package=`echo $ac_package| sed 's/-/_/g'`
449 eval "with_${ac_package}=no" ;;
452 # Obsolete; use --with-x.
455 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
456 | --x-incl | --x-inc | --x-in | --x-i)
457 ac_prev=x_includes ;;
458 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
459 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
460 x_includes="$ac_optarg" ;;
462 -x-libraries | --x-libraries | --x-librarie | --x-librari \
463 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
464 ac_prev=x_libraries ;;
465 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
466 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
467 x_libraries="$ac_optarg" ;;
469 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
473 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
474 echo "configure: warning: $ac_option: invalid host type" 1>&2
476 if test "x$nonopt" != xNONE; then
477 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
485 if test -n "$ac_prev"; then
486 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
489 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
491 # File descriptor usage:
494 # 2 errors and warnings
495 # 3 some systems may open it to /dev/tty
496 # 4 used on the Kubota Titan
497 # 6 checking for... messages and results
498 # 5 compiler messages saved in config.log
499 if test "$silent" = yes; then
507 This file contains any messages produced by compilers while
508 running configure, to aid debugging if configure makes a mistake.
511 # Strip out --no-create and --no-recursion so they do not pile up.
512 # Also quote any args containing shell metacharacters.
517 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
518 | --no-cr | --no-c) ;;
519 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
520 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
521 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
522 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
523 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
528 # Only set these to C if already set. These must not be set unconditionally
529 # because not all systems understand e.g. LANG=C (notably SCO).
530 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
531 # Non-C LC_CTYPE values break the ctype check.
532 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
533 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
534 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
535 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
537 # confdefs.h avoids OS command line length limits that DEFS can exceed.
538 rm -rf conftest* confdefs.h
539 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
542 # A filename unique to this package, relative to the directory that
543 # configure is in, which we can look for to find out if srcdir is correct.
544 ac_unique_file=driver/subprocs.c
546 # Find the source files, if location was not specified.
547 if test -z "$srcdir"; then
548 ac_srcdir_defaulted=yes
549 # Try the directory containing this script, then its parent.
551 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
552 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
554 if test ! -r $srcdir/$ac_unique_file; then
558 ac_srcdir_defaulted=no
560 if test ! -r $srcdir/$ac_unique_file; then
561 if test "$ac_srcdir_defaulted" = yes; then
562 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
564 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
567 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
569 # Prefer explicitly selected file to automatically selected ones.
570 if test -z "$CONFIG_SITE"; then
571 if test "x$prefix" != xNONE; then
572 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
574 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
577 for ac_site_file in $CONFIG_SITE; do
578 if test -r "$ac_site_file"; then
579 echo "loading site script $ac_site_file"
584 if test -r "$cache_file"; then
585 echo "loading cache $cache_file"
588 echo "creating cache $cache_file"
593 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
594 ac_cpp='$CPP $CPPFLAGS'
595 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
596 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
597 cross_compiling=$ac_cv_prog_cc_cross
601 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
602 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
603 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
610 ac_n= ac_c='\c' ac_t=
616 echo "current directory: `pwd`"
617 echo "command line was: $0 $@"
620 # After checking to see that --srcdir is correct (which AC_INIT does)
621 # check for some random other files that come later in the tar file,
622 # to make sure everything is here.
624 for d in driver utils hacks hacks/glx ; do
625 f=$srcdir/$d/Makefile.in
626 if test \! -r $f ; then
628 echo "ERROR: The package is incomplete: $f does not exist."
629 echo " This probably means that your download was truncated."
636 ###############################################################################
638 # Function to figure out how to run the compiler.
640 ###############################################################################
645 ###############################################################################
647 # Functions to figure out how to disable // comments in ANSI C code.
649 # (With recent gcc, this is done with "-std=c89". With older gcc, this
650 # is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
651 # gcc. Old gcc doesn't support -std, and new gcc doesn't support -lang.
652 # so much for compatibility!)
654 ###############################################################################
661 ###############################################################################
663 # Function to figure out how to create directory trees.
665 ###############################################################################
670 ###############################################################################
672 # Function to check whether gettimeofday() exists, and how to call it.
673 # This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
675 ###############################################################################
680 ###############################################################################
682 # Function to find perl5 (defines PERL and PERL_VERSION.)
684 ###############################################################################
686 # M4 sucks!! perl sucks too!!
688 perl_version_cmd='print $]'
694 ###############################################################################
696 # Function to demand "bc". Losers.
698 ###############################################################################
702 ###############################################################################
704 # Functions to check how to do ICMP PING requests.
706 ###############################################################################
713 ###############################################################################
715 # Functions to check for various X11 crap.
717 ###############################################################################
719 # Try and find the app-defaults directory.
720 # It sucks that autoconf doesn't do this already...
732 # Random special-cases for X on certain pathological OSes.
733 # You know who you are.
739 ###############################################################################
741 # Some utility functions to make checking for X things easier.
743 ###############################################################################
745 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
749 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
753 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
758 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
759 # Use this sparingly; it probably doesn't work very well on X programs.
763 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
764 # (But not the -L directories!)
770 # Usage: HANDLE_X_PATH_ARG([variable_name],
771 # [--command-line-option],
772 # [descriptive string])
774 # All of the --with options take three forms:
776 # --with-foo (or --with-foo=yes)
777 # --without-foo (or --with-foo=no)
780 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
781 # a directory (string beginning with a slash) it checks to see whether
782 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
789 ###############################################################################
790 ###############################################################################
792 # End of function definitions. Now start actually executing stuff.
794 ###############################################################################
795 ###############################################################################
797 # random compiler setup
799 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
800 if test -f $ac_dir/install-sh; then
802 ac_install_sh="$ac_aux_dir/install-sh -c"
804 elif test -f $ac_dir/install.sh; then
806 ac_install_sh="$ac_aux_dir/install.sh -c"
810 if test -z "$ac_aux_dir"; then
811 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
813 ac_config_guess=$ac_aux_dir/config.guess
814 ac_config_sub=$ac_aux_dir/config.sub
815 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
818 # Make sure we can run config.sub.
819 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
820 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
823 echo $ac_n "checking host system type""... $ac_c" 1>&6
824 echo "configure:836: checking host system type" >&5
827 case "$host_alias" in
831 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
832 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
834 *) host_alias=$nonopt ;;
838 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
839 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
840 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
841 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
842 echo "$ac_t""$host" 1>&6
844 # Extract the first word of "gcc", so it can be a program name with args.
845 set dummy gcc; ac_word=$2
846 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
847 echo "configure:859: checking for $ac_word" >&5
848 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
849 echo $ac_n "(cached) $ac_c" 1>&6
851 if test -n "$CC"; then
852 ac_cv_prog_CC="$CC" # Let the user override the test.
854 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
856 for ac_dir in $ac_dummy; do
857 test -z "$ac_dir" && ac_dir=.
858 if test -f $ac_dir/$ac_word; then
867 if test -n "$CC"; then
868 echo "$ac_t""$CC" 1>&6
870 echo "$ac_t""no" 1>&6
873 if test -z "$CC"; then
874 # Extract the first word of "cc", so it can be a program name with args.
875 set dummy cc; ac_word=$2
876 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
877 echo "configure:889: checking for $ac_word" >&5
878 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
879 echo $ac_n "(cached) $ac_c" 1>&6
881 if test -n "$CC"; then
882 ac_cv_prog_CC="$CC" # Let the user override the test.
884 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
887 for ac_dir in $ac_dummy; do
888 test -z "$ac_dir" && ac_dir=.
889 if test -f $ac_dir/$ac_word; then
890 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
899 if test $ac_prog_rejected = yes; then
900 # We found a bogon in the path, so make sure we never use it.
901 set dummy $ac_cv_prog_CC
903 if test $# -gt 0; then
904 # We chose a different compiler from the bogus one.
905 # However, it has the same basename, so the bogon will be chosen
906 # first if we set CC to just the basename; use the full file name.
908 set dummy "$ac_dir/$ac_word" "$@"
916 if test -n "$CC"; then
917 echo "$ac_t""$CC" 1>&6
919 echo "$ac_t""no" 1>&6
922 if test -z "$CC"; then
925 # Extract the first word of "cl", so it can be a program name with args.
926 set dummy cl; ac_word=$2
927 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
928 echo "configure:940: checking for $ac_word" >&5
929 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
930 echo $ac_n "(cached) $ac_c" 1>&6
932 if test -n "$CC"; then
933 ac_cv_prog_CC="$CC" # Let the user override the test.
935 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
937 for ac_dir in $ac_dummy; do
938 test -z "$ac_dir" && ac_dir=.
939 if test -f $ac_dir/$ac_word; then
948 if test -n "$CC"; then
949 echo "$ac_t""$CC" 1>&6
951 echo "$ac_t""no" 1>&6
956 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
959 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
960 echo "configure:972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
963 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
964 ac_cpp='$CPP $CPPFLAGS'
965 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
966 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
967 cross_compiling=$ac_cv_prog_cc_cross
969 cat > conftest.$ac_ext << EOF
971 #line 983 "configure"
972 #include "confdefs.h"
976 if { (eval echo configure:988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
977 ac_cv_prog_cc_works=yes
978 # If we can't run a trivial program, we are probably using a cross compiler.
979 if (./conftest; exit) 2>/dev/null; then
980 ac_cv_prog_cc_cross=no
982 ac_cv_prog_cc_cross=yes
985 echo "configure: failed program was:" >&5
986 cat conftest.$ac_ext >&5
987 ac_cv_prog_cc_works=no
991 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
992 ac_cpp='$CPP $CPPFLAGS'
993 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
994 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
995 cross_compiling=$ac_cv_prog_cc_cross
997 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
998 if test $ac_cv_prog_cc_works = no; then
999 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1001 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1002 echo "configure:1014: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1003 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1004 cross_compiling=$ac_cv_prog_cc_cross
1006 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1007 echo "configure:1019: checking whether we are using GNU C" >&5
1008 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1009 echo $ac_n "(cached) $ac_c" 1>&6
1011 cat > conftest.c <<EOF
1016 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1023 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1025 if test $ac_cv_prog_gcc = yes; then
1031 ac_test_CFLAGS="${CFLAGS+set}"
1032 ac_save_CFLAGS="$CFLAGS"
1034 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1035 echo "configure:1047: checking whether ${CC-cc} accepts -g" >&5
1036 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1037 echo $ac_n "(cached) $ac_c" 1>&6
1039 echo 'void f(){}' > conftest.c
1040 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1049 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1050 if test "$ac_test_CFLAGS" = set; then
1051 CFLAGS="$ac_save_CFLAGS"
1052 elif test $ac_cv_prog_cc_g = yes; then
1053 if test "$GCC" = yes; then
1059 if test "$GCC" = yes; then
1067 if test -z "$GCC"; then
1068 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
1069 echo "configure:1081: checking how to request ANSI compilation" >&5
1072 echo "$ac_t""HPUX: adding -Ae" 1>&6
1076 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
1077 CC="$CC -qlanglvl=ansi -qhalt=e"
1081 echo "$ac_t""DEC: adding -std1 -ieee" 1>&6
1086 echo "$ac_t""no idea" 1>&6
1091 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
1092 echo "configure:1104: checking whether the compiler works on ANSI C" >&5
1093 if test "$cross_compiling" = yes; then
1094 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1096 cat > conftest.$ac_ext <<EOF
1097 #line 1109 "configure"
1098 #include "confdefs.h"
1099 main(int ac, char **av) { return 0; }
1101 if { (eval echo configure:1113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1103 echo "$ac_t""yes" 1>&6
1105 echo "configure: failed program was:" >&5
1106 cat conftest.$ac_ext >&5
1108 echo "$ac_t""no" 1>&6
1109 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1115 if test -n "$GCC"; then
1116 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
1117 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
1120 *-irix5* |*-irix6.0-3* )
1121 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1122 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1125 # if test -z "$GCC"; then
1126 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1127 # CC="$CC -migrate -w0 -verbose -warnprotos"
1133 if test -n "$GCC"; then
1134 if test -n "$GCC"; then
1135 echo $ac_n "checking whether gcc accepts -std""... $ac_c" 1>&6
1136 echo "configure:1148: checking whether gcc accepts -std" >&5
1137 if eval "test \"`echo '$''{'ac_cv_gcc_accepts_std'+set}'`\" = set"; then
1138 echo $ac_n "(cached) $ac_c" 1>&6
1140 if ( gcc -E -std=c89 - </dev/null 2>&1 >/dev/null | \
1141 grep unrecognized >/dev/null ); then
1142 ac_cv_gcc_accepts_std=no
1144 ac_cv_gcc_accepts_std=yes
1148 echo "$ac_t""$ac_cv_gcc_accepts_std" 1>&6
1149 ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
1152 echo "$ac_t""Disabling C++ comments in ANSI C code." 1>&6
1154 # The reason that // comments are banned from xscreensaver is that gcc is
1155 # basically the only compiler in the world that supports them in C code.
1156 # All other vendors support them only in their C++ compilers, not in their
1157 # ANSI C compilers. This means that it's a portability problem: every time
1158 # these comments have snuck into the xscreensaver source code, I've gotten
1159 # complaints about it the next day. So we turn off support for them in gcc
1160 # as well to prevent them from accidentially slipping in.
1162 if test "$ac_gcc_accepts_std" = yes ; then
1164 # -std=c89 defines __STRICT_ANSI__, which we don't want.
1165 # (That appears to be the only additional preprocessor symbol
1166 # it defines, in addition to the syntax changes it makes.)
1168 # -std=gnu89 is no good, because // comments were a GNU extension
1169 # before they were in the ANSI C 99 spec... (gcc 2.96 permits //
1170 # with -std=gnu89 but not with -std=c89.)
1172 CC="$CC -std=c89 -U__STRICT_ANSI__"
1175 CC="$CC -Wp,-lang-c89"
1179 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1180 echo "configure:1192: checking how to run the C preprocessor" >&5
1181 # On Suns, sometimes $CPP names a directory.
1182 if test -n "$CPP" && test -d "$CPP"; then
1185 if test -z "$CPP"; then
1186 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1187 echo $ac_n "(cached) $ac_c" 1>&6
1189 # This must be in double quotes, not single quotes, because CPP may get
1190 # substituted into the Makefile and "${CC-cc}" will confuse make.
1192 # On the NeXT, cc -E runs the code through the compiler's parser,
1193 # not just through cpp.
1194 cat > conftest.$ac_ext <<EOF
1195 #line 1207 "configure"
1196 #include "confdefs.h"
1200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1201 { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1203 if test -z "$ac_err"; then
1207 echo "configure: failed program was:" >&5
1208 cat conftest.$ac_ext >&5
1210 CPP="${CC-cc} -E -traditional-cpp"
1211 cat > conftest.$ac_ext <<EOF
1212 #line 1224 "configure"
1213 #include "confdefs.h"
1217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1218 { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1220 if test -z "$ac_err"; then
1224 echo "configure: failed program was:" >&5
1225 cat conftest.$ac_ext >&5
1227 CPP="${CC-cc} -nologo -E"
1228 cat > conftest.$ac_ext <<EOF
1229 #line 1241 "configure"
1230 #include "confdefs.h"
1234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1235 { (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1237 if test -z "$ac_err"; then
1241 echo "configure: failed program was:" >&5
1242 cat conftest.$ac_ext >&5
1251 ac_cv_prog_CPP="$CPP"
1253 CPP="$ac_cv_prog_CPP"
1255 ac_cv_prog_CPP="$CPP"
1257 echo "$ac_t""$CPP" 1>&6
1259 echo $ac_n "checking for working const""... $ac_c" 1>&6
1260 echo "configure:1272: checking for working const" >&5
1261 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1262 echo $ac_n "(cached) $ac_c" 1>&6
1264 cat > conftest.$ac_ext <<EOF
1265 #line 1277 "configure"
1266 #include "confdefs.h"
1270 /* Ultrix mips cc rejects this. */
1271 typedef int charset[2]; const charset x;
1272 /* SunOS 4.1.1 cc rejects this. */
1273 char const *const *ccp;
1275 /* NEC SVR4.0.2 mips cc rejects this. */
1276 struct point {int x, y;};
1277 static struct point const zero = {0,0};
1278 /* AIX XL C 1.02.0.0 rejects this.
1279 It does not let you subtract one const X* pointer from another in an arm
1280 of an if-expression whose if-part is not a constant expression */
1281 const char *g = "string";
1282 ccp = &g + (g ? g-g : 0);
1283 /* HPUX 7.0 cc rejects these. */
1286 ccp = (char const *const *) p;
1287 { /* SCO 3.2v4 cc rejects this. */
1289 char const *s = 0 ? (char *) 0 : (char const *) 0;
1293 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1295 const int *foo = &x[0];
1298 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1299 typedef const int *iptr;
1303 { /* AIX XL C 1.02.0.0 rejects this saying
1304 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1305 struct s { int j; const int *ap[3]; };
1306 struct s *b; b->j = 5;
1308 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1314 if { (eval echo configure:1326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1318 echo "configure: failed program was:" >&5
1319 cat conftest.$ac_ext >&5
1326 echo "$ac_t""$ac_cv_c_const" 1>&6
1327 if test $ac_cv_c_const = no; then
1328 cat >> confdefs.h <<\EOF
1334 echo $ac_n "checking for inline""... $ac_c" 1>&6
1335 echo "configure:1347: checking for inline" >&5
1336 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1337 echo $ac_n "(cached) $ac_c" 1>&6
1340 for ac_kw in inline __inline__ __inline; do
1341 cat > conftest.$ac_ext <<EOF
1342 #line 1354 "configure"
1343 #include "confdefs.h"
1349 if { (eval echo configure:1361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1351 ac_cv_c_inline=$ac_kw; break
1353 echo "configure: failed program was:" >&5
1354 cat conftest.$ac_ext >&5
1361 echo "$ac_t""$ac_cv_c_inline" 1>&6
1362 case "$ac_cv_c_inline" in
1364 no) cat >> confdefs.h <<\EOF
1368 *) cat >> confdefs.h <<EOF
1369 #define inline $ac_cv_c_inline
1374 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
1375 echo $ac_n "checking for bc""... $ac_c" 1>&6
1376 echo "configure:1388: checking for bc" >&5
1377 if test "$ac_bc_result" = "15" ; then
1378 echo "$ac_t""yes" 1>&6
1380 echo "$ac_t""no" 1>&6
1382 { echo "configure: error: Your system doesn't have \"bc\", which has been a standard
1383 part of Unix since the 1970s. Come back when your vendor
1384 has grown a clue." 1>&2; exit 1; }
1388 # stuff for Makefiles
1389 # Find a good install program. We prefer a C program (faster),
1390 # so one script is as good as another. But avoid the broken or
1391 # incompatible versions:
1392 # SysV /etc/install, /usr/sbin/install
1393 # SunOS /usr/etc/install
1394 # IRIX /sbin/install
1396 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1397 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1398 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1399 # ./install, which can be erroneously created by make from ./install.sh.
1400 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1401 echo "configure:1413: checking for a BSD compatible install" >&5
1402 if test -z "$INSTALL"; then
1403 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1404 echo $ac_n "(cached) $ac_c" 1>&6
1406 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1407 for ac_dir in $PATH; do
1408 # Account for people who put trailing slashes in PATH elements.
1410 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1412 # OSF1 and SCO ODT 3.0 have their own names for install.
1413 # Don't use installbsd from OSF since it installs stuff as root
1415 for ac_prog in ginstall scoinst install; do
1416 if test -f $ac_dir/$ac_prog; then
1417 if test $ac_prog = install &&
1418 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1419 # AIX install. It has an incompatible calling convention.
1422 ac_cv_path_install="$ac_dir/$ac_prog -c"
1433 if test "${ac_cv_path_install+set}" = set; then
1434 INSTALL="$ac_cv_path_install"
1436 # As a last resort, use the slow shell script. We don't cache a
1437 # path for INSTALL within a source directory, because that will
1438 # break other packages using the cache if that directory is
1439 # removed, or if the path is relative.
1440 INSTALL="$ac_install_sh"
1443 echo "$ac_t""$INSTALL" 1>&6
1445 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1446 # It thinks the first close brace ends the variable substitution.
1447 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1449 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1451 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1453 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1454 echo "configure:1466: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1455 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1456 echo $ac_n "(cached) $ac_c" 1>&6
1458 ac_cv_install_d_creates_dirs=no
1460 if mkdir conftestdir; then
1462 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1463 if test -d dir1/dir2/. ; then
1464 ac_cv_install_d_creates_dirs=yes
1472 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1474 if test "$ac_cv_install_d_creates_dirs" = no ; then
1475 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1476 echo "configure:1488: checking whether \"mkdir -p\" creates intermediate directories" >&5
1477 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1478 echo $ac_n "(cached) $ac_c" 1>&6
1480 ac_cv_mkdir_p_creates_dirs=no
1482 if mkdir conftestdir; then
1484 mkdir -p dir1/dir2 >&- 2>&-
1485 if test -d dir1/dir2/. ; then
1486 ac_cv_mkdir_p_creates_dirs=yes
1494 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1497 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1498 INSTALL_DIRS='${INSTALL} -d'
1499 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1500 INSTALL_DIRS='mkdir -p'
1503 INSTALL_DIRS='${INSTALL} -d'
1506 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1507 echo "configure:1519: checking whether ${MAKE-make} sets \${MAKE}" >&5
1508 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1509 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1510 echo $ac_n "(cached) $ac_c" 1>&6
1512 cat > conftestmake <<\EOF
1514 @echo 'ac_maketemp="${MAKE}"'
1516 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1517 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1518 if test -n "$ac_maketemp"; then
1519 eval ac_cv_prog_make_${ac_make}_set=yes
1521 eval ac_cv_prog_make_${ac_make}_set=no
1525 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1526 echo "$ac_t""yes" 1>&6
1529 echo "$ac_t""no" 1>&6
1530 SET_MAKE="MAKE=${MAKE-make}"
1534 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
1535 # That's wrong: it should be set to '${INSTALL}', so that one can
1536 # implement the "install-strip" target properly (strip executables,
1537 # but do not try to strip scripts.)
1539 INSTALL_SCRIPT='${INSTALL}'
1542 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1543 echo "configure:1555: checking for ANSI C header files" >&5
1544 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1545 echo $ac_n "(cached) $ac_c" 1>&6
1547 cat > conftest.$ac_ext <<EOF
1548 #line 1560 "configure"
1549 #include "confdefs.h"
1555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1556 { (eval echo configure:1568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1558 if test -z "$ac_err"; then
1560 ac_cv_header_stdc=yes
1563 echo "configure: failed program was:" >&5
1564 cat conftest.$ac_ext >&5
1566 ac_cv_header_stdc=no
1570 if test $ac_cv_header_stdc = yes; then
1571 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1572 cat > conftest.$ac_ext <<EOF
1573 #line 1585 "configure"
1574 #include "confdefs.h"
1577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1578 egrep "memchr" >/dev/null 2>&1; then
1582 ac_cv_header_stdc=no
1588 if test $ac_cv_header_stdc = yes; then
1589 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1590 cat > conftest.$ac_ext <<EOF
1591 #line 1603 "configure"
1592 #include "confdefs.h"
1595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1596 egrep "free" >/dev/null 2>&1; then
1600 ac_cv_header_stdc=no
1606 if test $ac_cv_header_stdc = yes; then
1607 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1608 if test "$cross_compiling" = yes; then
1611 cat > conftest.$ac_ext <<EOF
1612 #line 1624 "configure"
1613 #include "confdefs.h"
1615 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1616 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1617 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1618 int main () { int i; for (i = 0; i < 256; i++)
1619 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1623 if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1627 echo "configure: failed program was:" >&5
1628 cat conftest.$ac_ext >&5
1630 ac_cv_header_stdc=no
1638 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1639 if test $ac_cv_header_stdc = yes; then
1640 cat >> confdefs.h <<\EOF
1641 #define STDC_HEADERS 1
1646 for ac_hdr in unistd.h
1648 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1649 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1650 echo "configure:1662: checking for $ac_hdr" >&5
1651 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1652 echo $ac_n "(cached) $ac_c" 1>&6
1654 cat > conftest.$ac_ext <<EOF
1655 #line 1667 "configure"
1656 #include "confdefs.h"
1659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1660 { (eval echo configure:1672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1662 if test -z "$ac_err"; then
1664 eval "ac_cv_header_$ac_safe=yes"
1667 echo "configure: failed program was:" >&5
1668 cat conftest.$ac_ext >&5
1670 eval "ac_cv_header_$ac_safe=no"
1674 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1675 echo "$ac_t""yes" 1>&6
1676 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1677 cat >> confdefs.h <<EOF
1678 #define $ac_tr_hdr 1
1682 echo "$ac_t""no" 1>&6
1686 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1687 echo "configure:1699: checking for mode_t" >&5
1688 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1689 echo $ac_n "(cached) $ac_c" 1>&6
1691 cat > conftest.$ac_ext <<EOF
1692 #line 1704 "configure"
1693 #include "confdefs.h"
1694 #include <sys/types.h>
1700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1701 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1703 ac_cv_type_mode_t=yes
1706 ac_cv_type_mode_t=no
1711 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1712 if test $ac_cv_type_mode_t = no; then
1713 cat >> confdefs.h <<\EOF
1719 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1720 echo "configure:1732: checking for pid_t" >&5
1721 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1722 echo $ac_n "(cached) $ac_c" 1>&6
1724 cat > conftest.$ac_ext <<EOF
1725 #line 1737 "configure"
1726 #include "confdefs.h"
1727 #include <sys/types.h>
1733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1734 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1736 ac_cv_type_pid_t=yes
1744 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1745 if test $ac_cv_type_pid_t = no; then
1746 cat >> confdefs.h <<\EOF
1752 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1753 echo "configure:1765: checking for size_t" >&5
1754 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1755 echo $ac_n "(cached) $ac_c" 1>&6
1757 cat > conftest.$ac_ext <<EOF
1758 #line 1770 "configure"
1759 #include "confdefs.h"
1760 #include <sys/types.h>
1766 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1767 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1769 ac_cv_type_size_t=yes
1772 ac_cv_type_size_t=no
1777 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1778 if test $ac_cv_type_size_t = no; then
1779 cat >> confdefs.h <<\EOF
1780 #define size_t unsigned
1785 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1786 echo "configure:1798: checking return type of signal handlers" >&5
1787 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1788 echo $ac_n "(cached) $ac_c" 1>&6
1790 cat > conftest.$ac_ext <<EOF
1791 #line 1803 "configure"
1792 #include "confdefs.h"
1793 #include <sys/types.h>
1799 extern "C" void (*signal (int, void (*)(int)))(int);
1801 void (*signal ()) ();
1808 if { (eval echo configure:1820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1810 ac_cv_type_signal=void
1812 echo "configure: failed program was:" >&5
1813 cat conftest.$ac_ext >&5
1815 ac_cv_type_signal=int
1820 echo "$ac_t""$ac_cv_type_signal" 1>&6
1821 cat >> confdefs.h <<EOF
1822 #define RETSIGTYPE $ac_cv_type_signal
1826 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1827 echo "configure:1839: checking whether time.h and sys/time.h may both be included" >&5
1828 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1829 echo $ac_n "(cached) $ac_c" 1>&6
1831 cat > conftest.$ac_ext <<EOF
1832 #line 1844 "configure"
1833 #include "confdefs.h"
1834 #include <sys/types.h>
1835 #include <sys/time.h>
1841 if { (eval echo configure:1853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1843 ac_cv_header_time=yes
1845 echo "configure: failed program was:" >&5
1846 cat conftest.$ac_ext >&5
1848 ac_cv_header_time=no
1853 echo "$ac_t""$ac_cv_header_time" 1>&6
1854 if test $ac_cv_header_time = yes; then
1855 cat >> confdefs.h <<\EOF
1856 #define TIME_WITH_SYS_TIME 1
1861 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1862 echo "configure:1874: checking for sys/wait.h that is POSIX.1 compatible" >&5
1863 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1864 echo $ac_n "(cached) $ac_c" 1>&6
1866 cat > conftest.$ac_ext <<EOF
1867 #line 1879 "configure"
1868 #include "confdefs.h"
1869 #include <sys/types.h>
1870 #include <sys/wait.h>
1872 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1875 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1880 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1883 if { (eval echo configure:1895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1885 ac_cv_header_sys_wait_h=yes
1887 echo "configure: failed program was:" >&5
1888 cat conftest.$ac_ext >&5
1890 ac_cv_header_sys_wait_h=no
1895 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1896 if test $ac_cv_header_sys_wait_h = yes; then
1897 cat >> confdefs.h <<\EOF
1898 #define HAVE_SYS_WAIT_H 1
1904 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1906 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1907 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1908 echo "configure:1920: checking for $ac_hdr that defines DIR" >&5
1909 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1910 echo $ac_n "(cached) $ac_c" 1>&6
1912 cat > conftest.$ac_ext <<EOF
1913 #line 1925 "configure"
1914 #include "confdefs.h"
1915 #include <sys/types.h>
1921 if { (eval echo configure:1933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1923 eval "ac_cv_header_dirent_$ac_safe=yes"
1925 echo "configure: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1928 eval "ac_cv_header_dirent_$ac_safe=no"
1932 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1933 echo "$ac_t""yes" 1>&6
1934 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1935 cat >> confdefs.h <<EOF
1936 #define $ac_tr_hdr 1
1938 ac_header_dirent=$ac_hdr; break
1940 echo "$ac_t""no" 1>&6
1943 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1944 if test $ac_header_dirent = dirent.h; then
1945 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1946 echo "configure:1958: checking for opendir in -ldir" >&5
1947 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1948 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1949 echo $ac_n "(cached) $ac_c" 1>&6
1951 ac_save_LIBS="$LIBS"
1953 cat > conftest.$ac_ext <<EOF
1954 #line 1966 "configure"
1955 #include "confdefs.h"
1956 /* Override any gcc2 internal prototype to avoid an error. */
1957 /* We use char because int might match the return type of a gcc2
1958 builtin and then its argument prototype would still apply. */
1965 if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1967 eval "ac_cv_lib_$ac_lib_var=yes"
1969 echo "configure: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1972 eval "ac_cv_lib_$ac_lib_var=no"
1975 LIBS="$ac_save_LIBS"
1978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1979 echo "$ac_t""yes" 1>&6
1982 echo "$ac_t""no" 1>&6
1986 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1987 echo "configure:1999: checking for opendir in -lx" >&5
1988 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1989 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1990 echo $ac_n "(cached) $ac_c" 1>&6
1992 ac_save_LIBS="$LIBS"
1994 cat > conftest.$ac_ext <<EOF
1995 #line 2007 "configure"
1996 #include "confdefs.h"
1997 /* Override any gcc2 internal prototype to avoid an error. */
1998 /* We use char because int might match the return type of a gcc2
1999 builtin and then its argument prototype would still apply. */
2006 if { (eval echo configure:2018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2008 eval "ac_cv_lib_$ac_lib_var=yes"
2010 echo "configure: failed program was:" >&5
2011 cat conftest.$ac_ext >&5
2013 eval "ac_cv_lib_$ac_lib_var=no"
2016 LIBS="$ac_save_LIBS"
2019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2020 echo "$ac_t""yes" 1>&6
2023 echo "$ac_t""no" 1>&6
2028 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
2029 echo "configure:2041: checking how to call gettimeofday" >&5
2030 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
2031 echo $ac_n "(cached) $ac_c" 1>&6
2033 cat > conftest.$ac_ext <<EOF
2034 #line 2046 "configure"
2035 #include "confdefs.h"
2037 #include <sys/time.h>
2039 struct timeval tv; struct timezone tzp;
2040 gettimeofday(&tv, &tzp);
2043 if { (eval echo configure:2055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2045 ac_gettimeofday_args=2
2047 echo "configure: failed program was:" >&5
2048 cat conftest.$ac_ext >&5
2050 cat > conftest.$ac_ext <<EOF
2051 #line 2063 "configure"
2052 #include "confdefs.h"
2054 #include <sys/time.h>
2056 struct timeval tv; gettimeofday(&tv);
2059 if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2061 ac_gettimeofday_args=1
2063 echo "configure: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2066 ac_gettimeofday_args=0
2071 ac_cv_gettimeofday_args=$ac_gettimeofday_args
2074 ac_gettimeofday_args=$ac_cv_gettimeofday_args
2075 if test "$ac_gettimeofday_args" = 1 ; then
2076 cat >> confdefs.h <<\EOF
2077 #define HAVE_GETTIMEOFDAY 1
2080 echo "$ac_t""one argument" 1>&6
2081 elif test "$ac_gettimeofday_args" = 2 ; then
2082 cat >> confdefs.h <<\EOF
2083 #define HAVE_GETTIMEOFDAY 1
2086 cat >> confdefs.h <<\EOF
2087 #define GETTIMEOFDAY_TWO_ARGS 1
2090 echo "$ac_t""two arguments" 1>&6
2092 echo "$ac_t""unknown" 1>&6
2095 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
2097 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2098 echo "configure:2110: checking for $ac_func" >&5
2099 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2100 echo $ac_n "(cached) $ac_c" 1>&6
2102 cat > conftest.$ac_ext <<EOF
2103 #line 2115 "configure"
2104 #include "confdefs.h"
2105 /* System header to define __stub macros and hopefully few prototypes,
2106 which can conflict with char $ac_func(); below. */
2108 /* Override any gcc2 internal prototype to avoid an error. */
2109 /* We use char because int might match the return type of a gcc2
2110 builtin and then its argument prototype would still apply. */
2115 /* The GNU C library defines this for functions which it implements
2116 to always fail with ENOSYS. Some functions are actually named
2117 something starting with __ and the normal name is an alias. */
2118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2126 if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2128 eval "ac_cv_func_$ac_func=yes"
2130 echo "configure: failed program was:" >&5
2131 cat conftest.$ac_ext >&5
2133 eval "ac_cv_func_$ac_func=no"
2138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2139 echo "$ac_t""yes" 1>&6
2140 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2141 cat >> confdefs.h <<EOF
2142 #define $ac_tr_func 1
2146 echo "$ac_t""no" 1>&6
2151 for ac_func in sigaction syslog realpath setrlimit
2153 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2154 echo "configure:2166: checking for $ac_func" >&5
2155 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2156 echo $ac_n "(cached) $ac_c" 1>&6
2158 cat > conftest.$ac_ext <<EOF
2159 #line 2171 "configure"
2160 #include "confdefs.h"
2161 /* System header to define __stub macros and hopefully few prototypes,
2162 which can conflict with char $ac_func(); below. */
2164 /* Override any gcc2 internal prototype to avoid an error. */
2165 /* We use char because int might match the return type of a gcc2
2166 builtin and then its argument prototype would still apply. */
2171 /* The GNU C library defines this for functions which it implements
2172 to always fail with ENOSYS. Some functions are actually named
2173 something starting with __ and the normal name is an alias. */
2174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2182 if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2184 eval "ac_cv_func_$ac_func=yes"
2186 echo "configure: failed program was:" >&5
2187 cat conftest.$ac_ext >&5
2189 eval "ac_cv_func_$ac_func=no"
2194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2195 echo "$ac_t""yes" 1>&6
2196 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2197 cat >> confdefs.h <<EOF
2198 #define $ac_tr_func 1
2202 echo "$ac_t""no" 1>&6
2206 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2207 echo "configure:2219: checking for struct icmp" >&5
2208 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2209 echo $ac_n "(cached) $ac_c" 1>&6
2211 cat > conftest.$ac_ext <<EOF
2212 #line 2224 "configure"
2213 #include "confdefs.h"
2221 #include <sys/types.h>
2222 #include <sys/time.h>
2223 #include <sys/ipc.h>
2224 #include <sys/shm.h>
2225 #include <sys/socket.h>
2226 #include <netinet/in_systm.h>
2227 #include <netinet/in.h>
2228 #include <netinet/ip.h>
2229 #include <netinet/ip_icmp.h>
2230 #include <netinet/udp.h>
2231 #include <arpa/inet.h>
2236 struct sockaddr_in si;
2238 i.icmp_type = ICMP_ECHO;
2243 si.sin_family = AF_INET;
2244 #if defined(__DECC) || defined(_IP_VHL)
2252 if { (eval echo configure:2264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2256 echo "configure: failed program was:" >&5
2257 cat conftest.$ac_ext >&5
2264 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2265 if test "$ac_cv_have_icmp" = yes ; then
2266 cat >> confdefs.h <<\EOF
2271 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2272 echo "configure:2284: checking for struct icmphdr" >&5
2273 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2274 echo $ac_n "(cached) $ac_c" 1>&6
2276 cat > conftest.$ac_ext <<EOF
2277 #line 2289 "configure"
2278 #include "confdefs.h"
2286 #include <sys/types.h>
2287 #include <sys/time.h>
2288 #include <sys/ipc.h>
2289 #include <sys/shm.h>
2290 #include <sys/socket.h>
2291 #include <netinet/in_systm.h>
2292 #include <netinet/in.h>
2293 #include <netinet/ip.h>
2294 #include <netinet/ip_icmp.h>
2295 #include <netinet/udp.h>
2296 #include <arpa/inet.h>
2301 struct sockaddr_in si;
2307 i.un.echo.sequence = 0;
2308 si.sin_family = AF_INET;
2312 if { (eval echo configure:2324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2314 ac_cv_have_icmphdr=yes
2316 echo "configure: failed program was:" >&5
2317 cat conftest.$ac_ext >&5
2319 ac_cv_have_icmphdr=no
2324 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2325 if test "$ac_cv_have_icmphdr" = yes ; then
2326 cat >> confdefs.h <<\EOF
2327 #define HAVE_ICMPHDR 1
2331 for ac_hdr in crypt.h sys/select.h
2333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2335 echo "configure:2347: checking for $ac_hdr" >&5
2336 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
2339 cat > conftest.$ac_ext <<EOF
2340 #line 2352 "configure"
2341 #include "confdefs.h"
2344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2345 { (eval echo configure:2357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2347 if test -z "$ac_err"; then
2349 eval "ac_cv_header_$ac_safe=yes"
2352 echo "configure: failed program was:" >&5
2353 cat conftest.$ac_ext >&5
2355 eval "ac_cv_header_$ac_safe=no"
2359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2360 echo "$ac_t""yes" 1>&6
2361 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2362 cat >> confdefs.h <<EOF
2363 #define $ac_tr_hdr 1
2367 echo "$ac_t""no" 1>&6
2371 for ac_prog in perl5 perl
2373 # Extract the first word of "$ac_prog", so it can be a program name with args.
2374 set dummy $ac_prog; ac_word=$2
2375 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2376 echo "configure:2388: checking for $ac_word" >&5
2377 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2378 echo $ac_n "(cached) $ac_c" 1>&6
2382 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2385 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2388 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2390 for ac_dir in $ac_dummy; do
2391 test -z "$ac_dir" && ac_dir=.
2392 if test -f $ac_dir/$ac_word; then
2393 ac_cv_path_PERL="$ac_dir/$ac_word"
2401 PERL="$ac_cv_path_PERL"
2402 if test -n "$PERL"; then
2403 echo "$ac_t""$PERL" 1>&6
2405 echo "$ac_t""no" 1>&6
2408 test -n "$PERL" && break
2411 if test -z "$PERL" ; then
2414 echo $ac_n "checking perl version""... $ac_c" 1>&6
2415 echo "configure:2427: checking perl version" >&5
2416 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2417 echo $ac_n "(cached) $ac_c" 1>&6
2419 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2422 echo "$ac_t""$ac_cv_perl_version" 1>&6
2423 PERL_VERSION=$ac_cv_perl_version
2427 if test -z "$PERL" ; then
2428 # don't let it be blank...
2432 # If we find X, set shell vars x_includes and x_libraries to the
2433 # paths, otherwise set no_x=yes.
2434 # Uses ac_ vars as temps to allow command line to override cache and checks.
2435 # --without-x overrides everything else, but does not touch the cache.
2436 echo $ac_n "checking for X""... $ac_c" 1>&6
2437 echo "configure:2449: checking for X" >&5
2439 # Check whether --with-x or --without-x was given.
2440 if test "${with_x+set}" = set; then
2445 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2446 if test "x$with_x" = xno; then
2447 # The user explicitly disabled X.
2450 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2451 # Both variables are already set.
2454 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2455 echo $ac_n "(cached) $ac_c" 1>&6
2457 # One or both of the vars are not set, and there is no cached value.
2458 ac_x_includes=NO ac_x_libraries=NO
2460 if mkdir conftestdir; then
2462 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2463 cat > Imakefile <<'EOF'
2465 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2467 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2468 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2469 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2470 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2471 for ac_extension in a so sl; do
2472 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2473 test -f $ac_im_libdir/libX11.$ac_extension; then
2474 ac_im_usrlibdir=$ac_im_libdir; break
2477 # Screen out bogus values from the imake configuration. They are
2478 # bogus both because they are the default anyway, and because
2479 # using them would break gcc on systems where it needs fixed includes.
2480 case "$ac_im_incroot" in
2482 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2484 case "$ac_im_usrlibdir" in
2486 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2493 if test "$ac_x_includes" = NO; then
2494 # Guess where to find include files, by looking for this one X11 .h file.
2495 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2497 # First, try using that file with no special directory specified.
2498 cat > conftest.$ac_ext <<EOF
2499 #line 2511 "configure"
2500 #include "confdefs.h"
2501 #include <$x_direct_test_include>
2503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2504 { (eval echo configure:2516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2506 if test -z "$ac_err"; then
2508 # We can compile using X headers with no special include directory.
2512 echo "configure: failed program was:" >&5
2513 cat conftest.$ac_ext >&5
2515 # Look for the header file in a standard set of common directories.
2516 # Check X11 before X11Rn because it is often a symlink to the current release.
2519 /usr/X11R6/include \
2520 /usr/X11R5/include \
2521 /usr/X11R4/include \
2524 /usr/include/X11R6 \
2525 /usr/include/X11R5 \
2526 /usr/include/X11R4 \
2528 /usr/local/X11/include \
2529 /usr/local/X11R6/include \
2530 /usr/local/X11R5/include \
2531 /usr/local/X11R4/include \
2533 /usr/local/include/X11 \
2534 /usr/local/include/X11R6 \
2535 /usr/local/include/X11R5 \
2536 /usr/local/include/X11R4 \
2540 /usr/XFree86/include/X11 \
2543 /usr/local/include \
2544 /usr/unsupported/include \
2545 /usr/athena/include \
2546 /usr/local/x11r5/include \
2547 /usr/lpp/Xamples/include \
2549 /usr/openwin/include \
2550 /usr/openwin/share/include \
2553 if test -r "$ac_dir/$x_direct_test_include"; then
2554 ac_x_includes=$ac_dir
2560 fi # $ac_x_includes = NO
2562 if test "$ac_x_libraries" = NO; then
2563 # Check for the libraries.
2565 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2566 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2568 # See if we find them without any special options.
2569 # Don't add to $LIBS permanently.
2570 ac_save_LIBS="$LIBS"
2571 LIBS="-l$x_direct_test_library $LIBS"
2572 cat > conftest.$ac_ext <<EOF
2573 #line 2585 "configure"
2574 #include "confdefs.h"
2577 ${x_direct_test_function}()
2580 if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2582 LIBS="$ac_save_LIBS"
2583 # We can link X programs with no special library path.
2586 echo "configure: failed program was:" >&5
2587 cat conftest.$ac_ext >&5
2589 LIBS="$ac_save_LIBS"
2590 # First see if replacing the include by lib works.
2591 # Check X11 before X11Rn because it is often a symlink to the current release.
2592 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2603 /usr/local/X11/lib \
2604 /usr/local/X11R6/lib \
2605 /usr/local/X11R5/lib \
2606 /usr/local/X11R4/lib \
2608 /usr/local/lib/X11 \
2609 /usr/local/lib/X11R6 \
2610 /usr/local/lib/X11R5 \
2611 /usr/local/lib/X11R4 \
2615 /usr/XFree86/lib/X11 \
2619 /usr/unsupported/lib \
2621 /usr/local/x11r5/lib \
2622 /usr/lpp/Xamples/lib \
2626 /usr/openwin/share/lib \
2629 for ac_extension in a so sl; do
2630 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2631 ac_x_libraries=$ac_dir
2638 fi # $ac_x_libraries = NO
2640 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2641 # Didn't find X anywhere. Cache the known absence of X.
2642 ac_cv_have_x="have_x=no"
2644 # Record where we found X for the cache.
2645 ac_cv_have_x="have_x=yes \
2646 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2650 eval "$ac_cv_have_x"
2653 if test "$have_x" != yes; then
2654 echo "$ac_t""$have_x" 1>&6
2657 # If each of the values was on the command line, it overrides each guess.
2658 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2659 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2660 # Update the cache value to reflect the command line values.
2661 ac_cv_have_x="have_x=yes \
2662 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2663 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2666 if test "$no_x" = yes; then
2667 # Not all programs may use this symbol, but it does not hurt to define it.
2668 cat >> confdefs.h <<\EOF
2669 #define X_DISPLAY_MISSING 1
2672 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2674 if test -n "$x_includes"; then
2675 X_CFLAGS="$X_CFLAGS -I$x_includes"
2678 # It would also be nice to do this for all -L options, not just this one.
2679 if test -n "$x_libraries"; then
2680 X_LIBS="$X_LIBS -L$x_libraries"
2681 # For Solaris; some versions of Sun CC require a space after -R and
2682 # others require no space. Words are not sufficient . . . .
2683 case "`(uname -sr) 2>/dev/null`" in
2685 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2686 echo "configure:2698: checking whether -R must be followed by a space" >&5
2687 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2688 cat > conftest.$ac_ext <<EOF
2689 #line 2701 "configure"
2690 #include "confdefs.h"
2696 if { (eval echo configure:2708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2700 echo "configure: failed program was:" >&5
2701 cat conftest.$ac_ext >&5
2706 if test $ac_R_nospace = yes; then
2707 echo "$ac_t""no" 1>&6
2708 X_LIBS="$X_LIBS -R$x_libraries"
2710 LIBS="$ac_xsave_LIBS -R $x_libraries"
2711 cat > conftest.$ac_ext <<EOF
2712 #line 2724 "configure"
2713 #include "confdefs.h"
2719 if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2723 echo "configure: failed program was:" >&5
2724 cat conftest.$ac_ext >&5
2729 if test $ac_R_space = yes; then
2730 echo "$ac_t""yes" 1>&6
2731 X_LIBS="$X_LIBS -R $x_libraries"
2733 echo "$ac_t""neither works" 1>&6
2736 LIBS="$ac_xsave_LIBS"
2740 # Check for system-dependent libraries X programs must link with.
2741 # Do this before checking for the system-independent R6 libraries
2742 # (-lICE), since we may need -lsocket or whatever for X linking.
2744 if test "$ISC" = yes; then
2745 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2747 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2748 # libraries were built with DECnet support. And karl@cs.umb.edu says
2749 # the Alpha needs dnet_stub (dnet does not exist).
2750 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2751 echo "configure:2763: checking for dnet_ntoa in -ldnet" >&5
2752 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2753 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2754 echo $ac_n "(cached) $ac_c" 1>&6
2756 ac_save_LIBS="$LIBS"
2758 cat > conftest.$ac_ext <<EOF
2759 #line 2771 "configure"
2760 #include "confdefs.h"
2761 /* Override any gcc2 internal prototype to avoid an error. */
2762 /* We use char because int might match the return type of a gcc2
2763 builtin and then its argument prototype would still apply. */
2770 if { (eval echo configure:2782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2772 eval "ac_cv_lib_$ac_lib_var=yes"
2774 echo "configure: failed program was:" >&5
2775 cat conftest.$ac_ext >&5
2777 eval "ac_cv_lib_$ac_lib_var=no"
2780 LIBS="$ac_save_LIBS"
2783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2784 echo "$ac_t""yes" 1>&6
2785 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2787 echo "$ac_t""no" 1>&6
2790 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2791 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2792 echo "configure:2804: checking for dnet_ntoa in -ldnet_stub" >&5
2793 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2794 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2795 echo $ac_n "(cached) $ac_c" 1>&6
2797 ac_save_LIBS="$LIBS"
2798 LIBS="-ldnet_stub $LIBS"
2799 cat > conftest.$ac_ext <<EOF
2800 #line 2812 "configure"
2801 #include "confdefs.h"
2802 /* Override any gcc2 internal prototype to avoid an error. */
2803 /* We use char because int might match the return type of a gcc2
2804 builtin and then its argument prototype would still apply. */
2811 if { (eval echo configure:2823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2813 eval "ac_cv_lib_$ac_lib_var=yes"
2815 echo "configure: failed program was:" >&5
2816 cat conftest.$ac_ext >&5
2818 eval "ac_cv_lib_$ac_lib_var=no"
2821 LIBS="$ac_save_LIBS"
2824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2825 echo "$ac_t""yes" 1>&6
2826 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2828 echo "$ac_t""no" 1>&6
2833 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2834 # to get the SysV transport functions.
2835 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2837 # The nsl library prevents programs from opening the X display
2838 # on Irix 5.2, according to dickey@clark.net.
2839 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2840 echo "configure:2852: checking for gethostbyname" >&5
2841 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2842 echo $ac_n "(cached) $ac_c" 1>&6
2844 cat > conftest.$ac_ext <<EOF
2845 #line 2857 "configure"
2846 #include "confdefs.h"
2847 /* System header to define __stub macros and hopefully few prototypes,
2848 which can conflict with char gethostbyname(); below. */
2850 /* Override any gcc2 internal prototype to avoid an error. */
2851 /* We use char because int might match the return type of a gcc2
2852 builtin and then its argument prototype would still apply. */
2853 char gethostbyname();
2857 /* The GNU C library defines this for functions which it implements
2858 to always fail with ENOSYS. Some functions are actually named
2859 something starting with __ and the normal name is an alias. */
2860 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2868 if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2870 eval "ac_cv_func_gethostbyname=yes"
2872 echo "configure: failed program was:" >&5
2873 cat conftest.$ac_ext >&5
2875 eval "ac_cv_func_gethostbyname=no"
2880 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2881 echo "$ac_t""yes" 1>&6
2884 echo "$ac_t""no" 1>&6
2887 if test $ac_cv_func_gethostbyname = no; then
2888 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2889 echo "configure:2901: checking for gethostbyname in -lnsl" >&5
2890 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2891 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2892 echo $ac_n "(cached) $ac_c" 1>&6
2894 ac_save_LIBS="$LIBS"
2896 cat > conftest.$ac_ext <<EOF
2897 #line 2909 "configure"
2898 #include "confdefs.h"
2899 /* Override any gcc2 internal prototype to avoid an error. */
2900 /* We use char because int might match the return type of a gcc2
2901 builtin and then its argument prototype would still apply. */
2902 char gethostbyname();
2908 if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2910 eval "ac_cv_lib_$ac_lib_var=yes"
2912 echo "configure: failed program was:" >&5
2913 cat conftest.$ac_ext >&5
2915 eval "ac_cv_lib_$ac_lib_var=no"
2918 LIBS="$ac_save_LIBS"
2921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2922 echo "$ac_t""yes" 1>&6
2923 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2925 echo "$ac_t""no" 1>&6
2930 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2931 # socket/setsockopt and other routines are undefined under SCO ODT
2932 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2933 # on later versions), says simon@lia.di.epfl.ch: it contains
2934 # gethostby* variants that don't use the nameserver (or something).
2935 # -lsocket must be given before -lnsl if both are needed.
2936 # We assume that if connect needs -lnsl, so does gethostbyname.
2937 echo $ac_n "checking for connect""... $ac_c" 1>&6
2938 echo "configure:2950: checking for connect" >&5
2939 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2940 echo $ac_n "(cached) $ac_c" 1>&6
2942 cat > conftest.$ac_ext <<EOF
2943 #line 2955 "configure"
2944 #include "confdefs.h"
2945 /* System header to define __stub macros and hopefully few prototypes,
2946 which can conflict with char connect(); below. */
2948 /* Override any gcc2 internal prototype to avoid an error. */
2949 /* We use char because int might match the return type of a gcc2
2950 builtin and then its argument prototype would still apply. */
2955 /* The GNU C library defines this for functions which it implements
2956 to always fail with ENOSYS. Some functions are actually named
2957 something starting with __ and the normal name is an alias. */
2958 #if defined (__stub_connect) || defined (__stub___connect)
2966 if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2968 eval "ac_cv_func_connect=yes"
2970 echo "configure: failed program was:" >&5
2971 cat conftest.$ac_ext >&5
2973 eval "ac_cv_func_connect=no"
2978 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2979 echo "$ac_t""yes" 1>&6
2982 echo "$ac_t""no" 1>&6
2985 if test $ac_cv_func_connect = no; then
2986 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2987 echo "configure:2999: checking for connect in -lsocket" >&5
2988 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2989 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2990 echo $ac_n "(cached) $ac_c" 1>&6
2992 ac_save_LIBS="$LIBS"
2993 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2994 cat > conftest.$ac_ext <<EOF
2995 #line 3007 "configure"
2996 #include "confdefs.h"
2997 /* Override any gcc2 internal prototype to avoid an error. */
2998 /* We use char because int might match the return type of a gcc2
2999 builtin and then its argument prototype would still apply. */
3006 if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3008 eval "ac_cv_lib_$ac_lib_var=yes"
3010 echo "configure: failed program was:" >&5
3011 cat conftest.$ac_ext >&5
3013 eval "ac_cv_lib_$ac_lib_var=no"
3016 LIBS="$ac_save_LIBS"
3019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3020 echo "$ac_t""yes" 1>&6
3021 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3023 echo "$ac_t""no" 1>&6
3028 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3029 echo $ac_n "checking for remove""... $ac_c" 1>&6
3030 echo "configure:3042: checking for remove" >&5
3031 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3032 echo $ac_n "(cached) $ac_c" 1>&6
3034 cat > conftest.$ac_ext <<EOF
3035 #line 3047 "configure"
3036 #include "confdefs.h"
3037 /* System header to define __stub macros and hopefully few prototypes,
3038 which can conflict with char remove(); below. */
3040 /* Override any gcc2 internal prototype to avoid an error. */
3041 /* We use char because int might match the return type of a gcc2
3042 builtin and then its argument prototype would still apply. */
3047 /* The GNU C library defines this for functions which it implements
3048 to always fail with ENOSYS. Some functions are actually named
3049 something starting with __ and the normal name is an alias. */
3050 #if defined (__stub_remove) || defined (__stub___remove)
3058 if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3060 eval "ac_cv_func_remove=yes"
3062 echo "configure: failed program was:" >&5
3063 cat conftest.$ac_ext >&5
3065 eval "ac_cv_func_remove=no"
3070 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3071 echo "$ac_t""yes" 1>&6
3074 echo "$ac_t""no" 1>&6
3077 if test $ac_cv_func_remove = no; then
3078 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3079 echo "configure:3091: checking for remove in -lposix" >&5
3080 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3081 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3082 echo $ac_n "(cached) $ac_c" 1>&6
3084 ac_save_LIBS="$LIBS"
3085 LIBS="-lposix $LIBS"
3086 cat > conftest.$ac_ext <<EOF
3087 #line 3099 "configure"
3088 #include "confdefs.h"
3089 /* Override any gcc2 internal prototype to avoid an error. */
3090 /* We use char because int might match the return type of a gcc2
3091 builtin and then its argument prototype would still apply. */
3098 if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3100 eval "ac_cv_lib_$ac_lib_var=yes"
3102 echo "configure: failed program was:" >&5
3103 cat conftest.$ac_ext >&5
3105 eval "ac_cv_lib_$ac_lib_var=no"
3108 LIBS="$ac_save_LIBS"
3111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3112 echo "$ac_t""yes" 1>&6
3113 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3115 echo "$ac_t""no" 1>&6
3120 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3121 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3122 echo "configure:3134: checking for shmat" >&5
3123 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3124 echo $ac_n "(cached) $ac_c" 1>&6
3126 cat > conftest.$ac_ext <<EOF
3127 #line 3139 "configure"
3128 #include "confdefs.h"
3129 /* System header to define __stub macros and hopefully few prototypes,
3130 which can conflict with char shmat(); below. */
3132 /* Override any gcc2 internal prototype to avoid an error. */
3133 /* We use char because int might match the return type of a gcc2
3134 builtin and then its argument prototype would still apply. */
3139 /* The GNU C library defines this for functions which it implements
3140 to always fail with ENOSYS. Some functions are actually named
3141 something starting with __ and the normal name is an alias. */
3142 #if defined (__stub_shmat) || defined (__stub___shmat)
3150 if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3152 eval "ac_cv_func_shmat=yes"
3154 echo "configure: failed program was:" >&5
3155 cat conftest.$ac_ext >&5
3157 eval "ac_cv_func_shmat=no"
3162 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3163 echo "$ac_t""yes" 1>&6
3166 echo "$ac_t""no" 1>&6
3169 if test $ac_cv_func_shmat = no; then
3170 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3171 echo "configure:3183: checking for shmat in -lipc" >&5
3172 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3173 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3174 echo $ac_n "(cached) $ac_c" 1>&6
3176 ac_save_LIBS="$LIBS"
3178 cat > conftest.$ac_ext <<EOF
3179 #line 3191 "configure"
3180 #include "confdefs.h"
3181 /* Override any gcc2 internal prototype to avoid an error. */
3182 /* We use char because int might match the return type of a gcc2
3183 builtin and then its argument prototype would still apply. */
3190 if { (eval echo configure:3202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3192 eval "ac_cv_lib_$ac_lib_var=yes"
3194 echo "configure: failed program was:" >&5
3195 cat conftest.$ac_ext >&5
3197 eval "ac_cv_lib_$ac_lib_var=no"
3200 LIBS="$ac_save_LIBS"
3203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3204 echo "$ac_t""yes" 1>&6
3205 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3207 echo "$ac_t""no" 1>&6
3213 # Check for libraries that X11R6 Xt/Xaw programs need.
3214 ac_save_LDFLAGS="$LDFLAGS"
3215 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3216 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3217 # check for ICE first), but we must link in the order -lSM -lICE or
3218 # we get undefined symbols. So assume we have SM if we have ICE.
3219 # These have to be linked with before -lX11, unlike the other
3220 # libraries we check for below, so use a different variable.
3221 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3222 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3223 echo "configure:3235: checking for IceConnectionNumber in -lICE" >&5
3224 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3225 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3226 echo $ac_n "(cached) $ac_c" 1>&6
3228 ac_save_LIBS="$LIBS"
3229 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3230 cat > conftest.$ac_ext <<EOF
3231 #line 3243 "configure"
3232 #include "confdefs.h"
3233 /* Override any gcc2 internal prototype to avoid an error. */
3234 /* We use char because int might match the return type of a gcc2
3235 builtin and then its argument prototype would still apply. */
3236 char IceConnectionNumber();
3239 IceConnectionNumber()
3242 if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3244 eval "ac_cv_lib_$ac_lib_var=yes"
3246 echo "configure: failed program was:" >&5
3247 cat conftest.$ac_ext >&5
3249 eval "ac_cv_lib_$ac_lib_var=no"
3252 LIBS="$ac_save_LIBS"
3255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3256 echo "$ac_t""yes" 1>&6
3257 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3259 echo "$ac_t""no" 1>&6
3262 LDFLAGS="$ac_save_LDFLAGS"
3267 if test "$have_x" != yes; then
3268 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3272 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3273 echo "configure:3285: checking for X app-defaults directory" >&5
3274 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3275 echo $ac_n "(cached) $ac_c" 1>&6
3279 if mkdir conftestdir; then
3281 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3282 cat > Imakefile <<'EOF'
3284 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3286 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3287 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3288 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3293 if test x"$ac_x_app_defaults" = x; then
3295 # Look for the directory under a standard set of common directories.
3296 # Check X11 before X11Rn because it's often a symlink to the current release.
3298 /usr/X11/lib/app-defaults \
3299 /usr/X11R6/lib/app-defaults \
3300 /usr/X11R6/lib/X11/app-defaults \
3301 /usr/X11R5/lib/app-defaults \
3302 /usr/X11R5/lib/X11/app-defaults \
3303 /usr/X11R4/lib/app-defaults \
3304 /usr/X11R4/lib/X11/app-defaults \
3306 /usr/lib/X11/app-defaults \
3307 /usr/lib/X11R6/app-defaults \
3308 /usr/lib/X11R5/app-defaults \
3309 /usr/lib/X11R4/app-defaults \
3311 /usr/local/X11/lib/app-defaults \
3312 /usr/local/X11R6/lib/app-defaults \
3313 /usr/local/X11R5/lib/app-defaults \
3314 /usr/local/X11R4/lib/app-defaults \
3316 /usr/local/lib/X11/app-defaults \
3317 /usr/local/lib/X11R6/app-defaults \
3318 /usr/local/lib/X11R6/X11/app-defaults \
3319 /usr/local/lib/X11R5/app-defaults \
3320 /usr/local/lib/X11R5/X11/app-defaults \
3321 /usr/local/lib/X11R4/app-defaults \
3322 /usr/local/lib/X11R4/X11/app-defaults \
3324 /usr/X386/lib/X11/app-defaults \
3325 /usr/x386/lib/X11/app-defaults \
3326 /usr/XFree86/lib/X11/app-defaults \
3328 /usr/lib/X11/app-defaults \
3329 /usr/local/lib/X11/app-defaults \
3330 /usr/unsupported/lib/X11/app-defaults \
3331 /usr/athena/lib/X11/app-defaults \
3332 /usr/local/x11r5/lib/X11/app-defaults \
3333 /usr/lpp/Xamples/lib/X11/app-defaults \
3334 /lib/usr/lib/X11/app-defaults \
3336 /usr/openwin/lib/app-defaults \
3337 /usr/openwin/lib/X11/app-defaults \
3338 /usr/openwin/share/lib/app-defaults \
3339 /usr/openwin/share/lib/X11/app-defaults \
3341 /X11R6/lib/app-defaults \
3342 /X11R5/lib/app-defaults \
3343 /X11R4/lib/app-defaults \
3346 if test -d "$ac_dir"; then
3347 ac_x_app_defaults=$ac_dir
3353 if test x"$ac_x_app_defaults" = x; then
3354 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3356 # Record where we found app-defaults for the cache.
3357 ac_cv_x_app_defaults="$ac_x_app_defaults"
3361 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3362 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3366 # The following arcana was gleaned from conversations with
3367 # Eric Schwartz <erics@col.hp.com>:
3369 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3370 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3371 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3372 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3373 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3374 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3375 # you don't need any -I or -L arguments.
3377 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3378 # are the same division as 10.x. However, there are no symlinks to
3379 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3380 # arguments are always necessary.
3382 # However, X11R6 was available on HPUX 9.x as a patch: if that
3383 # patch was installed, then all of X11R6 went in to
3384 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3386 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3387 # whether R5 was available as a patch; R6 undoubtedly was not.)
3389 # So. We try and use the highest numbered pair of
3390 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3391 # that are available. We do not mix and match different versions
3394 # Question I still don't know the answer to: (do you?)
3396 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3397 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3398 # that contrib directory? Did it contain so-called "standard"
3399 # X11R6, or did it include Xaw and Xmu as well? If the former,
3400 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3401 # be a situation where one had to reach into the R5 headers and
3402 # libs to find Xmu? That is, must both R6 and R5 directories
3403 # be on the -I and -L lists in that case?
3405 for version in X11R6 X11R5 X11R4 ; do
3406 # if either pair of directories exists...
3407 if test -d /usr/include/$version || test -d /usr/contrib/$version/include
3409 # if contrib exists, use it...
3410 if test -d /usr/contrib/$version/include ; then
3411 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3412 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3414 # if the "standard" one exists, use it.
3415 if test -d /usr/include/$version ; then
3416 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3417 X_LIBS="$X_LIBS -L/usr/lib/$version"
3419 # since at least one of the pair exists, go no farther.
3424 # Now find Motif. Thanks for not making xmkmf find this by
3425 # default, you losers.
3427 if test -d /usr/include/Motif2.1 ; then
3428 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
3429 X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
3430 elif test -d /usr/include/Motif1.2 ; then
3431 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3432 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3433 elif test -d /usr/include/Motif1.1 ; then
3434 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3435 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3438 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3440 if test -d /opt/graphics/OpenGL/include ; then
3441 # HP-UX 10.20 puts it here
3442 X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
3443 X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
3444 elif test -d /opt/Mesa/lib ; then
3445 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3446 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3450 if test -d /opt/xpm/lib/X11 ; then
3451 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3452 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3455 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3456 # in /usr/local/, unless there is already an xscreensaver in
3457 # /usr/local/bin/. This can be overridden with the --prefix arg
3458 # to configure. I'm not sure this is the right thing to do, but
3459 # Richard Lloyd says so...
3461 if test \! -x /usr/local/bin/xscreensaver ; then
3462 ac_default_prefix=/opt/xscreensaver
3468 # Thanks for not making xmkmf find this by default, pinheads.
3469 # And thanks for moving things around again, too. Is this
3470 # really the standard location now? What happened to the
3471 # joke that this kind of thing went in /opt?
3472 # cthomp says "answer: CDE (Common Disorganized Environment)"
3474 if test -f /usr/dt/include/Xm/Xm.h ; then
3475 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3476 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3478 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3479 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3480 echo "configure:3492: checking for regcmp in -lgen" >&5
3481 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3482 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3483 echo $ac_n "(cached) $ac_c" 1>&6
3485 ac_save_LIBS="$LIBS"
3487 cat > conftest.$ac_ext <<EOF
3488 #line 3500 "configure"
3489 #include "confdefs.h"
3490 /* Override any gcc2 internal prototype to avoid an error. */
3491 /* We use char because int might match the return type of a gcc2
3492 builtin and then its argument prototype would still apply. */
3499 if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3501 eval "ac_cv_lib_$ac_lib_var=yes"
3503 echo "configure: failed program was:" >&5
3504 cat conftest.$ac_ext >&5
3506 eval "ac_cv_lib_$ac_lib_var=no"
3509 LIBS="$ac_save_LIBS"
3512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3513 echo "$ac_t""yes" 1>&6
3514 X_LIBS="$X_LIBS -lgen"
3516 echo "$ac_t""no" 1>&6
3522 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3523 echo "configure:3535: checking for XPointer" >&5
3524 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3525 echo $ac_n "(cached) $ac_c" 1>&6
3528 ac_save_CPPFLAGS="$CPPFLAGS"
3529 if test \! -z "$includedir" ; then
3530 CPPFLAGS="$CPPFLAGS -I$includedir"
3532 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3533 cat > conftest.$ac_ext <<EOF
3534 #line 3546 "configure"
3535 #include "confdefs.h"
3536 #include <X11/Xlib.h>
3538 XPointer foo = (XPointer) 0;
3541 if { (eval echo configure:3553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3545 echo "configure: failed program was:" >&5
3546 cat conftest.$ac_ext >&5
3551 CPPFLAGS="$ac_save_CPPFLAGS"
3554 echo "$ac_t""$ac_cv_xpointer" 1>&6
3555 if test "$ac_cv_xpointer" != yes; then
3556 cat >> confdefs.h <<\EOF
3557 #define XPointer char*
3564 ###############################################################################
3566 # Check for -lXmu (some fucked up vendors don't ship it...)
3568 ###############################################################################
3572 ac_save_CPPFLAGS="$CPPFLAGS"
3573 if test \! -z "$includedir" ; then
3574 CPPFLAGS="$CPPFLAGS -I$includedir"
3576 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3577 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3578 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3579 echo "configure:3591: checking for X11/Xmu/Error.h" >&5
3580 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3581 echo $ac_n "(cached) $ac_c" 1>&6
3583 cat > conftest.$ac_ext <<EOF
3584 #line 3596 "configure"
3585 #include "confdefs.h"
3586 #include <X11/Xmu/Error.h>
3588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3589 { (eval echo configure:3601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3591 if test -z "$ac_err"; then
3593 eval "ac_cv_header_$ac_safe=yes"
3596 echo "configure: failed program was:" >&5
3597 cat conftest.$ac_ext >&5
3599 eval "ac_cv_header_$ac_safe=no"
3603 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3604 echo "$ac_t""yes" 1>&6
3607 echo "$ac_t""no" 1>&6
3610 CPPFLAGS="$ac_save_CPPFLAGS"
3611 if test "$have_xmu" = no ; then
3612 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3613 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3619 cat >> confdefs.h <<\EOF
3626 ###############################################################################
3628 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3629 # See comp.windows.x FAQ question 124. The right fix is to
3630 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3632 ###############################################################################
3634 if test "$have_xmu" = yes ; then
3637 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3638 echo "configure:3650: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3639 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3640 echo $ac_n "(cached) $ac_c" 1>&6
3642 ac_save_LDFLAGS="$LDFLAGS"
3643 if test \! -z "$x_libraries" ; then
3644 LDFLAGS="$LDFLAGS -L$x_libraries"
3646 # Note: this trick never works! (Generally.)
3647 # We're only getting away with using AC_TRY_LINK
3648 # with X libraries because we know it's SunOS.
3649 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3650 cat > conftest.$ac_ext <<EOF
3651 #line 3663 "configure"
3652 #include "confdefs.h"
3658 if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3660 ac_cv_sunos_xmu_bug=no
3662 echo "configure: failed program was:" >&5
3663 cat conftest.$ac_ext >&5
3665 ac_cv_sunos_xmu_bug=yes
3668 LDFLAGS="$ac_save_LDFLAGS"
3671 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3672 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3673 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3674 echo "configure:3686: checking whether the compiler understands -static" >&5
3675 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3676 echo $ac_n "(cached) $ac_c" 1>&6
3678 ac_save_LDFLAGS="$LDFLAGS"
3679 LDFLAGS="$LDFLAGS -static"
3680 cat > conftest.$ac_ext <<EOF
3681 #line 3693 "configure"
3682 #include "confdefs.h"
3688 if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3692 echo "configure: failed program was:" >&5
3693 cat conftest.$ac_ext >&5
3698 LDFLAGS="$ac_save_LDFLAGS"
3701 echo "$ac_t""$ac_cv_ld_static" 1>&6
3702 if test "$ac_cv_ld_static" = yes ; then
3703 LDFLAGS="$LDFLAGS -static"
3705 LDFLAGS="$LDFLAGS -Bstatic"
3713 ###############################################################################
3715 # Handle the --with-hackdir option
3717 ###############################################################################
3720 with_hackdir_req=unspecified
3721 # Check whether --with-hackdir or --without-hackdir was given.
3722 if test "${with_hackdir+set}" = set; then
3723 withval="$with_hackdir"
3724 with_hackdir="$withval"; with_hackdir_req="$withval"
3730 if test x"$with_hackdir" = xyes; then
3731 HACKDIR='${exec_prefix}/lib/xscreensaver'
3732 elif test x"$with_hackdir" = xno; then
3735 # there must be a better way than this...
3736 if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
3738 HACKDIR=$with_hackdir
3741 HACKDIR="\${exec_prefix}$with_hackdir"
3745 # canonicalize slashes.
3746 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3748 # This option used to be called --enable-subdir; make sure that is no longer
3749 # used, since configure brain-damagedly ignores unknown --enable options.
3752 # Check whether --enable-subdir or --disable-subdir was given.
3753 if test "${enable_subdir+set}" = set; then
3754 enableval="$enable_subdir"
3758 if test -n "$obsolete_enable"; then
3759 echo "error: the --enable-subdir option has been replaced with"
3760 echo " the new --with-hackdir option; see \`configure --help'"
3761 echo " for more information."
3766 ###############################################################################
3768 # Handle the --with-configdir option
3770 ###############################################################################
3773 with_configdir_req=unspecified
3774 # Check whether --with-configdir or --without-configdir was given.
3775 if test "${with_configdir+set}" = set; then
3776 withval="$with_configdir"
3777 with_configdir="$withval"; with_configdir_req="$withval"
3783 if test x"$with_configdir" = xyes; then
3784 # filled in later...
3786 elif test x"$with_configdir" = xno; then
3787 echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
3790 # there must be a better way than this...
3791 if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
3793 CONFIGDIR=$with_configdir
3796 CONFIGDIR="\${exec_prefix}$with_configdir"
3800 # canonicalize slashes.
3801 CONFIGDIR=`echo "${CONFIGDIR}" | sed 's@/$@@;s@//*@/@g'`
3806 ###############################################################################
3808 # Check for the SGI SCREEN_SAVER server extension.
3810 ###############################################################################
3813 with_sgi_req=unspecified
3814 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3815 if test "${with_sgi_ext+set}" = set; then
3816 withval="$with_sgi_ext"
3817 with_sgi="$withval"; with_sgi_req="$withval"
3829 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3830 echo "configure:3842: checking for SGI SCREEN_SAVER headers" >&5
3833 X_CFLAGS="-I$d $X_CFLAGS"
3834 echo "$ac_t""$d" 1>&6
3836 echo "$ac_t""not found ($d: no such directory)" 1>&6
3839 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3840 echo "configure:3852: checking for SGI SCREEN_SAVER libs" >&5
3843 X_LIBS="-L$d $X_LIBS"
3844 echo "$ac_t""$d" 1>&6
3846 echo "$ac_t""not found ($d: no such directory)" 1>&6
3849 # replace the directory string with "yes".
3851 with_sgi=$with_sgi_req
3856 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3857 echo " If it is a directory, then \`DIR/include' will be added to"
3858 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3864 if test "$with_sgi" = yes; then
3866 ac_save_CPPFLAGS="$CPPFLAGS"
3867 if test \! -z "$includedir" ; then
3868 CPPFLAGS="$CPPFLAGS -I$includedir"
3870 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3871 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3872 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3873 echo "configure:3885: checking for X11/extensions/XScreenSaver.h" >&5
3874 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3875 echo $ac_n "(cached) $ac_c" 1>&6
3877 cat > conftest.$ac_ext <<EOF
3878 #line 3890 "configure"
3879 #include "confdefs.h"
3880 #include <X11/extensions/XScreenSaver.h>
3882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3883 { (eval echo configure:3895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3885 if test -z "$ac_err"; then
3887 eval "ac_cv_header_$ac_safe=yes"
3890 echo "configure: failed program was:" >&5
3891 cat conftest.$ac_ext >&5
3893 eval "ac_cv_header_$ac_safe=no"
3897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3898 echo "$ac_t""yes" 1>&6
3900 cat >> confdefs.h <<\EOF
3901 #define HAVE_SGI_SAVER_EXTENSION 1
3905 echo "$ac_t""no" 1>&6
3908 CPPFLAGS="$ac_save_CPPFLAGS"
3910 elif test "$with_sgi" != no; then
3911 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3916 ###############################################################################
3918 # Check for the MIT-SCREEN-SAVER server extension.
3920 ###############################################################################
3923 with_mit_req=unspecified
3924 # Check whether --with-mit-ext or --without-mit-ext was given.
3925 if test "${with_mit_ext+set}" = set; then
3926 withval="$with_mit_ext"
3927 with_mit="$withval"; with_mit_req="$withval"
3939 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3940 echo "configure:3952: checking for MIT-SCREEN-SAVER headers" >&5
3943 X_CFLAGS="-I$d $X_CFLAGS"
3944 echo "$ac_t""$d" 1>&6
3946 echo "$ac_t""not found ($d: no such directory)" 1>&6
3949 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3950 echo "configure:3962: checking for MIT-SCREEN-SAVER libs" >&5
3953 X_LIBS="-L$d $X_LIBS"
3954 echo "$ac_t""$d" 1>&6
3956 echo "$ac_t""not found ($d: no such directory)" 1>&6
3959 # replace the directory string with "yes".
3961 with_mit=$with_mit_req
3966 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3967 echo " If it is a directory, then \`DIR/include' will be added to"
3968 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3974 if test "$with_mit" = yes; then
3976 ac_save_CPPFLAGS="$CPPFLAGS"
3977 if test \! -z "$includedir" ; then
3978 CPPFLAGS="$CPPFLAGS -I$includedir"
3980 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3981 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3982 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3983 echo "configure:3995: checking for X11/extensions/scrnsaver.h" >&5
3984 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3985 echo $ac_n "(cached) $ac_c" 1>&6
3987 cat > conftest.$ac_ext <<EOF
3988 #line 4000 "configure"
3989 #include "confdefs.h"
3990 #include <X11/extensions/scrnsaver.h>
3992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3993 { (eval echo configure:4005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3995 if test -z "$ac_err"; then
3997 eval "ac_cv_header_$ac_safe=yes"
4000 echo "configure: failed program was:" >&5
4001 cat conftest.$ac_ext >&5
4003 eval "ac_cv_header_$ac_safe=no"
4007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4008 echo "$ac_t""yes" 1>&6
4011 echo "$ac_t""no" 1>&6
4014 CPPFLAGS="$ac_save_CPPFLAGS"
4016 # Now check to see if it's really in the library; XF86Free-3.3 ships
4017 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
4019 if test "$have_mit" = yes; then
4021 ac_save_CPPFLAGS="$CPPFLAGS"
4022 ac_save_LDFLAGS="$LDFLAGS"
4023 # ac_save_LIBS="$LIBS"
4025 if test \! -z "$includedir" ; then
4026 CPPFLAGS="$CPPFLAGS -I$includedir"
4028 # note: $X_CFLAGS includes $x_includes
4029 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4031 if test \! -z "$libdir" ; then
4032 LDFLAGS="$LDFLAGS -L$libdir"
4034 # note: $X_LIBS includes $x_libraries
4035 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4037 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
4038 echo "configure:4050: checking for XScreenSaverRegister in -lXext" >&5
4039 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4040 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4041 echo $ac_n "(cached) $ac_c" 1>&6
4043 ac_save_LIBS="$LIBS"
4044 LIBS="-lXext -lm $LIBS"
4045 cat > conftest.$ac_ext <<EOF
4046 #line 4058 "configure"
4047 #include "confdefs.h"
4048 /* Override any gcc2 internal prototype to avoid an error. */
4049 /* We use char because int might match the return type of a gcc2
4050 builtin and then its argument prototype would still apply. */
4051 char XScreenSaverRegister();
4054 XScreenSaverRegister()
4057 if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4059 eval "ac_cv_lib_$ac_lib_var=yes"
4061 echo "configure: failed program was:" >&5
4062 cat conftest.$ac_ext >&5
4064 eval "ac_cv_lib_$ac_lib_var=no"
4067 LIBS="$ac_save_LIBS"
4070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4071 echo "$ac_t""yes" 1>&6
4074 echo "$ac_t""no" 1>&6
4078 CPPFLAGS="$ac_save_CPPFLAGS"
4079 LDFLAGS="$ac_save_LDFLAGS"
4080 # LIBS="$ac_save_LIBS"
4083 if test "$have_mit" = no; then
4084 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
4085 # of in Xext. Thank you master, may I have another.
4087 ac_save_CPPFLAGS="$CPPFLAGS"
4088 ac_save_LDFLAGS="$LDFLAGS"
4089 # ac_save_LIBS="$LIBS"
4091 if test \! -z "$includedir" ; then
4092 CPPFLAGS="$CPPFLAGS -I$includedir"
4094 # note: $X_CFLAGS includes $x_includes
4095 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4097 if test \! -z "$libdir" ; then
4098 LDFLAGS="$LDFLAGS -L$libdir"
4100 # note: $X_LIBS includes $x_libraries
4101 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4103 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
4104 echo "configure:4116: checking for XScreenSaverRegister in -lXExExt" >&5
4105 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4106 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4107 echo $ac_n "(cached) $ac_c" 1>&6
4109 ac_save_LIBS="$LIBS"
4110 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
4111 cat > conftest.$ac_ext <<EOF
4112 #line 4124 "configure"
4113 #include "confdefs.h"
4114 /* Override any gcc2 internal prototype to avoid an error. */
4115 /* We use char because int might match the return type of a gcc2
4116 builtin and then its argument prototype would still apply. */
4117 char XScreenSaverRegister();
4120 XScreenSaverRegister()
4123 if { (eval echo configure:4135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4125 eval "ac_cv_lib_$ac_lib_var=yes"
4127 echo "configure: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4130 eval "ac_cv_lib_$ac_lib_var=no"
4133 LIBS="$ac_save_LIBS"
4136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4137 echo "$ac_t""yes" 1>&6
4138 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
4140 echo "$ac_t""no" 1>&6
4144 CPPFLAGS="$ac_save_CPPFLAGS"
4145 LDFLAGS="$ac_save_LDFLAGS"
4146 # LIBS="$ac_save_LIBS"
4150 if test "$have_mit" = no; then
4151 # Double fuck! Looks like some versions of XFree86 (whichever version
4152 # it is that comes with RedHat Linux 2.0 -- I can't find a version
4153 # number) put this garbage in Xss instead of Xext. Thank you master,
4154 # may I have another.
4156 ac_save_CPPFLAGS="$CPPFLAGS"
4157 ac_save_LDFLAGS="$LDFLAGS"
4158 # ac_save_LIBS="$LIBS"
4160 if test \! -z "$includedir" ; then
4161 CPPFLAGS="$CPPFLAGS -I$includedir"
4163 # note: $X_CFLAGS includes $x_includes
4164 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4166 if test \! -z "$libdir" ; then
4167 LDFLAGS="$LDFLAGS -L$libdir"
4169 # note: $X_LIBS includes $x_libraries
4170 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4172 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4173 echo "configure:4185: checking for XScreenSaverRegister in -lXss" >&5
4174 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4175 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4176 echo $ac_n "(cached) $ac_c" 1>&6
4178 ac_save_LIBS="$LIBS"
4179 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4180 cat > conftest.$ac_ext <<EOF
4181 #line 4193 "configure"
4182 #include "confdefs.h"
4183 /* Override any gcc2 internal prototype to avoid an error. */
4184 /* We use char because int might match the return type of a gcc2
4185 builtin and then its argument prototype would still apply. */
4186 char XScreenSaverRegister();
4189 XScreenSaverRegister()
4192 if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4194 eval "ac_cv_lib_$ac_lib_var=yes"
4196 echo "configure: failed program was:" >&5
4197 cat conftest.$ac_ext >&5
4199 eval "ac_cv_lib_$ac_lib_var=no"
4202 LIBS="$ac_save_LIBS"
4205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4206 echo "$ac_t""yes" 1>&6
4207 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4209 echo "$ac_t""no" 1>&6
4213 CPPFLAGS="$ac_save_CPPFLAGS"
4214 LDFLAGS="$ac_save_LDFLAGS"
4215 # LIBS="$ac_save_LIBS"
4219 if test "$have_mit" = yes; then
4220 cat >> confdefs.h <<\EOF
4221 #define HAVE_MIT_SAVER_EXTENSION 1
4228 elif test "$with_mit" != no; then
4229 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4234 ###############################################################################
4236 # Check for the XIDLE server extension.
4238 ###############################################################################
4241 with_xidle_req=unspecified
4242 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4243 if test "${with_xidle_ext+set}" = set; then
4244 withval="$with_xidle_ext"
4245 with_xidle="$withval"; with_xidle_req="$withval"
4252 case "$with_xidle" in
4257 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4258 echo "configure:4270: checking for XIDLE headers" >&5
4259 d=$with_xidle/include
4261 X_CFLAGS="-I$d $X_CFLAGS"
4262 echo "$ac_t""$d" 1>&6
4264 echo "$ac_t""not found ($d: no such directory)" 1>&6
4267 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4268 echo "configure:4280: checking for XIDLE libs" >&5
4271 X_LIBS="-L$d $X_LIBS"
4272 echo "$ac_t""$d" 1>&6
4274 echo "$ac_t""not found ($d: no such directory)" 1>&6
4277 # replace the directory string with "yes".
4278 with_xidle_req="yes"
4279 with_xidle=$with_xidle_req
4284 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4285 echo " If it is a directory, then \`DIR/include' will be added to"
4286 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4292 if test "$with_xidle" = yes; then
4294 ac_save_CPPFLAGS="$CPPFLAGS"
4295 if test \! -z "$includedir" ; then
4296 CPPFLAGS="$CPPFLAGS -I$includedir"
4298 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4299 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4300 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4301 echo "configure:4313: checking for X11/extensions/xidle.h" >&5
4302 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4303 echo $ac_n "(cached) $ac_c" 1>&6
4305 cat > conftest.$ac_ext <<EOF
4306 #line 4318 "configure"
4307 #include "confdefs.h"
4308 #include <X11/extensions/xidle.h>
4310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4311 { (eval echo configure:4323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4313 if test -z "$ac_err"; then
4315 eval "ac_cv_header_$ac_safe=yes"
4318 echo "configure: failed program was:" >&5
4319 cat conftest.$ac_ext >&5
4321 eval "ac_cv_header_$ac_safe=no"
4325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4326 echo "$ac_t""yes" 1>&6
4328 cat >> confdefs.h <<\EOF
4329 #define HAVE_XIDLE_EXTENSION 1
4333 echo "$ac_t""no" 1>&6
4336 CPPFLAGS="$ac_save_CPPFLAGS"
4337 elif test "$with_xidle" != no; then
4338 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4343 ###############################################################################
4345 # Check for the SGI-VIDEO-CONTROL server extension.
4347 ###############################################################################
4350 with_sgivc_req=unspecified
4351 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4352 if test "${with_sgivc_ext+set}" = set; then
4353 withval="$with_sgivc_ext"
4354 with_sgivc="$withval"; with_sgivc_req="$withval"
4361 case "$with_sgivc" in
4366 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4367 echo "configure:4379: checking for SGI-VIDEO-CONTROL headers" >&5
4368 d=$with_sgivc/include
4370 X_CFLAGS="-I$d $X_CFLAGS"
4371 echo "$ac_t""$d" 1>&6
4373 echo "$ac_t""not found ($d: no such directory)" 1>&6
4376 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4377 echo "configure:4389: checking for SGI-VIDEO-CONTROL libs" >&5
4380 X_LIBS="-L$d $X_LIBS"
4381 echo "$ac_t""$d" 1>&6
4383 echo "$ac_t""not found ($d: no such directory)" 1>&6
4386 # replace the directory string with "yes".
4387 with_sgivc_req="yes"
4388 with_sgivc=$with_sgivc_req
4393 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4394 echo " If it is a directory, then \`DIR/include' will be added to"
4395 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4401 if test "$with_sgivc" = yes; then
4403 # first check for XSGIvc.h
4405 ac_save_CPPFLAGS="$CPPFLAGS"
4406 if test \! -z "$includedir" ; then
4407 CPPFLAGS="$CPPFLAGS -I$includedir"
4409 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4410 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4411 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4412 echo "configure:4424: checking for X11/extensions/XSGIvc.h" >&5
4413 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4414 echo $ac_n "(cached) $ac_c" 1>&6
4416 cat > conftest.$ac_ext <<EOF
4417 #line 4429 "configure"
4418 #include "confdefs.h"
4419 #include <X11/extensions/XSGIvc.h>
4421 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4422 { (eval echo configure:4434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4423 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4424 if test -z "$ac_err"; then
4426 eval "ac_cv_header_$ac_safe=yes"
4429 echo "configure: failed program was:" >&5
4430 cat conftest.$ac_ext >&5
4432 eval "ac_cv_header_$ac_safe=no"
4436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4437 echo "$ac_t""yes" 1>&6
4440 echo "$ac_t""no" 1>&6
4443 CPPFLAGS="$ac_save_CPPFLAGS"
4445 # if that succeeded, then check for the -lXsgivc
4446 if test "$have_sgivc" = yes; then
4449 ac_save_CPPFLAGS="$CPPFLAGS"
4450 ac_save_LDFLAGS="$LDFLAGS"
4451 # ac_save_LIBS="$LIBS"
4453 if test \! -z "$includedir" ; then
4454 CPPFLAGS="$CPPFLAGS -I$includedir"
4456 # note: $X_CFLAGS includes $x_includes
4457 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4459 if test \! -z "$libdir" ; then
4460 LDFLAGS="$LDFLAGS -L$libdir"
4462 # note: $X_LIBS includes $x_libraries
4463 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4465 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4466 echo "configure:4478: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4467 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4468 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4469 echo $ac_n "(cached) $ac_c" 1>&6
4471 ac_save_LIBS="$LIBS"
4472 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4473 cat > conftest.$ac_ext <<EOF
4474 #line 4486 "configure"
4475 #include "confdefs.h"
4476 /* Override any gcc2 internal prototype to avoid an error. */
4477 /* We use char because int might match the return type of a gcc2
4478 builtin and then its argument prototype would still apply. */
4479 char XSGIvcQueryGammaMap();
4482 XSGIvcQueryGammaMap()
4485 if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4487 eval "ac_cv_lib_$ac_lib_var=yes"
4489 echo "configure: failed program was:" >&5
4490 cat conftest.$ac_ext >&5
4492 eval "ac_cv_lib_$ac_lib_var=no"
4495 LIBS="$ac_save_LIBS"
4498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4499 echo "$ac_t""yes" 1>&6
4500 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4502 echo "$ac_t""no" 1>&6
4506 CPPFLAGS="$ac_save_CPPFLAGS"
4507 LDFLAGS="$ac_save_LDFLAGS"
4508 # LIBS="$ac_save_LIBS"
4512 # if that succeeded, then we've really got it.
4513 if test "$have_sgivc" = yes; then
4514 cat >> confdefs.h <<\EOF
4515 #define HAVE_SGI_VC_EXTENSION 1
4520 elif test "$with_sgivc" != no; then
4521 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4526 ###############################################################################
4528 # Check for the DPMS server extension.
4530 ###############################################################################
4533 with_dpms_req=unspecified
4534 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4535 if test "${with_dpms_ext+set}" = set; then
4536 withval="$with_dpms_ext"
4537 with_dpms="$withval"; with_dpms_req="$withval"
4544 case "$with_dpms" in
4549 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4550 echo "configure:4562: checking for DPMS headers" >&5
4551 d=$with_dpms/include
4553 X_CFLAGS="-I$d $X_CFLAGS"
4554 echo "$ac_t""$d" 1>&6
4556 echo "$ac_t""not found ($d: no such directory)" 1>&6
4559 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4560 echo "configure:4572: checking for DPMS libs" >&5
4563 X_LIBS="-L$d $X_LIBS"
4564 echo "$ac_t""$d" 1>&6
4566 echo "$ac_t""not found ($d: no such directory)" 1>&6
4569 # replace the directory string with "yes".
4571 with_dpms=$with_dpms_req
4576 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4577 echo " If it is a directory, then \`DIR/include' will be added to"
4578 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4584 if test "$with_dpms" = yes; then
4586 # first check for dpms.h
4588 ac_save_CPPFLAGS="$CPPFLAGS"
4589 if test \! -z "$includedir" ; then
4590 CPPFLAGS="$CPPFLAGS -I$includedir"
4592 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4593 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4594 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4595 echo "configure:4607: checking for X11/extensions/dpms.h" >&5
4596 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4597 echo $ac_n "(cached) $ac_c" 1>&6
4599 cat > conftest.$ac_ext <<EOF
4600 #line 4612 "configure"
4601 #include "confdefs.h"
4602 #include <X11/extensions/dpms.h>
4604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4605 { (eval echo configure:4617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4607 if test -z "$ac_err"; then
4609 eval "ac_cv_header_$ac_safe=yes"
4612 echo "configure: failed program was:" >&5
4613 cat conftest.$ac_ext >&5
4615 eval "ac_cv_header_$ac_safe=no"
4619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4620 echo "$ac_t""yes" 1>&6
4623 echo "$ac_t""no" 1>&6
4626 CPPFLAGS="$ac_save_CPPFLAGS"
4628 # if that succeeded, then check for the DPMS code in the libraries
4629 if test "$have_dpms" = yes; then
4631 # first look in -lXext (this is where it is with XFree86 4.0)
4634 ac_save_CPPFLAGS="$CPPFLAGS"
4635 ac_save_LDFLAGS="$LDFLAGS"
4636 # ac_save_LIBS="$LIBS"
4638 if test \! -z "$includedir" ; then
4639 CPPFLAGS="$CPPFLAGS -I$includedir"
4641 # note: $X_CFLAGS includes $x_includes
4642 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4644 if test \! -z "$libdir" ; then
4645 LDFLAGS="$LDFLAGS -L$libdir"
4647 # note: $X_LIBS includes $x_libraries
4648 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4650 echo $ac_n "checking for DPMSInfo in -lXext""... $ac_c" 1>&6
4651 echo "configure:4663: checking for DPMSInfo in -lXext" >&5
4652 ac_lib_var=`echo Xext'_'DPMSInfo | sed 'y%./+-%__p_%'`
4653 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4654 echo $ac_n "(cached) $ac_c" 1>&6
4656 ac_save_LIBS="$LIBS"
4657 LIBS="-lXext -lXext -lX11 $LIBS"
4658 cat > conftest.$ac_ext <<EOF
4659 #line 4671 "configure"
4660 #include "confdefs.h"
4661 /* Override any gcc2 internal prototype to avoid an error. */
4662 /* We use char because int might match the return type of a gcc2
4663 builtin and then its argument prototype would still apply. */
4670 if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4672 eval "ac_cv_lib_$ac_lib_var=yes"
4674 echo "configure: failed program was:" >&5
4675 cat conftest.$ac_ext >&5
4677 eval "ac_cv_lib_$ac_lib_var=no"
4680 LIBS="$ac_save_LIBS"
4683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4684 echo "$ac_t""yes" 1>&6
4687 echo "$ac_t""no" 1>&6
4691 CPPFLAGS="$ac_save_CPPFLAGS"
4692 LDFLAGS="$ac_save_LDFLAGS"
4693 # LIBS="$ac_save_LIBS"
4696 # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
4697 if test "$have_dpms" = no; then
4699 ac_save_CPPFLAGS="$CPPFLAGS"
4700 ac_save_LDFLAGS="$LDFLAGS"
4701 # ac_save_LIBS="$LIBS"
4703 if test \! -z "$includedir" ; then
4704 CPPFLAGS="$CPPFLAGS -I$includedir"
4706 # note: $X_CFLAGS includes $x_includes
4707 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4709 if test \! -z "$libdir" ; then
4710 LDFLAGS="$LDFLAGS -L$libdir"
4712 # note: $X_LIBS includes $x_libraries
4713 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4715 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4716 echo "configure:4728: checking for DPMSInfo in -lXdpms" >&5
4717 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4718 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4719 echo $ac_n "(cached) $ac_c" 1>&6
4721 ac_save_LIBS="$LIBS"
4722 LIBS="-lXdpms -lXext -lX11 $LIBS"
4723 cat > conftest.$ac_ext <<EOF
4724 #line 4736 "configure"
4725 #include "confdefs.h"
4726 /* Override any gcc2 internal prototype to avoid an error. */
4727 /* We use char because int might match the return type of a gcc2
4728 builtin and then its argument prototype would still apply. */
4735 if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4737 eval "ac_cv_lib_$ac_lib_var=yes"
4739 echo "configure: failed program was:" >&5
4740 cat conftest.$ac_ext >&5
4742 eval "ac_cv_lib_$ac_lib_var=no"
4745 LIBS="$ac_save_LIBS"
4748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4749 echo "$ac_t""yes" 1>&6
4750 have_dpms=yes; XDPMS_LIBS="-lXdpms"
4752 echo "$ac_t""no" 1>&6
4756 CPPFLAGS="$ac_save_CPPFLAGS"
4757 LDFLAGS="$ac_save_LDFLAGS"
4758 # LIBS="$ac_save_LIBS"
4764 # if that succeeded, then we've really got it.
4765 if test "$have_dpms" = yes; then
4766 cat >> confdefs.h <<\EOF
4767 #define HAVE_DPMS_EXTENSION 1
4772 elif test "$with_dpms" != no; then
4773 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4778 ###############################################################################
4780 # Check for the XINERAMA server extension.
4782 ###############################################################################
4785 with_xinerama_req=unspecified
4786 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
4787 if test "${with_xinerama_ext+set}" = set; then
4788 withval="$with_xinerama_ext"
4789 with_xinerama="$withval"; with_xinerama_req="$withval"
4796 case "$with_xinerama" in
4801 echo $ac_n "checking for XINERAMA headers""... $ac_c" 1>&6
4802 echo "configure:4814: checking for XINERAMA headers" >&5
4803 d=$with_xinerama/include
4805 X_CFLAGS="-I$d $X_CFLAGS"
4806 echo "$ac_t""$d" 1>&6
4808 echo "$ac_t""not found ($d: no such directory)" 1>&6
4811 echo $ac_n "checking for XINERAMA libs""... $ac_c" 1>&6
4812 echo "configure:4824: checking for XINERAMA libs" >&5
4813 d=$with_xinerama/lib
4815 X_LIBS="-L$d $X_LIBS"
4816 echo "$ac_t""$d" 1>&6
4818 echo "$ac_t""not found ($d: no such directory)" 1>&6
4821 # replace the directory string with "yes".
4822 with_xinerama_req="yes"
4823 with_xinerama=$with_xinerama_req
4828 echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
4829 echo " If it is a directory, then \`DIR/include' will be added to"
4830 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4836 if test "$with_xinerama" = yes; then
4838 # first check for Xinerama.h
4840 ac_save_CPPFLAGS="$CPPFLAGS"
4841 if test \! -z "$includedir" ; then
4842 CPPFLAGS="$CPPFLAGS -I$includedir"
4844 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4845 ac_safe=`echo "X11/extensions/Xinerama.h" | sed 'y%./+-%__p_%'`
4846 echo $ac_n "checking for X11/extensions/Xinerama.h""... $ac_c" 1>&6
4847 echo "configure:4859: checking for X11/extensions/Xinerama.h" >&5
4848 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4849 echo $ac_n "(cached) $ac_c" 1>&6
4851 cat > conftest.$ac_ext <<EOF
4852 #line 4864 "configure"
4853 #include "confdefs.h"
4854 #include <X11/extensions/Xinerama.h>
4856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4857 { (eval echo configure:4869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4858 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4859 if test -z "$ac_err"; then
4861 eval "ac_cv_header_$ac_safe=yes"
4864 echo "configure: failed program was:" >&5
4865 cat conftest.$ac_ext >&5
4867 eval "ac_cv_header_$ac_safe=no"
4871 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4872 echo "$ac_t""yes" 1>&6
4875 echo "$ac_t""no" 1>&6
4878 CPPFLAGS="$ac_save_CPPFLAGS"
4880 # if that succeeded, then check for the XINERAMA code in the libraries
4881 if test "$have_xinerama" = yes; then
4883 # first look in -lXext
4886 ac_save_CPPFLAGS="$CPPFLAGS"
4887 ac_save_LDFLAGS="$LDFLAGS"
4888 # ac_save_LIBS="$LIBS"
4890 if test \! -z "$includedir" ; then
4891 CPPFLAGS="$CPPFLAGS -I$includedir"
4893 # note: $X_CFLAGS includes $x_includes
4894 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4896 if test \! -z "$libdir" ; then
4897 LDFLAGS="$LDFLAGS -L$libdir"
4899 # note: $X_LIBS includes $x_libraries
4900 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4902 echo $ac_n "checking for XineramaQueryExtension in -lXext""... $ac_c" 1>&6
4903 echo "configure:4915: checking for XineramaQueryExtension in -lXext" >&5
4904 ac_lib_var=`echo Xext'_'XineramaQueryExtension | sed 'y%./+-%__p_%'`
4905 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4906 echo $ac_n "(cached) $ac_c" 1>&6
4908 ac_save_LIBS="$LIBS"
4909 LIBS="-lXext -lXext -lX11 $LIBS"
4910 cat > conftest.$ac_ext <<EOF
4911 #line 4923 "configure"
4912 #include "confdefs.h"
4913 /* Override any gcc2 internal prototype to avoid an error. */
4914 /* We use char because int might match the return type of a gcc2
4915 builtin and then its argument prototype would still apply. */
4916 char XineramaQueryExtension();
4919 XineramaQueryExtension()
4922 if { (eval echo configure:4934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4924 eval "ac_cv_lib_$ac_lib_var=yes"
4926 echo "configure: failed program was:" >&5
4927 cat conftest.$ac_ext >&5
4929 eval "ac_cv_lib_$ac_lib_var=no"
4932 LIBS="$ac_save_LIBS"
4935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4936 echo "$ac_t""yes" 1>&6
4939 echo "$ac_t""no" 1>&6
4943 CPPFLAGS="$ac_save_CPPFLAGS"
4944 LDFLAGS="$ac_save_LDFLAGS"
4945 # LIBS="$ac_save_LIBS"
4948 # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
4949 if test "$have_xinerama" = no; then
4951 ac_save_CPPFLAGS="$CPPFLAGS"
4952 ac_save_LDFLAGS="$LDFLAGS"
4953 # ac_save_LIBS="$LIBS"
4955 if test \! -z "$includedir" ; then
4956 CPPFLAGS="$CPPFLAGS -I$includedir"
4958 # note: $X_CFLAGS includes $x_includes
4959 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4961 if test \! -z "$libdir" ; then
4962 LDFLAGS="$LDFLAGS -L$libdir"
4964 # note: $X_LIBS includes $x_libraries
4965 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4967 echo $ac_n "checking for XineramaQueryExtension in -lXinerama""... $ac_c" 1>&6
4968 echo "configure:4980: checking for XineramaQueryExtension in -lXinerama" >&5
4969 ac_lib_var=`echo Xinerama'_'XineramaQueryExtension | sed 'y%./+-%__p_%'`
4970 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4971 echo $ac_n "(cached) $ac_c" 1>&6
4973 ac_save_LIBS="$LIBS"
4974 LIBS="-lXinerama -lXext -lX11 $LIBS"
4975 cat > conftest.$ac_ext <<EOF
4976 #line 4988 "configure"
4977 #include "confdefs.h"
4978 /* Override any gcc2 internal prototype to avoid an error. */
4979 /* We use char because int might match the return type of a gcc2
4980 builtin and then its argument prototype would still apply. */
4981 char XineramaQueryExtension();
4984 XineramaQueryExtension()
4987 if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4989 eval "ac_cv_lib_$ac_lib_var=yes"
4991 echo "configure: failed program was:" >&5
4992 cat conftest.$ac_ext >&5
4994 eval "ac_cv_lib_$ac_lib_var=no"
4997 LIBS="$ac_save_LIBS"
5000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5001 echo "$ac_t""yes" 1>&6
5002 have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
5004 echo "$ac_t""no" 1>&6
5008 CPPFLAGS="$ac_save_CPPFLAGS"
5009 LDFLAGS="$ac_save_LDFLAGS"
5010 # LIBS="$ac_save_LIBS"
5015 # if that succeeded, then we've really got it.
5016 if test "$have_xinerama" = yes; then
5017 cat >> confdefs.h <<\EOF
5018 #define HAVE_XINERAMA 1
5023 elif test "$with_xinerama" != no; then
5024 echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
5029 ###############################################################################
5031 # Check for the XF86VMODE server extension (for virtual screens.)
5033 ###############################################################################
5036 with_xf86vmode_req=unspecified
5037 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
5038 if test "${with_xf86vmode_ext+set}" = set; then
5039 withval="$with_xf86vmode_ext"
5040 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
5047 case "$with_xf86vmode" in
5052 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
5053 echo "configure:5065: checking for xf86vmode headers" >&5
5054 d=$with_xf86vmode/include
5056 X_CFLAGS="-I$d $X_CFLAGS"
5057 echo "$ac_t""$d" 1>&6
5059 echo "$ac_t""not found ($d: no such directory)" 1>&6
5062 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
5063 echo "configure:5075: checking for xf86vmode libs" >&5
5064 d=$with_xf86vmode/lib
5066 X_LIBS="-L$d $X_LIBS"
5067 echo "$ac_t""$d" 1>&6
5069 echo "$ac_t""not found ($d: no such directory)" 1>&6
5072 # replace the directory string with "yes".
5073 with_xf86vmode_req="yes"
5074 with_xf86vmode=$with_xf86vmode_req
5079 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
5080 echo " If it is a directory, then \`DIR/include' will be added to"
5081 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5087 if test "$with_xf86vmode" = yes; then
5089 # first check for xf86vmode.h
5091 ac_save_CPPFLAGS="$CPPFLAGS"
5092 if test \! -z "$includedir" ; then
5093 CPPFLAGS="$CPPFLAGS -I$includedir"
5095 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5096 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
5097 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
5098 echo "configure:5110: checking for X11/extensions/xf86vmode.h" >&5
5099 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5100 echo $ac_n "(cached) $ac_c" 1>&6
5102 cat > conftest.$ac_ext <<EOF
5103 #line 5115 "configure"
5104 #include "confdefs.h"
5105 #include <X11/extensions/xf86vmode.h>
5107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5108 { (eval echo configure:5120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5110 if test -z "$ac_err"; then
5112 eval "ac_cv_header_$ac_safe=yes"
5115 echo "configure: failed program was:" >&5
5116 cat conftest.$ac_ext >&5
5118 eval "ac_cv_header_$ac_safe=no"
5122 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5123 echo "$ac_t""yes" 1>&6
5126 echo "$ac_t""no" 1>&6
5129 CPPFLAGS="$ac_save_CPPFLAGS"
5131 # if that succeeded, then check for the -lXxf86vm
5132 if test "$have_xf86vmode" = yes; then
5135 ac_save_CPPFLAGS="$CPPFLAGS"
5136 ac_save_LDFLAGS="$LDFLAGS"
5137 # ac_save_LIBS="$LIBS"
5139 if test \! -z "$includedir" ; then
5140 CPPFLAGS="$CPPFLAGS -I$includedir"
5142 # note: $X_CFLAGS includes $x_includes
5143 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5145 if test \! -z "$libdir" ; then
5146 LDFLAGS="$LDFLAGS -L$libdir"
5148 # note: $X_LIBS includes $x_libraries
5149 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
5151 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
5152 echo "configure:5164: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
5153 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
5154 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5155 echo $ac_n "(cached) $ac_c" 1>&6
5157 ac_save_LIBS="$LIBS"
5158 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
5159 cat > conftest.$ac_ext <<EOF
5160 #line 5172 "configure"
5161 #include "confdefs.h"
5162 /* Override any gcc2 internal prototype to avoid an error. */
5163 /* We use char because int might match the return type of a gcc2
5164 builtin and then its argument prototype would still apply. */
5165 char XF86VidModeGetViewPort();
5168 XF86VidModeGetViewPort()
5171 if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5173 eval "ac_cv_lib_$ac_lib_var=yes"
5175 echo "configure: failed program was:" >&5
5176 cat conftest.$ac_ext >&5
5178 eval "ac_cv_lib_$ac_lib_var=no"
5181 LIBS="$ac_save_LIBS"
5184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5185 echo "$ac_t""yes" 1>&6
5186 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
5188 echo "$ac_t""no" 1>&6
5192 CPPFLAGS="$ac_save_CPPFLAGS"
5193 LDFLAGS="$ac_save_LDFLAGS"
5194 # LIBS="$ac_save_LIBS"
5198 # if that succeeded, then we've really got it.
5199 if test "$have_xf86vmode" = yes; then
5200 cat >> confdefs.h <<\EOF
5201 #define HAVE_XF86VMODE 1
5206 elif test "$with_xf86vmode" != no; then
5207 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
5212 ###############################################################################
5214 # Check for the XF86VMODE server extension (for gamma fading.)
5216 ###############################################################################
5219 have_xf86gamma_ramp=no
5220 with_xf86gamma_req=unspecified
5221 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
5222 if test "${with_xf86gamma_ext+set}" = set; then
5223 withval="$with_xf86gamma_ext"
5224 with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
5231 case "$with_xf86gamma" in
5236 echo $ac_n "checking for xf86gamma headers""... $ac_c" 1>&6
5237 echo "configure:5249: checking for xf86gamma headers" >&5
5238 d=$with_xf86gamma/include
5240 X_CFLAGS="-I$d $X_CFLAGS"
5241 echo "$ac_t""$d" 1>&6
5243 echo "$ac_t""not found ($d: no such directory)" 1>&6
5246 echo $ac_n "checking for xf86gamma libs""... $ac_c" 1>&6
5247 echo "configure:5259: checking for xf86gamma libs" >&5
5248 d=$with_xf86gamma/lib
5250 X_LIBS="-L$d $X_LIBS"
5251 echo "$ac_t""$d" 1>&6
5253 echo "$ac_t""not found ($d: no such directory)" 1>&6
5256 # replace the directory string with "yes".
5257 with_xf86gamma_req="yes"
5258 with_xf86gamma=$with_xf86gamma_req
5263 echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
5264 echo " If it is a directory, then \`DIR/include' will be added to"
5265 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5271 if test "$with_xf86gamma" = yes; then
5273 # first check for xf86vmode.h, if we haven't already
5274 if test "$have_xf86vmode" = yes; then
5278 ac_save_CPPFLAGS="$CPPFLAGS"
5279 if test \! -z "$includedir" ; then
5280 CPPFLAGS="$CPPFLAGS -I$includedir"
5282 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5283 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
5284 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
5285 echo "configure:5297: checking for X11/extensions/xf86vmode.h" >&5
5286 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5287 echo $ac_n "(cached) $ac_c" 1>&6
5289 cat > conftest.$ac_ext <<EOF
5290 #line 5302 "configure"
5291 #include "confdefs.h"
5292 #include <X11/extensions/xf86vmode.h>
5294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5295 { (eval echo configure:5307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5297 if test -z "$ac_err"; then
5299 eval "ac_cv_header_$ac_safe=yes"
5302 echo "configure: failed program was:" >&5
5303 cat conftest.$ac_ext >&5
5305 eval "ac_cv_header_$ac_safe=no"
5309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5310 echo "$ac_t""yes" 1>&6
5313 echo "$ac_t""no" 1>&6
5316 CPPFLAGS="$ac_save_CPPFLAGS"
5319 # if that succeeded, then check for the -lXxf86vm
5320 if test "$have_xf86gamma" = yes; then
5323 ac_save_CPPFLAGS="$CPPFLAGS"
5324 ac_save_LDFLAGS="$LDFLAGS"
5325 # ac_save_LIBS="$LIBS"
5327 if test \! -z "$includedir" ; then
5328 CPPFLAGS="$CPPFLAGS -I$includedir"
5330 # note: $X_CFLAGS includes $x_includes
5331 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5333 if test \! -z "$libdir" ; then
5334 LDFLAGS="$LDFLAGS -L$libdir"
5336 # note: $X_LIBS includes $x_libraries
5337 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
5339 echo $ac_n "checking for XF86VidModeSetGamma in -lXxf86vm""... $ac_c" 1>&6
5340 echo "configure:5352: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
5341 ac_lib_var=`echo Xxf86vm'_'XF86VidModeSetGamma | sed 'y%./+-%__p_%'`
5342 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5343 echo $ac_n "(cached) $ac_c" 1>&6
5345 ac_save_LIBS="$LIBS"
5346 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
5347 cat > conftest.$ac_ext <<EOF
5348 #line 5360 "configure"
5349 #include "confdefs.h"
5350 /* Override any gcc2 internal prototype to avoid an error. */
5351 /* We use char because int might match the return type of a gcc2
5352 builtin and then its argument prototype would still apply. */
5353 char XF86VidModeSetGamma();
5356 XF86VidModeSetGamma()
5359 if { (eval echo configure:5371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5361 eval "ac_cv_lib_$ac_lib_var=yes"
5363 echo "configure: failed program was:" >&5
5364 cat conftest.$ac_ext >&5
5366 eval "ac_cv_lib_$ac_lib_var=no"
5369 LIBS="$ac_save_LIBS"
5372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5373 echo "$ac_t""yes" 1>&6
5376 echo "$ac_t""no" 1>&6
5380 CPPFLAGS="$ac_save_CPPFLAGS"
5381 LDFLAGS="$ac_save_LDFLAGS"
5382 # LIBS="$ac_save_LIBS"
5386 # check for the Ramp versions of the functions too.
5387 if test "$have_xf86gamma" = yes; then
5388 have_xf86gamma_ramp=no
5390 ac_save_CPPFLAGS="$CPPFLAGS"
5391 ac_save_LDFLAGS="$LDFLAGS"
5392 # ac_save_LIBS="$LIBS"
5394 if test \! -z "$includedir" ; then
5395 CPPFLAGS="$CPPFLAGS -I$includedir"
5397 # note: $X_CFLAGS includes $x_includes
5398 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5400 if test \! -z "$libdir" ; then
5401 LDFLAGS="$LDFLAGS -L$libdir"
5403 # note: $X_LIBS includes $x_libraries
5404 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
5406 echo $ac_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm""... $ac_c" 1>&6
5407 echo "configure:5419: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
5408 ac_lib_var=`echo Xxf86vm'_'XF86VidModeSetGammaRamp | sed 'y%./+-%__p_%'`
5409 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5410 echo $ac_n "(cached) $ac_c" 1>&6
5412 ac_save_LIBS="$LIBS"
5413 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
5414 cat > conftest.$ac_ext <<EOF
5415 #line 5427 "configure"
5416 #include "confdefs.h"
5417 /* Override any gcc2 internal prototype to avoid an error. */
5418 /* We use char because int might match the return type of a gcc2
5419 builtin and then its argument prototype would still apply. */
5420 char XF86VidModeSetGammaRamp();
5423 XF86VidModeSetGammaRamp()
5426 if { (eval echo configure:5438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5428 eval "ac_cv_lib_$ac_lib_var=yes"
5430 echo "configure: failed program was:" >&5
5431 cat conftest.$ac_ext >&5
5433 eval "ac_cv_lib_$ac_lib_var=no"
5436 LIBS="$ac_save_LIBS"
5439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5440 echo "$ac_t""yes" 1>&6
5441 have_xf86gamma_ramp=yes
5443 echo "$ac_t""no" 1>&6
5447 CPPFLAGS="$ac_save_CPPFLAGS"
5448 LDFLAGS="$ac_save_LDFLAGS"
5449 # LIBS="$ac_save_LIBS"
5453 # if those tests succeeded, then we've really got the functions.
5454 if test "$have_xf86gamma" = yes; then
5455 cat >> confdefs.h <<\EOF
5456 #define HAVE_XF86VMODE_GAMMA 1
5461 if test "$have_xf86gamma_ramp" = yes; then
5462 cat >> confdefs.h <<\EOF
5463 #define HAVE_XF86VMODE_GAMMA_RAMP 1
5468 # pull in the lib, if we haven't already
5469 if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
5470 SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
5473 elif test "$with_xf86gamma" != no; then
5474 echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
5479 ###############################################################################
5481 # Check for HP XHPDisableReset and XHPEnableReset.
5483 ###############################################################################
5486 ac_save_CPPFLAGS="$CPPFLAGS"
5487 if test \! -z "$includedir" ; then
5488 CPPFLAGS="$CPPFLAGS -I$includedir"
5490 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5491 cat > conftest.$ac_ext <<EOF
5492 #line 5504 "configure"
5493 #include "confdefs.h"
5494 #include <X11/XHPlib.h>
5496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5497 egrep "XHPDisableReset" >/dev/null 2>&1; then
5499 cat >> confdefs.h <<\EOF
5500 #define HAVE_XHPDISABLERESET 1
5503 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
5507 CPPFLAGS="$ac_save_CPPFLAGS"
5510 ###############################################################################
5512 # Check for /proc/interrupts.
5514 ###############################################################################
5516 have_proc_interrupts=no
5517 with_proc_interrupts_req=unspecified
5518 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
5519 if test "${with_proc_interrupts+set}" = set; then
5520 withval="$with_proc_interrupts"
5521 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
5523 with_proc_interrupts=yes
5527 if test "$with_proc_interrupts" = yes; then
5529 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
5530 echo "configure:5542: checking whether /proc/interrupts contains keyboard data" >&5
5531 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
5532 echo $ac_n "(cached) $ac_c" 1>&6
5534 ac_cv_have_proc_interrupts=no
5535 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
5536 ac_cv_have_proc_interrupts=yes
5541 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
5542 have_proc_interrupts=$ac_cv_have_proc_interrupts
5544 if test "$have_proc_interrupts" = yes; then
5545 cat >> confdefs.h <<\EOF
5546 #define HAVE_PROC_INTERRUPTS 1
5551 elif test "$with_proc_interrupts" != no; then
5552 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
5557 ###############################################################################
5559 # The --enable-locking option
5561 ###############################################################################
5563 # Check whether --enable-locking or --disable-locking was given.
5564 if test "${enable_locking+set}" = set; then
5565 enableval="$enable_locking"
5566 enable_locking="$enableval"
5571 if test "$enable_locking" = yes; then
5573 elif test "$enable_locking" = no; then
5574 cat >> confdefs.h <<\EOF
5575 #define NO_LOCKING 1
5579 echo "error: must be yes or no: --enable-locking=$enable_locking"
5585 ###############################################################################
5587 # The --enable-vt-locking option
5589 ###############################################################################
5591 #ac_vt_lockswitch=no
5592 #AC_ARG_ENABLE(vt-locking,[
5593 # --enable-vt-locking Compile in support for locking Virtual Terminals.
5594 # This is the default if the system supports it, and
5595 # if locking support is included (--enable-locking.)
5596 # --disable-vt-locking Do not allow locking of VTs, even if locking is
5598 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
5599 #if test "$enable_vt_locking" = yes; then
5601 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
5602 # [AC_TRY_COMPILE([#include <fcntl.h>
5603 # #include <sys/ioctl.h>
5604 # #include <sys/vt.h>],
5605 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
5606 # [ac_cv_vt_lockswitch=yes],
5607 # [ac_cv_vt_lockswitch=no])])
5608 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
5610 #elif test "$enable_vt_locking" = no; then
5613 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
5617 #if test "$ac_vt_lockswitch" = yes; then
5618 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
5619 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
5620 # # #### but it doesn't work yet, so don't worry about that for now.
5626 ###############################################################################
5630 ###############################################################################
5634 # Solaris systems tend to come with PAM misconfigured.
5635 # Don't build it by default, even if the headers exist.
5639 # Default to building PAM support on all other systems, if it exists.
5640 with_pam_default=yes
5645 with_pam_req=unspecified
5647 # Check whether --with-pam or --without-pam was given.
5648 if test "${with_pam+set}" = set; then
5650 with_pam="$withval"; with_pam_req="$withval"
5652 with_pam=$with_pam_default
5662 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
5663 echo "configure:5675: checking for PAM headers" >&5
5666 X_CFLAGS="-I$d $X_CFLAGS"
5667 echo "$ac_t""$d" 1>&6
5669 echo "$ac_t""not found ($d: no such directory)" 1>&6
5672 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
5673 echo "configure:5685: checking for PAM libs" >&5
5676 X_LIBS="-L$d $X_LIBS"
5677 echo "$ac_t""$d" 1>&6
5679 echo "$ac_t""not found ($d: no such directory)" 1>&6
5682 # replace the directory string with "yes".
5684 with_pam=$with_pam_req
5689 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
5690 echo " If it is a directory, then \`DIR/include' will be added to"
5691 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5697 if test "$enable_locking" = yes -a "$with_pam" = yes; then
5698 echo $ac_n "checking for PAM""... $ac_c" 1>&6
5699 echo "configure:5711: checking for PAM" >&5
5700 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
5701 echo $ac_n "(cached) $ac_c" 1>&6
5704 ac_save_CPPFLAGS="$CPPFLAGS"
5705 if test \! -z "$includedir" ; then
5706 CPPFLAGS="$CPPFLAGS -I$includedir"
5708 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5709 cat > conftest.$ac_ext <<EOF
5710 #line 5722 "configure"
5711 #include "confdefs.h"
5712 #include <security/pam_appl.h>
5717 if { (eval echo configure:5729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5721 echo "configure: failed program was:" >&5
5722 cat conftest.$ac_ext >&5
5727 CPPFLAGS="$ac_save_CPPFLAGS"
5730 echo "$ac_t""$ac_cv_pam" 1>&6
5731 if test "$ac_cv_pam" = yes ; then
5733 cat >> confdefs.h <<\EOF
5737 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
5739 # libpam typically requires dlopen and dlsym. On FreeBSD,
5740 # those are in libc. On Linux and Solaris, they're in libdl.
5741 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5742 echo "configure:5754: checking for dlopen in -ldl" >&5
5743 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5744 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5745 echo $ac_n "(cached) $ac_c" 1>&6
5747 ac_save_LIBS="$LIBS"
5749 cat > conftest.$ac_ext <<EOF
5750 #line 5762 "configure"
5751 #include "confdefs.h"
5752 /* Override any gcc2 internal prototype to avoid an error. */
5753 /* We use char because int might match the return type of a gcc2
5754 builtin and then its argument prototype would still apply. */
5761 if { (eval echo configure:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5763 eval "ac_cv_lib_$ac_lib_var=yes"
5765 echo "configure: failed program was:" >&5
5766 cat conftest.$ac_ext >&5
5768 eval "ac_cv_lib_$ac_lib_var=no"
5771 LIBS="$ac_save_LIBS"
5774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5775 echo "$ac_t""yes" 1>&6
5776 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5778 echo "$ac_t""no" 1>&6
5782 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5783 echo "configure:5795: checking how to call pam_strerror" >&5
5784 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5785 echo $ac_n "(cached) $ac_c" 1>&6
5787 cat > conftest.$ac_ext <<EOF
5788 #line 5800 "configure"
5789 #include "confdefs.h"
5792 #include <security/pam_appl.h>
5794 pam_handle_t *pamh = 0;
5795 char *s = pam_strerror(pamh, PAM_SUCCESS);
5798 if { (eval echo configure:5810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5800 ac_pam_strerror_args=2
5802 echo "configure: failed program was:" >&5
5803 cat conftest.$ac_ext >&5
5805 cat > conftest.$ac_ext <<EOF
5806 #line 5818 "configure"
5807 #include "confdefs.h"
5810 #include <security/pam_appl.h>
5813 pam_strerror(PAM_SUCCESS);
5816 if { (eval echo configure:5828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5818 ac_pam_strerror_args=1
5820 echo "configure: failed program was:" >&5
5821 cat conftest.$ac_ext >&5
5823 ac_pam_strerror_args=0
5828 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5831 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5832 if test "$ac_pam_strerror_args" = 1 ; then
5833 echo "$ac_t""one argument" 1>&6
5834 elif test "$ac_pam_strerror_args" = 2 ; then
5835 cat >> confdefs.h <<\EOF
5836 #define PAM_STRERROR_TWO_ARGS 1
5839 echo "$ac_t""two arguments" 1>&6
5841 echo "$ac_t""unknown" 1>&6
5847 ###############################################################################
5849 # Check for Kerberos.
5851 ###############################################################################
5855 with_kerberos_req=unspecified
5857 # Check whether --with-kerberos or --without-kerberos was given.
5858 if test "${with_kerberos+set}" = set; then
5859 withval="$with_kerberos"
5860 with_kerberos="$withval"; with_kerberos_req="$withval"
5867 case "$with_kerberos" in
5872 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5873 echo "configure:5885: checking for Kerberos headers" >&5
5874 d=$with_kerberos/include
5876 X_CFLAGS="-I$d $X_CFLAGS"
5877 echo "$ac_t""$d" 1>&6
5879 echo "$ac_t""not found ($d: no such directory)" 1>&6
5882 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5883 echo "configure:5895: checking for Kerberos libs" >&5
5884 d=$with_kerberos/lib
5886 X_LIBS="-L$d $X_LIBS"
5887 echo "$ac_t""$d" 1>&6
5889 echo "$ac_t""not found ($d: no such directory)" 1>&6
5892 # replace the directory string with "yes".
5893 with_kerberos_req="yes"
5894 with_kerberos=$with_kerberos_req
5899 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5900 echo " If it is a directory, then \`DIR/include' will be added to"
5901 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5907 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5908 echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
5909 echo "configure:5921: checking for Kerberos 4" >&5
5910 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5911 echo $ac_n "(cached) $ac_c" 1>&6
5914 ac_save_CPPFLAGS="$CPPFLAGS"
5915 if test \! -z "$includedir" ; then
5916 CPPFLAGS="$CPPFLAGS -I$includedir"
5918 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5919 cat > conftest.$ac_ext <<EOF
5920 #line 5932 "configure"
5921 #include "confdefs.h"
5927 if { (eval echo configure:5939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5931 echo "configure: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
5937 CPPFLAGS="$ac_save_CPPFLAGS"
5940 echo "$ac_t""$ac_cv_kerberos" 1>&6
5941 echo $ac_n "checking for Kerberos 5""... $ac_c" 1>&6
5942 echo "configure:5954: checking for Kerberos 5" >&5
5943 if eval "test \"`echo '$''{'ac_cv_kerberos5'+set}'`\" = set"; then
5944 echo $ac_n "(cached) $ac_c" 1>&6
5947 ac_save_CPPFLAGS="$CPPFLAGS"
5948 if test \! -z "$includedir" ; then
5949 CPPFLAGS="$CPPFLAGS -I$includedir"
5951 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5952 cat > conftest.$ac_ext <<EOF
5953 #line 5965 "configure"
5954 #include "confdefs.h"
5955 #include <kerberosIV/krb.h>
5960 if { (eval echo configure:5972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5964 echo "configure: failed program was:" >&5
5965 cat conftest.$ac_ext >&5
5970 CPPFLAGS="$ac_save_CPPFLAGS"
5973 echo "$ac_t""$ac_cv_kerberos5" 1>&6
5975 if test "$ac_cv_kerberos" = yes ; then
5977 cat >> confdefs.h <<\EOF
5978 #define HAVE_KERBEROS 1
5983 if test "$ac_cv_kerberos5" = yes ; then
5986 cat >> confdefs.h <<\EOF
5987 #define HAVE_KERBEROS 1
5990 cat >> confdefs.h <<\EOF
5991 #define HAVE_KERBEROS5 1
5996 if test "$have_kerberos5" = yes ; then
5997 # from Matt Knopp <mhat@infocalypse.netlag.com>
5998 # (who got it from amu@mit.edu)
5999 PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
6000 elif test "$have_kerberos" = yes ; then
6001 # from Tim Showalter <tjs+@andrew.cmu.edu>
6002 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
6005 if test "$have_kerberos" = yes ; then
6006 echo $ac_n "checking for res_search""... $ac_c" 1>&6
6007 echo "configure:6019: checking for res_search" >&5
6008 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
6009 echo $ac_n "(cached) $ac_c" 1>&6
6011 cat > conftest.$ac_ext <<EOF
6012 #line 6024 "configure"
6013 #include "confdefs.h"
6014 /* System header to define __stub macros and hopefully few prototypes,
6015 which can conflict with char res_search(); below. */
6017 /* Override any gcc2 internal prototype to avoid an error. */
6018 /* We use char because int might match the return type of a gcc2
6019 builtin and then its argument prototype would still apply. */
6024 /* The GNU C library defines this for functions which it implements
6025 to always fail with ENOSYS. Some functions are actually named
6026 something starting with __ and the normal name is an alias. */
6027 #if defined (__stub_res_search) || defined (__stub___res_search)
6035 if { (eval echo configure:6047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6037 eval "ac_cv_func_res_search=yes"
6039 echo "configure: failed program was:" >&5
6040 cat conftest.$ac_ext >&5
6042 eval "ac_cv_func_res_search=no"
6047 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
6048 echo "$ac_t""yes" 1>&6
6051 echo "$ac_t""no" 1>&6
6052 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
6053 echo "configure:6065: checking for res_search in -lresolv" >&5
6054 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
6055 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6056 echo $ac_n "(cached) $ac_c" 1>&6
6058 ac_save_LIBS="$LIBS"
6059 LIBS="-lresolv $LIBS"
6060 cat > conftest.$ac_ext <<EOF
6061 #line 6073 "configure"
6062 #include "confdefs.h"
6063 /* Override any gcc2 internal prototype to avoid an error. */
6064 /* We use char because int might match the return type of a gcc2
6065 builtin and then its argument prototype would still apply. */
6072 if { (eval echo configure:6084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6074 eval "ac_cv_lib_$ac_lib_var=yes"
6076 echo "configure: failed program was:" >&5
6077 cat conftest.$ac_ext >&5
6079 eval "ac_cv_lib_$ac_lib_var=no"
6082 LIBS="$ac_save_LIBS"
6085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6086 echo "$ac_t""yes" 1>&6
6087 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
6089 echo "$ac_t""no" 1>&6
6090 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
6100 ###############################################################################
6102 # Check for the nine billion variants of shadow passwords...
6104 ###############################################################################
6109 with_shadow_req=unspecified
6111 # Check whether --with-shadow or --without-shadow was given.
6112 if test "${with_shadow+set}" = set; then
6113 withval="$with_shadow"
6114 with_shadow="$withval"; with_shadow_req="$withval"
6121 case "$with_shadow" in
6126 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
6127 echo "configure:6139: checking for shadow password headers" >&5
6128 d=$with_shadow/include
6130 X_CFLAGS="-I$d $X_CFLAGS"
6131 echo "$ac_t""$d" 1>&6
6133 echo "$ac_t""not found ($d: no such directory)" 1>&6
6136 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
6137 echo "configure:6149: checking for shadow password libs" >&5
6140 X_LIBS="-L$d $X_LIBS"
6141 echo "$ac_t""$d" 1>&6
6143 echo "$ac_t""not found ($d: no such directory)" 1>&6
6146 # replace the directory string with "yes".
6147 with_shadow_req="yes"
6148 with_shadow=$with_shadow_req
6153 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
6154 echo " If it is a directory, then \`DIR/include' will be added to"
6155 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6161 if test "$enable_locking" = no ; then
6167 ###############################################################################
6169 # Check for Sun "adjunct" passwords.
6171 ###############################################################################
6173 if test "$with_shadow" = yes ; then
6174 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
6175 echo "configure:6187: checking for Sun-style shadow passwords" >&5
6176 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
6177 echo $ac_n "(cached) $ac_c" 1>&6
6180 ac_save_CPPFLAGS="$CPPFLAGS"
6181 if test \! -z "$includedir" ; then
6182 CPPFLAGS="$CPPFLAGS -I$includedir"
6184 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6185 cat > conftest.$ac_ext <<EOF
6186 #line 6198 "configure"
6187 #include "confdefs.h"
6190 #include <sys/types.h>
6191 #include <sys/label.h>
6192 #include <sys/audit.h>
6195 struct passwd_adjunct *p = getpwanam("nobody");
6196 const char *pw = p->pwa_passwd;
6199 if { (eval echo configure:6211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6201 ac_cv_sun_adjunct=yes
6203 echo "configure: failed program was:" >&5
6204 cat conftest.$ac_ext >&5
6206 ac_cv_sun_adjunct=no
6209 CPPFLAGS="$ac_save_CPPFLAGS"
6212 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
6213 if test "$ac_cv_sun_adjunct" = yes; then
6214 have_shadow_adjunct=yes
6221 ###############################################################################
6223 # Check for DEC and SCO so-called "enhanced" security.
6225 ###############################################################################
6227 if test "$with_shadow" = yes ; then
6228 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
6229 echo "configure:6241: checking for DEC-style shadow passwords" >&5
6230 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
6231 echo $ac_n "(cached) $ac_c" 1>&6
6234 ac_save_CPPFLAGS="$CPPFLAGS"
6235 if test \! -z "$includedir" ; then
6236 CPPFLAGS="$CPPFLAGS -I$includedir"
6238 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6239 cat > conftest.$ac_ext <<EOF
6240 #line 6252 "configure"
6241 #include "confdefs.h"
6244 #include <sys/types.h>
6246 #include <sys/security.h>
6249 struct pr_passwd *p;
6251 set_auth_parameters(0, 0);
6252 check_auth_parameters();
6253 p = getprpwnam("nobody");
6254 pw = p->ufld.fd_encrypt;
6257 if { (eval echo configure:6269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6259 ac_cv_enhanced_passwd=yes
6261 echo "configure: failed program was:" >&5
6262 cat conftest.$ac_ext >&5
6264 ac_cv_enhanced_passwd=no
6267 CPPFLAGS="$ac_save_CPPFLAGS"
6270 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
6271 if test $ac_cv_enhanced_passwd = yes; then
6272 have_shadow_enhanced=yes
6276 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
6277 # (I'm told it needs -lcurses too, but I don't understand why.)
6278 # But on DEC, it's in -lsecurity.
6280 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
6281 echo "configure:6293: checking for getprpwnam in -lprot" >&5
6282 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
6283 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6284 echo $ac_n "(cached) $ac_c" 1>&6
6286 ac_save_LIBS="$LIBS"
6287 LIBS="-lprot -lx $LIBS"
6288 cat > conftest.$ac_ext <<EOF
6289 #line 6301 "configure"
6290 #include "confdefs.h"
6291 /* Override any gcc2 internal prototype to avoid an error. */
6292 /* We use char because int might match the return type of a gcc2
6293 builtin and then its argument prototype would still apply. */
6300 if { (eval echo configure:6312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6302 eval "ac_cv_lib_$ac_lib_var=yes"
6304 echo "configure: failed program was:" >&5
6305 cat conftest.$ac_ext >&5
6307 eval "ac_cv_lib_$ac_lib_var=no"
6310 LIBS="$ac_save_LIBS"
6313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6314 echo "$ac_t""yes" 1>&6
6315 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
6317 echo "$ac_t""no" 1>&6
6318 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
6319 echo "configure:6331: checking for getprpwnam in -lsecurity" >&5
6320 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
6321 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6322 echo $ac_n "(cached) $ac_c" 1>&6
6324 ac_save_LIBS="$LIBS"
6325 LIBS="-lsecurity $LIBS"
6326 cat > conftest.$ac_ext <<EOF
6327 #line 6339 "configure"
6328 #include "confdefs.h"
6329 /* Override any gcc2 internal prototype to avoid an error. */
6330 /* We use char because int might match the return type of a gcc2
6331 builtin and then its argument prototype would still apply. */
6338 if { (eval echo configure:6350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6340 eval "ac_cv_lib_$ac_lib_var=yes"
6342 echo "configure: failed program was:" >&5
6343 cat conftest.$ac_ext >&5
6345 eval "ac_cv_lib_$ac_lib_var=no"
6348 LIBS="$ac_save_LIBS"
6351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6352 echo "$ac_t""yes" 1>&6
6353 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
6355 echo "$ac_t""no" 1>&6
6363 ###############################################################################
6365 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
6367 ###############################################################################
6369 if test "$with_shadow" = yes ; then
6370 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
6371 echo "configure:6383: checking for HP-style shadow passwords" >&5
6372 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
6373 echo $ac_n "(cached) $ac_c" 1>&6
6376 ac_save_CPPFLAGS="$CPPFLAGS"
6377 if test \! -z "$includedir" ; then
6378 CPPFLAGS="$CPPFLAGS -I$includedir"
6380 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6381 cat > conftest.$ac_ext <<EOF
6382 #line 6394 "configure"
6383 #include "confdefs.h"
6386 #include <sys/types.h>
6388 #include <hpsecurity.h>
6391 struct s_passwd *p = getspwnam("nobody");
6392 const char *pw = p->pw_passwd;
6395 if { (eval echo configure:6407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6397 ac_cv_hpux_passwd=yes
6399 echo "configure: failed program was:" >&5
6400 cat conftest.$ac_ext >&5
6402 ac_cv_hpux_passwd=no
6405 CPPFLAGS="$ac_save_CPPFLAGS"
6408 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
6409 if test "$ac_cv_hpux_passwd" = yes; then
6410 have_shadow_hpux=yes
6414 # on HPUX, bigcrypt is in -lsec
6415 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
6416 echo "configure:6428: checking for bigcrypt in -lsec" >&5
6417 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
6418 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6419 echo $ac_n "(cached) $ac_c" 1>&6
6421 ac_save_LIBS="$LIBS"
6423 cat > conftest.$ac_ext <<EOF
6424 #line 6436 "configure"
6425 #include "confdefs.h"
6426 /* Override any gcc2 internal prototype to avoid an error. */
6427 /* We use char because int might match the return type of a gcc2
6428 builtin and then its argument prototype would still apply. */
6435 if { (eval echo configure:6447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6437 eval "ac_cv_lib_$ac_lib_var=yes"
6439 echo "configure: failed program was:" >&5
6440 cat conftest.$ac_ext >&5
6442 eval "ac_cv_lib_$ac_lib_var=no"
6445 LIBS="$ac_save_LIBS"
6448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6449 echo "$ac_t""yes" 1>&6
6450 PASSWD_LIBS="$PASSWD_LIBS -lsec"
6452 echo "$ac_t""no" 1>&6
6459 ###############################################################################
6461 # Check for FreeBSD-style shadow passwords.
6463 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
6464 # password systems -- except you only get stuff in the pw_passwd field
6465 # if the running program is setuid. So, guess that we've got this
6466 # lossage to contend with if /etc/master.passwd exists, and default to
6467 # a setuid installation.
6469 ###############################################################################
6471 if test "$with_shadow" = yes ; then
6472 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
6473 echo "configure:6485: checking for FreeBSD-style shadow passwords" >&5
6474 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
6475 echo $ac_n "(cached) $ac_c" 1>&6
6477 if test -f /etc/master.passwd ; then
6478 ac_cv_master_passwd=yes
6480 ac_cv_master_passwd=no
6484 echo "$ac_t""$ac_cv_master_passwd" 1>&6
6485 if test "$ac_cv_master_passwd" = yes; then
6491 ###############################################################################
6493 # Check for traditional (ha!) shadow passwords.
6495 ###############################################################################
6497 if test "$with_shadow" = yes ; then
6498 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
6499 echo "configure:6511: checking for generic shadow passwords" >&5
6500 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
6501 echo $ac_n "(cached) $ac_c" 1>&6
6504 ac_save_CPPFLAGS="$CPPFLAGS"
6505 if test \! -z "$includedir" ; then
6506 CPPFLAGS="$CPPFLAGS -I$includedir"
6508 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6509 cat > conftest.$ac_ext <<EOF
6510 #line 6522 "configure"
6511 #include "confdefs.h"
6514 #include <sys/types.h>
6518 struct spwd *p = getspnam("nobody");
6519 const char *pw = p->sp_pwdp;
6522 if { (eval echo configure:6534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6526 echo "configure: failed program was:" >&5
6527 cat conftest.$ac_ext >&5
6532 CPPFLAGS="$ac_save_CPPFLAGS"
6535 echo "$ac_t""$ac_cv_shadow" 1>&6
6536 if test "$ac_cv_shadow" = yes; then
6540 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
6542 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
6543 echo "configure:6555: checking for getspnam in -lc" >&5
6544 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
6545 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6546 echo $ac_n "(cached) $ac_c" 1>&6
6548 ac_save_LIBS="$LIBS"
6550 cat > conftest.$ac_ext <<EOF
6551 #line 6563 "configure"
6552 #include "confdefs.h"
6553 /* Override any gcc2 internal prototype to avoid an error. */
6554 /* We use char because int might match the return type of a gcc2
6555 builtin and then its argument prototype would still apply. */
6562 if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6564 eval "ac_cv_lib_$ac_lib_var=yes"
6566 echo "configure: failed program was:" >&5
6567 cat conftest.$ac_ext >&5
6569 eval "ac_cv_lib_$ac_lib_var=no"
6572 LIBS="$ac_save_LIBS"
6575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6576 echo "$ac_t""yes" 1>&6
6579 echo "$ac_t""no" 1>&6
6582 if test "$have_getspnam" = no ; then
6583 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
6584 echo "configure:6596: checking for getspnam in -lgen" >&5
6585 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
6586 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6587 echo $ac_n "(cached) $ac_c" 1>&6
6589 ac_save_LIBS="$LIBS"
6591 cat > conftest.$ac_ext <<EOF
6592 #line 6604 "configure"
6593 #include "confdefs.h"
6594 /* Override any gcc2 internal prototype to avoid an error. */
6595 /* We use char because int might match the return type of a gcc2
6596 builtin and then its argument prototype would still apply. */
6603 if { (eval echo configure:6615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6605 eval "ac_cv_lib_$ac_lib_var=yes"
6607 echo "configure: failed program was:" >&5
6608 cat conftest.$ac_ext >&5
6610 eval "ac_cv_lib_$ac_lib_var=no"
6613 LIBS="$ac_save_LIBS"
6616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6617 echo "$ac_t""yes" 1>&6
6618 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
6620 echo "$ac_t""no" 1>&6
6628 ###############################################################################
6630 # Check for other libraries needed for non-shadow passwords.
6632 ###############################################################################
6634 if test "$enable_locking" = yes ; then
6636 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
6638 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
6639 echo "configure:6651: checking for crypt in -lc" >&5
6640 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
6641 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6642 echo $ac_n "(cached) $ac_c" 1>&6
6644 ac_save_LIBS="$LIBS"
6646 cat > conftest.$ac_ext <<EOF
6647 #line 6659 "configure"
6648 #include "confdefs.h"
6649 /* Override any gcc2 internal prototype to avoid an error. */
6650 /* We use char because int might match the return type of a gcc2
6651 builtin and then its argument prototype would still apply. */
6658 if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6660 eval "ac_cv_lib_$ac_lib_var=yes"
6662 echo "configure: failed program was:" >&5
6663 cat conftest.$ac_ext >&5
6665 eval "ac_cv_lib_$ac_lib_var=no"
6668 LIBS="$ac_save_LIBS"
6671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6672 echo "$ac_t""yes" 1>&6
6675 echo "$ac_t""no" 1>&6
6678 if test "$have_crypt" = no ; then
6679 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6680 echo "configure:6692: checking for crypt in -lcrypt" >&5
6681 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6682 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6683 echo $ac_n "(cached) $ac_c" 1>&6
6685 ac_save_LIBS="$LIBS"
6686 LIBS="-lcrypt $LIBS"
6687 cat > conftest.$ac_ext <<EOF
6688 #line 6700 "configure"
6689 #include "confdefs.h"
6690 /* Override any gcc2 internal prototype to avoid an error. */
6691 /* We use char because int might match the return type of a gcc2
6692 builtin and then its argument prototype would still apply. */
6699 if { (eval echo configure:6711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6701 eval "ac_cv_lib_$ac_lib_var=yes"
6703 echo "configure: failed program was:" >&5
6704 cat conftest.$ac_ext >&5
6706 eval "ac_cv_lib_$ac_lib_var=no"
6709 LIBS="$ac_save_LIBS"
6712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6713 echo "$ac_t""yes" 1>&6
6714 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
6716 echo "$ac_t""no" 1>&6
6723 # Most of the above shadow mechanisms will have set need_setuid to yes,
6724 # if they were found. But, on some systems, we need setuid even when
6725 # using plain old vanilla passwords.
6727 if test "$enable_locking" = yes ; then
6729 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
6736 if test "$have_shadow_adjunct" = yes ; then
6737 cat >> confdefs.h <<\EOF
6738 #define HAVE_ADJUNCT_PASSWD 1
6741 elif test "$have_shadow_enhanced" = yes ; then
6742 cat >> confdefs.h <<\EOF
6743 #define HAVE_ENHANCED_PASSWD 1
6746 elif test "$have_shadow_hpux" = yes ; then
6747 cat >> confdefs.h <<\EOF
6748 #define HAVE_HPUX_PASSWD 1
6751 elif test "$have_shadow" = yes ; then
6752 cat >> confdefs.h <<\EOF
6753 #define HAVE_SHADOW_PASSWD 1
6759 ###############################################################################
6763 ###############################################################################
6766 with_motif_req=unspecified
6767 # Check whether --with-motif or --without-motif was given.
6768 if test "${with_motif+set}" = set; then
6769 withval="$with_motif"
6770 with_motif="$withval"; with_motif_req="$withval"
6777 case "$with_motif" in
6782 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
6783 echo "configure:6795: checking for Motif headers" >&5
6784 d=$with_motif/include
6786 X_CFLAGS="-I$d $X_CFLAGS"
6787 echo "$ac_t""$d" 1>&6
6789 echo "$ac_t""not found ($d: no such directory)" 1>&6
6792 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
6793 echo "configure:6805: checking for Motif libs" >&5
6796 X_LIBS="-L$d $X_LIBS"
6797 echo "$ac_t""$d" 1>&6
6799 echo "$ac_t""not found ($d: no such directory)" 1>&6
6802 # replace the directory string with "yes".
6803 with_motif_req="yes"
6804 with_motif=$with_motif_req
6809 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6810 echo " If it is a directory, then \`DIR/include' will be added to"
6811 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6817 if test "$with_motif" != yes -a "$with_motif" != no ; then
6818 echo "error: must be yes or no: --with-motif=$with_motif"
6822 if test "$with_motif" = yes; then
6825 ac_save_CPPFLAGS="$CPPFLAGS"
6826 if test \! -z "$includedir" ; then
6827 CPPFLAGS="$CPPFLAGS -I$includedir"
6829 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6830 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6831 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6832 echo "configure:6844: checking for Xm/Xm.h" >&5
6833 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6834 echo $ac_n "(cached) $ac_c" 1>&6
6836 cat > conftest.$ac_ext <<EOF
6837 #line 6849 "configure"
6838 #include "confdefs.h"
6841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6842 { (eval echo configure:6854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6844 if test -z "$ac_err"; then
6846 eval "ac_cv_header_$ac_safe=yes"
6849 echo "configure: failed program was:" >&5
6850 cat conftest.$ac_ext >&5
6852 eval "ac_cv_header_$ac_safe=no"
6856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6857 echo "$ac_t""yes" 1>&6
6859 cat >> confdefs.h <<\EOF
6860 #define HAVE_MOTIF 1
6863 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6865 echo "$ac_t""no" 1>&6
6868 CPPFLAGS="$ac_save_CPPFLAGS"
6872 if test "$have_motif" = yes; then
6874 ac_save_CPPFLAGS="$CPPFLAGS"
6875 if test \! -z "$includedir" ; then
6876 CPPFLAGS="$CPPFLAGS -I$includedir"
6878 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6879 ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
6880 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
6881 echo "configure:6893: checking for Xm/ComboBox.h" >&5
6882 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6883 echo $ac_n "(cached) $ac_c" 1>&6
6885 cat > conftest.$ac_ext <<EOF
6886 #line 6898 "configure"
6887 #include "confdefs.h"
6888 #include <Xm/ComboBox.h>
6890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6891 { (eval echo configure:6903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6893 if test -z "$ac_err"; then
6895 eval "ac_cv_header_$ac_safe=yes"
6898 echo "configure: failed program was:" >&5
6899 cat conftest.$ac_ext >&5
6901 eval "ac_cv_header_$ac_safe=no"
6905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6906 echo "$ac_t""yes" 1>&6
6907 cat >> confdefs.h <<\EOF
6908 #define HAVE_XMCOMBOBOX 1
6912 echo "$ac_t""no" 1>&6
6915 CPPFLAGS="$ac_save_CPPFLAGS"
6919 ###############################################################################
6921 # Check for -lgtk (and Gnome stuff)
6923 ###############################################################################
6926 with_gtk_req=unspecified
6927 # Check whether --with-gtk or --without-gtk was given.
6928 if test "${with_gtk+set}" = set; then
6930 with_gtk="$withval"; with_gtk_req="$withval"
6936 # if --with-gtk=/directory/ was specified, remember that directory so that
6937 # we can also look for the `gtk-config' program in that directory.
6953 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6954 echo "configure:6966: checking for Gtk headers" >&5
6957 X_CFLAGS="-I$d $X_CFLAGS"
6958 echo "$ac_t""$d" 1>&6
6960 echo "$ac_t""not found ($d: no such directory)" 1>&6
6963 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6964 echo "configure:6976: checking for Gtk libs" >&5
6967 X_LIBS="-L$d $X_LIBS"
6968 echo "$ac_t""$d" 1>&6
6970 echo "$ac_t""not found ($d: no such directory)" 1>&6
6973 # replace the directory string with "yes".
6975 with_gtk=$with_gtk_req
6980 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6981 echo " If it is a directory, then \`DIR/include' will be added to"
6982 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6988 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6989 echo "error: must be yes or no: --with-gtk=$with_gtk"
6994 with_gnome_req=unspecified
6995 # Check whether --with-gnome or --without-gnome was given.
6996 if test "${with_gnome+set}" = set; then
6997 withval="$with_gnome"
6998 with_gnome="$withval"; with_gnome_req="$withval"
7004 # if --with-gnome=/directory/ was specified, remember that directory so that
7005 # we can also look for the `gnome-config' program in that directory.
7006 case "$with_gnome" in
7008 gnome_dir="$with_gnome"
7016 case "$with_gnome" in
7021 echo $ac_n "checking for Gnome headers""... $ac_c" 1>&6
7022 echo "configure:7034: checking for Gnome headers" >&5
7023 d=$with_gnome/include
7025 X_CFLAGS="-I$d $X_CFLAGS"
7026 echo "$ac_t""$d" 1>&6
7028 echo "$ac_t""not found ($d: no such directory)" 1>&6
7031 echo $ac_n "checking for Gnome libs""... $ac_c" 1>&6
7032 echo "configure:7044: checking for Gnome libs" >&5
7035 X_LIBS="-L$d $X_LIBS"
7036 echo "$ac_t""$d" 1>&6
7038 echo "$ac_t""not found ($d: no such directory)" 1>&6
7041 # replace the directory string with "yes".
7042 with_gnome_req="yes"
7043 with_gnome=$with_gnome_req
7048 echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
7049 echo " If it is a directory, then \`DIR/include' will be added to"
7050 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7056 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
7057 echo "error: must be yes or no: --with-gnome=$with_gnome"
7063 if test "$with_gtk" = yes; then
7066 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
7067 # for glib-config and gtk-config.
7071 if test ! -z "$gtk_dir"; then
7072 # canonicalize slashes.
7073 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
7074 gtk_path="$gtk_dir:$gtk_path"
7077 if test ! -z "gnome_dir"; then
7078 # canonicalize slashes.
7079 gnome_dir=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
7080 gtk_path="$gnome_dir:$gtk_path"
7083 for ac_prog in glib12-config glib-config
7085 # Extract the first word of "$ac_prog", so it can be a program name with args.
7086 set dummy $ac_prog; ac_word=$2
7087 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7088 echo "configure:7100: checking for $ac_word" >&5
7089 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
7090 echo $ac_n "(cached) $ac_c" 1>&6
7092 case "$glib_config" in
7094 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
7097 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
7100 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7101 ac_dummy="$gtk_path"
7102 for ac_dir in $ac_dummy; do
7103 test -z "$ac_dir" && ac_dir=.
7104 if test -f $ac_dir/$ac_word; then
7105 ac_cv_path_glib_config="$ac_dir/$ac_word"
7113 glib_config="$ac_cv_path_glib_config"
7114 if test -n "$glib_config"; then
7115 echo "$ac_t""$glib_config" 1>&6
7117 echo "$ac_t""no" 1>&6
7120 test -n "$glib_config" && break
7123 for ac_prog in gtk12-config gtk-config
7125 # Extract the first word of "$ac_prog", so it can be a program name with args.
7126 set dummy $ac_prog; ac_word=$2
7127 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7128 echo "configure:7140: checking for $ac_word" >&5
7129 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
7130 echo $ac_n "(cached) $ac_c" 1>&6
7132 case "$gtk_config" in
7134 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
7137 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
7140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7141 ac_dummy="$gtk_path"
7142 for ac_dir in $ac_dummy; do
7143 test -z "$ac_dir" && ac_dir=.
7144 if test -f $ac_dir/$ac_word; then
7145 ac_cv_path_gtk_config="$ac_dir/$ac_word"
7153 gtk_config="$ac_cv_path_gtk_config"
7154 if test -n "$gtk_config"; then
7155 echo "$ac_t""$gtk_config" 1>&6
7157 echo "$ac_t""no" 1>&6
7160 test -n "$gtk_config" && break
7164 if test "$with_gnome" = yes; then
7165 for ac_prog in gnome-config
7167 # Extract the first word of "$ac_prog", so it can be a program name with args.
7168 set dummy $ac_prog; ac_word=$2
7169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7170 echo "configure:7182: checking for $ac_word" >&5
7171 if eval "test \"`echo '$''{'ac_cv_path_gnome_config'+set}'`\" = set"; then
7172 echo $ac_n "(cached) $ac_c" 1>&6
7174 case "$gnome_config" in
7176 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
7179 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a dos path.
7182 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7183 ac_dummy="$gtk_path"
7184 for ac_dir in $ac_dummy; do
7185 test -z "$ac_dir" && ac_dir=.
7186 if test -f $ac_dir/$ac_word; then
7187 ac_cv_path_gnome_config="$ac_dir/$ac_word"
7195 gnome_config="$ac_cv_path_gnome_config"
7196 if test -n "$gnome_config"; then
7197 echo "$ac_t""$gnome_config" 1>&6
7199 echo "$ac_t""no" 1>&6
7202 test -n "$gnome_config" && break
7207 if test -n "$glib_config" -a -n "gtk_config" ; then
7209 if test "$with_gnome" = yes -a -n "$gnome_config" ; then
7214 if test "$have_gtk" = yes; then
7215 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
7216 echo "configure:7228: checking Gtk version number" >&5
7217 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
7218 echo $ac_n "(cached) $ac_c" 1>&6
7220 ac_cv_gtk_version_string=`$gtk_config --version`
7223 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
7224 ac_gtk_version_string=$ac_cv_gtk_version_string
7227 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
7228 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
7230 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
7231 if test -z "$ac_gtk_version"; then
7232 ac_gtk_version=unknown
7233 ac_gtk_version_string=unknown
7235 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
7243 if test "$have_gtk" = yes; then
7244 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
7245 echo "configure:7257: checking for Gtk includes" >&5
7246 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
7247 echo $ac_n "(cached) $ac_c" 1>&6
7249 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
7252 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
7253 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
7254 echo "configure:7266: checking for Gtk libs" >&5
7255 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
7256 echo $ac_n "(cached) $ac_c" 1>&6
7258 ac_cv_gtk_config_libs=`$gtk_config --libs`
7261 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
7263 ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
7264 ac_gtk_config_libs=$ac_cv_gtk_config_libs
7266 # Check for Gnome Capplet support.
7268 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
7269 gnome_config_libs="gtk capplet gnomeui xml"
7270 echo $ac_n "checking for Gnome capplet includes""... $ac_c" 1>&6
7271 echo "configure:7283: checking for Gnome capplet includes" >&5
7272 if eval "test \"`echo '$''{'ac_cv_gnome_config_cflags'+set}'`\" = set"; then
7273 echo $ac_n "(cached) $ac_c" 1>&6
7275 if ( $gnome_config --cflags $gnome_config_libs 2>&1 >/dev/null | \
7276 grep Unknown >/dev/null ) ; then
7277 ac_cv_gnome_config_cflags=''
7279 ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
7283 ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
7284 if test "$ac_gnome_config_cflags" = "" ; then
7286 echo "$ac_t""no" 1>&6
7288 echo "$ac_t""$ac_gnome_config_cflags" 1>&6
7292 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
7293 echo $ac_n "checking for Gnome capplet libs""... $ac_c" 1>&6
7294 echo "configure:7306: checking for Gnome capplet libs" >&5
7295 if eval "test \"`echo '$''{'ac_cv_gnome_config_libs'+set}'`\" = set"; then
7296 echo $ac_n "(cached) $ac_c" 1>&6
7298 if ( $gnome_config --libs $gnome_config_libs 2>&1 >/dev/null |
7299 grep Unknown >/dev/null ) ; then
7300 ac_cv_gnome_config_libs=''
7302 ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
7306 ac_gnome_config_libs=$ac_cv_gnome_config_libs
7307 if test "$ac_gnome_config_libs" = "" ; then
7309 echo "$ac_t""no" 1>&6
7311 echo "$ac_t""$ac_gnome_config_libs" 1>&6
7316 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
7317 GNOME_DATADIR=`$gnome_config --datadir`
7321 # If we have Gnome, then override the gtk-config values with
7322 # the gnome-config values.
7324 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
7325 ac_gtk_config_cflags=$ac_gnome_config_cflags
7326 ac_gtk_config_libs=$ac_gnome_config_libs
7327 cat >> confdefs.h <<\EOF
7328 #define HAVE_CRAPPLET 1
7334 if test "$have_gtk" = yes; then
7335 INCLUDES="$INCLUDES $ac_gtk_config_cflags"
7336 GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
7337 cat >> confdefs.h <<\EOF
7346 # Check for the Gnome Help Browser.
7348 if test "$have_gnome" = yes; then
7349 # Extract the first word of "gnome-help-browser", so it can be a program name with args.
7350 set dummy gnome-help-browser; ac_word=$2
7351 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7352 echo "configure:7364: checking for $ac_word" >&5
7353 if eval "test \"`echo '$''{'ac_cv_prog_have_gnome_help'+set}'`\" = set"; then
7354 echo $ac_n "(cached) $ac_c" 1>&6
7356 if test -n "$have_gnome_help"; then
7357 ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
7359 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7361 for ac_dir in $ac_dummy; do
7362 test -z "$ac_dir" && ac_dir=.
7363 if test -f $ac_dir/$ac_word; then
7364 ac_cv_prog_have_gnome_help="yes"
7369 test -z "$ac_cv_prog_have_gnome_help" && ac_cv_prog_have_gnome_help="no"
7372 have_gnome_help="$ac_cv_prog_have_gnome_help"
7373 if test -n "$have_gnome_help"; then
7374 echo "$ac_t""$have_gnome_help" 1>&6
7376 echo "$ac_t""no" 1>&6
7384 ###############################################################################
7386 # Check for -lxml (if we have Gtk)
7388 ###############################################################################
7391 with_xml_req=unspecified
7392 # Check whether --with-xml or --without-xml was given.
7393 if test "${with_xml+set}" = set; then
7395 with_xml="$withval"; with_xml_req="$withval"
7407 echo $ac_n "checking for XML headers""... $ac_c" 1>&6
7408 echo "configure:7420: checking for XML headers" >&5
7411 X_CFLAGS="-I$d $X_CFLAGS"
7412 echo "$ac_t""$d" 1>&6
7414 echo "$ac_t""not found ($d: no such directory)" 1>&6
7417 echo $ac_n "checking for XML libs""... $ac_c" 1>&6
7418 echo "configure:7430: checking for XML libs" >&5
7421 X_LIBS="-L$d $X_LIBS"
7422 echo "$ac_t""$d" 1>&6
7424 echo "$ac_t""not found ($d: no such directory)" 1>&6
7427 # replace the directory string with "yes".
7429 with_xml=$with_xml_req
7434 echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
7435 echo " If it is a directory, then \`DIR/include' will be added to"
7436 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7442 if test "$with_xml" != yes -a "$with_xml" != no ; then
7443 echo "error: must be yes or no: --with-xml=$with_xml"
7447 if test "$have_gtk" != yes; then
7448 # don't bother if no GTK
7452 if test "$with_xml" = yes; then
7455 # the XML stuff is likely to be in GTK paths.
7456 ac_save_X_CFLAGS="$X_CFLAGS"
7457 ac_save_X_LIBS="$X_LIBS"
7458 X_CFLAGS="$X_CFLAGS $ac_gtk_config_cflags"
7459 X_LIBS="$X_LIBS $ac_gtk_config_libs"
7462 ac_save_CPPFLAGS="$CPPFLAGS"
7463 if test \! -z "$includedir" ; then
7464 CPPFLAGS="$CPPFLAGS -I$includedir"
7466 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7467 ac_safe=`echo "xmlIO.h" | sed 'y%./+-%__p_%'`
7468 echo $ac_n "checking for xmlIO.h""... $ac_c" 1>&6
7469 echo "configure:7481: checking for xmlIO.h" >&5
7470 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7471 echo $ac_n "(cached) $ac_c" 1>&6
7473 cat > conftest.$ac_ext <<EOF
7474 #line 7486 "configure"
7475 #include "confdefs.h"
7478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7479 { (eval echo configure:7491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7481 if test -z "$ac_err"; then
7483 eval "ac_cv_header_$ac_safe=yes"
7486 echo "configure: failed program was:" >&5
7487 cat conftest.$ac_ext >&5
7489 eval "ac_cv_header_$ac_safe=no"
7493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7494 echo "$ac_t""yes" 1>&6
7497 echo "$ac_t""no" 1>&6
7500 CPPFLAGS="$ac_save_CPPFLAGS"
7502 if test "$have_xml" = yes; then
7503 # we have the header, now check for the library
7506 ac_save_CPPFLAGS="$CPPFLAGS"
7507 ac_save_LDFLAGS="$LDFLAGS"
7508 # ac_save_LIBS="$LIBS"
7510 if test \! -z "$includedir" ; then
7511 CPPFLAGS="$CPPFLAGS -I$includedir"
7513 # note: $X_CFLAGS includes $x_includes
7514 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7516 if test \! -z "$libdir" ; then
7517 LDFLAGS="$LDFLAGS -L$libdir"
7519 # note: $X_LIBS includes $x_libraries
7520 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7522 echo $ac_n "checking for xmlParseChunk in -lxml""... $ac_c" 1>&6
7523 echo "configure:7535: checking for xmlParseChunk in -lxml" >&5
7524 ac_lib_var=`echo xml'_'xmlParseChunk | sed 'y%./+-%__p_%'`
7525 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7526 echo $ac_n "(cached) $ac_c" 1>&6
7528 ac_save_LIBS="$LIBS"
7530 cat > conftest.$ac_ext <<EOF
7531 #line 7543 "configure"
7532 #include "confdefs.h"
7533 /* Override any gcc2 internal prototype to avoid an error. */
7534 /* We use char because int might match the return type of a gcc2
7535 builtin and then its argument prototype would still apply. */
7536 char xmlParseChunk();
7542 if { (eval echo configure:7554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7544 eval "ac_cv_lib_$ac_lib_var=yes"
7546 echo "configure: failed program was:" >&5
7547 cat conftest.$ac_ext >&5
7549 eval "ac_cv_lib_$ac_lib_var=no"
7552 LIBS="$ac_save_LIBS"
7555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7556 echo "$ac_t""yes" 1>&6
7559 cat >> confdefs.h <<\EOF
7564 echo "$ac_t""no" 1>&6
7567 CPPFLAGS="$ac_save_CPPFLAGS"
7568 LDFLAGS="$ac_save_LDFLAGS"
7569 # LIBS="$ac_save_LIBS"
7573 X_CFLAGS="$ac_save_X_CFLAGS"
7574 X_LIBS="$ac_save_X_LIBS"
7579 ###############################################################################
7581 # Checking whether Motif is really Lesstif.
7583 ###############################################################################
7586 if test "$have_motif" = yes ; then
7587 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
7588 echo "configure:7600: checking whether Motif is really LessTif" >&5
7589 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
7590 echo $ac_n "(cached) $ac_c" 1>&6
7593 ac_save_CPPFLAGS="$CPPFLAGS"
7594 if test \! -z "$includedir" ; then
7595 CPPFLAGS="$CPPFLAGS -I$includedir"
7597 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7598 cat > conftest.$ac_ext <<EOF
7599 #line 7611 "configure"
7600 #include "confdefs.h"
7603 long vers = LesstifVersion;
7606 if { (eval echo configure:7618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7608 ac_cv_have_lesstif=yes
7610 echo "configure: failed program was:" >&5
7611 cat conftest.$ac_ext >&5
7613 ac_cv_have_lesstif=no
7616 CPPFLAGS="$ac_save_CPPFLAGS"
7619 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
7620 have_lesstif=$ac_cv_have_lesstif
7624 lesstif_version=unknown
7625 lesstif_version_string=unknown
7627 if test "$have_lesstif" = yes ; then
7629 echo unknown > conftest-lt
7630 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
7631 echo "configure:7643: checking LessTif version number" >&5
7632 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
7633 echo $ac_n "(cached) $ac_c" 1>&6
7636 ac_save_CPPFLAGS="$CPPFLAGS"
7637 if test \! -z "$includedir" ; then
7638 CPPFLAGS="$CPPFLAGS -I$includedir"
7640 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7641 if test "$cross_compiling" = yes; then
7642 ac_cv_lesstif_version=unknown
7643 ac_cv_lesstif_version_string=unknown
7645 cat > conftest.$ac_ext <<EOF
7646 #line 7658 "configure"
7647 #include "confdefs.h"
7651 FILE *f = fopen("conftest-lt", "w");
7653 fprintf(f, "%d %d.%d\n", LesstifVersion,
7654 LESSTIF_VERSION, LESSTIF_REVISION);
7659 if { (eval echo configure:7671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7661 ltv=`cat conftest-lt`
7662 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
7663 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
7665 echo "configure: failed program was:" >&5
7666 cat conftest.$ac_ext >&5
7668 ac_cv_lesstif_version=unknown
7669 ac_cv_lesstif_version_string=unknown
7674 CPPFLAGS="$ac_save_CPPFLAGS"
7677 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
7679 lesstif_version=$ac_cv_lesstif_version
7680 lesstif_version_string=$ac_cv_lesstif_version_string
7685 if test "$have_motif" = yes ; then
7687 echo unknown > conftest-mt
7688 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
7689 echo "configure:7701: checking Motif version number" >&5
7690 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
7691 echo $ac_n "(cached) $ac_c" 1>&6
7694 ac_save_CPPFLAGS="$CPPFLAGS"
7695 if test \! -z "$includedir" ; then
7696 CPPFLAGS="$CPPFLAGS -I$includedir"
7698 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7699 if test "$cross_compiling" = yes; then
7700 ac_cv_motif_version=unknown
7701 ac_cv_motif_version_string=unknown
7703 cat > conftest.$ac_ext <<EOF
7704 #line 7716 "configure"
7705 #include "confdefs.h"
7709 FILE *f = fopen("conftest-mt", "w");
7711 fprintf(f, "%d %d.%d\n", XmVersion,
7712 XmVERSION, XmREVISION);
7717 if { (eval echo configure:7729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7719 mtv=`cat conftest-mt`
7720 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
7721 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
7723 echo "configure: failed program was:" >&5
7724 cat conftest.$ac_ext >&5
7726 ac_cv_motif_version=unknown
7727 ac_cv_motif_version_string=unknown
7732 CPPFLAGS="$ac_save_CPPFLAGS"
7735 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
7737 motif_version=$ac_cv_motif_version
7738 motif_version_string=$ac_cv_motif_version_string
7743 ###############################################################################
7745 # Checking whether Motif requires -lXpm.
7747 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
7748 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
7749 # of the library whether to build the XPM code into libXm, or whether
7750 # to rely on an external libXm. So the only way to tell whether XPM is
7751 # a link-time requirement is to examine libXm.a, which is very
7752 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
7753 # always link against XPM if the XPM lib exists (and this will be a
7754 # no-op if libXm happens to already have the XPM code in it.)
7756 ###############################################################################
7758 motif_requires_xpm=no
7759 if test "$have_motif" = yes ; then
7760 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
7761 echo "configure:7773: checking whether Motif requires XPM" >&5
7762 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
7764 motif_requires_xpm=yes
7765 echo "$ac_t""maybe" 1>&6
7767 echo "$ac_t""no" 1>&6
7772 ###############################################################################
7774 # Checking whether Motif requires -lXp.
7776 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
7777 # Extension". Why this extension isn't in -lXext with all the others,
7780 ###############################################################################
7783 if test "$have_motif" = yes ; then
7786 ac_save_CPPFLAGS="$CPPFLAGS"
7787 ac_save_LDFLAGS="$LDFLAGS"
7788 # ac_save_LIBS="$LIBS"
7790 if test \! -z "$includedir" ; then
7791 CPPFLAGS="$CPPFLAGS -I$includedir"
7793 # note: $X_CFLAGS includes $x_includes
7794 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7796 if test \! -z "$libdir" ; then
7797 LDFLAGS="$LDFLAGS -L$libdir"
7799 # note: $X_LIBS includes $x_libraries
7800 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7802 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
7803 echo "configure:7815: checking for XpQueryExtension in -lXp" >&5
7804 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
7805 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7806 echo $ac_n "(cached) $ac_c" 1>&6
7808 ac_save_LIBS="$LIBS"
7809 LIBS="-lXp -lX11 -lXext -lm $LIBS"
7810 cat > conftest.$ac_ext <<EOF
7811 #line 7823 "configure"
7812 #include "confdefs.h"
7813 /* Override any gcc2 internal prototype to avoid an error. */
7814 /* We use char because int might match the return type of a gcc2
7815 builtin and then its argument prototype would still apply. */
7816 char XpQueryExtension();
7822 if { (eval echo configure:7834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7824 eval "ac_cv_lib_$ac_lib_var=yes"
7826 echo "configure: failed program was:" >&5
7827 cat conftest.$ac_ext >&5
7829 eval "ac_cv_lib_$ac_lib_var=no"
7832 LIBS="$ac_save_LIBS"
7835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7836 echo "$ac_t""yes" 1>&6
7837 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
7839 echo "$ac_t""no" 1>&6
7843 CPPFLAGS="$ac_save_CPPFLAGS"
7844 LDFLAGS="$ac_save_LDFLAGS"
7845 # LIBS="$ac_save_LIBS"
7850 ###############################################################################
7852 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
7854 ###############################################################################
7857 if test "$have_motif" = yes ; then
7859 ac_save_CPPFLAGS="$CPPFLAGS"
7860 ac_save_LDFLAGS="$LDFLAGS"
7861 # ac_save_LIBS="$LIBS"
7863 if test \! -z "$includedir" ; then
7864 CPPFLAGS="$CPPFLAGS -I$includedir"
7866 # note: $X_CFLAGS includes $x_includes
7867 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7869 if test \! -z "$libdir" ; then
7870 LDFLAGS="$LDFLAGS -L$libdir"
7872 # note: $X_LIBS includes $x_libraries
7873 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7875 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
7876 echo "configure:7888: checking for _Xsetlocale in -lXintl" >&5
7877 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
7878 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7879 echo $ac_n "(cached) $ac_c" 1>&6
7881 ac_save_LIBS="$LIBS"
7882 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
7883 cat > conftest.$ac_ext <<EOF
7884 #line 7896 "configure"
7885 #include "confdefs.h"
7886 /* Override any gcc2 internal prototype to avoid an error. */
7887 /* We use char because int might match the return type of a gcc2
7888 builtin and then its argument prototype would still apply. */
7895 if { (eval echo configure:7907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7897 eval "ac_cv_lib_$ac_lib_var=yes"
7899 echo "configure: failed program was:" >&5
7900 cat conftest.$ac_ext >&5
7902 eval "ac_cv_lib_$ac_lib_var=no"
7905 LIBS="$ac_save_LIBS"
7908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7909 echo "$ac_t""yes" 1>&6
7912 echo "$ac_t""no" 1>&6
7916 CPPFLAGS="$ac_save_CPPFLAGS"
7917 LDFLAGS="$ac_save_LDFLAGS"
7918 # LIBS="$ac_save_LIBS"
7920 if test "$have_xintl" = yes; then
7921 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
7926 ###############################################################################
7928 # Check for -lGL or -lMesaGL.
7930 ###############################################################################
7934 with_gl_req=unspecified
7936 # Check whether --with-gl or --without-gl was given.
7937 if test "${with_gl+set}" = set; then
7939 with_gl="$withval"; with_gl_req="$withval"
7951 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
7952 echo "configure:7964: checking for GL headers" >&5
7955 X_CFLAGS="-I$d $X_CFLAGS"
7956 echo "$ac_t""$d" 1>&6
7958 echo "$ac_t""not found ($d: no such directory)" 1>&6
7961 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
7962 echo "configure:7974: checking for GL libs" >&5
7965 X_LIBS="-L$d $X_LIBS"
7966 echo "$ac_t""$d" 1>&6
7968 echo "$ac_t""not found ($d: no such directory)" 1>&6
7971 # replace the directory string with "yes".
7973 with_gl=$with_gl_req
7978 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
7979 echo " If it is a directory, then \`DIR/include' will be added to"
7980 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7986 ac_mesagl_version=unknown
7987 ac_mesagl_version_string=unknown
7989 if test "$with_gl" = yes; then
7991 ac_save_CPPFLAGS="$CPPFLAGS"
7992 if test \! -z "$includedir" ; then
7993 CPPFLAGS="$CPPFLAGS -I$includedir"
7995 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7996 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
7997 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
7998 echo "configure:8010: checking for GL/gl.h" >&5
7999 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8000 echo $ac_n "(cached) $ac_c" 1>&6
8002 cat > conftest.$ac_ext <<EOF
8003 #line 8015 "configure"
8004 #include "confdefs.h"
8007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8008 { (eval echo configure:8020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8010 if test -z "$ac_err"; then
8012 eval "ac_cv_header_$ac_safe=yes"
8015 echo "configure: failed program was:" >&5
8016 cat conftest.$ac_ext >&5
8018 eval "ac_cv_header_$ac_safe=no"
8022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8023 echo "$ac_t""yes" 1>&6
8026 echo "$ac_t""no" 1>&6
8029 CPPFLAGS="$ac_save_CPPFLAGS"
8030 if test "$have_gl" = yes ; then
8032 ac_save_CPPFLAGS="$CPPFLAGS"
8033 if test \! -z "$includedir" ; then
8034 CPPFLAGS="$CPPFLAGS -I$includedir"
8036 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8037 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
8038 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
8039 echo "configure:8051: checking for GL/glx.h" >&5
8040 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8041 echo $ac_n "(cached) $ac_c" 1>&6
8043 cat > conftest.$ac_ext <<EOF
8044 #line 8056 "configure"
8045 #include "confdefs.h"
8048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8049 { (eval echo configure:8061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8050 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8051 if test -z "$ac_err"; then
8053 eval "ac_cv_header_$ac_safe=yes"
8056 echo "configure: failed program was:" >&5
8057 cat conftest.$ac_ext >&5
8059 eval "ac_cv_header_$ac_safe=no"
8063 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8064 echo "$ac_t""yes" 1>&6
8067 echo "$ac_t""no" 1>&6
8070 CPPFLAGS="$ac_save_CPPFLAGS"
8073 # If we have the headers, try and figure out which vendor it's from.
8075 if test "$have_gl" = yes ; then
8077 # We need to know whether it's MesaGL so that we know which libraries
8080 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
8081 echo "configure:8093: checking whether GL is really MesaGL" >&5
8082 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
8083 echo $ac_n "(cached) $ac_c" 1>&6
8085 ac_cv_have_mesa_gl=no
8087 ac_save_CPPFLAGS="$CPPFLAGS"
8088 if test \! -z "$includedir" ; then
8089 CPPFLAGS="$CPPFLAGS -I$includedir"
8091 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8092 cat > conftest.$ac_ext <<EOF
8093 #line 8105 "configure"
8094 #include "confdefs.h"
8097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8098 egrep "Mesa|MESA" >/dev/null 2>&1; then
8100 ac_cv_have_mesa_gl=yes
8104 CPPFLAGS="$ac_save_CPPFLAGS"
8108 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
8109 ac_have_mesa_gl=$ac_cv_have_mesa_gl
8116 # Some versions of MesaGL are compiled to require -lpthread.
8117 # So if the Mesa headers exist, and -lpthread exists, then always
8118 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
8120 if test "$ac_have_mesa_gl" = yes; then
8121 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
8122 echo "configure:8134: checking for pthread_create in -lpthread" >&5
8123 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
8124 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8125 echo $ac_n "(cached) $ac_c" 1>&6
8127 ac_save_LIBS="$LIBS"
8128 LIBS="-lpthread $LIBS"
8129 cat > conftest.$ac_ext <<EOF
8130 #line 8142 "configure"
8131 #include "confdefs.h"
8132 /* Override any gcc2 internal prototype to avoid an error. */
8133 /* We use char because int might match the return type of a gcc2
8134 builtin and then its argument prototype would still apply. */
8135 char pthread_create();
8141 if { (eval echo configure:8153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8143 eval "ac_cv_lib_$ac_lib_var=yes"
8145 echo "configure: failed program was:" >&5
8146 cat conftest.$ac_ext >&5
8148 eval "ac_cv_lib_$ac_lib_var=no"
8151 LIBS="$ac_save_LIBS"
8154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8155 echo "$ac_t""yes" 1>&6
8158 echo "$ac_t""no" 1>&6
8164 # If we have Mesa headers, check to see if we can link against -lMesaGL.
8165 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
8166 # Else, warn that GL is busted. (We have the headers, but no libs.)
8169 if test "$ac_have_mesa_gl" = yes ; then
8171 ac_save_CPPFLAGS="$CPPFLAGS"
8172 ac_save_LDFLAGS="$LDFLAGS"
8173 # ac_save_LIBS="$LIBS"
8175 if test \! -z "$includedir" ; then
8176 CPPFLAGS="$CPPFLAGS -I$includedir"
8178 # note: $X_CFLAGS includes $x_includes
8179 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8181 if test \! -z "$libdir" ; then
8182 LDFLAGS="$LDFLAGS -L$libdir"
8184 # note: $X_LIBS includes $x_libraries
8185 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8187 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
8188 echo "configure:8200: checking for glXCreateContext in -lMesaGL" >&5
8189 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
8190 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8191 echo $ac_n "(cached) $ac_c" 1>&6
8193 ac_save_LIBS="$LIBS"
8194 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
8195 cat > conftest.$ac_ext <<EOF
8196 #line 8208 "configure"
8197 #include "confdefs.h"
8198 /* Override any gcc2 internal prototype to avoid an error. */
8199 /* We use char because int might match the return type of a gcc2
8200 builtin and then its argument prototype would still apply. */
8201 char glXCreateContext();
8207 if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8209 eval "ac_cv_lib_$ac_lib_var=yes"
8211 echo "configure: failed program was:" >&5
8212 cat conftest.$ac_ext >&5
8214 eval "ac_cv_lib_$ac_lib_var=no"
8217 LIBS="$ac_save_LIBS"
8220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8221 echo "$ac_t""yes" 1>&6
8223 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
8225 echo "$ac_t""no" 1>&6
8228 CPPFLAGS="$ac_save_CPPFLAGS"
8229 LDFLAGS="$ac_save_LDFLAGS"
8230 # LIBS="$ac_save_LIBS"
8234 if test "$gl_lib_1" = "" ; then
8236 ac_save_CPPFLAGS="$CPPFLAGS"
8237 ac_save_LDFLAGS="$LDFLAGS"
8238 # ac_save_LIBS="$LIBS"
8240 if test \! -z "$includedir" ; then
8241 CPPFLAGS="$CPPFLAGS -I$includedir"
8243 # note: $X_CFLAGS includes $x_includes
8244 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8246 if test \! -z "$libdir" ; then
8247 LDFLAGS="$LDFLAGS -L$libdir"
8249 # note: $X_LIBS includes $x_libraries
8250 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8252 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
8253 echo "configure:8265: checking for glXCreateContext in -lGL" >&5
8254 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
8255 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8256 echo $ac_n "(cached) $ac_c" 1>&6
8258 ac_save_LIBS="$LIBS"
8259 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
8260 cat > conftest.$ac_ext <<EOF
8261 #line 8273 "configure"
8262 #include "confdefs.h"
8263 /* Override any gcc2 internal prototype to avoid an error. */
8264 /* We use char because int might match the return type of a gcc2
8265 builtin and then its argument prototype would still apply. */
8266 char glXCreateContext();
8272 if { (eval echo configure:8284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8274 eval "ac_cv_lib_$ac_lib_var=yes"
8276 echo "configure: failed program was:" >&5
8277 cat conftest.$ac_ext >&5
8279 eval "ac_cv_lib_$ac_lib_var=no"
8282 LIBS="$ac_save_LIBS"
8285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8286 echo "$ac_t""yes" 1>&6
8288 GL_LIBS="-lGL -lGLU $GL_LIBS"
8290 echo "$ac_t""no" 1>&6
8293 CPPFLAGS="$ac_save_CPPFLAGS"
8294 LDFLAGS="$ac_save_LDFLAGS"
8295 # LIBS="$ac_save_LIBS"
8299 if test "$gl_lib_1" = "" ; then
8300 # we have headers, but no libs -- bail.
8305 # linking works -- we can build the GL hacks.
8306 cat >> confdefs.h <<\EOF
8310 if test "$ac_have_mesa_gl" = yes ; then
8311 cat >> confdefs.h <<\EOF
8312 #define HAVE_MESA_GL 1
8320 # Now that we know we have GL headers and libs, do some more GL testing.
8323 if test "$have_gl" = yes ; then
8324 # If it's MesaGL, we'd like to issue a warning if the version number
8325 # is less than or equal to 2.6, because that version had a security bug.
8327 if test "$ac_have_mesa_gl" = yes; then
8329 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
8330 echo "configure:8342: checking MesaGL version number" >&5
8331 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
8332 echo $ac_n "(cached) $ac_c" 1>&6
8334 cat > conftest.$ac_ext <<EOF
8335 #line 8347 "configure"
8336 #include "confdefs.h"
8338 #ifndef MESA_MAJOR_VERSION
8339 # include <GL/xmesa.h>
8340 # define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
8341 # define MESA_MINOR_VERSION XMESA_MINOR_VERSION
8343 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
8346 ac_save_CPPFLAGS="$CPPFLAGS"
8347 if test \! -z "$includedir" ; then
8348 CPPFLAGS="$CPPFLAGS -I$includedir"
8350 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8354 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
8355 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
8358 rm -f conftest.$ac_ext
8360 CPPFLAGS="$ac_save_CPPFLAGS"
8362 if test "$mglv" = ""; then
8363 ac_mesagl_version=unknown
8364 ac_mesagl_version_string=unknown
8366 ac_mesagl_version_string=$mglv
8367 maj=`echo $mglv | sed -n 's/\..*//p'`
8368 min=`echo $mglv | sed -n 's/.*\.//p'`
8369 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
8370 if test -z "$ac_mesagl_version"; then
8371 ac_mesagl_version=unknown
8372 ac_mesagl_version_string=unknown
8375 ac_cv_mesagl_version=$ac_mesagl_version
8376 ac_cv_mesagl_version_string=$ac_mesagl_version_string
8380 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
8381 ac_mesagl_version=$ac_cv_mesagl_version
8382 ac_mesagl_version_string=$ac_cv_mesagl_version_string
8386 # Check for OpenGL 1.1 features.
8389 ac_save_CPPFLAGS="$CPPFLAGS"
8390 ac_save_LDFLAGS="$LDFLAGS"
8391 # ac_save_LIBS="$LIBS"
8393 if test \! -z "$includedir" ; then
8394 CPPFLAGS="$CPPFLAGS -I$includedir"
8396 # note: $X_CFLAGS includes $x_includes
8397 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8399 if test \! -z "$libdir" ; then
8400 LDFLAGS="$LDFLAGS -L$libdir"
8402 # note: $X_LIBS includes $x_libraries
8403 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8405 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
8406 echo "configure:8418: checking for glBindTexture in -l$gl_lib_1" >&5
8407 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
8408 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8409 echo $ac_n "(cached) $ac_c" 1>&6
8411 ac_save_LIBS="$LIBS"
8412 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
8413 cat > conftest.$ac_ext <<EOF
8414 #line 8426 "configure"
8415 #include "confdefs.h"
8416 /* Override any gcc2 internal prototype to avoid an error. */
8417 /* We use char because int might match the return type of a gcc2
8418 builtin and then its argument prototype would still apply. */
8419 char glBindTexture();
8425 if { (eval echo configure:8437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8427 eval "ac_cv_lib_$ac_lib_var=yes"
8429 echo "configure: failed program was:" >&5
8430 cat conftest.$ac_ext >&5
8432 eval "ac_cv_lib_$ac_lib_var=no"
8435 LIBS="$ac_save_LIBS"
8438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8439 echo "$ac_t""yes" 1>&6
8440 cat >> confdefs.h <<\EOF
8441 #define HAVE_GLBINDTEXTURE 1
8445 echo "$ac_t""no" 1>&6
8449 CPPFLAGS="$ac_save_CPPFLAGS"
8450 LDFLAGS="$ac_save_LDFLAGS"
8451 # LIBS="$ac_save_LIBS"
8455 elif test "$with_gl" != no; then
8456 echo "error: must be yes or no: --with-gl=$with_gl"
8461 ###############################################################################
8465 ###############################################################################
8468 with_gle_req=unspecified
8470 # Check whether --with-gle or --without-gle was given.
8471 if test "${with_gle+set}" = set; then
8473 with_gle="$withval"; with_gle_req="$withval"
8485 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
8486 echo "configure:8498: checking for GLE headers" >&5
8489 X_CFLAGS="-I$d $X_CFLAGS"
8490 echo "$ac_t""$d" 1>&6
8492 echo "$ac_t""not found ($d: no such directory)" 1>&6
8495 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
8496 echo "configure:8508: checking for GLE libs" >&5
8499 X_LIBS="-L$d $X_LIBS"
8500 echo "$ac_t""$d" 1>&6
8502 echo "$ac_t""not found ($d: no such directory)" 1>&6
8505 # replace the directory string with "yes".
8507 with_gle=$with_gle_req
8512 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
8513 echo " If it is a directory, then \`DIR/include' will be added to"
8514 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8522 if test "$with_gle" = yes; then
8525 ac_save_CPPFLAGS="$CPPFLAGS"
8526 if test \! -z "$includedir" ; then
8527 CPPFLAGS="$CPPFLAGS -I$includedir"
8529 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8530 ac_safe=`echo "GL/gle.h" | sed 'y%./+-%__p_%'`
8531 echo $ac_n "checking for GL/gle.h""... $ac_c" 1>&6
8532 echo "configure:8544: checking for GL/gle.h" >&5
8533 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8534 echo $ac_n "(cached) $ac_c" 1>&6
8536 cat > conftest.$ac_ext <<EOF
8537 #line 8549 "configure"
8538 #include "confdefs.h"
8541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8542 { (eval echo configure:8554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8544 if test -z "$ac_err"; then
8546 eval "ac_cv_header_$ac_safe=yes"
8549 echo "configure: failed program was:" >&5
8550 cat conftest.$ac_ext >&5
8552 eval "ac_cv_header_$ac_safe=no"
8556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8557 echo "$ac_t""yes" 1>&6
8560 echo "$ac_t""no" 1>&6
8563 CPPFLAGS="$ac_save_CPPFLAGS"
8564 if test "$have_gle3" = yes ; then
8568 ac_save_CPPFLAGS="$CPPFLAGS"
8569 if test \! -z "$includedir" ; then
8570 CPPFLAGS="$CPPFLAGS -I$includedir"
8572 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8573 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
8574 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
8575 echo "configure:8587: checking for GL/gutil.h" >&5
8576 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8577 echo $ac_n "(cached) $ac_c" 1>&6
8579 cat > conftest.$ac_ext <<EOF
8580 #line 8592 "configure"
8581 #include "confdefs.h"
8582 #include <GL/gutil.h>
8584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8585 { (eval echo configure:8597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8587 if test -z "$ac_err"; then
8589 eval "ac_cv_header_$ac_safe=yes"
8592 echo "configure: failed program was:" >&5
8593 cat conftest.$ac_ext >&5
8595 eval "ac_cv_header_$ac_safe=no"
8599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8600 echo "$ac_t""yes" 1>&6
8603 echo "$ac_t""no" 1>&6
8606 CPPFLAGS="$ac_save_CPPFLAGS"
8607 if test "$have_gle" = yes ; then
8609 ac_save_CPPFLAGS="$CPPFLAGS"
8610 if test \! -z "$includedir" ; then
8611 CPPFLAGS="$CPPFLAGS -I$includedir"
8613 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8614 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
8615 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
8616 echo "configure:8628: checking for GL/tube.h" >&5
8617 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8618 echo $ac_n "(cached) $ac_c" 1>&6
8620 cat > conftest.$ac_ext <<EOF
8621 #line 8633 "configure"
8622 #include "confdefs.h"
8623 #include <GL/tube.h>
8625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8626 { (eval echo configure:8638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8628 if test -z "$ac_err"; then
8630 eval "ac_cv_header_$ac_safe=yes"
8633 echo "configure: failed program was:" >&5
8634 cat conftest.$ac_ext >&5
8636 eval "ac_cv_header_$ac_safe=no"
8640 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8641 echo "$ac_t""yes" 1>&6
8644 echo "$ac_t""no" 1>&6
8647 CPPFLAGS="$ac_save_CPPFLAGS"
8651 if test "$have_gle" = yes ; then
8655 ac_save_CPPFLAGS="$CPPFLAGS"
8656 ac_save_LDFLAGS="$LDFLAGS"
8657 # ac_save_LIBS="$LIBS"
8659 if test \! -z "$includedir" ; then
8660 CPPFLAGS="$CPPFLAGS -I$includedir"
8662 # note: $X_CFLAGS includes $x_includes
8663 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8665 if test \! -z "$libdir" ; then
8666 LDFLAGS="$LDFLAGS -L$libdir"
8668 # note: $X_LIBS includes $x_libraries
8669 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8671 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
8672 echo "configure:8684: checking for gleCreateGC in -lgle" >&5
8673 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
8674 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8675 echo $ac_n "(cached) $ac_c" 1>&6
8677 ac_save_LIBS="$LIBS"
8678 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
8679 cat > conftest.$ac_ext <<EOF
8680 #line 8692 "configure"
8681 #include "confdefs.h"
8682 /* Override any gcc2 internal prototype to avoid an error. */
8683 /* We use char because int might match the return type of a gcc2
8684 builtin and then its argument prototype would still apply. */
8691 if { (eval echo configure:8703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8693 eval "ac_cv_lib_$ac_lib_var=yes"
8695 echo "configure: failed program was:" >&5
8696 cat conftest.$ac_ext >&5
8698 eval "ac_cv_lib_$ac_lib_var=no"
8701 LIBS="$ac_save_LIBS"
8704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8705 echo "$ac_t""yes" 1>&6
8706 have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
8708 echo "$ac_t""no" 1>&6
8711 CPPFLAGS="$ac_save_CPPFLAGS"
8712 LDFLAGS="$ac_save_LDFLAGS"
8713 # LIBS="$ac_save_LIBS"
8716 if test "$have_gle" = yes ; then
8720 # sometimes the libmatrix stuff is included in libgle. look there first.
8722 # I don't get it. For some reason, this test passes on SGI, as if
8723 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
8724 # Yet the link is succeeding. Why???
8726 # AC_CHECK_X_LIB(gle, uview_direction_d,
8727 # [have_gle=yes; gle_halfassed=no],
8728 # [], $GL_LIBS -lX11 -lXext -lm)
8730 # As of GLE 3 this is in libgle, and has changed name to uview_direction!
8732 if test "$have_gle3" = yes ; then
8734 ac_save_CPPFLAGS="$CPPFLAGS"
8735 ac_save_LDFLAGS="$LDFLAGS"
8736 # ac_save_LIBS="$LIBS"
8738 if test \! -z "$includedir" ; then
8739 CPPFLAGS="$CPPFLAGS -I$includedir"
8741 # note: $X_CFLAGS includes $x_includes
8742 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8744 if test \! -z "$libdir" ; then
8745 LDFLAGS="$LDFLAGS -L$libdir"
8747 # note: $X_LIBS includes $x_libraries
8748 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8750 echo $ac_n "checking for uview_direction in -lgle""... $ac_c" 1>&6
8751 echo "configure:8763: checking for uview_direction in -lgle" >&5
8752 ac_lib_var=`echo gle'_'uview_direction | sed 'y%./+-%__p_%'`
8753 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8754 echo $ac_n "(cached) $ac_c" 1>&6
8756 ac_save_LIBS="$LIBS"
8757 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
8758 cat > conftest.$ac_ext <<EOF
8759 #line 8771 "configure"
8760 #include "confdefs.h"
8761 /* Override any gcc2 internal prototype to avoid an error. */
8762 /* We use char because int might match the return type of a gcc2
8763 builtin and then its argument prototype would still apply. */
8764 char uview_direction();
8770 if { (eval echo configure:8782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8772 eval "ac_cv_lib_$ac_lib_var=yes"
8774 echo "configure: failed program was:" >&5
8775 cat conftest.$ac_ext >&5
8777 eval "ac_cv_lib_$ac_lib_var=no"
8780 LIBS="$ac_save_LIBS"
8783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8784 echo "$ac_t""yes" 1>&6
8785 have_gle=yes; gle_halfassed=no
8787 echo "$ac_t""no" 1>&6
8790 CPPFLAGS="$ac_save_CPPFLAGS"
8791 LDFLAGS="$ac_save_LDFLAGS"
8792 # LIBS="$ac_save_LIBS"
8795 # if it wasn't in libgle, then look in libmatrix.
8796 if test "$have_gle" = no ; then
8798 ac_save_CPPFLAGS="$CPPFLAGS"
8799 ac_save_LDFLAGS="$LDFLAGS"
8800 # ac_save_LIBS="$LIBS"
8802 if test \! -z "$includedir" ; then
8803 CPPFLAGS="$CPPFLAGS -I$includedir"
8805 # note: $X_CFLAGS includes $x_includes
8806 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8808 if test \! -z "$libdir" ; then
8809 LDFLAGS="$LDFLAGS -L$libdir"
8811 # note: $X_LIBS includes $x_libraries
8812 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8814 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
8815 echo "configure:8827: checking for uview_direction_d in -lmatrix" >&5
8816 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
8817 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8818 echo $ac_n "(cached) $ac_c" 1>&6
8820 ac_save_LIBS="$LIBS"
8821 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
8822 cat > conftest.$ac_ext <<EOF
8823 #line 8835 "configure"
8824 #include "confdefs.h"
8825 /* Override any gcc2 internal prototype to avoid an error. */
8826 /* We use char because int might match the return type of a gcc2
8827 builtin and then its argument prototype would still apply. */
8828 char uview_direction_d();
8834 if { (eval echo configure:8846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8836 eval "ac_cv_lib_$ac_lib_var=yes"
8838 echo "configure: failed program was:" >&5
8839 cat conftest.$ac_ext >&5
8841 eval "ac_cv_lib_$ac_lib_var=no"
8844 LIBS="$ac_save_LIBS"
8847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8848 echo "$ac_t""yes" 1>&6
8849 have_gle=yes; gle_halfassed=no;
8850 GLE_LIBS="$GLE_LIBS -lmatrix"
8852 echo "$ac_t""no" 1>&6
8855 CPPFLAGS="$ac_save_CPPFLAGS"
8856 LDFLAGS="$ac_save_LDFLAGS"
8857 # LIBS="$ac_save_LIBS"
8862 if test "$have_gle" = yes ; then
8863 cat >> confdefs.h <<\EOF
8867 if test "$have_gle3" = yes ; then
8868 cat >> confdefs.h <<\EOF
8875 elif test "$with_gle" != no; then
8876 echo "error: must be yes or no: --with-gle=$with_gle"
8883 ###############################################################################
8887 ###############################################################################
8890 with_xpm_req=unspecified
8891 # Check whether --with-xpm or --without-xpm was given.
8892 if test "${with_xpm+set}" = set; then
8894 with_xpm="$withval"; with_xpm_req="$withval"
8906 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
8907 echo "configure:8919: checking for XPM headers" >&5
8910 X_CFLAGS="-I$d $X_CFLAGS"
8911 echo "$ac_t""$d" 1>&6
8913 echo "$ac_t""not found ($d: no such directory)" 1>&6
8916 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
8917 echo "configure:8929: checking for XPM libs" >&5
8920 X_LIBS="-L$d $X_LIBS"
8921 echo "$ac_t""$d" 1>&6
8923 echo "$ac_t""not found ($d: no such directory)" 1>&6
8926 # replace the directory string with "yes".
8928 with_xpm=$with_xpm_req
8933 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
8934 echo " If it is a directory, then \`DIR/include' will be added to"
8935 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8941 if test "$with_xpm" = yes; then
8943 ac_save_CPPFLAGS="$CPPFLAGS"
8944 if test \! -z "$includedir" ; then
8945 CPPFLAGS="$CPPFLAGS -I$includedir"
8947 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8948 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
8949 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
8950 echo "configure:8962: checking for X11/xpm.h" >&5
8951 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8952 echo $ac_n "(cached) $ac_c" 1>&6
8954 cat > conftest.$ac_ext <<EOF
8955 #line 8967 "configure"
8956 #include "confdefs.h"
8957 #include <X11/xpm.h>
8959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8960 { (eval echo configure:8972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8962 if test -z "$ac_err"; then
8964 eval "ac_cv_header_$ac_safe=yes"
8967 echo "configure: failed program was:" >&5
8968 cat conftest.$ac_ext >&5
8970 eval "ac_cv_header_$ac_safe=no"
8974 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8975 echo "$ac_t""yes" 1>&6
8977 cat >> confdefs.h <<\EOF
8983 echo "$ac_t""no" 1>&6
8986 CPPFLAGS="$ac_save_CPPFLAGS"
8987 elif test "$with_xpm" != no; then
8988 echo "error: must be yes or no: --with-xpm=$with_xpm"
8992 # See comment near $motif_requires_xpm, above.
8993 # Need to do this here, after both Motif and XPM have been checked for.
8995 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
8996 if test "$motif_requires_xpm" = yes ; then
8997 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
9002 ###############################################################################
9004 # Check for the XSHM server extension.
9006 ###############################################################################
9009 with_xshm_req=unspecified
9010 # Check whether --with-xshm-ext or --without-xshm-ext was given.
9011 if test "${with_xshm_ext+set}" = set; then
9012 withval="$with_xshm_ext"
9013 with_xshm="$withval"; with_xshm_req="$withval"
9020 case "$with_xshm" in
9025 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
9026 echo "configure:9038: checking for XSHM headers" >&5
9027 d=$with_xshm/include
9029 X_CFLAGS="-I$d $X_CFLAGS"
9030 echo "$ac_t""$d" 1>&6
9032 echo "$ac_t""not found ($d: no such directory)" 1>&6
9035 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
9036 echo "configure:9048: checking for XSHM libs" >&5
9039 X_LIBS="-L$d $X_LIBS"
9040 echo "$ac_t""$d" 1>&6
9042 echo "$ac_t""not found ($d: no such directory)" 1>&6
9045 # replace the directory string with "yes".
9047 with_xshm=$with_xshm_req
9052 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
9053 echo " If it is a directory, then \`DIR/include' will be added to"
9054 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9060 if test "$with_xshm" = yes; then
9062 # first check for Xshm.h.
9064 ac_save_CPPFLAGS="$CPPFLAGS"
9065 if test \! -z "$includedir" ; then
9066 CPPFLAGS="$CPPFLAGS -I$includedir"
9068 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9069 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
9070 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
9071 echo "configure:9083: checking for X11/extensions/XShm.h" >&5
9072 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9073 echo $ac_n "(cached) $ac_c" 1>&6
9075 cat > conftest.$ac_ext <<EOF
9076 #line 9088 "configure"
9077 #include "confdefs.h"
9078 #include <X11/extensions/XShm.h>
9080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9081 { (eval echo configure:9093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9083 if test -z "$ac_err"; then
9085 eval "ac_cv_header_$ac_safe=yes"
9088 echo "configure: failed program was:" >&5
9089 cat conftest.$ac_ext >&5
9091 eval "ac_cv_header_$ac_safe=no"
9095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9096 echo "$ac_t""yes" 1>&6
9099 echo "$ac_t""no" 1>&6
9102 CPPFLAGS="$ac_save_CPPFLAGS"
9104 # if that succeeded, then check for sys/ipc.h.
9105 if test "$have_xshm" = yes; then
9108 ac_save_CPPFLAGS="$CPPFLAGS"
9109 if test \! -z "$includedir" ; then
9110 CPPFLAGS="$CPPFLAGS -I$includedir"
9112 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9113 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
9114 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
9115 echo "configure:9127: checking for sys/ipc.h" >&5
9116 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9117 echo $ac_n "(cached) $ac_c" 1>&6
9119 cat > conftest.$ac_ext <<EOF
9120 #line 9132 "configure"
9121 #include "confdefs.h"
9122 #include <sys/ipc.h>
9124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9125 { (eval echo configure:9137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9127 if test -z "$ac_err"; then
9129 eval "ac_cv_header_$ac_safe=yes"
9132 echo "configure: failed program was:" >&5
9133 cat conftest.$ac_ext >&5
9135 eval "ac_cv_header_$ac_safe=no"
9139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9140 echo "$ac_t""yes" 1>&6
9143 echo "$ac_t""no" 1>&6
9146 CPPFLAGS="$ac_save_CPPFLAGS"
9149 # if that succeeded, then check for sys/shm.h.
9150 if test "$have_xshm" = yes; then
9153 ac_save_CPPFLAGS="$CPPFLAGS"
9154 if test \! -z "$includedir" ; then
9155 CPPFLAGS="$CPPFLAGS -I$includedir"
9157 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9158 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
9159 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
9160 echo "configure:9172: checking for sys/shm.h" >&5
9161 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9162 echo $ac_n "(cached) $ac_c" 1>&6
9164 cat > conftest.$ac_ext <<EOF
9165 #line 9177 "configure"
9166 #include "confdefs.h"
9167 #include <sys/shm.h>
9169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9170 { (eval echo configure:9182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9172 if test -z "$ac_err"; then
9174 eval "ac_cv_header_$ac_safe=yes"
9177 echo "configure: failed program was:" >&5
9178 cat conftest.$ac_ext >&5
9180 eval "ac_cv_header_$ac_safe=no"
9184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9185 echo "$ac_t""yes" 1>&6
9188 echo "$ac_t""no" 1>&6
9191 CPPFLAGS="$ac_save_CPPFLAGS"
9194 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
9195 # to exist, but the library code to not exist. And even better, the library
9196 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
9197 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
9198 # that's not quite right, but close enough.)
9202 if `uname -v` -eq 3 ; then
9205 ac_save_CPPFLAGS="$CPPFLAGS"
9206 ac_save_LDFLAGS="$LDFLAGS"
9207 # ac_save_LIBS="$LIBS"
9209 if test \! -z "$includedir" ; then
9210 CPPFLAGS="$CPPFLAGS -I$includedir"
9212 # note: $X_CFLAGS includes $x_includes
9213 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9215 if test \! -z "$libdir" ; then
9216 LDFLAGS="$LDFLAGS -L$libdir"
9218 # note: $X_LIBS includes $x_libraries
9219 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9221 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
9222 echo "configure:9234: checking for XShmQueryExtension in -lXextSam" >&5
9223 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
9224 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9225 echo $ac_n "(cached) $ac_c" 1>&6
9227 ac_save_LIBS="$LIBS"
9228 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
9229 cat > conftest.$ac_ext <<EOF
9230 #line 9242 "configure"
9231 #include "confdefs.h"
9232 /* Override any gcc2 internal prototype to avoid an error. */
9233 /* We use char because int might match the return type of a gcc2
9234 builtin and then its argument prototype would still apply. */
9235 char XShmQueryExtension();
9238 XShmQueryExtension()
9241 if { (eval echo configure:9253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9243 eval "ac_cv_lib_$ac_lib_var=yes"
9245 echo "configure: failed program was:" >&5
9246 cat conftest.$ac_ext >&5
9248 eval "ac_cv_lib_$ac_lib_var=no"
9251 LIBS="$ac_save_LIBS"
9254 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9255 echo "$ac_t""yes" 1>&6
9256 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
9258 echo "$ac_t""no" 1>&6
9262 CPPFLAGS="$ac_save_CPPFLAGS"
9263 LDFLAGS="$ac_save_LDFLAGS"
9264 # LIBS="$ac_save_LIBS"
9270 # if that succeeded, then we've really got it.
9271 if test "$have_xshm" = yes; then
9272 cat >> confdefs.h <<\EOF
9273 #define HAVE_XSHM_EXTENSION 1
9278 elif test "$with_xshm" != no; then
9279 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
9284 ###############################################################################
9286 # Check for the DOUBLE-BUFFER server extension.
9288 ###############################################################################
9291 with_xdbe_req=unspecified
9292 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
9293 if test "${with_xdbe_ext+set}" = set; then
9294 withval="$with_xdbe_ext"
9295 with_xdbe="$withval"; with_xdbe_req="$withval"
9302 case "$with_xdbe" in
9307 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
9308 echo "configure:9320: checking for DOUBLE-BUFFER headers" >&5
9309 d=$with_xdbe/include
9311 X_CFLAGS="-I$d $X_CFLAGS"
9312 echo "$ac_t""$d" 1>&6
9314 echo "$ac_t""not found ($d: no such directory)" 1>&6
9317 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
9318 echo "configure:9330: checking for DOUBLE-BUFFER libs" >&5
9321 X_LIBS="-L$d $X_LIBS"
9322 echo "$ac_t""$d" 1>&6
9324 echo "$ac_t""not found ($d: no such directory)" 1>&6
9327 # replace the directory string with "yes".
9329 with_xdbe=$with_xdbe_req
9334 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
9335 echo " If it is a directory, then \`DIR/include' will be added to"
9336 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9342 if test "$with_xdbe" = yes; then
9345 ac_save_CPPFLAGS="$CPPFLAGS"
9346 if test \! -z "$includedir" ; then
9347 CPPFLAGS="$CPPFLAGS -I$includedir"
9349 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9350 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
9351 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
9352 echo "configure:9364: checking for X11/extensions/Xdbe.h" >&5
9353 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9354 echo $ac_n "(cached) $ac_c" 1>&6
9356 cat > conftest.$ac_ext <<EOF
9357 #line 9369 "configure"
9358 #include "confdefs.h"
9359 #include <X11/extensions/Xdbe.h>
9361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9362 { (eval echo configure:9374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9364 if test -z "$ac_err"; then
9366 eval "ac_cv_header_$ac_safe=yes"
9369 echo "configure: failed program was:" >&5
9370 cat conftest.$ac_ext >&5
9372 eval "ac_cv_header_$ac_safe=no"
9376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9377 echo "$ac_t""yes" 1>&6
9380 echo "$ac_t""no" 1>&6
9383 CPPFLAGS="$ac_save_CPPFLAGS"
9384 if test "$have_xdbe" = yes; then
9385 cat >> confdefs.h <<\EOF
9386 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
9391 elif test "$with_xdbe" != no; then
9392 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
9397 ###############################################################################
9399 # Check for the SGI XReadDisplay server extension.
9401 # Note: this has to be down here, rather than up with the other server
9402 # extension tests, so that the output of `configure --help' is in the
9403 # right order. Arrgh!
9405 ###############################################################################
9408 with_readdisplay_req=unspecified
9409 # Check whether --with-readdisplay or --without-readdisplay was given.
9410 if test "${with_readdisplay+set}" = set; then
9411 withval="$with_readdisplay"
9412 with_readdisplay="$withval"; with_readdisplay_req="$withval"
9414 with_readdisplay=yes
9419 case "$with_readdisplay" in
9424 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
9425 echo "configure:9437: checking for XReadDisplay headers" >&5
9426 d=$with_readdisplay/include
9428 X_CFLAGS="-I$d $X_CFLAGS"
9429 echo "$ac_t""$d" 1>&6
9431 echo "$ac_t""not found ($d: no such directory)" 1>&6
9434 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
9435 echo "configure:9447: checking for XReadDisplay libs" >&5
9436 d=$with_readdisplay/lib
9438 X_LIBS="-L$d $X_LIBS"
9439 echo "$ac_t""$d" 1>&6
9441 echo "$ac_t""not found ($d: no such directory)" 1>&6
9444 # replace the directory string with "yes".
9445 with_readdisplay_req="yes"
9446 with_readdisplay=$with_readdisplay_req
9451 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
9452 echo " If it is a directory, then \`DIR/include' will be added to"
9453 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9459 if test "$with_readdisplay" = yes; then
9461 ac_save_CPPFLAGS="$CPPFLAGS"
9462 if test \! -z "$includedir" ; then
9463 CPPFLAGS="$CPPFLAGS -I$includedir"
9465 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9466 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
9467 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
9468 echo "configure:9480: checking for X11/extensions/readdisplay.h" >&5
9469 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9470 echo $ac_n "(cached) $ac_c" 1>&6
9472 cat > conftest.$ac_ext <<EOF
9473 #line 9485 "configure"
9474 #include "confdefs.h"
9475 #include <X11/extensions/readdisplay.h>
9477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9478 { (eval echo configure:9490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9480 if test -z "$ac_err"; then
9482 eval "ac_cv_header_$ac_safe=yes"
9485 echo "configure: failed program was:" >&5
9486 cat conftest.$ac_ext >&5
9488 eval "ac_cv_header_$ac_safe=no"
9492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9493 echo "$ac_t""yes" 1>&6
9494 cat >> confdefs.h <<\EOF
9495 #define HAVE_READ_DISPLAY_EXTENSION 1
9499 echo "$ac_t""no" 1>&6
9502 CPPFLAGS="$ac_save_CPPFLAGS"
9503 elif test "$with_readdisplay" != no; then
9504 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
9509 ###############################################################################
9511 # Check for a program to generate random text.
9513 # Zippy is funnier than the idiocy generally spat out by `fortune',
9514 # so first see if "fortune zippy" works. Else, use plain "fortune".
9516 # We used to dig around in Emacs to look for the "yow" program, but
9517 # most people who have Emacs also have "fortune zippy", so nevermind.
9519 ###############################################################################
9522 # Check whether --with-fortune or --without-fortune was given.
9523 if test "${with_fortune+set}" = set; then
9524 withval="$with_fortune"
9525 with_fortune_req="$withval"; with_fortune="$withval"
9531 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
9536 if test -n "$with_fortune_req" ; then
9537 ac_cv_fortune_program=""
9538 case "$with_fortune_req" in
9541 set dummy $with_fortune_req ; fortune_tmp=$2
9542 echo $ac_n "checking for $fortune_tmp""... $ac_c" 1>&6
9543 echo "configure:9555: checking for $fortune_tmp" >&5
9544 if test -x "$fortune_tmp" ; then
9545 echo "$ac_t""yes" 1>&6
9547 echo "$ac_t""no" 1>&6
9552 set dummy $with_fortune_req ; fortune_tmp=$2
9554 unset ac_cv_path_fortune_tmp
9555 # Extract the first word of "$fortune_tmp", so it can be a program name with args.
9556 set dummy $fortune_tmp; ac_word=$2
9557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9558 echo "configure:9570: checking for $ac_word" >&5
9559 if eval "test \"`echo '$''{'ac_cv_path_fortune_tmp'+set}'`\" = set"; then
9560 echo $ac_n "(cached) $ac_c" 1>&6
9562 case "$fortune_tmp" in
9564 ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
9567 ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a dos path.
9570 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9572 for ac_dir in $ac_dummy; do
9573 test -z "$ac_dir" && ac_dir=.
9574 if test -f $ac_dir/$ac_word; then
9575 ac_cv_path_fortune_tmp="$ac_dir/$ac_word"
9583 fortune_tmp="$ac_cv_path_fortune_tmp"
9584 if test -n "$fortune_tmp"; then
9585 echo "$ac_t""$fortune_tmp" 1>&6
9587 echo "$ac_t""no" 1>&6
9590 if test -z "$fortune_tmp" ; then
9595 ac_cv_fortune_program="$with_fortune"
9597 elif test -n "$ac_cv_fortune_program"; then
9598 echo "$ac_t""checking for fortune... (cached) $ac_cv_fortune_program" 1>&6
9601 unset ac_cv_path_fortune_tmp
9604 if test -z "$ac_cv_fortune_program" ; then
9606 # first look for fortune in /usr/games/ (and use absolute path)
9607 for ac_prog in fortune
9609 # Extract the first word of "$ac_prog", so it can be a program name with args.
9610 set dummy $ac_prog; ac_word=$2
9611 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9612 echo "configure:9624: checking for $ac_word" >&5
9613 if eval "test \"`echo '$''{'ac_cv_path_fortune_tmp'+set}'`\" = set"; then
9614 echo $ac_n "(cached) $ac_c" 1>&6
9616 case "$fortune_tmp" in
9618 ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
9621 ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a dos path.
9624 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9625 ac_dummy=""/usr/games""
9626 for ac_dir in $ac_dummy; do
9627 test -z "$ac_dir" && ac_dir=.
9628 if test -f $ac_dir/$ac_word; then
9629 ac_cv_path_fortune_tmp="$ac_dir/$ac_word"
9637 fortune_tmp="$ac_cv_path_fortune_tmp"
9638 if test -n "$fortune_tmp"; then
9639 echo "$ac_t""$fortune_tmp" 1>&6
9641 echo "$ac_t""no" 1>&6
9644 test -n "$fortune_tmp" && break
9648 # if it's not there, look on $PATH (and don't use absolute path)
9649 if test -z "$fortune_tmp" ; then
9650 for ac_prog in fortune
9652 # Extract the first word of "$ac_prog", so it can be a program name with args.
9653 set dummy $ac_prog; ac_word=$2
9654 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9655 echo "configure:9667: checking for $ac_word" >&5
9656 if eval "test \"`echo '$''{'ac_cv_prog_fortune_tmp'+set}'`\" = set"; then
9657 echo $ac_n "(cached) $ac_c" 1>&6
9659 if test -n "$fortune_tmp"; then
9660 ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
9662 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9664 for ac_dir in $ac_dummy; do
9665 test -z "$ac_dir" && ac_dir=.
9666 if test -f $ac_dir/$ac_word; then
9667 ac_cv_prog_fortune_tmp="$ac_prog"
9674 fortune_tmp="$ac_cv_prog_fortune_tmp"
9675 if test -n "$fortune_tmp"; then
9676 echo "$ac_t""$fortune_tmp" 1>&6
9678 echo "$ac_t""no" 1>&6
9681 test -n "$fortune_tmp" && break
9686 # if we didn't find anything, then just assume /usr/games/
9687 if test -z "$fortune_tmp" ; then
9688 fortune_tmp="/usr/games/fortune"
9691 ac_cv_fortune_program="$fortune_tmp"
9693 # now check to see whether "fortune zippy" works.
9695 fortune_tmp="$fortune_tmp zippy"
9696 echo $ac_n "checking for zippy quotes""... $ac_c" 1>&6
9697 echo "configure:9709: checking for zippy quotes" >&5
9698 if ( $fortune_tmp >/dev/null 2>&1 ); then
9699 ac_cv_fortune_program="$fortune_tmp"
9700 echo "$ac_t""$fortune_tmp" 1>&6
9702 echo "$ac_t""no" 1>&6
9707 unset ac_cv_path_fortune_tmp
9710 cat >> confdefs.h <<EOF
9711 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
9716 ###############################################################################
9718 # Check whether it's ok to install some hacks as setuid (e.g., "sonar")
9719 # This should be safe, but let's give people the option.
9721 ###############################################################################
9723 setuid_hacks_default=no
9724 setuid_hacks="$setuid_hacks_default"
9725 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
9726 if test "${with_setuid_hacks+set}" = set; then
9727 withval="$with_setuid_hacks"
9728 setuid_hacks="$withval"
9730 setuid_hacks="$setuid_hacks_default"
9735 case "$setuid_hacks" in
9740 echo $ac_n "checking for setuid hacks headers""... $ac_c" 1>&6
9741 echo "configure:9753: checking for setuid hacks headers" >&5
9742 d=$setuid_hacks/include
9744 X_CFLAGS="-I$d $X_CFLAGS"
9745 echo "$ac_t""$d" 1>&6
9747 echo "$ac_t""not found ($d: no such directory)" 1>&6
9750 echo $ac_n "checking for setuid hacks libs""... $ac_c" 1>&6
9751 echo "configure:9763: checking for setuid hacks libs" >&5
9754 X_LIBS="-L$d $X_LIBS"
9755 echo "$ac_t""$d" 1>&6
9757 echo "$ac_t""not found ($d: no such directory)" 1>&6
9760 # replace the directory string with "yes".
9761 setuid_hacks_req="yes"
9762 setuid_hacks=$setuid_hacks_req
9767 echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
9768 echo " If it is a directory, then \`DIR/include' will be added to"
9769 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9775 if test "$setuid_hacks" = yes; then
9777 elif test "$setuid_hacks" != no; then
9778 echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
9783 ###############################################################################
9785 # Done testing. Now, set up the various -I and -L variables,
9786 # and decide which GUI program to build by default.
9788 ###############################################################################
9795 if test \! -z "$includedir" ; then
9796 INCLUDES="$INCLUDES -I$includedir"
9799 if test \! -z "$libdir" ; then
9800 LDFLAGS="$LDFLAGS -L$libdir"
9804 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9806 if test "$have_motif" = yes; then
9807 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
9808 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9810 if test "$have_gtk" = yes; then
9811 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
9812 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
9816 if test "$have_kerberos" = yes; then
9817 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
9818 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
9820 if test "$have_pam" = yes; then
9821 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
9822 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
9823 INSTALL_PAM="install-pam"
9825 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
9826 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
9829 if test "$enable_locking" = yes; then
9830 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
9831 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
9833 LOCK_SRCS='$(NOLOCK_SRCS_1)'
9834 LOCK_OBJS='$(NOLOCK_OBJS_1)'
9837 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
9839 if test "$need_setuid" = yes; then
9845 if test "$setuid_hacks" = yes; then
9852 if test "$have_gl" = yes; then
9853 GL_EXES='$(GL_EXES)'
9854 GL_UTIL_EXES='$(GL_UTIL_EXES)'
9858 GL_KLUDGE="-${tab} "
9861 if test "$have_gle" = yes; then
9862 GLE_EXES='$(GLE_EXES)'
9863 GLE_MEN='$(GLE_MEN)'
9864 GLE_KLUDGE="${tab} "
9866 GLE_KLUDGE="-${tab} "
9870 # Another substitution in the XScreenSaver.ad.in file:
9872 if test "$have_gnome_help" = yes; then
9881 # Now that we know whether we have Gnome, we can decide where the XML
9882 # config files get installed.
9883 if test -z "$HACK_CONF_DIR" ; then
9884 if test -n "$GNOME_DATADIR" ; then
9885 HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
9887 HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
9892 ###############################################################################
9894 # Perform substitutions and write Makefiles.
9896 ###############################################################################
9941 APPDEFAULTS=$ac_x_app_defaults
9950 cat > confcache <<\EOF
9951 # This file is a shell script that caches the results of configure
9952 # tests run on this system so they can be shared between configure
9953 # scripts and configure runs. It is not useful on other systems.
9954 # If it contains results you don't want to keep, you may remove or edit it.
9956 # By default, configure uses ./config.cache as the cache file,
9957 # creating it if it does not exist already. You can give configure
9958 # the --cache-file=FILE option to use a different cache file; that is
9959 # what configure does when it calls configure scripts in
9960 # subdirectories, so they share the cache.
9961 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9962 # config.status only pays attention to the cache file if you give it the
9963 # --recheck option to rerun configure.
9966 # The following way of writing the cache mishandles newlines in values,
9967 # but we know of no workaround that is simple, portable, and efficient.
9968 # So, don't put newlines in cache variables' values.
9969 # Ultrix sh set writes to stderr and can't be redirected directly,
9970 # and sets the high bit in the cache file unless we assign to the vars.
9972 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9974 # `set' does not quote correctly, so add quotes (double-quote substitution
9975 # turns \\\\ into \\, and sed turns \\ into \).
9977 -e "s/'/'\\\\''/g" \
9978 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9981 # `set' quotes correctly as required by POSIX, so do not add quotes.
9982 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9985 if cmp -s $cache_file confcache; then
9988 if test -w $cache_file; then
9989 echo "updating cache $cache_file"
9990 cat confcache > $cache_file
9992 echo "not updating unwritable cache $cache_file"
9997 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9999 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10000 # Let make expand exec_prefix.
10001 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10003 # Any assignment to VPATH causes Sun make to only execute
10004 # the first set of double-colon rules, so remove it if not needed.
10005 # If there is a colon in the path, we need to keep it.
10006 if test "x$srcdir" = x.; then
10007 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10010 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10012 DEFS=-DHAVE_CONFIG_H
10014 # Without the "./", some shells look in PATH for config.status.
10015 : ${CONFIG_STATUS=./config.status}
10017 echo creating $CONFIG_STATUS
10018 rm -f $CONFIG_STATUS
10019 cat > $CONFIG_STATUS <<EOF
10021 # Generated automatically by configure.
10022 # Run this file to recreate the current configuration.
10023 # This directory was configured as follows,
10024 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10026 # $0 $ac_configure_args
10028 # Compiler output produced by configure, useful for debugging
10029 # configure, is in ./config.log if it exists.
10031 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10034 case "\$ac_option" in
10035 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10036 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10037 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10038 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10039 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10041 -help | --help | --hel | --he | --h)
10042 echo "\$ac_cs_usage"; exit 0 ;;
10043 *) echo "\$ac_cs_usage"; exit 1 ;;
10047 ac_given_srcdir=$srcdir
10048 ac_given_INSTALL="$INSTALL"
10050 trap 'rm -fr `echo "Makefile
10055 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10057 cat >> $CONFIG_STATUS <<EOF
10059 # Protect against being on the right side of a sed subst in config.status.
10060 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10061 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10065 s%@CFLAGS@%$CFLAGS%g
10066 s%@CPPFLAGS@%$CPPFLAGS%g
10067 s%@CXXFLAGS@%$CXXFLAGS%g
10068 s%@FFLAGS@%$FFLAGS%g
10070 s%@LDFLAGS@%$LDFLAGS%g
10072 s%@exec_prefix@%$exec_prefix%g
10073 s%@prefix@%$prefix%g
10074 s%@program_transform_name@%$program_transform_name%g
10075 s%@bindir@%$bindir%g
10076 s%@sbindir@%$sbindir%g
10077 s%@libexecdir@%$libexecdir%g
10078 s%@datadir@%$datadir%g
10079 s%@sysconfdir@%$sysconfdir%g
10080 s%@sharedstatedir@%$sharedstatedir%g
10081 s%@localstatedir@%$localstatedir%g
10082 s%@libdir@%$libdir%g
10083 s%@includedir@%$includedir%g
10084 s%@oldincludedir@%$oldincludedir%g
10085 s%@infodir@%$infodir%g
10086 s%@mandir@%$mandir%g
10088 s%@host_alias@%$host_alias%g
10089 s%@host_cpu@%$host_cpu%g
10090 s%@host_vendor@%$host_vendor%g
10091 s%@host_os@%$host_os%g
10094 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10095 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10096 s%@INSTALL_DATA@%$INSTALL_DATA%g
10097 s%@SET_MAKE@%$SET_MAKE%g
10099 s%@X_CFLAGS@%$X_CFLAGS%g
10100 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
10101 s%@X_LIBS@%$X_LIBS%g
10102 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
10103 s%@glib_config@%$glib_config%g
10104 s%@gtk_config@%$gtk_config%g
10105 s%@gnome_config@%$gnome_config%g
10106 s%@have_gnome_help@%$have_gnome_help%g
10107 s%@fortune_tmp@%$fortune_tmp%g
10108 s%@INCLUDES@%$INCLUDES%g
10109 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
10110 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
10111 s%@SAVER_LIBS@%$SAVER_LIBS%g
10112 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
10113 s%@GTK_LIBS@%$GTK_LIBS%g
10114 s%@XML_LIBS@%$XML_LIBS%g
10115 s%@HACK_LIBS@%$HACK_LIBS%g
10116 s%@XPM_LIBS@%$XPM_LIBS%g
10117 s%@GL_LIBS@%$GL_LIBS%g
10118 s%@GLE_LIBS@%$GLE_LIBS%g
10119 s%@XDPMS_LIBS@%$XDPMS_LIBS%g
10120 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
10121 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
10122 s%@SETUID_HACKS@%$SETUID_HACKS%g
10123 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
10124 s%@NEED_SETUID@%$NEED_SETUID%g
10125 s%@INSTALL_PAM@%$INSTALL_PAM%g
10126 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
10127 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
10128 s%@XMU_SRCS@%$XMU_SRCS%g
10129 s%@XMU_OBJS@%$XMU_OBJS%g
10130 s%@XMU_LIBS@%$XMU_LIBS%g
10131 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
10132 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
10133 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
10134 s%@LOCK_SRCS@%$LOCK_SRCS%g
10135 s%@LOCK_OBJS@%$LOCK_OBJS%g
10136 s%@GL_EXES@%$GL_EXES%g
10137 s%@GL_UTIL_EXES@%$GL_UTIL_EXES%g
10138 s%@GL_MEN@%$GL_MEN%g
10139 s%@GL_KLUDGE@%$GL_KLUDGE%g
10140 s%@GLE_EXES@%$GLE_EXES%g
10141 s%@GLE_MEN@%$GLE_MEN%g
10142 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
10143 s%@GNOMEHELP_Y@%$GNOMEHELP_Y%g
10144 s%@GNOMEHELP_N@%$GNOMEHELP_N%g
10145 s%@HACKDIR@%$HACKDIR%g
10146 s%@GNOME_DATADIR@%$GNOME_DATADIR%g
10147 s%@HACK_CONF_DIR@%$HACK_CONF_DIR%g
10148 s%@APPDEFAULTS@%$APPDEFAULTS%g
10149 s%@DEPEND@%$DEPEND%g
10150 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
10151 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
10156 cat >> $CONFIG_STATUS <<\EOF
10158 # Split the substitutions into bite-sized pieces for seds with
10159 # small command number limits, like on Digital OSF/1 and HP-UX.
10160 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10161 ac_file=1 # Number of current file.
10162 ac_beg=1 # First line for current file.
10163 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10166 while $ac_more_lines; do
10167 if test $ac_beg -gt 1; then
10168 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10170 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10172 if test ! -s conftest.s$ac_file; then
10173 ac_more_lines=false
10174 rm -f conftest.s$ac_file
10176 if test -z "$ac_sed_cmds"; then
10177 ac_sed_cmds="sed -f conftest.s$ac_file"
10179 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10181 ac_file=`expr $ac_file + 1`
10183 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10186 if test -z "$ac_sed_cmds"; then
10191 cat >> $CONFIG_STATUS <<EOF
10193 CONFIG_FILES=\${CONFIG_FILES-"Makefile
10198 driver/XScreenSaver.ad"}
10200 cat >> $CONFIG_STATUS <<\EOF
10201 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10202 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10204 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10205 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10206 *) ac_file_in="${ac_file}.in" ;;
10209 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10211 # Remove last slash and all that follows it. Not all systems have dirname.
10212 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10213 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10214 # The file is in a subdirectory.
10215 test ! -d "$ac_dir" && mkdir "$ac_dir"
10216 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10217 # A "../" for each directory in $ac_dir_suffix.
10218 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10220 ac_dir_suffix= ac_dots=
10223 case "$ac_given_srcdir" in
10225 if test -z "$ac_dots"; then top_srcdir=.
10226 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10227 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10228 *) # Relative path.
10229 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10230 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10233 case "$ac_given_INSTALL" in
10234 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10235 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10238 echo creating "$ac_file"
10240 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10242 *Makefile*) ac_comsub="1i\\
10243 # $configure_input" ;;
10247 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10249 s%@configure_input@%$configure_input%g
10250 s%@srcdir@%$srcdir%g
10251 s%@top_srcdir@%$top_srcdir%g
10252 s%@INSTALL@%$INSTALL%g
10253 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10257 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10258 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10260 # ac_d sets the value in "#define NAME VALUE" lines.
10261 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10262 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10265 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10266 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10267 ac_uB='\([ ]\)%\1#\2define\3'
10270 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10271 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10272 ac_eB='$%\1#\2define\3'
10276 if test "${CONFIG_HEADERS+set}" != set; then
10278 cat >> $CONFIG_STATUS <<EOF
10279 CONFIG_HEADERS="config.h"
10281 cat >> $CONFIG_STATUS <<\EOF
10283 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10284 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10286 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10287 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10288 *) ac_file_in="${ac_file}.in" ;;
10291 echo creating $ac_file
10293 rm -f conftest.frag conftest.in conftest.out
10294 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10295 cat $ac_file_inputs > conftest.in
10299 # Transform confdefs.h into a sed script conftest.vals that substitutes
10300 # the proper values into config.h.in to produce config.h. And first:
10301 # Protect against being on the right side of a sed subst in config.status.
10302 # Protect against being in an unquoted here document in config.status.
10303 rm -f conftest.vals
10304 cat > conftest.hdr <<\EOF
10307 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10311 sed -n -f conftest.hdr confdefs.h > conftest.vals
10314 # This sed command replaces #undef with comments. This is necessary, for
10315 # example, in the case of _POSIX_SOURCE, which is predefined and required
10316 # on some systems where configure will not decide to define it.
10317 cat >> conftest.vals <<\EOF
10318 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10321 # Break up conftest.vals because some shells have a limit on
10322 # the size of here documents, and old seds have small limits too.
10324 rm -f conftest.tail
10327 ac_lines=`grep -c . conftest.vals`
10328 # grep -c gives empty output for an empty file on some AIX systems.
10329 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10330 # Write a limited-size here document to conftest.frag.
10331 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10332 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10334 sed -f conftest.frag conftest.in > conftest.out
10336 mv conftest.out conftest.in
10337 ' >> $CONFIG_STATUS
10338 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10339 rm -f conftest.vals
10340 mv conftest.tail conftest.vals
10342 rm -f conftest.vals
10344 cat >> $CONFIG_STATUS <<\EOF
10345 rm -f conftest.frag conftest.h
10346 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10347 cat conftest.in >> conftest.h
10349 if cmp -s $ac_file conftest.h 2>/dev/null; then
10350 echo "$ac_file is unchanged"
10353 # Remove last slash and all that follows it. Not all systems have dirname.
10354 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10355 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10356 # The file is in a subdirectory.
10357 test ! -d "$ac_dir" && mkdir "$ac_dir"
10360 mv conftest.h $ac_file
10365 cat >> $CONFIG_STATUS <<EOF
10368 cat >> $CONFIG_STATUS <<\EOF
10372 chmod +x $CONFIG_STATUS
10373 rm -fr confdefs* $ac_clean_files
10374 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10377 ###############################################################################
10379 # Print some warnings at the end.
10381 ###############################################################################
10383 warn_prefix_1=" Warning:"
10384 warn_prefix_2=" Note:"
10385 warn_prefix="$warn_prefix_1"
10388 warnsep=' #################################################################'
10391 if test "$warning" = no ; then
10392 echo '' ; echo "$warnsep" ; echo ''
10399 if test "$warning" = long ; then echo '' ; fi
10402 echo "$warn_prefix $rest"
10409 if test "$was" != no ; then echo '' ; fi
10411 echo "$warn_prefix $rest"
10421 warn_prefix="$warn_prefix_2"
10423 warn_prefix="$warn_prefix_1"
10427 warn_prefix="$warn_prefix_2"
10429 warn_prefix="$warn_prefix_1"
10433 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
10434 warn 'The SGI saver extension was requested, but was not found.'
10437 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
10438 warn 'The MIT saver extension was requested, but was not found.'
10441 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
10442 warn 'The XIdle extension was requested, but was not found.'
10445 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
10446 warn 'The XSHM extension was requested, but was not found.'
10449 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
10450 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
10453 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
10454 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
10457 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
10458 warn 'The DPMS extension was requested, but was not found.'
10461 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
10462 warn 'The Xinerama extension was requested, but was not found.'
10465 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
10466 warn 'The XF86VMODE extension was requested, but was not found.'
10469 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
10470 warn "Checking of /proc/interrupts was requested, but it's bogus."
10474 if test "$have_motif" = no -a "$have_gtk" = no; then
10475 warnL "Neither Motif nor Gtk seem to be available;"
10476 warn2 "the \`xscreensaver-demo' program requires one of these."
10478 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
10479 warnL "Use of Motif was requested, but it wasn't found;"
10480 warn2 "Gtk will be used instead."
10482 elif test "$jurassic_gtk" = yes ; then
10486 v="$ac_gtk_version_string"
10487 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
10488 warnL "Use of Gtk was requested, but its version number is unknown;"
10489 elif test "$with_gtk_req" = yes ; then
10490 warnL "Use of Gtk was requested, but it is version $v;"
10492 warnL "Gtk was found on this system, but it is version $v;"
10495 warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
10497 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
10498 warnL "Use of Gtk was requested, but it wasn't found;"
10499 warn2 "Motif will be used instead."
10504 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
10505 warn 'Use of the Gnome Control Panel was requested, but the necessary'
10506 warn2 'headers and/or libraries were not found.'
10509 if test "$with_xml_req" = yes -a "$have_xml" = no ; then
10510 warn 'Use of the XML library was requested, but the necessary'
10511 warn2 'headers and/or libraries were not found.'
10512 elif test "$have_gtk" = yes -a "$have_xml" = no ; then
10513 warn 'GTK is being used, but the XML library was not found.'
10514 warn2 'Some functionality will be disabled.'
10517 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
10519 preferred_lesstif=0.86
10521 if test "$lesstif_version" = unknown; then
10522 warnL "Unable to determine the LessTif version number!"
10523 warn2 "Make sure you are using version $preferred_lesstif or newer."
10524 warn2 "See <http://www.lesstif.org/>."
10526 elif test \! $lesstif_version -gt 82; then
10527 warnL "LessTif version $lesstif_version_string is being used."
10528 warn2 "LessTif versions 0.82 and earlier are too buggy to"
10529 warn2 "use with XScreenSaver; it is strongly recommended"
10530 warn2 "that you upgrade to at least version $preferred_lesstif!"
10531 warn2 "See <http://www.lesstif.org/>."
10537 if test "$have_xpm" = no ; then
10538 if test "$with_xpm_req" = yes ; then
10539 warnL 'Use of XPM was requested, but it was not found.'
10540 elif test "$with_xpm_req" = no ; then
10541 noteL 'The XPM library is not being used.'
10543 noteL 'The XPM library was not found.'
10547 warn2 'Some of the demos will not be as colorful as they'
10548 warn2 'could be. You might want to consider installing XPM'
10549 warn2 'and re-running configure. (Remember to delete the'
10550 warn2 'config.cache file first.) You can find XPM at most'
10551 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
10555 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
10556 preferred_mesagl=3.4
10557 mgv="$ac_mesagl_version_string"
10558 pgl="$preferred_mesagl"
10560 if test "$ac_mesagl_version" = unknown; then
10561 warnL "Unable to determine the MesaGL version number!"
10562 warn2 "Make sure you are using version $preferred_mesagl or newer."
10564 elif test \! "$ac_mesagl_version" -gt 2006; then
10565 warnL "MesaGL version $mgv is being used. MesaGL 2.6 and earlier"
10566 warn2 "have a security bug. It is strongly recommended that you"
10567 warn2 "upgrade to at least version $preferred_mesagl."
10569 elif test \! "$ac_mesagl_version" -gt 3003; then
10570 warnL "MesaGL version $mgv is being used. That version has some"
10571 warn2 "bugs; it is recommended that you upgrade to $pgl or newer."
10575 if test "$have_gl" = no ; then
10576 if test "$with_gl_req" = yes ; then
10577 warnL 'Use of GL was requested, but it was not found.'
10578 elif test "$with_gl_req" = no ; then
10579 noteL 'The OpenGL 3D library is not being used.'
10581 noteL 'The OpenGL 3D library was not found.'
10584 if test "$gl_halfassed" = yes ; then
10586 warn2 'More specifically, we found the headers, but not the'
10587 warn2 'libraries; so either GL is half-installed on this'
10588 warn2 "system, or something else went wrong. The \`config.log'"
10589 warn2 'file might contain some clues.'
10593 warn2 'Those demos which use 3D will not be built or installed.'
10594 warn2 'You might want to consider installing OpenGL and'
10595 warn2 're-running configure. (Remember to delete the'
10596 warn2 "config.cache file first.) If your vendor doesn't ship"
10597 warn2 'their own implementation of OpenGL, you can get a free'
10598 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
10599 warn2 'info, see <http://www.opengl.org/>.'
10604 if test "$have_gl" = yes -a "$have_gle" = no ; then
10605 if test "$with_gle_req" = yes ; then
10606 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
10607 warn2 'it was not found (though the OpenGL library was found, and'
10608 warn2 'is being used.)'
10609 elif test "$with_gle_req" = no ; then
10610 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
10611 warn2 'library is not.'
10613 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
10617 if test "$gle_halfassed" = yes ; then
10619 warn2 'More specifically, we found the headers, but not the'
10620 warn2 'libraries; so either GLE is half-installed on this'
10621 warn2 "system, or something else went wrong. The \`config.log'"
10622 warn2 'file might contain some clues.'
10626 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
10627 warn2 'will not be built or installed. You might want to consider'
10628 warn2 'installing GLE and re-running configure. (Remember to delete'
10629 warn2 'the config.cache file first.) You can find the GLE library'
10630 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
10631 warn2 'see <http://www.opengl.org/>.'
10636 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
10637 warn 'Use of XReadDisplay was requested, but it was not found.'
10640 if test -n "$with_fortune_req"; then
10641 if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
10642 warnL "$with_fortune_req was requested as the Fortune program,"
10643 warn2 "but was not found. The default will be used instead."
10647 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
10648 warn 'Use of Kerberos was requested, but it was not found.'
10651 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
10652 warn 'Use of PAM was requested, but it was not found.'
10655 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
10656 warn 'Use of shadow passwords was requested, but they were not found.'
10660 # You are in a twisty maze of namespaces and syntaxes, all alike.
10661 # Fuck the skull of Unix.
10663 eval bindir=${bindir}
10664 eval bindir=${bindir}
10665 eval bindir=${bindir}
10666 eval bindir=${bindir}
10667 eval bindir=${bindir}
10668 eval bindir=${bindir}
10669 eval HACKDIR=${HACKDIR}
10670 eval HACKDIR=${HACKDIR}
10671 eval HACKDIR=${HACKDIR}
10672 eval HACKDIR=${HACKDIR}
10673 eval HACKDIR=${HACKDIR}
10674 eval HACKDIR=${HACKDIR}
10675 eval HACK_CONF_DIR=${HACK_CONF_DIR}
10676 eval HACK_CONF_DIR=${HACK_CONF_DIR}
10677 eval HACK_CONF_DIR=${HACK_CONF_DIR}
10678 eval HACK_CONF_DIR=${HACK_CONF_DIR}
10679 eval HACK_CONF_DIR=${HACK_CONF_DIR}
10680 eval HACK_CONF_DIR=${HACK_CONF_DIR}
10682 # canonicalize slashes.
10683 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
10684 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10685 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
10688 # Sanity check the hackdir
10689 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
10690 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
10692 { echo "configure: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
10693 There will be an executable installed with that name, so
10694 that can't be the name of a directory as well. Please
10695 re-configure with a different directory name." 1>&2; exit 1; }
10702 # Now let's see if there's a previous RPM version already installed. Blargh!
10706 rpmv=`(rpm -qv xscreensaver) 2>&- | \
10707 sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
10710 if test \! -z "$rpmv" ; then
10711 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
10712 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
10715 warnL "There is already an installed RPM of xscreensaver $rpmv"
10716 warn2 "on this system. You might want to remove it (with"
10717 warn2 '"rpm -ve xscreensaver") before running "make install"'
10718 warn2 "from this directory."
10720 warn2 "Alternately, you could build this version of xscreensaver"
10721 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
10722 warn2 "file is included. See the RPM documentation for more info."
10725 if test "$rpmbdir" = "$rpmhdir" ; then
10726 warn2 "The RPM version was installed in $rpmbdir."
10728 warn2 "The RPM version was installed in $rpmbdir,"
10729 warn2 "with demos in $rpmhdir."
10736 if test "${bindir}" = "${HACKDIR}" ; then
10740 if test "$do_dir_warning" = yes; then
10744 echo ' When you run "make install", the "xscreensaver",'
10745 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
10746 echo " will be installed in ${bindir}."
10748 echo " The various graphics demos (120+ different executables) will"
10749 echo " also be installed in ${HACKDIR}."
10751 echo " If you would prefer the demos to be installed elsewhere"
10752 echo " (for example, in a dedicated directory) you should re-run"
10753 echo " configure with the --with-hackdir=DIR option. For more"
10754 echo " information, run $0 --help."
10758 if test "$warning" != no; then
10759 echo '' ; echo "$warnsep" ; echo ''
10762 if test "$do_dir_warning" = no; then
10763 if test "$warning" = no; then
10766 echo "User programs will be installed in ${bindir}/"
10767 echo "Screen savers will be installed in ${HACKDIR}/"
10768 echo "Configuration will be installed in ${HACK_CONF_DIR}/"