http://ftp.x.org/contrib/applications/xscreensaver-2.34.tar.gz
[xscreensaver] / configure
1 #! /bin/sh
2
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.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 Installation options:
16
17   --enable-subdir=DIR     Put the demo programs in a subdirectory of \`bindir',
18                           instead of putting them in bindir itself.  You can
19                           specify the name of the subdirectory.  For example,
20                           --exec-prefix=/usr/local/bin --enable-subdir=demos
21                           would put xscreensaver in /usr/local/bin/, and would
22                           put the demos in /usr/local/bin/demos/.  (If DIR
23                           begins with /, then bindir will not be prepended.)
24
25   --disable-subdir        Just put the demos in \`bindir' (this is the default.)
26 "
27 ac_help="$ac_help"
28 ac_help="$ac_help
29 Except where noted, all of the --with options below can also take a
30 directory argument: for example, --with-motif=/opt/Motif.  That would
31 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
32 to be added to the -L list, assuming those directories exist.
33
34 X Server Extension options:
35
36   --with-sgi-ext          Include support for the SGI SCREEN_SAVER
37                           server extension, if possible (this is the default).
38   --without-sgi-ext       Do not compile in support for this extension."
39 ac_help="$ac_help
40   --with-mit-ext          Include support for the MIT-SCREEN-SAVER
41                           server extension, if possible (this is the default).
42   --without-mit-ext       Do not compile in support for this extension."
43 ac_help="$ac_help
44   --with-xidle-ext        Include support for the XIDLE server extension,
45                           if possible (this is the default).
46   --without-xidle-ext     Do not compile in support for this extension."
47 ac_help="$ac_help
48   --with-xshm-ext         Include support for the XSHM (Shared Memory) server
49                           extension, if possible (this is the default).
50   --without-xshm-ext      Do not compile in support for this extension."
51 ac_help="$ac_help
52   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL server
53                           extension, if possible (this is the default).
54   --without-sgivc-ext     Do not compile in support for this extension."
55 ac_help="$ac_help
56   --with-dpms-ext         Include support for the DPMS server extension,
57                           if possible (this is the default).
58   --without-dpms-ext      Do not compile in support for this extension."
59 ac_help="$ac_help
60
61 X Client Toolkit options:
62
63   --with-motif            Use the Motif toolkit for the user interface, if
64                           possible (this is the default).
65   --without-motif         Do not use Motif."
66 ac_help="$ac_help
67   --with-athena           Use the Athena toolkit for the user interface, if
68                           possible (this is the default if Motif isn't used.)
69   --without-athena        Do not use Athena."
70 ac_help="$ac_help
71
72 Graphics Demo options:
73
74   --with-xpm              Include support for XPM files in some demos,
75                           if possible (this is the default).
76   --without-xpm           Do not compile in support for XPM files."
77 ac_help="$ac_help
78   --with-gl               Build those demos which depend on OpenGL,
79                           if possible (this is the default).
80   --without-gl            Do not build the OpenGL demos."
81 ac_help="$ac_help
82   --with-readdisplay      Include support for the XReadDisplay server
83                           extension if possible (this is the default).
84   --without-readdisplay   Do not compile in support for this extension."
85 ac_help="$ac_help
86   --with-sgivideo         Include support for SGI's Iris Video Library
87                           if possible (this is the default).
88   --without-sgivideo       Do not compile in support for this library."
89 ac_help="$ac_help
90   --with-zippy=PROGRAM    Some demos are able to run an external program and
91                           display its text; this names the program to use by
92                           default (though it can be overridden with X
93                           resources.)  If you don't specify this, the default
94                           is to use \"yow\" from the Emacs distribution (if you
95                           have it) or else to use \"fortune\"."
96 ac_help="$ac_help
97
98 Screen Locking options:
99
100   --enable-locking        Compile in support for locking the display
101                           (this is the default.)
102   --disable-locking       Do not allow locking at all."
103 ac_help="$ac_help
104
105   --enable-vt-locking     Compile in support for locking Virtual Terminals.
106                           This is the default if the system supports it, and
107                           if locking support is included (--enable-locking.)
108   --disable-vt-locking    Do not allow locking of VTs, even if locking is
109                           enabled."
110 ac_help="$ac_help
111
112   --with-kerberos         Include support for Kerberos authentication,
113                           if possible (this is the default.)
114   --without-kerberos      Do not compile in support for Kerberos."
115 ac_help="$ac_help
116   --with-shadow           Include support for shadow password authentication,
117                           if possible (this is the default, if no Kerberos.)
118   --without-shadow        Do not compile in support for shadow passwords.
119 "
120
121 # Initialize some variables set by options.
122 # The variables have the same names as the options, with
123 # dashes changed to underlines.
124 build=NONE
125 cache_file=./config.cache
126 exec_prefix=NONE
127 host=NONE
128 no_create=
129 nonopt=NONE
130 no_recursion=
131 prefix=NONE
132 program_prefix=NONE
133 program_suffix=NONE
134 program_transform_name=s,x,x,
135 silent=
136 site=
137 srcdir=
138 target=NONE
139 verbose=
140 x_includes=NONE
141 x_libraries=NONE
142 bindir='${exec_prefix}/bin'
143 sbindir='${exec_prefix}/sbin'
144 libexecdir='${exec_prefix}/libexec'
145 datadir='${prefix}/share'
146 sysconfdir='${prefix}/etc'
147 sharedstatedir='${prefix}/com'
148 localstatedir='${prefix}/var'
149 libdir='${exec_prefix}/lib'
150 includedir='${prefix}/include'
151 oldincludedir='/usr/include'
152 infodir='${prefix}/info'
153 mandir='${prefix}/man'
154
155 # Initialize some other variables.
156 subdirs=
157 MFLAGS= MAKEFLAGS=
158 # Maximum number of lines to put in a shell here document.
159 ac_max_here_lines=12
160
161 ac_prev=
162 for ac_option
163 do
164
165   # If the previous option needs an argument, assign it.
166   if test -n "$ac_prev"; then
167     eval "$ac_prev=\$ac_option"
168     ac_prev=
169     continue
170   fi
171
172   case "$ac_option" in
173   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
174   *) ac_optarg= ;;
175   esac
176
177   # Accept the important Cygnus configure options, so we can diagnose typos.
178
179   case "$ac_option" in
180
181   -bindir | --bindir | --bindi | --bind | --bin | --bi)
182     ac_prev=bindir ;;
183   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
184     bindir="$ac_optarg" ;;
185
186   -build | --build | --buil | --bui | --bu)
187     ac_prev=build ;;
188   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
189     build="$ac_optarg" ;;
190
191   -cache-file | --cache-file | --cache-fil | --cache-fi \
192   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
193     ac_prev=cache_file ;;
194   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
195   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
196     cache_file="$ac_optarg" ;;
197
198   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
199     ac_prev=datadir ;;
200   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
201   | --da=*)
202     datadir="$ac_optarg" ;;
203
204   -disable-* | --disable-*)
205     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
206     # Reject names that are not valid shell variable names.
207     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
208       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
209     fi
210     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
211     eval "enable_${ac_feature}=no" ;;
212
213   -enable-* | --enable-*)
214     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
215     # Reject names that are not valid shell variable names.
216     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
217       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
218     fi
219     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
220     case "$ac_option" in
221       *=*) ;;
222       *) ac_optarg=yes ;;
223     esac
224     eval "enable_${ac_feature}='$ac_optarg'" ;;
225
226   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
227   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
228   | --exec | --exe | --ex)
229     ac_prev=exec_prefix ;;
230   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
231   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
232   | --exec=* | --exe=* | --ex=*)
233     exec_prefix="$ac_optarg" ;;
234
235   -gas | --gas | --ga | --g)
236     # Obsolete; use --with-gas.
237     with_gas=yes ;;
238
239   -help | --help | --hel | --he)
240     # Omit some internal or obsolete options to make the list less imposing.
241     # This message is too long to be a string in the A/UX 3.1 sh.
242     cat << EOF
243 Usage: configure [options] [host]
244 Options: [defaults in brackets after descriptions]
245
246 Configuration:
247
248   --cache-file=FILE       cache test results in FILE
249   --help                  print this message
250   --no-create             do not create output files
251   --quiet, --silent       do not print \`checking...' messages
252   --version               print the version of autoconf that created configure
253
254 Directory and file names:
255
256   --prefix=PREFIX         install architecture-independent files in PREFIX
257                           [$ac_default_prefix]
258   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
259                           [same as prefix]
260   --bindir=DIR            user executables in DIR [EPREFIX/bin]
261   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
262   --includedir=DIR        C header files in DIR [PREFIX/include]
263   --x-includes=DIR        X include files are in DIR
264   --x-libraries=DIR       X library files are in DIR
265   --mandir=DIR            man documentation in DIR [PREFIX/man]
266   --srcdir=DIR            find the sources in DIR [configure dir or ..]
267   --program-prefix=PREFIX prepend PREFIX to installed program names
268   --program-suffix=SUFFIX append SUFFIX to installed program names
269   --program-transform-name=PROGRAM
270                           run sed PROGRAM on installed program names
271 EOF
272     cat << EOF
273
274 Host type:
275
276   --build=BUILD           configure for building on BUILD [BUILD=HOST]
277   --host=HOST             configure for HOST [guessed]
278   --target=TARGET         configure for TARGET [TARGET=HOST]
279 EOF
280     if test -n "$ac_help"; then
281       echo "$ac_help"
282     fi
283     exit 0 ;;
284
285   -host | --host | --hos | --ho)
286     ac_prev=host ;;
287   -host=* | --host=* | --hos=* | --ho=*)
288     host="$ac_optarg" ;;
289
290   -includedir | --includedir | --includedi | --included | --include \
291   | --includ | --inclu | --incl | --inc)
292     ac_prev=includedir ;;
293   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
294   | --includ=* | --inclu=* | --incl=* | --inc=*)
295     includedir="$ac_optarg" ;;
296
297   -infodir | --infodir | --infodi | --infod | --info | --inf)
298     ac_prev=infodir ;;
299   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
300     infodir="$ac_optarg" ;;
301
302   -libdir | --libdir | --libdi | --libd)
303     ac_prev=libdir ;;
304   -libdir=* | --libdir=* | --libdi=* | --libd=*)
305     libdir="$ac_optarg" ;;
306
307   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
308   | --libexe | --libex | --libe)
309     ac_prev=libexecdir ;;
310   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
311   | --libexe=* | --libex=* | --libe=*)
312     libexecdir="$ac_optarg" ;;
313
314   -localstatedir | --localstatedir | --localstatedi | --localstated \
315   | --localstate | --localstat | --localsta | --localst \
316   | --locals | --local | --loca | --loc | --lo)
317     ac_prev=localstatedir ;;
318   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
319   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
320   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
321     localstatedir="$ac_optarg" ;;
322
323   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
324     ac_prev=mandir ;;
325   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
326     mandir="$ac_optarg" ;;
327
328   -nfp | --nfp | --nf)
329     # Obsolete; use --without-fp.
330     with_fp=no ;;
331
332   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
333   | --no-cr | --no-c)
334     no_create=yes ;;
335
336   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
337   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
338     no_recursion=yes ;;
339
340   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
341   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
342   | --oldin | --oldi | --old | --ol | --o)
343     ac_prev=oldincludedir ;;
344   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
345   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
346   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
347     oldincludedir="$ac_optarg" ;;
348
349   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
350     ac_prev=prefix ;;
351   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
352     prefix="$ac_optarg" ;;
353
354   -program-prefix | --program-prefix | --program-prefi | --program-pref \
355   | --program-pre | --program-pr | --program-p)
356     ac_prev=program_prefix ;;
357   -program-prefix=* | --program-prefix=* | --program-prefi=* \
358   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
359     program_prefix="$ac_optarg" ;;
360
361   -program-suffix | --program-suffix | --program-suffi | --program-suff \
362   | --program-suf | --program-su | --program-s)
363     ac_prev=program_suffix ;;
364   -program-suffix=* | --program-suffix=* | --program-suffi=* \
365   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
366     program_suffix="$ac_optarg" ;;
367
368   -program-transform-name | --program-transform-name \
369   | --program-transform-nam | --program-transform-na \
370   | --program-transform-n | --program-transform- \
371   | --program-transform | --program-transfor \
372   | --program-transfo | --program-transf \
373   | --program-trans | --program-tran \
374   | --progr-tra | --program-tr | --program-t)
375     ac_prev=program_transform_name ;;
376   -program-transform-name=* | --program-transform-name=* \
377   | --program-transform-nam=* | --program-transform-na=* \
378   | --program-transform-n=* | --program-transform-=* \
379   | --program-transform=* | --program-transfor=* \
380   | --program-transfo=* | --program-transf=* \
381   | --program-trans=* | --program-tran=* \
382   | --progr-tra=* | --program-tr=* | --program-t=*)
383     program_transform_name="$ac_optarg" ;;
384
385   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
386   | -silent | --silent | --silen | --sile | --sil)
387     silent=yes ;;
388
389   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
390     ac_prev=sbindir ;;
391   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
392   | --sbi=* | --sb=*)
393     sbindir="$ac_optarg" ;;
394
395   -sharedstatedir | --sharedstatedir | --sharedstatedi \
396   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
397   | --sharedst | --shareds | --shared | --share | --shar \
398   | --sha | --sh)
399     ac_prev=sharedstatedir ;;
400   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
401   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
402   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
403   | --sha=* | --sh=*)
404     sharedstatedir="$ac_optarg" ;;
405
406   -site | --site | --sit)
407     ac_prev=site ;;
408   -site=* | --site=* | --sit=*)
409     site="$ac_optarg" ;;
410
411   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
412     ac_prev=srcdir ;;
413   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
414     srcdir="$ac_optarg" ;;
415
416   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
417   | --syscon | --sysco | --sysc | --sys | --sy)
418     ac_prev=sysconfdir ;;
419   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
420   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
421     sysconfdir="$ac_optarg" ;;
422
423   -target | --target | --targe | --targ | --tar | --ta | --t)
424     ac_prev=target ;;
425   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
426     target="$ac_optarg" ;;
427
428   -v | -verbose | --verbose | --verbos | --verbo | --verb)
429     verbose=yes ;;
430
431   -version | --version | --versio | --versi | --vers)
432     echo "configure generated by autoconf version 2.12"
433     exit 0 ;;
434
435   -with-* | --with-*)
436     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
437     # Reject names that are not valid shell variable names.
438     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
439       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
440     fi
441     ac_package=`echo $ac_package| sed 's/-/_/g'`
442     case "$ac_option" in
443       *=*) ;;
444       *) ac_optarg=yes ;;
445     esac
446     eval "with_${ac_package}='$ac_optarg'" ;;
447
448   -without-* | --without-*)
449     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
450     # Reject names that are not valid shell variable names.
451     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
452       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
453     fi
454     ac_package=`echo $ac_package| sed 's/-/_/g'`
455     eval "with_${ac_package}=no" ;;
456
457   --x)
458     # Obsolete; use --with-x.
459     with_x=yes ;;
460
461   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
462   | --x-incl | --x-inc | --x-in | --x-i)
463     ac_prev=x_includes ;;
464   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
465   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
466     x_includes="$ac_optarg" ;;
467
468   -x-libraries | --x-libraries | --x-librarie | --x-librari \
469   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
470     ac_prev=x_libraries ;;
471   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
472   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
473     x_libraries="$ac_optarg" ;;
474
475   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
476     ;;
477
478   *)
479     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
480       echo "configure: warning: $ac_option: invalid host type" 1>&2
481     fi
482     if test "x$nonopt" != xNONE; then
483       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
484     fi
485     nonopt="$ac_option"
486     ;;
487
488   esac
489 done
490
491 if test -n "$ac_prev"; then
492   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
493 fi
494
495 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
496
497 # File descriptor usage:
498 # 0 standard input
499 # 1 file creation
500 # 2 errors and warnings
501 # 3 some systems may open it to /dev/tty
502 # 4 used on the Kubota Titan
503 # 6 checking for... messages and results
504 # 5 compiler messages saved in config.log
505 if test "$silent" = yes; then
506   exec 6>/dev/null
507 else
508   exec 6>&1
509 fi
510 exec 5>./config.log
511
512 echo "\
513 This file contains any messages produced by compilers while
514 running configure, to aid debugging if configure makes a mistake.
515 " 1>&5
516
517 # Strip out --no-create and --no-recursion so they do not pile up.
518 # Also quote any args containing shell metacharacters.
519 ac_configure_args=
520 for ac_arg
521 do
522   case "$ac_arg" in
523   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
524   | --no-cr | --no-c) ;;
525   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
526   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
527   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
528   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
529   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
530   esac
531 done
532
533 # NLS nuisances.
534 # Only set these to C if already set.  These must not be set unconditionally
535 # because not all systems understand e.g. LANG=C (notably SCO).
536 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
537 # Non-C LC_CTYPE values break the ctype check.
538 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
539 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
540 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
541 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
542
543 # confdefs.h avoids OS command line length limits that DEFS can exceed.
544 rm -rf conftest* confdefs.h
545 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
546 echo > confdefs.h
547
548 # A filename unique to this package, relative to the directory that
549 # configure is in, which we can look for to find out if srcdir is correct.
550 ac_unique_file=driver/subprocs.c
551
552 # Find the source files, if location was not specified.
553 if test -z "$srcdir"; then
554   ac_srcdir_defaulted=yes
555   # Try the directory containing this script, then its parent.
556   ac_prog=$0
557   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
558   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
559   srcdir=$ac_confdir
560   if test ! -r $srcdir/$ac_unique_file; then
561     srcdir=..
562   fi
563 else
564   ac_srcdir_defaulted=no
565 fi
566 if test ! -r $srcdir/$ac_unique_file; then
567   if test "$ac_srcdir_defaulted" = yes; then
568     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
569   else
570     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
571   fi
572 fi
573 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
574
575 # Prefer explicitly selected file to automatically selected ones.
576 if test -z "$CONFIG_SITE"; then
577   if test "x$prefix" != xNONE; then
578     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
579   else
580     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
581   fi
582 fi
583 for ac_site_file in $CONFIG_SITE; do
584   if test -r "$ac_site_file"; then
585     echo "loading site script $ac_site_file"
586     . "$ac_site_file"
587   fi
588 done
589
590 if test -r "$cache_file"; then
591   echo "loading cache $cache_file"
592   . $cache_file
593 else
594   echo "creating cache $cache_file"
595   > $cache_file
596 fi
597
598 ac_ext=c
599 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
600 ac_cpp='$CPP $CPPFLAGS'
601 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
602 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
603 cross_compiling=$ac_cv_prog_cc_cross
604
605 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
606   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
607   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
608     ac_n= ac_c='
609 ' ac_t='        '
610   else
611     ac_n=-n ac_c= ac_t=
612   fi
613 else
614   ac_n= ac_c='\c' ac_t=
615 fi
616
617
618
619 ac_aux_dir=
620 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
621   if test -f $ac_dir/install-sh; then
622     ac_aux_dir=$ac_dir
623     ac_install_sh="$ac_aux_dir/install-sh -c"
624     break
625   elif test -f $ac_dir/install.sh; then
626     ac_aux_dir=$ac_dir
627     ac_install_sh="$ac_aux_dir/install.sh -c"
628     break
629   fi
630 done
631 if test -z "$ac_aux_dir"; then
632   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
633 fi
634 ac_config_guess=$ac_aux_dir/config.guess
635 ac_config_sub=$ac_aux_dir/config.sub
636 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
637
638
639 # Make sure we can run config.sub.
640 if $ac_config_sub sun4 >/dev/null 2>&1; then :
641 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
642 fi
643
644 echo $ac_n "checking host system type""... $ac_c" 1>&6
645 echo "configure:657: checking host system type" >&5
646
647 host_alias=$host
648 case "$host_alias" in
649 NONE)
650   case $nonopt in
651   NONE)
652     if host_alias=`$ac_config_guess`; then :
653     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
654     fi ;;
655   *) host_alias=$nonopt ;;
656   esac ;;
657 esac
658
659 host=`$ac_config_sub $host_alias`
660 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
661 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
662 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
663 echo "$ac_t""$host" 1>&6
664
665
666 # Extract the first word of "gcc", so it can be a program name with args.
667 set dummy gcc; ac_word=$2
668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
669 echo "configure:681: checking for $ac_word" >&5
670 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
671   echo $ac_n "(cached) $ac_c" 1>&6
672 else
673   if test -n "$CC"; then
674   ac_cv_prog_CC="$CC" # Let the user override the test.
675 else
676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
677   for ac_dir in $PATH; do
678     test -z "$ac_dir" && ac_dir=.
679     if test -f $ac_dir/$ac_word; then
680       ac_cv_prog_CC="gcc"
681       break
682     fi
683   done
684   IFS="$ac_save_ifs"
685 fi
686 fi
687 CC="$ac_cv_prog_CC"
688 if test -n "$CC"; then
689   echo "$ac_t""$CC" 1>&6
690 else
691   echo "$ac_t""no" 1>&6
692 fi
693
694 if test -z "$CC"; then
695   # Extract the first word of "cc", so it can be a program name with args.
696 set dummy cc; ac_word=$2
697 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
698 echo "configure:710: checking for $ac_word" >&5
699 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
700   echo $ac_n "(cached) $ac_c" 1>&6
701 else
702   if test -n "$CC"; then
703   ac_cv_prog_CC="$CC" # Let the user override the test.
704 else
705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
706   ac_prog_rejected=no
707   for ac_dir in $PATH; do
708     test -z "$ac_dir" && ac_dir=.
709     if test -f $ac_dir/$ac_word; then
710       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
711         ac_prog_rejected=yes
712         continue
713       fi
714       ac_cv_prog_CC="cc"
715       break
716     fi
717   done
718   IFS="$ac_save_ifs"
719 if test $ac_prog_rejected = yes; then
720   # We found a bogon in the path, so make sure we never use it.
721   set dummy $ac_cv_prog_CC
722   shift
723   if test $# -gt 0; then
724     # We chose a different compiler from the bogus one.
725     # However, it has the same basename, so the bogon will be chosen
726     # first if we set CC to just the basename; use the full file name.
727     shift
728     set dummy "$ac_dir/$ac_word" "$@"
729     shift
730     ac_cv_prog_CC="$@"
731   fi
732 fi
733 fi
734 fi
735 CC="$ac_cv_prog_CC"
736 if test -n "$CC"; then
737   echo "$ac_t""$CC" 1>&6
738 else
739   echo "$ac_t""no" 1>&6
740 fi
741
742   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
743 fi
744
745 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
746 echo "configure:758: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
747
748 ac_ext=c
749 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
750 ac_cpp='$CPP $CPPFLAGS'
751 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
752 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
753 cross_compiling=$ac_cv_prog_cc_cross
754
755 cat > conftest.$ac_ext <<EOF
756 #line 768 "configure"
757 #include "confdefs.h"
758 main(){return(0);}
759 EOF
760 if { (eval echo configure:772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
761   ac_cv_prog_cc_works=yes
762   # If we can't run a trivial program, we are probably using a cross compiler.
763   if (./conftest; exit) 2>/dev/null; then
764     ac_cv_prog_cc_cross=no
765   else
766     ac_cv_prog_cc_cross=yes
767   fi
768 else
769   echo "configure: failed program was:" >&5
770   cat conftest.$ac_ext >&5
771   ac_cv_prog_cc_works=no
772 fi
773 rm -fr conftest*
774
775 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
776 if test $ac_cv_prog_cc_works = no; then
777   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
778 fi
779 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
780 echo "configure:792: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
781 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
782 cross_compiling=$ac_cv_prog_cc_cross
783
784 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
785 echo "configure:797: checking whether we are using GNU C" >&5
786 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
787   echo $ac_n "(cached) $ac_c" 1>&6
788 else
789   cat > conftest.c <<EOF
790 #ifdef __GNUC__
791   yes;
792 #endif
793 EOF
794 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
795   ac_cv_prog_gcc=yes
796 else
797   ac_cv_prog_gcc=no
798 fi
799 fi
800
801 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
802
803 if test $ac_cv_prog_gcc = yes; then
804   GCC=yes
805   ac_test_CFLAGS="${CFLAGS+set}"
806   ac_save_CFLAGS="$CFLAGS"
807   CFLAGS=
808   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
809 echo "configure:821: checking whether ${CC-cc} accepts -g" >&5
810 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
811   echo $ac_n "(cached) $ac_c" 1>&6
812 else
813   echo 'void f(){}' > conftest.c
814 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
815   ac_cv_prog_cc_g=yes
816 else
817   ac_cv_prog_cc_g=no
818 fi
819 rm -f conftest*
820
821 fi
822
823 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
824   if test "$ac_test_CFLAGS" = set; then
825     CFLAGS="$ac_save_CFLAGS"
826   elif test $ac_cv_prog_cc_g = yes; then
827     CFLAGS="-g -O2"
828   else
829     CFLAGS="-O2"
830   fi
831 else
832   GCC=
833   test "${CFLAGS+set}" = set || CFLAGS="-g"
834 fi
835
836
837 if test -z "$GCC"; then
838   echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
839 echo "configure:851: checking how to request ANSI compilation" >&5
840   case "$host" in
841     *-hpux*)
842       echo "$ac_t""HPUX: adding -Ae" 1>&6
843       CC="$CC -Ae"
844     ;;
845     *-aix*)
846       echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6
847       CC="$CC -qlanglvl=ansi -qhalt=e"
848     ;;
849
850     *-dec-*)
851       echo "$ac_t""DEC: adding -std1" 1>&6
852       CC="$CC -std1"
853     ;;
854
855     *)
856       echo "$ac_t""no idea" 1>&6
857     ;;
858   esac
859 fi
860
861
862 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
863 echo "configure:875: checking whether the compiler works on ANSI C" >&5
864 if test "$cross_compiling" = yes; then
865   { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
866 else
867   cat > conftest.$ac_ext <<EOF
868 #line 880 "configure"
869 #include "confdefs.h"
870  main(int ac, char **av) { return 0; } 
871 EOF
872 if { (eval echo configure:884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
873 then
874   echo "$ac_t""yes" 1>&6
875 else
876   echo "configure: failed program was:" >&5
877   cat conftest.$ac_ext >&5
878   rm -fr conftest*
879   echo "$ac_t""no" 1>&6
880    { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
881 fi
882 rm -fr conftest*
883 fi
884
885
886 case "$host" in
887   *-irix5* |*-irix6.0-3* )
888     if test -n "$GCC"; then
889       echo "$ac_t""Turning on gcc compiler warnings." 1>&6
890       CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
891     else
892       # not gcc
893       echo "$ac_t""Turning on SGI compiler warnings." 1>&6
894       CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
895     fi
896   ;;
897
898     *-linux-*)
899       echo "$ac_t""Turning on gcc compiler warnings." 1>&6
900       CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
901   ;;
902
903 #  *-dec-osf*)
904 #    if test -z "$GCC"; then
905 #      AC_MSG_RESULT(Turning on DEC C compiler warnings.)
906 #      CC="$CC -migrate -w0 -verbose -warnprotos"
907 #    fi
908 #  ;;
909
910 esac
911
912
913 # Try and determine whether ${INSTALL} can create intermediate directories,
914 # and if not, whether "mkdir -p" works instead.  This sets ${INSTALL_DIRS}.
915 # (But autoconf should earn its keep and do this for us!)
916 #
917
918
919
920 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
921 echo "configure:933: checking how to run the C preprocessor" >&5
922 # On Suns, sometimes $CPP names a directory.
923 if test -n "$CPP" && test -d "$CPP"; then
924   CPP=
925 fi
926 if test -z "$CPP"; then
927 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
928   echo $ac_n "(cached) $ac_c" 1>&6
929 else
930     # This must be in double quotes, not single quotes, because CPP may get
931   # substituted into the Makefile and "${CC-cc}" will confuse make.
932   CPP="${CC-cc} -E"
933   # On the NeXT, cc -E runs the code through the compiler's parser,
934   # not just through cpp.
935   cat > conftest.$ac_ext <<EOF
936 #line 948 "configure"
937 #include "confdefs.h"
938 #include <assert.h>
939 Syntax Error
940 EOF
941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
942 { (eval echo configure:954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
943 ac_err=`grep -v '^ *+' conftest.out`
944 if test -z "$ac_err"; then
945   :
946 else
947   echo "$ac_err" >&5
948   echo "configure: failed program was:" >&5
949   cat conftest.$ac_ext >&5
950   rm -rf conftest*
951   CPP="${CC-cc} -E -traditional-cpp"
952   cat > conftest.$ac_ext <<EOF
953 #line 965 "configure"
954 #include "confdefs.h"
955 #include <assert.h>
956 Syntax Error
957 EOF
958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
959 { (eval echo configure:971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
960 ac_err=`grep -v '^ *+' conftest.out`
961 if test -z "$ac_err"; then
962   :
963 else
964   echo "$ac_err" >&5
965   echo "configure: failed program was:" >&5
966   cat conftest.$ac_ext >&5
967   rm -rf conftest*
968   CPP=/lib/cpp
969 fi
970 rm -f conftest*
971 fi
972 rm -f conftest*
973   ac_cv_prog_CPP="$CPP"
974 fi
975   CPP="$ac_cv_prog_CPP"
976 else
977   ac_cv_prog_CPP="$CPP"
978 fi
979 echo "$ac_t""$CPP" 1>&6
980
981 # Find a good install program.  We prefer a C program (faster),
982 # so one script is as good as another.  But avoid the broken or
983 # incompatible versions:
984 # SysV /etc/install, /usr/sbin/install
985 # SunOS /usr/etc/install
986 # IRIX /sbin/install
987 # AIX /bin/install
988 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
989 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
990 # ./install, which can be erroneously created by make from ./install.sh.
991 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
992 echo "configure:1004: checking for a BSD compatible install" >&5
993 if test -z "$INSTALL"; then
994 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
995   echo $ac_n "(cached) $ac_c" 1>&6
996 else
997     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
998   for ac_dir in $PATH; do
999     # Account for people who put trailing slashes in PATH elements.
1000     case "$ac_dir/" in
1001     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1002     *)
1003       # OSF1 and SCO ODT 3.0 have their own names for install.
1004       for ac_prog in ginstall installbsd scoinst install; do
1005         if test -f $ac_dir/$ac_prog; then
1006           if test $ac_prog = install &&
1007             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1008             # AIX install.  It has an incompatible calling convention.
1009             # OSF/1 installbsd also uses dspmsg, but is usable.
1010             :
1011           else
1012             ac_cv_path_install="$ac_dir/$ac_prog -c"
1013             break 2
1014           fi
1015         fi
1016       done
1017       ;;
1018     esac
1019   done
1020   IFS="$ac_save_IFS"
1021
1022 fi
1023   if test "${ac_cv_path_install+set}" = set; then
1024     INSTALL="$ac_cv_path_install"
1025   else
1026     # As a last resort, use the slow shell script.  We don't cache a
1027     # path for INSTALL within a source directory, because that will
1028     # break other packages using the cache if that directory is
1029     # removed, or if the path is relative.
1030     INSTALL="$ac_install_sh"
1031   fi
1032 fi
1033 echo "$ac_t""$INSTALL" 1>&6
1034
1035 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1036 # It thinks the first close brace ends the variable substitution.
1037 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1038
1039 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1040
1041 INSTALL_DIRS='${INSTALL} -d'
1042    echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
1043 echo "configure:1055: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
1044    rm -rf conftestdir
1045    if mkdir conftestdir; then
1046       cd conftestdir >&-
1047
1048       ${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
1049       if test -d dir1/dir2 ; then
1050         echo "$ac_t""yes" 1>&6
1051       else
1052         echo "$ac_t""no" 1>&6
1053         echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
1054 echo "configure:1066: checking whether \"mkdir -p\" creates intermediate directories" >&5
1055         rm -rf dir1
1056         mkdir -p dir1/dir2 >&- 2>&-
1057         if test -d dir1/dir2/. ; then
1058           echo "$ac_t""yes" 1>&6
1059           INSTALL_DIRS='mkdir -p'
1060         else
1061           echo "$ac_t""no" 1>&6
1062         fi
1063       fi
1064       cd .. >&-
1065       rm -rf conftestdir
1066    fi
1067
1068 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1069 echo "configure:1081: checking whether ${MAKE-make} sets \${MAKE}" >&5
1070 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1071 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1072   echo $ac_n "(cached) $ac_c" 1>&6
1073 else
1074   cat > conftestmake <<\EOF
1075 all:
1076         @echo 'ac_maketemp="${MAKE}"'
1077 EOF
1078 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1079 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1080 if test -n "$ac_maketemp"; then
1081   eval ac_cv_prog_make_${ac_make}_set=yes
1082 else
1083   eval ac_cv_prog_make_${ac_make}_set=no
1084 fi
1085 rm -f conftestmake
1086 fi
1087 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1088   echo "$ac_t""yes" 1>&6
1089   SET_MAKE=
1090 else
1091   echo "$ac_t""no" 1>&6
1092   SET_MAKE="MAKE=${MAKE-make}"
1093 fi
1094
1095
1096 echo $ac_n "checking for working const""... $ac_c" 1>&6
1097 echo "configure:1109: checking for working const" >&5
1098 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1099   echo $ac_n "(cached) $ac_c" 1>&6
1100 else
1101   cat > conftest.$ac_ext <<EOF
1102 #line 1114 "configure"
1103 #include "confdefs.h"
1104
1105 int main() {
1106
1107 /* Ultrix mips cc rejects this.  */
1108 typedef int charset[2]; const charset x;
1109 /* SunOS 4.1.1 cc rejects this.  */
1110 char const *const *ccp;
1111 char **p;
1112 /* NEC SVR4.0.2 mips cc rejects this.  */
1113 struct point {int x, y;};
1114 static struct point const zero = {0,0};
1115 /* AIX XL C 1.02.0.0 rejects this.
1116    It does not let you subtract one const X* pointer from another in an arm
1117    of an if-expression whose if-part is not a constant expression */
1118 const char *g = "string";
1119 ccp = &g + (g ? g-g : 0);
1120 /* HPUX 7.0 cc rejects these. */
1121 ++ccp;
1122 p = (char**) ccp;
1123 ccp = (char const *const *) p;
1124 { /* SCO 3.2v4 cc rejects this.  */
1125   char *t;
1126   char const *s = 0 ? (char *) 0 : (char const *) 0;
1127
1128   *t++ = 0;
1129 }
1130 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1131   int x[] = {25, 17};
1132   const int *foo = &x[0];
1133   ++foo;
1134 }
1135 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1136   typedef const int *iptr;
1137   iptr p = 0;
1138   ++p;
1139 }
1140 { /* AIX XL C 1.02.0.0 rejects this saying
1141      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1142   struct s { int j; const int *ap[3]; };
1143   struct s *b; b->j = 5;
1144 }
1145 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1146   const int foo = 10;
1147 }
1148
1149 ; return 0; }
1150 EOF
1151 if { (eval echo configure:1163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1152   rm -rf conftest*
1153   ac_cv_c_const=yes
1154 else
1155   echo "configure: failed program was:" >&5
1156   cat conftest.$ac_ext >&5
1157   rm -rf conftest*
1158   ac_cv_c_const=no
1159 fi
1160 rm -f conftest*
1161 fi
1162
1163 echo "$ac_t""$ac_cv_c_const" 1>&6
1164 if test $ac_cv_c_const = no; then
1165   cat >> confdefs.h <<\EOF
1166 #define const 
1167 EOF
1168
1169 fi
1170
1171 echo $ac_n "checking for inline""... $ac_c" 1>&6
1172 echo "configure:1184: checking for inline" >&5
1173 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1174   echo $ac_n "(cached) $ac_c" 1>&6
1175 else
1176   ac_cv_c_inline=no
1177 for ac_kw in inline __inline__ __inline; do
1178   cat > conftest.$ac_ext <<EOF
1179 #line 1191 "configure"
1180 #include "confdefs.h"
1181
1182 int main() {
1183 } $ac_kw foo() {
1184 ; return 0; }
1185 EOF
1186 if { (eval echo configure:1198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1187   rm -rf conftest*
1188   ac_cv_c_inline=$ac_kw; break
1189 else
1190   echo "configure: failed program was:" >&5
1191   cat conftest.$ac_ext >&5
1192 fi
1193 rm -f conftest*
1194 done
1195
1196 fi
1197
1198 echo "$ac_t""$ac_cv_c_inline" 1>&6
1199 case "$ac_cv_c_inline" in
1200   inline | yes) ;;
1201   no) cat >> confdefs.h <<\EOF
1202 #define inline 
1203 EOF
1204  ;;
1205   *)  cat >> confdefs.h <<EOF
1206 #define inline $ac_cv_c_inline
1207 EOF
1208  ;;
1209 esac
1210
1211
1212 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1213 echo "configure:1225: checking for ANSI C header files" >&5
1214 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1215   echo $ac_n "(cached) $ac_c" 1>&6
1216 else
1217   cat > conftest.$ac_ext <<EOF
1218 #line 1230 "configure"
1219 #include "confdefs.h"
1220 #include <stdlib.h>
1221 #include <stdarg.h>
1222 #include <string.h>
1223 #include <float.h>
1224 EOF
1225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1226 { (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1227 ac_err=`grep -v '^ *+' conftest.out`
1228 if test -z "$ac_err"; then
1229   rm -rf conftest*
1230   ac_cv_header_stdc=yes
1231 else
1232   echo "$ac_err" >&5
1233   echo "configure: failed program was:" >&5
1234   cat conftest.$ac_ext >&5
1235   rm -rf conftest*
1236   ac_cv_header_stdc=no
1237 fi
1238 rm -f conftest*
1239
1240 if test $ac_cv_header_stdc = yes; then
1241   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1242 cat > conftest.$ac_ext <<EOF
1243 #line 1255 "configure"
1244 #include "confdefs.h"
1245 #include <string.h>
1246 EOF
1247 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1248   egrep "memchr" >/dev/null 2>&1; then
1249   :
1250 else
1251   rm -rf conftest*
1252   ac_cv_header_stdc=no
1253 fi
1254 rm -f conftest*
1255
1256 fi
1257
1258 if test $ac_cv_header_stdc = yes; then
1259   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1260 cat > conftest.$ac_ext <<EOF
1261 #line 1273 "configure"
1262 #include "confdefs.h"
1263 #include <stdlib.h>
1264 EOF
1265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1266   egrep "free" >/dev/null 2>&1; then
1267   :
1268 else
1269   rm -rf conftest*
1270   ac_cv_header_stdc=no
1271 fi
1272 rm -f conftest*
1273
1274 fi
1275
1276 if test $ac_cv_header_stdc = yes; then
1277   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1278 if test "$cross_compiling" = yes; then
1279   :
1280 else
1281   cat > conftest.$ac_ext <<EOF
1282 #line 1294 "configure"
1283 #include "confdefs.h"
1284 #include <ctype.h>
1285 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1286 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1287 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1288 int main () { int i; for (i = 0; i < 256; i++)
1289 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1290 exit (0); }
1291
1292 EOF
1293 if { (eval echo configure:1305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1294 then
1295   :
1296 else
1297   echo "configure: failed program was:" >&5
1298   cat conftest.$ac_ext >&5
1299   rm -fr conftest*
1300   ac_cv_header_stdc=no
1301 fi
1302 rm -fr conftest*
1303 fi
1304
1305 fi
1306 fi
1307
1308 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1309 if test $ac_cv_header_stdc = yes; then
1310   cat >> confdefs.h <<\EOF
1311 #define STDC_HEADERS 1
1312 EOF
1313
1314 fi
1315
1316 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1317 echo "configure:1329: checking whether time.h and sys/time.h may both be included" >&5
1318 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1319   echo $ac_n "(cached) $ac_c" 1>&6
1320 else
1321   cat > conftest.$ac_ext <<EOF
1322 #line 1334 "configure"
1323 #include "confdefs.h"
1324 #include <sys/types.h>
1325 #include <sys/time.h>
1326 #include <time.h>
1327 int main() {
1328 struct tm *tp;
1329 ; return 0; }
1330 EOF
1331 if { (eval echo configure:1343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1332   rm -rf conftest*
1333   ac_cv_header_time=yes
1334 else
1335   echo "configure: failed program was:" >&5
1336   cat conftest.$ac_ext >&5
1337   rm -rf conftest*
1338   ac_cv_header_time=no
1339 fi
1340 rm -f conftest*
1341 fi
1342
1343 echo "$ac_t""$ac_cv_header_time" 1>&6
1344 if test $ac_cv_header_time = yes; then
1345   cat >> confdefs.h <<\EOF
1346 #define TIME_WITH_SYS_TIME 1
1347 EOF
1348
1349 fi
1350
1351 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1352 echo "configure:1364: checking for sys/wait.h that is POSIX.1 compatible" >&5
1353 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1354   echo $ac_n "(cached) $ac_c" 1>&6
1355 else
1356   cat > conftest.$ac_ext <<EOF
1357 #line 1369 "configure"
1358 #include "confdefs.h"
1359 #include <sys/types.h>
1360 #include <sys/wait.h>
1361 #ifndef WEXITSTATUS
1362 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1363 #endif
1364 #ifndef WIFEXITED
1365 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1366 #endif
1367 int main() {
1368 int s;
1369 wait (&s);
1370 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1371 ; return 0; }
1372 EOF
1373 if { (eval echo configure:1385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1374   rm -rf conftest*
1375   ac_cv_header_sys_wait_h=yes
1376 else
1377   echo "configure: failed program was:" >&5
1378   cat conftest.$ac_ext >&5
1379   rm -rf conftest*
1380   ac_cv_header_sys_wait_h=no
1381 fi
1382 rm -f conftest*
1383 fi
1384
1385 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1386 if test $ac_cv_header_sys_wait_h = yes; then
1387   cat >> confdefs.h <<\EOF
1388 #define HAVE_SYS_WAIT_H 1
1389 EOF
1390
1391 fi
1392
1393 ac_header_dirent=no
1394 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1395 do
1396 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1397 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1398 echo "configure:1410: checking for $ac_hdr that defines DIR" >&5
1399 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1400   echo $ac_n "(cached) $ac_c" 1>&6
1401 else
1402   cat > conftest.$ac_ext <<EOF
1403 #line 1415 "configure"
1404 #include "confdefs.h"
1405 #include <sys/types.h>
1406 #include <$ac_hdr>
1407 int main() {
1408 DIR *dirp = 0;
1409 ; return 0; }
1410 EOF
1411 if { (eval echo configure:1423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1412   rm -rf conftest*
1413   eval "ac_cv_header_dirent_$ac_safe=yes"
1414 else
1415   echo "configure: failed program was:" >&5
1416   cat conftest.$ac_ext >&5
1417   rm -rf conftest*
1418   eval "ac_cv_header_dirent_$ac_safe=no"
1419 fi
1420 rm -f conftest*
1421 fi
1422 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1423   echo "$ac_t""yes" 1>&6
1424     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1425   cat >> confdefs.h <<EOF
1426 #define $ac_tr_hdr 1
1427 EOF
1428  ac_header_dirent=$ac_hdr; break
1429 else
1430   echo "$ac_t""no" 1>&6
1431 fi
1432 done
1433 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1434 if test $ac_header_dirent = dirent.h; then
1435 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1436 echo "configure:1448: checking for opendir in -ldir" >&5
1437 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1438 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1439   echo $ac_n "(cached) $ac_c" 1>&6
1440 else
1441   ac_save_LIBS="$LIBS"
1442 LIBS="-ldir  $LIBS"
1443 cat > conftest.$ac_ext <<EOF
1444 #line 1456 "configure"
1445 #include "confdefs.h"
1446 /* Override any gcc2 internal prototype to avoid an error.  */
1447 /* We use char because int might match the return type of a gcc2
1448     builtin and then its argument prototype would still apply.  */
1449 char opendir();
1450
1451 int main() {
1452 opendir()
1453 ; return 0; }
1454 EOF
1455 if { (eval echo configure:1467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1456   rm -rf conftest*
1457   eval "ac_cv_lib_$ac_lib_var=yes"
1458 else
1459   echo "configure: failed program was:" >&5
1460   cat conftest.$ac_ext >&5
1461   rm -rf conftest*
1462   eval "ac_cv_lib_$ac_lib_var=no"
1463 fi
1464 rm -f conftest*
1465 LIBS="$ac_save_LIBS"
1466
1467 fi
1468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1469   echo "$ac_t""yes" 1>&6
1470   LIBS="$LIBS -ldir"
1471 else
1472   echo "$ac_t""no" 1>&6
1473 fi
1474
1475 else
1476 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1477 echo "configure:1489: checking for opendir in -lx" >&5
1478 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1479 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1480   echo $ac_n "(cached) $ac_c" 1>&6
1481 else
1482   ac_save_LIBS="$LIBS"
1483 LIBS="-lx  $LIBS"
1484 cat > conftest.$ac_ext <<EOF
1485 #line 1497 "configure"
1486 #include "confdefs.h"
1487 /* Override any gcc2 internal prototype to avoid an error.  */
1488 /* We use char because int might match the return type of a gcc2
1489     builtin and then its argument prototype would still apply.  */
1490 char opendir();
1491
1492 int main() {
1493 opendir()
1494 ; return 0; }
1495 EOF
1496 if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1497   rm -rf conftest*
1498   eval "ac_cv_lib_$ac_lib_var=yes"
1499 else
1500   echo "configure: failed program was:" >&5
1501   cat conftest.$ac_ext >&5
1502   rm -rf conftest*
1503   eval "ac_cv_lib_$ac_lib_var=no"
1504 fi
1505 rm -f conftest*
1506 LIBS="$ac_save_LIBS"
1507
1508 fi
1509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1510   echo "$ac_t""yes" 1>&6
1511   LIBS="$LIBS -lx"
1512 else
1513   echo "$ac_t""no" 1>&6
1514 fi
1515
1516 fi
1517
1518
1519 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1520 echo "configure:1532: checking for mode_t" >&5
1521 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1522   echo $ac_n "(cached) $ac_c" 1>&6
1523 else
1524   cat > conftest.$ac_ext <<EOF
1525 #line 1537 "configure"
1526 #include "confdefs.h"
1527 #include <sys/types.h>
1528 #if STDC_HEADERS
1529 #include <stdlib.h>
1530 #include <stddef.h>
1531 #endif
1532 EOF
1533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1534   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1535   rm -rf conftest*
1536   ac_cv_type_mode_t=yes
1537 else
1538   rm -rf conftest*
1539   ac_cv_type_mode_t=no
1540 fi
1541 rm -f conftest*
1542
1543 fi
1544 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1545 if test $ac_cv_type_mode_t = no; then
1546   cat >> confdefs.h <<\EOF
1547 #define mode_t int
1548 EOF
1549
1550 fi
1551
1552 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1553 echo "configure:1565: checking for pid_t" >&5
1554 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1555   echo $ac_n "(cached) $ac_c" 1>&6
1556 else
1557   cat > conftest.$ac_ext <<EOF
1558 #line 1570 "configure"
1559 #include "confdefs.h"
1560 #include <sys/types.h>
1561 #if STDC_HEADERS
1562 #include <stdlib.h>
1563 #include <stddef.h>
1564 #endif
1565 EOF
1566 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1567   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1568   rm -rf conftest*
1569   ac_cv_type_pid_t=yes
1570 else
1571   rm -rf conftest*
1572   ac_cv_type_pid_t=no
1573 fi
1574 rm -f conftest*
1575
1576 fi
1577 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1578 if test $ac_cv_type_pid_t = no; then
1579   cat >> confdefs.h <<\EOF
1580 #define pid_t int
1581 EOF
1582
1583 fi
1584
1585 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1586 echo "configure:1598: checking for size_t" >&5
1587 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1588   echo $ac_n "(cached) $ac_c" 1>&6
1589 else
1590   cat > conftest.$ac_ext <<EOF
1591 #line 1603 "configure"
1592 #include "confdefs.h"
1593 #include <sys/types.h>
1594 #if STDC_HEADERS
1595 #include <stdlib.h>
1596 #include <stddef.h>
1597 #endif
1598 EOF
1599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1600   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1601   rm -rf conftest*
1602   ac_cv_type_size_t=yes
1603 else
1604   rm -rf conftest*
1605   ac_cv_type_size_t=no
1606 fi
1607 rm -f conftest*
1608
1609 fi
1610 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1611 if test $ac_cv_type_size_t = no; then
1612   cat >> confdefs.h <<\EOF
1613 #define size_t unsigned
1614 EOF
1615
1616 fi
1617
1618 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1619 echo "configure:1631: checking return type of signal handlers" >&5
1620 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1621   echo $ac_n "(cached) $ac_c" 1>&6
1622 else
1623   cat > conftest.$ac_ext <<EOF
1624 #line 1636 "configure"
1625 #include "confdefs.h"
1626 #include <sys/types.h>
1627 #include <signal.h>
1628 #ifdef signal
1629 #undef signal
1630 #endif
1631 #ifdef __cplusplus
1632 extern "C" void (*signal (int, void (*)(int)))(int);
1633 #else
1634 void (*signal ()) ();
1635 #endif
1636
1637 int main() {
1638 int i;
1639 ; return 0; }
1640 EOF
1641 if { (eval echo configure:1653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1642   rm -rf conftest*
1643   ac_cv_type_signal=void
1644 else
1645   echo "configure: failed program was:" >&5
1646   cat conftest.$ac_ext >&5
1647   rm -rf conftest*
1648   ac_cv_type_signal=int
1649 fi
1650 rm -f conftest*
1651 fi
1652
1653 echo "$ac_t""$ac_cv_type_signal" 1>&6
1654 cat >> confdefs.h <<EOF
1655 #define RETSIGTYPE $ac_cv_type_signal
1656 EOF
1657
1658
1659
1660 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
1661 echo "configure:1673: checking how to call gettimeofday" >&5
1662 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
1663   echo $ac_n "(cached) $ac_c" 1>&6
1664 else
1665   cat > conftest.$ac_ext <<EOF
1666 #line 1678 "configure"
1667 #include "confdefs.h"
1668 #include <stdlib.h>
1669                   #include <sys/time.h>
1670 int main() {
1671 struct timeval tv; struct timezone tzp;
1672                   gettimeofday(&tv, &tzp);
1673 ; return 0; }
1674 EOF
1675 if { (eval echo configure:1687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1676   rm -rf conftest*
1677   ac_gettimeofday_args=2
1678 else
1679   echo "configure: failed program was:" >&5
1680   cat conftest.$ac_ext >&5
1681   rm -rf conftest*
1682   cat > conftest.$ac_ext <<EOF
1683 #line 1695 "configure"
1684 #include "confdefs.h"
1685 #include <stdlib.h>
1686                                   #include <sys/time.h>
1687 int main() {
1688 struct timeval tv; gettimeofday(&tv);
1689 ; return 0; }
1690 EOF
1691 if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1692   rm -rf conftest*
1693   ac_gettimeofday_args=1
1694 else
1695   echo "configure: failed program was:" >&5
1696   cat conftest.$ac_ext >&5
1697   rm -rf conftest*
1698   ac_gettimeofday_args=0
1699 fi
1700 rm -f conftest*
1701 fi
1702 rm -f conftest*
1703   ac_cv_gettimeofday_args=$ac_gettimeofday_args
1704 fi
1705
1706 ac_gettimeofday_args=$ac_cv_gettimeofday_args
1707 if test $ac_gettimeofday_args = 1 ; then
1708   cat >> confdefs.h <<\EOF
1709 #define HAVE_GETTIMEOFDAY 1
1710 EOF
1711
1712   echo "$ac_t""one argument" 1>&6
1713 elif test $ac_gettimeofday_args = 2 ; then
1714   cat >> confdefs.h <<\EOF
1715 #define HAVE_GETTIMEOFDAY 1
1716 EOF
1717
1718   cat >> confdefs.h <<\EOF
1719 #define GETTIMEOFDAY_TWO_ARGS 1
1720 EOF
1721
1722   echo "$ac_t""two arguments" 1>&6
1723 else
1724   echo "$ac_t""unknown" 1>&6
1725 fi
1726
1727
1728 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
1729 do
1730 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1731 echo "configure:1743: checking for $ac_func" >&5
1732 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1733   echo $ac_n "(cached) $ac_c" 1>&6
1734 else
1735   cat > conftest.$ac_ext <<EOF
1736 #line 1748 "configure"
1737 #include "confdefs.h"
1738 /* System header to define __stub macros and hopefully few prototypes,
1739     which can conflict with char $ac_func(); below.  */
1740 #include <assert.h>
1741 /* Override any gcc2 internal prototype to avoid an error.  */
1742 /* We use char because int might match the return type of a gcc2
1743     builtin and then its argument prototype would still apply.  */
1744 char $ac_func();
1745
1746 int main() {
1747
1748 /* The GNU C library defines this for functions which it implements
1749     to always fail with ENOSYS.  Some functions are actually named
1750     something starting with __ and the normal name is an alias.  */
1751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1752 choke me
1753 #else
1754 $ac_func();
1755 #endif
1756
1757 ; return 0; }
1758 EOF
1759 if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1760   rm -rf conftest*
1761   eval "ac_cv_func_$ac_func=yes"
1762 else
1763   echo "configure: failed program was:" >&5
1764   cat conftest.$ac_ext >&5
1765   rm -rf conftest*
1766   eval "ac_cv_func_$ac_func=no"
1767 fi
1768 rm -f conftest*
1769 fi
1770
1771 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1772   echo "$ac_t""yes" 1>&6
1773     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1774   cat >> confdefs.h <<EOF
1775 #define $ac_tr_func 1
1776 EOF
1777  
1778 else
1779   echo "$ac_t""no" 1>&6
1780 fi
1781 done
1782
1783 for ac_func in sigaction
1784 do
1785 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1786 echo "configure:1798: checking for $ac_func" >&5
1787 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1788   echo $ac_n "(cached) $ac_c" 1>&6
1789 else
1790   cat > conftest.$ac_ext <<EOF
1791 #line 1803 "configure"
1792 #include "confdefs.h"
1793 /* System header to define __stub macros and hopefully few prototypes,
1794     which can conflict with char $ac_func(); below.  */
1795 #include <assert.h>
1796 /* Override any gcc2 internal prototype to avoid an error.  */
1797 /* We use char because int might match the return type of a gcc2
1798     builtin and then its argument prototype would still apply.  */
1799 char $ac_func();
1800
1801 int main() {
1802
1803 /* The GNU C library defines this for functions which it implements
1804     to always fail with ENOSYS.  Some functions are actually named
1805     something starting with __ and the normal name is an alias.  */
1806 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1807 choke me
1808 #else
1809 $ac_func();
1810 #endif
1811
1812 ; return 0; }
1813 EOF
1814 if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1815   rm -rf conftest*
1816   eval "ac_cv_func_$ac_func=yes"
1817 else
1818   echo "configure: failed program was:" >&5
1819   cat conftest.$ac_ext >&5
1820   rm -rf conftest*
1821   eval "ac_cv_func_$ac_func=no"
1822 fi
1823 rm -f conftest*
1824 fi
1825
1826 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1827   echo "$ac_t""yes" 1>&6
1828     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1829   cat >> confdefs.h <<EOF
1830 #define $ac_tr_func 1
1831 EOF
1832  
1833 else
1834   echo "$ac_t""no" 1>&6
1835 fi
1836 done
1837
1838
1839 for ac_hdr in unistd.h crypt.h
1840 do
1841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1843 echo "configure:1855: checking for $ac_hdr" >&5
1844 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1845   echo $ac_n "(cached) $ac_c" 1>&6
1846 else
1847   cat > conftest.$ac_ext <<EOF
1848 #line 1860 "configure"
1849 #include "confdefs.h"
1850 #include <$ac_hdr>
1851 EOF
1852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1853 { (eval echo configure:1865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1854 ac_err=`grep -v '^ *+' conftest.out`
1855 if test -z "$ac_err"; then
1856   rm -rf conftest*
1857   eval "ac_cv_header_$ac_safe=yes"
1858 else
1859   echo "$ac_err" >&5
1860   echo "configure: failed program was:" >&5
1861   cat conftest.$ac_ext >&5
1862   rm -rf conftest*
1863   eval "ac_cv_header_$ac_safe=no"
1864 fi
1865 rm -f conftest*
1866 fi
1867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1868   echo "$ac_t""yes" 1>&6
1869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1870   cat >> confdefs.h <<EOF
1871 #define $ac_tr_hdr 1
1872 EOF
1873  
1874 else
1875   echo "$ac_t""no" 1>&6
1876 fi
1877 done
1878
1879
1880
1881
1882 # Check whether --enable-subdir or --disable-subdir was given.
1883 if test "${enable_subdir+set}" = set; then
1884   enableval="$enable_subdir"
1885   enable_subdir="$enableval"
1886 else
1887   enable_subdir=no
1888 fi
1889
1890 if test x"$enable_subdir" = xno; then
1891   HACKDIR='${bindir}'
1892 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
1893   echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
1894   exit 1
1895 else
1896   # there must be a better way than this...
1897   if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
1898     # absolute path
1899     HACKDIR=$enable_subdir
1900   else
1901     # relative path
1902     HACKDIR='${bindir}/'$enable_subdir
1903   fi
1904 fi
1905
1906
1907 # If we find X, set shell vars x_includes and x_libraries to the
1908 # paths, otherwise set no_x=yes.
1909 # Uses ac_ vars as temps to allow command line to override cache and checks.
1910 # --without-x overrides everything else, but does not touch the cache.
1911 echo $ac_n "checking for X""... $ac_c" 1>&6
1912 echo "configure:1924: checking for X" >&5
1913
1914 # Check whether --with-x or --without-x was given.
1915 if test "${with_x+set}" = set; then
1916   withval="$with_x"
1917   :
1918 fi
1919
1920 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1921 if test "x$with_x" = xno; then
1922   # The user explicitly disabled X.
1923   have_x=disabled
1924 else
1925   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1926     # Both variables are already set.
1927     have_x=yes
1928   else
1929 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1930   echo $ac_n "(cached) $ac_c" 1>&6
1931 else
1932   # One or both of the vars are not set, and there is no cached value.
1933 ac_x_includes=NO ac_x_libraries=NO
1934 rm -fr conftestdir
1935 if mkdir conftestdir; then
1936   cd conftestdir
1937   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1938   cat > Imakefile <<'EOF'
1939 acfindx:
1940         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1941 EOF
1942   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1943     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1944     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1945     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1946     for ac_extension in a so sl; do
1947       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1948         test -f $ac_im_libdir/libX11.$ac_extension; then
1949         ac_im_usrlibdir=$ac_im_libdir; break
1950       fi
1951     done
1952     # Screen out bogus values from the imake configuration.  They are
1953     # bogus both because they are the default anyway, and because
1954     # using them would break gcc on systems where it needs fixed includes.
1955     case "$ac_im_incroot" in
1956         /usr/include) ;;
1957         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1958     esac
1959     case "$ac_im_usrlibdir" in
1960         /usr/lib | /lib) ;;
1961         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1962     esac
1963   fi
1964   cd ..
1965   rm -fr conftestdir
1966 fi
1967
1968 if test "$ac_x_includes" = NO; then
1969   # Guess where to find include files, by looking for this one X11 .h file.
1970   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1971
1972   # First, try using that file with no special directory specified.
1973 cat > conftest.$ac_ext <<EOF
1974 #line 1986 "configure"
1975 #include "confdefs.h"
1976 #include <$x_direct_test_include>
1977 EOF
1978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1979 { (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1980 ac_err=`grep -v '^ *+' conftest.out`
1981 if test -z "$ac_err"; then
1982   rm -rf conftest*
1983   # We can compile using X headers with no special include directory.
1984 ac_x_includes=
1985 else
1986   echo "$ac_err" >&5
1987   echo "configure: failed program was:" >&5
1988   cat conftest.$ac_ext >&5
1989   rm -rf conftest*
1990   # Look for the header file in a standard set of common directories.
1991 # Check X11 before X11Rn because it is often a symlink to the current release.
1992   for ac_dir in               \
1993     /usr/X11/include          \
1994     /usr/X11R6/include        \
1995     /usr/X11R5/include        \
1996     /usr/X11R4/include        \
1997                               \
1998     /usr/include/X11          \
1999     /usr/include/X11R6        \
2000     /usr/include/X11R5        \
2001     /usr/include/X11R4        \
2002                               \
2003     /usr/local/X11/include    \
2004     /usr/local/X11R6/include  \
2005     /usr/local/X11R5/include  \
2006     /usr/local/X11R4/include  \
2007                               \
2008     /usr/local/include/X11    \
2009     /usr/local/include/X11R6  \
2010     /usr/local/include/X11R5  \
2011     /usr/local/include/X11R4  \
2012                               \
2013     /usr/X386/include         \
2014     /usr/x386/include         \
2015     /usr/XFree86/include/X11  \
2016                               \
2017     /usr/include              \
2018     /usr/local/include        \
2019     /usr/unsupported/include  \
2020     /usr/athena/include       \
2021     /usr/local/x11r5/include  \
2022     /usr/lpp/Xamples/include  \
2023                               \
2024     /usr/openwin/include      \
2025     /usr/openwin/share/include \
2026     ; \
2027   do
2028     if test -r "$ac_dir/$x_direct_test_include"; then
2029       ac_x_includes=$ac_dir
2030       break
2031     fi
2032   done
2033 fi
2034 rm -f conftest*
2035 fi # $ac_x_includes = NO
2036
2037 if test "$ac_x_libraries" = NO; then
2038   # Check for the libraries.
2039
2040   test -z "$x_direct_test_library" && x_direct_test_library=Xt
2041   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2042
2043   # See if we find them without any special options.
2044   # Don't add to $LIBS permanently.
2045   ac_save_LIBS="$LIBS"
2046   LIBS="-l$x_direct_test_library $LIBS"
2047 cat > conftest.$ac_ext <<EOF
2048 #line 2060 "configure"
2049 #include "confdefs.h"
2050
2051 int main() {
2052 ${x_direct_test_function}()
2053 ; return 0; }
2054 EOF
2055 if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2056   rm -rf conftest*
2057   LIBS="$ac_save_LIBS"
2058 # We can link X programs with no special library path.
2059 ac_x_libraries=
2060 else
2061   echo "configure: failed program was:" >&5
2062   cat conftest.$ac_ext >&5
2063   rm -rf conftest*
2064   LIBS="$ac_save_LIBS"
2065 # First see if replacing the include by lib works.
2066 # Check X11 before X11Rn because it is often a symlink to the current release.
2067 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2068     /usr/X11/lib          \
2069     /usr/X11R6/lib        \
2070     /usr/X11R5/lib        \
2071     /usr/X11R4/lib        \
2072                           \
2073     /usr/lib/X11          \
2074     /usr/lib/X11R6        \
2075     /usr/lib/X11R5        \
2076     /usr/lib/X11R4        \
2077                           \
2078     /usr/local/X11/lib    \
2079     /usr/local/X11R6/lib  \
2080     /usr/local/X11R5/lib  \
2081     /usr/local/X11R4/lib  \
2082                           \
2083     /usr/local/lib/X11    \
2084     /usr/local/lib/X11R6  \
2085     /usr/local/lib/X11R5  \
2086     /usr/local/lib/X11R4  \
2087                           \
2088     /usr/X386/lib         \
2089     /usr/x386/lib         \
2090     /usr/XFree86/lib/X11  \
2091                           \
2092     /usr/lib              \
2093     /usr/local/lib        \
2094     /usr/unsupported/lib  \
2095     /usr/athena/lib       \
2096     /usr/local/x11r5/lib  \
2097     /usr/lpp/Xamples/lib  \
2098     /lib/usr/lib/X11      \
2099                           \
2100     /usr/openwin/lib      \
2101     /usr/openwin/share/lib \
2102     ; \
2103 do
2104   for ac_extension in a so sl; do
2105     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2106       ac_x_libraries=$ac_dir
2107       break 2
2108     fi
2109   done
2110 done
2111 fi
2112 rm -f conftest*
2113 fi # $ac_x_libraries = NO
2114
2115 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2116   # Didn't find X anywhere.  Cache the known absence of X.
2117   ac_cv_have_x="have_x=no"
2118 else
2119   # Record where we found X for the cache.
2120   ac_cv_have_x="have_x=yes \
2121                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2122 fi
2123 fi
2124   fi
2125   eval "$ac_cv_have_x"
2126 fi # $with_x != no
2127
2128 if test "$have_x" != yes; then
2129   echo "$ac_t""$have_x" 1>&6
2130   no_x=yes
2131 else
2132   # If each of the values was on the command line, it overrides each guess.
2133   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2134   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2135   # Update the cache value to reflect the command line values.
2136   ac_cv_have_x="have_x=yes \
2137                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2138   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2139 fi
2140
2141 if test "$no_x" = yes; then
2142   # Not all programs may use this symbol, but it does not hurt to define it.
2143   cat >> confdefs.h <<\EOF
2144 #define X_DISPLAY_MISSING 1
2145 EOF
2146
2147   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2148 else
2149   if test -n "$x_includes"; then
2150     X_CFLAGS="$X_CFLAGS -I$x_includes"
2151   fi
2152
2153   # It would also be nice to do this for all -L options, not just this one.
2154   if test -n "$x_libraries"; then
2155     X_LIBS="$X_LIBS -L$x_libraries"
2156     # For Solaris; some versions of Sun CC require a space after -R and
2157     # others require no space.  Words are not sufficient . . . .
2158     case "`(uname -sr) 2>/dev/null`" in
2159     "SunOS 5"*)
2160       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2161 echo "configure:2173: checking whether -R must be followed by a space" >&5
2162       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2163       cat > conftest.$ac_ext <<EOF
2164 #line 2176 "configure"
2165 #include "confdefs.h"
2166
2167 int main() {
2168
2169 ; return 0; }
2170 EOF
2171 if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2172   rm -rf conftest*
2173   ac_R_nospace=yes
2174 else
2175   echo "configure: failed program was:" >&5
2176   cat conftest.$ac_ext >&5
2177   rm -rf conftest*
2178   ac_R_nospace=no
2179 fi
2180 rm -f conftest*
2181       if test $ac_R_nospace = yes; then
2182         echo "$ac_t""no" 1>&6
2183         X_LIBS="$X_LIBS -R$x_libraries"
2184       else
2185         LIBS="$ac_xsave_LIBS -R $x_libraries"
2186         cat > conftest.$ac_ext <<EOF
2187 #line 2199 "configure"
2188 #include "confdefs.h"
2189
2190 int main() {
2191
2192 ; return 0; }
2193 EOF
2194 if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2195   rm -rf conftest*
2196   ac_R_space=yes
2197 else
2198   echo "configure: failed program was:" >&5
2199   cat conftest.$ac_ext >&5
2200   rm -rf conftest*
2201   ac_R_space=no
2202 fi
2203 rm -f conftest*
2204         if test $ac_R_space = yes; then
2205           echo "$ac_t""yes" 1>&6
2206           X_LIBS="$X_LIBS -R $x_libraries"
2207         else
2208           echo "$ac_t""neither works" 1>&6
2209         fi
2210       fi
2211       LIBS="$ac_xsave_LIBS"
2212     esac
2213   fi
2214
2215   # Check for system-dependent libraries X programs must link with.
2216   # Do this before checking for the system-independent R6 libraries
2217   # (-lICE), since we may need -lsocket or whatever for X linking.
2218
2219   if test "$ISC" = yes; then
2220     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2221   else
2222     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2223     # libraries were built with DECnet support.  And karl@cs.umb.edu says
2224     # the Alpha needs dnet_stub (dnet does not exist).
2225     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2226 echo "configure:2238: checking for dnet_ntoa in -ldnet" >&5
2227 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2228 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2229   echo $ac_n "(cached) $ac_c" 1>&6
2230 else
2231   ac_save_LIBS="$LIBS"
2232 LIBS="-ldnet  $LIBS"
2233 cat > conftest.$ac_ext <<EOF
2234 #line 2246 "configure"
2235 #include "confdefs.h"
2236 /* Override any gcc2 internal prototype to avoid an error.  */
2237 /* We use char because int might match the return type of a gcc2
2238     builtin and then its argument prototype would still apply.  */
2239 char dnet_ntoa();
2240
2241 int main() {
2242 dnet_ntoa()
2243 ; return 0; }
2244 EOF
2245 if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2246   rm -rf conftest*
2247   eval "ac_cv_lib_$ac_lib_var=yes"
2248 else
2249   echo "configure: failed program was:" >&5
2250   cat conftest.$ac_ext >&5
2251   rm -rf conftest*
2252   eval "ac_cv_lib_$ac_lib_var=no"
2253 fi
2254 rm -f conftest*
2255 LIBS="$ac_save_LIBS"
2256
2257 fi
2258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2259   echo "$ac_t""yes" 1>&6
2260   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2261 else
2262   echo "$ac_t""no" 1>&6
2263 fi
2264
2265     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2266       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2267 echo "configure:2279: checking for dnet_ntoa in -ldnet_stub" >&5
2268 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2269 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2270   echo $ac_n "(cached) $ac_c" 1>&6
2271 else
2272   ac_save_LIBS="$LIBS"
2273 LIBS="-ldnet_stub  $LIBS"
2274 cat > conftest.$ac_ext <<EOF
2275 #line 2287 "configure"
2276 #include "confdefs.h"
2277 /* Override any gcc2 internal prototype to avoid an error.  */
2278 /* We use char because int might match the return type of a gcc2
2279     builtin and then its argument prototype would still apply.  */
2280 char dnet_ntoa();
2281
2282 int main() {
2283 dnet_ntoa()
2284 ; return 0; }
2285 EOF
2286 if { (eval echo configure:2298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2287   rm -rf conftest*
2288   eval "ac_cv_lib_$ac_lib_var=yes"
2289 else
2290   echo "configure: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   rm -rf conftest*
2293   eval "ac_cv_lib_$ac_lib_var=no"
2294 fi
2295 rm -f conftest*
2296 LIBS="$ac_save_LIBS"
2297
2298 fi
2299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2300   echo "$ac_t""yes" 1>&6
2301   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2302 else
2303   echo "$ac_t""no" 1>&6
2304 fi
2305
2306     fi
2307
2308     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2309     # to get the SysV transport functions.
2310     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2311     # needs -lnsl.
2312     # The nsl library prevents programs from opening the X display
2313     # on Irix 5.2, according to dickey@clark.net.
2314     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2315 echo "configure:2327: checking for gethostbyname" >&5
2316 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2317   echo $ac_n "(cached) $ac_c" 1>&6
2318 else
2319   cat > conftest.$ac_ext <<EOF
2320 #line 2332 "configure"
2321 #include "confdefs.h"
2322 /* System header to define __stub macros and hopefully few prototypes,
2323     which can conflict with char gethostbyname(); below.  */
2324 #include <assert.h>
2325 /* Override any gcc2 internal prototype to avoid an error.  */
2326 /* We use char because int might match the return type of a gcc2
2327     builtin and then its argument prototype would still apply.  */
2328 char gethostbyname();
2329
2330 int main() {
2331
2332 /* The GNU C library defines this for functions which it implements
2333     to always fail with ENOSYS.  Some functions are actually named
2334     something starting with __ and the normal name is an alias.  */
2335 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2336 choke me
2337 #else
2338 gethostbyname();
2339 #endif
2340
2341 ; return 0; }
2342 EOF
2343 if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2344   rm -rf conftest*
2345   eval "ac_cv_func_gethostbyname=yes"
2346 else
2347   echo "configure: failed program was:" >&5
2348   cat conftest.$ac_ext >&5
2349   rm -rf conftest*
2350   eval "ac_cv_func_gethostbyname=no"
2351 fi
2352 rm -f conftest*
2353 fi
2354
2355 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2356   echo "$ac_t""yes" 1>&6
2357   :
2358 else
2359   echo "$ac_t""no" 1>&6
2360 fi
2361
2362     if test $ac_cv_func_gethostbyname = no; then
2363       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2364 echo "configure:2376: checking for gethostbyname in -lnsl" >&5
2365 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2366 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2367   echo $ac_n "(cached) $ac_c" 1>&6
2368 else
2369   ac_save_LIBS="$LIBS"
2370 LIBS="-lnsl  $LIBS"
2371 cat > conftest.$ac_ext <<EOF
2372 #line 2384 "configure"
2373 #include "confdefs.h"
2374 /* Override any gcc2 internal prototype to avoid an error.  */
2375 /* We use char because int might match the return type of a gcc2
2376     builtin and then its argument prototype would still apply.  */
2377 char gethostbyname();
2378
2379 int main() {
2380 gethostbyname()
2381 ; return 0; }
2382 EOF
2383 if { (eval echo configure:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2384   rm -rf conftest*
2385   eval "ac_cv_lib_$ac_lib_var=yes"
2386 else
2387   echo "configure: failed program was:" >&5
2388   cat conftest.$ac_ext >&5
2389   rm -rf conftest*
2390   eval "ac_cv_lib_$ac_lib_var=no"
2391 fi
2392 rm -f conftest*
2393 LIBS="$ac_save_LIBS"
2394
2395 fi
2396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2397   echo "$ac_t""yes" 1>&6
2398   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2399 else
2400   echo "$ac_t""no" 1>&6
2401 fi
2402
2403     fi
2404
2405     # lieder@skyler.mavd.honeywell.com says without -lsocket,
2406     # socket/setsockopt and other routines are undefined under SCO ODT
2407     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
2408     # on later versions), says simon@lia.di.epfl.ch: it contains
2409     # gethostby* variants that don't use the nameserver (or something).
2410     # -lsocket must be given before -lnsl if both are needed.
2411     # We assume that if connect needs -lnsl, so does gethostbyname.
2412     echo $ac_n "checking for connect""... $ac_c" 1>&6
2413 echo "configure:2425: checking for connect" >&5
2414 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2415   echo $ac_n "(cached) $ac_c" 1>&6
2416 else
2417   cat > conftest.$ac_ext <<EOF
2418 #line 2430 "configure"
2419 #include "confdefs.h"
2420 /* System header to define __stub macros and hopefully few prototypes,
2421     which can conflict with char connect(); below.  */
2422 #include <assert.h>
2423 /* Override any gcc2 internal prototype to avoid an error.  */
2424 /* We use char because int might match the return type of a gcc2
2425     builtin and then its argument prototype would still apply.  */
2426 char connect();
2427
2428 int main() {
2429
2430 /* The GNU C library defines this for functions which it implements
2431     to always fail with ENOSYS.  Some functions are actually named
2432     something starting with __ and the normal name is an alias.  */
2433 #if defined (__stub_connect) || defined (__stub___connect)
2434 choke me
2435 #else
2436 connect();
2437 #endif
2438
2439 ; return 0; }
2440 EOF
2441 if { (eval echo configure:2453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2442   rm -rf conftest*
2443   eval "ac_cv_func_connect=yes"
2444 else
2445   echo "configure: failed program was:" >&5
2446   cat conftest.$ac_ext >&5
2447   rm -rf conftest*
2448   eval "ac_cv_func_connect=no"
2449 fi
2450 rm -f conftest*
2451 fi
2452
2453 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2454   echo "$ac_t""yes" 1>&6
2455   :
2456 else
2457   echo "$ac_t""no" 1>&6
2458 fi
2459
2460     if test $ac_cv_func_connect = no; then
2461       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2462 echo "configure:2474: checking for connect in -lsocket" >&5
2463 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2464 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2465   echo $ac_n "(cached) $ac_c" 1>&6
2466 else
2467   ac_save_LIBS="$LIBS"
2468 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2469 cat > conftest.$ac_ext <<EOF
2470 #line 2482 "configure"
2471 #include "confdefs.h"
2472 /* Override any gcc2 internal prototype to avoid an error.  */
2473 /* We use char because int might match the return type of a gcc2
2474     builtin and then its argument prototype would still apply.  */
2475 char connect();
2476
2477 int main() {
2478 connect()
2479 ; return 0; }
2480 EOF
2481 if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2482   rm -rf conftest*
2483   eval "ac_cv_lib_$ac_lib_var=yes"
2484 else
2485   echo "configure: failed program was:" >&5
2486   cat conftest.$ac_ext >&5
2487   rm -rf conftest*
2488   eval "ac_cv_lib_$ac_lib_var=no"
2489 fi
2490 rm -f conftest*
2491 LIBS="$ac_save_LIBS"
2492
2493 fi
2494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2495   echo "$ac_t""yes" 1>&6
2496   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2497 else
2498   echo "$ac_t""no" 1>&6
2499 fi
2500
2501     fi
2502
2503     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2504     echo $ac_n "checking for remove""... $ac_c" 1>&6
2505 echo "configure:2517: checking for remove" >&5
2506 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2507   echo $ac_n "(cached) $ac_c" 1>&6
2508 else
2509   cat > conftest.$ac_ext <<EOF
2510 #line 2522 "configure"
2511 #include "confdefs.h"
2512 /* System header to define __stub macros and hopefully few prototypes,
2513     which can conflict with char remove(); below.  */
2514 #include <assert.h>
2515 /* Override any gcc2 internal prototype to avoid an error.  */
2516 /* We use char because int might match the return type of a gcc2
2517     builtin and then its argument prototype would still apply.  */
2518 char remove();
2519
2520 int main() {
2521
2522 /* The GNU C library defines this for functions which it implements
2523     to always fail with ENOSYS.  Some functions are actually named
2524     something starting with __ and the normal name is an alias.  */
2525 #if defined (__stub_remove) || defined (__stub___remove)
2526 choke me
2527 #else
2528 remove();
2529 #endif
2530
2531 ; return 0; }
2532 EOF
2533 if { (eval echo configure:2545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2534   rm -rf conftest*
2535   eval "ac_cv_func_remove=yes"
2536 else
2537   echo "configure: failed program was:" >&5
2538   cat conftest.$ac_ext >&5
2539   rm -rf conftest*
2540   eval "ac_cv_func_remove=no"
2541 fi
2542 rm -f conftest*
2543 fi
2544
2545 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2546   echo "$ac_t""yes" 1>&6
2547   :
2548 else
2549   echo "$ac_t""no" 1>&6
2550 fi
2551
2552     if test $ac_cv_func_remove = no; then
2553       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2554 echo "configure:2566: checking for remove in -lposix" >&5
2555 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2556 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2557   echo $ac_n "(cached) $ac_c" 1>&6
2558 else
2559   ac_save_LIBS="$LIBS"
2560 LIBS="-lposix  $LIBS"
2561 cat > conftest.$ac_ext <<EOF
2562 #line 2574 "configure"
2563 #include "confdefs.h"
2564 /* Override any gcc2 internal prototype to avoid an error.  */
2565 /* We use char because int might match the return type of a gcc2
2566     builtin and then its argument prototype would still apply.  */
2567 char remove();
2568
2569 int main() {
2570 remove()
2571 ; return 0; }
2572 EOF
2573 if { (eval echo configure:2585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2574   rm -rf conftest*
2575   eval "ac_cv_lib_$ac_lib_var=yes"
2576 else
2577   echo "configure: failed program was:" >&5
2578   cat conftest.$ac_ext >&5
2579   rm -rf conftest*
2580   eval "ac_cv_lib_$ac_lib_var=no"
2581 fi
2582 rm -f conftest*
2583 LIBS="$ac_save_LIBS"
2584
2585 fi
2586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2587   echo "$ac_t""yes" 1>&6
2588   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2589 else
2590   echo "$ac_t""no" 1>&6
2591 fi
2592
2593     fi
2594
2595     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2596     echo $ac_n "checking for shmat""... $ac_c" 1>&6
2597 echo "configure:2609: checking for shmat" >&5
2598 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   cat > conftest.$ac_ext <<EOF
2602 #line 2614 "configure"
2603 #include "confdefs.h"
2604 /* System header to define __stub macros and hopefully few prototypes,
2605     which can conflict with char shmat(); below.  */
2606 #include <assert.h>
2607 /* Override any gcc2 internal prototype to avoid an error.  */
2608 /* We use char because int might match the return type of a gcc2
2609     builtin and then its argument prototype would still apply.  */
2610 char shmat();
2611
2612 int main() {
2613
2614 /* The GNU C library defines this for functions which it implements
2615     to always fail with ENOSYS.  Some functions are actually named
2616     something starting with __ and the normal name is an alias.  */
2617 #if defined (__stub_shmat) || defined (__stub___shmat)
2618 choke me
2619 #else
2620 shmat();
2621 #endif
2622
2623 ; return 0; }
2624 EOF
2625 if { (eval echo configure:2637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2626   rm -rf conftest*
2627   eval "ac_cv_func_shmat=yes"
2628 else
2629   echo "configure: failed program was:" >&5
2630   cat conftest.$ac_ext >&5
2631   rm -rf conftest*
2632   eval "ac_cv_func_shmat=no"
2633 fi
2634 rm -f conftest*
2635 fi
2636
2637 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2638   echo "$ac_t""yes" 1>&6
2639   :
2640 else
2641   echo "$ac_t""no" 1>&6
2642 fi
2643
2644     if test $ac_cv_func_shmat = no; then
2645       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2646 echo "configure:2658: checking for shmat in -lipc" >&5
2647 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2648 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2649   echo $ac_n "(cached) $ac_c" 1>&6
2650 else
2651   ac_save_LIBS="$LIBS"
2652 LIBS="-lipc  $LIBS"
2653 cat > conftest.$ac_ext <<EOF
2654 #line 2666 "configure"
2655 #include "confdefs.h"
2656 /* Override any gcc2 internal prototype to avoid an error.  */
2657 /* We use char because int might match the return type of a gcc2
2658     builtin and then its argument prototype would still apply.  */
2659 char shmat();
2660
2661 int main() {
2662 shmat()
2663 ; return 0; }
2664 EOF
2665 if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2666   rm -rf conftest*
2667   eval "ac_cv_lib_$ac_lib_var=yes"
2668 else
2669   echo "configure: failed program was:" >&5
2670   cat conftest.$ac_ext >&5
2671   rm -rf conftest*
2672   eval "ac_cv_lib_$ac_lib_var=no"
2673 fi
2674 rm -f conftest*
2675 LIBS="$ac_save_LIBS"
2676
2677 fi
2678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2679   echo "$ac_t""yes" 1>&6
2680   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2681 else
2682   echo "$ac_t""no" 1>&6
2683 fi
2684
2685     fi
2686   fi
2687
2688   # Check for libraries that X11R6 Xt/Xaw programs need.
2689   ac_save_LDFLAGS="$LDFLAGS"
2690   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2691   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2692   # check for ICE first), but we must link in the order -lSM -lICE or
2693   # we get undefined symbols.  So assume we have SM if we have ICE.
2694   # These have to be linked with before -lX11, unlike the other
2695   # libraries we check for below, so use a different variable.
2696   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2697   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2698 echo "configure:2710: checking for IceConnectionNumber in -lICE" >&5
2699 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2700 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2701   echo $ac_n "(cached) $ac_c" 1>&6
2702 else
2703   ac_save_LIBS="$LIBS"
2704 LIBS="-lICE  $LIBS"
2705 cat > conftest.$ac_ext <<EOF
2706 #line 2718 "configure"
2707 #include "confdefs.h"
2708 /* Override any gcc2 internal prototype to avoid an error.  */
2709 /* We use char because int might match the return type of a gcc2
2710     builtin and then its argument prototype would still apply.  */
2711 char IceConnectionNumber();
2712
2713 int main() {
2714 IceConnectionNumber()
2715 ; return 0; }
2716 EOF
2717 if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2718   rm -rf conftest*
2719   eval "ac_cv_lib_$ac_lib_var=yes"
2720 else
2721   echo "configure: failed program was:" >&5
2722   cat conftest.$ac_ext >&5
2723   rm -rf conftest*
2724   eval "ac_cv_lib_$ac_lib_var=no"
2725 fi
2726 rm -f conftest*
2727 LIBS="$ac_save_LIBS"
2728
2729 fi
2730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2731   echo "$ac_t""yes" 1>&6
2732   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2733 else
2734   echo "$ac_t""no" 1>&6
2735 fi
2736
2737   LDFLAGS="$ac_save_LDFLAGS"
2738
2739 fi
2740
2741
2742 # Try and find the app-defaults directory.
2743 # It sucks that autoconf doesn't do this already...
2744 #
2745
2746
2747
2748
2749
2750
2751
2752
2753     echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
2754 echo "configure:2766: checking for X app-defaults directory" >&5
2755 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
2756   echo $ac_n "(cached) $ac_c" 1>&6
2757 else
2758   
2759   rm -fr conftestdir
2760   if mkdir conftestdir; then
2761     cd conftestdir >&-
2762     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2763     cat > Imakefile <<'EOF'
2764 acfindx:
2765         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
2766 EOF
2767     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2768       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
2769       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2770     fi
2771     cd .. >&-
2772     rm -fr conftestdir
2773   fi
2774       if test x"$ac_x_app_defaults" = x; then
2775         
2776   # Look for the directory under a standard set of common directories.
2777   # Check X11 before X11Rn because it's often a symlink to the current release.
2778   for ac_dir in                                 \
2779     /usr/X11/lib/app-defaults                   \
2780     /usr/X11R6/lib/app-defaults                 \
2781     /usr/X11R6/lib/X11/app-defaults             \
2782     /usr/X11R5/lib/app-defaults                 \
2783     /usr/X11R5/lib/X11/app-defaults             \
2784     /usr/X11R4/lib/app-defaults                 \
2785     /usr/X11R4/lib/X11/app-defaults             \
2786                                                 \
2787     /usr/lib/X11/app-defaults                   \
2788     /usr/lib/X11R6/app-defaults                 \
2789     /usr/lib/X11R5/app-defaults                 \
2790     /usr/lib/X11R4/app-defaults                 \
2791                                                 \
2792     /usr/local/X11/lib/app-defaults             \
2793     /usr/local/X11R6/lib/app-defaults           \
2794     /usr/local/X11R5/lib/app-defaults           \
2795     /usr/local/X11R4/lib/app-defaults           \
2796                                                 \
2797     /usr/local/lib/X11/app-defaults             \
2798     /usr/local/lib/X11R6/app-defaults           \
2799     /usr/local/lib/X11R6/X11/app-defaults       \
2800     /usr/local/lib/X11R5/app-defaults           \
2801     /usr/local/lib/X11R5/X11/app-defaults       \
2802     /usr/local/lib/X11R4/app-defaults           \
2803     /usr/local/lib/X11R4/X11/app-defaults       \
2804                                                 \
2805     /usr/X386/lib/X11/app-defaults              \
2806     /usr/x386/lib/X11/app-defaults              \
2807     /usr/XFree86/lib/X11/app-defaults           \
2808                                                 \
2809     /usr/lib/X11/app-defaults                   \
2810     /usr/local/lib/X11/app-defaults             \
2811     /usr/unsupported/lib/X11/app-defaults       \
2812     /usr/athena/lib/X11/app-defaults            \
2813     /usr/local/x11r5/lib/X11/app-defaults       \
2814     /usr/lpp/Xamples/lib/X11/app-defaults       \
2815     /lib/usr/lib/X11/app-defaults               \
2816                                                 \
2817     /usr/openwin/lib/app-defaults               \
2818     /usr/openwin/lib/X11/app-defaults           \
2819     /usr/openwin/share/lib/app-defaults         \
2820     /usr/openwin/share/lib/X11/app-defaults     \
2821                                                 \
2822     /X11R6/lib/app-defaults                     \
2823     /X11R5/lib/app-defaults                     \
2824     /X11R4/lib/app-defaults                     \
2825     ; \
2826   do
2827     if test -d "$ac_dir"; then
2828       ac_x_app_defaults=$ac_dir
2829       break
2830     fi
2831   done
2832
2833       fi
2834       if test x"$ac_x_app_defaults" = x; then
2835         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
2836       else
2837         # Record where we found app-defaults for the cache.
2838         ac_cv_x_app_defaults="$ac_x_app_defaults"
2839       fi
2840 fi
2841
2842 echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
2843     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
2844
2845 APPDEFAULTS=$ac_x_app_defaults
2846
2847
2848 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2849 #
2850
2851
2852 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2853 #
2854
2855
2856 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2857 #
2858
2859
2860
2861 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2862 # Use this sparingly; it probably doesn't work very well on X programs.
2863 #
2864
2865
2866 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2867 # (But not the -L directories!)
2868 #
2869
2870
2871
2872
2873 # Usage: HANDLE_X_PATH_ARG([variable_name],
2874 #                          [--command-line-option],
2875 #                          [descriptive string])
2876 #
2877 # All of the --with options take three forms:
2878 #
2879 #   --with-foo (or --with-foo=yes)
2880 #   --without-foo (or --with-foo=no)
2881 #   --with-foo=/DIR
2882 #
2883 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2884 # a directory (string beginning with a slash) it checks to see whether
2885 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2886 # as appropriate.
2887 #
2888
2889
2890
2891
2892 # check for the HP XHPDisableReset server extension headers.
2893 #
2894
2895   ac_save_CPPFLAGS="$CPPFLAGS"
2896   if test \! -z "$includedir" ; then 
2897     CPPFLAGS="$CPPFLAGS -I$includedir"
2898   fi
2899   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2900   cat > conftest.$ac_ext <<EOF
2901 #line 2913 "configure"
2902 #include "confdefs.h"
2903 #include <X11/XHPlib.h>
2904 EOF
2905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2906   egrep "XHPDisableReset" >/dev/null 2>&1; then
2907   rm -rf conftest*
2908   cat >> confdefs.h <<\EOF
2909 #define HAVE_XHPDISABLERESET 1
2910 EOF
2911
2912                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
2913 fi
2914 rm -f conftest*
2915
2916   CPPFLAGS="$ac_save_CPPFLAGS"
2917
2918
2919 # Check for the availability of the XPointer typedef, and define it otherwise.
2920 #
2921 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
2922 echo "configure:2934: checking for XPointer" >&5
2923 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
2924   echo $ac_n "(cached) $ac_c" 1>&6
2925 else
2926   
2927   ac_save_CPPFLAGS="$CPPFLAGS"
2928   if test \! -z "$includedir" ; then 
2929     CPPFLAGS="$CPPFLAGS -I$includedir"
2930   fi
2931   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2932   cat > conftest.$ac_ext <<EOF
2933 #line 2945 "configure"
2934 #include "confdefs.h"
2935 #include <X11/Xlib.h>
2936 int main() {
2937 XPointer foo = (XPointer) 0;
2938 ; return 0; }
2939 EOF
2940 if { (eval echo configure:2952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2941   rm -rf conftest*
2942   ac_cv_xpointer=yes
2943 else
2944   echo "configure: failed program was:" >&5
2945   cat conftest.$ac_ext >&5
2946   rm -rf conftest*
2947   ac_cv_xpointer=no
2948 fi
2949 rm -f conftest*
2950   CPPFLAGS="$ac_save_CPPFLAGS"
2951 fi
2952
2953 echo "$ac_t""$ac_cv_xpointer" 1>&6
2954 if test $ac_cv_xpointer != yes; then
2955   cat >> confdefs.h <<\EOF
2956 #define XPointer char*
2957 EOF
2958
2959 fi
2960
2961
2962 # Random special-cases for certain pathological OSes.  You know who you are.
2963 #
2964 case "$host" in
2965   *-hpux*)
2966
2967     # The following arcana was gleaned from conversations with
2968     # Eric Schwartz <erics@col.hp.com>:
2969     #
2970     # On HPUX 10.x, the parts of X that HP considers "standard" live in
2971     # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
2972     # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
2973     # Also, there are symlinks from /usr/include/ and /usr/lib/ into
2974     # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
2975     # you don't need any -I or -L arguments.
2976     #
2977     # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
2978     # are the same division as 10.x.  However, there are no symlinks to
2979     # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
2980     # arguments are always necessary.
2981     #
2982     # However, X11R6 was available on HPUX 9.x as a patch: if that
2983     # patch was installed, then all of X11R6 went in to
2984     # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
2985     #
2986     # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
2987     # whether R5 was available as a patch; R6 undoubtedly was not.)
2988     #
2989     # So.  We try and use the highest numbered pair of
2990     # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
2991     # that are available.  We do not mix and match different versions
2992     # of X.
2993     #
2994     # Questions I still don't know the answers to: (do you?)
2995     #
2996     #   * Does HPUX 10.x come with /usr/contrib/X11R6/ standard?  
2997     #     Or does that need to be installed separately?
2998     #
2999     #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
3000     #     /usr/contrib/X11R6/ could be installed as a patch, what was in
3001     #     that contrib directory?  Did it contain so-called "standard"
3002     #     X11R6, or did it include Xaw and Xmu as well?  If the former,
3003     #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
3004     #     be a situation where one had to reach into the R5 headers and
3005     #     libs to find Xmu?  That is, must both R6 and R5 directories
3006     #     be on the -I and -L lists in that case?
3007     #
3008     for version in X11R6 X11R5 X11R4 ; do
3009       # if either pair of directories exists...
3010       if test -d /usr/lib/$version || test -d /usr/contrib/$version/lib ; then
3011          # if contrib exists, use it...
3012          if test -d /usr/contrib/$version/lib ; then
3013            X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
3014            X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
3015          fi
3016          # if the "standard" one exists, use it.
3017          if test -d /usr/lib/$version ; then
3018            X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
3019            X_LIBS="$X_LIBS -L/usr/lib/$version"
3020          fi
3021          # since at least one of the pair exists, go no farther.
3022          break
3023       fi
3024     done
3025
3026     # Now find Motif.  Thanks for not making xmkmf find this by
3027     # default, you losers.
3028     #
3029     if test -d /usr/lib/Motif1.2 ; then
3030       X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
3031       X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
3032     elif test -d /usr/lib/Motif1.1 ; then
3033       X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
3034       X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
3035     fi
3036
3037     # Now let's check for the pseudo-standard locations for OpenGL and XPM.
3038     #
3039     if test -d /opt/Mesa/lib ; then
3040       X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
3041       X_LIBS="-L/opt/Mesa/lib $X_LIBS"
3042     fi
3043
3044     if test -d /opt/xpm/lib/X11 ; then
3045       X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
3046       X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
3047     fi
3048
3049     # On HPUX, default to installing in /opt/xscreensaver/ instead of
3050     # in /usr/local/, unless there is already an xscreensaver in
3051     # /usr/local/bin/.  This can be overridden with the --prefix arg
3052     # to configure.  I'm not sure this is the right thing to do, but
3053     # Richard Lloyd says so...
3054     #
3055     if test \! -x /usr/local/bin/xscreensaver ; then
3056       ac_default_prefix=/opt/xscreensaver
3057     fi
3058
3059   ;;
3060   *-solaris*)
3061
3062     # Thanks for not making xmkmf find this by default, pinheads.
3063     # And thanks for moving things around again, too.  Is this
3064     # really the standard location now?  What happened to the
3065     # joke that this kind of thing went in /opt?
3066     # cthomp says "answer: CDE (Common Disorganized Environment)"
3067     #
3068     if test -f /usr/dt/include/Xm/Xm.h ; then
3069       X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
3070       X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
3071
3072       # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
3073       echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
3074 echo "configure:3086: checking for regcmp in -lgen" >&5
3075 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
3076 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3077   echo $ac_n "(cached) $ac_c" 1>&6
3078 else
3079   ac_save_LIBS="$LIBS"
3080 LIBS="-lgen  $LIBS"
3081 cat > conftest.$ac_ext <<EOF
3082 #line 3094 "configure"
3083 #include "confdefs.h"
3084 /* Override any gcc2 internal prototype to avoid an error.  */
3085 /* We use char because int might match the return type of a gcc2
3086     builtin and then its argument prototype would still apply.  */
3087 char regcmp();
3088
3089 int main() {
3090 regcmp()
3091 ; return 0; }
3092 EOF
3093 if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3094   rm -rf conftest*
3095   eval "ac_cv_lib_$ac_lib_var=yes"
3096 else
3097   echo "configure: failed program was:" >&5
3098   cat conftest.$ac_ext >&5
3099   rm -rf conftest*
3100   eval "ac_cv_lib_$ac_lib_var=no"
3101 fi
3102 rm -f conftest*
3103 LIBS="$ac_save_LIBS"
3104
3105 fi
3106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3107   echo "$ac_t""yes" 1>&6
3108   X_LIBS="$X_LIBS -lgen"
3109 else
3110   echo "$ac_t""no" 1>&6
3111 fi
3112
3113     fi
3114   ;;
3115 esac
3116
3117
3118
3119 # Check for Xmu (some fucked up vendors don't ship it...)
3120 #
3121 have_xmu=no
3122
3123   ac_save_CPPFLAGS="$CPPFLAGS"
3124   if test \! -z "$includedir" ; then 
3125     CPPFLAGS="$CPPFLAGS -I$includedir"
3126   fi
3127   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3128   ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
3129 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
3130 echo "configure:3142: checking for X11/Xmu/Error.h" >&5
3131 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3132   echo $ac_n "(cached) $ac_c" 1>&6
3133 else
3134   cat > conftest.$ac_ext <<EOF
3135 #line 3147 "configure"
3136 #include "confdefs.h"
3137 #include <X11/Xmu/Error.h>
3138 EOF
3139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3140 { (eval echo configure:3152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3141 ac_err=`grep -v '^ *+' conftest.out`
3142 if test -z "$ac_err"; then
3143   rm -rf conftest*
3144   eval "ac_cv_header_$ac_safe=yes"
3145 else
3146   echo "$ac_err" >&5
3147   echo "configure: failed program was:" >&5
3148   cat conftest.$ac_ext >&5
3149   rm -rf conftest*
3150   eval "ac_cv_header_$ac_safe=no"
3151 fi
3152 rm -f conftest*
3153 fi
3154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3155   echo "$ac_t""yes" 1>&6
3156   have_xmu=yes
3157 else
3158   echo "$ac_t""no" 1>&6
3159 fi
3160
3161   CPPFLAGS="$ac_save_CPPFLAGS"
3162 if test $have_xmu = no ; then
3163   XMU_SRCS='$(UTILS_SRC)/xmu.c'
3164   XMU_OBJS='$(UTILS_BIN)/xmu.o'
3165 else
3166   XMU_SRCS=''
3167   XMU_OBJS=''
3168   SAVER_LIBS="-lXmu $SAVER_LIBS"
3169   HACK_LIBS="-lXmu $HACK_LIBS"
3170   cat >> confdefs.h <<\EOF
3171 #define HAVE_XMU 1
3172 EOF
3173
3174 fi
3175
3176
3177 # See comp.windows.x FAQ question 124 about _get_wmShellWidgetClass on 4.1.x.
3178 # The right fix is to get OpenWindows 3.0 patches 100512-02 and 100573-03.
3179 #
3180 if test $have_xmu = yes ; then
3181   case "$host" in
3182     *-sunos4*)
3183     echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
3184 echo "configure:3196: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
3185 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
3186   echo $ac_n "(cached) $ac_c" 1>&6
3187 else
3188   ac_save_LDFLAGS="$LDFLAGS"
3189                     if test \! -z "$x_libraries" ; then
3190                       LDFLAGS="$LDFLAGS -L$x_libraries"
3191                     fi
3192                     # Note: this trick never works!  (Generally.)
3193                     # We're only getting away with using AC_TRY_LINK
3194                     # with X libraries because we know it's SunOS.
3195                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
3196                     cat > conftest.$ac_ext <<EOF
3197 #line 3209 "configure"
3198 #include "confdefs.h"
3199
3200 int main() {
3201
3202 ; return 0; }
3203 EOF
3204 if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3205   rm -rf conftest*
3206   ac_cv_sunos_xmu_bug=no
3207 else
3208   echo "configure: failed program was:" >&5
3209   cat conftest.$ac_ext >&5
3210   rm -rf conftest*
3211   ac_cv_sunos_xmu_bug=yes
3212 fi
3213 rm -f conftest*
3214                     LDFLAGS="$ac_save_LDFLAGS"
3215 fi
3216
3217 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
3218     if test $ac_cv_sunos_xmu_bug = yes ; then
3219       echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
3220 echo "configure:3232: checking whether the compiler understands -static" >&5
3221 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
3222   echo $ac_n "(cached) $ac_c" 1>&6
3223 else
3224   ac_save_LDFLAGS="$LDFLAGS"
3225                       LDFLAGS="$LDFLAGS -static"
3226                       cat > conftest.$ac_ext <<EOF
3227 #line 3239 "configure"
3228 #include "confdefs.h"
3229
3230 int main() {
3231
3232 ; return 0; }
3233 EOF
3234 if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3235   rm -rf conftest*
3236   ac_cv_ld_static=yes
3237 else
3238   echo "configure: failed program was:" >&5
3239   cat conftest.$ac_ext >&5
3240   rm -rf conftest*
3241   ac_cv_ld_static=no
3242 fi
3243 rm -f conftest*
3244                     LDFLAGS="$ac_save_LDFLAGS"
3245 fi
3246
3247 echo "$ac_t""$ac_cv_ld_static" 1>&6
3248       if test $ac_cv_ld_static = yes ; then
3249         LDFLAGS="$LDFLAGS -static"
3250       else
3251         LDFLAGS="$LDFLAGS -Bstatic"
3252       fi
3253     fi
3254     ;;
3255   esac
3256 fi
3257
3258
3259 # Check for the SGI SCREEN_SAVER server extension header.
3260 #
3261 have_sgi=no
3262 with_sgi_req=unspecified
3263 # Check whether --with-sgi-ext or --without-sgi-ext was given.
3264 if test "${with_sgi_ext+set}" = set; then
3265   withval="$with_sgi_ext"
3266   with_sgi="$withval"; with_sgi_req="$withval"
3267 else
3268   with_sgi=yes
3269 fi
3270
3271
3272
3273    case "$with_sgi" in
3274     yes) ;;
3275     no)  ;;
3276
3277     /*)
3278      echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
3279 echo "configure:3291: checking for SGI SCREEN_SAVER headers" >&5
3280      d=$with_sgi/include
3281      if test -d $d; then
3282        X_CFLAGS="-I$d $X_CFLAGS"
3283        echo "$ac_t""$d" 1>&6
3284      else
3285        echo "$ac_t""not found ($d: no such directory)" 1>&6
3286      fi
3287
3288      echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
3289 echo "configure:3301: checking for SGI SCREEN_SAVER libs" >&5
3290      d=$with_sgi/lib
3291      if test -d $d; then
3292        X_LIBS="-L$d $X_LIBS"
3293        echo "$ac_t""$d" 1>&6
3294      else
3295        echo "$ac_t""not found ($d: no such directory)" 1>&6
3296      fi
3297
3298      # replace the directory string with "yes".
3299      with_sgi_req="yes"
3300      with_sgi=$with_sgi_req
3301      ;;
3302
3303     *)
3304      echo ""
3305      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
3306      echo "       If it is a directory, then \`DIR/include' will be added to"
3307      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
3308      exit 1
3309      ;;
3310    esac
3311
3312    # why is this necessary?
3313    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3314    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3315    withval=
3316   
3317
3318 if test $with_sgi = yes; then
3319   
3320   ac_save_CPPFLAGS="$CPPFLAGS"
3321   if test \! -z "$includedir" ; then 
3322     CPPFLAGS="$CPPFLAGS -I$includedir"
3323   fi
3324   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3325   ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
3326 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
3327 echo "configure:3339: checking for X11/extensions/XScreenSaver.h" >&5
3328 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3329   echo $ac_n "(cached) $ac_c" 1>&6
3330 else
3331   cat > conftest.$ac_ext <<EOF
3332 #line 3344 "configure"
3333 #include "confdefs.h"
3334 #include <X11/extensions/XScreenSaver.h>
3335 EOF
3336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3337 { (eval echo configure:3349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3338 ac_err=`grep -v '^ *+' conftest.out`
3339 if test -z "$ac_err"; then
3340   rm -rf conftest*
3341   eval "ac_cv_header_$ac_safe=yes"
3342 else
3343   echo "$ac_err" >&5
3344   echo "configure: failed program was:" >&5
3345   cat conftest.$ac_ext >&5
3346   rm -rf conftest*
3347   eval "ac_cv_header_$ac_safe=no"
3348 fi
3349 rm -f conftest*
3350 fi
3351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3352   echo "$ac_t""yes" 1>&6
3353   have_sgi=yes
3354                      cat >> confdefs.h <<\EOF
3355 #define HAVE_SGI_SAVER_EXTENSION 1
3356 EOF
3357
3358 else
3359   echo "$ac_t""no" 1>&6
3360 fi
3361
3362   CPPFLAGS="$ac_save_CPPFLAGS"
3363
3364 elif test $with_sgi != no; then
3365   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
3366   exit 1
3367 fi
3368
3369 # Check for the MIT-SCREEN-SAVER server extension header,
3370 # unless the SGI extension has already been found.
3371 #
3372 have_mit=no
3373 with_mit_req=unspecified
3374 # Check whether --with-mit-ext or --without-mit-ext was given.
3375 if test "${with_mit_ext+set}" = set; then
3376   withval="$with_mit_ext"
3377   with_mit="$withval"; with_mit_req="$withval"
3378 else
3379   with_mit=yes
3380 fi
3381
3382
3383
3384    case "$with_mit" in
3385     yes) ;;
3386     no)  ;;
3387
3388     /*)
3389      echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
3390 echo "configure:3402: checking for MIT-SCREEN-SAVER headers" >&5
3391      d=$with_mit/include
3392      if test -d $d; then
3393        X_CFLAGS="-I$d $X_CFLAGS"
3394        echo "$ac_t""$d" 1>&6
3395      else
3396        echo "$ac_t""not found ($d: no such directory)" 1>&6
3397      fi
3398
3399      echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
3400 echo "configure:3412: checking for MIT-SCREEN-SAVER libs" >&5
3401      d=$with_mit/lib
3402      if test -d $d; then
3403        X_LIBS="-L$d $X_LIBS"
3404        echo "$ac_t""$d" 1>&6
3405      else
3406        echo "$ac_t""not found ($d: no such directory)" 1>&6
3407      fi
3408
3409      # replace the directory string with "yes".
3410      with_mit_req="yes"
3411      with_mit=$with_mit_req
3412      ;;
3413
3414     *)
3415      echo ""
3416      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
3417      echo "       If it is a directory, then \`DIR/include' will be added to"
3418      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
3419      exit 1
3420      ;;
3421    esac
3422
3423    # why is this necessary?
3424    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3425    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3426    withval=
3427   
3428
3429 if test $have_sgi != yes; then
3430   if test $with_mit = yes; then
3431     
3432   ac_save_CPPFLAGS="$CPPFLAGS"
3433   if test \! -z "$includedir" ; then 
3434     CPPFLAGS="$CPPFLAGS -I$includedir"
3435   fi
3436   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3437   ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
3438 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
3439 echo "configure:3451: checking for X11/extensions/scrnsaver.h" >&5
3440 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3441   echo $ac_n "(cached) $ac_c" 1>&6
3442 else
3443   cat > conftest.$ac_ext <<EOF
3444 #line 3456 "configure"
3445 #include "confdefs.h"
3446 #include <X11/extensions/scrnsaver.h>
3447 EOF
3448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3449 { (eval echo configure:3461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3450 ac_err=`grep -v '^ *+' conftest.out`
3451 if test -z "$ac_err"; then
3452   rm -rf conftest*
3453   eval "ac_cv_header_$ac_safe=yes"
3454 else
3455   echo "$ac_err" >&5
3456   echo "configure: failed program was:" >&5
3457   cat conftest.$ac_ext >&5
3458   rm -rf conftest*
3459   eval "ac_cv_header_$ac_safe=no"
3460 fi
3461 rm -f conftest*
3462 fi
3463 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3464   echo "$ac_t""yes" 1>&6
3465   have_mit=yes
3466 else
3467   echo "$ac_t""no" 1>&6
3468 fi
3469
3470   CPPFLAGS="$ac_save_CPPFLAGS"
3471
3472     # Now check to see if it's really in the library; XF86Free-3.3 ships
3473     # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
3474     #
3475     if test $have_mit = yes; then
3476       
3477   ac_save_CPPFLAGS="$CPPFLAGS"
3478   ac_save_LDFLAGS="$LDFLAGS"
3479   if test \! -z "$includedir" ; then 
3480     CPPFLAGS="$CPPFLAGS -I$includedir"
3481   fi
3482   if test \! -z "$includedir" ; then 
3483     CPPFLAGS="$CPPFLAGS -I$includedir"
3484   fi
3485   if test \! -z "$libdir" ; then
3486     LDFLAGS="$LDFLAGS -L$libdir"
3487   fi
3488   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3489   if test \! -z "$x_libraries" ; then
3490     LDFLAGS="$LDFLAGS -L$x_libraries"
3491   fi
3492   echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
3493 echo "configure:3505: checking for XScreenSaverRegister in -lXext" >&5
3494 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3496   echo $ac_n "(cached) $ac_c" 1>&6
3497 else
3498   ac_save_LIBS="$LIBS"
3499 LIBS="-lXext -lm $LIBS"
3500 cat > conftest.$ac_ext <<EOF
3501 #line 3513 "configure"
3502 #include "confdefs.h"
3503 /* Override any gcc2 internal prototype to avoid an error.  */
3504 /* We use char because int might match the return type of a gcc2
3505     builtin and then its argument prototype would still apply.  */
3506 char XScreenSaverRegister();
3507
3508 int main() {
3509 XScreenSaverRegister()
3510 ; return 0; }
3511 EOF
3512 if { (eval echo configure:3524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3513   rm -rf conftest*
3514   eval "ac_cv_lib_$ac_lib_var=yes"
3515 else
3516   echo "configure: failed program was:" >&5
3517   cat conftest.$ac_ext >&5
3518   rm -rf conftest*
3519   eval "ac_cv_lib_$ac_lib_var=no"
3520 fi
3521 rm -f conftest*
3522 LIBS="$ac_save_LIBS"
3523
3524 fi
3525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3526   echo "$ac_t""yes" 1>&6
3527     ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3528     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3529   cat >> confdefs.h <<EOF
3530 #define $ac_tr_lib 1
3531 EOF
3532
3533   LIBS="-lXext $LIBS"
3534
3535 else
3536   echo "$ac_t""no" 1>&6
3537 have_mit=no
3538 fi
3539
3540   CPPFLAGS="$ac_save_CPPFLAGS"
3541   LDFLAGS="$ac_save_LDFLAGS"
3542
3543       if test $have_mit = no; then
3544         # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
3545         # of in Xext.  Thank you master, may I have another.
3546         
3547   ac_save_CPPFLAGS="$CPPFLAGS"
3548   ac_save_LDFLAGS="$LDFLAGS"
3549   if test \! -z "$includedir" ; then 
3550     CPPFLAGS="$CPPFLAGS -I$includedir"
3551   fi
3552   if test \! -z "$includedir" ; then 
3553     CPPFLAGS="$CPPFLAGS -I$includedir"
3554   fi
3555   if test \! -z "$libdir" ; then
3556     LDFLAGS="$LDFLAGS -L$libdir"
3557   fi
3558   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3559   if test \! -z "$x_libraries" ; then
3560     LDFLAGS="$LDFLAGS -L$x_libraries"
3561   fi
3562   echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
3563 echo "configure:3575: checking for XScreenSaverRegister in -lXExExt" >&5
3564 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3565 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3566   echo $ac_n "(cached) $ac_c" 1>&6
3567 else
3568   ac_save_LIBS="$LIBS"
3569 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
3570 cat > conftest.$ac_ext <<EOF
3571 #line 3583 "configure"
3572 #include "confdefs.h"
3573 /* Override any gcc2 internal prototype to avoid an error.  */
3574 /* We use char because int might match the return type of a gcc2
3575     builtin and then its argument prototype would still apply.  */
3576 char XScreenSaverRegister();
3577
3578 int main() {
3579 XScreenSaverRegister()
3580 ; return 0; }
3581 EOF
3582 if { (eval echo configure:3594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3583   rm -rf conftest*
3584   eval "ac_cv_lib_$ac_lib_var=yes"
3585 else
3586   echo "configure: failed program was:" >&5
3587   cat conftest.$ac_ext >&5
3588   rm -rf conftest*
3589   eval "ac_cv_lib_$ac_lib_var=no"
3590 fi
3591 rm -f conftest*
3592 LIBS="$ac_save_LIBS"
3593
3594 fi
3595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3596   echo "$ac_t""yes" 1>&6
3597   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
3598 else
3599   echo "$ac_t""no" 1>&6
3600 fi
3601
3602   CPPFLAGS="$ac_save_CPPFLAGS"
3603   LDFLAGS="$ac_save_LDFLAGS"
3604       fi
3605
3606       if test $have_mit = no; then
3607         # Double fuck!  Looks like some versions of XFree86 (whichever version
3608         # it is that comes with RedHat Linux 2.0 -- I can't find a version 
3609         # number) put this garbage in Xss instead of Xext.  Thank you master,
3610         #  may I have another.
3611         
3612   ac_save_CPPFLAGS="$CPPFLAGS"
3613   ac_save_LDFLAGS="$LDFLAGS"
3614   if test \! -z "$includedir" ; then 
3615     CPPFLAGS="$CPPFLAGS -I$includedir"
3616   fi
3617   if test \! -z "$includedir" ; then 
3618     CPPFLAGS="$CPPFLAGS -I$includedir"
3619   fi
3620   if test \! -z "$libdir" ; then
3621     LDFLAGS="$LDFLAGS -L$libdir"
3622   fi
3623   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3624   if test \! -z "$x_libraries" ; then
3625     LDFLAGS="$LDFLAGS -L$x_libraries"
3626   fi
3627   echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
3628 echo "configure:3640: checking for XScreenSaverRegister in -lXss" >&5
3629 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
3630 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   ac_save_LIBS="$LIBS"
3634 LIBS="-lXss -lX11 -lXext -lm $LIBS"
3635 cat > conftest.$ac_ext <<EOF
3636 #line 3648 "configure"
3637 #include "confdefs.h"
3638 /* Override any gcc2 internal prototype to avoid an error.  */
3639 /* We use char because int might match the return type of a gcc2
3640     builtin and then its argument prototype would still apply.  */
3641 char XScreenSaverRegister();
3642
3643 int main() {
3644 XScreenSaverRegister()
3645 ; return 0; }
3646 EOF
3647 if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3648   rm -rf conftest*
3649   eval "ac_cv_lib_$ac_lib_var=yes"
3650 else
3651   echo "configure: failed program was:" >&5
3652   cat conftest.$ac_ext >&5
3653   rm -rf conftest*
3654   eval "ac_cv_lib_$ac_lib_var=no"
3655 fi
3656 rm -f conftest*
3657 LIBS="$ac_save_LIBS"
3658
3659 fi
3660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3661   echo "$ac_t""yes" 1>&6
3662   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
3663 else
3664   echo "$ac_t""no" 1>&6
3665 fi
3666
3667   CPPFLAGS="$ac_save_CPPFLAGS"
3668   LDFLAGS="$ac_save_LDFLAGS"
3669       fi
3670
3671     if test $have_mit = yes; then
3672       cat >> confdefs.h <<\EOF
3673 #define HAVE_MIT_SAVER_EXTENSION 1
3674 EOF
3675
3676     fi
3677
3678     fi
3679
3680   elif test $with_mit != no; then
3681     echo "error: must be yes or no: --with-mit-ext=$with_mit"
3682     exit 1
3683   fi
3684 fi
3685
3686
3687 # Check for the XIDLE server extension header.
3688 #
3689 have_xidle=no
3690 with_xidle_req=unspecified
3691 # Check whether --with-xidle-ext or --without-xidle-ext was given.
3692 if test "${with_xidle_ext+set}" = set; then
3693   withval="$with_xidle_ext"
3694   with_xidle="$withval"; with_xidle_req="$withval"
3695 else
3696   with_xidle=yes
3697 fi
3698
3699
3700
3701    case "$with_xidle" in
3702     yes) ;;
3703     no)  ;;
3704
3705     /*)
3706      echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
3707 echo "configure:3719: checking for XIDLE headers" >&5
3708      d=$with_xidle/include
3709      if test -d $d; then
3710        X_CFLAGS="-I$d $X_CFLAGS"
3711        echo "$ac_t""$d" 1>&6
3712      else
3713        echo "$ac_t""not found ($d: no such directory)" 1>&6
3714      fi
3715
3716      echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
3717 echo "configure:3729: checking for XIDLE libs" >&5
3718      d=$with_xidle/lib
3719      if test -d $d; then
3720        X_LIBS="-L$d $X_LIBS"
3721        echo "$ac_t""$d" 1>&6
3722      else
3723        echo "$ac_t""not found ($d: no such directory)" 1>&6
3724      fi
3725
3726      # replace the directory string with "yes".
3727      with_xidle_req="yes"
3728      with_xidle=$with_xidle_req
3729      ;;
3730
3731     *)
3732      echo ""
3733      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
3734      echo "       If it is a directory, then \`DIR/include' will be added to"
3735      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
3736      exit 1
3737      ;;
3738    esac
3739
3740    # why is this necessary?
3741    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3742    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3743    withval=
3744   
3745
3746 if test $with_xidle = yes; then
3747   
3748   ac_save_CPPFLAGS="$CPPFLAGS"
3749   if test \! -z "$includedir" ; then 
3750     CPPFLAGS="$CPPFLAGS -I$includedir"
3751   fi
3752   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3753   ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
3754 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
3755 echo "configure:3767: checking for X11/extensions/xidle.h" >&5
3756 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3757   echo $ac_n "(cached) $ac_c" 1>&6
3758 else
3759   cat > conftest.$ac_ext <<EOF
3760 #line 3772 "configure"
3761 #include "confdefs.h"
3762 #include <X11/extensions/xidle.h>
3763 EOF
3764 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3765 { (eval echo configure:3777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3766 ac_err=`grep -v '^ *+' conftest.out`
3767 if test -z "$ac_err"; then
3768   rm -rf conftest*
3769   eval "ac_cv_header_$ac_safe=yes"
3770 else
3771   echo "$ac_err" >&5
3772   echo "configure: failed program was:" >&5
3773   cat conftest.$ac_ext >&5
3774   rm -rf conftest*
3775   eval "ac_cv_header_$ac_safe=no"
3776 fi
3777 rm -f conftest*
3778 fi
3779 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3780   echo "$ac_t""yes" 1>&6
3781   have_xidle=yes
3782                      cat >> confdefs.h <<\EOF
3783 #define HAVE_XIDLE_EXTENSION 1
3784 EOF
3785
3786 else
3787   echo "$ac_t""no" 1>&6
3788 fi
3789
3790   CPPFLAGS="$ac_save_CPPFLAGS"
3791 elif test $with_xidle != no; then
3792   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
3793   exit 1
3794 fi
3795
3796
3797 # Check for the XSHM server extension header.
3798 #
3799 have_xshm=no
3800 with_xshm_req=unspecified
3801 # Check whether --with-xshm-ext or --without-xshm-ext was given.
3802 if test "${with_xshm_ext+set}" = set; then
3803   withval="$with_xshm_ext"
3804   with_xshm="$withval"; with_xshm_req="$withval"
3805 else
3806   with_xshm=yes
3807 fi
3808
3809
3810
3811    case "$with_xshm" in
3812     yes) ;;
3813     no)  ;;
3814
3815     /*)
3816      echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
3817 echo "configure:3829: checking for XSHM headers" >&5
3818      d=$with_xshm/include
3819      if test -d $d; then
3820        X_CFLAGS="-I$d $X_CFLAGS"
3821        echo "$ac_t""$d" 1>&6
3822      else
3823        echo "$ac_t""not found ($d: no such directory)" 1>&6
3824      fi
3825
3826      echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
3827 echo "configure:3839: checking for XSHM libs" >&5
3828      d=$with_xshm/lib
3829      if test -d $d; then
3830        X_LIBS="-L$d $X_LIBS"
3831        echo "$ac_t""$d" 1>&6
3832      else
3833        echo "$ac_t""not found ($d: no such directory)" 1>&6
3834      fi
3835
3836      # replace the directory string with "yes".
3837      with_xshm_req="yes"
3838      with_xshm=$with_xshm_req
3839      ;;
3840
3841     *)
3842      echo ""
3843      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
3844      echo "       If it is a directory, then \`DIR/include' will be added to"
3845      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
3846      exit 1
3847      ;;
3848    esac
3849
3850    # why is this necessary?
3851    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
3852    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
3853    withval=
3854   
3855
3856 if test $with_xshm = yes; then
3857
3858   # first check for Xshm.h.
3859   
3860   ac_save_CPPFLAGS="$CPPFLAGS"
3861   if test \! -z "$includedir" ; then 
3862     CPPFLAGS="$CPPFLAGS -I$includedir"
3863   fi
3864   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3865   ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
3866 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
3867 echo "configure:3879: checking for X11/extensions/XShm.h" >&5
3868 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3869   echo $ac_n "(cached) $ac_c" 1>&6
3870 else
3871   cat > conftest.$ac_ext <<EOF
3872 #line 3884 "configure"
3873 #include "confdefs.h"
3874 #include <X11/extensions/XShm.h>
3875 EOF
3876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3877 { (eval echo configure:3889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3878 ac_err=`grep -v '^ *+' conftest.out`
3879 if test -z "$ac_err"; then
3880   rm -rf conftest*
3881   eval "ac_cv_header_$ac_safe=yes"
3882 else
3883   echo "$ac_err" >&5
3884   echo "configure: failed program was:" >&5
3885   cat conftest.$ac_ext >&5
3886   rm -rf conftest*
3887   eval "ac_cv_header_$ac_safe=no"
3888 fi
3889 rm -f conftest*
3890 fi
3891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3892   echo "$ac_t""yes" 1>&6
3893   have_xshm=yes
3894 else
3895   echo "$ac_t""no" 1>&6
3896 fi
3897
3898   CPPFLAGS="$ac_save_CPPFLAGS"
3899
3900   # if that succeeded, then check for sys/ipc.h.
3901   if test $have_xshm = yes; then
3902     have_xshm=no
3903     
3904   ac_save_CPPFLAGS="$CPPFLAGS"
3905   if test \! -z "$includedir" ; then 
3906     CPPFLAGS="$CPPFLAGS -I$includedir"
3907   fi
3908   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3909   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
3910 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
3911 echo "configure:3923: checking for sys/ipc.h" >&5
3912 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3913   echo $ac_n "(cached) $ac_c" 1>&6
3914 else
3915   cat > conftest.$ac_ext <<EOF
3916 #line 3928 "configure"
3917 #include "confdefs.h"
3918 #include <sys/ipc.h>
3919 EOF
3920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3921 { (eval echo configure:3933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3922 ac_err=`grep -v '^ *+' conftest.out`
3923 if test -z "$ac_err"; then
3924   rm -rf conftest*
3925   eval "ac_cv_header_$ac_safe=yes"
3926 else
3927   echo "$ac_err" >&5
3928   echo "configure: failed program was:" >&5
3929   cat conftest.$ac_ext >&5
3930   rm -rf conftest*
3931   eval "ac_cv_header_$ac_safe=no"
3932 fi
3933 rm -f conftest*
3934 fi
3935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3936   echo "$ac_t""yes" 1>&6
3937   have_xshm=yes
3938 else
3939   echo "$ac_t""no" 1>&6
3940 fi
3941
3942   CPPFLAGS="$ac_save_CPPFLAGS"
3943   fi
3944
3945   # if that succeeded, then check for sys/shm.h.
3946   if test $have_xshm = yes; then
3947     have_xshm=no
3948     
3949   ac_save_CPPFLAGS="$CPPFLAGS"
3950   if test \! -z "$includedir" ; then 
3951     CPPFLAGS="$CPPFLAGS -I$includedir"
3952   fi
3953   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3954   ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
3955 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
3956 echo "configure:3968: checking for sys/shm.h" >&5
3957 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3958   echo $ac_n "(cached) $ac_c" 1>&6
3959 else
3960   cat > conftest.$ac_ext <<EOF
3961 #line 3973 "configure"
3962 #include "confdefs.h"
3963 #include <sys/shm.h>
3964 EOF
3965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3966 { (eval echo configure:3978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3967 ac_err=`grep -v '^ *+' conftest.out`
3968 if test -z "$ac_err"; then
3969   rm -rf conftest*
3970   eval "ac_cv_header_$ac_safe=yes"
3971 else
3972   echo "$ac_err" >&5
3973   echo "configure: failed program was:" >&5
3974   cat conftest.$ac_ext >&5
3975   rm -rf conftest*
3976   eval "ac_cv_header_$ac_safe=no"
3977 fi
3978 rm -f conftest*
3979 fi
3980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3981   echo "$ac_t""yes" 1>&6
3982   have_xshm=yes
3983 else
3984   echo "$ac_t""no" 1>&6
3985 fi
3986
3987   CPPFLAGS="$ac_save_CPPFLAGS"
3988   fi
3989
3990   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
3991   # to exist, but the library code to not exist.  And even better, the library
3992   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
3993   # lib doesn't exist, give up.
3994   #
3995   case "$host" in
3996     *-aix*)
3997       have_xshm=no
3998       
3999   ac_save_CPPFLAGS="$CPPFLAGS"
4000   ac_save_LDFLAGS="$LDFLAGS"
4001   if test \! -z "$includedir" ; then 
4002     CPPFLAGS="$CPPFLAGS -I$includedir"
4003   fi
4004   if test \! -z "$includedir" ; then 
4005     CPPFLAGS="$CPPFLAGS -I$includedir"
4006   fi
4007   if test \! -z "$libdir" ; then
4008     LDFLAGS="$LDFLAGS -L$libdir"
4009   fi
4010   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4011   if test \! -z "$x_libraries" ; then
4012     LDFLAGS="$LDFLAGS -L$x_libraries"
4013   fi
4014   echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
4015 echo "configure:4027: checking for XShmQueryExtension in -lXextSam" >&5
4016 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
4017 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4018   echo $ac_n "(cached) $ac_c" 1>&6
4019 else
4020   ac_save_LIBS="$LIBS"
4021 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
4022 cat > conftest.$ac_ext <<EOF
4023 #line 4035 "configure"
4024 #include "confdefs.h"
4025 /* Override any gcc2 internal prototype to avoid an error.  */
4026 /* We use char because int might match the return type of a gcc2
4027     builtin and then its argument prototype would still apply.  */
4028 char XShmQueryExtension();
4029
4030 int main() {
4031 XShmQueryExtension()
4032 ; return 0; }
4033 EOF
4034 if { (eval echo configure:4046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4035   rm -rf conftest*
4036   eval "ac_cv_lib_$ac_lib_var=yes"
4037 else
4038   echo "configure: failed program was:" >&5
4039   cat conftest.$ac_ext >&5
4040   rm -rf conftest*
4041   eval "ac_cv_lib_$ac_lib_var=no"
4042 fi
4043 rm -f conftest*
4044 LIBS="$ac_save_LIBS"
4045
4046 fi
4047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4048   echo "$ac_t""yes" 1>&6
4049   have_xshm=yes; SAVER_LIBS="$SAVER_LIBS -lXextSam"
4050 else
4051   echo "$ac_t""no" 1>&6
4052 fi
4053
4054   CPPFLAGS="$ac_save_CPPFLAGS"
4055   LDFLAGS="$ac_save_LDFLAGS"
4056     ;;
4057   esac
4058
4059   # if that succeeded, then we've really got it.
4060   if test $have_xshm = yes; then
4061     cat >> confdefs.h <<\EOF
4062 #define HAVE_XSHM_EXTENSION 1
4063 EOF
4064
4065   fi
4066
4067 elif test $with_xshm != no; then
4068   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
4069   exit 1
4070 fi
4071
4072
4073 # Check for the SGI-VIDEO-CONTROL server extension header.
4074 #
4075 have_sgivc=no
4076 with_sgivc_req=unspecified
4077 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
4078 if test "${with_sgivc_ext+set}" = set; then
4079   withval="$with_sgivc_ext"
4080   with_sgivc="$withval"; with_sgivc_req="$withval"
4081 else
4082   with_sgivc=yes
4083 fi
4084
4085
4086
4087    case "$with_sgivc" in
4088     yes) ;;
4089     no)  ;;
4090
4091     /*)
4092      echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
4093 echo "configure:4105: checking for SGI-VIDEO-CONTROL headers" >&5
4094      d=$with_sgivc/include
4095      if test -d $d; then
4096        X_CFLAGS="-I$d $X_CFLAGS"
4097        echo "$ac_t""$d" 1>&6
4098      else
4099        echo "$ac_t""not found ($d: no such directory)" 1>&6
4100      fi
4101
4102      echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
4103 echo "configure:4115: checking for SGI-VIDEO-CONTROL libs" >&5
4104      d=$with_sgivc/lib
4105      if test -d $d; then
4106        X_LIBS="-L$d $X_LIBS"
4107        echo "$ac_t""$d" 1>&6
4108      else
4109        echo "$ac_t""not found ($d: no such directory)" 1>&6
4110      fi
4111
4112      # replace the directory string with "yes".
4113      with_sgivc_req="yes"
4114      with_sgivc=$with_sgivc_req
4115      ;;
4116
4117     *)
4118      echo ""
4119      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
4120      echo "       If it is a directory, then \`DIR/include' will be added to"
4121      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
4122      exit 1
4123      ;;
4124    esac
4125
4126    # why is this necessary?
4127    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4128    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4129    withval=
4130   
4131
4132 if test $with_sgivc = yes; then
4133
4134   # first check for XSGIvc.h
4135   
4136   ac_save_CPPFLAGS="$CPPFLAGS"
4137   if test \! -z "$includedir" ; then 
4138     CPPFLAGS="$CPPFLAGS -I$includedir"
4139   fi
4140   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4141   ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
4142 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
4143 echo "configure:4155: checking for X11/extensions/XSGIvc.h" >&5
4144 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4145   echo $ac_n "(cached) $ac_c" 1>&6
4146 else
4147   cat > conftest.$ac_ext <<EOF
4148 #line 4160 "configure"
4149 #include "confdefs.h"
4150 #include <X11/extensions/XSGIvc.h>
4151 EOF
4152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4153 { (eval echo configure:4165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4154 ac_err=`grep -v '^ *+' conftest.out`
4155 if test -z "$ac_err"; then
4156   rm -rf conftest*
4157   eval "ac_cv_header_$ac_safe=yes"
4158 else
4159   echo "$ac_err" >&5
4160   echo "configure: failed program was:" >&5
4161   cat conftest.$ac_ext >&5
4162   rm -rf conftest*
4163   eval "ac_cv_header_$ac_safe=no"
4164 fi
4165 rm -f conftest*
4166 fi
4167 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4168   echo "$ac_t""yes" 1>&6
4169   have_sgivc=yes
4170 else
4171   echo "$ac_t""no" 1>&6
4172 fi
4173
4174   CPPFLAGS="$ac_save_CPPFLAGS"
4175
4176   # if that succeeded, then check for the -lXsgivc
4177   if test $have_sgivc = yes; then
4178     have_sgivc=no
4179     
4180   ac_save_CPPFLAGS="$CPPFLAGS"
4181   ac_save_LDFLAGS="$LDFLAGS"
4182   if test \! -z "$includedir" ; then 
4183     CPPFLAGS="$CPPFLAGS -I$includedir"
4184   fi
4185   if test \! -z "$includedir" ; then 
4186     CPPFLAGS="$CPPFLAGS -I$includedir"
4187   fi
4188   if test \! -z "$libdir" ; then
4189     LDFLAGS="$LDFLAGS -L$libdir"
4190   fi
4191   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4192   if test \! -z "$x_libraries" ; then
4193     LDFLAGS="$LDFLAGS -L$x_libraries"
4194   fi
4195   echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
4196 echo "configure:4208: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
4197 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
4198 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4199   echo $ac_n "(cached) $ac_c" 1>&6
4200 else
4201   ac_save_LIBS="$LIBS"
4202 LIBS="-lXsgivc -lXext -lX11 $LIBS"
4203 cat > conftest.$ac_ext <<EOF
4204 #line 4216 "configure"
4205 #include "confdefs.h"
4206 /* Override any gcc2 internal prototype to avoid an error.  */
4207 /* We use char because int might match the return type of a gcc2
4208     builtin and then its argument prototype would still apply.  */
4209 char XSGIvcQueryGammaMap();
4210
4211 int main() {
4212 XSGIvcQueryGammaMap()
4213 ; return 0; }
4214 EOF
4215 if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4216   rm -rf conftest*
4217   eval "ac_cv_lib_$ac_lib_var=yes"
4218 else
4219   echo "configure: failed program was:" >&5
4220   cat conftest.$ac_ext >&5
4221   rm -rf conftest*
4222   eval "ac_cv_lib_$ac_lib_var=no"
4223 fi
4224 rm -f conftest*
4225 LIBS="$ac_save_LIBS"
4226
4227 fi
4228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4229   echo "$ac_t""yes" 1>&6
4230   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
4231 else
4232   echo "$ac_t""no" 1>&6
4233 fi
4234
4235   CPPFLAGS="$ac_save_CPPFLAGS"
4236   LDFLAGS="$ac_save_LDFLAGS"
4237   fi
4238
4239   # if that succeeded, then we've really got it.
4240   if test $have_sgivc = yes; then
4241     cat >> confdefs.h <<\EOF
4242 #define HAVE_SGI_VC_EXTENSION 1
4243 EOF
4244
4245   fi
4246
4247 elif test $with_sgivc != no; then
4248   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
4249   exit 1
4250 fi
4251
4252
4253 # Check for the DPMS server extension header.
4254 #
4255 have_dpms=no
4256 with_dpms_req=unspecified
4257 # Check whether --with-dpms-ext or --without-dpms-ext was given.
4258 if test "${with_dpms_ext+set}" = set; then
4259   withval="$with_dpms_ext"
4260   with_dpms="$withval"; with_dpms_req="$withval"
4261 else
4262   with_dpms=yes
4263 fi
4264
4265
4266
4267    case "$with_dpms" in
4268     yes) ;;
4269     no)  ;;
4270
4271     /*)
4272      echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
4273 echo "configure:4285: checking for DPMS headers" >&5
4274      d=$with_dpms/include
4275      if test -d $d; then
4276        X_CFLAGS="-I$d $X_CFLAGS"
4277        echo "$ac_t""$d" 1>&6
4278      else
4279        echo "$ac_t""not found ($d: no such directory)" 1>&6
4280      fi
4281
4282      echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
4283 echo "configure:4295: checking for DPMS libs" >&5
4284      d=$with_dpms/lib
4285      if test -d $d; then
4286        X_LIBS="-L$d $X_LIBS"
4287        echo "$ac_t""$d" 1>&6
4288      else
4289        echo "$ac_t""not found ($d: no such directory)" 1>&6
4290      fi
4291
4292      # replace the directory string with "yes".
4293      with_dpms_req="yes"
4294      with_dpms=$with_dpms_req
4295      ;;
4296
4297     *)
4298      echo ""
4299      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
4300      echo "       If it is a directory, then \`DIR/include' will be added to"
4301      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
4302      exit 1
4303      ;;
4304    esac
4305
4306    # why is this necessary?
4307    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4308    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4309    withval=
4310   
4311
4312 if test $with_dpms = yes; then
4313
4314   # first check for dpms.h
4315   
4316   ac_save_CPPFLAGS="$CPPFLAGS"
4317   if test \! -z "$includedir" ; then 
4318     CPPFLAGS="$CPPFLAGS -I$includedir"
4319   fi
4320   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4321   ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
4322 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
4323 echo "configure:4335: checking for X11/extensions/dpms.h" >&5
4324 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4325   echo $ac_n "(cached) $ac_c" 1>&6
4326 else
4327   cat > conftest.$ac_ext <<EOF
4328 #line 4340 "configure"
4329 #include "confdefs.h"
4330 #include <X11/extensions/dpms.h>
4331 EOF
4332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4333 { (eval echo configure:4345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4334 ac_err=`grep -v '^ *+' conftest.out`
4335 if test -z "$ac_err"; then
4336   rm -rf conftest*
4337   eval "ac_cv_header_$ac_safe=yes"
4338 else
4339   echo "$ac_err" >&5
4340   echo "configure: failed program was:" >&5
4341   cat conftest.$ac_ext >&5
4342   rm -rf conftest*
4343   eval "ac_cv_header_$ac_safe=no"
4344 fi
4345 rm -f conftest*
4346 fi
4347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4348   echo "$ac_t""yes" 1>&6
4349   have_dpms=yes
4350 else
4351   echo "$ac_t""no" 1>&6
4352 fi
4353
4354   CPPFLAGS="$ac_save_CPPFLAGS"
4355
4356   # if that succeeded, then check for the -lXdpms
4357   if test $have_dpms = yes; then
4358     have_dpms=no
4359     
4360   ac_save_CPPFLAGS="$CPPFLAGS"
4361   ac_save_LDFLAGS="$LDFLAGS"
4362   if test \! -z "$includedir" ; then 
4363     CPPFLAGS="$CPPFLAGS -I$includedir"
4364   fi
4365   if test \! -z "$includedir" ; then 
4366     CPPFLAGS="$CPPFLAGS -I$includedir"
4367   fi
4368   if test \! -z "$libdir" ; then
4369     LDFLAGS="$LDFLAGS -L$libdir"
4370   fi
4371   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4372   if test \! -z "$x_libraries" ; then
4373     LDFLAGS="$LDFLAGS -L$x_libraries"
4374   fi
4375   echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
4376 echo "configure:4388: checking for DPMSInfo in -lXdpms" >&5
4377 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
4378 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4379   echo $ac_n "(cached) $ac_c" 1>&6
4380 else
4381   ac_save_LIBS="$LIBS"
4382 LIBS="-lXdpms -lXext -lX11 $LIBS"
4383 cat > conftest.$ac_ext <<EOF
4384 #line 4396 "configure"
4385 #include "confdefs.h"
4386 /* Override any gcc2 internal prototype to avoid an error.  */
4387 /* We use char because int might match the return type of a gcc2
4388     builtin and then its argument prototype would still apply.  */
4389 char DPMSInfo();
4390
4391 int main() {
4392 DPMSInfo()
4393 ; return 0; }
4394 EOF
4395 if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4396   rm -rf conftest*
4397   eval "ac_cv_lib_$ac_lib_var=yes"
4398 else
4399   echo "configure: failed program was:" >&5
4400   cat conftest.$ac_ext >&5
4401   rm -rf conftest*
4402   eval "ac_cv_lib_$ac_lib_var=no"
4403 fi
4404 rm -f conftest*
4405 LIBS="$ac_save_LIBS"
4406
4407 fi
4408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4409   echo "$ac_t""yes" 1>&6
4410   have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
4411 else
4412   echo "$ac_t""no" 1>&6
4413 fi
4414
4415   CPPFLAGS="$ac_save_CPPFLAGS"
4416   LDFLAGS="$ac_save_LDFLAGS"
4417   fi
4418
4419   # if that succeeded, then we've really got it.
4420   if test $have_dpms = yes; then
4421     cat >> confdefs.h <<\EOF
4422 #define HAVE_DPMS_EXTENSION 1
4423 EOF
4424
4425   fi
4426
4427 elif test $with_dpms != no; then
4428   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
4429   exit 1
4430 fi
4431
4432
4433
4434 # Check for Motif and Athena --with and --without arguments.
4435 #
4436 have_motif=no
4437 have_athena=no
4438 have_athena3d=no
4439 with_motif_req=unspecified
4440 with_athena_req=unspecified
4441
4442 # Check whether --with-motif or --without-motif was given.
4443 if test "${with_motif+set}" = set; then
4444   withval="$with_motif"
4445   with_motif="$withval"; with_motif_req="$withval"
4446 else
4447   with_motif=no
4448 fi
4449
4450
4451
4452    case "$with_motif" in
4453     yes) ;;
4454     no)  ;;
4455
4456     /*)
4457      echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
4458 echo "configure:4470: checking for Motif headers" >&5
4459      d=$with_motif/include
4460      if test -d $d; then
4461        X_CFLAGS="-I$d $X_CFLAGS"
4462        echo "$ac_t""$d" 1>&6
4463      else
4464        echo "$ac_t""not found ($d: no such directory)" 1>&6
4465      fi
4466
4467      echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
4468 echo "configure:4480: checking for Motif libs" >&5
4469      d=$with_motif/lib
4470      if test -d $d; then
4471        X_LIBS="-L$d $X_LIBS"
4472        echo "$ac_t""$d" 1>&6
4473      else
4474        echo "$ac_t""not found ($d: no such directory)" 1>&6
4475      fi
4476
4477      # replace the directory string with "yes".
4478      with_motif_req="yes"
4479      with_motif=$with_motif_req
4480      ;;
4481
4482     *)
4483      echo ""
4484      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
4485      echo "       If it is a directory, then \`DIR/include' will be added to"
4486      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
4487      exit 1
4488      ;;
4489    esac
4490
4491    # why is this necessary?
4492    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4493    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4494    withval=
4495   
4496
4497 # Check whether --with-athena or --without-athena was given.
4498 if test "${with_athena+set}" = set; then
4499   withval="$with_athena"
4500   with_athena="$withval"; with_athena_req="$withval"
4501 else
4502   with_athena=no
4503 fi
4504
4505
4506
4507    case "$with_athena" in
4508     yes) ;;
4509     no)  ;;
4510
4511     /*)
4512      echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
4513 echo "configure:4525: checking for Athena headers" >&5
4514      d=$with_athena/include
4515      if test -d $d; then
4516        X_CFLAGS="-I$d $X_CFLAGS"
4517        echo "$ac_t""$d" 1>&6
4518      else
4519        echo "$ac_t""not found ($d: no such directory)" 1>&6
4520      fi
4521
4522      echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
4523 echo "configure:4535: checking for Athena libs" >&5
4524      d=$with_athena/lib
4525      if test -d $d; then
4526        X_LIBS="-L$d $X_LIBS"
4527        echo "$ac_t""$d" 1>&6
4528      else
4529        echo "$ac_t""not found ($d: no such directory)" 1>&6
4530      fi
4531
4532      # replace the directory string with "yes".
4533      with_athena_req="yes"
4534      with_athena=$with_athena_req
4535      ;;
4536
4537     *)
4538      echo ""
4539      echo "error: argument to --with-athena must be \"yes\", \"no\", or a directory."
4540      echo "       If it is a directory, then \`DIR/include' will be added to"
4541      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
4542      exit 1
4543      ;;
4544    esac
4545
4546    # why is this necessary?
4547    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
4548    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
4549    withval=
4550   
4551
4552 if test $with_motif != yes -a $with_motif != no ; then
4553   echo "error: must be yes or no: --with-motif=$with_motif"
4554   exit 1
4555 fi
4556
4557 if test $with_athena != yes -a $with_athena != no ; then
4558   echo "error: must be yes or no: --with-athena=$with_athena"
4559   exit 1
4560 fi
4561
4562
4563 # Saying --without-motif is the same as saying --with-athena.
4564 if test $with_motif_req = no ; then
4565   with_athena_req=yes
4566   with_athena=yes
4567 fi
4568
4569 # Saying --without-athena is the same as saying --with-motif.
4570 if test $with_athena_req = no ; then
4571   with_motif_req=yes
4572   with_motif=yes
4573 fi
4574
4575 # Check for Motif and Athena headers.
4576
4577 check_motif() {
4578   
4579   ac_save_CPPFLAGS="$CPPFLAGS"
4580   if test \! -z "$includedir" ; then 
4581     CPPFLAGS="$CPPFLAGS -I$includedir"
4582   fi
4583   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4584   ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
4585 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
4586 echo "configure:4598: checking for Xm/Xm.h" >&5
4587 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4588   echo $ac_n "(cached) $ac_c" 1>&6
4589 else
4590   cat > conftest.$ac_ext <<EOF
4591 #line 4603 "configure"
4592 #include "confdefs.h"
4593 #include <Xm/Xm.h>
4594 EOF
4595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4596 { (eval echo configure:4608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4597 ac_err=`grep -v '^ *+' conftest.out`
4598 if test -z "$ac_err"; then
4599   rm -rf conftest*
4600   eval "ac_cv_header_$ac_safe=yes"
4601 else
4602   echo "$ac_err" >&5
4603   echo "configure: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   rm -rf conftest*
4606   eval "ac_cv_header_$ac_safe=no"
4607 fi
4608 rm -f conftest*
4609 fi
4610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4611   echo "$ac_t""yes" 1>&6
4612   have_motif=yes
4613                      cat >> confdefs.h <<\EOF
4614 #define HAVE_MOTIF 1
4615 EOF
4616
4617                      SAVER_LIBS="-lXm $SAVER_LIBS"
4618 else
4619   echo "$ac_t""no" 1>&6
4620 fi
4621
4622   CPPFLAGS="$ac_save_CPPFLAGS"
4623 }
4624
4625 check_athena() {
4626   have_athena=no
4627   have_athena3d=no
4628   
4629   ac_save_CPPFLAGS="$CPPFLAGS"
4630   if test \! -z "$includedir" ; then 
4631     CPPFLAGS="$CPPFLAGS -I$includedir"
4632   fi
4633   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4634   ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
4635 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
4636 echo "configure:4648: checking for X11/Xaw/Dialog.h" >&5
4637 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4638   echo $ac_n "(cached) $ac_c" 1>&6
4639 else
4640   cat > conftest.$ac_ext <<EOF
4641 #line 4653 "configure"
4642 #include "confdefs.h"
4643 #include <X11/Xaw/Dialog.h>
4644 EOF
4645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4646 { (eval echo configure:4658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4647 ac_err=`grep -v '^ *+' conftest.out`
4648 if test -z "$ac_err"; then
4649   rm -rf conftest*
4650   eval "ac_cv_header_$ac_safe=yes"
4651 else
4652   echo "$ac_err" >&5
4653   echo "configure: failed program was:" >&5
4654   cat conftest.$ac_ext >&5
4655   rm -rf conftest*
4656   eval "ac_cv_header_$ac_safe=no"
4657 fi
4658 rm -f conftest*
4659 fi
4660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4661   echo "$ac_t""yes" 1>&6
4662   have_athena=yes
4663 else
4664   echo "$ac_t""no" 1>&6
4665 fi
4666
4667   CPPFLAGS="$ac_save_CPPFLAGS"
4668   
4669   ac_save_CPPFLAGS="$CPPFLAGS"
4670   ac_save_LDFLAGS="$LDFLAGS"
4671   if test \! -z "$includedir" ; then 
4672     CPPFLAGS="$CPPFLAGS -I$includedir"
4673   fi
4674   if test \! -z "$includedir" ; then 
4675     CPPFLAGS="$CPPFLAGS -I$includedir"
4676   fi
4677   if test \! -z "$libdir" ; then
4678     LDFLAGS="$LDFLAGS -L$libdir"
4679   fi
4680   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4681   if test \! -z "$x_libraries" ; then
4682     LDFLAGS="$LDFLAGS -L$x_libraries"
4683   fi
4684   echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
4685 echo "configure:4697: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
4686 ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'`
4687 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4688   echo $ac_n "(cached) $ac_c" 1>&6
4689 else
4690   ac_save_LIBS="$LIBS"
4691 LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
4692 cat > conftest.$ac_ext <<EOF
4693 #line 4705 "configure"
4694 #include "confdefs.h"
4695 /* Override any gcc2 internal prototype to avoid an error.  */
4696 /* We use char because int might match the return type of a gcc2
4697     builtin and then its argument prototype would still apply.  */
4698 char Xaw3dComputeTopShadowRGB();
4699
4700 int main() {
4701 Xaw3dComputeTopShadowRGB()
4702 ; return 0; }
4703 EOF
4704 if { (eval echo configure:4716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4705   rm -rf conftest*
4706   eval "ac_cv_lib_$ac_lib_var=yes"
4707 else
4708   echo "configure: failed program was:" >&5
4709   cat conftest.$ac_ext >&5
4710   rm -rf conftest*
4711   eval "ac_cv_lib_$ac_lib_var=no"
4712 fi
4713 rm -f conftest*
4714 LIBS="$ac_save_LIBS"
4715
4716 fi
4717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4718   echo "$ac_t""yes" 1>&6
4719   have_athena=yes; have_athena3d=yes
4720 else
4721   echo "$ac_t""no" 1>&6
4722 fi
4723
4724   CPPFLAGS="$ac_save_CPPFLAGS"
4725   LDFLAGS="$ac_save_LDFLAGS"
4726
4727   if test $have_athena3d = yes; then
4728     SAVER_LIBS="-lXaw3d $SAVER_LIBS"
4729   elif test $have_athena = yes; then
4730     SAVER_LIBS="-lXaw $SAVER_LIBS"
4731   fi
4732 }
4733
4734
4735 # If they asked for both motif and athena, check motif then athena.
4736 # If they asked for only motif, check motif then athena.
4737 # If they asked for only athena, check athena then motif.
4738 # If they asked for neither, check motif then athena.
4739
4740 proselytize_motif=yes
4741 if test $with_motif = yes; then
4742   # asked for both, or for motif only
4743   check_motif
4744   if test $have_motif = yes; then
4745     with_athena=no
4746     with_athena_req=no
4747   else
4748     check_athena
4749   fi
4750
4751 elif test $with_athena = yes; then
4752   # asked for athena only
4753   check_athena
4754   if test $have_athena = yes; then
4755     with_motif=no
4756     proselytize_motif=no
4757   else
4758     check_motif
4759   fi
4760
4761 else
4762   # asked for neither
4763   check_motif
4764   if test $have_motif = yes; then
4765     with_athena=no
4766   else
4767     check_athena
4768   fi
4769
4770 fi
4771
4772 if test $have_motif = yes; then
4773   proselytize_motif=no
4774 fi
4775
4776 # If we have Athena, check whether it's a version that includes
4777 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
4778 if test $have_athena = yes ; then
4779   echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
4780 echo "configure:4792: checking for XawViewportSetCoordinates in Viewport.h" >&5
4781 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
4782   echo $ac_n "(cached) $ac_c" 1>&6
4783 else
4784   ac_cv_have_XawViewportSetCoordinates=no
4785                   
4786   ac_save_CPPFLAGS="$CPPFLAGS"
4787   if test \! -z "$includedir" ; then 
4788     CPPFLAGS="$CPPFLAGS -I$includedir"
4789   fi
4790   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4791   cat > conftest.$ac_ext <<EOF
4792 #line 4804 "configure"
4793 #include "confdefs.h"
4794 #include <X11/Xaw/Viewport.h>
4795 EOF
4796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4797   egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then
4798   rm -rf conftest*
4799   ac_cv_have_XawViewportSetCoordinates=yes
4800 fi
4801 rm -f conftest*
4802
4803   CPPFLAGS="$ac_save_CPPFLAGS"
4804 fi
4805
4806 echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6
4807   if test $ac_cv_have_XawViewportSetCoordinates = yes ; then
4808     cat >> confdefs.h <<\EOF
4809 #define HAVE_XawViewportSetCoordinates 1
4810 EOF
4811
4812   fi
4813 fi
4814
4815
4816 # If we have Motif, check whether it's really LessTif.
4817 #
4818 have_lesstif=no
4819 if test $have_motif = yes ; then
4820   echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
4821 echo "configure:4833: checking whether Motif is really LessTif" >&5
4822 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
4823   echo $ac_n "(cached) $ac_c" 1>&6
4824 else
4825   
4826   ac_save_CPPFLAGS="$CPPFLAGS"
4827   if test \! -z "$includedir" ; then 
4828     CPPFLAGS="$CPPFLAGS -I$includedir"
4829   fi
4830   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4831   cat > conftest.$ac_ext <<EOF
4832 #line 4844 "configure"
4833 #include "confdefs.h"
4834 #include <Xm/Xm.h>
4835 int main() {
4836 long vers = LesstifVersion;
4837 ; return 0; }
4838 EOF
4839 if { (eval echo configure:4851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4840   rm -rf conftest*
4841   ac_cv_have_lesstif=yes
4842 else
4843   echo "configure: failed program was:" >&5
4844   cat conftest.$ac_ext >&5
4845   rm -rf conftest*
4846   ac_cv_have_lesstif=no
4847 fi
4848 rm -f conftest*
4849   CPPFLAGS="$ac_save_CPPFLAGS"
4850 fi
4851
4852 echo "$ac_t""$ac_cv_have_lesstif" 1>&6
4853   have_lesstif=$ac_cv_have_lesstif
4854 fi
4855
4856 # don't cache these
4857 unset ac_cv_lesstif_version
4858 unset ac_cv_lesstif_version_string
4859
4860 lesstif_version=unknown
4861 lesstif_version_string=unknown
4862
4863 if test $have_lesstif = yes ; then
4864   ltv=unknown
4865   echo unknown > conftest-lt
4866   echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
4867 echo "configure:4879: checking LessTif version number" >&5
4868 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
4869   echo $ac_n "(cached) $ac_c" 1>&6
4870 else
4871   
4872   ac_save_CPPFLAGS="$CPPFLAGS"
4873   if test \! -z "$includedir" ; then 
4874     CPPFLAGS="$CPPFLAGS -I$includedir"
4875   fi
4876   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4877   if test "$cross_compiling" = yes; then
4878   ac_cv_lesstif_version=unknown
4879                      ac_cv_lesstif_version_string=unknown
4880 else
4881   cat > conftest.$ac_ext <<EOF
4882 #line 4894 "configure"
4883 #include "confdefs.h"
4884 #include <stdio.h>
4885                      #include <Xm/Xm.h>
4886                      int main() {
4887                        FILE *f = fopen("conftest-lt", "w");
4888                        if (!f) exit(1);
4889                        fprintf(f, "%d %d.%d\n", LesstifVersion,
4890                           LESSTIF_VERSION, LESSTIF_REVISION);
4891                        fclose(f);
4892                        exit(0);
4893                      }
4894 EOF
4895 if { (eval echo configure:4907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4896 then
4897   ltv=`cat conftest-lt`
4898                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
4899                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
4900 else
4901   echo "configure: failed program was:" >&5
4902   cat conftest.$ac_ext >&5
4903   rm -fr conftest*
4904   ac_cv_lesstif_version=unknown
4905                      ac_cv_lesstif_version_string=unknown
4906 fi
4907 rm -fr conftest*
4908 fi
4909
4910   CPPFLAGS="$ac_save_CPPFLAGS"
4911 fi
4912
4913 echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
4914   rm -f conftest-lt
4915   lesstif_version=$ac_cv_lesstif_version
4916   lesstif_version_string=$ac_cv_lesstif_version_string
4917
4918 fi
4919
4920
4921 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
4922 # Extension".   Why this extension isn't in -lXext with all the others,
4923 # I have no idea.
4924 #
4925 have_xp_ext=no
4926 if test $have_motif = yes ; then
4927    have_xp_ext=no
4928    
4929   ac_save_CPPFLAGS="$CPPFLAGS"
4930   ac_save_LDFLAGS="$LDFLAGS"
4931   if test \! -z "$includedir" ; then 
4932     CPPFLAGS="$CPPFLAGS -I$includedir"
4933   fi
4934   if test \! -z "$includedir" ; then 
4935     CPPFLAGS="$CPPFLAGS -I$includedir"
4936   fi
4937   if test \! -z "$libdir" ; then
4938     LDFLAGS="$LDFLAGS -L$libdir"
4939   fi
4940   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4941   if test \! -z "$x_libraries" ; then
4942     LDFLAGS="$LDFLAGS -L$x_libraries"
4943   fi
4944   echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
4945 echo "configure:4957: checking for XpQueryExtension in -lXp" >&5
4946 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
4947 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4948   echo $ac_n "(cached) $ac_c" 1>&6
4949 else
4950   ac_save_LIBS="$LIBS"
4951 LIBS="-lXp -lX11 -lXext -lm $LIBS"
4952 cat > conftest.$ac_ext <<EOF
4953 #line 4965 "configure"
4954 #include "confdefs.h"
4955 /* Override any gcc2 internal prototype to avoid an error.  */
4956 /* We use char because int might match the return type of a gcc2
4957     builtin and then its argument prototype would still apply.  */
4958 char XpQueryExtension();
4959
4960 int main() {
4961 XpQueryExtension()
4962 ; return 0; }
4963 EOF
4964 if { (eval echo configure:4976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4965   rm -rf conftest*
4966   eval "ac_cv_lib_$ac_lib_var=yes"
4967 else
4968   echo "configure: failed program was:" >&5
4969   cat conftest.$ac_ext >&5
4970   rm -rf conftest*
4971   eval "ac_cv_lib_$ac_lib_var=no"
4972 fi
4973 rm -f conftest*
4974 LIBS="$ac_save_LIBS"
4975
4976 fi
4977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4978   echo "$ac_t""yes" 1>&6
4979   have_xp_ext=yes; SAVER_LIBS="$SAVER_LIBS -lXp"
4980 else
4981   echo "$ac_t""no" 1>&6
4982 fi
4983
4984   CPPFLAGS="$ac_save_CPPFLAGS"
4985   LDFLAGS="$ac_save_LDFLAGS"
4986 fi
4987
4988
4989 # check for XPM header.
4990 #
4991 have_xpm=no
4992 with_xpm_req=unspecified
4993 # Check whether --with-xpm or --without-xpm was given.
4994 if test "${with_xpm+set}" = set; then
4995   withval="$with_xpm"
4996   with_xpm="$withval"; with_xpm_req="$withval"
4997 else
4998   with_xpm=yes
4999 fi
5000
5001
5002
5003    case "$with_xpm" in
5004     yes) ;;
5005     no)  ;;
5006
5007     /*)
5008      echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
5009 echo "configure:5021: checking for XPM headers" >&5
5010      d=$with_xpm/include
5011      if test -d $d; then
5012        X_CFLAGS="-I$d $X_CFLAGS"
5013        echo "$ac_t""$d" 1>&6
5014      else
5015        echo "$ac_t""not found ($d: no such directory)" 1>&6
5016      fi
5017
5018      echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
5019 echo "configure:5031: checking for XPM libs" >&5
5020      d=$with_xpm/lib
5021      if test -d $d; then
5022        X_LIBS="-L$d $X_LIBS"
5023        echo "$ac_t""$d" 1>&6
5024      else
5025        echo "$ac_t""not found ($d: no such directory)" 1>&6
5026      fi
5027
5028      # replace the directory string with "yes".
5029      with_xpm_req="yes"
5030      with_xpm=$with_xpm_req
5031      ;;
5032
5033     *)
5034      echo ""
5035      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
5036      echo "       If it is a directory, then \`DIR/include' will be added to"
5037      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
5038      exit 1
5039      ;;
5040    esac
5041
5042    # why is this necessary?
5043    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5044    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5045    withval=
5046   
5047
5048 if test $with_xpm = yes; then
5049   
5050   ac_save_CPPFLAGS="$CPPFLAGS"
5051   if test \! -z "$includedir" ; then 
5052     CPPFLAGS="$CPPFLAGS -I$includedir"
5053   fi
5054   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5055   ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
5056 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
5057 echo "configure:5069: checking for X11/xpm.h" >&5
5058 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5059   echo $ac_n "(cached) $ac_c" 1>&6
5060 else
5061   cat > conftest.$ac_ext <<EOF
5062 #line 5074 "configure"
5063 #include "confdefs.h"
5064 #include <X11/xpm.h>
5065 EOF
5066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5067 { (eval echo configure:5079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5068 ac_err=`grep -v '^ *+' conftest.out`
5069 if test -z "$ac_err"; then
5070   rm -rf conftest*
5071   eval "ac_cv_header_$ac_safe=yes"
5072 else
5073   echo "$ac_err" >&5
5074   echo "configure: failed program was:" >&5
5075   cat conftest.$ac_ext >&5
5076   rm -rf conftest*
5077   eval "ac_cv_header_$ac_safe=no"
5078 fi
5079 rm -f conftest*
5080 fi
5081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5082   echo "$ac_t""yes" 1>&6
5083   have_xpm=yes
5084                     cat >> confdefs.h <<\EOF
5085 #define HAVE_XPM 1
5086 EOF
5087
5088                     XPM_LIBS="-lXpm"
5089 else
5090   echo "$ac_t""no" 1>&6
5091 fi
5092
5093   CPPFLAGS="$ac_save_CPPFLAGS"
5094 elif test $with_xpm != no; then
5095   echo "error: must be yes or no: --with-xpm=$with_xpm"
5096   exit 1
5097 fi
5098
5099
5100 # check for the GL header
5101 #
5102 have_gl=no
5103 ac_have_mesa_gl=no
5104 with_gl_req=unspecified
5105 # Check whether --with-gl or --without-gl was given.
5106 if test "${with_gl+set}" = set; then
5107   withval="$with_gl"
5108   with_gl="$withval"; with_gl_req="$withval"
5109 else
5110   with_gl=yes
5111 fi
5112
5113
5114
5115    case "$with_gl" in
5116     yes) ;;
5117     no)  ;;
5118
5119     /*)
5120      echo $ac_n "checking for GL headers""... $ac_c" 1>&6
5121 echo "configure:5133: checking for GL headers" >&5
5122      d=$with_gl/include
5123      if test -d $d; then
5124        X_CFLAGS="-I$d $X_CFLAGS"
5125        echo "$ac_t""$d" 1>&6
5126      else
5127        echo "$ac_t""not found ($d: no such directory)" 1>&6
5128      fi
5129
5130      echo $ac_n "checking for GL libs""... $ac_c" 1>&6
5131 echo "configure:5143: checking for GL libs" >&5
5132      d=$with_gl/lib
5133      if test -d $d; then
5134        X_LIBS="-L$d $X_LIBS"
5135        echo "$ac_t""$d" 1>&6
5136      else
5137        echo "$ac_t""not found ($d: no such directory)" 1>&6
5138      fi
5139
5140      # replace the directory string with "yes".
5141      with_gl_req="yes"
5142      with_gl=$with_gl_req
5143      ;;
5144
5145     *)
5146      echo ""
5147      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
5148      echo "       If it is a directory, then \`DIR/include' will be added to"
5149      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
5150      exit 1
5151      ;;
5152    esac
5153
5154    # why is this necessary?
5155    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5156    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5157    withval=
5158   
5159
5160 ac_mesagl_version=unknown
5161 ac_mesagl_version_string=unknown
5162
5163 if test $with_gl = yes; then
5164   
5165   ac_save_CPPFLAGS="$CPPFLAGS"
5166   if test \! -z "$includedir" ; then 
5167     CPPFLAGS="$CPPFLAGS -I$includedir"
5168   fi
5169   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5170   ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
5171 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
5172 echo "configure:5184: checking for GL/gl.h" >&5
5173 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5174   echo $ac_n "(cached) $ac_c" 1>&6
5175 else
5176   cat > conftest.$ac_ext <<EOF
5177 #line 5189 "configure"
5178 #include "confdefs.h"
5179 #include <GL/gl.h>
5180 EOF
5181 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5182 { (eval echo configure:5194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5183 ac_err=`grep -v '^ *+' conftest.out`
5184 if test -z "$ac_err"; then
5185   rm -rf conftest*
5186   eval "ac_cv_header_$ac_safe=yes"
5187 else
5188   echo "$ac_err" >&5
5189   echo "configure: failed program was:" >&5
5190   cat conftest.$ac_ext >&5
5191   rm -rf conftest*
5192   eval "ac_cv_header_$ac_safe=no"
5193 fi
5194 rm -f conftest*
5195 fi
5196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5197   echo "$ac_t""yes" 1>&6
5198   have_gl=yes
5199 else
5200   echo "$ac_t""no" 1>&6
5201 fi
5202
5203   CPPFLAGS="$ac_save_CPPFLAGS"
5204   if test $have_gl = yes ; then
5205     
5206   ac_save_CPPFLAGS="$CPPFLAGS"
5207   if test \! -z "$includedir" ; then 
5208     CPPFLAGS="$CPPFLAGS -I$includedir"
5209   fi
5210   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5211   ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
5212 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
5213 echo "configure:5225: checking for GL/glx.h" >&5
5214 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5215   echo $ac_n "(cached) $ac_c" 1>&6
5216 else
5217   cat > conftest.$ac_ext <<EOF
5218 #line 5230 "configure"
5219 #include "confdefs.h"
5220 #include <GL/glx.h>
5221 EOF
5222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5223 { (eval echo configure:5235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5224 ac_err=`grep -v '^ *+' conftest.out`
5225 if test -z "$ac_err"; then
5226   rm -rf conftest*
5227   eval "ac_cv_header_$ac_safe=yes"
5228 else
5229   echo "$ac_err" >&5
5230   echo "configure: failed program was:" >&5
5231   cat conftest.$ac_ext >&5
5232   rm -rf conftest*
5233   eval "ac_cv_header_$ac_safe=no"
5234 fi
5235 rm -f conftest*
5236 fi
5237 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5238   echo "$ac_t""yes" 1>&6
5239   have_gl=yes
5240 else
5241   echo "$ac_t""no" 1>&6
5242 fi
5243
5244   CPPFLAGS="$ac_save_CPPFLAGS"
5245   fi
5246
5247   # If we have the headers, try and figure out which vendor it's from.
5248   #
5249   if test $have_gl = yes ; then
5250
5251     cat >> confdefs.h <<\EOF
5252 #define HAVE_GL 1
5253 EOF
5254
5255
5256     # We need to know whether it's MesaGL so that we know which libraries
5257     # to link against.
5258     #
5259     echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
5260 echo "configure:5272: checking whether GL is really MesaGL" >&5
5261     if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
5262   echo $ac_n "(cached) $ac_c" 1>&6
5263 else
5264   ac_cv_have_mesa_gl=no
5265        
5266   ac_save_CPPFLAGS="$CPPFLAGS"
5267   if test \! -z "$includedir" ; then 
5268     CPPFLAGS="$CPPFLAGS -I$includedir"
5269   fi
5270   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5271   cat > conftest.$ac_ext <<EOF
5272 #line 5284 "configure"
5273 #include "confdefs.h"
5274 #include <GL/glx.h>
5275 EOF
5276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5277   egrep "Mesa" >/dev/null 2>&1; then
5278   rm -rf conftest*
5279   ac_cv_have_mesa_gl=yes
5280 fi
5281 rm -f conftest*
5282
5283   CPPFLAGS="$ac_save_CPPFLAGS"
5284       
5285 fi
5286
5287     ac_have_mesa_gl=$ac_cv_have_mesa_gl
5288     echo "$ac_t""$ac_have_mesa_gl" 1>&6
5289
5290     if test $ac_have_mesa_gl = no ; then
5291       gl_lib_1="GL"
5292       GL_LIBS="-lGL -lGLU"
5293     else
5294       cat >> confdefs.h <<\EOF
5295 #define HAVE_MESA_GL 1
5296 EOF
5297
5298       gl_lib_1="MesaGL"
5299       GL_LIBS="-lMesaGL -lMesaGLU"
5300     fi
5301
5302
5303     # If it's MesaGL, we'd like to issue a warning if the version number
5304     # is less than or equal to 2.6, because that version had a security bug.
5305     #
5306     if test $ac_have_mesa_gl = yes; then
5307
5308       # don't cache these.
5309       unset ac_cv_mesagl_version
5310       unset ac_cv_mesagl_version_string
5311
5312       echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
5313 echo "configure:5325: checking MesaGL version number" >&5
5314       if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
5315   echo $ac_n "(cached) $ac_c" 1>&6
5316 else
5317   cat > conftest.$ac_ext <<EOF
5318 #line 5330 "configure"
5319 #include "confdefs.h"
5320 #include <GL/gl.h>
5321 #configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
5322 EOF
5323
5324          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
5325               's/^#configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
5326          if test "$mglv" = ""; then
5327            ac_mesagl_version=unknown
5328            ac_mesagl_version_string=unknown
5329          else
5330            ac_mesagl_version_string=$mglv
5331            maj=`echo $mglv | sed -n 's/\..*//p'`
5332            min=`echo $mglv | sed -n 's/.*\.//p'`
5333            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
5334          fi
5335          ac_cv_mesagl_version=$ac_mesagl_version
5336          ac_cv_mesagl_version_string=$ac_mesagl_version_string
5337       
5338 fi
5339
5340       ac_mesagl_version=$ac_cv_mesagl_version
5341       ac_mesagl_version_string=$ac_cv_mesagl_version_string
5342       echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
5343     fi
5344
5345
5346     # Check for OpenGL 1.1 features.
5347     #
5348     
5349   ac_save_CPPFLAGS="$CPPFLAGS"
5350   ac_save_LDFLAGS="$LDFLAGS"
5351   if test \! -z "$includedir" ; then 
5352     CPPFLAGS="$CPPFLAGS -I$includedir"
5353   fi
5354   if test \! -z "$includedir" ; then 
5355     CPPFLAGS="$CPPFLAGS -I$includedir"
5356   fi
5357   if test \! -z "$libdir" ; then
5358     LDFLAGS="$LDFLAGS -L$libdir"
5359   fi
5360   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5361   if test \! -z "$x_libraries" ; then
5362     LDFLAGS="$LDFLAGS -L$x_libraries"
5363   fi
5364   echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
5365 echo "configure:5377: checking for glBindTexture in -l$gl_lib_1" >&5
5366 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
5367 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5368   echo $ac_n "(cached) $ac_c" 1>&6
5369 else
5370   ac_save_LIBS="$LIBS"
5371 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
5372 cat > conftest.$ac_ext <<EOF
5373 #line 5385 "configure"
5374 #include "confdefs.h"
5375 /* Override any gcc2 internal prototype to avoid an error.  */
5376 /* We use char because int might match the return type of a gcc2
5377     builtin and then its argument prototype would still apply.  */
5378 char glBindTexture();
5379
5380 int main() {
5381 glBindTexture()
5382 ; return 0; }
5383 EOF
5384 if { (eval echo configure:5396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5385   rm -rf conftest*
5386   eval "ac_cv_lib_$ac_lib_var=yes"
5387 else
5388   echo "configure: failed program was:" >&5
5389   cat conftest.$ac_ext >&5
5390   rm -rf conftest*
5391   eval "ac_cv_lib_$ac_lib_var=no"
5392 fi
5393 rm -f conftest*
5394 LIBS="$ac_save_LIBS"
5395
5396 fi
5397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5398   echo "$ac_t""yes" 1>&6
5399   cat >> confdefs.h <<\EOF
5400 #define HAVE_GLBINDTEXTURE 1
5401 EOF
5402
5403 else
5404   echo "$ac_t""no" 1>&6
5405 fi
5406
5407   CPPFLAGS="$ac_save_CPPFLAGS"
5408   LDFLAGS="$ac_save_LDFLAGS"
5409
5410   fi
5411
5412 elif test $with_gl != no; then
5413   echo "error: must be yes or no: --with-gl=$with_gl"
5414   exit 1
5415 fi
5416
5417
5418 # check for SGI XReadDisplay server extension header.
5419 #
5420 have_readdisplay=no
5421 with_readdisplay_req=unspecified
5422 # Check whether --with-readdisplay or --without-readdisplay was given.
5423 if test "${with_readdisplay+set}" = set; then
5424   withval="$with_readdisplay"
5425   with_readdisplay="$withval"; with_readdisplay_req="$withval"
5426 else
5427   with_readdisplay=yes
5428 fi
5429
5430
5431
5432    case "$with_readdisplay" in
5433     yes) ;;
5434     no)  ;;
5435
5436     /*)
5437      echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
5438 echo "configure:5450: checking for XReadDisplay headers" >&5
5439      d=$with_readdisplay/include
5440      if test -d $d; then
5441        X_CFLAGS="-I$d $X_CFLAGS"
5442        echo "$ac_t""$d" 1>&6
5443      else
5444        echo "$ac_t""not found ($d: no such directory)" 1>&6
5445      fi
5446
5447      echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
5448 echo "configure:5460: checking for XReadDisplay libs" >&5
5449      d=$with_readdisplay/lib
5450      if test -d $d; then
5451        X_LIBS="-L$d $X_LIBS"
5452        echo "$ac_t""$d" 1>&6
5453      else
5454        echo "$ac_t""not found ($d: no such directory)" 1>&6
5455      fi
5456
5457      # replace the directory string with "yes".
5458      with_readdisplay_req="yes"
5459      with_readdisplay=$with_readdisplay_req
5460      ;;
5461
5462     *)
5463      echo ""
5464      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
5465      echo "       If it is a directory, then \`DIR/include' will be added to"
5466      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
5467      exit 1
5468      ;;
5469    esac
5470
5471    # why is this necessary?
5472    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5473    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5474    withval=
5475   
5476
5477 if test $with_readdisplay = yes; then
5478   
5479   ac_save_CPPFLAGS="$CPPFLAGS"
5480   if test \! -z "$includedir" ; then 
5481     CPPFLAGS="$CPPFLAGS -I$includedir"
5482   fi
5483   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5484   ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
5485 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
5486 echo "configure:5498: checking for X11/extensions/readdisplay.h" >&5
5487 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5488   echo $ac_n "(cached) $ac_c" 1>&6
5489 else
5490   cat > conftest.$ac_ext <<EOF
5491 #line 5503 "configure"
5492 #include "confdefs.h"
5493 #include <X11/extensions/readdisplay.h>
5494 EOF
5495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5496 { (eval echo configure:5508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5497 ac_err=`grep -v '^ *+' conftest.out`
5498 if test -z "$ac_err"; then
5499   rm -rf conftest*
5500   eval "ac_cv_header_$ac_safe=yes"
5501 else
5502   echo "$ac_err" >&5
5503   echo "configure: failed program was:" >&5
5504   cat conftest.$ac_ext >&5
5505   rm -rf conftest*
5506   eval "ac_cv_header_$ac_safe=no"
5507 fi
5508 rm -f conftest*
5509 fi
5510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5511   echo "$ac_t""yes" 1>&6
5512   cat >> confdefs.h <<\EOF
5513 #define HAVE_READ_DISPLAY_EXTENSION 1
5514 EOF
5515
5516 else
5517   echo "$ac_t""no" 1>&6
5518 fi
5519
5520   CPPFLAGS="$ac_save_CPPFLAGS"
5521 elif test $with_readdisplay != no; then
5522   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
5523   exit 1
5524 fi
5525
5526
5527 # check for SGI's Iris Video Library header.
5528 #
5529 have_sgivideo=no
5530 with_sgivideo_req=unspecified
5531 # Check whether --with-sgivideo or --without-sgivideo was given.
5532 if test "${with_sgivideo+set}" = set; then
5533   withval="$with_sgivideo"
5534   with_sgivideo="$withval"; with_sgivideo_req="$withval"
5535 else
5536   with_sgivideo=yes
5537 fi
5538
5539
5540
5541    case "$with_sgivideo" in
5542     yes) ;;
5543     no)  ;;
5544
5545     /*)
5546      echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
5547 echo "configure:5559: checking for Iris Video headers" >&5
5548      d=$with_sgivideo/include
5549      if test -d $d; then
5550        X_CFLAGS="-I$d $X_CFLAGS"
5551        echo "$ac_t""$d" 1>&6
5552      else
5553        echo "$ac_t""not found ($d: no such directory)" 1>&6
5554      fi
5555
5556      echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
5557 echo "configure:5569: checking for Iris Video libs" >&5
5558      d=$with_sgivideo/lib
5559      if test -d $d; then
5560        X_LIBS="-L$d $X_LIBS"
5561        echo "$ac_t""$d" 1>&6
5562      else
5563        echo "$ac_t""not found ($d: no such directory)" 1>&6
5564      fi
5565
5566      # replace the directory string with "yes".
5567      with_sgivideo_req="yes"
5568      with_sgivideo=$with_sgivideo_req
5569      ;;
5570
5571     *)
5572      echo ""
5573      echo "error: argument to --with-sgivideo must be \"yes\", \"no\", or a directory."
5574      echo "       If it is a directory, then \`DIR/include' will be added to"
5575      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
5576      exit 1
5577      ;;
5578    esac
5579
5580    # why is this necessary?
5581    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
5582    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
5583    withval=
5584   
5585
5586 if test $with_sgivideo = yes; then
5587   
5588   ac_save_CPPFLAGS="$CPPFLAGS"
5589   if test \! -z "$includedir" ; then 
5590     CPPFLAGS="$CPPFLAGS -I$includedir"
5591   fi
5592   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5593   ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
5594 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
5595 echo "configure:5607: checking for dmedia/vl.h" >&5
5596 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5597   echo $ac_n "(cached) $ac_c" 1>&6
5598 else
5599   cat > conftest.$ac_ext <<EOF
5600 #line 5612 "configure"
5601 #include "confdefs.h"
5602 #include <dmedia/vl.h>
5603 EOF
5604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5605 { (eval echo configure:5617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5606 ac_err=`grep -v '^ *+' conftest.out`
5607 if test -z "$ac_err"; then
5608   rm -rf conftest*
5609   eval "ac_cv_header_$ac_safe=yes"
5610 else
5611   echo "$ac_err" >&5
5612   echo "configure: failed program was:" >&5
5613   cat conftest.$ac_ext >&5
5614   rm -rf conftest*
5615   eval "ac_cv_header_$ac_safe=no"
5616 fi
5617 rm -f conftest*
5618 fi
5619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5620   echo "$ac_t""yes" 1>&6
5621   have_sgivideo=yes
5622 else
5623   echo "$ac_t""no" 1>&6
5624 fi
5625
5626   CPPFLAGS="$ac_save_CPPFLAGS"
5627   if test $have_sgivideo = yes; then
5628     have_sgivideo=no
5629     echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
5630 echo "configure:5642: checking for vlOpenVideo in -lvl" >&5
5631 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
5632 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5633   echo $ac_n "(cached) $ac_c" 1>&6
5634 else
5635   ac_save_LIBS="$LIBS"
5636 LIBS="-lvl  $LIBS"
5637 cat > conftest.$ac_ext <<EOF
5638 #line 5650 "configure"
5639 #include "confdefs.h"
5640 /* Override any gcc2 internal prototype to avoid an error.  */
5641 /* We use char because int might match the return type of a gcc2
5642     builtin and then its argument prototype would still apply.  */
5643 char vlOpenVideo();
5644
5645 int main() {
5646 vlOpenVideo()
5647 ; return 0; }
5648 EOF
5649 if { (eval echo configure:5661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5650   rm -rf conftest*
5651   eval "ac_cv_lib_$ac_lib_var=yes"
5652 else
5653   echo "configure: failed program was:" >&5
5654   cat conftest.$ac_ext >&5
5655   rm -rf conftest*
5656   eval "ac_cv_lib_$ac_lib_var=no"
5657 fi
5658 rm -f conftest*
5659 LIBS="$ac_save_LIBS"
5660
5661 fi
5662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5663   echo "$ac_t""yes" 1>&6
5664   have_sgivideo=yes
5665 else
5666   echo "$ac_t""no" 1>&6
5667 fi
5668
5669     if test $have_sgivideo = yes; then
5670       SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o"
5671       SGI_VIDEO_LIBS="-lvl"
5672       cat >> confdefs.h <<\EOF
5673 #define HAVE_SGI_VIDEO 1
5674 EOF
5675
5676     fi
5677   fi
5678 elif test $with_sgivideo != no; then
5679   echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
5680   exit 1
5681 fi
5682
5683
5684
5685 # Try to find a program to generate random text.
5686 #
5687 # Zippy is funnier than the idiocy generally spat out by `fortune',
5688 # so try to find that, by invoking Emacs and asking it where its 
5689 # libexec directory is ("yow" lives in there.)
5690 #
5691 # If that doesn't work, see if fortune, zippy, or yow are on $PATH,
5692 # and if so, use them.
5693 #
5694 # If that doesn't work, look in /usr/games, and if it's there, use
5695 # the full pathname.
5696 #
5697 with_zippy_req=""
5698 # Check whether --with-zippy or --without-zippy was given.
5699 if test "${with_zippy+set}" = set; then
5700   withval="$with_zippy"
5701    with_zippy_req="$withval"; with_zippy="$withval" 
5702 else
5703    with_zippy_req="$withval"; with_zippy="$withval" 
5704 fi
5705
5706
5707 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
5708   with_zippy=""
5709   with_zippy_req=""
5710 fi
5711
5712 if test -n "$with_zippy_req" ; then
5713   ac_cv_zippy_program=""
5714   case "$with_zippy_req" in
5715     /*)
5716       echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
5717 echo "configure:5729: checking for $with_zippy_req" >&5
5718       if test -x "$with_zippy_req" ; then
5719         echo "$ac_t""yes" 1>&6
5720       else
5721         echo "$ac_t""no" 1>&6
5722         with_zippy=""
5723       fi
5724     ;;
5725     *)
5726       # don't cache
5727       unset ac_cv_path_zip2
5728       # Extract the first word of "$with_zippy_req", so it can be a program name with args.
5729 set dummy $with_zippy_req; ac_word=$2
5730 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5731 echo "configure:5743: checking for $ac_word" >&5
5732 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
5733   echo $ac_n "(cached) $ac_c" 1>&6
5734 else
5735   case "$zip2" in
5736   /*)
5737   ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
5738   ;;
5739   *)
5740   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5741   for ac_dir in $PATH; do
5742     test -z "$ac_dir" && ac_dir=.
5743     if test -f $ac_dir/$ac_word; then
5744       ac_cv_path_zip2="$ac_dir/$ac_word"
5745       break
5746     fi
5747   done
5748   IFS="$ac_save_ifs"
5749   ;;
5750 esac
5751 fi
5752 zip2="$ac_cv_path_zip2"
5753 if test -n "$zip2"; then
5754   echo "$ac_t""$zip2" 1>&6
5755 else
5756   echo "$ac_t""no" 1>&6
5757 fi
5758
5759       if test "$zip2" = ""; then
5760         with_zippy=""
5761       fi
5762     ;;
5763   esac
5764   ac_cv_zippy_program="$with_zippy"
5765
5766 elif test -n "$ac_cv_zippy_program"; then
5767   echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
5768 fi
5769
5770 if test ! -n "$ac_cv_zippy_program"; then
5771
5772   for ac_prog in emacs
5773 do
5774 # Extract the first word of "$ac_prog", so it can be a program name with args.
5775 set dummy $ac_prog; ac_word=$2
5776 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5777 echo "configure:5789: checking for $ac_word" >&5
5778 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
5779   echo $ac_n "(cached) $ac_c" 1>&6
5780 else
5781   if test -n "$emacs_exe"; then
5782   ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
5783 else
5784   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5785   for ac_dir in $PATH; do
5786     test -z "$ac_dir" && ac_dir=.
5787     if test -f $ac_dir/$ac_word; then
5788       ac_cv_prog_emacs_exe="$ac_prog"
5789       break
5790     fi
5791   done
5792   IFS="$ac_save_ifs"
5793 fi
5794 fi
5795 emacs_exe="$ac_cv_prog_emacs_exe"
5796 if test -n "$emacs_exe"; then
5797   echo "$ac_t""$emacs_exe" 1>&6
5798 else
5799   echo "$ac_t""no" 1>&6
5800 fi
5801
5802 test -n "$emacs_exe" && break
5803 done
5804
5805   for ac_prog in xemacs
5806 do
5807 # Extract the first word of "$ac_prog", so it can be a program name with args.
5808 set dummy $ac_prog; ac_word=$2
5809 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5810 echo "configure:5822: checking for $ac_word" >&5
5811 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
5812   echo $ac_n "(cached) $ac_c" 1>&6
5813 else
5814   if test -n "$xemacs_exe"; then
5815   ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
5816 else
5817   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5818   for ac_dir in $PATH; do
5819     test -z "$ac_dir" && ac_dir=.
5820     if test -f $ac_dir/$ac_word; then
5821       ac_cv_prog_xemacs_exe="$ac_prog"
5822       break
5823     fi
5824   done
5825   IFS="$ac_save_ifs"
5826 fi
5827 fi
5828 xemacs_exe="$ac_cv_prog_xemacs_exe"
5829 if test -n "$xemacs_exe"; then
5830   echo "$ac_t""$xemacs_exe" 1>&6
5831 else
5832   echo "$ac_t""no" 1>&6
5833 fi
5834
5835 test -n "$xemacs_exe" && break
5836 done
5837
5838
5839   ac_cv_zippy_program=""
5840   eargs='-batch -q -nw --eval'
5841
5842   if test -n "$emacs_exe" ; then
5843     echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
5844 echo "configure:5856: checking for emacs yow" >&5
5845     #
5846     # get emacs to tell us where the libexec directory is.
5847     #
5848     dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
5849          2>/dev/null | tail -1`
5850     dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
5851     #
5852     # try running libexec/yow and see if it exits without error.
5853     #
5854     if test x"$dir" != x -a -x $dir/yow ; then
5855       if $dir/yow >&- 2>&- ; then
5856         ac_cv_zippy_program="$dir/yow"
5857         echo "$ac_t""$ac_cv_zippy_program" 1>&6
5858       else
5859         echo "$ac_t""no" 1>&6
5860       fi
5861     fi
5862   fi
5863
5864   if test -z "$ac_cv_zippy_program" ; then
5865     echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
5866 echo "configure:5878: checking for xemacs yow" >&5
5867     if test -n "$xemacs_exe" ; then
5868       #
5869       # get xemacs to tell us where the libexec directory is.
5870       #
5871       dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
5872            2>/dev/null | tail -1`
5873       dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
5874       #
5875       # try running libexec/yow and see if it exits without error.
5876       #
5877       if test x"$dir" != x -a -x $dir/yow ; then
5878         if $dir/yow >&- 2>&- ; then
5879           ac_cv_zippy_program="$dir/yow"
5880           echo "$ac_t""$ac_cv_zippy_program" 1>&6
5881         else
5882           #
5883           # in some xemacs installations, the pathname of the yow.lines file
5884           # isn't hardcoded into the yow executable, and must be passed on 
5885           # the command line.  See if it's in libexec/../etc/.
5886
5887           # M4 sucks!!
5888           
5889           dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
5890           
5891
5892           yow="yow -f $dir_up/etc/yow.lines"
5893           if $dir/$yow >&- 2>&- ; then
5894             ac_cv_zippy_program="$dir/$yow"
5895             echo "$ac_t""$ac_cv_zippy_program" 1>&6
5896           else
5897             echo "$ac_t""no" 1>&6
5898           fi
5899         fi
5900       fi
5901     fi
5902   fi
5903
5904   # if that didn't work, try for some other programs...
5905   if test -z "$ac_cv_zippy_program" ; then
5906     fortune=''
5907     for ac_prog in fortune zippy yow
5908 do
5909 # Extract the first word of "$ac_prog", so it can be a program name with args.
5910 set dummy $ac_prog; ac_word=$2
5911 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5912 echo "configure:5924: checking for $ac_word" >&5
5913 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
5914   echo $ac_n "(cached) $ac_c" 1>&6
5915 else
5916   if test -n "$fortune"; then
5917   ac_cv_prog_fortune="$fortune" # Let the user override the test.
5918 else
5919   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5920   for ac_dir in $PATH; do
5921     test -z "$ac_dir" && ac_dir=.
5922     if test -f $ac_dir/$ac_word; then
5923       ac_cv_prog_fortune="$ac_prog"
5924       break
5925     fi
5926   done
5927   IFS="$ac_save_ifs"
5928 fi
5929 fi
5930 fortune="$ac_cv_prog_fortune"
5931 if test -n "$fortune"; then
5932   echo "$ac_t""$fortune" 1>&6
5933 else
5934   echo "$ac_t""no" 1>&6
5935 fi
5936
5937 test -n "$fortune" && break
5938 done
5939
5940     # if that didn't work, try for those programs in /usr/games...
5941     if test -z "$fortune" ; then
5942       for ac_prog in fortune zippy yow
5943 do
5944 # Extract the first word of "$ac_prog", so it can be a program name with args.
5945 set dummy $ac_prog; ac_word=$2
5946 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5947 echo "configure:5959: checking for $ac_word" >&5
5948 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
5949   echo $ac_n "(cached) $ac_c" 1>&6
5950 else
5951   case "$fortune" in
5952   /*)
5953   ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
5954   ;;
5955   *)
5956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5957   for ac_dir in /usr/games:/usr/local/games$ac_dummy; do
5958     test -z "$ac_dir" && ac_dir=.
5959     if test -f $ac_dir/$ac_word; then
5960       ac_cv_path_fortune="$ac_dir/$ac_word"
5961       break
5962     fi
5963   done
5964   IFS="$ac_save_ifs"
5965   ;;
5966 esac
5967 fi
5968 fortune="$ac_cv_path_fortune"
5969 if test -n "$fortune"; then
5970   echo "$ac_t""$fortune" 1>&6
5971 else
5972   echo "$ac_t""no" 1>&6
5973 fi
5974
5975 test -n "$fortune" && break
5976 done
5977 test -n "$fortune" || fortune="fortune"
5978
5979     fi
5980   fi
5981 fi
5982
5983 if test -z "$ac_cv_zippy_program" ; then
5984   ac_cv_zippy_program=fortune
5985 fi
5986
5987 cat >> confdefs.h <<EOF
5988 #define ZIPPY_PROGRAM "$ac_cv_zippy_program"
5989 EOF
5990
5991
5992
5993
5994
5995 # Allow locking to be disabled at compile-time.
5996 #
5997 have_kerberos=no
5998 with_kerberos_req=unspecified
5999 have_shadow=no
6000 with_shadow_req=unspecified
6001 need_setuid=no
6002
6003 # Check whether --enable-locking or --disable-locking was given.
6004 if test "${enable_locking+set}" = set; then
6005   enableval="$enable_locking"
6006   enable_locking="$enableval"
6007 else
6008   enable_locking=yes
6009 fi
6010
6011 if test $enable_locking = yes; then
6012   true
6013 elif test $enable_locking = no; then
6014   cat >> confdefs.h <<\EOF
6015 #define NO_LOCKING 1
6016 EOF
6017
6018 else
6019   echo "error: must be yes or no: --enable-locking=$enable_locking"
6020   exit 1
6021 fi
6022
6023
6024
6025 # Check to see if we can lock Virtual-Terminal switching, but allow that 
6026 # to be disabled at compile-time.
6027 #
6028 ac_vt_lockswitch=no
6029 # Check whether --enable-vt-locking or --disable-vt-locking was given.
6030 if test "${enable_vt_locking+set}" = set; then
6031   enableval="$enable_vt_locking"
6032   enable_vt_locking="$enableval"
6033 else
6034   enable_vt_locking=yes
6035 fi
6036
6037 if test $enable_vt_locking = yes; then
6038
6039   echo $ac_n "checking for VT_LOCKSWITCH ioctl""... $ac_c" 1>&6
6040 echo "configure:6052: checking for VT_LOCKSWITCH ioctl" >&5
6041   if eval "test \"`echo '$''{'ac_cv_vt_lockswitch'+set}'`\" = set"; then
6042   echo $ac_n "(cached) $ac_c" 1>&6
6043 else
6044   cat > conftest.$ac_ext <<EOF
6045 #line 6057 "configure"
6046 #include "confdefs.h"
6047 #include <fcntl.h>
6048                     #include <sys/ioctl.h>
6049                     #include <sys/vt.h>
6050 int main() {
6051 int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;
6052 ; return 0; }
6053 EOF
6054 if { (eval echo configure:6066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6055   rm -rf conftest*
6056   ac_cv_vt_lockswitch=yes
6057 else
6058   echo "configure: failed program was:" >&5
6059   cat conftest.$ac_ext >&5
6060   rm -rf conftest*
6061   ac_cv_vt_lockswitch=no
6062 fi
6063 rm -f conftest*
6064 fi
6065
6066   ac_vt_lockswitch=$ac_cv_vt_lockswitch
6067   echo "$ac_t""$ac_vt_lockswitch" 1>&6
6068
6069 elif test $enable_locking = no; then
6070   true
6071 else
6072   echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
6073   exit 1
6074 fi
6075
6076 if test $ac_vt_lockswitch = yes; then
6077   cat >> confdefs.h <<\EOF
6078 #define HAVE_VT_LOCKSWITCH 1
6079 EOF
6080
6081   # the VT_LOCKSWITCH ioctl can only be used when running as root.
6082   need_setuid=yes
6083 fi
6084
6085
6086
6087 if test $enable_locking = yes; then
6088
6089   # Check for Kerberos.
6090   #
6091   # Check whether --with-kerberos or --without-kerberos was given.
6092 if test "${with_kerberos+set}" = set; then
6093   withval="$with_kerberos"
6094   with_kerberos="$withval"; with_kerberos_req="$withval"
6095 else
6096   with_kerberos=yes
6097 fi
6098
6099
6100   
6101    case "$with_kerberos" in
6102     yes) ;;
6103     no)  ;;
6104
6105     /*)
6106      echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
6107 echo "configure:6119: checking for Kerberos headers" >&5
6108      d=$with_kerberos/include
6109      if test -d $d; then
6110        X_CFLAGS="-I$d $X_CFLAGS"
6111        echo "$ac_t""$d" 1>&6
6112      else
6113        echo "$ac_t""not found ($d: no such directory)" 1>&6
6114      fi
6115
6116      echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
6117 echo "configure:6129: checking for Kerberos libs" >&5
6118      d=$with_kerberos/lib
6119      if test -d $d; then
6120        X_LIBS="-L$d $X_LIBS"
6121        echo "$ac_t""$d" 1>&6
6122      else
6123        echo "$ac_t""not found ($d: no such directory)" 1>&6
6124      fi
6125
6126      # replace the directory string with "yes".
6127      with_kerberos_req="yes"
6128      with_kerberos=$with_kerberos_req
6129      ;;
6130
6131     *)
6132      echo ""
6133      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
6134      echo "       If it is a directory, then \`DIR/include' will be added to"
6135      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
6136      exit 1
6137      ;;
6138    esac
6139
6140    # why is this necessary?
6141    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6142    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6143    withval=
6144   
6145
6146   if test $with_kerberos = yes; then
6147     echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
6148 echo "configure:6160: checking for Kerberos" >&5
6149 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
6150   echo $ac_n "(cached) $ac_c" 1>&6
6151 else
6152   
6153   ac_save_CPPFLAGS="$CPPFLAGS"
6154   if test \! -z "$includedir" ; then 
6155     CPPFLAGS="$CPPFLAGS -I$includedir"
6156   fi
6157   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6158   cat > conftest.$ac_ext <<EOF
6159 #line 6171 "configure"
6160 #include "confdefs.h"
6161 #include <krb.h>
6162 int main() {
6163
6164 ; return 0; }
6165 EOF
6166 if { (eval echo configure:6178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6167   rm -rf conftest*
6168   ac_cv_kerberos=yes
6169 else
6170   echo "configure: failed program was:" >&5
6171   cat conftest.$ac_ext >&5
6172   rm -rf conftest*
6173   ac_cv_kerberos=no
6174 fi
6175 rm -f conftest*
6176   CPPFLAGS="$ac_save_CPPFLAGS"
6177 fi
6178
6179 echo "$ac_t""$ac_cv_kerberos" 1>&6
6180     if test $ac_cv_kerberos = yes ; then
6181       have_kerberos=yes
6182       cat >> confdefs.h <<\EOF
6183 #define HAVE_KERBEROS 1
6184 EOF
6185
6186
6187       # from Tim Showalter <tjs+@andrew.cmu.edu>
6188       PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
6189       echo $ac_n "checking for res_search""... $ac_c" 1>&6
6190 echo "configure:6202: checking for res_search" >&5
6191 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
6192   echo $ac_n "(cached) $ac_c" 1>&6
6193 else
6194   cat > conftest.$ac_ext <<EOF
6195 #line 6207 "configure"
6196 #include "confdefs.h"
6197 /* System header to define __stub macros and hopefully few prototypes,
6198     which can conflict with char res_search(); below.  */
6199 #include <assert.h>
6200 /* Override any gcc2 internal prototype to avoid an error.  */
6201 /* We use char because int might match the return type of a gcc2
6202     builtin and then its argument prototype would still apply.  */
6203 char res_search();
6204
6205 int main() {
6206
6207 /* The GNU C library defines this for functions which it implements
6208     to always fail with ENOSYS.  Some functions are actually named
6209     something starting with __ and the normal name is an alias.  */
6210 #if defined (__stub_res_search) || defined (__stub___res_search)
6211 choke me
6212 #else
6213 res_search();
6214 #endif
6215
6216 ; return 0; }
6217 EOF
6218 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6219   rm -rf conftest*
6220   eval "ac_cv_func_res_search=yes"
6221 else
6222   echo "configure: failed program was:" >&5
6223   cat conftest.$ac_ext >&5
6224   rm -rf conftest*
6225   eval "ac_cv_func_res_search=no"
6226 fi
6227 rm -f conftest*
6228 fi
6229
6230 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
6231   echo "$ac_t""yes" 1>&6
6232   :
6233 else
6234   echo "$ac_t""no" 1>&6
6235 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
6236 echo "configure:6248: checking for res_search in -lresolv" >&5
6237 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
6238 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6239   echo $ac_n "(cached) $ac_c" 1>&6
6240 else
6241   ac_save_LIBS="$LIBS"
6242 LIBS="-lresolv  $LIBS"
6243 cat > conftest.$ac_ext <<EOF
6244 #line 6256 "configure"
6245 #include "confdefs.h"
6246 /* Override any gcc2 internal prototype to avoid an error.  */
6247 /* We use char because int might match the return type of a gcc2
6248     builtin and then its argument prototype would still apply.  */
6249 char res_search();
6250
6251 int main() {
6252 res_search()
6253 ; return 0; }
6254 EOF
6255 if { (eval echo configure:6267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6256   rm -rf conftest*
6257   eval "ac_cv_lib_$ac_lib_var=yes"
6258 else
6259   echo "configure: failed program was:" >&5
6260   cat conftest.$ac_ext >&5
6261   rm -rf conftest*
6262   eval "ac_cv_lib_$ac_lib_var=no"
6263 fi
6264 rm -f conftest*
6265 LIBS="$ac_save_LIBS"
6266
6267 fi
6268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6269   echo "$ac_t""yes" 1>&6
6270   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
6271 else
6272   echo "$ac_t""no" 1>&6
6273 echo "configure: warning: Can't find DNS resolver libraries needed for Kerberos" 1>&2
6274         
6275 fi
6276
6277 fi
6278
6279
6280     fi
6281   elif test $with_kerberos != no; then
6282     echo "error: must be yes or no: --with-kerberos=$with_kerberos"
6283     exit 1
6284   fi
6285
6286   # Next, check for the nine billion variants of shadow passwords...
6287
6288   passwd_cruft_done=no
6289   # Check whether --with-shadow or --without-shadow was given.
6290 if test "${with_shadow+set}" = set; then
6291   withval="$with_shadow"
6292   with_shadow="$withval"; with_shadow_req="$withval"
6293 else
6294   with_shadow=yes
6295 fi
6296
6297
6298   
6299    case "$with_shadow" in
6300     yes) ;;
6301     no)  ;;
6302
6303     /*)
6304      echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
6305 echo "configure:6317: checking for shadow password headers" >&5
6306      d=$with_shadow/include
6307      if test -d $d; then
6308        X_CFLAGS="-I$d $X_CFLAGS"
6309        echo "$ac_t""$d" 1>&6
6310      else
6311        echo "$ac_t""not found ($d: no such directory)" 1>&6
6312      fi
6313
6314      echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
6315 echo "configure:6327: checking for shadow password libs" >&5
6316      d=$with_shadow/lib
6317      if test -d $d; then
6318        X_LIBS="-L$d $X_LIBS"
6319        echo "$ac_t""$d" 1>&6
6320      else
6321        echo "$ac_t""not found ($d: no such directory)" 1>&6
6322      fi
6323
6324      # replace the directory string with "yes".
6325      with_shadow_req="yes"
6326      with_shadow=$with_shadow_req
6327      ;;
6328
6329     *)
6330      echo ""
6331      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
6332      echo "       If it is a directory, then \`DIR/include' will be added to"
6333      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
6334      exit 1
6335      ;;
6336    esac
6337
6338    # why is this necessary?
6339    # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
6340    # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
6341    withval=
6342   
6343
6344   if test $with_shadow = no; then
6345     passwd_cruft_done=yes
6346   elif test $with_shadow != yes; then
6347     echo "error: must be yes or no: --with-shadow=$with_shadow"
6348     exit 1
6349   fi
6350
6351
6352   # Sun's "adjunct" passwords.
6353   #
6354   if test $passwd_cruft_done = no ; then
6355     echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
6356 echo "configure:6368: checking for Sun-style shadow passwords" >&5
6357 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
6358   echo $ac_n "(cached) $ac_c" 1>&6
6359 else
6360   
6361   ac_save_CPPFLAGS="$CPPFLAGS"
6362   if test \! -z "$includedir" ; then 
6363     CPPFLAGS="$CPPFLAGS -I$includedir"
6364   fi
6365   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6366   cat > conftest.$ac_ext <<EOF
6367 #line 6379 "configure"
6368 #include "confdefs.h"
6369 #include <stdlib.h>
6370                                       #include <unistd.h>
6371                                       #include <sys/types.h>
6372                                       #include <sys/label.h>
6373                                       #include <sys/audit.h>
6374                                       #include <pwdadj.h>
6375 int main() {
6376 struct passwd_adjunct *p = getpwanam("nobody");
6377                          const char *pw = p->pwa_passwd;
6378 ; return 0; }
6379 EOF
6380 if { (eval echo configure:6392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6381   rm -rf conftest*
6382   ac_cv_sun_adjunct=yes
6383 else
6384   echo "configure: failed program was:" >&5
6385   cat conftest.$ac_ext >&5
6386   rm -rf conftest*
6387   ac_cv_sun_adjunct=no
6388 fi
6389 rm -f conftest*
6390   CPPFLAGS="$ac_save_CPPFLAGS"
6391 fi
6392
6393 echo "$ac_t""$ac_cv_sun_adjunct" 1>&6
6394     if test $ac_cv_sun_adjunct = yes; then
6395       have_shadow=yes
6396       need_setuid=yes
6397       passwd_cruft_done=yes
6398       cat >> confdefs.h <<\EOF
6399 #define HAVE_ADJUNCT_PASSWD 1
6400 EOF
6401
6402     fi
6403   fi
6404
6405   # DEC and SCO so-called "enhanced" security.
6406   #
6407   if test $passwd_cruft_done = no ; then
6408     echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
6409 echo "configure:6421: checking for DEC-style shadow passwords" >&5
6410 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
6411   echo $ac_n "(cached) $ac_c" 1>&6
6412 else
6413   
6414   ac_save_CPPFLAGS="$CPPFLAGS"
6415   if test \! -z "$includedir" ; then 
6416     CPPFLAGS="$CPPFLAGS -I$includedir"
6417   fi
6418   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6419   cat > conftest.$ac_ext <<EOF
6420 #line 6432 "configure"
6421 #include "confdefs.h"
6422 #include <stdlib.h>
6423                                       #include <unistd.h>
6424                                       #include <sys/types.h>
6425                                       #include <pwd.h>
6426                                       #include <sys/security.h>
6427                                       #include <prot.h>
6428 int main() {
6429 struct pr_passwd *p;
6430                          const char *pw;
6431                          set_auth_parameters(0, 0);
6432                          check_auth_parameters();
6433                          p = getprpwnam("nobody");
6434                          pw = p->ufld.fd_encrypt;
6435 ; return 0; }
6436 EOF
6437 if { (eval echo configure:6449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6438   rm -rf conftest*
6439   ac_cv_enhanced_passwd=yes
6440 else
6441   echo "configure: failed program was:" >&5
6442   cat conftest.$ac_ext >&5
6443   rm -rf conftest*
6444   ac_cv_enhanced_passwd=no
6445 fi
6446 rm -f conftest*
6447   CPPFLAGS="$ac_save_CPPFLAGS"
6448 fi
6449
6450 echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
6451     if test $ac_cv_enhanced_passwd = yes; then
6452       have_shadow=yes
6453       need_setuid=yes
6454       passwd_cruft_done=yes
6455       cat >> confdefs.h <<\EOF
6456 #define HAVE_ENHANCED_PASSWD 1
6457 EOF
6458
6459
6460       # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
6461       # (I'm told it needs -lcurses too, but I don't understand why.)
6462       echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
6463 echo "configure:6475: checking for getprpwnam in -lprot" >&5
6464 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
6465 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6466   echo $ac_n "(cached) $ac_c" 1>&6
6467 else
6468   ac_save_LIBS="$LIBS"
6469 LIBS="-lprot -lx $LIBS"
6470 cat > conftest.$ac_ext <<EOF
6471 #line 6483 "configure"
6472 #include "confdefs.h"
6473 /* Override any gcc2 internal prototype to avoid an error.  */
6474 /* We use char because int might match the return type of a gcc2
6475     builtin and then its argument prototype would still apply.  */
6476 char getprpwnam();
6477
6478 int main() {
6479 getprpwnam()
6480 ; return 0; }
6481 EOF
6482 if { (eval echo configure:6494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6483   rm -rf conftest*
6484   eval "ac_cv_lib_$ac_lib_var=yes"
6485 else
6486   echo "configure: failed program was:" >&5
6487   cat conftest.$ac_ext >&5
6488   rm -rf conftest*
6489   eval "ac_cv_lib_$ac_lib_var=no"
6490 fi
6491 rm -f conftest*
6492 LIBS="$ac_save_LIBS"
6493
6494 fi
6495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6496   echo "$ac_t""yes" 1>&6
6497   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
6498 else
6499   echo "$ac_t""no" 1>&6
6500 # On DEC, getprpwnam() is in -lsecurity
6501                     echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
6502 echo "configure:6514: checking for getprpwnam in -lsecurity" >&5
6503 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
6504 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6505   echo $ac_n "(cached) $ac_c" 1>&6
6506 else
6507   ac_save_LIBS="$LIBS"
6508 LIBS="-lsecurity  $LIBS"
6509 cat > conftest.$ac_ext <<EOF
6510 #line 6522 "configure"
6511 #include "confdefs.h"
6512 /* Override any gcc2 internal prototype to avoid an error.  */
6513 /* We use char because int might match the return type of a gcc2
6514     builtin and then its argument prototype would still apply.  */
6515 char getprpwnam();
6516
6517 int main() {
6518 getprpwnam()
6519 ; return 0; }
6520 EOF
6521 if { (eval echo configure:6533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6522   rm -rf conftest*
6523   eval "ac_cv_lib_$ac_lib_var=yes"
6524 else
6525   echo "configure: failed program was:" >&5
6526   cat conftest.$ac_ext >&5
6527   rm -rf conftest*
6528   eval "ac_cv_lib_$ac_lib_var=no"
6529 fi
6530 rm -f conftest*
6531 LIBS="$ac_save_LIBS"
6532
6533 fi
6534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6535   echo "$ac_t""yes" 1>&6
6536   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
6537 else
6538   echo "$ac_t""no" 1>&6
6539 fi
6540
6541 fi
6542
6543     fi
6544   fi
6545
6546   # HP's entry in the "Not Invented Here" Sweepstakes.
6547   #
6548   if test $passwd_cruft_done = no ; then
6549     echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
6550 echo "configure:6562: checking for HP-style shadow passwords" >&5
6551 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
6552   echo $ac_n "(cached) $ac_c" 1>&6
6553 else
6554   
6555   ac_save_CPPFLAGS="$CPPFLAGS"
6556   if test \! -z "$includedir" ; then 
6557     CPPFLAGS="$CPPFLAGS -I$includedir"
6558   fi
6559   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6560   cat > conftest.$ac_ext <<EOF
6561 #line 6573 "configure"
6562 #include "confdefs.h"
6563 #include <stdlib.h>
6564                                       #include <unistd.h>
6565                                       #include <sys/types.h>
6566                                       #include <pwd.h>
6567                                       #include <hpsecurity.h>
6568                                       #include <prot.h>
6569 int main() {
6570 struct s_passwd *p = getspwnam("nobody");
6571                          const char *pw = p->pw_passwd;
6572 ; return 0; }
6573 EOF
6574 if { (eval echo configure:6586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6575   rm -rf conftest*
6576   ac_cv_hpux_passwd=yes
6577 else
6578   echo "configure: failed program was:" >&5
6579   cat conftest.$ac_ext >&5
6580   rm -rf conftest*
6581   ac_cv_hpux_passwd=no
6582 fi
6583 rm -f conftest*
6584   CPPFLAGS="$ac_save_CPPFLAGS"
6585 fi
6586
6587 echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
6588     if test $ac_cv_hpux_passwd = yes; then
6589       have_shadow=yes
6590       need_setuid=yes
6591       passwd_cruft_done=yes
6592       cat >> confdefs.h <<\EOF
6593 #define HAVE_HPUX_PASSWD 1
6594 EOF
6595
6596
6597       # on HPUX, bigcrypt is in -lsec
6598       echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
6599 echo "configure:6611: checking for bigcrypt in -lsec" >&5
6600 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
6601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6602   echo $ac_n "(cached) $ac_c" 1>&6
6603 else
6604   ac_save_LIBS="$LIBS"
6605 LIBS="-lsec  $LIBS"
6606 cat > conftest.$ac_ext <<EOF
6607 #line 6619 "configure"
6608 #include "confdefs.h"
6609 /* Override any gcc2 internal prototype to avoid an error.  */
6610 /* We use char because int might match the return type of a gcc2
6611     builtin and then its argument prototype would still apply.  */
6612 char bigcrypt();
6613
6614 int main() {
6615 bigcrypt()
6616 ; return 0; }
6617 EOF
6618 if { (eval echo configure:6630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6619   rm -rf conftest*
6620   eval "ac_cv_lib_$ac_lib_var=yes"
6621 else
6622   echo "configure: failed program was:" >&5
6623   cat conftest.$ac_ext >&5
6624   rm -rf conftest*
6625   eval "ac_cv_lib_$ac_lib_var=no"
6626 fi
6627 rm -f conftest*
6628 LIBS="$ac_save_LIBS"
6629
6630 fi
6631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6632   echo "$ac_t""yes" 1>&6
6633   PASSWD_LIBS="$PASSWD_LIBS -lsec"
6634 else
6635   echo "$ac_t""no" 1>&6
6636 fi
6637
6638     fi
6639   fi
6640
6641   # Traditional (ha!) shadow passwords.
6642   #
6643   if test $passwd_cruft_done = no ; then
6644     echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
6645 echo "configure:6657: checking for generic shadow passwords" >&5
6646 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
6647   echo $ac_n "(cached) $ac_c" 1>&6
6648 else
6649   
6650   ac_save_CPPFLAGS="$CPPFLAGS"
6651   if test \! -z "$includedir" ; then 
6652     CPPFLAGS="$CPPFLAGS -I$includedir"
6653   fi
6654   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6655   cat > conftest.$ac_ext <<EOF
6656 #line 6668 "configure"
6657 #include "confdefs.h"
6658 #include <stdlib.h>
6659                                       #include <unistd.h>
6660                                       #include <sys/types.h>
6661                                       #include <pwd.h>
6662                                       #include <shadow.h>
6663 int main() {
6664 struct spwd *p = getspnam("nobody");
6665                          const char *pw = p->sp_pwdp;
6666 ; return 0; }
6667 EOF
6668 if { (eval echo configure:6680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6669   rm -rf conftest*
6670   ac_cv_shadow=yes
6671 else
6672   echo "configure: failed program was:" >&5
6673   cat conftest.$ac_ext >&5
6674   rm -rf conftest*
6675   ac_cv_shadow=no
6676 fi
6677 rm -f conftest*
6678   CPPFLAGS="$ac_save_CPPFLAGS"
6679 fi
6680
6681 echo "$ac_t""$ac_cv_shadow" 1>&6
6682     if test $ac_cv_shadow = yes; then
6683       have_shadow=yes
6684       need_setuid=yes
6685       passwd_cruft_done=yes
6686       cat >> confdefs.h <<\EOF
6687 #define HAVE_SHADOW_PASSWD 1
6688 EOF
6689
6690
6691       # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
6692       have_getspnam=no
6693       echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
6694 echo "configure:6706: checking for getspnam in -lc" >&5
6695 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
6696 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6697   echo $ac_n "(cached) $ac_c" 1>&6
6698 else
6699   ac_save_LIBS="$LIBS"
6700 LIBS="-lc  $LIBS"
6701 cat > conftest.$ac_ext <<EOF
6702 #line 6714 "configure"
6703 #include "confdefs.h"
6704 /* Override any gcc2 internal prototype to avoid an error.  */
6705 /* We use char because int might match the return type of a gcc2
6706     builtin and then its argument prototype would still apply.  */
6707 char getspnam();
6708
6709 int main() {
6710 getspnam()
6711 ; return 0; }
6712 EOF
6713 if { (eval echo configure:6725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6714   rm -rf conftest*
6715   eval "ac_cv_lib_$ac_lib_var=yes"
6716 else
6717   echo "configure: failed program was:" >&5
6718   cat conftest.$ac_ext >&5
6719   rm -rf conftest*
6720   eval "ac_cv_lib_$ac_lib_var=no"
6721 fi
6722 rm -f conftest*
6723 LIBS="$ac_save_LIBS"
6724
6725 fi
6726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6727   echo "$ac_t""yes" 1>&6
6728   have_getspnam=yes
6729 else
6730   echo "$ac_t""no" 1>&6
6731 fi
6732
6733       if test $have_getspnam = no ; then
6734         echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
6735 echo "configure:6747: checking for getspnam in -lgen" >&5
6736 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
6737 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6738   echo $ac_n "(cached) $ac_c" 1>&6
6739 else
6740   ac_save_LIBS="$LIBS"
6741 LIBS="-lgen  $LIBS"
6742 cat > conftest.$ac_ext <<EOF
6743 #line 6755 "configure"
6744 #include "confdefs.h"
6745 /* Override any gcc2 internal prototype to avoid an error.  */
6746 /* We use char because int might match the return type of a gcc2
6747     builtin and then its argument prototype would still apply.  */
6748 char getspnam();
6749
6750 int main() {
6751 getspnam()
6752 ; return 0; }
6753 EOF
6754 if { (eval echo configure:6766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6755   rm -rf conftest*
6756   eval "ac_cv_lib_$ac_lib_var=yes"
6757 else
6758   echo "configure: failed program was:" >&5
6759   cat conftest.$ac_ext >&5
6760   rm -rf conftest*
6761   eval "ac_cv_lib_$ac_lib_var=no"
6762 fi
6763 rm -f conftest*
6764 LIBS="$ac_save_LIBS"
6765
6766 fi
6767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6768   echo "$ac_t""yes" 1>&6
6769   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
6770 else
6771   echo "$ac_t""no" 1>&6
6772 fi
6773
6774       fi
6775     fi
6776   fi
6777
6778   # On FreeBSD, getpwnam() and friends work just like on non-shadow-password
6779   # systems -- except you only get stuff in the pw_passwd field if the running
6780   # program is setuid.  So, guess that we've got this lossage to contend with
6781   # if /etc/master.passwd exists, and default to a setuid installation.
6782   #
6783   if test $passwd_cruft_done = no ; then
6784     echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
6785 echo "configure:6797: checking for FreeBSD-style shadow passwords" >&5
6786 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
6787   echo $ac_n "(cached) $ac_c" 1>&6
6788 else
6789   if test -f /etc/master.passwd ; then
6790                       ac_cv_master_passwd=yes
6791                     else
6792                       ac_cv_master_passwd=no
6793                     fi
6794 fi
6795
6796 echo "$ac_t""$ac_cv_master_passwd" 1>&6
6797     if test $ac_cv_master_passwd = yes; then
6798       need_setuid=yes
6799       passwd_cruft_done=yes
6800     fi
6801   fi
6802
6803   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
6804   have_crypt=no
6805   echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
6806 echo "configure:6818: checking for crypt in -lc" >&5
6807 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
6808 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6809   echo $ac_n "(cached) $ac_c" 1>&6
6810 else
6811   ac_save_LIBS="$LIBS"
6812 LIBS="-lc  $LIBS"
6813 cat > conftest.$ac_ext <<EOF
6814 #line 6826 "configure"
6815 #include "confdefs.h"
6816 /* Override any gcc2 internal prototype to avoid an error.  */
6817 /* We use char because int might match the return type of a gcc2
6818     builtin and then its argument prototype would still apply.  */
6819 char crypt();
6820
6821 int main() {
6822 crypt()
6823 ; return 0; }
6824 EOF
6825 if { (eval echo configure:6837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6826   rm -rf conftest*
6827   eval "ac_cv_lib_$ac_lib_var=yes"
6828 else
6829   echo "configure: failed program was:" >&5
6830   cat conftest.$ac_ext >&5
6831   rm -rf conftest*
6832   eval "ac_cv_lib_$ac_lib_var=no"
6833 fi
6834 rm -f conftest*
6835 LIBS="$ac_save_LIBS"
6836
6837 fi
6838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6839   echo "$ac_t""yes" 1>&6
6840   have_crypt=yes
6841 else
6842   echo "$ac_t""no" 1>&6
6843 fi
6844
6845   if test $have_crypt = no ; then
6846     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6847 echo "configure:6859: checking for crypt in -lcrypt" >&5
6848 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6849 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6850   echo $ac_n "(cached) $ac_c" 1>&6
6851 else
6852   ac_save_LIBS="$LIBS"
6853 LIBS="-lcrypt  $LIBS"
6854 cat > conftest.$ac_ext <<EOF
6855 #line 6867 "configure"
6856 #include "confdefs.h"
6857 /* Override any gcc2 internal prototype to avoid an error.  */
6858 /* We use char because int might match the return type of a gcc2
6859     builtin and then its argument prototype would still apply.  */
6860 char crypt();
6861
6862 int main() {
6863 crypt()
6864 ; return 0; }
6865 EOF
6866 if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6867   rm -rf conftest*
6868   eval "ac_cv_lib_$ac_lib_var=yes"
6869 else
6870   echo "configure: failed program was:" >&5
6871   cat conftest.$ac_ext >&5
6872   rm -rf conftest*
6873   eval "ac_cv_lib_$ac_lib_var=no"
6874 fi
6875 rm -f conftest*
6876 LIBS="$ac_save_LIBS"
6877
6878 fi
6879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6880   echo "$ac_t""yes" 1>&6
6881   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
6882 else
6883   echo "$ac_t""no" 1>&6
6884 fi
6885
6886   fi
6887
6888
6889   # Most of the above shadow mechanisms will have set need_setuid to yes,
6890   # if they were found.  But, on some systems, we need setuid even when
6891   # using plain old vanilla passwords.
6892   #
6893   if test $need_setuid = no ; then
6894     case "$host" in
6895       *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
6896         need_setuid=yes
6897       ;;
6898     esac
6899   fi
6900
6901 fi
6902
6903
6904
6905 if test \! -z "$includedir" ; then 
6906   INCLUDES="-I$includedir"
6907 fi
6908
6909 if test \! -z "$libdir" ; then
6910   LDFLAGS="$LDFLAGS -L$libdir"
6911 fi
6912
6913
6914 ##### should have options to override the DEPEND crap, I guess...
6915 DEPEND=makedepend
6916 DEPEND_FLAGS=
6917 DEPEND_DEFINES=
6918
6919
6920 # Done testing things -- now substitute in some stuff for the Makefiles.
6921 #
6922 if test $have_motif = yes; then
6923   cat >> confdefs.h <<\EOF
6924 #define HAVE_MOTIF 1
6925 EOF
6926
6927   DIALOG_SRCS='$(MOTIF_SRCS)'
6928   DIALOG_OBJS='$(MOTIF_OBJS)'
6929 elif test $have_athena = yes; then
6930   cat >> confdefs.h <<\EOF
6931 #define HAVE_ATHENA 1
6932 EOF
6933
6934   DIALOG_SRCS='$(ATHENA_SRCS)'
6935   DIALOG_OBJS='$(ATHENA_OBJS)'
6936 else
6937   DIALOG_SRCS=''
6938   DIALOG_OBJS=''
6939 fi
6940
6941 if test $have_kerberos = yes; then
6942   PASSWD_SRCS='$(KERBEROS_SRCS)'
6943   PASSWD_OBJS='$(KERBEROS_OBJS)'
6944 else
6945   PASSWD_SRCS='$(PWENT_SRCS)'
6946   PASSWD_OBJS='$(PWENT_OBJS)'
6947 fi
6948
6949 if test $enable_locking = yes; then
6950   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
6951   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
6952 else
6953   LOCK_SRCS=''
6954   LOCK_OBJS=''
6955 fi
6956
6957 if test $need_setuid = yes; then
6958   NEED_SETUID=yes
6959   INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)'
6960 else
6961   NEED_SETUID=no
6962   INSTALL_SETUID='$(INSTALL_PROGRAM)'
6963 fi
6964
6965 tab='   '
6966 if test $have_gl = yes; then
6967   GL_EXES='$(GL_EXES)'
6968   GL_KLUDGE_1=${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}'  \'
6969   GL_KLUDGE_2=${tab}
6970 else
6971   GL_KLUDGE_1=${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}'\n'
6972   GL_KLUDGE_2='!'${tab}
6973 fi
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006 # Print some warnings before emitting the Makefiles.
7007 #
7008 warn_prefix_1="    Warning:"
7009 warn_prefix_2="       Note:"
7010 warn_prefix="$warn_prefix_1"
7011
7012 warning=no
7013 warnsep='    #################################################################'
7014
7015 warnpre() {
7016   if test $warning = no ; then
7017     echo '' ; echo "$warnsep" ; echo ''
7018     warning=yes
7019   fi
7020 }
7021
7022 warn() {
7023   warnpre
7024   if test $warning = long ; then echo '' ; fi
7025   warning=yes
7026   echo "$warn_prefix $@"
7027 }
7028
7029 warnL() {
7030   was=$warning
7031   warnpre
7032   warning=yes
7033   if test $was != no ; then echo '' ; fi
7034   echo "$warn_prefix $@"
7035 }
7036
7037 warn2() {
7038   echo "             $@"
7039   warning=long
7040 }
7041
7042 note() {
7043   warn_prefix="$warn_prefix_2"
7044   warn $@
7045   warn_prefix="$warn_prefix_1"
7046 }
7047
7048 noteL() {
7049   warn_prefix="$warn_prefix_2"
7050   warnL $@
7051   warn_prefix="$warn_prefix_1"
7052 }
7053
7054
7055 if test $with_sgi_req = yes -a $have_sgi = no ; then
7056   warn 'The SGI saver extension was requested, but was not found.'
7057 fi
7058
7059 if test $with_mit_req = yes -a $have_mit = no ; then
7060   warn 'The MIT saver extension was requested, but was not found.'
7061 fi
7062
7063 if test $with_xidle_req = yes -a $have_xidle = no ; then
7064   warn 'The XIdle extension was requested, but was not found.'
7065 fi
7066
7067 if test $with_xshm_req = yes -a $have_xshm = no ; then
7068   warn 'The XSHM extension was requested, but was not found.'
7069 fi
7070
7071 if test $with_sgivc_req = yes -a $have_sgivc = no ; then
7072   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
7073 fi
7074
7075 if test $with_dpms_req = yes -a $have_dpms = no ; then
7076   warn 'The DPMS extension was requested, but was not found.'
7077 fi
7078
7079 if test $have_motif = no -a $have_athena = no ; then
7080   warnL "Neither Motif nor Athena widgets seem to be available;"
7081   warn2 "one or the other is required."
7082   proselytize_motif=no
7083
7084 elif test $with_motif_req = yes -a $have_motif = no ; then
7085   warnL "Use of Motif was requested, but it wasn't found;"
7086   warn2 "Athena will be used instead."
7087
7088 elif test $with_athena_req = yes -a $have_athena = no ; then
7089   warnL "Use of Athena was requested, but it wasn't found;"
7090   warn2 "Motif will be used instead."
7091 fi
7092
7093 if test $have_motif = yes -a $have_lesstif = yes ; then
7094
7095   preferred_lesstif=0.86
7096
7097   if test $lesstif_version = unknown; then
7098     warnL "Unable to determine the LessTif version number!"
7099     warn2 "Make sure you are using version $preferred_lesstif or newer."
7100     warn2 "See <http://www.lesstif.org/>."
7101
7102   elif test \! $lesstif_version -gt 82; then
7103     warnL "LessTif version $lesstif_version_string is being used."
7104     warn2 "LessTif versions 0.82 and earlier are too buggy to"
7105     warn2 "use with XScreenSaver; it is strongly recommended"
7106     warn2 "that you upgrade to at least version $preferred_lesstif!"
7107     warn2 "See <http://www.lesstif.org/>."
7108   fi
7109 fi
7110
7111 if test $proselytize_motif = yes ; then
7112     warnL "Athena widgets are being used instead of Motif."
7113     warn2 "XScreenSaver looks much better with Motif, and has"
7114     warn2 "a few extra features as well.  Wouldn't you rather"
7115     warn2 "be using Motif?  It is shipped by every commercial"
7116     warn2 "Unix vendor; and there is a free implementation"
7117     warn2 "available as well: see <http://www.lesstif.org/>."
7118 fi
7119
7120
7121 if test $have_gl = yes -a $ac_have_mesa_gl = yes ; then
7122   preferred_mesagl=2.7
7123
7124   if test $ac_mesagl_version = unknown; then
7125     warnL "Unable to determine the MesaGL version number!"
7126     warn2 "Make sure you are using version $preferred_mesagl or newer."
7127
7128   elif test \! $ac_mesagl_version -gt 2006; then
7129     warnL "MesaGL version $ac_mesagl_version_string is being used."
7130     warn2 "MesaGL versions 2.6 and earlier have a security bug."
7131     warn2 "It is strongly recommended that you upgrade to at"
7132     warn2 "least version $preferred_mesagl."
7133   fi
7134 fi
7135
7136
7137 if test $have_xpm = no ; then
7138   if test $with_xpm_req = yes ; then
7139     warnL 'Use of XPM was requested, but it was not found.'
7140   elif test $with_xpm_req = no ; then
7141     noteL 'The XPM library is not being used.'
7142   else
7143     noteL 'The XPM library was not found.'
7144   fi
7145
7146   echo ''
7147   warn2 'Some of the demos will not be as colorful as they'
7148   warn2 'could be.  You might want to consider installing XPM'
7149   warn2 'and re-running configure.  (Remember to delete the'
7150   warn2 'config.cache file first.)  You can find XPM at most'
7151   warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
7152 fi
7153
7154 if test $have_gl = no ; then
7155   if test $with_gl_req = yes ; then
7156     warnL 'Use of GL was requested, but it was not found.'
7157   elif test $with_gl_req = no ; then
7158     noteL 'The OpenGL 3D library is not being used.'
7159   else
7160     noteL 'The OpenGL 3D library was not found.'
7161   fi
7162
7163   echo ''
7164   warn2 'Those demos which use 3D will not be built or installed.'
7165   warn2 'You might want to consider installing OpenGL and'
7166   warn2 're-running configure.  (Remember to delete the'
7167   warn2 "config.cache file first.)  If your vendor doesn't ship"
7168   warn2 'their own implementation of OpenGL, you can get a free'
7169   warn2 'version at <http://www.ssec.wisc.edu/~brianp/Mesa.html>.'
7170   warn2 'For general OpenGL info, see <http://www.opengl.org/>.'
7171
7172 fi
7173
7174 if test $with_readdisplay_req = yes -a $have_readdisplay = no ; then
7175   warn 'Use of XReadDisplay was requested, but it was not found.'
7176 fi
7177
7178 if test $with_sgivideo_req = yes -a $have_sgivideo = no ; then
7179   warn 'Use of the Iris Video Library was requested, but it was not found.'
7180 fi
7181
7182 if test $with_kerberos_req = yes -a $have_kerberos = no ; then
7183   warn 'Use of Kerberos was requested, but it was not found.'
7184 fi
7185
7186 if test $with_shadow_req = yes -a $have_shadow = no ; then
7187   warn 'Use of shadow passwords was requested, but they were not found.'
7188 fi
7189
7190 if test -n "$with_zippy_req"; then
7191   if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
7192     warnL "$with_zippy_req was requested as the Zippy program,"
7193     warn2 "but was not found.  The default will be used instead."
7194   fi
7195 fi
7196
7197 if test $warning != no; then
7198   echo '' ; echo "$warnsep" ; echo ''
7199 fi
7200
7201
7202 trap '' 1 2 15
7203 cat > confcache <<\EOF
7204 # This file is a shell script that caches the results of configure
7205 # tests run on this system so they can be shared between configure
7206 # scripts and configure runs.  It is not useful on other systems.
7207 # If it contains results you don't want to keep, you may remove or edit it.
7208 #
7209 # By default, configure uses ./config.cache as the cache file,
7210 # creating it if it does not exist already.  You can give configure
7211 # the --cache-file=FILE option to use a different cache file; that is
7212 # what configure does when it calls configure scripts in
7213 # subdirectories, so they share the cache.
7214 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7215 # config.status only pays attention to the cache file if you give it the
7216 # --recheck option to rerun configure.
7217 #
7218 EOF
7219 # The following way of writing the cache mishandles newlines in values,
7220 # but we know of no workaround that is simple, portable, and efficient.
7221 # So, don't put newlines in cache variables' values.
7222 # Ultrix sh set writes to stderr and can't be redirected directly,
7223 # and sets the high bit in the cache file unless we assign to the vars.
7224 (set) 2>&1 |
7225   case `(ac_space=' '; set) 2>&1` in
7226   *ac_space=\ *)
7227     # `set' does not quote correctly, so add quotes (double-quote substitution
7228     # turns \\\\ into \\, and sed turns \\ into \).
7229     sed -n \
7230       -e "s/'/'\\\\''/g" \
7231       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7232     ;;
7233   *)
7234     # `set' quotes correctly as required by POSIX, so do not add quotes.
7235     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7236     ;;
7237   esac >> confcache
7238 if cmp -s $cache_file confcache; then
7239   :
7240 else
7241   if test -w $cache_file; then
7242     echo "updating cache $cache_file"
7243     cat confcache > $cache_file
7244   else
7245     echo "not updating unwritable cache $cache_file"
7246   fi
7247 fi
7248 rm -f confcache
7249
7250 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7251
7252 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7253 # Let make expand exec_prefix.
7254 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7255
7256 # Any assignment to VPATH causes Sun make to only execute
7257 # the first set of double-colon rules, so remove it if not needed.
7258 # If there is a colon in the path, we need to keep it.
7259 if test "x$srcdir" = x.; then
7260   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7261 fi
7262
7263 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7264
7265 DEFS=-DHAVE_CONFIG_H
7266
7267 # Without the "./", some shells look in PATH for config.status.
7268 : ${CONFIG_STATUS=./config.status}
7269
7270 echo creating $CONFIG_STATUS
7271 rm -f $CONFIG_STATUS
7272 cat > $CONFIG_STATUS <<EOF
7273 #! /bin/sh
7274 # Generated automatically by configure.
7275 # Run this file to recreate the current configuration.
7276 # This directory was configured as follows,
7277 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7278 #
7279 # $0 $ac_configure_args
7280 #
7281 # Compiler output produced by configure, useful for debugging
7282 # configure, is in ./config.log if it exists.
7283
7284 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7285 for ac_option
7286 do
7287   case "\$ac_option" in
7288   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7289     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7290     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7291   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7292     echo "$CONFIG_STATUS generated by autoconf version 2.12"
7293     exit 0 ;;
7294   -help | --help | --hel | --he | --h)
7295     echo "\$ac_cs_usage"; exit 0 ;;
7296   *) echo "\$ac_cs_usage"; exit 1 ;;
7297   esac
7298 done
7299
7300 ac_given_srcdir=$srcdir
7301 ac_given_INSTALL="$INSTALL"
7302
7303 trap 'rm -fr `echo "Makefile
7304           utils/Makefile
7305           driver/Makefile
7306           hacks/Makefile
7307           hacks/glx/Makefile
7308           driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7309 EOF
7310 cat >> $CONFIG_STATUS <<EOF
7311
7312 # Protect against being on the right side of a sed subst in config.status.
7313 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7314  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7315 $ac_vpsub
7316 $extrasub
7317 s%@CFLAGS@%$CFLAGS%g
7318 s%@CPPFLAGS@%$CPPFLAGS%g
7319 s%@CXXFLAGS@%$CXXFLAGS%g
7320 s%@DEFS@%$DEFS%g
7321 s%@LDFLAGS@%$LDFLAGS%g
7322 s%@LIBS@%$LIBS%g
7323 s%@exec_prefix@%$exec_prefix%g
7324 s%@prefix@%$prefix%g
7325 s%@program_transform_name@%$program_transform_name%g
7326 s%@bindir@%$bindir%g
7327 s%@sbindir@%$sbindir%g
7328 s%@libexecdir@%$libexecdir%g
7329 s%@datadir@%$datadir%g
7330 s%@sysconfdir@%$sysconfdir%g
7331 s%@sharedstatedir@%$sharedstatedir%g
7332 s%@localstatedir@%$localstatedir%g
7333 s%@libdir@%$libdir%g
7334 s%@includedir@%$includedir%g
7335 s%@oldincludedir@%$oldincludedir%g
7336 s%@infodir@%$infodir%g
7337 s%@mandir@%$mandir%g
7338 s%@host@%$host%g
7339 s%@host_alias@%$host_alias%g
7340 s%@host_cpu@%$host_cpu%g
7341 s%@host_vendor@%$host_vendor%g
7342 s%@host_os@%$host_os%g
7343 s%@CC@%$CC%g
7344 s%@CPP@%$CPP%g
7345 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7346 s%@INSTALL_DATA@%$INSTALL_DATA%g
7347 s%@SET_MAKE@%$SET_MAKE%g
7348 s%@X_CFLAGS@%$X_CFLAGS%g
7349 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7350 s%@X_LIBS@%$X_LIBS%g
7351 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7352 s%@zip2@%$zip2%g
7353 s%@emacs_exe@%$emacs_exe%g
7354 s%@xemacs_exe@%$xemacs_exe%g
7355 s%@fortune@%$fortune%g
7356 s%@INCLUDES@%$INCLUDES%g
7357 s%@SAVER_LIBS@%$SAVER_LIBS%g
7358 s%@HACK_LIBS@%$HACK_LIBS%g
7359 s%@XPM_LIBS@%$XPM_LIBS%g
7360 s%@GL_LIBS@%$GL_LIBS%g
7361 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
7362 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
7363 s%@INSTALL_DIRS@%$INSTALL_DIRS%g
7364 s%@NEED_SETUID@%$NEED_SETUID%g
7365 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
7366 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
7367 s%@DIALOG_SRCS@%$DIALOG_SRCS%g
7368 s%@DIALOG_OBJS@%$DIALOG_OBJS%g
7369 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
7370 s%@PASSWD_OBJS@%$PASSWD_OBJS%g
7371 s%@XMU_SRCS@%$XMU_SRCS%g
7372 s%@XMU_OBJS@%$XMU_OBJS%g
7373 s%@LOCK_SRCS@%$LOCK_SRCS%g
7374 s%@LOCK_OBJS@%$LOCK_OBJS%g
7375 s%@GL_EXES@%$GL_EXES%g
7376 s%@GL_KLUDGE_1@%$GL_KLUDGE_1%g
7377 s%@GL_KLUDGE_2@%$GL_KLUDGE_2%g
7378 s%@HACKDIR@%$HACKDIR%g
7379 s%@APPDEFAULTS@%$APPDEFAULTS%g
7380 s%@DEPEND@%$DEPEND%g
7381 s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
7382 s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g
7383
7384 CEOF
7385 EOF
7386
7387 cat >> $CONFIG_STATUS <<\EOF
7388
7389 # Split the substitutions into bite-sized pieces for seds with
7390 # small command number limits, like on Digital OSF/1 and HP-UX.
7391 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7392 ac_file=1 # Number of current file.
7393 ac_beg=1 # First line for current file.
7394 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7395 ac_more_lines=:
7396 ac_sed_cmds=""
7397 while $ac_more_lines; do
7398   if test $ac_beg -gt 1; then
7399     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7400   else
7401     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7402   fi
7403   if test ! -s conftest.s$ac_file; then
7404     ac_more_lines=false
7405     rm -f conftest.s$ac_file
7406   else
7407     if test -z "$ac_sed_cmds"; then
7408       ac_sed_cmds="sed -f conftest.s$ac_file"
7409     else
7410       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7411     fi
7412     ac_file=`expr $ac_file + 1`
7413     ac_beg=$ac_end
7414     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7415   fi
7416 done
7417 if test -z "$ac_sed_cmds"; then
7418   ac_sed_cmds=cat
7419 fi
7420 EOF
7421
7422 cat >> $CONFIG_STATUS <<EOF
7423
7424 CONFIG_FILES=\${CONFIG_FILES-"Makefile
7425           utils/Makefile
7426           driver/Makefile
7427           hacks/Makefile
7428           hacks/glx/Makefile
7429           driver/XScreenSaver.ad"}
7430 EOF
7431 cat >> $CONFIG_STATUS <<\EOF
7432 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7433   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7434   case "$ac_file" in
7435   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7436        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7437   *) ac_file_in="${ac_file}.in" ;;
7438   esac
7439
7440   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7441
7442   # Remove last slash and all that follows it.  Not all systems have dirname.
7443   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7444   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7445     # The file is in a subdirectory.
7446     test ! -d "$ac_dir" && mkdir "$ac_dir"
7447     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7448     # A "../" for each directory in $ac_dir_suffix.
7449     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7450   else
7451     ac_dir_suffix= ac_dots=
7452   fi
7453
7454   case "$ac_given_srcdir" in
7455   .)  srcdir=.
7456       if test -z "$ac_dots"; then top_srcdir=.
7457       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7458   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7459   *) # Relative path.
7460     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7461     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7462   esac
7463
7464   case "$ac_given_INSTALL" in
7465   [/$]*) INSTALL="$ac_given_INSTALL" ;;
7466   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7467   esac
7468
7469   echo creating "$ac_file"
7470   rm -f "$ac_file"
7471   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7472   case "$ac_file" in
7473   *Makefile*) ac_comsub="1i\\
7474 # $configure_input" ;;
7475   *) ac_comsub= ;;
7476   esac
7477
7478   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7479   sed -e "$ac_comsub
7480 s%@configure_input@%$configure_input%g
7481 s%@srcdir@%$srcdir%g
7482 s%@top_srcdir@%$top_srcdir%g
7483 s%@INSTALL@%$INSTALL%g
7484 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7485 fi; done
7486 rm -f conftest.s*
7487
7488 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7489 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7490 #
7491 # ac_d sets the value in "#define NAME VALUE" lines.
7492 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7493 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7494 ac_dC='\3'
7495 ac_dD='%g'
7496 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7497 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7498 ac_uB='\([      ]\)%\1#\2define\3'
7499 ac_uC=' '
7500 ac_uD='\4%g'
7501 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7502 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7503 ac_eB='$%\1#\2define\3'
7504 ac_eC=' '
7505 ac_eD='%g'
7506
7507 if test "${CONFIG_HEADERS+set}" != set; then
7508 EOF
7509 cat >> $CONFIG_STATUS <<EOF
7510   CONFIG_HEADERS="config.h"
7511 EOF
7512 cat >> $CONFIG_STATUS <<\EOF
7513 fi
7514 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7515   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7516   case "$ac_file" in
7517   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7518        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7519   *) ac_file_in="${ac_file}.in" ;;
7520   esac
7521
7522   echo creating $ac_file
7523
7524   rm -f conftest.frag conftest.in conftest.out
7525   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7526   cat $ac_file_inputs > conftest.in
7527
7528 EOF
7529
7530 # Transform confdefs.h into a sed script conftest.vals that substitutes
7531 # the proper values into config.h.in to produce config.h.  And first:
7532 # Protect against being on the right side of a sed subst in config.status.
7533 # Protect against being in an unquoted here document in config.status.
7534 rm -f conftest.vals
7535 cat > conftest.hdr <<\EOF
7536 s/[\\&%]/\\&/g
7537 s%[\\$`]%\\&%g
7538 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7539 s%ac_d%ac_u%gp
7540 s%ac_u%ac_e%gp
7541 EOF
7542 sed -n -f conftest.hdr confdefs.h > conftest.vals
7543 rm -f conftest.hdr
7544
7545 # This sed command replaces #undef with comments.  This is necessary, for
7546 # example, in the case of _POSIX_SOURCE, which is predefined and required
7547 # on some systems where configure will not decide to define it.
7548 cat >> conftest.vals <<\EOF
7549 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7550 EOF
7551
7552 # Break up conftest.vals because some shells have a limit on
7553 # the size of here documents, and old seds have small limits too.
7554
7555 rm -f conftest.tail
7556 while :
7557 do
7558   ac_lines=`grep -c . conftest.vals`
7559   # grep -c gives empty output for an empty file on some AIX systems.
7560   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7561   # Write a limited-size here document to conftest.frag.
7562   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7563   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7564   echo 'CEOF
7565   sed -f conftest.frag conftest.in > conftest.out
7566   rm -f conftest.in
7567   mv conftest.out conftest.in
7568 ' >> $CONFIG_STATUS
7569   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7570   rm -f conftest.vals
7571   mv conftest.tail conftest.vals
7572 done
7573 rm -f conftest.vals
7574
7575 cat >> $CONFIG_STATUS <<\EOF
7576   rm -f conftest.frag conftest.h
7577   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7578   cat conftest.in >> conftest.h
7579   rm -f conftest.in
7580   if cmp -s $ac_file conftest.h 2>/dev/null; then
7581     echo "$ac_file is unchanged"
7582     rm -f conftest.h
7583   else
7584     # Remove last slash and all that follows it.  Not all systems have dirname.
7585       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7586       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7587       # The file is in a subdirectory.
7588       test ! -d "$ac_dir" && mkdir "$ac_dir"
7589     fi
7590     rm -f $ac_file
7591     mv conftest.h $ac_file
7592   fi
7593 fi; done
7594
7595 EOF
7596 cat >> $CONFIG_STATUS <<EOF
7597
7598 EOF
7599 cat >> $CONFIG_STATUS <<\EOF
7600
7601 exit 0
7602 EOF
7603 chmod +x $CONFIG_STATUS
7604 rm -fr confdefs* $ac_clean_files
7605 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7606
7607
7608 # You are in a twisty maze of namespaces and syntaxes, all alike.
7609 # Fuck the skull of Unix.
7610 #
7611 eval bindir=${bindir}
7612 eval bindir=${bindir}
7613 eval bindir=${bindir}
7614 eval bindir=${bindir}
7615 eval bindir=${bindir}
7616 eval bindir=${bindir}
7617 eval HACKDIR=${HACKDIR}
7618 eval HACKDIR=${HACKDIR}
7619 eval HACKDIR=${HACKDIR}
7620 eval HACKDIR=${HACKDIR}
7621 eval HACKDIR=${HACKDIR}
7622 eval HACKDIR=${HACKDIR}
7623
7624 echo ""
7625 echo "$warnsep"
7626 echo ""
7627 echo '      When you run "make install", the "xscreensaver" and'
7628 echo '      "xscreensaver-command" executables will be installed in'
7629 echo "      ${bindir}."
7630 echo ""
7631 echo "      The various graphics demos (80+ different executables) will"
7632 echo "      be installed in ${HACKDIR}."
7633 echo ""
7634 echo "      If you would prefer the demos to be installed elsewhere"
7635 echo "      (for example, in a dedicated directory) you should re-run"
7636 echo "      configure with the --enable-subdir=DIR option.  For more"
7637 echo "      information, run $0 --help."
7638 echo ""
7639 echo "$warnsep"
7640 echo ""