3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12
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."
61 X Client Toolkit options:
63 --with-motif Use the Motif toolkit for the user interface, if
64 possible (this is the default).
65 --without-motif Do not use Motif."
67 --with-athena Use the Athena toolkit for the user interface, if
68 possible (this is the default if Motif isn't used.)
69 --without-athena Do not use Athena."
72 Graphics Demo options:
74 --with-xpm Include support for XPM files in some demos,
75 if possible (this is the default).
76 --without-xpm Do not compile in support for XPM files."
78 --with-gl Build those demos which depend on OpenGL,
79 if possible (this is the default).
80 --without-gl Do not build the OpenGL demos."
82 --with-readdisplay Include support for the XReadDisplay server
83 extension if possible (this is the default).
84 --without-readdisplay Do not compile in support for this extension."
86 --with-sgivideo Include support for SGI's Iris Video Library
87 if possible (this is the default).
88 --without-sgivideo Do not compile in support for this library."
90 --with-zippy=PROGRAM Some demos are able to run an external program and
91 display its text; this names the program to use by
92 default (though it can be overridden with X
93 resources.) If you don't specify this, the default
94 is to use \"yow\" from the Emacs distribution (if you
95 have it) or else to use \"fortune\"."
98 Screen Locking options:
100 --enable-locking Compile in support for locking the display
101 (this is the default.)
102 --disable-locking Do not allow locking at all."
105 --enable-vt-locking Compile in support for locking Virtual Terminals.
106 This is the default if the system supports it, and
107 if locking support is included (--enable-locking.)
108 --disable-vt-locking Do not allow locking of VTs, even if locking is
112 --with-kerberos Include support for Kerberos authentication,
113 if possible (this is the default.)
114 --without-kerberos Do not compile in support for Kerberos."
116 --with-pam Include support for PAM (Pluggable Authentication
117 Modules) if possible (this is the default.)
118 --without-pam Do not compile in support for PAM."
120 --with-shadow Include support for shadow password authentication,
121 if possible (this is the default, if no Kerberos or
123 --without-shadow Do not compile in support for shadow passwords.
126 # Initialize some variables set by options.
127 # The variables have the same names as the options, with
128 # dashes changed to underlines.
130 cache_file=./config.cache
139 program_transform_name=s,x,x,
147 bindir='${exec_prefix}/bin'
148 sbindir='${exec_prefix}/sbin'
149 libexecdir='${exec_prefix}/libexec'
150 datadir='${prefix}/share'
151 sysconfdir='${prefix}/etc'
152 sharedstatedir='${prefix}/com'
153 localstatedir='${prefix}/var'
154 libdir='${exec_prefix}/lib'
155 includedir='${prefix}/include'
156 oldincludedir='/usr/include'
157 infodir='${prefix}/info'
158 mandir='${prefix}/man'
160 # Initialize some other variables.
163 # Maximum number of lines to put in a shell here document.
170 # If the previous option needs an argument, assign it.
171 if test -n "$ac_prev"; then
172 eval "$ac_prev=\$ac_option"
178 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
182 # Accept the important Cygnus configure options, so we can diagnose typos.
186 -bindir | --bindir | --bindi | --bind | --bin | --bi)
188 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
189 bindir="$ac_optarg" ;;
191 -build | --build | --buil | --bui | --bu)
193 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
194 build="$ac_optarg" ;;
196 -cache-file | --cache-file | --cache-fil | --cache-fi \
197 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
198 ac_prev=cache_file ;;
199 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
200 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
201 cache_file="$ac_optarg" ;;
203 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
205 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
207 datadir="$ac_optarg" ;;
209 -disable-* | --disable-*)
210 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
211 # Reject names that are not valid shell variable names.
212 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
213 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
215 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
216 eval "enable_${ac_feature}=no" ;;
218 -enable-* | --enable-*)
219 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
220 # Reject names that are not valid shell variable names.
221 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
222 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
224 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
229 eval "enable_${ac_feature}='$ac_optarg'" ;;
231 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
232 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
233 | --exec | --exe | --ex)
234 ac_prev=exec_prefix ;;
235 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
236 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
237 | --exec=* | --exe=* | --ex=*)
238 exec_prefix="$ac_optarg" ;;
240 -gas | --gas | --ga | --g)
241 # Obsolete; use --with-gas.
244 -help | --help | --hel | --he)
245 # Omit some internal or obsolete options to make the list less imposing.
246 # This message is too long to be a string in the A/UX 3.1 sh.
248 Usage: configure [options] [host]
249 Options: [defaults in brackets after descriptions]
253 --cache-file=FILE cache test results in FILE
254 --help print this message
255 --no-create do not create output files
256 --quiet, --silent do not print \`checking...' messages
257 --version print the version of autoconf that created configure
259 Directory and file names:
261 --prefix=PREFIX install architecture-independent files in PREFIX
263 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
265 --bindir=DIR user executables in DIR [EPREFIX/bin]
266 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
267 --includedir=DIR C header files in DIR [PREFIX/include]
268 --x-includes=DIR X include files are in DIR
269 --x-libraries=DIR X library files are in DIR
270 --mandir=DIR man documentation in DIR [PREFIX/man]
271 --srcdir=DIR find the sources in DIR [configure dir or ..]
272 --program-prefix=PREFIX prepend PREFIX to installed program names
273 --program-suffix=SUFFIX append SUFFIX to installed program names
274 --program-transform-name=PROGRAM
275 run sed PROGRAM on installed program names
281 --build=BUILD configure for building on BUILD [BUILD=HOST]
282 --host=HOST configure for HOST [guessed]
283 --target=TARGET configure for TARGET [TARGET=HOST]
285 if test -n "$ac_help"; then
290 -host | --host | --hos | --ho)
292 -host=* | --host=* | --hos=* | --ho=*)
295 -includedir | --includedir | --includedi | --included | --include \
296 | --includ | --inclu | --incl | --inc)
297 ac_prev=includedir ;;
298 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
299 | --includ=* | --inclu=* | --incl=* | --inc=*)
300 includedir="$ac_optarg" ;;
302 -infodir | --infodir | --infodi | --infod | --info | --inf)
304 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
305 infodir="$ac_optarg" ;;
307 -libdir | --libdir | --libdi | --libd)
309 -libdir=* | --libdir=* | --libdi=* | --libd=*)
310 libdir="$ac_optarg" ;;
312 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
313 | --libexe | --libex | --libe)
314 ac_prev=libexecdir ;;
315 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
316 | --libexe=* | --libex=* | --libe=*)
317 libexecdir="$ac_optarg" ;;
319 -localstatedir | --localstatedir | --localstatedi | --localstated \
320 | --localstate | --localstat | --localsta | --localst \
321 | --locals | --local | --loca | --loc | --lo)
322 ac_prev=localstatedir ;;
323 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
324 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
325 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
326 localstatedir="$ac_optarg" ;;
328 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
330 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
331 mandir="$ac_optarg" ;;
334 # Obsolete; use --without-fp.
337 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
342 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
345 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
346 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
347 | --oldin | --oldi | --old | --ol | --o)
348 ac_prev=oldincludedir ;;
349 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
350 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
351 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
352 oldincludedir="$ac_optarg" ;;
354 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
356 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
357 prefix="$ac_optarg" ;;
359 -program-prefix | --program-prefix | --program-prefi | --program-pref \
360 | --program-pre | --program-pr | --program-p)
361 ac_prev=program_prefix ;;
362 -program-prefix=* | --program-prefix=* | --program-prefi=* \
363 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
364 program_prefix="$ac_optarg" ;;
366 -program-suffix | --program-suffix | --program-suffi | --program-suff \
367 | --program-suf | --program-su | --program-s)
368 ac_prev=program_suffix ;;
369 -program-suffix=* | --program-suffix=* | --program-suffi=* \
370 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
371 program_suffix="$ac_optarg" ;;
373 -program-transform-name | --program-transform-name \
374 | --program-transform-nam | --program-transform-na \
375 | --program-transform-n | --program-transform- \
376 | --program-transform | --program-transfor \
377 | --program-transfo | --program-transf \
378 | --program-trans | --program-tran \
379 | --progr-tra | --program-tr | --program-t)
380 ac_prev=program_transform_name ;;
381 -program-transform-name=* | --program-transform-name=* \
382 | --program-transform-nam=* | --program-transform-na=* \
383 | --program-transform-n=* | --program-transform-=* \
384 | --program-transform=* | --program-transfor=* \
385 | --program-transfo=* | --program-transf=* \
386 | --program-trans=* | --program-tran=* \
387 | --progr-tra=* | --program-tr=* | --program-t=*)
388 program_transform_name="$ac_optarg" ;;
390 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
391 | -silent | --silent | --silen | --sile | --sil)
394 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
396 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
398 sbindir="$ac_optarg" ;;
400 -sharedstatedir | --sharedstatedir | --sharedstatedi \
401 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
402 | --sharedst | --shareds | --shared | --share | --shar \
404 ac_prev=sharedstatedir ;;
405 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
406 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
407 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
409 sharedstatedir="$ac_optarg" ;;
411 -site | --site | --sit)
413 -site=* | --site=* | --sit=*)
416 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
418 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
419 srcdir="$ac_optarg" ;;
421 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
422 | --syscon | --sysco | --sysc | --sys | --sy)
423 ac_prev=sysconfdir ;;
424 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
425 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
426 sysconfdir="$ac_optarg" ;;
428 -target | --target | --targe | --targ | --tar | --ta | --t)
430 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
431 target="$ac_optarg" ;;
433 -v | -verbose | --verbose | --verbos | --verbo | --verb)
436 -version | --version | --versio | --versi | --vers)
437 echo "configure generated by autoconf version 2.12"
441 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
442 # Reject names that are not valid shell variable names.
443 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
444 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
446 ac_package=`echo $ac_package| sed 's/-/_/g'`
451 eval "with_${ac_package}='$ac_optarg'" ;;
453 -without-* | --without-*)
454 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
455 # Reject names that are not valid shell variable names.
456 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
457 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
459 ac_package=`echo $ac_package| sed 's/-/_/g'`
460 eval "with_${ac_package}=no" ;;
463 # Obsolete; use --with-x.
466 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
467 | --x-incl | --x-inc | --x-in | --x-i)
468 ac_prev=x_includes ;;
469 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
470 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
471 x_includes="$ac_optarg" ;;
473 -x-libraries | --x-libraries | --x-librarie | --x-librari \
474 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
475 ac_prev=x_libraries ;;
476 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
477 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
478 x_libraries="$ac_optarg" ;;
480 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
484 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
485 echo "configure: warning: $ac_option: invalid host type" 1>&2
487 if test "x$nonopt" != xNONE; then
488 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
496 if test -n "$ac_prev"; then
497 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
500 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
502 # File descriptor usage:
505 # 2 errors and warnings
506 # 3 some systems may open it to /dev/tty
507 # 4 used on the Kubota Titan
508 # 6 checking for... messages and results
509 # 5 compiler messages saved in config.log
510 if test "$silent" = yes; then
518 This file contains any messages produced by compilers while
519 running configure, to aid debugging if configure makes a mistake.
522 # Strip out --no-create and --no-recursion so they do not pile up.
523 # Also quote any args containing shell metacharacters.
528 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
529 | --no-cr | --no-c) ;;
530 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
531 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
532 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
533 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
534 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
539 # Only set these to C if already set. These must not be set unconditionally
540 # because not all systems understand e.g. LANG=C (notably SCO).
541 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
542 # Non-C LC_CTYPE values break the ctype check.
543 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
544 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
545 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
546 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
548 # confdefs.h avoids OS command line length limits that DEFS can exceed.
549 rm -rf conftest* confdefs.h
550 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
553 # A filename unique to this package, relative to the directory that
554 # configure is in, which we can look for to find out if srcdir is correct.
555 ac_unique_file=driver/subprocs.c
557 # Find the source files, if location was not specified.
558 if test -z "$srcdir"; then
559 ac_srcdir_defaulted=yes
560 # Try the directory containing this script, then its parent.
562 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
563 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
565 if test ! -r $srcdir/$ac_unique_file; then
569 ac_srcdir_defaulted=no
571 if test ! -r $srcdir/$ac_unique_file; then
572 if test "$ac_srcdir_defaulted" = yes; then
573 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
575 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
578 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
580 # Prefer explicitly selected file to automatically selected ones.
581 if test -z "$CONFIG_SITE"; then
582 if test "x$prefix" != xNONE; then
583 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
585 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
588 for ac_site_file in $CONFIG_SITE; do
589 if test -r "$ac_site_file"; then
590 echo "loading site script $ac_site_file"
595 if test -r "$cache_file"; then
596 echo "loading cache $cache_file"
599 echo "creating cache $cache_file"
604 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
605 ac_cpp='$CPP $CPPFLAGS'
606 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
607 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
608 cross_compiling=$ac_cv_prog_cc_cross
610 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
611 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
612 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
619 ac_n= ac_c='\c' ac_t=
624 echo "current directory: `pwd`"
625 echo "command line was: $0 $@"
629 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
630 if test -f $ac_dir/install-sh; then
632 ac_install_sh="$ac_aux_dir/install-sh -c"
634 elif test -f $ac_dir/install.sh; then
636 ac_install_sh="$ac_aux_dir/install.sh -c"
640 if test -z "$ac_aux_dir"; then
641 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
643 ac_config_guess=$ac_aux_dir/config.guess
644 ac_config_sub=$ac_aux_dir/config.sub
645 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
648 # Make sure we can run config.sub.
649 if $ac_config_sub sun4 >/dev/null 2>&1; then :
650 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
653 echo $ac_n "checking host system type""... $ac_c" 1>&6
654 echo "configure:666: checking host system type" >&5
657 case "$host_alias" in
661 if host_alias=`$ac_config_guess`; then :
662 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
664 *) host_alias=$nonopt ;;
668 host=`$ac_config_sub $host_alias`
669 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
670 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
671 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
672 echo "$ac_t""$host" 1>&6
675 # Extract the first word of "gcc", so it can be a program name with args.
676 set dummy gcc; ac_word=$2
677 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
678 echo "configure:690: checking for $ac_word" >&5
679 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
680 echo $ac_n "(cached) $ac_c" 1>&6
682 if test -n "$CC"; then
683 ac_cv_prog_CC="$CC" # Let the user override the test.
685 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
686 for ac_dir in $PATH; do
687 test -z "$ac_dir" && ac_dir=.
688 if test -f $ac_dir/$ac_word; then
697 if test -n "$CC"; then
698 echo "$ac_t""$CC" 1>&6
700 echo "$ac_t""no" 1>&6
703 if test -z "$CC"; then
704 # Extract the first word of "cc", so it can be a program name with args.
705 set dummy cc; ac_word=$2
706 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
707 echo "configure:719: checking for $ac_word" >&5
708 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
709 echo $ac_n "(cached) $ac_c" 1>&6
711 if test -n "$CC"; then
712 ac_cv_prog_CC="$CC" # Let the user override the test.
714 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
716 for ac_dir in $PATH; do
717 test -z "$ac_dir" && ac_dir=.
718 if test -f $ac_dir/$ac_word; then
719 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
728 if test $ac_prog_rejected = yes; then
729 # We found a bogon in the path, so make sure we never use it.
730 set dummy $ac_cv_prog_CC
732 if test $# -gt 0; then
733 # We chose a different compiler from the bogus one.
734 # However, it has the same basename, so the bogon will be chosen
735 # first if we set CC to just the basename; use the full file name.
737 set dummy "$ac_dir/$ac_word" "$@"
745 if test -n "$CC"; then
746 echo "$ac_t""$CC" 1>&6
748 echo "$ac_t""no" 1>&6
751 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
754 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
755 echo "configure:767: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759 ac_cpp='$CPP $CPPFLAGS'
760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762 cross_compiling=$ac_cv_prog_cc_cross
764 cat > conftest.$ac_ext <<EOF
765 #line 777 "configure"
766 #include "confdefs.h"
769 if { (eval echo configure:781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
770 ac_cv_prog_cc_works=yes
771 # If we can't run a trivial program, we are probably using a cross compiler.
772 if (./conftest; exit) 2>/dev/null; then
773 ac_cv_prog_cc_cross=no
775 ac_cv_prog_cc_cross=yes
778 echo "configure: failed program was:" >&5
779 cat conftest.$ac_ext >&5
780 ac_cv_prog_cc_works=no
784 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
785 if test $ac_cv_prog_cc_works = no; then
786 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
788 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
789 echo "configure:801: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
790 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
791 cross_compiling=$ac_cv_prog_cc_cross
793 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
794 echo "configure:806: checking whether we are using GNU C" >&5
795 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
796 echo $ac_n "(cached) $ac_c" 1>&6
798 cat > conftest.c <<EOF
803 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
810 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
812 if test $ac_cv_prog_gcc = yes; then
814 ac_test_CFLAGS="${CFLAGS+set}"
815 ac_save_CFLAGS="$CFLAGS"
817 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
818 echo "configure:830: checking whether ${CC-cc} accepts -g" >&5
819 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
820 echo $ac_n "(cached) $ac_c" 1>&6
822 echo 'void f(){}' > conftest.c
823 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
832 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
833 if test "$ac_test_CFLAGS" = set; then
834 CFLAGS="$ac_save_CFLAGS"
835 elif test $ac_cv_prog_cc_g = yes; then
842 test "${CFLAGS+set}" = set || CFLAGS="-g"
846 if test -z "$GCC"; then
847 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
848 echo "configure:860: checking how to request ANSI compilation" >&5
851 echo "$ac_t""HPUX: adding -Ae" 1>&6
855 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
856 CC="$CC -qlanglvl=ansi -qhalt=e"
860 echo "$ac_t""DEC: adding -std1" 1>&6
865 echo "$ac_t""no idea" 1>&6
871 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
872 echo "configure:884: checking whether the compiler works on ANSI C" >&5
873 if test "$cross_compiling" = yes; then
874 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
876 cat > conftest.$ac_ext <<EOF
877 #line 889 "configure"
878 #include "confdefs.h"
879 main(int ac, char **av) { return 0; }
881 if { (eval echo configure:893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
883 echo "$ac_t""yes" 1>&6
885 echo "configure: failed program was:" >&5
886 cat conftest.$ac_ext >&5
888 echo "$ac_t""no" 1>&6
889 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
896 *-irix5* |*-irix6.0-3* )
897 if test -n "$GCC"; then
898 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
899 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
902 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
903 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
908 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
909 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
913 # if test -z "$GCC"; then
914 # AC_MSG_RESULT(Turning on DEC C compiler warnings.)
915 # CC="$CC -migrate -w0 -verbose -warnprotos"
922 # Try and determine whether ${INSTALL} can create intermediate directories,
923 # and if not, whether "mkdir -p" works instead. This sets ${INSTALL_DIRS}.
924 # (But autoconf should earn its keep and do this for us!)
929 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
930 echo "configure:942: checking how to run the C preprocessor" >&5
931 # On Suns, sometimes $CPP names a directory.
932 if test -n "$CPP" && test -d "$CPP"; then
935 if test -z "$CPP"; then
936 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
937 echo $ac_n "(cached) $ac_c" 1>&6
939 # This must be in double quotes, not single quotes, because CPP may get
940 # substituted into the Makefile and "${CC-cc}" will confuse make.
942 # On the NeXT, cc -E runs the code through the compiler's parser,
943 # not just through cpp.
944 cat > conftest.$ac_ext <<EOF
945 #line 957 "configure"
946 #include "confdefs.h"
950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
951 { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
952 ac_err=`grep -v '^ *+' conftest.out`
953 if test -z "$ac_err"; then
957 echo "configure: failed program was:" >&5
958 cat conftest.$ac_ext >&5
960 CPP="${CC-cc} -E -traditional-cpp"
961 cat > conftest.$ac_ext <<EOF
962 #line 974 "configure"
963 #include "confdefs.h"
967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
968 { (eval echo configure:980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
969 ac_err=`grep -v '^ *+' conftest.out`
970 if test -z "$ac_err"; then
974 echo "configure: failed program was:" >&5
975 cat conftest.$ac_ext >&5
982 ac_cv_prog_CPP="$CPP"
984 CPP="$ac_cv_prog_CPP"
986 ac_cv_prog_CPP="$CPP"
988 echo "$ac_t""$CPP" 1>&6
990 # Find a good install program. We prefer a C program (faster),
991 # so one script is as good as another. But avoid the broken or
992 # incompatible versions:
993 # SysV /etc/install, /usr/sbin/install
994 # SunOS /usr/etc/install
997 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
998 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
999 # ./install, which can be erroneously created by make from ./install.sh.
1000 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1001 echo "configure:1013: checking for a BSD compatible install" >&5
1002 if test -z "$INSTALL"; then
1003 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1004 echo $ac_n "(cached) $ac_c" 1>&6
1006 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1007 for ac_dir in $PATH; do
1008 # Account for people who put trailing slashes in PATH elements.
1010 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1012 # OSF1 and SCO ODT 3.0 have their own names for install.
1013 for ac_prog in ginstall installbsd scoinst install; do
1014 if test -f $ac_dir/$ac_prog; then
1015 if test $ac_prog = install &&
1016 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1017 # AIX install. It has an incompatible calling convention.
1018 # OSF/1 installbsd also uses dspmsg, but is usable.
1021 ac_cv_path_install="$ac_dir/$ac_prog -c"
1032 if test "${ac_cv_path_install+set}" = set; then
1033 INSTALL="$ac_cv_path_install"
1035 # As a last resort, use the slow shell script. We don't cache a
1036 # path for INSTALL within a source directory, because that will
1037 # break other packages using the cache if that directory is
1038 # removed, or if the path is relative.
1039 INSTALL="$ac_install_sh"
1042 echo "$ac_t""$INSTALL" 1>&6
1044 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1045 # It thinks the first close brace ends the variable substitution.
1046 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1048 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1050 INSTALL_DIRS='${INSTALL} -d'
1051 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1052 echo "configure:1064: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1054 if mkdir conftestdir; then
1057 ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1058 if test -d dir1/dir2 ; then
1059 echo "$ac_t""yes" 1>&6
1061 echo "$ac_t""no" 1>&6
1062 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1063 echo "configure:1075: checking whether \"mkdir -p\" creates intermediate directories" >&5
1065 mkdir -p dir1/dir2 >&- 2>&-
1066 if test -d dir1/dir2/. ; then
1067 echo "$ac_t""yes" 1>&6
1068 INSTALL_DIRS='mkdir -p'
1070 echo "$ac_t""no" 1>&6
1077 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1078 echo "configure:1090: checking whether ${MAKE-make} sets \${MAKE}" >&5
1079 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1080 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1081 echo $ac_n "(cached) $ac_c" 1>&6
1083 cat > conftestmake <<\EOF
1085 @echo 'ac_maketemp="${MAKE}"'
1087 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1088 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1089 if test -n "$ac_maketemp"; then
1090 eval ac_cv_prog_make_${ac_make}_set=yes
1092 eval ac_cv_prog_make_${ac_make}_set=no
1096 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1097 echo "$ac_t""yes" 1>&6
1100 echo "$ac_t""no" 1>&6
1101 SET_MAKE="MAKE=${MAKE-make}"
1105 echo $ac_n "checking for working const""... $ac_c" 1>&6
1106 echo "configure:1118: checking for working const" >&5
1107 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1108 echo $ac_n "(cached) $ac_c" 1>&6
1110 cat > conftest.$ac_ext <<EOF
1111 #line 1123 "configure"
1112 #include "confdefs.h"
1116 /* Ultrix mips cc rejects this. */
1117 typedef int charset[2]; const charset x;
1118 /* SunOS 4.1.1 cc rejects this. */
1119 char const *const *ccp;
1121 /* NEC SVR4.0.2 mips cc rejects this. */
1122 struct point {int x, y;};
1123 static struct point const zero = {0,0};
1124 /* AIX XL C 1.02.0.0 rejects this.
1125 It does not let you subtract one const X* pointer from another in an arm
1126 of an if-expression whose if-part is not a constant expression */
1127 const char *g = "string";
1128 ccp = &g + (g ? g-g : 0);
1129 /* HPUX 7.0 cc rejects these. */
1132 ccp = (char const *const *) p;
1133 { /* SCO 3.2v4 cc rejects this. */
1135 char const *s = 0 ? (char *) 0 : (char const *) 0;
1139 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1141 const int *foo = &x[0];
1144 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1145 typedef const int *iptr;
1149 { /* AIX XL C 1.02.0.0 rejects this saying
1150 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1151 struct s { int j; const int *ap[3]; };
1152 struct s *b; b->j = 5;
1154 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1160 if { (eval echo configure:1172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1164 echo "configure: failed program was:" >&5
1165 cat conftest.$ac_ext >&5
1172 echo "$ac_t""$ac_cv_c_const" 1>&6
1173 if test $ac_cv_c_const = no; then
1174 cat >> confdefs.h <<\EOF
1180 echo $ac_n "checking for inline""... $ac_c" 1>&6
1181 echo "configure:1193: checking for inline" >&5
1182 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1183 echo $ac_n "(cached) $ac_c" 1>&6
1186 for ac_kw in inline __inline__ __inline; do
1187 cat > conftest.$ac_ext <<EOF
1188 #line 1200 "configure"
1189 #include "confdefs.h"
1195 if { (eval echo configure:1207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1197 ac_cv_c_inline=$ac_kw; break
1199 echo "configure: failed program was:" >&5
1200 cat conftest.$ac_ext >&5
1207 echo "$ac_t""$ac_cv_c_inline" 1>&6
1208 case "$ac_cv_c_inline" in
1210 no) cat >> confdefs.h <<\EOF
1214 *) cat >> confdefs.h <<EOF
1215 #define inline $ac_cv_c_inline
1221 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1222 echo "configure:1234: checking for ANSI C header files" >&5
1223 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1224 echo $ac_n "(cached) $ac_c" 1>&6
1226 cat > conftest.$ac_ext <<EOF
1227 #line 1239 "configure"
1228 #include "confdefs.h"
1234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1235 { (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1236 ac_err=`grep -v '^ *+' conftest.out`
1237 if test -z "$ac_err"; then
1239 ac_cv_header_stdc=yes
1242 echo "configure: failed program was:" >&5
1243 cat conftest.$ac_ext >&5
1245 ac_cv_header_stdc=no
1249 if test $ac_cv_header_stdc = yes; then
1250 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1251 cat > conftest.$ac_ext <<EOF
1252 #line 1264 "configure"
1253 #include "confdefs.h"
1256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1257 egrep "memchr" >/dev/null 2>&1; then
1261 ac_cv_header_stdc=no
1267 if test $ac_cv_header_stdc = yes; then
1268 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1269 cat > conftest.$ac_ext <<EOF
1270 #line 1282 "configure"
1271 #include "confdefs.h"
1274 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1275 egrep "free" >/dev/null 2>&1; then
1279 ac_cv_header_stdc=no
1285 if test $ac_cv_header_stdc = yes; then
1286 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1287 if test "$cross_compiling" = yes; then
1290 cat > conftest.$ac_ext <<EOF
1291 #line 1303 "configure"
1292 #include "confdefs.h"
1294 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1295 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1296 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1297 int main () { int i; for (i = 0; i < 256; i++)
1298 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1302 if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1306 echo "configure: failed program was:" >&5
1307 cat conftest.$ac_ext >&5
1309 ac_cv_header_stdc=no
1317 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1318 if test $ac_cv_header_stdc = yes; then
1319 cat >> confdefs.h <<\EOF
1320 #define STDC_HEADERS 1
1325 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1326 echo "configure:1338: checking whether time.h and sys/time.h may both be included" >&5
1327 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1328 echo $ac_n "(cached) $ac_c" 1>&6
1330 cat > conftest.$ac_ext <<EOF
1331 #line 1343 "configure"
1332 #include "confdefs.h"
1333 #include <sys/types.h>
1334 #include <sys/time.h>
1340 if { (eval echo configure:1352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1342 ac_cv_header_time=yes
1344 echo "configure: failed program was:" >&5
1345 cat conftest.$ac_ext >&5
1347 ac_cv_header_time=no
1352 echo "$ac_t""$ac_cv_header_time" 1>&6
1353 if test $ac_cv_header_time = yes; then
1354 cat >> confdefs.h <<\EOF
1355 #define TIME_WITH_SYS_TIME 1
1360 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1361 echo "configure:1373: checking for sys/wait.h that is POSIX.1 compatible" >&5
1362 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1363 echo $ac_n "(cached) $ac_c" 1>&6
1365 cat > conftest.$ac_ext <<EOF
1366 #line 1378 "configure"
1367 #include "confdefs.h"
1368 #include <sys/types.h>
1369 #include <sys/wait.h>
1371 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1374 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1379 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1382 if { (eval echo configure:1394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1384 ac_cv_header_sys_wait_h=yes
1386 echo "configure: failed program was:" >&5
1387 cat conftest.$ac_ext >&5
1389 ac_cv_header_sys_wait_h=no
1394 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1395 if test $ac_cv_header_sys_wait_h = yes; then
1396 cat >> confdefs.h <<\EOF
1397 #define HAVE_SYS_WAIT_H 1
1403 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1405 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1406 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1407 echo "configure:1419: checking for $ac_hdr that defines DIR" >&5
1408 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1409 echo $ac_n "(cached) $ac_c" 1>&6
1411 cat > conftest.$ac_ext <<EOF
1412 #line 1424 "configure"
1413 #include "confdefs.h"
1414 #include <sys/types.h>
1420 if { (eval echo configure:1432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1422 eval "ac_cv_header_dirent_$ac_safe=yes"
1424 echo "configure: failed program was:" >&5
1425 cat conftest.$ac_ext >&5
1427 eval "ac_cv_header_dirent_$ac_safe=no"
1431 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1432 echo "$ac_t""yes" 1>&6
1433 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1434 cat >> confdefs.h <<EOF
1435 #define $ac_tr_hdr 1
1437 ac_header_dirent=$ac_hdr; break
1439 echo "$ac_t""no" 1>&6
1442 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1443 if test $ac_header_dirent = dirent.h; then
1444 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1445 echo "configure:1457: checking for opendir in -ldir" >&5
1446 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1448 echo $ac_n "(cached) $ac_c" 1>&6
1450 ac_save_LIBS="$LIBS"
1452 cat > conftest.$ac_ext <<EOF
1453 #line 1465 "configure"
1454 #include "confdefs.h"
1455 /* Override any gcc2 internal prototype to avoid an error. */
1456 /* We use char because int might match the return type of a gcc2
1457 builtin and then its argument prototype would still apply. */
1464 if { (eval echo configure:1476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1466 eval "ac_cv_lib_$ac_lib_var=yes"
1468 echo "configure: failed program was:" >&5
1469 cat conftest.$ac_ext >&5
1471 eval "ac_cv_lib_$ac_lib_var=no"
1474 LIBS="$ac_save_LIBS"
1477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1478 echo "$ac_t""yes" 1>&6
1481 echo "$ac_t""no" 1>&6
1485 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1486 echo "configure:1498: checking for opendir in -lx" >&5
1487 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1488 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1489 echo $ac_n "(cached) $ac_c" 1>&6
1491 ac_save_LIBS="$LIBS"
1493 cat > conftest.$ac_ext <<EOF
1494 #line 1506 "configure"
1495 #include "confdefs.h"
1496 /* Override any gcc2 internal prototype to avoid an error. */
1497 /* We use char because int might match the return type of a gcc2
1498 builtin and then its argument prototype would still apply. */
1505 if { (eval echo configure:1517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1507 eval "ac_cv_lib_$ac_lib_var=yes"
1509 echo "configure: failed program was:" >&5
1510 cat conftest.$ac_ext >&5
1512 eval "ac_cv_lib_$ac_lib_var=no"
1515 LIBS="$ac_save_LIBS"
1518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1519 echo "$ac_t""yes" 1>&6
1522 echo "$ac_t""no" 1>&6
1528 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1529 echo "configure:1541: checking for mode_t" >&5
1530 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1531 echo $ac_n "(cached) $ac_c" 1>&6
1533 cat > conftest.$ac_ext <<EOF
1534 #line 1546 "configure"
1535 #include "confdefs.h"
1536 #include <sys/types.h>
1542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1543 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1545 ac_cv_type_mode_t=yes
1548 ac_cv_type_mode_t=no
1553 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1554 if test $ac_cv_type_mode_t = no; then
1555 cat >> confdefs.h <<\EOF
1561 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1562 echo "configure:1574: checking for pid_t" >&5
1563 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1564 echo $ac_n "(cached) $ac_c" 1>&6
1566 cat > conftest.$ac_ext <<EOF
1567 #line 1579 "configure"
1568 #include "confdefs.h"
1569 #include <sys/types.h>
1575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1576 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1578 ac_cv_type_pid_t=yes
1586 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1587 if test $ac_cv_type_pid_t = no; then
1588 cat >> confdefs.h <<\EOF
1594 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1595 echo "configure:1607: checking for size_t" >&5
1596 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1597 echo $ac_n "(cached) $ac_c" 1>&6
1599 cat > conftest.$ac_ext <<EOF
1600 #line 1612 "configure"
1601 #include "confdefs.h"
1602 #include <sys/types.h>
1608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1609 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1611 ac_cv_type_size_t=yes
1614 ac_cv_type_size_t=no
1619 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1620 if test $ac_cv_type_size_t = no; then
1621 cat >> confdefs.h <<\EOF
1622 #define size_t unsigned
1627 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1628 echo "configure:1640: checking return type of signal handlers" >&5
1629 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1630 echo $ac_n "(cached) $ac_c" 1>&6
1632 cat > conftest.$ac_ext <<EOF
1633 #line 1645 "configure"
1634 #include "confdefs.h"
1635 #include <sys/types.h>
1641 extern "C" void (*signal (int, void (*)(int)))(int);
1643 void (*signal ()) ();
1650 if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1652 ac_cv_type_signal=void
1654 echo "configure: failed program was:" >&5
1655 cat conftest.$ac_ext >&5
1657 ac_cv_type_signal=int
1662 echo "$ac_t""$ac_cv_type_signal" 1>&6
1663 cat >> confdefs.h <<EOF
1664 #define RETSIGTYPE $ac_cv_type_signal
1669 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1670 echo "configure:1682: checking how to call gettimeofday" >&5
1671 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1672 echo $ac_n "(cached) $ac_c" 1>&6
1674 cat > conftest.$ac_ext <<EOF
1675 #line 1687 "configure"
1676 #include "confdefs.h"
1678 #include <sys/time.h>
1680 struct timeval tv; struct timezone tzp;
1681 gettimeofday(&tv, &tzp);
1684 if { (eval echo configure:1696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1686 ac_gettimeofday_args=2
1688 echo "configure: failed program was:" >&5
1689 cat conftest.$ac_ext >&5
1691 cat > conftest.$ac_ext <<EOF
1692 #line 1704 "configure"
1693 #include "confdefs.h"
1695 #include <sys/time.h>
1697 struct timeval tv; gettimeofday(&tv);
1700 if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1702 ac_gettimeofday_args=1
1704 echo "configure: failed program was:" >&5
1705 cat conftest.$ac_ext >&5
1707 ac_gettimeofday_args=0
1712 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1715 ac_gettimeofday_args=$ac_cv_gettimeofday_args
1716 if test "$ac_gettimeofday_args" = 1 ; then
1717 cat >> confdefs.h <<\EOF
1718 #define HAVE_GETTIMEOFDAY 1
1721 echo "$ac_t""one argument" 1>&6
1722 elif test "$ac_gettimeofday_args" = 2 ; then
1723 cat >> confdefs.h <<\EOF
1724 #define HAVE_GETTIMEOFDAY 1
1727 cat >> confdefs.h <<\EOF
1728 #define GETTIMEOFDAY_TWO_ARGS 1
1731 echo "$ac_t""two arguments" 1>&6
1733 echo "$ac_t""unknown" 1>&6
1737 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
1739 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1740 echo "configure:1752: checking for $ac_func" >&5
1741 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1742 echo $ac_n "(cached) $ac_c" 1>&6
1744 cat > conftest.$ac_ext <<EOF
1745 #line 1757 "configure"
1746 #include "confdefs.h"
1747 /* System header to define __stub macros and hopefully few prototypes,
1748 which can conflict with char $ac_func(); below. */
1750 /* Override any gcc2 internal prototype to avoid an error. */
1751 /* We use char because int might match the return type of a gcc2
1752 builtin and then its argument prototype would still apply. */
1757 /* The GNU C library defines this for functions which it implements
1758 to always fail with ENOSYS. Some functions are actually named
1759 something starting with __ and the normal name is an alias. */
1760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1768 if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1770 eval "ac_cv_func_$ac_func=yes"
1772 echo "configure: failed program was:" >&5
1773 cat conftest.$ac_ext >&5
1775 eval "ac_cv_func_$ac_func=no"
1780 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1781 echo "$ac_t""yes" 1>&6
1782 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1783 cat >> confdefs.h <<EOF
1784 #define $ac_tr_func 1
1788 echo "$ac_t""no" 1>&6
1792 for ac_func in sigaction syslog
1794 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1795 echo "configure:1807: checking for $ac_func" >&5
1796 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1797 echo $ac_n "(cached) $ac_c" 1>&6
1799 cat > conftest.$ac_ext <<EOF
1800 #line 1812 "configure"
1801 #include "confdefs.h"
1802 /* System header to define __stub macros and hopefully few prototypes,
1803 which can conflict with char $ac_func(); below. */
1805 /* Override any gcc2 internal prototype to avoid an error. */
1806 /* We use char because int might match the return type of a gcc2
1807 builtin and then its argument prototype would still apply. */
1812 /* The GNU C library defines this for functions which it implements
1813 to always fail with ENOSYS. Some functions are actually named
1814 something starting with __ and the normal name is an alias. */
1815 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1823 if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1825 eval "ac_cv_func_$ac_func=yes"
1827 echo "configure: failed program was:" >&5
1828 cat conftest.$ac_ext >&5
1830 eval "ac_cv_func_$ac_func=no"
1835 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1836 echo "$ac_t""yes" 1>&6
1837 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1838 cat >> confdefs.h <<EOF
1839 #define $ac_tr_func 1
1843 echo "$ac_t""no" 1>&6
1848 for ac_hdr in unistd.h crypt.h sys/select.h
1850 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1851 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1852 echo "configure:1864: checking for $ac_hdr" >&5
1853 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1854 echo $ac_n "(cached) $ac_c" 1>&6
1856 cat > conftest.$ac_ext <<EOF
1857 #line 1869 "configure"
1858 #include "confdefs.h"
1861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1862 { (eval echo configure:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1863 ac_err=`grep -v '^ *+' conftest.out`
1864 if test -z "$ac_err"; then
1866 eval "ac_cv_header_$ac_safe=yes"
1869 echo "configure: failed program was:" >&5
1870 cat conftest.$ac_ext >&5
1872 eval "ac_cv_header_$ac_safe=no"
1876 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1877 echo "$ac_t""yes" 1>&6
1878 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1879 cat >> confdefs.h <<EOF
1880 #define $ac_tr_hdr 1
1884 echo "$ac_t""no" 1>&6
1891 # Check whether --enable-subdir or --disable-subdir was given.
1892 if test "${enable_subdir+set}" = set; then
1893 enableval="$enable_subdir"
1894 enable_subdir="$enableval"
1899 if test x"$enable_subdir" = xno; then
1901 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
1902 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
1905 # there must be a better way than this...
1906 if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
1908 HACKDIR=$enable_subdir
1911 HACKDIR='${bindir}/'$enable_subdir
1916 # If we find X, set shell vars x_includes and x_libraries to the
1917 # paths, otherwise set no_x=yes.
1918 # Uses ac_ vars as temps to allow command line to override cache and checks.
1919 # --without-x overrides everything else, but does not touch the cache.
1920 echo $ac_n "checking for X""... $ac_c" 1>&6
1921 echo "configure:1933: checking for X" >&5
1923 # Check whether --with-x or --without-x was given.
1924 if test "${with_x+set}" = set; then
1929 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1930 if test "x$with_x" = xno; then
1931 # The user explicitly disabled X.
1934 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1935 # Both variables are already set.
1938 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1939 echo $ac_n "(cached) $ac_c" 1>&6
1941 # One or both of the vars are not set, and there is no cached value.
1942 ac_x_includes=NO ac_x_libraries=NO
1944 if mkdir conftestdir; then
1946 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1947 cat > Imakefile <<'EOF'
1949 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1951 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1952 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1953 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1954 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1955 for ac_extension in a so sl; do
1956 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1957 test -f $ac_im_libdir/libX11.$ac_extension; then
1958 ac_im_usrlibdir=$ac_im_libdir; break
1961 # Screen out bogus values from the imake configuration. They are
1962 # bogus both because they are the default anyway, and because
1963 # using them would break gcc on systems where it needs fixed includes.
1964 case "$ac_im_incroot" in
1966 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1968 case "$ac_im_usrlibdir" in
1970 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1977 if test "$ac_x_includes" = NO; then
1978 # Guess where to find include files, by looking for this one X11 .h file.
1979 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1981 # First, try using that file with no special directory specified.
1982 cat > conftest.$ac_ext <<EOF
1983 #line 1995 "configure"
1984 #include "confdefs.h"
1985 #include <$x_direct_test_include>
1987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1988 { (eval echo configure:2000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1989 ac_err=`grep -v '^ *+' conftest.out`
1990 if test -z "$ac_err"; then
1992 # We can compile using X headers with no special include directory.
1996 echo "configure: failed program was:" >&5
1997 cat conftest.$ac_ext >&5
1999 # Look for the header file in a standard set of common directories.
2000 # Check X11 before X11Rn because it is often a symlink to the current release.
2003 /usr/X11R6/include \
2004 /usr/X11R5/include \
2005 /usr/X11R4/include \
2008 /usr/include/X11R6 \
2009 /usr/include/X11R5 \
2010 /usr/include/X11R4 \
2012 /usr/local/X11/include \
2013 /usr/local/X11R6/include \
2014 /usr/local/X11R5/include \
2015 /usr/local/X11R4/include \
2017 /usr/local/include/X11 \
2018 /usr/local/include/X11R6 \
2019 /usr/local/include/X11R5 \
2020 /usr/local/include/X11R4 \
2024 /usr/XFree86/include/X11 \
2027 /usr/local/include \
2028 /usr/unsupported/include \
2029 /usr/athena/include \
2030 /usr/local/x11r5/include \
2031 /usr/lpp/Xamples/include \
2033 /usr/openwin/include \
2034 /usr/openwin/share/include \
2037 if test -r "$ac_dir/$x_direct_test_include"; then
2038 ac_x_includes=$ac_dir
2044 fi # $ac_x_includes = NO
2046 if test "$ac_x_libraries" = NO; then
2047 # Check for the libraries.
2049 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2050 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2052 # See if we find them without any special options.
2053 # Don't add to $LIBS permanently.
2054 ac_save_LIBS="$LIBS"
2055 LIBS="-l$x_direct_test_library $LIBS"
2056 cat > conftest.$ac_ext <<EOF
2057 #line 2069 "configure"
2058 #include "confdefs.h"
2061 ${x_direct_test_function}()
2064 if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2066 LIBS="$ac_save_LIBS"
2067 # We can link X programs with no special library path.
2070 echo "configure: failed program was:" >&5
2071 cat conftest.$ac_ext >&5
2073 LIBS="$ac_save_LIBS"
2074 # First see if replacing the include by lib works.
2075 # Check X11 before X11Rn because it is often a symlink to the current release.
2076 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2087 /usr/local/X11/lib \
2088 /usr/local/X11R6/lib \
2089 /usr/local/X11R5/lib \
2090 /usr/local/X11R4/lib \
2092 /usr/local/lib/X11 \
2093 /usr/local/lib/X11R6 \
2094 /usr/local/lib/X11R5 \
2095 /usr/local/lib/X11R4 \
2099 /usr/XFree86/lib/X11 \
2103 /usr/unsupported/lib \
2105 /usr/local/x11r5/lib \
2106 /usr/lpp/Xamples/lib \
2110 /usr/openwin/share/lib \
2113 for ac_extension in a so sl; do
2114 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2115 ac_x_libraries=$ac_dir
2122 fi # $ac_x_libraries = NO
2124 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2125 # Didn't find X anywhere. Cache the known absence of X.
2126 ac_cv_have_x="have_x=no"
2128 # Record where we found X for the cache.
2129 ac_cv_have_x="have_x=yes \
2130 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2134 eval "$ac_cv_have_x"
2137 if test "$have_x" != yes; then
2138 echo "$ac_t""$have_x" 1>&6
2141 # If each of the values was on the command line, it overrides each guess.
2142 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2143 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2144 # Update the cache value to reflect the command line values.
2145 ac_cv_have_x="have_x=yes \
2146 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2147 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2150 if test "$no_x" = yes; then
2151 # Not all programs may use this symbol, but it does not hurt to define it.
2152 cat >> confdefs.h <<\EOF
2153 #define X_DISPLAY_MISSING 1
2156 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2158 if test -n "$x_includes"; then
2159 X_CFLAGS="$X_CFLAGS -I$x_includes"
2162 # It would also be nice to do this for all -L options, not just this one.
2163 if test -n "$x_libraries"; then
2164 X_LIBS="$X_LIBS -L$x_libraries"
2165 # For Solaris; some versions of Sun CC require a space after -R and
2166 # others require no space. Words are not sufficient . . . .
2167 case "`(uname -sr) 2>/dev/null`" in
2169 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2170 echo "configure:2182: checking whether -R must be followed by a space" >&5
2171 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2172 cat > conftest.$ac_ext <<EOF
2173 #line 2185 "configure"
2174 #include "confdefs.h"
2180 if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2184 echo "configure: failed program was:" >&5
2185 cat conftest.$ac_ext >&5
2190 if test $ac_R_nospace = yes; then
2191 echo "$ac_t""no" 1>&6
2192 X_LIBS="$X_LIBS -R$x_libraries"
2194 LIBS="$ac_xsave_LIBS -R $x_libraries"
2195 cat > conftest.$ac_ext <<EOF
2196 #line 2208 "configure"
2197 #include "confdefs.h"
2203 if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2207 echo "configure: failed program was:" >&5
2208 cat conftest.$ac_ext >&5
2213 if test $ac_R_space = yes; then
2214 echo "$ac_t""yes" 1>&6
2215 X_LIBS="$X_LIBS -R $x_libraries"
2217 echo "$ac_t""neither works" 1>&6
2220 LIBS="$ac_xsave_LIBS"
2224 # Check for system-dependent libraries X programs must link with.
2225 # Do this before checking for the system-independent R6 libraries
2226 # (-lICE), since we may need -lsocket or whatever for X linking.
2228 if test "$ISC" = yes; then
2229 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2231 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2232 # libraries were built with DECnet support. And karl@cs.umb.edu says
2233 # the Alpha needs dnet_stub (dnet does not exist).
2234 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2235 echo "configure:2247: checking for dnet_ntoa in -ldnet" >&5
2236 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2237 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2238 echo $ac_n "(cached) $ac_c" 1>&6
2240 ac_save_LIBS="$LIBS"
2242 cat > conftest.$ac_ext <<EOF
2243 #line 2255 "configure"
2244 #include "confdefs.h"
2245 /* Override any gcc2 internal prototype to avoid an error. */
2246 /* We use char because int might match the return type of a gcc2
2247 builtin and then its argument prototype would still apply. */
2254 if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2256 eval "ac_cv_lib_$ac_lib_var=yes"
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2261 eval "ac_cv_lib_$ac_lib_var=no"
2264 LIBS="$ac_save_LIBS"
2267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2268 echo "$ac_t""yes" 1>&6
2269 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2271 echo "$ac_t""no" 1>&6
2274 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2275 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2276 echo "configure:2288: checking for dnet_ntoa in -ldnet_stub" >&5
2277 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2278 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2279 echo $ac_n "(cached) $ac_c" 1>&6
2281 ac_save_LIBS="$LIBS"
2282 LIBS="-ldnet_stub $LIBS"
2283 cat > conftest.$ac_ext <<EOF
2284 #line 2296 "configure"
2285 #include "confdefs.h"
2286 /* Override any gcc2 internal prototype to avoid an error. */
2287 /* We use char because int might match the return type of a gcc2
2288 builtin and then its argument prototype would still apply. */
2295 if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2297 eval "ac_cv_lib_$ac_lib_var=yes"
2299 echo "configure: failed program was:" >&5
2300 cat conftest.$ac_ext >&5
2302 eval "ac_cv_lib_$ac_lib_var=no"
2305 LIBS="$ac_save_LIBS"
2308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2309 echo "$ac_t""yes" 1>&6
2310 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2312 echo "$ac_t""no" 1>&6
2317 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2318 # to get the SysV transport functions.
2319 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2321 # The nsl library prevents programs from opening the X display
2322 # on Irix 5.2, according to dickey@clark.net.
2323 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2324 echo "configure:2336: checking for gethostbyname" >&5
2325 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2326 echo $ac_n "(cached) $ac_c" 1>&6
2328 cat > conftest.$ac_ext <<EOF
2329 #line 2341 "configure"
2330 #include "confdefs.h"
2331 /* System header to define __stub macros and hopefully few prototypes,
2332 which can conflict with char gethostbyname(); below. */
2334 /* Override any gcc2 internal prototype to avoid an error. */
2335 /* We use char because int might match the return type of a gcc2
2336 builtin and then its argument prototype would still apply. */
2337 char gethostbyname();
2341 /* The GNU C library defines this for functions which it implements
2342 to always fail with ENOSYS. Some functions are actually named
2343 something starting with __ and the normal name is an alias. */
2344 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2352 if { (eval echo configure:2364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2354 eval "ac_cv_func_gethostbyname=yes"
2356 echo "configure: failed program was:" >&5
2357 cat conftest.$ac_ext >&5
2359 eval "ac_cv_func_gethostbyname=no"
2364 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2365 echo "$ac_t""yes" 1>&6
2368 echo "$ac_t""no" 1>&6
2371 if test $ac_cv_func_gethostbyname = no; then
2372 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2373 echo "configure:2385: checking for gethostbyname in -lnsl" >&5
2374 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2375 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2376 echo $ac_n "(cached) $ac_c" 1>&6
2378 ac_save_LIBS="$LIBS"
2380 cat > conftest.$ac_ext <<EOF
2381 #line 2393 "configure"
2382 #include "confdefs.h"
2383 /* Override any gcc2 internal prototype to avoid an error. */
2384 /* We use char because int might match the return type of a gcc2
2385 builtin and then its argument prototype would still apply. */
2386 char gethostbyname();
2392 if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2394 eval "ac_cv_lib_$ac_lib_var=yes"
2396 echo "configure: failed program was:" >&5
2397 cat conftest.$ac_ext >&5
2399 eval "ac_cv_lib_$ac_lib_var=no"
2402 LIBS="$ac_save_LIBS"
2405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2406 echo "$ac_t""yes" 1>&6
2407 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2409 echo "$ac_t""no" 1>&6
2414 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2415 # socket/setsockopt and other routines are undefined under SCO ODT
2416 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2417 # on later versions), says simon@lia.di.epfl.ch: it contains
2418 # gethostby* variants that don't use the nameserver (or something).
2419 # -lsocket must be given before -lnsl if both are needed.
2420 # We assume that if connect needs -lnsl, so does gethostbyname.
2421 echo $ac_n "checking for connect""... $ac_c" 1>&6
2422 echo "configure:2434: checking for connect" >&5
2423 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2424 echo $ac_n "(cached) $ac_c" 1>&6
2426 cat > conftest.$ac_ext <<EOF
2427 #line 2439 "configure"
2428 #include "confdefs.h"
2429 /* System header to define __stub macros and hopefully few prototypes,
2430 which can conflict with char connect(); below. */
2432 /* Override any gcc2 internal prototype to avoid an error. */
2433 /* We use char because int might match the return type of a gcc2
2434 builtin and then its argument prototype would still apply. */
2439 /* The GNU C library defines this for functions which it implements
2440 to always fail with ENOSYS. Some functions are actually named
2441 something starting with __ and the normal name is an alias. */
2442 #if defined (__stub_connect) || defined (__stub___connect)
2450 if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2452 eval "ac_cv_func_connect=yes"
2454 echo "configure: failed program was:" >&5
2455 cat conftest.$ac_ext >&5
2457 eval "ac_cv_func_connect=no"
2462 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2463 echo "$ac_t""yes" 1>&6
2466 echo "$ac_t""no" 1>&6
2469 if test $ac_cv_func_connect = no; then
2470 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2471 echo "configure:2483: checking for connect in -lsocket" >&5
2472 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2474 echo $ac_n "(cached) $ac_c" 1>&6
2476 ac_save_LIBS="$LIBS"
2477 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2478 cat > conftest.$ac_ext <<EOF
2479 #line 2491 "configure"
2480 #include "confdefs.h"
2481 /* Override any gcc2 internal prototype to avoid an error. */
2482 /* We use char because int might match the return type of a gcc2
2483 builtin and then its argument prototype would still apply. */
2490 if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2492 eval "ac_cv_lib_$ac_lib_var=yes"
2494 echo "configure: failed program was:" >&5
2495 cat conftest.$ac_ext >&5
2497 eval "ac_cv_lib_$ac_lib_var=no"
2500 LIBS="$ac_save_LIBS"
2503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2504 echo "$ac_t""yes" 1>&6
2505 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2507 echo "$ac_t""no" 1>&6
2512 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2513 echo $ac_n "checking for remove""... $ac_c" 1>&6
2514 echo "configure:2526: checking for remove" >&5
2515 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2516 echo $ac_n "(cached) $ac_c" 1>&6
2518 cat > conftest.$ac_ext <<EOF
2519 #line 2531 "configure"
2520 #include "confdefs.h"
2521 /* System header to define __stub macros and hopefully few prototypes,
2522 which can conflict with char remove(); below. */
2524 /* Override any gcc2 internal prototype to avoid an error. */
2525 /* We use char because int might match the return type of a gcc2
2526 builtin and then its argument prototype would still apply. */
2531 /* The GNU C library defines this for functions which it implements
2532 to always fail with ENOSYS. Some functions are actually named
2533 something starting with __ and the normal name is an alias. */
2534 #if defined (__stub_remove) || defined (__stub___remove)
2542 if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2544 eval "ac_cv_func_remove=yes"
2546 echo "configure: failed program was:" >&5
2547 cat conftest.$ac_ext >&5
2549 eval "ac_cv_func_remove=no"
2554 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2555 echo "$ac_t""yes" 1>&6
2558 echo "$ac_t""no" 1>&6
2561 if test $ac_cv_func_remove = no; then
2562 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2563 echo "configure:2575: checking for remove in -lposix" >&5
2564 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2565 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2566 echo $ac_n "(cached) $ac_c" 1>&6
2568 ac_save_LIBS="$LIBS"
2569 LIBS="-lposix $LIBS"
2570 cat > conftest.$ac_ext <<EOF
2571 #line 2583 "configure"
2572 #include "confdefs.h"
2573 /* Override any gcc2 internal prototype to avoid an error. */
2574 /* We use char because int might match the return type of a gcc2
2575 builtin and then its argument prototype would still apply. */
2582 if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2584 eval "ac_cv_lib_$ac_lib_var=yes"
2586 echo "configure: failed program was:" >&5
2587 cat conftest.$ac_ext >&5
2589 eval "ac_cv_lib_$ac_lib_var=no"
2592 LIBS="$ac_save_LIBS"
2595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2596 echo "$ac_t""yes" 1>&6
2597 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2599 echo "$ac_t""no" 1>&6
2604 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2605 echo $ac_n "checking for shmat""... $ac_c" 1>&6
2606 echo "configure:2618: checking for shmat" >&5
2607 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2608 echo $ac_n "(cached) $ac_c" 1>&6
2610 cat > conftest.$ac_ext <<EOF
2611 #line 2623 "configure"
2612 #include "confdefs.h"
2613 /* System header to define __stub macros and hopefully few prototypes,
2614 which can conflict with char shmat(); below. */
2616 /* Override any gcc2 internal prototype to avoid an error. */
2617 /* We use char because int might match the return type of a gcc2
2618 builtin and then its argument prototype would still apply. */
2623 /* The GNU C library defines this for functions which it implements
2624 to always fail with ENOSYS. Some functions are actually named
2625 something starting with __ and the normal name is an alias. */
2626 #if defined (__stub_shmat) || defined (__stub___shmat)
2634 if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2636 eval "ac_cv_func_shmat=yes"
2638 echo "configure: failed program was:" >&5
2639 cat conftest.$ac_ext >&5
2641 eval "ac_cv_func_shmat=no"
2646 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2647 echo "$ac_t""yes" 1>&6
2650 echo "$ac_t""no" 1>&6
2653 if test $ac_cv_func_shmat = no; then
2654 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2655 echo "configure:2667: checking for shmat in -lipc" >&5
2656 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2657 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2658 echo $ac_n "(cached) $ac_c" 1>&6
2660 ac_save_LIBS="$LIBS"
2662 cat > conftest.$ac_ext <<EOF
2663 #line 2675 "configure"
2664 #include "confdefs.h"
2665 /* Override any gcc2 internal prototype to avoid an error. */
2666 /* We use char because int might match the return type of a gcc2
2667 builtin and then its argument prototype would still apply. */
2674 if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2676 eval "ac_cv_lib_$ac_lib_var=yes"
2678 echo "configure: failed program was:" >&5
2679 cat conftest.$ac_ext >&5
2681 eval "ac_cv_lib_$ac_lib_var=no"
2684 LIBS="$ac_save_LIBS"
2687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2688 echo "$ac_t""yes" 1>&6
2689 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2691 echo "$ac_t""no" 1>&6
2697 # Check for libraries that X11R6 Xt/Xaw programs need.
2698 ac_save_LDFLAGS="$LDFLAGS"
2699 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2700 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2701 # check for ICE first), but we must link in the order -lSM -lICE or
2702 # we get undefined symbols. So assume we have SM if we have ICE.
2703 # These have to be linked with before -lX11, unlike the other
2704 # libraries we check for below, so use a different variable.
2705 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2706 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2707 echo "configure:2719: checking for IceConnectionNumber in -lICE" >&5
2708 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2709 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2710 echo $ac_n "(cached) $ac_c" 1>&6
2712 ac_save_LIBS="$LIBS"
2714 cat > conftest.$ac_ext <<EOF
2715 #line 2727 "configure"
2716 #include "confdefs.h"
2717 /* Override any gcc2 internal prototype to avoid an error. */
2718 /* We use char because int might match the return type of a gcc2
2719 builtin and then its argument prototype would still apply. */
2720 char IceConnectionNumber();
2723 IceConnectionNumber()
2726 if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2728 eval "ac_cv_lib_$ac_lib_var=yes"
2730 echo "configure: failed program was:" >&5
2731 cat conftest.$ac_ext >&5
2733 eval "ac_cv_lib_$ac_lib_var=no"
2736 LIBS="$ac_save_LIBS"
2739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2740 echo "$ac_t""yes" 1>&6
2741 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2743 echo "$ac_t""no" 1>&6
2746 LDFLAGS="$ac_save_LDFLAGS"
2751 # Try and find the app-defaults directory.
2752 # It sucks that autoconf doesn't do this already...
2762 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
2763 echo "configure:2775: checking for X app-defaults directory" >&5
2764 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
2765 echo $ac_n "(cached) $ac_c" 1>&6
2769 if mkdir conftestdir; then
2771 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2772 cat > Imakefile <<'EOF'
2774 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
2776 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2777 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
2778 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2783 if test x"$ac_x_app_defaults" = x; then
2785 # Look for the directory under a standard set of common directories.
2786 # Check X11 before X11Rn because it's often a symlink to the current release.
2788 /usr/X11/lib/app-defaults \
2789 /usr/X11R6/lib/app-defaults \
2790 /usr/X11R6/lib/X11/app-defaults \
2791 /usr/X11R5/lib/app-defaults \
2792 /usr/X11R5/lib/X11/app-defaults \
2793 /usr/X11R4/lib/app-defaults \
2794 /usr/X11R4/lib/X11/app-defaults \
2796 /usr/lib/X11/app-defaults \
2797 /usr/lib/X11R6/app-defaults \
2798 /usr/lib/X11R5/app-defaults \
2799 /usr/lib/X11R4/app-defaults \
2801 /usr/local/X11/lib/app-defaults \
2802 /usr/local/X11R6/lib/app-defaults \
2803 /usr/local/X11R5/lib/app-defaults \
2804 /usr/local/X11R4/lib/app-defaults \
2806 /usr/local/lib/X11/app-defaults \
2807 /usr/local/lib/X11R6/app-defaults \
2808 /usr/local/lib/X11R6/X11/app-defaults \
2809 /usr/local/lib/X11R5/app-defaults \
2810 /usr/local/lib/X11R5/X11/app-defaults \
2811 /usr/local/lib/X11R4/app-defaults \
2812 /usr/local/lib/X11R4/X11/app-defaults \
2814 /usr/X386/lib/X11/app-defaults \
2815 /usr/x386/lib/X11/app-defaults \
2816 /usr/XFree86/lib/X11/app-defaults \
2818 /usr/lib/X11/app-defaults \
2819 /usr/local/lib/X11/app-defaults \
2820 /usr/unsupported/lib/X11/app-defaults \
2821 /usr/athena/lib/X11/app-defaults \
2822 /usr/local/x11r5/lib/X11/app-defaults \
2823 /usr/lpp/Xamples/lib/X11/app-defaults \
2824 /lib/usr/lib/X11/app-defaults \
2826 /usr/openwin/lib/app-defaults \
2827 /usr/openwin/lib/X11/app-defaults \
2828 /usr/openwin/share/lib/app-defaults \
2829 /usr/openwin/share/lib/X11/app-defaults \
2831 /X11R6/lib/app-defaults \
2832 /X11R5/lib/app-defaults \
2833 /X11R4/lib/app-defaults \
2836 if test -d "$ac_dir"; then
2837 ac_x_app_defaults=$ac_dir
2843 if test x"$ac_x_app_defaults" = x; then
2844 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
2846 # Record where we found app-defaults for the cache.
2847 ac_cv_x_app_defaults="$ac_x_app_defaults"
2851 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
2852 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
2854 APPDEFAULTS=$ac_x_app_defaults
2857 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2861 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2865 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2870 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2871 # Use this sparingly; it probably doesn't work very well on X programs.
2875 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2876 # (But not the -L directories!)
2882 # Usage: HANDLE_X_PATH_ARG([variable_name],
2883 # [--command-line-option],
2884 # [descriptive string])
2886 # All of the --with options take three forms:
2888 # --with-foo (or --with-foo=yes)
2889 # --without-foo (or --with-foo=no)
2892 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
2893 # a directory (string beginning with a slash) it checks to see whether
2894 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2901 # check for the HP XHPDisableReset server extension headers.
2904 ac_save_CPPFLAGS="$CPPFLAGS"
2905 if test \! -z "$includedir" ; then
2906 CPPFLAGS="$CPPFLAGS -I$includedir"
2908 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2909 cat > conftest.$ac_ext <<EOF
2910 #line 2922 "configure"
2911 #include "confdefs.h"
2912 #include <X11/XHPlib.h>
2914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2915 egrep "XHPDisableReset" >/dev/null 2>&1; then
2917 cat >> confdefs.h <<\EOF
2918 #define HAVE_XHPDISABLERESET 1
2921 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
2925 CPPFLAGS="$ac_save_CPPFLAGS"
2928 # Check for the availability of the XPointer typedef, and define it otherwise.
2930 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
2931 echo "configure:2943: checking for XPointer" >&5
2932 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
2933 echo $ac_n "(cached) $ac_c" 1>&6
2936 ac_save_CPPFLAGS="$CPPFLAGS"
2937 if test \! -z "$includedir" ; then
2938 CPPFLAGS="$CPPFLAGS -I$includedir"
2940 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2941 cat > conftest.$ac_ext <<EOF
2942 #line 2954 "configure"
2943 #include "confdefs.h"
2944 #include <X11/Xlib.h>
2946 XPointer foo = (XPointer) 0;
2949 if { (eval echo configure:2961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2953 echo "configure: failed program was:" >&5
2954 cat conftest.$ac_ext >&5
2959 CPPFLAGS="$ac_save_CPPFLAGS"
2962 echo "$ac_t""$ac_cv_xpointer" 1>&6
2963 if test "$ac_cv_xpointer" != yes; then
2964 cat >> confdefs.h <<\EOF
2965 #define XPointer char*
2971 # Random special-cases for certain pathological OSes. You know who you are.
2976 # The following arcana was gleaned from conversations with
2977 # Eric Schwartz <erics@col.hp.com>:
2979 # On HPUX 10.x, the parts of X that HP considers "standard" live in
2980 # /usr/{include,lib}/X11R6/. The parts that HP doesn't consider
2981 # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
2982 # Also, there are symlinks from /usr/include/ and /usr/lib/ into
2983 # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
2984 # you don't need any -I or -L arguments.
2986 # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
2987 # are the same division as 10.x. However, there are no symlinks to
2988 # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
2989 # arguments are always necessary.
2991 # However, X11R6 was available on HPUX 9.x as a patch: if that
2992 # patch was installed, then all of X11R6 went in to
2993 # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
2995 # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
2996 # whether R5 was available as a patch; R6 undoubtedly was not.)
2998 # So. We try and use the highest numbered pair of
2999 # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
3000 # that are available. We do not mix and match different versions
3003 # Questions I still don't know the answers to: (do you?)
3005 # * Does HPUX 10.x come with /usr/contrib/X11R6/ standard?
3006 # Or does that need to be installed separately?
3008 # * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3009 # /usr/contrib/X11R6/ could be installed as a patch, what was in
3010 # that contrib directory? Did it contain so-called "standard"
3011 # X11R6, or did it include Xaw and Xmu as well? If the former,
3012 # where did one find Xaw and Xmu on 9.x R6 systems? Would this
3013 # be a situation where one had to reach into the R5 headers and
3014 # libs to find Xmu? That is, must both R6 and R5 directories
3015 # be on the -I and -L lists in that case?
3017 for version in X11R6 X11R5 X11R4 ; do
3018 # if either pair of directories exists...
3019 if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib ; then
3020 # if contrib exists, use it...
3021 if test -d /usr/contrib/$version/lib ; then
3022 X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3023 X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3025 # if the "standard" one exists, use it.
3026 if test -d /usr/lib/$version ; then
3027 X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3028 X_LIBS="$X_LIBS -L/usr/lib/$version"
3030 # since at least one of the pair exists, go no farther.
3035 # Now find Motif. Thanks for not making xmkmf find this by
3036 # default, you losers.
3038 if test -d /usr/lib/Motif1.2 ; then
3039 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3040 X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3041 elif test -d /usr/lib/Motif1.1 ; then
3042 X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3043 X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3046 # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3048 if test -d /opt/Mesa/lib ; then
3049 X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3050 X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3053 if test -d /opt/xpm/lib/X11 ; then
3054 X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3055 X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3058 # On HPUX, default to installing in /opt/xscreensaver/ instead of
3059 # in /usr/local/, unless there is already an xscreensaver in
3060 # /usr/local/bin/. This can be overridden with the --prefix arg
3061 # to configure. I'm not sure this is the right thing to do, but
3062 # Richard Lloyd says so...
3064 if test \! -x /usr/local/bin/xscreensaver ; then
3065 ac_default_prefix=/opt/xscreensaver
3071 # Thanks for not making xmkmf find this by default, pinheads.
3072 # And thanks for moving things around again, too. Is this
3073 # really the standard location now? What happened to the
3074 # joke that this kind of thing went in /opt?
3075 # cthomp says "answer: CDE (Common Disorganized Environment)"
3077 if test -f /usr/dt/include/Xm/Xm.h ; then
3078 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3079 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3081 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
3082 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3083 echo "configure:3095: checking for regcmp in -lgen" >&5
3084 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3085 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3086 echo $ac_n "(cached) $ac_c" 1>&6
3088 ac_save_LIBS="$LIBS"
3090 cat > conftest.$ac_ext <<EOF
3091 #line 3103 "configure"
3092 #include "confdefs.h"
3093 /* Override any gcc2 internal prototype to avoid an error. */
3094 /* We use char because int might match the return type of a gcc2
3095 builtin and then its argument prototype would still apply. */
3102 if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3104 eval "ac_cv_lib_$ac_lib_var=yes"
3106 echo "configure: failed program was:" >&5
3107 cat conftest.$ac_ext >&5
3109 eval "ac_cv_lib_$ac_lib_var=no"
3112 LIBS="$ac_save_LIBS"
3115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3116 echo "$ac_t""yes" 1>&6
3117 X_LIBS="$X_LIBS -lgen"
3119 echo "$ac_t""no" 1>&6
3128 # Check for Xmu (some fucked up vendors don't ship it...)
3132 ac_save_CPPFLAGS="$CPPFLAGS"
3133 if test \! -z "$includedir" ; then
3134 CPPFLAGS="$CPPFLAGS -I$includedir"
3136 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3137 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3138 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3139 echo "configure:3151: checking for X11/Xmu/Error.h" >&5
3140 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3141 echo $ac_n "(cached) $ac_c" 1>&6
3143 cat > conftest.$ac_ext <<EOF
3144 #line 3156 "configure"
3145 #include "confdefs.h"
3146 #include <X11/Xmu/Error.h>
3148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3149 { (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3150 ac_err=`grep -v '^ *+' conftest.out`
3151 if test -z "$ac_err"; then
3153 eval "ac_cv_header_$ac_safe=yes"
3156 echo "configure: failed program was:" >&5
3157 cat conftest.$ac_ext >&5
3159 eval "ac_cv_header_$ac_safe=no"
3163 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3164 echo "$ac_t""yes" 1>&6
3167 echo "$ac_t""no" 1>&6
3170 CPPFLAGS="$ac_save_CPPFLAGS"
3171 if test "$have_xmu" = no ; then
3172 XMU_SRCS='$(UTILS_SRC)/xmu.c'
3173 XMU_OBJS='$(UTILS_BIN)/xmu.o'
3177 SAVER_LIBS="-lXmu $SAVER_LIBS"
3178 HACK_LIBS="-lXmu $HACK_LIBS"
3179 cat >> confdefs.h <<\EOF
3186 # See comp.windows.x FAQ question 124 about _get_wmShellWidgetClass on 4.1.x.
3187 # The right fix is to get OpenWindows 3.0 patches 100512-02 and 100573-03.
3189 if test "$have_xmu" = yes ; then
3192 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3193 echo "configure:3205: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3194 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3195 echo $ac_n "(cached) $ac_c" 1>&6
3197 ac_save_LDFLAGS="$LDFLAGS"
3198 if test \! -z "$x_libraries" ; then
3199 LDFLAGS="$LDFLAGS -L$x_libraries"
3201 # Note: this trick never works! (Generally.)
3202 # We're only getting away with using AC_TRY_LINK
3203 # with X libraries because we know it's SunOS.
3204 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3205 cat > conftest.$ac_ext <<EOF
3206 #line 3218 "configure"
3207 #include "confdefs.h"
3213 if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3215 ac_cv_sunos_xmu_bug=no
3217 echo "configure: failed program was:" >&5
3218 cat conftest.$ac_ext >&5
3220 ac_cv_sunos_xmu_bug=yes
3223 LDFLAGS="$ac_save_LDFLAGS"
3226 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3227 if test "$ac_cv_sunos_xmu_bug" = yes ; then
3228 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3229 echo "configure:3241: checking whether the compiler understands -static" >&5
3230 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3231 echo $ac_n "(cached) $ac_c" 1>&6
3233 ac_save_LDFLAGS="$LDFLAGS"
3234 LDFLAGS="$LDFLAGS -static"
3235 cat > conftest.$ac_ext <<EOF
3236 #line 3248 "configure"
3237 #include "confdefs.h"
3243 if { (eval echo configure:3255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3247 echo "configure: failed program was:" >&5
3248 cat conftest.$ac_ext >&5
3253 LDFLAGS="$ac_save_LDFLAGS"
3256 echo "$ac_t""$ac_cv_ld_static" 1>&6
3257 if test "$ac_cv_ld_static" = yes ; then
3258 LDFLAGS="$LDFLAGS -static"
3260 LDFLAGS="$LDFLAGS -Bstatic"
3268 # Check for the SGI SCREEN_SAVER server extension header.
3271 with_sgi_req=unspecified
3272 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3273 if test "${with_sgi_ext+set}" = set; then
3274 withval="$with_sgi_ext"
3275 with_sgi="$withval"; with_sgi_req="$withval"
3287 echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3288 echo "configure:3300: checking for SGI SCREEN_SAVER headers" >&5
3291 X_CFLAGS="-I$d $X_CFLAGS"
3292 echo "$ac_t""$d" 1>&6
3294 echo "$ac_t""not found ($d: no such directory)" 1>&6
3297 echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3298 echo "configure:3310: checking for SGI SCREEN_SAVER libs" >&5
3301 X_LIBS="-L$d $X_LIBS"
3302 echo "$ac_t""$d" 1>&6
3304 echo "$ac_t""not found ($d: no such directory)" 1>&6
3307 # replace the directory string with "yes".
3309 with_sgi=$with_sgi_req
3314 echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3315 echo " If it is a directory, then \`DIR/include' will be added to"
3316 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3321 # why is this necessary?
3322 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3323 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3327 if test "$with_sgi" = yes; then
3329 ac_save_CPPFLAGS="$CPPFLAGS"
3330 if test \! -z "$includedir" ; then
3331 CPPFLAGS="$CPPFLAGS -I$includedir"
3333 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3334 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3335 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3336 echo "configure:3348: checking for X11/extensions/XScreenSaver.h" >&5
3337 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3338 echo $ac_n "(cached) $ac_c" 1>&6
3340 cat > conftest.$ac_ext <<EOF
3341 #line 3353 "configure"
3342 #include "confdefs.h"
3343 #include <X11/extensions/XScreenSaver.h>
3345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3346 { (eval echo configure:3358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3347 ac_err=`grep -v '^ *+' conftest.out`
3348 if test -z "$ac_err"; then
3350 eval "ac_cv_header_$ac_safe=yes"
3353 echo "configure: failed program was:" >&5
3354 cat conftest.$ac_ext >&5
3356 eval "ac_cv_header_$ac_safe=no"
3360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3361 echo "$ac_t""yes" 1>&6
3363 cat >> confdefs.h <<\EOF
3364 #define HAVE_SGI_SAVER_EXTENSION 1
3368 echo "$ac_t""no" 1>&6
3371 CPPFLAGS="$ac_save_CPPFLAGS"
3373 elif test "$with_sgi" != no; then
3374 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3378 # Check for the MIT-SCREEN-SAVER server extension header,
3379 # unless the SGI extension has already been found.
3382 with_mit_req=unspecified
3383 # Check whether --with-mit-ext or --without-mit-ext was given.
3384 if test "${with_mit_ext+set}" = set; then
3385 withval="$with_mit_ext"
3386 with_mit="$withval"; with_mit_req="$withval"
3398 echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3399 echo "configure:3411: checking for MIT-SCREEN-SAVER headers" >&5
3402 X_CFLAGS="-I$d $X_CFLAGS"
3403 echo "$ac_t""$d" 1>&6
3405 echo "$ac_t""not found ($d: no such directory)" 1>&6
3408 echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3409 echo "configure:3421: checking for MIT-SCREEN-SAVER libs" >&5
3412 X_LIBS="-L$d $X_LIBS"
3413 echo "$ac_t""$d" 1>&6
3415 echo "$ac_t""not found ($d: no such directory)" 1>&6
3418 # replace the directory string with "yes".
3420 with_mit=$with_mit_req
3425 echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3426 echo " If it is a directory, then \`DIR/include' will be added to"
3427 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3432 # why is this necessary?
3433 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3434 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3438 if test "$have_sgi" != yes; then
3439 if test "$with_mit" = yes; then
3441 ac_save_CPPFLAGS="$CPPFLAGS"
3442 if test \! -z "$includedir" ; then
3443 CPPFLAGS="$CPPFLAGS -I$includedir"
3445 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3446 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3447 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3448 echo "configure:3460: checking for X11/extensions/scrnsaver.h" >&5
3449 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3450 echo $ac_n "(cached) $ac_c" 1>&6
3452 cat > conftest.$ac_ext <<EOF
3453 #line 3465 "configure"
3454 #include "confdefs.h"
3455 #include <X11/extensions/scrnsaver.h>
3457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3458 { (eval echo configure:3470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3459 ac_err=`grep -v '^ *+' conftest.out`
3460 if test -z "$ac_err"; then
3462 eval "ac_cv_header_$ac_safe=yes"
3465 echo "configure: failed program was:" >&5
3466 cat conftest.$ac_ext >&5
3468 eval "ac_cv_header_$ac_safe=no"
3472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3473 echo "$ac_t""yes" 1>&6
3476 echo "$ac_t""no" 1>&6
3479 CPPFLAGS="$ac_save_CPPFLAGS"
3481 # Now check to see if it's really in the library; XF86Free-3.3 ships
3482 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3484 if test "$have_mit" = yes; then
3486 ac_save_CPPFLAGS="$CPPFLAGS"
3487 ac_save_LDFLAGS="$LDFLAGS"
3489 if test \! -z "$includedir" ; then
3490 CPPFLAGS="$CPPFLAGS -I$includedir"
3492 # note: $X_CFLAGS includes $x_includes
3493 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3495 if test \! -z "$libdir" ; then
3496 LDFLAGS="$LDFLAGS -L$libdir"
3498 # note: $X_LIBS includes $x_libraries
3499 LDFLAGS="$LDFLAGS $X_LIBS"
3501 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3502 echo "configure:3514: checking for XScreenSaverRegister in -lXext" >&5
3503 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3504 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3505 echo $ac_n "(cached) $ac_c" 1>&6
3507 ac_save_LIBS="$LIBS"
3508 LIBS="-lXext -lm $LIBS"
3509 cat > conftest.$ac_ext <<EOF
3510 #line 3522 "configure"
3511 #include "confdefs.h"
3512 /* Override any gcc2 internal prototype to avoid an error. */
3513 /* We use char because int might match the return type of a gcc2
3514 builtin and then its argument prototype would still apply. */
3515 char XScreenSaverRegister();
3518 XScreenSaverRegister()
3521 if { (eval echo configure:3533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3523 eval "ac_cv_lib_$ac_lib_var=yes"
3525 echo "configure: failed program was:" >&5
3526 cat conftest.$ac_ext >&5
3528 eval "ac_cv_lib_$ac_lib_var=no"
3531 LIBS="$ac_save_LIBS"
3534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3535 echo "$ac_t""yes" 1>&6
3536 ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3537 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3538 cat >> confdefs.h <<EOF
3539 #define $ac_tr_lib 1
3545 echo "$ac_t""no" 1>&6
3549 CPPFLAGS="$ac_save_CPPFLAGS"
3550 LDFLAGS="$ac_save_LDFLAGS"
3552 if test "$have_mit" = no; then
3553 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3554 # of in Xext. Thank you master, may I have another.
3556 ac_save_CPPFLAGS="$CPPFLAGS"
3557 ac_save_LDFLAGS="$LDFLAGS"
3559 if test \! -z "$includedir" ; then
3560 CPPFLAGS="$CPPFLAGS -I$includedir"
3562 # note: $X_CFLAGS includes $x_includes
3563 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3565 if test \! -z "$libdir" ; then
3566 LDFLAGS="$LDFLAGS -L$libdir"
3568 # note: $X_LIBS includes $x_libraries
3569 LDFLAGS="$LDFLAGS $X_LIBS"
3571 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3572 echo "configure:3584: checking for XScreenSaverRegister in -lXExExt" >&5
3573 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3574 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3575 echo $ac_n "(cached) $ac_c" 1>&6
3577 ac_save_LIBS="$LIBS"
3578 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3579 cat > conftest.$ac_ext <<EOF
3580 #line 3592 "configure"
3581 #include "confdefs.h"
3582 /* Override any gcc2 internal prototype to avoid an error. */
3583 /* We use char because int might match the return type of a gcc2
3584 builtin and then its argument prototype would still apply. */
3585 char XScreenSaverRegister();
3588 XScreenSaverRegister()
3591 if { (eval echo configure:3603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3593 eval "ac_cv_lib_$ac_lib_var=yes"
3595 echo "configure: failed program was:" >&5
3596 cat conftest.$ac_ext >&5
3598 eval "ac_cv_lib_$ac_lib_var=no"
3601 LIBS="$ac_save_LIBS"
3604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3605 echo "$ac_t""yes" 1>&6
3606 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3608 echo "$ac_t""no" 1>&6
3611 CPPFLAGS="$ac_save_CPPFLAGS"
3612 LDFLAGS="$ac_save_LDFLAGS"
3615 if test "$have_mit" = no; then
3616 # Double fuck! Looks like some versions of XFree86 (whichever version
3617 # it is that comes with RedHat Linux 2.0 -- I can't find a version
3618 # number) put this garbage in Xss instead of Xext. Thank you master,
3619 # may I have another.
3621 ac_save_CPPFLAGS="$CPPFLAGS"
3622 ac_save_LDFLAGS="$LDFLAGS"
3624 if test \! -z "$includedir" ; then
3625 CPPFLAGS="$CPPFLAGS -I$includedir"
3627 # note: $X_CFLAGS includes $x_includes
3628 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3630 if test \! -z "$libdir" ; then
3631 LDFLAGS="$LDFLAGS -L$libdir"
3633 # note: $X_LIBS includes $x_libraries
3634 LDFLAGS="$LDFLAGS $X_LIBS"
3636 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
3637 echo "configure:3649: checking for XScreenSaverRegister in -lXss" >&5
3638 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3639 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3640 echo $ac_n "(cached) $ac_c" 1>&6
3642 ac_save_LIBS="$LIBS"
3643 LIBS="-lXss -lX11 -lXext -lm $LIBS"
3644 cat > conftest.$ac_ext <<EOF
3645 #line 3657 "configure"
3646 #include "confdefs.h"
3647 /* Override any gcc2 internal prototype to avoid an error. */
3648 /* We use char because int might match the return type of a gcc2
3649 builtin and then its argument prototype would still apply. */
3650 char XScreenSaverRegister();
3653 XScreenSaverRegister()
3656 if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3658 eval "ac_cv_lib_$ac_lib_var=yes"
3660 echo "configure: failed program was:" >&5
3661 cat conftest.$ac_ext >&5
3663 eval "ac_cv_lib_$ac_lib_var=no"
3666 LIBS="$ac_save_LIBS"
3669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3670 echo "$ac_t""yes" 1>&6
3671 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
3673 echo "$ac_t""no" 1>&6
3676 CPPFLAGS="$ac_save_CPPFLAGS"
3677 LDFLAGS="$ac_save_LDFLAGS"
3680 if test "$have_mit" = yes; then
3681 cat >> confdefs.h <<\EOF
3682 #define HAVE_MIT_SAVER_EXTENSION 1
3689 elif test "$with_mit" != no; then
3690 echo "error: must be yes or no: --with-mit-ext=$with_mit"
3696 # Check for the XIDLE server extension header.
3699 with_xidle_req=unspecified
3700 # Check whether --with-xidle-ext or --without-xidle-ext was given.
3701 if test "${with_xidle_ext+set}" = set; then
3702 withval="$with_xidle_ext"
3703 with_xidle="$withval"; with_xidle_req="$withval"
3710 case "$with_xidle" in
3715 echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
3716 echo "configure:3728: checking for XIDLE headers" >&5
3717 d=$with_xidle/include
3719 X_CFLAGS="-I$d $X_CFLAGS"
3720 echo "$ac_t""$d" 1>&6
3722 echo "$ac_t""not found ($d: no such directory)" 1>&6
3725 echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
3726 echo "configure:3738: checking for XIDLE libs" >&5
3729 X_LIBS="-L$d $X_LIBS"
3730 echo "$ac_t""$d" 1>&6
3732 echo "$ac_t""not found ($d: no such directory)" 1>&6
3735 # replace the directory string with "yes".
3736 with_xidle_req="yes"
3737 with_xidle=$with_xidle_req
3742 echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
3743 echo " If it is a directory, then \`DIR/include' will be added to"
3744 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3749 # why is this necessary?
3750 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3751 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3755 if test "$with_xidle" = yes; then
3757 ac_save_CPPFLAGS="$CPPFLAGS"
3758 if test \! -z "$includedir" ; then
3759 CPPFLAGS="$CPPFLAGS -I$includedir"
3761 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3762 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
3763 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
3764 echo "configure:3776: checking for X11/extensions/xidle.h" >&5
3765 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3766 echo $ac_n "(cached) $ac_c" 1>&6
3768 cat > conftest.$ac_ext <<EOF
3769 #line 3781 "configure"
3770 #include "confdefs.h"
3771 #include <X11/extensions/xidle.h>
3773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3774 { (eval echo configure:3786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3775 ac_err=`grep -v '^ *+' conftest.out`
3776 if test -z "$ac_err"; then
3778 eval "ac_cv_header_$ac_safe=yes"
3781 echo "configure: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
3784 eval "ac_cv_header_$ac_safe=no"
3788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3789 echo "$ac_t""yes" 1>&6
3791 cat >> confdefs.h <<\EOF
3792 #define HAVE_XIDLE_EXTENSION 1
3796 echo "$ac_t""no" 1>&6
3799 CPPFLAGS="$ac_save_CPPFLAGS"
3800 elif test "$with_xidle" != no; then
3801 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
3806 # Check for the XSHM server extension header.
3809 with_xshm_req=unspecified
3810 # Check whether --with-xshm-ext or --without-xshm-ext was given.
3811 if test "${with_xshm_ext+set}" = set; then
3812 withval="$with_xshm_ext"
3813 with_xshm="$withval"; with_xshm_req="$withval"
3820 case "$with_xshm" in
3825 echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
3826 echo "configure:3838: checking for XSHM headers" >&5
3827 d=$with_xshm/include
3829 X_CFLAGS="-I$d $X_CFLAGS"
3830 echo "$ac_t""$d" 1>&6
3832 echo "$ac_t""not found ($d: no such directory)" 1>&6
3835 echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
3836 echo "configure:3848: checking for XSHM libs" >&5
3839 X_LIBS="-L$d $X_LIBS"
3840 echo "$ac_t""$d" 1>&6
3842 echo "$ac_t""not found ($d: no such directory)" 1>&6
3845 # replace the directory string with "yes".
3847 with_xshm=$with_xshm_req
3852 echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
3853 echo " If it is a directory, then \`DIR/include' will be added to"
3854 echo " the -I list, and \`DIR/lib' will be added to the -L list."
3859 # why is this necessary?
3860 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3861 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3865 if test "$with_xshm" = yes; then
3867 # first check for Xshm.h.
3869 ac_save_CPPFLAGS="$CPPFLAGS"
3870 if test \! -z "$includedir" ; then
3871 CPPFLAGS="$CPPFLAGS -I$includedir"
3873 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3874 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
3875 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
3876 echo "configure:3888: checking for X11/extensions/XShm.h" >&5
3877 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3878 echo $ac_n "(cached) $ac_c" 1>&6
3880 cat > conftest.$ac_ext <<EOF
3881 #line 3893 "configure"
3882 #include "confdefs.h"
3883 #include <X11/extensions/XShm.h>
3885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3886 { (eval echo configure:3898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3887 ac_err=`grep -v '^ *+' conftest.out`
3888 if test -z "$ac_err"; then
3890 eval "ac_cv_header_$ac_safe=yes"
3893 echo "configure: failed program was:" >&5
3894 cat conftest.$ac_ext >&5
3896 eval "ac_cv_header_$ac_safe=no"
3900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3901 echo "$ac_t""yes" 1>&6
3904 echo "$ac_t""no" 1>&6
3907 CPPFLAGS="$ac_save_CPPFLAGS"
3909 # if that succeeded, then check for sys/ipc.h.
3910 if test "$have_xshm" = yes; then
3913 ac_save_CPPFLAGS="$CPPFLAGS"
3914 if test \! -z "$includedir" ; then
3915 CPPFLAGS="$CPPFLAGS -I$includedir"
3917 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3918 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
3919 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
3920 echo "configure:3932: checking for sys/ipc.h" >&5
3921 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3922 echo $ac_n "(cached) $ac_c" 1>&6
3924 cat > conftest.$ac_ext <<EOF
3925 #line 3937 "configure"
3926 #include "confdefs.h"
3927 #include <sys/ipc.h>
3929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3930 { (eval echo configure:3942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3931 ac_err=`grep -v '^ *+' conftest.out`
3932 if test -z "$ac_err"; then
3934 eval "ac_cv_header_$ac_safe=yes"
3937 echo "configure: failed program was:" >&5
3938 cat conftest.$ac_ext >&5
3940 eval "ac_cv_header_$ac_safe=no"
3944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3945 echo "$ac_t""yes" 1>&6
3948 echo "$ac_t""no" 1>&6
3951 CPPFLAGS="$ac_save_CPPFLAGS"
3954 # if that succeeded, then check for sys/shm.h.
3955 if test "$have_xshm" = yes; then
3958 ac_save_CPPFLAGS="$CPPFLAGS"
3959 if test \! -z "$includedir" ; then
3960 CPPFLAGS="$CPPFLAGS -I$includedir"
3962 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3963 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
3964 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
3965 echo "configure:3977: checking for sys/shm.h" >&5
3966 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3967 echo $ac_n "(cached) $ac_c" 1>&6
3969 cat > conftest.$ac_ext <<EOF
3970 #line 3982 "configure"
3971 #include "confdefs.h"
3972 #include <sys/shm.h>
3974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3975 { (eval echo configure:3987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3976 ac_err=`grep -v '^ *+' conftest.out`
3977 if test -z "$ac_err"; then
3979 eval "ac_cv_header_$ac_safe=yes"
3982 echo "configure: failed program was:" >&5
3983 cat conftest.$ac_ext >&5
3985 eval "ac_cv_header_$ac_safe=no"
3989 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3990 echo "$ac_t""yes" 1>&6
3993 echo "$ac_t""no" 1>&6
3996 CPPFLAGS="$ac_save_CPPFLAGS"
3999 # AIX is pathological, as usual: apparently it's normal for the Xshm headers
4000 # to exist, but the library code to not exist. And even better, the library
4001 # code is in its own library: libXextSam.a. So, if we're on AIX, and that
4002 # lib doesn't exist, give up.
4008 ac_save_CPPFLAGS="$CPPFLAGS"
4009 ac_save_LDFLAGS="$LDFLAGS"
4011 if test \! -z "$includedir" ; then
4012 CPPFLAGS="$CPPFLAGS -I$includedir"
4014 # note: $X_CFLAGS includes $x_includes
4015 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4017 if test \! -z "$libdir" ; then
4018 LDFLAGS="$LDFLAGS -L$libdir"
4020 # note: $X_LIBS includes $x_libraries
4021 LDFLAGS="$LDFLAGS $X_LIBS"
4023 echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
4024 echo "configure:4036: checking for XShmQueryExtension in -lXextSam" >&5
4025 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
4026 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4027 echo $ac_n "(cached) $ac_c" 1>&6
4029 ac_save_LIBS="$LIBS"
4030 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
4031 cat > conftest.$ac_ext <<EOF
4032 #line 4044 "configure"
4033 #include "confdefs.h"
4034 /* Override any gcc2 internal prototype to avoid an error. */
4035 /* We use char because int might match the return type of a gcc2
4036 builtin and then its argument prototype would still apply. */
4037 char XShmQueryExtension();
4040 XShmQueryExtension()
4043 if { (eval echo configure:4055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4045 eval "ac_cv_lib_$ac_lib_var=yes"
4047 echo "configure: failed program was:" >&5
4048 cat conftest.$ac_ext >&5
4050 eval "ac_cv_lib_$ac_lib_var=no"
4053 LIBS="$ac_save_LIBS"
4056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4057 echo "$ac_t""yes" 1>&6
4058 have_xshm=yes; SAVER_LIBS="$SAVER_LIBS -lXextSam"
4060 echo "$ac_t""no" 1>&6
4063 CPPFLAGS="$ac_save_CPPFLAGS"
4064 LDFLAGS="$ac_save_LDFLAGS"
4068 # if that succeeded, then we've really got it.
4069 if test "$have_xshm" = yes; then
4070 cat >> confdefs.h <<\EOF
4071 #define HAVE_XSHM_EXTENSION 1
4076 elif test "$with_xshm" != no; then
4077 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
4082 # Check for the SGI-VIDEO-CONTROL server extension header.
4085 with_sgivc_req=unspecified
4086 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4087 if test "${with_sgivc_ext+set}" = set; then
4088 withval="$with_sgivc_ext"
4089 with_sgivc="$withval"; with_sgivc_req="$withval"
4096 case "$with_sgivc" in
4101 echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4102 echo "configure:4114: checking for SGI-VIDEO-CONTROL headers" >&5
4103 d=$with_sgivc/include
4105 X_CFLAGS="-I$d $X_CFLAGS"
4106 echo "$ac_t""$d" 1>&6
4108 echo "$ac_t""not found ($d: no such directory)" 1>&6
4111 echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4112 echo "configure:4124: checking for SGI-VIDEO-CONTROL libs" >&5
4115 X_LIBS="-L$d $X_LIBS"
4116 echo "$ac_t""$d" 1>&6
4118 echo "$ac_t""not found ($d: no such directory)" 1>&6
4121 # replace the directory string with "yes".
4122 with_sgivc_req="yes"
4123 with_sgivc=$with_sgivc_req
4128 echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4129 echo " If it is a directory, then \`DIR/include' will be added to"
4130 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4135 # why is this necessary?
4136 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4137 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4141 if test "$with_sgivc" = yes; then
4143 # first check for XSGIvc.h
4145 ac_save_CPPFLAGS="$CPPFLAGS"
4146 if test \! -z "$includedir" ; then
4147 CPPFLAGS="$CPPFLAGS -I$includedir"
4149 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4150 ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4151 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4152 echo "configure:4164: checking for X11/extensions/XSGIvc.h" >&5
4153 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4154 echo $ac_n "(cached) $ac_c" 1>&6
4156 cat > conftest.$ac_ext <<EOF
4157 #line 4169 "configure"
4158 #include "confdefs.h"
4159 #include <X11/extensions/XSGIvc.h>
4161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4162 { (eval echo configure:4174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4163 ac_err=`grep -v '^ *+' conftest.out`
4164 if test -z "$ac_err"; then
4166 eval "ac_cv_header_$ac_safe=yes"
4169 echo "configure: failed program was:" >&5
4170 cat conftest.$ac_ext >&5
4172 eval "ac_cv_header_$ac_safe=no"
4176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4177 echo "$ac_t""yes" 1>&6
4180 echo "$ac_t""no" 1>&6
4183 CPPFLAGS="$ac_save_CPPFLAGS"
4185 # if that succeeded, then check for the -lXsgivc
4186 if test "$have_sgivc" = yes; then
4189 ac_save_CPPFLAGS="$CPPFLAGS"
4190 ac_save_LDFLAGS="$LDFLAGS"
4192 if test \! -z "$includedir" ; then
4193 CPPFLAGS="$CPPFLAGS -I$includedir"
4195 # note: $X_CFLAGS includes $x_includes
4196 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4198 if test \! -z "$libdir" ; then
4199 LDFLAGS="$LDFLAGS -L$libdir"
4201 # note: $X_LIBS includes $x_libraries
4202 LDFLAGS="$LDFLAGS $X_LIBS"
4204 echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4205 echo "configure:4217: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4206 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4207 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4208 echo $ac_n "(cached) $ac_c" 1>&6
4210 ac_save_LIBS="$LIBS"
4211 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4212 cat > conftest.$ac_ext <<EOF
4213 #line 4225 "configure"
4214 #include "confdefs.h"
4215 /* Override any gcc2 internal prototype to avoid an error. */
4216 /* We use char because int might match the return type of a gcc2
4217 builtin and then its argument prototype would still apply. */
4218 char XSGIvcQueryGammaMap();
4221 XSGIvcQueryGammaMap()
4224 if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4226 eval "ac_cv_lib_$ac_lib_var=yes"
4228 echo "configure: failed program was:" >&5
4229 cat conftest.$ac_ext >&5
4231 eval "ac_cv_lib_$ac_lib_var=no"
4234 LIBS="$ac_save_LIBS"
4237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4238 echo "$ac_t""yes" 1>&6
4239 have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4241 echo "$ac_t""no" 1>&6
4244 CPPFLAGS="$ac_save_CPPFLAGS"
4245 LDFLAGS="$ac_save_LDFLAGS"
4248 # if that succeeded, then we've really got it.
4249 if test "$have_sgivc" = yes; then
4250 cat >> confdefs.h <<\EOF
4251 #define HAVE_SGI_VC_EXTENSION 1
4256 elif test "$with_sgivc" != no; then
4257 echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4262 # Check for the DPMS server extension header.
4265 with_dpms_req=unspecified
4266 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4267 if test "${with_dpms_ext+set}" = set; then
4268 withval="$with_dpms_ext"
4269 with_dpms="$withval"; with_dpms_req="$withval"
4276 case "$with_dpms" in
4281 echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4282 echo "configure:4294: checking for DPMS headers" >&5
4283 d=$with_dpms/include
4285 X_CFLAGS="-I$d $X_CFLAGS"
4286 echo "$ac_t""$d" 1>&6
4288 echo "$ac_t""not found ($d: no such directory)" 1>&6
4291 echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4292 echo "configure:4304: checking for DPMS libs" >&5
4295 X_LIBS="-L$d $X_LIBS"
4296 echo "$ac_t""$d" 1>&6
4298 echo "$ac_t""not found ($d: no such directory)" 1>&6
4301 # replace the directory string with "yes".
4303 with_dpms=$with_dpms_req
4308 echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4309 echo " If it is a directory, then \`DIR/include' will be added to"
4310 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4315 # why is this necessary?
4316 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4317 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4321 if test "$with_dpms" = yes; then
4323 # first check for dpms.h
4325 ac_save_CPPFLAGS="$CPPFLAGS"
4326 if test \! -z "$includedir" ; then
4327 CPPFLAGS="$CPPFLAGS -I$includedir"
4329 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4330 ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4331 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4332 echo "configure:4344: checking for X11/extensions/dpms.h" >&5
4333 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4334 echo $ac_n "(cached) $ac_c" 1>&6
4336 cat > conftest.$ac_ext <<EOF
4337 #line 4349 "configure"
4338 #include "confdefs.h"
4339 #include <X11/extensions/dpms.h>
4341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4342 { (eval echo configure:4354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4343 ac_err=`grep -v '^ *+' conftest.out`
4344 if test -z "$ac_err"; then
4346 eval "ac_cv_header_$ac_safe=yes"
4349 echo "configure: failed program was:" >&5
4350 cat conftest.$ac_ext >&5
4352 eval "ac_cv_header_$ac_safe=no"
4356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4357 echo "$ac_t""yes" 1>&6
4360 echo "$ac_t""no" 1>&6
4363 CPPFLAGS="$ac_save_CPPFLAGS"
4365 # if that succeeded, then check for the -lXdpms
4366 if test "$have_dpms" = yes; then
4369 ac_save_CPPFLAGS="$CPPFLAGS"
4370 ac_save_LDFLAGS="$LDFLAGS"
4372 if test \! -z "$includedir" ; then
4373 CPPFLAGS="$CPPFLAGS -I$includedir"
4375 # note: $X_CFLAGS includes $x_includes
4376 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4378 if test \! -z "$libdir" ; then
4379 LDFLAGS="$LDFLAGS -L$libdir"
4381 # note: $X_LIBS includes $x_libraries
4382 LDFLAGS="$LDFLAGS $X_LIBS"
4384 echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4385 echo "configure:4397: checking for DPMSInfo in -lXdpms" >&5
4386 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4388 echo $ac_n "(cached) $ac_c" 1>&6
4390 ac_save_LIBS="$LIBS"
4391 LIBS="-lXdpms -lXext -lX11 $LIBS"
4392 cat > conftest.$ac_ext <<EOF
4393 #line 4405 "configure"
4394 #include "confdefs.h"
4395 /* Override any gcc2 internal prototype to avoid an error. */
4396 /* We use char because int might match the return type of a gcc2
4397 builtin and then its argument prototype would still apply. */
4404 if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4406 eval "ac_cv_lib_$ac_lib_var=yes"
4408 echo "configure: failed program was:" >&5
4409 cat conftest.$ac_ext >&5
4411 eval "ac_cv_lib_$ac_lib_var=no"
4414 LIBS="$ac_save_LIBS"
4417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4418 echo "$ac_t""yes" 1>&6
4419 have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
4421 echo "$ac_t""no" 1>&6
4424 CPPFLAGS="$ac_save_CPPFLAGS"
4425 LDFLAGS="$ac_save_LDFLAGS"
4428 # if that succeeded, then we've really got it.
4429 if test "$have_dpms" = yes; then
4430 cat >> confdefs.h <<\EOF
4431 #define HAVE_DPMS_EXTENSION 1
4436 elif test "$with_dpms" != no; then
4437 echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4443 # Check for Motif and Athena --with and --without arguments.
4448 with_motif_req=unspecified
4449 with_athena_req=unspecified
4451 # Check whether --with-motif or --without-motif was given.
4452 if test "${with_motif+set}" = set; then
4453 withval="$with_motif"
4454 with_motif="$withval"; with_motif_req="$withval"
4461 case "$with_motif" in
4466 echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
4467 echo "configure:4479: checking for Motif headers" >&5
4468 d=$with_motif/include
4470 X_CFLAGS="-I$d $X_CFLAGS"
4471 echo "$ac_t""$d" 1>&6
4473 echo "$ac_t""not found ($d: no such directory)" 1>&6
4476 echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
4477 echo "configure:4489: checking for Motif libs" >&5
4480 X_LIBS="-L$d $X_LIBS"
4481 echo "$ac_t""$d" 1>&6
4483 echo "$ac_t""not found ($d: no such directory)" 1>&6
4486 # replace the directory string with "yes".
4487 with_motif_req="yes"
4488 with_motif=$with_motif_req
4493 echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
4494 echo " If it is a directory, then \`DIR/include' will be added to"
4495 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4500 # why is this necessary?
4501 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4502 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4506 # Check whether --with-athena or --without-athena was given.
4507 if test "${with_athena+set}" = set; then
4508 withval="$with_athena"
4509 with_athena="$withval"; with_athena_req="$withval"
4516 case "$with_athena" in
4521 echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
4522 echo "configure:4534: checking for Athena headers" >&5
4523 d=$with_athena/include
4525 X_CFLAGS="-I$d $X_CFLAGS"
4526 echo "$ac_t""$d" 1>&6
4528 echo "$ac_t""not found ($d: no such directory)" 1>&6
4531 echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
4532 echo "configure:4544: checking for Athena libs" >&5
4535 X_LIBS="-L$d $X_LIBS"
4536 echo "$ac_t""$d" 1>&6
4538 echo "$ac_t""not found ($d: no such directory)" 1>&6
4541 # replace the directory string with "yes".
4542 with_athena_req="yes"
4543 with_athena=$with_athena_req
4548 echo "error: argument to --with-athena must be \"yes\", \"no\", or a directory."
4549 echo " If it is a directory, then \`DIR/include' will be added to"
4550 echo " the -I list, and \`DIR/lib' will be added to the -L list."
4555 # why is this necessary?
4556 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4557 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4561 if test "$with_motif" != yes -a "$with_motif" != no ; then
4562 echo "error: must be yes or no: --with-motif=$with_motif"
4566 if test "$with_athena" != yes -a "$with_athena" != no ; then
4567 echo "error: must be yes or no: --with-athena=$with_athena"
4572 # Saying --without-motif is the same as saying --with-athena.
4573 if test "$with_motif_req" = no ; then
4578 # Saying --without-athena is the same as saying --with-motif.
4579 if test "$with_athena_req" = no ; then
4584 # Check for Motif and Athena headers.
4588 ac_save_CPPFLAGS="$CPPFLAGS"
4589 if test \! -z "$includedir" ; then
4590 CPPFLAGS="$CPPFLAGS -I$includedir"
4592 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4593 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
4594 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
4595 echo "configure:4607: checking for Xm/Xm.h" >&5
4596 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4597 echo $ac_n "(cached) $ac_c" 1>&6
4599 cat > conftest.$ac_ext <<EOF
4600 #line 4612 "configure"
4601 #include "confdefs.h"
4604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4605 { (eval echo configure:4617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4606 ac_err=`grep -v '^ *+' conftest.out`
4607 if test -z "$ac_err"; then
4609 eval "ac_cv_header_$ac_safe=yes"
4612 echo "configure: failed program was:" >&5
4613 cat conftest.$ac_ext >&5
4615 eval "ac_cv_header_$ac_safe=no"
4619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4620 echo "$ac_t""yes" 1>&6
4622 cat >> confdefs.h <<\EOF
4623 #define HAVE_MOTIF 1
4626 TOOLKIT_LIBS="-lXm $TOOLKIT_LIBS"
4628 echo "$ac_t""no" 1>&6
4631 CPPFLAGS="$ac_save_CPPFLAGS"
4638 ac_save_CPPFLAGS="$CPPFLAGS"
4639 if test \! -z "$includedir" ; then
4640 CPPFLAGS="$CPPFLAGS -I$includedir"
4642 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4643 ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
4644 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
4645 echo "configure:4657: checking for X11/Xaw/Dialog.h" >&5
4646 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4647 echo $ac_n "(cached) $ac_c" 1>&6
4649 cat > conftest.$ac_ext <<EOF
4650 #line 4662 "configure"
4651 #include "confdefs.h"
4652 #include <X11/Xaw/Dialog.h>
4654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4655 { (eval echo configure:4667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4656 ac_err=`grep -v '^ *+' conftest.out`
4657 if test -z "$ac_err"; then
4659 eval "ac_cv_header_$ac_safe=yes"
4662 echo "configure: failed program was:" >&5
4663 cat conftest.$ac_ext >&5
4665 eval "ac_cv_header_$ac_safe=no"
4669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4670 echo "$ac_t""yes" 1>&6
4673 echo "$ac_t""no" 1>&6
4676 CPPFLAGS="$ac_save_CPPFLAGS"
4677 if test "$have_athena" = yes; then
4679 ac_save_CPPFLAGS="$CPPFLAGS"
4680 ac_save_LDFLAGS="$LDFLAGS"
4682 if test \! -z "$includedir" ; then
4683 CPPFLAGS="$CPPFLAGS -I$includedir"
4685 # note: $X_CFLAGS includes $x_includes
4686 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4688 if test \! -z "$libdir" ; then
4689 LDFLAGS="$LDFLAGS -L$libdir"
4691 # note: $X_LIBS includes $x_libraries
4692 LDFLAGS="$LDFLAGS $X_LIBS"
4694 echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
4695 echo "configure:4707: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
4696 ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'`
4697 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4698 echo $ac_n "(cached) $ac_c" 1>&6
4700 ac_save_LIBS="$LIBS"
4701 LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
4702 cat > conftest.$ac_ext <<EOF
4703 #line 4715 "configure"
4704 #include "confdefs.h"
4705 /* Override any gcc2 internal prototype to avoid an error. */
4706 /* We use char because int might match the return type of a gcc2
4707 builtin and then its argument prototype would still apply. */
4708 char Xaw3dComputeTopShadowRGB();
4711 Xaw3dComputeTopShadowRGB()
4714 if { (eval echo configure:4726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4716 eval "ac_cv_lib_$ac_lib_var=yes"
4718 echo "configure: failed program was:" >&5
4719 cat conftest.$ac_ext >&5
4721 eval "ac_cv_lib_$ac_lib_var=no"
4724 LIBS="$ac_save_LIBS"
4727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4728 echo "$ac_t""yes" 1>&6
4729 have_athena=yes; have_athena3d=yes
4731 echo "$ac_t""no" 1>&6
4734 CPPFLAGS="$ac_save_CPPFLAGS"
4735 LDFLAGS="$ac_save_LDFLAGS"
4738 if test "$have_athena3d" = yes; then
4739 TOOLKIT_LIBS="-lXaw3d $TOOLKIT_LIBS"
4740 elif test "$have_athena" = yes; then
4741 TOOLKIT_LIBS="-lXaw $TOOLKIT_LIBS"
4746 # If they asked for both motif and athena, check motif then athena.
4747 # If they asked for only motif, check motif then athena.
4748 # If they asked for only athena, check athena then motif.
4749 # If they asked for neither, check motif then athena.
4751 proselytize_motif=yes
4752 if test "$with_motif" = yes; then
4753 # asked for both, or for motif only
4755 if test "$have_motif" = yes; then
4762 elif test "$with_athena" = yes; then
4763 # asked for athena only
4765 if test "$have_athena" = yes; then
4767 proselytize_motif=no
4775 if test "$have_motif" = yes; then
4783 if test "$have_motif" = yes; then
4784 proselytize_motif=no
4787 # If we have Athena, check whether it's a version that includes
4788 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
4789 if test "$have_athena" = yes ; then
4790 echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
4791 echo "configure:4803: checking for XawViewportSetCoordinates in Viewport.h" >&5
4792 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
4793 echo $ac_n "(cached) $ac_c" 1>&6
4795 ac_cv_have_XawViewportSetCoordinates=no
4797 ac_save_CPPFLAGS="$CPPFLAGS"
4798 if test \! -z "$includedir" ; then
4799 CPPFLAGS="$CPPFLAGS -I$includedir"
4801 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4802 cat > conftest.$ac_ext <<EOF
4803 #line 4815 "configure"
4804 #include "confdefs.h"
4805 #include <X11/Xaw/Viewport.h>
4807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4808 egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then
4810 ac_cv_have_XawViewportSetCoordinates=yes
4814 CPPFLAGS="$ac_save_CPPFLAGS"
4817 echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6
4818 if test "$ac_cv_have_XawViewportSetCoordinates" = yes ; then
4819 cat >> confdefs.h <<\EOF
4820 #define HAVE_XawViewportSetCoordinates 1
4827 # If we have Motif, check whether it's really LessTif.
4830 if test "$have_motif" = yes ; then
4831 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
4832 echo "configure:4844: checking whether Motif is really LessTif" >&5
4833 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
4834 echo $ac_n "(cached) $ac_c" 1>&6
4837 ac_save_CPPFLAGS="$CPPFLAGS"
4838 if test \! -z "$includedir" ; then
4839 CPPFLAGS="$CPPFLAGS -I$includedir"
4841 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4842 cat > conftest.$ac_ext <<EOF
4843 #line 4855 "configure"
4844 #include "confdefs.h"
4847 long vers = LesstifVersion;
4850 if { (eval echo configure:4862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4852 ac_cv_have_lesstif=yes
4854 echo "configure: failed program was:" >&5
4855 cat conftest.$ac_ext >&5
4857 ac_cv_have_lesstif=no
4860 CPPFLAGS="$ac_save_CPPFLAGS"
4863 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
4864 have_lesstif=$ac_cv_have_lesstif
4868 unset ac_cv_lesstif_version
4869 unset ac_cv_lesstif_version_string
4871 lesstif_version=unknown
4872 lesstif_version_string=unknown
4874 if test "$have_lesstif" = yes ; then
4876 echo unknown > conftest-lt
4877 echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
4878 echo "configure:4890: checking LessTif version number" >&5
4879 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
4880 echo $ac_n "(cached) $ac_c" 1>&6
4883 ac_save_CPPFLAGS="$CPPFLAGS"
4884 if test \! -z "$includedir" ; then
4885 CPPFLAGS="$CPPFLAGS -I$includedir"
4887 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4888 if test "$cross_compiling" = yes; then
4889 ac_cv_lesstif_version=unknown
4890 ac_cv_lesstif_version_string=unknown
4892 cat > conftest.$ac_ext <<EOF
4893 #line 4905 "configure"
4894 #include "confdefs.h"
4898 FILE *f = fopen("conftest-lt", "w");
4900 fprintf(f, "%d %d.%d\n", LesstifVersion,
4901 LESSTIF_VERSION, LESSTIF_REVISION);
4906 if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4908 ltv=`cat conftest-lt`
4909 ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
4910 ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
4912 echo "configure: failed program was:" >&5
4913 cat conftest.$ac_ext >&5
4915 ac_cv_lesstif_version=unknown
4916 ac_cv_lesstif_version_string=unknown
4921 CPPFLAGS="$ac_save_CPPFLAGS"
4924 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
4926 lesstif_version=$ac_cv_lesstif_version
4927 lesstif_version_string=$ac_cv_lesstif_version_string
4932 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
4933 # Extension". Why this extension isn't in -lXext with all the others,
4937 if test "$have_motif" = yes ; then
4940 ac_save_CPPFLAGS="$CPPFLAGS"
4941 ac_save_LDFLAGS="$LDFLAGS"
4943 if test \! -z "$includedir" ; then
4944 CPPFLAGS="$CPPFLAGS -I$includedir"
4946 # note: $X_CFLAGS includes $x_includes
4947 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4949 if test \! -z "$libdir" ; then
4950 LDFLAGS="$LDFLAGS -L$libdir"
4952 # note: $X_LIBS includes $x_libraries
4953 LDFLAGS="$LDFLAGS $X_LIBS"
4955 echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
4956 echo "configure:4968: checking for XpQueryExtension in -lXp" >&5
4957 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
4958 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4959 echo $ac_n "(cached) $ac_c" 1>&6
4961 ac_save_LIBS="$LIBS"
4962 LIBS="-lXp -lX11 -lXext -lm $LIBS"
4963 cat > conftest.$ac_ext <<EOF
4964 #line 4976 "configure"
4965 #include "confdefs.h"
4966 /* Override any gcc2 internal prototype to avoid an error. */
4967 /* We use char because int might match the return type of a gcc2
4968 builtin and then its argument prototype would still apply. */
4969 char XpQueryExtension();
4975 if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4977 eval "ac_cv_lib_$ac_lib_var=yes"
4979 echo "configure: failed program was:" >&5
4980 cat conftest.$ac_ext >&5
4982 eval "ac_cv_lib_$ac_lib_var=no"
4985 LIBS="$ac_save_LIBS"
4988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4989 echo "$ac_t""yes" 1>&6
4990 have_xp_ext=yes; TOOLKIT_LIBS="$TOOLKIT_LIBS -lXp"
4992 echo "$ac_t""no" 1>&6
4995 CPPFLAGS="$ac_save_CPPFLAGS"
4996 LDFLAGS="$ac_save_LDFLAGS"
5000 # check for XPM header.
5003 with_xpm_req=unspecified
5004 # Check whether --with-xpm or --without-xpm was given.
5005 if test "${with_xpm+set}" = set; then
5007 with_xpm="$withval"; with_xpm_req="$withval"
5019 echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
5020 echo "configure:5032: checking for XPM headers" >&5
5023 X_CFLAGS="-I$d $X_CFLAGS"
5024 echo "$ac_t""$d" 1>&6
5026 echo "$ac_t""not found ($d: no such directory)" 1>&6
5029 echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
5030 echo "configure:5042: checking for XPM libs" >&5
5033 X_LIBS="-L$d $X_LIBS"
5034 echo "$ac_t""$d" 1>&6
5036 echo "$ac_t""not found ($d: no such directory)" 1>&6
5039 # replace the directory string with "yes".
5041 with_xpm=$with_xpm_req
5046 echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
5047 echo " If it is a directory, then \`DIR/include' will be added to"
5048 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5053 # why is this necessary?
5054 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5055 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5059 if test "$with_xpm" = yes; then
5061 ac_save_CPPFLAGS="$CPPFLAGS"
5062 if test \! -z "$includedir" ; then
5063 CPPFLAGS="$CPPFLAGS -I$includedir"
5065 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5066 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
5067 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
5068 echo "configure:5080: checking for X11/xpm.h" >&5
5069 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5070 echo $ac_n "(cached) $ac_c" 1>&6
5072 cat > conftest.$ac_ext <<EOF
5073 #line 5085 "configure"
5074 #include "confdefs.h"
5075 #include <X11/xpm.h>
5077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5078 { (eval echo configure:5090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5079 ac_err=`grep -v '^ *+' conftest.out`
5080 if test -z "$ac_err"; then
5082 eval "ac_cv_header_$ac_safe=yes"
5085 echo "configure: failed program was:" >&5
5086 cat conftest.$ac_ext >&5
5088 eval "ac_cv_header_$ac_safe=no"
5092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5093 echo "$ac_t""yes" 1>&6
5095 cat >> confdefs.h <<\EOF
5101 echo "$ac_t""no" 1>&6
5104 CPPFLAGS="$ac_save_CPPFLAGS"
5105 elif test "$with_xpm" != no; then
5106 echo "error: must be yes or no: --with-xpm=$with_xpm"
5111 # check for the GL header
5115 with_gl_req=unspecified
5116 # Check whether --with-gl or --without-gl was given.
5117 if test "${with_gl+set}" = set; then
5119 with_gl="$withval"; with_gl_req="$withval"
5131 echo $ac_n "checking for GL headers""... $ac_c" 1>&6
5132 echo "configure:5144: checking for GL headers" >&5
5135 X_CFLAGS="-I$d $X_CFLAGS"
5136 echo "$ac_t""$d" 1>&6
5138 echo "$ac_t""not found ($d: no such directory)" 1>&6
5141 echo $ac_n "checking for GL libs""... $ac_c" 1>&6
5142 echo "configure:5154: checking for GL libs" >&5
5145 X_LIBS="-L$d $X_LIBS"
5146 echo "$ac_t""$d" 1>&6
5148 echo "$ac_t""not found ($d: no such directory)" 1>&6
5151 # replace the directory string with "yes".
5153 with_gl=$with_gl_req
5158 echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
5159 echo " If it is a directory, then \`DIR/include' will be added to"
5160 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5165 # why is this necessary?
5166 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5167 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5171 ac_mesagl_version=unknown
5172 ac_mesagl_version_string=unknown
5174 if test "$with_gl" = yes; then
5176 ac_save_CPPFLAGS="$CPPFLAGS"
5177 if test \! -z "$includedir" ; then
5178 CPPFLAGS="$CPPFLAGS -I$includedir"
5180 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5181 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
5182 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
5183 echo "configure:5195: checking for GL/gl.h" >&5
5184 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5185 echo $ac_n "(cached) $ac_c" 1>&6
5187 cat > conftest.$ac_ext <<EOF
5188 #line 5200 "configure"
5189 #include "confdefs.h"
5192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5193 { (eval echo configure:5205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5194 ac_err=`grep -v '^ *+' conftest.out`
5195 if test -z "$ac_err"; then
5197 eval "ac_cv_header_$ac_safe=yes"
5200 echo "configure: failed program was:" >&5
5201 cat conftest.$ac_ext >&5
5203 eval "ac_cv_header_$ac_safe=no"
5207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5208 echo "$ac_t""yes" 1>&6
5211 echo "$ac_t""no" 1>&6
5214 CPPFLAGS="$ac_save_CPPFLAGS"
5215 if test "$have_gl" = yes ; then
5217 ac_save_CPPFLAGS="$CPPFLAGS"
5218 if test \! -z "$includedir" ; then
5219 CPPFLAGS="$CPPFLAGS -I$includedir"
5221 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5222 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
5223 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
5224 echo "configure:5236: checking for GL/glx.h" >&5
5225 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5226 echo $ac_n "(cached) $ac_c" 1>&6
5228 cat > conftest.$ac_ext <<EOF
5229 #line 5241 "configure"
5230 #include "confdefs.h"
5233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5234 { (eval echo configure:5246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5235 ac_err=`grep -v '^ *+' conftest.out`
5236 if test -z "$ac_err"; then
5238 eval "ac_cv_header_$ac_safe=yes"
5241 echo "configure: failed program was:" >&5
5242 cat conftest.$ac_ext >&5
5244 eval "ac_cv_header_$ac_safe=no"
5248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5249 echo "$ac_t""yes" 1>&6
5252 echo "$ac_t""no" 1>&6
5255 CPPFLAGS="$ac_save_CPPFLAGS"
5258 # If we have the headers, try and figure out which vendor it's from.
5260 if test "$have_gl" = yes ; then
5262 cat >> confdefs.h <<\EOF
5267 # We need to know whether it's MesaGL so that we know which libraries
5270 echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
5271 echo "configure:5283: checking whether GL is really MesaGL" >&5
5272 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
5273 echo $ac_n "(cached) $ac_c" 1>&6
5275 ac_cv_have_mesa_gl=no
5277 ac_save_CPPFLAGS="$CPPFLAGS"
5278 if test \! -z "$includedir" ; then
5279 CPPFLAGS="$CPPFLAGS -I$includedir"
5281 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5282 cat > conftest.$ac_ext <<EOF
5283 #line 5295 "configure"
5284 #include "confdefs.h"
5287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5288 egrep "Mesa" >/dev/null 2>&1; then
5290 ac_cv_have_mesa_gl=yes
5294 CPPFLAGS="$ac_save_CPPFLAGS"
5298 ac_have_mesa_gl=$ac_cv_have_mesa_gl
5299 echo "$ac_t""$ac_have_mesa_gl" 1>&6
5301 if test "$ac_have_mesa_gl" = no ; then
5303 GL_LIBS="-lGL -lGLU"
5305 cat >> confdefs.h <<\EOF
5306 #define HAVE_MESA_GL 1
5310 GL_LIBS="-lMesaGL -lMesaGLU"
5314 # If it's MesaGL, we'd like to issue a warning if the version number
5315 # is less than or equal to 2.6, because that version had a security bug.
5317 if test "$ac_have_mesa_gl" = yes; then
5319 # don't cache these.
5320 unset ac_cv_mesagl_version
5321 unset ac_cv_mesagl_version_string
5323 echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
5324 echo "configure:5336: checking MesaGL version number" >&5
5325 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
5326 echo $ac_n "(cached) $ac_c" 1>&6
5328 cat > conftest.$ac_ext <<EOF
5329 #line 5341 "configure"
5330 #include "confdefs.h"
5332 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
5335 ac_save_CPPFLAGS="$CPPFLAGS"
5336 if test \! -z "$includedir" ; then
5337 CPPFLAGS="$CPPFLAGS -I$includedir"
5339 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5343 mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
5344 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
5347 rm -f conftest.$ac_ext
5349 CPPFLAGS="$ac_save_CPPFLAGS"
5351 if test "$mglv" = ""; then
5352 ac_mesagl_version=unknown
5353 ac_mesagl_version_string=unknown
5355 ac_mesagl_version_string=$mglv
5356 maj=`echo $mglv | sed -n 's/\..*//p'`
5357 min=`echo $mglv | sed -n 's/.*\.//p'`
5358 ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
5359 if test -z "$ac_mesagl_version"; then
5360 ac_mesagl_version=unknown
5361 ac_mesagl_version_string=unknown
5364 ac_cv_mesagl_version=$ac_mesagl_version
5365 ac_cv_mesagl_version_string=$ac_mesagl_version_string
5369 ac_mesagl_version=$ac_cv_mesagl_version
5370 ac_mesagl_version_string=$ac_cv_mesagl_version_string
5371 echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
5375 # Check for OpenGL 1.1 features.
5378 ac_save_CPPFLAGS="$CPPFLAGS"
5379 ac_save_LDFLAGS="$LDFLAGS"
5381 if test \! -z "$includedir" ; then
5382 CPPFLAGS="$CPPFLAGS -I$includedir"
5384 # note: $X_CFLAGS includes $x_includes
5385 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5387 if test \! -z "$libdir" ; then
5388 LDFLAGS="$LDFLAGS -L$libdir"
5390 # note: $X_LIBS includes $x_libraries
5391 LDFLAGS="$LDFLAGS $X_LIBS"
5393 echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
5394 echo "configure:5406: checking for glBindTexture in -l$gl_lib_1" >&5
5395 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
5396 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5397 echo $ac_n "(cached) $ac_c" 1>&6
5399 ac_save_LIBS="$LIBS"
5400 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
5401 cat > conftest.$ac_ext <<EOF
5402 #line 5414 "configure"
5403 #include "confdefs.h"
5404 /* Override any gcc2 internal prototype to avoid an error. */
5405 /* We use char because int might match the return type of a gcc2
5406 builtin and then its argument prototype would still apply. */
5407 char glBindTexture();
5413 if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5415 eval "ac_cv_lib_$ac_lib_var=yes"
5417 echo "configure: failed program was:" >&5
5418 cat conftest.$ac_ext >&5
5420 eval "ac_cv_lib_$ac_lib_var=no"
5423 LIBS="$ac_save_LIBS"
5426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5427 echo "$ac_t""yes" 1>&6
5428 cat >> confdefs.h <<\EOF
5429 #define HAVE_GLBINDTEXTURE 1
5433 echo "$ac_t""no" 1>&6
5436 CPPFLAGS="$ac_save_CPPFLAGS"
5437 LDFLAGS="$ac_save_LDFLAGS"
5441 elif test "$with_gl" != no; then
5442 echo "error: must be yes or no: --with-gl=$with_gl"
5447 # check for SGI XReadDisplay server extension header.
5450 with_readdisplay_req=unspecified
5451 # Check whether --with-readdisplay or --without-readdisplay was given.
5452 if test "${with_readdisplay+set}" = set; then
5453 withval="$with_readdisplay"
5454 with_readdisplay="$withval"; with_readdisplay_req="$withval"
5456 with_readdisplay=yes
5461 case "$with_readdisplay" in
5466 echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
5467 echo "configure:5479: checking for XReadDisplay headers" >&5
5468 d=$with_readdisplay/include
5470 X_CFLAGS="-I$d $X_CFLAGS"
5471 echo "$ac_t""$d" 1>&6
5473 echo "$ac_t""not found ($d: no such directory)" 1>&6
5476 echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
5477 echo "configure:5489: checking for XReadDisplay libs" >&5
5478 d=$with_readdisplay/lib
5480 X_LIBS="-L$d $X_LIBS"
5481 echo "$ac_t""$d" 1>&6
5483 echo "$ac_t""not found ($d: no such directory)" 1>&6
5486 # replace the directory string with "yes".
5487 with_readdisplay_req="yes"
5488 with_readdisplay=$with_readdisplay_req
5493 echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
5494 echo " If it is a directory, then \`DIR/include' will be added to"
5495 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5500 # why is this necessary?
5501 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5502 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5506 if test "$with_readdisplay" = yes; then
5508 ac_save_CPPFLAGS="$CPPFLAGS"
5509 if test \! -z "$includedir" ; then
5510 CPPFLAGS="$CPPFLAGS -I$includedir"
5512 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5513 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
5514 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
5515 echo "configure:5527: checking for X11/extensions/readdisplay.h" >&5
5516 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5517 echo $ac_n "(cached) $ac_c" 1>&6
5519 cat > conftest.$ac_ext <<EOF
5520 #line 5532 "configure"
5521 #include "confdefs.h"
5522 #include <X11/extensions/readdisplay.h>
5524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5525 { (eval echo configure:5537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5526 ac_err=`grep -v '^ *+' conftest.out`
5527 if test -z "$ac_err"; then
5529 eval "ac_cv_header_$ac_safe=yes"
5532 echo "configure: failed program was:" >&5
5533 cat conftest.$ac_ext >&5
5535 eval "ac_cv_header_$ac_safe=no"
5539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5540 echo "$ac_t""yes" 1>&6
5541 cat >> confdefs.h <<\EOF
5542 #define HAVE_READ_DISPLAY_EXTENSION 1
5546 echo "$ac_t""no" 1>&6
5549 CPPFLAGS="$ac_save_CPPFLAGS"
5550 elif test "$with_readdisplay" != no; then
5551 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
5556 # check for SGI's Iris Video Library header.
5559 with_sgivideo_req=unspecified
5560 # Check whether --with-sgivideo or --without-sgivideo was given.
5561 if test "${with_sgivideo+set}" = set; then
5562 withval="$with_sgivideo"
5563 with_sgivideo="$withval"; with_sgivideo_req="$withval"
5570 case "$with_sgivideo" in
5575 echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
5576 echo "configure:5588: checking for Iris Video headers" >&5
5577 d=$with_sgivideo/include
5579 X_CFLAGS="-I$d $X_CFLAGS"
5580 echo "$ac_t""$d" 1>&6
5582 echo "$ac_t""not found ($d: no such directory)" 1>&6
5585 echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
5586 echo "configure:5598: checking for Iris Video libs" >&5
5587 d=$with_sgivideo/lib
5589 X_LIBS="-L$d $X_LIBS"
5590 echo "$ac_t""$d" 1>&6
5592 echo "$ac_t""not found ($d: no such directory)" 1>&6
5595 # replace the directory string with "yes".
5596 with_sgivideo_req="yes"
5597 with_sgivideo=$with_sgivideo_req
5602 echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
5603 echo " If it is a directory, then \`DIR/include' will be added to"
5604 echo " the -I list, and \`DIR/lib' will be added to the -L list."
5609 # why is this necessary?
5610 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5611 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5615 if test "$with_sgivideo" = yes; then
5617 ac_save_CPPFLAGS="$CPPFLAGS"
5618 if test \! -z "$includedir" ; then
5619 CPPFLAGS="$CPPFLAGS -I$includedir"
5621 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5622 ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
5623 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
5624 echo "configure:5636: checking for dmedia/vl.h" >&5
5625 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5626 echo $ac_n "(cached) $ac_c" 1>&6
5628 cat > conftest.$ac_ext <<EOF
5629 #line 5641 "configure"
5630 #include "confdefs.h"
5631 #include <dmedia/vl.h>
5633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5634 { (eval echo configure:5646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5635 ac_err=`grep -v '^ *+' conftest.out`
5636 if test -z "$ac_err"; then
5638 eval "ac_cv_header_$ac_safe=yes"
5641 echo "configure: failed program was:" >&5
5642 cat conftest.$ac_ext >&5
5644 eval "ac_cv_header_$ac_safe=no"
5648 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5649 echo "$ac_t""yes" 1>&6
5652 echo "$ac_t""no" 1>&6
5655 CPPFLAGS="$ac_save_CPPFLAGS"
5656 if test "$have_sgivideo" = yes; then
5658 echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
5659 echo "configure:5671: checking for vlOpenVideo in -lvl" >&5
5660 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
5661 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5662 echo $ac_n "(cached) $ac_c" 1>&6
5664 ac_save_LIBS="$LIBS"
5666 cat > conftest.$ac_ext <<EOF
5667 #line 5679 "configure"
5668 #include "confdefs.h"
5669 /* Override any gcc2 internal prototype to avoid an error. */
5670 /* We use char because int might match the return type of a gcc2
5671 builtin and then its argument prototype would still apply. */
5678 if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5680 eval "ac_cv_lib_$ac_lib_var=yes"
5682 echo "configure: failed program was:" >&5
5683 cat conftest.$ac_ext >&5
5685 eval "ac_cv_lib_$ac_lib_var=no"
5688 LIBS="$ac_save_LIBS"
5691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5692 echo "$ac_t""yes" 1>&6
5695 echo "$ac_t""no" 1>&6
5698 if test "$have_sgivideo" = yes; then
5699 SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
5700 SGI_VIDEO_LIBS="-lvl"
5701 cat >> confdefs.h <<\EOF
5702 #define HAVE_SGI_VIDEO 1
5707 elif test "$with_sgivideo" != no; then
5708 echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
5714 # Try to find a program to generate random text.
5716 # Zippy is funnier than the idiocy generally spat out by `fortune',
5717 # so try to find that, by invoking Emacs and asking it where its
5718 # libexec directory is ("yow" lives in there.)
5720 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
5721 # and if so, use them.
5723 # If that doesn't work, look in /usr/games, and if it's there, use
5724 # the full pathname.
5727 # Check whether --with-zippy or --without-zippy was given.
5728 if test "${with_zippy+set}" = set; then
5729 withval="$with_zippy"
5730 with_zippy_req="$withval"; with_zippy="$withval"
5732 with_zippy_req="$withval"; with_zippy="$withval"
5736 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
5741 if test -n "$with_zippy_req" ; then
5742 ac_cv_zippy_program=""
5743 case "$with_zippy_req" in
5745 echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
5746 echo "configure:5758: checking for $with_zippy_req" >&5
5747 if test -x "$with_zippy_req" ; then
5748 echo "$ac_t""yes" 1>&6
5750 echo "$ac_t""no" 1>&6
5756 unset ac_cv_path_zip2
5757 # Extract the first word of "$with_zippy_req", so it can be a program name with args.
5758 set dummy $with_zippy_req; ac_word=$2
5759 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5760 echo "configure:5772: checking for $ac_word" >&5
5761 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
5762 echo $ac_n "(cached) $ac_c" 1>&6
5766 ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
5769 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5770 for ac_dir in $PATH; do
5771 test -z "$ac_dir" && ac_dir=.
5772 if test -f $ac_dir/$ac_word; then
5773 ac_cv_path_zip2="$ac_dir/$ac_word"
5781 zip2="$ac_cv_path_zip2"
5782 if test -n "$zip2"; then
5783 echo "$ac_t""$zip2" 1>&6
5785 echo "$ac_t""no" 1>&6
5788 if test "$zip2" = ""; then
5793 ac_cv_zippy_program="$with_zippy"
5795 elif test -n "$ac_cv_zippy_program"; then
5796 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
5799 if test ! -n "$ac_cv_zippy_program"; then
5801 for ac_prog in emacs
5803 # Extract the first word of "$ac_prog", so it can be a program name with args.
5804 set dummy $ac_prog; ac_word=$2
5805 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5806 echo "configure:5818: checking for $ac_word" >&5
5807 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
5808 echo $ac_n "(cached) $ac_c" 1>&6
5810 if test -n "$emacs_exe"; then
5811 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
5813 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5814 for ac_dir in $PATH; do
5815 test -z "$ac_dir" && ac_dir=.
5816 if test -f $ac_dir/$ac_word; then
5817 ac_cv_prog_emacs_exe="$ac_prog"
5824 emacs_exe="$ac_cv_prog_emacs_exe"
5825 if test -n "$emacs_exe"; then
5826 echo "$ac_t""$emacs_exe" 1>&6
5828 echo "$ac_t""no" 1>&6
5831 test -n "$emacs_exe" && break
5834 for ac_prog in xemacs
5836 # Extract the first word of "$ac_prog", so it can be a program name with args.
5837 set dummy $ac_prog; ac_word=$2
5838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5839 echo "configure:5851: checking for $ac_word" >&5
5840 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
5841 echo $ac_n "(cached) $ac_c" 1>&6
5843 if test -n "$xemacs_exe"; then
5844 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
5846 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5847 for ac_dir in $PATH; do
5848 test -z "$ac_dir" && ac_dir=.
5849 if test -f $ac_dir/$ac_word; then
5850 ac_cv_prog_xemacs_exe="$ac_prog"
5857 xemacs_exe="$ac_cv_prog_xemacs_exe"
5858 if test -n "$xemacs_exe"; then
5859 echo "$ac_t""$xemacs_exe" 1>&6
5861 echo "$ac_t""no" 1>&6
5864 test -n "$xemacs_exe" && break
5868 ac_cv_zippy_program=""
5869 eargs='-batch -q -nw --eval'
5871 if test -n "$emacs_exe" ; then
5872 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
5873 echo "configure:5885: checking for emacs yow" >&5
5875 # get emacs to tell us where the libexec directory is.
5877 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
5878 2>/dev/null | tail -1`
5879 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
5881 # try running libexec/yow and see if it exits without error.
5883 if test x"$dir" != x -a -x "$dir/yow" ; then
5884 if $dir/yow >&- 2>&- ; then
5885 ac_cv_zippy_program="$dir/yow"
5886 echo "$ac_t""$ac_cv_zippy_program" 1>&6
5888 echo "$ac_t""no" 1>&6
5893 if test -z "$ac_cv_zippy_program" ; then
5894 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
5895 echo "configure:5907: checking for xemacs yow" >&5
5896 if test -n "$xemacs_exe" ; then
5898 # get xemacs to tell us where the libexec directory is.
5900 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
5901 2>/dev/null | tail -1`
5902 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
5904 # try running libexec/yow and see if it exits without error.
5906 if test x"$dir" != x -a -x "$dir/yow" ; then
5907 if $dir/yow >&- 2>&- ; then
5908 ac_cv_zippy_program="$dir/yow"
5909 echo "$ac_t""$ac_cv_zippy_program" 1>&6
5912 # in some xemacs installations, the pathname of the yow.lines file
5913 # isn't hardcoded into the yow executable, and must be passed on
5914 # the command line. See if it's in libexec/../etc/.
5918 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
5921 yow="yow -f $dir_up/etc/yow.lines"
5922 if $dir/$yow >&- 2>&- ; then
5923 ac_cv_zippy_program="$dir/$yow"
5924 echo "$ac_t""$ac_cv_zippy_program" 1>&6
5926 echo "$ac_t""no" 1>&6
5933 # if that didn't work, try for some other programs...
5934 if test -z "$ac_cv_zippy_program" ; then
5936 for ac_prog in fortune zippy yow
5938 # Extract the first word of "$ac_prog", so it can be a program name with args.
5939 set dummy $ac_prog; ac_word=$2
5940 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5941 echo "configure:5953: checking for $ac_word" >&5
5942 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
5943 echo $ac_n "(cached) $ac_c" 1>&6
5945 if test -n "$fortune"; then
5946 ac_cv_prog_fortune="$fortune" # Let the user override the test.
5948 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5949 for ac_dir in $PATH; do
5950 test -z "$ac_dir" && ac_dir=.
5951 if test -f $ac_dir/$ac_word; then
5952 ac_cv_prog_fortune="$ac_prog"
5959 fortune="$ac_cv_prog_fortune"
5960 if test -n "$fortune"; then
5961 echo "$ac_t""$fortune" 1>&6
5963 echo "$ac_t""no" 1>&6
5966 test -n "$fortune" && break
5969 # if that didn't work, try for those programs in /usr/games...
5970 if test -z "$fortune" ; then
5971 for ac_prog in fortune zippy yow
5973 # Extract the first word of "$ac_prog", so it can be a program name with args.
5974 set dummy $ac_prog; ac_word=$2
5975 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5976 echo "configure:5988: checking for $ac_word" >&5
5977 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
5978 echo $ac_n "(cached) $ac_c" 1>&6
5982 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
5985 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5986 for ac_dir in /usr/games:/usr/local/games$ac_dummy; do
5987 test -z "$ac_dir" && ac_dir=.
5988 if test -f $ac_dir/$ac_word; then
5989 ac_cv_path_fortune="$ac_dir/$ac_word"
5997 fortune="$ac_cv_path_fortune"
5998 if test -n "$fortune"; then
5999 echo "$ac_t""$fortune" 1>&6
6001 echo "$ac_t""no" 1>&6
6004 test -n "$fortune" && break
6006 test -n "$fortune" || fortune="fortune"
6012 if test -z "$ac_cv_zippy_program" ; then
6013 ac_cv_zippy_program=fortune
6016 cat >> confdefs.h <<EOF
6017 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
6024 # Allow locking to be disabled at compile-time.
6027 with_kerberos_req=unspecified
6029 with_shadow_req=unspecified
6031 with_pam_req=unspecified
6034 # Check whether --enable-locking or --disable-locking was given.
6035 if test "${enable_locking+set}" = set; then
6036 enableval="$enable_locking"
6037 enable_locking="$enableval"
6042 if test "$enable_locking" = yes; then
6044 elif test "$enable_locking" = no; then
6045 cat >> confdefs.h <<\EOF
6046 #define NO_LOCKING 1
6050 echo "error: must be yes or no: --enable-locking=$enable_locking"
6056 # Check to see if we can lock Virtual-Terminal switching, but allow that
6057 # to be disabled at compile-time.
6060 # Check whether --enable-vt-locking or --disable-vt-locking was given.
6061 if test "${enable_vt_locking+set}" = set; then
6062 enableval="$enable_vt_locking"
6063 enable_vt_locking="$enableval"
6065 enable_vt_locking=yes
6068 if test "$enable_vt_locking" = yes; then
6070 echo $ac_n "checking for the VT_LOCKSWITCH ioctl""... $ac_c" 1>&6
6071 echo "configure:6083: checking for the VT_LOCKSWITCH ioctl" >&5
6072 if eval "test \"`echo '$''{'ac_cv_vt_lockswitch'+set}'`\" = set"; then
6073 echo $ac_n "(cached) $ac_c" 1>&6
6075 cat > conftest.$ac_ext <<EOF
6076 #line 6088 "configure"
6077 #include "confdefs.h"
6079 #include <sys/ioctl.h>
6082 int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;
6085 if { (eval echo configure:6097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6087 ac_cv_vt_lockswitch=yes
6089 echo "configure: failed program was:" >&5
6090 cat conftest.$ac_ext >&5
6092 ac_cv_vt_lockswitch=no
6097 ac_vt_lockswitch=$ac_cv_vt_lockswitch
6098 echo "$ac_t""$ac_vt_lockswitch" 1>&6
6100 elif test "$enable_locking" = no; then
6103 echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
6107 if test "$ac_vt_lockswitch" = yes; then
6108 cat >> confdefs.h <<\EOF
6109 #define HAVE_VT_LOCKSWITCH 1
6112 # the VT_LOCKSWITCH ioctl can only be used when running as root.
6113 # #### but it doesn't work yet, so don't worry about that for now.
6119 if test "$enable_locking" = yes; then
6121 # Check for Kerberos.
6123 # Check whether --with-kerberos or --without-kerberos was given.
6124 if test "${with_kerberos+set}" = set; then
6125 withval="$with_kerberos"
6126 with_kerberos="$withval"; with_kerberos_req="$withval"
6133 case "$with_kerberos" in
6138 echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
6139 echo "configure:6151: checking for Kerberos headers" >&5
6140 d=$with_kerberos/include
6142 X_CFLAGS="-I$d $X_CFLAGS"
6143 echo "$ac_t""$d" 1>&6
6145 echo "$ac_t""not found ($d: no such directory)" 1>&6
6148 echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
6149 echo "configure:6161: checking for Kerberos libs" >&5
6150 d=$with_kerberos/lib
6152 X_LIBS="-L$d $X_LIBS"
6153 echo "$ac_t""$d" 1>&6
6155 echo "$ac_t""not found ($d: no such directory)" 1>&6
6158 # replace the directory string with "yes".
6159 with_kerberos_req="yes"
6160 with_kerberos=$with_kerberos_req
6165 echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
6166 echo " If it is a directory, then \`DIR/include' will be added to"
6167 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6172 # why is this necessary?
6173 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6174 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6178 if test "$with_kerberos" = yes; then
6179 echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
6180 echo "configure:6192: checking for Kerberos" >&5
6181 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
6182 echo $ac_n "(cached) $ac_c" 1>&6
6185 ac_save_CPPFLAGS="$CPPFLAGS"
6186 if test \! -z "$includedir" ; then
6187 CPPFLAGS="$CPPFLAGS -I$includedir"
6189 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6190 cat > conftest.$ac_ext <<EOF
6191 #line 6203 "configure"
6192 #include "confdefs.h"
6198 if { (eval echo configure:6210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6202 echo "configure: failed program was:" >&5
6203 cat conftest.$ac_ext >&5
6208 CPPFLAGS="$ac_save_CPPFLAGS"
6211 echo "$ac_t""$ac_cv_kerberos" 1>&6
6212 if test "$ac_cv_kerberos" = yes ; then
6214 cat >> confdefs.h <<\EOF
6215 #define HAVE_KERBEROS 1
6219 # from Tim Showalter <tjs+@andrew.cmu.edu>
6220 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
6221 echo $ac_n "checking for res_search""... $ac_c" 1>&6
6222 echo "configure:6234: checking for res_search" >&5
6223 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
6224 echo $ac_n "(cached) $ac_c" 1>&6
6226 cat > conftest.$ac_ext <<EOF
6227 #line 6239 "configure"
6228 #include "confdefs.h"
6229 /* System header to define __stub macros and hopefully few prototypes,
6230 which can conflict with char res_search(); below. */
6232 /* Override any gcc2 internal prototype to avoid an error. */
6233 /* We use char because int might match the return type of a gcc2
6234 builtin and then its argument prototype would still apply. */
6239 /* The GNU C library defines this for functions which it implements
6240 to always fail with ENOSYS. Some functions are actually named
6241 something starting with __ and the normal name is an alias. */
6242 #if defined (__stub_res_search) || defined (__stub___res_search)
6250 if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6252 eval "ac_cv_func_res_search=yes"
6254 echo "configure: failed program was:" >&5
6255 cat conftest.$ac_ext >&5
6257 eval "ac_cv_func_res_search=no"
6262 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
6263 echo "$ac_t""yes" 1>&6
6266 echo "$ac_t""no" 1>&6
6267 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
6268 echo "configure:6280: checking for res_search in -lresolv" >&5
6269 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
6270 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6271 echo $ac_n "(cached) $ac_c" 1>&6
6273 ac_save_LIBS="$LIBS"
6274 LIBS="-lresolv $LIBS"
6275 cat > conftest.$ac_ext <<EOF
6276 #line 6288 "configure"
6277 #include "confdefs.h"
6278 /* Override any gcc2 internal prototype to avoid an error. */
6279 /* We use char because int might match the return type of a gcc2
6280 builtin and then its argument prototype would still apply. */
6287 if { (eval echo configure:6299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6289 eval "ac_cv_lib_$ac_lib_var=yes"
6291 echo "configure: failed program was:" >&5
6292 cat conftest.$ac_ext >&5
6294 eval "ac_cv_lib_$ac_lib_var=no"
6297 LIBS="$ac_save_LIBS"
6300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6301 echo "$ac_t""yes" 1>&6
6302 PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
6304 echo "$ac_t""no" 1>&6
6305 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
6313 elif test "$with_kerberos" != no; then
6314 echo "error: must be yes or no: --with-kerberos=$with_kerberos"
6319 # Check whether --with-pam or --without-pam was given.
6320 if test "${with_pam+set}" = set; then
6322 with_pam="$withval"; with_pam_req="$withval"
6327 #### Leave PAM off by default for now, since it's buggy on Solaris
6328 #### (and probably Linux, but it's so hard to tell...)
6336 echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
6337 echo "configure:6349: checking for PAM headers" >&5
6340 X_CFLAGS="-I$d $X_CFLAGS"
6341 echo "$ac_t""$d" 1>&6
6343 echo "$ac_t""not found ($d: no such directory)" 1>&6
6346 echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
6347 echo "configure:6359: checking for PAM libs" >&5
6350 X_LIBS="-L$d $X_LIBS"
6351 echo "$ac_t""$d" 1>&6
6353 echo "$ac_t""not found ($d: no such directory)" 1>&6
6356 # replace the directory string with "yes".
6358 with_pam=$with_pam_req
6363 echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
6364 echo " If it is a directory, then \`DIR/include' will be added to"
6365 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6370 # why is this necessary?
6371 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6372 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6376 if test "$with_pam" = yes; then
6377 echo $ac_n "checking for PAM""... $ac_c" 1>&6
6378 echo "configure:6390: checking for PAM" >&5
6379 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
6380 echo $ac_n "(cached) $ac_c" 1>&6
6383 ac_save_CPPFLAGS="$CPPFLAGS"
6384 if test \! -z "$includedir" ; then
6385 CPPFLAGS="$CPPFLAGS -I$includedir"
6387 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6388 cat > conftest.$ac_ext <<EOF
6389 #line 6401 "configure"
6390 #include "confdefs.h"
6391 #include <security/pam_appl.h>
6396 if { (eval echo configure:6408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6400 echo "configure: failed program was:" >&5
6401 cat conftest.$ac_ext >&5
6406 CPPFLAGS="$ac_save_CPPFLAGS"
6409 echo "$ac_t""$ac_cv_pam" 1>&6
6410 if test "$ac_cv_pam" = yes ; then
6412 cat >> confdefs.h <<\EOF
6416 PASSWD_LIBS="${PASSWD_LIBS} -lpam -ldl"
6418 elif test "$with_pam" != no; then
6419 echo "error: must be yes or no: --with-pam=$with_pam"
6423 # Next, check for the nine billion variants of shadow passwords...
6426 # Check whether --with-shadow or --without-shadow was given.
6427 if test "${with_shadow+set}" = set; then
6428 withval="$with_shadow"
6429 with_shadow="$withval"; with_shadow_req="$withval"
6436 case "$with_shadow" in
6441 echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
6442 echo "configure:6454: checking for shadow password headers" >&5
6443 d=$with_shadow/include
6445 X_CFLAGS="-I$d $X_CFLAGS"
6446 echo "$ac_t""$d" 1>&6
6448 echo "$ac_t""not found ($d: no such directory)" 1>&6
6451 echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
6452 echo "configure:6464: checking for shadow password libs" >&5
6455 X_LIBS="-L$d $X_LIBS"
6456 echo "$ac_t""$d" 1>&6
6458 echo "$ac_t""not found ($d: no such directory)" 1>&6
6461 # replace the directory string with "yes".
6462 with_shadow_req="yes"
6463 with_shadow=$with_shadow_req
6468 echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
6469 echo " If it is a directory, then \`DIR/include' will be added to"
6470 echo " the -I list, and \`DIR/lib' will be added to the -L list."
6475 # why is this necessary?
6476 # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6477 # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6481 if test "$with_shadow" = no; then
6482 pwent_cruft_done=yes
6483 elif test "$with_shadow" != yes; then
6484 echo "error: must be yes or no: --with-shadow=$with_shadow"
6489 # Sun's "adjunct" passwords.
6491 if test "$pwent_cruft_done" = no ; then
6492 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
6493 echo "configure:6505: checking for Sun-style shadow passwords" >&5
6494 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
6495 echo $ac_n "(cached) $ac_c" 1>&6
6498 ac_save_CPPFLAGS="$CPPFLAGS"
6499 if test \! -z "$includedir" ; then
6500 CPPFLAGS="$CPPFLAGS -I$includedir"
6502 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6503 cat > conftest.$ac_ext <<EOF
6504 #line 6516 "configure"
6505 #include "confdefs.h"
6508 #include <sys/types.h>
6509 #include <sys/label.h>
6510 #include <sys/audit.h>
6513 struct passwd_adjunct *p = getpwanam("nobody");
6514 const char *pw = p->pwa_passwd;
6517 if { (eval echo configure:6529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6519 ac_cv_sun_adjunct=yes
6521 echo "configure: failed program was:" >&5
6522 cat conftest.$ac_ext >&5
6524 ac_cv_sun_adjunct=no
6527 CPPFLAGS="$ac_save_CPPFLAGS"
6530 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
6531 if test "$ac_cv_sun_adjunct" = yes; then
6534 pwent_cruft_done=yes
6535 cat >> confdefs.h <<\EOF
6536 #define HAVE_ADJUNCT_PASSWD 1
6542 # DEC and SCO so-called "enhanced" security.
6544 if test "$pwent_cruft_done" = no ; then
6545 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
6546 echo "configure:6558: checking for DEC-style shadow passwords" >&5
6547 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
6548 echo $ac_n "(cached) $ac_c" 1>&6
6551 ac_save_CPPFLAGS="$CPPFLAGS"
6552 if test \! -z "$includedir" ; then
6553 CPPFLAGS="$CPPFLAGS -I$includedir"
6555 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6556 cat > conftest.$ac_ext <<EOF
6557 #line 6569 "configure"
6558 #include "confdefs.h"
6561 #include <sys/types.h>
6563 #include <sys/security.h>
6566 struct pr_passwd *p;
6568 set_auth_parameters(0, 0);
6569 check_auth_parameters();
6570 p = getprpwnam("nobody");
6571 pw = p->ufld.fd_encrypt;
6574 if { (eval echo configure:6586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6576 ac_cv_enhanced_passwd=yes
6578 echo "configure: failed program was:" >&5
6579 cat conftest.$ac_ext >&5
6581 ac_cv_enhanced_passwd=no
6584 CPPFLAGS="$ac_save_CPPFLAGS"
6587 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
6588 if test $ac_cv_enhanced_passwd = yes; then
6591 pwent_cruft_done=yes
6592 cat >> confdefs.h <<\EOF
6593 #define HAVE_ENHANCED_PASSWD 1
6597 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
6598 # (I'm told it needs -lcurses too, but I don't understand why.)
6599 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
6600 echo "configure:6612: checking for getprpwnam in -lprot" >&5
6601 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
6602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6603 echo $ac_n "(cached) $ac_c" 1>&6
6605 ac_save_LIBS="$LIBS"
6606 LIBS="-lprot -lx $LIBS"
6607 cat > conftest.$ac_ext <<EOF
6608 #line 6620 "configure"
6609 #include "confdefs.h"
6610 /* Override any gcc2 internal prototype to avoid an error. */
6611 /* We use char because int might match the return type of a gcc2
6612 builtin and then its argument prototype would still apply. */
6619 if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6621 eval "ac_cv_lib_$ac_lib_var=yes"
6623 echo "configure: failed program was:" >&5
6624 cat conftest.$ac_ext >&5
6626 eval "ac_cv_lib_$ac_lib_var=no"
6629 LIBS="$ac_save_LIBS"
6632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6633 echo "$ac_t""yes" 1>&6
6634 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
6636 echo "$ac_t""no" 1>&6
6637 # On DEC, getprpwnam() is in -lsecurity
6638 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
6639 echo "configure:6651: checking for getprpwnam in -lsecurity" >&5
6640 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
6641 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6642 echo $ac_n "(cached) $ac_c" 1>&6
6644 ac_save_LIBS="$LIBS"
6645 LIBS="-lsecurity $LIBS"
6646 cat > conftest.$ac_ext <<EOF
6647 #line 6659 "configure"
6648 #include "confdefs.h"
6649 /* Override any gcc2 internal prototype to avoid an error. */
6650 /* We use char because int might match the return type of a gcc2
6651 builtin and then its argument prototype would still apply. */
6658 if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6660 eval "ac_cv_lib_$ac_lib_var=yes"
6662 echo "configure: failed program was:" >&5
6663 cat conftest.$ac_ext >&5
6665 eval "ac_cv_lib_$ac_lib_var=no"
6668 LIBS="$ac_save_LIBS"
6671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6672 echo "$ac_t""yes" 1>&6
6673 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
6675 echo "$ac_t""no" 1>&6
6683 # HP's entry in the "Not Invented Here" Sweepstakes.
6685 if test "$pwent_cruft_done" = no ; then
6686 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
6687 echo "configure:6699: checking for HP-style shadow passwords" >&5
6688 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
6689 echo $ac_n "(cached) $ac_c" 1>&6
6692 ac_save_CPPFLAGS="$CPPFLAGS"
6693 if test \! -z "$includedir" ; then
6694 CPPFLAGS="$CPPFLAGS -I$includedir"
6696 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6697 cat > conftest.$ac_ext <<EOF
6698 #line 6710 "configure"
6699 #include "confdefs.h"
6702 #include <sys/types.h>
6704 #include <hpsecurity.h>
6707 struct s_passwd *p = getspwnam("nobody");
6708 const char *pw = p->pw_passwd;
6711 if { (eval echo configure:6723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6713 ac_cv_hpux_passwd=yes
6715 echo "configure: failed program was:" >&5
6716 cat conftest.$ac_ext >&5
6718 ac_cv_hpux_passwd=no
6721 CPPFLAGS="$ac_save_CPPFLAGS"
6724 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
6725 if test "$ac_cv_hpux_passwd" = yes; then
6728 pwent_cruft_done=yes
6729 cat >> confdefs.h <<\EOF
6730 #define HAVE_HPUX_PASSWD 1
6734 # on HPUX, bigcrypt is in -lsec
6735 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
6736 echo "configure:6748: checking for bigcrypt in -lsec" >&5
6737 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
6738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6739 echo $ac_n "(cached) $ac_c" 1>&6
6741 ac_save_LIBS="$LIBS"
6743 cat > conftest.$ac_ext <<EOF
6744 #line 6756 "configure"
6745 #include "confdefs.h"
6746 /* Override any gcc2 internal prototype to avoid an error. */
6747 /* We use char because int might match the return type of a gcc2
6748 builtin and then its argument prototype would still apply. */
6755 if { (eval echo configure:6767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6757 eval "ac_cv_lib_$ac_lib_var=yes"
6759 echo "configure: failed program was:" >&5
6760 cat conftest.$ac_ext >&5
6762 eval "ac_cv_lib_$ac_lib_var=no"
6765 LIBS="$ac_save_LIBS"
6768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6769 echo "$ac_t""yes" 1>&6
6770 PASSWD_LIBS="$PASSWD_LIBS -lsec"
6772 echo "$ac_t""no" 1>&6
6778 # Traditional (ha!) shadow passwords.
6780 if test "$pwent_cruft_done" = no ; then
6781 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
6782 echo "configure:6794: checking for generic shadow passwords" >&5
6783 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
6784 echo $ac_n "(cached) $ac_c" 1>&6
6787 ac_save_CPPFLAGS="$CPPFLAGS"
6788 if test \! -z "$includedir" ; then
6789 CPPFLAGS="$CPPFLAGS -I$includedir"
6791 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6792 cat > conftest.$ac_ext <<EOF
6793 #line 6805 "configure"
6794 #include "confdefs.h"
6797 #include <sys/types.h>
6801 struct spwd *p = getspnam("nobody");
6802 const char *pw = p->sp_pwdp;
6805 if { (eval echo configure:6817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6809 echo "configure: failed program was:" >&5
6810 cat conftest.$ac_ext >&5
6815 CPPFLAGS="$ac_save_CPPFLAGS"
6818 echo "$ac_t""$ac_cv_shadow" 1>&6
6819 if test "$ac_cv_shadow" = yes; then
6822 pwent_cruft_done=yes
6823 cat >> confdefs.h <<\EOF
6824 #define HAVE_SHADOW_PASSWD 1
6828 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
6830 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
6831 echo "configure:6843: checking for getspnam in -lc" >&5
6832 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
6833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6834 echo $ac_n "(cached) $ac_c" 1>&6
6836 ac_save_LIBS="$LIBS"
6838 cat > conftest.$ac_ext <<EOF
6839 #line 6851 "configure"
6840 #include "confdefs.h"
6841 /* Override any gcc2 internal prototype to avoid an error. */
6842 /* We use char because int might match the return type of a gcc2
6843 builtin and then its argument prototype would still apply. */
6850 if { (eval echo configure:6862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6852 eval "ac_cv_lib_$ac_lib_var=yes"
6854 echo "configure: failed program was:" >&5
6855 cat conftest.$ac_ext >&5
6857 eval "ac_cv_lib_$ac_lib_var=no"
6860 LIBS="$ac_save_LIBS"
6863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6864 echo "$ac_t""yes" 1>&6
6867 echo "$ac_t""no" 1>&6
6870 if test "$have_getspnam" = no ; then
6871 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
6872 echo "configure:6884: checking for getspnam in -lgen" >&5
6873 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
6874 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6875 echo $ac_n "(cached) $ac_c" 1>&6
6877 ac_save_LIBS="$LIBS"
6879 cat > conftest.$ac_ext <<EOF
6880 #line 6892 "configure"
6881 #include "confdefs.h"
6882 /* Override any gcc2 internal prototype to avoid an error. */
6883 /* We use char because int might match the return type of a gcc2
6884 builtin and then its argument prototype would still apply. */
6891 if { (eval echo configure:6903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6893 eval "ac_cv_lib_$ac_lib_var=yes"
6895 echo "configure: failed program was:" >&5
6896 cat conftest.$ac_ext >&5
6898 eval "ac_cv_lib_$ac_lib_var=no"
6901 LIBS="$ac_save_LIBS"
6904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6905 echo "$ac_t""yes" 1>&6
6906 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
6908 echo "$ac_t""no" 1>&6
6915 # On FreeBSD, getpwnam() and friends work just like on non-shadow-password
6916 # systems -- except you only get stuff in the pw_passwd field if the running
6917 # program is setuid. So, guess that we've got this lossage to contend with
6918 # if /etc/master.passwd exists, and default to a setuid installation.
6920 if test "$pwent_cruft_done" = no ; then
6921 echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
6922 echo "configure:6934: checking for FreeBSD-style shadow passwords" >&5
6923 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
6924 echo $ac_n "(cached) $ac_c" 1>&6
6926 if test -f /etc/master.passwd ; then
6927 ac_cv_master_passwd=yes
6929 ac_cv_master_passwd=no
6933 echo "$ac_t""$ac_cv_master_passwd" 1>&6
6934 if test "$ac_cv_master_passwd" = yes; then
6936 pwent_cruft_done=yes
6940 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
6942 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
6943 echo "configure:6955: checking for crypt in -lc" >&5
6944 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
6945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6946 echo $ac_n "(cached) $ac_c" 1>&6
6948 ac_save_LIBS="$LIBS"
6950 cat > conftest.$ac_ext <<EOF
6951 #line 6963 "configure"
6952 #include "confdefs.h"
6953 /* Override any gcc2 internal prototype to avoid an error. */
6954 /* We use char because int might match the return type of a gcc2
6955 builtin and then its argument prototype would still apply. */
6962 if { (eval echo configure:6974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6964 eval "ac_cv_lib_$ac_lib_var=yes"
6966 echo "configure: failed program was:" >&5
6967 cat conftest.$ac_ext >&5
6969 eval "ac_cv_lib_$ac_lib_var=no"
6972 LIBS="$ac_save_LIBS"
6975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6976 echo "$ac_t""yes" 1>&6
6979 echo "$ac_t""no" 1>&6
6982 if test "$have_crypt" = no ; then
6983 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6984 echo "configure:6996: checking for crypt in -lcrypt" >&5
6985 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6986 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6987 echo $ac_n "(cached) $ac_c" 1>&6
6989 ac_save_LIBS="$LIBS"
6990 LIBS="-lcrypt $LIBS"
6991 cat > conftest.$ac_ext <<EOF
6992 #line 7004 "configure"
6993 #include "confdefs.h"
6994 /* Override any gcc2 internal prototype to avoid an error. */
6995 /* We use char because int might match the return type of a gcc2
6996 builtin and then its argument prototype would still apply. */
7003 if { (eval echo configure:7015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7005 eval "ac_cv_lib_$ac_lib_var=yes"
7007 echo "configure: failed program was:" >&5
7008 cat conftest.$ac_ext >&5
7010 eval "ac_cv_lib_$ac_lib_var=no"
7013 LIBS="$ac_save_LIBS"
7016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7017 echo "$ac_t""yes" 1>&6
7018 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
7020 echo "$ac_t""no" 1>&6
7026 # Most of the above shadow mechanisms will have set need_setuid to yes,
7027 # if they were found. But, on some systems, we need setuid even when
7028 # using plain old vanilla passwords.
7030 if test "$need_setuid" = no ; then
7032 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
7041 if test \! -z "$includedir" ; then
7042 INCLUDES="-I$includedir"
7045 if test \! -z "$libdir" ; then
7046 LDFLAGS="$LDFLAGS -L$libdir"
7050 ##### should have options to override the DEPEND crap, I guess...
7056 # Done testing things -- now substitute in some stuff for the Makefiles.
7058 if test "$have_motif" = yes; then
7059 cat >> confdefs.h <<\EOF
7060 #define HAVE_MOTIF 1
7063 TOOLKIT_SRCS='$(MOTIF_SRCS)'
7064 TOOLKIT_OBJS='$(MOTIF_OBJS)'
7065 elif test "$have_athena" = yes; then
7066 cat >> confdefs.h <<\EOF
7067 #define HAVE_ATHENA 1
7070 TOOLKIT_SRCS='$(ATHENA_SRCS)'
7071 TOOLKIT_OBJS='$(ATHENA_OBJS)'
7077 if test "$have_kerberos" = yes; then
7078 PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
7079 PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
7081 if test "$have_pam" = yes; then
7082 PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
7083 PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
7084 INSTALL_PAM="install-pam"
7086 PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
7087 PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
7090 if test "$enable_locking" = yes; then
7091 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
7092 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
7098 if test "$need_setuid" = yes; then
7100 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
7103 INSTALL_SETUID='$(INSTALL_PROGRAM)'
7107 if test "$have_gl" = yes; then
7108 GL_EXES='$(GL_EXES)'
7111 GL_KLUDGE=' -'${tab}
7146 # Print some warnings before emitting the Makefiles.
7148 warn_prefix_1=" Warning:"
7149 warn_prefix_2=" Note:"
7150 warn_prefix="$warn_prefix_1"
7153 warnsep=' #################################################################'
7156 if test "$warning" = no ; then
7157 echo '' ; echo "$warnsep" ; echo ''
7164 if test "$warning" = long ; then echo '' ; fi
7166 echo "$warn_prefix $@"
7173 if test "$was" != no ; then echo '' ; fi
7174 echo "$warn_prefix $@"
7183 warn_prefix="$warn_prefix_2"
7185 warn_prefix="$warn_prefix_1"
7189 warn_prefix="$warn_prefix_2"
7191 warn_prefix="$warn_prefix_1"
7195 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
7196 warn 'The SGI saver extension was requested, but was not found.'
7199 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
7200 warn 'The MIT saver extension was requested, but was not found.'
7203 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
7204 warn 'The XIdle extension was requested, but was not found.'
7207 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
7208 warn 'The XSHM extension was requested, but was not found.'
7211 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
7212 warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
7215 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
7216 warn 'The DPMS extension was requested, but was not found.'
7219 if test "$have_motif" = no -a "$have_athena" = no ; then
7220 warnL "Neither Motif nor Athena widgets seem to be available;"
7221 warn2 "the \`xscreensaver-demo' program requires one or the"
7223 proselytize_motif=no
7225 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
7226 warnL "Use of Motif was requested, but it wasn't found;"
7227 warn2 "Athena will be used instead."
7229 elif test "$with_athena_req" = yes -a "$have_athena" = no ; then
7230 warnL "Use of Athena was requested, but it wasn't found;"
7231 warn2 "Motif will be used instead."
7234 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
7236 preferred_lesstif=0.86
7238 if test "$lesstif_version" = unknown; then
7239 warnL "Unable to determine the LessTif version number!"
7240 warn2 "Make sure you are using version $preferred_lesstif or newer."
7241 warn2 "See <http://www.lesstif.org/>."
7243 elif test \! $lesstif_version -gt 82; then
7244 warnL "LessTif version $lesstif_version_string is being used."
7245 warn2 "LessTif versions 0.82 and earlier are too buggy to"
7246 warn2 "use with XScreenSaver; it is strongly recommended"
7247 warn2 "that you upgrade to at least version $preferred_lesstif!"
7248 warn2 "See <http://www.lesstif.org/>."
7252 if test "$proselytize_motif" = yes ; then
7253 warnL "Athena widgets are being used instead of Motif."
7254 warn2 "The \`xscreensaver-demo' program looks much better"
7255 warn2 "with Motif. Wouldn't you rather be using Motif?"
7256 warn2 "It is shipped by every commercial Unix vendor;"
7257 warn2 "and there is a free implementation available as"
7258 warn2 "well: see <http://www.lesstif.org/>."
7262 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
7263 preferred_mesagl=2.7
7265 if test "$ac_mesagl_version" = unknown; then
7266 warnL "Unable to determine the MesaGL version number!"
7267 warn2 "Make sure you are using version $preferred_mesagl or newer."
7269 elif test \! "$ac_mesagl_version" -gt 2006; then
7270 warnL "MesaGL version $ac_mesagl_version_string is being used."
7271 warn2 "MesaGL versions 2.6 and earlier have a security bug."
7272 warn2 "It is strongly recommended that you upgrade to at"
7273 warn2 "least version $preferred_mesagl."
7278 if test "$have_xpm" = no ; then
7279 if test "$with_xpm_req" = yes ; then
7280 warnL 'Use of XPM was requested, but it was not found.'
7281 elif test "$with_xpm_req" = no ; then
7282 noteL 'The XPM library is not being used.'
7284 noteL 'The XPM library was not found.'
7288 warn2 'Some of the demos will not be as colorful as they'
7289 warn2 'could be. You might want to consider installing XPM'
7290 warn2 'and re-running configure. (Remember to delete the'
7291 warn2 'config.cache file first.) You can find XPM at most'
7292 warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
7295 if test "$have_gl" = no ; then
7296 if test "$with_gl_req" = yes ; then
7297 warnL 'Use of GL was requested, but it was not found.'
7298 elif test "$with_gl_req" = no ; then
7299 noteL 'The OpenGL 3D library is not being used.'
7301 noteL 'The OpenGL 3D library was not found.'
7305 warn2 'Those demos which use 3D will not be built or installed.'
7306 warn2 'You might want to consider installing OpenGL and'
7307 warn2 're-running configure. (Remember to delete the'
7308 warn2 "config.cache file first.) If your vendor doesn't ship"
7309 warn2 'their own implementation of OpenGL, you can get a free'
7310 warn2 'version at <http://www.ssec.wisc.edu/~brianp/Mesa.html>.'
7311 warn2 'For general OpenGL info, see <http://www.opengl.org/>.'
7315 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
7316 warn 'Use of XReadDisplay was requested, but it was not found.'
7319 if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
7320 warn 'Use of the Iris Video Library was requested, but it was not found.'
7323 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
7324 warn 'Use of Kerberos was requested, but it was not found.'
7327 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
7328 warn 'Use of PAM was requested, but it was not found.'
7331 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
7332 warn 'Use of shadow passwords was requested, but they were not found.'
7335 if test -n "$with_zippy_req"; then
7336 if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
7337 warnL "$with_zippy_req was requested as the Zippy program,"
7338 warn2 "but was not found. The default will be used instead."
7342 if test "$warning" != no; then
7343 echo '' ; echo "$warnsep" ; echo ''
7348 cat > confcache <<\EOF
7349 # This file is a shell script that caches the results of configure
7350 # tests run on this system so they can be shared between configure
7351 # scripts and configure runs. It is not useful on other systems.
7352 # If it contains results you don't want to keep, you may remove or edit it.
7354 # By default, configure uses ./config.cache as the cache file,
7355 # creating it if it does not exist already. You can give configure
7356 # the --cache-file=FILE option to use a different cache file; that is
7357 # what configure does when it calls configure scripts in
7358 # subdirectories, so they share the cache.
7359 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7360 # config.status only pays attention to the cache file if you give it the
7361 # --recheck option to rerun configure.
7364 # The following way of writing the cache mishandles newlines in values,
7365 # but we know of no workaround that is simple, portable, and efficient.
7366 # So, don't put newlines in cache variables' values.
7367 # Ultrix sh set writes to stderr and can't be redirected directly,
7368 # and sets the high bit in the cache file unless we assign to the vars.
7370 case `(ac_space=' '; set) 2>&1` in
7372 # `set' does not quote correctly, so add quotes (double-quote substitution
7373 # turns \\\\ into \\, and sed turns \\ into \).
7375 -e "s/'/'\\\\''/g" \
7376 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7379 # `set' quotes correctly as required by POSIX, so do not add quotes.
7380 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7383 if cmp -s $cache_file confcache; then
7386 if test -w $cache_file; then
7387 echo "updating cache $cache_file"
7388 cat confcache > $cache_file
7390 echo "not updating unwritable cache $cache_file"
7395 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7397 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7398 # Let make expand exec_prefix.
7399 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7401 # Any assignment to VPATH causes Sun make to only execute
7402 # the first set of double-colon rules, so remove it if not needed.
7403 # If there is a colon in the path, we need to keep it.
7404 if test "x$srcdir" = x.; then
7405 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7408 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7410 DEFS=-DHAVE_CONFIG_H
7412 # Without the "./", some shells look in PATH for config.status.
7413 : ${CONFIG_STATUS=./config.status}
7415 echo creating $CONFIG_STATUS
7416 rm -f $CONFIG_STATUS
7417 cat > $CONFIG_STATUS <<EOF
7419 # Generated automatically by configure.
7420 # Run this file to recreate the current configuration.
7421 # This directory was configured as follows,
7422 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7424 # $0 $ac_configure_args
7426 # Compiler output produced by configure, useful for debugging
7427 # configure, is in ./config.log if it exists.
7429 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7432 case "\$ac_option" in
7433 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7434 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7435 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7436 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7437 echo "$CONFIG_STATUS generated by autoconf version 2.12"
7439 -help | --help | --hel | --he | --h)
7440 echo "\$ac_cs_usage"; exit 0 ;;
7441 *) echo "\$ac_cs_usage"; exit 1 ;;
7445 ac_given_srcdir=$srcdir
7446 ac_given_INSTALL="$INSTALL"
7448 trap 'rm -fr `echo "Makefile
7453 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7455 cat >> $CONFIG_STATUS <<EOF
7457 # Protect against being on the right side of a sed subst in config.status.
7458 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7459 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7462 s%@CFLAGS@%$CFLAGS%g
7463 s%@CPPFLAGS@%$CPPFLAGS%g
7464 s%@CXXFLAGS@%$CXXFLAGS%g
7466 s%@LDFLAGS@%$LDFLAGS%g
7468 s%@exec_prefix@%$exec_prefix%g
7469 s%@prefix@%$prefix%g
7470 s%@program_transform_name@%$program_transform_name%g
7471 s%@bindir@%$bindir%g
7472 s%@sbindir@%$sbindir%g
7473 s%@libexecdir@%$libexecdir%g
7474 s%@datadir@%$datadir%g
7475 s%@sysconfdir@%$sysconfdir%g
7476 s%@sharedstatedir@%$sharedstatedir%g
7477 s%@localstatedir@%$localstatedir%g
7478 s%@libdir@%$libdir%g
7479 s%@includedir@%$includedir%g
7480 s%@oldincludedir@%$oldincludedir%g
7481 s%@infodir@%$infodir%g
7482 s%@mandir@%$mandir%g
7484 s%@host_alias@%$host_alias%g
7485 s%@host_cpu@%$host_cpu%g
7486 s%@host_vendor@%$host_vendor%g
7487 s%@host_os@%$host_os%g
7490 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7491 s%@INSTALL_DATA@%$INSTALL_DATA%g
7492 s%@SET_MAKE@%$SET_MAKE%g
7493 s%@X_CFLAGS@%$X_CFLAGS%g
7494 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7495 s%@X_LIBS@%$X_LIBS%g
7496 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7498 s%@emacs_exe@%$emacs_exe%g
7499 s%@xemacs_exe@%$xemacs_exe%g
7500 s%@fortune@%$fortune%g
7501 s%@INCLUDES@%$INCLUDES%g
7502 s%@SAVER_LIBS@%$SAVER_LIBS%g
7503 s%@TOOLKIT_LIBS@%$TOOLKIT_LIBS%g
7504 s%@HACK_LIBS@%$HACK_LIBS%g
7505 s%@XPM_LIBS@%$XPM_LIBS%g
7506 s%@GL_LIBS@%$GL_LIBS%g
7507 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
7508 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
7509 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
7510 s%@NEED_SETUID@%$NEED_SETUID%g
7511 s%@INSTALL_PAM@%$INSTALL_PAM%g
7512 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
7513 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
7514 s%@TOOLKIT_SRCS@%$TOOLKIT_SRCS%g
7515 s%@TOOLKIT_OBJS@%$TOOLKIT_OBJS%g
7516 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
7517 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
7518 s%@XMU_SRCS@%$XMU_SRCS%g
7519 s%@XMU_OBJS@%$XMU_OBJS%g
7520 s%@LOCK_SRCS@%$LOCK_SRCS%g
7521 s%@LOCK_OBJS@%$LOCK_OBJS%g
7522 s%@GL_EXES@%$GL_EXES%g
7523 s%@GL_KLUDGE@%$GL_KLUDGE%g
7524 s%@HACKDIR@%$HACKDIR%g
7525 s%@APPDEFAULTS@%$APPDEFAULTS%g
7526 s%@DEPEND@%$DEPEND%g
7527 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
7528 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
7533 cat >> $CONFIG_STATUS <<\EOF
7535 # Split the substitutions into bite-sized pieces for seds with
7536 # small command number limits, like on Digital OSF/1 and HP-UX.
7537 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7538 ac_file=1 # Number of current file.
7539 ac_beg=1 # First line for current file.
7540 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7543 while $ac_more_lines; do
7544 if test $ac_beg -gt 1; then
7545 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7547 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7549 if test ! -s conftest.s$ac_file; then
7551 rm -f conftest.s$ac_file
7553 if test -z "$ac_sed_cmds"; then
7554 ac_sed_cmds="sed -f conftest.s$ac_file"
7556 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7558 ac_file=`expr $ac_file + 1`
7560 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7563 if test -z "$ac_sed_cmds"; then
7568 cat >> $CONFIG_STATUS <<EOF
7570 CONFIG_FILES=\${CONFIG_FILES-"Makefile
7575 driver/XScreenSaver.ad"}
7577 cat >> $CONFIG_STATUS <<\EOF
7578 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7579 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7581 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7582 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7583 *) ac_file_in="${ac_file}.in" ;;
7586 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7588 # Remove last slash and all that follows it. Not all systems have dirname.
7589 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7590 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7591 # The file is in a subdirectory.
7592 test ! -d "$ac_dir" && mkdir "$ac_dir"
7593 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7594 # A "../" for each directory in $ac_dir_suffix.
7595 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7597 ac_dir_suffix= ac_dots=
7600 case "$ac_given_srcdir" in
7602 if test -z "$ac_dots"; then top_srcdir=.
7603 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7604 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7606 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7607 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7610 case "$ac_given_INSTALL" in
7611 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7612 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7615 echo creating "$ac_file"
7617 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7619 *Makefile*) ac_comsub="1i\\
7620 # $configure_input" ;;
7624 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7626 s%@configure_input@%$configure_input%g
7627 s%@srcdir@%$srcdir%g
7628 s%@top_srcdir@%$top_srcdir%g
7629 s%@INSTALL@%$INSTALL%g
7630 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7634 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7635 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7637 # ac_d sets the value in "#define NAME VALUE" lines.
7638 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7639 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7642 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7643 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7644 ac_uB='\([ ]\)%\1#\2define\3'
7647 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7648 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7649 ac_eB='$%\1#\2define\3'
7653 if test "${CONFIG_HEADERS+set}" != set; then
7655 cat >> $CONFIG_STATUS <<EOF
7656 CONFIG_HEADERS="config.h"
7658 cat >> $CONFIG_STATUS <<\EOF
7660 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7661 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7663 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7664 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7665 *) ac_file_in="${ac_file}.in" ;;
7668 echo creating $ac_file
7670 rm -f conftest.frag conftest.in conftest.out
7671 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7672 cat $ac_file_inputs > conftest.in
7676 # Transform confdefs.h into a sed script conftest.vals that substitutes
7677 # the proper values into config.h.in to produce config.h. And first:
7678 # Protect against being on the right side of a sed subst in config.status.
7679 # Protect against being in an unquoted here document in config.status.
7681 cat > conftest.hdr <<\EOF
7684 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7688 sed -n -f conftest.hdr confdefs.h > conftest.vals
7691 # This sed command replaces #undef with comments. This is necessary, for
7692 # example, in the case of _POSIX_SOURCE, which is predefined and required
7693 # on some systems where configure will not decide to define it.
7694 cat >> conftest.vals <<\EOF
7695 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7698 # Break up conftest.vals because some shells have a limit on
7699 # the size of here documents, and old seds have small limits too.
7704 ac_lines=`grep -c . conftest.vals`
7705 # grep -c gives empty output for an empty file on some AIX systems.
7706 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7707 # Write a limited-size here document to conftest.frag.
7708 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7709 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7711 sed -f conftest.frag conftest.in > conftest.out
7713 mv conftest.out conftest.in
7715 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7717 mv conftest.tail conftest.vals
7721 cat >> $CONFIG_STATUS <<\EOF
7722 rm -f conftest.frag conftest.h
7723 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7724 cat conftest.in >> conftest.h
7726 if cmp -s $ac_file conftest.h 2>/dev/null; then
7727 echo "$ac_file is unchanged"
7730 # Remove last slash and all that follows it. Not all systems have dirname.
7731 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7732 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7733 # The file is in a subdirectory.
7734 test ! -d "$ac_dir" && mkdir "$ac_dir"
7737 mv conftest.h $ac_file
7742 cat >> $CONFIG_STATUS <<EOF
7745 cat >> $CONFIG_STATUS <<\EOF
7749 chmod +x $CONFIG_STATUS
7750 rm -fr confdefs* $ac_clean_files
7751 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7754 # You are in a twisty maze of namespaces and syntaxes, all alike.
7755 # Fuck the skull of Unix.
7757 eval bindir=${bindir}
7758 eval bindir=${bindir}
7759 eval bindir=${bindir}
7760 eval bindir=${bindir}
7761 eval bindir=${bindir}
7762 eval bindir=${bindir}
7763 eval HACKDIR=${HACKDIR}
7764 eval HACKDIR=${HACKDIR}
7765 eval HACKDIR=${HACKDIR}
7766 eval HACKDIR=${HACKDIR}
7767 eval HACKDIR=${HACKDIR}
7768 eval HACKDIR=${HACKDIR}
7773 echo ' When you run "make install", the "xscreensaver",'
7774 echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
7775 echo " will be installed in ${bindir}."
7777 echo " The various graphics demos (80+ different executables) will"
7778 echo " be installed in ${HACKDIR}."
7780 echo " If you would prefer the demos to be installed elsewhere"
7781 echo " (for example, in a dedicated directory) you should re-run"
7782 echo " configure with the --enable-subdir=DIR option. For more"
7783 echo " information, run $0 --help."