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-pixbuf Include support for the GDK-Pixbuf library in some
99 demos, which will make it possible for them to read
100 GIF, JPEG, and PNG files as well."
102 --with-jpeg Include support for the JPEG library in some demos,
103 which will make it possible for them to read JPEG
106 --with-xshm-ext Include support for the Shared Memory extension."
108 --with-xdbe-ext Include support for the DOUBLE-BUFFER extension."
110 --with-readdisplay Include support for the XReadDisplay extension."
113 --with-fortune=PROGRAM Some demos are able to run an external program and
114 display its text; this names the program to use by
115 default (though it can be overridden with X
116 resources.) Default is \"/usr/games/fortune\"."
118 --with-setuid-hacks Allow some demos to be installed \`setuid root'
119 (which is needed in order to ping other hosts.)
122 # Initialize some variables set by options.
123 # The variables have the same names as the options, with
124 # dashes changed to underlines.
126 cache_file=./config.cache
135 program_transform_name=s,x,x,
143 bindir='${exec_prefix}/bin'
144 sbindir='${exec_prefix}/sbin'
145 libexecdir='${exec_prefix}/libexec'
146 datadir='${prefix}/share'
147 sysconfdir='${prefix}/etc'
148 sharedstatedir='${prefix}/com'
149 localstatedir='${prefix}/var'
150 libdir='${exec_prefix}/lib'
151 includedir='${prefix}/include'
152 oldincludedir='/usr/include'
153 infodir='${prefix}/info'
154 mandir='${prefix}/man'
156 # Initialize some other variables.
159 SHELL=${CONFIG_SHELL-/bin/sh}
160 # Maximum number of lines to put in a shell here document.
167 # If the previous option needs an argument, assign it.
168 if test -n "$ac_prev"; then
169 eval "$ac_prev=\$ac_option"
175 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
179 # Accept the important Cygnus configure options, so we can diagnose typos.
183 -bindir | --bindir | --bindi | --bind | --bin | --bi)
185 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
186 bindir="$ac_optarg" ;;
188 -build | --build | --buil | --bui | --bu)
190 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
191 build="$ac_optarg" ;;
193 -cache-file | --cache-file | --cache-fil | --cache-fi \
194 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
195 ac_prev=cache_file ;;
196 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
197 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
198 cache_file="$ac_optarg" ;;
200 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
202 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
204 datadir="$ac_optarg" ;;
206 -disable-* | --disable-*)
207 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
208 # Reject names that are not valid shell variable names.
209 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
210 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
212 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
213 eval "enable_${ac_feature}=no" ;;
215 -enable-* | --enable-*)
216 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
217 # Reject names that are not valid shell variable names.
218 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
219 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
221 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
226 eval "enable_${ac_feature}='$ac_optarg'" ;;
228 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
229 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
230 | --exec | --exe | --ex)
231 ac_prev=exec_prefix ;;
232 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
233 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
234 | --exec=* | --exe=* | --ex=*)
235 exec_prefix="$ac_optarg" ;;
237 -gas | --gas | --ga | --g)
238 # Obsolete; use --with-gas.
241 -help | --help | --hel | --he)
242 # Omit some internal or obsolete options to make the list less imposing.
243 # This message is too long to be a string in the A/UX 3.1 sh.
245 Usage: configure [options] [host]
246 Options: [defaults in brackets after descriptions]
250 --cache-file=FILE cache test results in FILE
251 --help print this message
252 --no-create do not create output files
253 --quiet, --silent do not print \`checking...' messages
254 --version print the version of autoconf that created configure
256 Directory and file names:
258 --prefix=PREFIX install architecture-independent files in PREFIX
260 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
262 --bindir=DIR user executables in DIR [EPREFIX/bin]
263 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
264 --includedir=DIR C header files in DIR [PREFIX/include]
265 --x-includes=DIR X include files are in DIR
266 --x-libraries=DIR X library files are in DIR
267 --mandir=DIR man documentation in DIR [PREFIX/man]
268 --srcdir=DIR find the sources in DIR [configure dir or ..]
269 --program-prefix=PREFIX prepend PREFIX to installed program names
270 --program-suffix=SUFFIX append SUFFIX to installed program names
271 --program-transform-name=PROGRAM
272 run sed PROGRAM on installed program names
278 --build=BUILD configure for building on BUILD [BUILD=HOST]
279 --host=HOST configure for HOST [guessed]
280 --target=TARGET configure for TARGET [TARGET=HOST]
282 if test -n "$ac_help"; then
287 -host | --host | --hos | --ho)
289 -host=* | --host=* | --hos=* | --ho=*)
292 -includedir | --includedir | --includedi | --included | --include \
293 | --includ | --inclu | --incl | --inc)
294 ac_prev=includedir ;;
295 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
296 | --includ=* | --inclu=* | --incl=* | --inc=*)
297 includedir="$ac_optarg" ;;
299 -infodir | --infodir | --infodi | --infod | --info | --inf)
301 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
302 infodir="$ac_optarg" ;;
304 -libdir | --libdir | --libdi | --libd)
306 -libdir=* | --libdir=* | --libdi=* | --libd=*)
307 libdir="$ac_optarg" ;;
309 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
310 | --libexe | --libex | --libe)
311 ac_prev=libexecdir ;;
312 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
313 | --libexe=* | --libex=* | --libe=*)
314 libexecdir="$ac_optarg" ;;
316 -localstatedir | --localstatedir | --localstatedi | --localstated \
317 | --localstate | --localstat | --localsta | --localst \
318 | --locals | --local | --loca | --loc | --lo)
319 ac_prev=localstatedir ;;
320 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
321 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
322 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
323 localstatedir="$ac_optarg" ;;
325 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
327 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
328 mandir="$ac_optarg" ;;
331 # Obsolete; use --without-fp.
334 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
338 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
339 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
342 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
343 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
344 | --oldin | --oldi | --old | --ol | --o)
345 ac_prev=oldincludedir ;;
346 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
347 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
348 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
349 oldincludedir="$ac_optarg" ;;
351 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
353 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
354 prefix="$ac_optarg" ;;
356 -program-prefix | --program-prefix | --program-prefi | --program-pref \
357 | --program-pre | --program-pr | --program-p)
358 ac_prev=program_prefix ;;
359 -program-prefix=* | --program-prefix=* | --program-prefi=* \
360 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
361 program_prefix="$ac_optarg" ;;
363 -program-suffix | --program-suffix | --program-suffi | --program-suff \
364 | --program-suf | --program-su | --program-s)
365 ac_prev=program_suffix ;;
366 -program-suffix=* | --program-suffix=* | --program-suffi=* \
367 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
368 program_suffix="$ac_optarg" ;;
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 ac_prev=program_transform_name ;;
378 -program-transform-name=* | --program-transform-name=* \
379 | --program-transform-nam=* | --program-transform-na=* \
380 | --program-transform-n=* | --program-transform-=* \
381 | --program-transform=* | --program-transfor=* \
382 | --program-transfo=* | --program-transf=* \
383 | --program-trans=* | --program-tran=* \
384 | --progr-tra=* | --program-tr=* | --program-t=*)
385 program_transform_name="$ac_optarg" ;;
387 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
388 | -silent | --silent | --silen | --sile | --sil)
391 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
393 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
395 sbindir="$ac_optarg" ;;
397 -sharedstatedir | --sharedstatedir | --sharedstatedi \
398 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
399 | --sharedst | --shareds | --shared | --share | --shar \
401 ac_prev=sharedstatedir ;;
402 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
403 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
404 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
406 sharedstatedir="$ac_optarg" ;;
408 -site | --site | --sit)
410 -site=* | --site=* | --sit=*)
413 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
415 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
416 srcdir="$ac_optarg" ;;
418 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
419 | --syscon | --sysco | --sysc | --sys | --sy)
420 ac_prev=sysconfdir ;;
421 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
422 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
423 sysconfdir="$ac_optarg" ;;
425 -target | --target | --targe | --targ | --tar | --ta | --t)
427 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
428 target="$ac_optarg" ;;
430 -v | -verbose | --verbose | --verbos | --verbo | --verb)
433 -version | --version | --versio | --versi | --vers)
434 echo "configure generated by autoconf version 2.13"
438 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
439 # Reject names that are not valid shell variable names.
440 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
441 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
443 ac_package=`echo $ac_package| sed 's/-/_/g'`
448 eval "with_${ac_package}='$ac_optarg'" ;;
450 -without-* | --without-*)
451 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
452 # Reject names that are not valid shell variable names.
453 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
454 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
456 ac_package=`echo $ac_package| sed 's/-/_/g'`
457 eval "with_${ac_package}=no" ;;
460 # Obsolete; use --with-x.
463 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
464 | --x-incl | --x-inc | --x-in | --x-i)
465 ac_prev=x_includes ;;
466 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
467 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
468 x_includes="$ac_optarg" ;;
470 -x-libraries | --x-libraries | --x-librarie | --x-librari \
471 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
472 ac_prev=x_libraries ;;
473 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
474 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
475 x_libraries="$ac_optarg" ;;
477 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
481 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
482 echo "configure: warning: $ac_option: invalid host type" 1>&2
484 if test "x$nonopt" != xNONE; then
485 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
493 if test -n "$ac_prev"; then
494 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
497 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
499 # File descriptor usage:
502 # 2 errors and warnings
503 # 3 some systems may open it to /dev/tty
504 # 4 used on the Kubota Titan
505 # 6 checking for... messages and results
506 # 5 compiler messages saved in config.log
507 if test "$silent" = yes; then
515 This file contains any messages produced by compilers while
516 running configure, to aid debugging if configure makes a mistake.
519 # Strip out --no-create and --no-recursion so they do not pile up.
520 # Also quote any args containing shell metacharacters.
525 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
526 | --no-cr | --no-c) ;;
527 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
528 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
529 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
530 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
531 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
536 # Only set these to C if already set. These must not be set unconditionally
537 # because not all systems understand e.g. LANG=C (notably SCO).
538 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
539 # Non-C LC_CTYPE values break the ctype check.
540 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
541 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
542 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
543 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
545 # confdefs.h avoids OS command line length limits that DEFS can exceed.
546 rm -rf conftest* confdefs.h
547 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
550 # A filename unique to this package, relative to the directory that
551 # configure is in, which we can look for to find out if srcdir is correct.
552 ac_unique_file=driver/subprocs.c
554 # Find the source files, if location was not specified.
555 if test -z "$srcdir"; then
556 ac_srcdir_defaulted=yes
557 # Try the directory containing this script, then its parent.
559 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
560 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
562 if test ! -r $srcdir/$ac_unique_file; then
566 ac_srcdir_defaulted=no
568 if test ! -r $srcdir/$ac_unique_file; then
569 if test "$ac_srcdir_defaulted" = yes; then
570 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
572 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
575 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
577 # Prefer explicitly selected file to automatically selected ones.
578 if test -z "$CONFIG_SITE"; then
579 if test "x$prefix" != xNONE; then
580 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
582 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
585 for ac_site_file in $CONFIG_SITE; do
586 if test -r "$ac_site_file"; then
587 echo "loading site script $ac_site_file"
592 if test -r "$cache_file"; then
593 echo "loading cache $cache_file"
596 echo "creating cache $cache_file"
601 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
602 ac_cpp='$CPP $CPPFLAGS'
603 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
604 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
605 cross_compiling=$ac_cv_prog_cc_cross
609 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
610 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
611 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
618 ac_n= ac_c='\c' ac_t=
624 echo "current directory: `pwd`"
625 echo "command line was: $0 $@"
628 # After checking to see that --srcdir is correct (which AC_INIT does)
629 # check for some random other files that come later in the tar file,
630 # to make sure everything is here.
632 for d in driver utils hacks hacks/glx ; do
633 f=$srcdir/$d/Makefile.in
634 if test \! -r $f ; then
636 echo "ERROR: The package is incomplete: $f does not exist."
637 echo " This probably means that your download was truncated."
644 ###############################################################################
646 # Function to figure out how to run the compiler.
648 ###############################################################################
653 ###############################################################################
655 # Functions to figure out how to disable // comments in ANSI C code.
657 # (With recent gcc, this is done with "-std=c89". With older gcc, this
658 # is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
659 # gcc. Old gcc doesn't support -std, and new gcc doesn't support -lang.
660 # so much for compatibility!)
662 ###############################################################################
669 ###############################################################################
671 # Function to figure out how to create directory trees.
673 ###############################################################################
678 ###############################################################################
680 # Function to check whether gettimeofday() exists, and how to call it.
681 # This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
683 ###############################################################################
688 ###############################################################################
690 # Function to find perl5 (defines PERL and PERL_VERSION.)
692 ###############################################################################
694 # M4 sucks!! perl sucks too!!
696 perl_version_cmd='print $]'
702 ###############################################################################
704 # Function to demand "bc". Losers.
706 ###############################################################################
710 ###############################################################################
712 # Functions to check how to do ICMP PING requests.
714 ###############################################################################
721 ###############################################################################
723 # Functions to check for various X11 crap.
725 ###############################################################################
727 # Try and find the app-defaults directory.
728 # It sucks that autoconf doesn't do this already...
740 # Random special-cases for X on certain pathological OSes.
741 # You know who you are.
747 ###############################################################################
749 # Some utility functions to make checking for X things easier.
751 ###############################################################################
753 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
757 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
761 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
766 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
767 # Use this sparingly; it probably doesn't work very well on X programs.
771 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
772 # (But not the -L directories!)
778 # Usage: HANDLE_X_PATH_ARG([variable_name],
779 # [--command-line-option],
780 # [descriptive string])
782 # All of the --with options take three forms:
784 # --with-foo (or --with-foo=yes)
785 # --without-foo (or --with-foo=no)
788 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
789 # a directory (string beginning with a slash) it checks to see whether
790 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
797 ###############################################################################
798 ###############################################################################
800 # End of function definitions. Now start actually executing stuff.
802 ###############################################################################
803 ###############################################################################
805 # random compiler setup
807 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
808 if test -f $ac_dir/install-sh; then
810 ac_install_sh="$ac_aux_dir/install-sh -c"
812 elif test -f $ac_dir/install.sh; then
814 ac_install_sh="$ac_aux_dir/install.sh -c"
818 if test -z "$ac_aux_dir"; then
819 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
821 ac_config_guess=$ac_aux_dir/config.guess
822 ac_config_sub=$ac_aux_dir/config.sub
823 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
826 # Make sure we can run config.sub.
827 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
828 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
831 echo $ac_n "checking host system type""... $ac_c" 1>&6
832 echo "configure:844: checking host system type" >&5
835 case "$host_alias" in
839 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
840 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
842 *) host_alias=$nonopt ;;
846 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
847 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
848 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
849 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
850 echo "$ac_t""$host" 1>&6
852 # Extract the first word of "gcc", so it can be a program name with args.
853 set dummy gcc; ac_word=$2
854 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
855 echo "configure:867: checking for $ac_word" >&5
856 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
857 echo $ac_n "(cached) $ac_c" 1>&6
859 if test -n "$CC"; then
860 ac_cv_prog_CC="$CC" # Let the user override the test.
862 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
864 for ac_dir in $ac_dummy; do
865 test -z "$ac_dir" && ac_dir=.
866 if test -f $ac_dir/$ac_word; then
875 if test -n "$CC"; then
876 echo "$ac_t""$CC" 1>&6
878 echo "$ac_t""no" 1>&6
881 if test -z "$CC"; then
882 # Extract the first word of "cc", so it can be a program name with args.
883 set dummy cc; ac_word=$2
884 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
885 echo "configure:897: checking for $ac_word" >&5
886 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
887 echo $ac_n "(cached) $ac_c" 1>&6
889 if test -n "$CC"; then
890 ac_cv_prog_CC="$CC" # Let the user override the test.
892 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
895 for ac_dir in $ac_dummy; do
896 test -z "$ac_dir" && ac_dir=.
897 if test -f $ac_dir/$ac_word; then
898 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
907 if test $ac_prog_rejected = yes; then
908 # We found a bogon in the path, so make sure we never use it.
909 set dummy $ac_cv_prog_CC
911 if test $# -gt 0; then
912 # We chose a different compiler from the bogus one.
913 # However, it has the same basename, so the bogon will be chosen
914 # first if we set CC to just the basename; use the full file name.
916 set dummy "$ac_dir/$ac_word" "$@"
924 if test -n "$CC"; then
925 echo "$ac_t""$CC" 1>&6
927 echo "$ac_t""no" 1>&6
930 if test -z "$CC"; then
933 # Extract the first word of "cl", so it can be a program name with args.
934 set dummy cl; ac_word=$2
935 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
936 echo "configure:948: checking for $ac_word" >&5
937 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
938 echo $ac_n "(cached) $ac_c" 1>&6
940 if test -n "$CC"; then
941 ac_cv_prog_CC="$CC" # Let the user override the test.
943 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
945 for ac_dir in $ac_dummy; do
946 test -z "$ac_dir" && ac_dir=.
947 if test -f $ac_dir/$ac_word; then
956 if test -n "$CC"; then
957 echo "$ac_t""$CC" 1>&6
959 echo "$ac_t""no" 1>&6
964 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
967 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
968 echo "configure:980: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
971 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
972 ac_cpp='$CPP $CPPFLAGS'
973 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
974 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
975 cross_compiling=$ac_cv_prog_cc_cross
977 cat > conftest.$ac_ext << EOF
979 #line 991 "configure"
980 #include "confdefs.h"
984 if { (eval echo configure:996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
985 ac_cv_prog_cc_works=yes
986 # If we can't run a trivial program, we are probably using a cross compiler.
987 if (./conftest; exit) 2>/dev/null; then
988 ac_cv_prog_cc_cross=no
990 ac_cv_prog_cc_cross=yes
993 echo "configure: failed program was:" >&5
994 cat conftest.$ac_ext >&5
995 ac_cv_prog_cc_works=no
999 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1000 ac_cpp='$CPP $CPPFLAGS'
1001 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1002 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1003 cross_compiling=$ac_cv_prog_cc_cross
1005 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1006 if test $ac_cv_prog_cc_works = no; then
1007 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1009 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1010 echo "configure:1022: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1011 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1012 cross_compiling=$ac_cv_prog_cc_cross
1014 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1015 echo "configure:1027: checking whether we are using GNU C" >&5
1016 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1017 echo $ac_n "(cached) $ac_c" 1>&6
1019 cat > conftest.c <<EOF
1024 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1031 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1033 if test $ac_cv_prog_gcc = yes; then
1039 ac_test_CFLAGS="${CFLAGS+set}"
1040 ac_save_CFLAGS="$CFLAGS"
1042 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1043 echo "configure:1055: checking whether ${CC-cc} accepts -g" >&5
1044 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1045 echo $ac_n "(cached) $ac_c" 1>&6
1047 echo 'void f(){}' > conftest.c
1048 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1057 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1058 if test "$ac_test_CFLAGS" = set; then
1059 CFLAGS="$ac_save_CFLAGS"
1060 elif test $ac_cv_prog_cc_g = yes; then
1061 if test "$GCC" = yes; then
1067 if test "$GCC" = yes; then
1075 if test -z "$GCC"; then
1076 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
1077 echo "configure:1089: checking how to request ANSI compilation" >&5
1080 echo "$ac_t""HPUX: adding -Ae" 1>&6
1084 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
1085 CC="$CC -qlanglvl=ansi -qhalt=e"
1089 echo "$ac_t""DEC: adding -std1 -ieee" 1>&6
1094 echo "$ac_t""no idea" 1>&6
1099 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
1100 echo "configure:1112: checking whether the compiler works on ANSI C" >&5
1101 if test "$cross_compiling" = yes; then
1102 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1104 cat > conftest.$ac_ext <<EOF
1105 #line 1117 "configure"
1106 #include "confdefs.h"
1107 main(int ac, char **av) { return 0; }
1109 if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1111 echo "$ac_t""yes" 1>&6
1113 echo "configure: failed program was:" >&5
1114 cat conftest.$ac_ext >&5
1116 echo "$ac_t""no" 1>&6
1117 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
1123 if test -n "$GCC"; then
1124 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
1125 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
1128 *-irix5* |*-irix6.0-3* )
1129 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
1130 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
1133 # if test -z "$GCC"; then
1134 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
1135 # CC="$CC -migrate -w0 -verbose -warnprotos"
1141 if test -n "$GCC"; then
1142 if test -n "$GCC"; then
1143 echo $ac_n "checking whether gcc accepts -std""... $ac_c" 1>&6
1144 echo "configure:1156: checking whether gcc accepts -std" >&5
1145 if eval "test \"`echo '$''{'ac_cv_gcc_accepts_std'+set}'`\" = set"; then
1146 echo $ac_n "(cached) $ac_c" 1>&6
1148 if ( gcc -E -std=c89 - </dev/null 2>&1 >/dev/null | \
1149 grep unrecognized >/dev/null ); then
1150 ac_cv_gcc_accepts_std=no
1152 ac_cv_gcc_accepts_std=yes
1156 echo "$ac_t""$ac_cv_gcc_accepts_std" 1>&6
1157 ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
1160 echo "$ac_t""Disabling C++ comments in ANSI C code." 1>&6
1162 # The reason that // comments are banned from xscreensaver is that gcc is
1163 # basically the only compiler in the world that supports them in C code.
1164 # All other vendors support them only in their C++ compilers, not in their
1165 # ANSI C compilers. This means that it's a portability problem: every time
1166 # these comments have snuck into the xscreensaver source code, I've gotten
1167 # complaints about it the next day. So we turn off support for them in gcc
1168 # as well to prevent them from accidentially slipping in.
1170 if test "$ac_gcc_accepts_std" = yes ; then
1172 # -std=c89 defines __STRICT_ANSI__, which we don't want.
1173 # (That appears to be the only additional preprocessor symbol
1174 # it defines, in addition to the syntax changes it makes.)
1176 # -std=gnu89 is no good, because // comments were a GNU extension
1177 # before they were in the ANSI C 99 spec... (gcc 2.96 permits //
1178 # with -std=gnu89 but not with -std=c89.)
1180 CC="$CC -std=c89 -U__STRICT_ANSI__"
1183 CC="$CC -Wp,-lang-c89"
1187 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1188 echo "configure:1200: checking how to run the C preprocessor" >&5
1189 # On Suns, sometimes $CPP names a directory.
1190 if test -n "$CPP" && test -d "$CPP"; then
1193 if test -z "$CPP"; then
1194 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1195 echo $ac_n "(cached) $ac_c" 1>&6
1197 # This must be in double quotes, not single quotes, because CPP may get
1198 # substituted into the Makefile and "${CC-cc}" will confuse make.
1200 # On the NeXT, cc -E runs the code through the compiler's parser,
1201 # not just through cpp.
1202 cat > conftest.$ac_ext <<EOF
1203 #line 1215 "configure"
1204 #include "confdefs.h"
1208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1209 { (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1211 if test -z "$ac_err"; then
1215 echo "configure: failed program was:" >&5
1216 cat conftest.$ac_ext >&5
1218 CPP="${CC-cc} -E -traditional-cpp"
1219 cat > conftest.$ac_ext <<EOF
1220 #line 1232 "configure"
1221 #include "confdefs.h"
1225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1226 { (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1228 if test -z "$ac_err"; then
1232 echo "configure: failed program was:" >&5
1233 cat conftest.$ac_ext >&5
1235 CPP="${CC-cc} -nologo -E"
1236 cat > conftest.$ac_ext <<EOF
1237 #line 1249 "configure"
1238 #include "confdefs.h"
1242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1243 { (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1245 if test -z "$ac_err"; then
1249 echo "configure: failed program was:" >&5
1250 cat conftest.$ac_ext >&5
1259 ac_cv_prog_CPP="$CPP"
1261 CPP="$ac_cv_prog_CPP"
1263 ac_cv_prog_CPP="$CPP"
1265 echo "$ac_t""$CPP" 1>&6
1267 echo $ac_n "checking for working const""... $ac_c" 1>&6
1268 echo "configure:1280: checking for working const" >&5
1269 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1270 echo $ac_n "(cached) $ac_c" 1>&6
1272 cat > conftest.$ac_ext <<EOF
1273 #line 1285 "configure"
1274 #include "confdefs.h"
1278 /* Ultrix mips cc rejects this. */
1279 typedef int charset[2]; const charset x;
1280 /* SunOS 4.1.1 cc rejects this. */
1281 char const *const *ccp;
1283 /* NEC SVR4.0.2 mips cc rejects this. */
1284 struct point {int x, y;};
1285 static struct point const zero = {0,0};
1286 /* AIX XL C 1.02.0.0 rejects this.
1287 It does not let you subtract one const X* pointer from another in an arm
1288 of an if-expression whose if-part is not a constant expression */
1289 const char *g = "string";
1290 ccp = &g + (g ? g-g : 0);
1291 /* HPUX 7.0 cc rejects these. */
1294 ccp = (char const *const *) p;
1295 { /* SCO 3.2v4 cc rejects this. */
1297 char const *s = 0 ? (char *) 0 : (char const *) 0;
1301 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1303 const int *foo = &x[0];
1306 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1307 typedef const int *iptr;
1311 { /* AIX XL C 1.02.0.0 rejects this saying
1312 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1313 struct s { int j; const int *ap[3]; };
1314 struct s *b; b->j = 5;
1316 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1322 if { (eval echo configure:1334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1326 echo "configure: failed program was:" >&5
1327 cat conftest.$ac_ext >&5
1334 echo "$ac_t""$ac_cv_c_const" 1>&6
1335 if test $ac_cv_c_const = no; then
1336 cat >> confdefs.h <<\EOF
1342 echo $ac_n "checking for inline""... $ac_c" 1>&6
1343 echo "configure:1355: checking for inline" >&5
1344 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1345 echo $ac_n "(cached) $ac_c" 1>&6
1348 for ac_kw in inline __inline__ __inline; do
1349 cat > conftest.$ac_ext <<EOF
1350 #line 1362 "configure"
1351 #include "confdefs.h"
1357 if { (eval echo configure:1369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1359 ac_cv_c_inline=$ac_kw; break
1361 echo "configure: failed program was:" >&5
1362 cat conftest.$ac_ext >&5
1369 echo "$ac_t""$ac_cv_c_inline" 1>&6
1370 case "$ac_cv_c_inline" in
1372 no) cat >> confdefs.h <<\EOF
1376 *) cat >> confdefs.h <<EOF
1377 #define inline $ac_cv_c_inline
1382 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
1383 echo $ac_n "checking for bc""... $ac_c" 1>&6
1384 echo "configure:1396: checking for bc" >&5
1385 if test "$ac_bc_result" = "15" ; then
1386 echo "$ac_t""yes" 1>&6
1388 echo "$ac_t""no" 1>&6
1390 { echo "configure: error: Your system doesn't have \"bc\", which has been a standard
1391 part of Unix since the 1970s. Come back when your vendor
1392 has grown a clue." 1>&2; exit 1; }
1396 # stuff for Makefiles
1397 # Find a good install program. We prefer a C program (faster),
1398 # so one script is as good as another. But avoid the broken or
1399 # incompatible versions:
1400 # SysV /etc/install, /usr/sbin/install
1401 # SunOS /usr/etc/install
1402 # IRIX /sbin/install
1404 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1405 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1406 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1407 # ./install, which can be erroneously created by make from ./install.sh.
1408 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1409 echo "configure:1421: checking for a BSD compatible install" >&5
1410 if test -z "$INSTALL"; then
1411 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1412 echo $ac_n "(cached) $ac_c" 1>&6
1414 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1415 for ac_dir in $PATH; do
1416 # Account for people who put trailing slashes in PATH elements.
1418 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1420 # OSF1 and SCO ODT 3.0 have their own names for install.
1421 # Don't use installbsd from OSF since it installs stuff as root
1423 for ac_prog in ginstall scoinst install; do
1424 if test -f $ac_dir/$ac_prog; then
1425 if test $ac_prog = install &&
1426 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1427 # AIX install. It has an incompatible calling convention.
1430 ac_cv_path_install="$ac_dir/$ac_prog -c"
1441 if test "${ac_cv_path_install+set}" = set; then
1442 INSTALL="$ac_cv_path_install"
1444 # As a last resort, use the slow shell script. We don't cache a
1445 # path for INSTALL within a source directory, because that will
1446 # break other packages using the cache if that directory is
1447 # removed, or if the path is relative.
1448 INSTALL="$ac_install_sh"
1451 echo "$ac_t""$INSTALL" 1>&6
1453 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1454 # It thinks the first close brace ends the variable substitution.
1455 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1457 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1459 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1461 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1462 echo "configure:1474: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1463 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
1464 echo $ac_n "(cached) $ac_c" 1>&6
1466 ac_cv_install_d_creates_dirs=no
1468 if mkdir conftestdir; then
1470 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1471 if test -d dir1/dir2/. ; then
1472 ac_cv_install_d_creates_dirs=yes
1480 echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
1482 if test "$ac_cv_install_d_creates_dirs" = no ; then
1483 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1484 echo "configure:1496: checking whether \"mkdir -p\" creates intermediate directories" >&5
1485 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
1486 echo $ac_n "(cached) $ac_c" 1>&6
1488 ac_cv_mkdir_p_creates_dirs=no
1490 if mkdir conftestdir; then
1492 mkdir -p dir1/dir2 >&- 2>&-
1493 if test -d dir1/dir2/. ; then
1494 ac_cv_mkdir_p_creates_dirs=yes
1502 echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
1505 if test "$ac_cv_install_d_creates_dirs" = yes ; then
1506 INSTALL_DIRS='${INSTALL} -d'
1507 elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
1508 INSTALL_DIRS='mkdir -p'
1511 INSTALL_DIRS='${INSTALL} -d'
1514 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1515 echo "configure:1527: checking whether ${MAKE-make} sets \${MAKE}" >&5
1516 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1517 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1518 echo $ac_n "(cached) $ac_c" 1>&6
1520 cat > conftestmake <<\EOF
1522 @echo 'ac_maketemp="${MAKE}"'
1524 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1525 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1526 if test -n "$ac_maketemp"; then
1527 eval ac_cv_prog_make_${ac_make}_set=yes
1529 eval ac_cv_prog_make_${ac_make}_set=no
1533 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1534 echo "$ac_t""yes" 1>&6
1537 echo "$ac_t""no" 1>&6
1538 SET_MAKE="MAKE=${MAKE-make}"
1542 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
1543 # That's wrong: it should be set to '${INSTALL}', so that one can
1544 # implement the "install-strip" target properly (strip executables,
1545 # but do not try to strip scripts.)
1547 INSTALL_SCRIPT='${INSTALL}'
1550 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1551 echo "configure:1563: checking for ANSI C header files" >&5
1552 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1553 echo $ac_n "(cached) $ac_c" 1>&6
1555 cat > conftest.$ac_ext <<EOF
1556 #line 1568 "configure"
1557 #include "confdefs.h"
1563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1564 { (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1566 if test -z "$ac_err"; then
1568 ac_cv_header_stdc=yes
1571 echo "configure: failed program was:" >&5
1572 cat conftest.$ac_ext >&5
1574 ac_cv_header_stdc=no
1578 if test $ac_cv_header_stdc = yes; then
1579 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1580 cat > conftest.$ac_ext <<EOF
1581 #line 1593 "configure"
1582 #include "confdefs.h"
1585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1586 egrep "memchr" >/dev/null 2>&1; then
1590 ac_cv_header_stdc=no
1596 if test $ac_cv_header_stdc = yes; then
1597 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1598 cat > conftest.$ac_ext <<EOF
1599 #line 1611 "configure"
1600 #include "confdefs.h"
1603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1604 egrep "free" >/dev/null 2>&1; then
1608 ac_cv_header_stdc=no
1614 if test $ac_cv_header_stdc = yes; then
1615 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1616 if test "$cross_compiling" = yes; then
1619 cat > conftest.$ac_ext <<EOF
1620 #line 1632 "configure"
1621 #include "confdefs.h"
1623 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1624 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1625 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1626 int main () { int i; for (i = 0; i < 256; i++)
1627 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1631 if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1635 echo "configure: failed program was:" >&5
1636 cat conftest.$ac_ext >&5
1638 ac_cv_header_stdc=no
1646 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1647 if test $ac_cv_header_stdc = yes; then
1648 cat >> confdefs.h <<\EOF
1649 #define STDC_HEADERS 1
1654 for ac_hdr in unistd.h
1656 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1657 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1658 echo "configure:1670: checking for $ac_hdr" >&5
1659 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1660 echo $ac_n "(cached) $ac_c" 1>&6
1662 cat > conftest.$ac_ext <<EOF
1663 #line 1675 "configure"
1664 #include "confdefs.h"
1667 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1668 { (eval echo configure:1680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1669 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1670 if test -z "$ac_err"; then
1672 eval "ac_cv_header_$ac_safe=yes"
1675 echo "configure: failed program was:" >&5
1676 cat conftest.$ac_ext >&5
1678 eval "ac_cv_header_$ac_safe=no"
1682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1683 echo "$ac_t""yes" 1>&6
1684 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1685 cat >> confdefs.h <<EOF
1686 #define $ac_tr_hdr 1
1690 echo "$ac_t""no" 1>&6
1694 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1695 echo "configure:1707: checking for mode_t" >&5
1696 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1697 echo $ac_n "(cached) $ac_c" 1>&6
1699 cat > conftest.$ac_ext <<EOF
1700 #line 1712 "configure"
1701 #include "confdefs.h"
1702 #include <sys/types.h>
1708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1709 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1711 ac_cv_type_mode_t=yes
1714 ac_cv_type_mode_t=no
1719 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1720 if test $ac_cv_type_mode_t = no; then
1721 cat >> confdefs.h <<\EOF
1727 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1728 echo "configure:1740: checking for pid_t" >&5
1729 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1730 echo $ac_n "(cached) $ac_c" 1>&6
1732 cat > conftest.$ac_ext <<EOF
1733 #line 1745 "configure"
1734 #include "confdefs.h"
1735 #include <sys/types.h>
1741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1742 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1744 ac_cv_type_pid_t=yes
1752 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1753 if test $ac_cv_type_pid_t = no; then
1754 cat >> confdefs.h <<\EOF
1760 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1761 echo "configure:1773: checking for size_t" >&5
1762 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1765 cat > conftest.$ac_ext <<EOF
1766 #line 1778 "configure"
1767 #include "confdefs.h"
1768 #include <sys/types.h>
1774 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1775 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1777 ac_cv_type_size_t=yes
1780 ac_cv_type_size_t=no
1785 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1786 if test $ac_cv_type_size_t = no; then
1787 cat >> confdefs.h <<\EOF
1788 #define size_t unsigned
1793 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1794 echo "configure:1806: checking return type of signal handlers" >&5
1795 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1796 echo $ac_n "(cached) $ac_c" 1>&6
1798 cat > conftest.$ac_ext <<EOF
1799 #line 1811 "configure"
1800 #include "confdefs.h"
1801 #include <sys/types.h>
1807 extern "C" void (*signal (int, void (*)(int)))(int);
1809 void (*signal ()) ();
1816 if { (eval echo configure:1828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1818 ac_cv_type_signal=void
1820 echo "configure: failed program was:" >&5
1821 cat conftest.$ac_ext >&5
1823 ac_cv_type_signal=int
1828 echo "$ac_t""$ac_cv_type_signal" 1>&6
1829 cat >> confdefs.h <<EOF
1830 #define RETSIGTYPE $ac_cv_type_signal
1834 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1835 echo "configure:1847: checking whether time.h and sys/time.h may both be included" >&5
1836 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1837 echo $ac_n "(cached) $ac_c" 1>&6
1839 cat > conftest.$ac_ext <<EOF
1840 #line 1852 "configure"
1841 #include "confdefs.h"
1842 #include <sys/types.h>
1843 #include <sys/time.h>
1849 if { (eval echo configure:1861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1851 ac_cv_header_time=yes
1853 echo "configure: failed program was:" >&5
1854 cat conftest.$ac_ext >&5
1856 ac_cv_header_time=no
1861 echo "$ac_t""$ac_cv_header_time" 1>&6
1862 if test $ac_cv_header_time = yes; then
1863 cat >> confdefs.h <<\EOF
1864 #define TIME_WITH_SYS_TIME 1
1869 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1870 echo "configure:1882: checking for sys/wait.h that is POSIX.1 compatible" >&5
1871 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1872 echo $ac_n "(cached) $ac_c" 1>&6
1874 cat > conftest.$ac_ext <<EOF
1875 #line 1887 "configure"
1876 #include "confdefs.h"
1877 #include <sys/types.h>
1878 #include <sys/wait.h>
1880 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1883 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1888 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1891 if { (eval echo configure:1903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1893 ac_cv_header_sys_wait_h=yes
1895 echo "configure: failed program was:" >&5
1896 cat conftest.$ac_ext >&5
1898 ac_cv_header_sys_wait_h=no
1903 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1904 if test $ac_cv_header_sys_wait_h = yes; then
1905 cat >> confdefs.h <<\EOF
1906 #define HAVE_SYS_WAIT_H 1
1912 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1915 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1916 echo "configure:1928: checking for $ac_hdr that defines DIR" >&5
1917 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1918 echo $ac_n "(cached) $ac_c" 1>&6
1920 cat > conftest.$ac_ext <<EOF
1921 #line 1933 "configure"
1922 #include "confdefs.h"
1923 #include <sys/types.h>
1929 if { (eval echo configure:1941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1931 eval "ac_cv_header_dirent_$ac_safe=yes"
1933 echo "configure: failed program was:" >&5
1934 cat conftest.$ac_ext >&5
1936 eval "ac_cv_header_dirent_$ac_safe=no"
1940 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1941 echo "$ac_t""yes" 1>&6
1942 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1943 cat >> confdefs.h <<EOF
1944 #define $ac_tr_hdr 1
1946 ac_header_dirent=$ac_hdr; break
1948 echo "$ac_t""no" 1>&6
1951 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1952 if test $ac_header_dirent = dirent.h; then
1953 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1954 echo "configure:1966: checking for opendir in -ldir" >&5
1955 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1957 echo $ac_n "(cached) $ac_c" 1>&6
1959 ac_save_LIBS="$LIBS"
1961 cat > conftest.$ac_ext <<EOF
1962 #line 1974 "configure"
1963 #include "confdefs.h"
1964 /* Override any gcc2 internal prototype to avoid an error. */
1965 /* We use char because int might match the return type of a gcc2
1966 builtin and then its argument prototype would still apply. */
1973 if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1975 eval "ac_cv_lib_$ac_lib_var=yes"
1977 echo "configure: failed program was:" >&5
1978 cat conftest.$ac_ext >&5
1980 eval "ac_cv_lib_$ac_lib_var=no"
1983 LIBS="$ac_save_LIBS"
1986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1987 echo "$ac_t""yes" 1>&6
1990 echo "$ac_t""no" 1>&6
1994 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1995 echo "configure:2007: checking for opendir in -lx" >&5
1996 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1997 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1998 echo $ac_n "(cached) $ac_c" 1>&6
2000 ac_save_LIBS="$LIBS"
2002 cat > conftest.$ac_ext <<EOF
2003 #line 2015 "configure"
2004 #include "confdefs.h"
2005 /* Override any gcc2 internal prototype to avoid an error. */
2006 /* We use char because int might match the return type of a gcc2
2007 builtin and then its argument prototype would still apply. */
2014 if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2016 eval "ac_cv_lib_$ac_lib_var=yes"
2018 echo "configure: failed program was:" >&5
2019 cat conftest.$ac_ext >&5
2021 eval "ac_cv_lib_$ac_lib_var=no"
2024 LIBS="$ac_save_LIBS"
2027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2028 echo "$ac_t""yes" 1>&6
2031 echo "$ac_t""no" 1>&6
2036 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
2037 echo "configure:2049: checking how to call gettimeofday" >&5
2038 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
2039 echo $ac_n "(cached) $ac_c" 1>&6
2041 cat > conftest.$ac_ext <<EOF
2042 #line 2054 "configure"
2043 #include "confdefs.h"
2045 #include <sys/time.h>
2047 struct timeval tv; struct timezone tzp;
2048 gettimeofday(&tv, &tzp);
2051 if { (eval echo configure:2063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2053 ac_gettimeofday_args=2
2055 echo "configure: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2058 cat > conftest.$ac_ext <<EOF
2059 #line 2071 "configure"
2060 #include "confdefs.h"
2062 #include <sys/time.h>
2064 struct timeval tv; gettimeofday(&tv);
2067 if { (eval echo configure:2079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2069 ac_gettimeofday_args=1
2071 echo "configure: failed program was:" >&5
2072 cat conftest.$ac_ext >&5
2074 ac_gettimeofday_args=0
2079 ac_cv_gettimeofday_args=$ac_gettimeofday_args
2082 ac_gettimeofday_args=$ac_cv_gettimeofday_args
2083 if test "$ac_gettimeofday_args" = 1 ; then
2084 cat >> confdefs.h <<\EOF
2085 #define HAVE_GETTIMEOFDAY 1
2088 echo "$ac_t""one argument" 1>&6
2089 elif test "$ac_gettimeofday_args" = 2 ; then
2090 cat >> confdefs.h <<\EOF
2091 #define HAVE_GETTIMEOFDAY 1
2094 cat >> confdefs.h <<\EOF
2095 #define GETTIMEOFDAY_TWO_ARGS 1
2098 echo "$ac_t""two arguments" 1>&6
2100 echo "$ac_t""unknown" 1>&6
2103 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
2105 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2106 echo "configure:2118: checking for $ac_func" >&5
2107 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2108 echo $ac_n "(cached) $ac_c" 1>&6
2110 cat > conftest.$ac_ext <<EOF
2111 #line 2123 "configure"
2112 #include "confdefs.h"
2113 /* System header to define __stub macros and hopefully few prototypes,
2114 which can conflict with char $ac_func(); below. */
2116 /* Override any gcc2 internal prototype to avoid an error. */
2117 /* We use char because int might match the return type of a gcc2
2118 builtin and then its argument prototype would still apply. */
2123 /* The GNU C library defines this for functions which it implements
2124 to always fail with ENOSYS. Some functions are actually named
2125 something starting with __ and the normal name is an alias. */
2126 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2134 if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2136 eval "ac_cv_func_$ac_func=yes"
2138 echo "configure: failed program was:" >&5
2139 cat conftest.$ac_ext >&5
2141 eval "ac_cv_func_$ac_func=no"
2146 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2147 echo "$ac_t""yes" 1>&6
2148 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2149 cat >> confdefs.h <<EOF
2150 #define $ac_tr_func 1
2154 echo "$ac_t""no" 1>&6
2159 for ac_func in sigaction syslog realpath setrlimit
2161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2162 echo "configure:2174: checking for $ac_func" >&5
2163 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2164 echo $ac_n "(cached) $ac_c" 1>&6
2166 cat > conftest.$ac_ext <<EOF
2167 #line 2179 "configure"
2168 #include "confdefs.h"
2169 /* System header to define __stub macros and hopefully few prototypes,
2170 which can conflict with char $ac_func(); below. */
2172 /* Override any gcc2 internal prototype to avoid an error. */
2173 /* We use char because int might match the return type of a gcc2
2174 builtin and then its argument prototype would still apply. */
2179 /* The GNU C library defines this for functions which it implements
2180 to always fail with ENOSYS. Some functions are actually named
2181 something starting with __ and the normal name is an alias. */
2182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2190 if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2192 eval "ac_cv_func_$ac_func=yes"
2194 echo "configure: failed program was:" >&5
2195 cat conftest.$ac_ext >&5
2197 eval "ac_cv_func_$ac_func=no"
2202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2203 echo "$ac_t""yes" 1>&6
2204 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2205 cat >> confdefs.h <<EOF
2206 #define $ac_tr_func 1
2210 echo "$ac_t""no" 1>&6
2214 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
2215 echo "configure:2227: checking for struct icmp" >&5
2216 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
2217 echo $ac_n "(cached) $ac_c" 1>&6
2219 cat > conftest.$ac_ext <<EOF
2220 #line 2232 "configure"
2221 #include "confdefs.h"
2229 #include <sys/types.h>
2230 #include <sys/time.h>
2231 #include <sys/ipc.h>
2232 #include <sys/shm.h>
2233 #include <sys/socket.h>
2234 #include <netinet/in_systm.h>
2235 #include <netinet/in.h>
2236 #include <netinet/ip.h>
2237 #include <netinet/ip_icmp.h>
2238 #include <netinet/udp.h>
2239 #include <arpa/inet.h>
2244 struct sockaddr_in si;
2246 i.icmp_type = ICMP_ECHO;
2251 si.sin_family = AF_INET;
2252 #if defined(__DECC) || defined(_IP_VHL)
2260 if { (eval echo configure:2272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2264 echo "configure: failed program was:" >&5
2265 cat conftest.$ac_ext >&5
2272 echo "$ac_t""$ac_cv_have_icmp" 1>&6
2273 if test "$ac_cv_have_icmp" = yes ; then
2274 cat >> confdefs.h <<\EOF
2279 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
2280 echo "configure:2292: checking for struct icmphdr" >&5
2281 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
2282 echo $ac_n "(cached) $ac_c" 1>&6
2284 cat > conftest.$ac_ext <<EOF
2285 #line 2297 "configure"
2286 #include "confdefs.h"
2294 #include <sys/types.h>
2295 #include <sys/time.h>
2296 #include <sys/ipc.h>
2297 #include <sys/shm.h>
2298 #include <sys/socket.h>
2299 #include <netinet/in_systm.h>
2300 #include <netinet/in.h>
2301 #include <netinet/ip.h>
2302 #include <netinet/ip_icmp.h>
2303 #include <netinet/udp.h>
2304 #include <arpa/inet.h>
2309 struct sockaddr_in si;
2315 i.un.echo.sequence = 0;
2316 si.sin_family = AF_INET;
2320 if { (eval echo configure:2332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2322 ac_cv_have_icmphdr=yes
2324 echo "configure: failed program was:" >&5
2325 cat conftest.$ac_ext >&5
2327 ac_cv_have_icmphdr=no
2332 echo "$ac_t""$ac_cv_have_icmphdr" 1>&6
2333 if test "$ac_cv_have_icmphdr" = yes ; then
2334 cat >> confdefs.h <<\EOF
2335 #define HAVE_ICMPHDR 1
2339 for ac_hdr in crypt.h sys/select.h
2341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2343 echo "configure:2355: checking for $ac_hdr" >&5
2344 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2345 echo $ac_n "(cached) $ac_c" 1>&6
2347 cat > conftest.$ac_ext <<EOF
2348 #line 2360 "configure"
2349 #include "confdefs.h"
2352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2353 { (eval echo configure:2365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2355 if test -z "$ac_err"; then
2357 eval "ac_cv_header_$ac_safe=yes"
2360 echo "configure: failed program was:" >&5
2361 cat conftest.$ac_ext >&5
2363 eval "ac_cv_header_$ac_safe=no"
2367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2368 echo "$ac_t""yes" 1>&6
2369 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2370 cat >> confdefs.h <<EOF
2371 #define $ac_tr_hdr 1
2375 echo "$ac_t""no" 1>&6
2379 for ac_prog in perl5 perl
2381 # Extract the first word of "$ac_prog", so it can be a program name with args.
2382 set dummy $ac_prog; ac_word=$2
2383 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2384 echo "configure:2396: checking for $ac_word" >&5
2385 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2386 echo $ac_n "(cached) $ac_c" 1>&6
2390 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2393 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2396 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2398 for ac_dir in $ac_dummy; do
2399 test -z "$ac_dir" && ac_dir=.
2400 if test -f $ac_dir/$ac_word; then
2401 ac_cv_path_PERL="$ac_dir/$ac_word"
2409 PERL="$ac_cv_path_PERL"
2410 if test -n "$PERL"; then
2411 echo "$ac_t""$PERL" 1>&6
2413 echo "$ac_t""no" 1>&6
2416 test -n "$PERL" && break
2419 if test -z "$PERL" ; then
2422 echo $ac_n "checking perl version""... $ac_c" 1>&6
2423 echo "configure:2435: checking perl version" >&5
2424 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
2425 echo $ac_n "(cached) $ac_c" 1>&6
2427 ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
2430 echo "$ac_t""$ac_cv_perl_version" 1>&6
2431 PERL_VERSION=$ac_cv_perl_version
2435 if test -z "$PERL" ; then
2436 # don't let it be blank...
2440 # If we find X, set shell vars x_includes and x_libraries to the
2441 # paths, otherwise set no_x=yes.
2442 # Uses ac_ vars as temps to allow command line to override cache and checks.
2443 # --without-x overrides everything else, but does not touch the cache.
2444 echo $ac_n "checking for X""... $ac_c" 1>&6
2445 echo "configure:2457: checking for X" >&5
2447 # Check whether --with-x or --without-x was given.
2448 if test "${with_x+set}" = set; then
2453 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2454 if test "x$with_x" = xno; then
2455 # The user explicitly disabled X.
2458 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2459 # Both variables are already set.
2462 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2463 echo $ac_n "(cached) $ac_c" 1>&6
2465 # One or both of the vars are not set, and there is no cached value.
2466 ac_x_includes=NO ac_x_libraries=NO
2468 if mkdir conftestdir; then
2470 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2471 cat > Imakefile <<'EOF'
2473 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2475 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2476 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2477 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2478 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2479 for ac_extension in a so sl; do
2480 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2481 test -f $ac_im_libdir/libX11.$ac_extension; then
2482 ac_im_usrlibdir=$ac_im_libdir; break
2485 # Screen out bogus values from the imake configuration. They are
2486 # bogus both because they are the default anyway, and because
2487 # using them would break gcc on systems where it needs fixed includes.
2488 case "$ac_im_incroot" in
2490 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2492 case "$ac_im_usrlibdir" in
2494 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2501 if test "$ac_x_includes" = NO; then
2502 # Guess where to find include files, by looking for this one X11 .h file.
2503 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2505 # First, try using that file with no special directory specified.
2506 cat > conftest.$ac_ext <<EOF
2507 #line 2519 "configure"
2508 #include "confdefs.h"
2509 #include <$x_direct_test_include>
2511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2512 { (eval echo configure:2524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2514 if test -z "$ac_err"; then
2516 # We can compile using X headers with no special include directory.
2520 echo "configure: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2523 # Look for the header file in a standard set of common directories.
2524 # Check X11 before X11Rn because it is often a symlink to the current release.
2527 /usr/X11R6/include \
2528 /usr/X11R5/include \
2529 /usr/X11R4/include \
2532 /usr/include/X11R6 \
2533 /usr/include/X11R5 \
2534 /usr/include/X11R4 \
2536 /usr/local/X11/include \
2537 /usr/local/X11R6/include \
2538 /usr/local/X11R5/include \
2539 /usr/local/X11R4/include \
2541 /usr/local/include/X11 \
2542 /usr/local/include/X11R6 \
2543 /usr/local/include/X11R5 \
2544 /usr/local/include/X11R4 \
2548 /usr/XFree86/include/X11 \
2551 /usr/local/include \
2552 /usr/unsupported/include \
2553 /usr/athena/include \
2554 /usr/local/x11r5/include \
2555 /usr/lpp/Xamples/include \
2557 /usr/openwin/include \
2558 /usr/openwin/share/include \
2561 if test -r "$ac_dir/$x_direct_test_include"; then
2562 ac_x_includes=$ac_dir
2568 fi # $ac_x_includes = NO
2570 if test "$ac_x_libraries" = NO; then
2571 # Check for the libraries.
2573 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2574 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2576 # See if we find them without any special options.
2577 # Don't add to $LIBS permanently.
2578 ac_save_LIBS="$LIBS"
2579 LIBS="-l$x_direct_test_library $LIBS"
2580 cat > conftest.$ac_ext <<EOF
2581 #line 2593 "configure"
2582 #include "confdefs.h"
2585 ${x_direct_test_function}()
2588 if { (eval echo configure:2600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2590 LIBS="$ac_save_LIBS"
2591 # We can link X programs with no special library path.
2594 echo "configure: failed program was:" >&5
2595 cat conftest.$ac_ext >&5
2597 LIBS="$ac_save_LIBS"
2598 # First see if replacing the include by lib works.
2599 # Check X11 before X11Rn because it is often a symlink to the current release.
2600 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2611 /usr/local/X11/lib \
2612 /usr/local/X11R6/lib \
2613 /usr/local/X11R5/lib \
2614 /usr/local/X11R4/lib \
2616 /usr/local/lib/X11 \
2617 /usr/local/lib/X11R6 \
2618 /usr/local/lib/X11R5 \
2619 /usr/local/lib/X11R4 \
2623 /usr/XFree86/lib/X11 \
2627 /usr/unsupported/lib \
2629 /usr/local/x11r5/lib \
2630 /usr/lpp/Xamples/lib \
2634 /usr/openwin/share/lib \
2637 for ac_extension in a so sl; do
2638 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2639 ac_x_libraries=$ac_dir
2646 fi # $ac_x_libraries = NO
2648 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2649 # Didn't find X anywhere. Cache the known absence of X.
2650 ac_cv_have_x="have_x=no"
2652 # Record where we found X for the cache.
2653 ac_cv_have_x="have_x=yes \
2654 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2658 eval "$ac_cv_have_x"
2661 if test "$have_x" != yes; then
2662 echo "$ac_t""$have_x" 1>&6
2665 # If each of the values was on the command line, it overrides each guess.
2666 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2667 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2668 # Update the cache value to reflect the command line values.
2669 ac_cv_have_x="have_x=yes \
2670 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2671 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2674 if test "$no_x" = yes; then
2675 # Not all programs may use this symbol, but it does not hurt to define it.
2676 cat >> confdefs.h <<\EOF
2677 #define X_DISPLAY_MISSING 1
2680 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2682 if test -n "$x_includes"; then
2683 X_CFLAGS="$X_CFLAGS -I$x_includes"
2686 # It would also be nice to do this for all -L options, not just this one.
2687 if test -n "$x_libraries"; then
2688 X_LIBS="$X_LIBS -L$x_libraries"
2689 # For Solaris; some versions of Sun CC require a space after -R and
2690 # others require no space. Words are not sufficient . . . .
2691 case "`(uname -sr) 2>/dev/null`" in
2693 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2694 echo "configure:2706: checking whether -R must be followed by a space" >&5
2695 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2709 "configure"
2698 #include "confdefs.h"
2704 if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2708 echo "configure: failed program was:" >&5
2709 cat conftest.$ac_ext >&5
2714 if test $ac_R_nospace = yes; then
2715 echo "$ac_t""no" 1>&6
2716 X_LIBS="$X_LIBS -R$x_libraries"
2718 LIBS="$ac_xsave_LIBS -R $x_libraries"
2719 cat > conftest.$ac_ext <<EOF
2720 #line 2732 "configure"
2721 #include "confdefs.h"
2727 if { (eval echo configure:2739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2731 echo "configure: failed program was:" >&5
2732 cat conftest.$ac_ext >&5
2737 if test $ac_R_space = yes; then
2738 echo "$ac_t""yes" 1>&6
2739 X_LIBS="$X_LIBS -R $x_libraries"
2741 echo "$ac_t""neither works" 1>&6
2744 LIBS="$ac_xsave_LIBS"
2748 # Check for system-dependent libraries X programs must link with.
2749 # Do this before checking for the system-independent R6 libraries
2750 # (-lICE), since we may need -lsocket or whatever for X linking.
2752 if test "$ISC" = yes; then
2753 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2755 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2756 # libraries were built with DECnet support. And karl@cs.umb.edu says
2757 # the Alpha needs dnet_stub (dnet does not exist).
2758 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2759 echo "configure:2771: checking for dnet_ntoa in -ldnet" >&5
2760 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2762 echo $ac_n "(cached) $ac_c" 1>&6
2764 ac_save_LIBS="$LIBS"
2766 cat > conftest.$ac_ext <<EOF
2767 #line 2779 "configure"
2768 #include "confdefs.h"
2769 /* Override any gcc2 internal prototype to avoid an error. */
2770 /* We use char because int might match the return type of a gcc2
2771 builtin and then its argument prototype would still apply. */
2778 if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2780 eval "ac_cv_lib_$ac_lib_var=yes"
2782 echo "configure: failed program was:" >&5
2783 cat conftest.$ac_ext >&5
2785 eval "ac_cv_lib_$ac_lib_var=no"
2788 LIBS="$ac_save_LIBS"
2791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2792 echo "$ac_t""yes" 1>&6
2793 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2795 echo "$ac_t""no" 1>&6
2798 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2799 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2800 echo "configure:2812: checking for dnet_ntoa in -ldnet_stub" >&5
2801 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2802 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2803 echo $ac_n "(cached) $ac_c" 1>&6
2805 ac_save_LIBS="$LIBS"
2806 LIBS="-ldnet_stub $LIBS"
2807 cat > conftest.$ac_ext <<EOF
2808 #line 2820 "configure"
2809 #include "confdefs.h"
2810 /* Override any gcc2 internal prototype to avoid an error. */
2811 /* We use char because int might match the return type of a gcc2
2812 builtin and then its argument prototype would still apply. */
2819 if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2821 eval "ac_cv_lib_$ac_lib_var=yes"
2823 echo "configure: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
2826 eval "ac_cv_lib_$ac_lib_var=no"
2829 LIBS="$ac_save_LIBS"
2832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2833 echo "$ac_t""yes" 1>&6
2834 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2836 echo "$ac_t""no" 1>&6
2841 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2842 # to get the SysV transport functions.
2843 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2845 # The nsl library prevents programs from opening the X display
2846 # on Irix 5.2, according to dickey@clark.net.
2847 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2848 echo "configure:2860: checking for gethostbyname" >&5
2849 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2850 echo $ac_n "(cached) $ac_c" 1>&6
2852 cat > conftest.$ac_ext <<EOF
2853 #line 2865 "configure"
2854 #include "confdefs.h"
2855 /* System header to define __stub macros and hopefully few prototypes,
2856 which can conflict with char gethostbyname(); below. */
2858 /* Override any gcc2 internal prototype to avoid an error. */
2859 /* We use char because int might match the return type of a gcc2
2860 builtin and then its argument prototype would still apply. */
2861 char gethostbyname();
2865 /* The GNU C library defines this for functions which it implements
2866 to always fail with ENOSYS. Some functions are actually named
2867 something starting with __ and the normal name is an alias. */
2868 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2876 if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2878 eval "ac_cv_func_gethostbyname=yes"
2880 echo "configure: failed program was:" >&5
2881 cat conftest.$ac_ext >&5
2883 eval "ac_cv_func_gethostbyname=no"
2888 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2889 echo "$ac_t""yes" 1>&6
2892 echo "$ac_t""no" 1>&6
2895 if test $ac_cv_func_gethostbyname = no; then
2896 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2897 echo "configure:2909: checking for gethostbyname in -lnsl" >&5
2898 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2899 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2900 echo $ac_n "(cached) $ac_c" 1>&6
2902 ac_save_LIBS="$LIBS"
2904 cat > conftest.$ac_ext <<EOF
2905 #line 2917 "configure"
2906 #include "confdefs.h"
2907 /* Override any gcc2 internal prototype to avoid an error. */
2908 /* We use char because int might match the return type of a gcc2
2909 builtin and then its argument prototype would still apply. */
2910 char gethostbyname();
2916 if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2918 eval "ac_cv_lib_$ac_lib_var=yes"
2920 echo "configure: failed program was:" >&5
2921 cat conftest.$ac_ext >&5
2923 eval "ac_cv_lib_$ac_lib_var=no"
2926 LIBS="$ac_save_LIBS"
2929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2930 echo "$ac_t""yes" 1>&6
2931 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2933 echo "$ac_t""no" 1>&6
2938 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2939 # socket/setsockopt and other routines are undefined under SCO ODT
2940 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2941 # on later versions), says simon@lia.di.epfl.ch: it contains
2942 # gethostby* variants that don't use the nameserver (or something).
2943 # -lsocket must be given before -lnsl if both are needed.
2944 # We assume that if connect needs -lnsl, so does gethostbyname.
2945 echo $ac_n "checking for connect""... $ac_c" 1>&6
2946 echo "configure:2958: checking for connect" >&5
2947 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2948 echo $ac_n "(cached) $ac_c" 1>&6
2950 cat > conftest.$ac_ext <<EOF
2951 #line 2963 "configure"
2952 #include "confdefs.h"
2953 /* System header to define __stub macros and hopefully few prototypes,
2954 which can conflict with char connect(); below. */
2956 /* Override any gcc2 internal prototype to avoid an error. */
2957 /* We use char because int might match the return type of a gcc2
2958 builtin and then its argument prototype would still apply. */
2963 /* The GNU C library defines this for functions which it implements
2964 to always fail with ENOSYS. Some functions are actually named
2965 something starting with __ and the normal name is an alias. */
2966 #if defined (__stub_connect) || defined (__stub___connect)
2974 if { (eval echo configure:2986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2976 eval "ac_cv_func_connect=yes"
2978 echo "configure: failed program was:" >&5
2979 cat conftest.$ac_ext >&5
2981 eval "ac_cv_func_connect=no"
2986 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2987 echo "$ac_t""yes" 1>&6
2990 echo "$ac_t""no" 1>&6
2993 if test $ac_cv_func_connect = no; then
2994 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2995 echo "configure:3007: checking for connect in -lsocket" >&5
2996 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2997 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2998 echo $ac_n "(cached) $ac_c" 1>&6
3000 ac_save_LIBS="$LIBS"
3001 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3002 cat > conftest.$ac_ext <<EOF
3003 #line 3015 "configure"
3004 #include "confdefs.h"
3005 /* Override any gcc2 internal prototype to avoid an error. */
3006 /* We use char because int might match the return type of a gcc2
3007 builtin and then its argument prototype would still apply. */
3014 if { (eval echo configure:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3016 eval "ac_cv_lib_$ac_lib_var=yes"
3018 echo "configure: failed program was:" >&5
3019 cat conftest.$ac_ext >&5
3021 eval "ac_cv_lib_$ac_lib_var=no"
3024 LIBS="$ac_save_LIBS"
3027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3028 echo "$ac_t""yes" 1>&6
3029 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3031 echo "$ac_t""no" 1>&6
3036 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3037 echo $ac_n "checking for remove""... $ac_c" 1>&6
3038 echo "configure:3050: checking for remove" >&5
3039 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3040 echo $ac_n "(cached) $ac_c" 1>&6
3042 cat > conftest.$ac_ext <<EOF
3043 #line 3055 "configure"
3044 #include "confdefs.h"
3045 /* System header to define __stub macros and hopefully few prototypes,
3046 which can conflict with char remove(); below. */
3048 /* Override any gcc2 internal prototype to avoid an error. */
3049 /* We use char because int might match the return type of a gcc2
3050 builtin and then its argument prototype would still apply. */
3055 /* The GNU C library defines this for functions which it implements
3056 to always fail with ENOSYS. Some functions are actually named
3057 something starting with __ and the normal name is an alias. */
3058 #if defined (__stub_remove) || defined (__stub___remove)
3066 if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3068 eval "ac_cv_func_remove=yes"
3070 echo "configure: failed program was:" >&5
3071 cat conftest.$ac_ext >&5
3073 eval "ac_cv_func_remove=no"
3078 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3079 echo "$ac_t""yes" 1>&6
3082 echo "$ac_t""no" 1>&6
3085 if test $ac_cv_func_remove = no; then
3086 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3087 echo "configure:3099: checking for remove in -lposix" >&5
3088 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3089 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3090 echo $ac_n "(cached) $ac_c" 1>&6
3092 ac_save_LIBS="$LIBS"
3093 LIBS="-lposix $LIBS"
3094 cat > conftest.$ac_ext <<EOF
3095 #line 3107 "configure"
3096 #include "confdefs.h"
3097 /* Override any gcc2 internal prototype to avoid an error. */
3098 /* We use char because int might match the return type of a gcc2
3099 builtin and then its argument prototype would still apply. */
3106 if { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3108 eval "ac_cv_lib_$ac_lib_var=yes"
3110 echo "configure: failed program was:" >&5
3111 cat conftest.$ac_ext >&5
3113 eval "ac_cv_lib_$ac_lib_var=no"
3116 LIBS="$ac_save_LIBS"
3119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3120 echo "$ac_t""yes" 1>&6
3121 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3123 echo "$ac_t""no" 1>&6
3128 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3129 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3130 echo "configure:3142: checking for shmat" >&5
3131 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3132 echo $ac_n "(cached) $ac_c" 1>&6
3134 cat > conftest.$ac_ext <<EOF
3135 #line 3147 "configure"
3136 #include "confdefs.h"
3137 /* System header to define __stub macros and hopefully few prototypes,
3138 which can conflict with char shmat(); below. */
3140 /* Override any gcc2 internal prototype to avoid an error. */
3141 /* We use char because int might match the return type of a gcc2
3142 builtin and then its argument prototype would still apply. */
3147 /* The GNU C library defines this for functions which it implements
3148 to always fail with ENOSYS. Some functions are actually named
3149 something starting with __ and the normal name is an alias. */
3150 #if defined (__stub_shmat) || defined (__stub___shmat)
3158 if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3160 eval "ac_cv_func_shmat=yes"
3162 echo "configure: failed program was:" >&5
3163 cat conftest.$ac_ext >&5
3165 eval "ac_cv_func_shmat=no"
3170 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3171 echo "$ac_t""yes" 1>&6
3174 echo "$ac_t""no" 1>&6
3177 if test $ac_cv_func_shmat = no; then
3178 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3179 echo "configure:3191: checking for shmat in -lipc" >&5
3180 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3181 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3182 echo $ac_n "(cached) $ac_c" 1>&6
3184 ac_save_LIBS="$LIBS"
3186 cat > conftest.$ac_ext <<EOF
3187 #line 3199 "configure"
3188 #include "confdefs.h"
3189 /* Override any gcc2 internal prototype to avoid an error. */
3190 /* We use char because int might match the return type of a gcc2
3191 builtin and then its argument prototype would still apply. */
3198 if { (eval echo configure:3210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3200 eval "ac_cv_lib_$ac_lib_var=yes"
3202 echo "configure: failed program was:" >&5
3203 cat conftest.$ac_ext >&5
3205 eval "ac_cv_lib_$ac_lib_var=no"
3208 LIBS="$ac_save_LIBS"
3211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3212 echo "$ac_t""yes" 1>&6
3213 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3215 echo "$ac_t""no" 1>&6
3221 # Check for libraries that X11R6 Xt/Xaw programs need.
3222 ac_save_LDFLAGS="$LDFLAGS"
3223 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3224 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3225 # check for ICE first), but we must link in the order -lSM -lICE or
3226 # we get undefined symbols. So assume we have SM if we have ICE.
3227 # These have to be linked with before -lX11, unlike the other
3228 # libraries we check for below, so use a different variable.
3229 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3230 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3231 echo "configure:3243: checking for IceConnectionNumber in -lICE" >&5
3232 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3233 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3234 echo $ac_n "(cached) $ac_c" 1>&6
3236 ac_save_LIBS="$LIBS"
3237 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3238 cat > conftest.$ac_ext <<EOF
3239 #line 3251 "configure"
3240 #include "confdefs.h"
3241 /* Override any gcc2 internal prototype to avoid an error. */
3242 /* We use char because int might match the return type of a gcc2
3243 builtin and then its argument prototype would still apply. */
3244 char IceConnectionNumber();
3247 IceConnectionNumber()
3250 if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3252 eval "ac_cv_lib_$ac_lib_var=yes"
3254 echo "configure: failed program was:" >&5
3255 cat conftest.$ac_ext >&5
3257 eval "ac_cv_lib_$ac_lib_var=no"
3260 LIBS="$ac_save_LIBS"
3263 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3264 echo "$ac_t""yes" 1>&6
3265 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3267 echo "$ac_t""no" 1>&6
3270 LDFLAGS="$ac_save_LDFLAGS"
3275 if test "$have_x" != yes; then
3276 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
3280 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
3281 echo "configure:3293: checking for X app-defaults directory" >&5
3282 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
3283 echo $ac_n "(cached) $ac_c" 1>&6
3287 if mkdir conftestdir; then
3289 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3290 cat > Imakefile <<'EOF'
3292 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
3294 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3295 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
3296 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3301 if test x"$ac_x_app_defaults" = x; then
3303 # Look for the directory under a standard set of common directories.
3304 # Check X11 before X11Rn because it's often a symlink to the current release.
3306 /usr/X11/lib/app-defaults \
3307 /usr/X11R6/lib/app-defaults \
3308 /usr/X11R6/lib/X11/app-defaults \
3309 /usr/X11R5/lib/app-defaults \
3310 /usr/X11R5/lib/X11/app-defaults \
3311 /usr/X11R4/lib/app-defaults \
3312 /usr/X11R4/lib/X11/app-defaults \
3314 /usr/lib/X11/app-defaults \
3315 /usr/lib/X11R6/app-defaults \
3316 /usr/lib/X11R5/app-defaults \
3317 /usr/lib/X11R4/app-defaults \
3319 /usr/local/X11/lib/app-defaults \
3320 /usr/local/X11R6/lib/app-defaults \
3321 /usr/local/X11R5/lib/app-defaults \
3322 /usr/local/X11R4/lib/app-defaults \
3324 /usr/local/lib/X11/app-defaults \
3325 /usr/local/lib/X11R6/app-defaults \
3326 /usr/local/lib/X11R6/X11/app-defaults \
3327 /usr/local/lib/X11R5/app-defaults \
3328 /usr/local/lib/X11R5/X11/app-defaults \
3329 /usr/local/lib/X11R4/app-defaults \
3330 /usr/local/lib/X11R4/X11/app-defaults \
3332 /usr/X386/lib/X11/app-defaults \
3333 /usr/x386/lib/X11/app-defaults \
3334 /usr/XFree86/lib/X11/app-defaults \
3336 /usr/lib/X11/app-defaults \
3337 /usr/local/lib/X11/app-defaults \
3338 /usr/unsupported/lib/X11/app-defaults \
3339 /usr/athena/lib/X11/app-defaults \
3340 /usr/local/x11r5/lib/X11/app-defaults \
3341 /usr/lpp/Xamples/lib/X11/app-defaults \
3342 /lib/usr/lib/X11/app-defaults \
3344 /usr/openwin/lib/app-defaults \
3345 /usr/openwin/lib/X11/app-defaults \
3346 /usr/openwin/share/lib/app-defaults \
3347 /usr/openwin/share/lib/X11/app-defaults \
3349 /X11R6/lib/app-defaults \
3350 /X11R5/lib/app-defaults \
3351 /X11R4/lib/app-defaults \
3354 if test -d "$ac_dir"; then
3355 ac_x_app_defaults=$ac_dir
3361 if test x"$ac_x_app_defaults" = x; then
3362 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
3364 # Record where we found app-defaults for the cache.
3365 ac_cv_x_app_defaults="$ac_x_app_defaults"
3369 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
3370 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
3374 # The following arcana was gleaned from conversations with
3375 # Eric Schwartz <erics@col.hp.com>:
3377 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3378 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3379 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3380 # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
3381 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3382 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3383 # you don't need any -I or -L arguments.
3385 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3386 # are the same division as 10.x. However, there are no symlinks to
3387 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3388 # arguments are always necessary.
3390 # However, X11R6 was available on HPUX 9.x as a patch: if that
3391 # patch was installed, then all of X11R6 went in to
3392 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3394 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3395 # whether R5 was available as a patch; R6 undoubtedly was not.)
3397 # So. We try and use the highest numbered pair of
3398 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3399 # that are available. We do not mix and match different versions
3402 # Question I still don't know the answer to: (do you?)
3404 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3405 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3406 # that contrib directory? Did it contain so-called "standard"
3407 # X11R6, or did it include Xaw and Xmu as well? If the former,
3408 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3409 # be a situation where one had to reach into the R5 headers and
3410 # libs to find Xmu? That is, must both R6 and R5 directories
3411 # be on the -I and -L lists in that case?
3413 for version in X11R6 X11R5 X11R4 ; do
3414 # if either pair of directories exists...
3415 if test -d /usr/include/$version || test -d /usr/contrib/$version/include
3417 # if contrib exists, use it...
3418 if test -d /usr/contrib/$version/include ; then
3419 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3420 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3422 # if the "standard" one exists, use it.
3423 if test -d /usr/include/$version ; then
3424 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3425 X_LIBS="$X_LIBS -L/usr/lib/$version"
3427 # since at least one of the pair exists, go no farther.
3432 # Now find Motif. Thanks for not making xmkmf find this by
3433 # default, you losers.
3435 if test -d /usr/include/Motif2.1 ; then
3436 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
3437 X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
3438 elif test -d /usr/include/Motif1.2 ; then
3439 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3440 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3441 elif test -d /usr/include/Motif1.1 ; then
3442 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3443 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3446 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3448 if test -d /opt/graphics/OpenGL/include ; then
3449 # HP-UX 10.20 puts it here
3450 X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
3451 X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
3452 elif test -d /opt/Mesa/lib ; then
3453 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3454 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3458 if test -d /opt/xpm/lib/X11 ; then
3459 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3460 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3463 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3464 # in /usr/local/, unless there is already an xscreensaver in
3465 # /usr/local/bin/. This can be overridden with the --prefix arg
3466 # to configure. I'm not sure this is the right thing to do, but
3467 # Richard Lloyd says so...
3469 if test \! -x /usr/local/bin/xscreensaver ; then
3470 ac_default_prefix=/opt/xscreensaver
3476 # Thanks for not making xmkmf find this by default, pinheads.
3477 # And thanks for moving things around again, too. Is this
3478 # really the standard location now? What happened to the
3479 # joke that this kind of thing went in /opt?
3480 # cthomp says "answer: CDE (Common Disorganized Environment)"
3482 if test -f /usr/dt/include/Xm/Xm.h ; then
3483 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3484 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3486 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3487 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3488 echo "configure:3500: checking for regcmp in -lgen" >&5
3489 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3490 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3491 echo $ac_n "(cached) $ac_c" 1>&6
3493 ac_save_LIBS="$LIBS"
3495 cat > conftest.$ac_ext <<EOF
3496 #line 3508 "configure"
3497 #include "confdefs.h"
3498 /* Override any gcc2 internal prototype to avoid an error. */
3499 /* We use char because int might match the return type of a gcc2
3500 builtin and then its argument prototype would still apply. */
3507 if { (eval echo configure:3519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3509 eval "ac_cv_lib_$ac_lib_var=yes"
3511 echo "configure: failed program was:" >&5
3512 cat conftest.$ac_ext >&5
3514 eval "ac_cv_lib_$ac_lib_var=no"
3517 LIBS="$ac_save_LIBS"
3520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3521 echo "$ac_t""yes" 1>&6
3522 X_LIBS="$X_LIBS -lgen"
3524 echo "$ac_t""no" 1>&6
3530 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3531 echo "configure:3543: checking for XPointer" >&5
3532 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3533 echo $ac_n "(cached) $ac_c" 1>&6
3536 ac_save_CPPFLAGS="$CPPFLAGS"
3537 if test \! -z "$includedir" ; then
3538 CPPFLAGS="$CPPFLAGS -I$includedir"
3540 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3541 cat > conftest.$ac_ext <<EOF
3542 #line 3554 "configure"
3543 #include "confdefs.h"
3544 #include <X11/Xlib.h>
3546 XPointer foo = (XPointer) 0;
3549 if { (eval echo configure:3561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3553 echo "configure: failed program was:" >&5
3554 cat conftest.$ac_ext >&5
3559 CPPFLAGS="$ac_save_CPPFLAGS"
3562 echo "$ac_t""$ac_cv_xpointer" 1>&6
3563 if test "$ac_cv_xpointer" != yes; then
3564 cat >> confdefs.h <<\EOF
3565 #define XPointer char*
3572 ###############################################################################
3574 # Check for -lXmu (some fucked up vendors don't ship it...)
3576 ###############################################################################
3580 ac_save_CPPFLAGS="$CPPFLAGS"
3581 if test \! -z "$includedir" ; then
3582 CPPFLAGS="$CPPFLAGS -I$includedir"
3584 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3585 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3586 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3587 echo "configure:3599: checking for X11/Xmu/Error.h" >&5
3588 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3589 echo $ac_n "(cached) $ac_c" 1>&6
3591 cat > conftest.$ac_ext <<EOF
3592 #line 3604 "configure"
3593 #include "confdefs.h"
3594 #include <X11/Xmu/Error.h>
3596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3597 { (eval echo configure:3609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3599 if test -z "$ac_err"; then
3601 eval "ac_cv_header_$ac_safe=yes"
3604 echo "configure: failed program was:" >&5
3605 cat conftest.$ac_ext >&5
3607 eval "ac_cv_header_$ac_safe=no"
3611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3612 echo "$ac_t""yes" 1>&6
3615 echo "$ac_t""no" 1>&6
3618 CPPFLAGS="$ac_save_CPPFLAGS"
3619 if test "$have_xmu" = no ; then
3620 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3621 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3627 cat >> confdefs.h <<\EOF
3634 ###############################################################################
3636 # Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
3637 # See comp.windows.x FAQ question 124. The right fix is to
3638 # get OpenWindows 3.0 patches 100512-02 and 100573-03.
3640 ###############################################################################
3642 if test "$have_xmu" = yes ; then
3645 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3646 echo "configure:3658: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3647 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3648 echo $ac_n "(cached) $ac_c" 1>&6
3650 ac_save_LDFLAGS="$LDFLAGS"
3651 if test \! -z "$x_libraries" ; then
3652 LDFLAGS="$LDFLAGS -L$x_libraries"
3654 # Note: this trick never works! (Generally.)
3655 # We're only getting away with using AC_TRY_LINK
3656 # with X libraries because we know it's SunOS.
3657 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3658 cat > conftest.$ac_ext <<EOF
3659 #line 3671 "configure"
3660 #include "confdefs.h"
3666 if { (eval echo configure:3678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3668 ac_cv_sunos_xmu_bug=no
3670 echo "configure: failed program was:" >&5
3671 cat conftest.$ac_ext >&5
3673 ac_cv_sunos_xmu_bug=yes
3676 LDFLAGS="$ac_save_LDFLAGS"
3679 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3680 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3681 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3682 echo "configure:3694: checking whether the compiler understands -static" >&5
3683 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3684 echo $ac_n "(cached) $ac_c" 1>&6
3686 ac_save_LDFLAGS="$LDFLAGS"
3687 LDFLAGS="$LDFLAGS -static"
3688 cat > conftest.$ac_ext <<EOF
3689 #line 3701 "configure"
3690 #include "confdefs.h"
3696 if { (eval echo configure:3708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3700 echo "configure: failed program was:" >&5
3701 cat conftest.$ac_ext >&5
3706 LDFLAGS="$ac_save_LDFLAGS"
3709 echo "$ac_t""$ac_cv_ld_static" 1>&6
3710 if test "$ac_cv_ld_static" = yes ; then
3711 LDFLAGS="$LDFLAGS -static"
3713 LDFLAGS="$LDFLAGS -Bstatic"
3721 ###############################################################################
3723 # Handle the --with-hackdir option
3725 ###############################################################################
3728 with_hackdir_req=unspecified
3729 # Check whether --with-hackdir or --without-hackdir was given.
3730 if test "${with_hackdir+set}" = set; then
3731 withval="$with_hackdir"
3732 with_hackdir="$withval"; with_hackdir_req="$withval"
3738 if test x"$with_hackdir" = xyes; then
3739 HACKDIR='${exec_prefix}/lib/xscreensaver'
3740 elif test x"$with_hackdir" = xno; then
3743 # there must be a better way than this...
3744 if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
3746 HACKDIR=$with_hackdir
3749 HACKDIR="\${exec_prefix}$with_hackdir"
3753 # canonicalize slashes.
3754 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
3756 # This option used to be called --enable-subdir; make sure that is no longer
3757 # used, since configure brain-damagedly ignores unknown --enable options.
3760 # Check whether --enable-subdir or --disable-subdir was given.
3761 if test "${enable_subdir+set}" = set; then
3762 enableval="$enable_subdir"
3766 if test -n "$obsolete_enable"; then
3767 echo "error: the --enable-subdir option has been replaced with"
3768 echo " the new --with-hackdir option; see \`configure --help'"
3769 echo " for more information."
3774 ###############################################################################
3776 # Handle the --with-configdir option
3778 ###############################################################################
3781 with_configdir_req=unspecified
3782 # Check whether --with-configdir or --without-configdir was given.
3783 if test "${with_configdir+set}" = set; then
3784 withval="$with_configdir"
3785 with_configdir="$withval"; with_configdir_req="$withval"
3791 if test x"$with_configdir" = xyes; then
3792 # filled in later...
3794 elif test x"$with_configdir" = xno; then
3795 echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
3798 # there must be a better way than this...
3799 if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
3801 HACK_CONF_DIR=$with_configdir
3804 HACK_CONF_DIR="\${exec_prefix}$with_configdir"
3811 ###############################################################################
3813 # Check for the SGI SCREEN_SAVER server extension.
3815 ###############################################################################
3818 with_sgi_req=unspecified
3819 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3820 if test "${with_sgi_ext+set}" = set; then
3821 withval="$with_sgi_ext"
3822 with_sgi="$withval"; with_sgi_req="$withval"
3834 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3835 echo "configure:3847: checking for SGI SCREEN_SAVER headers" >&5
3838 X_CFLAGS="-I$d $X_CFLAGS"
3839 echo "$ac_t""$d" 1>&6
3841 echo "$ac_t""not found ($d: no such directory)" 1>&6
3844 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3845 echo "configure:3857: checking for SGI SCREEN_SAVER libs" >&5
3848 X_LIBS="-L$d $X_LIBS"
3849 echo "$ac_t""$d" 1>&6
3851 echo "$ac_t""not found ($d: no such directory)" 1>&6
3854 # replace the directory string with "yes".
3856 with_sgi=$with_sgi_req
3861 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3862 echo " If it is a directory, then \`DIR/include' will be added to"
3863 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3869 if test "$with_sgi" = yes; then
3871 ac_save_CPPFLAGS="$CPPFLAGS"
3872 if test \! -z "$includedir" ; then
3873 CPPFLAGS="$CPPFLAGS -I$includedir"
3875 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3876 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3877 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3878 echo "configure:3890: checking for X11/extensions/XScreenSaver.h" >&5
3879 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3880 echo $ac_n "(cached) $ac_c" 1>&6
3882 cat > conftest.$ac_ext <<EOF
3883 #line 3895 "configure"
3884 #include "confdefs.h"
3885 #include <X11/extensions/XScreenSaver.h>
3887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3888 { (eval echo configure:3900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3890 if test -z "$ac_err"; then
3892 eval "ac_cv_header_$ac_safe=yes"
3895 echo "configure: failed program was:" >&5
3896 cat conftest.$ac_ext >&5
3898 eval "ac_cv_header_$ac_safe=no"
3902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3903 echo "$ac_t""yes" 1>&6
3905 cat >> confdefs.h <<\EOF
3906 #define HAVE_SGI_SAVER_EXTENSION 1
3910 echo "$ac_t""no" 1>&6
3913 CPPFLAGS="$ac_save_CPPFLAGS"
3915 elif test "$with_sgi" != no; then
3916 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3921 ###############################################################################
3923 # Check for the MIT-SCREEN-SAVER server extension.
3925 ###############################################################################
3928 with_mit_req=unspecified
3929 # Check whether --with-mit-ext or --without-mit-ext was given.
3930 if test "${with_mit_ext+set}" = set; then
3931 withval="$with_mit_ext"
3932 with_mit="$withval"; with_mit_req="$withval"
3944 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3945 echo "configure:3957: checking for MIT-SCREEN-SAVER headers" >&5
3948 X_CFLAGS="-I$d $X_CFLAGS"
3949 echo "$ac_t""$d" 1>&6
3951 echo "$ac_t""not found ($d: no such directory)" 1>&6
3954 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3955 echo "configure:3967: checking for MIT-SCREEN-SAVER libs" >&5
3958 X_LIBS="-L$d $X_LIBS"
3959 echo "$ac_t""$d" 1>&6
3961 echo "$ac_t""not found ($d: no such directory)" 1>&6
3964 # replace the directory string with "yes".
3966 with_mit=$with_mit_req
3971 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3972 echo " If it is a directory, then \`DIR/include' will be added to"
3973 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3979 if test "$with_mit" = yes; then
3981 ac_save_CPPFLAGS="$CPPFLAGS"
3982 if test \! -z "$includedir" ; then
3983 CPPFLAGS="$CPPFLAGS -I$includedir"
3985 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3986 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3987 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3988 echo "configure:4000: checking for X11/extensions/scrnsaver.h" >&5
3989 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3990 echo $ac_n "(cached) $ac_c" 1>&6
3992 cat > conftest.$ac_ext <<EOF
3993 #line 4005 "configure"
3994 #include "confdefs.h"
3995 #include <X11/extensions/scrnsaver.h>
3997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3998 { (eval echo configure:4010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4000 if test -z "$ac_err"; then
4002 eval "ac_cv_header_$ac_safe=yes"
4005 echo "configure: failed program was:" >&5
4006 cat conftest.$ac_ext >&5
4008 eval "ac_cv_header_$ac_safe=no"
4012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4013 echo "$ac_t""yes" 1>&6
4016 echo "$ac_t""no" 1>&6
4019 CPPFLAGS="$ac_save_CPPFLAGS"
4021 # Now check to see if it's really in the library; XF86Free-3.3 ships
4022 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
4024 if test "$have_mit" = yes; then
4026 ac_save_CPPFLAGS="$CPPFLAGS"
4027 ac_save_LDFLAGS="$LDFLAGS"
4028 # ac_save_LIBS="$LIBS"
4030 if test \! -z "$includedir" ; then
4031 CPPFLAGS="$CPPFLAGS -I$includedir"
4033 # note: $X_CFLAGS includes $x_includes
4034 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4036 if test \! -z "$libdir" ; then
4037 LDFLAGS="$LDFLAGS -L$libdir"
4039 # note: $X_LIBS includes $x_libraries
4040 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4042 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
4043 echo "configure:4055: checking for XScreenSaverRegister in -lXext" >&5
4044 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4045 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4046 echo $ac_n "(cached) $ac_c" 1>&6
4048 ac_save_LIBS="$LIBS"
4049 LIBS="-lXext -lm $LIBS"
4050 cat > conftest.$ac_ext <<EOF
4051 #line 4063 "configure"
4052 #include "confdefs.h"
4053 /* Override any gcc2 internal prototype to avoid an error. */
4054 /* We use char because int might match the return type of a gcc2
4055 builtin and then its argument prototype would still apply. */
4056 char XScreenSaverRegister();
4059 XScreenSaverRegister()
4062 if { (eval echo configure:4074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4064 eval "ac_cv_lib_$ac_lib_var=yes"
4066 echo "configure: failed program was:" >&5
4067 cat conftest.$ac_ext >&5
4069 eval "ac_cv_lib_$ac_lib_var=no"
4072 LIBS="$ac_save_LIBS"
4075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4076 echo "$ac_t""yes" 1>&6
4079 echo "$ac_t""no" 1>&6
4083 CPPFLAGS="$ac_save_CPPFLAGS"
4084 LDFLAGS="$ac_save_LDFLAGS"
4085 # LIBS="$ac_save_LIBS"
4088 if test "$have_mit" = no; then
4089 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
4090 # of in Xext. Thank you master, may I have another.
4092 ac_save_CPPFLAGS="$CPPFLAGS"
4093 ac_save_LDFLAGS="$LDFLAGS"
4094 # ac_save_LIBS="$LIBS"
4096 if test \! -z "$includedir" ; then
4097 CPPFLAGS="$CPPFLAGS -I$includedir"
4099 # note: $X_CFLAGS includes $x_includes
4100 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4102 if test \! -z "$libdir" ; then
4103 LDFLAGS="$LDFLAGS -L$libdir"
4105 # note: $X_LIBS includes $x_libraries
4106 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4108 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
4109 echo "configure:4121: checking for XScreenSaverRegister in -lXExExt" >&5
4110 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4111 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4112 echo $ac_n "(cached) $ac_c" 1>&6
4114 ac_save_LIBS="$LIBS"
4115 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
4116 cat > conftest.$ac_ext <<EOF
4117 #line 4129 "configure"
4118 #include "confdefs.h"
4119 /* Override any gcc2 internal prototype to avoid an error. */
4120 /* We use char because int might match the return type of a gcc2
4121 builtin and then its argument prototype would still apply. */
4122 char XScreenSaverRegister();
4125 XScreenSaverRegister()
4128 if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4130 eval "ac_cv_lib_$ac_lib_var=yes"
4132 echo "configure: failed program was:" >&5
4133 cat conftest.$ac_ext >&5
4135 eval "ac_cv_lib_$ac_lib_var=no"
4138 LIBS="$ac_save_LIBS"
4141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4142 echo "$ac_t""yes" 1>&6
4143 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
4145 echo "$ac_t""no" 1>&6
4149 CPPFLAGS="$ac_save_CPPFLAGS"
4150 LDFLAGS="$ac_save_LDFLAGS"
4151 # LIBS="$ac_save_LIBS"
4155 if test "$have_mit" = no; then
4156 # Double fuck! Looks like some versions of XFree86 (whichever version
4157 # it is that comes with RedHat Linux 2.0 -- I can't find a version
4158 # number) put this garbage in Xss instead of Xext. Thank you master,
4159 # may I have another.
4161 ac_save_CPPFLAGS="$CPPFLAGS"
4162 ac_save_LDFLAGS="$LDFLAGS"
4163 # ac_save_LIBS="$LIBS"
4165 if test \! -z "$includedir" ; then
4166 CPPFLAGS="$CPPFLAGS -I$includedir"
4168 # note: $X_CFLAGS includes $x_includes
4169 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4171 if test \! -z "$libdir" ; then
4172 LDFLAGS="$LDFLAGS -L$libdir"
4174 # note: $X_LIBS includes $x_libraries
4175 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4177 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
4178 echo "configure:4190: checking for XScreenSaverRegister in -lXss" >&5
4179 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
4180 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4181 echo $ac_n "(cached) $ac_c" 1>&6
4183 ac_save_LIBS="$LIBS"
4184 LIBS="-lXss -lX11 -lXext -lm $LIBS"
4185 cat > conftest.$ac_ext <<EOF
4186 #line 4198 "configure"
4187 #include "confdefs.h"
4188 /* Override any gcc2 internal prototype to avoid an error. */
4189 /* We use char because int might match the return type of a gcc2
4190 builtin and then its argument prototype would still apply. */
4191 char XScreenSaverRegister();
4194 XScreenSaverRegister()
4197 if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4199 eval "ac_cv_lib_$ac_lib_var=yes"
4201 echo "configure: failed program was:" >&5
4202 cat conftest.$ac_ext >&5
4204 eval "ac_cv_lib_$ac_lib_var=no"
4207 LIBS="$ac_save_LIBS"
4210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4211 echo "$ac_t""yes" 1>&6
4212 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
4214 echo "$ac_t""no" 1>&6
4218 CPPFLAGS="$ac_save_CPPFLAGS"
4219 LDFLAGS="$ac_save_LDFLAGS"
4220 # LIBS="$ac_save_LIBS"
4224 if test "$have_mit" = yes; then
4225 cat >> confdefs.h <<\EOF
4226 #define HAVE_MIT_SAVER_EXTENSION 1
4233 elif test "$with_mit" != no; then
4234 echo "error: must be yes or no: --with-mit-ext=$with_mit"
4239 ###############################################################################
4241 # Check for the XIDLE server extension.
4243 ###############################################################################
4246 with_xidle_req=unspecified
4247 # Check whether --with-xidle-ext or --without-xidle-ext was given.
4248 if test "${with_xidle_ext+set}" = set; then
4249 withval="$with_xidle_ext"
4250 with_xidle="$withval"; with_xidle_req="$withval"
4257 case "$with_xidle" in
4262 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
4263 echo "configure:4275: checking for XIDLE headers" >&5
4264 d=$with_xidle/include
4266 X_CFLAGS="-I$d $X_CFLAGS"
4267 echo "$ac_t""$d" 1>&6
4269 echo "$ac_t""not found ($d: no such directory)" 1>&6
4272 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
4273 echo "configure:4285: checking for XIDLE libs" >&5
4276 X_LIBS="-L$d $X_LIBS"
4277 echo "$ac_t""$d" 1>&6
4279 echo "$ac_t""not found ($d: no such directory)" 1>&6
4282 # replace the directory string with "yes".
4283 with_xidle_req="yes"
4284 with_xidle=$with_xidle_req
4289 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
4290 echo " If it is a directory, then \`DIR/include' will be added to"
4291 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4297 if test "$with_xidle" = yes; then
4299 ac_save_CPPFLAGS="$CPPFLAGS"
4300 if test \! -z "$includedir" ; then
4301 CPPFLAGS="$CPPFLAGS -I$includedir"
4303 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4304 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
4305 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
4306 echo "configure:4318: checking for X11/extensions/xidle.h" >&5
4307 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4308 echo $ac_n "(cached) $ac_c" 1>&6
4310 cat > conftest.$ac_ext <<EOF
4311 #line 4323 "configure"
4312 #include "confdefs.h"
4313 #include <X11/extensions/xidle.h>
4315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4316 { (eval echo configure:4328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4318 if test -z "$ac_err"; then
4320 eval "ac_cv_header_$ac_safe=yes"
4323 echo "configure: failed program was:" >&5
4324 cat conftest.$ac_ext >&5
4326 eval "ac_cv_header_$ac_safe=no"
4330 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4331 echo "$ac_t""yes" 1>&6
4333 cat >> confdefs.h <<\EOF
4334 #define HAVE_XIDLE_EXTENSION 1
4338 echo "$ac_t""no" 1>&6
4341 CPPFLAGS="$ac_save_CPPFLAGS"
4342 elif test "$with_xidle" != no; then
4343 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
4348 ###############################################################################
4350 # Check for the SGI-VIDEO-CONTROL server extension.
4352 ###############################################################################
4355 with_sgivc_req=unspecified
4356 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4357 if test "${with_sgivc_ext+set}" = set; then
4358 withval="$with_sgivc_ext"
4359 with_sgivc="$withval"; with_sgivc_req="$withval"
4366 case "$with_sgivc" in
4371 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4372 echo "configure:4384: checking for SGI-VIDEO-CONTROL headers" >&5
4373 d=$with_sgivc/include
4375 X_CFLAGS="-I$d $X_CFLAGS"
4376 echo "$ac_t""$d" 1>&6
4378 echo "$ac_t""not found ($d: no such directory)" 1>&6
4381 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4382 echo "configure:4394: checking for SGI-VIDEO-CONTROL libs" >&5
4385 X_LIBS="-L$d $X_LIBS"
4386 echo "$ac_t""$d" 1>&6
4388 echo "$ac_t""not found ($d: no such directory)" 1>&6
4391 # replace the directory string with "yes".
4392 with_sgivc_req="yes"
4393 with_sgivc=$with_sgivc_req
4398 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4399 echo " If it is a directory, then \`DIR/include' will be added to"
4400 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4406 if test "$with_sgivc" = yes; then
4408 # first check for XSGIvc.h
4410 ac_save_CPPFLAGS="$CPPFLAGS"
4411 if test \! -z "$includedir" ; then
4412 CPPFLAGS="$CPPFLAGS -I$includedir"
4414 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4415 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4416 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4417 echo "configure:4429: checking for X11/extensions/XSGIvc.h" >&5
4418 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4419 echo $ac_n "(cached) $ac_c" 1>&6
4421 cat > conftest.$ac_ext <<EOF
4422 #line 4434 "configure"
4423 #include "confdefs.h"
4424 #include <X11/extensions/XSGIvc.h>
4426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4427 { (eval echo configure:4439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4429 if test -z "$ac_err"; then
4431 eval "ac_cv_header_$ac_safe=yes"
4434 echo "configure: failed program was:" >&5
4435 cat conftest.$ac_ext >&5
4437 eval "ac_cv_header_$ac_safe=no"
4441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4442 echo "$ac_t""yes" 1>&6
4445 echo "$ac_t""no" 1>&6
4448 CPPFLAGS="$ac_save_CPPFLAGS"
4450 # if that succeeded, then check for the -lXsgivc
4451 if test "$have_sgivc" = yes; then
4454 ac_save_CPPFLAGS="$CPPFLAGS"
4455 ac_save_LDFLAGS="$LDFLAGS"
4456 # ac_save_LIBS="$LIBS"
4458 if test \! -z "$includedir" ; then
4459 CPPFLAGS="$CPPFLAGS -I$includedir"
4461 # note: $X_CFLAGS includes $x_includes
4462 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4464 if test \! -z "$libdir" ; then
4465 LDFLAGS="$LDFLAGS -L$libdir"
4467 # note: $X_LIBS includes $x_libraries
4468 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4470 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4471 echo "configure:4483: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4472 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4474 echo $ac_n "(cached) $ac_c" 1>&6
4476 ac_save_LIBS="$LIBS"
4477 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4478 cat > conftest.$ac_ext <<EOF
4479 #line 4491 "configure"
4480 #include "confdefs.h"
4481 /* Override any gcc2 internal prototype to avoid an error. */
4482 /* We use char because int might match the return type of a gcc2
4483 builtin and then its argument prototype would still apply. */
4484 char XSGIvcQueryGammaMap();
4487 XSGIvcQueryGammaMap()
4490 if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4492 eval "ac_cv_lib_$ac_lib_var=yes"
4494 echo "configure: failed program was:" >&5
4495 cat conftest.$ac_ext >&5
4497 eval "ac_cv_lib_$ac_lib_var=no"
4500 LIBS="$ac_save_LIBS"
4503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4504 echo "$ac_t""yes" 1>&6
4505 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4507 echo "$ac_t""no" 1>&6
4511 CPPFLAGS="$ac_save_CPPFLAGS"
4512 LDFLAGS="$ac_save_LDFLAGS"
4513 # LIBS="$ac_save_LIBS"
4517 # if that succeeded, then we've really got it.
4518 if test "$have_sgivc" = yes; then
4519 cat >> confdefs.h <<\EOF
4520 #define HAVE_SGI_VC_EXTENSION 1
4525 elif test "$with_sgivc" != no; then
4526 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4531 ###############################################################################
4533 # Check for the DPMS server extension.
4535 ###############################################################################
4538 with_dpms_req=unspecified
4539 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4540 if test "${with_dpms_ext+set}" = set; then
4541 withval="$with_dpms_ext"
4542 with_dpms="$withval"; with_dpms_req="$withval"
4549 case "$with_dpms" in
4554 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4555 echo "configure:4567: checking for DPMS headers" >&5
4556 d=$with_dpms/include
4558 X_CFLAGS="-I$d $X_CFLAGS"
4559 echo "$ac_t""$d" 1>&6
4561 echo "$ac_t""not found ($d: no such directory)" 1>&6
4564 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4565 echo "configure:4577: checking for DPMS libs" >&5
4568 X_LIBS="-L$d $X_LIBS"
4569 echo "$ac_t""$d" 1>&6
4571 echo "$ac_t""not found ($d: no such directory)" 1>&6
4574 # replace the directory string with "yes".
4576 with_dpms=$with_dpms_req
4581 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4582 echo " If it is a directory, then \`DIR/include' will be added to"
4583 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4589 if test "$with_dpms" = yes; then
4591 # first check for dpms.h
4593 ac_save_CPPFLAGS="$CPPFLAGS"
4594 if test \! -z "$includedir" ; then
4595 CPPFLAGS="$CPPFLAGS -I$includedir"
4597 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4598 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4599 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4600 echo "configure:4612: checking for X11/extensions/dpms.h" >&5
4601 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4602 echo $ac_n "(cached) $ac_c" 1>&6
4604 cat > conftest.$ac_ext <<EOF
4605 #line 4617 "configure"
4606 #include "confdefs.h"
4607 #include <X11/extensions/dpms.h>
4609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4610 { (eval echo configure:4622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4612 if test -z "$ac_err"; then
4614 eval "ac_cv_header_$ac_safe=yes"
4617 echo "configure: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
4620 eval "ac_cv_header_$ac_safe=no"
4624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4625 echo "$ac_t""yes" 1>&6
4628 echo "$ac_t""no" 1>&6
4631 CPPFLAGS="$ac_save_CPPFLAGS"
4633 # if that succeeded, then check for the DPMS code in the libraries
4634 if test "$have_dpms" = yes; then
4636 # first look in -lXext (this is where it is with XFree86 4.0)
4639 ac_save_CPPFLAGS="$CPPFLAGS"
4640 ac_save_LDFLAGS="$LDFLAGS"
4641 # ac_save_LIBS="$LIBS"
4643 if test \! -z "$includedir" ; then
4644 CPPFLAGS="$CPPFLAGS -I$includedir"
4646 # note: $X_CFLAGS includes $x_includes
4647 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4649 if test \! -z "$libdir" ; then
4650 LDFLAGS="$LDFLAGS -L$libdir"
4652 # note: $X_LIBS includes $x_libraries
4653 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4655 echo $ac_n "checking for DPMSInfo in -lXext""... $ac_c" 1>&6
4656 echo "configure:4668: checking for DPMSInfo in -lXext" >&5
4657 ac_lib_var=`echo Xext'_'DPMSInfo | sed 'y%./+-%__p_%'`
4658 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4659 echo $ac_n "(cached) $ac_c" 1>&6
4661 ac_save_LIBS="$LIBS"
4662 LIBS="-lXext -lXext -lX11 $LIBS"
4663 cat > conftest.$ac_ext <<EOF
4664 #line 4676 "configure"
4665 #include "confdefs.h"
4666 /* Override any gcc2 internal prototype to avoid an error. */
4667 /* We use char because int might match the return type of a gcc2
4668 builtin and then its argument prototype would still apply. */
4675 if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4677 eval "ac_cv_lib_$ac_lib_var=yes"
4679 echo "configure: failed program was:" >&5
4680 cat conftest.$ac_ext >&5
4682 eval "ac_cv_lib_$ac_lib_var=no"
4685 LIBS="$ac_save_LIBS"
4688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4689 echo "$ac_t""yes" 1>&6
4692 echo "$ac_t""no" 1>&6
4696 CPPFLAGS="$ac_save_CPPFLAGS"
4697 LDFLAGS="$ac_save_LDFLAGS"
4698 # LIBS="$ac_save_LIBS"
4701 # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
4702 if test "$have_dpms" = no; then
4704 ac_save_CPPFLAGS="$CPPFLAGS"
4705 ac_save_LDFLAGS="$LDFLAGS"
4706 # ac_save_LIBS="$LIBS"
4708 if test \! -z "$includedir" ; then
4709 CPPFLAGS="$CPPFLAGS -I$includedir"
4711 # note: $X_CFLAGS includes $x_includes
4712 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4714 if test \! -z "$libdir" ; then
4715 LDFLAGS="$LDFLAGS -L$libdir"
4717 # note: $X_LIBS includes $x_libraries
4718 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4720 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4721 echo "configure:4733: checking for DPMSInfo in -lXdpms" >&5
4722 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4723 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4724 echo $ac_n "(cached) $ac_c" 1>&6
4726 ac_save_LIBS="$LIBS"
4727 LIBS="-lXdpms -lXext -lX11 $LIBS"
4728 cat > conftest.$ac_ext <<EOF
4729 #line 4741 "configure"
4730 #include "confdefs.h"
4731 /* Override any gcc2 internal prototype to avoid an error. */
4732 /* We use char because int might match the return type of a gcc2
4733 builtin and then its argument prototype would still apply. */
4740 if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4742 eval "ac_cv_lib_$ac_lib_var=yes"
4744 echo "configure: failed program was:" >&5
4745 cat conftest.$ac_ext >&5
4747 eval "ac_cv_lib_$ac_lib_var=no"
4750 LIBS="$ac_save_LIBS"
4753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4754 echo "$ac_t""yes" 1>&6
4755 have_dpms=yes; XDPMS_LIBS="-lXdpms"
4757 echo "$ac_t""no" 1>&6
4761 CPPFLAGS="$ac_save_CPPFLAGS"
4762 LDFLAGS="$ac_save_LDFLAGS"
4763 # LIBS="$ac_save_LIBS"
4769 # if that succeeded, then we've really got it.
4770 if test "$have_dpms" = yes; then
4771 cat >> confdefs.h <<\EOF
4772 #define HAVE_DPMS_EXTENSION 1
4777 elif test "$with_dpms" != no; then
4778 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4783 ###############################################################################
4785 # Check for the XINERAMA server extension.
4787 ###############################################################################
4790 with_xinerama_req=unspecified
4791 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
4792 if test "${with_xinerama_ext+set}" = set; then
4793 withval="$with_xinerama_ext"
4794 with_xinerama="$withval"; with_xinerama_req="$withval"
4801 case "$with_xinerama" in
4806 echo $ac_n "checking for XINERAMA headers""... $ac_c" 1>&6
4807 echo "configure:4819: checking for XINERAMA headers" >&5
4808 d=$with_xinerama/include
4810 X_CFLAGS="-I$d $X_CFLAGS"
4811 echo "$ac_t""$d" 1>&6
4813 echo "$ac_t""not found ($d: no such directory)" 1>&6
4816 echo $ac_n "checking for XINERAMA libs""... $ac_c" 1>&6
4817 echo "configure:4829: checking for XINERAMA libs" >&5
4818 d=$with_xinerama/lib
4820 X_LIBS="-L$d $X_LIBS"
4821 echo "$ac_t""$d" 1>&6
4823 echo "$ac_t""not found ($d: no such directory)" 1>&6
4826 # replace the directory string with "yes".
4827 with_xinerama_req="yes"
4828 with_xinerama=$with_xinerama_req
4833 echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
4834 echo " If it is a directory, then \`DIR/include' will be added to"
4835 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4841 if test "$with_xinerama" = yes; then
4843 # first check for Xinerama.h
4845 ac_save_CPPFLAGS="$CPPFLAGS"
4846 if test \! -z "$includedir" ; then
4847 CPPFLAGS="$CPPFLAGS -I$includedir"
4849 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4850 ac_safe=`echo "X11/extensions/Xinerama.h" | sed 'y%./+-%__p_%'`
4851 echo $ac_n "checking for X11/extensions/Xinerama.h""... $ac_c" 1>&6
4852 echo "configure:4864: checking for X11/extensions/Xinerama.h" >&5
4853 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4854 echo $ac_n "(cached) $ac_c" 1>&6
4856 cat > conftest.$ac_ext <<EOF
4857 #line 4869 "configure"
4858 #include "confdefs.h"
4859 #include <X11/extensions/Xinerama.h>
4861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4862 { (eval echo configure:4874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4864 if test -z "$ac_err"; then
4866 eval "ac_cv_header_$ac_safe=yes"
4869 echo "configure: failed program was:" >&5
4870 cat conftest.$ac_ext >&5
4872 eval "ac_cv_header_$ac_safe=no"
4876 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4877 echo "$ac_t""yes" 1>&6
4880 echo "$ac_t""no" 1>&6
4883 CPPFLAGS="$ac_save_CPPFLAGS"
4885 # if that succeeded, then check for the XINERAMA code in the libraries
4886 if test "$have_xinerama" = yes; then
4888 # first look in -lXext
4891 ac_save_CPPFLAGS="$CPPFLAGS"
4892 ac_save_LDFLAGS="$LDFLAGS"
4893 # ac_save_LIBS="$LIBS"
4895 if test \! -z "$includedir" ; then
4896 CPPFLAGS="$CPPFLAGS -I$includedir"
4898 # note: $X_CFLAGS includes $x_includes
4899 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4901 if test \! -z "$libdir" ; then
4902 LDFLAGS="$LDFLAGS -L$libdir"
4904 # note: $X_LIBS includes $x_libraries
4905 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4907 echo $ac_n "checking for XineramaQueryExtension in -lXext""... $ac_c" 1>&6
4908 echo "configure:4920: checking for XineramaQueryExtension in -lXext" >&5
4909 ac_lib_var=`echo Xext'_'XineramaQueryExtension | sed 'y%./+-%__p_%'`
4910 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4911 echo $ac_n "(cached) $ac_c" 1>&6
4913 ac_save_LIBS="$LIBS"
4914 LIBS="-lXext -lXext -lX11 $LIBS"
4915 cat > conftest.$ac_ext <<EOF
4916 #line 4928 "configure"
4917 #include "confdefs.h"
4918 /* Override any gcc2 internal prototype to avoid an error. */
4919 /* We use char because int might match the return type of a gcc2
4920 builtin and then its argument prototype would still apply. */
4921 char XineramaQueryExtension();
4924 XineramaQueryExtension()
4927 if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4929 eval "ac_cv_lib_$ac_lib_var=yes"
4931 echo "configure: failed program was:" >&5
4932 cat conftest.$ac_ext >&5
4934 eval "ac_cv_lib_$ac_lib_var=no"
4937 LIBS="$ac_save_LIBS"
4940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4941 echo "$ac_t""yes" 1>&6
4944 echo "$ac_t""no" 1>&6
4948 CPPFLAGS="$ac_save_CPPFLAGS"
4949 LDFLAGS="$ac_save_LDFLAGS"
4950 # LIBS="$ac_save_LIBS"
4953 # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
4954 if test "$have_xinerama" = no; then
4956 ac_save_CPPFLAGS="$CPPFLAGS"
4957 ac_save_LDFLAGS="$LDFLAGS"
4958 # ac_save_LIBS="$LIBS"
4960 if test \! -z "$includedir" ; then
4961 CPPFLAGS="$CPPFLAGS -I$includedir"
4963 # note: $X_CFLAGS includes $x_includes
4964 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4966 if test \! -z "$libdir" ; then
4967 LDFLAGS="$LDFLAGS -L$libdir"
4969 # note: $X_LIBS includes $x_libraries
4970 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
4972 echo $ac_n "checking for XineramaQueryExtension in -lXinerama""... $ac_c" 1>&6
4973 echo "configure:4985: checking for XineramaQueryExtension in -lXinerama" >&5
4974 ac_lib_var=`echo Xinerama'_'XineramaQueryExtension | sed 'y%./+-%__p_%'`
4975 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4976 echo $ac_n "(cached) $ac_c" 1>&6
4978 ac_save_LIBS="$LIBS"
4979 LIBS="-lXinerama -lXext -lX11 $LIBS"
4980 cat > conftest.$ac_ext <<EOF
4981 #line 4993 "configure"
4982 #include "confdefs.h"
4983 /* Override any gcc2 internal prototype to avoid an error. */
4984 /* We use char because int might match the return type of a gcc2
4985 builtin and then its argument prototype would still apply. */
4986 char XineramaQueryExtension();
4989 XineramaQueryExtension()
4992 if { (eval echo configure:5004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4994 eval "ac_cv_lib_$ac_lib_var=yes"
4996 echo "configure: failed program was:" >&5
4997 cat conftest.$ac_ext >&5
4999 eval "ac_cv_lib_$ac_lib_var=no"
5002 LIBS="$ac_save_LIBS"
5005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5006 echo "$ac_t""yes" 1>&6
5007 have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
5009 echo "$ac_t""no" 1>&6
5013 CPPFLAGS="$ac_save_CPPFLAGS"
5014 LDFLAGS="$ac_save_LDFLAGS"
5015 # LIBS="$ac_save_LIBS"
5020 # if that succeeded, then we've really got it.
5021 if test "$have_xinerama" = yes; then
5022 cat >> confdefs.h <<\EOF
5023 #define HAVE_XINERAMA 1
5028 elif test "$with_xinerama" != no; then
5029 echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
5034 ###############################################################################
5036 # Check for the XF86VMODE server extension (for virtual screens.)
5038 ###############################################################################
5041 with_xf86vmode_req=unspecified
5042 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
5043 if test "${with_xf86vmode_ext+set}" = set; then
5044 withval="$with_xf86vmode_ext"
5045 with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
5052 case "$with_xf86vmode" in
5057 echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
5058 echo "configure:5070: checking for xf86vmode headers" >&5
5059 d=$with_xf86vmode/include
5061 X_CFLAGS="-I$d $X_CFLAGS"
5062 echo "$ac_t""$d" 1>&6
5064 echo "$ac_t""not found ($d: no such directory)" 1>&6
5067 echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
5068 echo "configure:5080: checking for xf86vmode libs" >&5
5069 d=$with_xf86vmode/lib
5071 X_LIBS="-L$d $X_LIBS"
5072 echo "$ac_t""$d" 1>&6
5074 echo "$ac_t""not found ($d: no such directory)" 1>&6
5077 # replace the directory string with "yes".
5078 with_xf86vmode_req="yes"
5079 with_xf86vmode=$with_xf86vmode_req
5084 echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
5085 echo " If it is a directory, then \`DIR/include' will be added to"
5086 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5092 if test "$with_xf86vmode" = yes; then
5094 # first check for xf86vmode.h
5096 ac_save_CPPFLAGS="$CPPFLAGS"
5097 if test \! -z "$includedir" ; then
5098 CPPFLAGS="$CPPFLAGS -I$includedir"
5100 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5101 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
5102 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
5103 echo "configure:5115: checking for X11/extensions/xf86vmode.h" >&5
5104 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5105 echo $ac_n "(cached) $ac_c" 1>&6
5107 cat > conftest.$ac_ext <<EOF
5108 #line 5120 "configure"
5109 #include "confdefs.h"
5110 #include <X11/extensions/xf86vmode.h>
5112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5113 { (eval echo configure:5125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5115 if test -z "$ac_err"; then
5117 eval "ac_cv_header_$ac_safe=yes"
5120 echo "configure: failed program was:" >&5
5121 cat conftest.$ac_ext >&5
5123 eval "ac_cv_header_$ac_safe=no"
5127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5128 echo "$ac_t""yes" 1>&6
5131 echo "$ac_t""no" 1>&6
5134 CPPFLAGS="$ac_save_CPPFLAGS"
5136 # if that succeeded, then check for the -lXxf86vm
5137 if test "$have_xf86vmode" = yes; then
5140 ac_save_CPPFLAGS="$CPPFLAGS"
5141 ac_save_LDFLAGS="$LDFLAGS"
5142 # ac_save_LIBS="$LIBS"
5144 if test \! -z "$includedir" ; then
5145 CPPFLAGS="$CPPFLAGS -I$includedir"
5147 # note: $X_CFLAGS includes $x_includes
5148 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5150 if test \! -z "$libdir" ; then
5151 LDFLAGS="$LDFLAGS -L$libdir"
5153 # note: $X_LIBS includes $x_libraries
5154 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
5156 echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
5157 echo "configure:5169: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
5158 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
5159 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5160 echo $ac_n "(cached) $ac_c" 1>&6
5162 ac_save_LIBS="$LIBS"
5163 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
5164 cat > conftest.$ac_ext <<EOF
5165 #line 5177 "configure"
5166 #include "confdefs.h"
5167 /* Override any gcc2 internal prototype to avoid an error. */
5168 /* We use char because int might match the return type of a gcc2
5169 builtin and then its argument prototype would still apply. */
5170 char XF86VidModeGetViewPort();
5173 XF86VidModeGetViewPort()
5176 if { (eval echo configure:5188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5178 eval "ac_cv_lib_$ac_lib_var=yes"
5180 echo "configure: failed program was:" >&5
5181 cat conftest.$ac_ext >&5
5183 eval "ac_cv_lib_$ac_lib_var=no"
5186 LIBS="$ac_save_LIBS"
5189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5190 echo "$ac_t""yes" 1>&6
5191 have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
5193 echo "$ac_t""no" 1>&6
5197 CPPFLAGS="$ac_save_CPPFLAGS"
5198 LDFLAGS="$ac_save_LDFLAGS"
5199 # LIBS="$ac_save_LIBS"
5203 # if that succeeded, then we've really got it.
5204 if test "$have_xf86vmode" = yes; then
5205 cat >> confdefs.h <<\EOF
5206 #define HAVE_XF86VMODE 1
5211 elif test "$with_xf86vmode" != no; then
5212 echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
5217 ###############################################################################
5219 # Check for the XF86VMODE server extension (for gamma fading.)
5221 ###############################################################################
5224 have_xf86gamma_ramp=no
5225 with_xf86gamma_req=unspecified
5226 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
5227 if test "${with_xf86gamma_ext+set}" = set; then
5228 withval="$with_xf86gamma_ext"
5229 with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
5236 case "$with_xf86gamma" in
5241 echo $ac_n "checking for xf86gamma headers""... $ac_c" 1>&6
5242 echo "configure:5254: checking for xf86gamma headers" >&5
5243 d=$with_xf86gamma/include
5245 X_CFLAGS="-I$d $X_CFLAGS"
5246 echo "$ac_t""$d" 1>&6
5248 echo "$ac_t""not found ($d: no such directory)" 1>&6
5251 echo $ac_n "checking for xf86gamma libs""... $ac_c" 1>&6
5252 echo "configure:5264: checking for xf86gamma libs" >&5
5253 d=$with_xf86gamma/lib
5255 X_LIBS="-L$d $X_LIBS"
5256 echo "$ac_t""$d" 1>&6
5258 echo "$ac_t""not found ($d: no such directory)" 1>&6
5261 # replace the directory string with "yes".
5262 with_xf86gamma_req="yes"
5263 with_xf86gamma=$with_xf86gamma_req
5268 echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
5269 echo " If it is a directory, then \`DIR/include' will be added to"
5270 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5276 if test "$with_xf86gamma" = yes; then
5278 # first check for xf86vmode.h, if we haven't already
5279 if test "$have_xf86vmode" = yes; then
5283 ac_save_CPPFLAGS="$CPPFLAGS"
5284 if test \! -z "$includedir" ; then
5285 CPPFLAGS="$CPPFLAGS -I$includedir"
5287 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5288 ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
5289 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
5290 echo "configure:5302: checking for X11/extensions/xf86vmode.h" >&5
5291 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5292 echo $ac_n "(cached) $ac_c" 1>&6
5294 cat > conftest.$ac_ext <<EOF
5295 #line 5307 "configure"
5296 #include "confdefs.h"
5297 #include <X11/extensions/xf86vmode.h>
5299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5300 { (eval echo configure:5312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5302 if test -z "$ac_err"; then
5304 eval "ac_cv_header_$ac_safe=yes"
5307 echo "configure: failed program was:" >&5
5308 cat conftest.$ac_ext >&5
5310 eval "ac_cv_header_$ac_safe=no"
5314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5315 echo "$ac_t""yes" 1>&6
5318 echo "$ac_t""no" 1>&6
5321 CPPFLAGS="$ac_save_CPPFLAGS"
5324 # if that succeeded, then check for the -lXxf86vm
5325 if test "$have_xf86gamma" = yes; then
5328 ac_save_CPPFLAGS="$CPPFLAGS"
5329 ac_save_LDFLAGS="$LDFLAGS"
5330 # ac_save_LIBS="$LIBS"
5332 if test \! -z "$includedir" ; then
5333 CPPFLAGS="$CPPFLAGS -I$includedir"
5335 # note: $X_CFLAGS includes $x_includes
5336 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5338 if test \! -z "$libdir" ; then
5339 LDFLAGS="$LDFLAGS -L$libdir"
5341 # note: $X_LIBS includes $x_libraries
5342 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
5344 echo $ac_n "checking for XF86VidModeSetGamma in -lXxf86vm""... $ac_c" 1>&6
5345 echo "configure:5357: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
5346 ac_lib_var=`echo Xxf86vm'_'XF86VidModeSetGamma | sed 'y%./+-%__p_%'`
5347 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5348 echo $ac_n "(cached) $ac_c" 1>&6
5350 ac_save_LIBS="$LIBS"
5351 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
5352 cat > conftest.$ac_ext <<EOF
5353 #line 5365 "configure"
5354 #include "confdefs.h"
5355 /* Override any gcc2 internal prototype to avoid an error. */
5356 /* We use char because int might match the return type of a gcc2
5357 builtin and then its argument prototype would still apply. */
5358 char XF86VidModeSetGamma();
5361 XF86VidModeSetGamma()
5364 if { (eval echo configure:5376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5366 eval "ac_cv_lib_$ac_lib_var=yes"
5368 echo "configure: failed program was:" >&5
5369 cat conftest.$ac_ext >&5
5371 eval "ac_cv_lib_$ac_lib_var=no"
5374 LIBS="$ac_save_LIBS"
5377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5378 echo "$ac_t""yes" 1>&6
5381 echo "$ac_t""no" 1>&6
5385 CPPFLAGS="$ac_save_CPPFLAGS"
5386 LDFLAGS="$ac_save_LDFLAGS"
5387 # LIBS="$ac_save_LIBS"
5391 # check for the Ramp versions of the functions too.
5392 if test "$have_xf86gamma" = yes; then
5393 have_xf86gamma_ramp=no
5395 ac_save_CPPFLAGS="$CPPFLAGS"
5396 ac_save_LDFLAGS="$LDFLAGS"
5397 # ac_save_LIBS="$LIBS"
5399 if test \! -z "$includedir" ; then
5400 CPPFLAGS="$CPPFLAGS -I$includedir"
5402 # note: $X_CFLAGS includes $x_includes
5403 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5405 if test \! -z "$libdir" ; then
5406 LDFLAGS="$LDFLAGS -L$libdir"
5408 # note: $X_LIBS includes $x_libraries
5409 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
5411 echo $ac_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm""... $ac_c" 1>&6
5412 echo "configure:5424: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
5413 ac_lib_var=`echo Xxf86vm'_'XF86VidModeSetGammaRamp | sed 'y%./+-%__p_%'`
5414 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5415 echo $ac_n "(cached) $ac_c" 1>&6
5417 ac_save_LIBS="$LIBS"
5418 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
5419 cat > conftest.$ac_ext <<EOF
5420 #line 5432 "configure"
5421 #include "confdefs.h"
5422 /* Override any gcc2 internal prototype to avoid an error. */
5423 /* We use char because int might match the return type of a gcc2
5424 builtin and then its argument prototype would still apply. */
5425 char XF86VidModeSetGammaRamp();
5428 XF86VidModeSetGammaRamp()
5431 if { (eval echo configure:5443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5433 eval "ac_cv_lib_$ac_lib_var=yes"
5435 echo "configure: failed program was:" >&5
5436 cat conftest.$ac_ext >&5
5438 eval "ac_cv_lib_$ac_lib_var=no"
5441 LIBS="$ac_save_LIBS"
5444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5445 echo "$ac_t""yes" 1>&6
5446 have_xf86gamma_ramp=yes
5448 echo "$ac_t""no" 1>&6
5452 CPPFLAGS="$ac_save_CPPFLAGS"
5453 LDFLAGS="$ac_save_LDFLAGS"
5454 # LIBS="$ac_save_LIBS"
5458 # if those tests succeeded, then we've really got the functions.
5459 if test "$have_xf86gamma" = yes; then
5460 cat >> confdefs.h <<\EOF
5461 #define HAVE_XF86VMODE_GAMMA 1
5466 if test "$have_xf86gamma_ramp" = yes; then
5467 cat >> confdefs.h <<\EOF
5468 #define HAVE_XF86VMODE_GAMMA_RAMP 1
5473 # pull in the lib, if we haven't already
5474 if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
5475 SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
5478 elif test "$with_xf86gamma" != no; then
5479 echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
5484 ###############################################################################
5486 # Check for HP XHPDisableReset and XHPEnableReset.
5488 ###############################################################################
5491 ac_save_CPPFLAGS="$CPPFLAGS"
5492 if test \! -z "$includedir" ; then
5493 CPPFLAGS="$CPPFLAGS -I$includedir"
5495 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5496 cat > conftest.$ac_ext <<EOF
5497 #line 5509 "configure"
5498 #include "confdefs.h"
5499 #include <X11/XHPlib.h>
5501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5502 egrep "XHPDisableReset" >/dev/null 2>&1; then
5504 cat >> confdefs.h <<\EOF
5505 #define HAVE_XHPDISABLERESET 1
5508 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
5512 CPPFLAGS="$ac_save_CPPFLAGS"
5515 ###############################################################################
5517 # Check for /proc/interrupts.
5519 ###############################################################################
5521 have_proc_interrupts=no
5522 with_proc_interrupts_req=unspecified
5523 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
5524 if test "${with_proc_interrupts+set}" = set; then
5525 withval="$with_proc_interrupts"
5526 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
5528 with_proc_interrupts=yes
5532 if test "$with_proc_interrupts" = yes; then
5534 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
5535 echo "configure:5547: checking whether /proc/interrupts contains keyboard data" >&5
5536 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
5537 echo $ac_n "(cached) $ac_c" 1>&6
5539 ac_cv_have_proc_interrupts=no
5540 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
5541 ac_cv_have_proc_interrupts=yes
5546 echo "$ac_t""$ac_cv_have_proc_interrupts" 1>&6
5547 have_proc_interrupts=$ac_cv_have_proc_interrupts
5549 if test "$have_proc_interrupts" = yes; then
5550 cat >> confdefs.h <<\EOF
5551 #define HAVE_PROC_INTERRUPTS 1
5556 elif test "$with_proc_interrupts" != no; then
5557 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
5562 ###############################################################################
5564 # The --enable-locking option
5566 ###############################################################################
5568 # Check whether --enable-locking or --disable-locking was given.
5569 if test "${enable_locking+set}" = set; then
5570 enableval="$enable_locking"
5571 enable_locking="$enableval"
5576 if test "$enable_locking" = yes; then
5578 elif test "$enable_locking" = no; then
5579 cat >> confdefs.h <<\EOF
5580 #define NO_LOCKING 1
5584 echo "error: must be yes or no: --enable-locking=$enable_locking"
5590 ###############################################################################
5592 # The --enable-vt-locking option
5594 ###############################################################################
5596 #ac_vt_lockswitch=no
5597 #AC_ARG_ENABLE(vt-locking,[
5598 # --enable-vt-locking Compile in support for locking Virtual Terminals.
5599 # This is the default if the system supports it, and
5600 # if locking support is included (--enable-locking.)
5601 # --disable-vt-locking Do not allow locking of VTs, even if locking is
5603 # [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
5604 #if test "$enable_vt_locking" = yes; then
5606 # AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
5607 # [AC_TRY_COMPILE([#include <fcntl.h>
5608 # #include <sys/ioctl.h>
5609 # #include <sys/vt.h>],
5610 # [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
5611 # [ac_cv_vt_lockswitch=yes],
5612 # [ac_cv_vt_lockswitch=no])])
5613 # ac_vt_lockswitch=$ac_cv_vt_lockswitch
5615 #elif test "$enable_vt_locking" = no; then
5618 # echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
5622 #if test "$ac_vt_lockswitch" = yes; then
5623 # AC_DEFINE(HAVE_VT_LOCKSWITCH)
5624 # # the VT_LOCKSWITCH ioctl can only be used when running as root.
5625 # # #### but it doesn't work yet, so don't worry about that for now.
5631 ###############################################################################
5635 ###############################################################################
5639 # Solaris systems tend to come with PAM misconfigured.
5640 # Don't build it by default, even if the headers exist.
5644 # Default to building PAM support on all other systems, if it exists.
5645 with_pam_default=yes
5650 with_pam_req=unspecified
5652 # Check whether --with-pam or --without-pam was given.
5653 if test "${with_pam+set}" = set; then
5655 with_pam="$withval"; with_pam_req="$withval"
5657 with_pam=$with_pam_default
5667 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
5668 echo "configure:5680: checking for PAM headers" >&5
5671 X_CFLAGS="-I$d $X_CFLAGS"
5672 echo "$ac_t""$d" 1>&6
5674 echo "$ac_t""not found ($d: no such directory)" 1>&6
5677 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
5678 echo "configure:5690: checking for PAM libs" >&5
5681 X_LIBS="-L$d $X_LIBS"
5682 echo "$ac_t""$d" 1>&6
5684 echo "$ac_t""not found ($d: no such directory)" 1>&6
5687 # replace the directory string with "yes".
5689 with_pam=$with_pam_req
5694 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
5695 echo " If it is a directory, then \`DIR/include' will be added to"
5696 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5702 if test "$enable_locking" = yes -a "$with_pam" = yes; then
5703 echo $ac_n "checking for PAM""... $ac_c" 1>&6
5704 echo "configure:5716: checking for PAM" >&5
5705 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
5706 echo $ac_n "(cached) $ac_c" 1>&6
5709 ac_save_CPPFLAGS="$CPPFLAGS"
5710 if test \! -z "$includedir" ; then
5711 CPPFLAGS="$CPPFLAGS -I$includedir"
5713 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5714 cat > conftest.$ac_ext <<EOF
5715 #line 5727 "configure"
5716 #include "confdefs.h"
5717 #include <security/pam_appl.h>
5722 if { (eval echo configure:5734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5726 echo "configure: failed program was:" >&5
5727 cat conftest.$ac_ext >&5
5732 CPPFLAGS="$ac_save_CPPFLAGS"
5735 echo "$ac_t""$ac_cv_pam" 1>&6
5736 if test "$ac_cv_pam" = yes ; then
5738 cat >> confdefs.h <<\EOF
5742 PASSWD_LIBS="${PASSWD_LIBS} -lpam"
5744 # libpam typically requires dlopen and dlsym. On FreeBSD,
5745 # those are in libc. On Linux and Solaris, they're in libdl.
5746 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5747 echo "configure:5759: checking for dlopen in -ldl" >&5
5748 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5750 echo $ac_n "(cached) $ac_c" 1>&6
5752 ac_save_LIBS="$LIBS"
5754 cat > conftest.$ac_ext <<EOF
5755 #line 5767 "configure"
5756 #include "confdefs.h"
5757 /* Override any gcc2 internal prototype to avoid an error. */
5758 /* We use char because int might match the return type of a gcc2
5759 builtin and then its argument prototype would still apply. */
5766 if { (eval echo configure:5778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5768 eval "ac_cv_lib_$ac_lib_var=yes"
5770 echo "configure: failed program was:" >&5
5771 cat conftest.$ac_ext >&5
5773 eval "ac_cv_lib_$ac_lib_var=no"
5776 LIBS="$ac_save_LIBS"
5779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5780 echo "$ac_t""yes" 1>&6
5781 PASSWD_LIBS="${PASSWD_LIBS} -ldl"
5783 echo "$ac_t""no" 1>&6
5787 echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
5788 echo "configure:5800: checking how to call pam_strerror" >&5
5789 if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
5790 echo $ac_n "(cached) $ac_c" 1>&6
5792 cat > conftest.$ac_ext <<EOF
5793 #line 5805 "configure"
5794 #include "confdefs.h"
5797 #include <security/pam_appl.h>
5799 pam_handle_t *pamh = 0;
5800 char *s = pam_strerror(pamh, PAM_SUCCESS);
5803 if { (eval echo configure:5815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5805 ac_pam_strerror_args=2
5807 echo "configure: failed program was:" >&5
5808 cat conftest.$ac_ext >&5
5810 cat > conftest.$ac_ext <<EOF
5811 #line 5823 "configure"
5812 #include "confdefs.h"
5815 #include <security/pam_appl.h>
5818 pam_strerror(PAM_SUCCESS);
5821 if { (eval echo configure:5833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5823 ac_pam_strerror_args=1
5825 echo "configure: failed program was:" >&5
5826 cat conftest.$ac_ext >&5
5828 ac_pam_strerror_args=0
5833 ac_cv_pam_strerror_args=$ac_pam_strerror_args
5836 ac_pam_strerror_args=$ac_cv_pam_strerror_args
5837 if test "$ac_pam_strerror_args" = 1 ; then
5838 echo "$ac_t""one argument" 1>&6
5839 elif test "$ac_pam_strerror_args" = 2 ; then
5840 cat >> confdefs.h <<\EOF
5841 #define PAM_STRERROR_TWO_ARGS 1
5844 echo "$ac_t""two arguments" 1>&6
5846 echo "$ac_t""unknown" 1>&6
5852 ###############################################################################
5854 # Check for Kerberos.
5856 ###############################################################################
5860 with_kerberos_req=unspecified
5862 # Check whether --with-kerberos or --without-kerberos was given.
5863 if test "${with_kerberos+set}" = set; then
5864 withval="$with_kerberos"
5865 with_kerberos="$withval"; with_kerberos_req="$withval"
5872 case "$with_kerberos" in
5877 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
5878 echo "configure:5890: checking for Kerberos headers" >&5
5879 d=$with_kerberos/include
5881 X_CFLAGS="-I$d $X_CFLAGS"
5882 echo "$ac_t""$d" 1>&6
5884 echo "$ac_t""not found ($d: no such directory)" 1>&6
5887 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
5888 echo "configure:5900: checking for Kerberos libs" >&5
5889 d=$with_kerberos/lib
5891 X_LIBS="-L$d $X_LIBS"
5892 echo "$ac_t""$d" 1>&6
5894 echo "$ac_t""not found ($d: no such directory)" 1>&6
5897 # replace the directory string with "yes".
5898 with_kerberos_req="yes"
5899 with_kerberos=$with_kerberos_req
5904 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
5905 echo " If it is a directory, then \`DIR/include' will be added to"
5906 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5912 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
5913 echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
5914 echo "configure:5926: checking for Kerberos 4" >&5
5915 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
5916 echo $ac_n "(cached) $ac_c" 1>&6
5919 ac_save_CPPFLAGS="$CPPFLAGS"
5920 if test \! -z "$includedir" ; then
5921 CPPFLAGS="$CPPFLAGS -I$includedir"
5923 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5924 cat > conftest.$ac_ext <<EOF
5925 #line 5937 "configure"
5926 #include "confdefs.h"
5932 if { (eval echo configure:5944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5936 echo "configure: failed program was:" >&5
5937 cat conftest.$ac_ext >&5
5942 CPPFLAGS="$ac_save_CPPFLAGS"
5945 echo "$ac_t""$ac_cv_kerberos" 1>&6
5946 echo $ac_n "checking for Kerberos 5""... $ac_c" 1>&6
5947 echo "configure:5959: checking for Kerberos 5" >&5
5948 if eval "test \"`echo '$''{'ac_cv_kerberos5'+set}'`\" = set"; then
5949 echo $ac_n "(cached) $ac_c" 1>&6
5952 ac_save_CPPFLAGS="$CPPFLAGS"
5953 if test \! -z "$includedir" ; then
5954 CPPFLAGS="$CPPFLAGS -I$includedir"
5956 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5957 cat > conftest.$ac_ext <<EOF
5958 #line 5970 "configure"
5959 #include "confdefs.h"
5960 #include <kerberosIV/krb.h>
5965 if { (eval echo configure:5977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5969 echo "configure: failed program was:" >&5
5970 cat conftest.$ac_ext >&5
5975 CPPFLAGS="$ac_save_CPPFLAGS"
5978 echo "$ac_t""$ac_cv_kerberos5" 1>&6
5980 if test "$ac_cv_kerberos" = yes ; then
5982 cat >> confdefs.h <<\EOF
5983 #define HAVE_KERBEROS 1
5988 if test "$ac_cv_kerberos5" = yes ; then
5991 cat >> confdefs.h <<\EOF
5992 #define HAVE_KERBEROS 1
5995 cat >> confdefs.h <<\EOF
5996 #define HAVE_KERBEROS5 1
6001 if test "$have_kerberos5" = yes ; then
6002 # from Matt Knopp <mhat@infocalypse.netlag.com>
6003 # (who got it from amu@mit.edu)
6004 PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
6005 elif test "$have_kerberos" = yes ; then
6006 # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
6007 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
6010 if test "$have_kerberos" = yes ; then
6011 echo $ac_n "checking for res_search""... $ac_c" 1>&6
6012 echo "configure:6024: checking for res_search" >&5
6013 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
6014 echo $ac_n "(cached) $ac_c" 1>&6
6016 cat > conftest.$ac_ext <<EOF
6017 #line 6029 "configure"
6018 #include "confdefs.h"
6019 /* System header to define __stub macros and hopefully few prototypes,
6020 which can conflict with char res_search(); below. */
6022 /* Override any gcc2 internal prototype to avoid an error. */
6023 /* We use char because int might match the return type of a gcc2
6024 builtin and then its argument prototype would still apply. */
6029 /* The GNU C library defines this for functions which it implements
6030 to always fail with ENOSYS. Some functions are actually named
6031 something starting with __ and the normal name is an alias. */
6032 #if defined (__stub_res_search) || defined (__stub___res_search)
6040 if { (eval echo configure:6052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6042 eval "ac_cv_func_res_search=yes"
6044 echo "configure: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6047 eval "ac_cv_func_res_search=no"
6052 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
6053 echo "$ac_t""yes" 1>&6
6056 echo "$ac_t""no" 1>&6
6057 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
6058 echo "configure:6070: checking for res_search in -lresolv" >&5
6059 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
6060 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6061 echo $ac_n "(cached) $ac_c" 1>&6
6063 ac_save_LIBS="$LIBS"
6064 LIBS="-lresolv $LIBS"
6065 cat > conftest.$ac_ext <<EOF
6066 #line 6078 "configure"
6067 #include "confdefs.h"
6068 /* Override any gcc2 internal prototype to avoid an error. */
6069 /* We use char because int might match the return type of a gcc2
6070 builtin and then its argument prototype would still apply. */
6077 if { (eval echo configure:6089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6079 eval "ac_cv_lib_$ac_lib_var=yes"
6081 echo "configure: failed program was:" >&5
6082 cat conftest.$ac_ext >&5
6084 eval "ac_cv_lib_$ac_lib_var=no"
6087 LIBS="$ac_save_LIBS"
6090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6091 echo "$ac_t""yes" 1>&6
6092 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
6094 echo "$ac_t""no" 1>&6
6095 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
6105 ###############################################################################
6107 # Check for the nine billion variants of shadow passwords...
6109 ###############################################################################
6114 with_shadow_req=unspecified
6116 # Check whether --with-shadow or --without-shadow was given.
6117 if test "${with_shadow+set}" = set; then
6118 withval="$with_shadow"
6119 with_shadow="$withval"; with_shadow_req="$withval"
6126 case "$with_shadow" in
6131 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
6132 echo "configure:6144: checking for shadow password headers" >&5
6133 d=$with_shadow/include
6135 X_CFLAGS="-I$d $X_CFLAGS"
6136 echo "$ac_t""$d" 1>&6
6138 echo "$ac_t""not found ($d: no such directory)" 1>&6
6141 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
6142 echo "configure:6154: checking for shadow password libs" >&5
6145 X_LIBS="-L$d $X_LIBS"
6146 echo "$ac_t""$d" 1>&6
6148 echo "$ac_t""not found ($d: no such directory)" 1>&6
6151 # replace the directory string with "yes".
6152 with_shadow_req="yes"
6153 with_shadow=$with_shadow_req
6158 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
6159 echo " If it is a directory, then \`DIR/include' will be added to"
6160 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6166 if test "$enable_locking" = no ; then
6172 ###############################################################################
6174 # Check for Sun "adjunct" passwords.
6176 ###############################################################################
6178 if test "$with_shadow" = yes ; then
6179 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
6180 echo "configure:6192: checking for Sun-style shadow passwords" >&5
6181 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
6182 echo $ac_n "(cached) $ac_c" 1>&6
6185 ac_save_CPPFLAGS="$CPPFLAGS"
6186 if test \! -z "$includedir" ; then
6187 CPPFLAGS="$CPPFLAGS -I$includedir"
6189 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6190 cat > conftest.$ac_ext <<EOF
6191 #line 6203 "configure"
6192 #include "confdefs.h"
6195 #include <sys/types.h>
6196 #include <sys/label.h>
6197 #include <sys/audit.h>
6200 struct passwd_adjunct *p = getpwanam("nobody");
6201 const char *pw = p->pwa_passwd;
6204 if { (eval echo configure:6216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6206 ac_cv_sun_adjunct=yes
6208 echo "configure: failed program was:" >&5
6209 cat conftest.$ac_ext >&5
6211 ac_cv_sun_adjunct=no
6214 CPPFLAGS="$ac_save_CPPFLAGS"
6217 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
6218 if test "$ac_cv_sun_adjunct" = yes; then
6219 have_shadow_adjunct=yes
6226 ###############################################################################
6228 # Check for DEC and SCO so-called "enhanced" security.
6230 ###############################################################################
6232 if test "$with_shadow" = yes ; then
6233 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
6234 echo "configure:6246: checking for DEC-style shadow passwords" >&5
6235 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
6236 echo $ac_n "(cached) $ac_c" 1>&6
6239 ac_save_CPPFLAGS="$CPPFLAGS"
6240 if test \! -z "$includedir" ; then
6241 CPPFLAGS="$CPPFLAGS -I$includedir"
6243 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6244 cat > conftest.$ac_ext <<EOF
6245 #line 6257 "configure"
6246 #include "confdefs.h"
6249 #include <sys/types.h>
6251 #include <sys/security.h>
6254 struct pr_passwd *p;
6256 set_auth_parameters(0, 0);
6257 check_auth_parameters();
6258 p = getprpwnam("nobody");
6259 pw = p->ufld.fd_encrypt;
6262 if { (eval echo configure:6274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6264 ac_cv_enhanced_passwd=yes
6266 echo "configure: failed program was:" >&5
6267 cat conftest.$ac_ext >&5
6269 ac_cv_enhanced_passwd=no
6272 CPPFLAGS="$ac_save_CPPFLAGS"
6275 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
6276 if test $ac_cv_enhanced_passwd = yes; then
6277 have_shadow_enhanced=yes
6281 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
6282 # (I'm told it needs -lcurses too, but I don't understand why.)
6283 # But on DEC, it's in -lsecurity.
6285 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
6286 echo "configure:6298: checking for getprpwnam in -lprot" >&5
6287 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
6288 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6289 echo $ac_n "(cached) $ac_c" 1>&6
6291 ac_save_LIBS="$LIBS"
6292 LIBS="-lprot -lx $LIBS"
6293 cat > conftest.$ac_ext <<EOF
6294 #line 6306 "configure"
6295 #include "confdefs.h"
6296 /* Override any gcc2 internal prototype to avoid an error. */
6297 /* We use char because int might match the return type of a gcc2
6298 builtin and then its argument prototype would still apply. */
6305 if { (eval echo configure:6317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6307 eval "ac_cv_lib_$ac_lib_var=yes"
6309 echo "configure: failed program was:" >&5
6310 cat conftest.$ac_ext >&5
6312 eval "ac_cv_lib_$ac_lib_var=no"
6315 LIBS="$ac_save_LIBS"
6318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6319 echo "$ac_t""yes" 1>&6
6320 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
6322 echo "$ac_t""no" 1>&6
6323 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
6324 echo "configure:6336: checking for getprpwnam in -lsecurity" >&5
6325 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
6326 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6327 echo $ac_n "(cached) $ac_c" 1>&6
6329 ac_save_LIBS="$LIBS"
6330 LIBS="-lsecurity $LIBS"
6331 cat > conftest.$ac_ext <<EOF
6332 #line 6344 "configure"
6333 #include "confdefs.h"
6334 /* Override any gcc2 internal prototype to avoid an error. */
6335 /* We use char because int might match the return type of a gcc2
6336 builtin and then its argument prototype would still apply. */
6343 if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6345 eval "ac_cv_lib_$ac_lib_var=yes"
6347 echo "configure: failed program was:" >&5
6348 cat conftest.$ac_ext >&5
6350 eval "ac_cv_lib_$ac_lib_var=no"
6353 LIBS="$ac_save_LIBS"
6356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6357 echo "$ac_t""yes" 1>&6
6358 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
6360 echo "$ac_t""no" 1>&6
6368 ###############################################################################
6370 # Check for HP's entry in the "Not Invented Here" Sweepstakes.
6372 ###############################################################################
6374 if test "$with_shadow" = yes ; then
6375 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
6376 echo "configure:6388: checking for HP-style shadow passwords" >&5
6377 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
6378 echo $ac_n "(cached) $ac_c" 1>&6
6381 ac_save_CPPFLAGS="$CPPFLAGS"
6382 if test \! -z "$includedir" ; then
6383 CPPFLAGS="$CPPFLAGS -I$includedir"
6385 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6386 cat > conftest.$ac_ext <<EOF
6387 #line 6399 "configure"
6388 #include "confdefs.h"
6391 #include <sys/types.h>
6393 #include <hpsecurity.h>
6396 struct s_passwd *p = getspwnam("nobody");
6397 const char *pw = p->pw_passwd;
6400 if { (eval echo configure:6412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6402 ac_cv_hpux_passwd=yes
6404 echo "configure: failed program was:" >&5
6405 cat conftest.$ac_ext >&5
6407 ac_cv_hpux_passwd=no
6410 CPPFLAGS="$ac_save_CPPFLAGS"
6413 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
6414 if test "$ac_cv_hpux_passwd" = yes; then
6415 have_shadow_hpux=yes
6419 # on HPUX, bigcrypt is in -lsec
6420 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
6421 echo "configure:6433: checking for bigcrypt in -lsec" >&5
6422 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
6423 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6424 echo $ac_n "(cached) $ac_c" 1>&6
6426 ac_save_LIBS="$LIBS"
6428 cat > conftest.$ac_ext <<EOF
6429 #line 6441 "configure"
6430 #include "confdefs.h"
6431 /* Override any gcc2 internal prototype to avoid an error. */
6432 /* We use char because int might match the return type of a gcc2
6433 builtin and then its argument prototype would still apply. */
6440 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6442 eval "ac_cv_lib_$ac_lib_var=yes"
6444 echo "configure: failed program was:" >&5
6445 cat conftest.$ac_ext >&5
6447 eval "ac_cv_lib_$ac_lib_var=no"
6450 LIBS="$ac_save_LIBS"
6453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6454 echo "$ac_t""yes" 1>&6
6455 PASSWD_LIBS="$PASSWD_LIBS -lsec"
6457 echo "$ac_t""no" 1>&6
6464 ###############################################################################
6466 # Check for FreeBSD-style shadow passwords.
6468 # On FreeBSD, getpwnam() and friends work just like on non-shadow-
6469 # password systems -- except you only get stuff in the pw_passwd field
6470 # if the running program is setuid. So, guess that we've got this
6471 # lossage to contend with if /etc/master.passwd exists, and default to
6472 # a setuid installation.
6474 ###############################################################################
6476 if test "$with_shadow" = yes ; then
6477 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
6478 echo "configure:6490: checking for FreeBSD-style shadow passwords" >&5
6479 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
6480 echo $ac_n "(cached) $ac_c" 1>&6
6482 if test -f /etc/master.passwd ; then
6483 ac_cv_master_passwd=yes
6485 ac_cv_master_passwd=no
6489 echo "$ac_t""$ac_cv_master_passwd" 1>&6
6490 if test "$ac_cv_master_passwd" = yes; then
6496 ###############################################################################
6498 # Check for traditional (ha!) shadow passwords.
6500 ###############################################################################
6502 if test "$with_shadow" = yes ; then
6503 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
6504 echo "configure:6516: checking for generic shadow passwords" >&5
6505 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
6506 echo $ac_n "(cached) $ac_c" 1>&6
6509 ac_save_CPPFLAGS="$CPPFLAGS"
6510 if test \! -z "$includedir" ; then
6511 CPPFLAGS="$CPPFLAGS -I$includedir"
6513 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6514 cat > conftest.$ac_ext <<EOF
6515 #line 6527 "configure"
6516 #include "confdefs.h"
6519 #include <sys/types.h>
6523 struct spwd *p = getspnam("nobody");
6524 const char *pw = p->sp_pwdp;
6527 if { (eval echo configure:6539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6531 echo "configure: failed program was:" >&5
6532 cat conftest.$ac_ext >&5
6537 CPPFLAGS="$ac_save_CPPFLAGS"
6540 echo "$ac_t""$ac_cv_shadow" 1>&6
6541 if test "$ac_cv_shadow" = yes; then
6545 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
6547 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
6548 echo "configure:6560: checking for getspnam in -lc" >&5
6549 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
6550 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6551 echo $ac_n "(cached) $ac_c" 1>&6
6553 ac_save_LIBS="$LIBS"
6555 cat > conftest.$ac_ext <<EOF
6556 #line 6568 "configure"
6557 #include "confdefs.h"
6558 /* Override any gcc2 internal prototype to avoid an error. */
6559 /* We use char because int might match the return type of a gcc2
6560 builtin and then its argument prototype would still apply. */
6567 if { (eval echo configure:6579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6569 eval "ac_cv_lib_$ac_lib_var=yes"
6571 echo "configure: failed program was:" >&5
6572 cat conftest.$ac_ext >&5
6574 eval "ac_cv_lib_$ac_lib_var=no"
6577 LIBS="$ac_save_LIBS"
6580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6581 echo "$ac_t""yes" 1>&6
6584 echo "$ac_t""no" 1>&6
6587 if test "$have_getspnam" = no ; then
6588 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
6589 echo "configure:6601: checking for getspnam in -lgen" >&5
6590 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
6591 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6592 echo $ac_n "(cached) $ac_c" 1>&6
6594 ac_save_LIBS="$LIBS"
6596 cat > conftest.$ac_ext <<EOF
6597 #line 6609 "configure"
6598 #include "confdefs.h"
6599 /* Override any gcc2 internal prototype to avoid an error. */
6600 /* We use char because int might match the return type of a gcc2
6601 builtin and then its argument prototype would still apply. */
6608 if { (eval echo configure:6620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6610 eval "ac_cv_lib_$ac_lib_var=yes"
6612 echo "configure: failed program was:" >&5
6613 cat conftest.$ac_ext >&5
6615 eval "ac_cv_lib_$ac_lib_var=no"
6618 LIBS="$ac_save_LIBS"
6621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6622 echo "$ac_t""yes" 1>&6
6623 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
6625 echo "$ac_t""no" 1>&6
6633 ###############################################################################
6635 # Check for other libraries needed for non-shadow passwords.
6637 ###############################################################################
6639 if test "$enable_locking" = yes ; then
6641 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
6643 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
6644 echo "configure:6656: checking for crypt in -lc" >&5
6645 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
6646 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6647 echo $ac_n "(cached) $ac_c" 1>&6
6649 ac_save_LIBS="$LIBS"
6651 cat > conftest.$ac_ext <<EOF
6652 #line 6664 "configure"
6653 #include "confdefs.h"
6654 /* Override any gcc2 internal prototype to avoid an error. */
6655 /* We use char because int might match the return type of a gcc2
6656 builtin and then its argument prototype would still apply. */
6663 if { (eval echo configure:6675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6665 eval "ac_cv_lib_$ac_lib_var=yes"
6667 echo "configure: failed program was:" >&5
6668 cat conftest.$ac_ext >&5
6670 eval "ac_cv_lib_$ac_lib_var=no"
6673 LIBS="$ac_save_LIBS"
6676 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6677 echo "$ac_t""yes" 1>&6
6680 echo "$ac_t""no" 1>&6
6683 if test "$have_crypt" = no ; then
6684 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6685 echo "configure:6697: checking for crypt in -lcrypt" >&5
6686 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6687 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6688 echo $ac_n "(cached) $ac_c" 1>&6
6690 ac_save_LIBS="$LIBS"
6691 LIBS="-lcrypt $LIBS"
6692 cat > conftest.$ac_ext <<EOF
6693 #line 6705 "configure"
6694 #include "confdefs.h"
6695 /* Override any gcc2 internal prototype to avoid an error. */
6696 /* We use char because int might match the return type of a gcc2
6697 builtin and then its argument prototype would still apply. */
6704 if { (eval echo configure:6716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6706 eval "ac_cv_lib_$ac_lib_var=yes"
6708 echo "configure: failed program was:" >&5
6709 cat conftest.$ac_ext >&5
6711 eval "ac_cv_lib_$ac_lib_var=no"
6714 LIBS="$ac_save_LIBS"
6717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6718 echo "$ac_t""yes" 1>&6
6719 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
6721 echo "$ac_t""no" 1>&6
6728 # Most of the above shadow mechanisms will have set need_setuid to yes,
6729 # if they were found. But, on some systems, we need setuid even when
6730 # using plain old vanilla passwords.
6732 if test "$enable_locking" = yes ; then
6734 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
6741 if test "$have_shadow_adjunct" = yes ; then
6742 cat >> confdefs.h <<\EOF
6743 #define HAVE_ADJUNCT_PASSWD 1
6746 elif test "$have_shadow_enhanced" = yes ; then
6747 cat >> confdefs.h <<\EOF
6748 #define HAVE_ENHANCED_PASSWD 1
6751 elif test "$have_shadow_hpux" = yes ; then
6752 cat >> confdefs.h <<\EOF
6753 #define HAVE_HPUX_PASSWD 1
6756 elif test "$have_shadow" = yes ; then
6757 cat >> confdefs.h <<\EOF
6758 #define HAVE_SHADOW_PASSWD 1
6764 ###############################################################################
6768 ###############################################################################
6771 with_motif_req=unspecified
6772 # Check whether --with-motif or --without-motif was given.
6773 if test "${with_motif+set}" = set; then
6774 withval="$with_motif"
6775 with_motif="$withval"; with_motif_req="$withval"
6782 case "$with_motif" in
6787 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
6788 echo "configure:6800: checking for Motif headers" >&5
6789 d=$with_motif/include
6791 X_CFLAGS="-I$d $X_CFLAGS"
6792 echo "$ac_t""$d" 1>&6
6794 echo "$ac_t""not found ($d: no such directory)" 1>&6
6797 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
6798 echo "configure:6810: checking for Motif libs" >&5
6801 X_LIBS="-L$d $X_LIBS"
6802 echo "$ac_t""$d" 1>&6
6804 echo "$ac_t""not found ($d: no such directory)" 1>&6
6807 # replace the directory string with "yes".
6808 with_motif_req="yes"
6809 with_motif=$with_motif_req
6814 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
6815 echo " If it is a directory, then \`DIR/include' will be added to"
6816 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6822 if test "$with_motif" != yes -a "$with_motif" != no ; then
6823 echo "error: must be yes or no: --with-motif=$with_motif"
6827 if test "$with_motif" = yes; then
6830 ac_save_CPPFLAGS="$CPPFLAGS"
6831 if test \! -z "$includedir" ; then
6832 CPPFLAGS="$CPPFLAGS -I$includedir"
6834 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6835 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6836 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6837 echo "configure:6849: checking for Xm/Xm.h" >&5
6838 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6839 echo $ac_n "(cached) $ac_c" 1>&6
6841 cat > conftest.$ac_ext <<EOF
6842 #line 6854 "configure"
6843 #include "confdefs.h"
6846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6847 { (eval echo configure:6859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6849 if test -z "$ac_err"; then
6851 eval "ac_cv_header_$ac_safe=yes"
6854 echo "configure: failed program was:" >&5
6855 cat conftest.$ac_ext >&5
6857 eval "ac_cv_header_$ac_safe=no"
6861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6862 echo "$ac_t""yes" 1>&6
6864 cat >> confdefs.h <<\EOF
6865 #define HAVE_MOTIF 1
6868 MOTIF_LIBS="$MOTIF_LIBS -lXm"
6870 echo "$ac_t""no" 1>&6
6873 CPPFLAGS="$ac_save_CPPFLAGS"
6877 if test "$have_motif" = yes; then
6879 ac_save_CPPFLAGS="$CPPFLAGS"
6880 if test \! -z "$includedir" ; then
6881 CPPFLAGS="$CPPFLAGS -I$includedir"
6883 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6884 ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
6885 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
6886 echo "configure:6898: checking for Xm/ComboBox.h" >&5
6887 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6888 echo $ac_n "(cached) $ac_c" 1>&6
6890 cat > conftest.$ac_ext <<EOF
6891 #line 6903 "configure"
6892 #include "confdefs.h"
6893 #include <Xm/ComboBox.h>
6895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6896 { (eval echo configure:6908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6898 if test -z "$ac_err"; then
6900 eval "ac_cv_header_$ac_safe=yes"
6903 echo "configure: failed program was:" >&5
6904 cat conftest.$ac_ext >&5
6906 eval "ac_cv_header_$ac_safe=no"
6910 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6911 echo "$ac_t""yes" 1>&6
6912 cat >> confdefs.h <<\EOF
6913 #define HAVE_XMCOMBOBOX 1
6917 echo "$ac_t""no" 1>&6
6920 CPPFLAGS="$ac_save_CPPFLAGS"
6924 ###############################################################################
6926 # Check for -lgtk (and Gnome stuff)
6928 ###############################################################################
6931 with_gtk_req=unspecified
6932 # Check whether --with-gtk or --without-gtk was given.
6933 if test "${with_gtk+set}" = set; then
6935 with_gtk="$withval"; with_gtk_req="$withval"
6941 # if --with-gtk=/directory/ was specified, remember that directory so that
6942 # we can also look for the `gtk-config' program in that directory.
6958 echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
6959 echo "configure:6971: checking for Gtk headers" >&5
6962 X_CFLAGS="-I$d $X_CFLAGS"
6963 echo "$ac_t""$d" 1>&6
6965 echo "$ac_t""not found ($d: no such directory)" 1>&6
6968 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
6969 echo "configure:6981: checking for Gtk libs" >&5
6972 X_LIBS="-L$d $X_LIBS"
6973 echo "$ac_t""$d" 1>&6
6975 echo "$ac_t""not found ($d: no such directory)" 1>&6
6978 # replace the directory string with "yes".
6980 with_gtk=$with_gtk_req
6985 echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
6986 echo " If it is a directory, then \`DIR/include' will be added to"
6987 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6993 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
6994 echo "error: must be yes or no: --with-gtk=$with_gtk"
6999 with_gnome_req=unspecified
7000 # Check whether --with-gnome or --without-gnome was given.
7001 if test "${with_gnome+set}" = set; then
7002 withval="$with_gnome"
7003 with_gnome="$withval"; with_gnome_req="$withval"
7009 # if --with-gnome=/directory/ was specified, remember that directory so that
7010 # we can also look for the `gnome-config' program in that directory.
7011 case "$with_gnome" in
7013 gnome_dir="$with_gnome"
7021 case "$with_gnome" in
7026 echo $ac_n "checking for Gnome headers""... $ac_c" 1>&6
7027 echo "configure:7039: checking for Gnome headers" >&5
7028 d=$with_gnome/include
7030 X_CFLAGS="-I$d $X_CFLAGS"
7031 echo "$ac_t""$d" 1>&6
7033 echo "$ac_t""not found ($d: no such directory)" 1>&6
7036 echo $ac_n "checking for Gnome libs""... $ac_c" 1>&6
7037 echo "configure:7049: checking for Gnome libs" >&5
7040 X_LIBS="-L$d $X_LIBS"
7041 echo "$ac_t""$d" 1>&6
7043 echo "$ac_t""not found ($d: no such directory)" 1>&6
7046 # replace the directory string with "yes".
7047 with_gnome_req="yes"
7048 with_gnome=$with_gnome_req
7053 echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
7054 echo " If it is a directory, then \`DIR/include' will be added to"
7055 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7061 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
7062 echo "error: must be yes or no: --with-gnome=$with_gnome"
7068 if test "$with_gtk" = yes; then
7071 # if the user specified --with-gtk=/foo/ then look in /foo/bin/
7072 # for glib-config and gtk-config.
7076 if test ! -z "$gtk_dir"; then
7077 # canonicalize slashes.
7078 gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
7079 gtk_path="$gtk_dir:$gtk_path"
7082 if test ! -z "gnome_dir"; then
7083 # canonicalize slashes.
7084 gnome_dir=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
7085 gtk_path="$gnome_dir:$gtk_path"
7088 for ac_prog in glib12-config glib-config
7090 # Extract the first word of "$ac_prog", so it can be a program name with args.
7091 set dummy $ac_prog; ac_word=$2
7092 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7093 echo "configure:7105: checking for $ac_word" >&5
7094 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
7095 echo $ac_n "(cached) $ac_c" 1>&6
7097 case "$glib_config" in
7099 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
7102 ac_cv_path_glib_config="$glib_config" # Let the user override the test with a dos path.
7105 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7106 ac_dummy="$gtk_path"
7107 for ac_dir in $ac_dummy; do
7108 test -z "$ac_dir" && ac_dir=.
7109 if test -f $ac_dir/$ac_word; then
7110 ac_cv_path_glib_config="$ac_dir/$ac_word"
7118 glib_config="$ac_cv_path_glib_config"
7119 if test -n "$glib_config"; then
7120 echo "$ac_t""$glib_config" 1>&6
7122 echo "$ac_t""no" 1>&6
7125 test -n "$glib_config" && break
7128 for ac_prog in gtk12-config gtk-config
7130 # Extract the first word of "$ac_prog", so it can be a program name with args.
7131 set dummy $ac_prog; ac_word=$2
7132 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7133 echo "configure:7145: checking for $ac_word" >&5
7134 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
7135 echo $ac_n "(cached) $ac_c" 1>&6
7137 case "$gtk_config" in
7139 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
7142 ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a dos path.
7145 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7146 ac_dummy="$gtk_path"
7147 for ac_dir in $ac_dummy; do
7148 test -z "$ac_dir" && ac_dir=.
7149 if test -f $ac_dir/$ac_word; then
7150 ac_cv_path_gtk_config="$ac_dir/$ac_word"
7158 gtk_config="$ac_cv_path_gtk_config"
7159 if test -n "$gtk_config"; then
7160 echo "$ac_t""$gtk_config" 1>&6
7162 echo "$ac_t""no" 1>&6
7165 test -n "$gtk_config" && break
7169 if test "$with_gnome" = yes; then
7170 for ac_prog in gnome-config
7172 # Extract the first word of "$ac_prog", so it can be a program name with args.
7173 set dummy $ac_prog; ac_word=$2
7174 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7175 echo "configure:7187: checking for $ac_word" >&5
7176 if eval "test \"`echo '$''{'ac_cv_path_gnome_config'+set}'`\" = set"; then
7177 echo $ac_n "(cached) $ac_c" 1>&6
7179 case "$gnome_config" in
7181 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
7184 ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a dos path.
7187 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7188 ac_dummy="$gtk_path"
7189 for ac_dir in $ac_dummy; do
7190 test -z "$ac_dir" && ac_dir=.
7191 if test -f $ac_dir/$ac_word; then
7192 ac_cv_path_gnome_config="$ac_dir/$ac_word"
7200 gnome_config="$ac_cv_path_gnome_config"
7201 if test -n "$gnome_config"; then
7202 echo "$ac_t""$gnome_config" 1>&6
7204 echo "$ac_t""no" 1>&6
7207 test -n "$gnome_config" && break
7212 if test -n "$glib_config" -a -n "gtk_config" ; then
7214 if test "$with_gnome" = yes -a -n "$gnome_config" ; then
7219 if test "$have_gtk" = yes; then
7220 echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
7221 echo "configure:7233: checking Gtk version number" >&5
7222 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
7223 echo $ac_n "(cached) $ac_c" 1>&6
7225 ac_cv_gtk_version_string=`$gtk_config --version`
7228 echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
7229 ac_gtk_version_string=$ac_cv_gtk_version_string
7232 maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
7233 min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
7235 ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
7236 if test -z "$ac_gtk_version"; then
7237 ac_gtk_version=unknown
7238 ac_gtk_version_string=unknown
7240 if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
7248 if test "$have_gtk" = yes; then
7249 echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
7250 echo "configure:7262: checking for Gtk includes" >&5
7251 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
7252 echo $ac_n "(cached) $ac_c" 1>&6
7254 ac_cv_gtk_config_cflags=`$gtk_config --cflags`
7257 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
7258 echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
7259 echo "configure:7271: checking for Gtk libs" >&5
7260 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
7261 echo $ac_n "(cached) $ac_c" 1>&6
7263 ac_cv_gtk_config_libs=`$gtk_config --libs`
7266 echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
7268 ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
7269 ac_gtk_config_libs=$ac_cv_gtk_config_libs
7271 # Check for Gnome Capplet support.
7273 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
7274 gnome_config_libs="gtk capplet gnomeui xml gdk_pixbuf"
7275 echo $ac_n "checking for Gnome capplet includes""... $ac_c" 1>&6
7276 echo "configure:7288: checking for Gnome capplet includes" >&5
7277 if eval "test \"`echo '$''{'ac_cv_gnome_config_cflags'+set}'`\" = set"; then
7278 echo $ac_n "(cached) $ac_c" 1>&6
7280 if ( $gnome_config --cflags $gnome_config_libs 2>&1 >/dev/null | \
7281 grep Unknown >/dev/null ) ; then
7282 ac_cv_gnome_config_cflags=''
7284 ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
7288 ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
7289 if test "$ac_gnome_config_cflags" = "" ; then
7291 echo "$ac_t""no" 1>&6
7293 echo "$ac_t""$ac_gnome_config_cflags" 1>&6
7297 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
7298 echo $ac_n "checking for Gnome capplet libs""... $ac_c" 1>&6
7299 echo "configure:7311: checking for Gnome capplet libs" >&5
7300 if eval "test \"`echo '$''{'ac_cv_gnome_config_libs'+set}'`\" = set"; then
7301 echo $ac_n "(cached) $ac_c" 1>&6
7303 if ( $gnome_config --libs $gnome_config_libs 2>&1 >/dev/null |
7304 grep Unknown >/dev/null ) ; then
7305 ac_cv_gnome_config_libs=''
7307 ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
7311 ac_gnome_config_libs=$ac_cv_gnome_config_libs
7312 if test "$ac_gnome_config_libs" = "" ; then
7314 echo "$ac_t""no" 1>&6
7316 echo "$ac_t""$ac_gnome_config_libs" 1>&6
7321 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
7322 GNOME_DATADIR=`$gnome_config --datadir`
7326 # If we have Gnome, then override the gtk-config values with
7327 # the gnome-config values.
7329 if test "$have_gnome" = yes -a "$have_gtk" = yes; then
7330 ac_gtk_config_cflags=$ac_gnome_config_cflags
7331 ac_gtk_config_libs=$ac_gnome_config_libs
7332 cat >> confdefs.h <<\EOF
7333 #define HAVE_CRAPPLET 1
7337 # check for this function that was not in libcapplet 1.2.
7339 ac_save_CPPFLAGS="$CPPFLAGS"
7340 ac_save_LDFLAGS="$LDFLAGS"
7341 # ac_save_LIBS="$LIBS"
7343 if test \! -z "$includedir" ; then
7344 CPPFLAGS="$CPPFLAGS -I$includedir"
7346 # note: $X_CFLAGS includes $x_includes
7347 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7349 if test \! -z "$libdir" ; then
7350 LDFLAGS="$LDFLAGS -L$libdir"
7352 # note: $X_LIBS includes $x_libraries
7353 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7355 echo $ac_n "checking for capplet_widget_changes_are_immediate in -lcapplet""... $ac_c" 1>&6
7356 echo "configure:7368: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
7357 ac_lib_var=`echo capplet'_'capplet_widget_changes_are_immediate | sed 'y%./+-%__p_%'`
7358 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7359 echo $ac_n "(cached) $ac_c" 1>&6
7361 ac_save_LIBS="$LIBS"
7362 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
7363 cat > conftest.$ac_ext <<EOF
7364 #line 7376 "configure"
7365 #include "confdefs.h"
7366 /* Override any gcc2 internal prototype to avoid an error. */
7367 /* We use char because int might match the return type of a gcc2
7368 builtin and then its argument prototype would still apply. */
7369 char capplet_widget_changes_are_immediate();
7372 capplet_widget_changes_are_immediate()
7375 if { (eval echo configure:7387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7377 eval "ac_cv_lib_$ac_lib_var=yes"
7379 echo "configure: failed program was:" >&5
7380 cat conftest.$ac_ext >&5
7382 eval "ac_cv_lib_$ac_lib_var=no"
7385 LIBS="$ac_save_LIBS"
7388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7389 echo "$ac_t""yes" 1>&6
7390 cat >> confdefs.h <<\EOF
7391 #define HAVE_CRAPPLET_IMMEDIATE 1
7395 echo "$ac_t""no" 1>&6
7399 CPPFLAGS="$ac_save_CPPFLAGS"
7400 LDFLAGS="$ac_save_LDFLAGS"
7401 # LIBS="$ac_save_LIBS"
7406 if test "$have_gtk" = yes; then
7407 INCLUDES="$INCLUDES $ac_gtk_config_cflags"
7408 GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
7409 cat >> confdefs.h <<\EOF
7418 # Check for the Gnome Help Browser.
7420 if test "$have_gnome" = yes; then
7421 # Extract the first word of "gnome-help-browser", so it can be a program name with args.
7422 set dummy gnome-help-browser; ac_word=$2
7423 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7424 echo "configure:7436: checking for $ac_word" >&5
7425 if eval "test \"`echo '$''{'ac_cv_prog_have_gnome_help'+set}'`\" = set"; then
7426 echo $ac_n "(cached) $ac_c" 1>&6
7428 if test -n "$have_gnome_help"; then
7429 ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
7431 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7433 for ac_dir in $ac_dummy; do
7434 test -z "$ac_dir" && ac_dir=.
7435 if test -f $ac_dir/$ac_word; then
7436 ac_cv_prog_have_gnome_help="yes"
7441 test -z "$ac_cv_prog_have_gnome_help" && ac_cv_prog_have_gnome_help="no"
7444 have_gnome_help="$ac_cv_prog_have_gnome_help"
7445 if test -n "$have_gnome_help"; then
7446 echo "$ac_t""$have_gnome_help" 1>&6
7448 echo "$ac_t""no" 1>&6
7456 ###############################################################################
7458 # Check for -lxml (if we have Gtk)
7460 ###############################################################################
7463 with_xml_req=unspecified
7465 # Check whether --with-xml or --without-xml was given.
7466 if test "${with_xml+set}" = set; then
7468 with_xml="$withval"; with_xml_req="$withval"
7480 echo $ac_n "checking for XML headers""... $ac_c" 1>&6
7481 echo "configure:7493: checking for XML headers" >&5
7484 X_CFLAGS="-I$d $X_CFLAGS"
7485 echo "$ac_t""$d" 1>&6
7487 echo "$ac_t""not found ($d: no such directory)" 1>&6
7490 echo $ac_n "checking for XML libs""... $ac_c" 1>&6
7491 echo "configure:7503: checking for XML libs" >&5
7494 X_LIBS="-L$d $X_LIBS"
7495 echo "$ac_t""$d" 1>&6
7497 echo "$ac_t""not found ($d: no such directory)" 1>&6
7500 # replace the directory string with "yes".
7502 with_xml=$with_xml_req
7507 echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
7508 echo " If it is a directory, then \`DIR/include' will be added to"
7509 echo " the -I list, and \`DIR/lib' will be added to the -L list."
7515 if test "$with_xml" != yes -a "$with_xml" != no ; then
7516 echo "error: must be yes or no: --with-xml=$with_xml"
7520 if test "$have_gtk" != yes; then
7521 # don't bother if no GTK
7525 if test "$with_xml" = yes; then
7528 # the XML stuff is likely to be in GTK paths.
7529 ac_save_X_CFLAGS="$X_CFLAGS"
7530 ac_save_X_LIBS="$X_LIBS"
7531 X_CFLAGS="$X_CFLAGS $ac_gtk_config_cflags"
7532 X_LIBS="$X_LIBS $ac_gtk_config_libs"
7535 ac_save_CPPFLAGS="$CPPFLAGS"
7536 if test \! -z "$includedir" ; then
7537 CPPFLAGS="$CPPFLAGS -I$includedir"
7539 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7540 ac_safe=`echo "xmlIO.h" | sed 'y%./+-%__p_%'`
7541 echo $ac_n "checking for xmlIO.h""... $ac_c" 1>&6
7542 echo "configure:7554: checking for xmlIO.h" >&5
7543 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7544 echo $ac_n "(cached) $ac_c" 1>&6
7546 cat > conftest.$ac_ext <<EOF
7547 #line 7559 "configure"
7548 #include "confdefs.h"
7551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7552 { (eval echo configure:7564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7554 if test -z "$ac_err"; then
7556 eval "ac_cv_header_$ac_safe=yes"
7559 echo "configure: failed program was:" >&5
7560 cat conftest.$ac_ext >&5
7562 eval "ac_cv_header_$ac_safe=no"
7566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7567 echo "$ac_t""yes" 1>&6
7570 echo "$ac_t""no" 1>&6
7573 CPPFLAGS="$ac_save_CPPFLAGS"
7575 if test "$have_xml" = yes; then
7576 # we have the header, now check for the library
7580 ac_save_CPPFLAGS="$CPPFLAGS"
7581 ac_save_LDFLAGS="$LDFLAGS"
7582 # ac_save_LIBS="$LIBS"
7584 if test \! -z "$includedir" ; then
7585 CPPFLAGS="$CPPFLAGS -I$includedir"
7587 # note: $X_CFLAGS includes $x_includes
7588 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7590 if test \! -z "$libdir" ; then
7591 LDFLAGS="$LDFLAGS -L$libdir"
7593 # note: $X_LIBS includes $x_libraries
7594 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7596 echo $ac_n "checking for xmlParseChunk in -lxml""... $ac_c" 1>&6
7597 echo "configure:7609: checking for xmlParseChunk in -lxml" >&5
7598 ac_lib_var=`echo xml'_'xmlParseChunk | sed 'y%./+-%__p_%'`
7599 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7600 echo $ac_n "(cached) $ac_c" 1>&6
7602 ac_save_LIBS="$LIBS"
7604 cat > conftest.$ac_ext <<EOF
7605 #line 7617 "configure"
7606 #include "confdefs.h"
7607 /* Override any gcc2 internal prototype to avoid an error. */
7608 /* We use char because int might match the return type of a gcc2
7609 builtin and then its argument prototype would still apply. */
7610 char xmlParseChunk();
7616 if { (eval echo configure:7628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7618 eval "ac_cv_lib_$ac_lib_var=yes"
7620 echo "configure: failed program was:" >&5
7621 cat conftest.$ac_ext >&5
7623 eval "ac_cv_lib_$ac_lib_var=no"
7626 LIBS="$ac_save_LIBS"
7629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7630 echo "$ac_t""yes" 1>&6
7634 cat >> confdefs.h <<\EOF
7639 echo "$ac_t""no" 1>&6
7642 CPPFLAGS="$ac_save_CPPFLAGS"
7643 LDFLAGS="$ac_save_LDFLAGS"
7644 # LIBS="$ac_save_LIBS"
7648 X_CFLAGS="$ac_save_X_CFLAGS"
7649 X_LIBS="$ac_save_X_LIBS"
7654 ###############################################################################
7656 # Checking whether Motif is really Lesstif.
7658 ###############################################################################
7661 if test "$have_motif" = yes ; then
7662 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
7663 echo "configure:7675: checking whether Motif is really LessTif" >&5
7664 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
7665 echo $ac_n "(cached) $ac_c" 1>&6
7668 ac_save_CPPFLAGS="$CPPFLAGS"
7669 if test \! -z "$includedir" ; then
7670 CPPFLAGS="$CPPFLAGS -I$includedir"
7672 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7673 cat > conftest.$ac_ext <<EOF
7674 #line 7686 "configure"
7675 #include "confdefs.h"
7678 long vers = LesstifVersion;
7681 if { (eval echo configure:7693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7683 ac_cv_have_lesstif=yes
7685 echo "configure: failed program was:" >&5
7686 cat conftest.$ac_ext >&5
7688 ac_cv_have_lesstif=no
7691 CPPFLAGS="$ac_save_CPPFLAGS"
7694 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
7695 have_lesstif=$ac_cv_have_lesstif
7699 lesstif_version=unknown
7700 lesstif_version_string=unknown
7702 if test "$have_lesstif" = yes ; then
7704 echo unknown > conftest-lt
7705 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
7706 echo "configure:7718: checking LessTif version number" >&5
7707 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
7708 echo $ac_n "(cached) $ac_c" 1>&6
7711 ac_save_CPPFLAGS="$CPPFLAGS"
7712 if test \! -z "$includedir" ; then
7713 CPPFLAGS="$CPPFLAGS -I$includedir"
7715 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7716 if test "$cross_compiling" = yes; then
7717 ac_cv_lesstif_version=unknown
7718 ac_cv_lesstif_version_string=unknown
7720 cat > conftest.$ac_ext <<EOF
7721 #line 7733 "configure"
7722 #include "confdefs.h"
7726 FILE *f = fopen("conftest-lt", "w");
7728 fprintf(f, "%d %d.%d\n", LesstifVersion,
7729 LESSTIF_VERSION, LESSTIF_REVISION);
7734 if { (eval echo configure:7746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7736 ltv=`cat conftest-lt`
7737 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
7738 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
7740 echo "configure: failed program was:" >&5
7741 cat conftest.$ac_ext >&5
7743 ac_cv_lesstif_version=unknown
7744 ac_cv_lesstif_version_string=unknown
7749 CPPFLAGS="$ac_save_CPPFLAGS"
7752 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
7754 lesstif_version=$ac_cv_lesstif_version
7755 lesstif_version_string=$ac_cv_lesstif_version_string
7760 if test "$have_motif" = yes ; then
7762 echo unknown > conftest-mt
7763 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
7764 echo "configure:7776: checking Motif version number" >&5
7765 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
7766 echo $ac_n "(cached) $ac_c" 1>&6
7769 ac_save_CPPFLAGS="$CPPFLAGS"
7770 if test \! -z "$includedir" ; then
7771 CPPFLAGS="$CPPFLAGS -I$includedir"
7773 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7774 if test "$cross_compiling" = yes; then
7775 ac_cv_motif_version=unknown
7776 ac_cv_motif_version_string=unknown
7778 cat > conftest.$ac_ext <<EOF
7779 #line 7791 "configure"
7780 #include "confdefs.h"
7784 FILE *f = fopen("conftest-mt", "w");
7786 fprintf(f, "%d %d.%d\n", XmVersion,
7787 XmVERSION, XmREVISION);
7792 if { (eval echo configure:7804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7794 mtv=`cat conftest-mt`
7795 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
7796 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
7798 echo "configure: failed program was:" >&5
7799 cat conftest.$ac_ext >&5
7801 ac_cv_motif_version=unknown
7802 ac_cv_motif_version_string=unknown
7807 CPPFLAGS="$ac_save_CPPFLAGS"
7810 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
7812 motif_version=$ac_cv_motif_version
7813 motif_version_string=$ac_cv_motif_version_string
7818 ###############################################################################
7820 # Checking whether Motif requires -lXpm.
7822 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
7823 # The deal is, Motif 2.x requires XPM -- but it's a compilation option
7824 # of the library whether to build the XPM code into libXm, or whether
7825 # to rely on an external libXm. So the only way to tell whether XPM is
7826 # a link-time requirement is to examine libXm.a, which is very
7827 # difficult to do in an autoconf script. So... if it's Motif 2.x, we
7828 # always link against XPM if the XPM lib exists (and this will be a
7829 # no-op if libXm happens to already have the XPM code in it.)
7831 ###############################################################################
7833 motif_requires_xpm=no
7834 if test "$have_motif" = yes ; then
7835 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
7836 echo "configure:7848: checking whether Motif requires XPM" >&5
7837 if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
7839 motif_requires_xpm=yes
7840 echo "$ac_t""maybe" 1>&6
7842 echo "$ac_t""no" 1>&6
7847 ###############################################################################
7849 # Checking whether Motif requires -lXp.
7851 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
7852 # Extension". Why this extension isn't in -lXext with all the others,
7855 ###############################################################################
7858 if test "$have_motif" = yes ; then
7861 ac_save_CPPFLAGS="$CPPFLAGS"
7862 ac_save_LDFLAGS="$LDFLAGS"
7863 # ac_save_LIBS="$LIBS"
7865 if test \! -z "$includedir" ; then
7866 CPPFLAGS="$CPPFLAGS -I$includedir"
7868 # note: $X_CFLAGS includes $x_includes
7869 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7871 if test \! -z "$libdir" ; then
7872 LDFLAGS="$LDFLAGS -L$libdir"
7874 # note: $X_LIBS includes $x_libraries
7875 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7877 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
7878 echo "configure:7890: checking for XpQueryExtension in -lXp" >&5
7879 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
7880 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7881 echo $ac_n "(cached) $ac_c" 1>&6
7883 ac_save_LIBS="$LIBS"
7884 LIBS="-lXp -lX11 -lXext -lm $LIBS"
7885 cat > conftest.$ac_ext <<EOF
7886 #line 7898 "configure"
7887 #include "confdefs.h"
7888 /* Override any gcc2 internal prototype to avoid an error. */
7889 /* We use char because int might match the return type of a gcc2
7890 builtin and then its argument prototype would still apply. */
7891 char XpQueryExtension();
7897 if { (eval echo configure:7909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7899 eval "ac_cv_lib_$ac_lib_var=yes"
7901 echo "configure: failed program was:" >&5
7902 cat conftest.$ac_ext >&5
7904 eval "ac_cv_lib_$ac_lib_var=no"
7907 LIBS="$ac_save_LIBS"
7910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7911 echo "$ac_t""yes" 1>&6
7912 have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
7914 echo "$ac_t""no" 1>&6
7918 CPPFLAGS="$ac_save_CPPFLAGS"
7919 LDFLAGS="$ac_save_LDFLAGS"
7920 # LIBS="$ac_save_LIBS"
7925 ###############################################################################
7927 # Checking whether Motif requires -lXintl (for _Xsetlocale.)
7929 ###############################################################################
7932 if test "$have_motif" = yes ; then
7934 ac_save_CPPFLAGS="$CPPFLAGS"
7935 ac_save_LDFLAGS="$LDFLAGS"
7936 # ac_save_LIBS="$LIBS"
7938 if test \! -z "$includedir" ; then
7939 CPPFLAGS="$CPPFLAGS -I$includedir"
7941 # note: $X_CFLAGS includes $x_includes
7942 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7944 if test \! -z "$libdir" ; then
7945 LDFLAGS="$LDFLAGS -L$libdir"
7947 # note: $X_LIBS includes $x_libraries
7948 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7950 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
7951 echo "configure:7963: checking for _Xsetlocale in -lXintl" >&5
7952 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
7953 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7954 echo $ac_n "(cached) $ac_c" 1>&6
7956 ac_save_LIBS="$LIBS"
7957 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
7958 cat > conftest.$ac_ext <<EOF
7959 #line 7971 "configure"
7960 #include "confdefs.h"
7961 /* Override any gcc2 internal prototype to avoid an error. */
7962 /* We use char because int might match the return type of a gcc2
7963 builtin and then its argument prototype would still apply. */
7970 if { (eval echo configure:7982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7972 eval "ac_cv_lib_$ac_lib_var=yes"
7974 echo "configure: failed program was:" >&5
7975 cat conftest.$ac_ext >&5
7977 eval "ac_cv_lib_$ac_lib_var=no"
7980 LIBS="$ac_save_LIBS"
7983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7984 echo "$ac_t""yes" 1>&6
7987 echo "$ac_t""no" 1>&6
7991 CPPFLAGS="$ac_save_CPPFLAGS"
7992 LDFLAGS="$ac_save_LDFLAGS"
7993 # LIBS="$ac_save_LIBS"
7995 if test "$have_xintl" = yes; then
7996 MOTIF_LIBS="$MOTIF_LIBS -lXintl"
8001 ###############################################################################
8003 # Check for -lGL or -lMesaGL.
8005 ###############################################################################
8009 with_gl_req=unspecified
8011 # Check whether --with-gl or --without-gl was given.
8012 if test "${with_gl+set}" = set; then
8014 with_gl="$withval"; with_gl_req="$withval"
8026 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
8027 echo "configure:8039: checking for GL headers" >&5
8030 X_CFLAGS="-I$d $X_CFLAGS"
8031 echo "$ac_t""$d" 1>&6
8033 echo "$ac_t""not found ($d: no such directory)" 1>&6
8036 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
8037 echo "configure:8049: checking for GL libs" >&5
8040 X_LIBS="-L$d $X_LIBS"
8041 echo "$ac_t""$d" 1>&6
8043 echo "$ac_t""not found ($d: no such directory)" 1>&6
8046 # replace the directory string with "yes".
8048 with_gl=$with_gl_req
8053 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
8054 echo " If it is a directory, then \`DIR/include' will be added to"
8055 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8061 ac_mesagl_version=unknown
8062 ac_mesagl_version_string=unknown
8064 if test "$with_gl" = yes; then
8066 ac_save_CPPFLAGS="$CPPFLAGS"
8067 if test \! -z "$includedir" ; then
8068 CPPFLAGS="$CPPFLAGS -I$includedir"
8070 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8071 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
8072 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
8073 echo "configure:8085: checking for GL/gl.h" >&5
8074 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8075 echo $ac_n "(cached) $ac_c" 1>&6
8077 cat > conftest.$ac_ext <<EOF
8078 #line 8090 "configure"
8079 #include "confdefs.h"
8082 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8083 { (eval echo configure:8095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8084 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8085 if test -z "$ac_err"; then
8087 eval "ac_cv_header_$ac_safe=yes"
8090 echo "configure: failed program was:" >&5
8091 cat conftest.$ac_ext >&5
8093 eval "ac_cv_header_$ac_safe=no"
8097 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8098 echo "$ac_t""yes" 1>&6
8101 echo "$ac_t""no" 1>&6
8104 CPPFLAGS="$ac_save_CPPFLAGS"
8105 if test "$have_gl" = yes ; then
8107 ac_save_CPPFLAGS="$CPPFLAGS"
8108 if test \! -z "$includedir" ; then
8109 CPPFLAGS="$CPPFLAGS -I$includedir"
8111 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8112 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
8113 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
8114 echo "configure:8126: checking for GL/glx.h" >&5
8115 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8116 echo $ac_n "(cached) $ac_c" 1>&6
8118 cat > conftest.$ac_ext <<EOF
8119 #line 8131 "configure"
8120 #include "confdefs.h"
8123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8124 { (eval echo configure:8136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8126 if test -z "$ac_err"; then
8128 eval "ac_cv_header_$ac_safe=yes"
8131 echo "configure: failed program was:" >&5
8132 cat conftest.$ac_ext >&5
8134 eval "ac_cv_header_$ac_safe=no"
8138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8139 echo "$ac_t""yes" 1>&6
8142 echo "$ac_t""no" 1>&6
8145 CPPFLAGS="$ac_save_CPPFLAGS"
8148 # If we have the headers, try and figure out which vendor it's from.
8150 if test "$have_gl" = yes ; then
8152 # We need to know whether it's MesaGL so that we know which libraries
8155 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
8156 echo "configure:8168: checking whether GL is really MesaGL" >&5
8157 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
8158 echo $ac_n "(cached) $ac_c" 1>&6
8160 ac_cv_have_mesa_gl=no
8162 ac_save_CPPFLAGS="$CPPFLAGS"
8163 if test \! -z "$includedir" ; then
8164 CPPFLAGS="$CPPFLAGS -I$includedir"
8166 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8167 cat > conftest.$ac_ext <<EOF
8168 #line 8180 "configure"
8169 #include "confdefs.h"
8172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8173 egrep "Mesa|MESA" >/dev/null 2>&1; then
8175 ac_cv_have_mesa_gl=yes
8179 CPPFLAGS="$ac_save_CPPFLAGS"
8183 echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
8184 ac_have_mesa_gl=$ac_cv_have_mesa_gl
8191 # Some versions of MesaGL are compiled to require -lpthread.
8192 # So if the Mesa headers exist, and -lpthread exists, then always
8193 # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
8195 if test "$ac_have_mesa_gl" = yes; then
8196 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
8197 echo "configure:8209: checking for pthread_create in -lpthread" >&5
8198 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
8199 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8200 echo $ac_n "(cached) $ac_c" 1>&6
8202 ac_save_LIBS="$LIBS"
8203 LIBS="-lpthread $LIBS"
8204 cat > conftest.$ac_ext <<EOF
8205 #line 8217 "configure"
8206 #include "confdefs.h"
8207 /* Override any gcc2 internal prototype to avoid an error. */
8208 /* We use char because int might match the return type of a gcc2
8209 builtin and then its argument prototype would still apply. */
8210 char pthread_create();
8216 if { (eval echo configure:8228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8218 eval "ac_cv_lib_$ac_lib_var=yes"
8220 echo "configure: failed program was:" >&5
8221 cat conftest.$ac_ext >&5
8223 eval "ac_cv_lib_$ac_lib_var=no"
8226 LIBS="$ac_save_LIBS"
8229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8230 echo "$ac_t""yes" 1>&6
8233 echo "$ac_t""no" 1>&6
8239 # If we have Mesa headers, check to see if we can link against -lMesaGL.
8240 # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
8241 # Else, warn that GL is busted. (We have the headers, but no libs.)
8244 if test "$ac_have_mesa_gl" = yes ; then
8246 ac_save_CPPFLAGS="$CPPFLAGS"
8247 ac_save_LDFLAGS="$LDFLAGS"
8248 # ac_save_LIBS="$LIBS"
8250 if test \! -z "$includedir" ; then
8251 CPPFLAGS="$CPPFLAGS -I$includedir"
8253 # note: $X_CFLAGS includes $x_includes
8254 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8256 if test \! -z "$libdir" ; then
8257 LDFLAGS="$LDFLAGS -L$libdir"
8259 # note: $X_LIBS includes $x_libraries
8260 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8262 echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
8263 echo "configure:8275: checking for glXCreateContext in -lMesaGL" >&5
8264 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
8265 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8266 echo $ac_n "(cached) $ac_c" 1>&6
8268 ac_save_LIBS="$LIBS"
8269 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
8270 cat > conftest.$ac_ext <<EOF
8271 #line 8283 "configure"
8272 #include "confdefs.h"
8273 /* Override any gcc2 internal prototype to avoid an error. */
8274 /* We use char because int might match the return type of a gcc2
8275 builtin and then its argument prototype would still apply. */
8276 char glXCreateContext();
8282 if { (eval echo configure:8294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8284 eval "ac_cv_lib_$ac_lib_var=yes"
8286 echo "configure: failed program was:" >&5
8287 cat conftest.$ac_ext >&5
8289 eval "ac_cv_lib_$ac_lib_var=no"
8292 LIBS="$ac_save_LIBS"
8295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8296 echo "$ac_t""yes" 1>&6
8298 GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
8300 echo "$ac_t""no" 1>&6
8303 CPPFLAGS="$ac_save_CPPFLAGS"
8304 LDFLAGS="$ac_save_LDFLAGS"
8305 # LIBS="$ac_save_LIBS"
8309 if test "$gl_lib_1" = "" ; then
8311 ac_save_CPPFLAGS="$CPPFLAGS"
8312 ac_save_LDFLAGS="$LDFLAGS"
8313 # ac_save_LIBS="$LIBS"
8315 if test \! -z "$includedir" ; then
8316 CPPFLAGS="$CPPFLAGS -I$includedir"
8318 # note: $X_CFLAGS includes $x_includes
8319 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8321 if test \! -z "$libdir" ; then
8322 LDFLAGS="$LDFLAGS -L$libdir"
8324 # note: $X_LIBS includes $x_libraries
8325 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8327 echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
8328 echo "configure:8340: checking for glXCreateContext in -lGL" >&5
8329 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
8330 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8331 echo $ac_n "(cached) $ac_c" 1>&6
8333 ac_save_LIBS="$LIBS"
8334 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
8335 cat > conftest.$ac_ext <<EOF
8336 #line 8348 "configure"
8337 #include "confdefs.h"
8338 /* Override any gcc2 internal prototype to avoid an error. */
8339 /* We use char because int might match the return type of a gcc2
8340 builtin and then its argument prototype would still apply. */
8341 char glXCreateContext();
8347 if { (eval echo configure:8359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8349 eval "ac_cv_lib_$ac_lib_var=yes"
8351 echo "configure: failed program was:" >&5
8352 cat conftest.$ac_ext >&5
8354 eval "ac_cv_lib_$ac_lib_var=no"
8357 LIBS="$ac_save_LIBS"
8360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8361 echo "$ac_t""yes" 1>&6
8363 GL_LIBS="-lGL -lGLU $GL_LIBS"
8365 echo "$ac_t""no" 1>&6
8368 CPPFLAGS="$ac_save_CPPFLAGS"
8369 LDFLAGS="$ac_save_LDFLAGS"
8370 # LIBS="$ac_save_LIBS"
8374 if test "$gl_lib_1" = "" ; then
8375 # we have headers, but no libs -- bail.
8380 # linking works -- we can build the GL hacks.
8381 cat >> confdefs.h <<\EOF
8385 if test "$ac_have_mesa_gl" = yes ; then
8386 cat >> confdefs.h <<\EOF
8387 #define HAVE_MESA_GL 1
8395 # Now that we know we have GL headers and libs, do some more GL testing.
8398 if test "$have_gl" = yes ; then
8399 # If it's MesaGL, we'd like to issue a warning if the version number
8400 # is less than or equal to 2.6, because that version had a security bug.
8402 if test "$ac_have_mesa_gl" = yes; then
8404 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
8405 echo "configure:8417: checking MesaGL version number" >&5
8406 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
8407 echo $ac_n "(cached) $ac_c" 1>&6
8409 cat > conftest.$ac_ext <<EOF
8410 #line 8422 "configure"
8411 #include "confdefs.h"
8413 #ifndef MESA_MAJOR_VERSION
8414 # include <GL/xmesa.h>
8415 # define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
8416 # define MESA_MINOR_VERSION XMESA_MINOR_VERSION
8418 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
8421 ac_save_CPPFLAGS="$CPPFLAGS"
8422 if test \! -z "$includedir" ; then
8423 CPPFLAGS="$CPPFLAGS -I$includedir"
8425 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8429 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
8430 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
8433 rm -f conftest.$ac_ext
8435 CPPFLAGS="$ac_save_CPPFLAGS"
8437 if test "$mglv" = ""; then
8438 ac_mesagl_version=unknown
8439 ac_mesagl_version_string=unknown
8441 ac_mesagl_version_string=$mglv
8442 maj=`echo $mglv | sed -n 's/\..*//p'`
8443 min=`echo $mglv | sed -n 's/.*\.//p'`
8444 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
8445 if test -z "$ac_mesagl_version"; then
8446 ac_mesagl_version=unknown
8447 ac_mesagl_version_string=unknown
8450 ac_cv_mesagl_version=$ac_mesagl_version
8451 ac_cv_mesagl_version_string=$ac_mesagl_version_string
8455 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
8456 ac_mesagl_version=$ac_cv_mesagl_version
8457 ac_mesagl_version_string=$ac_cv_mesagl_version_string
8461 # Check for OpenGL 1.1 features.
8464 ac_save_CPPFLAGS="$CPPFLAGS"
8465 ac_save_LDFLAGS="$LDFLAGS"
8466 # ac_save_LIBS="$LIBS"
8468 if test \! -z "$includedir" ; then
8469 CPPFLAGS="$CPPFLAGS -I$includedir"
8471 # note: $X_CFLAGS includes $x_includes
8472 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8474 if test \! -z "$libdir" ; then
8475 LDFLAGS="$LDFLAGS -L$libdir"
8477 # note: $X_LIBS includes $x_libraries
8478 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8480 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
8481 echo "configure:8493: checking for glBindTexture in -l$gl_lib_1" >&5
8482 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
8483 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8484 echo $ac_n "(cached) $ac_c" 1>&6
8486 ac_save_LIBS="$LIBS"
8487 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
8488 cat > conftest.$ac_ext <<EOF
8489 #line 8501 "configure"
8490 #include "confdefs.h"
8491 /* Override any gcc2 internal prototype to avoid an error. */
8492 /* We use char because int might match the return type of a gcc2
8493 builtin and then its argument prototype would still apply. */
8494 char glBindTexture();
8500 if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8502 eval "ac_cv_lib_$ac_lib_var=yes"
8504 echo "configure: failed program was:" >&5
8505 cat conftest.$ac_ext >&5
8507 eval "ac_cv_lib_$ac_lib_var=no"
8510 LIBS="$ac_save_LIBS"
8513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8514 echo "$ac_t""yes" 1>&6
8515 cat >> confdefs.h <<\EOF
8516 #define HAVE_GLBINDTEXTURE 1
8520 echo "$ac_t""no" 1>&6
8524 CPPFLAGS="$ac_save_CPPFLAGS"
8525 LDFLAGS="$ac_save_LDFLAGS"
8526 # LIBS="$ac_save_LIBS"
8530 elif test "$with_gl" != no; then
8531 echo "error: must be yes or no: --with-gl=$with_gl"
8536 ###############################################################################
8540 ###############################################################################
8543 with_gle_req=unspecified
8545 # Check whether --with-gle or --without-gle was given.
8546 if test "${with_gle+set}" = set; then
8548 with_gle="$withval"; with_gle_req="$withval"
8560 echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
8561 echo "configure:8573: checking for GLE headers" >&5
8564 X_CFLAGS="-I$d $X_CFLAGS"
8565 echo "$ac_t""$d" 1>&6
8567 echo "$ac_t""not found ($d: no such directory)" 1>&6
8570 echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
8571 echo "configure:8583: checking for GLE libs" >&5
8574 X_LIBS="-L$d $X_LIBS"
8575 echo "$ac_t""$d" 1>&6
8577 echo "$ac_t""not found ($d: no such directory)" 1>&6
8580 # replace the directory string with "yes".
8582 with_gle=$with_gle_req
8587 echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
8588 echo " If it is a directory, then \`DIR/include' will be added to"
8589 echo " the -I list, and \`DIR/lib' will be added to the -L list."
8597 if test "$with_gle" = yes; then
8600 ac_save_CPPFLAGS="$CPPFLAGS"
8601 if test \! -z "$includedir" ; then
8602 CPPFLAGS="$CPPFLAGS -I$includedir"
8604 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8605 ac_safe=`echo "GL/gle.h" | sed 'y%./+-%__p_%'`
8606 echo $ac_n "checking for GL/gle.h""... $ac_c" 1>&6
8607 echo "configure:8619: checking for GL/gle.h" >&5
8608 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8609 echo $ac_n "(cached) $ac_c" 1>&6
8611 cat > conftest.$ac_ext <<EOF
8612 #line 8624 "configure"
8613 #include "confdefs.h"
8616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8617 { (eval echo configure:8629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8619 if test -z "$ac_err"; then
8621 eval "ac_cv_header_$ac_safe=yes"
8624 echo "configure: failed program was:" >&5
8625 cat conftest.$ac_ext >&5
8627 eval "ac_cv_header_$ac_safe=no"
8631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8632 echo "$ac_t""yes" 1>&6
8635 echo "$ac_t""no" 1>&6
8638 CPPFLAGS="$ac_save_CPPFLAGS"
8639 if test "$have_gle3" = yes ; then
8643 ac_save_CPPFLAGS="$CPPFLAGS"
8644 if test \! -z "$includedir" ; then
8645 CPPFLAGS="$CPPFLAGS -I$includedir"
8647 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8648 ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
8649 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
8650 echo "configure:8662: checking for GL/gutil.h" >&5
8651 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8652 echo $ac_n "(cached) $ac_c" 1>&6
8654 cat > conftest.$ac_ext <<EOF
8655 #line 8667 "configure"
8656 #include "confdefs.h"
8657 #include <GL/gutil.h>
8659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8660 { (eval echo configure:8672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8662 if test -z "$ac_err"; then
8664 eval "ac_cv_header_$ac_safe=yes"
8667 echo "configure: failed program was:" >&5
8668 cat conftest.$ac_ext >&5
8670 eval "ac_cv_header_$ac_safe=no"
8674 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8675 echo "$ac_t""yes" 1>&6
8678 echo "$ac_t""no" 1>&6
8681 CPPFLAGS="$ac_save_CPPFLAGS"
8682 if test "$have_gle" = yes ; then
8684 ac_save_CPPFLAGS="$CPPFLAGS"
8685 if test \! -z "$includedir" ; then
8686 CPPFLAGS="$CPPFLAGS -I$includedir"
8688 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8689 ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
8690 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
8691 echo "configure:8703: checking for GL/tube.h" >&5
8692 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8693 echo $ac_n "(cached) $ac_c" 1>&6
8695 cat > conftest.$ac_ext <<EOF
8696 #line 8708 "configure"
8697 #include "confdefs.h"
8698 #include <GL/tube.h>
8700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8701 { (eval echo configure:8713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8703 if test -z "$ac_err"; then
8705 eval "ac_cv_header_$ac_safe=yes"
8708 echo "configure: failed program was:" >&5
8709 cat conftest.$ac_ext >&5
8711 eval "ac_cv_header_$ac_safe=no"
8715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8716 echo "$ac_t""yes" 1>&6
8719 echo "$ac_t""no" 1>&6
8722 CPPFLAGS="$ac_save_CPPFLAGS"
8726 if test "$have_gle" = yes ; then
8730 ac_save_CPPFLAGS="$CPPFLAGS"
8731 ac_save_LDFLAGS="$LDFLAGS"
8732 # ac_save_LIBS="$LIBS"
8734 if test \! -z "$includedir" ; then
8735 CPPFLAGS="$CPPFLAGS -I$includedir"
8737 # note: $X_CFLAGS includes $x_includes
8738 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8740 if test \! -z "$libdir" ; then
8741 LDFLAGS="$LDFLAGS -L$libdir"
8743 # note: $X_LIBS includes $x_libraries
8744 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8746 echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
8747 echo "configure:8759: checking for gleCreateGC in -lgle" >&5
8748 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
8749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8750 echo $ac_n "(cached) $ac_c" 1>&6
8752 ac_save_LIBS="$LIBS"
8753 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
8754 cat > conftest.$ac_ext <<EOF
8755 #line 8767 "configure"
8756 #include "confdefs.h"
8757 /* Override any gcc2 internal prototype to avoid an error. */
8758 /* We use char because int might match the return type of a gcc2
8759 builtin and then its argument prototype would still apply. */
8766 if { (eval echo configure:8778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8768 eval "ac_cv_lib_$ac_lib_var=yes"
8770 echo "configure: failed program was:" >&5
8771 cat conftest.$ac_ext >&5
8773 eval "ac_cv_lib_$ac_lib_var=no"
8776 LIBS="$ac_save_LIBS"
8779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8780 echo "$ac_t""yes" 1>&6
8781 have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
8783 echo "$ac_t""no" 1>&6
8786 CPPFLAGS="$ac_save_CPPFLAGS"
8787 LDFLAGS="$ac_save_LDFLAGS"
8788 # LIBS="$ac_save_LIBS"
8791 if test "$have_gle" = yes ; then
8795 # sometimes the libmatrix stuff is included in libgle. look there first.
8797 # I don't get it. For some reason, this test passes on SGI, as if
8798 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
8799 # Yet the link is succeeding. Why???
8801 # AC_CHECK_X_LIB(gle, uview_direction_d,
8802 # [have_gle=yes; gle_halfassed=no],
8803 # [], $GL_LIBS -lX11 -lXext -lm)
8805 # As of GLE 3 this is in libgle, and has changed name to uview_direction!
8807 if test "$have_gle3" = yes ; then
8809 ac_save_CPPFLAGS="$CPPFLAGS"
8810 ac_save_LDFLAGS="$LDFLAGS"
8811 # ac_save_LIBS="$LIBS"
8813 if test \! -z "$includedir" ; then
8814 CPPFLAGS="$CPPFLAGS -I$includedir"
8816 # note: $X_CFLAGS includes $x_includes
8817 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8819 if test \! -z "$libdir" ; then
8820 LDFLAGS="$LDFLAGS -L$libdir"
8822 # note: $X_LIBS includes $x_libraries
8823 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8825 echo $ac_n "checking for uview_direction in -lgle""... $ac_c" 1>&6
8826 echo "configure:8838: checking for uview_direction in -lgle" >&5
8827 ac_lib_var=`echo gle'_'uview_direction | sed 'y%./+-%__p_%'`
8828 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8829 echo $ac_n "(cached) $ac_c" 1>&6
8831 ac_save_LIBS="$LIBS"
8832 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
8833 cat > conftest.$ac_ext <<EOF
8834 #line 8846 "configure"
8835 #include "confdefs.h"
8836 /* Override any gcc2 internal prototype to avoid an error. */
8837 /* We use char because int might match the return type of a gcc2
8838 builtin and then its argument prototype would still apply. */
8839 char uview_direction();
8845 if { (eval echo configure:8857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8847 eval "ac_cv_lib_$ac_lib_var=yes"
8849 echo "configure: failed program was:" >&5
8850 cat conftest.$ac_ext >&5
8852 eval "ac_cv_lib_$ac_lib_var=no"
8855 LIBS="$ac_save_LIBS"
8858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8859 echo "$ac_t""yes" 1>&6
8860 have_gle=yes; gle_halfassed=no
8862 echo "$ac_t""no" 1>&6
8865 CPPFLAGS="$ac_save_CPPFLAGS"
8866 LDFLAGS="$ac_save_LDFLAGS"
8867 # LIBS="$ac_save_LIBS"
8870 # if it wasn't in libgle, then look in libmatrix.
8871 if test "$have_gle" = no ; then
8873 ac_save_CPPFLAGS="$CPPFLAGS"
8874 ac_save_LDFLAGS="$LDFLAGS"
8875 # ac_save_LIBS="$LIBS"
8877 if test \! -z "$includedir" ; then
8878 CPPFLAGS="$CPPFLAGS -I$includedir"
8880 # note: $X_CFLAGS includes $x_includes
8881 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8883 if test \! -z "$libdir" ; then
8884 LDFLAGS="$LDFLAGS -L$libdir"
8886 # note: $X_LIBS includes $x_libraries
8887 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8889 echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
8890 echo "configure:8902: checking for uview_direction_d in -lmatrix" >&5
8891 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
8892 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8893 echo $ac_n "(cached) $ac_c" 1>&6
8895 ac_save_LIBS="$LIBS"
8896 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
8897 cat > conftest.$ac_ext <<EOF
8898 #line 8910 "configure"
8899 #include "confdefs.h"
8900 /* Override any gcc2 internal prototype to avoid an error. */
8901 /* We use char because int might match the return type of a gcc2
8902 builtin and then its argument prototype would still apply. */
8903 char uview_direction_d();
8909 if { (eval echo configure:8921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8911 eval "ac_cv_lib_$ac_lib_var=yes"
8913 echo "configure: failed program was:" >&5
8914 cat conftest.$ac_ext >&5
8916 eval "ac_cv_lib_$ac_lib_var=no"
8919 LIBS="$ac_save_LIBS"
8922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8923 echo "$ac_t""yes" 1>&6
8924 have_gle=yes; gle_halfassed=no;
8925 GLE_LIBS="$GLE_LIBS -lmatrix"
8927 echo "$ac_t""no" 1>&6
8930 CPPFLAGS="$ac_save_CPPFLAGS"
8931 LDFLAGS="$ac_save_LDFLAGS"
8932 # LIBS="$ac_save_LIBS"
8937 if test "$have_gle" = yes ; then
8938 cat >> confdefs.h <<\EOF
8942 if test "$have_gle3" = yes ; then
8943 cat >> confdefs.h <<\EOF
8950 elif test "$with_gle" != no; then
8951 echo "error: must be yes or no: --with-gle=$with_gle"
8958 ###############################################################################
8962 ###############################################################################
8965 with_xpm_req=unspecified
8966 # Check whether --with-xpm or --without-xpm was given.
8967 if test "${with_xpm+set}" = set; then
8969 with_xpm="$withval"; with_xpm_req="$withval"
8981 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
8982 echo "configure:8994: checking for XPM headers" >&5
8985 X_CFLAGS="-I$d $X_CFLAGS"
8986 echo "$ac_t""$d" 1>&6
8988 echo "$ac_t""not found ($d: no such directory)" 1>&6
8991 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
8992 echo "configure:9004: checking for XPM libs" >&5
8995 X_LIBS="-L$d $X_LIBS"
8996 echo "$ac_t""$d" 1>&6
8998 echo "$ac_t""not found ($d: no such directory)" 1>&6
9001 # replace the directory string with "yes".
9003 with_xpm=$with_xpm_req
9008 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
9009 echo " If it is a directory, then \`DIR/include' will be added to"
9010 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9016 if test "$with_xpm" = yes; then
9018 ac_save_CPPFLAGS="$CPPFLAGS"
9019 if test \! -z "$includedir" ; then
9020 CPPFLAGS="$CPPFLAGS -I$includedir"
9022 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9023 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
9024 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
9025 echo "configure:9037: checking for X11/xpm.h" >&5
9026 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9027 echo $ac_n "(cached) $ac_c" 1>&6
9029 cat > conftest.$ac_ext <<EOF
9030 #line 9042 "configure"
9031 #include "confdefs.h"
9032 #include <X11/xpm.h>
9034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9035 { (eval echo configure:9047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9037 if test -z "$ac_err"; then
9039 eval "ac_cv_header_$ac_safe=yes"
9042 echo "configure: failed program was:" >&5
9043 cat conftest.$ac_ext >&5
9045 eval "ac_cv_header_$ac_safe=no"
9049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9050 echo "$ac_t""yes" 1>&6
9052 cat >> confdefs.h <<\EOF
9058 echo "$ac_t""no" 1>&6
9061 CPPFLAGS="$ac_save_CPPFLAGS"
9062 elif test "$with_xpm" != no; then
9063 echo "error: must be yes or no: --with-xpm=$with_xpm"
9067 # See comment near $motif_requires_xpm, above.
9068 # Need to do this here, after both Motif and XPM have been checked for.
9070 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
9071 if test "$motif_requires_xpm" = yes ; then
9072 MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
9077 ###############################################################################
9079 # Check for -lgdk_pixbuf.
9081 ###############################################################################
9084 with_gdk_pixbuf_req=unspecified
9085 # Check whether --with-pixbuf or --without-pixbuf was given.
9086 if test "${with_pixbuf+set}" = set; then
9087 withval="$with_pixbuf"
9088 with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
9095 case "$with_gdk_pixbuf" in
9100 echo $ac_n "checking for GDK_PIXBUF headers""... $ac_c" 1>&6
9101 echo "configure:9113: checking for GDK_PIXBUF headers" >&5
9102 d=$with_gdk_pixbuf/include
9104 X_CFLAGS="-I$d $X_CFLAGS"
9105 echo "$ac_t""$d" 1>&6
9107 echo "$ac_t""not found ($d: no such directory)" 1>&6
9110 echo $ac_n "checking for GDK_PIXBUF libs""... $ac_c" 1>&6
9111 echo "configure:9123: checking for GDK_PIXBUF libs" >&5
9112 d=$with_gdk_pixbuf/lib
9114 X_LIBS="-L$d $X_LIBS"
9115 echo "$ac_t""$d" 1>&6
9117 echo "$ac_t""not found ($d: no such directory)" 1>&6
9120 # replace the directory string with "yes".
9121 with_gdk_pixbuf_req="yes"
9122 with_gdk_pixbuf=$with_gdk_pixbuf_req
9127 echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
9128 echo " If it is a directory, then \`DIR/include' will be added to"
9129 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9135 if test "$with_gdk_pixbuf" = yes; then
9137 if test "$have_gtk" = yes; then
9139 ac_save_gdk_CPPFLAGS="$CPPFLAGS"
9140 CPPFLAGS="$CPPFLAGS $ac_gtk_config_cflags"
9144 ac_save_CPPFLAGS="$CPPFLAGS"
9145 if test \! -z "$includedir" ; then
9146 CPPFLAGS="$CPPFLAGS -I$includedir"
9148 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9149 ac_safe=`echo "gdk-pixbuf/gdk-pixbuf.h" | sed 'y%./+-%__p_%'`
9150 echo $ac_n "checking for gdk-pixbuf/gdk-pixbuf.h""... $ac_c" 1>&6
9151 echo "configure:9163: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
9152 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9153 echo $ac_n "(cached) $ac_c" 1>&6
9155 cat > conftest.$ac_ext <<EOF
9156 #line 9168 "configure"
9157 #include "confdefs.h"
9158 #include <gdk-pixbuf/gdk-pixbuf.h>
9160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9161 { (eval echo configure:9173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9163 if test -z "$ac_err"; then
9165 eval "ac_cv_header_$ac_safe=yes"
9168 echo "configure: failed program was:" >&5
9169 cat conftest.$ac_ext >&5
9171 eval "ac_cv_header_$ac_safe=no"
9175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9176 echo "$ac_t""yes" 1>&6
9179 echo "$ac_t""no" 1>&6
9182 CPPFLAGS="$ac_save_CPPFLAGS"
9183 if test "$have_gdk_pixbuf" = yes; then
9186 ac_save_CPPFLAGS="$CPPFLAGS"
9187 if test \! -z "$includedir" ; then
9188 CPPFLAGS="$CPPFLAGS -I$includedir"
9190 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9191 ac_safe=`echo "gdk-pixbuf/gdk-pixbuf-xlib.h" | sed 'y%./+-%__p_%'`
9192 echo $ac_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h""... $ac_c" 1>&6
9193 echo "configure:9205: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
9194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9195 echo $ac_n "(cached) $ac_c" 1>&6
9197 cat > conftest.$ac_ext <<EOF
9198 #line 9210 "configure"
9199 #include "confdefs.h"
9200 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
9202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9203 { (eval echo configure:9215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9205 if test -z "$ac_err"; then
9207 eval "ac_cv_header_$ac_safe=yes"
9210 echo "configure: failed program was:" >&5
9211 cat conftest.$ac_ext >&5
9213 eval "ac_cv_header_$ac_safe=no"
9217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9218 echo "$ac_t""yes" 1>&6
9221 echo "$ac_t""no" 1>&6
9224 CPPFLAGS="$ac_save_CPPFLAGS"
9227 CPPFLAGS="$ac_save_gdk_CPPFLAGS"
9229 if test "$have_gdk_pixbuf" = yes; then
9230 cat >> confdefs.h <<\EOF
9231 #define HAVE_GDK_PIXBUF 1
9234 XPM_LIBS="-lgdk_pixbuf -lgdk_pixbuf_xlib"
9238 elif test "$with_gdk_pixbuf" != no; then
9239 echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
9244 ###############################################################################
9248 ###############################################################################
9251 with_jpeg_req=unspecified
9253 # Check whether --with-jpeg or --without-jpeg was given.
9254 if test "${with_jpeg+set}" = set; then
9255 withval="$with_jpeg"
9256 with_jpeg="$withval"; with_jpeg_req="$withval"
9263 case "$with_jpeg" in
9268 echo $ac_n "checking for JPEG headers""... $ac_c" 1>&6
9269 echo "configure:9281: checking for JPEG headers" >&5
9270 d=$with_jpeg/include
9272 X_CFLAGS="-I$d $X_CFLAGS"
9273 echo "$ac_t""$d" 1>&6
9275 echo "$ac_t""not found ($d: no such directory)" 1>&6
9278 echo $ac_n "checking for JPEG libs""... $ac_c" 1>&6
9279 echo "configure:9291: checking for JPEG libs" >&5
9282 X_LIBS="-L$d $X_LIBS"
9283 echo "$ac_t""$d" 1>&6
9285 echo "$ac_t""not found ($d: no such directory)" 1>&6
9288 # replace the directory string with "yes".
9290 with_jpeg=$with_jpeg_req
9295 echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
9296 echo " If it is a directory, then \`DIR/include' will be added to"
9297 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9303 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
9304 echo "error: must be yes or no: --with-jpeg=$with_jpeg"
9308 if test "$with_jpeg" = yes; then
9312 ac_save_CPPFLAGS="$CPPFLAGS"
9313 if test \! -z "$includedir" ; then
9314 CPPFLAGS="$CPPFLAGS -I$includedir"
9316 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9317 ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
9318 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
9319 echo "configure:9331: checking for jpeglib.h" >&5
9320 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9321 echo $ac_n "(cached) $ac_c" 1>&6
9323 cat > conftest.$ac_ext <<EOF
9324 #line 9336 "configure"
9325 #include "confdefs.h"
9326 #include <jpeglib.h>
9328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9329 { (eval echo configure:9341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9331 if test -z "$ac_err"; then
9333 eval "ac_cv_header_$ac_safe=yes"
9336 echo "configure: failed program was:" >&5
9337 cat conftest.$ac_ext >&5
9339 eval "ac_cv_header_$ac_safe=no"
9343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9344 echo "$ac_t""yes" 1>&6
9347 echo "$ac_t""no" 1>&6
9350 CPPFLAGS="$ac_save_CPPFLAGS"
9352 if test "$have_jpeg" = yes; then
9353 # we have the header, now check for the library
9357 ac_save_CPPFLAGS="$CPPFLAGS"
9358 ac_save_LDFLAGS="$LDFLAGS"
9359 # ac_save_LIBS="$LIBS"
9361 if test \! -z "$includedir" ; then
9362 CPPFLAGS="$CPPFLAGS -I$includedir"
9364 # note: $X_CFLAGS includes $x_includes
9365 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9367 if test \! -z "$libdir" ; then
9368 LDFLAGS="$LDFLAGS -L$libdir"
9370 # note: $X_LIBS includes $x_libraries
9371 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9373 echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
9374 echo "configure:9386: checking for jpeg_start_compress in -ljpeg" >&5
9375 ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
9376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9377 echo $ac_n "(cached) $ac_c" 1>&6
9379 ac_save_LIBS="$LIBS"
9381 cat > conftest.$ac_ext <<EOF
9382 #line 9394 "configure"
9383 #include "confdefs.h"
9384 /* Override any gcc2 internal prototype to avoid an error. */
9385 /* We use char because int might match the return type of a gcc2
9386 builtin and then its argument prototype would still apply. */
9387 char jpeg_start_compress();
9390 jpeg_start_compress()
9393 if { (eval echo configure:9405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9395 eval "ac_cv_lib_$ac_lib_var=yes"
9397 echo "configure: failed program was:" >&5
9398 cat conftest.$ac_ext >&5
9400 eval "ac_cv_lib_$ac_lib_var=no"
9403 LIBS="$ac_save_LIBS"
9406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9407 echo "$ac_t""yes" 1>&6
9411 cat >> confdefs.h <<\EOF
9412 #define HAVE_JPEGLIB 1
9416 echo "$ac_t""no" 1>&6
9419 CPPFLAGS="$ac_save_CPPFLAGS"
9420 LDFLAGS="$ac_save_LDFLAGS"
9421 # LIBS="$ac_save_LIBS"
9427 ###############################################################################
9429 # Check for the XSHM server extension.
9431 ###############################################################################
9434 with_xshm_req=unspecified
9435 # Check whether --with-xshm-ext or --without-xshm-ext was given.
9436 if test "${with_xshm_ext+set}" = set; then
9437 withval="$with_xshm_ext"
9438 with_xshm="$withval"; with_xshm_req="$withval"
9445 case "$with_xshm" in
9450 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
9451 echo "configure:9463: checking for XSHM headers" >&5
9452 d=$with_xshm/include
9454 X_CFLAGS="-I$d $X_CFLAGS"
9455 echo "$ac_t""$d" 1>&6
9457 echo "$ac_t""not found ($d: no such directory)" 1>&6
9460 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
9461 echo "configure:9473: checking for XSHM libs" >&5
9464 X_LIBS="-L$d $X_LIBS"
9465 echo "$ac_t""$d" 1>&6
9467 echo "$ac_t""not found ($d: no such directory)" 1>&6
9470 # replace the directory string with "yes".
9472 with_xshm=$with_xshm_req
9477 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
9478 echo " If it is a directory, then \`DIR/include' will be added to"
9479 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9485 if test "$with_xshm" = yes; then
9487 # first check for Xshm.h.
9489 ac_save_CPPFLAGS="$CPPFLAGS"
9490 if test \! -z "$includedir" ; then
9491 CPPFLAGS="$CPPFLAGS -I$includedir"
9493 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9494 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
9495 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
9496 echo "configure:9508: checking for X11/extensions/XShm.h" >&5
9497 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9498 echo $ac_n "(cached) $ac_c" 1>&6
9500 cat > conftest.$ac_ext <<EOF
9501 #line 9513 "configure"
9502 #include "confdefs.h"
9503 #include <X11/extensions/XShm.h>
9505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9506 { (eval echo configure:9518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9508 if test -z "$ac_err"; then
9510 eval "ac_cv_header_$ac_safe=yes"
9513 echo "configure: failed program was:" >&5
9514 cat conftest.$ac_ext >&5
9516 eval "ac_cv_header_$ac_safe=no"
9520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9521 echo "$ac_t""yes" 1>&6
9524 echo "$ac_t""no" 1>&6
9527 CPPFLAGS="$ac_save_CPPFLAGS"
9529 # if that succeeded, then check for sys/ipc.h.
9530 if test "$have_xshm" = yes; then
9533 ac_save_CPPFLAGS="$CPPFLAGS"
9534 if test \! -z "$includedir" ; then
9535 CPPFLAGS="$CPPFLAGS -I$includedir"
9537 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9538 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
9539 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
9540 echo "configure:9552: checking for sys/ipc.h" >&5
9541 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9542 echo $ac_n "(cached) $ac_c" 1>&6
9544 cat > conftest.$ac_ext <<EOF
9545 #line 9557 "configure"
9546 #include "confdefs.h"
9547 #include <sys/ipc.h>
9549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9550 { (eval echo configure:9562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9552 if test -z "$ac_err"; then
9554 eval "ac_cv_header_$ac_safe=yes"
9557 echo "configure: failed program was:" >&5
9558 cat conftest.$ac_ext >&5
9560 eval "ac_cv_header_$ac_safe=no"
9564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9565 echo "$ac_t""yes" 1>&6
9568 echo "$ac_t""no" 1>&6
9571 CPPFLAGS="$ac_save_CPPFLAGS"
9574 # if that succeeded, then check for sys/shm.h.
9575 if test "$have_xshm" = yes; then
9578 ac_save_CPPFLAGS="$CPPFLAGS"
9579 if test \! -z "$includedir" ; then
9580 CPPFLAGS="$CPPFLAGS -I$includedir"
9582 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9583 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
9584 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
9585 echo "configure:9597: checking for sys/shm.h" >&5
9586 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9587 echo $ac_n "(cached) $ac_c" 1>&6
9589 cat > conftest.$ac_ext <<EOF
9590 #line 9602 "configure"
9591 #include "confdefs.h"
9592 #include <sys/shm.h>
9594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9595 { (eval echo configure:9607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9597 if test -z "$ac_err"; then
9599 eval "ac_cv_header_$ac_safe=yes"
9602 echo "configure: failed program was:" >&5
9603 cat conftest.$ac_ext >&5
9605 eval "ac_cv_header_$ac_safe=no"
9609 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9610 echo "$ac_t""yes" 1>&6
9613 echo "$ac_t""no" 1>&6
9616 CPPFLAGS="$ac_save_CPPFLAGS"
9619 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
9620 # to exist, but the library code to not exist. And even better, the library
9621 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
9622 # lib doesn't exist, give up. (This lib gets added to X_EXTRA_LIBS, and
9623 # that's not quite right, but close enough.)
9627 if `uname -v` -eq 3 ; then
9630 ac_save_CPPFLAGS="$CPPFLAGS"
9631 ac_save_LDFLAGS="$LDFLAGS"
9632 # ac_save_LIBS="$LIBS"
9634 if test \! -z "$includedir" ; then
9635 CPPFLAGS="$CPPFLAGS -I$includedir"
9637 # note: $X_CFLAGS includes $x_includes
9638 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9640 if test \! -z "$libdir" ; then
9641 LDFLAGS="$LDFLAGS -L$libdir"
9643 # note: $X_LIBS includes $x_libraries
9644 LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9646 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
9647 echo "configure:9659: checking for XShmQueryExtension in -lXextSam" >&5
9648 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
9649 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9650 echo $ac_n "(cached) $ac_c" 1>&6
9652 ac_save_LIBS="$LIBS"
9653 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
9654 cat > conftest.$ac_ext <<EOF
9655 #line 9667 "configure"
9656 #include "confdefs.h"
9657 /* Override any gcc2 internal prototype to avoid an error. */
9658 /* We use char because int might match the return type of a gcc2
9659 builtin and then its argument prototype would still apply. */
9660 char XShmQueryExtension();
9663 XShmQueryExtension()
9666 if { (eval echo configure:9678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9668 eval "ac_cv_lib_$ac_lib_var=yes"
9670 echo "configure: failed program was:" >&5
9671 cat conftest.$ac_ext >&5
9673 eval "ac_cv_lib_$ac_lib_var=no"
9676 LIBS="$ac_save_LIBS"
9679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9680 echo "$ac_t""yes" 1>&6
9681 have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
9683 echo "$ac_t""no" 1>&6
9687 CPPFLAGS="$ac_save_CPPFLAGS"
9688 LDFLAGS="$ac_save_LDFLAGS"
9689 # LIBS="$ac_save_LIBS"
9695 # if that succeeded, then we've really got it.
9696 if test "$have_xshm" = yes; then
9697 cat >> confdefs.h <<\EOF
9698 #define HAVE_XSHM_EXTENSION 1
9703 elif test "$with_xshm" != no; then
9704 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
9709 ###############################################################################
9711 # Check for the DOUBLE-BUFFER server extension.
9713 ###############################################################################
9716 with_xdbe_req=unspecified
9717 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
9718 if test "${with_xdbe_ext+set}" = set; then
9719 withval="$with_xdbe_ext"
9720 with_xdbe="$withval"; with_xdbe_req="$withval"
9727 case "$with_xdbe" in
9732 echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
9733 echo "configure:9745: checking for DOUBLE-BUFFER headers" >&5
9734 d=$with_xdbe/include
9736 X_CFLAGS="-I$d $X_CFLAGS"
9737 echo "$ac_t""$d" 1>&6
9739 echo "$ac_t""not found ($d: no such directory)" 1>&6
9742 echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
9743 echo "configure:9755: checking for DOUBLE-BUFFER libs" >&5
9746 X_LIBS="-L$d $X_LIBS"
9747 echo "$ac_t""$d" 1>&6
9749 echo "$ac_t""not found ($d: no such directory)" 1>&6
9752 # replace the directory string with "yes".
9754 with_xdbe=$with_xdbe_req
9759 echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
9760 echo " If it is a directory, then \`DIR/include' will be added to"
9761 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9767 if test "$with_xdbe" = yes; then
9770 ac_save_CPPFLAGS="$CPPFLAGS"
9771 if test \! -z "$includedir" ; then
9772 CPPFLAGS="$CPPFLAGS -I$includedir"
9774 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9775 ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
9776 echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
9777 echo "configure:9789: checking for X11/extensions/Xdbe.h" >&5
9778 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9779 echo $ac_n "(cached) $ac_c" 1>&6
9781 cat > conftest.$ac_ext <<EOF
9782 #line 9794 "configure"
9783 #include "confdefs.h"
9784 #include <X11/extensions/Xdbe.h>
9786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9787 { (eval echo configure:9799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9789 if test -z "$ac_err"; then
9791 eval "ac_cv_header_$ac_safe=yes"
9794 echo "configure: failed program was:" >&5
9795 cat conftest.$ac_ext >&5
9797 eval "ac_cv_header_$ac_safe=no"
9801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9802 echo "$ac_t""yes" 1>&6
9805 echo "$ac_t""no" 1>&6
9808 CPPFLAGS="$ac_save_CPPFLAGS"
9809 if test "$have_xdbe" = yes; then
9810 cat >> confdefs.h <<\EOF
9811 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
9816 elif test "$with_xdbe" != no; then
9817 echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
9822 ###############################################################################
9824 # Check for the SGI XReadDisplay server extension.
9826 # Note: this has to be down here, rather than up with the other server
9827 # extension tests, so that the output of `configure --help' is in the
9828 # right order. Arrgh!
9830 ###############################################################################
9833 with_readdisplay_req=unspecified
9834 # Check whether --with-readdisplay or --without-readdisplay was given.
9835 if test "${with_readdisplay+set}" = set; then
9836 withval="$with_readdisplay"
9837 with_readdisplay="$withval"; with_readdisplay_req="$withval"
9839 with_readdisplay=yes
9844 case "$with_readdisplay" in
9849 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
9850 echo "configure:9862: checking for XReadDisplay headers" >&5
9851 d=$with_readdisplay/include
9853 X_CFLAGS="-I$d $X_CFLAGS"
9854 echo "$ac_t""$d" 1>&6
9856 echo "$ac_t""not found ($d: no such directory)" 1>&6
9859 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
9860 echo "configure:9872: checking for XReadDisplay libs" >&5
9861 d=$with_readdisplay/lib
9863 X_LIBS="-L$d $X_LIBS"
9864 echo "$ac_t""$d" 1>&6
9866 echo "$ac_t""not found ($d: no such directory)" 1>&6
9869 # replace the directory string with "yes".
9870 with_readdisplay_req="yes"
9871 with_readdisplay=$with_readdisplay_req
9876 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
9877 echo " If it is a directory, then \`DIR/include' will be added to"
9878 echo " the -I list, and \`DIR/lib' will be added to the -L list."
9884 if test "$with_readdisplay" = yes; then
9886 ac_save_CPPFLAGS="$CPPFLAGS"
9887 if test \! -z "$includedir" ; then
9888 CPPFLAGS="$CPPFLAGS -I$includedir"
9890 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9891 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
9892 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
9893 echo "configure:9905: checking for X11/extensions/readdisplay.h" >&5
9894 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9895 echo $ac_n "(cached) $ac_c" 1>&6
9897 cat > conftest.$ac_ext <<EOF
9898 #line 9910 "configure"
9899 #include "confdefs.h"
9900 #include <X11/extensions/readdisplay.h>
9902 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9903 { (eval echo configure:9915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9904 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9905 if test -z "$ac_err"; then
9907 eval "ac_cv_header_$ac_safe=yes"
9910 echo "configure: failed program was:" >&5
9911 cat conftest.$ac_ext >&5
9913 eval "ac_cv_header_$ac_safe=no"
9917 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9918 echo "$ac_t""yes" 1>&6
9919 cat >> confdefs.h <<\EOF
9920 #define HAVE_READ_DISPLAY_EXTENSION 1
9924 echo "$ac_t""no" 1>&6
9927 CPPFLAGS="$ac_save_CPPFLAGS"
9928 elif test "$with_readdisplay" != no; then
9929 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
9934 ###############################################################################
9936 # Check for a program to generate random text.
9938 # Zippy is funnier than the idiocy generally spat out by `fortune',
9939 # so first see if "fortune zippy" works. Else, use plain "fortune".
9941 # We used to dig around in Emacs to look for the "yow" program, but
9942 # most people who have Emacs also have "fortune zippy", so nevermind.
9944 ###############################################################################
9947 # Check whether --with-fortune or --without-fortune was given.
9948 if test "${with_fortune+set}" = set; then
9949 withval="$with_fortune"
9950 with_fortune_req="$withval"; with_fortune="$withval"
9956 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
9961 if test -n "$with_fortune_req" ; then
9962 ac_cv_fortune_program=""
9963 case "$with_fortune_req" in
9966 set dummy $with_fortune_req ; fortune_tmp=$2
9967 echo $ac_n "checking for $fortune_tmp""... $ac_c" 1>&6
9968 echo "configure:9980: checking for $fortune_tmp" >&5
9969 if test -x "$fortune_tmp" ; then
9970 echo "$ac_t""yes" 1>&6
9972 echo "$ac_t""no" 1>&6
9977 set dummy $with_fortune_req ; fortune_tmp=$2
9979 unset ac_cv_path_fortune_tmp
9980 # Extract the first word of "$fortune_tmp", so it can be a program name with args.
9981 set dummy $fortune_tmp; ac_word=$2
9982 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9983 echo "configure:9995: checking for $ac_word" >&5
9984 if eval "test \"`echo '$''{'ac_cv_path_fortune_tmp'+set}'`\" = set"; then
9985 echo $ac_n "(cached) $ac_c" 1>&6
9987 case "$fortune_tmp" in
9989 ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
9992 ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a dos path.
9995 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
9997 for ac_dir in $ac_dummy; do
9998 test -z "$ac_dir" && ac_dir=.
9999 if test -f $ac_dir/$ac_word; then
10000 ac_cv_path_fortune_tmp="$ac_dir/$ac_word"
10008 fortune_tmp="$ac_cv_path_fortune_tmp"
10009 if test -n "$fortune_tmp"; then
10010 echo "$ac_t""$fortune_tmp" 1>&6
10012 echo "$ac_t""no" 1>&6
10015 if test -z "$fortune_tmp" ; then
10020 ac_cv_fortune_program="$with_fortune"
10022 elif test -n "$ac_cv_fortune_program"; then
10023 echo "$ac_t""checking for fortune... (cached) $ac_cv_fortune_program" 1>&6
10026 unset ac_cv_path_fortune_tmp
10029 if test -z "$ac_cv_fortune_program" ; then
10031 # first look for fortune in /usr/games/ (and use absolute path)
10032 for ac_prog in fortune
10034 # Extract the first word of "$ac_prog", so it can be a program name with args.
10035 set dummy $ac_prog; ac_word=$2
10036 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
10037 echo "configure:10049: checking for $ac_word" >&5
10038 if eval "test \"`echo '$''{'ac_cv_path_fortune_tmp'+set}'`\" = set"; then
10039 echo $ac_n "(cached) $ac_c" 1>&6
10041 case "$fortune_tmp" in
10043 ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
10046 ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a dos path.
10049 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
10050 ac_dummy=""/usr/games""
10051 for ac_dir in $ac_dummy; do
10052 test -z "$ac_dir" && ac_dir=.
10053 if test -f $ac_dir/$ac_word; then
10054 ac_cv_path_fortune_tmp="$ac_dir/$ac_word"
10062 fortune_tmp="$ac_cv_path_fortune_tmp"
10063 if test -n "$fortune_tmp"; then
10064 echo "$ac_t""$fortune_tmp" 1>&6
10066 echo "$ac_t""no" 1>&6
10069 test -n "$fortune_tmp" && break
10073 # if it's not there, look on $PATH (and don't use absolute path)
10074 if test -z "$fortune_tmp" ; then
10075 for ac_prog in fortune
10077 # Extract the first word of "$ac_prog", so it can be a program name with args.
10078 set dummy $ac_prog; ac_word=$2
10079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
10080 echo "configure:10092: checking for $ac_word" >&5
10081 if eval "test \"`echo '$''{'ac_cv_prog_fortune_tmp'+set}'`\" = set"; then
10082 echo $ac_n "(cached) $ac_c" 1>&6
10084 if test -n "$fortune_tmp"; then
10085 ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
10087 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
10089 for ac_dir in $ac_dummy; do
10090 test -z "$ac_dir" && ac_dir=.
10091 if test -f $ac_dir/$ac_word; then
10092 ac_cv_prog_fortune_tmp="$ac_prog"
10099 fortune_tmp="$ac_cv_prog_fortune_tmp"
10100 if test -n "$fortune_tmp"; then
10101 echo "$ac_t""$fortune_tmp" 1>&6
10103 echo "$ac_t""no" 1>&6
10106 test -n "$fortune_tmp" && break
10111 # if we didn't find anything, then just assume /usr/games/
10112 if test -z "$fortune_tmp" ; then
10113 fortune_tmp="/usr/games/fortune"
10116 ac_cv_fortune_program="$fortune_tmp"
10118 # now check to see whether "fortune zippy" works.
10120 fortune_tmp="$fortune_tmp zippy"
10121 echo $ac_n "checking for zippy quotes""... $ac_c" 1>&6
10122 echo "configure:10134: checking for zippy quotes" >&5
10123 if ( $fortune_tmp >/dev/null 2>&1 ); then
10124 ac_cv_fortune_program="$fortune_tmp"
10125 echo "$ac_t""$fortune_tmp" 1>&6
10127 echo "$ac_t""no" 1>&6
10132 unset ac_cv_path_fortune_tmp
10135 cat >> confdefs.h <<EOF
10136 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
10141 ###############################################################################
10143 # Check whether it's ok to install some hacks as setuid (e.g., "sonar")
10144 # This should be safe, but let's give people the option.
10146 ###############################################################################
10148 setuid_hacks_default=no
10149 setuid_hacks="$setuid_hacks_default"
10150 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
10151 if test "${with_setuid_hacks+set}" = set; then
10152 withval="$with_setuid_hacks"
10153 setuid_hacks="$withval"
10155 setuid_hacks="$setuid_hacks_default"
10160 case "$setuid_hacks" in
10165 echo $ac_n "checking for setuid hacks headers""... $ac_c" 1>&6
10166 echo "configure:10178: checking for setuid hacks headers" >&5
10167 d=$setuid_hacks/include
10168 if test -d $d; then
10169 X_CFLAGS="-I$d $X_CFLAGS"
10170 echo "$ac_t""$d" 1>&6
10172 echo "$ac_t""not found ($d: no such directory)" 1>&6
10175 echo $ac_n "checking for setuid hacks libs""... $ac_c" 1>&6
10176 echo "configure:10188: checking for setuid hacks libs" >&5
10177 d=$setuid_hacks/lib
10178 if test -d $d; then
10179 X_LIBS="-L$d $X_LIBS"
10180 echo "$ac_t""$d" 1>&6
10182 echo "$ac_t""not found ($d: no such directory)" 1>&6
10185 # replace the directory string with "yes".
10186 setuid_hacks_req="yes"
10187 setuid_hacks=$setuid_hacks_req
10192 echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
10193 echo " If it is a directory, then \`DIR/include' will be added to"
10194 echo " the -I list, and \`DIR/lib' will be added to the -L list."
10200 if test "$setuid_hacks" = yes; then
10202 elif test "$setuid_hacks" != no; then
10203 echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
10208 ###############################################################################
10210 # Done testing. Now, set up the various -I and -L variables,
10211 # and decide which GUI program to build by default.
10213 ###############################################################################
10220 if test \! -z "$includedir" ; then
10221 INCLUDES="$INCLUDES -I$includedir"
10224 if test \! -z "$libdir" ; then
10225 LDFLAGS="$LDFLAGS -L$libdir"
10229 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
10231 if test "$have_motif" = yes; then
10232 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
10233 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
10235 if test "$have_gtk" = yes; then
10236 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
10237 ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
10241 if test "$have_kerberos" = yes; then
10242 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
10243 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
10245 if test "$have_pam" = yes; then
10246 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
10247 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
10248 INSTALL_PAM="install-pam"
10250 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
10251 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
10254 if test "$enable_locking" = yes; then
10255 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
10256 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
10258 LOCK_SRCS='$(NOLOCK_SRCS_1)'
10259 LOCK_OBJS='$(NOLOCK_OBJS_1)'
10262 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
10264 if test "$need_setuid" = yes; then
10270 if test "$setuid_hacks" = yes; then
10277 if test "$have_gl" = yes; then
10278 GL_EXES='$(GL_EXES)'
10279 GL_UTIL_EXES='$(GL_UTIL_EXES)'
10281 GL_KLUDGE="${tab} "
10283 GL_KLUDGE="-${tab} "
10286 if test "$have_gle" = yes; then
10287 GLE_EXES='$(GLE_EXES)'
10288 GLE_MEN='$(GLE_MEN)'
10289 GLE_KLUDGE="${tab} "
10291 GLE_KLUDGE="-${tab} "
10294 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
10295 JPEG_EXES='$(JPEG_EXES)'
10299 # Another substitution in the XScreenSaver.ad.in file:
10301 if test "$have_gnome_help" = yes; then
10310 # Now that we know whether we have Gnome, we can decide where the XML
10311 # config files get installed.
10312 if test -z "$HACK_CONF_DIR" ; then
10313 if test -n "$GNOME_DATADIR" ; then
10314 HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
10316 HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
10320 # canonicalize slashes.
10321 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
10325 ###############################################################################
10327 # Perform substitutions and write Makefiles.
10329 ###############################################################################
10376 APPDEFAULTS=$ac_x_app_defaults
10385 cat > confcache <<\EOF
10386 # This file is a shell script that caches the results of configure
10387 # tests run on this system so they can be shared between configure
10388 # scripts and configure runs. It is not useful on other systems.
10389 # If it contains results you don't want to keep, you may remove or edit it.
10391 # By default, configure uses ./config.cache as the cache file,
10392 # creating it if it does not exist already. You can give configure
10393 # the --cache-file=FILE option to use a different cache file; that is
10394 # what configure does when it calls configure scripts in
10395 # subdirectories, so they share the cache.
10396 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10397 # config.status only pays attention to the cache file if you give it the
10398 # --recheck option to rerun configure.
10401 # The following way of writing the cache mishandles newlines in values,
10402 # but we know of no workaround that is simple, portable, and efficient.
10403 # So, don't put newlines in cache variables' values.
10404 # Ultrix sh set writes to stderr and can't be redirected directly,
10405 # and sets the high bit in the cache file unless we assign to the vars.
10407 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10409 # `set' does not quote correctly, so add quotes (double-quote substitution
10410 # turns \\\\ into \\, and sed turns \\ into \).
10412 -e "s/'/'\\\\''/g" \
10413 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10416 # `set' quotes correctly as required by POSIX, so do not add quotes.
10417 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10420 if cmp -s $cache_file confcache; then
10423 if test -w $cache_file; then
10424 echo "updating cache $cache_file"
10425 cat confcache > $cache_file
10427 echo "not updating unwritable cache $cache_file"
10432 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10434 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10435 # Let make expand exec_prefix.
10436 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10438 # Any assignment to VPATH causes Sun make to only execute
10439 # the first set of double-colon rules, so remove it if not needed.
10440 # If there is a colon in the path, we need to keep it.
10441 if test "x$srcdir" = x.; then
10442 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10445 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10447 DEFS=-DHAVE_CONFIG_H
10449 # Without the "./", some shells look in PATH for config.status.
10450 : ${CONFIG_STATUS=./config.status}
10452 echo creating $CONFIG_STATUS
10453 rm -f $CONFIG_STATUS
10454 cat > $CONFIG_STATUS <<EOF
10456 # Generated automatically by configure.
10457 # Run this file to recreate the current configuration.
10458 # This directory was configured as follows,
10459 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10461 # $0 $ac_configure_args
10463 # Compiler output produced by configure, useful for debugging
10464 # configure, is in ./config.log if it exists.
10466 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10469 case "\$ac_option" in
10470 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10471 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10472 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10473 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10474 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10476 -help | --help | --hel | --he | --h)
10477 echo "\$ac_cs_usage"; exit 0 ;;
10478 *) echo "\$ac_cs_usage"; exit 1 ;;
10482 ac_given_srcdir=$srcdir
10483 ac_given_INSTALL="$INSTALL"
10485 trap 'rm -fr `echo "Makefile
10490 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10492 cat >> $CONFIG_STATUS <<EOF
10494 # Protect against being on the right side of a sed subst in config.status.
10495 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10496 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10500 s%@CFLAGS@%$CFLAGS%g
10501 s%@CPPFLAGS@%$CPPFLAGS%g
10502 s%@CXXFLAGS@%$CXXFLAGS%g
10503 s%@FFLAGS@%$FFLAGS%g
10505 s%@LDFLAGS@%$LDFLAGS%g
10507 s%@exec_prefix@%$exec_prefix%g
10508 s%@prefix@%$prefix%g
10509 s%@program_transform_name@%$program_transform_name%g
10510 s%@bindir@%$bindir%g
10511 s%@sbindir@%$sbindir%g
10512 s%@libexecdir@%$libexecdir%g
10513 s%@datadir@%$datadir%g
10514 s%@sysconfdir@%$sysconfdir%g
10515 s%@sharedstatedir@%$sharedstatedir%g
10516 s%@localstatedir@%$localstatedir%g
10517 s%@libdir@%$libdir%g
10518 s%@includedir@%$includedir%g
10519 s%@oldincludedir@%$oldincludedir%g
10520 s%@infodir@%$infodir%g
10521 s%@mandir@%$mandir%g
10523 s%@host_alias@%$host_alias%g
10524 s%@host_cpu@%$host_cpu%g
10525 s%@host_vendor@%$host_vendor%g
10526 s%@host_os@%$host_os%g
10529 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10530 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10531 s%@INSTALL_DATA@%$INSTALL_DATA%g
10532 s%@SET_MAKE@%$SET_MAKE%g
10534 s%@X_CFLAGS@%$X_CFLAGS%g
10535 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
10536 s%@X_LIBS@%$X_LIBS%g
10537 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
10538 s%@glib_config@%$glib_config%g
10539 s%@gtk_config@%$gtk_config%g
10540 s%@gnome_config@%$gnome_config%g
10541 s%@have_gnome_help@%$have_gnome_help%g
10542 s%@fortune_tmp@%$fortune_tmp%g
10543 s%@INCLUDES@%$INCLUDES%g
10544 s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
10545 s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
10546 s%@SAVER_LIBS@%$SAVER_LIBS%g
10547 s%@MOTIF_LIBS@%$MOTIF_LIBS%g
10548 s%@GTK_LIBS@%$GTK_LIBS%g
10549 s%@XML_LIBS@%$XML_LIBS%g
10550 s%@JPEG_LIBS@%$JPEG_LIBS%g
10551 s%@HACK_LIBS@%$HACK_LIBS%g
10552 s%@XPM_LIBS@%$XPM_LIBS%g
10553 s%@GL_LIBS@%$GL_LIBS%g
10554 s%@GLE_LIBS@%$GLE_LIBS%g
10555 s%@XDPMS_LIBS@%$XDPMS_LIBS%g
10556 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
10557 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
10558 s%@SETUID_HACKS@%$SETUID_HACKS%g
10559 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
10560 s%@NEED_SETUID@%$NEED_SETUID%g
10561 s%@INSTALL_PAM@%$INSTALL_PAM%g
10562 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
10563 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
10564 s%@XMU_SRCS@%$XMU_SRCS%g
10565 s%@XMU_OBJS@%$XMU_OBJS%g
10566 s%@XMU_LIBS@%$XMU_LIBS%g
10567 s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g
10568 s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g
10569 s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g
10570 s%@LOCK_SRCS@%$LOCK_SRCS%g
10571 s%@LOCK_OBJS@%$LOCK_OBJS%g
10572 s%@JPEG_EXES@%$JPEG_EXES%g
10573 s%@GL_EXES@%$GL_EXES%g
10574 s%@GL_UTIL_EXES@%$GL_UTIL_EXES%g
10575 s%@GL_MEN@%$GL_MEN%g
10576 s%@GL_KLUDGE@%$GL_KLUDGE%g
10577 s%@GLE_EXES@%$GLE_EXES%g
10578 s%@GLE_MEN@%$GLE_MEN%g
10579 s%@GLE_KLUDGE@%$GLE_KLUDGE%g
10580 s%@GNOMEHELP_Y@%$GNOMEHELP_Y%g
10581 s%@GNOMEHELP_N@%$GNOMEHELP_N%g
10582 s%@HACKDIR@%$HACKDIR%g
10583 s%@GNOME_DATADIR@%$GNOME_DATADIR%g
10584 s%@HACK_CONF_DIR@%$HACK_CONF_DIR%g
10585 s%@APPDEFAULTS@%$APPDEFAULTS%g
10586 s%@DEPEND@%$DEPEND%g
10587 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
10588 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
10593 cat >> $CONFIG_STATUS <<\EOF
10595 # Split the substitutions into bite-sized pieces for seds with
10596 # small command number limits, like on Digital OSF/1 and HP-UX.
10597 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10598 ac_file=1 # Number of current file.
10599 ac_beg=1 # First line for current file.
10600 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10603 while $ac_more_lines; do
10604 if test $ac_beg -gt 1; then
10605 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10607 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10609 if test ! -s conftest.s$ac_file; then
10610 ac_more_lines=false
10611 rm -f conftest.s$ac_file
10613 if test -z "$ac_sed_cmds"; then
10614 ac_sed_cmds="sed -f conftest.s$ac_file"
10616 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10618 ac_file=`expr $ac_file + 1`
10620 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10623 if test -z "$ac_sed_cmds"; then
10628 cat >> $CONFIG_STATUS <<EOF
10630 CONFIG_FILES=\${CONFIG_FILES-"Makefile
10635 driver/XScreenSaver.ad"}
10637 cat >> $CONFIG_STATUS <<\EOF
10638 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10639 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10641 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10642 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10643 *) ac_file_in="${ac_file}.in" ;;
10646 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10648 # Remove last slash and all that follows it. Not all systems have dirname.
10649 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10650 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10651 # The file is in a subdirectory.
10652 test ! -d "$ac_dir" && mkdir "$ac_dir"
10653 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10654 # A "../" for each directory in $ac_dir_suffix.
10655 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10657 ac_dir_suffix= ac_dots=
10660 case "$ac_given_srcdir" in
10662 if test -z "$ac_dots"; then top_srcdir=.
10663 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10664 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10665 *) # Relative path.
10666 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10667 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10670 case "$ac_given_INSTALL" in
10671 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10672 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10675 echo creating "$ac_file"
10677 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10679 *Makefile*) ac_comsub="1i\\
10680 # $configure_input" ;;
10684 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10686 s%@configure_input@%$configure_input%g
10687 s%@srcdir@%$srcdir%g
10688 s%@top_srcdir@%$top_srcdir%g
10689 s%@INSTALL@%$INSTALL%g
10690 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10694 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10695 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10697 # ac_d sets the value in "#define NAME VALUE" lines.
10698 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10699 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10702 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10703 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10704 ac_uB='\([ ]\)%\1#\2define\3'
10707 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10708 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10709 ac_eB='$%\1#\2define\3'
10713 if test "${CONFIG_HEADERS+set}" != set; then
10715 cat >> $CONFIG_STATUS <<EOF
10716 CONFIG_HEADERS="config.h"
10718 cat >> $CONFIG_STATUS <<\EOF
10720 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10721 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10723 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10724 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10725 *) ac_file_in="${ac_file}.in" ;;
10728 echo creating $ac_file
10730 rm -f conftest.frag conftest.in conftest.out
10731 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10732 cat $ac_file_inputs > conftest.in
10736 # Transform confdefs.h into a sed script conftest.vals that substitutes
10737 # the proper values into config.h.in to produce config.h. And first:
10738 # Protect against being on the right side of a sed subst in config.status.
10739 # Protect against being in an unquoted here document in config.status.
10740 rm -f conftest.vals
10741 cat > conftest.hdr <<\EOF
10744 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10748 sed -n -f conftest.hdr confdefs.h > conftest.vals
10751 # This sed command replaces #undef with comments. This is necessary, for
10752 # example, in the case of _POSIX_SOURCE, which is predefined and required
10753 # on some systems where configure will not decide to define it.
10754 cat >> conftest.vals <<\EOF
10755 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10758 # Break up conftest.vals because some shells have a limit on
10759 # the size of here documents, and old seds have small limits too.
10761 rm -f conftest.tail
10764 ac_lines=`grep -c . conftest.vals`
10765 # grep -c gives empty output for an empty file on some AIX systems.
10766 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10767 # Write a limited-size here document to conftest.frag.
10768 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10769 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10771 sed -f conftest.frag conftest.in > conftest.out
10773 mv conftest.out conftest.in
10774 ' >> $CONFIG_STATUS
10775 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10776 rm -f conftest.vals
10777 mv conftest.tail conftest.vals
10779 rm -f conftest.vals
10781 cat >> $CONFIG_STATUS <<\EOF
10782 rm -f conftest.frag conftest.h
10783 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10784 cat conftest.in >> conftest.h
10786 if cmp -s $ac_file conftest.h 2>/dev/null; then
10787 echo "$ac_file is unchanged"
10790 # Remove last slash and all that follows it. Not all systems have dirname.
10791 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10792 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10793 # The file is in a subdirectory.
10794 test ! -d "$ac_dir" && mkdir "$ac_dir"
10797 mv conftest.h $ac_file
10802 cat >> $CONFIG_STATUS <<EOF
10805 cat >> $CONFIG_STATUS <<\EOF
10809 chmod +x $CONFIG_STATUS
10810 rm -fr confdefs* $ac_clean_files
10811 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10814 ###############################################################################
10816 # Print some warnings at the end.
10818 ###############################################################################
10820 warn_prefix_1=" Warning:"
10821 warn_prefix_2=" Note:"
10822 warn_prefix="$warn_prefix_1"
10825 warnsep=' #################################################################'
10828 if test "$warning" = no ; then
10829 echo '' ; echo "$warnsep" ; echo ''
10836 if test "$warning" = long ; then echo '' ; fi
10839 echo "$warn_prefix $rest"
10846 if test "$was" != no ; then echo '' ; fi
10848 echo "$warn_prefix $rest"
10858 warn_prefix="$warn_prefix_2"
10860 warn_prefix="$warn_prefix_1"
10864 warn_prefix="$warn_prefix_2"
10866 warn_prefix="$warn_prefix_1"
10870 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
10871 warn 'The SGI saver extension was requested, but was not found.'
10874 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
10875 warn 'The MIT saver extension was requested, but was not found.'
10878 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
10879 warn 'The XIdle extension was requested, but was not found.'
10882 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
10883 warn 'The XSHM extension was requested, but was not found.'
10886 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
10887 warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
10890 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
10891 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
10894 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
10895 warn 'The DPMS extension was requested, but was not found.'
10898 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
10899 warn 'The Xinerama extension was requested, but was not found.'
10902 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
10903 warn 'The XF86VMODE extension was requested, but was not found.'
10906 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
10907 warn "Checking of /proc/interrupts was requested, but it's bogus."
10911 if test "$have_motif" = no -a "$have_gtk" = no; then
10912 warnL "Neither Motif nor Gtk seem to be available;"
10913 warn2 "the \`xscreensaver-demo' program requires one of these."
10915 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
10916 warnL "Use of Motif was requested, but it wasn't found;"
10917 warn2 "Gtk will be used instead."
10919 elif test "$jurassic_gtk" = yes ; then
10923 v="$ac_gtk_version_string"
10924 if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
10925 warnL "Use of Gtk was requested, but its version number is unknown;"
10926 elif test "$with_gtk_req" = yes ; then
10927 warnL "Use of Gtk was requested, but it is version $v;"
10929 warnL "Gtk was found on this system, but it is version $v;"
10932 warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
10934 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
10935 warnL "Use of Gtk was requested, but it wasn't found;"
10936 warn2 "Motif will be used instead."
10941 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
10942 warn 'Use of the Gnome Control Panel was requested, but the necessary'
10943 warn2 'headers and/or libraries were not found.'
10946 if test "$have_gtk" = yes ; then
10947 if test "$have_xml" = no ; then
10948 if test "$with_xml_req" = yes ; then
10949 warn 'Use of the XML library was requested, but the necessary'
10950 warn2 'headers and/or libraries were not found.'
10952 warn 'GTK is being used, but the XML library was not found.'
10955 if test "$xml_halfassed" = yes ; then
10957 warn2 'More specifically, we found the headers, but not the'
10958 warn2 'libraries; so either XML is half-installed on this'
10959 warn2 "system, or something else went wrong. The \`config.log'"
10960 warn2 'file might contain some clues.'
10964 warn2 "Without XML, the per-display-mode \`Settings' dialogs"
10965 warn2 'will not be available. Specify the location of the XML'
10966 warn2 'library through the --with-xml option to configure.'
10970 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
10972 preferred_lesstif=0.92
10974 if test "$lesstif_version" = unknown; then
10975 warnL "Unable to determine the LessTif version number!"
10976 warn2 "Make sure you are using version $preferred_lesstif or newer."
10977 warn2 "See <http://www.lesstif.org/>."
10979 elif test \! $lesstif_version -gt 82; then
10980 warnL "LessTif version $lesstif_version_string is being used."
10981 warn2 "LessTif versions 0.82 and earlier are too buggy to"
10982 warn2 "use with XScreenSaver; it is strongly recommended"
10983 warn2 "that you upgrade to at least version $preferred_lesstif!"
10984 warn2 "See <http://www.lesstif.org/>."
10989 if test "$have_motif" = yes -a "$have_gtk" = no ; then
10990 warn 'Motif is being used, and GTK is not.'
10992 warn2 'Though the Motif front-end to xscreensaver is still'
10993 warn2 'maintained, it is no longer being updated with new'
10994 warn2 'features: all new development on the xscreensaver-demo'
10995 warn2 'program is happening in the GTK version, and not in the'
10996 warn2 'Motif version. It is recommended that you build against'
10997 warn2 'GTK instead of Motif. See <http://www.gtk.org/>.'
11001 if test "$with_xpm_req" = yes ; then
11002 warnL 'Use of XPM was requested, but it was not found.'
11005 if test "$with_gdk_pixbuf_req" = yes ; then
11006 warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
11009 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no; then
11011 if test "$with_xpm_req" = yes ; then
11013 elif test "$with_xpm_req" = no ; then
11014 warnL 'The XPM library is not being used.'
11016 warnL 'The XPM library was not found.'
11019 if test "$with_gdk_pixbuf_req" = yes ; then
11021 elif test "$with_gdk_pixbuf_req" = no ; then
11022 warnL 'The GDK-Pixbuf library is not being used.'
11024 warnL 'The GDK-Pixbuf library was not found.'
11028 warn2 'Some of the demos will not be as colorful as they'
11029 warn2 'could be. You should consider installing Pixbuf or'
11030 warn2 'XPM and re-running configure. (Remember to delete'
11031 warn2 'the config.cache file first.) The Pixbuf library is'
11032 warn2 'a part of GNOME. The XPM library comes with most'
11033 warn2 'X11 installations; you can also find it at the X11'
11034 warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
11036 warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
11037 warn2 'support for more image formats.'
11041 if test "$have_jpeg" = no ; then
11042 if test "$with_jpeg_req" = yes ; then
11043 warnL 'Use of libjpeg was requested, but it was not found.'
11044 elif test "$with_jpeg_req" = no ; then
11045 noteL 'The JPEG library is not being used.'
11047 noteL 'The JPEG library was not found.'
11050 if test "$jpeg_halfassed" = yes ; then
11052 warn2 'More specifically, we found the headers, but not the'
11053 warn2 'library; so either JPEG is half-installed on this'
11054 warn2 "system, or something else went wrong. The \`config.log'"
11055 warn2 'file might contain some clues.'
11059 warn2 "This means the \`webcollage' program will be much slower."
11063 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
11064 preferred_mesagl=3.4
11065 mgv="$ac_mesagl_version_string"
11066 pgl="$preferred_mesagl"
11068 if test "$ac_mesagl_version" = unknown; then
11069 warnL "Unable to determine the MesaGL version number!"
11070 warn2 "Make sure you are using version $preferred_mesagl or newer."
11072 elif test \! "$ac_mesagl_version" -gt 2006; then
11073 warnL "MesaGL version $mgv is being used. MesaGL 2.6 and earlier"
11074 warn2 "have a security bug. It is strongly recommended that you"
11075 warn2 "upgrade to at least version $preferred_mesagl."
11077 elif test \! "$ac_mesagl_version" -gt 3003; then
11078 warnL "MesaGL version $mgv is being used. That version has some"
11079 warn2 "bugs; it is recommended that you upgrade to $pgl or newer."
11083 if test "$have_gl" = no ; then
11084 if test "$with_gl_req" = yes ; then
11085 warnL 'Use of GL was requested, but it was not found.'
11086 elif test "$with_gl_req" = no ; then
11087 noteL 'The OpenGL 3D library is not being used.'
11089 noteL 'The OpenGL 3D library was not found.'
11092 if test "$gl_halfassed" = yes ; then
11094 warn2 'More specifically, we found the headers, but not the'
11095 warn2 'libraries; so either GL is half-installed on this'
11096 warn2 "system, or something else went wrong. The \`config.log'"
11097 warn2 'file might contain some clues.'
11101 warn2 'Those demos which use 3D will not be built or installed.'
11102 warn2 'You might want to consider installing OpenGL and'
11103 warn2 're-running configure. (Remember to delete the'
11104 warn2 "config.cache file first.) If your vendor doesn't ship"
11105 warn2 'their own implementation of OpenGL, you can get a free'
11106 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
11107 warn2 'info, see <http://www.opengl.org/>.'
11112 if test "$have_gl" = yes -a "$have_gle" = no ; then
11113 if test "$with_gle_req" = yes ; then
11114 noteL 'Use of the GLE (GL Extrusion) library was requested, but'
11115 warn2 'it was not found (though the OpenGL library was found, and'
11116 warn2 'is being used.)'
11117 elif test "$with_gle_req" = no ; then
11118 noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
11119 warn2 'library is not.'
11121 noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
11125 if test "$gle_halfassed" = yes ; then
11127 warn2 'More specifically, we found the headers, but not the'
11128 warn2 'libraries; so either GLE is half-installed on this'
11129 warn2 "system, or something else went wrong. The \`config.log'"
11130 warn2 'file might contain some clues.'
11134 warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
11135 warn2 'will not be built or installed. You might want to consider'
11136 warn2 'installing GLE and re-running configure. (Remember to delete'
11137 warn2 'the config.cache file first.) You can find the GLE library'
11138 warn2 'at <http://www.linas.org/gle/>. For general OpenGL info,'
11139 warn2 'see <http://www.opengl.org/>.'
11144 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
11145 warn 'Use of XReadDisplay was requested, but it was not found.'
11148 if test -n "$with_fortune_req"; then
11149 if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
11150 warnL "$with_fortune_req was requested as the Fortune program,"
11151 warn2 "but was not found. The default will be used instead."
11155 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
11156 warn 'Use of Kerberos was requested, but it was not found.'
11159 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
11160 warn 'Use of PAM was requested, but it was not found.'
11163 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
11164 warn 'Use of shadow passwords was requested, but they were not found.'
11168 # You are in a twisty maze of namespaces and syntaxes, all alike.
11169 # Fuck the skull of Unix.
11171 eval bindir=${bindir}
11172 eval bindir=${bindir}
11173 eval bindir=${bindir}
11174 eval bindir=${bindir}
11175 eval bindir=${bindir}
11176 eval bindir=${bindir}
11177 eval HACKDIR=${HACKDIR}
11178 eval HACKDIR=${HACKDIR}
11179 eval HACKDIR=${HACKDIR}
11180 eval HACKDIR=${HACKDIR}
11181 eval HACKDIR=${HACKDIR}
11182 eval HACKDIR=${HACKDIR}
11183 eval HACK_CONF_DIR=${HACK_CONF_DIR}
11184 eval HACK_CONF_DIR=${HACK_CONF_DIR}
11185 eval HACK_CONF_DIR=${HACK_CONF_DIR}
11186 eval HACK_CONF_DIR=${HACK_CONF_DIR}
11187 eval HACK_CONF_DIR=${HACK_CONF_DIR}
11188 eval HACK_CONF_DIR=${HACK_CONF_DIR}
11190 # canonicalize slashes.
11191 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
11192 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
11193 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
11196 # Sanity check the hackdir
11197 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
11198 if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
11200 { echo "configure: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
11201 There will be an executable installed with that name, so
11202 that can't be the name of a directory as well. Please
11203 re-configure with a different directory name." 1>&2; exit 1; }
11210 # Now let's see if there's a previous RPM version already installed. Blargh!
11214 rpmv=`(rpm -qv xscreensaver) 2>&- | \
11215 sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
11218 if test \! -z "$rpmv" ; then
11219 rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
11220 rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
11223 warnL "There is already an installed RPM of xscreensaver $rpmv"
11224 warn2 "on this system. You might want to remove it (with"
11225 warn2 '"rpm -ve xscreensaver") before running "make install"'
11226 warn2 "from this directory."
11228 warn2 "Alternately, you could build this version of xscreensaver"
11229 warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
11230 warn2 "file is included. See the RPM documentation for more info."
11233 if test "$rpmbdir" = "$rpmhdir" ; then
11234 warn2 "The RPM version was installed in $rpmbdir/."
11236 warn2 "The RPM version was installed in $rpmbdir/,"
11237 warn2 "with demos in $rpmhdir/."
11244 if test "${bindir}" = "${HACKDIR}" ; then
11248 if test "$do_dir_warning" = yes; then
11252 echo ' When you run "make install", the "xscreensaver",'
11253 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
11254 echo " will be installed in ${bindir}/."
11256 echo " The various graphics demos (140+ different executables) will"
11257 echo " also be installed in ${HACKDIR}/."
11259 echo " If you would prefer the demos to be installed elsewhere"
11260 echo " (for example, in a dedicated directory) you should re-run"
11261 echo " configure with the --with-hackdir=DIR option. For more"
11262 echo " information, run $0 --help."
11266 if test "$warning" != no; then
11267 echo '' ; echo "$warnsep" ; echo ''
11270 if test "$do_dir_warning" = no; then
11271 if test "$warning" = no; then
11274 echo "User programs will be installed in ${bindir}/"
11275 echo "Screen savers will be installed in ${HACKDIR}/"
11276 echo "Configuration will be installed in ${HACK_CONF_DIR}/"