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:
17 --enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir',
18 instead of putting them in bindir itself. You can
19 specify the name of the subdirectory. For example,
20 --exec-prefix=/usr/local/bin --enable-subdir=demos
21 would put xscreensaver in /usr/local/bin/, and would
22 put the demos in /usr/local/bin/demos/. (If DIR
23 begins with /, then bindir will not be prepended.)
25 --disable-subdir Just put the demos in \`bindir' (this is the default.)
29 Except where noted, all of the --with options below can also take a
30 directory argument: for example, --with-motif=/opt/Motif. That would
31 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
32 to be added to the -L list, assuming those directories exist.
34 X Server Extension options:
36 --with-sgi-ext Include support for the SGI SCREEN_SAVER
37 server extension, if possible (this is the default).
38 --without-sgi-ext Do not compile in support for this extension."
40 --with-mit-ext Include support for the MIT-SCREEN-SAVER
41 server extension, if possible (this is the default).
42 --without-mit-ext Do not compile in support for this extension."
44 --with-xidle-ext Include support for the XIDLE server extension,
45 if possible (this is the default).
46 --without-xidle-ext Do not compile in support for this extension."
48 --with-xshm-ext Include support for the XSHM (Shared Memory) server
49 extension, if possible (this is the default).
50 --without-xshm-ext Do not compile in support for this extension."
52 --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL server
53 extension, if possible (this is the default).
54 --without-sgivc-ext Do not compile in support for this extension."
56 --with-dpms-ext Include support for the DPMS server extension,
57 if possible (this is the default).
58 --without-dpms-ext Do not compile in support for this extension."
60 --with-proc-interrupts Include support for consulting the /proc/interrupts
61 file to notice keyboard activity, if possible.
62 --without-proc-interrupts Do not compile in support for this method."
65 X Client Toolkit options:
67 --with-motif Use the Motif toolkit for the user interface, if
68 possible (this is the default).
69 --without-motif Do not use Motif."
71 --with-athena Use the Athena toolkit for the user interface, if
72 possible (this is the default if Motif isn't used.)
73 --without-athena Do not use Athena."
76 Graphics Demo options:
78 --with-xpm Include support for XPM files in some demos,
79 if possible (this is the default).
80 --without-xpm Do not compile in support for XPM files."
82 --with-gl Build those demos which depend on OpenGL,
83 if possible (this is the default).
84 --without-gl Do not build the OpenGL demos."
86 --with-readdisplay Include support for the XReadDisplay server
87 extension if possible (this is the default).
88 --without-readdisplay Do not compile in support for this extension."
90 --with-sgivideo Include support for SGI's Iris Video Library
91 if possible (this is the default).
92 --without-sgivideo Do not compile in support for this library."
94 --with-zippy=PROGRAM Some demos are able to run an external program and
95 display its text; this names the program to use by
96 default (though it can be overridden with X
97 resources.) If you don't specify this, the default
98 is to use \"yow\" from the Emacs distribution (if you
99 have it) or else to use \"fortune\"."
102 Screen Locking options:
104 --enable-locking Compile in support for locking the display
105 (this is the default.)
106 --disable-locking Do not allow locking at all."
109 --enable-vt-locking Compile in support for locking Virtual Terminals.
110 This is the default if the system supports it, and
111 if locking support is included (--enable-locking.)
112 --disable-vt-locking Do not allow locking of VTs, even if locking is
116 --with-kerberos Include support for Kerberos authentication,
117 if possible (this is the default.)
118 --without-kerberos Do not compile in support for Kerberos."
120 --with-pam Include support for PAM (Pluggable Authentication
121 Modules) if possible (this is the default.)
122 --without-pam Do not compile in support for PAM."
124 --with-shadow Include support for shadow password authentication,
125 if possible (this is the default, if no Kerberos or
127 --without-shadow Do not compile in support for shadow passwords.
130 # Initialize some variables set by options.
131 # The variables have the same names as the options, with
132 # dashes changed to underlines.
134 cache_file=./config.cache
143 program_transform_name=s,x,x,
151 bindir='${exec_prefix}/bin'
152 sbindir='${exec_prefix}/sbin'
153 libexecdir='${exec_prefix}/libexec'
154 datadir='${prefix}/share'
155 sysconfdir='${prefix}/etc'
156 sharedstatedir='${prefix}/com'
157 localstatedir='${prefix}/var'
158 libdir='${exec_prefix}/lib'
159 includedir='${prefix}/include'
160 oldincludedir='/usr/include'
161 infodir='${prefix}/info'
162 mandir='${prefix}/man'
164 # Initialize some other variables.
167 SHELL=${CONFIG_SHELL-/bin/sh}
168 # Maximum number of lines to put in a shell here document.
175 # If the previous option needs an argument, assign it.
176 if test -n "$ac_prev"; then
177 eval "$ac_prev=\$ac_option"
183 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
187 # Accept the important Cygnus configure options, so we can diagnose typos.
191 -bindir | --bindir | --bindi | --bind | --bin | --bi)
193 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
194 bindir="$ac_optarg" ;;
196 -build | --build | --buil | --bui | --bu)
198 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
199 build="$ac_optarg" ;;
201 -cache-file | --cache-file | --cache-fil | --cache-fi \
202 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
203 ac_prev=cache_file ;;
204 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
205 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
206 cache_file="$ac_optarg" ;;
208 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
210 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
212 datadir="$ac_optarg" ;;
214 -disable-* | --disable-*)
215 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
216 # Reject names that are not valid shell variable names.
217 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
218 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
220 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
221 eval "enable_${ac_feature}=no" ;;
223 -enable-* | --enable-*)
224 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
225 # Reject names that are not valid shell variable names.
226 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
227 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
229 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
234 eval "enable_${ac_feature}='$ac_optarg'" ;;
236 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
237 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
238 | --exec | --exe | --ex)
239 ac_prev=exec_prefix ;;
240 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
241 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
242 | --exec=* | --exe=* | --ex=*)
243 exec_prefix="$ac_optarg" ;;
245 -gas | --gas | --ga | --g)
246 # Obsolete; use --with-gas.
249 -help | --help | --hel | --he)
250 # Omit some internal or obsolete options to make the list less imposing.
251 # This message is too long to be a string in the A/UX 3.1 sh.
253 Usage: configure [options] [host]
254 Options: [defaults in brackets after descriptions]
258 --cache-file=FILE cache test results in FILE
259 --help print this message
260 --no-create do not create output files
261 --quiet, --silent do not print \`checking...' messages
262 --version print the version of autoconf that created configure
264 Directory and file names:
266 --prefix=PREFIX install architecture-independent files in PREFIX
268 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
270 --bindir=DIR user executables in DIR [EPREFIX/bin]
271 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
272 --includedir=DIR C header files in DIR [PREFIX/include]
273 --x-includes=DIR X include files are in DIR
274 --x-libraries=DIR X library files are in DIR
275 --mandir=DIR man documentation in DIR [PREFIX/man]
276 --srcdir=DIR find the sources in DIR [configure dir or ..]
277 --program-prefix=PREFIX prepend PREFIX to installed program names
278 --program-suffix=SUFFIX append SUFFIX to installed program names
279 --program-transform-name=PROGRAM
280 run sed PROGRAM on installed program names
286 --build=BUILD configure for building on BUILD [BUILD=HOST]
287 --host=HOST configure for HOST [guessed]
288 --target=TARGET configure for TARGET [TARGET=HOST]
290 if test -n "$ac_help"; then
295 -host | --host | --hos | --ho)
297 -host=* | --host=* | --hos=* | --ho=*)
300 -includedir | --includedir | --includedi | --included | --include \
301 | --includ | --inclu | --incl | --inc)
302 ac_prev=includedir ;;
303 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
304 | --includ=* | --inclu=* | --incl=* | --inc=*)
305 includedir="$ac_optarg" ;;
307 -infodir | --infodir | --infodi | --infod | --info | --inf)
309 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
310 infodir="$ac_optarg" ;;
312 -libdir | --libdir | --libdi | --libd)
314 -libdir=* | --libdir=* | --libdi=* | --libd=*)
315 libdir="$ac_optarg" ;;
317 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
318 | --libexe | --libex | --libe)
319 ac_prev=libexecdir ;;
320 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
321 | --libexe=* | --libex=* | --libe=*)
322 libexecdir="$ac_optarg" ;;
324 -localstatedir | --localstatedir | --localstatedi | --localstated \
325 | --localstate | --localstat | --localsta | --localst \
326 | --locals | --local | --loca | --loc | --lo)
327 ac_prev=localstatedir ;;
328 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
329 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
330 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
331 localstatedir="$ac_optarg" ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336 mandir="$ac_optarg" ;;
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir="$ac_optarg" ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362 prefix="$ac_optarg" ;;
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix="$ac_optarg" ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix="$ac_optarg" ;;
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 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name="$ac_optarg" ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir="$ac_optarg" ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir="$ac_optarg" ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424 srcdir="$ac_optarg" ;;
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir="$ac_optarg" ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target="$ac_optarg" ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers)
442 echo "configure generated by autoconf version 2.13"
446 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
447 # Reject names that are not valid shell variable names.
448 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
449 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
451 ac_package=`echo $ac_package| sed 's/-/_/g'`
456 eval "with_${ac_package}='$ac_optarg'" ;;
458 -without-* | --without-*)
459 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
460 # Reject names that are not valid shell variable names.
461 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
462 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
464 ac_package=`echo $ac_package| sed 's/-/_/g'`
465 eval "with_${ac_package}=no" ;;
468 # Obsolete; use --with-x.
471 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
472 | --x-incl | --x-inc | --x-in | --x-i)
473 ac_prev=x_includes ;;
474 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
475 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
476 x_includes="$ac_optarg" ;;
478 -x-libraries | --x-libraries | --x-librarie | --x-librari \
479 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
480 ac_prev=x_libraries ;;
481 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
482 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
483 x_libraries="$ac_optarg" ;;
485 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
489 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
490 echo "configure: warning: $ac_option: invalid host type" 1>&2
492 if test "x$nonopt" != xNONE; then
493 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
501 if test -n "$ac_prev"; then
502 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
505 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
507 # File descriptor usage:
510 # 2 errors and warnings
511 # 3 some systems may open it to /dev/tty
512 # 4 used on the Kubota Titan
513 # 6 checking for... messages and results
514 # 5 compiler messages saved in config.log
515 if test "$silent" = yes; then
523 This file contains any messages produced by compilers while
524 running configure, to aid debugging if configure makes a mistake.
527 # Strip out --no-create and --no-recursion so they do not pile up.
528 # Also quote any args containing shell metacharacters.
533 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
534 | --no-cr | --no-c) ;;
535 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
536 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
537 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
538 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
539 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
544 # Only set these to C if already set. These must not be set unconditionally
545 # because not all systems understand e.g. LANG=C (notably SCO).
546 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
547 # Non-C LC_CTYPE values break the ctype check.
548 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
549 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
550 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
551 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
553 # confdefs.h avoids OS command line length limits that DEFS can exceed.
554 rm -rf conftest* confdefs.h
555 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
558 # A filename unique to this package, relative to the directory that
559 # configure is in, which we can look for to find out if srcdir is correct.
560 ac_unique_file=driver/subprocs.c
562 # Find the source files, if location was not specified.
563 if test -z "$srcdir"; then
564 ac_srcdir_defaulted=yes
565 # Try the directory containing this script, then its parent.
567 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
568 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
570 if test ! -r $srcdir/$ac_unique_file; then
574 ac_srcdir_defaulted=no
576 if test ! -r $srcdir/$ac_unique_file; then
577 if test "$ac_srcdir_defaulted" = yes; then
578 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
580 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
583 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
585 # Prefer explicitly selected file to automatically selected ones.
586 if test -z "$CONFIG_SITE"; then
587 if test "x$prefix" != xNONE; then
588 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
590 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
593 for ac_site_file in $CONFIG_SITE; do
594 if test -r "$ac_site_file"; then
595 echo "loading site script $ac_site_file"
600 if test -r "$cache_file"; then
601 echo "loading cache $cache_file"
604 echo "creating cache $cache_file"
609 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
610 ac_cpp='$CPP $CPPFLAGS'
611 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
612 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
613 cross_compiling=$ac_cv_prog_cc_cross
617 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
618 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
619 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
626 ac_n= ac_c='\c' ac_t=
631 echo "current directory: `pwd`"
632 echo "command line was: $0 $@"
636 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
637 if test -f $ac_dir/install-sh; then
639 ac_install_sh="$ac_aux_dir/install-sh -c"
641 elif test -f $ac_dir/install.sh; then
643 ac_install_sh="$ac_aux_dir/install.sh -c"
647 if test -z "$ac_aux_dir"; then
648 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
650 ac_config_guess=$ac_aux_dir/config.guess
651 ac_config_sub=$ac_aux_dir/config.sub
652 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
655 # Make sure we can run config.sub.
656 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
657 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
660 echo $ac_n "checking host system type""... $ac_c" 1>&6
661 echo "configure:673: checking host system type" >&5
664 case "$host_alias" in
668 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
669 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
671 *) host_alias=$nonopt ;;
675 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
676 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
677 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
678 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
679 echo "$ac_t""$host" 1>&6
682 # Extract the first word of "gcc", so it can be a program name with args.
683 set dummy gcc; ac_word=$2
684 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
685 echo "configure:697: checking for $ac_word" >&5
686 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
687 echo $ac_n "(cached) $ac_c" 1>&6
689 if test -n "$CC"; then
690 ac_cv_prog_CC="$CC" # Let the user override the test.
692 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
694 for ac_dir in $ac_dummy; do
695 test -z "$ac_dir" && ac_dir=.
696 if test -f $ac_dir/$ac_word; then
705 if test -n "$CC"; then
706 echo "$ac_t""$CC" 1>&6
708 echo "$ac_t""no" 1>&6
711 if test -z "$CC"; then
712 # Extract the first word of "cc", so it can be a program name with args.
713 set dummy cc; ac_word=$2
714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715 echo "configure:727: checking for $ac_word" >&5
716 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
717 echo $ac_n "(cached) $ac_c" 1>&6
719 if test -n "$CC"; then
720 ac_cv_prog_CC="$CC" # Let the user override the test.
722 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
725 for ac_dir in $ac_dummy; do
726 test -z "$ac_dir" && ac_dir=.
727 if test -f $ac_dir/$ac_word; then
728 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
737 if test $ac_prog_rejected = yes; then
738 # We found a bogon in the path, so make sure we never use it.
739 set dummy $ac_cv_prog_CC
741 if test $# -gt 0; then
742 # We chose a different compiler from the bogus one.
743 # However, it has the same basename, so the bogon will be chosen
744 # first if we set CC to just the basename; use the full file name.
746 set dummy "$ac_dir/$ac_word" "$@"
754 if test -n "$CC"; then
755 echo "$ac_t""$CC" 1>&6
757 echo "$ac_t""no" 1>&6
760 if test -z "$CC"; then
763 # Extract the first word of "cl", so it can be a program name with args.
764 set dummy cl; ac_word=$2
765 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
766 echo "configure:778: checking for $ac_word" >&5
767 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
768 echo $ac_n "(cached) $ac_c" 1>&6
770 if test -n "$CC"; then
771 ac_cv_prog_CC="$CC" # Let the user override the test.
773 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
775 for ac_dir in $ac_dummy; do
776 test -z "$ac_dir" && ac_dir=.
777 if test -f $ac_dir/$ac_word; then
786 if test -n "$CC"; then
787 echo "$ac_t""$CC" 1>&6
789 echo "$ac_t""no" 1>&6
794 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
797 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
798 echo "configure:810: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
801 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
802 ac_cpp='$CPP $CPPFLAGS'
803 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805 cross_compiling=$ac_cv_prog_cc_cross
807 cat > conftest.$ac_ext << EOF
809 #line 821 "configure"
810 #include "confdefs.h"
814 if { (eval echo configure:826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
815 ac_cv_prog_cc_works=yes
816 # If we can't run a trivial program, we are probably using a cross compiler.
817 if (./conftest; exit) 2>/dev/null; then
818 ac_cv_prog_cc_cross=no
820 ac_cv_prog_cc_cross=yes
823 echo "configure: failed program was:" >&5
824 cat conftest.$ac_ext >&5
825 ac_cv_prog_cc_works=no
829 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
830 ac_cpp='$CPP $CPPFLAGS'
831 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
832 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
833 cross_compiling=$ac_cv_prog_cc_cross
835 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
836 if test $ac_cv_prog_cc_works = no; then
837 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
839 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
840 echo "configure:852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
841 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
842 cross_compiling=$ac_cv_prog_cc_cross
844 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
845 echo "configure:857: checking whether we are using GNU C" >&5
846 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
847 echo $ac_n "(cached) $ac_c" 1>&6
849 cat > conftest.c <<EOF
854 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
861 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
863 if test $ac_cv_prog_gcc = yes; then
869 ac_test_CFLAGS="${CFLAGS+set}"
870 ac_save_CFLAGS="$CFLAGS"
872 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
873 echo "configure:885: checking whether ${CC-cc} accepts -g" >&5
874 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
875 echo $ac_n "(cached) $ac_c" 1>&6
877 echo 'void f(){}' > conftest.c
878 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
887 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
888 if test "$ac_test_CFLAGS" = set; then
889 CFLAGS="$ac_save_CFLAGS"
890 elif test $ac_cv_prog_cc_g = yes; then
891 if test "$GCC" = yes; then
897 if test "$GCC" = yes; then
905 if test -z "$GCC"; then
906 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
907 echo "configure:919: checking how to request ANSI compilation" >&5
910 echo "$ac_t""HPUX: adding -Ae" 1>&6
914 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
915 CC="$CC -qlanglvl=ansi -qhalt=e"
919 echo "$ac_t""DEC: adding -std1" 1>&6
924 echo "$ac_t""no idea" 1>&6
930 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
931 echo "configure:943: checking whether the compiler works on ANSI C" >&5
932 if test "$cross_compiling" = yes; then
933 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
935 cat > conftest.$ac_ext <<EOF
936 #line 948 "configure"
937 #include "confdefs.h"
938 main(int ac, char **av) { return 0; }
940 if { (eval echo configure:952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
942 echo "$ac_t""yes" 1>&6
944 echo "configure: failed program was:" >&5
945 cat conftest.$ac_ext >&5
947 echo "$ac_t""no" 1>&6
948 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
955 *-irix5* |*-irix6.0-3* )
956 if test -n "$GCC"; then
957 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
958 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
961 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
962 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
967 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
968 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
972 # if test -z "$GCC"; then
973 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
974 # CC="$CC -migrate -w0 -verbose -warnprotos"
981 # Try and determine whether ${INSTALL} can create intermediate directories,
982 # and if not, whether "mkdir -p" works instead. This sets ${INSTALL_DIRS}.
983 # (But autoconf should earn its keep and do this for us!)
988 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
989 echo "configure:1001: checking how to run the C preprocessor" >&5
990 # On Suns, sometimes $CPP names a directory.
991 if test -n "$CPP" && test -d "$CPP"; then
994 if test -z "$CPP"; then
995 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
996 echo $ac_n "(cached) $ac_c" 1>&6
998 # This must be in double quotes, not single quotes, because CPP may get
999 # substituted into the Makefile and "${CC-cc}" will confuse make.
1001 # On the NeXT, cc -E runs the code through the compiler's parser,
1002 # not just through cpp.
1003 cat > conftest.$ac_ext <<EOF
1004 #line 1016 "configure"
1005 #include "confdefs.h"
1009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1010 { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1012 if test -z "$ac_err"; then
1016 echo "configure: failed program was:" >&5
1017 cat conftest.$ac_ext >&5
1019 CPP="${CC-cc} -E -traditional-cpp"
1020 cat > conftest.$ac_ext <<EOF
1021 #line 1033 "configure"
1022 #include "confdefs.h"
1026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1027 { (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1029 if test -z "$ac_err"; then
1033 echo "configure: failed program was:" >&5
1034 cat conftest.$ac_ext >&5
1036 CPP="${CC-cc} -nologo -E"
1037 cat > conftest.$ac_ext <<EOF
1038 #line 1050 "configure"
1039 #include "confdefs.h"
1043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1044 { (eval echo configure:1056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1046 if test -z "$ac_err"; then
1050 echo "configure: failed program was:" >&5
1051 cat conftest.$ac_ext >&5
1060 ac_cv_prog_CPP="$CPP"
1062 CPP="$ac_cv_prog_CPP"
1064 ac_cv_prog_CPP="$CPP"
1066 echo "$ac_t""$CPP" 1>&6
1068 # Find a good install program. We prefer a C program (faster),
1069 # so one script is as good as another. But avoid the broken or
1070 # incompatible versions:
1071 # SysV /etc/install, /usr/sbin/install
1072 # SunOS /usr/etc/install
1073 # IRIX /sbin/install
1075 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1076 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1077 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1078 # ./install, which can be erroneously created by make from ./install.sh.
1079 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1080 echo "configure:1092: checking for a BSD compatible install" >&5
1081 if test -z "$INSTALL"; then
1082 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1083 echo $ac_n "(cached) $ac_c" 1>&6
1085 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1086 for ac_dir in $PATH; do
1087 # Account for people who put trailing slashes in PATH elements.
1089 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1091 # OSF1 and SCO ODT 3.0 have their own names for install.
1092 # Don't use installbsd from OSF since it installs stuff as root
1094 for ac_prog in ginstall scoinst install; do
1095 if test -f $ac_dir/$ac_prog; then
1096 if test $ac_prog = install &&
1097 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1098 # AIX install. It has an incompatible calling convention.
1101 ac_cv_path_install="$ac_dir/$ac_prog -c"
1112 if test "${ac_cv_path_install+set}" = set; then
1113 INSTALL="$ac_cv_path_install"
1115 # As a last resort, use the slow shell script. We don't cache a
1116 # path for INSTALL within a source directory, because that will
1117 # break other packages using the cache if that directory is
1118 # removed, or if the path is relative.
1119 INSTALL="$ac_install_sh"
1122 echo "$ac_t""$INSTALL" 1>&6
1124 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1125 # It thinks the first close brace ends the variable substitution.
1126 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1128 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1130 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1132 INSTALL_DIRS='${INSTALL} -d'
1133 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1134 echo "configure:1146: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1136 if mkdir conftestdir; then
1139 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1140 if test -d dir1/dir2 ; then
1141 echo "$ac_t""yes" 1>&6
1143 echo "$ac_t""no" 1>&6
1144 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1145 echo "configure:1157: checking whether \"mkdir -p\" creates intermediate directories" >&5
1147 mkdir -p dir1/dir2 >&- 2>&-
1148 if test -d dir1/dir2/. ; then
1149 echo "$ac_t""yes" 1>&6
1150 INSTALL_DIRS='mkdir -p'
1152 echo "$ac_t""no" 1>&6
1159 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1160 echo "configure:1172: checking whether ${MAKE-make} sets \${MAKE}" >&5
1161 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1162 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1163 echo $ac_n "(cached) $ac_c" 1>&6
1165 cat > conftestmake <<\EOF
1167 @echo 'ac_maketemp="${MAKE}"'
1169 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1170 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1171 if test -n "$ac_maketemp"; then
1172 eval ac_cv_prog_make_${ac_make}_set=yes
1174 eval ac_cv_prog_make_${ac_make}_set=no
1178 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1179 echo "$ac_t""yes" 1>&6
1182 echo "$ac_t""no" 1>&6
1183 SET_MAKE="MAKE=${MAKE-make}"
1187 echo $ac_n "checking for working const""... $ac_c" 1>&6
1188 echo "configure:1200: checking for working const" >&5
1189 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1190 echo $ac_n "(cached) $ac_c" 1>&6
1192 cat > conftest.$ac_ext <<EOF
1193 #line 1205 "configure"
1194 #include "confdefs.h"
1198 /* Ultrix mips cc rejects this. */
1199 typedef int charset[2]; const charset x;
1200 /* SunOS 4.1.1 cc rejects this. */
1201 char const *const *ccp;
1203 /* NEC SVR4.0.2 mips cc rejects this. */
1204 struct point {int x, y;};
1205 static struct point const zero = {0,0};
1206 /* AIX XL C 1.02.0.0 rejects this.
1207 It does not let you subtract one const X* pointer from another in an arm
1208 of an if-expression whose if-part is not a constant expression */
1209 const char *g = "string";
1210 ccp = &g + (g ? g-g : 0);
1211 /* HPUX 7.0 cc rejects these. */
1214 ccp = (char const *const *) p;
1215 { /* SCO 3.2v4 cc rejects this. */
1217 char const *s = 0 ? (char *) 0 : (char const *) 0;
1221 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1223 const int *foo = &x[0];
1226 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1227 typedef const int *iptr;
1231 { /* AIX XL C 1.02.0.0 rejects this saying
1232 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1233 struct s { int j; const int *ap[3]; };
1234 struct s *b; b->j = 5;
1236 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1242 if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1246 echo "configure: failed program was:" >&5
1247 cat conftest.$ac_ext >&5
1254 echo "$ac_t""$ac_cv_c_const" 1>&6
1255 if test $ac_cv_c_const = no; then
1256 cat >> confdefs.h <<\EOF
1262 echo $ac_n "checking for inline""... $ac_c" 1>&6
1263 echo "configure:1275: checking for inline" >&5
1264 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1265 echo $ac_n "(cached) $ac_c" 1>&6
1268 for ac_kw in inline __inline__ __inline; do
1269 cat > conftest.$ac_ext <<EOF
1270 #line 1282 "configure"
1271 #include "confdefs.h"
1277 if { (eval echo configure:1289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1279 ac_cv_c_inline=$ac_kw; break
1281 echo "configure: failed program was:" >&5
1282 cat conftest.$ac_ext >&5
1289 echo "$ac_t""$ac_cv_c_inline" 1>&6
1290 case "$ac_cv_c_inline" in
1292 no) cat >> confdefs.h <<\EOF
1296 *) cat >> confdefs.h <<EOF
1297 #define inline $ac_cv_c_inline
1303 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1304 echo "configure:1316: checking for ANSI C header files" >&5
1305 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1306 echo $ac_n "(cached) $ac_c" 1>&6
1308 cat > conftest.$ac_ext <<EOF
1309 #line 1321 "configure"
1310 #include "confdefs.h"
1316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1317 { (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1319 if test -z "$ac_err"; then
1321 ac_cv_header_stdc=yes
1324 echo "configure: failed program was:" >&5
1325 cat conftest.$ac_ext >&5
1327 ac_cv_header_stdc=no
1331 if test $ac_cv_header_stdc = yes; then
1332 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1333 cat > conftest.$ac_ext <<EOF
1334 #line 1346 "configure"
1335 #include "confdefs.h"
1338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1339 egrep "memchr" >/dev/null 2>&1; then
1343 ac_cv_header_stdc=no
1349 if test $ac_cv_header_stdc = yes; then
1350 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1351 cat > conftest.$ac_ext <<EOF
1352 #line 1364 "configure"
1353 #include "confdefs.h"
1356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1357 egrep "free" >/dev/null 2>&1; then
1361 ac_cv_header_stdc=no
1367 if test $ac_cv_header_stdc = yes; then
1368 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1369 if test "$cross_compiling" = yes; then
1372 cat > conftest.$ac_ext <<EOF
1373 #line 1385 "configure"
1374 #include "confdefs.h"
1376 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1377 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1378 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1379 int main () { int i; for (i = 0; i < 256; i++)
1380 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1384 if { (eval echo configure:1396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1388 echo "configure: failed program was:" >&5
1389 cat conftest.$ac_ext >&5
1391 ac_cv_header_stdc=no
1399 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1400 if test $ac_cv_header_stdc = yes; then
1401 cat >> confdefs.h <<\EOF
1402 #define STDC_HEADERS 1
1407 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1408 echo "configure:1420: checking whether time.h and sys/time.h may both be included" >&5
1409 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1410 echo $ac_n "(cached) $ac_c" 1>&6
1412 cat > conftest.$ac_ext <<EOF
1413 #line 1425 "configure"
1414 #include "confdefs.h"
1415 #include <sys/types.h>
1416 #include <sys/time.h>
1422 if { (eval echo configure:1434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1424 ac_cv_header_time=yes
1426 echo "configure: failed program was:" >&5
1427 cat conftest.$ac_ext >&5
1429 ac_cv_header_time=no
1434 echo "$ac_t""$ac_cv_header_time" 1>&6
1435 if test $ac_cv_header_time = yes; then
1436 cat >> confdefs.h <<\EOF
1437 #define TIME_WITH_SYS_TIME 1
1442 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1443 echo "configure:1455: checking for sys/wait.h that is POSIX.1 compatible" >&5
1444 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1445 echo $ac_n "(cached) $ac_c" 1>&6
1447 cat > conftest.$ac_ext <<EOF
1448 #line 1460 "configure"
1449 #include "confdefs.h"
1450 #include <sys/types.h>
1451 #include <sys/wait.h>
1453 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1456 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1461 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1464 if { (eval echo configure:1476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1466 ac_cv_header_sys_wait_h=yes
1468 echo "configure: failed program was:" >&5
1469 cat conftest.$ac_ext >&5
1471 ac_cv_header_sys_wait_h=no
1476 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1477 if test $ac_cv_header_sys_wait_h = yes; then
1478 cat >> confdefs.h <<\EOF
1479 #define HAVE_SYS_WAIT_H 1
1485 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1487 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1488 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1489 echo "configure:1501: checking for $ac_hdr that defines DIR" >&5
1490 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1491 echo $ac_n "(cached) $ac_c" 1>&6
1493 cat > conftest.$ac_ext <<EOF
1494 #line 1506 "configure"
1495 #include "confdefs.h"
1496 #include <sys/types.h>
1502 if { (eval echo configure:1514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1504 eval "ac_cv_header_dirent_$ac_safe=yes"
1506 echo "configure: failed program was:" >&5
1507 cat conftest.$ac_ext >&5
1509 eval "ac_cv_header_dirent_$ac_safe=no"
1513 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1514 echo "$ac_t""yes" 1>&6
1515 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1516 cat >> confdefs.h <<EOF
1517 #define $ac_tr_hdr 1
1519 ac_header_dirent=$ac_hdr; break
1521 echo "$ac_t""no" 1>&6
1524 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1525 if test $ac_header_dirent = dirent.h; then
1526 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1527 echo "configure:1539: checking for opendir in -ldir" >&5
1528 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1529 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1530 echo $ac_n "(cached) $ac_c" 1>&6
1532 ac_save_LIBS="$LIBS"
1534 cat > conftest.$ac_ext <<EOF
1535 #line 1547 "configure"
1536 #include "confdefs.h"
1537 /* Override any gcc2 internal prototype to avoid an error. */
1538 /* We use char because int might match the return type of a gcc2
1539 builtin and then its argument prototype would still apply. */
1546 if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1548 eval "ac_cv_lib_$ac_lib_var=yes"
1550 echo "configure: failed program was:" >&5
1551 cat conftest.$ac_ext >&5
1553 eval "ac_cv_lib_$ac_lib_var=no"
1556 LIBS="$ac_save_LIBS"
1559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1560 echo "$ac_t""yes" 1>&6
1563 echo "$ac_t""no" 1>&6
1567 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1568 echo "configure:1580: checking for opendir in -lx" >&5
1569 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1570 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1573 ac_save_LIBS="$LIBS"
1575 cat > conftest.$ac_ext <<EOF
1576 #line 1588 "configure"
1577 #include "confdefs.h"
1578 /* Override any gcc2 internal prototype to avoid an error. */
1579 /* We use char because int might match the return type of a gcc2
1580 builtin and then its argument prototype would still apply. */
1587 if { (eval echo configure:1599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1589 eval "ac_cv_lib_$ac_lib_var=yes"
1591 echo "configure: failed program was:" >&5
1592 cat conftest.$ac_ext >&5
1594 eval "ac_cv_lib_$ac_lib_var=no"
1597 LIBS="$ac_save_LIBS"
1600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1601 echo "$ac_t""yes" 1>&6
1604 echo "$ac_t""no" 1>&6
1610 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1611 echo "configure:1623: checking for mode_t" >&5
1612 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1613 echo $ac_n "(cached) $ac_c" 1>&6
1615 cat > conftest.$ac_ext <<EOF
1616 #line 1628 "configure"
1617 #include "confdefs.h"
1618 #include <sys/types.h>
1624 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1625 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1627 ac_cv_type_mode_t=yes
1630 ac_cv_type_mode_t=no
1635 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1636 if test $ac_cv_type_mode_t = no; then
1637 cat >> confdefs.h <<\EOF
1643 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1644 echo "configure:1656: checking for pid_t" >&5
1645 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1646 echo $ac_n "(cached) $ac_c" 1>&6
1648 cat > conftest.$ac_ext <<EOF
1649 #line 1661 "configure"
1650 #include "confdefs.h"
1651 #include <sys/types.h>
1657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1658 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1660 ac_cv_type_pid_t=yes
1668 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1669 if test $ac_cv_type_pid_t = no; then
1670 cat >> confdefs.h <<\EOF
1676 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1677 echo "configure:1689: checking for size_t" >&5
1678 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1679 echo $ac_n "(cached) $ac_c" 1>&6
1681 cat > conftest.$ac_ext <<EOF
1682 #line 1694 "configure"
1683 #include "confdefs.h"
1684 #include <sys/types.h>
1690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1691 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1693 ac_cv_type_size_t=yes
1696 ac_cv_type_size_t=no
1701 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1702 if test $ac_cv_type_size_t = no; then
1703 cat >> confdefs.h <<\EOF
1704 #define size_t unsigned
1709 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1710 echo "configure:1722: checking return type of signal handlers" >&5
1711 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1712 echo $ac_n "(cached) $ac_c" 1>&6
1714 cat > conftest.$ac_ext <<EOF
1715 #line 1727 "configure"
1716 #include "confdefs.h"
1717 #include <sys/types.h>
1723 extern "C" void (*signal (int, void (*)(int)))(int);
1725 void (*signal ()) ();
1732 if { (eval echo configure:1744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1734 ac_cv_type_signal=void
1736 echo "configure: failed program was:" >&5
1737 cat conftest.$ac_ext >&5
1739 ac_cv_type_signal=int
1744 echo "$ac_t""$ac_cv_type_signal" 1>&6
1745 cat >> confdefs.h <<EOF
1746 #define RETSIGTYPE $ac_cv_type_signal
1751 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1752 echo "configure:1764: checking how to call gettimeofday" >&5
1753 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1754 echo $ac_n "(cached) $ac_c" 1>&6
1756 cat > conftest.$ac_ext <<EOF
1757 #line 1769 "configure"
1758 #include "confdefs.h"
1760 #include <sys/time.h>
1762 struct timeval tv; struct timezone tzp;
1763 gettimeofday(&tv, &tzp);
1766 if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1768 ac_gettimeofday_args=2
1770 echo "configure: failed program was:" >&5
1771 cat conftest.$ac_ext >&5
1773 cat > conftest.$ac_ext <<EOF
1774 #line 1786 "configure"
1775 #include "confdefs.h"
1777 #include <sys/time.h>
1779 struct timeval tv; gettimeofday(&tv);
1782 if { (eval echo configure:1794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1784 ac_gettimeofday_args=1
1786 echo "configure: failed program was:" >&5
1787 cat conftest.$ac_ext >&5
1789 ac_gettimeofday_args=0
1794 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1797 ac_gettimeofday_args=$ac_cv_gettimeofday_args
1798 if test "$ac_gettimeofday_args" = 1 ; then
1799 cat >> confdefs.h <<\EOF
1800 #define HAVE_GETTIMEOFDAY 1
1803 echo "$ac_t""one argument" 1>&6
1804 elif test "$ac_gettimeofday_args" = 2 ; then
1805 cat >> confdefs.h <<\EOF
1806 #define HAVE_GETTIMEOFDAY 1
1809 cat >> confdefs.h <<\EOF
1810 #define GETTIMEOFDAY_TWO_ARGS 1
1813 echo "$ac_t""two arguments" 1>&6
1815 echo "$ac_t""unknown" 1>&6
1819 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
1821 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1822 echo "configure:1834: checking for $ac_func" >&5
1823 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1824 echo $ac_n "(cached) $ac_c" 1>&6
1826 cat > conftest.$ac_ext <<EOF
1827 #line 1839 "configure"
1828 #include "confdefs.h"
1829 /* System header to define __stub macros and hopefully few prototypes,
1830 which can conflict with char $ac_func(); below. */
1832 /* Override any gcc2 internal prototype to avoid an error. */
1833 /* We use char because int might match the return type of a gcc2
1834 builtin and then its argument prototype would still apply. */
1839 /* The GNU C library defines this for functions which it implements
1840 to always fail with ENOSYS. Some functions are actually named
1841 something starting with __ and the normal name is an alias. */
1842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1850 if { (eval echo configure:1862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1852 eval "ac_cv_func_$ac_func=yes"
1854 echo "configure: failed program was:" >&5
1855 cat conftest.$ac_ext >&5
1857 eval "ac_cv_func_$ac_func=no"
1862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1863 echo "$ac_t""yes" 1>&6
1864 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1865 cat >> confdefs.h <<EOF
1866 #define $ac_tr_func 1
1870 echo "$ac_t""no" 1>&6
1874 for ac_func in sigaction syslog
1876 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1877 echo "configure:1889: checking for $ac_func" >&5
1878 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1879 echo $ac_n "(cached) $ac_c" 1>&6
1881 cat > conftest.$ac_ext <<EOF
1882 #line 1894 "configure"
1883 #include "confdefs.h"
1884 /* System header to define __stub macros and hopefully few prototypes,
1885 which can conflict with char $ac_func(); below. */
1887 /* Override any gcc2 internal prototype to avoid an error. */
1888 /* We use char because int might match the return type of a gcc2
1889 builtin and then its argument prototype would still apply. */
1894 /* The GNU C library defines this for functions which it implements
1895 to always fail with ENOSYS. Some functions are actually named
1896 something starting with __ and the normal name is an alias. */
1897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1905 if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1907 eval "ac_cv_func_$ac_func=yes"
1909 echo "configure: failed program was:" >&5
1910 cat conftest.$ac_ext >&5
1912 eval "ac_cv_func_$ac_func=no"
1917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1918 echo "$ac_t""yes" 1>&6
1919 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1920 cat >> confdefs.h <<EOF
1921 #define $ac_tr_func 1
1925 echo "$ac_t""no" 1>&6
1930 for ac_hdr in unistd.h crypt.h sys/select.h
1932 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1933 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1934 echo "configure:1946: checking for $ac_hdr" >&5
1935 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1936 echo $ac_n "(cached) $ac_c" 1>&6
1938 cat > conftest.$ac_ext <<EOF
1939 #line 1951 "configure"
1940 #include "confdefs.h"
1943 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1944 { (eval echo configure:1956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1945 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1946 if test -z "$ac_err"; then
1948 eval "ac_cv_header_$ac_safe=yes"
1951 echo "configure: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
1954 eval "ac_cv_header_$ac_safe=no"
1958 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1959 echo "$ac_t""yes" 1>&6
1960 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1961 cat >> confdefs.h <<EOF
1962 #define $ac_tr_hdr 1
1966 echo "$ac_t""no" 1>&6
1973 # Check whether --enable-subdir or --disable-subdir was given.
1974 if test "${enable_subdir+set}" = set; then
1975 enableval="$enable_subdir"
1976 enable_subdir="$enableval"
1981 if test x"$enable_subdir" = xno; then
1983 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
1984 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
1987 # there must be a better way than this...
1988 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
1990 HACKDIR=$enable_subdir
1993 HACKDIR='${bindir}/'$enable_subdir
1997 # canonicalize slashes.
1998 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
2001 # If we find X, set shell vars x_includes and x_libraries to the
2002 # paths, otherwise set no_x=yes.
2003 # Uses ac_ vars as temps to allow command line to override cache and checks.
2004 # --without-x overrides everything else, but does not touch the cache.
2005 echo $ac_n "checking for X""... $ac_c" 1>&6
2006 echo "configure:2018: checking for X" >&5
2008 # Check whether --with-x or --without-x was given.
2009 if test "${with_x+set}" = set; then
2014 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2015 if test "x$with_x" = xno; then
2016 # The user explicitly disabled X.
2019 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2020 # Both variables are already set.
2023 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2024 echo $ac_n "(cached) $ac_c" 1>&6
2026 # One or both of the vars are not set, and there is no cached value.
2027 ac_x_includes=NO ac_x_libraries=NO
2029 if mkdir conftestdir; then
2031 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2032 cat > Imakefile <<'EOF'
2034 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2036 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2037 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2038 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2039 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2040 for ac_extension in a so sl; do
2041 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2042 test -f $ac_im_libdir/libX11.$ac_extension; then
2043 ac_im_usrlibdir=$ac_im_libdir; break
2046 # Screen out bogus values from the imake configuration. They are
2047 # bogus both because they are the default anyway, and because
2048 # using them would break gcc on systems where it needs fixed includes.
2049 case "$ac_im_incroot" in
2051 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2053 case "$ac_im_usrlibdir" in
2055 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2062 if test "$ac_x_includes" = NO; then
2063 # Guess where to find include files, by looking for this one X11 .h file.
2064 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2066 # First, try using that file with no special directory specified.
2067 cat > conftest.$ac_ext <<EOF
2068 #line 2080 "configure"
2069 #include "confdefs.h"
2070 #include <$x_direct_test_include>
2072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2073 { (eval echo configure:2085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2075 if test -z "$ac_err"; then
2077 # We can compile using X headers with no special include directory.
2081 echo "configure: failed program was:" >&5
2082 cat conftest.$ac_ext >&5
2084 # Look for the header file in a standard set of common directories.
2085 # Check X11 before X11Rn because it is often a symlink to the current release.
2088 /usr/X11R6/include \
2089 /usr/X11R5/include \
2090 /usr/X11R4/include \
2093 /usr/include/X11R6 \
2094 /usr/include/X11R5 \
2095 /usr/include/X11R4 \
2097 /usr/local/X11/include \
2098 /usr/local/X11R6/include \
2099 /usr/local/X11R5/include \
2100 /usr/local/X11R4/include \
2102 /usr/local/include/X11 \
2103 /usr/local/include/X11R6 \
2104 /usr/local/include/X11R5 \
2105 /usr/local/include/X11R4 \
2109 /usr/XFree86/include/X11 \
2112 /usr/local/include \
2113 /usr/unsupported/include \
2114 /usr/athena/include \
2115 /usr/local/x11r5/include \
2116 /usr/lpp/Xamples/include \
2118 /usr/openwin/include \
2119 /usr/openwin/share/include \
2122 if test -r "$ac_dir/$x_direct_test_include"; then
2123 ac_x_includes=$ac_dir
2129 fi # $ac_x_includes = NO
2131 if test "$ac_x_libraries" = NO; then
2132 # Check for the libraries.
2134 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2135 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2137 # See if we find them without any special options.
2138 # Don't add to $LIBS permanently.
2139 ac_save_LIBS="$LIBS"
2140 LIBS="-l$x_direct_test_library $LIBS"
2141 cat > conftest.$ac_ext <<EOF
2142 #line 2154 "configure"
2143 #include "confdefs.h"
2146 ${x_direct_test_function}()
2149 if { (eval echo configure:2161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2151 LIBS="$ac_save_LIBS"
2152 # We can link X programs with no special library path.
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2158 LIBS="$ac_save_LIBS"
2159 # First see if replacing the include by lib works.
2160 # Check X11 before X11Rn because it is often a symlink to the current release.
2161 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2172 /usr/local/X11/lib \
2173 /usr/local/X11R6/lib \
2174 /usr/local/X11R5/lib \
2175 /usr/local/X11R4/lib \
2177 /usr/local/lib/X11 \
2178 /usr/local/lib/X11R6 \
2179 /usr/local/lib/X11R5 \
2180 /usr/local/lib/X11R4 \
2184 /usr/XFree86/lib/X11 \
2188 /usr/unsupported/lib \
2190 /usr/local/x11r5/lib \
2191 /usr/lpp/Xamples/lib \
2195 /usr/openwin/share/lib \
2198 for ac_extension in a so sl; do
2199 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2200 ac_x_libraries=$ac_dir
2207 fi # $ac_x_libraries = NO
2209 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2210 # Didn't find X anywhere. Cache the known absence of X.
2211 ac_cv_have_x="have_x=no"
2213 # Record where we found X for the cache.
2214 ac_cv_have_x="have_x=yes \
2215 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2219 eval "$ac_cv_have_x"
2222 if test "$have_x" != yes; then
2223 echo "$ac_t""$have_x" 1>&6
2226 # If each of the values was on the command line, it overrides each guess.
2227 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2228 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2229 # Update the cache value to reflect the command line values.
2230 ac_cv_have_x="have_x=yes \
2231 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2232 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2235 if test "$no_x" = yes; then
2236 # Not all programs may use this symbol, but it does not hurt to define it.
2237 cat >> confdefs.h <<\EOF
2238 #define X_DISPLAY_MISSING 1
2241 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2243 if test -n "$x_includes"; then
2244 X_CFLAGS="$X_CFLAGS -I$x_includes"
2247 # It would also be nice to do this for all -L options, not just this one.
2248 if test -n "$x_libraries"; then
2249 X_LIBS="$X_LIBS -L$x_libraries"
2250 # For Solaris; some versions of Sun CC require a space after -R and
2251 # others require no space. Words are not sufficient . . . .
2252 case "`(uname -sr) 2>/dev/null`" in
2254 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2255 echo "configure:2267: checking whether -R must be followed by a space" >&5
2256 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2257 cat > conftest.$ac_ext <<EOF
2258 #line 2270 "configure"
2259 #include "confdefs.h"
2265 if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2269 echo "configure: failed program was:" >&5
2270 cat conftest.$ac_ext >&5
2275 if test $ac_R_nospace = yes; then
2276 echo "$ac_t""no" 1>&6
2277 X_LIBS="$X_LIBS -R$x_libraries"
2279 LIBS="$ac_xsave_LIBS -R $x_libraries"
2280 cat > conftest.$ac_ext <<EOF
2281 #line 2293 "configure"
2282 #include "confdefs.h"
2288 if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2292 echo "configure: failed program was:" >&5
2293 cat conftest.$ac_ext >&5
2298 if test $ac_R_space = yes; then
2299 echo "$ac_t""yes" 1>&6
2300 X_LIBS="$X_LIBS -R $x_libraries"
2302 echo "$ac_t""neither works" 1>&6
2305 LIBS="$ac_xsave_LIBS"
2309 # Check for system-dependent libraries X programs must link with.
2310 # Do this before checking for the system-independent R6 libraries
2311 # (-lICE), since we may need -lsocket or whatever for X linking.
2313 if test "$ISC" = yes; then
2314 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2316 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2317 # libraries were built with DECnet support. And karl@cs.umb.edu says
2318 # the Alpha needs dnet_stub (dnet does not exist).
2319 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2320 echo "configure:2332: checking for dnet_ntoa in -ldnet" >&5
2321 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2322 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2323 echo $ac_n "(cached) $ac_c" 1>&6
2325 ac_save_LIBS="$LIBS"
2327 cat > conftest.$ac_ext <<EOF
2328 #line 2340 "configure"
2329 #include "confdefs.h"
2330 /* Override any gcc2 internal prototype to avoid an error. */
2331 /* We use char because int might match the return type of a gcc2
2332 builtin and then its argument prototype would still apply. */
2339 if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2341 eval "ac_cv_lib_$ac_lib_var=yes"
2343 echo "configure: failed program was:" >&5
2344 cat conftest.$ac_ext >&5
2346 eval "ac_cv_lib_$ac_lib_var=no"
2349 LIBS="$ac_save_LIBS"
2352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2353 echo "$ac_t""yes" 1>&6
2354 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2356 echo "$ac_t""no" 1>&6
2359 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2360 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2361 echo "configure:2373: checking for dnet_ntoa in -ldnet_stub" >&5
2362 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2363 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2364 echo $ac_n "(cached) $ac_c" 1>&6
2366 ac_save_LIBS="$LIBS"
2367 LIBS="-ldnet_stub $LIBS"
2368 cat > conftest.$ac_ext <<EOF
2369 #line 2381 "configure"
2370 #include "confdefs.h"
2371 /* Override any gcc2 internal prototype to avoid an error. */
2372 /* We use char because int might match the return type of a gcc2
2373 builtin and then its argument prototype would still apply. */
2380 if { (eval echo configure:2392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2382 eval "ac_cv_lib_$ac_lib_var=yes"
2384 echo "configure: failed program was:" >&5
2385 cat conftest.$ac_ext >&5
2387 eval "ac_cv_lib_$ac_lib_var=no"
2390 LIBS="$ac_save_LIBS"
2393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2394 echo "$ac_t""yes" 1>&6
2395 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2397 echo "$ac_t""no" 1>&6
2402 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2403 # to get the SysV transport functions.
2404 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2406 # The nsl library prevents programs from opening the X display
2407 # on Irix 5.2, according to dickey@clark.net.
2408 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2409 echo "configure:2421: checking for gethostbyname" >&5
2410 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2411 echo $ac_n "(cached) $ac_c" 1>&6
2413 cat > conftest.$ac_ext <<EOF
2414 #line 2426 "configure"
2415 #include "confdefs.h"
2416 /* System header to define __stub macros and hopefully few prototypes,
2417 which can conflict with char gethostbyname(); below. */
2419 /* Override any gcc2 internal prototype to avoid an error. */
2420 /* We use char because int might match the return type of a gcc2
2421 builtin and then its argument prototype would still apply. */
2422 char gethostbyname();
2426 /* The GNU C library defines this for functions which it implements
2427 to always fail with ENOSYS. Some functions are actually named
2428 something starting with __ and the normal name is an alias. */
2429 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2437 if { (eval echo configure:2449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2439 eval "ac_cv_func_gethostbyname=yes"
2441 echo "configure: failed program was:" >&5
2442 cat conftest.$ac_ext >&5
2444 eval "ac_cv_func_gethostbyname=no"
2449 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2450 echo "$ac_t""yes" 1>&6
2453 echo "$ac_t""no" 1>&6
2456 if test $ac_cv_func_gethostbyname = no; then
2457 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2458 echo "configure:2470: checking for gethostbyname in -lnsl" >&5
2459 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2460 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2461 echo $ac_n "(cached) $ac_c" 1>&6
2463 ac_save_LIBS="$LIBS"
2465 cat > conftest.$ac_ext <<EOF
2466 #line 2478 "configure"
2467 #include "confdefs.h"
2468 /* Override any gcc2 internal prototype to avoid an error. */
2469 /* We use char because int might match the return type of a gcc2
2470 builtin and then its argument prototype would still apply. */
2471 char gethostbyname();
2477 if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2479 eval "ac_cv_lib_$ac_lib_var=yes"
2481 echo "configure: failed program was:" >&5
2482 cat conftest.$ac_ext >&5
2484 eval "ac_cv_lib_$ac_lib_var=no"
2487 LIBS="$ac_save_LIBS"
2490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2491 echo "$ac_t""yes" 1>&6
2492 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2494 echo "$ac_t""no" 1>&6
2499 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2500 # socket/setsockopt and other routines are undefined under SCO ODT
2501 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2502 # on later versions), says simon@lia.di.epfl.ch: it contains
2503 # gethostby* variants that don't use the nameserver (or something).
2504 # -lsocket must be given before -lnsl if both are needed.
2505 # We assume that if connect needs -lnsl, so does gethostbyname.
2506 echo $ac_n "checking for connect""... $ac_c" 1>&6
2507 echo "configure:2519: checking for connect" >&5
2508 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2509 echo $ac_n "(cached) $ac_c" 1>&6
2511 cat > conftest.$ac_ext <<EOF
2512 #line 2524 "configure"
2513 #include "confdefs.h"
2514 /* System header to define __stub macros and hopefully few prototypes,
2515 which can conflict with char connect(); below. */
2517 /* Override any gcc2 internal prototype to avoid an error. */
2518 /* We use char because int might match the return type of a gcc2
2519 builtin and then its argument prototype would still apply. */
2524 /* The GNU C library defines this for functions which it implements
2525 to always fail with ENOSYS. Some functions are actually named
2526 something starting with __ and the normal name is an alias. */
2527 #if defined (__stub_connect) || defined (__stub___connect)
2535 if { (eval echo configure:2547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2537 eval "ac_cv_func_connect=yes"
2539 echo "configure: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2542 eval "ac_cv_func_connect=no"
2547 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2548 echo "$ac_t""yes" 1>&6
2551 echo "$ac_t""no" 1>&6
2554 if test $ac_cv_func_connect = no; then
2555 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2556 echo "configure:2568: checking for connect in -lsocket" >&5
2557 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2558 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2559 echo $ac_n "(cached) $ac_c" 1>&6
2561 ac_save_LIBS="$LIBS"
2562 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2563 cat > conftest.$ac_ext <<EOF
2564 #line 2576 "configure"
2565 #include "confdefs.h"
2566 /* Override any gcc2 internal prototype to avoid an error. */
2567 /* We use char because int might match the return type of a gcc2
2568 builtin and then its argument prototype would still apply. */
2575 if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2577 eval "ac_cv_lib_$ac_lib_var=yes"
2579 echo "configure: failed program was:" >&5
2580 cat conftest.$ac_ext >&5
2582 eval "ac_cv_lib_$ac_lib_var=no"
2585 LIBS="$ac_save_LIBS"
2588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2589 echo "$ac_t""yes" 1>&6
2590 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2592 echo "$ac_t""no" 1>&6
2597 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2598 echo $ac_n "checking for remove""... $ac_c" 1>&6
2599 echo "configure:2611: checking for remove" >&5
2600 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2601 echo $ac_n "(cached) $ac_c" 1>&6
2603 cat > conftest.$ac_ext <<EOF
2604 #line 2616 "configure"
2605 #include "confdefs.h"
2606 /* System header to define __stub macros and hopefully few prototypes,
2607 which can conflict with char remove(); below. */
2609 /* Override any gcc2 internal prototype to avoid an error. */
2610 /* We use char because int might match the return type of a gcc2
2611 builtin and then its argument prototype would still apply. */
2616 /* The GNU C library defines this for functions which it implements
2617 to always fail with ENOSYS. Some functions are actually named
2618 something starting with __ and the normal name is an alias. */
2619 #if defined (__stub_remove) || defined (__stub___remove)
2627 if { (eval echo configure:2639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2629 eval "ac_cv_func_remove=yes"
2631 echo "configure: failed program was:" >&5
2632 cat conftest.$ac_ext >&5
2634 eval "ac_cv_func_remove=no"
2639 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2640 echo "$ac_t""yes" 1>&6
2643 echo "$ac_t""no" 1>&6
2646 if test $ac_cv_func_remove = no; then
2647 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2648 echo "configure:2660: checking for remove in -lposix" >&5
2649 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2650 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2651 echo $ac_n "(cached) $ac_c" 1>&6
2653 ac_save_LIBS="$LIBS"
2654 LIBS="-lposix $LIBS"
2655 cat > conftest.$ac_ext <<EOF
2656 #line 2668 "configure"
2657 #include "confdefs.h"
2658 /* Override any gcc2 internal prototype to avoid an error. */
2659 /* We use char because int might match the return type of a gcc2
2660 builtin and then its argument prototype would still apply. */
2667 if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2669 eval "ac_cv_lib_$ac_lib_var=yes"
2671 echo "configure: failed program was:" >&5
2672 cat conftest.$ac_ext >&5
2674 eval "ac_cv_lib_$ac_lib_var=no"
2677 LIBS="$ac_save_LIBS"
2680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2681 echo "$ac_t""yes" 1>&6
2682 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2684 echo "$ac_t""no" 1>&6
2689 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2690 echo $ac_n "checking for shmat""... $ac_c" 1>&6
2691 echo "configure:2703: checking for shmat" >&5
2692 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2693 echo $ac_n "(cached) $ac_c" 1>&6
2695 cat > conftest.$ac_ext <<EOF
2696 #line 2708 "configure"
2697 #include "confdefs.h"
2698 /* System header to define __stub macros and hopefully few prototypes,
2699 which can conflict with char shmat(); below. */
2701 /* Override any gcc2 internal prototype to avoid an error. */
2702 /* We use char because int might match the return type of a gcc2
2703 builtin and then its argument prototype would still apply. */
2708 /* The GNU C library defines this for functions which it implements
2709 to always fail with ENOSYS. Some functions are actually named
2710 something starting with __ and the normal name is an alias. */
2711 #if defined (__stub_shmat) || defined (__stub___shmat)
2719 if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2721 eval "ac_cv_func_shmat=yes"
2723 echo "configure: failed program was:" >&5
2724 cat conftest.$ac_ext >&5
2726 eval "ac_cv_func_shmat=no"
2731 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2732 echo "$ac_t""yes" 1>&6
2735 echo "$ac_t""no" 1>&6
2738 if test $ac_cv_func_shmat = no; then
2739 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2740 echo "configure:2752: checking for shmat in -lipc" >&5
2741 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2742 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2743 echo $ac_n "(cached) $ac_c" 1>&6
2745 ac_save_LIBS="$LIBS"
2747 cat > conftest.$ac_ext <<EOF
2748 #line 2760 "configure"
2749 #include "confdefs.h"
2750 /* Override any gcc2 internal prototype to avoid an error. */
2751 /* We use char because int might match the return type of a gcc2
2752 builtin and then its argument prototype would still apply. */
2759 if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2761 eval "ac_cv_lib_$ac_lib_var=yes"
2763 echo "configure: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
2766 eval "ac_cv_lib_$ac_lib_var=no"
2769 LIBS="$ac_save_LIBS"
2772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2773 echo "$ac_t""yes" 1>&6
2774 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2776 echo "$ac_t""no" 1>&6
2782 # Check for libraries that X11R6 Xt/Xaw programs need.
2783 ac_save_LDFLAGS="$LDFLAGS"
2784 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2785 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2786 # check for ICE first), but we must link in the order -lSM -lICE or
2787 # we get undefined symbols. So assume we have SM if we have ICE.
2788 # These have to be linked with before -lX11, unlike the other
2789 # libraries we check for below, so use a different variable.
2790 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2791 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2792 echo "configure:2804: checking for IceConnectionNumber in -lICE" >&5
2793 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2794 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2795 echo $ac_n "(cached) $ac_c" 1>&6
2797 ac_save_LIBS="$LIBS"
2798 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
2799 cat > conftest.$ac_ext <<EOF
2800 #line 2812 "configure"
2801 #include "confdefs.h"
2802 /* Override any gcc2 internal prototype to avoid an error. */
2803 /* We use char because int might match the return type of a gcc2
2804 builtin and then its argument prototype would still apply. */
2805 char IceConnectionNumber();
2808 IceConnectionNumber()
2811 if { (eval echo configure:2823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2813 eval "ac_cv_lib_$ac_lib_var=yes"
2815 echo "configure: failed program was:" >&5
2816 cat conftest.$ac_ext >&5
2818 eval "ac_cv_lib_$ac_lib_var=no"
2821 LIBS="$ac_save_LIBS"
2824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2825 echo "$ac_t""yes" 1>&6
2826 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2828 echo "$ac_t""no" 1>&6
2831 LDFLAGS="$ac_save_LDFLAGS"
2836 if test "$have_x" != yes; then
2837 { echo "configure: error: Couldn't find X11 headers/libs. Try \`$0 --help'." 1>&2; exit 1; }
2841 # Try and find the app-defaults directory.
2842 # It sucks that autoconf doesn't do this already...
2852 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
2853 echo "configure:2865: checking for X app-defaults directory" >&5
2854 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
2855 echo $ac_n "(cached) $ac_c" 1>&6
2859 if mkdir conftestdir; then
2861 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2862 cat > Imakefile <<'EOF'
2864 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
2866 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2867 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
2868 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2873 if test x"$ac_x_app_defaults" = x; then
2875 # Look for the directory under a standard set of common directories.
2876 # Check X11 before X11Rn because it's often a symlink to the current release.
2878 /usr/X11/lib/app-defaults \
2879 /usr/X11R6/lib/app-defaults \
2880 /usr/X11R6/lib/X11/app-defaults \
2881 /usr/X11R5/lib/app-defaults \
2882 /usr/X11R5/lib/X11/app-defaults \
2883 /usr/X11R4/lib/app-defaults \
2884 /usr/X11R4/lib/X11/app-defaults \
2886 /usr/lib/X11/app-defaults \
2887 /usr/lib/X11R6/app-defaults \
2888 /usr/lib/X11R5/app-defaults \
2889 /usr/lib/X11R4/app-defaults \
2891 /usr/local/X11/lib/app-defaults \
2892 /usr/local/X11R6/lib/app-defaults \
2893 /usr/local/X11R5/lib/app-defaults \
2894 /usr/local/X11R4/lib/app-defaults \
2896 /usr/local/lib/X11/app-defaults \
2897 /usr/local/lib/X11R6/app-defaults \
2898 /usr/local/lib/X11R6/X11/app-defaults \
2899 /usr/local/lib/X11R5/app-defaults \
2900 /usr/local/lib/X11R5/X11/app-defaults \
2901 /usr/local/lib/X11R4/app-defaults \
2902 /usr/local/lib/X11R4/X11/app-defaults \
2904 /usr/X386/lib/X11/app-defaults \
2905 /usr/x386/lib/X11/app-defaults \
2906 /usr/XFree86/lib/X11/app-defaults \
2908 /usr/lib/X11/app-defaults \
2909 /usr/local/lib/X11/app-defaults \
2910 /usr/unsupported/lib/X11/app-defaults \
2911 /usr/athena/lib/X11/app-defaults \
2912 /usr/local/x11r5/lib/X11/app-defaults \
2913 /usr/lpp/Xamples/lib/X11/app-defaults \
2914 /lib/usr/lib/X11/app-defaults \
2916 /usr/openwin/lib/app-defaults \
2917 /usr/openwin/lib/X11/app-defaults \
2918 /usr/openwin/share/lib/app-defaults \
2919 /usr/openwin/share/lib/X11/app-defaults \
2921 /X11R6/lib/app-defaults \
2922 /X11R5/lib/app-defaults \
2923 /X11R4/lib/app-defaults \
2926 if test -d "$ac_dir"; then
2927 ac_x_app_defaults=$ac_dir
2933 if test x"$ac_x_app_defaults" = x; then
2934 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
2936 # Record where we found app-defaults for the cache.
2937 ac_cv_x_app_defaults="$ac_x_app_defaults"
2941 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
2942 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
2944 APPDEFAULTS=$ac_x_app_defaults
2947 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2951 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2955 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2960 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2961 # Use this sparingly; it probably doesn't work very well on X programs.
2965 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2966 # (But not the -L directories!)
2972 # Usage: HANDLE_X_PATH_ARG([variable_name],
2973 # [--command-line-option],
2974 # [descriptive string])
2976 # All of the --with options take three forms:
2978 # --with-foo (or --with-foo=yes)
2979 # --without-foo (or --with-foo=no)
2982 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
2983 # a directory (string beginning with a slash) it checks to see whether
2984 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2991 # check for the HP XHPDisableReset server extension headers.
2994 ac_save_CPPFLAGS="$CPPFLAGS"
2995 if test \! -z "$includedir" ; then
2996 CPPFLAGS="$CPPFLAGS -I$includedir"
2998 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2999 cat > conftest.$ac_ext <<EOF
3000 #line 3012 "configure"
3001 #include "confdefs.h"
3002 #include <X11/XHPlib.h>
3004 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3005 egrep "XHPDisableReset" >/dev/null 2>&1; then
3007 cat >> confdefs.h <<\EOF
3008 #define HAVE_XHPDISABLERESET 1
3011 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
3015 CPPFLAGS="$ac_save_CPPFLAGS"
3018 # Check for the availability of the XPointer typedef, and define it otherwise.
3020 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
3021 echo "configure:3033: checking for XPointer" >&5
3022 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
3023 echo $ac_n "(cached) $ac_c" 1>&6
3026 ac_save_CPPFLAGS="$CPPFLAGS"
3027 if test \! -z "$includedir" ; then
3028 CPPFLAGS="$CPPFLAGS -I$includedir"
3030 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3031 cat > conftest.$ac_ext <<EOF
3032 #line 3044 "configure"
3033 #include "confdefs.h"
3034 #include <X11/Xlib.h>
3036 XPointer foo = (XPointer) 0;
3039 if { (eval echo configure:3051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3043 echo "configure: failed program was:" >&5
3044 cat conftest.$ac_ext >&5
3049 CPPFLAGS="$ac_save_CPPFLAGS"
3052 echo "$ac_t""$ac_cv_xpointer" 1>&6
3053 if test "$ac_cv_xpointer" != yes; then
3054 cat >> confdefs.h <<\EOF
3055 #define XPointer char*
3061 # Random special-cases for certain pathological OSes. You know who you are.
3066 # The following arcana was gleaned from conversations with
3067 # Eric Schwartz <erics@col.hp.com>:
3069 # On HPUX 10.x, the parts of X that HP considers "standard" live in
3070 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
3071 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
3072 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
3073 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
3074 # you don't need any -I or -L arguments.
3076 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
3077 # are the same division as 10.x. However, there are no symlinks to
3078 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
3079 # arguments are always necessary.
3081 # However, X11R6 was available on HPUX 9.x as a patch: if that
3082 # patch was installed, then all of X11R6 went in to
3083 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
3085 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
3086 # whether R5 was available as a patch; R6 undoubtedly was not.)
3088 # So. We try and use the highest numbered pair of
3089 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3090 # that are available. We do not mix and match different versions
3093 # Questions I still don't know the answers to: (do you?)
3095 # * Does HPUX 10.x come with /usr/contrib/X11R6/ standard?
3096 # Or does that need to be installed separately?
3098 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3099 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3100 # that contrib directory? Did it contain so-called "standard"
3101 # X11R6, or did it include Xaw and Xmu as well? If the former,
3102 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3103 # be a situation where one had to reach into the R5 headers and
3104 # libs to find Xmu? That is, must both R6 and R5 directories
3105 # be on the -I and -L lists in that case?
3107 for version in X11R6 X11R5 X11R4 ; do
3108 # if either pair of directories exists...
3109 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib ; then
3110 # if contrib exists, use it...
3111 if test -d /usr/contrib/$version/lib ; then
3112 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3113 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3115 # if the "standard" one exists, use it.
3116 if test -d /usr/lib/$version ; then
3117 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3118 X_LIBS="$X_LIBS -L/usr/lib/$version"
3120 # since at least one of the pair exists, go no farther.
3125 # Now find Motif. Thanks for not making xmkmf find this by
3126 # default, you losers.
3128 if test -d /usr/lib/Motif1.2 ; then
3129 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3130 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3131 elif test -d /usr/lib/Motif1.1 ; then
3132 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3133 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3136 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3138 if test -d /opt/Mesa/lib ; then
3139 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3140 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3143 if test -d /opt/xpm/lib/X11 ; then
3144 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3145 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3148 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3149 # in /usr/local/, unless there is already an xscreensaver in
3150 # /usr/local/bin/. This can be overridden with the --prefix arg
3151 # to configure. I'm not sure this is the right thing to do, but
3152 # Richard Lloyd says so...
3154 if test \! -x /usr/local/bin/xscreensaver ; then
3155 ac_default_prefix=/opt/xscreensaver
3161 # Thanks for not making xmkmf find this by default, pinheads.
3162 # And thanks for moving things around again, too. Is this
3163 # really the standard location now? What happened to the
3164 # joke that this kind of thing went in /opt?
3165 # cthomp says "answer: CDE (Common Disorganized Environment)"
3167 if test -f /usr/dt/include/Xm/Xm.h ; then
3168 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3169 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3171 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3172 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3173 echo "configure:3185: checking for regcmp in -lgen" >&5
3174 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3175 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3176 echo $ac_n "(cached) $ac_c" 1>&6
3178 ac_save_LIBS="$LIBS"
3180 cat > conftest.$ac_ext <<EOF
3181 #line 3193 "configure"
3182 #include "confdefs.h"
3183 /* Override any gcc2 internal prototype to avoid an error. */
3184 /* We use char because int might match the return type of a gcc2
3185 builtin and then its argument prototype would still apply. */
3192 if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3194 eval "ac_cv_lib_$ac_lib_var=yes"
3196 echo "configure: failed program was:" >&5
3197 cat conftest.$ac_ext >&5
3199 eval "ac_cv_lib_$ac_lib_var=no"
3202 LIBS="$ac_save_LIBS"
3205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3206 echo "$ac_t""yes" 1>&6
3207 X_LIBS="$X_LIBS -lgen"
3209 echo "$ac_t""no" 1>&6
3218 # Check for Xmu (some fucked up vendors don't ship it...)
3222 ac_save_CPPFLAGS="$CPPFLAGS"
3223 if test \! -z "$includedir" ; then
3224 CPPFLAGS="$CPPFLAGS -I$includedir"
3226 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3227 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3228 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3229 echo "configure:3241: checking for X11/Xmu/Error.h" >&5
3230 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3231 echo $ac_n "(cached) $ac_c" 1>&6
3233 cat > conftest.$ac_ext <<EOF
3234 #line 3246 "configure"
3235 #include "confdefs.h"
3236 #include <X11/Xmu/Error.h>
3238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3239 { (eval echo configure:3251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3241 if test -z "$ac_err"; then
3243 eval "ac_cv_header_$ac_safe=yes"
3246 echo "configure: failed program was:" >&5
3247 cat conftest.$ac_ext >&5
3249 eval "ac_cv_header_$ac_safe=no"
3253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3254 echo "$ac_t""yes" 1>&6
3257 echo "$ac_t""no" 1>&6
3260 CPPFLAGS="$ac_save_CPPFLAGS"
3261 if test "$have_xmu" = no ; then
3262 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3263 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3267 SAVER_LIBS="-lXmu $SAVER_LIBS"
3268 HACK_LIBS="-lXmu $HACK_LIBS"
3269 TOOLKIT_LIBS="-lXmu $TOOLKIT_LIBS"
3270 cat >> confdefs.h <<\EOF
3277 # See comp.windows.x FAQ question 124 about _get_wmShellWidgetClass on 4.1.x.
3278 # The right fix is to get OpenWindows 3.0 patches 100512-02 and 100573-03.
3280 if test "$have_xmu" = yes ; then
3283 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3284 echo "configure:3296: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3285 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3286 echo $ac_n "(cached) $ac_c" 1>&6
3288 ac_save_LDFLAGS="$LDFLAGS"
3289 if test \! -z "$x_libraries" ; then
3290 LDFLAGS="$LDFLAGS -L$x_libraries"
3292 # Note: this trick never works! (Generally.)
3293 # We're only getting away with using AC_TRY_LINK
3294 # with X libraries because we know it's SunOS.
3295 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3296 cat > conftest.$ac_ext <<EOF
3297 #line 3309 "configure"
3298 #include "confdefs.h"
3304 if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3306 ac_cv_sunos_xmu_bug=no
3308 echo "configure: failed program was:" >&5
3309 cat conftest.$ac_ext >&5
3311 ac_cv_sunos_xmu_bug=yes
3314 LDFLAGS="$ac_save_LDFLAGS"
3317 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3318 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3319 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3320 echo "configure:3332: checking whether the compiler understands -static" >&5
3321 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3322 echo $ac_n "(cached) $ac_c" 1>&6
3324 ac_save_LDFLAGS="$LDFLAGS"
3325 LDFLAGS="$LDFLAGS -static"
3326 cat > conftest.$ac_ext <<EOF
3327 #line 3339 "configure"
3328 #include "confdefs.h"
3334 if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3338 echo "configure: failed program was:" >&5
3339 cat conftest.$ac_ext >&5
3344 LDFLAGS="$ac_save_LDFLAGS"
3347 echo "$ac_t""$ac_cv_ld_static" 1>&6
3348 if test "$ac_cv_ld_static" = yes ; then
3349 LDFLAGS="$LDFLAGS -static"
3351 LDFLAGS="$LDFLAGS -Bstatic"
3359 # Check for the SGI SCREEN_SAVER server extension header.
3362 with_sgi_req=unspecified
3363 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3364 if test "${with_sgi_ext+set}" = set; then
3365 withval="$with_sgi_ext"
3366 with_sgi="$withval"; with_sgi_req="$withval"
3378 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3379 echo "configure:3391: checking for SGI SCREEN_SAVER headers" >&5
3382 X_CFLAGS="-I$d $X_CFLAGS"
3383 echo "$ac_t""$d" 1>&6
3385 echo "$ac_t""not found ($d: no such directory)" 1>&6
3388 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3389 echo "configure:3401: checking for SGI SCREEN_SAVER libs" >&5
3392 X_LIBS="-L$d $X_LIBS"
3393 echo "$ac_t""$d" 1>&6
3395 echo "$ac_t""not found ($d: no such directory)" 1>&6
3398 # replace the directory string with "yes".
3400 with_sgi=$with_sgi_req
3405 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3406 echo " If it is a directory, then \`DIR/include' will be added to"
3407 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3412 # why is this necessary?
3413 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3414 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3418 if test "$with_sgi" = yes; then
3420 ac_save_CPPFLAGS="$CPPFLAGS"
3421 if test \! -z "$includedir" ; then
3422 CPPFLAGS="$CPPFLAGS -I$includedir"
3424 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3425 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3426 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3427 echo "configure:3439: checking for X11/extensions/XScreenSaver.h" >&5
3428 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3429 echo $ac_n "(cached) $ac_c" 1>&6
3431 cat > conftest.$ac_ext <<EOF
3432 #line 3444 "configure"
3433 #include "confdefs.h"
3434 #include <X11/extensions/XScreenSaver.h>
3436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3437 { (eval echo configure:3449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3439 if test -z "$ac_err"; then
3441 eval "ac_cv_header_$ac_safe=yes"
3444 echo "configure: failed program was:" >&5
3445 cat conftest.$ac_ext >&5
3447 eval "ac_cv_header_$ac_safe=no"
3451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3452 echo "$ac_t""yes" 1>&6
3454 cat >> confdefs.h <<\EOF
3455 #define HAVE_SGI_SAVER_EXTENSION 1
3459 echo "$ac_t""no" 1>&6
3462 CPPFLAGS="$ac_save_CPPFLAGS"
3464 elif test "$with_sgi" != no; then
3465 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3469 # Check for the MIT-SCREEN-SAVER server extension header,
3470 # unless the SGI extension has already been found.
3473 with_mit_req=unspecified
3474 # Check whether --with-mit-ext or --without-mit-ext was given.
3475 if test "${with_mit_ext+set}" = set; then
3476 withval="$with_mit_ext"
3477 with_mit="$withval"; with_mit_req="$withval"
3489 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3490 echo "configure:3502: checking for MIT-SCREEN-SAVER headers" >&5
3493 X_CFLAGS="-I$d $X_CFLAGS"
3494 echo "$ac_t""$d" 1>&6
3496 echo "$ac_t""not found ($d: no such directory)" 1>&6
3499 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3500 echo "configure:3512: checking for MIT-SCREEN-SAVER libs" >&5
3503 X_LIBS="-L$d $X_LIBS"
3504 echo "$ac_t""$d" 1>&6
3506 echo "$ac_t""not found ($d: no such directory)" 1>&6
3509 # replace the directory string with "yes".
3511 with_mit=$with_mit_req
3516 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3517 echo " If it is a directory, then \`DIR/include' will be added to"
3518 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3523 # why is this necessary?
3524 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3525 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3529 if test "$have_sgi" != yes; then
3530 if test "$with_mit" = yes; then
3532 ac_save_CPPFLAGS="$CPPFLAGS"
3533 if test \! -z "$includedir" ; then
3534 CPPFLAGS="$CPPFLAGS -I$includedir"
3536 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3537 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3538 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3539 echo "configure:3551: checking for X11/extensions/scrnsaver.h" >&5
3540 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3541 echo $ac_n "(cached) $ac_c" 1>&6
3543 cat > conftest.$ac_ext <<EOF
3544 #line 3556 "configure"
3545 #include "confdefs.h"
3546 #include <X11/extensions/scrnsaver.h>
3548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3549 { (eval echo configure:3561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3551 if test -z "$ac_err"; then
3553 eval "ac_cv_header_$ac_safe=yes"
3556 echo "configure: failed program was:" >&5
3557 cat conftest.$ac_ext >&5
3559 eval "ac_cv_header_$ac_safe=no"
3563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3564 echo "$ac_t""yes" 1>&6
3567 echo "$ac_t""no" 1>&6
3570 CPPFLAGS="$ac_save_CPPFLAGS"
3572 # Now check to see if it's really in the library; XF86Free-3.3 ships
3573 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3575 if test "$have_mit" = yes; then
3577 ac_save_CPPFLAGS="$CPPFLAGS"
3578 ac_save_LDFLAGS="$LDFLAGS"
3580 if test \! -z "$includedir" ; then
3581 CPPFLAGS="$CPPFLAGS -I$includedir"
3583 # note: $X_CFLAGS includes $x_includes
3584 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3586 if test \! -z "$libdir" ; then
3587 LDFLAGS="$LDFLAGS -L$libdir"
3589 # note: $X_LIBS includes $x_libraries
3590 LDFLAGS="$LDFLAGS $X_LIBS"
3592 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3593 echo "configure:3605: checking for XScreenSaverRegister in -lXext" >&5
3594 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3595 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3596 echo $ac_n "(cached) $ac_c" 1>&6
3598 ac_save_LIBS="$LIBS"
3599 LIBS="-lXext -lm $LIBS"
3600 cat > conftest.$ac_ext <<EOF
3601 #line 3613 "configure"
3602 #include "confdefs.h"
3603 /* Override any gcc2 internal prototype to avoid an error. */
3604 /* We use char because int might match the return type of a gcc2
3605 builtin and then its argument prototype would still apply. */
3606 char XScreenSaverRegister();
3609 XScreenSaverRegister()
3612 if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3614 eval "ac_cv_lib_$ac_lib_var=yes"
3616 echo "configure: failed program was:" >&5
3617 cat conftest.$ac_ext >&5
3619 eval "ac_cv_lib_$ac_lib_var=no"
3622 LIBS="$ac_save_LIBS"
3625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3626 echo "$ac_t""yes" 1>&6
3627 ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3628 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3629 cat >> confdefs.h <<EOF
3630 #define $ac_tr_lib 1
3636 echo "$ac_t""no" 1>&6
3640 CPPFLAGS="$ac_save_CPPFLAGS"
3641 LDFLAGS="$ac_save_LDFLAGS"
3643 if test "$have_mit" = no; then
3644 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3645 # of in Xext. Thank you master, may I have another.
3647 ac_save_CPPFLAGS="$CPPFLAGS"
3648 ac_save_LDFLAGS="$LDFLAGS"
3650 if test \! -z "$includedir" ; then
3651 CPPFLAGS="$CPPFLAGS -I$includedir"
3653 # note: $X_CFLAGS includes $x_includes
3654 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3656 if test \! -z "$libdir" ; then
3657 LDFLAGS="$LDFLAGS -L$libdir"
3659 # note: $X_LIBS includes $x_libraries
3660 LDFLAGS="$LDFLAGS $X_LIBS"
3662 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3663 echo "configure:3675: checking for XScreenSaverRegister in -lXExExt" >&5
3664 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3665 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3666 echo $ac_n "(cached) $ac_c" 1>&6
3668 ac_save_LIBS="$LIBS"
3669 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3670 cat > conftest.$ac_ext <<EOF
3671 #line 3683 "configure"
3672 #include "confdefs.h"
3673 /* Override any gcc2 internal prototype to avoid an error. */
3674 /* We use char because int might match the return type of a gcc2
3675 builtin and then its argument prototype would still apply. */
3676 char XScreenSaverRegister();
3679 XScreenSaverRegister()
3682 if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3684 eval "ac_cv_lib_$ac_lib_var=yes"
3686 echo "configure: failed program was:" >&5
3687 cat conftest.$ac_ext >&5
3689 eval "ac_cv_lib_$ac_lib_var=no"
3692 LIBS="$ac_save_LIBS"
3695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3696 echo "$ac_t""yes" 1>&6
3697 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3699 echo "$ac_t""no" 1>&6
3702 CPPFLAGS="$ac_save_CPPFLAGS"
3703 LDFLAGS="$ac_save_LDFLAGS"
3706 if test "$have_mit" = no; then
3707 # Double fuck! Looks like some versions of XFree86 (whichever version
3708 # it is that comes with RedHat Linux 2.0 -- I can't find a version
3709 # number) put this garbage in Xss instead of Xext. Thank you master,
3710 # may I have another.
3712 ac_save_CPPFLAGS="$CPPFLAGS"
3713 ac_save_LDFLAGS="$LDFLAGS"
3715 if test \! -z "$includedir" ; then
3716 CPPFLAGS="$CPPFLAGS -I$includedir"
3718 # note: $X_CFLAGS includes $x_includes
3719 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3721 if test \! -z "$libdir" ; then
3722 LDFLAGS="$LDFLAGS -L$libdir"
3724 # note: $X_LIBS includes $x_libraries
3725 LDFLAGS="$LDFLAGS $X_LIBS"
3727 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
3728 echo "configure:3740: checking for XScreenSaverRegister in -lXss" >&5
3729 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3730 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3731 echo $ac_n "(cached) $ac_c" 1>&6
3733 ac_save_LIBS="$LIBS"
3734 LIBS="-lXss -lX11 -lXext -lm $LIBS"
3735 cat > conftest.$ac_ext <<EOF
3736 #line 3748 "configure"
3737 #include "confdefs.h"
3738 /* Override any gcc2 internal prototype to avoid an error. */
3739 /* We use char because int might match the return type of a gcc2
3740 builtin and then its argument prototype would still apply. */
3741 char XScreenSaverRegister();
3744 XScreenSaverRegister()
3747 if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3749 eval "ac_cv_lib_$ac_lib_var=yes"
3751 echo "configure: failed program was:" >&5
3752 cat conftest.$ac_ext >&5
3754 eval "ac_cv_lib_$ac_lib_var=no"
3757 LIBS="$ac_save_LIBS"
3760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3761 echo "$ac_t""yes" 1>&6
3762 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
3764 echo "$ac_t""no" 1>&6
3767 CPPFLAGS="$ac_save_CPPFLAGS"
3768 LDFLAGS="$ac_save_LDFLAGS"
3771 if test "$have_mit" = yes; then
3772 cat >> confdefs.h <<\EOF
3773 #define HAVE_MIT_SAVER_EXTENSION 1
3780 elif test "$with_mit" != no; then
3781 echo "error: must be yes or no: --with-mit-ext=$with_mit"
3787 # Check for the XIDLE server extension header.
3790 with_xidle_req=unspecified
3791 # Check whether --with-xidle-ext or --without-xidle-ext was given.
3792 if test "${with_xidle_ext+set}" = set; then
3793 withval="$with_xidle_ext"
3794 with_xidle="$withval"; with_xidle_req="$withval"
3801 case "$with_xidle" in
3806 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
3807 echo "configure:3819: checking for XIDLE headers" >&5
3808 d=$with_xidle/include
3810 X_CFLAGS="-I$d $X_CFLAGS"
3811 echo "$ac_t""$d" 1>&6
3813 echo "$ac_t""not found ($d: no such directory)" 1>&6
3816 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
3817 echo "configure:3829: checking for XIDLE libs" >&5
3820 X_LIBS="-L$d $X_LIBS"
3821 echo "$ac_t""$d" 1>&6
3823 echo "$ac_t""not found ($d: no such directory)" 1>&6
3826 # replace the directory string with "yes".
3827 with_xidle_req="yes"
3828 with_xidle=$with_xidle_req
3833 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
3834 echo " If it is a directory, then \`DIR/include' will be added to"
3835 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3840 # why is this necessary?
3841 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3842 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3846 if test "$with_xidle" = yes; then
3848 ac_save_CPPFLAGS="$CPPFLAGS"
3849 if test \! -z "$includedir" ; then
3850 CPPFLAGS="$CPPFLAGS -I$includedir"
3852 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3853 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
3854 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
3855 echo "configure:3867: checking for X11/extensions/xidle.h" >&5
3856 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3857 echo $ac_n "(cached) $ac_c" 1>&6
3859 cat > conftest.$ac_ext <<EOF
3860 #line 3872 "configure"
3861 #include "confdefs.h"
3862 #include <X11/extensions/xidle.h>
3864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3865 { (eval echo configure:3877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3867 if test -z "$ac_err"; then
3869 eval "ac_cv_header_$ac_safe=yes"
3872 echo "configure: failed program was:" >&5
3873 cat conftest.$ac_ext >&5
3875 eval "ac_cv_header_$ac_safe=no"
3879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3880 echo "$ac_t""yes" 1>&6
3882 cat >> confdefs.h <<\EOF
3883 #define HAVE_XIDLE_EXTENSION 1
3887 echo "$ac_t""no" 1>&6
3890 CPPFLAGS="$ac_save_CPPFLAGS"
3891 elif test "$with_xidle" != no; then
3892 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
3897 # Check for the XSHM server extension header.
3900 with_xshm_req=unspecified
3901 # Check whether --with-xshm-ext or --without-xshm-ext was given.
3902 if test "${with_xshm_ext+set}" = set; then
3903 withval="$with_xshm_ext"
3904 with_xshm="$withval"; with_xshm_req="$withval"
3911 case "$with_xshm" in
3916 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
3917 echo "configure:3929: checking for XSHM headers" >&5
3918 d=$with_xshm/include
3920 X_CFLAGS="-I$d $X_CFLAGS"
3921 echo "$ac_t""$d" 1>&6
3923 echo "$ac_t""not found ($d: no such directory)" 1>&6
3926 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
3927 echo "configure:3939: checking for XSHM libs" >&5
3930 X_LIBS="-L$d $X_LIBS"
3931 echo "$ac_t""$d" 1>&6
3933 echo "$ac_t""not found ($d: no such directory)" 1>&6
3936 # replace the directory string with "yes".
3938 with_xshm=$with_xshm_req
3943 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
3944 echo " If it is a directory, then \`DIR/include' will be added to"
3945 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3950 # why is this necessary?
3951 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3952 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3956 if test "$with_xshm" = yes; then
3958 # first check for Xshm.h.
3960 ac_save_CPPFLAGS="$CPPFLAGS"
3961 if test \! -z "$includedir" ; then
3962 CPPFLAGS="$CPPFLAGS -I$includedir"
3964 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3965 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
3966 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
3967 echo "configure:3979: checking for X11/extensions/XShm.h" >&5
3968 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3969 echo $ac_n "(cached) $ac_c" 1>&6
3971 cat > conftest.$ac_ext <<EOF
3972 #line 3984 "configure"
3973 #include "confdefs.h"
3974 #include <X11/extensions/XShm.h>
3976 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3977 { (eval echo configure:3989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3978 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3979 if test -z "$ac_err"; then
3981 eval "ac_cv_header_$ac_safe=yes"
3984 echo "configure: failed program was:" >&5
3985 cat conftest.$ac_ext >&5
3987 eval "ac_cv_header_$ac_safe=no"
3991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3992 echo "$ac_t""yes" 1>&6
3995 echo "$ac_t""no" 1>&6
3998 CPPFLAGS="$ac_save_CPPFLAGS"
4000 # if that succeeded, then check for sys/ipc.h.
4001 if test "$have_xshm" = yes; then
4004 ac_save_CPPFLAGS="$CPPFLAGS"
4005 if test \! -z "$includedir" ; then
4006 CPPFLAGS="$CPPFLAGS -I$includedir"
4008 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4009 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
4010 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
4011 echo "configure:4023: checking for sys/ipc.h" >&5
4012 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4013 echo $ac_n "(cached) $ac_c" 1>&6
4015 cat > conftest.$ac_ext <<EOF
4016 #line 4028 "configure"
4017 #include "confdefs.h"
4018 #include <sys/ipc.h>
4020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4021 { (eval echo configure:4033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4023 if test -z "$ac_err"; then
4025 eval "ac_cv_header_$ac_safe=yes"
4028 echo "configure: failed program was:" >&5
4029 cat conftest.$ac_ext >&5
4031 eval "ac_cv_header_$ac_safe=no"
4035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4036 echo "$ac_t""yes" 1>&6
4039 echo "$ac_t""no" 1>&6
4042 CPPFLAGS="$ac_save_CPPFLAGS"
4045 # if that succeeded, then check for sys/shm.h.
4046 if test "$have_xshm" = yes; then
4049 ac_save_CPPFLAGS="$CPPFLAGS"
4050 if test \! -z "$includedir" ; then
4051 CPPFLAGS="$CPPFLAGS -I$includedir"
4053 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4054 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
4055 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
4056 echo "configure:4068: checking for sys/shm.h" >&5
4057 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4058 echo $ac_n "(cached) $ac_c" 1>&6
4060 cat > conftest.$ac_ext <<EOF
4061 #line 4073 "configure"
4062 #include "confdefs.h"
4063 #include <sys/shm.h>
4065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4066 { (eval echo configure:4078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4068 if test -z "$ac_err"; then
4070 eval "ac_cv_header_$ac_safe=yes"
4073 echo "configure: failed program was:" >&5
4074 cat conftest.$ac_ext >&5
4076 eval "ac_cv_header_$ac_safe=no"
4080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4081 echo "$ac_t""yes" 1>&6
4084 echo "$ac_t""no" 1>&6
4087 CPPFLAGS="$ac_save_CPPFLAGS"
4090 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
4091 # to exist, but the library code to not exist. And even better, the library
4092 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
4093 # lib doesn't exist, give up.
4099 ac_save_CPPFLAGS="$CPPFLAGS"
4100 ac_save_LDFLAGS="$LDFLAGS"
4102 if test \! -z "$includedir" ; then
4103 CPPFLAGS="$CPPFLAGS -I$includedir"
4105 # note: $X_CFLAGS includes $x_includes
4106 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4108 if test \! -z "$libdir" ; then
4109 LDFLAGS="$LDFLAGS -L$libdir"
4111 # note: $X_LIBS includes $x_libraries
4112 LDFLAGS="$LDFLAGS $X_LIBS"
4114 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
4115 echo "configure:4127: checking for XShmQueryExtension in -lXextSam" >&5
4116 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
4117 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4118 echo $ac_n "(cached) $ac_c" 1>&6
4120 ac_save_LIBS="$LIBS"
4121 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
4122 cat > conftest.$ac_ext <<EOF
4123 #line 4135 "configure"
4124 #include "confdefs.h"
4125 /* Override any gcc2 internal prototype to avoid an error. */
4126 /* We use char because int might match the return type of a gcc2
4127 builtin and then its argument prototype would still apply. */
4128 char XShmQueryExtension();
4131 XShmQueryExtension()
4134 if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4136 eval "ac_cv_lib_$ac_lib_var=yes"
4138 echo "configure: failed program was:" >&5
4139 cat conftest.$ac_ext >&5
4141 eval "ac_cv_lib_$ac_lib_var=no"
4144 LIBS="$ac_save_LIBS"
4147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4148 echo "$ac_t""yes" 1>&6
4149 have_xshm=yes; SAVER_LIBS="$SAVER_LIBS -lXextSam"
4151 echo "$ac_t""no" 1>&6
4154 CPPFLAGS="$ac_save_CPPFLAGS"
4155 LDFLAGS="$ac_save_LDFLAGS"
4159 # if that succeeded, then we've really got it.
4160 if test "$have_xshm" = yes; then
4161 cat >> confdefs.h <<\EOF
4162 #define HAVE_XSHM_EXTENSION 1
4167 elif test "$with_xshm" != no; then
4168 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
4173 # Check for the SGI-VIDEO-CONTROL server extension header.
4176 with_sgivc_req=unspecified
4177 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4178 if test "${with_sgivc_ext+set}" = set; then
4179 withval="$with_sgivc_ext"
4180 with_sgivc="$withval"; with_sgivc_req="$withval"
4187 case "$with_sgivc" in
4192 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4193 echo "configure:4205: checking for SGI-VIDEO-CONTROL headers" >&5
4194 d=$with_sgivc/include
4196 X_CFLAGS="-I$d $X_CFLAGS"
4197 echo "$ac_t""$d" 1>&6
4199 echo "$ac_t""not found ($d: no such directory)" 1>&6
4202 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4203 echo "configure:4215: checking for SGI-VIDEO-CONTROL libs" >&5
4206 X_LIBS="-L$d $X_LIBS"
4207 echo "$ac_t""$d" 1>&6
4209 echo "$ac_t""not found ($d: no such directory)" 1>&6
4212 # replace the directory string with "yes".
4213 with_sgivc_req="yes"
4214 with_sgivc=$with_sgivc_req
4219 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4220 echo " If it is a directory, then \`DIR/include' will be added to"
4221 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4226 # why is this necessary?
4227 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4228 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4232 if test "$with_sgivc" = yes; then
4234 # first check for XSGIvc.h
4236 ac_save_CPPFLAGS="$CPPFLAGS"
4237 if test \! -z "$includedir" ; then
4238 CPPFLAGS="$CPPFLAGS -I$includedir"
4240 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4241 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4242 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4243 echo "configure:4255: checking for X11/extensions/XSGIvc.h" >&5
4244 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4245 echo $ac_n "(cached) $ac_c" 1>&6
4247 cat > conftest.$ac_ext <<EOF
4248 #line 4260 "configure"
4249 #include "confdefs.h"
4250 #include <X11/extensions/XSGIvc.h>
4252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4253 { (eval echo configure:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4255 if test -z "$ac_err"; then
4257 eval "ac_cv_header_$ac_safe=yes"
4260 echo "configure: failed program was:" >&5
4261 cat conftest.$ac_ext >&5
4263 eval "ac_cv_header_$ac_safe=no"
4267 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4268 echo "$ac_t""yes" 1>&6
4271 echo "$ac_t""no" 1>&6
4274 CPPFLAGS="$ac_save_CPPFLAGS"
4276 # if that succeeded, then check for the -lXsgivc
4277 if test "$have_sgivc" = yes; then
4280 ac_save_CPPFLAGS="$CPPFLAGS"
4281 ac_save_LDFLAGS="$LDFLAGS"
4283 if test \! -z "$includedir" ; then
4284 CPPFLAGS="$CPPFLAGS -I$includedir"
4286 # note: $X_CFLAGS includes $x_includes
4287 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4289 if test \! -z "$libdir" ; then
4290 LDFLAGS="$LDFLAGS -L$libdir"
4292 # note: $X_LIBS includes $x_libraries
4293 LDFLAGS="$LDFLAGS $X_LIBS"
4295 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4296 echo "configure:4308: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4297 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4298 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4299 echo $ac_n "(cached) $ac_c" 1>&6
4301 ac_save_LIBS="$LIBS"
4302 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4303 cat > conftest.$ac_ext <<EOF
4304 #line 4316 "configure"
4305 #include "confdefs.h"
4306 /* Override any gcc2 internal prototype to avoid an error. */
4307 /* We use char because int might match the return type of a gcc2
4308 builtin and then its argument prototype would still apply. */
4309 char XSGIvcQueryGammaMap();
4312 XSGIvcQueryGammaMap()
4315 if { (eval echo configure:4327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4317 eval "ac_cv_lib_$ac_lib_var=yes"
4319 echo "configure: failed program was:" >&5
4320 cat conftest.$ac_ext >&5
4322 eval "ac_cv_lib_$ac_lib_var=no"
4325 LIBS="$ac_save_LIBS"
4328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4329 echo "$ac_t""yes" 1>&6
4330 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4332 echo "$ac_t""no" 1>&6
4335 CPPFLAGS="$ac_save_CPPFLAGS"
4336 LDFLAGS="$ac_save_LDFLAGS"
4339 # if that succeeded, then we've really got it.
4340 if test "$have_sgivc" = yes; then
4341 cat >> confdefs.h <<\EOF
4342 #define HAVE_SGI_VC_EXTENSION 1
4347 elif test "$with_sgivc" != no; then
4348 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4353 # Check for the DPMS server extension header.
4356 with_dpms_req=unspecified
4357 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4358 if test "${with_dpms_ext+set}" = set; then
4359 withval="$with_dpms_ext"
4360 with_dpms="$withval"; with_dpms_req="$withval"
4367 case "$with_dpms" in
4372 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4373 echo "configure:4385: checking for DPMS headers" >&5
4374 d=$with_dpms/include
4376 X_CFLAGS="-I$d $X_CFLAGS"
4377 echo "$ac_t""$d" 1>&6
4379 echo "$ac_t""not found ($d: no such directory)" 1>&6
4382 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4383 echo "configure:4395: checking for DPMS libs" >&5
4386 X_LIBS="-L$d $X_LIBS"
4387 echo "$ac_t""$d" 1>&6
4389 echo "$ac_t""not found ($d: no such directory)" 1>&6
4392 # replace the directory string with "yes".
4394 with_dpms=$with_dpms_req
4399 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4400 echo " If it is a directory, then \`DIR/include' will be added to"
4401 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4406 # why is this necessary?
4407 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4408 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4412 if test "$with_dpms" = yes; then
4414 # first check for dpms.h
4416 ac_save_CPPFLAGS="$CPPFLAGS"
4417 if test \! -z "$includedir" ; then
4418 CPPFLAGS="$CPPFLAGS -I$includedir"
4420 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4421 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4422 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4423 echo "configure:4435: checking for X11/extensions/dpms.h" >&5
4424 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4425 echo $ac_n "(cached) $ac_c" 1>&6
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4440 "configure"
4429 #include "confdefs.h"
4430 #include <X11/extensions/dpms.h>
4432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4433 { (eval echo configure:4445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4435 if test -z "$ac_err"; then
4437 eval "ac_cv_header_$ac_safe=yes"
4440 echo "configure: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
4443 eval "ac_cv_header_$ac_safe=no"
4447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4448 echo "$ac_t""yes" 1>&6
4451 echo "$ac_t""no" 1>&6
4454 CPPFLAGS="$ac_save_CPPFLAGS"
4456 # if that succeeded, then check for the -lXdpms
4457 if test "$have_dpms" = yes; then
4460 ac_save_CPPFLAGS="$CPPFLAGS"
4461 ac_save_LDFLAGS="$LDFLAGS"
4463 if test \! -z "$includedir" ; then
4464 CPPFLAGS="$CPPFLAGS -I$includedir"
4466 # note: $X_CFLAGS includes $x_includes
4467 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4469 if test \! -z "$libdir" ; then
4470 LDFLAGS="$LDFLAGS -L$libdir"
4472 # note: $X_LIBS includes $x_libraries
4473 LDFLAGS="$LDFLAGS $X_LIBS"
4475 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4476 echo "configure:4488: checking for DPMSInfo in -lXdpms" >&5
4477 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4478 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4479 echo $ac_n "(cached) $ac_c" 1>&6
4481 ac_save_LIBS="$LIBS"
4482 LIBS="-lXdpms -lXext -lX11 $LIBS"
4483 cat > conftest.$ac_ext <<EOF
4484 #line 4496 "configure"
4485 #include "confdefs.h"
4486 /* Override any gcc2 internal prototype to avoid an error. */
4487 /* We use char because int might match the return type of a gcc2
4488 builtin and then its argument prototype would still apply. */
4495 if { (eval echo configure:4507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4497 eval "ac_cv_lib_$ac_lib_var=yes"
4499 echo "configure: failed program was:" >&5
4500 cat conftest.$ac_ext >&5
4502 eval "ac_cv_lib_$ac_lib_var=no"
4505 LIBS="$ac_save_LIBS"
4508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4509 echo "$ac_t""yes" 1>&6
4510 have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
4512 echo "$ac_t""no" 1>&6
4515 CPPFLAGS="$ac_save_CPPFLAGS"
4516 LDFLAGS="$ac_save_LDFLAGS"
4519 # if that succeeded, then we've really got it.
4520 if test "$have_dpms" = yes; then
4521 cat >> confdefs.h <<\EOF
4522 #define HAVE_DPMS_EXTENSION 1
4527 elif test "$with_dpms" != no; then
4528 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4533 # Check for /proc/interrupts
4535 have_proc_interrupts=no
4536 with_proc_interrupts_req=unspecified
4537 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
4538 if test "${with_proc_interrupts+set}" = set; then
4539 withval="$with_proc_interrupts"
4540 with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
4542 with_proc_interrupts=yes
4546 if test "$with_proc_interrupts" = yes; then
4548 echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
4549 echo "configure:4561: checking whether /proc/interrupts contains keyboard data" >&5
4550 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
4551 echo $ac_n "(cached) $ac_c" 1>&6
4553 ac_cv_have_proc_interrupts=no
4554 if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
4555 ac_cv_have_proc_interrupts=yes
4560 have_proc_interrupts=$ac_cv_have_proc_interrupts
4562 echo "$ac_t""$have_proc_interrupts" 1>&6
4564 if test "$have_proc_interrupts" = yes; then
4565 cat >> confdefs.h <<\EOF
4566 #define HAVE_PROC_INTERRUPTS 1
4571 elif test "$with_proc_interrupts" != no; then
4572 echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
4578 # Check for Motif and Athena --with and --without arguments.
4583 with_motif_req=unspecified
4584 with_athena_req=unspecified
4586 # Check whether --with-motif or --without-motif was given.
4587 if test "${with_motif+set}" = set; then
4588 withval="$with_motif"
4589 with_motif="$withval"; with_motif_req="$withval"
4596 case "$with_motif" in
4601 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
4602 echo "configure:4614: checking for Motif headers" >&5
4603 d=$with_motif/include
4605 X_CFLAGS="-I$d $X_CFLAGS"
4606 echo "$ac_t""$d" 1>&6
4608 echo "$ac_t""not found ($d: no such directory)" 1>&6
4611 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
4612 echo "configure:4624: checking for Motif libs" >&5
4615 X_LIBS="-L$d $X_LIBS"
4616 echo "$ac_t""$d" 1>&6
4618 echo "$ac_t""not found ($d: no such directory)" 1>&6
4621 # replace the directory string with "yes".
4622 with_motif_req="yes"
4623 with_motif=$with_motif_req
4628 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
4629 echo " If it is a directory, then \`DIR/include' will be added to"
4630 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4635 # why is this necessary?
4636 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4637 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4641 # Check whether --with-athena or --without-athena was given.
4642 if test "${with_athena+set}" = set; then
4643 withval="$with_athena"
4644 with_athena="$withval"; with_athena_req="$withval"
4651 case "$with_athena" in
4656 echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
4657 echo "configure:4669: checking for Athena headers" >&5
4658 d=$with_athena/include
4660 X_CFLAGS="-I$d $X_CFLAGS"
4661 echo "$ac_t""$d" 1>&6
4663 echo "$ac_t""not found ($d: no such directory)" 1>&6
4666 echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
4667 echo "configure:4679: checking for Athena libs" >&5
4670 X_LIBS="-L$d $X_LIBS"
4671 echo "$ac_t""$d" 1>&6
4673 echo "$ac_t""not found ($d: no such directory)" 1>&6
4676 # replace the directory string with "yes".
4677 with_athena_req="yes"
4678 with_athena=$with_athena_req
4683 echo "error: argument to --with-athena must be \"yes\", \"no\", or a directory."
4684 echo " If it is a directory, then \`DIR/include' will be added to"
4685 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4690 # why is this necessary?
4691 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4692 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4696 if test "$with_motif" != yes -a "$with_motif" != no ; then
4697 echo "error: must be yes or no: --with-motif=$with_motif"
4701 if test "$with_athena" != yes -a "$with_athena" != no ; then
4702 echo "error: must be yes or no: --with-athena=$with_athena"
4707 # Saying --without-motif is the same as saying --with-athena.
4708 if test "$with_motif_req" = no ; then
4713 # Saying --without-athena is the same as saying --with-motif.
4714 if test "$with_athena_req" = no ; then
4719 # Check for Motif and Athena headers.
4723 ac_save_CPPFLAGS="$CPPFLAGS"
4724 if test \! -z "$includedir" ; then
4725 CPPFLAGS="$CPPFLAGS -I$includedir"
4727 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4728 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
4729 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
4730 echo "configure:4742: checking for Xm/Xm.h" >&5
4731 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4732 echo $ac_n "(cached) $ac_c" 1>&6
4734 cat > conftest.$ac_ext <<EOF
4735 #line 4747 "configure"
4736 #include "confdefs.h"
4739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4740 { (eval echo configure:4752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4742 if test -z "$ac_err"; then
4744 eval "ac_cv_header_$ac_safe=yes"
4747 echo "configure: failed program was:" >&5
4748 cat conftest.$ac_ext >&5
4750 eval "ac_cv_header_$ac_safe=no"
4754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4755 echo "$ac_t""yes" 1>&6
4757 cat >> confdefs.h <<\EOF
4758 #define HAVE_MOTIF 1
4761 TOOLKIT_LIBS="-lXm $TOOLKIT_LIBS"
4763 echo "$ac_t""no" 1>&6
4766 CPPFLAGS="$ac_save_CPPFLAGS"
4773 ac_save_CPPFLAGS="$CPPFLAGS"
4774 if test \! -z "$includedir" ; then
4775 CPPFLAGS="$CPPFLAGS -I$includedir"
4777 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4778 ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
4779 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
4780 echo "configure:4792: checking for X11/Xaw/Dialog.h" >&5
4781 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4782 echo $ac_n "(cached) $ac_c" 1>&6
4784 cat > conftest.$ac_ext <<EOF
4785 #line 4797 "configure"
4786 #include "confdefs.h"
4787 #include <X11/Xaw/Dialog.h>
4789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4790 { (eval echo configure:4802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4792 if test -z "$ac_err"; then
4794 eval "ac_cv_header_$ac_safe=yes"
4797 echo "configure: failed program was:" >&5
4798 cat conftest.$ac_ext >&5
4800 eval "ac_cv_header_$ac_safe=no"
4804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4805 echo "$ac_t""yes" 1>&6
4808 echo "$ac_t""no" 1>&6
4811 CPPFLAGS="$ac_save_CPPFLAGS"
4812 if test "$have_athena" = yes; then
4814 ac_save_CPPFLAGS="$CPPFLAGS"
4815 ac_save_LDFLAGS="$LDFLAGS"
4817 if test \! -z "$includedir" ; then
4818 CPPFLAGS="$CPPFLAGS -I$includedir"
4820 # note: $X_CFLAGS includes $x_includes
4821 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4823 if test \! -z "$libdir" ; then
4824 LDFLAGS="$LDFLAGS -L$libdir"
4826 # note: $X_LIBS includes $x_libraries
4827 LDFLAGS="$LDFLAGS $X_LIBS"
4829 echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
4830 echo "configure:4842: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
4831 ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'`
4832 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4833 echo $ac_n "(cached) $ac_c" 1>&6
4835 ac_save_LIBS="$LIBS"
4836 LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
4837 cat > conftest.$ac_ext <<EOF
4838 #line 4850 "configure"
4839 #include "confdefs.h"
4840 /* Override any gcc2 internal prototype to avoid an error. */
4841 /* We use char because int might match the return type of a gcc2
4842 builtin and then its argument prototype would still apply. */
4843 char Xaw3dComputeTopShadowRGB();
4846 Xaw3dComputeTopShadowRGB()
4849 if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4851 eval "ac_cv_lib_$ac_lib_var=yes"
4853 echo "configure: failed program was:" >&5
4854 cat conftest.$ac_ext >&5
4856 eval "ac_cv_lib_$ac_lib_var=no"
4859 LIBS="$ac_save_LIBS"
4862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4863 echo "$ac_t""yes" 1>&6
4864 have_athena=yes; have_athena3d=yes
4866 echo "$ac_t""no" 1>&6
4869 CPPFLAGS="$ac_save_CPPFLAGS"
4870 LDFLAGS="$ac_save_LDFLAGS"
4873 if test "$have_athena3d" = yes; then
4874 TOOLKIT_LIBS="-lXaw3d $TOOLKIT_LIBS"
4875 elif test "$have_athena" = yes; then
4876 TOOLKIT_LIBS="-lXaw $TOOLKIT_LIBS"
4881 # If they asked for both motif and athena, check motif then athena.
4882 # If they asked for only motif, check motif then athena.
4883 # If they asked for only athena, check athena then motif.
4884 # If they asked for neither, check motif then athena.
4886 proselytize_motif=yes
4887 if test "$with_motif" = yes; then
4888 # asked for both, or for motif only
4890 if test "$have_motif" = yes; then
4897 elif test "$with_athena" = yes; then
4898 # asked for athena only
4900 if test "$have_athena" = yes; then
4902 proselytize_motif=no
4910 if test "$have_motif" = yes; then
4918 if test "$have_motif" = yes; then
4919 proselytize_motif=no
4922 # If we have Athena, check whether it's a version that includes
4923 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
4924 if test "$have_athena" = yes ; then
4925 echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
4926 echo "configure:4938: checking for XawViewportSetCoordinates in Viewport.h" >&5
4927 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
4928 echo $ac_n "(cached) $ac_c" 1>&6
4930 ac_cv_have_XawViewportSetCoordinates=no
4932 ac_save_CPPFLAGS="$CPPFLAGS"
4933 if test \! -z "$includedir" ; then
4934 CPPFLAGS="$CPPFLAGS -I$includedir"
4936 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4937 cat > conftest.$ac_ext <<EOF
4938 #line 4950 "configure"
4939 #include "confdefs.h"
4940 #include <X11/Xaw/Viewport.h>
4942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4943 egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then
4945 ac_cv_have_XawViewportSetCoordinates=yes
4949 CPPFLAGS="$ac_save_CPPFLAGS"
4952 echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6
4953 if test "$ac_cv_have_XawViewportSetCoordinates" = yes ; then
4954 cat >> confdefs.h <<\EOF
4955 #define HAVE_XawViewportSetCoordinates 1
4962 # If we have Motif, check whether it's really LessTif.
4965 if test "$have_motif" = yes ; then
4966 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
4967 echo "configure:4979: checking whether Motif is really LessTif" >&5
4968 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
4969 echo $ac_n "(cached) $ac_c" 1>&6
4972 ac_save_CPPFLAGS="$CPPFLAGS"
4973 if test \! -z "$includedir" ; then
4974 CPPFLAGS="$CPPFLAGS -I$includedir"
4976 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4977 cat > conftest.$ac_ext <<EOF
4978 #line 4990 "configure"
4979 #include "confdefs.h"
4982 long vers = LesstifVersion;
4985 if { (eval echo configure:4997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4987 ac_cv_have_lesstif=yes
4989 echo "configure: failed program was:" >&5
4990 cat conftest.$ac_ext >&5
4992 ac_cv_have_lesstif=no
4995 CPPFLAGS="$ac_save_CPPFLAGS"
4998 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
4999 have_lesstif=$ac_cv_have_lesstif
5003 unset ac_cv_lesstif_version
5004 unset ac_cv_lesstif_version_string
5006 lesstif_version=unknown
5007 lesstif_version_string=unknown
5009 if test "$have_lesstif" = yes ; then
5011 echo unknown > conftest-lt
5012 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
5013 echo "configure:5025: checking LessTif version number" >&5
5014 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
5015 echo $ac_n "(cached) $ac_c" 1>&6
5018 ac_save_CPPFLAGS="$CPPFLAGS"
5019 if test \! -z "$includedir" ; then
5020 CPPFLAGS="$CPPFLAGS -I$includedir"
5022 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5023 if test "$cross_compiling" = yes; then
5024 ac_cv_lesstif_version=unknown
5025 ac_cv_lesstif_version_string=unknown
5027 cat > conftest.$ac_ext <<EOF
5028 #line 5040 "configure"
5029 #include "confdefs.h"
5033 FILE *f = fopen("conftest-lt", "w");
5035 fprintf(f, "%d %d.%d\n", LesstifVersion,
5036 LESSTIF_VERSION, LESSTIF_REVISION);
5041 if { (eval echo configure:5053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5043 ltv=`cat conftest-lt`
5044 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
5045 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
5047 echo "configure: failed program was:" >&5
5048 cat conftest.$ac_ext >&5
5050 ac_cv_lesstif_version=unknown
5051 ac_cv_lesstif_version_string=unknown
5056 CPPFLAGS="$ac_save_CPPFLAGS"
5059 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
5061 lesstif_version=$ac_cv_lesstif_version
5062 lesstif_version_string=$ac_cv_lesstif_version_string
5067 if test "$have_motif" = yes ; then
5069 echo unknown > conftest-mt
5070 echo $ac_n "checking Motif version number""... $ac_c" 1>&6
5071 echo "configure:5083: checking Motif version number" >&5
5072 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
5073 echo $ac_n "(cached) $ac_c" 1>&6
5076 ac_save_CPPFLAGS="$CPPFLAGS"
5077 if test \! -z "$includedir" ; then
5078 CPPFLAGS="$CPPFLAGS -I$includedir"
5080 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5081 if test "$cross_compiling" = yes; then
5082 ac_cv_motif_version=unknown
5083 ac_cv_motif_version_string=unknown
5085 cat > conftest.$ac_ext <<EOF
5086 #line 5098 "configure"
5087 #include "confdefs.h"
5091 FILE *f = fopen("conftest-mt", "w");
5093 fprintf(f, "%d %d.%d\n", XmVersion,
5094 XmVERSION, XmREVISION);
5099 if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5101 mtv=`cat conftest-mt`
5102 ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
5103 ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
5105 echo "configure: failed program was:" >&5
5106 cat conftest.$ac_ext >&5
5108 ac_cv_motif_version=unknown
5109 ac_cv_motif_version_string=unknown
5114 CPPFLAGS="$ac_save_CPPFLAGS"
5117 echo "$ac_t""$ac_cv_motif_version_string" 1>&6
5119 motif_version=$ac_cv_motif_version
5120 motif_version_string=$ac_cv_motif_version_string
5125 # If this is Motif 2.x, and we have XPM, then link against XPM as well.
5126 # The deal is, Motif 2.x requires XPM -- but it's a compilation option of
5127 # the library whether to build the XPM code into libXm, or whether to rely
5128 # on an external libXm. So the only way to tell whether XPM is a link-time
5129 # requirement is to examine libXm.a, which is very difficult to do in an
5130 # autoconf script. So... if it's Motif 2.x, we always link against XPM if
5131 # the XPM lib exists (and this will be a no-op if libXm happens to already
5132 # have the XPM code in it.)
5134 motif_requires_xpm=no
5135 if test "$have_motif" = yes ; then
5136 echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
5137 echo "configure:5149: checking whether Motif requires XPM" >&5
5138 if test "$motif_version" -ge 2000; then
5139 motif_requires_xpm=yes
5140 echo "$ac_t""maybe" 1>&6
5142 echo "$ac_t""no" 1>&6
5148 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
5149 # Extension". Why this extension isn't in -lXext with all the others,
5153 if test "$have_motif" = yes ; then
5156 ac_save_CPPFLAGS="$CPPFLAGS"
5157 ac_save_LDFLAGS="$LDFLAGS"
5159 if test \! -z "$includedir" ; then
5160 CPPFLAGS="$CPPFLAGS -I$includedir"
5162 # note: $X_CFLAGS includes $x_includes
5163 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5165 if test \! -z "$libdir" ; then
5166 LDFLAGS="$LDFLAGS -L$libdir"
5168 # note: $X_LIBS includes $x_libraries
5169 LDFLAGS="$LDFLAGS $X_LIBS"
5171 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
5172 echo "configure:5184: checking for XpQueryExtension in -lXp" >&5
5173 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
5174 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5175 echo $ac_n "(cached) $ac_c" 1>&6
5177 ac_save_LIBS="$LIBS"
5178 LIBS="-lXp -lX11 -lXext -lm $LIBS"
5179 cat > conftest.$ac_ext <<EOF
5180 #line 5192 "configure"
5181 #include "confdefs.h"
5182 /* Override any gcc2 internal prototype to avoid an error. */
5183 /* We use char because int might match the return type of a gcc2
5184 builtin and then its argument prototype would still apply. */
5185 char XpQueryExtension();
5191 if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5193 eval "ac_cv_lib_$ac_lib_var=yes"
5195 echo "configure: failed program was:" >&5
5196 cat conftest.$ac_ext >&5
5198 eval "ac_cv_lib_$ac_lib_var=no"
5201 LIBS="$ac_save_LIBS"
5204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5205 echo "$ac_t""yes" 1>&6
5206 have_xp_ext=yes; TOOLKIT_LIBS="$TOOLKIT_LIBS -lXp"
5208 echo "$ac_t""no" 1>&6
5211 CPPFLAGS="$ac_save_CPPFLAGS"
5212 LDFLAGS="$ac_save_LDFLAGS"
5216 # Check for _Xsetlocale in -lXintl, since at least some recent versions
5217 # of Motif (on Linux) need it.
5220 if test "$have_motif" = yes ; then
5222 ac_save_CPPFLAGS="$CPPFLAGS"
5223 ac_save_LDFLAGS="$LDFLAGS"
5225 if test \! -z "$includedir" ; then
5226 CPPFLAGS="$CPPFLAGS -I$includedir"
5228 # note: $X_CFLAGS includes $x_includes
5229 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5231 if test \! -z "$libdir" ; then
5232 LDFLAGS="$LDFLAGS -L$libdir"
5234 # note: $X_LIBS includes $x_libraries
5235 LDFLAGS="$LDFLAGS $X_LIBS"
5237 echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
5238 echo "configure:5250: checking for _Xsetlocale in -lXintl" >&5
5239 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
5240 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5241 echo $ac_n "(cached) $ac_c" 1>&6
5243 ac_save_LIBS="$LIBS"
5244 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
5245 cat > conftest.$ac_ext <<EOF
5246 #line 5258 "configure"
5247 #include "confdefs.h"
5248 /* Override any gcc2 internal prototype to avoid an error. */
5249 /* We use char because int might match the return type of a gcc2
5250 builtin and then its argument prototype would still apply. */
5257 if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5259 eval "ac_cv_lib_$ac_lib_var=yes"
5261 echo "configure: failed program was:" >&5
5262 cat conftest.$ac_ext >&5
5264 eval "ac_cv_lib_$ac_lib_var=no"
5267 LIBS="$ac_save_LIBS"
5270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5271 echo "$ac_t""yes" 1>&6
5274 echo "$ac_t""no" 1>&6
5278 CPPFLAGS="$ac_save_CPPFLAGS"
5279 LDFLAGS="$ac_save_LDFLAGS"
5280 if test "$have_xintl" = yes; then
5281 TOOLKIT_LIBS="$TOOLKIT_LIBS -lXintl"
5286 # check for XPM header.
5289 with_xpm_req=unspecified
5290 # Check whether --with-xpm or --without-xpm was given.
5291 if test "${with_xpm+set}" = set; then
5293 with_xpm="$withval"; with_xpm_req="$withval"
5305 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
5306 echo "configure:5318: checking for XPM headers" >&5
5309 X_CFLAGS="-I$d $X_CFLAGS"
5310 echo "$ac_t""$d" 1>&6
5312 echo "$ac_t""not found ($d: no such directory)" 1>&6
5315 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
5316 echo "configure:5328: checking for XPM libs" >&5
5319 X_LIBS="-L$d $X_LIBS"
5320 echo "$ac_t""$d" 1>&6
5322 echo "$ac_t""not found ($d: no such directory)" 1>&6
5325 # replace the directory string with "yes".
5327 with_xpm=$with_xpm_req
5332 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
5333 echo " If it is a directory, then \`DIR/include' will be added to"
5334 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5339 # why is this necessary?
5340 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5341 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5345 if test "$with_xpm" = yes; then
5347 ac_save_CPPFLAGS="$CPPFLAGS"
5348 if test \! -z "$includedir" ; then
5349 CPPFLAGS="$CPPFLAGS -I$includedir"
5351 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5352 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
5353 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
5354 echo "configure:5366: checking for X11/xpm.h" >&5
5355 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5356 echo $ac_n "(cached) $ac_c" 1>&6
5358 cat > conftest.$ac_ext <<EOF
5359 #line 5371 "configure"
5360 #include "confdefs.h"
5361 #include <X11/xpm.h>
5363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5364 { (eval echo configure:5376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5366 if test -z "$ac_err"; then
5368 eval "ac_cv_header_$ac_safe=yes"
5371 echo "configure: failed program was:" >&5
5372 cat conftest.$ac_ext >&5
5374 eval "ac_cv_header_$ac_safe=no"
5378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5379 echo "$ac_t""yes" 1>&6
5381 cat >> confdefs.h <<\EOF
5387 echo "$ac_t""no" 1>&6
5390 CPPFLAGS="$ac_save_CPPFLAGS"
5391 elif test "$with_xpm" != no; then
5392 echo "error: must be yes or no: --with-xpm=$with_xpm"
5396 # See comment near $motif_requires_xpm, above.
5397 # Need to do this here, after both Motif and XPM have been checked for.
5399 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
5400 if test "$motif_requires_xpm" = yes ; then
5401 TOOLKIT_LIBS="$TOOLKIT_LIBS $XPM_LIBS"
5406 # check for the GL header
5410 with_gl_req=unspecified
5411 # Check whether --with-gl or --without-gl was given.
5412 if test "${with_gl+set}" = set; then
5414 with_gl="$withval"; with_gl_req="$withval"
5426 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
5427 echo "configure:5439: checking for GL headers" >&5
5430 X_CFLAGS="-I$d $X_CFLAGS"
5431 echo "$ac_t""$d" 1>&6
5433 echo "$ac_t""not found ($d: no such directory)" 1>&6
5436 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
5437 echo "configure:5449: checking for GL libs" >&5
5440 X_LIBS="-L$d $X_LIBS"
5441 echo "$ac_t""$d" 1>&6
5443 echo "$ac_t""not found ($d: no such directory)" 1>&6
5446 # replace the directory string with "yes".
5448 with_gl=$with_gl_req
5453 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
5454 echo " If it is a directory, then \`DIR/include' will be added to"
5455 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5460 # why is this necessary?
5461 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5462 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5466 ac_mesagl_version=unknown
5467 ac_mesagl_version_string=unknown
5469 if test "$with_gl" = yes; then
5471 ac_save_CPPFLAGS="$CPPFLAGS"
5472 if test \! -z "$includedir" ; then
5473 CPPFLAGS="$CPPFLAGS -I$includedir"
5475 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5476 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
5477 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
5478 echo "configure:5490: checking for GL/gl.h" >&5
5479 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5480 echo $ac_n "(cached) $ac_c" 1>&6
5482 cat > conftest.$ac_ext <<EOF
5483 #line 5495 "configure"
5484 #include "confdefs.h"
5487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5488 { (eval echo configure:5500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5490 if test -z "$ac_err"; then
5492 eval "ac_cv_header_$ac_safe=yes"
5495 echo "configure: failed program was:" >&5
5496 cat conftest.$ac_ext >&5
5498 eval "ac_cv_header_$ac_safe=no"
5502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5503 echo "$ac_t""yes" 1>&6
5506 echo "$ac_t""no" 1>&6
5509 CPPFLAGS="$ac_save_CPPFLAGS"
5510 if test "$have_gl" = yes ; then
5512 ac_save_CPPFLAGS="$CPPFLAGS"
5513 if test \! -z "$includedir" ; then
5514 CPPFLAGS="$CPPFLAGS -I$includedir"
5516 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5517 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
5518 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
5519 echo "configure:5531: checking for GL/glx.h" >&5
5520 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5521 echo $ac_n "(cached) $ac_c" 1>&6
5523 cat > conftest.$ac_ext <<EOF
5524 #line 5536 "configure"
5525 #include "confdefs.h"
5528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5529 { (eval echo configure:5541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5531 if test -z "$ac_err"; then
5533 eval "ac_cv_header_$ac_safe=yes"
5536 echo "configure: failed program was:" >&5
5537 cat conftest.$ac_ext >&5
5539 eval "ac_cv_header_$ac_safe=no"
5543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5544 echo "$ac_t""yes" 1>&6
5547 echo "$ac_t""no" 1>&6
5550 CPPFLAGS="$ac_save_CPPFLAGS"
5553 # If we have the headers, try and figure out which vendor it's from.
5555 if test "$have_gl" = yes ; then
5557 cat >> confdefs.h <<\EOF
5562 # We need to know whether it's MesaGL so that we know which libraries
5565 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
5566 echo "configure:5578: checking whether GL is really MesaGL" >&5
5567 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
5568 echo $ac_n "(cached) $ac_c" 1>&6
5570 ac_cv_have_mesa_gl=no
5572 ac_save_CPPFLAGS="$CPPFLAGS"
5573 if test \! -z "$includedir" ; then
5574 CPPFLAGS="$CPPFLAGS -I$includedir"
5576 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5577 cat > conftest.$ac_ext <<EOF
5578 #line 5590 "configure"
5579 #include "confdefs.h"
5582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5583 egrep "Mesa" >/dev/null 2>&1; then
5585 ac_cv_have_mesa_gl=yes
5589 CPPFLAGS="$ac_save_CPPFLAGS"
5593 ac_have_mesa_gl=$ac_cv_have_mesa_gl
5594 echo "$ac_t""$ac_have_mesa_gl" 1>&6
5596 if test "$ac_have_mesa_gl" = no ; then
5598 GL_LIBS="-lGL -lGLU"
5600 cat >> confdefs.h <<\EOF
5601 #define HAVE_MESA_GL 1
5605 GL_LIBS="-lMesaGL -lMesaGLU"
5609 # If it's MesaGL, we'd like to issue a warning if the version number
5610 # is less than or equal to 2.6, because that version had a security bug.
5612 if test "$ac_have_mesa_gl" = yes; then
5614 # don't cache these.
5615 unset ac_cv_mesagl_version
5616 unset ac_cv_mesagl_version_string
5618 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
5619 echo "configure:5631: checking MesaGL version number" >&5
5620 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
5621 echo $ac_n "(cached) $ac_c" 1>&6
5623 cat > conftest.$ac_ext <<EOF
5624 #line 5636 "configure"
5625 #include "confdefs.h"
5627 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
5630 ac_save_CPPFLAGS="$CPPFLAGS"
5631 if test \! -z "$includedir" ; then
5632 CPPFLAGS="$CPPFLAGS -I$includedir"
5634 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5638 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
5639 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
5642 rm -f conftest.$ac_ext
5644 CPPFLAGS="$ac_save_CPPFLAGS"
5646 if test "$mglv" = ""; then
5647 ac_mesagl_version=unknown
5648 ac_mesagl_version_string=unknown
5650 ac_mesagl_version_string=$mglv
5651 maj=`echo $mglv | sed -n 's/\..*//p'`
5652 min=`echo $mglv | sed -n 's/.*\.//p'`
5653 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
5654 if test -z "$ac_mesagl_version"; then
5655 ac_mesagl_version=unknown
5656 ac_mesagl_version_string=unknown
5659 ac_cv_mesagl_version=$ac_mesagl_version
5660 ac_cv_mesagl_version_string=$ac_mesagl_version_string
5664 ac_mesagl_version=$ac_cv_mesagl_version
5665 ac_mesagl_version_string=$ac_cv_mesagl_version_string
5666 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
5670 # If it's MesaGL, check to see if it requires -lpthread.
5673 mesa_requires_pthread=no
5674 if test "$ac_have_mesa_gl" = yes; then
5676 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5677 echo "configure:5689: checking for pthread_create in -lpthread" >&5
5678 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
5679 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5680 echo $ac_n "(cached) $ac_c" 1>&6
5682 ac_save_LIBS="$LIBS"
5683 LIBS="-lpthread $LIBS"
5684 cat > conftest.$ac_ext <<EOF
5685 #line 5697 "configure"
5686 #include "confdefs.h"
5687 /* Override any gcc2 internal prototype to avoid an error. */
5688 /* We use char because int might match the return type of a gcc2
5689 builtin and then its argument prototype would still apply. */
5690 char pthread_create();
5696 if { (eval echo configure:5708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5698 eval "ac_cv_lib_$ac_lib_var=yes"
5700 echo "configure: failed program was:" >&5
5701 cat conftest.$ac_ext >&5
5703 eval "ac_cv_lib_$ac_lib_var=no"
5706 LIBS="$ac_save_LIBS"
5709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5710 echo "$ac_t""yes" 1>&6
5713 echo "$ac_t""no" 1>&6
5716 if test "$have_pthread" = yes; then
5718 ac_save_CPPFLAGS="$CPPFLAGS"
5719 ac_save_LDFLAGS="$LDFLAGS"
5721 if test \! -z "$includedir" ; then
5722 CPPFLAGS="$CPPFLAGS -I$includedir"
5724 # note: $X_CFLAGS includes $x_includes
5725 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5727 if test \! -z "$libdir" ; then
5728 LDFLAGS="$LDFLAGS -L$libdir"
5730 # note: $X_LIBS includes $x_libraries
5731 LDFLAGS="$LDFLAGS $X_LIBS"
5733 echo $ac_n "checking for gl_get_thread_context in -l$gl_lib_1""... $ac_c" 1>&6
5734 echo "configure:5746: checking for gl_get_thread_context in -l$gl_lib_1" >&5
5735 ac_lib_var=`echo $gl_lib_1'_'gl_get_thread_context | sed 'y%./+-%__p_%'`
5736 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5737 echo $ac_n "(cached) $ac_c" 1>&6
5739 ac_save_LIBS="$LIBS"
5740 LIBS="-l$gl_lib_1 $GL_LIBS -lpthread -lX11 -lXext -lm $LIBS"
5741 cat > conftest.$ac_ext <<EOF
5742 #line 5754 "configure"
5743 #include "confdefs.h"
5744 /* Override any gcc2 internal prototype to avoid an error. */
5745 /* We use char because int might match the return type of a gcc2
5746 builtin and then its argument prototype would still apply. */
5747 char gl_get_thread_context();
5750 gl_get_thread_context()
5753 if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5755 eval "ac_cv_lib_$ac_lib_var=yes"
5757 echo "configure: failed program was:" >&5
5758 cat conftest.$ac_ext >&5
5760 eval "ac_cv_lib_$ac_lib_var=no"
5763 LIBS="$ac_save_LIBS"
5766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5767 echo "$ac_t""yes" 1>&6
5768 mesa_requires_pthread=yes
5770 echo "$ac_t""no" 1>&6
5773 CPPFLAGS="$ac_save_CPPFLAGS"
5774 LDFLAGS="$ac_save_LDFLAGS"
5777 if test "$mesa_requires_pthread" = yes; then
5778 GL_LIBS="$GL_LIBS -lpthread"
5782 # Check for OpenGL 1.1 features.
5785 ac_save_CPPFLAGS="$CPPFLAGS"
5786 ac_save_LDFLAGS="$LDFLAGS"
5788 if test \! -z "$includedir" ; then
5789 CPPFLAGS="$CPPFLAGS -I$includedir"
5791 # note: $X_CFLAGS includes $x_includes
5792 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5794 if test \! -z "$libdir" ; then
5795 LDFLAGS="$LDFLAGS -L$libdir"
5797 # note: $X_LIBS includes $x_libraries
5798 LDFLAGS="$LDFLAGS $X_LIBS"
5800 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
5801 echo "configure:5813: checking for glBindTexture in -l$gl_lib_1" >&5
5802 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
5803 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5804 echo $ac_n "(cached) $ac_c" 1>&6
5806 ac_save_LIBS="$LIBS"
5807 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
5808 cat > conftest.$ac_ext <<EOF
5809 #line 5821 "configure"
5810 #include "confdefs.h"
5811 /* Override any gcc2 internal prototype to avoid an error. */
5812 /* We use char because int might match the return type of a gcc2
5813 builtin and then its argument prototype would still apply. */
5814 char glBindTexture();
5820 if { (eval echo configure:5832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5822 eval "ac_cv_lib_$ac_lib_var=yes"
5824 echo "configure: failed program was:" >&5
5825 cat conftest.$ac_ext >&5
5827 eval "ac_cv_lib_$ac_lib_var=no"
5830 LIBS="$ac_save_LIBS"
5833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5834 echo "$ac_t""yes" 1>&6
5835 cat >> confdefs.h <<\EOF
5836 #define HAVE_GLBINDTEXTURE 1
5840 echo "$ac_t""no" 1>&6
5843 CPPFLAGS="$ac_save_CPPFLAGS"
5844 LDFLAGS="$ac_save_LDFLAGS"
5848 elif test "$with_gl" != no; then
5849 echo "error: must be yes or no: --with-gl=$with_gl"
5854 # check for SGI XReadDisplay server extension header.
5857 with_readdisplay_req=unspecified
5858 # Check whether --with-readdisplay or --without-readdisplay was given.
5859 if test "${with_readdisplay+set}" = set; then
5860 withval="$with_readdisplay"
5861 with_readdisplay="$withval"; with_readdisplay_req="$withval"
5863 with_readdisplay=yes
5868 case "$with_readdisplay" in
5873 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
5874 echo "configure:5886: checking for XReadDisplay headers" >&5
5875 d=$with_readdisplay/include
5877 X_CFLAGS="-I$d $X_CFLAGS"
5878 echo "$ac_t""$d" 1>&6
5880 echo "$ac_t""not found ($d: no such directory)" 1>&6
5883 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
5884 echo "configure:5896: checking for XReadDisplay libs" >&5
5885 d=$with_readdisplay/lib
5887 X_LIBS="-L$d $X_LIBS"
5888 echo "$ac_t""$d" 1>&6
5890 echo "$ac_t""not found ($d: no such directory)" 1>&6
5893 # replace the directory string with "yes".
5894 with_readdisplay_req="yes"
5895 with_readdisplay=$with_readdisplay_req
5900 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
5901 echo " If it is a directory, then \`DIR/include' will be added to"
5902 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5907 # why is this necessary?
5908 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5909 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5913 if test "$with_readdisplay" = yes; then
5915 ac_save_CPPFLAGS="$CPPFLAGS"
5916 if test \! -z "$includedir" ; then
5917 CPPFLAGS="$CPPFLAGS -I$includedir"
5919 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5920 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
5921 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
5922 echo "configure:5934: checking for X11/extensions/readdisplay.h" >&5
5923 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5924 echo $ac_n "(cached) $ac_c" 1>&6
5926 cat > conftest.$ac_ext <<EOF
5927 #line 5939 "configure"
5928 #include "confdefs.h"
5929 #include <X11/extensions/readdisplay.h>
5931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5932 { (eval echo configure:5944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5934 if test -z "$ac_err"; then
5936 eval "ac_cv_header_$ac_safe=yes"
5939 echo "configure: failed program was:" >&5
5940 cat conftest.$ac_ext >&5
5942 eval "ac_cv_header_$ac_safe=no"
5946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5947 echo "$ac_t""yes" 1>&6
5948 cat >> confdefs.h <<\EOF
5949 #define HAVE_READ_DISPLAY_EXTENSION 1
5953 echo "$ac_t""no" 1>&6
5956 CPPFLAGS="$ac_save_CPPFLAGS"
5957 elif test "$with_readdisplay" != no; then
5958 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
5963 # check for SGI's Iris Video Library header.
5966 with_sgivideo_req=unspecified
5967 # Check whether --with-sgivideo or --without-sgivideo was given.
5968 if test "${with_sgivideo+set}" = set; then
5969 withval="$with_sgivideo"
5970 with_sgivideo="$withval"; with_sgivideo_req="$withval"
5977 case "$with_sgivideo" in
5982 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
5983 echo "configure:5995: checking for Iris Video headers" >&5
5984 d=$with_sgivideo/include
5986 X_CFLAGS="-I$d $X_CFLAGS"
5987 echo "$ac_t""$d" 1>&6
5989 echo "$ac_t""not found ($d: no such directory)" 1>&6
5992 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
5993 echo "configure:6005: checking for Iris Video libs" >&5
5994 d=$with_sgivideo/lib
5996 X_LIBS="-L$d $X_LIBS"
5997 echo "$ac_t""$d" 1>&6
5999 echo "$ac_t""not found ($d: no such directory)" 1>&6
6002 # replace the directory string with "yes".
6003 with_sgivideo_req="yes"
6004 with_sgivideo=$with_sgivideo_req
6009 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
6010 echo " If it is a directory, then \`DIR/include' will be added to"
6011 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6016 # why is this necessary?
6017 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6018 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6022 if test "$with_sgivideo" = yes; then
6024 ac_save_CPPFLAGS="$CPPFLAGS"
6025 if test \! -z "$includedir" ; then
6026 CPPFLAGS="$CPPFLAGS -I$includedir"
6028 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6029 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
6030 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
6031 echo "configure:6043: checking for dmedia/vl.h" >&5
6032 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6033 echo $ac_n "(cached) $ac_c" 1>&6
6035 cat > conftest.$ac_ext <<EOF
6036 #line 6048 "configure"
6037 #include "confdefs.h"
6038 #include <dmedia/vl.h>
6040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6041 { (eval echo configure:6053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6043 if test -z "$ac_err"; then
6045 eval "ac_cv_header_$ac_safe=yes"
6048 echo "configure: failed program was:" >&5
6049 cat conftest.$ac_ext >&5
6051 eval "ac_cv_header_$ac_safe=no"
6055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6056 echo "$ac_t""yes" 1>&6
6059 echo "$ac_t""no" 1>&6
6062 CPPFLAGS="$ac_save_CPPFLAGS"
6063 if test "$have_sgivideo" = yes; then
6065 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
6066 echo "configure:6078: checking for vlOpenVideo in -lvl" >&5
6067 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
6068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6069 echo $ac_n "(cached) $ac_c" 1>&6
6071 ac_save_LIBS="$LIBS"
6073 cat > conftest.$ac_ext <<EOF
6074 #line 6086 "configure"
6075 #include "confdefs.h"
6076 /* Override any gcc2 internal prototype to avoid an error. */
6077 /* We use char because int might match the return type of a gcc2
6078 builtin and then its argument prototype would still apply. */
6085 if { (eval echo configure:6097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6087 eval "ac_cv_lib_$ac_lib_var=yes"
6089 echo "configure: failed program was:" >&5
6090 cat conftest.$ac_ext >&5
6092 eval "ac_cv_lib_$ac_lib_var=no"
6095 LIBS="$ac_save_LIBS"
6098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6099 echo "$ac_t""yes" 1>&6
6102 echo "$ac_t""no" 1>&6
6105 if test "$have_sgivideo" = yes; then
6106 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
6107 SGI_VIDEO_LIBS="-lvl"
6108 cat >> confdefs.h <<\EOF
6109 #define HAVE_SGI_VIDEO 1
6114 elif test "$with_sgivideo" != no; then
6115 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
6121 # Try to find a program to generate random text.
6123 # Zippy is funnier than the idiocy generally spat out by `fortune',
6124 # so try to find that, by invoking Emacs and asking it where its
6125 # libexec directory is ("yow" lives in there.)
6127 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
6128 # and if so, use them.
6130 # If that doesn't work, look in /usr/games, and if it's there, use
6131 # the full pathname.
6134 # Check whether --with-zippy or --without-zippy was given.
6135 if test "${with_zippy+set}" = set; then
6136 withval="$with_zippy"
6137 with_zippy_req="$withval"; with_zippy="$withval"
6139 with_zippy_req="$withval"; with_zippy="$withval"
6143 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
6148 if test -n "$with_zippy_req" ; then
6149 ac_cv_zippy_program=""
6150 case "$with_zippy_req" in
6152 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
6153 echo "configure:6165: checking for $with_zippy_req" >&5
6154 if test -x "$with_zippy_req" ; then
6155 echo "$ac_t""yes" 1>&6
6157 echo "$ac_t""no" 1>&6
6163 unset ac_cv_path_zip2
6164 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
6165 set dummy $with_zippy_req; ac_word=$2
6166 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6167 echo "configure:6179: checking for $ac_word" >&5
6168 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
6169 echo $ac_n "(cached) $ac_c" 1>&6
6173 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
6176 ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
6179 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6181 for ac_dir in $ac_dummy; do
6182 test -z "$ac_dir" && ac_dir=.
6183 if test -f $ac_dir/$ac_word; then
6184 ac_cv_path_zip2="$ac_dir/$ac_word"
6192 zip2="$ac_cv_path_zip2"
6193 if test -n "$zip2"; then
6194 echo "$ac_t""$zip2" 1>&6
6196 echo "$ac_t""no" 1>&6
6199 if test "$zip2" = ""; then
6204 ac_cv_zippy_program="$with_zippy"
6206 elif test -n "$ac_cv_zippy_program"; then
6207 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
6210 if test ! -n "$ac_cv_zippy_program"; then
6212 for ac_prog in emacs
6214 # Extract the first word of "$ac_prog", so it can be a program name with args.
6215 set dummy $ac_prog; ac_word=$2
6216 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6217 echo "configure:6229: checking for $ac_word" >&5
6218 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
6219 echo $ac_n "(cached) $ac_c" 1>&6
6221 if test -n "$emacs_exe"; then
6222 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
6224 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6226 for ac_dir in $ac_dummy; do
6227 test -z "$ac_dir" && ac_dir=.
6228 if test -f $ac_dir/$ac_word; then
6229 ac_cv_prog_emacs_exe="$ac_prog"
6236 emacs_exe="$ac_cv_prog_emacs_exe"
6237 if test -n "$emacs_exe"; then
6238 echo "$ac_t""$emacs_exe" 1>&6
6240 echo "$ac_t""no" 1>&6
6243 test -n "$emacs_exe" && break
6246 for ac_prog in xemacs
6248 # Extract the first word of "$ac_prog", so it can be a program name with args.
6249 set dummy $ac_prog; ac_word=$2
6250 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6251 echo "configure:6263: checking for $ac_word" >&5
6252 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
6253 echo $ac_n "(cached) $ac_c" 1>&6
6255 if test -n "$xemacs_exe"; then
6256 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
6258 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6260 for ac_dir in $ac_dummy; do
6261 test -z "$ac_dir" && ac_dir=.
6262 if test -f $ac_dir/$ac_word; then
6263 ac_cv_prog_xemacs_exe="$ac_prog"
6270 xemacs_exe="$ac_cv_prog_xemacs_exe"
6271 if test -n "$xemacs_exe"; then
6272 echo "$ac_t""$xemacs_exe" 1>&6
6274 echo "$ac_t""no" 1>&6
6277 test -n "$xemacs_exe" && break
6281 ac_cv_zippy_program=""
6282 eargs='-batch -q -nw --eval'
6284 if test -n "$emacs_exe" ; then
6285 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
6286 echo "configure:6298: checking for emacs yow" >&5
6288 # get emacs to tell us where the libexec directory is.
6290 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
6291 2>/dev/null | tail -1`
6292 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
6294 # try running libexec/yow and see if it exits without error.
6296 if test x"$dir" != x -a -x "$dir/yow" ; then
6297 if $dir/yow >&- 2>&- ; then
6298 ac_cv_zippy_program="$dir/yow"
6299 echo "$ac_t""$ac_cv_zippy_program" 1>&6
6301 echo "$ac_t""no" 1>&6
6306 if test -z "$ac_cv_zippy_program" ; then
6307 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
6308 echo "configure:6320: checking for xemacs yow" >&5
6309 if test -n "$xemacs_exe" ; then
6311 # get xemacs to tell us where the libexec directory is.
6313 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
6314 2>/dev/null | tail -1`
6315 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
6317 # try running libexec/yow and see if it exits without error.
6319 if test x"$dir" != x -a -x "$dir/yow" ; then
6320 if $dir/yow >&- 2>&- ; then
6321 ac_cv_zippy_program="$dir/yow"
6322 echo "$ac_t""$ac_cv_zippy_program" 1>&6
6325 # in some xemacs installations, the pathname of the yow.lines file
6326 # isn't hardcoded into the yow executable, and must be passed on
6327 # the command line. See if it's in libexec/../etc/.
6331 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
6334 yow="yow -f $dir_up/etc/yow.lines"
6335 if $dir/$yow >&- 2>&- ; then
6336 ac_cv_zippy_program="$dir/$yow"
6337 echo "$ac_t""$ac_cv_zippy_program" 1>&6
6339 echo "$ac_t""no" 1>&6
6346 # if that didn't work, try for some other programs...
6347 if test -z "$ac_cv_zippy_program" ; then
6349 for ac_prog in fortune zippy yow
6351 # Extract the first word of "$ac_prog", so it can be a program name with args.
6352 set dummy $ac_prog; ac_word=$2
6353 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6354 echo "configure:6366: checking for $ac_word" >&5
6355 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
6356 echo $ac_n "(cached) $ac_c" 1>&6
6358 if test -n "$fortune"; then
6359 ac_cv_prog_fortune="$fortune" # Let the user override the test.
6361 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6363 for ac_dir in $ac_dummy; do
6364 test -z "$ac_dir" && ac_dir=.
6365 if test -f $ac_dir/$ac_word; then
6366 ac_cv_prog_fortune="$ac_prog"
6373 fortune="$ac_cv_prog_fortune"
6374 if test -n "$fortune"; then
6375 echo "$ac_t""$fortune" 1>&6
6377 echo "$ac_t""no" 1>&6
6380 test -n "$fortune" && break
6383 # if that didn't work, try for those programs in /usr/games...
6384 if test -z "$fortune" ; then
6385 for ac_prog in fortune zippy yow
6387 # Extract the first word of "$ac_prog", so it can be a program name with args.
6388 set dummy $ac_prog; ac_word=$2
6389 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6390 echo "configure:6402: checking for $ac_word" >&5
6391 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
6392 echo $ac_n "(cached) $ac_c" 1>&6
6396 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
6399 ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
6402 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6403 ac_dummy="/usr/games:/usr/local/games"
6404 for ac_dir in $ac_dummy; do
6405 test -z "$ac_dir" && ac_dir=.
6406 if test -f $ac_dir/$ac_word; then
6407 ac_cv_path_fortune="$ac_dir/$ac_word"
6415 fortune="$ac_cv_path_fortune"
6416 if test -n "$fortune"; then
6417 echo "$ac_t""$fortune" 1>&6
6419 echo "$ac_t""no" 1>&6
6422 test -n "$fortune" && break
6424 test -n "$fortune" || fortune="fortune"
6430 if test -z "$ac_cv_zippy_program" ; then
6431 ac_cv_zippy_program=fortune
6434 cat >> confdefs.h <<EOF
6435 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
6442 # Allow locking to be disabled at compile-time.
6445 with_kerberos_req=unspecified
6447 with_shadow_req=unspecified
6449 with_pam_req=unspecified
6452 # Check whether --enable-locking or --disable-locking was given.
6453 if test "${enable_locking+set}" = set; then
6454 enableval="$enable_locking"
6455 enable_locking="$enableval"
6460 if test "$enable_locking" = yes; then
6462 elif test "$enable_locking" = no; then
6463 cat >> confdefs.h <<\EOF
6464 #define NO_LOCKING 1
6468 echo "error: must be yes or no: --enable-locking=$enable_locking"
6474 # Check to see if we can lock Virtual-Terminal switching, but allow that
6475 # to be disabled at compile-time.
6478 # Check whether --enable-vt-locking or --disable-vt-locking was given.
6479 if test "${enable_vt_locking+set}" = set; then
6480 enableval="$enable_vt_locking"
6481 enable_vt_locking="$enableval"
6483 enable_vt_locking=yes
6486 if test "$enable_vt_locking" = yes; then
6488 echo $ac_n "checking for the VT_LOCKSWITCH ioctl""... $ac_c" 1>&6
6489 echo "configure:6501: checking for the VT_LOCKSWITCH ioctl" >&5
6490 if eval "test \"`echo '$''{'ac_cv_vt_lockswitch'+set}'`\" = set"; then
6491 echo $ac_n "(cached) $ac_c" 1>&6
6493 cat > conftest.$ac_ext <<EOF
6494 #line 6506 "configure"
6495 #include "confdefs.h"
6497 #include <sys/ioctl.h>
6500 int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;
6503 if { (eval echo configure:6515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6505 ac_cv_vt_lockswitch=yes
6507 echo "configure: failed program was:" >&5
6508 cat conftest.$ac_ext >&5
6510 ac_cv_vt_lockswitch=no
6515 ac_vt_lockswitch=$ac_cv_vt_lockswitch
6516 echo "$ac_t""$ac_vt_lockswitch" 1>&6
6518 elif test "$enable_vt_locking" = no; then
6521 echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
6525 if test "$ac_vt_lockswitch" = yes; then
6526 cat >> confdefs.h <<\EOF
6527 #define HAVE_VT_LOCKSWITCH 1
6530 # the VT_LOCKSWITCH ioctl can only be used when running as root.
6531 # #### but it doesn't work yet, so don't worry about that for now.
6537 if test "$enable_locking" = yes; then
6539 # Check for Kerberos.
6541 # Check whether --with-kerberos or --without-kerberos was given.
6542 if test "${with_kerberos+set}" = set; then
6543 withval="$with_kerberos"
6544 with_kerberos="$withval"; with_kerberos_req="$withval"
6551 case "$with_kerberos" in
6556 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
6557 echo "configure:6569: checking for Kerberos headers" >&5
6558 d=$with_kerberos/include
6560 X_CFLAGS="-I$d $X_CFLAGS"
6561 echo "$ac_t""$d" 1>&6
6563 echo "$ac_t""not found ($d: no such directory)" 1>&6
6566 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
6567 echo "configure:6579: checking for Kerberos libs" >&5
6568 d=$with_kerberos/lib
6570 X_LIBS="-L$d $X_LIBS"
6571 echo "$ac_t""$d" 1>&6
6573 echo "$ac_t""not found ($d: no such directory)" 1>&6
6576 # replace the directory string with "yes".
6577 with_kerberos_req="yes"
6578 with_kerberos=$with_kerberos_req
6583 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
6584 echo " If it is a directory, then \`DIR/include' will be added to"
6585 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6590 # why is this necessary?
6591 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6592 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6596 if test "$with_kerberos" = yes; then
6597 echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
6598 echo "configure:6610: checking for Kerberos" >&5
6599 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
6600 echo $ac_n "(cached) $ac_c" 1>&6
6603 ac_save_CPPFLAGS="$CPPFLAGS"
6604 if test \! -z "$includedir" ; then
6605 CPPFLAGS="$CPPFLAGS -I$includedir"
6607 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6608 cat > conftest.$ac_ext <<EOF
6609 #line 6621 "configure"
6610 #include "confdefs.h"
6616 if { (eval echo configure:6628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6620 echo "configure: failed program was:" >&5
6621 cat conftest.$ac_ext >&5
6626 CPPFLAGS="$ac_save_CPPFLAGS"
6629 echo "$ac_t""$ac_cv_kerberos" 1>&6
6630 if test "$ac_cv_kerberos" = yes ; then
6632 cat >> confdefs.h <<\EOF
6633 #define HAVE_KERBEROS 1
6637 # from Tim Showalter <tjs+@andrew.cmu.edu>
6638 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
6639 echo $ac_n "checking for res_search""... $ac_c" 1>&6
6640 echo "configure:6652: checking for res_search" >&5
6641 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
6642 echo $ac_n "(cached) $ac_c" 1>&6
6644 cat > conftest.$ac_ext <<EOF
6645 #line 6657 "configure"
6646 #include "confdefs.h"
6647 /* System header to define __stub macros and hopefully few prototypes,
6648 which can conflict with char res_search(); below. */
6650 /* Override any gcc2 internal prototype to avoid an error. */
6651 /* We use char because int might match the return type of a gcc2
6652 builtin and then its argument prototype would still apply. */
6657 /* The GNU C library defines this for functions which it implements
6658 to always fail with ENOSYS. Some functions are actually named
6659 something starting with __ and the normal name is an alias. */
6660 #if defined (__stub_res_search) || defined (__stub___res_search)
6668 if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6670 eval "ac_cv_func_res_search=yes"
6672 echo "configure: failed program was:" >&5
6673 cat conftest.$ac_ext >&5
6675 eval "ac_cv_func_res_search=no"
6680 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
6681 echo "$ac_t""yes" 1>&6
6684 echo "$ac_t""no" 1>&6
6685 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
6686 echo "configure:6698: checking for res_search in -lresolv" >&5
6687 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
6688 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6689 echo $ac_n "(cached) $ac_c" 1>&6
6691 ac_save_LIBS="$LIBS"
6692 LIBS="-lresolv $LIBS"
6693 cat > conftest.$ac_ext <<EOF
6694 #line 6706 "configure"
6695 #include "confdefs.h"
6696 /* Override any gcc2 internal prototype to avoid an error. */
6697 /* We use char because int might match the return type of a gcc2
6698 builtin and then its argument prototype would still apply. */
6705 if { (eval echo configure:6717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6707 eval "ac_cv_lib_$ac_lib_var=yes"
6709 echo "configure: failed program was:" >&5
6710 cat conftest.$ac_ext >&5
6712 eval "ac_cv_lib_$ac_lib_var=no"
6715 LIBS="$ac_save_LIBS"
6718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6719 echo "$ac_t""yes" 1>&6
6720 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
6722 echo "$ac_t""no" 1>&6
6723 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
6731 elif test "$with_kerberos" != no; then
6732 echo "error: must be yes or no: --with-kerberos=$with_kerberos"
6737 # Check whether --with-pam or --without-pam was given.
6738 if test "${with_pam+set}" = set; then
6740 with_pam="$withval"; with_pam_req="$withval"
6745 #### Leave PAM off by default for now, since it's buggy on Solaris
6746 #### (and probably Linux, but it's so hard to tell...)
6754 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
6755 echo "configure:6767: checking for PAM headers" >&5
6758 X_CFLAGS="-I$d $X_CFLAGS"
6759 echo "$ac_t""$d" 1>&6
6761 echo "$ac_t""not found ($d: no such directory)" 1>&6
6764 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
6765 echo "configure:6777: checking for PAM libs" >&5
6768 X_LIBS="-L$d $X_LIBS"
6769 echo "$ac_t""$d" 1>&6
6771 echo "$ac_t""not found ($d: no such directory)" 1>&6
6774 # replace the directory string with "yes".
6776 with_pam=$with_pam_req
6781 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
6782 echo " If it is a directory, then \`DIR/include' will be added to"
6783 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6788 # why is this necessary?
6789 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6790 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6794 if test "$with_pam" = yes; then
6795 echo $ac_n "checking for PAM""... $ac_c" 1>&6
6796 echo "configure:6808: checking for PAM" >&5
6797 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
6798 echo $ac_n "(cached) $ac_c" 1>&6
6801 ac_save_CPPFLAGS="$CPPFLAGS"
6802 if test \! -z "$includedir" ; then
6803 CPPFLAGS="$CPPFLAGS -I$includedir"
6805 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6806 cat > conftest.$ac_ext <<EOF
6807 #line 6819 "configure"
6808 #include "confdefs.h"
6809 #include <security/pam_appl.h>
6814 if { (eval echo configure:6826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6818 echo "configure: failed program was:" >&5
6819 cat conftest.$ac_ext >&5
6824 CPPFLAGS="$ac_save_CPPFLAGS"
6827 echo "$ac_t""$ac_cv_pam" 1>&6
6828 if test "$ac_cv_pam" = yes ; then
6830 cat >> confdefs.h <<\EOF
6834 PASSWD_LIBS="${PASSWD_LIBS} -lpam -ldl"
6836 elif test "$with_pam" != no; then
6837 echo "error: must be yes or no: --with-pam=$with_pam"
6841 # Next, check for the nine billion variants of shadow passwords...
6844 # Check whether --with-shadow or --without-shadow was given.
6845 if test "${with_shadow+set}" = set; then
6846 withval="$with_shadow"
6847 with_shadow="$withval"; with_shadow_req="$withval"
6854 case "$with_shadow" in
6859 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
6860 echo "configure:6872: checking for shadow password headers" >&5
6861 d=$with_shadow/include
6863 X_CFLAGS="-I$d $X_CFLAGS"
6864 echo "$ac_t""$d" 1>&6
6866 echo "$ac_t""not found ($d: no such directory)" 1>&6
6869 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
6870 echo "configure:6882: checking for shadow password libs" >&5
6873 X_LIBS="-L$d $X_LIBS"
6874 echo "$ac_t""$d" 1>&6
6876 echo "$ac_t""not found ($d: no such directory)" 1>&6
6879 # replace the directory string with "yes".
6880 with_shadow_req="yes"
6881 with_shadow=$with_shadow_req
6886 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
6887 echo " If it is a directory, then \`DIR/include' will be added to"
6888 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6893 # why is this necessary?
6894 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6895 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6899 if test "$with_shadow" = no; then
6900 pwent_cruft_done=yes
6901 elif test "$with_shadow" != yes; then
6902 echo "error: must be yes or no: --with-shadow=$with_shadow"
6907 # Sun's "adjunct" passwords.
6909 if test "$pwent_cruft_done" = no ; then
6910 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
6911 echo "configure:6923: checking for Sun-style shadow passwords" >&5
6912 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
6913 echo $ac_n "(cached) $ac_c" 1>&6
6916 ac_save_CPPFLAGS="$CPPFLAGS"
6917 if test \! -z "$includedir" ; then
6918 CPPFLAGS="$CPPFLAGS -I$includedir"
6920 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6921 cat > conftest.$ac_ext <<EOF
6922 #line 6934 "configure"
6923 #include "confdefs.h"
6926 #include <sys/types.h>
6927 #include <sys/label.h>
6928 #include <sys/audit.h>
6931 struct passwd_adjunct *p = getpwanam("nobody");
6932 const char *pw = p->pwa_passwd;
6935 if { (eval echo configure:6947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6937 ac_cv_sun_adjunct=yes
6939 echo "configure: failed program was:" >&5
6940 cat conftest.$ac_ext >&5
6942 ac_cv_sun_adjunct=no
6945 CPPFLAGS="$ac_save_CPPFLAGS"
6948 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
6949 if test "$ac_cv_sun_adjunct" = yes; then
6952 pwent_cruft_done=yes
6953 cat >> confdefs.h <<\EOF
6954 #define HAVE_ADJUNCT_PASSWD 1
6960 # DEC and SCO so-called "enhanced" security.
6962 if test "$pwent_cruft_done" = no ; then
6963 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
6964 echo "configure:6976: checking for DEC-style shadow passwords" >&5
6965 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
6966 echo $ac_n "(cached) $ac_c" 1>&6
6969 ac_save_CPPFLAGS="$CPPFLAGS"
6970 if test \! -z "$includedir" ; then
6971 CPPFLAGS="$CPPFLAGS -I$includedir"
6973 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6974 cat > conftest.$ac_ext <<EOF
6975 #line 6987 "configure"
6976 #include "confdefs.h"
6979 #include <sys/types.h>
6981 #include <sys/security.h>
6984 struct pr_passwd *p;
6986 set_auth_parameters(0, 0);
6987 check_auth_parameters();
6988 p = getprpwnam("nobody");
6989 pw = p->ufld.fd_encrypt;
6992 if { (eval echo configure:7004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6994 ac_cv_enhanced_passwd=yes
6996 echo "configure: failed program was:" >&5
6997 cat conftest.$ac_ext >&5
6999 ac_cv_enhanced_passwd=no
7002 CPPFLAGS="$ac_save_CPPFLAGS"
7005 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
7006 if test $ac_cv_enhanced_passwd = yes; then
7009 pwent_cruft_done=yes
7010 cat >> confdefs.h <<\EOF
7011 #define HAVE_ENHANCED_PASSWD 1
7015 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
7016 # (I'm told it needs -lcurses too, but I don't understand why.)
7017 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
7018 echo "configure:7030: checking for getprpwnam in -lprot" >&5
7019 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
7020 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7021 echo $ac_n "(cached) $ac_c" 1>&6
7023 ac_save_LIBS="$LIBS"
7024 LIBS="-lprot -lx $LIBS"
7025 cat > conftest.$ac_ext <<EOF
7026 #line 7038 "configure"
7027 #include "confdefs.h"
7028 /* Override any gcc2 internal prototype to avoid an error. */
7029 /* We use char because int might match the return type of a gcc2
7030 builtin and then its argument prototype would still apply. */
7037 if { (eval echo configure:7049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7039 eval "ac_cv_lib_$ac_lib_var=yes"
7041 echo "configure: failed program was:" >&5
7042 cat conftest.$ac_ext >&5
7044 eval "ac_cv_lib_$ac_lib_var=no"
7047 LIBS="$ac_save_LIBS"
7050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7051 echo "$ac_t""yes" 1>&6
7052 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
7054 echo "$ac_t""no" 1>&6
7055 # On DEC, getprpwnam() is in -lsecurity
7056 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
7057 echo "configure:7069: checking for getprpwnam in -lsecurity" >&5
7058 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
7059 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7060 echo $ac_n "(cached) $ac_c" 1>&6
7062 ac_save_LIBS="$LIBS"
7063 LIBS="-lsecurity $LIBS"
7064 cat > conftest.$ac_ext <<EOF
7065 #line 7077 "configure"
7066 #include "confdefs.h"
7067 /* Override any gcc2 internal prototype to avoid an error. */
7068 /* We use char because int might match the return type of a gcc2
7069 builtin and then its argument prototype would still apply. */
7076 if { (eval echo configure:7088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7078 eval "ac_cv_lib_$ac_lib_var=yes"
7080 echo "configure: failed program was:" >&5
7081 cat conftest.$ac_ext >&5
7083 eval "ac_cv_lib_$ac_lib_var=no"
7086 LIBS="$ac_save_LIBS"
7089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7090 echo "$ac_t""yes" 1>&6
7091 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
7093 echo "$ac_t""no" 1>&6
7101 # HP's entry in the "Not Invented Here" Sweepstakes.
7103 if test "$pwent_cruft_done" = no ; then
7104 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
7105 echo "configure:7117: checking for HP-style shadow passwords" >&5
7106 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
7107 echo $ac_n "(cached) $ac_c" 1>&6
7110 ac_save_CPPFLAGS="$CPPFLAGS"
7111 if test \! -z "$includedir" ; then
7112 CPPFLAGS="$CPPFLAGS -I$includedir"
7114 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7115 cat > conftest.$ac_ext <<EOF
7116 #line 7128 "configure"
7117 #include "confdefs.h"
7120 #include <sys/types.h>
7122 #include <hpsecurity.h>
7125 struct s_passwd *p = getspwnam("nobody");
7126 const char *pw = p->pw_passwd;
7129 if { (eval echo configure:7141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7131 ac_cv_hpux_passwd=yes
7133 echo "configure: failed program was:" >&5
7134 cat conftest.$ac_ext >&5
7136 ac_cv_hpux_passwd=no
7139 CPPFLAGS="$ac_save_CPPFLAGS"
7142 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
7143 if test "$ac_cv_hpux_passwd" = yes; then
7146 pwent_cruft_done=yes
7147 cat >> confdefs.h <<\EOF
7148 #define HAVE_HPUX_PASSWD 1
7152 # on HPUX, bigcrypt is in -lsec
7153 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7154 echo "configure:7166: checking for bigcrypt in -lsec" >&5
7155 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7156 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7157 echo $ac_n "(cached) $ac_c" 1>&6
7159 ac_save_LIBS="$LIBS"
7161 cat > conftest.$ac_ext <<EOF
7162 #line 7174 "configure"
7163 #include "confdefs.h"
7164 /* Override any gcc2 internal prototype to avoid an error. */
7165 /* We use char because int might match the return type of a gcc2
7166 builtin and then its argument prototype would still apply. */
7173 if { (eval echo configure:7185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7175 eval "ac_cv_lib_$ac_lib_var=yes"
7177 echo "configure: failed program was:" >&5
7178 cat conftest.$ac_ext >&5
7180 eval "ac_cv_lib_$ac_lib_var=no"
7183 LIBS="$ac_save_LIBS"
7186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7187 echo "$ac_t""yes" 1>&6
7188 PASSWD_LIBS="$PASSWD_LIBS -lsec"
7190 echo "$ac_t""no" 1>&6
7196 # Traditional (ha!) shadow passwords.
7198 if test "$pwent_cruft_done" = no ; then
7199 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
7200 echo "configure:7212: checking for generic shadow passwords" >&5
7201 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
7202 echo $ac_n "(cached) $ac_c" 1>&6
7205 ac_save_CPPFLAGS="$CPPFLAGS"
7206 if test \! -z "$includedir" ; then
7207 CPPFLAGS="$CPPFLAGS -I$includedir"
7209 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7210 cat > conftest.$ac_ext <<EOF
7211 #line 7223 "configure"
7212 #include "confdefs.h"
7215 #include <sys/types.h>
7219 struct spwd *p = getspnam("nobody");
7220 const char *pw = p->sp_pwdp;
7223 if { (eval echo configure:7235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7227 echo "configure: failed program was:" >&5
7228 cat conftest.$ac_ext >&5
7233 CPPFLAGS="$ac_save_CPPFLAGS"
7236 echo "$ac_t""$ac_cv_shadow" 1>&6
7237 if test "$ac_cv_shadow" = yes; then
7240 pwent_cruft_done=yes
7241 cat >> confdefs.h <<\EOF
7242 #define HAVE_SHADOW_PASSWD 1
7246 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
7248 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
7249 echo "configure:7261: checking for getspnam in -lc" >&5
7250 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
7251 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7252 echo $ac_n "(cached) $ac_c" 1>&6
7254 ac_save_LIBS="$LIBS"
7256 cat > conftest.$ac_ext <<EOF
7257 #line 7269 "configure"
7258 #include "confdefs.h"
7259 /* Override any gcc2 internal prototype to avoid an error. */
7260 /* We use char because int might match the return type of a gcc2
7261 builtin and then its argument prototype would still apply. */
7268 if { (eval echo configure:7280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7270 eval "ac_cv_lib_$ac_lib_var=yes"
7272 echo "configure: failed program was:" >&5
7273 cat conftest.$ac_ext >&5
7275 eval "ac_cv_lib_$ac_lib_var=no"
7278 LIBS="$ac_save_LIBS"
7281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7282 echo "$ac_t""yes" 1>&6
7285 echo "$ac_t""no" 1>&6
7288 if test "$have_getspnam" = no ; then
7289 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7290 echo "configure:7302: checking for getspnam in -lgen" >&5
7291 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7292 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7293 echo $ac_n "(cached) $ac_c" 1>&6
7295 ac_save_LIBS="$LIBS"
7297 cat > conftest.$ac_ext <<EOF
7298 #line 7310 "configure"
7299 #include "confdefs.h"
7300 /* Override any gcc2 internal prototype to avoid an error. */
7301 /* We use char because int might match the return type of a gcc2
7302 builtin and then its argument prototype would still apply. */
7309 if { (eval echo configure:7321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7311 eval "ac_cv_lib_$ac_lib_var=yes"
7313 echo "configure: failed program was:" >&5
7314 cat conftest.$ac_ext >&5
7316 eval "ac_cv_lib_$ac_lib_var=no"
7319 LIBS="$ac_save_LIBS"
7322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7323 echo "$ac_t""yes" 1>&6
7324 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
7326 echo "$ac_t""no" 1>&6
7333 # On FreeBSD, getpwnam() and friends work just like on non-shadow-password
7334 # systems -- except you only get stuff in the pw_passwd field if the running
7335 # program is setuid. So, guess that we've got this lossage to contend with
7336 # if /etc/master.passwd exists, and default to a setuid installation.
7338 if test "$pwent_cruft_done" = no ; then
7339 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
7340 echo "configure:7352: checking for FreeBSD-style shadow passwords" >&5
7341 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
7342 echo $ac_n "(cached) $ac_c" 1>&6
7344 if test -f /etc/master.passwd ; then
7345 ac_cv_master_passwd=yes
7347 ac_cv_master_passwd=no
7351 echo "$ac_t""$ac_cv_master_passwd" 1>&6
7352 if test "$ac_cv_master_passwd" = yes; then
7354 pwent_cruft_done=yes
7358 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
7360 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
7361 echo "configure:7373: checking for crypt in -lc" >&5
7362 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
7363 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7364 echo $ac_n "(cached) $ac_c" 1>&6
7366 ac_save_LIBS="$LIBS"
7368 cat > conftest.$ac_ext <<EOF
7369 #line 7381 "configure"
7370 #include "confdefs.h"
7371 /* Override any gcc2 internal prototype to avoid an error. */
7372 /* We use char because int might match the return type of a gcc2
7373 builtin and then its argument prototype would still apply. */
7380 if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7382 eval "ac_cv_lib_$ac_lib_var=yes"
7384 echo "configure: failed program was:" >&5
7385 cat conftest.$ac_ext >&5
7387 eval "ac_cv_lib_$ac_lib_var=no"
7390 LIBS="$ac_save_LIBS"
7393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7394 echo "$ac_t""yes" 1>&6
7397 echo "$ac_t""no" 1>&6
7400 if test "$have_crypt" = no ; then
7401 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
7402 echo "configure:7414: checking for crypt in -lcrypt" >&5
7403 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
7404 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7405 echo $ac_n "(cached) $ac_c" 1>&6
7407 ac_save_LIBS="$LIBS"
7408 LIBS="-lcrypt $LIBS"
7409 cat > conftest.$ac_ext <<EOF
7410 #line 7422 "configure"
7411 #include "confdefs.h"
7412 /* Override any gcc2 internal prototype to avoid an error. */
7413 /* We use char because int might match the return type of a gcc2
7414 builtin and then its argument prototype would still apply. */
7421 if { (eval echo configure:7433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7423 eval "ac_cv_lib_$ac_lib_var=yes"
7425 echo "configure: failed program was:" >&5
7426 cat conftest.$ac_ext >&5
7428 eval "ac_cv_lib_$ac_lib_var=no"
7431 LIBS="$ac_save_LIBS"
7434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7435 echo "$ac_t""yes" 1>&6
7436 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
7438 echo "$ac_t""no" 1>&6
7444 # Most of the above shadow mechanisms will have set need_setuid to yes,
7445 # if they were found. But, on some systems, we need setuid even when
7446 # using plain old vanilla passwords.
7448 if test "$need_setuid" = no ; then
7450 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
7459 if test \! -z "$includedir" ; then
7460 INCLUDES="-I$includedir"
7463 if test \! -z "$libdir" ; then
7464 LDFLAGS="$LDFLAGS -L$libdir"
7468 ##### should have options to override the DEPEND crap, I guess...
7474 # Done testing things -- now substitute in some stuff for the Makefiles.
7476 if test "$have_motif" = yes; then
7477 cat >> confdefs.h <<\EOF
7478 #define HAVE_MOTIF 1
7481 TOOLKIT_SRCS='$(MOTIF_SRCS)'
7482 TOOLKIT_OBJS='$(MOTIF_OBJS)'
7483 elif test "$have_athena" = yes; then
7484 cat >> confdefs.h <<\EOF
7485 #define HAVE_ATHENA 1
7488 TOOLKIT_SRCS='$(ATHENA_SRCS)'
7489 TOOLKIT_OBJS='$(ATHENA_OBJS)'
7495 if test "$have_kerberos" = yes; then
7496 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
7497 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
7499 if test "$have_pam" = yes; then
7500 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
7501 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
7502 INSTALL_PAM="install-pam"
7504 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
7505 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
7508 if test "$enable_locking" = yes; then
7509 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
7510 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
7516 if test "$need_setuid" = yes; then
7518 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
7521 INSTALL_SETUID='$(INSTALL_PROGRAM)'
7525 if test "$have_gl" = yes; then
7526 GL_EXES='$(GL_EXES)'
7529 GL_KLUDGE=' -'${tab}
7564 # Print some warnings before emitting the Makefiles.
7566 warn_prefix_1=" Warning:"
7567 warn_prefix_2=" Note:"
7568 warn_prefix="$warn_prefix_1"
7571 warnsep=' #################################################################'
7574 if test "$warning" = no ; then
7575 echo '' ; echo "$warnsep" ; echo ''
7582 if test "$warning" = long ; then echo '' ; fi
7584 echo "$warn_prefix $@"
7591 if test "$was" != no ; then echo '' ; fi
7592 echo "$warn_prefix $@"
7601 warn_prefix="$warn_prefix_2"
7603 warn_prefix="$warn_prefix_1"
7607 warn_prefix="$warn_prefix_2"
7609 warn_prefix="$warn_prefix_1"
7613 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
7614 warn 'The SGI saver extension was requested, but was not found.'
7617 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
7618 warn 'The MIT saver extension was requested, but was not found.'
7621 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
7622 warn 'The XIdle extension was requested, but was not found.'
7625 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
7626 warn 'The XSHM extension was requested, but was not found.'
7629 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
7630 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
7633 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
7634 warn 'The DPMS extension was requested, but was not found.'
7637 if test "$have_motif" = no -a "$have_athena" = no ; then
7638 warnL "Neither Motif nor Athena widgets seem to be available;"
7639 warn2 "the \`xscreensaver-demo' program requires one or the"
7641 proselytize_motif=no
7643 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
7644 warnL "Use of Motif was requested, but it wasn't found;"
7645 warn2 "Athena will be used instead."
7647 elif test "$with_athena_req" = yes -a "$have_athena" = no ; then
7648 warnL "Use of Athena was requested, but it wasn't found;"
7649 warn2 "Motif will be used instead."
7652 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
7654 preferred_lesstif=0.86
7656 if test "$lesstif_version" = unknown; then
7657 warnL "Unable to determine the LessTif version number!"
7658 warn2 "Make sure you are using version $preferred_lesstif or newer."
7659 warn2 "See <http://www.lesstif.org/>."
7661 elif test \! $lesstif_version -gt 82; then
7662 warnL "LessTif version $lesstif_version_string is being used."
7663 warn2 "LessTif versions 0.82 and earlier are too buggy to"
7664 warn2 "use with XScreenSaver; it is strongly recommended"
7665 warn2 "that you upgrade to at least version $preferred_lesstif!"
7666 warn2 "See <http://www.lesstif.org/>."
7670 if test "$proselytize_motif" = yes ; then
7671 warnL "Athena widgets are being used instead of Motif."
7672 warn2 "The \`xscreensaver-demo' program looks much better"
7673 warn2 "with Motif. Wouldn't you rather be using Motif?"
7674 warn2 "It is shipped by every commercial Unix vendor;"
7675 warn2 "and there is a free implementation available as"
7676 warn2 "well: see <http://www.lesstif.org/>."
7680 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
7681 preferred_mesagl=3.0
7683 if test "$ac_mesagl_version" = unknown; then
7684 warnL "Unable to determine the MesaGL version number!"
7685 warn2 "Make sure you are using version $preferred_mesagl or newer."
7687 elif test \! "$ac_mesagl_version" -gt 2006; then
7688 warnL "MesaGL version $ac_mesagl_version_string is being used."
7689 warn2 "MesaGL versions 2.6 and earlier have a security bug."
7690 warn2 "It is strongly recommended that you upgrade to at"
7691 warn2 "least version $preferred_mesagl."
7696 if test "$have_xpm" = no ; then
7697 if test "$with_xpm_req" = yes ; then
7698 warnL 'Use of XPM was requested, but it was not found.'
7699 elif test "$with_xpm_req" = no ; then
7700 noteL 'The XPM library is not being used.'
7702 noteL 'The XPM library was not found.'
7706 warn2 'Some of the demos will not be as colorful as they'
7707 warn2 'could be. You might want to consider installing XPM'
7708 warn2 'and re-running configure. (Remember to delete the'
7709 warn2 'config.cache file first.) You can find XPM at most'
7710 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
7713 if test "$have_gl" = no ; then
7714 if test "$with_gl_req" = yes ; then
7715 warnL 'Use of GL was requested, but it was not found.'
7716 elif test "$with_gl_req" = no ; then
7717 noteL 'The OpenGL 3D library is not being used.'
7719 noteL 'The OpenGL 3D library was not found.'
7723 warn2 'Those demos which use 3D will not be built or installed.'
7724 warn2 'You might want to consider installing OpenGL and'
7725 warn2 're-running configure. (Remember to delete the'
7726 warn2 "config.cache file first.) If your vendor doesn't ship"
7727 warn2 'their own implementation of OpenGL, you can get a free'
7728 warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
7729 warn2 'info, see <http://www.opengl.org/>.'
7733 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
7734 warn 'Use of XReadDisplay was requested, but it was not found.'
7737 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
7738 warn 'Use of the Iris Video Library was requested, but it was not found.'
7741 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
7742 warn 'Use of Kerberos was requested, but it was not found.'
7745 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
7746 warn 'Use of PAM was requested, but it was not found.'
7749 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
7750 warn 'Use of shadow passwords was requested, but they were not found.'
7753 if test -n "$with_zippy_req"; then
7754 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
7755 warnL "$with_zippy_req was requested as the Zippy program,"
7756 warn2 "but was not found. The default will be used instead."
7760 if test "$warning" != no; then
7761 echo '' ; echo "$warnsep" ; echo ''
7766 cat > confcache <<\EOF
7767 # This file is a shell script that caches the results of configure
7768 # tests run on this system so they can be shared between configure
7769 # scripts and configure runs. It is not useful on other systems.
7770 # If it contains results you don't want to keep, you may remove or edit it.
7772 # By default, configure uses ./config.cache as the cache file,
7773 # creating it if it does not exist already. You can give configure
7774 # the --cache-file=FILE option to use a different cache file; that is
7775 # what configure does when it calls configure scripts in
7776 # subdirectories, so they share the cache.
7777 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7778 # config.status only pays attention to the cache file if you give it the
7779 # --recheck option to rerun configure.
7782 # The following way of writing the cache mishandles newlines in values,
7783 # but we know of no workaround that is simple, portable, and efficient.
7784 # So, don't put newlines in cache variables' values.
7785 # Ultrix sh set writes to stderr and can't be redirected directly,
7786 # and sets the high bit in the cache file unless we assign to the vars.
7788 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7790 # `set' does not quote correctly, so add quotes (double-quote substitution
7791 # turns \\\\ into \\, and sed turns \\ into \).
7793 -e "s/'/'\\\\''/g" \
7794 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7797 # `set' quotes correctly as required by POSIX, so do not add quotes.
7798 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7801 if cmp -s $cache_file confcache; then
7804 if test -w $cache_file; then
7805 echo "updating cache $cache_file"
7806 cat confcache > $cache_file
7808 echo "not updating unwritable cache $cache_file"
7813 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7815 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7816 # Let make expand exec_prefix.
7817 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7819 # Any assignment to VPATH causes Sun make to only execute
7820 # the first set of double-colon rules, so remove it if not needed.
7821 # If there is a colon in the path, we need to keep it.
7822 if test "x$srcdir" = x.; then
7823 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7826 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7828 DEFS=-DHAVE_CONFIG_H
7830 # Without the "./", some shells look in PATH for config.status.
7831 : ${CONFIG_STATUS=./config.status}
7833 echo creating $CONFIG_STATUS
7834 rm -f $CONFIG_STATUS
7835 cat > $CONFIG_STATUS <<EOF
7837 # Generated automatically by configure.
7838 # Run this file to recreate the current configuration.
7839 # This directory was configured as follows,
7840 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7842 # $0 $ac_configure_args
7844 # Compiler output produced by configure, useful for debugging
7845 # configure, is in ./config.log if it exists.
7847 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7850 case "\$ac_option" in
7851 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7852 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7853 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7854 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7855 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7857 -help | --help | --hel | --he | --h)
7858 echo "\$ac_cs_usage"; exit 0 ;;
7859 *) echo "\$ac_cs_usage"; exit 1 ;;
7863 ac_given_srcdir=$srcdir
7864 ac_given_INSTALL="$INSTALL"
7866 trap 'rm -fr `echo "Makefile
7871 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7873 cat >> $CONFIG_STATUS <<EOF
7875 # Protect against being on the right side of a sed subst in config.status.
7876 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7877 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7881 s%@CFLAGS@%$CFLAGS%g
7882 s%@CPPFLAGS@%$CPPFLAGS%g
7883 s%@CXXFLAGS@%$CXXFLAGS%g
7884 s%@FFLAGS@%$FFLAGS%g
7886 s%@LDFLAGS@%$LDFLAGS%g
7888 s%@exec_prefix@%$exec_prefix%g
7889 s%@prefix@%$prefix%g
7890 s%@program_transform_name@%$program_transform_name%g
7891 s%@bindir@%$bindir%g
7892 s%@sbindir@%$sbindir%g
7893 s%@libexecdir@%$libexecdir%g
7894 s%@datadir@%$datadir%g
7895 s%@sysconfdir@%$sysconfdir%g
7896 s%@sharedstatedir@%$sharedstatedir%g
7897 s%@localstatedir@%$localstatedir%g
7898 s%@libdir@%$libdir%g
7899 s%@includedir@%$includedir%g
7900 s%@oldincludedir@%$oldincludedir%g
7901 s%@infodir@%$infodir%g
7902 s%@mandir@%$mandir%g
7904 s%@host_alias@%$host_alias%g
7905 s%@host_cpu@%$host_cpu%g
7906 s%@host_vendor@%$host_vendor%g
7907 s%@host_os@%$host_os%g
7910 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7911 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7912 s%@INSTALL_DATA@%$INSTALL_DATA%g
7913 s%@SET_MAKE@%$SET_MAKE%g
7914 s%@X_CFLAGS@%$X_CFLAGS%g
7915 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7916 s%@X_LIBS@%$X_LIBS%g
7917 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7919 s%@emacs_exe@%$emacs_exe%g
7920 s%@xemacs_exe@%$xemacs_exe%g
7921 s%@fortune@%$fortune%g
7922 s%@INCLUDES@%$INCLUDES%g
7923 s%@SAVER_LIBS@%$SAVER_LIBS%g
7924 s%@TOOLKIT_LIBS@%$TOOLKIT_LIBS%g
7925 s%@HACK_LIBS@%$HACK_LIBS%g
7926 s%@XPM_LIBS@%$XPM_LIBS%g
7927 s%@GL_LIBS@%$GL_LIBS%g
7928 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
7929 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
7930 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
7931 s%@NEED_SETUID@%$NEED_SETUID%g
7932 s%@INSTALL_PAM@%$INSTALL_PAM%g
7933 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
7934 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
7935 s%@TOOLKIT_SRCS@%$TOOLKIT_SRCS%g
7936 s%@TOOLKIT_OBJS@%$TOOLKIT_OBJS%g
7937 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
7938 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
7939 s%@XMU_SRCS@%$XMU_SRCS%g
7940 s%@XMU_OBJS@%$XMU_OBJS%g
7941 s%@LOCK_SRCS@%$LOCK_SRCS%g
7942 s%@LOCK_OBJS@%$LOCK_OBJS%g
7943 s%@GL_EXES@%$GL_EXES%g
7944 s%@GL_KLUDGE@%$GL_KLUDGE%g
7945 s%@HACKDIR@%$HACKDIR%g
7946 s%@APPDEFAULTS@%$APPDEFAULTS%g
7947 s%@DEPEND@%$DEPEND%g
7948 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
7949 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
7954 cat >> $CONFIG_STATUS <<\EOF
7956 # Split the substitutions into bite-sized pieces for seds with
7957 # small command number limits, like on Digital OSF/1 and HP-UX.
7958 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7959 ac_file=1 # Number of current file.
7960 ac_beg=1 # First line for current file.
7961 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7964 while $ac_more_lines; do
7965 if test $ac_beg -gt 1; then
7966 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7968 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7970 if test ! -s conftest.s$ac_file; then
7972 rm -f conftest.s$ac_file
7974 if test -z "$ac_sed_cmds"; then
7975 ac_sed_cmds="sed -f conftest.s$ac_file"
7977 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7979 ac_file=`expr $ac_file + 1`
7981 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7984 if test -z "$ac_sed_cmds"; then
7989 cat >> $CONFIG_STATUS <<EOF
7991 CONFIG_FILES=\${CONFIG_FILES-"Makefile
7996 driver/XScreenSaver.ad"}
7998 cat >> $CONFIG_STATUS <<\EOF
7999 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8000 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8002 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8003 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8004 *) ac_file_in="${ac_file}.in" ;;
8007 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8009 # Remove last slash and all that follows it. Not all systems have dirname.
8010 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8011 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8012 # The file is in a subdirectory.
8013 test ! -d "$ac_dir" && mkdir "$ac_dir"
8014 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8015 # A "../" for each directory in $ac_dir_suffix.
8016 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8018 ac_dir_suffix= ac_dots=
8021 case "$ac_given_srcdir" in
8023 if test -z "$ac_dots"; then top_srcdir=.
8024 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8025 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8027 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8028 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8031 case "$ac_given_INSTALL" in
8032 [/$]*) INSTALL="$ac_given_INSTALL" ;;
8033 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8036 echo creating "$ac_file"
8038 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8040 *Makefile*) ac_comsub="1i\\
8041 # $configure_input" ;;
8045 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8047 s%@configure_input@%$configure_input%g
8048 s%@srcdir@%$srcdir%g
8049 s%@top_srcdir@%$top_srcdir%g
8050 s%@INSTALL@%$INSTALL%g
8051 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8055 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8056 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8058 # ac_d sets the value in "#define NAME VALUE" lines.
8059 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8060 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8063 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8064 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8065 ac_uB='\([ ]\)%\1#\2define\3'
8068 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8069 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8070 ac_eB='$%\1#\2define\3'
8074 if test "${CONFIG_HEADERS+set}" != set; then
8076 cat >> $CONFIG_STATUS <<EOF
8077 CONFIG_HEADERS="config.h"
8079 cat >> $CONFIG_STATUS <<\EOF
8081 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8082 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8084 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8085 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8086 *) ac_file_in="${ac_file}.in" ;;
8089 echo creating $ac_file
8091 rm -f conftest.frag conftest.in conftest.out
8092 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8093 cat $ac_file_inputs > conftest.in
8097 # Transform confdefs.h into a sed script conftest.vals that substitutes
8098 # the proper values into config.h.in to produce config.h. And first:
8099 # Protect against being on the right side of a sed subst in config.status.
8100 # Protect against being in an unquoted here document in config.status.
8102 cat > conftest.hdr <<\EOF
8105 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8109 sed -n -f conftest.hdr confdefs.h > conftest.vals
8112 # This sed command replaces #undef with comments. This is necessary, for
8113 # example, in the case of _POSIX_SOURCE, which is predefined and required
8114 # on some systems where configure will not decide to define it.
8115 cat >> conftest.vals <<\EOF
8116 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8119 # Break up conftest.vals because some shells have a limit on
8120 # the size of here documents, and old seds have small limits too.
8125 ac_lines=`grep -c . conftest.vals`
8126 # grep -c gives empty output for an empty file on some AIX systems.
8127 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8128 # Write a limited-size here document to conftest.frag.
8129 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8130 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8132 sed -f conftest.frag conftest.in > conftest.out
8134 mv conftest.out conftest.in
8136 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8138 mv conftest.tail conftest.vals
8142 cat >> $CONFIG_STATUS <<\EOF
8143 rm -f conftest.frag conftest.h
8144 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8145 cat conftest.in >> conftest.h
8147 if cmp -s $ac_file conftest.h 2>/dev/null; then
8148 echo "$ac_file is unchanged"
8151 # Remove last slash and all that follows it. Not all systems have dirname.
8152 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8153 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8154 # The file is in a subdirectory.
8155 test ! -d "$ac_dir" && mkdir "$ac_dir"
8158 mv conftest.h $ac_file
8163 cat >> $CONFIG_STATUS <<EOF
8166 cat >> $CONFIG_STATUS <<\EOF
8170 chmod +x $CONFIG_STATUS
8171 rm -fr confdefs* $ac_clean_files
8172 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8175 # You are in a twisty maze of namespaces and syntaxes, all alike.
8176 # Fuck the skull of Unix.
8178 eval bindir=${bindir}
8179 eval bindir=${bindir}
8180 eval bindir=${bindir}
8181 eval bindir=${bindir}
8182 eval bindir=${bindir}
8183 eval bindir=${bindir}
8184 eval HACKDIR=${HACKDIR}
8185 eval HACKDIR=${HACKDIR}
8186 eval HACKDIR=${HACKDIR}
8187 eval HACKDIR=${HACKDIR}
8188 eval HACKDIR=${HACKDIR}
8189 eval HACKDIR=${HACKDIR}
8191 # canonicalize slashes.
8192 bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'`
8193 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8195 if test "${bindir}" = "${HACKDIR}" ; then
8199 echo ' When you run "make install", the "xscreensaver",'
8200 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
8201 echo " will be installed in ${bindir}."
8203 echo " The various graphics demos (80+ different executables) will"
8204 echo " also be installed in ${HACKDIR}."
8206 echo " If you would prefer the demos to be installed elsewhere"
8207 echo " (for example, in a dedicated directory) you should re-run"
8208 echo " configure with the --enable-subdir=DIR option. For more"
8209 echo " information, run $0 --help."