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:
18 --enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir',
19 instead of putting them in bindir itself. You can
20 specify the name of the subdirectory. For example,
21 --exec-prefix=/usr/local/bin --enable-subdir=demos
22 would put xscreensaver in /usr/local/bin/, and would
23 put the demos in /usr/local/bin/demos/. Note that if
24 you do this, you must make sure that the directory
25 is on your \$PATH before xscreensaver is started: the
26 directory name is not hardcoded into the program.
27 This merely sets the default installation location.
29 --disable-subdir Just put the demos in \`bindir' (this is the default.)
32 --with-x use the X Window System"
37 --with-sgi-ext Include support for the SGI SCREEN_SAVER
38 server extension, if possible (this is the default).
39 --without-sgi-ext Do not compile in support for this extension."
41 --with-mit-ext Include support for the MIT-SCREEN-SAVER
42 server extension, if possible (this is the default).
43 --without-mit-ext Do not compile in support for this extension."
45 --with-xidle-ext Include support for the XIDLE server extension,
46 if possible (this is the default).
47 --without-xidle-ext Do not compile in support for this extension."
49 --with-xshm-ext Include support for the XSHM (Shared Memory) server
50 extension, if possible (this is the default).
51 --without-xshm-ext Do not compile in support for this extension."
56 --with-motif Use the Motif toolkit for the user interface,
57 if possible (this is the default).
58 --without-motif Do not use Motif."
60 --with-athena Use the Athena toolkit for the user interface, if
61 possible (this is the default if Motif isn't used.)
62 --without-athena Do not use Athena."
67 --with-xpm Include support for XPM files in some demos,
68 if possible (this is the default).
69 --without-xpm Do not compile in support for XPM files."
71 --with-gl Build those demos which depend on OpenGL,
72 if possible (this is the default).
73 --without-gl Do not build the OpenGL demos."
75 --with-readdisplay Include support for the XReadDisplay server
76 extension if possible (this is the default).
77 --without-readdisplay Do not compile in support for this extension."
79 --with-zippy=PROGRAM Some demos are able to run an external program and
80 display its text; this names the program to use by
81 default (though it can be overridden with X
82 resources.) If you don't specify this, the default
83 is to use \"yow\" from the Emacs distribution (if you
84 have it) or else to use \"fortune\"."
89 --enable-locking Compile in support for locking the display
90 (this is the default.)
91 --disable-locking Do not allow locking at all."
94 --with-kerberos Include support for Kerberos authentication,
95 if possible (this is the default.)
96 --without-kerberos Do not compile in support for Kerberos."
98 --with-shadow Include support for shadow password authentication,
99 if possible (this is the default, if no Kerberos.)
100 --without-shadow Do not compile in support for shadow passwords.
103 # Initialize some variables set by options.
104 # The variables have the same names as the options, with
105 # dashes changed to underlines.
107 cache_file=./config.cache
116 program_transform_name=s,x,x,
124 bindir='${exec_prefix}/bin'
125 sbindir='${exec_prefix}/sbin'
126 libexecdir='${exec_prefix}/libexec'
127 datadir='${prefix}/share'
128 sysconfdir='${prefix}/etc'
129 sharedstatedir='${prefix}/com'
130 localstatedir='${prefix}/var'
131 libdir='${exec_prefix}/lib'
132 includedir='${prefix}/include'
133 oldincludedir='/usr/include'
134 infodir='${prefix}/info'
135 mandir='${prefix}/man'
137 # Initialize some other variables.
140 # Maximum number of lines to put in a shell here document.
147 # If the previous option needs an argument, assign it.
148 if test -n "$ac_prev"; then
149 eval "$ac_prev=\$ac_option"
155 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
159 # Accept the important Cygnus configure options, so we can diagnose typos.
163 -bindir | --bindir | --bindi | --bind | --bin | --bi)
165 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
166 bindir="$ac_optarg" ;;
168 -build | --build | --buil | --bui | --bu)
170 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
171 build="$ac_optarg" ;;
173 -cache-file | --cache-file | --cache-fil | --cache-fi \
174 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
175 ac_prev=cache_file ;;
176 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
177 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
178 cache_file="$ac_optarg" ;;
180 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
182 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
184 datadir="$ac_optarg" ;;
186 -disable-* | --disable-*)
187 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
188 # Reject names that are not valid shell variable names.
189 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
190 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
192 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
193 eval "enable_${ac_feature}=no" ;;
195 -enable-* | --enable-*)
196 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
197 # Reject names that are not valid shell variable names.
198 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
199 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
201 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
206 eval "enable_${ac_feature}='$ac_optarg'" ;;
208 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
209 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
210 | --exec | --exe | --ex)
211 ac_prev=exec_prefix ;;
212 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
213 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
214 | --exec=* | --exe=* | --ex=*)
215 exec_prefix="$ac_optarg" ;;
217 -gas | --gas | --ga | --g)
218 # Obsolete; use --with-gas.
221 -help | --help | --hel | --he)
222 # Omit some internal or obsolete options to make the list less imposing.
223 # This message is too long to be a string in the A/UX 3.1 sh.
225 Usage: configure [options] [host]
226 Options: [defaults in brackets after descriptions]
228 --cache-file=FILE cache test results in FILE
229 --help print this message
230 --no-create do not create output files
231 --quiet, --silent do not print \`checking...' messages
232 --version print the version of autoconf that created configure
233 Directory and file names:
234 --prefix=PREFIX install architecture-independent files in PREFIX
236 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
238 --bindir=DIR user executables in DIR [EPREFIX/bin]
239 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
240 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
241 --datadir=DIR read-only architecture-independent data in DIR
243 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
244 --sharedstatedir=DIR modifiable architecture-independent data in DIR
246 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
247 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
248 --includedir=DIR C header files in DIR [PREFIX/include]
249 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
250 --infodir=DIR info documentation in DIR [PREFIX/info]
251 --mandir=DIR man documentation in DIR [PREFIX/man]
252 --srcdir=DIR find the sources in DIR [configure dir or ..]
253 --program-prefix=PREFIX prepend PREFIX to installed program names
254 --program-suffix=SUFFIX append SUFFIX to installed program names
255 --program-transform-name=PROGRAM
256 run sed PROGRAM on installed program names
260 --build=BUILD configure for building on BUILD [BUILD=HOST]
261 --host=HOST configure for HOST [guessed]
262 --target=TARGET configure for TARGET [TARGET=HOST]
263 Features and packages:
264 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
265 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
266 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
267 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
268 --x-includes=DIR X include files are in DIR
269 --x-libraries=DIR X library files are in DIR
271 if test -n "$ac_help"; then
272 echo "--enable and --with options recognized:$ac_help"
276 -host | --host | --hos | --ho)
278 -host=* | --host=* | --hos=* | --ho=*)
281 -includedir | --includedir | --includedi | --included | --include \
282 | --includ | --inclu | --incl | --inc)
283 ac_prev=includedir ;;
284 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
285 | --includ=* | --inclu=* | --incl=* | --inc=*)
286 includedir="$ac_optarg" ;;
288 -infodir | --infodir | --infodi | --infod | --info | --inf)
290 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
291 infodir="$ac_optarg" ;;
293 -libdir | --libdir | --libdi | --libd)
295 -libdir=* | --libdir=* | --libdi=* | --libd=*)
296 libdir="$ac_optarg" ;;
298 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
299 | --libexe | --libex | --libe)
300 ac_prev=libexecdir ;;
301 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
302 | --libexe=* | --libex=* | --libe=*)
303 libexecdir="$ac_optarg" ;;
305 -localstatedir | --localstatedir | --localstatedi | --localstated \
306 | --localstate | --localstat | --localsta | --localst \
307 | --locals | --local | --loca | --loc | --lo)
308 ac_prev=localstatedir ;;
309 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
310 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
311 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
312 localstatedir="$ac_optarg" ;;
314 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
316 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
317 mandir="$ac_optarg" ;;
320 # Obsolete; use --without-fp.
323 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
327 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
328 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
331 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
332 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
333 | --oldin | --oldi | --old | --ol | --o)
334 ac_prev=oldincludedir ;;
335 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
336 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
337 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
338 oldincludedir="$ac_optarg" ;;
340 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
342 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
343 prefix="$ac_optarg" ;;
345 -program-prefix | --program-prefix | --program-prefi | --program-pref \
346 | --program-pre | --program-pr | --program-p)
347 ac_prev=program_prefix ;;
348 -program-prefix=* | --program-prefix=* | --program-prefi=* \
349 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
350 program_prefix="$ac_optarg" ;;
352 -program-suffix | --program-suffix | --program-suffi | --program-suff \
353 | --program-suf | --program-su | --program-s)
354 ac_prev=program_suffix ;;
355 -program-suffix=* | --program-suffix=* | --program-suffi=* \
356 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
357 program_suffix="$ac_optarg" ;;
359 -program-transform-name | --program-transform-name \
360 | --program-transform-nam | --program-transform-na \
361 | --program-transform-n | --program-transform- \
362 | --program-transform | --program-transfor \
363 | --program-transfo | --program-transf \
364 | --program-trans | --program-tran \
365 | --progr-tra | --program-tr | --program-t)
366 ac_prev=program_transform_name ;;
367 -program-transform-name=* | --program-transform-name=* \
368 | --program-transform-nam=* | --program-transform-na=* \
369 | --program-transform-n=* | --program-transform-=* \
370 | --program-transform=* | --program-transfor=* \
371 | --program-transfo=* | --program-transf=* \
372 | --program-trans=* | --program-tran=* \
373 | --progr-tra=* | --program-tr=* | --program-t=*)
374 program_transform_name="$ac_optarg" ;;
376 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
377 | -silent | --silent | --silen | --sile | --sil)
380 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
382 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
384 sbindir="$ac_optarg" ;;
386 -sharedstatedir | --sharedstatedir | --sharedstatedi \
387 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
388 | --sharedst | --shareds | --shared | --share | --shar \
390 ac_prev=sharedstatedir ;;
391 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
392 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
393 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
395 sharedstatedir="$ac_optarg" ;;
397 -site | --site | --sit)
399 -site=* | --site=* | --sit=*)
402 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
404 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
405 srcdir="$ac_optarg" ;;
407 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
408 | --syscon | --sysco | --sysc | --sys | --sy)
409 ac_prev=sysconfdir ;;
410 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
411 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
412 sysconfdir="$ac_optarg" ;;
414 -target | --target | --targe | --targ | --tar | --ta | --t)
416 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
417 target="$ac_optarg" ;;
419 -v | -verbose | --verbose | --verbos | --verbo | --verb)
422 -version | --version | --versio | --versi | --vers)
423 echo "configure generated by autoconf version 2.12"
427 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
428 # Reject names that are not valid shell variable names.
429 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
430 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
432 ac_package=`echo $ac_package| sed 's/-/_/g'`
437 eval "with_${ac_package}='$ac_optarg'" ;;
439 -without-* | --without-*)
440 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
441 # Reject names that are not valid shell variable names.
442 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
443 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
445 ac_package=`echo $ac_package| sed 's/-/_/g'`
446 eval "with_${ac_package}=no" ;;
449 # Obsolete; use --with-x.
452 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
453 | --x-incl | --x-inc | --x-in | --x-i)
454 ac_prev=x_includes ;;
455 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
456 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
457 x_includes="$ac_optarg" ;;
459 -x-libraries | --x-libraries | --x-librarie | --x-librari \
460 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
461 ac_prev=x_libraries ;;
462 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
463 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
464 x_libraries="$ac_optarg" ;;
466 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
470 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
471 echo "configure: warning: $ac_option: invalid host type" 1>&2
473 if test "x$nonopt" != xNONE; then
474 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
482 if test -n "$ac_prev"; then
483 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
486 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
488 # File descriptor usage:
491 # 2 errors and warnings
492 # 3 some systems may open it to /dev/tty
493 # 4 used on the Kubota Titan
494 # 6 checking for... messages and results
495 # 5 compiler messages saved in config.log
496 if test "$silent" = yes; then
504 This file contains any messages produced by compilers while
505 running configure, to aid debugging if configure makes a mistake.
508 # Strip out --no-create and --no-recursion so they do not pile up.
509 # Also quote any args containing shell metacharacters.
514 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
515 | --no-cr | --no-c) ;;
516 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
517 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
518 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
519 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
520 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
525 # Only set these to C if already set. These must not be set unconditionally
526 # because not all systems understand e.g. LANG=C (notably SCO).
527 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
528 # Non-C LC_CTYPE values break the ctype check.
529 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
530 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
531 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
532 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
534 # confdefs.h avoids OS command line length limits that DEFS can exceed.
535 rm -rf conftest* confdefs.h
536 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
539 # A filename unique to this package, relative to the directory that
540 # configure is in, which we can look for to find out if srcdir is correct.
541 ac_unique_file=driver/subprocs.c
543 # Find the source files, if location was not specified.
544 if test -z "$srcdir"; then
545 ac_srcdir_defaulted=yes
546 # Try the directory containing this script, then its parent.
548 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
549 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
551 if test ! -r $srcdir/$ac_unique_file; then
555 ac_srcdir_defaulted=no
557 if test ! -r $srcdir/$ac_unique_file; then
558 if test "$ac_srcdir_defaulted" = yes; then
559 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
561 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
564 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
566 # Prefer explicitly selected file to automatically selected ones.
567 if test -z "$CONFIG_SITE"; then
568 if test "x$prefix" != xNONE; then
569 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
571 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
574 for ac_site_file in $CONFIG_SITE; do
575 if test -r "$ac_site_file"; then
576 echo "loading site script $ac_site_file"
581 if test -r "$cache_file"; then
582 echo "loading cache $cache_file"
585 echo "creating cache $cache_file"
590 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
591 ac_cpp='$CPP $CPPFLAGS'
592 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
593 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
594 cross_compiling=$ac_cv_prog_cc_cross
596 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
597 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
598 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
605 ac_n= ac_c='\c' ac_t=
611 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
612 if test -f $ac_dir/install-sh; then
614 ac_install_sh="$ac_aux_dir/install-sh -c"
616 elif test -f $ac_dir/install.sh; then
618 ac_install_sh="$ac_aux_dir/install.sh -c"
622 if test -z "$ac_aux_dir"; then
623 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
625 ac_config_guess=$ac_aux_dir/config.guess
626 ac_config_sub=$ac_aux_dir/config.sub
627 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
630 # Make sure we can run config.sub.
631 if $ac_config_sub sun4 >/dev/null 2>&1; then :
632 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
635 echo $ac_n "checking host system type""... $ac_c" 1>&6
636 echo "configure:637: checking host system type" >&5
639 case "$host_alias" in
643 if host_alias=`$ac_config_guess`; then :
644 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
646 *) host_alias=$nonopt ;;
650 host=`$ac_config_sub $host_alias`
651 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
652 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
653 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
654 echo "$ac_t""$host" 1>&6
657 # Extract the first word of "gcc", so it can be a program name with args.
658 set dummy gcc; ac_word=$2
659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
660 echo "configure:661: checking for $ac_word" >&5
661 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
662 echo $ac_n "(cached) $ac_c" 1>&6
664 if test -n "$CC"; then
665 ac_cv_prog_CC="$CC" # Let the user override the test.
667 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
668 for ac_dir in $PATH; do
669 test -z "$ac_dir" && ac_dir=.
670 if test -f $ac_dir/$ac_word; then
679 if test -n "$CC"; then
680 echo "$ac_t""$CC" 1>&6
682 echo "$ac_t""no" 1>&6
685 if test -z "$CC"; then
686 # Extract the first word of "cc", so it can be a program name with args.
687 set dummy cc; ac_word=$2
688 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
689 echo "configure:690: checking for $ac_word" >&5
690 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
691 echo $ac_n "(cached) $ac_c" 1>&6
693 if test -n "$CC"; then
694 ac_cv_prog_CC="$CC" # Let the user override the test.
696 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
698 for ac_dir in $PATH; do
699 test -z "$ac_dir" && ac_dir=.
700 if test -f $ac_dir/$ac_word; then
701 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
710 if test $ac_prog_rejected = yes; then
711 # We found a bogon in the path, so make sure we never use it.
712 set dummy $ac_cv_prog_CC
714 if test $# -gt 0; then
715 # We chose a different compiler from the bogus one.
716 # However, it has the same basename, so the bogon will be chosen
717 # first if we set CC to just the basename; use the full file name.
719 set dummy "$ac_dir/$ac_word" "$@"
727 if test -n "$CC"; then
728 echo "$ac_t""$CC" 1>&6
730 echo "$ac_t""no" 1>&6
733 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
736 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
737 echo "configure:738: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
740 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
741 ac_cpp='$CPP $CPPFLAGS'
742 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
743 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
744 cross_compiling=$ac_cv_prog_cc_cross
746 cat > conftest.$ac_ext <<EOF
747 #line 748 "configure"
748 #include "confdefs.h"
751 if { (eval echo configure:752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
752 ac_cv_prog_cc_works=yes
753 # If we can't run a trivial program, we are probably using a cross compiler.
754 if (./conftest; exit) 2>/dev/null; then
755 ac_cv_prog_cc_cross=no
757 ac_cv_prog_cc_cross=yes
760 echo "configure: failed program was:" >&5
761 cat conftest.$ac_ext >&5
762 ac_cv_prog_cc_works=no
766 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
767 if test $ac_cv_prog_cc_works = no; then
768 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
770 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
771 echo "configure:772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
772 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
773 cross_compiling=$ac_cv_prog_cc_cross
775 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
776 echo "configure:777: checking whether we are using GNU C" >&5
777 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
778 echo $ac_n "(cached) $ac_c" 1>&6
780 cat > conftest.c <<EOF
785 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
792 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
794 if test $ac_cv_prog_gcc = yes; then
796 ac_test_CFLAGS="${CFLAGS+set}"
797 ac_save_CFLAGS="$CFLAGS"
799 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
800 echo "configure:801: checking whether ${CC-cc} accepts -g" >&5
801 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
802 echo $ac_n "(cached) $ac_c" 1>&6
804 echo 'void f(){}' > conftest.c
805 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
814 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
815 if test "$ac_test_CFLAGS" = set; then
816 CFLAGS="$ac_save_CFLAGS"
817 elif test $ac_cv_prog_cc_g = yes; then
824 test "${CFLAGS+set}" = set || CFLAGS="-g"
828 if test -z "$GCC"; then
829 echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
830 echo "configure:831: checking how to request ANSI compilation" >&5
833 echo "$ac_t""HPUX: adding -Ae" 1>&6
837 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
838 CC="$CC -qlanglvl=ansi -qhalt=e"
841 echo "$ac_t""no idea" 1>&6
847 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
848 echo "configure:849: checking whether the compiler works on ANSI C" >&5
849 if test "$cross_compiling" = yes; then
850 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
852 cat > conftest.$ac_ext <<EOF
853 #line 854 "configure"
854 #include "confdefs.h"
855 main(int ac, char **av) { return 0; }
857 if { (eval echo configure:858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
859 echo "$ac_t""yes" 1>&6
861 echo "configure: failed program was:" >&5
862 cat conftest.$ac_ext >&5
864 echo "$ac_t""no" 1>&6
865 { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
873 if test -n "$GCC"; then
874 echo "$ac_t""Turning on gcc compiler warnings." 1>&6
875 CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
878 echo "$ac_t""Turning on SGI compiler warnings." 1>&6
879 CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
885 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
886 echo "configure:887: checking how to run the C preprocessor" >&5
887 # On Suns, sometimes $CPP names a directory.
888 if test -n "$CPP" && test -d "$CPP"; then
891 if test -z "$CPP"; then
892 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
893 echo $ac_n "(cached) $ac_c" 1>&6
895 # This must be in double quotes, not single quotes, because CPP may get
896 # substituted into the Makefile and "${CC-cc}" will confuse make.
898 # On the NeXT, cc -E runs the code through the compiler's parser,
899 # not just through cpp.
900 cat > conftest.$ac_ext <<EOF
901 #line 902 "configure"
902 #include "confdefs.h"
906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
907 { (eval echo configure:908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
908 ac_err=`grep -v '^ *+' conftest.out`
909 if test -z "$ac_err"; then
913 echo "configure: failed program was:" >&5
914 cat conftest.$ac_ext >&5
916 CPP="${CC-cc} -E -traditional-cpp"
917 cat > conftest.$ac_ext <<EOF
918 #line 919 "configure"
919 #include "confdefs.h"
923 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
924 { (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
925 ac_err=`grep -v '^ *+' conftest.out`
926 if test -z "$ac_err"; then
930 echo "configure: failed program was:" >&5
931 cat conftest.$ac_ext >&5
938 ac_cv_prog_CPP="$CPP"
940 CPP="$ac_cv_prog_CPP"
942 ac_cv_prog_CPP="$CPP"
944 echo "$ac_t""$CPP" 1>&6
946 # Find a good install program. We prefer a C program (faster),
947 # so one script is as good as another. But avoid the broken or
948 # incompatible versions:
949 # SysV /etc/install, /usr/sbin/install
950 # SunOS /usr/etc/install
953 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
954 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
955 # ./install, which can be erroneously created by make from ./install.sh.
956 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
957 echo "configure:958: checking for a BSD compatible install" >&5
958 if test -z "$INSTALL"; then
959 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
960 echo $ac_n "(cached) $ac_c" 1>&6
962 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
963 for ac_dir in $PATH; do
964 # Account for people who put trailing slashes in PATH elements.
966 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
968 # OSF1 and SCO ODT 3.0 have their own names for install.
969 for ac_prog in ginstall installbsd scoinst install; do
970 if test -f $ac_dir/$ac_prog; then
971 if test $ac_prog = install &&
972 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
973 # AIX install. It has an incompatible calling convention.
974 # OSF/1 installbsd also uses dspmsg, but is usable.
977 ac_cv_path_install="$ac_dir/$ac_prog -c"
988 if test "${ac_cv_path_install+set}" = set; then
989 INSTALL="$ac_cv_path_install"
991 # As a last resort, use the slow shell script. We don't cache a
992 # path for INSTALL within a source directory, because that will
993 # break other packages using the cache if that directory is
994 # removed, or if the path is relative.
995 INSTALL="$ac_install_sh"
998 echo "$ac_t""$INSTALL" 1>&6
1000 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1001 # It thinks the first close brace ends the variable substitution.
1002 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1004 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1006 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1007 echo "configure:1008: checking whether ${MAKE-make} sets \${MAKE}" >&5
1008 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1009 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1010 echo $ac_n "(cached) $ac_c" 1>&6
1012 cat > conftestmake <<\EOF
1014 @echo 'ac_maketemp="${MAKE}"'
1016 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1017 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1018 if test -n "$ac_maketemp"; then
1019 eval ac_cv_prog_make_${ac_make}_set=yes
1021 eval ac_cv_prog_make_${ac_make}_set=no
1025 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1026 echo "$ac_t""yes" 1>&6
1029 echo "$ac_t""no" 1>&6
1030 SET_MAKE="MAKE=${MAKE-make}"
1034 echo $ac_n "checking for working const""... $ac_c" 1>&6
1035 echo "configure:1036: checking for working const" >&5
1036 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1037 echo $ac_n "(cached) $ac_c" 1>&6
1039 cat > conftest.$ac_ext <<EOF
1040 #line 1041 "configure"
1041 #include "confdefs.h"
1045 /* Ultrix mips cc rejects this. */
1046 typedef int charset[2]; const charset x;
1047 /* SunOS 4.1.1 cc rejects this. */
1048 char const *const *ccp;
1050 /* NEC SVR4.0.2 mips cc rejects this. */
1051 struct point {int x, y;};
1052 static struct point const zero = {0,0};
1053 /* AIX XL C 1.02.0.0 rejects this.
1054 It does not let you subtract one const X* pointer from another in an arm
1055 of an if-expression whose if-part is not a constant expression */
1056 const char *g = "string";
1057 ccp = &g + (g ? g-g : 0);
1058 /* HPUX 7.0 cc rejects these. */
1061 ccp = (char const *const *) p;
1062 { /* SCO 3.2v4 cc rejects this. */
1064 char const *s = 0 ? (char *) 0 : (char const *) 0;
1068 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1070 const int *foo = &x[0];
1073 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1074 typedef const int *iptr;
1078 { /* AIX XL C 1.02.0.0 rejects this saying
1079 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1080 struct s { int j; const int *ap[3]; };
1081 struct s *b; b->j = 5;
1083 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1089 if { (eval echo configure:1090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1093 echo "configure: failed program was:" >&5
1094 cat conftest.$ac_ext >&5
1101 echo "$ac_t""$ac_cv_c_const" 1>&6
1102 if test $ac_cv_c_const = no; then
1103 cat >> confdefs.h <<\EOF
1109 echo $ac_n "checking for inline""... $ac_c" 1>&6
1110 echo "configure:1111: checking for inline" >&5
1111 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1112 echo $ac_n "(cached) $ac_c" 1>&6
1115 for ac_kw in inline __inline__ __inline; do
1116 cat > conftest.$ac_ext <<EOF
1117 #line 1118 "configure"
1118 #include "confdefs.h"
1124 if { (eval echo configure:1125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1126 ac_cv_c_inline=$ac_kw; break
1128 echo "configure: failed program was:" >&5
1129 cat conftest.$ac_ext >&5
1136 echo "$ac_t""$ac_cv_c_inline" 1>&6
1137 case "$ac_cv_c_inline" in
1139 no) cat >> confdefs.h <<\EOF
1143 *) cat >> confdefs.h <<EOF
1144 #define inline $ac_cv_c_inline
1150 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1151 echo "configure:1152: checking for ANSI C header files" >&5
1152 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1153 echo $ac_n "(cached) $ac_c" 1>&6
1155 cat > conftest.$ac_ext <<EOF
1156 #line 1157 "configure"
1157 #include "confdefs.h"
1163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1164 { (eval echo configure:1165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1165 ac_err=`grep -v '^ *+' conftest.out`
1166 if test -z "$ac_err"; then
1168 ac_cv_header_stdc=yes
1171 echo "configure: failed program was:" >&5
1172 cat conftest.$ac_ext >&5
1174 ac_cv_header_stdc=no
1178 if test $ac_cv_header_stdc = yes; then
1179 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1180 cat > conftest.$ac_ext <<EOF
1181 #line 1182 "configure"
1182 #include "confdefs.h"
1185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1186 egrep "memchr" >/dev/null 2>&1; then
1190 ac_cv_header_stdc=no
1196 if test $ac_cv_header_stdc = yes; then
1197 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1198 cat > conftest.$ac_ext <<EOF
1199 #line 1200 "configure"
1200 #include "confdefs.h"
1203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1204 egrep "free" >/dev/null 2>&1; then
1208 ac_cv_header_stdc=no
1214 if test $ac_cv_header_stdc = yes; then
1215 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1216 if test "$cross_compiling" = yes; then
1219 cat > conftest.$ac_ext <<EOF
1220 #line 1221 "configure"
1221 #include "confdefs.h"
1223 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1224 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1225 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1226 int main () { int i; for (i = 0; i < 256; i++)
1227 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1231 if { (eval echo configure:1232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1235 echo "configure: failed program was:" >&5
1236 cat conftest.$ac_ext >&5
1238 ac_cv_header_stdc=no
1246 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1247 if test $ac_cv_header_stdc = yes; then
1248 cat >> confdefs.h <<\EOF
1249 #define STDC_HEADERS 1
1254 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1255 echo "configure:1256: checking whether time.h and sys/time.h may both be included" >&5
1256 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1257 echo $ac_n "(cached) $ac_c" 1>&6
1259 cat > conftest.$ac_ext <<EOF
1260 #line 1261 "configure"
1261 #include "confdefs.h"
1262 #include <sys/types.h>
1263 #include <sys/time.h>
1269 if { (eval echo configure:1270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1271 ac_cv_header_time=yes
1273 echo "configure: failed program was:" >&5
1274 cat conftest.$ac_ext >&5
1276 ac_cv_header_time=no
1281 echo "$ac_t""$ac_cv_header_time" 1>&6
1282 if test $ac_cv_header_time = yes; then
1283 cat >> confdefs.h <<\EOF
1284 #define TIME_WITH_SYS_TIME 1
1289 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1290 echo "configure:1291: checking for sys/wait.h that is POSIX.1 compatible" >&5
1291 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1292 echo $ac_n "(cached) $ac_c" 1>&6
1294 cat > conftest.$ac_ext <<EOF
1295 #line 1296 "configure"
1296 #include "confdefs.h"
1297 #include <sys/types.h>
1298 #include <sys/wait.h>
1300 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1303 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1308 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1311 if { (eval echo configure:1312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1313 ac_cv_header_sys_wait_h=yes
1315 echo "configure: failed program was:" >&5
1316 cat conftest.$ac_ext >&5
1318 ac_cv_header_sys_wait_h=no
1323 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1324 if test $ac_cv_header_sys_wait_h = yes; then
1325 cat >> confdefs.h <<\EOF
1326 #define HAVE_SYS_WAIT_H 1
1332 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1334 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1335 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1336 echo "configure:1337: checking for $ac_hdr that defines DIR" >&5
1337 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1338 echo $ac_n "(cached) $ac_c" 1>&6
1340 cat > conftest.$ac_ext <<EOF
1341 #line 1342 "configure"
1342 #include "confdefs.h"
1343 #include <sys/types.h>
1349 if { (eval echo configure:1350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1351 eval "ac_cv_header_dirent_$ac_safe=yes"
1353 echo "configure: failed program was:" >&5
1354 cat conftest.$ac_ext >&5
1356 eval "ac_cv_header_dirent_$ac_safe=no"
1360 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1361 echo "$ac_t""yes" 1>&6
1362 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1363 cat >> confdefs.h <<EOF
1364 #define $ac_tr_hdr 1
1366 ac_header_dirent=$ac_hdr; break
1368 echo "$ac_t""no" 1>&6
1371 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1372 if test $ac_header_dirent = dirent.h; then
1373 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1374 echo "configure:1375: checking for opendir in -ldir" >&5
1375 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1377 echo $ac_n "(cached) $ac_c" 1>&6
1379 ac_save_LIBS="$LIBS"
1381 cat > conftest.$ac_ext <<EOF
1382 #line 1383 "configure"
1383 #include "confdefs.h"
1384 /* Override any gcc2 internal prototype to avoid an error. */
1385 /* We use char because int might match the return type of a gcc2
1386 builtin and then its argument prototype would still apply. */
1393 if { (eval echo configure:1394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1395 eval "ac_cv_lib_$ac_lib_var=yes"
1397 echo "configure: failed program was:" >&5
1398 cat conftest.$ac_ext >&5
1400 eval "ac_cv_lib_$ac_lib_var=no"
1403 LIBS="$ac_save_LIBS"
1406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1407 echo "$ac_t""yes" 1>&6
1410 echo "$ac_t""no" 1>&6
1414 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1415 echo "configure:1416: checking for opendir in -lx" >&5
1416 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1417 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1418 echo $ac_n "(cached) $ac_c" 1>&6
1420 ac_save_LIBS="$LIBS"
1422 cat > conftest.$ac_ext <<EOF
1423 #line 1424 "configure"
1424 #include "confdefs.h"
1425 /* Override any gcc2 internal prototype to avoid an error. */
1426 /* We use char because int might match the return type of a gcc2
1427 builtin and then its argument prototype would still apply. */
1434 if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1436 eval "ac_cv_lib_$ac_lib_var=yes"
1438 echo "configure: failed program was:" >&5
1439 cat conftest.$ac_ext >&5
1441 eval "ac_cv_lib_$ac_lib_var=no"
1444 LIBS="$ac_save_LIBS"
1447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1448 echo "$ac_t""yes" 1>&6
1451 echo "$ac_t""no" 1>&6
1457 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1458 echo "configure:1459: checking for mode_t" >&5
1459 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1460 echo $ac_n "(cached) $ac_c" 1>&6
1462 cat > conftest.$ac_ext <<EOF
1463 #line 1464 "configure"
1464 #include "confdefs.h"
1465 #include <sys/types.h>
1471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1472 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1474 ac_cv_type_mode_t=yes
1477 ac_cv_type_mode_t=no
1482 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1483 if test $ac_cv_type_mode_t = no; then
1484 cat >> confdefs.h <<\EOF
1490 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1491 echo "configure:1492: checking for pid_t" >&5
1492 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1493 echo $ac_n "(cached) $ac_c" 1>&6
1495 cat > conftest.$ac_ext <<EOF
1496 #line 1497 "configure"
1497 #include "confdefs.h"
1498 #include <sys/types.h>
1504 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1505 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1507 ac_cv_type_pid_t=yes
1515 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1516 if test $ac_cv_type_pid_t = no; then
1517 cat >> confdefs.h <<\EOF
1523 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1524 echo "configure:1525: checking return type of signal handlers" >&5
1525 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1526 echo $ac_n "(cached) $ac_c" 1>&6
1528 cat > conftest.$ac_ext <<EOF
1529 #line 1530 "configure"
1530 #include "confdefs.h"
1531 #include <sys/types.h>
1537 extern "C" void (*signal (int, void (*)(int)))(int);
1539 void (*signal ()) ();
1546 if { (eval echo configure:1547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1548 ac_cv_type_signal=void
1550 echo "configure: failed program was:" >&5
1551 cat conftest.$ac_ext >&5
1553 ac_cv_type_signal=int
1558 echo "$ac_t""$ac_cv_type_signal" 1>&6
1559 cat >> confdefs.h <<EOF
1560 #define RETSIGTYPE $ac_cv_type_signal
1564 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1565 echo "configure:1566: checking for size_t" >&5
1566 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1567 echo $ac_n "(cached) $ac_c" 1>&6
1569 cat > conftest.$ac_ext <<EOF
1570 #line 1571 "configure"
1571 #include "confdefs.h"
1572 #include <sys/types.h>
1578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1579 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1581 ac_cv_type_size_t=yes
1584 ac_cv_type_size_t=no
1589 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1590 if test $ac_cv_type_size_t = no; then
1591 cat >> confdefs.h <<\EOF
1592 #define size_t unsigned
1599 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1600 echo "configure:1601: checking how to call gettimeofday" >&5
1601 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1602 echo $ac_n "(cached) $ac_c" 1>&6
1604 cat > conftest.$ac_ext <<EOF
1605 #line 1606 "configure"
1606 #include "confdefs.h"
1608 #include <sys/time.h>
1610 struct timeval tv; gettimeofday(&tv);
1613 if { (eval echo configure:1614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1615 ac_gettimeofday_args=1
1617 echo "configure: failed program was:" >&5
1618 cat conftest.$ac_ext >&5
1620 cat > conftest.$ac_ext <<EOF
1621 #line 1622 "configure"
1622 #include "confdefs.h"
1624 #include <sys/time.h>
1626 struct timeval tv; struct timezone tzp;
1627 gettimeofday(&tv, &tzp);
1630 if { (eval echo configure:1631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1632 ac_gettimeofday_args=2
1634 echo "configure: failed program was:" >&5
1635 cat conftest.$ac_ext >&5
1637 ac_gettimeofday_args=0
1642 ac_cv_gettimeofday_args=$ac_gettimeofday_args
1645 ac_gettimeofday_args=$ac_cv_gettimeofday_args
1646 if test $ac_gettimeofday_args = 1 ; then
1647 cat >> confdefs.h <<\EOF
1648 #define HAVE_GETTIMEOFDAY 1
1651 echo "$ac_t""one argument" 1>&6
1652 elif test $ac_gettimeofday_args = 2 ; then
1653 cat >> confdefs.h <<\EOF
1654 #define HAVE_GETTIMEOFDAY 1
1657 cat >> confdefs.h <<\EOF
1658 #define GETTIMEOFDAY_TWO_ARGS 1
1661 echo "$ac_t""two arguments" 1>&6
1663 echo "$ac_t""unknown" 1>&6
1667 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
1669 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1670 echo "configure:1671: checking for $ac_func" >&5
1671 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1672 echo $ac_n "(cached) $ac_c" 1>&6
1674 cat > conftest.$ac_ext <<EOF
1675 #line 1676 "configure"
1676 #include "confdefs.h"
1677 /* System header to define __stub macros and hopefully few prototypes,
1678 which can conflict with char $ac_func(); below. */
1680 /* Override any gcc2 internal prototype to avoid an error. */
1681 /* We use char because int might match the return type of a gcc2
1682 builtin and then its argument prototype would still apply. */
1687 /* The GNU C library defines this for functions which it implements
1688 to always fail with ENOSYS. Some functions are actually named
1689 something starting with __ and the normal name is an alias. */
1690 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1698 if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1700 eval "ac_cv_func_$ac_func=yes"
1702 echo "configure: failed program was:" >&5
1703 cat conftest.$ac_ext >&5
1705 eval "ac_cv_func_$ac_func=no"
1710 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1711 echo "$ac_t""yes" 1>&6
1712 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1713 cat >> confdefs.h <<EOF
1714 #define $ac_tr_func 1
1718 echo "$ac_t""no" 1>&6
1722 for ac_hdr in unistd.h
1724 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1725 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1726 echo "configure:1727: checking for $ac_hdr" >&5
1727 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1728 echo $ac_n "(cached) $ac_c" 1>&6
1730 cat > conftest.$ac_ext <<EOF
1731 #line 1732 "configure"
1732 #include "confdefs.h"
1735 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1736 { (eval echo configure:1737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1737 ac_err=`grep -v '^ *+' conftest.out`
1738 if test -z "$ac_err"; then
1740 eval "ac_cv_header_$ac_safe=yes"
1743 echo "configure: failed program was:" >&5
1744 cat conftest.$ac_ext >&5
1746 eval "ac_cv_header_$ac_safe=no"
1750 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1751 echo "$ac_t""yes" 1>&6
1752 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1753 cat >> confdefs.h <<EOF
1754 #define $ac_tr_hdr 1
1758 echo "$ac_t""no" 1>&6
1765 # Check whether --enable-subdir or --disable-subdir was given.
1766 if test "${enable_subdir+set}" = set; then
1767 enableval="$enable_subdir"
1768 enable_subdir="$enableval"
1773 if test x"$enable_subdir" = xno; then
1775 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
1776 echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
1779 HACKDIR='$(bindir)/'$enable_subdir
1783 # If we find X, set shell vars x_includes and x_libraries to the
1784 # paths, otherwise set no_x=yes.
1785 # Uses ac_ vars as temps to allow command line to override cache and checks.
1786 # --without-x overrides everything else, but does not touch the cache.
1787 echo $ac_n "checking for X""... $ac_c" 1>&6
1788 echo "configure:1789: checking for X" >&5
1790 # Check whether --with-x or --without-x was given.
1791 if test "${with_x+set}" = set; then
1796 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1797 if test "x$with_x" = xno; then
1798 # The user explicitly disabled X.
1801 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1802 # Both variables are already set.
1805 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1806 echo $ac_n "(cached) $ac_c" 1>&6
1808 # One or both of the vars are not set, and there is no cached value.
1809 ac_x_includes=NO ac_x_libraries=NO
1811 if mkdir conftestdir; then
1813 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1814 cat > Imakefile <<'EOF'
1816 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1818 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1819 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1820 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1821 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1822 for ac_extension in a so sl; do
1823 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1824 test -f $ac_im_libdir/libX11.$ac_extension; then
1825 ac_im_usrlibdir=$ac_im_libdir; break
1828 # Screen out bogus values from the imake configuration. They are
1829 # bogus both because they are the default anyway, and because
1830 # using them would break gcc on systems where it needs fixed includes.
1831 case "$ac_im_incroot" in
1833 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1835 case "$ac_im_usrlibdir" in
1837 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1844 if test "$ac_x_includes" = NO; then
1845 # Guess where to find include files, by looking for this one X11 .h file.
1846 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1848 # First, try using that file with no special directory specified.
1849 cat > conftest.$ac_ext <<EOF
1850 #line 1851 "configure"
1851 #include "confdefs.h"
1852 #include <$x_direct_test_include>
1854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1855 { (eval echo configure:1856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1856 ac_err=`grep -v '^ *+' conftest.out`
1857 if test -z "$ac_err"; then
1859 # We can compile using X headers with no special include directory.
1863 echo "configure: failed program was:" >&5
1864 cat conftest.$ac_ext >&5
1866 # Look for the header file in a standard set of common directories.
1867 # Check X11 before X11Rn because it is often a symlink to the current release.
1870 /usr/X11R6/include \
1871 /usr/X11R5/include \
1872 /usr/X11R4/include \
1875 /usr/include/X11R6 \
1876 /usr/include/X11R5 \
1877 /usr/include/X11R4 \
1879 /usr/local/X11/include \
1880 /usr/local/X11R6/include \
1881 /usr/local/X11R5/include \
1882 /usr/local/X11R4/include \
1884 /usr/local/include/X11 \
1885 /usr/local/include/X11R6 \
1886 /usr/local/include/X11R5 \
1887 /usr/local/include/X11R4 \
1891 /usr/XFree86/include/X11 \
1894 /usr/local/include \
1895 /usr/unsupported/include \
1896 /usr/athena/include \
1897 /usr/local/x11r5/include \
1898 /usr/lpp/Xamples/include \
1900 /usr/openwin/include \
1901 /usr/openwin/share/include \
1904 if test -r "$ac_dir/$x_direct_test_include"; then
1905 ac_x_includes=$ac_dir
1911 fi # $ac_x_includes = NO
1913 if test "$ac_x_libraries" = NO; then
1914 # Check for the libraries.
1916 test -z "$x_direct_test_library" && x_direct_test_library=Xt
1917 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1919 # See if we find them without any special options.
1920 # Don't add to $LIBS permanently.
1921 ac_save_LIBS="$LIBS"
1922 LIBS="-l$x_direct_test_library $LIBS"
1923 cat > conftest.$ac_ext <<EOF
1924 #line 1925 "configure"
1925 #include "confdefs.h"
1928 ${x_direct_test_function}()
1931 if { (eval echo configure:1932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1933 LIBS="$ac_save_LIBS"
1934 # We can link X programs with no special library path.
1937 echo "configure: failed program was:" >&5
1938 cat conftest.$ac_ext >&5
1940 LIBS="$ac_save_LIBS"
1941 # First see if replacing the include by lib works.
1942 # Check X11 before X11Rn because it is often a symlink to the current release.
1943 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1954 /usr/local/X11/lib \
1955 /usr/local/X11R6/lib \
1956 /usr/local/X11R5/lib \
1957 /usr/local/X11R4/lib \
1959 /usr/local/lib/X11 \
1960 /usr/local/lib/X11R6 \
1961 /usr/local/lib/X11R5 \
1962 /usr/local/lib/X11R4 \
1966 /usr/XFree86/lib/X11 \
1970 /usr/unsupported/lib \
1972 /usr/local/x11r5/lib \
1973 /usr/lpp/Xamples/lib \
1977 /usr/openwin/share/lib \
1980 for ac_extension in a so sl; do
1981 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1982 ac_x_libraries=$ac_dir
1989 fi # $ac_x_libraries = NO
1991 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1992 # Didn't find X anywhere. Cache the known absence of X.
1993 ac_cv_have_x="have_x=no"
1995 # Record where we found X for the cache.
1996 ac_cv_have_x="have_x=yes \
1997 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2001 eval "$ac_cv_have_x"
2004 if test "$have_x" != yes; then
2005 echo "$ac_t""$have_x" 1>&6
2008 # If each of the values was on the command line, it overrides each guess.
2009 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2010 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2011 # Update the cache value to reflect the command line values.
2012 ac_cv_have_x="have_x=yes \
2013 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2014 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2017 if test "$no_x" = yes; then
2018 # Not all programs may use this symbol, but it does not hurt to define it.
2019 cat >> confdefs.h <<\EOF
2020 #define X_DISPLAY_MISSING 1
2023 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2025 if test -n "$x_includes"; then
2026 X_CFLAGS="$X_CFLAGS -I$x_includes"
2029 # It would also be nice to do this for all -L options, not just this one.
2030 if test -n "$x_libraries"; then
2031 X_LIBS="$X_LIBS -L$x_libraries"
2032 # For Solaris; some versions of Sun CC require a space after -R and
2033 # others require no space. Words are not sufficient . . . .
2034 case "`(uname -sr) 2>/dev/null`" in
2036 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2037 echo "configure:2038: checking whether -R must be followed by a space" >&5
2038 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2039 cat > conftest.$ac_ext <<EOF
2040 #line 2041 "configure"
2041 #include "confdefs.h"
2047 if { (eval echo configure:2048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2051 echo "configure: failed program was:" >&5
2052 cat conftest.$ac_ext >&5
2057 if test $ac_R_nospace = yes; then
2058 echo "$ac_t""no" 1>&6
2059 X_LIBS="$X_LIBS -R$x_libraries"
2061 LIBS="$ac_xsave_LIBS -R $x_libraries"
2062 cat > conftest.$ac_ext <<EOF
2063 #line 2064 "configure"
2064 #include "confdefs.h"
2070 if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2074 echo "configure: failed program was:" >&5
2075 cat conftest.$ac_ext >&5
2080 if test $ac_R_space = yes; then
2081 echo "$ac_t""yes" 1>&6
2082 X_LIBS="$X_LIBS -R $x_libraries"
2084 echo "$ac_t""neither works" 1>&6
2087 LIBS="$ac_xsave_LIBS"
2091 # Check for system-dependent libraries X programs must link with.
2092 # Do this before checking for the system-independent R6 libraries
2093 # (-lICE), since we may need -lsocket or whatever for X linking.
2095 if test "$ISC" = yes; then
2096 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2098 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2099 # libraries were built with DECnet support. And karl@cs.umb.edu says
2100 # the Alpha needs dnet_stub (dnet does not exist).
2101 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2102 echo "configure:2103: checking for dnet_ntoa in -ldnet" >&5
2103 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2104 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2105 echo $ac_n "(cached) $ac_c" 1>&6
2107 ac_save_LIBS="$LIBS"
2109 cat > conftest.$ac_ext <<EOF
2110 #line 2111 "configure"
2111 #include "confdefs.h"
2112 /* Override any gcc2 internal prototype to avoid an error. */
2113 /* We use char because int might match the return type of a gcc2
2114 builtin and then its argument prototype would still apply. */
2121 if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2123 eval "ac_cv_lib_$ac_lib_var=yes"
2125 echo "configure: failed program was:" >&5
2126 cat conftest.$ac_ext >&5
2128 eval "ac_cv_lib_$ac_lib_var=no"
2131 LIBS="$ac_save_LIBS"
2134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2135 echo "$ac_t""yes" 1>&6
2136 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2138 echo "$ac_t""no" 1>&6
2141 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2142 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2143 echo "configure:2144: checking for dnet_ntoa in -ldnet_stub" >&5
2144 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2145 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2146 echo $ac_n "(cached) $ac_c" 1>&6
2148 ac_save_LIBS="$LIBS"
2149 LIBS="-ldnet_stub $LIBS"
2150 cat > conftest.$ac_ext <<EOF
2151 #line 2152 "configure"
2152 #include "confdefs.h"
2153 /* Override any gcc2 internal prototype to avoid an error. */
2154 /* We use char because int might match the return type of a gcc2
2155 builtin and then its argument prototype would still apply. */
2162 if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2164 eval "ac_cv_lib_$ac_lib_var=yes"
2166 echo "configure: failed program was:" >&5
2167 cat conftest.$ac_ext >&5
2169 eval "ac_cv_lib_$ac_lib_var=no"
2172 LIBS="$ac_save_LIBS"
2175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2176 echo "$ac_t""yes" 1>&6
2177 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2179 echo "$ac_t""no" 1>&6
2184 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2185 # to get the SysV transport functions.
2186 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2188 # The nsl library prevents programs from opening the X display
2189 # on Irix 5.2, according to dickey@clark.net.
2190 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2191 echo "configure:2192: checking for gethostbyname" >&5
2192 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2195 cat > conftest.$ac_ext <<EOF
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198 /* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char gethostbyname(); below. */
2201 /* Override any gcc2 internal prototype to avoid an error. */
2202 /* We use char because int might match the return type of a gcc2
2203 builtin and then its argument prototype would still apply. */
2204 char gethostbyname();
2208 /* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2219 if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2221 eval "ac_cv_func_gethostbyname=yes"
2223 echo "configure: failed program was:" >&5
2224 cat conftest.$ac_ext >&5
2226 eval "ac_cv_func_gethostbyname=no"
2231 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2232 echo "$ac_t""yes" 1>&6
2235 echo "$ac_t""no" 1>&6
2238 if test $ac_cv_func_gethostbyname = no; then
2239 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2240 echo "configure:2241: checking for gethostbyname in -lnsl" >&5
2241 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2242 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2243 echo $ac_n "(cached) $ac_c" 1>&6
2245 ac_save_LIBS="$LIBS"
2247 cat > conftest.$ac_ext <<EOF
2248 #line 2249 "configure"
2249 #include "confdefs.h"
2250 /* Override any gcc2 internal prototype to avoid an error. */
2251 /* We use char because int might match the return type of a gcc2
2252 builtin and then its argument prototype would still apply. */
2253 char gethostbyname();
2259 if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2261 eval "ac_cv_lib_$ac_lib_var=yes"
2263 echo "configure: failed program was:" >&5
2264 cat conftest.$ac_ext >&5
2266 eval "ac_cv_lib_$ac_lib_var=no"
2269 LIBS="$ac_save_LIBS"
2272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2273 echo "$ac_t""yes" 1>&6
2274 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2276 echo "$ac_t""no" 1>&6
2281 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2282 # socket/setsockopt and other routines are undefined under SCO ODT
2283 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2284 # on later versions), says simon@lia.di.epfl.ch: it contains
2285 # gethostby* variants that don't use the nameserver (or something).
2286 # -lsocket must be given before -lnsl if both are needed.
2287 # We assume that if connect needs -lnsl, so does gethostbyname.
2288 echo $ac_n "checking for connect""... $ac_c" 1>&6
2289 echo "configure:2290: checking for connect" >&5
2290 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2291 echo $ac_n "(cached) $ac_c" 1>&6
2293 cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2296 /* System header to define __stub macros and hopefully few prototypes,
2297 which can conflict with char connect(); below. */
2299 /* Override any gcc2 internal prototype to avoid an error. */
2300 /* We use char because int might match the return type of a gcc2
2301 builtin and then its argument prototype would still apply. */
2306 /* The GNU C library defines this for functions which it implements
2307 to always fail with ENOSYS. Some functions are actually named
2308 something starting with __ and the normal name is an alias. */
2309 #if defined (__stub_connect) || defined (__stub___connect)
2317 if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2319 eval "ac_cv_func_connect=yes"
2321 echo "configure: failed program was:" >&5
2322 cat conftest.$ac_ext >&5
2324 eval "ac_cv_func_connect=no"
2329 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2330 echo "$ac_t""yes" 1>&6
2333 echo "$ac_t""no" 1>&6
2336 if test $ac_cv_func_connect = no; then
2337 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2338 echo "configure:2339: checking for connect in -lsocket" >&5
2339 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2340 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2341 echo $ac_n "(cached) $ac_c" 1>&6
2343 ac_save_LIBS="$LIBS"
2344 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2345 cat > conftest.$ac_ext <<EOF
2346 #line 2347 "configure"
2347 #include "confdefs.h"
2348 /* Override any gcc2 internal prototype to avoid an error. */
2349 /* We use char because int might match the return type of a gcc2
2350 builtin and then its argument prototype would still apply. */
2357 if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2359 eval "ac_cv_lib_$ac_lib_var=yes"
2361 echo "configure: failed program was:" >&5
2362 cat conftest.$ac_ext >&5
2364 eval "ac_cv_lib_$ac_lib_var=no"
2367 LIBS="$ac_save_LIBS"
2370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2371 echo "$ac_t""yes" 1>&6
2372 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2374 echo "$ac_t""no" 1>&6
2379 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2380 echo $ac_n "checking for remove""... $ac_c" 1>&6
2381 echo "configure:2382: checking for remove" >&5
2382 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2383 echo $ac_n "(cached) $ac_c" 1>&6
2385 cat > conftest.$ac_ext <<EOF
2386 #line 2387 "configure"
2387 #include "confdefs.h"
2388 /* System header to define __stub macros and hopefully few prototypes,
2389 which can conflict with char remove(); below. */
2391 /* Override any gcc2 internal prototype to avoid an error. */
2392 /* We use char because int might match the return type of a gcc2
2393 builtin and then its argument prototype would still apply. */
2398 /* The GNU C library defines this for functions which it implements
2399 to always fail with ENOSYS. Some functions are actually named
2400 something starting with __ and the normal name is an alias. */
2401 #if defined (__stub_remove) || defined (__stub___remove)
2409 if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2411 eval "ac_cv_func_remove=yes"
2413 echo "configure: failed program was:" >&5
2414 cat conftest.$ac_ext >&5
2416 eval "ac_cv_func_remove=no"
2421 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2422 echo "$ac_t""yes" 1>&6
2425 echo "$ac_t""no" 1>&6
2428 if test $ac_cv_func_remove = no; then
2429 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2430 echo "configure:2431: checking for remove in -lposix" >&5
2431 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2432 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2433 echo $ac_n "(cached) $ac_c" 1>&6
2435 ac_save_LIBS="$LIBS"
2436 LIBS="-lposix $LIBS"
2437 cat > conftest.$ac_ext <<EOF
2438 #line 2439 "configure"
2439 #include "confdefs.h"
2440 /* Override any gcc2 internal prototype to avoid an error. */
2441 /* We use char because int might match the return type of a gcc2
2442 builtin and then its argument prototype would still apply. */
2449 if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2451 eval "ac_cv_lib_$ac_lib_var=yes"
2453 echo "configure: failed program was:" >&5
2454 cat conftest.$ac_ext >&5
2456 eval "ac_cv_lib_$ac_lib_var=no"
2459 LIBS="$ac_save_LIBS"
2462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2463 echo "$ac_t""yes" 1>&6
2464 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2466 echo "$ac_t""no" 1>&6
2471 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2472 echo $ac_n "checking for shmat""... $ac_c" 1>&6
2473 echo "configure:2474: checking for shmat" >&5
2474 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2475 echo $ac_n "(cached) $ac_c" 1>&6
2477 cat > conftest.$ac_ext <<EOF
2478 #line 2479 "configure"
2479 #include "confdefs.h"
2480 /* System header to define __stub macros and hopefully few prototypes,
2481 which can conflict with char shmat(); below. */
2483 /* Override any gcc2 internal prototype to avoid an error. */
2484 /* We use char because int might match the return type of a gcc2
2485 builtin and then its argument prototype would still apply. */
2490 /* The GNU C library defines this for functions which it implements
2491 to always fail with ENOSYS. Some functions are actually named
2492 something starting with __ and the normal name is an alias. */
2493 #if defined (__stub_shmat) || defined (__stub___shmat)
2501 if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2503 eval "ac_cv_func_shmat=yes"
2505 echo "configure: failed program was:" >&5
2506 cat conftest.$ac_ext >&5
2508 eval "ac_cv_func_shmat=no"
2513 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2514 echo "$ac_t""yes" 1>&6
2517 echo "$ac_t""no" 1>&6
2520 if test $ac_cv_func_shmat = no; then
2521 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2522 echo "configure:2523: checking for shmat in -lipc" >&5
2523 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2524 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2525 echo $ac_n "(cached) $ac_c" 1>&6
2527 ac_save_LIBS="$LIBS"
2529 cat > conftest.$ac_ext <<EOF
2530 #line 2531 "configure"
2531 #include "confdefs.h"
2532 /* Override any gcc2 internal prototype to avoid an error. */
2533 /* We use char because int might match the return type of a gcc2
2534 builtin and then its argument prototype would still apply. */
2541 if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2543 eval "ac_cv_lib_$ac_lib_var=yes"
2545 echo "configure: failed program was:" >&5
2546 cat conftest.$ac_ext >&5
2548 eval "ac_cv_lib_$ac_lib_var=no"
2551 LIBS="$ac_save_LIBS"
2554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2555 echo "$ac_t""yes" 1>&6
2556 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2558 echo "$ac_t""no" 1>&6
2564 # Check for libraries that X11R6 Xt/Xaw programs need.
2565 ac_save_LDFLAGS="$LDFLAGS"
2566 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2567 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2568 # check for ICE first), but we must link in the order -lSM -lICE or
2569 # we get undefined symbols. So assume we have SM if we have ICE.
2570 # These have to be linked with before -lX11, unlike the other
2571 # libraries we check for below, so use a different variable.
2572 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2573 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2574 echo "configure:2575: checking for IceConnectionNumber in -lICE" >&5
2575 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2576 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2577 echo $ac_n "(cached) $ac_c" 1>&6
2579 ac_save_LIBS="$LIBS"
2581 cat > conftest.$ac_ext <<EOF
2582 #line 2583 "configure"
2583 #include "confdefs.h"
2584 /* Override any gcc2 internal prototype to avoid an error. */
2585 /* We use char because int might match the return type of a gcc2
2586 builtin and then its argument prototype would still apply. */
2587 char IceConnectionNumber();
2590 IceConnectionNumber()
2593 if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2595 eval "ac_cv_lib_$ac_lib_var=yes"
2597 echo "configure: failed program was:" >&5
2598 cat conftest.$ac_ext >&5
2600 eval "ac_cv_lib_$ac_lib_var=no"
2603 LIBS="$ac_save_LIBS"
2606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2607 echo "$ac_t""yes" 1>&6
2608 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2610 echo "$ac_t""no" 1>&6
2613 LDFLAGS="$ac_save_LDFLAGS"
2618 # Try and find the app-defaults directory.
2619 # It sucks that autoconf doesn't do this already...
2629 echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
2630 echo "configure:2631: checking for X app-defaults directory" >&5
2631 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
2632 echo $ac_n "(cached) $ac_c" 1>&6
2636 if mkdir conftestdir; then
2638 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2639 cat > Imakefile <<'EOF'
2641 @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
2643 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2644 # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
2645 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2650 # Look for the directory under a standard set of common directories.
2651 # Check X11 before X11Rn because it's often a symlink to the current release.
2653 /usr/X11/lib/app-defaults \
2654 /usr/X11R6/lib/app-defaults \
2655 /usr/X11R6/lib/X11/app-defaults \
2656 /usr/X11R5/lib/app-defaults \
2657 /usr/X11R5/lib/X11/app-defaults \
2658 /usr/X11R4/lib/app-defaults \
2659 /usr/X11R4/lib/X11/app-defaults \
2661 /usr/lib/X11/app-defaults \
2662 /usr/lib/X11R6/app-defaults \
2663 /usr/lib/X11R5/app-defaults \
2664 /usr/lib/X11R4/app-defaults \
2666 /usr/local/X11/lib/app-defaults \
2667 /usr/local/X11R6/lib/app-defaults \
2668 /usr/local/X11R5/lib/app-defaults \
2669 /usr/local/X11R4/lib/app-defaults \
2671 /usr/local/lib/X11/app-defaults \
2672 /usr/local/lib/X11R6/app-defaults \
2673 /usr/local/lib/X11R6/X11/app-defaults \
2674 /usr/local/lib/X11R5/app-defaults \
2675 /usr/local/lib/X11R5/X11/app-defaults \
2676 /usr/local/lib/X11R4/app-defaults \
2677 /usr/local/lib/X11R4/X11/app-defaults \
2679 /usr/X386/lib/X11/app-defaults \
2680 /usr/x386/lib/X11/app-defaults \
2681 /usr/XFree86/lib/X11/app-defaults \
2683 /usr/lib/X11/app-defaults \
2684 /usr/local/lib/X11/app-defaults \
2685 /usr/unsupported/lib/X11/app-defaults \
2686 /usr/athena/lib/X11/app-defaults \
2687 /usr/local/x11r5/lib/X11/app-defaults \
2688 /usr/lpp/Xamples/lib/X11/app-defaults \
2689 /lib/usr/lib/X11/app-defaults \
2691 /usr/openwin/lib/app-defaults \
2692 /usr/openwin/lib/X11/app-defaults \
2693 /usr/openwin/share/lib/app-defaults \
2694 /usr/openwin/share/lib/X11/app-defaults \
2696 /X11R6/lib/app-defaults \
2697 /X11R5/lib/app-defaults \
2698 /X11R4/lib/app-defaults \
2701 if test -d "$ac_dir"; then
2702 ac_x_app_defaults=$ac_dir
2707 if test x"$ac_x_app_defaults" = x; then
2708 ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
2710 # Record where we found app-defaults for the cache.
2711 ac_cv_x_app_defaults="$ac_x_app_defaults"
2715 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
2716 eval ac_x_app_defaults="$ac_cv_x_app_defaults"
2718 APPDEFAULTS=$ac_x_app_defaults
2721 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2725 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2729 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2734 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2735 # Use this sparingly; it probably doesn't work very well on X programs.
2742 # check for the HP XHPDisableReset server extension headers.
2745 ac_save_CPPFLAGS="$CPPFLAGS"
2746 if test \! -z "$includedir" ; then
2747 CPPFLAGS="$CPPFLAGS -I$includedir"
2749 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2750 cat > conftest.$ac_ext <<EOF
2751 #line 2752 "configure"
2752 #include "confdefs.h"
2753 #include <X11/XHPlib.h>
2755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2756 egrep "XHPDisableReset" >/dev/null 2>&1; then
2758 cat >> confdefs.h <<\EOF
2759 #define HAVE_XHPDISABLERESET 1
2762 SAVER_LIBS="-lXhp11 $SAVER_LIBS"
2766 CPPFLAGS="$ac_save_CPPFLAGS"
2769 # Check for the availability of the XPointer typedef, and define it otherwise.
2771 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
2772 echo "configure:2773: checking for XPointer" >&5
2773 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
2774 echo $ac_n "(cached) $ac_c" 1>&6
2777 ac_save_CPPFLAGS="$CPPFLAGS"
2778 if test \! -z "$includedir" ; then
2779 CPPFLAGS="$CPPFLAGS -I$includedir"
2781 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2782 cat > conftest.$ac_ext <<EOF
2783 #line 2784 "configure"
2784 #include "confdefs.h"
2785 #include <X11/Xlib.h>
2787 XPointer foo = (XPointer) 0;
2790 if { (eval echo configure:2791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2794 echo "configure: failed program was:" >&5
2795 cat conftest.$ac_ext >&5
2800 CPPFLAGS="$ac_save_CPPFLAGS"
2803 echo "$ac_t""$ac_cv_xpointer" 1>&6
2804 if test $ac_cv_xpointer != yes; then
2805 cat >> confdefs.h <<\EOF
2806 #define XPointer char*
2814 # Thanks for not making xmkmf find this by default, you losers.
2815 if test -d /usr/lib/Motif1.2 ; then
2816 X_CFLAGS="-I/usr/include/Motif1.2 $X_CFLAGS"
2817 X_LIBS="-L/usr/lib/Motif1.2 $X_LIBS"
2818 elif test -d /usr/lib/Motif1.1 ; then
2819 X_CFLAGS="-I/usr/include/Motif1.1 $X_CFLAGS"
2820 X_LIBS="-L/usr/lib/Motif1.1 $X_LIBS"
2823 # This too. You losers.
2824 if test -d /usr/contrib/X11R6/include ; then
2825 X_CFLAGS="-I/usr/contrib/X11R6/include $X_CFLAGS"
2826 X_LIBS="-L/usr/contrib/X11R6/lib $X_LIBS"
2827 elif test -d /usr/contrib/X11R5/include ; then
2828 X_CFLAGS="-I/usr/contrib/X11R5/include $X_CFLAGS"
2829 X_LIBS="-L/usr/contrib/X11R5/lib $X_LIBS"
2834 # Same to you, pinheads. (Is this really the standard location now?
2835 # What happened to the joke that this kind of thing went in /opt?)
2836 if test -f /usr/dt/include/Xm/Xm.h ; then
2837 X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
2838 X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
2840 # Some versions of Slowlaris Motif require -lgen. But not all. Why?
2841 echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
2842 echo "configure:2843: checking for regcmp in -lgen" >&5
2843 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
2844 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2845 echo $ac_n "(cached) $ac_c" 1>&6
2847 ac_save_LIBS="$LIBS"
2849 cat > conftest.$ac_ext <<EOF
2850 #line 2851 "configure"
2851 #include "confdefs.h"
2852 /* Override any gcc2 internal prototype to avoid an error. */
2853 /* We use char because int might match the return type of a gcc2
2854 builtin and then its argument prototype would still apply. */
2861 if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2863 eval "ac_cv_lib_$ac_lib_var=yes"
2865 echo "configure: failed program was:" >&5
2866 cat conftest.$ac_ext >&5
2868 eval "ac_cv_lib_$ac_lib_var=no"
2871 LIBS="$ac_save_LIBS"
2874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2875 echo "$ac_t""yes" 1>&6
2876 X_LIBS="$X_LIBS -lgen"
2878 echo "$ac_t""no" 1>&6
2887 # Check for Xmu (some fucked up vendors don't ship it...)
2891 ac_save_CPPFLAGS="$CPPFLAGS"
2892 if test \! -z "$includedir" ; then
2893 CPPFLAGS="$CPPFLAGS -I$includedir"
2895 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2896 ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
2897 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
2898 echo "configure:2899: checking for X11/Xmu/Error.h" >&5
2899 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2900 echo $ac_n "(cached) $ac_c" 1>&6
2902 cat > conftest.$ac_ext <<EOF
2903 #line 2904 "configure"
2904 #include "confdefs.h"
2905 #include <X11/Xmu/Error.h>
2907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2908 { (eval echo configure:2909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2909 ac_err=`grep -v '^ *+' conftest.out`
2910 if test -z "$ac_err"; then
2912 eval "ac_cv_header_$ac_safe=yes"
2915 echo "configure: failed program was:" >&5
2916 cat conftest.$ac_ext >&5
2918 eval "ac_cv_header_$ac_safe=no"
2922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2923 echo "$ac_t""yes" 1>&6
2926 echo "$ac_t""no" 1>&6
2929 CPPFLAGS="$ac_save_CPPFLAGS"
2930 if test $have_xmu = no ; then
2931 XMU_SRCS='$(UTILS_SRC)/xmu.c'
2932 XMU_OBJS='$(UTILS_BIN)/xmu.o'
2936 SAVER_LIBS="-lXmu $SAVER_LIBS"
2937 HACK_LIBS="-lXmu $HACK_LIBS"
2938 cat >> confdefs.h <<\EOF
2945 # See comp.windows.x FAQ question 124 about _get_wmShellWidgetClass on 4.1.x.
2946 # The right fix is to get OpenWindows 3.0 patches 100512-02 and 100573-03.
2948 if test $have_xmu = yes ; then
2951 echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
2952 echo "configure:2953: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
2953 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
2954 echo $ac_n "(cached) $ac_c" 1>&6
2956 ac_save_LDFLAGS="$LDFLAGS"
2957 if test \! -z "$x_libraries" ; then
2958 LDFLAGS="$LDFLAGS -L$x_libraries"
2960 # Note: this trick never works! (Generally.)
2961 # We're only getting away with using AC_TRY_LINK
2962 # with X libraries because we know it's SunOS.
2963 LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
2964 cat > conftest.$ac_ext <<EOF
2965 #line 2966 "configure"
2966 #include "confdefs.h"
2972 if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2974 ac_cv_sunos_xmu_bug=no
2976 echo "configure: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2979 ac_cv_sunos_xmu_bug=yes
2982 LDFLAGS="$ac_save_LDFLAGS"
2985 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
2986 if test $ac_cv_sunos_xmu_bug = yes ; then
2987 echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
2988 echo "configure:2989: checking whether the compiler understands -static" >&5
2989 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
2990 echo $ac_n "(cached) $ac_c" 1>&6
2992 ac_save_LDFLAGS="$LDFLAGS"
2993 LDFLAGS="$LDFLAGS -static"
2994 cat > conftest.$ac_ext <<EOF
2995 #line 2996 "configure"
2996 #include "confdefs.h"
3002 if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3006 echo "configure: failed program was:" >&5
3007 cat conftest.$ac_ext >&5
3012 LDFLAGS="$ac_save_LDFLAGS"
3015 echo "$ac_t""$ac_cv_ld_static" 1>&6
3016 if test $ac_cv_ld_static = yes ; then
3017 LDFLAGS="$LDFLAGS -static"
3019 LDFLAGS="$LDFLAGS -Bstatic"
3027 # Check for the SGI SCREEN_SAVER server extension header.
3030 with_sgi_req=unspecified
3031 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3032 if test "${with_sgi_ext+set}" = set; then
3033 withval="$with_sgi_ext"
3034 with_sgi="$withval"; with_sgi_req="$withval"
3039 if test $with_sgi = yes; then
3041 ac_save_CPPFLAGS="$CPPFLAGS"
3042 if test \! -z "$includedir" ; then
3043 CPPFLAGS="$CPPFLAGS -I$includedir"
3045 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3046 ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3047 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3048 echo "configure:3049: checking for X11/extensions/XScreenSaver.h" >&5
3049 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3050 echo $ac_n "(cached) $ac_c" 1>&6
3052 cat > conftest.$ac_ext <<EOF
3053 #line 3054 "configure"
3054 #include "confdefs.h"
3055 #include <X11/extensions/XScreenSaver.h>
3057 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3058 { (eval echo configure:3059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3059 ac_err=`grep -v '^ *+' conftest.out`
3060 if test -z "$ac_err"; then
3062 eval "ac_cv_header_$ac_safe=yes"
3065 echo "configure: failed program was:" >&5
3066 cat conftest.$ac_ext >&5
3068 eval "ac_cv_header_$ac_safe=no"
3072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3073 echo "$ac_t""yes" 1>&6
3075 cat >> confdefs.h <<\EOF
3076 #define HAVE_SGI_SAVER_EXTENSION 1
3080 echo "$ac_t""no" 1>&6
3083 CPPFLAGS="$ac_save_CPPFLAGS"
3085 elif test $with_sgi != no; then
3086 echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3090 # Check for the MIT-SCREEN-SAVER server extension header,
3091 # unless the SGI extension has already been found.
3094 with_mit_req=unspecified
3095 # Check whether --with-mit-ext or --without-mit-ext was given.
3096 if test "${with_mit_ext+set}" = set; then
3097 withval="$with_mit_ext"
3098 with_mit="$withval"; with_mit_req="$withval"
3103 if test $have_sgi != yes; then
3104 if test $with_mit = yes; then
3106 ac_save_CPPFLAGS="$CPPFLAGS"
3107 if test \! -z "$includedir" ; then
3108 CPPFLAGS="$CPPFLAGS -I$includedir"
3110 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3111 ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3112 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3113 echo "configure:3114: checking for X11/extensions/scrnsaver.h" >&5
3114 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3115 echo $ac_n "(cached) $ac_c" 1>&6
3117 cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 #include <X11/extensions/scrnsaver.h>
3122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3123 { (eval echo configure:3124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3124 ac_err=`grep -v '^ *+' conftest.out`
3125 if test -z "$ac_err"; then
3127 eval "ac_cv_header_$ac_safe=yes"
3130 echo "configure: failed program was:" >&5
3131 cat conftest.$ac_ext >&5
3133 eval "ac_cv_header_$ac_safe=no"
3137 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3138 echo "$ac_t""yes" 1>&6
3141 echo "$ac_t""no" 1>&6
3144 CPPFLAGS="$ac_save_CPPFLAGS"
3146 # Now check to see if it's really in the library; XF86Free-3.3 ships
3147 # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3149 if test $have_mit = yes; then
3151 ac_save_CPPFLAGS="$CPPFLAGS"
3152 ac_save_LDFLAGS="$LDFLAGS"
3153 if test \! -z "$includedir" ; then
3154 CPPFLAGS="$CPPFLAGS -I$includedir"
3156 if test \! -z "$includedir" ; then
3157 CPPFLAGS="$CPPFLAGS -I$includedir"
3159 if test \! -z "$libdir" ; then
3160 LDFLAGS="$LDFLAGS -L$libdir"
3162 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3163 LDFLAGS="$LDFLAGS -L$x_libraries"
3164 echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3165 echo "configure:3166: checking for XScreenSaverRegister in -lXext" >&5
3166 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3167 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3168 echo $ac_n "(cached) $ac_c" 1>&6
3170 ac_save_LIBS="$LIBS"
3171 LIBS="-lXext -lm $LIBS"
3172 cat > conftest.$ac_ext <<EOF
3173 #line 3174 "configure"
3174 #include "confdefs.h"
3175 /* Override any gcc2 internal prototype to avoid an error. */
3176 /* We use char because int might match the return type of a gcc2
3177 builtin and then its argument prototype would still apply. */
3178 char XScreenSaverRegister();
3181 XScreenSaverRegister()
3184 if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3186 eval "ac_cv_lib_$ac_lib_var=yes"
3188 echo "configure: failed program was:" >&5
3189 cat conftest.$ac_ext >&5
3191 eval "ac_cv_lib_$ac_lib_var=no"
3194 LIBS="$ac_save_LIBS"
3197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3198 echo "$ac_t""yes" 1>&6
3199 ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3200 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3201 cat >> confdefs.h <<EOF
3202 #define $ac_tr_lib 1
3208 echo "$ac_t""no" 1>&6
3212 CPPFLAGS="$ac_save_CPPFLAGS"
3213 LDFLAGS="$ac_save_LDFLAGS"
3215 if test $have_mit = no; then
3216 # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
3217 # of in Xext. Thank you master, may I have another.
3219 ac_save_CPPFLAGS="$CPPFLAGS"
3220 ac_save_LDFLAGS="$LDFLAGS"
3221 if test \! -z "$includedir" ; then
3222 CPPFLAGS="$CPPFLAGS -I$includedir"
3224 if test \! -z "$includedir" ; then
3225 CPPFLAGS="$CPPFLAGS -I$includedir"
3227 if test \! -z "$libdir" ; then
3228 LDFLAGS="$LDFLAGS -L$libdir"
3230 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3231 LDFLAGS="$LDFLAGS -L$x_libraries"
3232 echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3233 echo "configure:3234: checking for XScreenSaverRegister in -lXExExt" >&5
3234 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3235 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3236 echo $ac_n "(cached) $ac_c" 1>&6
3238 ac_save_LIBS="$LIBS"
3239 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3240 cat > conftest.$ac_ext <<EOF
3241 #line 3242 "configure"
3242 #include "confdefs.h"
3243 /* Override any gcc2 internal prototype to avoid an error. */
3244 /* We use char because int might match the return type of a gcc2
3245 builtin and then its argument prototype would still apply. */
3246 char XScreenSaverRegister();
3249 XScreenSaverRegister()
3252 if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3254 eval "ac_cv_lib_$ac_lib_var=yes"
3256 echo "configure: failed program was:" >&5
3257 cat conftest.$ac_ext >&5
3259 eval "ac_cv_lib_$ac_lib_var=no"
3262 LIBS="$ac_save_LIBS"
3265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3266 echo "$ac_t""yes" 1>&6
3267 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3269 echo "$ac_t""no" 1>&6
3272 CPPFLAGS="$ac_save_CPPFLAGS"
3273 LDFLAGS="$ac_save_LDFLAGS"
3276 if test $have_mit = no; then
3277 # Double fuck! Looks like some versions of XFree86 (whichever version
3278 # it is that comes with RedHat Linux 2.0 -- I can't find a version
3279 # number) put this garbage in Xss instead of Xext. Thank you master,
3280 # may I have another.
3282 ac_save_CPPFLAGS="$CPPFLAGS"
3283 ac_save_LDFLAGS="$LDFLAGS"
3284 if test \! -z "$includedir" ; then
3285 CPPFLAGS="$CPPFLAGS -I$includedir"
3287 if test \! -z "$includedir" ; then
3288 CPPFLAGS="$CPPFLAGS -I$includedir"
3290 if test \! -z "$libdir" ; then
3291 LDFLAGS="$LDFLAGS -L$libdir"
3293 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3294 LDFLAGS="$LDFLAGS -L$x_libraries"
3295 echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
3296 echo "configure:3297: checking for XScreenSaverRegister in -lXss" >&5
3297 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3298 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3299 echo $ac_n "(cached) $ac_c" 1>&6
3301 ac_save_LIBS="$LIBS"
3302 LIBS="-lXss -lX11 -lXext -lm $LIBS"
3303 cat > conftest.$ac_ext <<EOF
3304 #line 3305 "configure"
3305 #include "confdefs.h"
3306 /* Override any gcc2 internal prototype to avoid an error. */
3307 /* We use char because int might match the return type of a gcc2
3308 builtin and then its argument prototype would still apply. */
3309 char XScreenSaverRegister();
3312 XScreenSaverRegister()
3315 if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3317 eval "ac_cv_lib_$ac_lib_var=yes"
3319 echo "configure: failed program was:" >&5
3320 cat conftest.$ac_ext >&5
3322 eval "ac_cv_lib_$ac_lib_var=no"
3325 LIBS="$ac_save_LIBS"
3328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3329 echo "$ac_t""yes" 1>&6
3330 have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
3332 echo "$ac_t""no" 1>&6
3335 CPPFLAGS="$ac_save_CPPFLAGS"
3336 LDFLAGS="$ac_save_LDFLAGS"
3339 if test $have_mit = yes; then
3340 cat >> confdefs.h <<\EOF
3341 #define HAVE_MIT_SAVER_EXTENSION 1
3348 elif test $with_mit != no; then
3349 echo "error: must be yes or no: --with-mit-ext=$with_mit"
3355 # Check for the XIDLE server extension header.
3358 with_xidle_req=unspecified
3359 # Check whether --with-xidle-ext or --without-xidle-ext was given.
3360 if test "${with_xidle_ext+set}" = set; then
3361 withval="$with_xidle_ext"
3362 with_xidle="$withval"; with_xidle_req="$withval"
3367 if test $with_xidle = yes; then
3369 ac_save_CPPFLAGS="$CPPFLAGS"
3370 if test \! -z "$includedir" ; then
3371 CPPFLAGS="$CPPFLAGS -I$includedir"
3373 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3374 ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
3375 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
3376 echo "configure:3377: checking for X11/extensions/xidle.h" >&5
3377 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3378 echo $ac_n "(cached) $ac_c" 1>&6
3380 cat > conftest.$ac_ext <<EOF
3381 #line 3382 "configure"
3382 #include "confdefs.h"
3383 #include <X11/extensions/xidle.h>
3385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3386 { (eval echo configure:3387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3387 ac_err=`grep -v '^ *+' conftest.out`
3388 if test -z "$ac_err"; then
3390 eval "ac_cv_header_$ac_safe=yes"
3393 echo "configure: failed program was:" >&5
3394 cat conftest.$ac_ext >&5
3396 eval "ac_cv_header_$ac_safe=no"
3400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3401 echo "$ac_t""yes" 1>&6
3403 cat >> confdefs.h <<\EOF
3404 #define HAVE_XIDLE_EXTENSION 1
3408 echo "$ac_t""no" 1>&6
3411 CPPFLAGS="$ac_save_CPPFLAGS"
3412 elif test $with_xidle != no; then
3413 echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
3418 # Check for the XSHM server extension header.
3421 with_xshm_req=unspecified
3422 # Check whether --with-xshm-ext or --without-xshm-ext was given.
3423 if test "${with_xshm_ext+set}" = set; then
3424 withval="$with_xshm_ext"
3425 with_xshm="$withval"; with_xshm_req="$withval"
3430 if test $with_xshm = yes; then
3432 # first check for Xshm.h.
3434 ac_save_CPPFLAGS="$CPPFLAGS"
3435 if test \! -z "$includedir" ; then
3436 CPPFLAGS="$CPPFLAGS -I$includedir"
3438 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3439 ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
3440 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
3441 echo "configure:3442: checking for X11/extensions/XShm.h" >&5
3442 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3443 echo $ac_n "(cached) $ac_c" 1>&6
3445 cat > conftest.$ac_ext <<EOF
3446 #line 3447 "configure"
3447 #include "confdefs.h"
3448 #include <X11/extensions/XShm.h>
3450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3451 { (eval echo configure:3452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3452 ac_err=`grep -v '^ *+' conftest.out`
3453 if test -z "$ac_err"; then
3455 eval "ac_cv_header_$ac_safe=yes"
3458 echo "configure: failed program was:" >&5
3459 cat conftest.$ac_ext >&5
3461 eval "ac_cv_header_$ac_safe=no"
3465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3466 echo "$ac_t""yes" 1>&6
3469 echo "$ac_t""no" 1>&6
3472 CPPFLAGS="$ac_save_CPPFLAGS"
3474 # if that succeeded, then check for sys/ipc.h.
3475 if test $have_xshm = yes; then
3478 ac_save_CPPFLAGS="$CPPFLAGS"
3479 if test \! -z "$includedir" ; then
3480 CPPFLAGS="$CPPFLAGS -I$includedir"
3482 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3483 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
3484 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
3485 echo "configure:3486: checking for sys/ipc.h" >&5
3486 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3487 echo $ac_n "(cached) $ac_c" 1>&6
3489 cat > conftest.$ac_ext <<EOF
3490 #line 3491 "configure"
3491 #include "confdefs.h"
3492 #include <sys/ipc.h>
3494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3495 { (eval echo configure:3496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3496 ac_err=`grep -v '^ *+' conftest.out`
3497 if test -z "$ac_err"; then
3499 eval "ac_cv_header_$ac_safe=yes"
3502 echo "configure: failed program was:" >&5
3503 cat conftest.$ac_ext >&5
3505 eval "ac_cv_header_$ac_safe=no"
3509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3510 echo "$ac_t""yes" 1>&6
3513 echo "$ac_t""no" 1>&6
3516 CPPFLAGS="$ac_save_CPPFLAGS"
3519 # if that succeeded, then check for sys/shm.h.
3520 if test $have_xshm = yes; then
3523 ac_save_CPPFLAGS="$CPPFLAGS"
3524 if test \! -z "$includedir" ; then
3525 CPPFLAGS="$CPPFLAGS -I$includedir"
3527 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3528 ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
3529 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
3530 echo "configure:3531: checking for sys/shm.h" >&5
3531 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3532 echo $ac_n "(cached) $ac_c" 1>&6
3534 cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537 #include <sys/shm.h>
3539 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3540 { (eval echo configure:3541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3541 ac_err=`grep -v '^ *+' conftest.out`
3542 if test -z "$ac_err"; then
3544 eval "ac_cv_header_$ac_safe=yes"
3547 echo "configure: failed program was:" >&5
3548 cat conftest.$ac_ext >&5
3550 eval "ac_cv_header_$ac_safe=no"
3554 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3555 echo "$ac_t""yes" 1>&6
3558 echo "$ac_t""no" 1>&6
3561 CPPFLAGS="$ac_save_CPPFLAGS"
3564 # if that succeeded, then we've really got it.
3565 if test $have_xshm = yes; then
3566 cat >> confdefs.h <<\EOF
3567 #define HAVE_XSHM_EXTENSION 1
3572 elif test $with_xshm != no; then
3573 echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
3578 # Check for Motif and Athena --with and --without arguments.
3582 with_motif_req=unspecified
3583 with_athena_req=unspecified
3585 # Check whether --with-motif or --without-motif was given.
3586 if test "${with_motif+set}" = set; then
3587 withval="$with_motif"
3588 with_motif="$withval"; with_motif_req="$withval"
3594 # Check whether --with-athena or --without-athena was given.
3595 if test "${with_athena+set}" = set; then
3596 withval="$with_athena"
3597 with_athena="$withval"; with_athena_req="$withval"
3603 if test $with_motif != yes -a $with_motif != no ; then
3604 echo "error: must be yes or no: --with-motif=$with_motif"
3608 if test $with_athena != yes -a $with_athena != no ; then
3609 echo "error: must be yes or no: --with-athena=$with_athena"
3614 # Saying --without-motif is the same as saying --with-athena.
3615 if test $with_motif_req = no ; then
3620 # Saying --without-athena is the same as saying --with-motif.
3621 if test $with_athena_req = no ; then
3626 # Check for Motif and Athena headers.
3630 ac_save_CPPFLAGS="$CPPFLAGS"
3631 if test \! -z "$includedir" ; then
3632 CPPFLAGS="$CPPFLAGS -I$includedir"
3634 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3635 ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
3636 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
3637 echo "configure:3638: checking for Xm/Xm.h" >&5
3638 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3639 echo $ac_n "(cached) $ac_c" 1>&6
3641 cat > conftest.$ac_ext <<EOF
3642 #line 3643 "configure"
3643 #include "confdefs.h"
3646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3647 { (eval echo configure:3648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3648 ac_err=`grep -v '^ *+' conftest.out`
3649 if test -z "$ac_err"; then
3651 eval "ac_cv_header_$ac_safe=yes"
3654 echo "configure: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3657 eval "ac_cv_header_$ac_safe=no"
3661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3662 echo "$ac_t""yes" 1>&6
3664 cat >> confdefs.h <<\EOF
3665 #define HAVE_MOTIF 1
3668 SAVER_LIBS="-lXm $SAVER_LIBS"
3670 echo "$ac_t""no" 1>&6
3673 CPPFLAGS="$ac_save_CPPFLAGS"
3678 ac_save_CPPFLAGS="$CPPFLAGS"
3679 if test \! -z "$includedir" ; then
3680 CPPFLAGS="$CPPFLAGS -I$includedir"
3682 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3683 ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
3684 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
3685 echo "configure:3686: checking for X11/Xaw/Dialog.h" >&5
3686 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3687 echo $ac_n "(cached) $ac_c" 1>&6
3689 cat > conftest.$ac_ext <<EOF
3690 #line 3691 "configure"
3691 #include "confdefs.h"
3692 #include <X11/Xaw/Dialog.h>
3694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3695 { (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3696 ac_err=`grep -v '^ *+' conftest.out`
3697 if test -z "$ac_err"; then
3699 eval "ac_cv_header_$ac_safe=yes"
3702 echo "configure: failed program was:" >&5
3703 cat conftest.$ac_ext >&5
3705 eval "ac_cv_header_$ac_safe=no"
3709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3710 echo "$ac_t""yes" 1>&6
3712 cat >> confdefs.h <<\EOF
3713 #define HAVE_ATHENA 1
3716 SAVER_LIBS="-lXaw $SAVER_LIBS"
3718 echo "$ac_t""no" 1>&6
3721 CPPFLAGS="$ac_save_CPPFLAGS"
3725 # If they asked for both motif and athena, check motif then athena.
3726 # If they asked for only motif, check motif then athena.
3727 # If they asked for only athena, check athena then motif.
3728 # If they asked for neither, check motif then athena.
3730 if test $with_motif = yes; then
3731 # asked for both, or for motif only
3733 if test $have_motif = yes; then
3740 elif test $with_athena = yes; then
3741 # asked for athena only
3743 if test $have_athena = yes; then
3752 if test $have_motif = yes; then
3761 # If we have Athena, check whether it's a version that includes
3762 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
3763 if test $have_athena = yes ; then
3764 echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
3765 echo "configure:3766: checking for XawViewportSetCoordinates in Viewport.h" >&5
3766 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
3767 echo $ac_n "(cached) $ac_c" 1>&6
3769 ac_cv_have_XawViewportSetCoordinates=no
3771 ac_save_CPPFLAGS="$CPPFLAGS"
3772 if test \! -z "$includedir" ; then
3773 CPPFLAGS="$CPPFLAGS -I$includedir"
3775 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3776 cat > conftest.$ac_ext <<EOF
3777 #line 3778 "configure"
3778 #include "confdefs.h"
3779 #include <X11/Xaw/Viewport.h>
3781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3782 egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then
3784 ac_cv_have_XawViewportSetCoordinates=yes
3788 CPPFLAGS="$ac_save_CPPFLAGS"
3791 echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6
3792 if test $ac_cv_have_XawViewportSetCoordinates = yes ; then
3793 cat >> confdefs.h <<\EOF
3794 #define HAVE_XawViewportSetCoordinates 1
3801 # If we have Motif, check whether it's really LessTif.
3804 if test $have_motif = yes ; then
3805 echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
3806 echo "configure:3807: checking whether Motif is really LessTif" >&5
3807 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
3808 echo $ac_n "(cached) $ac_c" 1>&6
3811 ac_save_CPPFLAGS="$CPPFLAGS"
3812 if test \! -z "$includedir" ; then
3813 CPPFLAGS="$CPPFLAGS -I$includedir"
3815 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3816 cat > conftest.$ac_ext <<EOF
3817 #line 3818 "configure"
3818 #include "confdefs.h"
3821 long vers = LesstifVersion;
3824 if { (eval echo configure:3825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3826 ac_cv_have_lesstif=yes
3828 echo "configure: failed program was:" >&5
3829 cat conftest.$ac_ext >&5
3831 ac_cv_have_lesstif=no
3834 CPPFLAGS="$ac_save_CPPFLAGS"
3837 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
3838 have_lesstif=$ac_cv_have_lesstif
3842 # check for XPM header.
3845 with_xpm_req=unspecified
3846 # Check whether --with-xpm or --without-xpm was given.
3847 if test "${with_xpm+set}" = set; then
3849 with_xpm="$withval"; with_xpm_req="$withval"
3854 if test $with_xpm = yes; then
3856 ac_save_CPPFLAGS="$CPPFLAGS"
3857 if test \! -z "$includedir" ; then
3858 CPPFLAGS="$CPPFLAGS -I$includedir"
3860 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3861 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
3862 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
3863 echo "configure:3864: checking for X11/xpm.h" >&5
3864 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3865 echo $ac_n "(cached) $ac_c" 1>&6
3867 cat > conftest.$ac_ext <<EOF
3868 #line 3869 "configure"
3869 #include "confdefs.h"
3870 #include <X11/xpm.h>
3872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3873 { (eval echo configure:3874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3874 ac_err=`grep -v '^ *+' conftest.out`
3875 if test -z "$ac_err"; then
3877 eval "ac_cv_header_$ac_safe=yes"
3880 echo "configure: failed program was:" >&5
3881 cat conftest.$ac_ext >&5
3883 eval "ac_cv_header_$ac_safe=no"
3887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3888 echo "$ac_t""yes" 1>&6
3890 cat >> confdefs.h <<\EOF
3896 echo "$ac_t""no" 1>&6
3899 CPPFLAGS="$ac_save_CPPFLAGS"
3900 elif test $with_xpm != no; then
3901 echo "error: must be yes or no: --with-xpm=$with_xpm"
3906 # check for the GL header
3909 with_gl_req=unspecified
3910 # Check whether --with-gl or --without-gl was given.
3911 if test "${with_gl+set}" = set; then
3913 with_gl="$withval"; with_gl_req="$withval"
3919 if test $with_gl = yes; then
3921 ac_save_CPPFLAGS="$CPPFLAGS"
3922 if test \! -z "$includedir" ; then
3923 CPPFLAGS="$CPPFLAGS -I$includedir"
3925 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3926 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
3927 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
3928 echo "configure:3929: checking for GL/gl.h" >&5
3929 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3930 echo $ac_n "(cached) $ac_c" 1>&6
3932 cat > conftest.$ac_ext <<EOF
3933 #line 3934 "configure"
3934 #include "confdefs.h"
3937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3938 { (eval echo configure:3939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3939 ac_err=`grep -v '^ *+' conftest.out`
3940 if test -z "$ac_err"; then
3942 eval "ac_cv_header_$ac_safe=yes"
3945 echo "configure: failed program was:" >&5
3946 cat conftest.$ac_ext >&5
3948 eval "ac_cv_header_$ac_safe=no"
3952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3953 echo "$ac_t""yes" 1>&6
3956 echo "$ac_t""no" 1>&6
3959 CPPFLAGS="$ac_save_CPPFLAGS"
3960 if test $have_gl = yes ; then
3962 ac_save_CPPFLAGS="$CPPFLAGS"
3963 if test \! -z "$includedir" ; then
3964 CPPFLAGS="$CPPFLAGS -I$includedir"
3966 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3967 ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
3968 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
3969 echo "configure:3970: checking for GL/glx.h" >&5
3970 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3971 echo $ac_n "(cached) $ac_c" 1>&6
3973 cat > conftest.$ac_ext <<EOF
3974 #line 3975 "configure"
3975 #include "confdefs.h"
3978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3979 { (eval echo configure:3980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3980 ac_err=`grep -v '^ *+' conftest.out`
3981 if test -z "$ac_err"; then
3983 eval "ac_cv_header_$ac_safe=yes"
3986 echo "configure: failed program was:" >&5
3987 cat conftest.$ac_ext >&5
3989 eval "ac_cv_header_$ac_safe=no"
3993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3994 echo "$ac_t""yes" 1>&6
3997 echo "$ac_t""no" 1>&6
4000 CPPFLAGS="$ac_save_CPPFLAGS"
4003 # If we have the headers, try and figure out which vendor it's from.
4005 if test $have_gl = yes ; then
4007 cat >> confdefs.h <<\EOF
4013 ac_save_CPPFLAGS="$CPPFLAGS"
4014 if test \! -z "$includedir" ; then
4015 CPPFLAGS="$CPPFLAGS -I$includedir"
4017 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4018 cat > conftest.$ac_ext <<EOF
4019 #line 4020 "configure"
4020 #include "confdefs.h"
4023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4024 egrep "Mesa" >/dev/null 2>&1; then
4030 CPPFLAGS="$ac_save_CPPFLAGS"
4031 if test $have_mesa_gl = no ; then
4032 GL_LIBS="-lGL -lGLU"
4034 cat >> confdefs.h <<\EOF
4035 #define HAVE_MESA_GL 1
4038 GL_LIBS="-lMesaGL -lMesaGLU"
4042 elif test $with_gl != no; then
4043 echo "error: must be yes or no: --with-gl=$with_gl"
4048 # check for SGI XReadDisplay server extension header.
4051 with_readdisplay_req=unspecified
4052 # Check whether --with-readdisplay or --without-readdisplay was given.
4053 if test "${with_readdisplay+set}" = set; then
4054 withval="$with_readdisplay"
4055 with_readdisplay="$withval"; with_readdisplay_req="$withval"
4057 with_readdisplay=yes
4060 if test $with_readdisplay = yes; then
4062 ac_save_CPPFLAGS="$CPPFLAGS"
4063 if test \! -z "$includedir" ; then
4064 CPPFLAGS="$CPPFLAGS -I$includedir"
4066 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4067 ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
4068 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
4069 echo "configure:4070: checking for X11/extensions/readdisplay.h" >&5
4070 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4071 echo $ac_n "(cached) $ac_c" 1>&6
4073 cat > conftest.$ac_ext <<EOF
4074 #line 4075 "configure"
4075 #include "confdefs.h"
4076 #include <X11/extensions/readdisplay.h>
4078 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4079 { (eval echo configure:4080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4080 ac_err=`grep -v '^ *+' conftest.out`
4081 if test -z "$ac_err"; then
4083 eval "ac_cv_header_$ac_safe=yes"
4086 echo "configure: failed program was:" >&5
4087 cat conftest.$ac_ext >&5
4089 eval "ac_cv_header_$ac_safe=no"
4093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4094 echo "$ac_t""yes" 1>&6
4095 cat >> confdefs.h <<\EOF
4096 #define HAVE_READ_DISPLAY_EXTENSION 1
4100 echo "$ac_t""no" 1>&6
4103 CPPFLAGS="$ac_save_CPPFLAGS"
4104 elif test $with_readdisplay != no; then
4105 echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
4111 # Try to find a program to generate random text.
4113 # Zippy is funnier than the idiocy generally spat out by `fortune',
4114 # so try to find that, by invoking Emacs and asking it where its
4115 # libexec directory is ("yow" lives in there.)
4117 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
4118 # and if so, use them.
4120 # If that doesn't work, look in /usr/games, and if it's there, use
4121 # the full pathname.
4124 # Check whether --with-zippy or --without-zippy was given.
4125 if test "${with_zippy+set}" = set; then
4126 withval="$with_zippy"
4127 with_zippy="$withval"
4131 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
4135 if test -n "$with_zippy" ; then
4136 ac_cv_zippy_program="$with_zippy"
4138 elif test -n "$ac_cv_zippy_program"; then
4139 echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
4143 for ac_prog in emacs
4145 # Extract the first word of "$ac_prog", so it can be a program name with args.
4146 set dummy $ac_prog; ac_word=$2
4147 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4148 echo "configure:4149: checking for $ac_word" >&5
4149 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
4150 echo $ac_n "(cached) $ac_c" 1>&6
4152 if test -n "$emacs_exe"; then
4153 ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
4155 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4156 for ac_dir in $PATH; do
4157 test -z "$ac_dir" && ac_dir=.
4158 if test -f $ac_dir/$ac_word; then
4159 ac_cv_prog_emacs_exe="$ac_prog"
4166 emacs_exe="$ac_cv_prog_emacs_exe"
4167 if test -n "$emacs_exe"; then
4168 echo "$ac_t""$emacs_exe" 1>&6
4170 echo "$ac_t""no" 1>&6
4173 test -n "$emacs_exe" && break
4176 for ac_prog in xemacs
4178 # Extract the first word of "$ac_prog", so it can be a program name with args.
4179 set dummy $ac_prog; ac_word=$2
4180 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4181 echo "configure:4182: checking for $ac_word" >&5
4182 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
4183 echo $ac_n "(cached) $ac_c" 1>&6
4185 if test -n "$xemacs_exe"; then
4186 ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
4188 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4189 for ac_dir in $PATH; do
4190 test -z "$ac_dir" && ac_dir=.
4191 if test -f $ac_dir/$ac_word; then
4192 ac_cv_prog_xemacs_exe="$ac_prog"
4199 xemacs_exe="$ac_cv_prog_xemacs_exe"
4200 if test -n "$xemacs_exe"; then
4201 echo "$ac_t""$xemacs_exe" 1>&6
4203 echo "$ac_t""no" 1>&6
4206 test -n "$xemacs_exe" && break
4210 ac_cv_zippy_program=""
4211 eargs='-batch -q -nw --eval'
4213 if test -n "$emacs_exe" ; then
4214 echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
4215 echo "configure:4216: checking for emacs yow" >&5
4217 # get emacs to tell us where the libexec directory is.
4219 dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
4220 2>/dev/null | tail -1`
4221 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
4223 # try running libexec/yow and see if it exits without error.
4225 if test x"$dir" != x -a -x $dir/yow ; then
4226 if $dir/yow >&- 2>&- ; then
4227 ac_cv_zippy_program="$dir/yow"
4228 echo "$ac_t""$ac_cv_zippy_program" 1>&6
4230 echo "$ac_t""no" 1>&6
4235 if test -z "$ac_cv_zippy_program" ; then
4236 echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
4237 echo "configure:4238: checking for xemacs yow" >&5
4238 if test -n "$xemacs_exe" ; then
4240 # get xemacs to tell us where the libexec directory is.
4242 dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
4243 2>/dev/null | tail -1`
4244 dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
4246 # try running libexec/yow and see if it exits without error.
4248 if test x"$dir" != x -a -x $dir/yow ; then
4249 if $dir/yow >&- 2>&- ; then
4250 ac_cv_zippy_program="$dir/yow"
4251 echo "$ac_t""$ac_cv_zippy_program" 1>&6
4254 # in some xemacs installations, the pathname of the yow.lines file
4255 # isn't hardcoded into the yow executable, and must be passed on
4256 # the command line. See if it's in libexec/../etc/.
4260 dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
4263 yow="yow -f $dir_up/etc/yow.lines"
4264 if $dir/$yow >&- 2>&- ; then
4265 ac_cv_zippy_program="$dir/$yow"
4266 echo "$ac_t""$ac_cv_zippy_program" 1>&6
4268 echo "$ac_t""no" 1>&6
4275 # if that didn't work, try for some other programs...
4276 if test -z "$ac_cv_zippy_program" ; then
4278 for ac_prog in fortune zippy yow
4280 # Extract the first word of "$ac_prog", so it can be a program name with args.
4281 set dummy $ac_prog; ac_word=$2
4282 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4283 echo "configure:4284: checking for $ac_word" >&5
4284 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
4285 echo $ac_n "(cached) $ac_c" 1>&6
4287 if test -n "$fortune"; then
4288 ac_cv_prog_fortune="$fortune" # Let the user override the test.
4290 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4291 for ac_dir in $PATH; do
4292 test -z "$ac_dir" && ac_dir=.
4293 if test -f $ac_dir/$ac_word; then
4294 ac_cv_prog_fortune="$ac_prog"
4301 fortune="$ac_cv_prog_fortune"
4302 if test -n "$fortune"; then
4303 echo "$ac_t""$fortune" 1>&6
4305 echo "$ac_t""no" 1>&6
4308 test -n "$fortune" && break
4311 # if that didn't work, try for those programs in /usr/games...
4312 if test -z "$fortune" ; then
4313 for ac_prog in fortune zippy yow
4315 # Extract the first word of "$ac_prog", so it can be a program name with args.
4316 set dummy $ac_prog; ac_word=$2
4317 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4318 echo "configure:4319: checking for $ac_word" >&5
4319 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
4320 echo $ac_n "(cached) $ac_c" 1>&6
4324 ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
4327 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4328 for ac_dir in /usr/games:/usr/local/games$ac_dummy; do
4329 test -z "$ac_dir" && ac_dir=.
4330 if test -f $ac_dir/$ac_word; then
4331 ac_cv_path_fortune="$ac_dir/$ac_word"
4339 fortune="$ac_cv_path_fortune"
4340 if test -n "$fortune"; then
4341 echo "$ac_t""$fortune" 1>&6
4343 echo "$ac_t""no" 1>&6
4346 test -n "$fortune" && break
4348 test -n "$fortune" || fortune="fortune"
4354 if test -z "$ac_cv_zippy_program" ; then
4355 ac_cv_zippy_program=fortune
4358 cat >> confdefs.h <<EOF
4359 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
4366 # Allow locking to be disabled at compile-time.
4370 with_kerberos_req=unspecified
4372 with_shadow_req=unspecified
4375 # Check whether --enable-locking or --disable-locking was given.
4376 if test "${enable_locking+set}" = set; then
4377 enableval="$enable_locking"
4378 enable_locking="$enableval"
4383 if test $enable_locking = yes; then
4385 # Check for Kerberos.
4387 # Check whether --with-kerberos or --without-kerberos was given.
4388 if test "${with_kerberos+set}" = set; then
4389 withval="$with_kerberos"
4390 with_kerberos="$withval"; with_kerberos_req="$withval"
4395 if test $with_kerberos = yes; then
4396 echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
4397 echo "configure:4398: checking for Kerberos" >&5
4398 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
4399 echo $ac_n "(cached) $ac_c" 1>&6
4402 ac_save_CPPFLAGS="$CPPFLAGS"
4403 if test \! -z "$includedir" ; then
4404 CPPFLAGS="$CPPFLAGS -I$includedir"
4406 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4407 cat > conftest.$ac_ext <<EOF
4408 #line 4409 "configure"
4409 #include "confdefs.h"
4415 if { (eval echo configure:4416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4419 echo "configure: failed program was:" >&5
4420 cat conftest.$ac_ext >&5
4425 CPPFLAGS="$ac_save_CPPFLAGS"
4428 echo "$ac_t""$ac_cv_kerberos" 1>&6
4429 if test $ac_cv_kerberos = yes ; then
4431 cat >> confdefs.h <<\EOF
4432 #define HAVE_KERBEROS 1
4435 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lnsl -lsocket"
4437 elif test $with_kerberos != no; then
4438 echo "error: must be yes or no: --with-kerberos=$with_kerberos"
4442 # Next, check for the nine billion variants of shadow passwords...
4444 passwd_cruft_done=no
4445 # Check whether --with-shadow or --without-shadow was given.
4446 if test "${with_shadow+set}" = set; then
4447 withval="$with_shadow"
4448 with_shadow="$withval"; with_shadow_req="$withval"
4453 if test $with_shadow = no; then
4454 passwd_cruft_done=yes
4455 elif test $with_shadow != yes; then
4456 echo "error: must be yes or no: --with-shadow=$with_shadow"
4461 # Sun's "adjunct" passwords.
4463 if test $passwd_cruft_done = no ; then
4464 echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
4465 echo "configure:4466: checking for Sun-style shadow passwords" >&5
4466 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
4467 echo $ac_n "(cached) $ac_c" 1>&6
4470 ac_save_CPPFLAGS="$CPPFLAGS"
4471 if test \! -z "$includedir" ; then
4472 CPPFLAGS="$CPPFLAGS -I$includedir"
4474 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4475 cat > conftest.$ac_ext <<EOF
4476 #line 4477 "configure"
4477 #include "confdefs.h"
4480 #include <sys/types.h>
4481 #include <sys/label.h>
4482 #include <sys/audit.h>
4485 struct passwd_adjunct *p = getpwanam("nobody");
4486 const char *pw = p->pwa_passwd;
4489 if { (eval echo configure:4490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4491 ac_cv_sun_adjunct=yes
4493 echo "configure: failed program was:" >&5
4494 cat conftest.$ac_ext >&5
4496 ac_cv_sun_adjunct=no
4499 CPPFLAGS="$ac_save_CPPFLAGS"
4502 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
4503 if test $ac_cv_sun_adjunct = yes; then
4506 passwd_cruft_done=yes
4507 cat >> confdefs.h <<\EOF
4508 #define HAVE_ADJUNCT_PASSWD 1
4514 # DEC and SCO so-called "enhanced" security.
4516 if test $passwd_cruft_done = no ; then
4517 echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
4518 echo "configure:4519: checking for DEC-style shadow passwords" >&5
4519 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
4520 echo $ac_n "(cached) $ac_c" 1>&6
4523 ac_save_CPPFLAGS="$CPPFLAGS"
4524 if test \! -z "$includedir" ; then
4525 CPPFLAGS="$CPPFLAGS -I$includedir"
4527 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4528 cat > conftest.$ac_ext <<EOF
4529 #line 4530 "configure"
4530 #include "confdefs.h"
4533 #include <sys/types.h>
4535 #include <sys/security.h>
4538 struct pr_passwd *p;
4540 set_auth_parameters(0, 0);
4541 check_auth_parameters();
4542 p = getprpwnam("nobody");
4543 pw = p->ufld.fd_encrypt;
4546 if { (eval echo configure:4547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4548 ac_cv_enhanced_passwd=yes
4550 echo "configure: failed program was:" >&5
4551 cat conftest.$ac_ext >&5
4553 ac_cv_enhanced_passwd=no
4556 CPPFLAGS="$ac_save_CPPFLAGS"
4559 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
4560 if test $ac_cv_enhanced_passwd = yes; then
4563 passwd_cruft_done=yes
4564 cat >> confdefs.h <<\EOF
4565 #define HAVE_ENHANCED_PASSWD 1
4569 # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
4570 # (I'm told it needs -lcurses too, but I don't understand why.)
4571 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
4572 echo "configure:4573: checking for getprpwnam in -lprot" >&5
4573 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
4574 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4575 echo $ac_n "(cached) $ac_c" 1>&6
4577 ac_save_LIBS="$LIBS"
4578 LIBS="-lprot -lx $LIBS"
4579 cat > conftest.$ac_ext <<EOF
4580 #line 4581 "configure"
4581 #include "confdefs.h"
4582 /* Override any gcc2 internal prototype to avoid an error. */
4583 /* We use char because int might match the return type of a gcc2
4584 builtin and then its argument prototype would still apply. */
4591 if { (eval echo configure:4592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4593 eval "ac_cv_lib_$ac_lib_var=yes"
4595 echo "configure: failed program was:" >&5
4596 cat conftest.$ac_ext >&5
4598 eval "ac_cv_lib_$ac_lib_var=no"
4601 LIBS="$ac_save_LIBS"
4604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4605 echo "$ac_t""yes" 1>&6
4606 PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
4608 echo "$ac_t""no" 1>&6
4609 # On DEC, getprpwnam() is in -lsecurity
4610 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
4611 echo "configure:4612: checking for getprpwnam in -lsecurity" >&5
4612 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
4613 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4614 echo $ac_n "(cached) $ac_c" 1>&6
4616 ac_save_LIBS="$LIBS"
4617 LIBS="-lsecurity $LIBS"
4618 cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4621 /* Override any gcc2 internal prototype to avoid an error. */
4622 /* We use char because int might match the return type of a gcc2
4623 builtin and then its argument prototype would still apply. */
4630 if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4632 eval "ac_cv_lib_$ac_lib_var=yes"
4634 echo "configure: failed program was:" >&5
4635 cat conftest.$ac_ext >&5
4637 eval "ac_cv_lib_$ac_lib_var=no"
4640 LIBS="$ac_save_LIBS"
4643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4644 echo "$ac_t""yes" 1>&6
4645 PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
4647 echo "$ac_t""no" 1>&6
4655 # HP's entry in the "Not Invented Here" Sweepstakes.
4657 if test $passwd_cruft_done = no ; then
4658 echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
4659 echo "configure:4660: checking for HP-style shadow passwords" >&5
4660 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
4661 echo $ac_n "(cached) $ac_c" 1>&6
4664 ac_save_CPPFLAGS="$CPPFLAGS"
4665 if test \! -z "$includedir" ; then
4666 CPPFLAGS="$CPPFLAGS -I$includedir"
4668 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4669 cat > conftest.$ac_ext <<EOF
4670 #line 4671 "configure"
4671 #include "confdefs.h"
4674 #include <sys/types.h>
4676 #include <hpsecurity.h>
4679 struct s_passwd *p = getspwnam("nobody");
4680 const char *pw = p->pw_passwd;
4683 if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4685 ac_cv_hpux_passwd=yes
4687 echo "configure: failed program was:" >&5
4688 cat conftest.$ac_ext >&5
4690 ac_cv_hpux_passwd=no
4693 CPPFLAGS="$ac_save_CPPFLAGS"
4696 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
4697 if test $ac_cv_hpux_passwd = yes; then
4700 passwd_cruft_done=yes
4701 cat >> confdefs.h <<\EOF
4702 #define HAVE_HPUX_PASSWD 1
4706 # on HPUX, bigcrypt is in -lsec
4707 echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
4708 echo "configure:4709: checking for bigcrypt in -lsec" >&5
4709 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
4710 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4711 echo $ac_n "(cached) $ac_c" 1>&6
4713 ac_save_LIBS="$LIBS"
4715 cat > conftest.$ac_ext <<EOF
4716 #line 4717 "configure"
4717 #include "confdefs.h"
4718 /* Override any gcc2 internal prototype to avoid an error. */
4719 /* We use char because int might match the return type of a gcc2
4720 builtin and then its argument prototype would still apply. */
4727 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4729 eval "ac_cv_lib_$ac_lib_var=yes"
4731 echo "configure: failed program was:" >&5
4732 cat conftest.$ac_ext >&5
4734 eval "ac_cv_lib_$ac_lib_var=no"
4737 LIBS="$ac_save_LIBS"
4740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4741 echo "$ac_t""yes" 1>&6
4742 PASSWD_LIBS="$PASSWD_LIBS -lsec"
4744 echo "$ac_t""no" 1>&6
4750 # Traditional (ha!) shadow passwords.
4752 if test $passwd_cruft_done = no ; then
4753 echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
4754 echo "configure:4755: checking for generic shadow passwords" >&5
4755 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
4756 echo $ac_n "(cached) $ac_c" 1>&6
4759 ac_save_CPPFLAGS="$CPPFLAGS"
4760 if test \! -z "$includedir" ; then
4761 CPPFLAGS="$CPPFLAGS -I$includedir"
4763 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4764 cat > conftest.$ac_ext <<EOF
4765 #line 4766 "configure"
4766 #include "confdefs.h"
4769 #include <sys/types.h>
4773 struct spwd *p = getspnam("nobody");
4774 const char *pw = p->sp_pwdp;
4777 if { (eval echo configure:4778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4781 echo "configure: failed program was:" >&5
4782 cat conftest.$ac_ext >&5
4787 CPPFLAGS="$ac_save_CPPFLAGS"
4790 echo "$ac_t""$ac_cv_shadow" 1>&6
4791 if test $ac_cv_shadow = yes; then
4794 passwd_cruft_done=yes
4795 cat >> confdefs.h <<\EOF
4796 #define HAVE_SHADOW_PASSWD 1
4800 # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
4802 echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
4803 echo "configure:4804: checking for getspnam in -lc" >&5
4804 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
4805 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4806 echo $ac_n "(cached) $ac_c" 1>&6
4808 ac_save_LIBS="$LIBS"
4810 cat > conftest.$ac_ext <<EOF
4811 #line 4812 "configure"
4812 #include "confdefs.h"
4813 /* Override any gcc2 internal prototype to avoid an error. */
4814 /* We use char because int might match the return type of a gcc2
4815 builtin and then its argument prototype would still apply. */
4822 if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4824 eval "ac_cv_lib_$ac_lib_var=yes"
4826 echo "configure: failed program was:" >&5
4827 cat conftest.$ac_ext >&5
4829 eval "ac_cv_lib_$ac_lib_var=no"
4832 LIBS="$ac_save_LIBS"
4835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4836 echo "$ac_t""yes" 1>&6
4839 echo "$ac_t""no" 1>&6
4842 if test $have_getspnam = no ; then
4843 echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
4844 echo "configure:4845: checking for getspnam in -lgen" >&5
4845 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
4846 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4847 echo $ac_n "(cached) $ac_c" 1>&6
4849 ac_save_LIBS="$LIBS"
4851 cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854 /* Override any gcc2 internal prototype to avoid an error. */
4855 /* We use char because int might match the return type of a gcc2
4856 builtin and then its argument prototype would still apply. */
4863 if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4865 eval "ac_cv_lib_$ac_lib_var=yes"
4867 echo "configure: failed program was:" >&5
4868 cat conftest.$ac_ext >&5
4870 eval "ac_cv_lib_$ac_lib_var=no"
4873 LIBS="$ac_save_LIBS"
4876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4877 echo "$ac_t""yes" 1>&6
4878 have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
4880 echo "$ac_t""no" 1>&6
4887 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
4889 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
4890 echo "configure:4891: checking for crypt in -lc" >&5
4891 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
4892 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4893 echo $ac_n "(cached) $ac_c" 1>&6
4895 ac_save_LIBS="$LIBS"
4897 cat > conftest.$ac_ext <<EOF
4898 #line 4899 "configure"
4899 #include "confdefs.h"
4900 /* Override any gcc2 internal prototype to avoid an error. */
4901 /* We use char because int might match the return type of a gcc2
4902 builtin and then its argument prototype would still apply. */
4909 if { (eval echo configure:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4911 eval "ac_cv_lib_$ac_lib_var=yes"
4913 echo "configure: failed program was:" >&5
4914 cat conftest.$ac_ext >&5
4916 eval "ac_cv_lib_$ac_lib_var=no"
4919 LIBS="$ac_save_LIBS"
4922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4923 echo "$ac_t""yes" 1>&6
4926 echo "$ac_t""no" 1>&6
4929 if test $have_crypt = no ; then
4930 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4931 echo "configure:4932: checking for crypt in -lcrypt" >&5
4932 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4933 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4934 echo $ac_n "(cached) $ac_c" 1>&6
4936 ac_save_LIBS="$LIBS"
4937 LIBS="-lcrypt $LIBS"
4938 cat > conftest.$ac_ext <<EOF
4939 #line 4940 "configure"
4940 #include "confdefs.h"
4941 /* Override any gcc2 internal prototype to avoid an error. */
4942 /* We use char because int might match the return type of a gcc2
4943 builtin and then its argument prototype would still apply. */
4950 if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4952 eval "ac_cv_lib_$ac_lib_var=yes"
4954 echo "configure: failed program was:" >&5
4955 cat conftest.$ac_ext >&5
4957 eval "ac_cv_lib_$ac_lib_var=no"
4960 LIBS="$ac_save_LIBS"
4963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4964 echo "$ac_t""yes" 1>&6
4965 have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
4967 echo "$ac_t""no" 1>&6
4973 # Most of the above shadow mechanisms will have set need_setuid to yes,
4974 # if they were found. But, on some systems, we need setuid even when
4975 # using plain old vanilla passwords.
4977 if test $need_setuid = no ; then
4979 *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
4985 elif test $enable_locking = no; then
4986 cat >> confdefs.h <<\EOF
4987 #define NO_LOCKING 1
4991 echo "error: must be yes or no: --enable-locking=$enable_locking"
4997 if test \! -z "$includedir" ; then
4998 INCLUDES="-I$includedir"
5001 if test \! -z "$libdir" ; then
5002 LDFLAGS="$LDFLAGS -L$libdir"
5006 ##### should have options to override the DEPEND crap, I guess...
5013 # Done testing things -- now substitute in some stuff for the Makefiles.
5015 if test $have_motif = yes; then
5016 cat >> confdefs.h <<\EOF
5017 #define HAVE_MOTIF 1
5020 DIALOG_SRCS='$(MOTIF_SRCS)'
5021 DIALOG_OBJS='$(MOTIF_OBJS)'
5022 elif test $have_athena = yes; then
5023 cat >> confdefs.h <<\EOF
5024 #define HAVE_ATHENA 1
5027 DIALOG_SRCS='$(ATHENA_SRCS)'
5028 DIALOG_OBJS='$(ATHENA_OBJS)'
5034 if test $have_kerberos = yes; then
5035 PASSWD_SRCS='$(KERBEROS_SRCS)'
5036 PASSWD_OBJS='$(KERBEROS_OBJS)'
5038 PASSWD_SRCS='$(PWENT_SRCS)'
5039 PASSWD_OBJS='$(PWENT_OBJS)'
5042 if test $enable_locking = yes; then
5043 LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
5044 LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
5050 if test $need_setuid = yes; then
5052 INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
5055 INSTALL_SETUID='$(INSTALL_PROGRAM)'
5059 if test $have_gl = yes; then
5060 GL_EXES='$(GL_EXES)'
5061 GL_KLUDGE_1=${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}' \'
5064 GL_KLUDGE_1=${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}'\n'
5065 GL_KLUDGE_2='!'${tab}
5096 # Print some warnings before emitting the Makefiles.
5099 warnsep=' #################################################################'
5101 if test $warning = no ; then
5102 echo '' ; echo "$warnsep" ; echo ''
5112 if test $with_sgi_req = yes -a $have_sgi = no ; then
5113 warn 'The SGI saver extension was requested, but was not found.'
5116 if test $with_mit_req = yes -a $have_mit = no ; then
5117 warn 'The MIT saver extension was requested, but was not found.'
5120 if test $with_xidle_req = yes -a $have_xidle = no ; then
5121 warn 'The XIdle extension was requested, but was not found.'
5124 if test $with_xshm_req = yes -a $have_xshm = no ; then
5125 warn 'The XSHM extension was requested, but was not found.'
5128 if test $have_motif = no -a $have_athena = no ; then
5129 warn "Neither Motif nor Athena widgets seem to be available;"
5130 warn2 "one or the other is required."
5132 elif test $with_motif_req = yes -a $have_motif = no ; then
5133 warn "Use of Motif was requested, but it wasn't found;"
5134 warn2 "Athena will be used instead."
5136 elif test $with_athena_req = yes -a $have_athena = no ; then
5137 warn "Use of Athena was requested, but it wasn't found;"
5138 warn2 "Motif will be used instead."
5141 if test $have_motif = yes -a $have_lesstif = yes ; then
5142 warn "Motif is being used, but it appears to actually be LessTif."
5143 warn2 "XScreenSaver has been reported to have problems with some"
5144 warn2 "versions of LessTif (notably 0.79). You might want to use"
5145 warn2 "Athena instead."
5148 if test $with_xpm_req = yes -a $have_xpm = no ; then
5149 warn 'Use of XPM was requested, but it was not found.'
5152 if test $with_gl_req = yes -a $have_gl = no ; then
5153 warn 'Use of GL was requested, but it was not found.'
5156 if test $with_readdisplay_req = yes -a $have_readdisplay = no ; then
5157 warn 'Use of XReadDisplay was requested, but it was not found.'
5160 if test $with_kerberos_req = yes -a $have_kerberos = no ; then
5161 warn 'Use of Kerberos was requested, but it was not found.'
5164 if test $with_shadow_req = yes -a $have_shadow = no ; then
5165 warn 'Use of shadow passwords was requested, but they were not found.'
5168 if test $warning = yes; then
5169 echo '' ; echo "$warnsep" ; echo ''
5174 cat > confcache <<\EOF
5175 # This file is a shell script that caches the results of configure
5176 # tests run on this system so they can be shared between configure
5177 # scripts and configure runs. It is not useful on other systems.
5178 # If it contains results you don't want to keep, you may remove or edit it.
5180 # By default, configure uses ./config.cache as the cache file,
5181 # creating it if it does not exist already. You can give configure
5182 # the --cache-file=FILE option to use a different cache file; that is
5183 # what configure does when it calls configure scripts in
5184 # subdirectories, so they share the cache.
5185 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5186 # config.status only pays attention to the cache file if you give it the
5187 # --recheck option to rerun configure.
5190 # The following way of writing the cache mishandles newlines in values,
5191 # but we know of no workaround that is simple, portable, and efficient.
5192 # So, don't put newlines in cache variables' values.
5193 # Ultrix sh set writes to stderr and can't be redirected directly,
5194 # and sets the high bit in the cache file unless we assign to the vars.
5196 case `(ac_space=' '; set) 2>&1` in
5198 # `set' does not quote correctly, so add quotes (double-quote substitution
5199 # turns \\\\ into \\, and sed turns \\ into \).
5201 -e "s/'/'\\\\''/g" \
5202 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5205 # `set' quotes correctly as required by POSIX, so do not add quotes.
5206 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5209 if cmp -s $cache_file confcache; then
5212 if test -w $cache_file; then
5213 echo "updating cache $cache_file"
5214 cat confcache > $cache_file
5216 echo "not updating unwritable cache $cache_file"
5221 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5223 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5224 # Let make expand exec_prefix.
5225 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5227 # Any assignment to VPATH causes Sun make to only execute
5228 # the first set of double-colon rules, so remove it if not needed.
5229 # If there is a colon in the path, we need to keep it.
5230 if test "x$srcdir" = x.; then
5231 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5234 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5236 DEFS=-DHAVE_CONFIG_H
5238 # Without the "./", some shells look in PATH for config.status.
5239 : ${CONFIG_STATUS=./config.status}
5241 echo creating $CONFIG_STATUS
5242 rm -f $CONFIG_STATUS
5243 cat > $CONFIG_STATUS <<EOF
5245 # Generated automatically by configure.
5246 # Run this file to recreate the current configuration.
5247 # This directory was configured as follows,
5248 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5250 # $0 $ac_configure_args
5252 # Compiler output produced by configure, useful for debugging
5253 # configure, is in ./config.log if it exists.
5255 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5258 case "\$ac_option" in
5259 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5260 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5261 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5262 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5263 echo "$CONFIG_STATUS generated by autoconf version 2.12"
5265 -help | --help | --hel | --he | --h)
5266 echo "\$ac_cs_usage"; exit 0 ;;
5267 *) echo "\$ac_cs_usage"; exit 1 ;;
5271 ac_given_srcdir=$srcdir
5272 ac_given_INSTALL="$INSTALL"
5274 trap 'rm -fr `echo "Makefile
5279 driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5281 cat >> $CONFIG_STATUS <<EOF
5283 # Protect against being on the right side of a sed subst in config.status.
5284 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5285 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5288 s%@CFLAGS@%$CFLAGS%g
5289 s%@CPPFLAGS@%$CPPFLAGS%g
5290 s%@CXXFLAGS@%$CXXFLAGS%g
5292 s%@LDFLAGS@%$LDFLAGS%g
5294 s%@exec_prefix@%$exec_prefix%g
5295 s%@prefix@%$prefix%g
5296 s%@program_transform_name@%$program_transform_name%g
5297 s%@bindir@%$bindir%g
5298 s%@sbindir@%$sbindir%g
5299 s%@libexecdir@%$libexecdir%g
5300 s%@datadir@%$datadir%g
5301 s%@sysconfdir@%$sysconfdir%g
5302 s%@sharedstatedir@%$sharedstatedir%g
5303 s%@localstatedir@%$localstatedir%g
5304 s%@libdir@%$libdir%g
5305 s%@includedir@%$includedir%g
5306 s%@oldincludedir@%$oldincludedir%g
5307 s%@infodir@%$infodir%g
5308 s%@mandir@%$mandir%g
5310 s%@host_alias@%$host_alias%g
5311 s%@host_cpu@%$host_cpu%g
5312 s%@host_vendor@%$host_vendor%g
5313 s%@host_os@%$host_os%g
5316 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5317 s%@INSTALL_DATA@%$INSTALL_DATA%g
5318 s%@SET_MAKE@%$SET_MAKE%g
5319 s%@X_CFLAGS@%$X_CFLAGS%g
5320 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
5321 s%@X_LIBS@%$X_LIBS%g
5322 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
5323 s%@emacs_exe@%$emacs_exe%g
5324 s%@xemacs_exe@%$xemacs_exe%g
5325 s%@fortune@%$fortune%g
5326 s%@INCLUDES@%$INCLUDES%g
5327 s%@SAVER_LIBS@%$SAVER_LIBS%g
5328 s%@HACK_LIBS@%$HACK_LIBS%g
5329 s%@XPM_LIBS@%$XPM_LIBS%g
5330 s%@GL_LIBS@%$GL_LIBS%g
5331 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
5332 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
5333 s%@NEED_SETUID@%$NEED_SETUID%g
5334 s%@DIALOG_SRCS@%$DIALOG_SRCS%g
5335 s%@DIALOG_OBJS@%$DIALOG_OBJS%g
5336 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
5337 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
5338 s%@XMU_SRCS@%$XMU_SRCS%g
5339 s%@XMU_OBJS@%$XMU_OBJS%g
5340 s%@LOCK_SRCS@%$LOCK_SRCS%g
5341 s%@LOCK_OBJS@%$LOCK_OBJS%g
5342 s%@GL_EXES@%$GL_EXES%g
5343 s%@GL_KLUDGE_1@%$GL_KLUDGE_1%g
5344 s%@GL_KLUDGE_2@%$GL_KLUDGE_2%g
5345 s%@HACKDIR@%$HACKDIR%g
5346 s%@APPDEFAULTS@%$APPDEFAULTS%g
5347 s%@DEPEND@%$DEPEND%g
5348 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
5349 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
5354 cat >> $CONFIG_STATUS <<\EOF
5356 # Split the substitutions into bite-sized pieces for seds with
5357 # small command number limits, like on Digital OSF/1 and HP-UX.
5358 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5359 ac_file=1 # Number of current file.
5360 ac_beg=1 # First line for current file.
5361 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5364 while $ac_more_lines; do
5365 if test $ac_beg -gt 1; then
5366 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5368 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5370 if test ! -s conftest.s$ac_file; then
5372 rm -f conftest.s$ac_file
5374 if test -z "$ac_sed_cmds"; then
5375 ac_sed_cmds="sed -f conftest.s$ac_file"
5377 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5379 ac_file=`expr $ac_file + 1`
5381 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5384 if test -z "$ac_sed_cmds"; then
5389 cat >> $CONFIG_STATUS <<EOF
5391 CONFIG_FILES=\${CONFIG_FILES-"Makefile
5396 driver/XScreenSaver.ad"}
5398 cat >> $CONFIG_STATUS <<\EOF
5399 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5400 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5402 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5403 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5404 *) ac_file_in="${ac_file}.in" ;;
5407 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5409 # Remove last slash and all that follows it. Not all systems have dirname.
5410 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5411 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5412 # The file is in a subdirectory.
5413 test ! -d "$ac_dir" && mkdir "$ac_dir"
5414 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5415 # A "../" for each directory in $ac_dir_suffix.
5416 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5418 ac_dir_suffix= ac_dots=
5421 case "$ac_given_srcdir" in
5423 if test -z "$ac_dots"; then top_srcdir=.
5424 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5425 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5427 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5428 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5431 case "$ac_given_INSTALL" in
5432 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5433 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5436 echo creating "$ac_file"
5438 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5440 *Makefile*) ac_comsub="1i\\
5441 # $configure_input" ;;
5445 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5447 s%@configure_input@%$configure_input%g
5448 s%@srcdir@%$srcdir%g
5449 s%@top_srcdir@%$top_srcdir%g
5450 s%@INSTALL@%$INSTALL%g
5451 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5455 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5456 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5458 # ac_d sets the value in "#define NAME VALUE" lines.
5459 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5460 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5463 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5464 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5465 ac_uB='\([ ]\)%\1#\2define\3'
5468 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5469 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5470 ac_eB='$%\1#\2define\3'
5474 if test "${CONFIG_HEADERS+set}" != set; then
5476 cat >> $CONFIG_STATUS <<EOF
5477 CONFIG_HEADERS="config.h"
5479 cat >> $CONFIG_STATUS <<\EOF
5481 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5482 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5484 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5485 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5486 *) ac_file_in="${ac_file}.in" ;;
5489 echo creating $ac_file
5491 rm -f conftest.frag conftest.in conftest.out
5492 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5493 cat $ac_file_inputs > conftest.in
5497 # Transform confdefs.h into a sed script conftest.vals that substitutes
5498 # the proper values into config.h.in to produce config.h. And first:
5499 # Protect against being on the right side of a sed subst in config.status.
5500 # Protect against being in an unquoted here document in config.status.
5502 cat > conftest.hdr <<\EOF
5505 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5509 sed -n -f conftest.hdr confdefs.h > conftest.vals
5512 # This sed command replaces #undef with comments. This is necessary, for
5513 # example, in the case of _POSIX_SOURCE, which is predefined and required
5514 # on some systems where configure will not decide to define it.
5515 cat >> conftest.vals <<\EOF
5516 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5519 # Break up conftest.vals because some shells have a limit on
5520 # the size of here documents, and old seds have small limits too.
5525 ac_lines=`grep -c . conftest.vals`
5526 # grep -c gives empty output for an empty file on some AIX systems.
5527 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5528 # Write a limited-size here document to conftest.frag.
5529 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5530 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5532 sed -f conftest.frag conftest.in > conftest.out
5534 mv conftest.out conftest.in
5536 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5538 mv conftest.tail conftest.vals
5542 cat >> $CONFIG_STATUS <<\EOF
5543 rm -f conftest.frag conftest.h
5544 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5545 cat conftest.in >> conftest.h
5547 if cmp -s $ac_file conftest.h 2>/dev/null; then
5548 echo "$ac_file is unchanged"
5551 # Remove last slash and all that follows it. Not all systems have dirname.
5552 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5553 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5554 # The file is in a subdirectory.
5555 test ! -d "$ac_dir" && mkdir "$ac_dir"
5558 mv conftest.h $ac_file
5563 cat >> $CONFIG_STATUS <<EOF
5566 cat >> $CONFIG_STATUS <<\EOF
5570 chmod +x $CONFIG_STATUS
5571 rm -fr confdefs* $ac_clean_files
5572 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1