http://www.archive.org/download/tucows_10294_XScreenSaver/xscreensaver-4.10.tar.gz
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.53.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 if expr a : '\(a\)' >/dev/null 2>&1; then
11   as_expr=expr
12 else
13   as_expr=false
14 fi
15
16
17 ## --------------------- ##
18 ## M4sh Initialization.  ##
19 ## --------------------- ##
20
21 # Be Bourne compatible
22 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23   emulate sh
24   NULLCMD=:
25 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26   set -o posix
27 fi
28
29 # NLS nuisances.
30 # Support unset when possible.
31 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
32   as_unset=unset
33 else
34   as_unset=false
35 fi
36
37 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
38     { $as_unset LANG || test "${LANG+set}" != set; } ||
39       { LANG=C; export LANG; }
40 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
41     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
42       { LC_ALL=C; export LC_ALL; }
43 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
44     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
45       { LC_TIME=C; export LC_TIME; }
46 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
47     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
48       { LC_CTYPE=C; export LC_CTYPE; }
49 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
50     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
51       { LANGUAGE=C; export LANGUAGE; }
52 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
53     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
54       { LC_COLLATE=C; export LC_COLLATE; }
55 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
56     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
57       { LC_NUMERIC=C; export LC_NUMERIC; }
58 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
59     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
60       { LC_MESSAGES=C; export LC_MESSAGES; }
61
62
63 # Name of the executable.
64 as_me=`(basename "$0") 2>/dev/null ||
65 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66          X"$0" : 'X\(//\)$' \| \
67          X"$0" : 'X\(/\)$' \| \
68          .     : '\(.\)' 2>/dev/null ||
69 echo X/"$0" |
70     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
71           /^X\/\(\/\/\)$/{ s//\1/; q; }
72           /^X\/\(\/\).*/{ s//\1/; q; }
73           s/.*/./; q'`
74
75 # PATH needs CR, and LINENO needs CR and PATH.
76 # Avoid depending upon Character Ranges.
77 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
78 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
79 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
80 as_cr_digits='0123456789'
81 as_cr_alnum=$as_cr_Letters$as_cr_digits
82
83 # The user is always right.
84 if test "${PATH_SEPARATOR+set}" != set; then
85   echo "#! /bin/sh" >conftest.sh
86   echo  "exit 0"   >>conftest.sh
87   chmod +x conftest.sh
88   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
89     PATH_SEPARATOR=';'
90   else
91     PATH_SEPARATOR=:
92   fi
93   rm -f conftest.sh
94 fi
95
96
97   as_lineno_1=$LINENO
98   as_lineno_2=$LINENO
99   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
100   test "x$as_lineno_1" != "x$as_lineno_2" &&
101   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
102   # Find who we are.  Look in the path if we contain no path at all
103   # relative or not.
104   case $0 in
105     *[\\/]* ) as_myself=$0 ;;
106     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
107 for as_dir in $PATH
108 do
109   IFS=$as_save_IFS
110   test -z "$as_dir" && as_dir=.
111   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
112 done
113
114        ;;
115   esac
116   # We did not find ourselves, most probably we were run as `sh COMMAND'
117   # in which case we are not to be found in the path.
118   if test "x$as_myself" = x; then
119     as_myself=$0
120   fi
121   if test ! -f "$as_myself"; then
122     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
123    { (exit 1); exit 1; }; }
124   fi
125   case $CONFIG_SHELL in
126   '')
127     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
128 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
129 do
130   IFS=$as_save_IFS
131   test -z "$as_dir" && as_dir=.
132   for as_base in sh bash ksh sh5; do
133          case $as_dir in
134          /*)
135            if ("$as_dir/$as_base" -c '
136   as_lineno_1=$LINENO
137   as_lineno_2=$LINENO
138   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
139   test "x$as_lineno_1" != "x$as_lineno_2" &&
140   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
141              CONFIG_SHELL=$as_dir/$as_base
142              export CONFIG_SHELL
143              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
144            fi;;
145          esac
146        done
147 done
148 ;;
149   esac
150
151   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
152   # uniformly replaced by the line number.  The first 'sed' inserts a
153   # line-number line before each line; the second 'sed' does the real
154   # work.  The second script uses 'N' to pair each line-number line
155   # with the numbered line, and appends trailing '-' during
156   # substitution so that $LINENO is not a special case at line end.
157   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
158   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
159   sed '=' <$as_myself |
160     sed '
161       N
162       s,$,-,
163       : loop
164       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
165       t loop
166       s,-$,,
167       s,^['$as_cr_digits']*\n,,
168     ' >$as_me.lineno &&
169   chmod +x $as_me.lineno ||
170     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
171    { (exit 1); exit 1; }; }
172
173   # Don't try to exec as it changes $[0], causing all sort of problems
174   # (the dirname of $[0] is not the place where we might find the
175   # original and so on.  Autoconf is especially sensible to this).
176   . ./$as_me.lineno
177   # Exit status is that of the last command.
178   exit
179 }
180
181
182 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
183   *c*,-n*) ECHO_N= ECHO_C='
184 ' ECHO_T='      ' ;;
185   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
186   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
187 esac
188
189 if expr a : '\(a\)' >/dev/null 2>&1; then
190   as_expr=expr
191 else
192   as_expr=false
193 fi
194
195 rm -f conf$$ conf$$.exe conf$$.file
196 echo >conf$$.file
197 if ln -s conf$$.file conf$$ 2>/dev/null; then
198   # We could just check for DJGPP; but this test a) works b) is more generic
199   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
200   if test -f conf$$.exe; then
201     # Don't use ln at all; we don't have any links
202     as_ln_s='cp -p'
203   else
204     as_ln_s='ln -s'
205   fi
206 elif ln conf$$.file conf$$ 2>/dev/null; then
207   as_ln_s=ln
208 else
209   as_ln_s='cp -p'
210 fi
211 rm -f conf$$ conf$$.exe conf$$.file
212
213 as_executable_p="test -f"
214
215 # Sed expression to map a string onto a valid CPP name.
216 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
217
218 # Sed expression to map a string onto a valid variable name.
219 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
220
221
222 # IFS
223 # We need space, tab and new line, in precisely that order.
224 as_nl='
225 '
226 IFS="   $as_nl"
227
228 # CDPATH.
229 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
230
231
232 # Name of the host.
233 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
234 # so uname gets run too.
235 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
236
237 exec 6>&1
238
239 #
240 # Initializations.
241 #
242 ac_default_prefix=/usr/local
243 cross_compiling=no
244 subdirs=
245 MFLAGS=
246 MAKEFLAGS=
247 SHELL=${CONFIG_SHELL-/bin/sh}
248
249 # Maximum number of lines to put in a shell here document.
250 # This variable seems obsolete.  It should probably be removed, and
251 # only ac_max_sed_lines should be used.
252 : ${ac_max_here_lines=38}
253
254 # Identity of this package.
255 PACKAGE_NAME=
256 PACKAGE_TARNAME=
257 PACKAGE_VERSION=
258 PACKAGE_STRING=
259 PACKAGE_BUGREPORT=
260
261 ac_unique_file="driver/subprocs.c"
262 # Factoring default headers for most tests.
263 ac_includes_default="\
264 #include <stdio.h>
265 #if HAVE_SYS_TYPES_H
266 # include <sys/types.h>
267 #endif
268 #if HAVE_SYS_STAT_H
269 # include <sys/stat.h>
270 #endif
271 #if STDC_HEADERS
272 # include <stdlib.h>
273 # include <stddef.h>
274 #else
275 # if HAVE_STDLIB_H
276 #  include <stdlib.h>
277 # endif
278 #endif
279 #if HAVE_STRING_H
280 # if !STDC_HEADERS && HAVE_MEMORY_H
281 #  include <memory.h>
282 # endif
283 # include <string.h>
284 #endif
285 #if HAVE_STRINGS_H
286 # include <strings.h>
287 #endif
288 #if HAVE_INTTYPES_H
289 # include <inttypes.h>
290 #else
291 # if HAVE_STDINT_H
292 #  include <stdint.h>
293 # endif
294 #endif
295 #if HAVE_UNISTD_H
296 # include <unistd.h>
297 #endif"
298
299
300 # Initialize some variables set by options.
301 ac_init_help=
302 ac_init_version=false
303 # The variables have the same names as the options, with
304 # dashes changed to underlines.
305 cache_file=/dev/null
306 exec_prefix=NONE
307 no_create=
308 no_recursion=
309 prefix=NONE
310 program_prefix=NONE
311 program_suffix=NONE
312 program_transform_name=s,x,x,
313 silent=
314 site=
315 srcdir=
316 verbose=
317 x_includes=NONE
318 x_libraries=NONE
319
320 # Installation directory options.
321 # These are left unexpanded so users can "make install exec_prefix=/foo"
322 # and all the variables that are supposed to be based on exec_prefix
323 # by default will actually change.
324 # Use braces instead of parens because sh, perl, etc. also accept them.
325 bindir='${exec_prefix}/bin'
326 sbindir='${exec_prefix}/sbin'
327 libexecdir='${exec_prefix}/libexec'
328 datadir='${prefix}/share'
329 sysconfdir='${prefix}/etc'
330 sharedstatedir='${prefix}/com'
331 localstatedir='${prefix}/var'
332 libdir='${exec_prefix}/lib'
333 includedir='${prefix}/include'
334 oldincludedir='/usr/include'
335 infodir='${prefix}/info'
336 mandir='${prefix}/man'
337
338 ac_prev=
339 for ac_option
340 do
341   # If the previous option needs an argument, assign it.
342   if test -n "$ac_prev"; then
343     eval "$ac_prev=\$ac_option"
344     ac_prev=
345     continue
346   fi
347
348   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
349
350   # Accept the important Cygnus configure options, so we can diagnose typos.
351
352   case $ac_option in
353
354   -bindir | --bindir | --bindi | --bind | --bin | --bi)
355     ac_prev=bindir ;;
356   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
357     bindir=$ac_optarg ;;
358
359   -build | --build | --buil | --bui | --bu)
360     ac_prev=build_alias ;;
361   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
362     build_alias=$ac_optarg ;;
363
364   -cache-file | --cache-file | --cache-fil | --cache-fi \
365   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
366     ac_prev=cache_file ;;
367   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
368   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
369     cache_file=$ac_optarg ;;
370
371   --config-cache | -C)
372     cache_file=config.cache ;;
373
374   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
375     ac_prev=datadir ;;
376   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
377   | --da=*)
378     datadir=$ac_optarg ;;
379
380   -disable-* | --disable-*)
381     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
382     # Reject names that are not valid shell variable names.
383     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
384       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
385    { (exit 1); exit 1; }; }
386     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
387     eval "enable_$ac_feature=no" ;;
388
389   -enable-* | --enable-*)
390     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
391     # Reject names that are not valid shell variable names.
392     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
393       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
394    { (exit 1); exit 1; }; }
395     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
396     case $ac_option in
397       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
398       *) ac_optarg=yes ;;
399     esac
400     eval "enable_$ac_feature='$ac_optarg'" ;;
401
402   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
403   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
404   | --exec | --exe | --ex)
405     ac_prev=exec_prefix ;;
406   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
407   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
408   | --exec=* | --exe=* | --ex=*)
409     exec_prefix=$ac_optarg ;;
410
411   -gas | --gas | --ga | --g)
412     # Obsolete; use --with-gas.
413     with_gas=yes ;;
414
415   -help | --help | --hel | --he | -h)
416     ac_init_help=long ;;
417   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
418     ac_init_help=recursive ;;
419   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
420     ac_init_help=short ;;
421
422   -host | --host | --hos | --ho)
423     ac_prev=host_alias ;;
424   -host=* | --host=* | --hos=* | --ho=*)
425     host_alias=$ac_optarg ;;
426
427   -includedir | --includedir | --includedi | --included | --include \
428   | --includ | --inclu | --incl | --inc)
429     ac_prev=includedir ;;
430   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
431   | --includ=* | --inclu=* | --incl=* | --inc=*)
432     includedir=$ac_optarg ;;
433
434   -infodir | --infodir | --infodi | --infod | --info | --inf)
435     ac_prev=infodir ;;
436   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
437     infodir=$ac_optarg ;;
438
439   -libdir | --libdir | --libdi | --libd)
440     ac_prev=libdir ;;
441   -libdir=* | --libdir=* | --libdi=* | --libd=*)
442     libdir=$ac_optarg ;;
443
444   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
445   | --libexe | --libex | --libe)
446     ac_prev=libexecdir ;;
447   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
448   | --libexe=* | --libex=* | --libe=*)
449     libexecdir=$ac_optarg ;;
450
451   -localstatedir | --localstatedir | --localstatedi | --localstated \
452   | --localstate | --localstat | --localsta | --localst \
453   | --locals | --local | --loca | --loc | --lo)
454     ac_prev=localstatedir ;;
455   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
456   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
457   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
458     localstatedir=$ac_optarg ;;
459
460   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
461     ac_prev=mandir ;;
462   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
463     mandir=$ac_optarg ;;
464
465   -nfp | --nfp | --nf)
466     # Obsolete; use --without-fp.
467     with_fp=no ;;
468
469   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
470   | --no-cr | --no-c | -n)
471     no_create=yes ;;
472
473   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
474   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
475     no_recursion=yes ;;
476
477   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
478   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
479   | --oldin | --oldi | --old | --ol | --o)
480     ac_prev=oldincludedir ;;
481   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
482   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
483   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
484     oldincludedir=$ac_optarg ;;
485
486   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
487     ac_prev=prefix ;;
488   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
489     prefix=$ac_optarg ;;
490
491   -program-prefix | --program-prefix | --program-prefi | --program-pref \
492   | --program-pre | --program-pr | --program-p)
493     ac_prev=program_prefix ;;
494   -program-prefix=* | --program-prefix=* | --program-prefi=* \
495   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
496     program_prefix=$ac_optarg ;;
497
498   -program-suffix | --program-suffix | --program-suffi | --program-suff \
499   | --program-suf | --program-su | --program-s)
500     ac_prev=program_suffix ;;
501   -program-suffix=* | --program-suffix=* | --program-suffi=* \
502   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503     program_suffix=$ac_optarg ;;
504
505   -program-transform-name | --program-transform-name \
506   | --program-transform-nam | --program-transform-na \
507   | --program-transform-n | --program-transform- \
508   | --program-transform | --program-transfor \
509   | --program-transfo | --program-transf \
510   | --program-trans | --program-tran \
511   | --progr-tra | --program-tr | --program-t)
512     ac_prev=program_transform_name ;;
513   -program-transform-name=* | --program-transform-name=* \
514   | --program-transform-nam=* | --program-transform-na=* \
515   | --program-transform-n=* | --program-transform-=* \
516   | --program-transform=* | --program-transfor=* \
517   | --program-transfo=* | --program-transf=* \
518   | --program-trans=* | --program-tran=* \
519   | --progr-tra=* | --program-tr=* | --program-t=*)
520     program_transform_name=$ac_optarg ;;
521
522   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
523   | -silent | --silent | --silen | --sile | --sil)
524     silent=yes ;;
525
526   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
527     ac_prev=sbindir ;;
528   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
529   | --sbi=* | --sb=*)
530     sbindir=$ac_optarg ;;
531
532   -sharedstatedir | --sharedstatedir | --sharedstatedi \
533   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
534   | --sharedst | --shareds | --shared | --share | --shar \
535   | --sha | --sh)
536     ac_prev=sharedstatedir ;;
537   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
538   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
539   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
540   | --sha=* | --sh=*)
541     sharedstatedir=$ac_optarg ;;
542
543   -site | --site | --sit)
544     ac_prev=site ;;
545   -site=* | --site=* | --sit=*)
546     site=$ac_optarg ;;
547
548   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
549     ac_prev=srcdir ;;
550   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
551     srcdir=$ac_optarg ;;
552
553   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
554   | --syscon | --sysco | --sysc | --sys | --sy)
555     ac_prev=sysconfdir ;;
556   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
557   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
558     sysconfdir=$ac_optarg ;;
559
560   -target | --target | --targe | --targ | --tar | --ta | --t)
561     ac_prev=target_alias ;;
562   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
563     target_alias=$ac_optarg ;;
564
565   -v | -verbose | --verbose | --verbos | --verbo | --verb)
566     verbose=yes ;;
567
568   -version | --version | --versio | --versi | --vers | -V)
569     ac_init_version=: ;;
570
571   -with-* | --with-*)
572     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
573     # Reject names that are not valid shell variable names.
574     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
575       { echo "$as_me: error: invalid package name: $ac_package" >&2
576    { (exit 1); exit 1; }; }
577     ac_package=`echo $ac_package| sed 's/-/_/g'`
578     case $ac_option in
579       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
580       *) ac_optarg=yes ;;
581     esac
582     eval "with_$ac_package='$ac_optarg'" ;;
583
584   -without-* | --without-*)
585     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
586     # Reject names that are not valid shell variable names.
587     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
588       { echo "$as_me: error: invalid package name: $ac_package" >&2
589    { (exit 1); exit 1; }; }
590     ac_package=`echo $ac_package | sed 's/-/_/g'`
591     eval "with_$ac_package=no" ;;
592
593   --x)
594     # Obsolete; use --with-x.
595     with_x=yes ;;
596
597   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
598   | --x-incl | --x-inc | --x-in | --x-i)
599     ac_prev=x_includes ;;
600   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
601   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
602     x_includes=$ac_optarg ;;
603
604   -x-libraries | --x-libraries | --x-librarie | --x-librari \
605   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
606     ac_prev=x_libraries ;;
607   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
608   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
609     x_libraries=$ac_optarg ;;
610
611   -*) { echo "$as_me: error: unrecognized option: $ac_option
612 Try \`$0 --help' for more information." >&2
613    { (exit 1); exit 1; }; }
614     ;;
615
616   *=*)
617     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
618     # Reject names that are not valid shell variable names.
619     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
620       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
621    { (exit 1); exit 1; }; }
622     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
623     eval "$ac_envvar='$ac_optarg'"
624     export $ac_envvar ;;
625
626   *)
627     # FIXME: should be removed in autoconf 3.0.
628     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
629     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
630       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
631     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
632     ;;
633
634   esac
635 done
636
637 if test -n "$ac_prev"; then
638   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
639   { echo "$as_me: error: missing argument to $ac_option" >&2
640    { (exit 1); exit 1; }; }
641 fi
642
643 # Be sure to have absolute paths.
644 for ac_var in exec_prefix prefix
645 do
646   eval ac_val=$`echo $ac_var`
647   case $ac_val in
648     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
649     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
650    { (exit 1); exit 1; }; };;
651   esac
652 done
653
654 # Be sure to have absolute paths.
655 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
656               localstatedir libdir includedir oldincludedir infodir mandir
657 do
658   eval ac_val=$`echo $ac_var`
659   case $ac_val in
660     [\\/$]* | ?:[\\/]* ) ;;
661     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
662    { (exit 1); exit 1; }; };;
663   esac
664 done
665
666 # There might be people who depend on the old broken behavior: `$host'
667 # used to hold the argument of --host etc.
668 # FIXME: To remove some day.
669 build=$build_alias
670 host=$host_alias
671 target=$target_alias
672
673 # FIXME: To remove some day.
674 if test "x$host_alias" != x; then
675   if test "x$build_alias" = x; then
676     cross_compiling=maybe
677     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
678     If a cross compiler is detected then cross compile mode will be used." >&2
679   elif test "x$build_alias" != "x$host_alias"; then
680     cross_compiling=yes
681   fi
682 fi
683
684 ac_tool_prefix=
685 test -n "$host_alias" && ac_tool_prefix=$host_alias-
686
687 test "$silent" = yes && exec 6>/dev/null
688
689
690 # Find the source files, if location was not specified.
691 if test -z "$srcdir"; then
692   ac_srcdir_defaulted=yes
693   # Try the directory containing this script, then its parent.
694   ac_confdir=`(dirname "$0") 2>/dev/null ||
695 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
696          X"$0" : 'X\(//\)[^/]' \| \
697          X"$0" : 'X\(//\)$' \| \
698          X"$0" : 'X\(/\)' \| \
699          .     : '\(.\)' 2>/dev/null ||
700 echo X"$0" |
701     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
702           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
703           /^X\(\/\/\)$/{ s//\1/; q; }
704           /^X\(\/\).*/{ s//\1/; q; }
705           s/.*/./; q'`
706   srcdir=$ac_confdir
707   if test ! -r $srcdir/$ac_unique_file; then
708     srcdir=..
709   fi
710 else
711   ac_srcdir_defaulted=no
712 fi
713 if test ! -r $srcdir/$ac_unique_file; then
714   if test "$ac_srcdir_defaulted" = yes; then
715     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
716    { (exit 1); exit 1; }; }
717   else
718     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
719    { (exit 1); exit 1; }; }
720   fi
721 fi
722 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
723 ac_env_build_alias_set=${build_alias+set}
724 ac_env_build_alias_value=$build_alias
725 ac_cv_env_build_alias_set=${build_alias+set}
726 ac_cv_env_build_alias_value=$build_alias
727 ac_env_host_alias_set=${host_alias+set}
728 ac_env_host_alias_value=$host_alias
729 ac_cv_env_host_alias_set=${host_alias+set}
730 ac_cv_env_host_alias_value=$host_alias
731 ac_env_target_alias_set=${target_alias+set}
732 ac_env_target_alias_value=$target_alias
733 ac_cv_env_target_alias_set=${target_alias+set}
734 ac_cv_env_target_alias_value=$target_alias
735 ac_env_CC_set=${CC+set}
736 ac_env_CC_value=$CC
737 ac_cv_env_CC_set=${CC+set}
738 ac_cv_env_CC_value=$CC
739 ac_env_CFLAGS_set=${CFLAGS+set}
740 ac_env_CFLAGS_value=$CFLAGS
741 ac_cv_env_CFLAGS_set=${CFLAGS+set}
742 ac_cv_env_CFLAGS_value=$CFLAGS
743 ac_env_LDFLAGS_set=${LDFLAGS+set}
744 ac_env_LDFLAGS_value=$LDFLAGS
745 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
746 ac_cv_env_LDFLAGS_value=$LDFLAGS
747 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
748 ac_env_CPPFLAGS_value=$CPPFLAGS
749 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
750 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
751 ac_env_CPP_set=${CPP+set}
752 ac_env_CPP_value=$CPP
753 ac_cv_env_CPP_set=${CPP+set}
754 ac_cv_env_CPP_value=$CPP
755
756 #
757 # Report the --help message.
758 #
759 if test "$ac_init_help" = "long"; then
760   # Omit some internal or obsolete options to make the list less imposing.
761   # This message is too long to be a string in the A/UX 3.1 sh.
762   cat <<_ACEOF
763 \`configure' configures this package to adapt to many kinds of systems.
764
765 Usage: $0 [OPTION]... [VAR=VALUE]...
766
767 To assign environment variables (e.g., CC, CFLAGS...), specify them as
768 VAR=VALUE.  See below for descriptions of some of the useful variables.
769
770 Defaults for the options are specified in brackets.
771
772
773 Configuration:
774
775   -h, --help              display this help and exit
776       --help=short        display options specific to this package
777       --help=recursive    display the short help of all the included packages
778   -V, --version           display version information and exit
779   -q, --quiet, --silent   do not print \`checking...' messages
780       --cache-file=FILE   cache test results in FILE [disabled]
781   -C, --config-cache      alias for \`--cache-file=config.cache'
782   -n, --no-create         do not create output files
783       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
784
785 _ACEOF
786
787   cat <<_ACEOF
788 Installation directories:
789   --prefix=PREFIX         install architecture-independent files in PREFIX
790                           [$ac_default_prefix]
791   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
792                           [PREFIX]
793
794 By default, \`make install' will install all the files in
795 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
796 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
797 for instance \`--prefix=\$HOME'.
798
799 For better control, use the options below.
800
801 Fine tuning of the installation directories:
802   --bindir=DIR           user executables [EPREFIX/bin]
803   --libdir=DIR           object code libraries [EPREFIX/lib]
804   --includedir=DIR       C header files [PREFIX/include]
805   --x-includes=DIR        X include files are in DIR
806   --x-libraries=DIR       X library files are in DIR
807   --mandir=DIR           man documentation [PREFIX/man]
808 _ACEOF
809
810   cat <<\_ACEOF
811
812 X features:
813   --x-includes=DIR    X include files are in DIR
814   --x-libraries=DIR   X library files are in DIR
815
816 System types:
817   --build=BUILD     configure for building on BUILD [guessed]
818   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
819 _ACEOF
820 fi
821
822 if test -n "$ac_init_help"; then
823
824   cat <<\_ACEOF
825
826 Optional Features:
827   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
828   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
829
830
831 Screen locking options:
832
833   --enable-locking        Compile in support for locking the display.
834   --disable-locking       Do not allow locking at all.
835
836 Optional Packages:
837   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
838   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
839 Installation options:
840
841   --with-hackdir=DIR      Where to install the hundreds of demo executables.
842                           Default: \`PREFIX/lib/xscreensaver/'
843   --with-configdir=DIR    Where to install the data files that describe each
844                           of the display modes to the GUI.
845                           Default: \`GNOMEPREFIX/control-center/screensavers/'
846                           or \`PREFIX/lib/xscreensaver/config/', depending on
847                           whether GNOME is available.
848
849 Except where noted, all of the --with options below can also take a
850 directory argument: for example, \`--with-motif=/opt/Motif'.  That would
851 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
852 to be added to the -L list, assuming those directories exist.
853
854 By default, support for each of these options will be built in, if the
855 relevant library routines exist.  At run time, they will then be used
856 only if the X server being used supports them.  Each --with option has
857 a corresponding --without option, to override building support for them
858 at all.
859
860 Screen blanking and idle-detection options:
861
862   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
863   --with-mit-ext          Include support for the MIT-SCREEN-SAVER extension.
864   --with-xidle-ext        Include support for the XIDLE extension.
865   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
866   --with-dpms-ext         Include support for the DPMS extension.
867   --with-xinerama-ext     Include support for the XINERAMA extension.
868   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
869   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
870   --with-proc-interrupts  Include support for consulting the /proc/interrupts
871                           file to notice keyboard activity.
872   --with-pam              Include support for PAM (Pluggable Auth Modules.)
873   --with-kerberos         Include support for Kerberos authentication.
874   --with-shadow           Include support for shadow password authentication.
875
876 User interface options:
877
878   --with-motif            Use the Motif toolkit for the user interface
879                           (not recommended.)
880   --with-gtk              Use the Gtk toolkit for the user interface.
881   --with-gnome            Include support for the Gnome 1.x Control Center.
882                           (This option is not needed with GTK 2.x / Gnome 2.x.)
883
884   --with-xml              The XML toolkit is needed for some parts of
885                           the Gtk interface.  Without it, the configuration
886                           interface will be much less featureful.
887
888 Graphics options:
889
890   --with-gl               Build those demos which depend on OpenGL.
891   --with-gle              Build those demos which depend on GLE
892                           (the OpenGL "extrusion" library.)
893   --with-xpm              Include support for XPM files in some demos.
894                           (Not needed if Pixbuf is used.)
895   --with-pixbuf           Include support for the GDK-Pixbuf library in some
896                           demos, which will make it possible for them to read
897                           GIF, JPEG, and PNG files as well.  (The path here is
898                           ignored if GTK 2.x is being used.)
899   --with-jpeg             Include support for the JPEG library.
900   --with-xshm-ext         Include support for the Shared Memory extension.
901   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
902   --with-readdisplay      Include support for the XReadDisplay extension.
903
904   --with-fortune=PROGRAM  Some demos are able to run an external program and
905                           display its text; this names the program to use by
906                           default (though it can be overridden with X
907                           resources.)  Default is \"/usr/games/fortune\".
908   --with-setuid-hacks     Allow some demos to be installed \`setuid root'
909                           (which is needed in order to ping other hosts.)
910
911
912 Some influential environment variables:
913   CC          C compiler command
914   CFLAGS      C compiler flags
915   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
916               nonstandard directory <lib dir>
917   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
918               headers in a nonstandard directory <include dir>
919   CPP         C preprocessor
920
921 Use these variables to override the choices made by `configure' or to help
922 it to find libraries and programs with nonstandard names/locations.
923
924 _ACEOF
925 fi
926
927 if test "$ac_init_help" = "recursive"; then
928   # If there are subdirs, report their specific --help.
929   ac_popdir=`pwd`
930   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
931     test -d $ac_dir || continue
932     ac_builddir=.
933
934 if test "$ac_dir" != .; then
935   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
936   # A "../" for each directory in $ac_dir_suffix.
937   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
938 else
939   ac_dir_suffix= ac_top_builddir=
940 fi
941
942 case $srcdir in
943   .)  # No --srcdir option.  We are building in place.
944     ac_srcdir=.
945     if test -z "$ac_top_builddir"; then
946        ac_top_srcdir=.
947     else
948        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
949     fi ;;
950   [\\/]* | ?:[\\/]* )  # Absolute path.
951     ac_srcdir=$srcdir$ac_dir_suffix;
952     ac_top_srcdir=$srcdir ;;
953   *) # Relative path.
954     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
955     ac_top_srcdir=$ac_top_builddir$srcdir ;;
956 esac
957 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
958 # absolute.
959 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
960 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
961 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
962 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
963
964     cd $ac_dir
965     # Check for guested configure; otherwise get Cygnus style configure.
966     if test -f $ac_srcdir/configure.gnu; then
967       echo
968       $SHELL $ac_srcdir/configure.gnu  --help=recursive
969     elif test -f $ac_srcdir/configure; then
970       echo
971       $SHELL $ac_srcdir/configure  --help=recursive
972     elif test -f $ac_srcdir/configure.ac ||
973            test -f $ac_srcdir/configure.in; then
974       echo
975       $ac_configure --help
976     else
977       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
978     fi
979     cd $ac_popdir
980   done
981 fi
982
983 test -n "$ac_init_help" && exit 0
984 if $ac_init_version; then
985   cat <<\_ACEOF
986
987 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
988 Free Software Foundation, Inc.
989 This configure script is free software; the Free Software Foundation
990 gives unlimited permission to copy, distribute and modify it.
991 _ACEOF
992   exit 0
993 fi
994 exec 5>config.log
995 cat >&5 <<_ACEOF
996 This file contains any messages produced by compilers while
997 running configure, to aid debugging if configure makes a mistake.
998
999 It was created by $as_me, which was
1000 generated by GNU Autoconf 2.53.  Invocation command line was
1001
1002   $ $0 $@
1003
1004 _ACEOF
1005 {
1006 cat <<_ASUNAME
1007 ## --------- ##
1008 ## Platform. ##
1009 ## --------- ##
1010
1011 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1012 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1013 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1014 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1015 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1016
1017 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1018 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1019
1020 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1021 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1022 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1023 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1024 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1025 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1026 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1027
1028 _ASUNAME
1029
1030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1031 for as_dir in $PATH
1032 do
1033   IFS=$as_save_IFS
1034   test -z "$as_dir" && as_dir=.
1035   echo "PATH: $as_dir"
1036 done
1037
1038 } >&5
1039
1040 cat >&5 <<_ACEOF
1041
1042
1043 ## ----------- ##
1044 ## Core tests. ##
1045 ## ----------- ##
1046
1047 _ACEOF
1048
1049
1050 # Keep a trace of the command line.
1051 # Strip out --no-create and --no-recursion so they do not pile up.
1052 # Also quote any args containing shell meta-characters.
1053 ac_configure_args=
1054 ac_sep=
1055 for ac_arg
1056 do
1057   case $ac_arg in
1058   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1059   | --no-cr | --no-c | -n ) continue ;;
1060   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1061   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1062     continue ;;
1063   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1064     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1065   esac
1066   case " $ac_configure_args " in
1067     *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1068     *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1069        ac_sep=" " ;;
1070   esac
1071   # Get rid of the leading space.
1072 done
1073
1074 # When interrupted or exit'd, cleanup temporary files, and complete
1075 # config.log.  We remove comments because anyway the quotes in there
1076 # would cause problems or look ugly.
1077 # WARNING: Be sure not to use single quotes in there, as some shells,
1078 # such as our DU 5.0 friend, will then `close' the trap.
1079 trap 'exit_status=$?
1080   # Save into config.log some information that might help in debugging.
1081   {
1082     echo
1083     cat <<\_ASBOX
1084 ## ---------------- ##
1085 ## Cache variables. ##
1086 ## ---------------- ##
1087 _ASBOX
1088     echo
1089     # The following way of writing the cache mishandles newlines in values,
1090 {
1091   (set) 2>&1 |
1092     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1093     *ac_space=\ *)
1094       sed -n \
1095         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1096           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1097       ;;
1098     *)
1099       sed -n \
1100         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1101       ;;
1102     esac;
1103 }
1104     echo
1105     if test -s confdefs.h; then
1106       cat <<\_ASBOX
1107 ## ----------- ##
1108 ## confdefs.h. ##
1109 ## ----------- ##
1110 _ASBOX
1111       echo
1112       sed "/^$/d" confdefs.h
1113       echo
1114     fi
1115     test "$ac_signal" != 0 &&
1116       echo "$as_me: caught signal $ac_signal"
1117     echo "$as_me: exit $exit_status"
1118   } >&5
1119   rm -f core core.* *.core &&
1120   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1121     exit $exit_status
1122      ' 0
1123 for ac_signal in 1 2 13 15; do
1124   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1125 done
1126 ac_signal=0
1127
1128 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1129 rm -rf conftest* confdefs.h
1130 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1131 echo >confdefs.h
1132
1133 # Predefined preprocessor variables.
1134
1135 cat >>confdefs.h <<_ACEOF
1136 #define PACKAGE_NAME "$PACKAGE_NAME"
1137 _ACEOF
1138
1139
1140 cat >>confdefs.h <<_ACEOF
1141 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1142 _ACEOF
1143
1144
1145 cat >>confdefs.h <<_ACEOF
1146 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1147 _ACEOF
1148
1149
1150 cat >>confdefs.h <<_ACEOF
1151 #define PACKAGE_STRING "$PACKAGE_STRING"
1152 _ACEOF
1153
1154
1155 cat >>confdefs.h <<_ACEOF
1156 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1157 _ACEOF
1158
1159
1160 # Let the site file select an alternate cache file if it wants to.
1161 # Prefer explicitly selected file to automatically selected ones.
1162 if test -z "$CONFIG_SITE"; then
1163   if test "x$prefix" != xNONE; then
1164     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1165   else
1166     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1167   fi
1168 fi
1169 for ac_site_file in $CONFIG_SITE; do
1170   if test -r "$ac_site_file"; then
1171     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1172 echo "$as_me: loading site script $ac_site_file" >&6;}
1173     sed 's/^/| /' "$ac_site_file" >&5
1174     . "$ac_site_file"
1175   fi
1176 done
1177
1178 if test -r "$cache_file"; then
1179   # Some versions of bash will fail to source /dev/null (special
1180   # files actually), so we avoid doing that.
1181   if test -f "$cache_file"; then
1182     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1183 echo "$as_me: loading cache $cache_file" >&6;}
1184     case $cache_file in
1185       [\\/]* | ?:[\\/]* ) . $cache_file;;
1186       *)                      . ./$cache_file;;
1187     esac
1188   fi
1189 else
1190   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1191 echo "$as_me: creating cache $cache_file" >&6;}
1192   >$cache_file
1193 fi
1194
1195 # Check that the precious variables saved in the cache have kept the same
1196 # value.
1197 ac_cache_corrupted=false
1198 for ac_var in `(set) 2>&1 |
1199                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1200   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1201   eval ac_new_set=\$ac_env_${ac_var}_set
1202   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1203   eval ac_new_val="\$ac_env_${ac_var}_value"
1204   case $ac_old_set,$ac_new_set in
1205     set,)
1206       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1207 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1208       ac_cache_corrupted=: ;;
1209     ,set)
1210       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1211 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1212       ac_cache_corrupted=: ;;
1213     ,);;
1214     *)
1215       if test "x$ac_old_val" != "x$ac_new_val"; then
1216         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1217 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1218         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1219 echo "$as_me:   former value:  $ac_old_val" >&2;}
1220         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1221 echo "$as_me:   current value: $ac_new_val" >&2;}
1222         ac_cache_corrupted=:
1223       fi;;
1224   esac
1225   # Pass precious variables to config.status.
1226   if test "$ac_new_set" = set; then
1227     case $ac_new_val in
1228     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1229       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1230     *) ac_arg=$ac_var=$ac_new_val ;;
1231     esac
1232     case " $ac_configure_args " in
1233       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1234       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1235     esac
1236   fi
1237 done
1238 if $ac_cache_corrupted; then
1239   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1240 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1241   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1242 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1243    { (exit 1); exit 1; }; }
1244 fi
1245
1246 ac_ext=c
1247 ac_cpp='$CPP $CPPFLAGS'
1248 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1249 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1250 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269 ac_config_headers="$ac_config_headers config.h"
1270
1271
1272 echo "current directory: `pwd`"
1273 echo "command line was: $0 $@"
1274
1275
1276 # After checking to see that --srcdir is correct (which AC_INIT does)
1277 # check for some random other files that come later in the tar file,
1278 # to make sure everything is here.
1279 #
1280 for d in driver utils hacks hacks/glx ; do
1281   f=$srcdir/$d/Makefile.in
1282   if test \! -r $f ; then
1283     echo ""
1284     echo "ERROR: The package is incomplete: $f does not exist."
1285     echo "       This probably means that your download was truncated."
1286     echo ""
1287     exit 1
1288   fi
1289 done
1290
1291 ###############################################################################
1292 #
1293 #       Function to figure out how to run the compiler.
1294 #
1295 ###############################################################################
1296
1297
1298
1299
1300 ###############################################################################
1301 #
1302 #       Functions to figure out how to disable // comments in ANSI C code.
1303 #
1304 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1305 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1306 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1307 #       so much for compatibility!)
1308 #
1309 ###############################################################################
1310
1311
1312
1313
1314
1315
1316 ###############################################################################
1317 #
1318 #       Function to figure out how to turn off Objective C on MacOS X.
1319 #       (We have to do this to work around an Apple-specific gcc bug.)
1320 #
1321 ###############################################################################
1322
1323
1324
1325
1326
1327
1328 ###############################################################################
1329 #
1330 #       Function to figure out how to create directory trees.
1331 #
1332 ###############################################################################
1333
1334
1335
1336
1337 ###############################################################################
1338 #
1339 #       Function to check whether gettimeofday() exists, and how to call it.
1340 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1341 #
1342 ###############################################################################
1343
1344
1345
1346
1347 ###############################################################################
1348 #
1349 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1350 #
1351 ###############################################################################
1352
1353 # M4 sucks!!  perl sucks too!!
1354
1355 perl_version_cmd='print $]'
1356
1357
1358
1359
1360
1361 ###############################################################################
1362 #
1363 #       Function to demand "bc".  Losers.
1364 #
1365 ###############################################################################
1366
1367
1368
1369 ###############################################################################
1370 #
1371 #       Functions to check how to do ICMP PING requests.
1372 #
1373 ###############################################################################
1374
1375
1376
1377
1378
1379
1380 ###############################################################################
1381 #
1382 #       Functions to check for various X11 crap.
1383 #
1384 ###############################################################################
1385
1386 # Try and find the app-defaults directory.
1387 # It sucks that autoconf doesn't do this already...
1388 #
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399 # Random special-cases for X on certain pathological OSes.
1400 # You know who you are.
1401 #
1402
1403
1404
1405
1406 ###############################################################################
1407 #
1408 #       Some utility functions to make checking for X things easier.
1409 #
1410 ###############################################################################
1411
1412 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1413 #
1414
1415
1416 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1417 #
1418
1419
1420 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1421 #
1422
1423
1424
1425 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1426 # Use this sparingly; it probably doesn't work very well on X programs.
1427 #
1428
1429
1430 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1431 # (But not the -L directories!)
1432 #
1433
1434
1435
1436
1437 # Usage: HANDLE_X_PATH_ARG([variable_name],
1438 #                          [--command-line-option],
1439 #                          [descriptive string])
1440 #
1441 # All of the --with options take three forms:
1442 #
1443 #   --with-foo (or --with-foo=yes)
1444 #   --without-foo (or --with-foo=no)
1445 #   --with-foo=/DIR
1446 #
1447 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1448 # a directory (string beginning with a slash) it checks to see whether
1449 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1450 # as appropriate.
1451 #
1452
1453
1454
1455
1456 ###############################################################################
1457 ###############################################################################
1458 #
1459 #       End of function definitions.  Now start actually executing stuff.
1460 #
1461 ###############################################################################
1462 ###############################################################################
1463
1464 # random compiler setup
1465 ac_aux_dir=
1466 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1467   if test -f $ac_dir/install-sh; then
1468     ac_aux_dir=$ac_dir
1469     ac_install_sh="$ac_aux_dir/install-sh -c"
1470     break
1471   elif test -f $ac_dir/install.sh; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install.sh -c"
1474     break
1475   elif test -f $ac_dir/shtool; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/shtool install -c"
1478     break
1479   fi
1480 done
1481 if test -z "$ac_aux_dir"; then
1482   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1483 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1484    { (exit 1); exit 1; }; }
1485 fi
1486 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1487 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1488 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1489
1490 # Make sure we can run config.sub.
1491 $ac_config_sub sun4 >/dev/null 2>&1 ||
1492   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1493 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1494    { (exit 1); exit 1; }; }
1495
1496 echo "$as_me:$LINENO: checking build system type" >&5
1497 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1498 if test "${ac_cv_build+set}" = set; then
1499   echo $ECHO_N "(cached) $ECHO_C" >&6
1500 else
1501   ac_cv_build_alias=$build_alias
1502 test -z "$ac_cv_build_alias" &&
1503   ac_cv_build_alias=`$ac_config_guess`
1504 test -z "$ac_cv_build_alias" &&
1505   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1506 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1507    { (exit 1); exit 1; }; }
1508 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1509   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1510 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1511    { (exit 1); exit 1; }; }
1512
1513 fi
1514 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1515 echo "${ECHO_T}$ac_cv_build" >&6
1516 build=$ac_cv_build
1517 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1518 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1519 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1520
1521
1522 echo "$as_me:$LINENO: checking host system type" >&5
1523 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1524 if test "${ac_cv_host+set}" = set; then
1525   echo $ECHO_N "(cached) $ECHO_C" >&6
1526 else
1527   ac_cv_host_alias=$host_alias
1528 test -z "$ac_cv_host_alias" &&
1529   ac_cv_host_alias=$ac_cv_build_alias
1530 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1531   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1532 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1533    { (exit 1); exit 1; }; }
1534
1535 fi
1536 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1537 echo "${ECHO_T}$ac_cv_host" >&6
1538 host=$ac_cv_host
1539 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1540 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1541 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1542
1543
1544
1545 ac_ext=c
1546 ac_cpp='$CPP $CPPFLAGS'
1547 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1548 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1549 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1550 if test -n "$ac_tool_prefix"; then
1551   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1552 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1553 echo "$as_me:$LINENO: checking for $ac_word" >&5
1554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1555 if test "${ac_cv_prog_CC+set}" = set; then
1556   echo $ECHO_N "(cached) $ECHO_C" >&6
1557 else
1558   if test -n "$CC"; then
1559   ac_cv_prog_CC="$CC" # Let the user override the test.
1560 else
1561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1562 for as_dir in $PATH
1563 do
1564   IFS=$as_save_IFS
1565   test -z "$as_dir" && as_dir=.
1566   for ac_exec_ext in '' $ac_executable_extensions; do
1567   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1568     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1569     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1570     break 2
1571   fi
1572 done
1573 done
1574
1575 fi
1576 fi
1577 CC=$ac_cv_prog_CC
1578 if test -n "$CC"; then
1579   echo "$as_me:$LINENO: result: $CC" >&5
1580 echo "${ECHO_T}$CC" >&6
1581 else
1582   echo "$as_me:$LINENO: result: no" >&5
1583 echo "${ECHO_T}no" >&6
1584 fi
1585
1586 fi
1587 if test -z "$ac_cv_prog_CC"; then
1588   ac_ct_CC=$CC
1589   # Extract the first word of "gcc", so it can be a program name with args.
1590 set dummy gcc; ac_word=$2
1591 echo "$as_me:$LINENO: checking for $ac_word" >&5
1592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1593 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1594   echo $ECHO_N "(cached) $ECHO_C" >&6
1595 else
1596   if test -n "$ac_ct_CC"; then
1597   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1598 else
1599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1600 for as_dir in $PATH
1601 do
1602   IFS=$as_save_IFS
1603   test -z "$as_dir" && as_dir=.
1604   for ac_exec_ext in '' $ac_executable_extensions; do
1605   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1606     ac_cv_prog_ac_ct_CC="gcc"
1607     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1608     break 2
1609   fi
1610 done
1611 done
1612
1613 fi
1614 fi
1615 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1616 if test -n "$ac_ct_CC"; then
1617   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1618 echo "${ECHO_T}$ac_ct_CC" >&6
1619 else
1620   echo "$as_me:$LINENO: result: no" >&5
1621 echo "${ECHO_T}no" >&6
1622 fi
1623
1624   CC=$ac_ct_CC
1625 else
1626   CC="$ac_cv_prog_CC"
1627 fi
1628
1629 if test -z "$CC"; then
1630   if test -n "$ac_tool_prefix"; then
1631   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1632 set dummy ${ac_tool_prefix}cc; ac_word=$2
1633 echo "$as_me:$LINENO: checking for $ac_word" >&5
1634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1635 if test "${ac_cv_prog_CC+set}" = set; then
1636   echo $ECHO_N "(cached) $ECHO_C" >&6
1637 else
1638   if test -n "$CC"; then
1639   ac_cv_prog_CC="$CC" # Let the user override the test.
1640 else
1641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1642 for as_dir in $PATH
1643 do
1644   IFS=$as_save_IFS
1645   test -z "$as_dir" && as_dir=.
1646   for ac_exec_ext in '' $ac_executable_extensions; do
1647   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1648     ac_cv_prog_CC="${ac_tool_prefix}cc"
1649     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1650     break 2
1651   fi
1652 done
1653 done
1654
1655 fi
1656 fi
1657 CC=$ac_cv_prog_CC
1658 if test -n "$CC"; then
1659   echo "$as_me:$LINENO: result: $CC" >&5
1660 echo "${ECHO_T}$CC" >&6
1661 else
1662   echo "$as_me:$LINENO: result: no" >&5
1663 echo "${ECHO_T}no" >&6
1664 fi
1665
1666 fi
1667 if test -z "$ac_cv_prog_CC"; then
1668   ac_ct_CC=$CC
1669   # Extract the first word of "cc", so it can be a program name with args.
1670 set dummy cc; ac_word=$2
1671 echo "$as_me:$LINENO: checking for $ac_word" >&5
1672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1673 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1674   echo $ECHO_N "(cached) $ECHO_C" >&6
1675 else
1676   if test -n "$ac_ct_CC"; then
1677   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1678 else
1679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1680 for as_dir in $PATH
1681 do
1682   IFS=$as_save_IFS
1683   test -z "$as_dir" && as_dir=.
1684   for ac_exec_ext in '' $ac_executable_extensions; do
1685   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1686     ac_cv_prog_ac_ct_CC="cc"
1687     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1688     break 2
1689   fi
1690 done
1691 done
1692
1693 fi
1694 fi
1695 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1696 if test -n "$ac_ct_CC"; then
1697   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1698 echo "${ECHO_T}$ac_ct_CC" >&6
1699 else
1700   echo "$as_me:$LINENO: result: no" >&5
1701 echo "${ECHO_T}no" >&6
1702 fi
1703
1704   CC=$ac_ct_CC
1705 else
1706   CC="$ac_cv_prog_CC"
1707 fi
1708
1709 fi
1710 if test -z "$CC"; then
1711   # Extract the first word of "cc", so it can be a program name with args.
1712 set dummy cc; ac_word=$2
1713 echo "$as_me:$LINENO: checking for $ac_word" >&5
1714 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1715 if test "${ac_cv_prog_CC+set}" = set; then
1716   echo $ECHO_N "(cached) $ECHO_C" >&6
1717 else
1718   if test -n "$CC"; then
1719   ac_cv_prog_CC="$CC" # Let the user override the test.
1720 else
1721   ac_prog_rejected=no
1722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1723 for as_dir in $PATH
1724 do
1725   IFS=$as_save_IFS
1726   test -z "$as_dir" && as_dir=.
1727   for ac_exec_ext in '' $ac_executable_extensions; do
1728   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1729     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1730        ac_prog_rejected=yes
1731        continue
1732      fi
1733     ac_cv_prog_CC="cc"
1734     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1735     break 2
1736   fi
1737 done
1738 done
1739
1740 if test $ac_prog_rejected = yes; then
1741   # We found a bogon in the path, so make sure we never use it.
1742   set dummy $ac_cv_prog_CC
1743   shift
1744   if test $# != 0; then
1745     # We chose a different compiler from the bogus one.
1746     # However, it has the same basename, so the bogon will be chosen
1747     # first if we set CC to just the basename; use the full file name.
1748     shift
1749     set dummy "$as_dir/$ac_word" ${1+"$@"}
1750     shift
1751     ac_cv_prog_CC="$@"
1752   fi
1753 fi
1754 fi
1755 fi
1756 CC=$ac_cv_prog_CC
1757 if test -n "$CC"; then
1758   echo "$as_me:$LINENO: result: $CC" >&5
1759 echo "${ECHO_T}$CC" >&6
1760 else
1761   echo "$as_me:$LINENO: result: no" >&5
1762 echo "${ECHO_T}no" >&6
1763 fi
1764
1765 fi
1766 if test -z "$CC"; then
1767   if test -n "$ac_tool_prefix"; then
1768   for ac_prog in cl
1769   do
1770     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1771 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1772 echo "$as_me:$LINENO: checking for $ac_word" >&5
1773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1774 if test "${ac_cv_prog_CC+set}" = set; then
1775   echo $ECHO_N "(cached) $ECHO_C" >&6
1776 else
1777   if test -n "$CC"; then
1778   ac_cv_prog_CC="$CC" # Let the user override the test.
1779 else
1780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1781 for as_dir in $PATH
1782 do
1783   IFS=$as_save_IFS
1784   test -z "$as_dir" && as_dir=.
1785   for ac_exec_ext in '' $ac_executable_extensions; do
1786   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1787     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1788     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1789     break 2
1790   fi
1791 done
1792 done
1793
1794 fi
1795 fi
1796 CC=$ac_cv_prog_CC
1797 if test -n "$CC"; then
1798   echo "$as_me:$LINENO: result: $CC" >&5
1799 echo "${ECHO_T}$CC" >&6
1800 else
1801   echo "$as_me:$LINENO: result: no" >&5
1802 echo "${ECHO_T}no" >&6
1803 fi
1804
1805     test -n "$CC" && break
1806   done
1807 fi
1808 if test -z "$CC"; then
1809   ac_ct_CC=$CC
1810   for ac_prog in cl
1811 do
1812   # Extract the first word of "$ac_prog", so it can be a program name with args.
1813 set dummy $ac_prog; ac_word=$2
1814 echo "$as_me:$LINENO: checking for $ac_word" >&5
1815 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1816 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1817   echo $ECHO_N "(cached) $ECHO_C" >&6
1818 else
1819   if test -n "$ac_ct_CC"; then
1820   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1821 else
1822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1823 for as_dir in $PATH
1824 do
1825   IFS=$as_save_IFS
1826   test -z "$as_dir" && as_dir=.
1827   for ac_exec_ext in '' $ac_executable_extensions; do
1828   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1829     ac_cv_prog_ac_ct_CC="$ac_prog"
1830     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1831     break 2
1832   fi
1833 done
1834 done
1835
1836 fi
1837 fi
1838 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1839 if test -n "$ac_ct_CC"; then
1840   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1841 echo "${ECHO_T}$ac_ct_CC" >&6
1842 else
1843   echo "$as_me:$LINENO: result: no" >&5
1844 echo "${ECHO_T}no" >&6
1845 fi
1846
1847   test -n "$ac_ct_CC" && break
1848 done
1849
1850   CC=$ac_ct_CC
1851 fi
1852
1853 fi
1854
1855
1856 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1857 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1858    { (exit 1); exit 1; }; }
1859
1860 # Provide some information about the compiler.
1861 echo "$as_me:$LINENO:" \
1862      "checking for C compiler version" >&5
1863 ac_compiler=`set X $ac_compile; echo $2`
1864 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1865   (eval $ac_compiler --version </dev/null >&5) 2>&5
1866   ac_status=$?
1867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1868   (exit $ac_status); }
1869 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1870   (eval $ac_compiler -v </dev/null >&5) 2>&5
1871   ac_status=$?
1872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1873   (exit $ac_status); }
1874 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1875   (eval $ac_compiler -V </dev/null >&5) 2>&5
1876   ac_status=$?
1877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1878   (exit $ac_status); }
1879
1880 cat >conftest.$ac_ext <<_ACEOF
1881 #line $LINENO "configure"
1882 #include "confdefs.h"
1883
1884 #ifdef F77_DUMMY_MAIN
1885 #  ifdef __cplusplus
1886      extern "C"
1887 #  endif
1888    int F77_DUMMY_MAIN() { return 1; }
1889 #endif
1890 int
1891 main ()
1892 {
1893
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 ac_clean_files_save=$ac_clean_files
1899 ac_clean_files="$ac_clean_files a.out a.exe"
1900 # Try to create an executable without -o first, disregard a.out.
1901 # It will help us diagnose broken compilers, and finding out an intuition
1902 # of exeext.
1903 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1904 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1905 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1906 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1907   (eval $ac_link_default) 2>&5
1908   ac_status=$?
1909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1910   (exit $ac_status); }; then
1911   # Find the output, starting from the most likely.  This scheme is
1912 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1913 # resort.
1914
1915 # Be careful to initialize this variable, since it used to be cached.
1916 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1917 ac_cv_exeext=
1918 for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1919                 ls a.out conftest 2>/dev/null;
1920                 ls a.* conftest.* 2>/dev/null`; do
1921   case $ac_file in
1922     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1923     a.out ) # We found the default executable, but exeext='' is most
1924             # certainly right.
1925             break;;
1926     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1927           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1928           export ac_cv_exeext
1929           break;;
1930     * ) break;;
1931   esac
1932 done
1933 else
1934   echo "$as_me: failed program was:" >&5
1935 cat conftest.$ac_ext >&5
1936 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
1937 echo "$as_me: error: C compiler cannot create executables" >&2;}
1938    { (exit 77); exit 77; }; }
1939 fi
1940
1941 ac_exeext=$ac_cv_exeext
1942 echo "$as_me:$LINENO: result: $ac_file" >&5
1943 echo "${ECHO_T}$ac_file" >&6
1944
1945 # Check the compiler produces executables we can run.  If not, either
1946 # the compiler is broken, or we cross compile.
1947 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1948 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1949 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1950 # If not cross compiling, check that we can run a simple program.
1951 if test "$cross_compiling" != yes; then
1952   if { ac_try='./$ac_file'
1953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1954   (eval $ac_try) 2>&5
1955   ac_status=$?
1956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1957   (exit $ac_status); }; }; then
1958     cross_compiling=no
1959   else
1960     if test "$cross_compiling" = maybe; then
1961         cross_compiling=yes
1962     else
1963         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1964 If you meant to cross compile, use \`--host'." >&5
1965 echo "$as_me: error: cannot run C compiled programs.
1966 If you meant to cross compile, use \`--host'." >&2;}
1967    { (exit 1); exit 1; }; }
1968     fi
1969   fi
1970 fi
1971 echo "$as_me:$LINENO: result: yes" >&5
1972 echo "${ECHO_T}yes" >&6
1973
1974 rm -f a.out a.exe conftest$ac_cv_exeext
1975 ac_clean_files=$ac_clean_files_save
1976 # Check the compiler produces executables we can run.  If not, either
1977 # the compiler is broken, or we cross compile.
1978 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1979 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1980 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1981 echo "${ECHO_T}$cross_compiling" >&6
1982
1983 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1984 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1985 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1986   (eval $ac_link) 2>&5
1987   ac_status=$?
1988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1989   (exit $ac_status); }; then
1990   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1991 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1992 # work properly (i.e., refer to `conftest.exe'), while it won't with
1993 # `rm'.
1994 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1995   case $ac_file in
1996     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1997     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1998           export ac_cv_exeext
1999           break;;
2000     * ) break;;
2001   esac
2002 done
2003 else
2004   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2005 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2006    { (exit 1); exit 1; }; }
2007 fi
2008
2009 rm -f conftest$ac_cv_exeext
2010 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2011 echo "${ECHO_T}$ac_cv_exeext" >&6
2012
2013 rm -f conftest.$ac_ext
2014 EXEEXT=$ac_cv_exeext
2015 ac_exeext=$EXEEXT
2016 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2017 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2018 if test "${ac_cv_objext+set}" = set; then
2019   echo $ECHO_N "(cached) $ECHO_C" >&6
2020 else
2021   cat >conftest.$ac_ext <<_ACEOF
2022 #line $LINENO "configure"
2023 #include "confdefs.h"
2024
2025 #ifdef F77_DUMMY_MAIN
2026 #  ifdef __cplusplus
2027      extern "C"
2028 #  endif
2029    int F77_DUMMY_MAIN() { return 1; }
2030 #endif
2031 int
2032 main ()
2033 {
2034
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 rm -f conftest.o conftest.obj
2040 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2041   (eval $ac_compile) 2>&5
2042   ac_status=$?
2043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2044   (exit $ac_status); }; then
2045   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2046   case $ac_file in
2047     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2048     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2049        break;;
2050   esac
2051 done
2052 else
2053   echo "$as_me: failed program was:" >&5
2054 cat conftest.$ac_ext >&5
2055 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2056 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2057    { (exit 1); exit 1; }; }
2058 fi
2059
2060 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2061 fi
2062 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2063 echo "${ECHO_T}$ac_cv_objext" >&6
2064 OBJEXT=$ac_cv_objext
2065 ac_objext=$OBJEXT
2066 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2067 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2068 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2069   echo $ECHO_N "(cached) $ECHO_C" >&6
2070 else
2071   cat >conftest.$ac_ext <<_ACEOF
2072 #line $LINENO "configure"
2073 #include "confdefs.h"
2074
2075 #ifdef F77_DUMMY_MAIN
2076 #  ifdef __cplusplus
2077      extern "C"
2078 #  endif
2079    int F77_DUMMY_MAIN() { return 1; }
2080 #endif
2081 int
2082 main ()
2083 {
2084 #ifndef __GNUC__
2085        choke me
2086 #endif
2087
2088   ;
2089   return 0;
2090 }
2091 _ACEOF
2092 rm -f conftest.$ac_objext
2093 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2094   (eval $ac_compile) 2>&5
2095   ac_status=$?
2096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2097   (exit $ac_status); } &&
2098          { ac_try='test -s conftest.$ac_objext'
2099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2100   (eval $ac_try) 2>&5
2101   ac_status=$?
2102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2103   (exit $ac_status); }; }; then
2104   ac_compiler_gnu=yes
2105 else
2106   echo "$as_me: failed program was:" >&5
2107 cat conftest.$ac_ext >&5
2108 ac_compiler_gnu=no
2109 fi
2110 rm -f conftest.$ac_objext conftest.$ac_ext
2111 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2112
2113 fi
2114 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2115 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2116 GCC=`test $ac_compiler_gnu = yes && echo yes`
2117 ac_test_CFLAGS=${CFLAGS+set}
2118 ac_save_CFLAGS=$CFLAGS
2119 CFLAGS="-g"
2120 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2121 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2122 if test "${ac_cv_prog_cc_g+set}" = set; then
2123   echo $ECHO_N "(cached) $ECHO_C" >&6
2124 else
2125   cat >conftest.$ac_ext <<_ACEOF
2126 #line $LINENO "configure"
2127 #include "confdefs.h"
2128
2129 #ifdef F77_DUMMY_MAIN
2130 #  ifdef __cplusplus
2131      extern "C"
2132 #  endif
2133    int F77_DUMMY_MAIN() { return 1; }
2134 #endif
2135 int
2136 main ()
2137 {
2138
2139   ;
2140   return 0;
2141 }
2142 _ACEOF
2143 rm -f conftest.$ac_objext
2144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2145   (eval $ac_compile) 2>&5
2146   ac_status=$?
2147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2148   (exit $ac_status); } &&
2149          { ac_try='test -s conftest.$ac_objext'
2150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2151   (eval $ac_try) 2>&5
2152   ac_status=$?
2153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2154   (exit $ac_status); }; }; then
2155   ac_cv_prog_cc_g=yes
2156 else
2157   echo "$as_me: failed program was:" >&5
2158 cat conftest.$ac_ext >&5
2159 ac_cv_prog_cc_g=no
2160 fi
2161 rm -f conftest.$ac_objext conftest.$ac_ext
2162 fi
2163 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2164 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2165 if test "$ac_test_CFLAGS" = set; then
2166   CFLAGS=$ac_save_CFLAGS
2167 elif test $ac_cv_prog_cc_g = yes; then
2168   if test "$GCC" = yes; then
2169     CFLAGS="-g -O2"
2170   else
2171     CFLAGS="-g"
2172   fi
2173 else
2174   if test "$GCC" = yes; then
2175     CFLAGS="-O2"
2176   else
2177     CFLAGS=
2178   fi
2179 fi
2180 # Some people use a C++ compiler to compile C.  Since we use `exit',
2181 # in C++ we need to declare it.  In case someone uses the same compiler
2182 # for both compiling C and C++ we need to have the C++ compiler decide
2183 # the declaration of exit, since it's the most demanding environment.
2184 cat >conftest.$ac_ext <<_ACEOF
2185 #ifndef __cplusplus
2186   choke me
2187 #endif
2188 _ACEOF
2189 rm -f conftest.$ac_objext
2190 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2191   (eval $ac_compile) 2>&5
2192   ac_status=$?
2193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2194   (exit $ac_status); } &&
2195          { ac_try='test -s conftest.$ac_objext'
2196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2197   (eval $ac_try) 2>&5
2198   ac_status=$?
2199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2200   (exit $ac_status); }; }; then
2201   for ac_declaration in \
2202    ''\
2203    '#include <stdlib.h>' \
2204    'extern "C" void std::exit (int) throw (); using std::exit;' \
2205    'extern "C" void std::exit (int); using std::exit;' \
2206    'extern "C" void exit (int) throw ();' \
2207    'extern "C" void exit (int);' \
2208    'void exit (int);'
2209 do
2210   cat >conftest.$ac_ext <<_ACEOF
2211 #line $LINENO "configure"
2212 #include "confdefs.h"
2213 #include <stdlib.h>
2214 $ac_declaration
2215 #ifdef F77_DUMMY_MAIN
2216 #  ifdef __cplusplus
2217      extern "C"
2218 #  endif
2219    int F77_DUMMY_MAIN() { return 1; }
2220 #endif
2221 int
2222 main ()
2223 {
2224 exit (42);
2225   ;
2226   return 0;
2227 }
2228 _ACEOF
2229 rm -f conftest.$ac_objext
2230 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2231   (eval $ac_compile) 2>&5
2232   ac_status=$?
2233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2234   (exit $ac_status); } &&
2235          { ac_try='test -s conftest.$ac_objext'
2236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2237   (eval $ac_try) 2>&5
2238   ac_status=$?
2239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2240   (exit $ac_status); }; }; then
2241   :
2242 else
2243   echo "$as_me: failed program was:" >&5
2244 cat conftest.$ac_ext >&5
2245 continue
2246 fi
2247 rm -f conftest.$ac_objext conftest.$ac_ext
2248   cat >conftest.$ac_ext <<_ACEOF
2249 #line $LINENO "configure"
2250 #include "confdefs.h"
2251 $ac_declaration
2252 #ifdef F77_DUMMY_MAIN
2253 #  ifdef __cplusplus
2254      extern "C"
2255 #  endif
2256    int F77_DUMMY_MAIN() { return 1; }
2257 #endif
2258 int
2259 main ()
2260 {
2261 exit (42);
2262   ;
2263   return 0;
2264 }
2265 _ACEOF
2266 rm -f conftest.$ac_objext
2267 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2268   (eval $ac_compile) 2>&5
2269   ac_status=$?
2270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2271   (exit $ac_status); } &&
2272          { ac_try='test -s conftest.$ac_objext'
2273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2274   (eval $ac_try) 2>&5
2275   ac_status=$?
2276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277   (exit $ac_status); }; }; then
2278   break
2279 else
2280   echo "$as_me: failed program was:" >&5
2281 cat conftest.$ac_ext >&5
2282 fi
2283 rm -f conftest.$ac_objext conftest.$ac_ext
2284 done
2285 rm -f conftest*
2286 if test -n "$ac_declaration"; then
2287   echo '#ifdef __cplusplus' >>confdefs.h
2288   echo $ac_declaration      >>confdefs.h
2289   echo '#endif'             >>confdefs.h
2290 fi
2291
2292 else
2293   echo "$as_me: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 fi
2296 rm -f conftest.$ac_objext conftest.$ac_ext
2297 ac_ext=c
2298 ac_cpp='$CPP $CPPFLAGS'
2299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2300 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2301 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2302
2303
2304   if test -z "$GCC"; then
2305     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2306 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2307     case "$host" in
2308       *-hpux* )
2309         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2310 echo "${ECHO_T}HPUX: adding -Ae" >&6
2311         CC="$CC -Ae"
2312       ;;
2313       *-aix* )
2314         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2315 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2316         CC="$CC -qlanglvl=ansi -qhalt=e"
2317       ;;
2318
2319       *-dec-* )
2320         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2321 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2322         CC="$CC -std1"
2323       ;;
2324
2325       *)
2326         echo "$as_me:$LINENO: result: no idea" >&5
2327 echo "${ECHO_T}no idea" >&6
2328       ;;
2329     esac
2330   fi
2331
2332   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2333 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2334   if test "$cross_compiling" = yes; then
2335   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2336 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2337    { (exit 1); exit 1; }; }
2338 else
2339   cat >conftest.$ac_ext <<_ACEOF
2340 #line $LINENO "configure"
2341 #include "confdefs.h"
2342  main(int ac, char **av) { return 0; }
2343 _ACEOF
2344 rm -f conftest$ac_exeext
2345 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2346   (eval $ac_link) 2>&5
2347   ac_status=$?
2348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2349   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2351   (eval $ac_try) 2>&5
2352   ac_status=$?
2353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2354   (exit $ac_status); }; }; then
2355   echo "$as_me:$LINENO: result: yes" >&5
2356 echo "${ECHO_T}yes" >&6
2357 else
2358   echo "$as_me: program exited with status $ac_status" >&5
2359 echo "$as_me: failed program was:" >&5
2360 cat conftest.$ac_ext >&5
2361 ( exit $ac_status )
2362 echo "$as_me:$LINENO: result: no" >&5
2363 echo "${ECHO_T}no" >&6
2364      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2365 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2366    { (exit 1); exit 1; }; }
2367 fi
2368 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2369 fi
2370
2371   if test -n "$GCC"; then
2372     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2373 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2374     CC="$CC -Wall -Wstrict-prototypes -Wnested-externs"
2375   else
2376     case "$host" in
2377       *-irix5* |*-irix6.0-3* )
2378         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2379 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2380         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2381       ;;
2382 #     *-dec-osf* )
2383 #       if test -z "$GCC"; then
2384 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2385 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2386 #       fi
2387 #     ;;
2388     esac
2389   fi
2390
2391 if test -n "$GCC"; then
2392    if test -n "$GCC"; then
2393    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2394 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2395 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2396   echo $ECHO_N "(cached) $ECHO_C" >&6
2397 else
2398   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2399           grep unrecognized >/dev/null ); then
2400        ac_cv_gcc_accepts_std=no
2401      else
2402        ac_cv_gcc_accepts_std=yes
2403      fi
2404 fi
2405 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2406 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2407    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2408   fi
2409
2410    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2411 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2412    #
2413    # The reason that // comments are banned from xscreensaver is that gcc is
2414    # basically the only compiler in the world that supports them in C code.
2415    # All other vendors support them only in their C++ compilers, not in their
2416    # ANSI C compilers.  This means that it's a portability problem: every time
2417    # these comments have snuck into the xscreensaver source code, I've gotten
2418    # complaints about it the next day.  So we turn off support for them in gcc
2419    # as well to prevent them from accidentially slipping in.
2420    #
2421    if test "$ac_gcc_accepts_std" = yes ; then
2422      #
2423      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2424      # (That appears to be the only additional preprocessor symbol
2425      # it defines, in addition to the syntax changes it makes.)
2426      #
2427      # -std=gnu89 is no good, because // comments were a GNU extension
2428      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2429      # with -std=gnu89 but not with -std=c89.)
2430      #
2431      CC="$CC -std=c89 -U__STRICT_ANSI__"
2432    else
2433      # The old way:
2434      CC="$CC -Wp,-lang-c89"
2435    fi
2436   fi
2437
2438 if test -n "$GCC"; then
2439    if test -n "$GCC"; then
2440    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2441 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2442 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2443   echo $ECHO_N "(cached) $ECHO_C" >&6
2444 else
2445   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2446           grep unrecognized >/dev/null ); then
2447        ac_cv_gcc_accepts_no_cpp_precomp=no
2448      else
2449        ac_cv_gcc_accepts_no_cpp_precomp=yes
2450      fi
2451 fi
2452 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2453 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2454    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2455   fi
2456
2457    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2458      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2459 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2460      CC="$CC -no-cpp-precomp"
2461    fi
2462   fi
2463
2464 ac_ext=c
2465 ac_cpp='$CPP $CPPFLAGS'
2466 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2467 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2468 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2469 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2470 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2471 # On Suns, sometimes $CPP names a directory.
2472 if test -n "$CPP" && test -d "$CPP"; then
2473   CPP=
2474 fi
2475 if test -z "$CPP"; then
2476   if test "${ac_cv_prog_CPP+set}" = set; then
2477   echo $ECHO_N "(cached) $ECHO_C" >&6
2478 else
2479       # Double quotes because CPP needs to be expanded
2480     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2481     do
2482       ac_preproc_ok=false
2483 for ac_c_preproc_warn_flag in '' yes
2484 do
2485   # Use a header file that comes with gcc, so configuring glibc
2486   # with a fresh cross-compiler works.
2487   # On the NeXT, cc -E runs the code through the compiler's parser,
2488   # not just through cpp. "Syntax error" is here to catch this case.
2489   cat >conftest.$ac_ext <<_ACEOF
2490 #line $LINENO "configure"
2491 #include "confdefs.h"
2492 #include <assert.h>
2493                      Syntax error
2494 _ACEOF
2495 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2497   ac_status=$?
2498   egrep -v '^ *\+' conftest.er1 >conftest.err
2499   rm -f conftest.er1
2500   cat conftest.err >&5
2501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2502   (exit $ac_status); } >/dev/null; then
2503   if test -s conftest.err; then
2504     ac_cpp_err=$ac_c_preproc_warn_flag
2505   else
2506     ac_cpp_err=
2507   fi
2508 else
2509   ac_cpp_err=yes
2510 fi
2511 if test -z "$ac_cpp_err"; then
2512   :
2513 else
2514   echo "$as_me: failed program was:" >&5
2515   cat conftest.$ac_ext >&5
2516   # Broken: fails on valid input.
2517 continue
2518 fi
2519 rm -f conftest.err conftest.$ac_ext
2520
2521   # OK, works on sane cases.  Now check whether non-existent headers
2522   # can be detected and how.
2523   cat >conftest.$ac_ext <<_ACEOF
2524 #line $LINENO "configure"
2525 #include "confdefs.h"
2526 #include <ac_nonexistent.h>
2527 _ACEOF
2528 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2530   ac_status=$?
2531   egrep -v '^ *\+' conftest.er1 >conftest.err
2532   rm -f conftest.er1
2533   cat conftest.err >&5
2534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2535   (exit $ac_status); } >/dev/null; then
2536   if test -s conftest.err; then
2537     ac_cpp_err=$ac_c_preproc_warn_flag
2538   else
2539     ac_cpp_err=
2540   fi
2541 else
2542   ac_cpp_err=yes
2543 fi
2544 if test -z "$ac_cpp_err"; then
2545   # Broken: success on invalid input.
2546 continue
2547 else
2548   echo "$as_me: failed program was:" >&5
2549   cat conftest.$ac_ext >&5
2550   # Passes both tests.
2551 ac_preproc_ok=:
2552 break
2553 fi
2554 rm -f conftest.err conftest.$ac_ext
2555
2556 done
2557 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2558 rm -f conftest.err conftest.$ac_ext
2559 if $ac_preproc_ok; then
2560   break
2561 fi
2562
2563     done
2564     ac_cv_prog_CPP=$CPP
2565
2566 fi
2567   CPP=$ac_cv_prog_CPP
2568 else
2569   ac_cv_prog_CPP=$CPP
2570 fi
2571 echo "$as_me:$LINENO: result: $CPP" >&5
2572 echo "${ECHO_T}$CPP" >&6
2573 ac_preproc_ok=false
2574 for ac_c_preproc_warn_flag in '' yes
2575 do
2576   # Use a header file that comes with gcc, so configuring glibc
2577   # with a fresh cross-compiler works.
2578   # On the NeXT, cc -E runs the code through the compiler's parser,
2579   # not just through cpp. "Syntax error" is here to catch this case.
2580   cat >conftest.$ac_ext <<_ACEOF
2581 #line $LINENO "configure"
2582 #include "confdefs.h"
2583 #include <assert.h>
2584                      Syntax error
2585 _ACEOF
2586 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2587   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2588   ac_status=$?
2589   egrep -v '^ *\+' conftest.er1 >conftest.err
2590   rm -f conftest.er1
2591   cat conftest.err >&5
2592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2593   (exit $ac_status); } >/dev/null; then
2594   if test -s conftest.err; then
2595     ac_cpp_err=$ac_c_preproc_warn_flag
2596   else
2597     ac_cpp_err=
2598   fi
2599 else
2600   ac_cpp_err=yes
2601 fi
2602 if test -z "$ac_cpp_err"; then
2603   :
2604 else
2605   echo "$as_me: failed program was:" >&5
2606   cat conftest.$ac_ext >&5
2607   # Broken: fails on valid input.
2608 continue
2609 fi
2610 rm -f conftest.err conftest.$ac_ext
2611
2612   # OK, works on sane cases.  Now check whether non-existent headers
2613   # can be detected and how.
2614   cat >conftest.$ac_ext <<_ACEOF
2615 #line $LINENO "configure"
2616 #include "confdefs.h"
2617 #include <ac_nonexistent.h>
2618 _ACEOF
2619 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2620   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2621   ac_status=$?
2622   egrep -v '^ *\+' conftest.er1 >conftest.err
2623   rm -f conftest.er1
2624   cat conftest.err >&5
2625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2626   (exit $ac_status); } >/dev/null; then
2627   if test -s conftest.err; then
2628     ac_cpp_err=$ac_c_preproc_warn_flag
2629   else
2630     ac_cpp_err=
2631   fi
2632 else
2633   ac_cpp_err=yes
2634 fi
2635 if test -z "$ac_cpp_err"; then
2636   # Broken: success on invalid input.
2637 continue
2638 else
2639   echo "$as_me: failed program was:" >&5
2640   cat conftest.$ac_ext >&5
2641   # Passes both tests.
2642 ac_preproc_ok=:
2643 break
2644 fi
2645 rm -f conftest.err conftest.$ac_ext
2646
2647 done
2648 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2649 rm -f conftest.err conftest.$ac_ext
2650 if $ac_preproc_ok; then
2651   :
2652 else
2653   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2654 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2655    { (exit 1); exit 1; }; }
2656 fi
2657
2658 ac_ext=c
2659 ac_cpp='$CPP $CPPFLAGS'
2660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2663
2664 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2665 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2666 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2667   echo $ECHO_N "(cached) $ECHO_C" >&6
2668 else
2669   ac_cv_prog_cc_stdc=no
2670 ac_save_CC=$CC
2671 cat >conftest.$ac_ext <<_ACEOF
2672 #line $LINENO "configure"
2673 #include "confdefs.h"
2674 #include <stdarg.h>
2675 #include <stdio.h>
2676 #include <sys/types.h>
2677 #include <sys/stat.h>
2678 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2679 struct buf { int x; };
2680 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2681 static char *e (p, i)
2682      char **p;
2683      int i;
2684 {
2685   return p[i];
2686 }
2687 static char *f (char * (*g) (char **, int), char **p, ...)
2688 {
2689   char *s;
2690   va_list v;
2691   va_start (v,p);
2692   s = g (p, va_arg (v,int));
2693   va_end (v);
2694   return s;
2695 }
2696 int test (int i, double x);
2697 struct s1 {int (*f) (int a);};
2698 struct s2 {int (*f) (double a);};
2699 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2700 int argc;
2701 char **argv;
2702 #ifdef F77_DUMMY_MAIN
2703 #  ifdef __cplusplus
2704      extern "C"
2705 #  endif
2706    int F77_DUMMY_MAIN() { return 1; }
2707 #endif
2708 int
2709 main ()
2710 {
2711 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2712   ;
2713   return 0;
2714 }
2715 _ACEOF
2716 # Don't try gcc -ansi; that turns off useful extensions and
2717 # breaks some systems' header files.
2718 # AIX                   -qlanglvl=ansi
2719 # Ultrix and OSF/1      -std1
2720 # HP-UX 10.20 and later -Ae
2721 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2722 # SVR4                  -Xc -D__EXTENSIONS__
2723 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2724 do
2725   CC="$ac_save_CC $ac_arg"
2726   rm -f conftest.$ac_objext
2727 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2728   (eval $ac_compile) 2>&5
2729   ac_status=$?
2730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2731   (exit $ac_status); } &&
2732          { ac_try='test -s conftest.$ac_objext'
2733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2734   (eval $ac_try) 2>&5
2735   ac_status=$?
2736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2737   (exit $ac_status); }; }; then
2738   ac_cv_prog_cc_stdc=$ac_arg
2739 break
2740 else
2741   echo "$as_me: failed program was:" >&5
2742 cat conftest.$ac_ext >&5
2743 fi
2744 rm -f conftest.$ac_objext
2745 done
2746 rm -f conftest.$ac_ext conftest.$ac_objext
2747 CC=$ac_save_CC
2748
2749 fi
2750
2751 case "x$ac_cv_prog_cc_stdc" in
2752   x|xno)
2753     echo "$as_me:$LINENO: result: none needed" >&5
2754 echo "${ECHO_T}none needed" >&6 ;;
2755   *)
2756     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2757 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2758     CC="$CC $ac_cv_prog_cc_stdc" ;;
2759 esac
2760
2761 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2762 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2763 if test "${ac_cv_c_const+set}" = set; then
2764   echo $ECHO_N "(cached) $ECHO_C" >&6
2765 else
2766   cat >conftest.$ac_ext <<_ACEOF
2767 #line $LINENO "configure"
2768 #include "confdefs.h"
2769
2770 #ifdef F77_DUMMY_MAIN
2771 #  ifdef __cplusplus
2772      extern "C"
2773 #  endif
2774    int F77_DUMMY_MAIN() { return 1; }
2775 #endif
2776 int
2777 main ()
2778 {
2779 /* FIXME: Include the comments suggested by Paul. */
2780 #ifndef __cplusplus
2781   /* Ultrix mips cc rejects this.  */
2782   typedef int charset[2];
2783   const charset x;
2784   /* SunOS 4.1.1 cc rejects this.  */
2785   char const *const *ccp;
2786   char **p;
2787   /* NEC SVR4.0.2 mips cc rejects this.  */
2788   struct point {int x, y;};
2789   static struct point const zero = {0,0};
2790   /* AIX XL C 1.02.0.0 rejects this.
2791      It does not let you subtract one const X* pointer from another in
2792      an arm of an if-expression whose if-part is not a constant
2793      expression */
2794   const char *g = "string";
2795   ccp = &g + (g ? g-g : 0);
2796   /* HPUX 7.0 cc rejects these. */
2797   ++ccp;
2798   p = (char**) ccp;
2799   ccp = (char const *const *) p;
2800   { /* SCO 3.2v4 cc rejects this.  */
2801     char *t;
2802     char const *s = 0 ? (char *) 0 : (char const *) 0;
2803
2804     *t++ = 0;
2805   }
2806   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2807     int x[] = {25, 17};
2808     const int *foo = &x[0];
2809     ++foo;
2810   }
2811   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2812     typedef const int *iptr;
2813     iptr p = 0;
2814     ++p;
2815   }
2816   { /* AIX XL C 1.02.0.0 rejects this saying
2817        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2818     struct s { int j; const int *ap[3]; };
2819     struct s *b; b->j = 5;
2820   }
2821   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2822     const int foo = 10;
2823   }
2824 #endif
2825
2826   ;
2827   return 0;
2828 }
2829 _ACEOF
2830 rm -f conftest.$ac_objext
2831 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2832   (eval $ac_compile) 2>&5
2833   ac_status=$?
2834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2835   (exit $ac_status); } &&
2836          { ac_try='test -s conftest.$ac_objext'
2837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2838   (eval $ac_try) 2>&5
2839   ac_status=$?
2840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2841   (exit $ac_status); }; }; then
2842   ac_cv_c_const=yes
2843 else
2844   echo "$as_me: failed program was:" >&5
2845 cat conftest.$ac_ext >&5
2846 ac_cv_c_const=no
2847 fi
2848 rm -f conftest.$ac_objext conftest.$ac_ext
2849 fi
2850 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2851 echo "${ECHO_T}$ac_cv_c_const" >&6
2852 if test $ac_cv_c_const = no; then
2853
2854 cat >>confdefs.h <<\_ACEOF
2855 #define const
2856 _ACEOF
2857
2858 fi
2859
2860 echo "$as_me:$LINENO: checking for inline" >&5
2861 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2862 if test "${ac_cv_c_inline+set}" = set; then
2863   echo $ECHO_N "(cached) $ECHO_C" >&6
2864 else
2865   ac_cv_c_inline=no
2866 for ac_kw in inline __inline__ __inline; do
2867   cat >conftest.$ac_ext <<_ACEOF
2868 #line $LINENO "configure"
2869 #include "confdefs.h"
2870 #ifndef __cplusplus
2871 static $ac_kw int static_foo () {return 0; }
2872 $ac_kw int foo () {return 0; }
2873 #endif
2874
2875 _ACEOF
2876 rm -f conftest.$ac_objext
2877 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2878   (eval $ac_compile) 2>&5
2879   ac_status=$?
2880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881   (exit $ac_status); } &&
2882          { ac_try='test -s conftest.$ac_objext'
2883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2884   (eval $ac_try) 2>&5
2885   ac_status=$?
2886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2887   (exit $ac_status); }; }; then
2888   ac_cv_c_inline=$ac_kw; break
2889 else
2890   echo "$as_me: failed program was:" >&5
2891 cat conftest.$ac_ext >&5
2892 fi
2893 rm -f conftest.$ac_objext conftest.$ac_ext
2894 done
2895
2896 fi
2897 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2898 echo "${ECHO_T}$ac_cv_c_inline" >&6
2899 case $ac_cv_c_inline in
2900   inline | yes) ;;
2901   no)
2902 cat >>confdefs.h <<\_ACEOF
2903 #define inline
2904 _ACEOF
2905  ;;
2906   *)  cat >>confdefs.h <<_ACEOF
2907 #define inline $ac_cv_c_inline
2908 _ACEOF
2909  ;;
2910 esac
2911
2912
2913 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
2914   echo "$as_me:$LINENO: checking for bc" >&5
2915 echo $ECHO_N "checking for bc... $ECHO_C" >&6
2916   if test "$ac_bc_result" = "15" ; then
2917     echo "$as_me:$LINENO: result: yes" >&5
2918 echo "${ECHO_T}yes" >&6
2919   else
2920     echo "$as_me:$LINENO: result: no" >&5
2921 echo "${ECHO_T}no" >&6
2922     echo ''
2923     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
2924                   part of Unix since the 1970s.  Come back when your vendor
2925                   has grown a clue." >&5
2926 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
2927                   part of Unix since the 1970s.  Come back when your vendor
2928                   has grown a clue." >&2;}
2929    { (exit 1); exit 1; }; }
2930   fi
2931
2932
2933 # stuff for Makefiles
2934 # Find a good install program.  We prefer a C program (faster),
2935 # so one script is as good as another.  But avoid the broken or
2936 # incompatible versions:
2937 # SysV /etc/install, /usr/sbin/install
2938 # SunOS /usr/etc/install
2939 # IRIX /sbin/install
2940 # AIX /bin/install
2941 # AmigaOS /C/install, which installs bootblocks on floppy discs
2942 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2943 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2944 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2945 # ./install, which can be erroneously created by make from ./install.sh.
2946 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2947 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2948 if test -z "$INSTALL"; then
2949 if test "${ac_cv_path_install+set}" = set; then
2950   echo $ECHO_N "(cached) $ECHO_C" >&6
2951 else
2952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2953 for as_dir in $PATH
2954 do
2955   IFS=$as_save_IFS
2956   test -z "$as_dir" && as_dir=.
2957   # Account for people who put trailing slashes in PATH elements.
2958 case $as_dir/ in
2959   ./ | .// | /cC/* | \
2960   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2961   /usr/ucb/* ) ;;
2962   *)
2963     # OSF1 and SCO ODT 3.0 have their own names for install.
2964     # Don't use installbsd from OSF since it installs stuff as root
2965     # by default.
2966     for ac_prog in ginstall scoinst install; do
2967       for ac_exec_ext in '' $ac_executable_extensions; do
2968         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2969           if test $ac_prog = install &&
2970             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2971             # AIX install.  It has an incompatible calling convention.
2972             :
2973           elif test $ac_prog = install &&
2974             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2975             # program-specific install script used by HP pwplus--don't use.
2976             :
2977           else
2978             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2979             break 3
2980           fi
2981         fi
2982       done
2983     done
2984     ;;
2985 esac
2986 done
2987
2988
2989 fi
2990   if test "${ac_cv_path_install+set}" = set; then
2991     INSTALL=$ac_cv_path_install
2992   else
2993     # As a last resort, use the slow shell script.  We don't cache a
2994     # path for INSTALL within a source directory, because that will
2995     # break other packages using the cache if that directory is
2996     # removed, or if the path is relative.
2997     INSTALL=$ac_install_sh
2998   fi
2999 fi
3000 echo "$as_me:$LINENO: result: $INSTALL" >&5
3001 echo "${ECHO_T}$INSTALL" >&6
3002
3003 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3004 # It thinks the first close brace ends the variable substitution.
3005 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3006
3007 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3008
3009 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3010
3011 echo "$as_me:$LINENO: checking whether \\"\${INSTALL} -d\\" creates intermediate directories" >&5
3012 echo $ECHO_N "checking whether \\"\${INSTALL} -d\\" creates intermediate directories... $ECHO_C" >&6
3013 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3014   echo $ECHO_N "(cached) $ECHO_C" >&6
3015 else
3016   ac_cv_install_d_creates_dirs=no
3017      rm -rf conftestdir
3018      if mkdir conftestdir; then
3019        cd conftestdir 2>/dev/null
3020        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3021        if test -d dir1/dir2/. ; then
3022          ac_cv_install_d_creates_dirs=yes
3023        fi
3024        cd .. 2>/dev/null
3025        rm -rf conftestdir
3026      fi
3027
3028 fi
3029 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3030 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3031
3032   if test "$ac_cv_install_d_creates_dirs" = no ; then
3033     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3034 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3035 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3036   echo $ECHO_N "(cached) $ECHO_C" >&6
3037 else
3038   ac_cv_mkdir_p_creates_dirs=no
3039        rm -rf conftestdir
3040        if mkdir conftestdir; then
3041          cd conftestdir 2>/dev/null
3042          mkdir -p dir1/dir2 >/dev/null 2>&1
3043          if test -d dir1/dir2/. ; then
3044            ac_cv_mkdir_p_creates_dirs=yes
3045          fi
3046          cd .. 2>/dev/null
3047          rm -rf conftestdir
3048        fi
3049
3050 fi
3051 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3052 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3053   fi
3054
3055   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3056     INSTALL_DIRS='${INSTALL} -d'
3057   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3058     INSTALL_DIRS='mkdir -p'
3059   else
3060     # any other ideas?
3061     INSTALL_DIRS='${INSTALL} -d'
3062   fi
3063
3064 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
3065 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3066 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3067 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3068   echo $ECHO_N "(cached) $ECHO_C" >&6
3069 else
3070   cat >conftest.make <<\_ACEOF
3071 all:
3072         @echo 'ac_maketemp="${MAKE}"'
3073 _ACEOF
3074 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3075 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3076 if test -n "$ac_maketemp"; then
3077   eval ac_cv_prog_make_${ac_make}_set=yes
3078 else
3079   eval ac_cv_prog_make_${ac_make}_set=no
3080 fi
3081 rm -f conftest.make
3082 fi
3083 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3084   echo "$as_me:$LINENO: result: yes" >&5
3085 echo "${ECHO_T}yes" >&6
3086   SET_MAKE=
3087 else
3088   echo "$as_me:$LINENO: result: no" >&5
3089 echo "${ECHO_T}no" >&6
3090   SET_MAKE="MAKE=${MAKE-make}"
3091 fi
3092
3093
3094 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3095 # That's wrong: it should be set to '${INSTALL}', so that one can
3096 # implement the "install-strip" target properly (strip executables,
3097 # but do not try to strip scripts.)
3098 #
3099 INSTALL_SCRIPT='${INSTALL}'
3100
3101 # random libc stuff
3102
3103 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3104 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3105 if test "${ac_cv_header_stdc+set}" = set; then
3106   echo $ECHO_N "(cached) $ECHO_C" >&6
3107 else
3108   cat >conftest.$ac_ext <<_ACEOF
3109 #line $LINENO "configure"
3110 #include "confdefs.h"
3111 #include <stdlib.h>
3112 #include <stdarg.h>
3113 #include <string.h>
3114 #include <float.h>
3115
3116 _ACEOF
3117 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3118   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3119   ac_status=$?
3120   egrep -v '^ *\+' conftest.er1 >conftest.err
3121   rm -f conftest.er1
3122   cat conftest.err >&5
3123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3124   (exit $ac_status); } >/dev/null; then
3125   if test -s conftest.err; then
3126     ac_cpp_err=$ac_c_preproc_warn_flag
3127   else
3128     ac_cpp_err=
3129   fi
3130 else
3131   ac_cpp_err=yes
3132 fi
3133 if test -z "$ac_cpp_err"; then
3134   ac_cv_header_stdc=yes
3135 else
3136   echo "$as_me: failed program was:" >&5
3137   cat conftest.$ac_ext >&5
3138   ac_cv_header_stdc=no
3139 fi
3140 rm -f conftest.err conftest.$ac_ext
3141
3142 if test $ac_cv_header_stdc = yes; then
3143   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3144   cat >conftest.$ac_ext <<_ACEOF
3145 #line $LINENO "configure"
3146 #include "confdefs.h"
3147 #include <string.h>
3148
3149 _ACEOF
3150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3151   egrep "memchr" >/dev/null 2>&1; then
3152   :
3153 else
3154   ac_cv_header_stdc=no
3155 fi
3156 rm -f conftest*
3157
3158 fi
3159
3160 if test $ac_cv_header_stdc = yes; then
3161   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3162   cat >conftest.$ac_ext <<_ACEOF
3163 #line $LINENO "configure"
3164 #include "confdefs.h"
3165 #include <stdlib.h>
3166
3167 _ACEOF
3168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3169   egrep "free" >/dev/null 2>&1; then
3170   :
3171 else
3172   ac_cv_header_stdc=no
3173 fi
3174 rm -f conftest*
3175
3176 fi
3177
3178 if test $ac_cv_header_stdc = yes; then
3179   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3180   if test "$cross_compiling" = yes; then
3181   :
3182 else
3183   cat >conftest.$ac_ext <<_ACEOF
3184 #line $LINENO "configure"
3185 #include "confdefs.h"
3186 #include <ctype.h>
3187 #if ((' ' & 0x0FF) == 0x020)
3188 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3189 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3190 #else
3191 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3192                      || ('j' <= (c) && (c) <= 'r') \
3193                      || ('s' <= (c) && (c) <= 'z'))
3194 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3195 #endif
3196
3197 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3198 int
3199 main ()
3200 {
3201   int i;
3202   for (i = 0; i < 256; i++)
3203     if (XOR (islower (i), ISLOWER (i))
3204         || toupper (i) != TOUPPER (i))
3205       exit(2);
3206   exit (0);
3207 }
3208 _ACEOF
3209 rm -f conftest$ac_exeext
3210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3211   (eval $ac_link) 2>&5
3212   ac_status=$?
3213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3214   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3216   (eval $ac_try) 2>&5
3217   ac_status=$?
3218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3219   (exit $ac_status); }; }; then
3220   :
3221 else
3222   echo "$as_me: program exited with status $ac_status" >&5
3223 echo "$as_me: failed program was:" >&5
3224 cat conftest.$ac_ext >&5
3225 ( exit $ac_status )
3226 ac_cv_header_stdc=no
3227 fi
3228 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3229 fi
3230 fi
3231 fi
3232 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3233 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3234 if test $ac_cv_header_stdc = yes; then
3235
3236 cat >>confdefs.h <<\_ACEOF
3237 #define STDC_HEADERS 1
3238 _ACEOF
3239
3240 fi
3241
3242 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3253                   inttypes.h stdint.h unistd.h
3254 do
3255 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3256 echo "$as_me:$LINENO: checking for $ac_header" >&5
3257 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3258 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3259   echo $ECHO_N "(cached) $ECHO_C" >&6
3260 else
3261   cat >conftest.$ac_ext <<_ACEOF
3262 #line $LINENO "configure"
3263 #include "confdefs.h"
3264 $ac_includes_default
3265
3266 #include <$ac_header>
3267 _ACEOF
3268 rm -f conftest.$ac_objext
3269 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3270   (eval $ac_compile) 2>&5
3271   ac_status=$?
3272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3273   (exit $ac_status); } &&
3274          { ac_try='test -s conftest.$ac_objext'
3275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3276   (eval $ac_try) 2>&5
3277   ac_status=$?
3278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3279   (exit $ac_status); }; }; then
3280   eval "$as_ac_Header=yes"
3281 else
3282   echo "$as_me: failed program was:" >&5
3283 cat conftest.$ac_ext >&5
3284 eval "$as_ac_Header=no"
3285 fi
3286 rm -f conftest.$ac_objext conftest.$ac_ext
3287 fi
3288 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3289 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3290 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3291   cat >>confdefs.h <<_ACEOF
3292 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3293 _ACEOF
3294
3295 fi
3296
3297 done
3298
3299
3300
3301 for ac_header in unistd.h
3302 do
3303 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3304 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3305   echo "$as_me:$LINENO: checking for $ac_header" >&5
3306 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3307 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3308   echo $ECHO_N "(cached) $ECHO_C" >&6
3309 fi
3310 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3311 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3312 else
3313   # Is the header compilable?
3314 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3315 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3316 cat >conftest.$ac_ext <<_ACEOF
3317 #line $LINENO "configure"
3318 #include "confdefs.h"
3319 $ac_includes_default
3320 #include <$ac_header>
3321 _ACEOF
3322 rm -f conftest.$ac_objext
3323 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3324   (eval $ac_compile) 2>&5
3325   ac_status=$?
3326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3327   (exit $ac_status); } &&
3328          { ac_try='test -s conftest.$ac_objext'
3329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3330   (eval $ac_try) 2>&5
3331   ac_status=$?
3332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3333   (exit $ac_status); }; }; then
3334   ac_header_compiler=yes
3335 else
3336   echo "$as_me: failed program was:" >&5
3337 cat conftest.$ac_ext >&5
3338 ac_header_compiler=no
3339 fi
3340 rm -f conftest.$ac_objext conftest.$ac_ext
3341 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3342 echo "${ECHO_T}$ac_header_compiler" >&6
3343
3344 # Is the header present?
3345 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3346 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3347 cat >conftest.$ac_ext <<_ACEOF
3348 #line $LINENO "configure"
3349 #include "confdefs.h"
3350 #include <$ac_header>
3351 _ACEOF
3352 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3353   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3354   ac_status=$?
3355   egrep -v '^ *\+' conftest.er1 >conftest.err
3356   rm -f conftest.er1
3357   cat conftest.err >&5
3358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3359   (exit $ac_status); } >/dev/null; then
3360   if test -s conftest.err; then
3361     ac_cpp_err=$ac_c_preproc_warn_flag
3362   else
3363     ac_cpp_err=
3364   fi
3365 else
3366   ac_cpp_err=yes
3367 fi
3368 if test -z "$ac_cpp_err"; then
3369   ac_header_preproc=yes
3370 else
3371   echo "$as_me: failed program was:" >&5
3372   cat conftest.$ac_ext >&5
3373   ac_header_preproc=no
3374 fi
3375 rm -f conftest.err conftest.$ac_ext
3376 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3377 echo "${ECHO_T}$ac_header_preproc" >&6
3378
3379 # So?  What about this header?
3380 case $ac_header_compiler:$ac_header_preproc in
3381   yes:no )
3382     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3383 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3384     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3385 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3386   no:yes )
3387     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3388 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3389     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3390 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3391     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3392 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3393 esac
3394 echo "$as_me:$LINENO: checking for $ac_header" >&5
3395 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3396 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   eval "$as_ac_Header=$ac_header_preproc"
3400 fi
3401 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3402 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3403
3404 fi
3405 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3406   cat >>confdefs.h <<_ACEOF
3407 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3408 _ACEOF
3409
3410 fi
3411
3412 done
3413
3414 echo "$as_me:$LINENO: checking for mode_t" >&5
3415 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3416 if test "${ac_cv_type_mode_t+set}" = set; then
3417   echo $ECHO_N "(cached) $ECHO_C" >&6
3418 else
3419   cat >conftest.$ac_ext <<_ACEOF
3420 #line $LINENO "configure"
3421 #include "confdefs.h"
3422 $ac_includes_default
3423 #ifdef F77_DUMMY_MAIN
3424 #  ifdef __cplusplus
3425      extern "C"
3426 #  endif
3427    int F77_DUMMY_MAIN() { return 1; }
3428 #endif
3429 int
3430 main ()
3431 {
3432 if ((mode_t *) 0)
3433   return 0;
3434 if (sizeof (mode_t))
3435   return 0;
3436   ;
3437   return 0;
3438 }
3439 _ACEOF
3440 rm -f conftest.$ac_objext
3441 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3442   (eval $ac_compile) 2>&5
3443   ac_status=$?
3444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3445   (exit $ac_status); } &&
3446          { ac_try='test -s conftest.$ac_objext'
3447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3448   (eval $ac_try) 2>&5
3449   ac_status=$?
3450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3451   (exit $ac_status); }; }; then
3452   ac_cv_type_mode_t=yes
3453 else
3454   echo "$as_me: failed program was:" >&5
3455 cat conftest.$ac_ext >&5
3456 ac_cv_type_mode_t=no
3457 fi
3458 rm -f conftest.$ac_objext conftest.$ac_ext
3459 fi
3460 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3461 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3462 if test $ac_cv_type_mode_t = yes; then
3463   :
3464 else
3465
3466 cat >>confdefs.h <<_ACEOF
3467 #define mode_t int
3468 _ACEOF
3469
3470 fi
3471
3472 echo "$as_me:$LINENO: checking for pid_t" >&5
3473 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3474 if test "${ac_cv_type_pid_t+set}" = set; then
3475   echo $ECHO_N "(cached) $ECHO_C" >&6
3476 else
3477   cat >conftest.$ac_ext <<_ACEOF
3478 #line $LINENO "configure"
3479 #include "confdefs.h"
3480 $ac_includes_default
3481 #ifdef F77_DUMMY_MAIN
3482 #  ifdef __cplusplus
3483      extern "C"
3484 #  endif
3485    int F77_DUMMY_MAIN() { return 1; }
3486 #endif
3487 int
3488 main ()
3489 {
3490 if ((pid_t *) 0)
3491   return 0;
3492 if (sizeof (pid_t))
3493   return 0;
3494   ;
3495   return 0;
3496 }
3497 _ACEOF
3498 rm -f conftest.$ac_objext
3499 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3500   (eval $ac_compile) 2>&5
3501   ac_status=$?
3502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3503   (exit $ac_status); } &&
3504          { ac_try='test -s conftest.$ac_objext'
3505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3506   (eval $ac_try) 2>&5
3507   ac_status=$?
3508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3509   (exit $ac_status); }; }; then
3510   ac_cv_type_pid_t=yes
3511 else
3512   echo "$as_me: failed program was:" >&5
3513 cat conftest.$ac_ext >&5
3514 ac_cv_type_pid_t=no
3515 fi
3516 rm -f conftest.$ac_objext conftest.$ac_ext
3517 fi
3518 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3519 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3520 if test $ac_cv_type_pid_t = yes; then
3521   :
3522 else
3523
3524 cat >>confdefs.h <<_ACEOF
3525 #define pid_t int
3526 _ACEOF
3527
3528 fi
3529
3530 echo "$as_me:$LINENO: checking for size_t" >&5
3531 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3532 if test "${ac_cv_type_size_t+set}" = set; then
3533   echo $ECHO_N "(cached) $ECHO_C" >&6
3534 else
3535   cat >conftest.$ac_ext <<_ACEOF
3536 #line $LINENO "configure"
3537 #include "confdefs.h"
3538 $ac_includes_default
3539 #ifdef F77_DUMMY_MAIN
3540 #  ifdef __cplusplus
3541      extern "C"
3542 #  endif
3543    int F77_DUMMY_MAIN() { return 1; }
3544 #endif
3545 int
3546 main ()
3547 {
3548 if ((size_t *) 0)
3549   return 0;
3550 if (sizeof (size_t))
3551   return 0;
3552   ;
3553   return 0;
3554 }
3555 _ACEOF
3556 rm -f conftest.$ac_objext
3557 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3558   (eval $ac_compile) 2>&5
3559   ac_status=$?
3560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3561   (exit $ac_status); } &&
3562          { ac_try='test -s conftest.$ac_objext'
3563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3564   (eval $ac_try) 2>&5
3565   ac_status=$?
3566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3567   (exit $ac_status); }; }; then
3568   ac_cv_type_size_t=yes
3569 else
3570   echo "$as_me: failed program was:" >&5
3571 cat conftest.$ac_ext >&5
3572 ac_cv_type_size_t=no
3573 fi
3574 rm -f conftest.$ac_objext conftest.$ac_ext
3575 fi
3576 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3577 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3578 if test $ac_cv_type_size_t = yes; then
3579   :
3580 else
3581
3582 cat >>confdefs.h <<_ACEOF
3583 #define size_t unsigned
3584 _ACEOF
3585
3586 fi
3587
3588 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3589 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3590 if test "${ac_cv_type_signal+set}" = set; then
3591   echo $ECHO_N "(cached) $ECHO_C" >&6
3592 else
3593   cat >conftest.$ac_ext <<_ACEOF
3594 #line $LINENO "configure"
3595 #include "confdefs.h"
3596 #include <sys/types.h>
3597 #include <signal.h>
3598 #ifdef signal
3599 # undef signal
3600 #endif
3601 #ifdef __cplusplus
3602 extern "C" void (*signal (int, void (*)(int)))(int);
3603 #else
3604 void (*signal ()) ();
3605 #endif
3606
3607 #ifdef F77_DUMMY_MAIN
3608 #  ifdef __cplusplus
3609      extern "C"
3610 #  endif
3611    int F77_DUMMY_MAIN() { return 1; }
3612 #endif
3613 int
3614 main ()
3615 {
3616 int i;
3617   ;
3618   return 0;
3619 }
3620 _ACEOF
3621 rm -f conftest.$ac_objext
3622 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3623   (eval $ac_compile) 2>&5
3624   ac_status=$?
3625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3626   (exit $ac_status); } &&
3627          { ac_try='test -s conftest.$ac_objext'
3628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3629   (eval $ac_try) 2>&5
3630   ac_status=$?
3631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3632   (exit $ac_status); }; }; then
3633   ac_cv_type_signal=void
3634 else
3635   echo "$as_me: failed program was:" >&5
3636 cat conftest.$ac_ext >&5
3637 ac_cv_type_signal=int
3638 fi
3639 rm -f conftest.$ac_objext conftest.$ac_ext
3640 fi
3641 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3642 echo "${ECHO_T}$ac_cv_type_signal" >&6
3643
3644 cat >>confdefs.h <<_ACEOF
3645 #define RETSIGTYPE $ac_cv_type_signal
3646 _ACEOF
3647
3648
3649 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3650 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3651 if test "${ac_cv_header_time+set}" = set; then
3652   echo $ECHO_N "(cached) $ECHO_C" >&6
3653 else
3654   cat >conftest.$ac_ext <<_ACEOF
3655 #line $LINENO "configure"
3656 #include "confdefs.h"
3657 #include <sys/types.h>
3658 #include <sys/time.h>
3659 #include <time.h>
3660
3661 #ifdef F77_DUMMY_MAIN
3662 #  ifdef __cplusplus
3663      extern "C"
3664 #  endif
3665    int F77_DUMMY_MAIN() { return 1; }
3666 #endif
3667 int
3668 main ()
3669 {
3670 if ((struct tm *) 0)
3671 return 0;
3672   ;
3673   return 0;
3674 }
3675 _ACEOF
3676 rm -f conftest.$ac_objext
3677 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3678   (eval $ac_compile) 2>&5
3679   ac_status=$?
3680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3681   (exit $ac_status); } &&
3682          { ac_try='test -s conftest.$ac_objext'
3683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3684   (eval $ac_try) 2>&5
3685   ac_status=$?
3686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3687   (exit $ac_status); }; }; then
3688   ac_cv_header_time=yes
3689 else
3690   echo "$as_me: failed program was:" >&5
3691 cat conftest.$ac_ext >&5
3692 ac_cv_header_time=no
3693 fi
3694 rm -f conftest.$ac_objext conftest.$ac_ext
3695 fi
3696 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3697 echo "${ECHO_T}$ac_cv_header_time" >&6
3698 if test $ac_cv_header_time = yes; then
3699
3700 cat >>confdefs.h <<\_ACEOF
3701 #define TIME_WITH_SYS_TIME 1
3702 _ACEOF
3703
3704 fi
3705
3706 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3707 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3708 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3709   echo $ECHO_N "(cached) $ECHO_C" >&6
3710 else
3711   cat >conftest.$ac_ext <<_ACEOF
3712 #line $LINENO "configure"
3713 #include "confdefs.h"
3714 #include <sys/types.h>
3715 #include <sys/wait.h>
3716 #ifndef WEXITSTATUS
3717 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3718 #endif
3719 #ifndef WIFEXITED
3720 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3721 #endif
3722
3723 #ifdef F77_DUMMY_MAIN
3724 #  ifdef __cplusplus
3725      extern "C"
3726 #  endif
3727    int F77_DUMMY_MAIN() { return 1; }
3728 #endif
3729 int
3730 main ()
3731 {
3732   int s;
3733   wait (&s);
3734   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3735   ;
3736   return 0;
3737 }
3738 _ACEOF
3739 rm -f conftest.$ac_objext
3740 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3741   (eval $ac_compile) 2>&5
3742   ac_status=$?
3743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3744   (exit $ac_status); } &&
3745          { ac_try='test -s conftest.$ac_objext'
3746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3747   (eval $ac_try) 2>&5
3748   ac_status=$?
3749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3750   (exit $ac_status); }; }; then
3751   ac_cv_header_sys_wait_h=yes
3752 else
3753   echo "$as_me: failed program was:" >&5
3754 cat conftest.$ac_ext >&5
3755 ac_cv_header_sys_wait_h=no
3756 fi
3757 rm -f conftest.$ac_objext conftest.$ac_ext
3758 fi
3759 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3760 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3761 if test $ac_cv_header_sys_wait_h = yes; then
3762
3763 cat >>confdefs.h <<\_ACEOF
3764 #define HAVE_SYS_WAIT_H 1
3765 _ACEOF
3766
3767 fi
3768
3769
3770
3771
3772
3773
3774 ac_header_dirent=no
3775 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3776   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3777 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3778 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3779 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3780   echo $ECHO_N "(cached) $ECHO_C" >&6
3781 else
3782   cat >conftest.$ac_ext <<_ACEOF
3783 #line $LINENO "configure"
3784 #include "confdefs.h"
3785 #include <sys/types.h>
3786 #include <$ac_hdr>
3787
3788 #ifdef F77_DUMMY_MAIN
3789 #  ifdef __cplusplus
3790      extern "C"
3791 #  endif
3792    int F77_DUMMY_MAIN() { return 1; }
3793 #endif
3794 int
3795 main ()
3796 {
3797 if ((DIR *) 0)
3798 return 0;
3799   ;
3800   return 0;
3801 }
3802 _ACEOF
3803 rm -f conftest.$ac_objext
3804 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3805   (eval $ac_compile) 2>&5
3806   ac_status=$?
3807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3808   (exit $ac_status); } &&
3809          { ac_try='test -s conftest.$ac_objext'
3810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3811   (eval $ac_try) 2>&5
3812   ac_status=$?
3813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3814   (exit $ac_status); }; }; then
3815   eval "$as_ac_Header=yes"
3816 else
3817   echo "$as_me: failed program was:" >&5
3818 cat conftest.$ac_ext >&5
3819 eval "$as_ac_Header=no"
3820 fi
3821 rm -f conftest.$ac_objext conftest.$ac_ext
3822 fi
3823 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3824 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3825 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3826   cat >>confdefs.h <<_ACEOF
3827 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
3828 _ACEOF
3829
3830 ac_header_dirent=$ac_hdr; break
3831 fi
3832
3833 done
3834 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3835 if test $ac_header_dirent = dirent.h; then
3836   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3837 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3838 if test "${ac_cv_search_opendir+set}" = set; then
3839   echo $ECHO_N "(cached) $ECHO_C" >&6
3840 else
3841   ac_func_search_save_LIBS=$LIBS
3842 ac_cv_search_opendir=no
3843 cat >conftest.$ac_ext <<_ACEOF
3844 #line $LINENO "configure"
3845 #include "confdefs.h"
3846
3847 /* Override any gcc2 internal prototype to avoid an error.  */
3848 #ifdef __cplusplus
3849 extern "C"
3850 #endif
3851 /* We use char because int might match the return type of a gcc2
3852    builtin and then its argument prototype would still apply.  */
3853 char opendir ();
3854 #ifdef F77_DUMMY_MAIN
3855 #  ifdef __cplusplus
3856      extern "C"
3857 #  endif
3858    int F77_DUMMY_MAIN() { return 1; }
3859 #endif
3860 int
3861 main ()
3862 {
3863 opendir ();
3864   ;
3865   return 0;
3866 }
3867 _ACEOF
3868 rm -f conftest.$ac_objext conftest$ac_exeext
3869 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3870   (eval $ac_link) 2>&5
3871   ac_status=$?
3872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3873   (exit $ac_status); } &&
3874          { ac_try='test -s conftest$ac_exeext'
3875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3876   (eval $ac_try) 2>&5
3877   ac_status=$?
3878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3879   (exit $ac_status); }; }; then
3880   ac_cv_search_opendir="none required"
3881 else
3882   echo "$as_me: failed program was:" >&5
3883 cat conftest.$ac_ext >&5
3884 fi
3885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3886 if test "$ac_cv_search_opendir" = no; then
3887   for ac_lib in dir; do
3888     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3889     cat >conftest.$ac_ext <<_ACEOF
3890 #line $LINENO "configure"
3891 #include "confdefs.h"
3892
3893 /* Override any gcc2 internal prototype to avoid an error.  */
3894 #ifdef __cplusplus
3895 extern "C"
3896 #endif
3897 /* We use char because int might match the return type of a gcc2
3898    builtin and then its argument prototype would still apply.  */
3899 char opendir ();
3900 #ifdef F77_DUMMY_MAIN
3901 #  ifdef __cplusplus
3902      extern "C"
3903 #  endif
3904    int F77_DUMMY_MAIN() { return 1; }
3905 #endif
3906 int
3907 main ()
3908 {
3909 opendir ();
3910   ;
3911   return 0;
3912 }
3913 _ACEOF
3914 rm -f conftest.$ac_objext conftest$ac_exeext
3915 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3916   (eval $ac_link) 2>&5
3917   ac_status=$?
3918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3919   (exit $ac_status); } &&
3920          { ac_try='test -s conftest$ac_exeext'
3921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3922   (eval $ac_try) 2>&5
3923   ac_status=$?
3924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3925   (exit $ac_status); }; }; then
3926   ac_cv_search_opendir="-l$ac_lib"
3927 break
3928 else
3929   echo "$as_me: failed program was:" >&5
3930 cat conftest.$ac_ext >&5
3931 fi
3932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3933   done
3934 fi
3935 LIBS=$ac_func_search_save_LIBS
3936 fi
3937 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
3938 echo "${ECHO_T}$ac_cv_search_opendir" >&6
3939 if test "$ac_cv_search_opendir" != no; then
3940   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
3941
3942 fi
3943
3944 else
3945   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3946 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3947 if test "${ac_cv_search_opendir+set}" = set; then
3948   echo $ECHO_N "(cached) $ECHO_C" >&6
3949 else
3950   ac_func_search_save_LIBS=$LIBS
3951 ac_cv_search_opendir=no
3952 cat >conftest.$ac_ext <<_ACEOF
3953 #line $LINENO "configure"
3954 #include "confdefs.h"
3955
3956 /* Override any gcc2 internal prototype to avoid an error.  */
3957 #ifdef __cplusplus
3958 extern "C"
3959 #endif
3960 /* We use char because int might match the return type of a gcc2
3961    builtin and then its argument prototype would still apply.  */
3962 char opendir ();
3963 #ifdef F77_DUMMY_MAIN
3964 #  ifdef __cplusplus
3965      extern "C"
3966 #  endif
3967    int F77_DUMMY_MAIN() { return 1; }
3968 #endif
3969 int
3970 main ()
3971 {
3972 opendir ();
3973   ;
3974   return 0;
3975 }
3976 _ACEOF
3977 rm -f conftest.$ac_objext conftest$ac_exeext
3978 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3979   (eval $ac_link) 2>&5
3980   ac_status=$?
3981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3982   (exit $ac_status); } &&
3983          { ac_try='test -s conftest$ac_exeext'
3984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3985   (eval $ac_try) 2>&5
3986   ac_status=$?
3987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3988   (exit $ac_status); }; }; then
3989   ac_cv_search_opendir="none required"
3990 else
3991   echo "$as_me: failed program was:" >&5
3992 cat conftest.$ac_ext >&5
3993 fi
3994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3995 if test "$ac_cv_search_opendir" = no; then
3996   for ac_lib in x; do
3997     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3998     cat >conftest.$ac_ext <<_ACEOF
3999 #line $LINENO "configure"
4000 #include "confdefs.h"
4001
4002 /* Override any gcc2 internal prototype to avoid an error.  */
4003 #ifdef __cplusplus
4004 extern "C"
4005 #endif
4006 /* We use char because int might match the return type of a gcc2
4007    builtin and then its argument prototype would still apply.  */
4008 char opendir ();
4009 #ifdef F77_DUMMY_MAIN
4010 #  ifdef __cplusplus
4011      extern "C"
4012 #  endif
4013    int F77_DUMMY_MAIN() { return 1; }
4014 #endif
4015 int
4016 main ()
4017 {
4018 opendir ();
4019   ;
4020   return 0;
4021 }
4022 _ACEOF
4023 rm -f conftest.$ac_objext conftest$ac_exeext
4024 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4025   (eval $ac_link) 2>&5
4026   ac_status=$?
4027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4028   (exit $ac_status); } &&
4029          { ac_try='test -s conftest$ac_exeext'
4030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4031   (eval $ac_try) 2>&5
4032   ac_status=$?
4033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034   (exit $ac_status); }; }; then
4035   ac_cv_search_opendir="-l$ac_lib"
4036 break
4037 else
4038   echo "$as_me: failed program was:" >&5
4039 cat conftest.$ac_ext >&5
4040 fi
4041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4042   done
4043 fi
4044 LIBS=$ac_func_search_save_LIBS
4045 fi
4046 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4047 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4048 if test "$ac_cv_search_opendir" != no; then
4049   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4050
4051 fi
4052
4053 fi
4054
4055 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4056 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4057   if test "${ac_cv_gettimeofday_args+set}" = set; then
4058   echo $ECHO_N "(cached) $ECHO_C" >&6
4059 else
4060   cat >conftest.$ac_ext <<_ACEOF
4061 #line $LINENO "configure"
4062 #include "confdefs.h"
4063 #include <stdlib.h>
4064                     #include <sys/time.h>
4065 #ifdef F77_DUMMY_MAIN
4066 #  ifdef __cplusplus
4067      extern "C"
4068 #  endif
4069    int F77_DUMMY_MAIN() { return 1; }
4070 #endif
4071 int
4072 main ()
4073 {
4074 struct timeval tv; struct timezone tzp;
4075                     gettimeofday(&tv, &tzp);
4076   ;
4077   return 0;
4078 }
4079 _ACEOF
4080 rm -f conftest.$ac_objext
4081 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4082   (eval $ac_compile) 2>&5
4083   ac_status=$?
4084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085   (exit $ac_status); } &&
4086          { ac_try='test -s conftest.$ac_objext'
4087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4088   (eval $ac_try) 2>&5
4089   ac_status=$?
4090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4091   (exit $ac_status); }; }; then
4092   ac_gettimeofday_args=2
4093 else
4094   echo "$as_me: failed program was:" >&5
4095 cat conftest.$ac_ext >&5
4096 cat >conftest.$ac_ext <<_ACEOF
4097 #line $LINENO "configure"
4098 #include "confdefs.h"
4099 #include <stdlib.h>
4100                                     #include <sys/time.h>
4101 #ifdef F77_DUMMY_MAIN
4102 #  ifdef __cplusplus
4103      extern "C"
4104 #  endif
4105    int F77_DUMMY_MAIN() { return 1; }
4106 #endif
4107 int
4108 main ()
4109 {
4110 struct timeval tv; gettimeofday(&tv);
4111   ;
4112   return 0;
4113 }
4114 _ACEOF
4115 rm -f conftest.$ac_objext
4116 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4117   (eval $ac_compile) 2>&5
4118   ac_status=$?
4119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4120   (exit $ac_status); } &&
4121          { ac_try='test -s conftest.$ac_objext'
4122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4123   (eval $ac_try) 2>&5
4124   ac_status=$?
4125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126   (exit $ac_status); }; }; then
4127   ac_gettimeofday_args=1
4128 else
4129   echo "$as_me: failed program was:" >&5
4130 cat conftest.$ac_ext >&5
4131 ac_gettimeofday_args=0
4132 fi
4133 rm -f conftest.$ac_objext conftest.$ac_ext
4134 fi
4135 rm -f conftest.$ac_objext conftest.$ac_ext
4136     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4137 fi
4138
4139   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4140   if test "$ac_gettimeofday_args" = 1 ; then
4141     cat >>confdefs.h <<\_ACEOF
4142 #define HAVE_GETTIMEOFDAY 1
4143 _ACEOF
4144
4145     echo "$as_me:$LINENO: result: one argument" >&5
4146 echo "${ECHO_T}one argument" >&6
4147   elif test "$ac_gettimeofday_args" = 2 ; then
4148     cat >>confdefs.h <<\_ACEOF
4149 #define HAVE_GETTIMEOFDAY 1
4150 _ACEOF
4151
4152     cat >>confdefs.h <<\_ACEOF
4153 #define GETTIMEOFDAY_TWO_ARGS 1
4154 _ACEOF
4155
4156     echo "$as_me:$LINENO: result: two arguments" >&5
4157 echo "${ECHO_T}two arguments" >&6
4158   else
4159     echo "$as_me:$LINENO: result: unknown" >&5
4160 echo "${ECHO_T}unknown" >&6
4161   fi
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4173 do
4174 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4175 echo "$as_me:$LINENO: checking for $ac_func" >&5
4176 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4177 if eval "test \"\${$as_ac_var+set}\" = set"; then
4178   echo $ECHO_N "(cached) $ECHO_C" >&6
4179 else
4180   cat >conftest.$ac_ext <<_ACEOF
4181 #line $LINENO "configure"
4182 #include "confdefs.h"
4183 /* System header to define __stub macros and hopefully few prototypes,
4184     which can conflict with char $ac_func (); below.  */
4185 #include <assert.h>
4186 /* Override any gcc2 internal prototype to avoid an error.  */
4187 #ifdef __cplusplus
4188 extern "C"
4189 #endif
4190 /* We use char because int might match the return type of a gcc2
4191    builtin and then its argument prototype would still apply.  */
4192 char $ac_func ();
4193 char (*f) ();
4194
4195 #ifdef F77_DUMMY_MAIN
4196 #  ifdef __cplusplus
4197      extern "C"
4198 #  endif
4199    int F77_DUMMY_MAIN() { return 1; }
4200 #endif
4201 int
4202 main ()
4203 {
4204 /* The GNU C library defines this for functions which it implements
4205     to always fail with ENOSYS.  Some functions are actually named
4206     something starting with __ and the normal name is an alias.  */
4207 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4208 choke me
4209 #else
4210 f = $ac_func;
4211 #endif
4212
4213   ;
4214   return 0;
4215 }
4216 _ACEOF
4217 rm -f conftest.$ac_objext conftest$ac_exeext
4218 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4219   (eval $ac_link) 2>&5
4220   ac_status=$?
4221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4222   (exit $ac_status); } &&
4223          { ac_try='test -s conftest$ac_exeext'
4224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4225   (eval $ac_try) 2>&5
4226   ac_status=$?
4227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228   (exit $ac_status); }; }; then
4229   eval "$as_ac_var=yes"
4230 else
4231   echo "$as_me: failed program was:" >&5
4232 cat conftest.$ac_ext >&5
4233 eval "$as_ac_var=no"
4234 fi
4235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4236 fi
4237 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4238 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4239 if test `eval echo '${'$as_ac_var'}'` = yes; then
4240   cat >>confdefs.h <<_ACEOF
4241 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4242 _ACEOF
4243
4244 fi
4245 done
4246
4247
4248
4249
4250
4251
4252 for ac_func in sigaction syslog realpath setrlimit
4253 do
4254 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4255 echo "$as_me:$LINENO: checking for $ac_func" >&5
4256 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4257 if eval "test \"\${$as_ac_var+set}\" = set"; then
4258   echo $ECHO_N "(cached) $ECHO_C" >&6
4259 else
4260   cat >conftest.$ac_ext <<_ACEOF
4261 #line $LINENO "configure"
4262 #include "confdefs.h"
4263 /* System header to define __stub macros and hopefully few prototypes,
4264     which can conflict with char $ac_func (); below.  */
4265 #include <assert.h>
4266 /* Override any gcc2 internal prototype to avoid an error.  */
4267 #ifdef __cplusplus
4268 extern "C"
4269 #endif
4270 /* We use char because int might match the return type of a gcc2
4271    builtin and then its argument prototype would still apply.  */
4272 char $ac_func ();
4273 char (*f) ();
4274
4275 #ifdef F77_DUMMY_MAIN
4276 #  ifdef __cplusplus
4277      extern "C"
4278 #  endif
4279    int F77_DUMMY_MAIN() { return 1; }
4280 #endif
4281 int
4282 main ()
4283 {
4284 /* The GNU C library defines this for functions which it implements
4285     to always fail with ENOSYS.  Some functions are actually named
4286     something starting with __ and the normal name is an alias.  */
4287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4288 choke me
4289 #else
4290 f = $ac_func;
4291 #endif
4292
4293   ;
4294   return 0;
4295 }
4296 _ACEOF
4297 rm -f conftest.$ac_objext conftest$ac_exeext
4298 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4299   (eval $ac_link) 2>&5
4300   ac_status=$?
4301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4302   (exit $ac_status); } &&
4303          { ac_try='test -s conftest$ac_exeext'
4304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4305   (eval $ac_try) 2>&5
4306   ac_status=$?
4307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4308   (exit $ac_status); }; }; then
4309   eval "$as_ac_var=yes"
4310 else
4311   echo "$as_me: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4313 eval "$as_ac_var=no"
4314 fi
4315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4316 fi
4317 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4318 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4319 if test `eval echo '${'$as_ac_var'}'` = yes; then
4320   cat >>confdefs.h <<_ACEOF
4321 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4322 _ACEOF
4323
4324 fi
4325 done
4326
4327 echo "$as_me:$LINENO: checking for struct icmp" >&5
4328 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4329 if test "${ac_cv_have_icmp+set}" = set; then
4330   echo $ECHO_N "(cached) $ECHO_C" >&6
4331 else
4332   cat >conftest.$ac_ext <<_ACEOF
4333 #line $LINENO "configure"
4334 #include "confdefs.h"
4335 #include <stdlib.h>
4336                    #include <stdio.h>
4337                    #include <math.h>
4338                    #include <unistd.h>
4339                    #include <limits.h>
4340                    #include <signal.h>
4341                    #include <fcntl.h>
4342                    #include <sys/types.h>
4343                    #include <sys/time.h>
4344                    #include <sys/ipc.h>
4345                    #include <sys/shm.h>
4346                    #include <sys/socket.h>
4347                    #include <netinet/in_systm.h>
4348                    #include <netinet/in.h>
4349                    #include <netinet/ip.h>
4350                    #include <netinet/ip_icmp.h>
4351                    #include <netinet/udp.h>
4352                    #include <arpa/inet.h>
4353                    #include <netdb.h>
4354 #ifdef F77_DUMMY_MAIN
4355 #  ifdef __cplusplus
4356      extern "C"
4357 #  endif
4358    int F77_DUMMY_MAIN() { return 1; }
4359 #endif
4360 int
4361 main ()
4362 {
4363 struct icmp i;
4364                    struct sockaddr s;
4365                    struct sockaddr_in si;
4366                    struct ip ip;
4367                    i.icmp_type = ICMP_ECHO;
4368                    i.icmp_code = 0;
4369                    i.icmp_cksum = 0;
4370                    i.icmp_id = 0;
4371                    i.icmp_seq = 0;
4372                    si.sin_family = AF_INET;
4373                    #if defined(__DECC) || defined(_IP_VHL)
4374                    ip.ip_vhl = 0;
4375                    #else
4376                    ip.ip_hl = 0;
4377                    #endif
4378
4379   ;
4380   return 0;
4381 }
4382 _ACEOF
4383 rm -f conftest.$ac_objext
4384 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4385   (eval $ac_compile) 2>&5
4386   ac_status=$?
4387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4388   (exit $ac_status); } &&
4389          { ac_try='test -s conftest.$ac_objext'
4390   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4391   (eval $ac_try) 2>&5
4392   ac_status=$?
4393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4394   (exit $ac_status); }; }; then
4395   ac_cv_have_icmp=yes
4396 else
4397   echo "$as_me: failed program was:" >&5
4398 cat conftest.$ac_ext >&5
4399 ac_cv_have_icmp=no
4400 fi
4401 rm -f conftest.$ac_objext conftest.$ac_ext
4402 fi
4403 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4404 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4405  if test "$ac_cv_have_icmp" = yes ; then
4406    cat >>confdefs.h <<\_ACEOF
4407 #define HAVE_ICMP 1
4408 _ACEOF
4409
4410  fi
4411 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4412 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4413 if test "${ac_cv_have_icmphdr+set}" = set; then
4414   echo $ECHO_N "(cached) $ECHO_C" >&6
4415 else
4416   cat >conftest.$ac_ext <<_ACEOF
4417 #line $LINENO "configure"
4418 #include "confdefs.h"
4419 #include <stdlib.h>
4420                    #include <stdio.h>
4421                    #include <math.h>
4422                    #include <unistd.h>
4423                    #include <limits.h>
4424                    #include <signal.h>
4425                    #include <fcntl.h>
4426                    #include <sys/types.h>
4427                    #include <sys/time.h>
4428                    #include <sys/ipc.h>
4429                    #include <sys/shm.h>
4430                    #include <sys/socket.h>
4431                    #include <netinet/in_systm.h>
4432                    #include <netinet/in.h>
4433                    #include <netinet/ip.h>
4434                    #include <netinet/ip_icmp.h>
4435                    #include <netinet/udp.h>
4436                    #include <arpa/inet.h>
4437                    #include <netdb.h>
4438 #ifdef F77_DUMMY_MAIN
4439 #  ifdef __cplusplus
4440      extern "C"
4441 #  endif
4442    int F77_DUMMY_MAIN() { return 1; }
4443 #endif
4444 int
4445 main ()
4446 {
4447 struct icmphdr i;
4448                    struct sockaddr s;
4449                    struct sockaddr_in si;
4450                    struct ip ip;
4451                    i.type = ICMP_ECHO;
4452                    i.code = 0;
4453                    i.checksum = 0;
4454                    i.un.echo.id = 0;
4455                    i.un.echo.sequence = 0;
4456                    si.sin_family = AF_INET;
4457                    ip.ip_hl = 0;
4458   ;
4459   return 0;
4460 }
4461 _ACEOF
4462 rm -f conftest.$ac_objext
4463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4464   (eval $ac_compile) 2>&5
4465   ac_status=$?
4466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4467   (exit $ac_status); } &&
4468          { ac_try='test -s conftest.$ac_objext'
4469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4470   (eval $ac_try) 2>&5
4471   ac_status=$?
4472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4473   (exit $ac_status); }; }; then
4474   ac_cv_have_icmphdr=yes
4475 else
4476   echo "$as_me: failed program was:" >&5
4477 cat conftest.$ac_ext >&5
4478 ac_cv_have_icmphdr=no
4479 fi
4480 rm -f conftest.$ac_objext conftest.$ac_ext
4481 fi
4482 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
4483 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
4484  if test "$ac_cv_have_icmphdr" = yes ; then
4485    cat >>confdefs.h <<\_ACEOF
4486 #define HAVE_ICMPHDR 1
4487 _ACEOF
4488
4489  fi
4490
4491
4492 for ac_header in crypt.h sys/select.h
4493 do
4494 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4495 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4496   echo "$as_me:$LINENO: checking for $ac_header" >&5
4497 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4498 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4499   echo $ECHO_N "(cached) $ECHO_C" >&6
4500 fi
4501 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4502 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4503 else
4504   # Is the header compilable?
4505 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4506 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4507 cat >conftest.$ac_ext <<_ACEOF
4508 #line $LINENO "configure"
4509 #include "confdefs.h"
4510 $ac_includes_default
4511 #include <$ac_header>
4512 _ACEOF
4513 rm -f conftest.$ac_objext
4514 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4515   (eval $ac_compile) 2>&5
4516   ac_status=$?
4517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4518   (exit $ac_status); } &&
4519          { ac_try='test -s conftest.$ac_objext'
4520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4521   (eval $ac_try) 2>&5
4522   ac_status=$?
4523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4524   (exit $ac_status); }; }; then
4525   ac_header_compiler=yes
4526 else
4527   echo "$as_me: failed program was:" >&5
4528 cat conftest.$ac_ext >&5
4529 ac_header_compiler=no
4530 fi
4531 rm -f conftest.$ac_objext conftest.$ac_ext
4532 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4533 echo "${ECHO_T}$ac_header_compiler" >&6
4534
4535 # Is the header present?
4536 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4537 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4538 cat >conftest.$ac_ext <<_ACEOF
4539 #line $LINENO "configure"
4540 #include "confdefs.h"
4541 #include <$ac_header>
4542 _ACEOF
4543 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4544   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4545   ac_status=$?
4546   egrep -v '^ *\+' conftest.er1 >conftest.err
4547   rm -f conftest.er1
4548   cat conftest.err >&5
4549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4550   (exit $ac_status); } >/dev/null; then
4551   if test -s conftest.err; then
4552     ac_cpp_err=$ac_c_preproc_warn_flag
4553   else
4554     ac_cpp_err=
4555   fi
4556 else
4557   ac_cpp_err=yes
4558 fi
4559 if test -z "$ac_cpp_err"; then
4560   ac_header_preproc=yes
4561 else
4562   echo "$as_me: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564   ac_header_preproc=no
4565 fi
4566 rm -f conftest.err conftest.$ac_ext
4567 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4568 echo "${ECHO_T}$ac_header_preproc" >&6
4569
4570 # So?  What about this header?
4571 case $ac_header_compiler:$ac_header_preproc in
4572   yes:no )
4573     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4574 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4575     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4576 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4577   no:yes )
4578     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4579 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4580     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4581 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4582     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4583 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4584 esac
4585 echo "$as_me:$LINENO: checking for $ac_header" >&5
4586 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4587 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4588   echo $ECHO_N "(cached) $ECHO_C" >&6
4589 else
4590   eval "$as_ac_Header=$ac_header_preproc"
4591 fi
4592 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4593 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4594
4595 fi
4596 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4597   cat >>confdefs.h <<_ACEOF
4598 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4599 _ACEOF
4600
4601 fi
4602
4603 done
4604
4605 for ac_prog in perl5 perl
4606 do
4607   # Extract the first word of "$ac_prog", so it can be a program name with args.
4608 set dummy $ac_prog; ac_word=$2
4609 echo "$as_me:$LINENO: checking for $ac_word" >&5
4610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4611 if test "${ac_cv_path_PERL+set}" = set; then
4612   echo $ECHO_N "(cached) $ECHO_C" >&6
4613 else
4614   case $PERL in
4615   [\\/]* | ?:[\\/]*)
4616   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4617   ;;
4618   *)
4619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4620 for as_dir in $PATH
4621 do
4622   IFS=$as_save_IFS
4623   test -z "$as_dir" && as_dir=.
4624   for ac_exec_ext in '' $ac_executable_extensions; do
4625   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4626     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4627     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4628     break 2
4629   fi
4630 done
4631 done
4632
4633   ;;
4634 esac
4635 fi
4636 PERL=$ac_cv_path_PERL
4637
4638 if test -n "$PERL"; then
4639   echo "$as_me:$LINENO: result: $PERL" >&5
4640 echo "${ECHO_T}$PERL" >&6
4641 else
4642   echo "$as_me:$LINENO: result: no" >&5
4643 echo "${ECHO_T}no" >&6
4644 fi
4645
4646   test -n "$PERL" && break
4647 done
4648
4649   if test -z "$PERL" ; then
4650     PERL_VERSION=0
4651   else
4652     echo "$as_me:$LINENO: checking perl version" >&5
4653 echo $ECHO_N "checking perl version... $ECHO_C" >&6
4654 if test "${ac_cv_perl_version+set}" = set; then
4655   echo $ECHO_N "(cached) $ECHO_C" >&6
4656 else
4657   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
4658 fi
4659 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
4660 echo "${ECHO_T}$ac_cv_perl_version" >&6
4661     PERL_VERSION=$ac_cv_perl_version
4662   fi
4663
4664
4665 if test -z "$PERL" ; then
4666   # don't let it be blank...
4667   PERL=/usr/bin/perl
4668 fi
4669
4670 echo "$as_me:$LINENO: checking for X" >&5
4671 echo $ECHO_N "checking for X... $ECHO_C" >&6
4672
4673
4674 # Check whether --with-x or --without-x was given.
4675 if test "${with_x+set}" = set; then
4676   withval="$with_x"
4677
4678 fi;
4679 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4680 if test "x$with_x" = xno; then
4681   # The user explicitly disabled X.
4682   have_x=disabled
4683 else
4684   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4685     # Both variables are already set.
4686     have_x=yes
4687   else
4688     if test "${ac_cv_have_x+set}" = set; then
4689   echo $ECHO_N "(cached) $ECHO_C" >&6
4690 else
4691   # One or both of the vars are not set, and there is no cached value.
4692 ac_x_includes=no ac_x_libraries=no
4693 rm -fr conftest.dir
4694 if mkdir conftest.dir; then
4695   cd conftest.dir
4696   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4697   cat >Imakefile <<'_ACEOF'
4698 acfindx:
4699         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4700 _ACEOF
4701   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4702     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4703     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4704     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4705     for ac_extension in a so sl; do
4706       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4707          test -f $ac_im_libdir/libX11.$ac_extension; then
4708         ac_im_usrlibdir=$ac_im_libdir; break
4709       fi
4710     done
4711     # Screen out bogus values from the imake configuration.  They are
4712     # bogus both because they are the default anyway, and because
4713     # using them would break gcc on systems where it needs fixed includes.
4714     case $ac_im_incroot in
4715         /usr/include) ;;
4716         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4717     esac
4718     case $ac_im_usrlibdir in
4719         /usr/lib | /lib) ;;
4720         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4721     esac
4722   fi
4723   cd ..
4724   rm -fr conftest.dir
4725 fi
4726
4727 # Standard set of common directories for X headers.
4728 # Check X11 before X11Rn because it is often a symlink to the current release.
4729 ac_x_header_dirs='
4730 /usr/X11/include
4731 /usr/X11R6/include
4732 /usr/X11R5/include
4733 /usr/X11R4/include
4734
4735 /usr/include/X11
4736 /usr/include/X11R6
4737 /usr/include/X11R5
4738 /usr/include/X11R4
4739
4740 /usr/local/X11/include
4741 /usr/local/X11R6/include
4742 /usr/local/X11R5/include
4743 /usr/local/X11R4/include
4744
4745 /usr/local/include/X11
4746 /usr/local/include/X11R6
4747 /usr/local/include/X11R5
4748 /usr/local/include/X11R4
4749
4750 /usr/X386/include
4751 /usr/x386/include
4752 /usr/XFree86/include/X11
4753
4754 /usr/include
4755 /usr/local/include
4756 /usr/unsupported/include
4757 /usr/athena/include
4758 /usr/local/x11r5/include
4759 /usr/lpp/Xamples/include
4760
4761 /usr/openwin/include
4762 /usr/openwin/share/include'
4763
4764 if test "$ac_x_includes" = no; then
4765   # Guess where to find include files, by looking for Intrinsic.h.
4766   # First, try using that file with no special directory specified.
4767   cat >conftest.$ac_ext <<_ACEOF
4768 #line $LINENO "configure"
4769 #include "confdefs.h"
4770 #include <X11/Intrinsic.h>
4771 _ACEOF
4772 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4773   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4774   ac_status=$?
4775   egrep -v '^ *\+' conftest.er1 >conftest.err
4776   rm -f conftest.er1
4777   cat conftest.err >&5
4778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779   (exit $ac_status); } >/dev/null; then
4780   if test -s conftest.err; then
4781     ac_cpp_err=$ac_c_preproc_warn_flag
4782   else
4783     ac_cpp_err=
4784   fi
4785 else
4786   ac_cpp_err=yes
4787 fi
4788 if test -z "$ac_cpp_err"; then
4789   # We can compile using X headers with no special include directory.
4790 ac_x_includes=
4791 else
4792   echo "$as_me: failed program was:" >&5
4793   cat conftest.$ac_ext >&5
4794   for ac_dir in $ac_x_header_dirs; do
4795   if test -r "$ac_dir/X11/Intrinsic.h"; then
4796     ac_x_includes=$ac_dir
4797     break
4798   fi
4799 done
4800 fi
4801 rm -f conftest.err conftest.$ac_ext
4802 fi # $ac_x_includes = no
4803
4804 if test "$ac_x_libraries" = no; then
4805   # Check for the libraries.
4806   # See if we find them without any special options.
4807   # Don't add to $LIBS permanently.
4808   ac_save_LIBS=$LIBS
4809   LIBS="-lXt $LIBS"
4810   cat >conftest.$ac_ext <<_ACEOF
4811 #line $LINENO "configure"
4812 #include "confdefs.h"
4813 #include <X11/Intrinsic.h>
4814 #ifdef F77_DUMMY_MAIN
4815 #  ifdef __cplusplus
4816      extern "C"
4817 #  endif
4818    int F77_DUMMY_MAIN() { return 1; }
4819 #endif
4820 int
4821 main ()
4822 {
4823 XtMalloc (0)
4824   ;
4825   return 0;
4826 }
4827 _ACEOF
4828 rm -f conftest.$ac_objext conftest$ac_exeext
4829 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4830   (eval $ac_link) 2>&5
4831   ac_status=$?
4832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4833   (exit $ac_status); } &&
4834          { ac_try='test -s conftest$ac_exeext'
4835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4836   (eval $ac_try) 2>&5
4837   ac_status=$?
4838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4839   (exit $ac_status); }; }; then
4840   LIBS=$ac_save_LIBS
4841 # We can link X programs with no special library path.
4842 ac_x_libraries=
4843 else
4844   echo "$as_me: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
4846 LIBS=$ac_save_LIBS
4847 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4848 do
4849   # Don't even attempt the hair of trying to link an X program!
4850   for ac_extension in a so sl; do
4851     if test -r $ac_dir/libXt.$ac_extension; then
4852       ac_x_libraries=$ac_dir
4853       break 2
4854     fi
4855   done
4856 done
4857 fi
4858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4859 fi # $ac_x_libraries = no
4860
4861 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4862   # Didn't find X anywhere.  Cache the known absence of X.
4863   ac_cv_have_x="have_x=no"
4864 else
4865   # Record where we found X for the cache.
4866   ac_cv_have_x="have_x=yes \
4867                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4868 fi
4869 fi
4870
4871   fi
4872   eval "$ac_cv_have_x"
4873 fi # $with_x != no
4874
4875 if test "$have_x" != yes; then
4876   echo "$as_me:$LINENO: result: $have_x" >&5
4877 echo "${ECHO_T}$have_x" >&6
4878   no_x=yes
4879 else
4880   # If each of the values was on the command line, it overrides each guess.
4881   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4882   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4883   # Update the cache value to reflect the command line values.
4884   ac_cv_have_x="have_x=yes \
4885                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4886   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
4887 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
4888 fi
4889
4890 if test "$no_x" = yes; then
4891   # Not all programs may use this symbol, but it does not hurt to define it.
4892
4893 cat >>confdefs.h <<\_ACEOF
4894 #define X_DISPLAY_MISSING 1
4895 _ACEOF
4896
4897   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4898 else
4899   if test -n "$x_includes"; then
4900     X_CFLAGS="$X_CFLAGS -I$x_includes"
4901   fi
4902
4903   # It would also be nice to do this for all -L options, not just this one.
4904   if test -n "$x_libraries"; then
4905     X_LIBS="$X_LIBS -L$x_libraries"
4906     # For Solaris; some versions of Sun CC require a space after -R and
4907     # others require no space.  Words are not sufficient . . . .
4908     case `(uname -sr) 2>/dev/null` in
4909     "SunOS 5"*)
4910       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
4911 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
4912       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
4913       cat >conftest.$ac_ext <<_ACEOF
4914 #line $LINENO "configure"
4915 #include "confdefs.h"
4916
4917 #ifdef F77_DUMMY_MAIN
4918 #  ifdef __cplusplus
4919      extern "C"
4920 #  endif
4921    int F77_DUMMY_MAIN() { return 1; }
4922 #endif
4923 int
4924 main ()
4925 {
4926
4927   ;
4928   return 0;
4929 }
4930 _ACEOF
4931 rm -f conftest.$ac_objext conftest$ac_exeext
4932 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4933   (eval $ac_link) 2>&5
4934   ac_status=$?
4935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4936   (exit $ac_status); } &&
4937          { ac_try='test -s conftest$ac_exeext'
4938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4939   (eval $ac_try) 2>&5
4940   ac_status=$?
4941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4942   (exit $ac_status); }; }; then
4943   ac_R_nospace=yes
4944 else
4945   echo "$as_me: failed program was:" >&5
4946 cat conftest.$ac_ext >&5
4947 ac_R_nospace=no
4948 fi
4949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4950       if test $ac_R_nospace = yes; then
4951         echo "$as_me:$LINENO: result: no" >&5
4952 echo "${ECHO_T}no" >&6
4953         X_LIBS="$X_LIBS -R$x_libraries"
4954       else
4955         LIBS="$ac_xsave_LIBS -R $x_libraries"
4956         cat >conftest.$ac_ext <<_ACEOF
4957 #line $LINENO "configure"
4958 #include "confdefs.h"
4959
4960 #ifdef F77_DUMMY_MAIN
4961 #  ifdef __cplusplus
4962      extern "C"
4963 #  endif
4964    int F77_DUMMY_MAIN() { return 1; }
4965 #endif
4966 int
4967 main ()
4968 {
4969
4970   ;
4971   return 0;
4972 }
4973 _ACEOF
4974 rm -f conftest.$ac_objext conftest$ac_exeext
4975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4976   (eval $ac_link) 2>&5
4977   ac_status=$?
4978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979   (exit $ac_status); } &&
4980          { ac_try='test -s conftest$ac_exeext'
4981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982   (eval $ac_try) 2>&5
4983   ac_status=$?
4984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985   (exit $ac_status); }; }; then
4986   ac_R_space=yes
4987 else
4988   echo "$as_me: failed program was:" >&5
4989 cat conftest.$ac_ext >&5
4990 ac_R_space=no
4991 fi
4992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4993         if test $ac_R_space = yes; then
4994           echo "$as_me:$LINENO: result: yes" >&5
4995 echo "${ECHO_T}yes" >&6
4996           X_LIBS="$X_LIBS -R $x_libraries"
4997         else
4998           echo "$as_me:$LINENO: result: neither works" >&5
4999 echo "${ECHO_T}neither works" >&6
5000         fi
5001       fi
5002       LIBS=$ac_xsave_LIBS
5003     esac
5004   fi
5005
5006   # Check for system-dependent libraries X programs must link with.
5007   # Do this before checking for the system-independent R6 libraries
5008   # (-lICE), since we may need -lsocket or whatever for X linking.
5009
5010   if test "$ISC" = yes; then
5011     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5012   else
5013     # Martyn Johnson says this is needed for Ultrix, if the X
5014     # libraries were built with DECnet support.  And Karl Berry says
5015     # the Alpha needs dnet_stub (dnet does not exist).
5016     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5017     cat >conftest.$ac_ext <<_ACEOF
5018 #line $LINENO "configure"
5019 #include "confdefs.h"
5020
5021 /* Override any gcc2 internal prototype to avoid an error.  */
5022 #ifdef __cplusplus
5023 extern "C"
5024 #endif
5025 /* We use char because int might match the return type of a gcc2
5026    builtin and then its argument prototype would still apply.  */
5027 char XOpenDisplay ();
5028 #ifdef F77_DUMMY_MAIN
5029 #  ifdef __cplusplus
5030      extern "C"
5031 #  endif
5032    int F77_DUMMY_MAIN() { return 1; }
5033 #endif
5034 int
5035 main ()
5036 {
5037 XOpenDisplay ();
5038   ;
5039   return 0;
5040 }
5041 _ACEOF
5042 rm -f conftest.$ac_objext conftest$ac_exeext
5043 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5044   (eval $ac_link) 2>&5
5045   ac_status=$?
5046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5047   (exit $ac_status); } &&
5048          { ac_try='test -s conftest$ac_exeext'
5049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5050   (eval $ac_try) 2>&5
5051   ac_status=$?
5052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5053   (exit $ac_status); }; }; then
5054   :
5055 else
5056   echo "$as_me: failed program was:" >&5
5057 cat conftest.$ac_ext >&5
5058 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5059 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5060 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5061   echo $ECHO_N "(cached) $ECHO_C" >&6
5062 else
5063   ac_check_lib_save_LIBS=$LIBS
5064 LIBS="-ldnet  $LIBS"
5065 cat >conftest.$ac_ext <<_ACEOF
5066 #line $LINENO "configure"
5067 #include "confdefs.h"
5068
5069 /* Override any gcc2 internal prototype to avoid an error.  */
5070 #ifdef __cplusplus
5071 extern "C"
5072 #endif
5073 /* We use char because int might match the return type of a gcc2
5074    builtin and then its argument prototype would still apply.  */
5075 char dnet_ntoa ();
5076 #ifdef F77_DUMMY_MAIN
5077 #  ifdef __cplusplus
5078      extern "C"
5079 #  endif
5080    int F77_DUMMY_MAIN() { return 1; }
5081 #endif
5082 int
5083 main ()
5084 {
5085 dnet_ntoa ();
5086   ;
5087   return 0;
5088 }
5089 _ACEOF
5090 rm -f conftest.$ac_objext conftest$ac_exeext
5091 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5092   (eval $ac_link) 2>&5
5093   ac_status=$?
5094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095   (exit $ac_status); } &&
5096          { ac_try='test -s conftest$ac_exeext'
5097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5098   (eval $ac_try) 2>&5
5099   ac_status=$?
5100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101   (exit $ac_status); }; }; then
5102   ac_cv_lib_dnet_dnet_ntoa=yes
5103 else
5104   echo "$as_me: failed program was:" >&5
5105 cat conftest.$ac_ext >&5
5106 ac_cv_lib_dnet_dnet_ntoa=no
5107 fi
5108 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5109 LIBS=$ac_check_lib_save_LIBS
5110 fi
5111 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5112 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5113 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5114   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5115 fi
5116
5117     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5118       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5119 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5120 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5121   echo $ECHO_N "(cached) $ECHO_C" >&6
5122 else
5123   ac_check_lib_save_LIBS=$LIBS
5124 LIBS="-ldnet_stub  $LIBS"
5125 cat >conftest.$ac_ext <<_ACEOF
5126 #line $LINENO "configure"
5127 #include "confdefs.h"
5128
5129 /* Override any gcc2 internal prototype to avoid an error.  */
5130 #ifdef __cplusplus
5131 extern "C"
5132 #endif
5133 /* We use char because int might match the return type of a gcc2
5134    builtin and then its argument prototype would still apply.  */
5135 char dnet_ntoa ();
5136 #ifdef F77_DUMMY_MAIN
5137 #  ifdef __cplusplus
5138      extern "C"
5139 #  endif
5140    int F77_DUMMY_MAIN() { return 1; }
5141 #endif
5142 int
5143 main ()
5144 {
5145 dnet_ntoa ();
5146   ;
5147   return 0;
5148 }
5149 _ACEOF
5150 rm -f conftest.$ac_objext conftest$ac_exeext
5151 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5152   (eval $ac_link) 2>&5
5153   ac_status=$?
5154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5155   (exit $ac_status); } &&
5156          { ac_try='test -s conftest$ac_exeext'
5157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5158   (eval $ac_try) 2>&5
5159   ac_status=$?
5160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5161   (exit $ac_status); }; }; then
5162   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5163 else
5164   echo "$as_me: failed program was:" >&5
5165 cat conftest.$ac_ext >&5
5166 ac_cv_lib_dnet_stub_dnet_ntoa=no
5167 fi
5168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5169 LIBS=$ac_check_lib_save_LIBS
5170 fi
5171 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5172 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5173 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5174   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5175 fi
5176
5177     fi
5178 fi
5179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5180     LIBS="$ac_xsave_LIBS"
5181
5182     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5183     # to get the SysV transport functions.
5184     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5185     # needs -lnsl.
5186     # The nsl library prevents programs from opening the X display
5187     # on Irix 5.2, according to T.E. Dickey.
5188     # The functions gethostbyname, getservbyname, and inet_addr are
5189     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5190     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5191 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5192 if test "${ac_cv_func_gethostbyname+set}" = set; then
5193   echo $ECHO_N "(cached) $ECHO_C" >&6
5194 else
5195   cat >conftest.$ac_ext <<_ACEOF
5196 #line $LINENO "configure"
5197 #include "confdefs.h"
5198 /* System header to define __stub macros and hopefully few prototypes,
5199     which can conflict with char gethostbyname (); below.  */
5200 #include <assert.h>
5201 /* Override any gcc2 internal prototype to avoid an error.  */
5202 #ifdef __cplusplus
5203 extern "C"
5204 #endif
5205 /* We use char because int might match the return type of a gcc2
5206    builtin and then its argument prototype would still apply.  */
5207 char gethostbyname ();
5208 char (*f) ();
5209
5210 #ifdef F77_DUMMY_MAIN
5211 #  ifdef __cplusplus
5212      extern "C"
5213 #  endif
5214    int F77_DUMMY_MAIN() { return 1; }
5215 #endif
5216 int
5217 main ()
5218 {
5219 /* The GNU C library defines this for functions which it implements
5220     to always fail with ENOSYS.  Some functions are actually named
5221     something starting with __ and the normal name is an alias.  */
5222 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5223 choke me
5224 #else
5225 f = gethostbyname;
5226 #endif
5227
5228   ;
5229   return 0;
5230 }
5231 _ACEOF
5232 rm -f conftest.$ac_objext conftest$ac_exeext
5233 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5234   (eval $ac_link) 2>&5
5235   ac_status=$?
5236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5237   (exit $ac_status); } &&
5238          { ac_try='test -s conftest$ac_exeext'
5239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5240   (eval $ac_try) 2>&5
5241   ac_status=$?
5242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5243   (exit $ac_status); }; }; then
5244   ac_cv_func_gethostbyname=yes
5245 else
5246   echo "$as_me: failed program was:" >&5
5247 cat conftest.$ac_ext >&5
5248 ac_cv_func_gethostbyname=no
5249 fi
5250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5251 fi
5252 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5253 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5254
5255     if test $ac_cv_func_gethostbyname = no; then
5256       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5257 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5258 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5259   echo $ECHO_N "(cached) $ECHO_C" >&6
5260 else
5261   ac_check_lib_save_LIBS=$LIBS
5262 LIBS="-lnsl  $LIBS"
5263 cat >conftest.$ac_ext <<_ACEOF
5264 #line $LINENO "configure"
5265 #include "confdefs.h"
5266
5267 /* Override any gcc2 internal prototype to avoid an error.  */
5268 #ifdef __cplusplus
5269 extern "C"
5270 #endif
5271 /* We use char because int might match the return type of a gcc2
5272    builtin and then its argument prototype would still apply.  */
5273 char gethostbyname ();
5274 #ifdef F77_DUMMY_MAIN
5275 #  ifdef __cplusplus
5276      extern "C"
5277 #  endif
5278    int F77_DUMMY_MAIN() { return 1; }
5279 #endif
5280 int
5281 main ()
5282 {
5283 gethostbyname ();
5284   ;
5285   return 0;
5286 }
5287 _ACEOF
5288 rm -f conftest.$ac_objext conftest$ac_exeext
5289 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5290   (eval $ac_link) 2>&5
5291   ac_status=$?
5292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5293   (exit $ac_status); } &&
5294          { ac_try='test -s conftest$ac_exeext'
5295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5296   (eval $ac_try) 2>&5
5297   ac_status=$?
5298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5299   (exit $ac_status); }; }; then
5300   ac_cv_lib_nsl_gethostbyname=yes
5301 else
5302   echo "$as_me: failed program was:" >&5
5303 cat conftest.$ac_ext >&5
5304 ac_cv_lib_nsl_gethostbyname=no
5305 fi
5306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5307 LIBS=$ac_check_lib_save_LIBS
5308 fi
5309 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5310 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5311 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5312   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5313 fi
5314
5315       if test $ac_cv_lib_nsl_gethostbyname = no; then
5316         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5317 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5318 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5319   echo $ECHO_N "(cached) $ECHO_C" >&6
5320 else
5321   ac_check_lib_save_LIBS=$LIBS
5322 LIBS="-lbsd  $LIBS"
5323 cat >conftest.$ac_ext <<_ACEOF
5324 #line $LINENO "configure"
5325 #include "confdefs.h"
5326
5327 /* Override any gcc2 internal prototype to avoid an error.  */
5328 #ifdef __cplusplus
5329 extern "C"
5330 #endif
5331 /* We use char because int might match the return type of a gcc2
5332    builtin and then its argument prototype would still apply.  */
5333 char gethostbyname ();
5334 #ifdef F77_DUMMY_MAIN
5335 #  ifdef __cplusplus
5336      extern "C"
5337 #  endif
5338    int F77_DUMMY_MAIN() { return 1; }
5339 #endif
5340 int
5341 main ()
5342 {
5343 gethostbyname ();
5344   ;
5345   return 0;
5346 }
5347 _ACEOF
5348 rm -f conftest.$ac_objext conftest$ac_exeext
5349 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5350   (eval $ac_link) 2>&5
5351   ac_status=$?
5352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5353   (exit $ac_status); } &&
5354          { ac_try='test -s conftest$ac_exeext'
5355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5356   (eval $ac_try) 2>&5
5357   ac_status=$?
5358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5359   (exit $ac_status); }; }; then
5360   ac_cv_lib_bsd_gethostbyname=yes
5361 else
5362   echo "$as_me: failed program was:" >&5
5363 cat conftest.$ac_ext >&5
5364 ac_cv_lib_bsd_gethostbyname=no
5365 fi
5366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5367 LIBS=$ac_check_lib_save_LIBS
5368 fi
5369 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5370 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5371 if test $ac_cv_lib_bsd_gethostbyname = yes; then
5372   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5373 fi
5374
5375       fi
5376     fi
5377
5378     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5379     # socket/setsockopt and other routines are undefined under SCO ODT
5380     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5381     # on later versions), says Simon Leinen: it contains gethostby*
5382     # variants that don't use the nameserver (or something).  -lsocket
5383     # must be given before -lnsl if both are needed.  We assume that
5384     # if connect needs -lnsl, so does gethostbyname.
5385     echo "$as_me:$LINENO: checking for connect" >&5
5386 echo $ECHO_N "checking for connect... $ECHO_C" >&6
5387 if test "${ac_cv_func_connect+set}" = set; then
5388   echo $ECHO_N "(cached) $ECHO_C" >&6
5389 else
5390   cat >conftest.$ac_ext <<_ACEOF
5391 #line $LINENO "configure"
5392 #include "confdefs.h"
5393 /* System header to define __stub macros and hopefully few prototypes,
5394     which can conflict with char connect (); below.  */
5395 #include <assert.h>
5396 /* Override any gcc2 internal prototype to avoid an error.  */
5397 #ifdef __cplusplus
5398 extern "C"
5399 #endif
5400 /* We use char because int might match the return type of a gcc2
5401    builtin and then its argument prototype would still apply.  */
5402 char connect ();
5403 char (*f) ();
5404
5405 #ifdef F77_DUMMY_MAIN
5406 #  ifdef __cplusplus
5407      extern "C"
5408 #  endif
5409    int F77_DUMMY_MAIN() { return 1; }
5410 #endif
5411 int
5412 main ()
5413 {
5414 /* The GNU C library defines this for functions which it implements
5415     to always fail with ENOSYS.  Some functions are actually named
5416     something starting with __ and the normal name is an alias.  */
5417 #if defined (__stub_connect) || defined (__stub___connect)
5418 choke me
5419 #else
5420 f = connect;
5421 #endif
5422
5423   ;
5424   return 0;
5425 }
5426 _ACEOF
5427 rm -f conftest.$ac_objext conftest$ac_exeext
5428 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5429   (eval $ac_link) 2>&5
5430   ac_status=$?
5431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5432   (exit $ac_status); } &&
5433          { ac_try='test -s conftest$ac_exeext'
5434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5435   (eval $ac_try) 2>&5
5436   ac_status=$?
5437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5438   (exit $ac_status); }; }; then
5439   ac_cv_func_connect=yes
5440 else
5441   echo "$as_me: failed program was:" >&5
5442 cat conftest.$ac_ext >&5
5443 ac_cv_func_connect=no
5444 fi
5445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5446 fi
5447 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5448 echo "${ECHO_T}$ac_cv_func_connect" >&6
5449
5450     if test $ac_cv_func_connect = no; then
5451       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5452 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5453 if test "${ac_cv_lib_socket_connect+set}" = set; then
5454   echo $ECHO_N "(cached) $ECHO_C" >&6
5455 else
5456   ac_check_lib_save_LIBS=$LIBS
5457 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5458 cat >conftest.$ac_ext <<_ACEOF
5459 #line $LINENO "configure"
5460 #include "confdefs.h"
5461
5462 /* Override any gcc2 internal prototype to avoid an error.  */
5463 #ifdef __cplusplus
5464 extern "C"
5465 #endif
5466 /* We use char because int might match the return type of a gcc2
5467    builtin and then its argument prototype would still apply.  */
5468 char connect ();
5469 #ifdef F77_DUMMY_MAIN
5470 #  ifdef __cplusplus
5471      extern "C"
5472 #  endif
5473    int F77_DUMMY_MAIN() { return 1; }
5474 #endif
5475 int
5476 main ()
5477 {
5478 connect ();
5479   ;
5480   return 0;
5481 }
5482 _ACEOF
5483 rm -f conftest.$ac_objext conftest$ac_exeext
5484 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5485   (eval $ac_link) 2>&5
5486   ac_status=$?
5487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5488   (exit $ac_status); } &&
5489          { ac_try='test -s conftest$ac_exeext'
5490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5491   (eval $ac_try) 2>&5
5492   ac_status=$?
5493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494   (exit $ac_status); }; }; then
5495   ac_cv_lib_socket_connect=yes
5496 else
5497   echo "$as_me: failed program was:" >&5
5498 cat conftest.$ac_ext >&5
5499 ac_cv_lib_socket_connect=no
5500 fi
5501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5502 LIBS=$ac_check_lib_save_LIBS
5503 fi
5504 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5505 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5506 if test $ac_cv_lib_socket_connect = yes; then
5507   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5508 fi
5509
5510     fi
5511
5512     # Guillermo Gomez says -lposix is necessary on A/UX.
5513     echo "$as_me:$LINENO: checking for remove" >&5
5514 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5515 if test "${ac_cv_func_remove+set}" = set; then
5516   echo $ECHO_N "(cached) $ECHO_C" >&6
5517 else
5518   cat >conftest.$ac_ext <<_ACEOF
5519 #line $LINENO "configure"
5520 #include "confdefs.h"
5521 /* System header to define __stub macros and hopefully few prototypes,
5522     which can conflict with char remove (); below.  */
5523 #include <assert.h>
5524 /* Override any gcc2 internal prototype to avoid an error.  */
5525 #ifdef __cplusplus
5526 extern "C"
5527 #endif
5528 /* We use char because int might match the return type of a gcc2
5529    builtin and then its argument prototype would still apply.  */
5530 char remove ();
5531 char (*f) ();
5532
5533 #ifdef F77_DUMMY_MAIN
5534 #  ifdef __cplusplus
5535      extern "C"
5536 #  endif
5537    int F77_DUMMY_MAIN() { return 1; }
5538 #endif
5539 int
5540 main ()
5541 {
5542 /* The GNU C library defines this for functions which it implements
5543     to always fail with ENOSYS.  Some functions are actually named
5544     something starting with __ and the normal name is an alias.  */
5545 #if defined (__stub_remove) || defined (__stub___remove)
5546 choke me
5547 #else
5548 f = remove;
5549 #endif
5550
5551   ;
5552   return 0;
5553 }
5554 _ACEOF
5555 rm -f conftest.$ac_objext conftest$ac_exeext
5556 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5557   (eval $ac_link) 2>&5
5558   ac_status=$?
5559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5560   (exit $ac_status); } &&
5561          { ac_try='test -s conftest$ac_exeext'
5562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5563   (eval $ac_try) 2>&5
5564   ac_status=$?
5565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5566   (exit $ac_status); }; }; then
5567   ac_cv_func_remove=yes
5568 else
5569   echo "$as_me: failed program was:" >&5
5570 cat conftest.$ac_ext >&5
5571 ac_cv_func_remove=no
5572 fi
5573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5574 fi
5575 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5576 echo "${ECHO_T}$ac_cv_func_remove" >&6
5577
5578     if test $ac_cv_func_remove = no; then
5579       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5580 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5581 if test "${ac_cv_lib_posix_remove+set}" = set; then
5582   echo $ECHO_N "(cached) $ECHO_C" >&6
5583 else
5584   ac_check_lib_save_LIBS=$LIBS
5585 LIBS="-lposix  $LIBS"
5586 cat >conftest.$ac_ext <<_ACEOF
5587 #line $LINENO "configure"
5588 #include "confdefs.h"
5589
5590 /* Override any gcc2 internal prototype to avoid an error.  */
5591 #ifdef __cplusplus
5592 extern "C"
5593 #endif
5594 /* We use char because int might match the return type of a gcc2
5595    builtin and then its argument prototype would still apply.  */
5596 char remove ();
5597 #ifdef F77_DUMMY_MAIN
5598 #  ifdef __cplusplus
5599      extern "C"
5600 #  endif
5601    int F77_DUMMY_MAIN() { return 1; }
5602 #endif
5603 int
5604 main ()
5605 {
5606 remove ();
5607   ;
5608   return 0;
5609 }
5610 _ACEOF
5611 rm -f conftest.$ac_objext conftest$ac_exeext
5612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5613   (eval $ac_link) 2>&5
5614   ac_status=$?
5615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616   (exit $ac_status); } &&
5617          { ac_try='test -s conftest$ac_exeext'
5618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5619   (eval $ac_try) 2>&5
5620   ac_status=$?
5621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622   (exit $ac_status); }; }; then
5623   ac_cv_lib_posix_remove=yes
5624 else
5625   echo "$as_me: failed program was:" >&5
5626 cat conftest.$ac_ext >&5
5627 ac_cv_lib_posix_remove=no
5628 fi
5629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5630 LIBS=$ac_check_lib_save_LIBS
5631 fi
5632 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5633 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5634 if test $ac_cv_lib_posix_remove = yes; then
5635   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5636 fi
5637
5638     fi
5639
5640     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5641     echo "$as_me:$LINENO: checking for shmat" >&5
5642 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5643 if test "${ac_cv_func_shmat+set}" = set; then
5644   echo $ECHO_N "(cached) $ECHO_C" >&6
5645 else
5646   cat >conftest.$ac_ext <<_ACEOF
5647 #line $LINENO "configure"
5648 #include "confdefs.h"
5649 /* System header to define __stub macros and hopefully few prototypes,
5650     which can conflict with char shmat (); below.  */
5651 #include <assert.h>
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 #ifdef __cplusplus
5654 extern "C"
5655 #endif
5656 /* We use char because int might match the return type of a gcc2
5657    builtin and then its argument prototype would still apply.  */
5658 char shmat ();
5659 char (*f) ();
5660
5661 #ifdef F77_DUMMY_MAIN
5662 #  ifdef __cplusplus
5663      extern "C"
5664 #  endif
5665    int F77_DUMMY_MAIN() { return 1; }
5666 #endif
5667 int
5668 main ()
5669 {
5670 /* The GNU C library defines this for functions which it implements
5671     to always fail with ENOSYS.  Some functions are actually named
5672     something starting with __ and the normal name is an alias.  */
5673 #if defined (__stub_shmat) || defined (__stub___shmat)
5674 choke me
5675 #else
5676 f = shmat;
5677 #endif
5678
5679   ;
5680   return 0;
5681 }
5682 _ACEOF
5683 rm -f conftest.$ac_objext conftest$ac_exeext
5684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5685   (eval $ac_link) 2>&5
5686   ac_status=$?
5687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5688   (exit $ac_status); } &&
5689          { ac_try='test -s conftest$ac_exeext'
5690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5691   (eval $ac_try) 2>&5
5692   ac_status=$?
5693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5694   (exit $ac_status); }; }; then
5695   ac_cv_func_shmat=yes
5696 else
5697   echo "$as_me: failed program was:" >&5
5698 cat conftest.$ac_ext >&5
5699 ac_cv_func_shmat=no
5700 fi
5701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5702 fi
5703 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
5704 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5705
5706     if test $ac_cv_func_shmat = no; then
5707       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
5708 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5709 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5710   echo $ECHO_N "(cached) $ECHO_C" >&6
5711 else
5712   ac_check_lib_save_LIBS=$LIBS
5713 LIBS="-lipc  $LIBS"
5714 cat >conftest.$ac_ext <<_ACEOF
5715 #line $LINENO "configure"
5716 #include "confdefs.h"
5717
5718 /* Override any gcc2 internal prototype to avoid an error.  */
5719 #ifdef __cplusplus
5720 extern "C"
5721 #endif
5722 /* We use char because int might match the return type of a gcc2
5723    builtin and then its argument prototype would still apply.  */
5724 char shmat ();
5725 #ifdef F77_DUMMY_MAIN
5726 #  ifdef __cplusplus
5727      extern "C"
5728 #  endif
5729    int F77_DUMMY_MAIN() { return 1; }
5730 #endif
5731 int
5732 main ()
5733 {
5734 shmat ();
5735   ;
5736   return 0;
5737 }
5738 _ACEOF
5739 rm -f conftest.$ac_objext conftest$ac_exeext
5740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5741   (eval $ac_link) 2>&5
5742   ac_status=$?
5743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744   (exit $ac_status); } &&
5745          { ac_try='test -s conftest$ac_exeext'
5746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5747   (eval $ac_try) 2>&5
5748   ac_status=$?
5749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750   (exit $ac_status); }; }; then
5751   ac_cv_lib_ipc_shmat=yes
5752 else
5753   echo "$as_me: failed program was:" >&5
5754 cat conftest.$ac_ext >&5
5755 ac_cv_lib_ipc_shmat=no
5756 fi
5757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5758 LIBS=$ac_check_lib_save_LIBS
5759 fi
5760 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
5761 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
5762 if test $ac_cv_lib_ipc_shmat = yes; then
5763   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5764 fi
5765
5766     fi
5767   fi
5768
5769   # Check for libraries that X11R6 Xt/Xaw programs need.
5770   ac_save_LDFLAGS=$LDFLAGS
5771   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5772   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5773   # check for ICE first), but we must link in the order -lSM -lICE or
5774   # we get undefined symbols.  So assume we have SM if we have ICE.
5775   # These have to be linked with before -lX11, unlike the other
5776   # libraries we check for below, so use a different variable.
5777   # John Interrante, Karl Berry
5778   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
5779 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
5780 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
5781   echo $ECHO_N "(cached) $ECHO_C" >&6
5782 else
5783   ac_check_lib_save_LIBS=$LIBS
5784 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5785 cat >conftest.$ac_ext <<_ACEOF
5786 #line $LINENO "configure"
5787 #include "confdefs.h"
5788
5789 /* Override any gcc2 internal prototype to avoid an error.  */
5790 #ifdef __cplusplus
5791 extern "C"
5792 #endif
5793 /* We use char because int might match the return type of a gcc2
5794    builtin and then its argument prototype would still apply.  */
5795 char IceConnectionNumber ();
5796 #ifdef F77_DUMMY_MAIN
5797 #  ifdef __cplusplus
5798      extern "C"
5799 #  endif
5800    int F77_DUMMY_MAIN() { return 1; }
5801 #endif
5802 int
5803 main ()
5804 {
5805 IceConnectionNumber ();
5806   ;
5807   return 0;
5808 }
5809 _ACEOF
5810 rm -f conftest.$ac_objext conftest$ac_exeext
5811 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5812   (eval $ac_link) 2>&5
5813   ac_status=$?
5814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815   (exit $ac_status); } &&
5816          { ac_try='test -s conftest$ac_exeext'
5817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5818   (eval $ac_try) 2>&5
5819   ac_status=$?
5820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821   (exit $ac_status); }; }; then
5822   ac_cv_lib_ICE_IceConnectionNumber=yes
5823 else
5824   echo "$as_me: failed program was:" >&5
5825 cat conftest.$ac_ext >&5
5826 ac_cv_lib_ICE_IceConnectionNumber=no
5827 fi
5828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5829 LIBS=$ac_check_lib_save_LIBS
5830 fi
5831 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
5832 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
5833 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
5834   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5835 fi
5836
5837   LDFLAGS=$ac_save_LDFLAGS
5838
5839 fi
5840
5841
5842 if test "$have_x" != yes; then
5843   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
5844 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
5845    { (exit 1); exit 1; }; }
5846 fi
5847
5848
5849     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
5850 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
5851 if test "${ac_cv_x_app_defaults+set}" = set; then
5852   echo $ECHO_N "(cached) $ECHO_C" >&6
5853 else
5854
5855   rm -fr conftestdir
5856   if mkdir conftestdir; then
5857     cd conftestdir 2>/dev/null
5858     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5859     cat > Imakefile <<'EOF'
5860 acfindx:
5861         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
5862 EOF
5863     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
5864       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
5865       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5866     fi
5867     cd .. 2>/dev/null
5868     rm -fr conftestdir
5869   fi
5870       if test x"$ac_x_app_defaults" = x; then
5871
5872   # Look for the directory under a standard set of common directories.
5873   # Check X11 before X11Rn because it's often a symlink to the current release.
5874   for ac_dir in                                 \
5875     /usr/X11/lib/app-defaults                   \
5876     /usr/X11R6/lib/app-defaults                 \
5877     /usr/X11R6/lib/X11/app-defaults             \
5878     /usr/X11R5/lib/app-defaults                 \
5879     /usr/X11R5/lib/X11/app-defaults             \
5880     /usr/X11R4/lib/app-defaults                 \
5881     /usr/X11R4/lib/X11/app-defaults             \
5882                                                 \
5883     /usr/lib/X11/app-defaults                   \
5884     /usr/lib/X11R6/app-defaults                 \
5885     /usr/lib/X11R5/app-defaults                 \
5886     /usr/lib/X11R4/app-defaults                 \
5887                                                 \
5888     /usr/local/X11/lib/app-defaults             \
5889     /usr/local/X11R6/lib/app-defaults           \
5890     /usr/local/X11R5/lib/app-defaults           \
5891     /usr/local/X11R4/lib/app-defaults           \
5892                                                 \
5893     /usr/local/lib/X11/app-defaults             \
5894     /usr/local/lib/X11R6/app-defaults           \
5895     /usr/local/lib/X11R6/X11/app-defaults       \
5896     /usr/local/lib/X11R5/app-defaults           \
5897     /usr/local/lib/X11R5/X11/app-defaults       \
5898     /usr/local/lib/X11R4/app-defaults           \
5899     /usr/local/lib/X11R4/X11/app-defaults       \
5900                                                 \
5901     /usr/X386/lib/X11/app-defaults              \
5902     /usr/x386/lib/X11/app-defaults              \
5903     /usr/XFree86/lib/X11/app-defaults           \
5904                                                 \
5905     /usr/lib/X11/app-defaults                   \
5906     /usr/local/lib/X11/app-defaults             \
5907     /usr/unsupported/lib/X11/app-defaults       \
5908     /usr/athena/lib/X11/app-defaults            \
5909     /usr/local/x11r5/lib/X11/app-defaults       \
5910     /usr/lpp/Xamples/lib/X11/app-defaults       \
5911     /lib/usr/lib/X11/app-defaults               \
5912                                                 \
5913     /usr/openwin/lib/app-defaults               \
5914     /usr/openwin/lib/X11/app-defaults           \
5915     /usr/openwin/share/lib/app-defaults         \
5916     /usr/openwin/share/lib/X11/app-defaults     \
5917                                                 \
5918     /X11R6/lib/app-defaults                     \
5919     /X11R5/lib/app-defaults                     \
5920     /X11R4/lib/app-defaults                     \
5921     ; \
5922   do
5923     if test -d "$ac_dir"; then
5924       ac_x_app_defaults=$ac_dir
5925       break
5926     fi
5927   done
5928
5929       fi
5930       if test x"$ac_x_app_defaults" = x; then
5931         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
5932       else
5933         # Record where we found app-defaults for the cache.
5934         ac_cv_x_app_defaults="$ac_x_app_defaults"
5935       fi
5936 fi
5937 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
5938 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
5939     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
5940 case "$host" in
5941     *-hpux*)
5942
5943       # The following arcana was gleaned from conversations with
5944       # Eric Schwartz <erics@col.hp.com>:
5945       #
5946       # On HPUX 10.x, the parts of X that HP considers "standard" live in
5947       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
5948       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
5949       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
5950       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
5951       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
5952       # you don't need any -I or -L arguments.
5953       #
5954       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
5955       # are the same division as 10.x.  However, there are no symlinks to
5956       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
5957       # arguments are always necessary.
5958       #
5959       # However, X11R6 was available on HPUX 9.x as a patch: if that
5960       # patch was installed, then all of X11R6 went in to
5961       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
5962       #
5963       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
5964       # whether R5 was available as a patch; R6 undoubtedly was not.)
5965       #
5966       # So.  We try and use the highest numbered pair of
5967       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
5968       # that are available.  We do not mix and match different versions
5969       # of X.
5970       #
5971       # Question I still don't know the answer to: (do you?)
5972       #
5973       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
5974       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
5975       #     that contrib directory?  Did it contain so-called "standard"
5976       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
5977       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
5978       #     be a situation where one had to reach into the R5 headers and
5979       #     libs to find Xmu?  That is, must both R6 and R5 directories
5980       #     be on the -I and -L lists in that case?
5981       #
5982       for version in X11R6 X11R5 X11R4 ; do
5983         # if either pair of directories exists...
5984         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
5985         then
5986            # if contrib exists, use it...
5987            if test -d /usr/contrib/$version/include ; then
5988              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
5989              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
5990            fi
5991            # if the "standard" one exists, use it.
5992            if test -d /usr/include/$version ; then
5993              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
5994              X_LIBS="$X_LIBS -L/usr/lib/$version"
5995            fi
5996            # since at least one of the pair exists, go no farther.
5997            break
5998         fi
5999       done
6000
6001       # Now find Motif.  Thanks for not making xmkmf find this by
6002       # default, you losers.
6003       #
6004       if test -d /usr/include/Motif2.1 ; then
6005         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6006         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6007       elif test -d /usr/include/Motif1.2 ; then
6008         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6009         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6010       elif test -d /usr/include/Motif1.1 ; then
6011         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6012         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6013       fi
6014
6015       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6016       #
6017       if test -d /opt/graphics/OpenGL/include ; then
6018         # HP-UX 10.20 puts it here
6019         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6020         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6021       elif test -d /opt/Mesa/lib ; then
6022         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6023         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6024       fi
6025
6026
6027       if test -d /opt/xpm/lib/X11 ; then
6028         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6029         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6030       fi
6031
6032       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6033       # in /usr/local/, unless there is already an xscreensaver in
6034       # /usr/local/bin/.  This can be overridden with the --prefix arg
6035       # to configure.  I'm not sure this is the right thing to do, but
6036       # Richard Lloyd says so...
6037       #
6038       if test \! -x /usr/local/bin/xscreensaver ; then
6039         ac_default_prefix=/opt/xscreensaver
6040       fi
6041
6042     ;;
6043     *-solaris*)
6044
6045       # Thanks for not making xmkmf find this by default, pinheads.
6046       # And thanks for moving things around again, too.  Is this
6047       # really the standard location now?  What happened to the
6048       # joke that this kind of thing went in /opt?
6049       # cthomp says "answer: CDE (Common Disorganized Environment)"
6050       #
6051       if test -f /usr/dt/include/Xm/Xm.h ; then
6052         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6053         X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
6054
6055         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6056         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6057 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6058 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6059   echo $ECHO_N "(cached) $ECHO_C" >&6
6060 else
6061   ac_check_lib_save_LIBS=$LIBS
6062 LIBS="-lgen  $LIBS"
6063 cat >conftest.$ac_ext <<_ACEOF
6064 #line $LINENO "configure"
6065 #include "confdefs.h"
6066
6067 /* Override any gcc2 internal prototype to avoid an error.  */
6068 #ifdef __cplusplus
6069 extern "C"
6070 #endif
6071 /* We use char because int might match the return type of a gcc2
6072    builtin and then its argument prototype would still apply.  */
6073 char regcmp ();
6074 #ifdef F77_DUMMY_MAIN
6075 #  ifdef __cplusplus
6076      extern "C"
6077 #  endif
6078    int F77_DUMMY_MAIN() { return 1; }
6079 #endif
6080 int
6081 main ()
6082 {
6083 regcmp ();
6084   ;
6085   return 0;
6086 }
6087 _ACEOF
6088 rm -f conftest.$ac_objext conftest$ac_exeext
6089 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6090   (eval $ac_link) 2>&5
6091   ac_status=$?
6092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093   (exit $ac_status); } &&
6094          { ac_try='test -s conftest$ac_exeext'
6095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096   (eval $ac_try) 2>&5
6097   ac_status=$?
6098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099   (exit $ac_status); }; }; then
6100   ac_cv_lib_gen_regcmp=yes
6101 else
6102   echo "$as_me: failed program was:" >&5
6103 cat conftest.$ac_ext >&5
6104 ac_cv_lib_gen_regcmp=no
6105 fi
6106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6107 LIBS=$ac_check_lib_save_LIBS
6108 fi
6109 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6110 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6111 if test $ac_cv_lib_gen_regcmp = yes; then
6112   X_LIBS="$X_LIBS -lgen"
6113 fi
6114
6115       fi
6116
6117     ;;
6118     *-darwin*)
6119
6120       # On MacOS X (10.x with "fink"), many things are under /sw/.
6121       #
6122       if test -d /sw/include ; then
6123         X_CFLAGS="-I/sw/include $X_CFLAGS"
6124         X_LIBS="-L/sw/lib $X_LIBS"
6125       fi
6126     ;;
6127   esac
6128 echo "$as_me:$LINENO: checking for XPointer" >&5
6129 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6130 if test "${ac_cv_xpointer+set}" = set; then
6131   echo $ECHO_N "(cached) $ECHO_C" >&6
6132 else
6133
6134   ac_save_CPPFLAGS="$CPPFLAGS"
6135   if test \! -z "$includedir" ; then
6136     CPPFLAGS="$CPPFLAGS -I$includedir"
6137   fi
6138   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6139   cat >conftest.$ac_ext <<_ACEOF
6140 #line $LINENO "configure"
6141 #include "confdefs.h"
6142 #include <X11/Xlib.h>
6143 #ifdef F77_DUMMY_MAIN
6144 #  ifdef __cplusplus
6145      extern "C"
6146 #  endif
6147    int F77_DUMMY_MAIN() { return 1; }
6148 #endif
6149 int
6150 main ()
6151 {
6152 XPointer foo = (XPointer) 0;
6153   ;
6154   return 0;
6155 }
6156 _ACEOF
6157 rm -f conftest.$ac_objext
6158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6159   (eval $ac_compile) 2>&5
6160   ac_status=$?
6161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6162   (exit $ac_status); } &&
6163          { ac_try='test -s conftest.$ac_objext'
6164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6165   (eval $ac_try) 2>&5
6166   ac_status=$?
6167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6168   (exit $ac_status); }; }; then
6169   ac_cv_xpointer=yes
6170 else
6171   echo "$as_me: failed program was:" >&5
6172 cat conftest.$ac_ext >&5
6173 ac_cv_xpointer=no
6174 fi
6175 rm -f conftest.$ac_objext conftest.$ac_ext
6176   CPPFLAGS="$ac_save_CPPFLAGS"
6177 fi
6178 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6179 echo "${ECHO_T}$ac_cv_xpointer" >&6
6180   if test "$ac_cv_xpointer" != yes; then
6181    cat >>confdefs.h <<\_ACEOF
6182 #define XPointer char*
6183 _ACEOF
6184
6185   fi
6186
6187
6188 ###############################################################################
6189 #
6190 #       Gettext support
6191 #
6192 ###############################################################################
6193
6194
6195
6196 if test -n ""; then
6197     echo "$as_me:$LINENO: checking for intltool >= " >&5
6198 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
6199
6200     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6201     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6202
6203     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6204
6205
6206     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6207         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
6208 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
6209     else
6210         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6211 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
6212         exit 1
6213     fi
6214 fi
6215
6216   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6217 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6218      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
6219       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6220      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6221    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
6222     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6223 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6224        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6225       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6226     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240 # Use the tools built into the package, not the ones that are installed.
6241
6242 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6243 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6244 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6245
6246
6247
6248
6249
6250 # Extract the first word of "perl", so it can be a program name with args.
6251 set dummy perl; ac_word=$2
6252 echo "$as_me:$LINENO: checking for $ac_word" >&5
6253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6254 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
6255   echo $ECHO_N "(cached) $ECHO_C" >&6
6256 else
6257   case $INTLTOOL_PERL in
6258   [\\/]* | ?:[\\/]*)
6259   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6260   ;;
6261   *)
6262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6263 for as_dir in $PATH
6264 do
6265   IFS=$as_save_IFS
6266   test -z "$as_dir" && as_dir=.
6267   for ac_exec_ext in '' $ac_executable_extensions; do
6268   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6269     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6270     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6271     break 2
6272   fi
6273 done
6274 done
6275
6276   ;;
6277 esac
6278 fi
6279 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6280
6281 if test -n "$INTLTOOL_PERL"; then
6282   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
6283 echo "${ECHO_T}$INTLTOOL_PERL" >&6
6284 else
6285   echo "$as_me:$LINENO: result: no" >&5
6286 echo "${ECHO_T}no" >&6
6287 fi
6288
6289 if test -z "$INTLTOOL_PERL"; then
6290    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
6291 echo "$as_me: error: perl not found; required for intltool" >&2;}
6292    { (exit 1); exit 1; }; }
6293 fi
6294 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6295    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
6296 echo "$as_me: error: perl 5.x required for intltool" >&2;}
6297    { (exit 1); exit 1; }; }
6298 fi
6299
6300 # Remove file type tags (using []) from po/POTFILES.
6301
6302
6303
6304
6305
6306
6307
6308 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6309
6310 ac_config_commands="$ac_config_commands default-1"
6311
6312
6313
6314 GETTEXT_PACKAGE=xscreensaver
6315 cat >>confdefs.h <<_ACEOF
6316 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6317 _ACEOF
6318
6319 cat >>confdefs.h <<_ACEOF
6320 #define PACKAGE "$GETTEXT_PACKAGE"
6321 _ACEOF
6322
6323
6324
6325 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
6326 if test -n "$ac_tool_prefix"; then
6327   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6328 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6329 echo "$as_me:$LINENO: checking for $ac_word" >&5
6330 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6331 if test "${ac_cv_prog_RANLIB+set}" = set; then
6332   echo $ECHO_N "(cached) $ECHO_C" >&6
6333 else
6334   if test -n "$RANLIB"; then
6335   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6336 else
6337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6338 for as_dir in $PATH
6339 do
6340   IFS=$as_save_IFS
6341   test -z "$as_dir" && as_dir=.
6342   for ac_exec_ext in '' $ac_executable_extensions; do
6343   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6344     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6345     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6346     break 2
6347   fi
6348 done
6349 done
6350
6351 fi
6352 fi
6353 RANLIB=$ac_cv_prog_RANLIB
6354 if test -n "$RANLIB"; then
6355   echo "$as_me:$LINENO: result: $RANLIB" >&5
6356 echo "${ECHO_T}$RANLIB" >&6
6357 else
6358   echo "$as_me:$LINENO: result: no" >&5
6359 echo "${ECHO_T}no" >&6
6360 fi
6361
6362 fi
6363 if test -z "$ac_cv_prog_RANLIB"; then
6364   ac_ct_RANLIB=$RANLIB
6365   # Extract the first word of "ranlib", so it can be a program name with args.
6366 set dummy ranlib; ac_word=$2
6367 echo "$as_me:$LINENO: checking for $ac_word" >&5
6368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6369 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6370   echo $ECHO_N "(cached) $ECHO_C" >&6
6371 else
6372   if test -n "$ac_ct_RANLIB"; then
6373   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6374 else
6375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376 for as_dir in $PATH
6377 do
6378   IFS=$as_save_IFS
6379   test -z "$as_dir" && as_dir=.
6380   for ac_exec_ext in '' $ac_executable_extensions; do
6381   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6382     ac_cv_prog_ac_ct_RANLIB="ranlib"
6383     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6384     break 2
6385   fi
6386 done
6387 done
6388
6389   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6390 fi
6391 fi
6392 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6393 if test -n "$ac_ct_RANLIB"; then
6394   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6395 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6396 else
6397   echo "$as_me:$LINENO: result: no" >&5
6398 echo "${ECHO_T}no" >&6
6399 fi
6400
6401   RANLIB=$ac_ct_RANLIB
6402 else
6403   RANLIB="$ac_cv_prog_RANLIB"
6404 fi
6405
6406 echo "$as_me:$LINENO: checking for off_t" >&5
6407 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6408 if test "${ac_cv_type_off_t+set}" = set; then
6409   echo $ECHO_N "(cached) $ECHO_C" >&6
6410 else
6411   cat >conftest.$ac_ext <<_ACEOF
6412 #line $LINENO "configure"
6413 #include "confdefs.h"
6414 $ac_includes_default
6415 #ifdef F77_DUMMY_MAIN
6416 #  ifdef __cplusplus
6417      extern "C"
6418 #  endif
6419    int F77_DUMMY_MAIN() { return 1; }
6420 #endif
6421 int
6422 main ()
6423 {
6424 if ((off_t *) 0)
6425   return 0;
6426 if (sizeof (off_t))
6427   return 0;
6428   ;
6429   return 0;
6430 }
6431 _ACEOF
6432 rm -f conftest.$ac_objext
6433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6434   (eval $ac_compile) 2>&5
6435   ac_status=$?
6436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437   (exit $ac_status); } &&
6438          { ac_try='test -s conftest.$ac_objext'
6439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6440   (eval $ac_try) 2>&5
6441   ac_status=$?
6442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443   (exit $ac_status); }; }; then
6444   ac_cv_type_off_t=yes
6445 else
6446   echo "$as_me: failed program was:" >&5
6447 cat conftest.$ac_ext >&5
6448 ac_cv_type_off_t=no
6449 fi
6450 rm -f conftest.$ac_objext conftest.$ac_ext
6451 fi
6452 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6453 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6454 if test $ac_cv_type_off_t = yes; then
6455   :
6456 else
6457
6458 cat >>confdefs.h <<_ACEOF
6459 #define off_t long
6460 _ACEOF
6461
6462 fi
6463
6464 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6465 # for constant arguments.  Useless!
6466 echo "$as_me:$LINENO: checking for working alloca.h" >&5
6467 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6468 if test "${ac_cv_working_alloca_h+set}" = set; then
6469   echo $ECHO_N "(cached) $ECHO_C" >&6
6470 else
6471   cat >conftest.$ac_ext <<_ACEOF
6472 #line $LINENO "configure"
6473 #include "confdefs.h"
6474 #include <alloca.h>
6475 #ifdef F77_DUMMY_MAIN
6476 #  ifdef __cplusplus
6477      extern "C"
6478 #  endif
6479    int F77_DUMMY_MAIN() { return 1; }
6480 #endif
6481 int
6482 main ()
6483 {
6484 char *p = (char *) alloca (2 * sizeof (int));
6485   ;
6486   return 0;
6487 }
6488 _ACEOF
6489 rm -f conftest.$ac_objext conftest$ac_exeext
6490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6491   (eval $ac_link) 2>&5
6492   ac_status=$?
6493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494   (exit $ac_status); } &&
6495          { ac_try='test -s conftest$ac_exeext'
6496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6497   (eval $ac_try) 2>&5
6498   ac_status=$?
6499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6500   (exit $ac_status); }; }; then
6501   ac_cv_working_alloca_h=yes
6502 else
6503   echo "$as_me: failed program was:" >&5
6504 cat conftest.$ac_ext >&5
6505 ac_cv_working_alloca_h=no
6506 fi
6507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6508 fi
6509 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
6510 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6511 if test $ac_cv_working_alloca_h = yes; then
6512
6513 cat >>confdefs.h <<\_ACEOF
6514 #define HAVE_ALLOCA_H 1
6515 _ACEOF
6516
6517 fi
6518
6519 echo "$as_me:$LINENO: checking for alloca" >&5
6520 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6521 if test "${ac_cv_func_alloca_works+set}" = set; then
6522   echo $ECHO_N "(cached) $ECHO_C" >&6
6523 else
6524   cat >conftest.$ac_ext <<_ACEOF
6525 #line $LINENO "configure"
6526 #include "confdefs.h"
6527 #ifdef __GNUC__
6528 # define alloca __builtin_alloca
6529 #else
6530 # ifdef _MSC_VER
6531 #  include <malloc.h>
6532 #  define alloca _alloca
6533 # else
6534 #  if HAVE_ALLOCA_H
6535 #   include <alloca.h>
6536 #  else
6537 #   ifdef _AIX
6538  #pragma alloca
6539 #   else
6540 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6541 char *alloca ();
6542 #    endif
6543 #   endif
6544 #  endif
6545 # endif
6546 #endif
6547
6548 #ifdef F77_DUMMY_MAIN
6549 #  ifdef __cplusplus
6550      extern "C"
6551 #  endif
6552    int F77_DUMMY_MAIN() { return 1; }
6553 #endif
6554 int
6555 main ()
6556 {
6557 char *p = (char *) alloca (1);
6558   ;
6559   return 0;
6560 }
6561 _ACEOF
6562 rm -f conftest.$ac_objext conftest$ac_exeext
6563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6564   (eval $ac_link) 2>&5
6565   ac_status=$?
6566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6567   (exit $ac_status); } &&
6568          { ac_try='test -s conftest$ac_exeext'
6569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6570   (eval $ac_try) 2>&5
6571   ac_status=$?
6572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6573   (exit $ac_status); }; }; then
6574   ac_cv_func_alloca_works=yes
6575 else
6576   echo "$as_me: failed program was:" >&5
6577 cat conftest.$ac_ext >&5
6578 ac_cv_func_alloca_works=no
6579 fi
6580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6581 fi
6582 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
6583 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6584
6585 if test $ac_cv_func_alloca_works = yes; then
6586
6587 cat >>confdefs.h <<\_ACEOF
6588 #define HAVE_ALLOCA 1
6589 _ACEOF
6590
6591 else
6592   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6593 # that cause trouble.  Some versions do not even contain alloca or
6594 # contain a buggy version.  If you still want to use their alloca,
6595 # use ar to extract alloca.o from them instead of compiling alloca.c.
6596
6597 ALLOCA=alloca.$ac_objext
6598
6599 cat >>confdefs.h <<\_ACEOF
6600 #define C_ALLOCA 1
6601 _ACEOF
6602
6603
6604 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
6605 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6606 if test "${ac_cv_os_cray+set}" = set; then
6607   echo $ECHO_N "(cached) $ECHO_C" >&6
6608 else
6609   cat >conftest.$ac_ext <<_ACEOF
6610 #line $LINENO "configure"
6611 #include "confdefs.h"
6612 #if defined(CRAY) && ! defined(CRAY2)
6613 webecray
6614 #else
6615 wenotbecray
6616 #endif
6617
6618 _ACEOF
6619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6620   egrep "webecray" >/dev/null 2>&1; then
6621   ac_cv_os_cray=yes
6622 else
6623   ac_cv_os_cray=no
6624 fi
6625 rm -f conftest*
6626
6627 fi
6628 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6629 echo "${ECHO_T}$ac_cv_os_cray" >&6
6630 if test $ac_cv_os_cray = yes; then
6631   for ac_func in _getb67 GETB67 getb67; do
6632     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6633 echo "$as_me:$LINENO: checking for $ac_func" >&5
6634 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6635 if eval "test \"\${$as_ac_var+set}\" = set"; then
6636   echo $ECHO_N "(cached) $ECHO_C" >&6
6637 else
6638   cat >conftest.$ac_ext <<_ACEOF
6639 #line $LINENO "configure"
6640 #include "confdefs.h"
6641 /* System header to define __stub macros and hopefully few prototypes,
6642     which can conflict with char $ac_func (); below.  */
6643 #include <assert.h>
6644 /* Override any gcc2 internal prototype to avoid an error.  */
6645 #ifdef __cplusplus
6646 extern "C"
6647 #endif
6648 /* We use char because int might match the return type of a gcc2
6649    builtin and then its argument prototype would still apply.  */
6650 char $ac_func ();
6651 char (*f) ();
6652
6653 #ifdef F77_DUMMY_MAIN
6654 #  ifdef __cplusplus
6655      extern "C"
6656 #  endif
6657    int F77_DUMMY_MAIN() { return 1; }
6658 #endif
6659 int
6660 main ()
6661 {
6662 /* The GNU C library defines this for functions which it implements
6663     to always fail with ENOSYS.  Some functions are actually named
6664     something starting with __ and the normal name is an alias.  */
6665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6666 choke me
6667 #else
6668 f = $ac_func;
6669 #endif
6670
6671   ;
6672   return 0;
6673 }
6674 _ACEOF
6675 rm -f conftest.$ac_objext conftest$ac_exeext
6676 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6677   (eval $ac_link) 2>&5
6678   ac_status=$?
6679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6680   (exit $ac_status); } &&
6681          { ac_try='test -s conftest$ac_exeext'
6682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6683   (eval $ac_try) 2>&5
6684   ac_status=$?
6685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6686   (exit $ac_status); }; }; then
6687   eval "$as_ac_var=yes"
6688 else
6689   echo "$as_me: failed program was:" >&5
6690 cat conftest.$ac_ext >&5
6691 eval "$as_ac_var=no"
6692 fi
6693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6694 fi
6695 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6696 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6697 if test `eval echo '${'$as_ac_var'}'` = yes; then
6698
6699 cat >>confdefs.h <<_ACEOF
6700 #define CRAY_STACKSEG_END $ac_func
6701 _ACEOF
6702
6703     break
6704 fi
6705
6706   done
6707 fi
6708
6709 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6710 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6711 if test "${ac_cv_c_stack_direction+set}" = set; then
6712   echo $ECHO_N "(cached) $ECHO_C" >&6
6713 else
6714   if test "$cross_compiling" = yes; then
6715   ac_cv_c_stack_direction=0
6716 else
6717   cat >conftest.$ac_ext <<_ACEOF
6718 #line $LINENO "configure"
6719 #include "confdefs.h"
6720 int
6721 find_stack_direction ()
6722 {
6723   static char *addr = 0;
6724   auto char dummy;
6725   if (addr == 0)
6726     {
6727       addr = &dummy;
6728       return find_stack_direction ();
6729     }
6730   else
6731     return (&dummy > addr) ? 1 : -1;
6732 }
6733
6734 int
6735 main ()
6736 {
6737   exit (find_stack_direction () < 0);
6738 }
6739 _ACEOF
6740 rm -f conftest$ac_exeext
6741 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6742   (eval $ac_link) 2>&5
6743   ac_status=$?
6744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6745   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6747   (eval $ac_try) 2>&5
6748   ac_status=$?
6749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6750   (exit $ac_status); }; }; then
6751   ac_cv_c_stack_direction=1
6752 else
6753   echo "$as_me: program exited with status $ac_status" >&5
6754 echo "$as_me: failed program was:" >&5
6755 cat conftest.$ac_ext >&5
6756 ( exit $ac_status )
6757 ac_cv_c_stack_direction=-1
6758 fi
6759 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6760 fi
6761 fi
6762 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
6763 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
6764
6765 cat >>confdefs.h <<_ACEOF
6766 #define STACK_DIRECTION $ac_cv_c_stack_direction
6767 _ACEOF
6768
6769
6770 fi
6771
6772
6773
6774 for ac_header in stdlib.h unistd.h
6775 do
6776 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6777 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6778   echo "$as_me:$LINENO: checking for $ac_header" >&5
6779 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6780 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6781   echo $ECHO_N "(cached) $ECHO_C" >&6
6782 fi
6783 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6784 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6785 else
6786   # Is the header compilable?
6787 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6788 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6789 cat >conftest.$ac_ext <<_ACEOF
6790 #line $LINENO "configure"
6791 #include "confdefs.h"
6792 $ac_includes_default
6793 #include <$ac_header>
6794 _ACEOF
6795 rm -f conftest.$ac_objext
6796 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6797   (eval $ac_compile) 2>&5
6798   ac_status=$?
6799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6800   (exit $ac_status); } &&
6801          { ac_try='test -s conftest.$ac_objext'
6802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6803   (eval $ac_try) 2>&5
6804   ac_status=$?
6805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6806   (exit $ac_status); }; }; then
6807   ac_header_compiler=yes
6808 else
6809   echo "$as_me: failed program was:" >&5
6810 cat conftest.$ac_ext >&5
6811 ac_header_compiler=no
6812 fi
6813 rm -f conftest.$ac_objext conftest.$ac_ext
6814 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6815 echo "${ECHO_T}$ac_header_compiler" >&6
6816
6817 # Is the header present?
6818 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6819 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6820 cat >conftest.$ac_ext <<_ACEOF
6821 #line $LINENO "configure"
6822 #include "confdefs.h"
6823 #include <$ac_header>
6824 _ACEOF
6825 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6826   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6827   ac_status=$?
6828   egrep -v '^ *\+' conftest.er1 >conftest.err
6829   rm -f conftest.er1
6830   cat conftest.err >&5
6831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6832   (exit $ac_status); } >/dev/null; then
6833   if test -s conftest.err; then
6834     ac_cpp_err=$ac_c_preproc_warn_flag
6835   else
6836     ac_cpp_err=
6837   fi
6838 else
6839   ac_cpp_err=yes
6840 fi
6841 if test -z "$ac_cpp_err"; then
6842   ac_header_preproc=yes
6843 else
6844   echo "$as_me: failed program was:" >&5
6845   cat conftest.$ac_ext >&5
6846   ac_header_preproc=no
6847 fi
6848 rm -f conftest.err conftest.$ac_ext
6849 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6850 echo "${ECHO_T}$ac_header_preproc" >&6
6851
6852 # So?  What about this header?
6853 case $ac_header_compiler:$ac_header_preproc in
6854   yes:no )
6855     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6856 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6857     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6858 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6859   no:yes )
6860     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6861 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6862     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6863 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6864     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6865 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6866 esac
6867 echo "$as_me:$LINENO: checking for $ac_header" >&5
6868 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6869 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6870   echo $ECHO_N "(cached) $ECHO_C" >&6
6871 else
6872   eval "$as_ac_Header=$ac_header_preproc"
6873 fi
6874 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6875 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6876
6877 fi
6878 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6879   cat >>confdefs.h <<_ACEOF
6880 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6881 _ACEOF
6882
6883 fi
6884
6885 done
6886
6887
6888 for ac_func in getpagesize
6889 do
6890 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6891 echo "$as_me:$LINENO: checking for $ac_func" >&5
6892 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6893 if eval "test \"\${$as_ac_var+set}\" = set"; then
6894   echo $ECHO_N "(cached) $ECHO_C" >&6
6895 else
6896   cat >conftest.$ac_ext <<_ACEOF
6897 #line $LINENO "configure"
6898 #include "confdefs.h"
6899 /* System header to define __stub macros and hopefully few prototypes,
6900     which can conflict with char $ac_func (); below.  */
6901 #include <assert.h>
6902 /* Override any gcc2 internal prototype to avoid an error.  */
6903 #ifdef __cplusplus
6904 extern "C"
6905 #endif
6906 /* We use char because int might match the return type of a gcc2
6907    builtin and then its argument prototype would still apply.  */
6908 char $ac_func ();
6909 char (*f) ();
6910
6911 #ifdef F77_DUMMY_MAIN
6912 #  ifdef __cplusplus
6913      extern "C"
6914 #  endif
6915    int F77_DUMMY_MAIN() { return 1; }
6916 #endif
6917 int
6918 main ()
6919 {
6920 /* The GNU C library defines this for functions which it implements
6921     to always fail with ENOSYS.  Some functions are actually named
6922     something starting with __ and the normal name is an alias.  */
6923 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6924 choke me
6925 #else
6926 f = $ac_func;
6927 #endif
6928
6929   ;
6930   return 0;
6931 }
6932 _ACEOF
6933 rm -f conftest.$ac_objext conftest$ac_exeext
6934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6935   (eval $ac_link) 2>&5
6936   ac_status=$?
6937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6938   (exit $ac_status); } &&
6939          { ac_try='test -s conftest$ac_exeext'
6940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6941   (eval $ac_try) 2>&5
6942   ac_status=$?
6943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6944   (exit $ac_status); }; }; then
6945   eval "$as_ac_var=yes"
6946 else
6947   echo "$as_me: failed program was:" >&5
6948 cat conftest.$ac_ext >&5
6949 eval "$as_ac_var=no"
6950 fi
6951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6952 fi
6953 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6954 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6955 if test `eval echo '${'$as_ac_var'}'` = yes; then
6956   cat >>confdefs.h <<_ACEOF
6957 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6958 _ACEOF
6959
6960 fi
6961 done
6962
6963 echo "$as_me:$LINENO: checking for working mmap" >&5
6964 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
6965 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
6966   echo $ECHO_N "(cached) $ECHO_C" >&6
6967 else
6968   if test "$cross_compiling" = yes; then
6969   ac_cv_func_mmap_fixed_mapped=no
6970 else
6971   cat >conftest.$ac_ext <<_ACEOF
6972 #line $LINENO "configure"
6973 #include "confdefs.h"
6974 $ac_includes_default
6975 /* malloc might have been renamed as rpl_malloc. */
6976 #undef malloc
6977
6978 /* Thanks to Mike Haertel and Jim Avera for this test.
6979    Here is a matrix of mmap possibilities:
6980         mmap private not fixed
6981         mmap private fixed at somewhere currently unmapped
6982         mmap private fixed at somewhere already mapped
6983         mmap shared not fixed
6984         mmap shared fixed at somewhere currently unmapped
6985         mmap shared fixed at somewhere already mapped
6986    For private mappings, we should verify that changes cannot be read()
6987    back from the file, nor mmap's back from the file at a different
6988    address.  (There have been systems where private was not correctly
6989    implemented like the infamous i386 svr4.0, and systems where the
6990    VM page cache was not coherent with the file system buffer cache
6991    like early versions of FreeBSD and possibly contemporary NetBSD.)
6992    For shared mappings, we should conversely verify that changes get
6993    propagated back to all the places they're supposed to be.
6994
6995    Grep wants private fixed already mapped.
6996    The main things grep needs to know about mmap are:
6997    * does it exist and is it safe to write into the mmap'd area
6998    * how to use it (BSD variants)  */
6999
7000 #include <fcntl.h>
7001 #include <sys/mman.h>
7002
7003 #if !STDC_HEADERS && !HAVE_STDLIB_H
7004 char *malloc ();
7005 #endif
7006
7007 /* This mess was copied from the GNU getpagesize.h.  */
7008 #if !HAVE_GETPAGESIZE
7009 /* Assume that all systems that can run configure have sys/param.h.  */
7010 # if !HAVE_SYS_PARAM_H
7011 #  define HAVE_SYS_PARAM_H 1
7012 # endif
7013
7014 # ifdef _SC_PAGESIZE
7015 #  define getpagesize() sysconf(_SC_PAGESIZE)
7016 # else /* no _SC_PAGESIZE */
7017 #  if HAVE_SYS_PARAM_H
7018 #   include <sys/param.h>
7019 #   ifdef EXEC_PAGESIZE
7020 #    define getpagesize() EXEC_PAGESIZE
7021 #   else /* no EXEC_PAGESIZE */
7022 #    ifdef NBPG
7023 #     define getpagesize() NBPG * CLSIZE
7024 #     ifndef CLSIZE
7025 #      define CLSIZE 1
7026 #     endif /* no CLSIZE */
7027 #    else /* no NBPG */
7028 #     ifdef NBPC
7029 #      define getpagesize() NBPC
7030 #     else /* no NBPC */
7031 #      ifdef PAGESIZE
7032 #       define getpagesize() PAGESIZE
7033 #      endif /* PAGESIZE */
7034 #     endif /* no NBPC */
7035 #    endif /* no NBPG */
7036 #   endif /* no EXEC_PAGESIZE */
7037 #  else /* no HAVE_SYS_PARAM_H */
7038 #   define getpagesize() 8192   /* punt totally */
7039 #  endif /* no HAVE_SYS_PARAM_H */
7040 # endif /* no _SC_PAGESIZE */
7041
7042 #endif /* no HAVE_GETPAGESIZE */
7043
7044 int
7045 main ()
7046 {
7047   char *data, *data2, *data3;
7048   int i, pagesize;
7049   int fd;
7050
7051   pagesize = getpagesize ();
7052
7053   /* First, make a file with some known garbage in it. */
7054   data = (char *) malloc (pagesize);
7055   if (!data)
7056     exit (1);
7057   for (i = 0; i < pagesize; ++i)
7058     *(data + i) = rand ();
7059   umask (0);
7060   fd = creat ("conftest.mmap", 0600);
7061   if (fd < 0)
7062     exit (1);
7063   if (write (fd, data, pagesize) != pagesize)
7064     exit (1);
7065   close (fd);
7066
7067   /* Next, try to mmap the file at a fixed address which already has
7068      something else allocated at it.  If we can, also make sure that
7069      we see the same garbage.  */
7070   fd = open ("conftest.mmap", O_RDWR);
7071   if (fd < 0)
7072     exit (1);
7073   data2 = (char *) malloc (2 * pagesize);
7074   if (!data2)
7075     exit (1);
7076   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7077   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7078                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7079     exit (1);
7080   for (i = 0; i < pagesize; ++i)
7081     if (*(data + i) != *(data2 + i))
7082       exit (1);
7083
7084   /* Finally, make sure that changes to the mapped area do not
7085      percolate back to the file as seen by read().  (This is a bug on
7086      some variants of i386 svr4.0.)  */
7087   for (i = 0; i < pagesize; ++i)
7088     *(data2 + i) = *(data2 + i) + 1;
7089   data3 = (char *) malloc (pagesize);
7090   if (!data3)
7091     exit (1);
7092   if (read (fd, data3, pagesize) != pagesize)
7093     exit (1);
7094   for (i = 0; i < pagesize; ++i)
7095     if (*(data + i) != *(data3 + i))
7096       exit (1);
7097   close (fd);
7098   exit (0);
7099 }
7100 _ACEOF
7101 rm -f conftest$ac_exeext
7102 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7103   (eval $ac_link) 2>&5
7104   ac_status=$?
7105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7108   (eval $ac_try) 2>&5
7109   ac_status=$?
7110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7111   (exit $ac_status); }; }; then
7112   ac_cv_func_mmap_fixed_mapped=yes
7113 else
7114   echo "$as_me: program exited with status $ac_status" >&5
7115 echo "$as_me: failed program was:" >&5
7116 cat conftest.$ac_ext >&5
7117 ( exit $ac_status )
7118 ac_cv_func_mmap_fixed_mapped=no
7119 fi
7120 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7121 fi
7122 fi
7123 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7124 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7125 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7126
7127 cat >>confdefs.h <<\_ACEOF
7128 #define HAVE_MMAP 1
7129 _ACEOF
7130
7131 fi
7132 rm -f conftest.mmap
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7144 unistd.h sys/param.h
7145 do
7146 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7147 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7148   echo "$as_me:$LINENO: checking for $ac_header" >&5
7149 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7150 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7151   echo $ECHO_N "(cached) $ECHO_C" >&6
7152 fi
7153 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7154 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7155 else
7156   # Is the header compilable?
7157 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7158 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7159 cat >conftest.$ac_ext <<_ACEOF
7160 #line $LINENO "configure"
7161 #include "confdefs.h"
7162 $ac_includes_default
7163 #include <$ac_header>
7164 _ACEOF
7165 rm -f conftest.$ac_objext
7166 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7167   (eval $ac_compile) 2>&5
7168   ac_status=$?
7169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7170   (exit $ac_status); } &&
7171          { ac_try='test -s conftest.$ac_objext'
7172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7173   (eval $ac_try) 2>&5
7174   ac_status=$?
7175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176   (exit $ac_status); }; }; then
7177   ac_header_compiler=yes
7178 else
7179   echo "$as_me: failed program was:" >&5
7180 cat conftest.$ac_ext >&5
7181 ac_header_compiler=no
7182 fi
7183 rm -f conftest.$ac_objext conftest.$ac_ext
7184 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7185 echo "${ECHO_T}$ac_header_compiler" >&6
7186
7187 # Is the header present?
7188 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7189 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7190 cat >conftest.$ac_ext <<_ACEOF
7191 #line $LINENO "configure"
7192 #include "confdefs.h"
7193 #include <$ac_header>
7194 _ACEOF
7195 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7196   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7197   ac_status=$?
7198   egrep -v '^ *\+' conftest.er1 >conftest.err
7199   rm -f conftest.er1
7200   cat conftest.err >&5
7201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7202   (exit $ac_status); } >/dev/null; then
7203   if test -s conftest.err; then
7204     ac_cpp_err=$ac_c_preproc_warn_flag
7205   else
7206     ac_cpp_err=
7207   fi
7208 else
7209   ac_cpp_err=yes
7210 fi
7211 if test -z "$ac_cpp_err"; then
7212   ac_header_preproc=yes
7213 else
7214   echo "$as_me: failed program was:" >&5
7215   cat conftest.$ac_ext >&5
7216   ac_header_preproc=no
7217 fi
7218 rm -f conftest.err conftest.$ac_ext
7219 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7220 echo "${ECHO_T}$ac_header_preproc" >&6
7221
7222 # So?  What about this header?
7223 case $ac_header_compiler:$ac_header_preproc in
7224   yes:no )
7225     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7226 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7227     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7228 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7229   no:yes )
7230     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7231 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7232     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7233 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7234     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7235 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7236 esac
7237 echo "$as_me:$LINENO: checking for $ac_header" >&5
7238 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7239 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7240   echo $ECHO_N "(cached) $ECHO_C" >&6
7241 else
7242   eval "$as_ac_Header=$ac_header_preproc"
7243 fi
7244 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7245 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7246
7247 fi
7248 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7249   cat >>confdefs.h <<_ACEOF
7250 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7251 _ACEOF
7252
7253 fi
7254
7255 done
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7269 strdup __argz_count __argz_stringify __argz_next
7270 do
7271 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7272 echo "$as_me:$LINENO: checking for $ac_func" >&5
7273 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7274 if eval "test \"\${$as_ac_var+set}\" = set"; then
7275   echo $ECHO_N "(cached) $ECHO_C" >&6
7276 else
7277   cat >conftest.$ac_ext <<_ACEOF
7278 #line $LINENO "configure"
7279 #include "confdefs.h"
7280 /* System header to define __stub macros and hopefully few prototypes,
7281     which can conflict with char $ac_func (); below.  */
7282 #include <assert.h>
7283 /* Override any gcc2 internal prototype to avoid an error.  */
7284 #ifdef __cplusplus
7285 extern "C"
7286 #endif
7287 /* We use char because int might match the return type of a gcc2
7288    builtin and then its argument prototype would still apply.  */
7289 char $ac_func ();
7290 char (*f) ();
7291
7292 #ifdef F77_DUMMY_MAIN
7293 #  ifdef __cplusplus
7294      extern "C"
7295 #  endif
7296    int F77_DUMMY_MAIN() { return 1; }
7297 #endif
7298 int
7299 main ()
7300 {
7301 /* The GNU C library defines this for functions which it implements
7302     to always fail with ENOSYS.  Some functions are actually named
7303     something starting with __ and the normal name is an alias.  */
7304 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7305 choke me
7306 #else
7307 f = $ac_func;
7308 #endif
7309
7310   ;
7311   return 0;
7312 }
7313 _ACEOF
7314 rm -f conftest.$ac_objext conftest$ac_exeext
7315 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7316   (eval $ac_link) 2>&5
7317   ac_status=$?
7318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7319   (exit $ac_status); } &&
7320          { ac_try='test -s conftest$ac_exeext'
7321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7322   (eval $ac_try) 2>&5
7323   ac_status=$?
7324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7325   (exit $ac_status); }; }; then
7326   eval "$as_ac_var=yes"
7327 else
7328   echo "$as_me: failed program was:" >&5
7329 cat conftest.$ac_ext >&5
7330 eval "$as_ac_var=no"
7331 fi
7332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7333 fi
7334 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7335 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7336 if test `eval echo '${'$as_ac_var'}'` = yes; then
7337   cat >>confdefs.h <<_ACEOF
7338 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7339 _ACEOF
7340
7341 fi
7342 done
7343
7344
7345    if test $ac_cv_header_locale_h = yes; then
7346     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7347 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7348 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7349   echo $ECHO_N "(cached) $ECHO_C" >&6
7350 else
7351   cat >conftest.$ac_ext <<_ACEOF
7352 #line $LINENO "configure"
7353 #include "confdefs.h"
7354 #include <locale.h>
7355 #ifdef F77_DUMMY_MAIN
7356 #  ifdef __cplusplus
7357      extern "C"
7358 #  endif
7359    int F77_DUMMY_MAIN() { return 1; }
7360 #endif
7361 int
7362 main ()
7363 {
7364 return LC_MESSAGES
7365   ;
7366   return 0;
7367 }
7368 _ACEOF
7369 rm -f conftest.$ac_objext conftest$ac_exeext
7370 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7371   (eval $ac_link) 2>&5
7372   ac_status=$?
7373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7374   (exit $ac_status); } &&
7375          { ac_try='test -s conftest$ac_exeext'
7376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7377   (eval $ac_try) 2>&5
7378   ac_status=$?
7379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7380   (exit $ac_status); }; }; then
7381   am_cv_val_LC_MESSAGES=yes
7382 else
7383   echo "$as_me: failed program was:" >&5
7384 cat conftest.$ac_ext >&5
7385 am_cv_val_LC_MESSAGES=no
7386 fi
7387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7388 fi
7389 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7390 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7391     if test $am_cv_val_LC_MESSAGES = yes; then
7392
7393 cat >>confdefs.h <<\_ACEOF
7394 #define HAVE_LC_MESSAGES 1
7395 _ACEOF
7396
7397     fi
7398   fi
7399      USE_NLS=yes
7400
7401
7402         nls_cv_force_use_gnu_gettext="no"
7403
7404     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7405     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7406                               nls_cv_header_intl=
7407       nls_cv_header_libgt=
7408       CATOBJEXT=NONE
7409
7410       if test "${ac_cv_header_libintl_h+set}" = set; then
7411   echo "$as_me:$LINENO: checking for libintl.h" >&5
7412 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7413 if test "${ac_cv_header_libintl_h+set}" = set; then
7414   echo $ECHO_N "(cached) $ECHO_C" >&6
7415 fi
7416 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7417 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7418 else
7419   # Is the header compilable?
7420 echo "$as_me:$LINENO: checking libintl.h usability" >&5
7421 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
7422 cat >conftest.$ac_ext <<_ACEOF
7423 #line $LINENO "configure"
7424 #include "confdefs.h"
7425 $ac_includes_default
7426 #include <libintl.h>
7427 _ACEOF
7428 rm -f conftest.$ac_objext
7429 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7430   (eval $ac_compile) 2>&5
7431   ac_status=$?
7432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7433   (exit $ac_status); } &&
7434          { ac_try='test -s conftest.$ac_objext'
7435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7436   (eval $ac_try) 2>&5
7437   ac_status=$?
7438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439   (exit $ac_status); }; }; then
7440   ac_header_compiler=yes
7441 else
7442   echo "$as_me: failed program was:" >&5
7443 cat conftest.$ac_ext >&5
7444 ac_header_compiler=no
7445 fi
7446 rm -f conftest.$ac_objext conftest.$ac_ext
7447 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7448 echo "${ECHO_T}$ac_header_compiler" >&6
7449
7450 # Is the header present?
7451 echo "$as_me:$LINENO: checking libintl.h presence" >&5
7452 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
7453 cat >conftest.$ac_ext <<_ACEOF
7454 #line $LINENO "configure"
7455 #include "confdefs.h"
7456 #include <libintl.h>
7457 _ACEOF
7458 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7459   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7460   ac_status=$?
7461   egrep -v '^ *\+' conftest.er1 >conftest.err
7462   rm -f conftest.er1
7463   cat conftest.err >&5
7464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7465   (exit $ac_status); } >/dev/null; then
7466   if test -s conftest.err; then
7467     ac_cpp_err=$ac_c_preproc_warn_flag
7468   else
7469     ac_cpp_err=
7470   fi
7471 else
7472   ac_cpp_err=yes
7473 fi
7474 if test -z "$ac_cpp_err"; then
7475   ac_header_preproc=yes
7476 else
7477   echo "$as_me: failed program was:" >&5
7478   cat conftest.$ac_ext >&5
7479   ac_header_preproc=no
7480 fi
7481 rm -f conftest.err conftest.$ac_ext
7482 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7483 echo "${ECHO_T}$ac_header_preproc" >&6
7484
7485 # So?  What about this header?
7486 case $ac_header_compiler:$ac_header_preproc in
7487   yes:no )
7488     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7489 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7490     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7491 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7492   no:yes )
7493     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
7494 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
7495     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
7496 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
7497     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7498 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7499 esac
7500 echo "$as_me:$LINENO: checking for libintl.h" >&5
7501 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7502 if test "${ac_cv_header_libintl_h+set}" = set; then
7503   echo $ECHO_N "(cached) $ECHO_C" >&6
7504 else
7505   ac_cv_header_libintl_h=$ac_header_preproc
7506 fi
7507 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7508 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7509
7510 fi
7511 if test $ac_cv_header_libintl_h = yes; then
7512   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
7513 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
7514 if test "${gt_cv_func_dgettext_libc+set}" = set; then
7515   echo $ECHO_N "(cached) $ECHO_C" >&6
7516 else
7517   cat >conftest.$ac_ext <<_ACEOF
7518 #line $LINENO "configure"
7519 #include "confdefs.h"
7520 #include <libintl.h>
7521 #ifdef F77_DUMMY_MAIN
7522 #  ifdef __cplusplus
7523      extern "C"
7524 #  endif
7525    int F77_DUMMY_MAIN() { return 1; }
7526 #endif
7527 int
7528 main ()
7529 {
7530 return (int) dgettext ("","")
7531   ;
7532   return 0;
7533 }
7534 _ACEOF
7535 rm -f conftest.$ac_objext conftest$ac_exeext
7536 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7537   (eval $ac_link) 2>&5
7538   ac_status=$?
7539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7540   (exit $ac_status); } &&
7541          { ac_try='test -s conftest$ac_exeext'
7542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7543   (eval $ac_try) 2>&5
7544   ac_status=$?
7545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546   (exit $ac_status); }; }; then
7547   gt_cv_func_dgettext_libc=yes
7548 else
7549   echo "$as_me: failed program was:" >&5
7550 cat conftest.$ac_ext >&5
7551 gt_cv_func_dgettext_libc=no
7552 fi
7553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7554 fi
7555 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
7556 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
7557
7558           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7559             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
7560 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7561 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7562   echo $ECHO_N "(cached) $ECHO_C" >&6
7563 else
7564   ac_check_lib_save_LIBS=$LIBS
7565 LIBS="-lintl  $LIBS"
7566 cat >conftest.$ac_ext <<_ACEOF
7567 #line $LINENO "configure"
7568 #include "confdefs.h"
7569
7570 /* Override any gcc2 internal prototype to avoid an error.  */
7571 #ifdef __cplusplus
7572 extern "C"
7573 #endif
7574 /* We use char because int might match the return type of a gcc2
7575    builtin and then its argument prototype would still apply.  */
7576 char bindtextdomain ();
7577 #ifdef F77_DUMMY_MAIN
7578 #  ifdef __cplusplus
7579      extern "C"
7580 #  endif
7581    int F77_DUMMY_MAIN() { return 1; }
7582 #endif
7583 int
7584 main ()
7585 {
7586 bindtextdomain ();
7587   ;
7588   return 0;
7589 }
7590 _ACEOF
7591 rm -f conftest.$ac_objext conftest$ac_exeext
7592 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7593   (eval $ac_link) 2>&5
7594   ac_status=$?
7595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7596   (exit $ac_status); } &&
7597          { ac_try='test -s conftest$ac_exeext'
7598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7599   (eval $ac_try) 2>&5
7600   ac_status=$?
7601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7602   (exit $ac_status); }; }; then
7603   ac_cv_lib_intl_bindtextdomain=yes
7604 else
7605   echo "$as_me: failed program was:" >&5
7606 cat conftest.$ac_ext >&5
7607 ac_cv_lib_intl_bindtextdomain=no
7608 fi
7609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7610 LIBS=$ac_check_lib_save_LIBS
7611 fi
7612 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
7613 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
7614 if test $ac_cv_lib_intl_bindtextdomain = yes; then
7615   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
7616 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
7617 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
7618   echo $ECHO_N "(cached) $ECHO_C" >&6
7619 else
7620   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
7621 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
7622 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
7623   echo $ECHO_N "(cached) $ECHO_C" >&6
7624 else
7625   ac_check_lib_save_LIBS=$LIBS
7626 LIBS="-lintl  $LIBS"
7627 cat >conftest.$ac_ext <<_ACEOF
7628 #line $LINENO "configure"
7629 #include "confdefs.h"
7630
7631 /* Override any gcc2 internal prototype to avoid an error.  */
7632 #ifdef __cplusplus
7633 extern "C"
7634 #endif
7635 /* We use char because int might match the return type of a gcc2
7636    builtin and then its argument prototype would still apply.  */
7637 char dgettext ();
7638 #ifdef F77_DUMMY_MAIN
7639 #  ifdef __cplusplus
7640      extern "C"
7641 #  endif
7642    int F77_DUMMY_MAIN() { return 1; }
7643 #endif
7644 int
7645 main ()
7646 {
7647 dgettext ();
7648   ;
7649   return 0;
7650 }
7651 _ACEOF
7652 rm -f conftest.$ac_objext conftest$ac_exeext
7653 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7654   (eval $ac_link) 2>&5
7655   ac_status=$?
7656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7657   (exit $ac_status); } &&
7658          { ac_try='test -s conftest$ac_exeext'
7659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7660   (eval $ac_try) 2>&5
7661   ac_status=$?
7662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7663   (exit $ac_status); }; }; then
7664   ac_cv_lib_intl_dgettext=yes
7665 else
7666   echo "$as_me: failed program was:" >&5
7667 cat conftest.$ac_ext >&5
7668 ac_cv_lib_intl_dgettext=no
7669 fi
7670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7671 LIBS=$ac_check_lib_save_LIBS
7672 fi
7673 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
7674 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
7675 if test $ac_cv_lib_intl_dgettext = yes; then
7676   gt_cv_func_dgettext_libintl=yes
7677 else
7678   gt_cv_func_dgettext_libintl=no
7679 fi
7680
7681 fi
7682 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
7683 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
7684 fi
7685
7686           fi
7687
7688           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7689             LIBS="$LIBS -lintl";
7690           fi
7691
7692           if test "$gt_cv_func_dgettext_libc" = "yes" \
7693             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7694
7695 cat >>confdefs.h <<\_ACEOF
7696 #define HAVE_GETTEXT 1
7697 _ACEOF
7698
7699             # Extract the first word of "msgfmt", so it can be a program name with args.
7700 set dummy msgfmt; ac_word=$2
7701 echo "$as_me:$LINENO: checking for $ac_word" >&5
7702 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7703 if test "${ac_cv_path_MSGFMT+set}" = set; then
7704   echo $ECHO_N "(cached) $ECHO_C" >&6
7705 else
7706   case "$MSGFMT" in
7707   /*)
7708   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7709   ;;
7710   *)
7711   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7712   for ac_dir in $PATH; do
7713     test -z "$ac_dir" && ac_dir=.
7714     if test -f $ac_dir/$ac_word; then
7715       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7716         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7717         break
7718       fi
7719     fi
7720   done
7721   IFS="$ac_save_ifs"
7722   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7723   ;;
7724 esac
7725 fi
7726 MSGFMT="$ac_cv_path_MSGFMT"
7727 if test -n "$MSGFMT"; then
7728   echo "$as_me:$LINENO: result: $MSGFMT" >&5
7729 echo "${ECHO_T}$MSGFMT" >&6
7730 else
7731   echo "$as_me:$LINENO: result: no" >&5
7732 echo "${ECHO_T}no" >&6
7733 fi
7734             if test "$MSGFMT" != "no"; then
7735
7736 for ac_func in dcgettext
7737 do
7738 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7739 echo "$as_me:$LINENO: checking for $ac_func" >&5
7740 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7741 if eval "test \"\${$as_ac_var+set}\" = set"; then
7742   echo $ECHO_N "(cached) $ECHO_C" >&6
7743 else
7744   cat >conftest.$ac_ext <<_ACEOF
7745 #line $LINENO "configure"
7746 #include "confdefs.h"
7747 /* System header to define __stub macros and hopefully few prototypes,
7748     which can conflict with char $ac_func (); below.  */
7749 #include <assert.h>
7750 /* Override any gcc2 internal prototype to avoid an error.  */
7751 #ifdef __cplusplus
7752 extern "C"
7753 #endif
7754 /* We use char because int might match the return type of a gcc2
7755    builtin and then its argument prototype would still apply.  */
7756 char $ac_func ();
7757 char (*f) ();
7758
7759 #ifdef F77_DUMMY_MAIN
7760 #  ifdef __cplusplus
7761      extern "C"
7762 #  endif
7763    int F77_DUMMY_MAIN() { return 1; }
7764 #endif
7765 int
7766 main ()
7767 {
7768 /* The GNU C library defines this for functions which it implements
7769     to always fail with ENOSYS.  Some functions are actually named
7770     something starting with __ and the normal name is an alias.  */
7771 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7772 choke me
7773 #else
7774 f = $ac_func;
7775 #endif
7776
7777   ;
7778   return 0;
7779 }
7780 _ACEOF
7781 rm -f conftest.$ac_objext conftest$ac_exeext
7782 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7783   (eval $ac_link) 2>&5
7784   ac_status=$?
7785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7786   (exit $ac_status); } &&
7787          { ac_try='test -s conftest$ac_exeext'
7788   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7789   (eval $ac_try) 2>&5
7790   ac_status=$?
7791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7792   (exit $ac_status); }; }; then
7793   eval "$as_ac_var=yes"
7794 else
7795   echo "$as_me: failed program was:" >&5
7796 cat conftest.$ac_ext >&5
7797 eval "$as_ac_var=no"
7798 fi
7799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7800 fi
7801 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7802 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7803 if test `eval echo '${'$as_ac_var'}'` = yes; then
7804   cat >>confdefs.h <<_ACEOF
7805 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7806 _ACEOF
7807
7808 fi
7809 done
7810
7811               # Extract the first word of "gmsgfmt", so it can be a program name with args.
7812 set dummy gmsgfmt; ac_word=$2
7813 echo "$as_me:$LINENO: checking for $ac_word" >&5
7814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7815 if test "${ac_cv_path_GMSGFMT+set}" = set; then
7816   echo $ECHO_N "(cached) $ECHO_C" >&6
7817 else
7818   case $GMSGFMT in
7819   [\\/]* | ?:[\\/]*)
7820   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7821   ;;
7822   *)
7823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7824 for as_dir in $PATH
7825 do
7826   IFS=$as_save_IFS
7827   test -z "$as_dir" && as_dir=.
7828   for ac_exec_ext in '' $ac_executable_extensions; do
7829   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7830     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7831     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7832     break 2
7833   fi
7834 done
7835 done
7836
7837   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7838   ;;
7839 esac
7840 fi
7841 GMSGFMT=$ac_cv_path_GMSGFMT
7842
7843 if test -n "$GMSGFMT"; then
7844   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
7845 echo "${ECHO_T}$GMSGFMT" >&6
7846 else
7847   echo "$as_me:$LINENO: result: no" >&5
7848 echo "${ECHO_T}no" >&6
7849 fi
7850
7851               # Extract the first word of "xgettext", so it can be a program name with args.
7852 set dummy xgettext; ac_word=$2
7853 echo "$as_me:$LINENO: checking for $ac_word" >&5
7854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7855 if test "${ac_cv_path_XGETTEXT+set}" = set; then
7856   echo $ECHO_N "(cached) $ECHO_C" >&6
7857 else
7858   case "$XGETTEXT" in
7859   /*)
7860   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7861   ;;
7862   *)
7863   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7864   for ac_dir in $PATH; do
7865     test -z "$ac_dir" && ac_dir=.
7866     if test -f $ac_dir/$ac_word; then
7867       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7868         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7869         break
7870       fi
7871     fi
7872   done
7873   IFS="$ac_save_ifs"
7874   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7875   ;;
7876 esac
7877 fi
7878 XGETTEXT="$ac_cv_path_XGETTEXT"
7879 if test -n "$XGETTEXT"; then
7880   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
7881 echo "${ECHO_T}$XGETTEXT" >&6
7882 else
7883   echo "$as_me:$LINENO: result: no" >&5
7884 echo "${ECHO_T}no" >&6
7885 fi
7886
7887               cat >conftest.$ac_ext <<_ACEOF
7888 #line $LINENO "configure"
7889 #include "confdefs.h"
7890
7891 #ifdef F77_DUMMY_MAIN
7892 #  ifdef __cplusplus
7893      extern "C"
7894 #  endif
7895    int F77_DUMMY_MAIN() { return 1; }
7896 #endif
7897 int
7898 main ()
7899 {
7900 extern int _nl_msg_cat_cntr;
7901                              return _nl_msg_cat_cntr
7902   ;
7903   return 0;
7904 }
7905 _ACEOF
7906 rm -f conftest.$ac_objext conftest$ac_exeext
7907 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7908   (eval $ac_link) 2>&5
7909   ac_status=$?
7910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7911   (exit $ac_status); } &&
7912          { ac_try='test -s conftest$ac_exeext'
7913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7914   (eval $ac_try) 2>&5
7915   ac_status=$?
7916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7917   (exit $ac_status); }; }; then
7918   CATOBJEXT=.gmo
7919                  DATADIRNAME=share
7920 else
7921   echo "$as_me: failed program was:" >&5
7922 cat conftest.$ac_ext >&5
7923 CATOBJEXT=.mo
7924                  DATADIRNAME=lib
7925 fi
7926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7927               INSTOBJEXT=.mo
7928             fi
7929           fi
7930
7931           # Added by Martin Baulig 12/15/98 for libc5 systems
7932           if test "$gt_cv_func_dgettext_libc" != "yes" \
7933             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
7934             INTLLIBS=-lintl
7935             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7936           fi
7937
7938 fi
7939
7940
7941
7942       if test "$CATOBJEXT" = "NONE"; then
7943                         nls_cv_use_gnu_gettext=yes
7944       fi
7945     fi
7946
7947     if test "$nls_cv_use_gnu_gettext" != "yes"; then
7948
7949 cat >>confdefs.h <<\_ACEOF
7950 #define ENABLE_NLS 1
7951 _ACEOF
7952
7953     else
7954             CATOBJEXT=
7955     fi
7956
7957         if test "$XGETTEXT" != ":"; then
7958                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7959         : ;
7960       else
7961         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
7962 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
7963         XGETTEXT=":"
7964       fi
7965     fi
7966
7967     # We need to process the po/ directory.
7968     POSUB=po
7969
7970     ac_config_commands="$ac_config_commands default-2"
7971
7972
7973                 for lang in $ALL_LINGUAS; do
7974       GMOFILES="$GMOFILES $lang.gmo"
7975       POFILES="$POFILES $lang.po"
7976     done
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990    if test "x$CATOBJEXT" != "x"; then
7991      if test "x$ALL_LINGUAS" = "x"; then
7992        LINGUAS=
7993      else
7994        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
7995 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
7996        NEW_LINGUAS=
7997        for lang in ${LINGUAS=$ALL_LINGUAS}; do
7998          case "$ALL_LINGUAS" in
7999           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
8000          esac
8001        done
8002        LINGUAS=$NEW_LINGUAS
8003        echo "$as_me:$LINENO: result: $LINGUAS" >&5
8004 echo "${ECHO_T}$LINGUAS" >&6
8005      fi
8006
8007           if test -n "$LINGUAS"; then
8008        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8009      fi
8010    fi
8011
8012             test -d po || mkdir po
8013    if test "$CATOBJEXT" = ".cat"; then
8014      if test "${ac_cv_header_linux_version_h+set}" = set; then
8015   echo "$as_me:$LINENO: checking for linux/version.h" >&5
8016 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8017 if test "${ac_cv_header_linux_version_h+set}" = set; then
8018   echo $ECHO_N "(cached) $ECHO_C" >&6
8019 fi
8020 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8021 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8022 else
8023   # Is the header compilable?
8024 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
8025 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
8026 cat >conftest.$ac_ext <<_ACEOF
8027 #line $LINENO "configure"
8028 #include "confdefs.h"
8029 $ac_includes_default
8030 #include <linux/version.h>
8031 _ACEOF
8032 rm -f conftest.$ac_objext
8033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8034   (eval $ac_compile) 2>&5
8035   ac_status=$?
8036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8037   (exit $ac_status); } &&
8038          { ac_try='test -s conftest.$ac_objext'
8039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8040   (eval $ac_try) 2>&5
8041   ac_status=$?
8042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8043   (exit $ac_status); }; }; then
8044   ac_header_compiler=yes
8045 else
8046   echo "$as_me: failed program was:" >&5
8047 cat conftest.$ac_ext >&5
8048 ac_header_compiler=no
8049 fi
8050 rm -f conftest.$ac_objext conftest.$ac_ext
8051 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8052 echo "${ECHO_T}$ac_header_compiler" >&6
8053
8054 # Is the header present?
8055 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
8056 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
8057 cat >conftest.$ac_ext <<_ACEOF
8058 #line $LINENO "configure"
8059 #include "confdefs.h"
8060 #include <linux/version.h>
8061 _ACEOF
8062 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8063   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8064   ac_status=$?
8065   egrep -v '^ *\+' conftest.er1 >conftest.err
8066   rm -f conftest.er1
8067   cat conftest.err >&5
8068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8069   (exit $ac_status); } >/dev/null; then
8070   if test -s conftest.err; then
8071     ac_cpp_err=$ac_c_preproc_warn_flag
8072   else
8073     ac_cpp_err=
8074   fi
8075 else
8076   ac_cpp_err=yes
8077 fi
8078 if test -z "$ac_cpp_err"; then
8079   ac_header_preproc=yes
8080 else
8081   echo "$as_me: failed program was:" >&5
8082   cat conftest.$ac_ext >&5
8083   ac_header_preproc=no
8084 fi
8085 rm -f conftest.err conftest.$ac_ext
8086 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8087 echo "${ECHO_T}$ac_header_preproc" >&6
8088
8089 # So?  What about this header?
8090 case $ac_header_compiler:$ac_header_preproc in
8091   yes:no )
8092     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
8093 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8094     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8095 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8096   no:yes )
8097     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
8098 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
8099     { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
8100 echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
8101     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8102 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8103 esac
8104 echo "$as_me:$LINENO: checking for linux/version.h" >&5
8105 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8106 if test "${ac_cv_header_linux_version_h+set}" = set; then
8107   echo $ECHO_N "(cached) $ECHO_C" >&6
8108 else
8109   ac_cv_header_linux_version_h=$ac_header_preproc
8110 fi
8111 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8112 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8113
8114 fi
8115 if test $ac_cv_header_linux_version_h = yes; then
8116   msgformat=linux
8117 else
8118   msgformat=xopen
8119 fi
8120
8121
8122
8123                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
8124    fi
8125
8126             MKINSTALLDIRS=
8127 #
8128 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
8129 #
8130 #   if test -n "$ac_aux_dir"; then
8131 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8132 #   fi
8133    if test -z "$MKINSTALLDIRS"; then
8134      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8135    fi
8136
8137    # jwz: you know what, screw it.  Let's just use the version that I
8138    # already computed in configure.in, instead of this version that came
8139    # with the i18n crud, ok?
8140    MKINSTALLDIRS="$INSTALL_DIRS"
8141
8142
8143
8144
8145          test -d po || mkdir po
8146    if test "x$srcdir" != "x."; then
8147      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8148        posrcprefix="$srcdir/"
8149      else
8150        posrcprefix="../$srcdir/"
8151      fi
8152    else
8153      posrcprefix="../"
8154    fi
8155    rm -f po/POTFILES
8156    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8157         < $srcdir/po/POTFILES.in > po/POTFILES
8158
8159
8160
8161 ###############################################################################
8162 #
8163 #       Check for -lXmu (some fucked up vendors don't ship it...)
8164 #
8165 ###############################################################################
8166
8167 have_xmu=no
8168
8169   ac_save_CPPFLAGS="$CPPFLAGS"
8170   if test \! -z "$includedir" ; then
8171     CPPFLAGS="$CPPFLAGS -I$includedir"
8172   fi
8173   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8174   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
8175 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
8176 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
8177   echo $ECHO_N "(cached) $ECHO_C" >&6
8178 else
8179   cat >conftest.$ac_ext <<_ACEOF
8180 #line $LINENO "configure"
8181 #include "confdefs.h"
8182 #include <stdlib.h>
8183                    #include <stdio.h>
8184                    #include <X11/Intrinsic.h>
8185
8186 #include <X11/Xmu/Error.h>
8187 _ACEOF
8188 rm -f conftest.$ac_objext
8189 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8190   (eval $ac_compile) 2>&5
8191   ac_status=$?
8192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8193   (exit $ac_status); } &&
8194          { ac_try='test -s conftest.$ac_objext'
8195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8196   (eval $ac_try) 2>&5
8197   ac_status=$?
8198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8199   (exit $ac_status); }; }; then
8200   ac_cv_header_X11_Xmu_Error_h=yes
8201 else
8202   echo "$as_me: failed program was:" >&5
8203 cat conftest.$ac_ext >&5
8204 ac_cv_header_X11_Xmu_Error_h=no
8205 fi
8206 rm -f conftest.$ac_objext conftest.$ac_ext
8207 fi
8208 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
8209 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
8210 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
8211   have_xmu=yes
8212 fi
8213
8214
8215   CPPFLAGS="$ac_save_CPPFLAGS"
8216 if test "$have_xmu" = no ; then
8217   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8218   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8219   XMU_LIBS=''
8220 else
8221   XMU_SRCS=''
8222   XMU_OBJS=''
8223   XMU_LIBS='-lXmu'
8224   cat >>confdefs.h <<\_ACEOF
8225 #define HAVE_XMU 1
8226 _ACEOF
8227
8228 fi
8229
8230
8231 ###############################################################################
8232 #
8233 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8234 #       See comp.windows.x FAQ question 124.  The right fix is to
8235 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8236 #
8237 ###############################################################################
8238
8239 if test "$have_xmu" = yes ; then
8240   case "$host" in
8241     *-sunos4*)
8242     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8243 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
8244 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
8245   echo $ECHO_N "(cached) $ECHO_C" >&6
8246 else
8247   ac_save_LDFLAGS="$LDFLAGS"
8248                     if test \! -z "$x_libraries" ; then
8249                       LDFLAGS="$LDFLAGS -L$x_libraries"
8250                     fi
8251                     # Note: this trick never works!  (Generally.)
8252                     # We're only getting away with using AC_TRY_LINK
8253                     # with X libraries because we know it's SunOS.
8254                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8255                     cat >conftest.$ac_ext <<_ACEOF
8256 #line $LINENO "configure"
8257 #include "confdefs.h"
8258
8259 #ifdef F77_DUMMY_MAIN
8260 #  ifdef __cplusplus
8261      extern "C"
8262 #  endif
8263    int F77_DUMMY_MAIN() { return 1; }
8264 #endif
8265 int
8266 main ()
8267 {
8268
8269   ;
8270   return 0;
8271 }
8272 _ACEOF
8273 rm -f conftest.$ac_objext conftest$ac_exeext
8274 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8275   (eval $ac_link) 2>&5
8276   ac_status=$?
8277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8278   (exit $ac_status); } &&
8279          { ac_try='test -s conftest$ac_exeext'
8280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8281   (eval $ac_try) 2>&5
8282   ac_status=$?
8283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8284   (exit $ac_status); }; }; then
8285   ac_cv_sunos_xmu_bug=no
8286 else
8287   echo "$as_me: failed program was:" >&5
8288 cat conftest.$ac_ext >&5
8289 ac_cv_sunos_xmu_bug=yes
8290 fi
8291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8292                     LDFLAGS="$ac_save_LDFLAGS"
8293 fi
8294 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
8295 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
8296     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8297       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
8298 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
8299 if test "${ac_cv_ld_static+set}" = set; then
8300   echo $ECHO_N "(cached) $ECHO_C" >&6
8301 else
8302   ac_save_LDFLAGS="$LDFLAGS"
8303                       LDFLAGS="$LDFLAGS -static"
8304                       cat >conftest.$ac_ext <<_ACEOF
8305 #line $LINENO "configure"
8306 #include "confdefs.h"
8307
8308 #ifdef F77_DUMMY_MAIN
8309 #  ifdef __cplusplus
8310      extern "C"
8311 #  endif
8312    int F77_DUMMY_MAIN() { return 1; }
8313 #endif
8314 int
8315 main ()
8316 {
8317
8318   ;
8319   return 0;
8320 }
8321 _ACEOF
8322 rm -f conftest.$ac_objext conftest$ac_exeext
8323 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8324   (eval $ac_link) 2>&5
8325   ac_status=$?
8326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327   (exit $ac_status); } &&
8328          { ac_try='test -s conftest$ac_exeext'
8329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8330   (eval $ac_try) 2>&5
8331   ac_status=$?
8332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8333   (exit $ac_status); }; }; then
8334   ac_cv_ld_static=yes
8335 else
8336   echo "$as_me: failed program was:" >&5
8337 cat conftest.$ac_ext >&5
8338 ac_cv_ld_static=no
8339 fi
8340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8341                     LDFLAGS="$ac_save_LDFLAGS"
8342 fi
8343 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
8344 echo "${ECHO_T}$ac_cv_ld_static" >&6
8345       if test "$ac_cv_ld_static" = yes ; then
8346         LDFLAGS="$LDFLAGS -static"
8347       else
8348         LDFLAGS="$LDFLAGS -Bstatic"
8349       fi
8350     fi
8351     ;;
8352   esac
8353 fi
8354
8355
8356 ###############################################################################
8357 #
8358 #       Handle the --with-hackdir option
8359 #
8360 ###############################################################################
8361
8362 have_hackdir=yes
8363 with_hackdir_req=unspecified
8364
8365 # Check whether --with-hackdir or --without-hackdir was given.
8366 if test "${with_hackdir+set}" = set; then
8367   withval="$with_hackdir"
8368   with_hackdir="$withval"; with_hackdir_req="$withval"
8369 else
8370   with_hackdir=yes
8371 fi;
8372
8373 if test x"$with_hackdir" = xyes; then
8374   HACKDIR='${exec_prefix}/lib/xscreensaver'
8375 elif test x"$with_hackdir" = xno; then
8376   HACKDIR='${bindir}'
8377 else
8378   # there must be a better way than this...
8379   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
8380     # absolute path
8381     HACKDIR=$with_hackdir
8382   else
8383     # relative path
8384     HACKDIR="\${exec_prefix}$with_hackdir"
8385   fi
8386 fi
8387
8388 # canonicalize slashes.
8389 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8390
8391 # This option used to be called --enable-subdir; make sure that is no longer
8392 # used, since configure brain-damagedly ignores unknown --enable options.
8393
8394 obsolete_enable=
8395 # Check whether --enable-subdir or --disable-subdir was given.
8396 if test "${enable_subdir+set}" = set; then
8397   enableval="$enable_subdir"
8398   obsolete_enable=yes
8399 fi;
8400 if test -n "$obsolete_enable"; then
8401   echo "error: the --enable-subdir option has been replaced with"
8402   echo "       the new --with-hackdir option; see \`configure --help'"
8403   echo "       for more information."
8404   exit 1
8405 fi
8406
8407
8408 ###############################################################################
8409 #
8410 #       Handle the --with-configdir option
8411 #
8412 ###############################################################################
8413
8414 have_configdir=yes
8415 with_configdir_req=unspecified
8416
8417 # Check whether --with-configdir or --without-configdir was given.
8418 if test "${with_configdir+set}" = set; then
8419   withval="$with_configdir"
8420   with_configdir="$withval"; with_configdir_req="$withval"
8421 else
8422   with_configdir=yes
8423 fi;
8424
8425 if test x"$with_configdir" = xyes; then
8426   # filled in later...
8427   HACK_CONF_DIR=''
8428 elif test x"$with_configdir" = xno; then
8429   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8430   exit 1
8431 else
8432   # there must be a better way than this...
8433   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8434     # absolute path
8435     HACK_CONF_DIR=$with_configdir
8436   else
8437     # relative path
8438     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8439   fi
8440 fi
8441
8442
8443
8444
8445 ###############################################################################
8446 #
8447 #       Check for the SGI SCREEN_SAVER server extension.
8448 #
8449 ###############################################################################
8450
8451 have_sgi=no
8452 with_sgi_req=unspecified
8453
8454 # Check whether --with-sgi-ext or --without-sgi-ext was given.
8455 if test "${with_sgi_ext+set}" = set; then
8456   withval="$with_sgi_ext"
8457   with_sgi="$withval"; with_sgi_req="$withval"
8458 else
8459   with_sgi=yes
8460 fi;
8461
8462
8463    case "$with_sgi" in
8464     yes) ;;
8465     no)  ;;
8466
8467     /*)
8468      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
8469 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
8470      d=$with_sgi/include
8471      if test -d $d; then
8472        X_CFLAGS="-I$d $X_CFLAGS"
8473        echo "$as_me:$LINENO: result: $d" >&5
8474 echo "${ECHO_T}$d" >&6
8475      else
8476        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8477 echo "${ECHO_T}not found ($d: no such directory)" >&6
8478      fi
8479
8480      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
8481 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
8482      d=$with_sgi/lib
8483      if test -d $d; then
8484        X_LIBS="-L$d $X_LIBS"
8485        echo "$as_me:$LINENO: result: $d" >&5
8486 echo "${ECHO_T}$d" >&6
8487      else
8488        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8489 echo "${ECHO_T}not found ($d: no such directory)" >&6
8490      fi
8491
8492      # replace the directory string with "yes".
8493      with_sgi_req="yes"
8494      with_sgi=$with_sgi_req
8495      ;;
8496
8497     *)
8498      echo ""
8499      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
8500      echo "       If it is a directory, then \`DIR/include' will be added to"
8501      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8502      exit 1
8503      ;;
8504    esac
8505
8506
8507 if test "$with_sgi" = yes; then
8508
8509   ac_save_CPPFLAGS="$CPPFLAGS"
8510   if test \! -z "$includedir" ; then
8511     CPPFLAGS="$CPPFLAGS -I$includedir"
8512   fi
8513   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8514   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
8515 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
8516 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
8517   echo $ECHO_N "(cached) $ECHO_C" >&6
8518 else
8519   cat >conftest.$ac_ext <<_ACEOF
8520 #line $LINENO "configure"
8521 #include "confdefs.h"
8522 #include <X11/Xlib.h>
8523
8524 #include <X11/extensions/XScreenSaver.h>
8525 _ACEOF
8526 rm -f conftest.$ac_objext
8527 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8528   (eval $ac_compile) 2>&5
8529   ac_status=$?
8530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8531   (exit $ac_status); } &&
8532          { ac_try='test -s conftest.$ac_objext'
8533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8534   (eval $ac_try) 2>&5
8535   ac_status=$?
8536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8537   (exit $ac_status); }; }; then
8538   ac_cv_header_X11_extensions_XScreenSaver_h=yes
8539 else
8540   echo "$as_me: failed program was:" >&5
8541 cat conftest.$ac_ext >&5
8542 ac_cv_header_X11_extensions_XScreenSaver_h=no
8543 fi
8544 rm -f conftest.$ac_objext conftest.$ac_ext
8545 fi
8546 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
8547 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
8548 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
8549   have_sgi=yes
8550                      cat >>confdefs.h <<\_ACEOF
8551 #define HAVE_SGI_SAVER_EXTENSION 1
8552 _ACEOF
8553
8554 fi
8555
8556
8557   CPPFLAGS="$ac_save_CPPFLAGS"
8558
8559 elif test "$with_sgi" != no; then
8560   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8561   exit 1
8562 fi
8563
8564
8565 ###############################################################################
8566 #
8567 #       Check for the MIT-SCREEN-SAVER server extension.
8568 #
8569 ###############################################################################
8570
8571 have_mit=no
8572 with_mit_req=unspecified
8573
8574 # Check whether --with-mit-ext or --without-mit-ext was given.
8575 if test "${with_mit_ext+set}" = set; then
8576   withval="$with_mit_ext"
8577   with_mit="$withval"; with_mit_req="$withval"
8578 else
8579   with_mit=yes
8580 fi;
8581
8582
8583    case "$with_mit" in
8584     yes) ;;
8585     no)  ;;
8586
8587     /*)
8588      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
8589 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
8590      d=$with_mit/include
8591      if test -d $d; then
8592        X_CFLAGS="-I$d $X_CFLAGS"
8593        echo "$as_me:$LINENO: result: $d" >&5
8594 echo "${ECHO_T}$d" >&6
8595      else
8596        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8597 echo "${ECHO_T}not found ($d: no such directory)" >&6
8598      fi
8599
8600      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
8601 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
8602      d=$with_mit/lib
8603      if test -d $d; then
8604        X_LIBS="-L$d $X_LIBS"
8605        echo "$as_me:$LINENO: result: $d" >&5
8606 echo "${ECHO_T}$d" >&6
8607      else
8608        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8609 echo "${ECHO_T}not found ($d: no such directory)" >&6
8610      fi
8611
8612      # replace the directory string with "yes".
8613      with_mit_req="yes"
8614      with_mit=$with_mit_req
8615      ;;
8616
8617     *)
8618      echo ""
8619      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
8620      echo "       If it is a directory, then \`DIR/include' will be added to"
8621      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8622      exit 1
8623      ;;
8624    esac
8625
8626
8627 if test "$with_mit" = yes; then
8628
8629   ac_save_CPPFLAGS="$CPPFLAGS"
8630   if test \! -z "$includedir" ; then
8631     CPPFLAGS="$CPPFLAGS -I$includedir"
8632   fi
8633   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8634   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
8635 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
8636 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
8637   echo $ECHO_N "(cached) $ECHO_C" >&6
8638 else
8639   cat >conftest.$ac_ext <<_ACEOF
8640 #line $LINENO "configure"
8641 #include "confdefs.h"
8642 #include <X11/Xlib.h>
8643
8644 #include <X11/extensions/scrnsaver.h>
8645 _ACEOF
8646 rm -f conftest.$ac_objext
8647 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8648   (eval $ac_compile) 2>&5
8649   ac_status=$?
8650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8651   (exit $ac_status); } &&
8652          { ac_try='test -s conftest.$ac_objext'
8653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8654   (eval $ac_try) 2>&5
8655   ac_status=$?
8656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657   (exit $ac_status); }; }; then
8658   ac_cv_header_X11_extensions_scrnsaver_h=yes
8659 else
8660   echo "$as_me: failed program was:" >&5
8661 cat conftest.$ac_ext >&5
8662 ac_cv_header_X11_extensions_scrnsaver_h=no
8663 fi
8664 rm -f conftest.$ac_objext conftest.$ac_ext
8665 fi
8666 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
8667 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
8668 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
8669   have_mit=yes
8670 fi
8671
8672
8673   CPPFLAGS="$ac_save_CPPFLAGS"
8674
8675   # Now check to see if it's really in the library; XF86Free-3.3 ships
8676   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
8677   #
8678   if test "$have_mit" = yes; then
8679
8680   ac_save_CPPFLAGS="$CPPFLAGS"
8681   ac_save_LDFLAGS="$LDFLAGS"
8682 #  ac_save_LIBS="$LIBS"
8683
8684   if test \! -z "$includedir" ; then
8685     CPPFLAGS="$CPPFLAGS -I$includedir"
8686   fi
8687   # note: $X_CFLAGS includes $x_includes
8688   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8689
8690   if test \! -z "$libdir" ; then
8691     LDFLAGS="$LDFLAGS -L$libdir"
8692   fi
8693   # note: $X_LIBS includes $x_libraries
8694   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8695
8696   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
8697 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
8698 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
8699   echo $ECHO_N "(cached) $ECHO_C" >&6
8700 else
8701   ac_check_lib_save_LIBS=$LIBS
8702 LIBS="-lXext -lm $LIBS"
8703 cat >conftest.$ac_ext <<_ACEOF
8704 #line $LINENO "configure"
8705 #include "confdefs.h"
8706
8707 /* Override any gcc2 internal prototype to avoid an error.  */
8708 #ifdef __cplusplus
8709 extern "C"
8710 #endif
8711 /* We use char because int might match the return type of a gcc2
8712    builtin and then its argument prototype would still apply.  */
8713 char XScreenSaverRegister ();
8714 #ifdef F77_DUMMY_MAIN
8715 #  ifdef __cplusplus
8716      extern "C"
8717 #  endif
8718    int F77_DUMMY_MAIN() { return 1; }
8719 #endif
8720 int
8721 main ()
8722 {
8723 XScreenSaverRegister ();
8724   ;
8725   return 0;
8726 }
8727 _ACEOF
8728 rm -f conftest.$ac_objext conftest$ac_exeext
8729 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8730   (eval $ac_link) 2>&5
8731   ac_status=$?
8732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8733   (exit $ac_status); } &&
8734          { ac_try='test -s conftest$ac_exeext'
8735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8736   (eval $ac_try) 2>&5
8737   ac_status=$?
8738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8739   (exit $ac_status); }; }; then
8740   ac_cv_lib_Xext_XScreenSaverRegister=yes
8741 else
8742   echo "$as_me: failed program was:" >&5
8743 cat conftest.$ac_ext >&5
8744 ac_cv_lib_Xext_XScreenSaverRegister=no
8745 fi
8746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8747 LIBS=$ac_check_lib_save_LIBS
8748 fi
8749 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
8750 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
8751 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
8752   true
8753 else
8754   have_mit=no
8755 fi
8756
8757   CPPFLAGS="$ac_save_CPPFLAGS"
8758   LDFLAGS="$ac_save_LDFLAGS"
8759 #  LIBS="$ac_save_LIBS"
8760
8761
8762     if test "$have_mit" = no; then
8763       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
8764       # of in Xext.  Thank you master, may I have another.
8765
8766   ac_save_CPPFLAGS="$CPPFLAGS"
8767   ac_save_LDFLAGS="$LDFLAGS"
8768 #  ac_save_LIBS="$LIBS"
8769
8770   if test \! -z "$includedir" ; then
8771     CPPFLAGS="$CPPFLAGS -I$includedir"
8772   fi
8773   # note: $X_CFLAGS includes $x_includes
8774   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8775
8776   if test \! -z "$libdir" ; then
8777     LDFLAGS="$LDFLAGS -L$libdir"
8778   fi
8779   # note: $X_LIBS includes $x_libraries
8780   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8781
8782   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
8783 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
8784 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
8785   echo $ECHO_N "(cached) $ECHO_C" >&6
8786 else
8787   ac_check_lib_save_LIBS=$LIBS
8788 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
8789 cat >conftest.$ac_ext <<_ACEOF
8790 #line $LINENO "configure"
8791 #include "confdefs.h"
8792
8793 /* Override any gcc2 internal prototype to avoid an error.  */
8794 #ifdef __cplusplus
8795 extern "C"
8796 #endif
8797 /* We use char because int might match the return type of a gcc2
8798    builtin and then its argument prototype would still apply.  */
8799 char XScreenSaverRegister ();
8800 #ifdef F77_DUMMY_MAIN
8801 #  ifdef __cplusplus
8802      extern "C"
8803 #  endif
8804    int F77_DUMMY_MAIN() { return 1; }
8805 #endif
8806 int
8807 main ()
8808 {
8809 XScreenSaverRegister ();
8810   ;
8811   return 0;
8812 }
8813 _ACEOF
8814 rm -f conftest.$ac_objext conftest$ac_exeext
8815 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8816   (eval $ac_link) 2>&5
8817   ac_status=$?
8818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8819   (exit $ac_status); } &&
8820          { ac_try='test -s conftest$ac_exeext'
8821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8822   (eval $ac_try) 2>&5
8823   ac_status=$?
8824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8825   (exit $ac_status); }; }; then
8826   ac_cv_lib_XExExt_XScreenSaverRegister=yes
8827 else
8828   echo "$as_me: failed program was:" >&5
8829 cat conftest.$ac_ext >&5
8830 ac_cv_lib_XExExt_XScreenSaverRegister=no
8831 fi
8832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8833 LIBS=$ac_check_lib_save_LIBS
8834 fi
8835 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
8836 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
8837 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
8838   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
8839 else
8840   true
8841 fi
8842
8843   CPPFLAGS="$ac_save_CPPFLAGS"
8844   LDFLAGS="$ac_save_LDFLAGS"
8845 #  LIBS="$ac_save_LIBS"
8846
8847     fi
8848
8849     if test "$have_mit" = no; then
8850       # Double fuck!  Looks like some versions of XFree86 (whichever version
8851       # it is that comes with RedHat Linux 2.0 -- I can't find a version
8852       # number) put this garbage in Xss instead of Xext.  Thank you master,
8853       #  may I have another.
8854
8855   ac_save_CPPFLAGS="$CPPFLAGS"
8856   ac_save_LDFLAGS="$LDFLAGS"
8857 #  ac_save_LIBS="$LIBS"
8858
8859   if test \! -z "$includedir" ; then
8860     CPPFLAGS="$CPPFLAGS -I$includedir"
8861   fi
8862   # note: $X_CFLAGS includes $x_includes
8863   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8864
8865   if test \! -z "$libdir" ; then
8866     LDFLAGS="$LDFLAGS -L$libdir"
8867   fi
8868   # note: $X_LIBS includes $x_libraries
8869   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8870
8871   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
8872 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
8873 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
8874   echo $ECHO_N "(cached) $ECHO_C" >&6
8875 else
8876   ac_check_lib_save_LIBS=$LIBS
8877 LIBS="-lXss -lX11 -lXext -lm $LIBS"
8878 cat >conftest.$ac_ext <<_ACEOF
8879 #line $LINENO "configure"
8880 #include "confdefs.h"
8881
8882 /* Override any gcc2 internal prototype to avoid an error.  */
8883 #ifdef __cplusplus
8884 extern "C"
8885 #endif
8886 /* We use char because int might match the return type of a gcc2
8887    builtin and then its argument prototype would still apply.  */
8888 char XScreenSaverRegister ();
8889 #ifdef F77_DUMMY_MAIN
8890 #  ifdef __cplusplus
8891      extern "C"
8892 #  endif
8893    int F77_DUMMY_MAIN() { return 1; }
8894 #endif
8895 int
8896 main ()
8897 {
8898 XScreenSaverRegister ();
8899   ;
8900   return 0;
8901 }
8902 _ACEOF
8903 rm -f conftest.$ac_objext conftest$ac_exeext
8904 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8905   (eval $ac_link) 2>&5
8906   ac_status=$?
8907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8908   (exit $ac_status); } &&
8909          { ac_try='test -s conftest$ac_exeext'
8910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8911   (eval $ac_try) 2>&5
8912   ac_status=$?
8913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8914   (exit $ac_status); }; }; then
8915   ac_cv_lib_Xss_XScreenSaverRegister=yes
8916 else
8917   echo "$as_me: failed program was:" >&5
8918 cat conftest.$ac_ext >&5
8919 ac_cv_lib_Xss_XScreenSaverRegister=no
8920 fi
8921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8922 LIBS=$ac_check_lib_save_LIBS
8923 fi
8924 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
8925 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
8926 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
8927   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
8928 else
8929   true
8930 fi
8931
8932   CPPFLAGS="$ac_save_CPPFLAGS"
8933   LDFLAGS="$ac_save_LDFLAGS"
8934 #  LIBS="$ac_save_LIBS"
8935
8936     fi
8937
8938   if test "$have_mit" = yes; then
8939     cat >>confdefs.h <<\_ACEOF
8940 #define HAVE_MIT_SAVER_EXTENSION 1
8941 _ACEOF
8942
8943   fi
8944
8945   fi
8946
8947 elif test "$with_mit" != no; then
8948   echo "error: must be yes or no: --with-mit-ext=$with_mit"
8949   exit 1
8950 fi
8951
8952
8953 ###############################################################################
8954 #
8955 #       Check for the XIDLE server extension.
8956 #
8957 ###############################################################################
8958
8959 have_xidle=no
8960 with_xidle_req=unspecified
8961
8962 # Check whether --with-xidle-ext or --without-xidle-ext was given.
8963 if test "${with_xidle_ext+set}" = set; then
8964   withval="$with_xidle_ext"
8965   with_xidle="$withval"; with_xidle_req="$withval"
8966 else
8967   with_xidle=yes
8968 fi;
8969
8970
8971    case "$with_xidle" in
8972     yes) ;;
8973     no)  ;;
8974
8975     /*)
8976      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
8977 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
8978      d=$with_xidle/include
8979      if test -d $d; then
8980        X_CFLAGS="-I$d $X_CFLAGS"
8981        echo "$as_me:$LINENO: result: $d" >&5
8982 echo "${ECHO_T}$d" >&6
8983      else
8984        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8985 echo "${ECHO_T}not found ($d: no such directory)" >&6
8986      fi
8987
8988      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
8989 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
8990      d=$with_xidle/lib
8991      if test -d $d; then
8992        X_LIBS="-L$d $X_LIBS"
8993        echo "$as_me:$LINENO: result: $d" >&5
8994 echo "${ECHO_T}$d" >&6
8995      else
8996        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8997 echo "${ECHO_T}not found ($d: no such directory)" >&6
8998      fi
8999
9000      # replace the directory string with "yes".
9001      with_xidle_req="yes"
9002      with_xidle=$with_xidle_req
9003      ;;
9004
9005     *)
9006      echo ""
9007      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
9008      echo "       If it is a directory, then \`DIR/include' will be added to"
9009      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9010      exit 1
9011      ;;
9012    esac
9013
9014
9015 if test "$with_xidle" = yes; then
9016
9017   ac_save_CPPFLAGS="$CPPFLAGS"
9018   if test \! -z "$includedir" ; then
9019     CPPFLAGS="$CPPFLAGS -I$includedir"
9020   fi
9021   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9022   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
9023 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
9024 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
9025   echo $ECHO_N "(cached) $ECHO_C" >&6
9026 else
9027   cat >conftest.$ac_ext <<_ACEOF
9028 #line $LINENO "configure"
9029 #include "confdefs.h"
9030 #include <X11/Xlib.h>
9031
9032 #include <X11/extensions/xidle.h>
9033 _ACEOF
9034 rm -f conftest.$ac_objext
9035 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9036   (eval $ac_compile) 2>&5
9037   ac_status=$?
9038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039   (exit $ac_status); } &&
9040          { ac_try='test -s conftest.$ac_objext'
9041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9042   (eval $ac_try) 2>&5
9043   ac_status=$?
9044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9045   (exit $ac_status); }; }; then
9046   ac_cv_header_X11_extensions_xidle_h=yes
9047 else
9048   echo "$as_me: failed program was:" >&5
9049 cat conftest.$ac_ext >&5
9050 ac_cv_header_X11_extensions_xidle_h=no
9051 fi
9052 rm -f conftest.$ac_objext conftest.$ac_ext
9053 fi
9054 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9055 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9056 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9057   have_xidle=yes
9058                      cat >>confdefs.h <<\_ACEOF
9059 #define HAVE_XIDLE_EXTENSION 1
9060 _ACEOF
9061
9062 fi
9063
9064
9065   CPPFLAGS="$ac_save_CPPFLAGS"
9066 elif test "$with_xidle" != no; then
9067   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9068   exit 1
9069 fi
9070
9071
9072 ###############################################################################
9073 #
9074 #       Check for the SGI-VIDEO-CONTROL server extension.
9075 #
9076 ###############################################################################
9077
9078 have_sgivc=no
9079 with_sgivc_req=unspecified
9080
9081 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9082 if test "${with_sgivc_ext+set}" = set; then
9083   withval="$with_sgivc_ext"
9084   with_sgivc="$withval"; with_sgivc_req="$withval"
9085 else
9086   with_sgivc=yes
9087 fi;
9088
9089
9090    case "$with_sgivc" in
9091     yes) ;;
9092     no)  ;;
9093
9094     /*)
9095      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9096 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9097      d=$with_sgivc/include
9098      if test -d $d; then
9099        X_CFLAGS="-I$d $X_CFLAGS"
9100        echo "$as_me:$LINENO: result: $d" >&5
9101 echo "${ECHO_T}$d" >&6
9102      else
9103        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9104 echo "${ECHO_T}not found ($d: no such directory)" >&6
9105      fi
9106
9107      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9108 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9109      d=$with_sgivc/lib
9110      if test -d $d; then
9111        X_LIBS="-L$d $X_LIBS"
9112        echo "$as_me:$LINENO: result: $d" >&5
9113 echo "${ECHO_T}$d" >&6
9114      else
9115        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9116 echo "${ECHO_T}not found ($d: no such directory)" >&6
9117      fi
9118
9119      # replace the directory string with "yes".
9120      with_sgivc_req="yes"
9121      with_sgivc=$with_sgivc_req
9122      ;;
9123
9124     *)
9125      echo ""
9126      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9127      echo "       If it is a directory, then \`DIR/include' will be added to"
9128      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9129      exit 1
9130      ;;
9131    esac
9132
9133
9134 if test "$with_sgivc" = yes; then
9135
9136   # first check for XSGIvc.h
9137
9138   ac_save_CPPFLAGS="$CPPFLAGS"
9139   if test \! -z "$includedir" ; then
9140     CPPFLAGS="$CPPFLAGS -I$includedir"
9141   fi
9142   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9143   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9144 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9145 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9146   echo $ECHO_N "(cached) $ECHO_C" >&6
9147 else
9148   cat >conftest.$ac_ext <<_ACEOF
9149 #line $LINENO "configure"
9150 #include "confdefs.h"
9151 #include <X11/Xlib.h>
9152
9153 #include <X11/extensions/XSGIvc.h>
9154 _ACEOF
9155 rm -f conftest.$ac_objext
9156 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9157   (eval $ac_compile) 2>&5
9158   ac_status=$?
9159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9160   (exit $ac_status); } &&
9161          { ac_try='test -s conftest.$ac_objext'
9162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9163   (eval $ac_try) 2>&5
9164   ac_status=$?
9165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9166   (exit $ac_status); }; }; then
9167   ac_cv_header_X11_extensions_XSGIvc_h=yes
9168 else
9169   echo "$as_me: failed program was:" >&5
9170 cat conftest.$ac_ext >&5
9171 ac_cv_header_X11_extensions_XSGIvc_h=no
9172 fi
9173 rm -f conftest.$ac_objext conftest.$ac_ext
9174 fi
9175 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9176 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9177 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
9178   have_sgivc=yes
9179 fi
9180
9181
9182   CPPFLAGS="$ac_save_CPPFLAGS"
9183
9184   # if that succeeded, then check for the -lXsgivc
9185   if test "$have_sgivc" = yes; then
9186     have_sgivc=no
9187
9188   ac_save_CPPFLAGS="$CPPFLAGS"
9189   ac_save_LDFLAGS="$LDFLAGS"
9190 #  ac_save_LIBS="$LIBS"
9191
9192   if test \! -z "$includedir" ; then
9193     CPPFLAGS="$CPPFLAGS -I$includedir"
9194   fi
9195   # note: $X_CFLAGS includes $x_includes
9196   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9197
9198   if test \! -z "$libdir" ; then
9199     LDFLAGS="$LDFLAGS -L$libdir"
9200   fi
9201   # note: $X_LIBS includes $x_libraries
9202   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9203
9204   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
9205 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
9206 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
9207   echo $ECHO_N "(cached) $ECHO_C" >&6
9208 else
9209   ac_check_lib_save_LIBS=$LIBS
9210 LIBS="-lXsgivc -lXext -lX11 $LIBS"
9211 cat >conftest.$ac_ext <<_ACEOF
9212 #line $LINENO "configure"
9213 #include "confdefs.h"
9214
9215 /* Override any gcc2 internal prototype to avoid an error.  */
9216 #ifdef __cplusplus
9217 extern "C"
9218 #endif
9219 /* We use char because int might match the return type of a gcc2
9220    builtin and then its argument prototype would still apply.  */
9221 char XSGIvcQueryGammaMap ();
9222 #ifdef F77_DUMMY_MAIN
9223 #  ifdef __cplusplus
9224      extern "C"
9225 #  endif
9226    int F77_DUMMY_MAIN() { return 1; }
9227 #endif
9228 int
9229 main ()
9230 {
9231 XSGIvcQueryGammaMap ();
9232   ;
9233   return 0;
9234 }
9235 _ACEOF
9236 rm -f conftest.$ac_objext conftest$ac_exeext
9237 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9238   (eval $ac_link) 2>&5
9239   ac_status=$?
9240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241   (exit $ac_status); } &&
9242          { ac_try='test -s conftest$ac_exeext'
9243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9244   (eval $ac_try) 2>&5
9245   ac_status=$?
9246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9247   (exit $ac_status); }; }; then
9248   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
9249 else
9250   echo "$as_me: failed program was:" >&5
9251 cat conftest.$ac_ext >&5
9252 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
9253 fi
9254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9255 LIBS=$ac_check_lib_save_LIBS
9256 fi
9257 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
9258 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
9259 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
9260   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
9261 else
9262   true
9263 fi
9264
9265   CPPFLAGS="$ac_save_CPPFLAGS"
9266   LDFLAGS="$ac_save_LDFLAGS"
9267 #  LIBS="$ac_save_LIBS"
9268
9269   fi
9270
9271   # if that succeeded, then we've really got it.
9272   if test "$have_sgivc" = yes; then
9273     cat >>confdefs.h <<\_ACEOF
9274 #define HAVE_SGI_VC_EXTENSION 1
9275 _ACEOF
9276
9277   fi
9278
9279 elif test "$with_sgivc" != no; then
9280   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
9281   exit 1
9282 fi
9283
9284
9285 ###############################################################################
9286 #
9287 #       Check for the DPMS server extension.
9288 #
9289 ###############################################################################
9290
9291 have_dpms=no
9292 with_dpms_req=unspecified
9293
9294 # Check whether --with-dpms-ext or --without-dpms-ext was given.
9295 if test "${with_dpms_ext+set}" = set; then
9296   withval="$with_dpms_ext"
9297   with_dpms="$withval"; with_dpms_req="$withval"
9298 else
9299   with_dpms=yes
9300 fi;
9301
9302
9303    case "$with_dpms" in
9304     yes) ;;
9305     no)  ;;
9306
9307     /*)
9308      echo "$as_me:$LINENO: checking for DPMS headers" >&5
9309 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
9310      d=$with_dpms/include
9311      if test -d $d; then
9312        X_CFLAGS="-I$d $X_CFLAGS"
9313        echo "$as_me:$LINENO: result: $d" >&5
9314 echo "${ECHO_T}$d" >&6
9315      else
9316        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9317 echo "${ECHO_T}not found ($d: no such directory)" >&6
9318      fi
9319
9320      echo "$as_me:$LINENO: checking for DPMS libs" >&5
9321 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
9322      d=$with_dpms/lib
9323      if test -d $d; then
9324        X_LIBS="-L$d $X_LIBS"
9325        echo "$as_me:$LINENO: result: $d" >&5
9326 echo "${ECHO_T}$d" >&6
9327      else
9328        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9329 echo "${ECHO_T}not found ($d: no such directory)" >&6
9330      fi
9331
9332      # replace the directory string with "yes".
9333      with_dpms_req="yes"
9334      with_dpms=$with_dpms_req
9335      ;;
9336
9337     *)
9338      echo ""
9339      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
9340      echo "       If it is a directory, then \`DIR/include' will be added to"
9341      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9342      exit 1
9343      ;;
9344    esac
9345
9346
9347 if test "$with_dpms" = yes; then
9348
9349   # first check for dpms.h
9350
9351   ac_save_CPPFLAGS="$CPPFLAGS"
9352   if test \! -z "$includedir" ; then
9353     CPPFLAGS="$CPPFLAGS -I$includedir"
9354   fi
9355   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9356   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
9357 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
9358 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
9359   echo $ECHO_N "(cached) $ECHO_C" >&6
9360 else
9361   cat >conftest.$ac_ext <<_ACEOF
9362 #line $LINENO "configure"
9363 #include "confdefs.h"
9364 #include <X11/Xlib.h>
9365
9366 #include <X11/extensions/dpms.h>
9367 _ACEOF
9368 rm -f conftest.$ac_objext
9369 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9370   (eval $ac_compile) 2>&5
9371   ac_status=$?
9372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9373   (exit $ac_status); } &&
9374          { ac_try='test -s conftest.$ac_objext'
9375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9376   (eval $ac_try) 2>&5
9377   ac_status=$?
9378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9379   (exit $ac_status); }; }; then
9380   ac_cv_header_X11_extensions_dpms_h=yes
9381 else
9382   echo "$as_me: failed program was:" >&5
9383 cat conftest.$ac_ext >&5
9384 ac_cv_header_X11_extensions_dpms_h=no
9385 fi
9386 rm -f conftest.$ac_objext conftest.$ac_ext
9387 fi
9388 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
9389 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
9390 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
9391   have_dpms=yes
9392 fi
9393
9394
9395   CPPFLAGS="$ac_save_CPPFLAGS"
9396
9397   # if that succeeded, then check for the DPMS code in the libraries
9398   if test "$have_dpms" = yes; then
9399
9400     # first look in -lXext (this is where it is with XFree86 4.0)
9401     have_dpms=no
9402
9403   ac_save_CPPFLAGS="$CPPFLAGS"
9404   ac_save_LDFLAGS="$LDFLAGS"
9405 #  ac_save_LIBS="$LIBS"
9406
9407   if test \! -z "$includedir" ; then
9408     CPPFLAGS="$CPPFLAGS -I$includedir"
9409   fi
9410   # note: $X_CFLAGS includes $x_includes
9411   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9412
9413   if test \! -z "$libdir" ; then
9414     LDFLAGS="$LDFLAGS -L$libdir"
9415   fi
9416   # note: $X_LIBS includes $x_libraries
9417   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9418
9419   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
9420 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
9421 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
9422   echo $ECHO_N "(cached) $ECHO_C" >&6
9423 else
9424   ac_check_lib_save_LIBS=$LIBS
9425 LIBS="-lXext -lXext -lX11 $LIBS"
9426 cat >conftest.$ac_ext <<_ACEOF
9427 #line $LINENO "configure"
9428 #include "confdefs.h"
9429
9430 /* Override any gcc2 internal prototype to avoid an error.  */
9431 #ifdef __cplusplus
9432 extern "C"
9433 #endif
9434 /* We use char because int might match the return type of a gcc2
9435    builtin and then its argument prototype would still apply.  */
9436 char DPMSInfo ();
9437 #ifdef F77_DUMMY_MAIN
9438 #  ifdef __cplusplus
9439      extern "C"
9440 #  endif
9441    int F77_DUMMY_MAIN() { return 1; }
9442 #endif
9443 int
9444 main ()
9445 {
9446 DPMSInfo ();
9447   ;
9448   return 0;
9449 }
9450 _ACEOF
9451 rm -f conftest.$ac_objext conftest$ac_exeext
9452 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9453   (eval $ac_link) 2>&5
9454   ac_status=$?
9455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9456   (exit $ac_status); } &&
9457          { ac_try='test -s conftest$ac_exeext'
9458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9459   (eval $ac_try) 2>&5
9460   ac_status=$?
9461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9462   (exit $ac_status); }; }; then
9463   ac_cv_lib_Xext_DPMSInfo=yes
9464 else
9465   echo "$as_me: failed program was:" >&5
9466 cat conftest.$ac_ext >&5
9467 ac_cv_lib_Xext_DPMSInfo=no
9468 fi
9469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9470 LIBS=$ac_check_lib_save_LIBS
9471 fi
9472 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
9473 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
9474 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
9475   have_dpms=yes
9476 else
9477   true
9478 fi
9479
9480   CPPFLAGS="$ac_save_CPPFLAGS"
9481   LDFLAGS="$ac_save_LDFLAGS"
9482 #  LIBS="$ac_save_LIBS"
9483
9484
9485     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
9486     if test "$have_dpms" = no; then
9487
9488   ac_save_CPPFLAGS="$CPPFLAGS"
9489   ac_save_LDFLAGS="$LDFLAGS"
9490 #  ac_save_LIBS="$LIBS"
9491
9492   if test \! -z "$includedir" ; then
9493     CPPFLAGS="$CPPFLAGS -I$includedir"
9494   fi
9495   # note: $X_CFLAGS includes $x_includes
9496   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9497
9498   if test \! -z "$libdir" ; then
9499     LDFLAGS="$LDFLAGS -L$libdir"
9500   fi
9501   # note: $X_LIBS includes $x_libraries
9502   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9503
9504   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
9505 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
9506 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
9507   echo $ECHO_N "(cached) $ECHO_C" >&6
9508 else
9509   ac_check_lib_save_LIBS=$LIBS
9510 LIBS="-lXdpms -lXext -lX11 $LIBS"
9511 cat >conftest.$ac_ext <<_ACEOF
9512 #line $LINENO "configure"
9513 #include "confdefs.h"
9514
9515 /* Override any gcc2 internal prototype to avoid an error.  */
9516 #ifdef __cplusplus
9517 extern "C"
9518 #endif
9519 /* We use char because int might match the return type of a gcc2
9520    builtin and then its argument prototype would still apply.  */
9521 char DPMSInfo ();
9522 #ifdef F77_DUMMY_MAIN
9523 #  ifdef __cplusplus
9524      extern "C"
9525 #  endif
9526    int F77_DUMMY_MAIN() { return 1; }
9527 #endif
9528 int
9529 main ()
9530 {
9531 DPMSInfo ();
9532   ;
9533   return 0;
9534 }
9535 _ACEOF
9536 rm -f conftest.$ac_objext conftest$ac_exeext
9537 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9538   (eval $ac_link) 2>&5
9539   ac_status=$?
9540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9541   (exit $ac_status); } &&
9542          { ac_try='test -s conftest$ac_exeext'
9543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9544   (eval $ac_try) 2>&5
9545   ac_status=$?
9546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547   (exit $ac_status); }; }; then
9548   ac_cv_lib_Xdpms_DPMSInfo=yes
9549 else
9550   echo "$as_me: failed program was:" >&5
9551 cat conftest.$ac_ext >&5
9552 ac_cv_lib_Xdpms_DPMSInfo=no
9553 fi
9554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9555 LIBS=$ac_check_lib_save_LIBS
9556 fi
9557 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
9558 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
9559 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
9560   have_dpms=yes; XDPMS_LIBS="-lXdpms"
9561 else
9562   true
9563 fi
9564
9565   CPPFLAGS="$ac_save_CPPFLAGS"
9566   LDFLAGS="$ac_save_LDFLAGS"
9567 #  LIBS="$ac_save_LIBS"
9568
9569     fi
9570   fi
9571
9572
9573   # if that succeeded, then we've really got it.
9574   if test "$have_dpms" = yes; then
9575     cat >>confdefs.h <<\_ACEOF
9576 #define HAVE_DPMS_EXTENSION 1
9577 _ACEOF
9578
9579   fi
9580
9581 elif test "$with_dpms" != no; then
9582   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
9583   exit 1
9584 fi
9585
9586
9587 ###############################################################################
9588 #
9589 #       Check for the XINERAMA server extension.
9590 #
9591 ###############################################################################
9592
9593 have_xinerama=no
9594 with_xinerama_req=unspecified
9595
9596 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
9597 if test "${with_xinerama_ext+set}" = set; then
9598   withval="$with_xinerama_ext"
9599   with_xinerama="$withval"; with_xinerama_req="$withval"
9600 else
9601   with_xinerama=yes
9602 fi;
9603
9604
9605    case "$with_xinerama" in
9606     yes) ;;
9607     no)  ;;
9608
9609     /*)
9610      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
9611 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
9612      d=$with_xinerama/include
9613      if test -d $d; then
9614        X_CFLAGS="-I$d $X_CFLAGS"
9615        echo "$as_me:$LINENO: result: $d" >&5
9616 echo "${ECHO_T}$d" >&6
9617      else
9618        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9619 echo "${ECHO_T}not found ($d: no such directory)" >&6
9620      fi
9621
9622      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
9623 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
9624      d=$with_xinerama/lib
9625      if test -d $d; then
9626        X_LIBS="-L$d $X_LIBS"
9627        echo "$as_me:$LINENO: result: $d" >&5
9628 echo "${ECHO_T}$d" >&6
9629      else
9630        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9631 echo "${ECHO_T}not found ($d: no such directory)" >&6
9632      fi
9633
9634      # replace the directory string with "yes".
9635      with_xinerama_req="yes"
9636      with_xinerama=$with_xinerama_req
9637      ;;
9638
9639     *)
9640      echo ""
9641      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
9642      echo "       If it is a directory, then \`DIR/include' will be added to"
9643      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9644      exit 1
9645      ;;
9646    esac
9647
9648
9649 if test "$with_xinerama" = yes; then
9650
9651   # first check for Xinerama.h
9652
9653   ac_save_CPPFLAGS="$CPPFLAGS"
9654   if test \! -z "$includedir" ; then
9655     CPPFLAGS="$CPPFLAGS -I$includedir"
9656   fi
9657   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9658   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
9659 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
9660 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
9661   echo $ECHO_N "(cached) $ECHO_C" >&6
9662 else
9663   cat >conftest.$ac_ext <<_ACEOF
9664 #line $LINENO "configure"
9665 #include "confdefs.h"
9666 #include <X11/Xlib.h>
9667
9668 #include <X11/extensions/Xinerama.h>
9669 _ACEOF
9670 rm -f conftest.$ac_objext
9671 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9672   (eval $ac_compile) 2>&5
9673   ac_status=$?
9674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9675   (exit $ac_status); } &&
9676          { ac_try='test -s conftest.$ac_objext'
9677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9678   (eval $ac_try) 2>&5
9679   ac_status=$?
9680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9681   (exit $ac_status); }; }; then
9682   ac_cv_header_X11_extensions_Xinerama_h=yes
9683 else
9684   echo "$as_me: failed program was:" >&5
9685 cat conftest.$ac_ext >&5
9686 ac_cv_header_X11_extensions_Xinerama_h=no
9687 fi
9688 rm -f conftest.$ac_objext conftest.$ac_ext
9689 fi
9690 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
9691 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
9692 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
9693   have_xinerama=yes
9694 fi
9695
9696
9697   CPPFLAGS="$ac_save_CPPFLAGS"
9698
9699   # if that succeeded, then check for the XINERAMA code in the libraries
9700   if test "$have_xinerama" = yes; then
9701
9702     # first look in -lXext
9703     have_xinerama=no
9704
9705   ac_save_CPPFLAGS="$CPPFLAGS"
9706   ac_save_LDFLAGS="$LDFLAGS"
9707 #  ac_save_LIBS="$LIBS"
9708
9709   if test \! -z "$includedir" ; then
9710     CPPFLAGS="$CPPFLAGS -I$includedir"
9711   fi
9712   # note: $X_CFLAGS includes $x_includes
9713   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9714
9715   if test \! -z "$libdir" ; then
9716     LDFLAGS="$LDFLAGS -L$libdir"
9717   fi
9718   # note: $X_LIBS includes $x_libraries
9719   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9720
9721   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXext" >&5
9722 echo $ECHO_N "checking for XineramaQueryExtension in -lXext... $ECHO_C" >&6
9723 if test "${ac_cv_lib_Xext_XineramaQueryExtension+set}" = set; then
9724   echo $ECHO_N "(cached) $ECHO_C" >&6
9725 else
9726   ac_check_lib_save_LIBS=$LIBS
9727 LIBS="-lXext -lXext -lX11 $LIBS"
9728 cat >conftest.$ac_ext <<_ACEOF
9729 #line $LINENO "configure"
9730 #include "confdefs.h"
9731
9732 /* Override any gcc2 internal prototype to avoid an error.  */
9733 #ifdef __cplusplus
9734 extern "C"
9735 #endif
9736 /* We use char because int might match the return type of a gcc2
9737    builtin and then its argument prototype would still apply.  */
9738 char XineramaQueryExtension ();
9739 #ifdef F77_DUMMY_MAIN
9740 #  ifdef __cplusplus
9741      extern "C"
9742 #  endif
9743    int F77_DUMMY_MAIN() { return 1; }
9744 #endif
9745 int
9746 main ()
9747 {
9748 XineramaQueryExtension ();
9749   ;
9750   return 0;
9751 }
9752 _ACEOF
9753 rm -f conftest.$ac_objext conftest$ac_exeext
9754 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9755   (eval $ac_link) 2>&5
9756   ac_status=$?
9757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9758   (exit $ac_status); } &&
9759          { ac_try='test -s conftest$ac_exeext'
9760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9761   (eval $ac_try) 2>&5
9762   ac_status=$?
9763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9764   (exit $ac_status); }; }; then
9765   ac_cv_lib_Xext_XineramaQueryExtension=yes
9766 else
9767   echo "$as_me: failed program was:" >&5
9768 cat conftest.$ac_ext >&5
9769 ac_cv_lib_Xext_XineramaQueryExtension=no
9770 fi
9771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9772 LIBS=$ac_check_lib_save_LIBS
9773 fi
9774 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryExtension" >&5
9775 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryExtension" >&6
9776 if test $ac_cv_lib_Xext_XineramaQueryExtension = yes; then
9777   have_xinerama=yes
9778 else
9779   true
9780 fi
9781
9782   CPPFLAGS="$ac_save_CPPFLAGS"
9783   LDFLAGS="$ac_save_LDFLAGS"
9784 #  LIBS="$ac_save_LIBS"
9785
9786
9787     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
9788     if test "$have_xinerama" = no; then
9789
9790   ac_save_CPPFLAGS="$CPPFLAGS"
9791   ac_save_LDFLAGS="$LDFLAGS"
9792 #  ac_save_LIBS="$LIBS"
9793
9794   if test \! -z "$includedir" ; then
9795     CPPFLAGS="$CPPFLAGS -I$includedir"
9796   fi
9797   # note: $X_CFLAGS includes $x_includes
9798   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9799
9800   if test \! -z "$libdir" ; then
9801     LDFLAGS="$LDFLAGS -L$libdir"
9802   fi
9803   # note: $X_LIBS includes $x_libraries
9804   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9805
9806   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5
9807 echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6
9808 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
9809   echo $ECHO_N "(cached) $ECHO_C" >&6
9810 else
9811   ac_check_lib_save_LIBS=$LIBS
9812 LIBS="-lXinerama -lXext -lX11 $LIBS"
9813 cat >conftest.$ac_ext <<_ACEOF
9814 #line $LINENO "configure"
9815 #include "confdefs.h"
9816
9817 /* Override any gcc2 internal prototype to avoid an error.  */
9818 #ifdef __cplusplus
9819 extern "C"
9820 #endif
9821 /* We use char because int might match the return type of a gcc2
9822    builtin and then its argument prototype would still apply.  */
9823 char XineramaQueryExtension ();
9824 #ifdef F77_DUMMY_MAIN
9825 #  ifdef __cplusplus
9826      extern "C"
9827 #  endif
9828    int F77_DUMMY_MAIN() { return 1; }
9829 #endif
9830 int
9831 main ()
9832 {
9833 XineramaQueryExtension ();
9834   ;
9835   return 0;
9836 }
9837 _ACEOF
9838 rm -f conftest.$ac_objext conftest$ac_exeext
9839 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9840   (eval $ac_link) 2>&5
9841   ac_status=$?
9842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9843   (exit $ac_status); } &&
9844          { ac_try='test -s conftest$ac_exeext'
9845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9846   (eval $ac_try) 2>&5
9847   ac_status=$?
9848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9849   (exit $ac_status); }; }; then
9850   ac_cv_lib_Xinerama_XineramaQueryExtension=yes
9851 else
9852   echo "$as_me: failed program was:" >&5
9853 cat conftest.$ac_ext >&5
9854 ac_cv_lib_Xinerama_XineramaQueryExtension=no
9855 fi
9856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9857 LIBS=$ac_check_lib_save_LIBS
9858 fi
9859 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
9860 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6
9861 if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
9862   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
9863 else
9864   true
9865 fi
9866
9867   CPPFLAGS="$ac_save_CPPFLAGS"
9868   LDFLAGS="$ac_save_LDFLAGS"
9869 #  LIBS="$ac_save_LIBS"
9870
9871     fi
9872   fi
9873
9874   # if that succeeded, then we've really got it.
9875   if test "$have_xinerama" = yes; then
9876     cat >>confdefs.h <<\_ACEOF
9877 #define HAVE_XINERAMA 1
9878 _ACEOF
9879
9880   fi
9881
9882 elif test "$with_xinerama" != no; then
9883   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9884   exit 1
9885 fi
9886
9887
9888 ###############################################################################
9889 #
9890 #       Check for the XF86VMODE server extension (for virtual screens.)
9891 #
9892 ###############################################################################
9893
9894 have_xf86vmode=no
9895 with_xf86vmode_req=unspecified
9896
9897 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
9898 if test "${with_xf86vmode_ext+set}" = set; then
9899   withval="$with_xf86vmode_ext"
9900   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9901 else
9902   with_xf86vmode=yes
9903 fi;
9904
9905
9906    case "$with_xf86vmode" in
9907     yes) ;;
9908     no)  ;;
9909
9910     /*)
9911      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
9912 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
9913      d=$with_xf86vmode/include
9914      if test -d $d; then
9915        X_CFLAGS="-I$d $X_CFLAGS"
9916        echo "$as_me:$LINENO: result: $d" >&5
9917 echo "${ECHO_T}$d" >&6
9918      else
9919        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9920 echo "${ECHO_T}not found ($d: no such directory)" >&6
9921      fi
9922
9923      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
9924 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
9925      d=$with_xf86vmode/lib
9926      if test -d $d; then
9927        X_LIBS="-L$d $X_LIBS"
9928        echo "$as_me:$LINENO: result: $d" >&5
9929 echo "${ECHO_T}$d" >&6
9930      else
9931        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9932 echo "${ECHO_T}not found ($d: no such directory)" >&6
9933      fi
9934
9935      # replace the directory string with "yes".
9936      with_xf86vmode_req="yes"
9937      with_xf86vmode=$with_xf86vmode_req
9938      ;;
9939
9940     *)
9941      echo ""
9942      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9943      echo "       If it is a directory, then \`DIR/include' will be added to"
9944      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9945      exit 1
9946      ;;
9947    esac
9948
9949
9950 if test "$with_xf86vmode" = yes; then
9951
9952   # first check for xf86vmode.h
9953
9954   ac_save_CPPFLAGS="$CPPFLAGS"
9955   if test \! -z "$includedir" ; then
9956     CPPFLAGS="$CPPFLAGS -I$includedir"
9957   fi
9958   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9959   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
9960 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
9961 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
9962   echo $ECHO_N "(cached) $ECHO_C" >&6
9963 else
9964   cat >conftest.$ac_ext <<_ACEOF
9965 #line $LINENO "configure"
9966 #include "confdefs.h"
9967 #include <X11/Xlib.h>
9968
9969 #include <X11/extensions/xf86vmode.h>
9970 _ACEOF
9971 rm -f conftest.$ac_objext
9972 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9973   (eval $ac_compile) 2>&5
9974   ac_status=$?
9975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9976   (exit $ac_status); } &&
9977          { ac_try='test -s conftest.$ac_objext'
9978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9979   (eval $ac_try) 2>&5
9980   ac_status=$?
9981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9982   (exit $ac_status); }; }; then
9983   ac_cv_header_X11_extensions_xf86vmode_h=yes
9984 else
9985   echo "$as_me: failed program was:" >&5
9986 cat conftest.$ac_ext >&5
9987 ac_cv_header_X11_extensions_xf86vmode_h=no
9988 fi
9989 rm -f conftest.$ac_objext conftest.$ac_ext
9990 fi
9991 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
9992 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
9993 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
9994   have_xf86vmode=yes
9995 fi
9996
9997
9998   CPPFLAGS="$ac_save_CPPFLAGS"
9999
10000   # if that succeeded, then check for the -lXxf86vm
10001   if test "$have_xf86vmode" = yes; then
10002     have_xf86vmode=no
10003
10004   ac_save_CPPFLAGS="$CPPFLAGS"
10005   ac_save_LDFLAGS="$LDFLAGS"
10006 #  ac_save_LIBS="$LIBS"
10007
10008   if test \! -z "$includedir" ; then
10009     CPPFLAGS="$CPPFLAGS -I$includedir"
10010   fi
10011   # note: $X_CFLAGS includes $x_includes
10012   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10013
10014   if test \! -z "$libdir" ; then
10015     LDFLAGS="$LDFLAGS -L$libdir"
10016   fi
10017   # note: $X_LIBS includes $x_libraries
10018   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10019
10020   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
10021 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
10022 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
10023   echo $ECHO_N "(cached) $ECHO_C" >&6
10024 else
10025   ac_check_lib_save_LIBS=$LIBS
10026 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10027 cat >conftest.$ac_ext <<_ACEOF
10028 #line $LINENO "configure"
10029 #include "confdefs.h"
10030
10031 /* Override any gcc2 internal prototype to avoid an error.  */
10032 #ifdef __cplusplus
10033 extern "C"
10034 #endif
10035 /* We use char because int might match the return type of a gcc2
10036    builtin and then its argument prototype would still apply.  */
10037 char XF86VidModeGetViewPort ();
10038 #ifdef F77_DUMMY_MAIN
10039 #  ifdef __cplusplus
10040      extern "C"
10041 #  endif
10042    int F77_DUMMY_MAIN() { return 1; }
10043 #endif
10044 int
10045 main ()
10046 {
10047 XF86VidModeGetViewPort ();
10048   ;
10049   return 0;
10050 }
10051 _ACEOF
10052 rm -f conftest.$ac_objext conftest$ac_exeext
10053 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10054   (eval $ac_link) 2>&5
10055   ac_status=$?
10056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10057   (exit $ac_status); } &&
10058          { ac_try='test -s conftest$ac_exeext'
10059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10060   (eval $ac_try) 2>&5
10061   ac_status=$?
10062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10063   (exit $ac_status); }; }; then
10064   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10065 else
10066   echo "$as_me: failed program was:" >&5
10067 cat conftest.$ac_ext >&5
10068 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10069 fi
10070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10071 LIBS=$ac_check_lib_save_LIBS
10072 fi
10073 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10074 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10075 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10076   have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10077 else
10078   true
10079 fi
10080
10081   CPPFLAGS="$ac_save_CPPFLAGS"
10082   LDFLAGS="$ac_save_LDFLAGS"
10083 #  LIBS="$ac_save_LIBS"
10084
10085   fi
10086
10087   # if that succeeded, then we've really got it.
10088   if test "$have_xf86vmode" = yes; then
10089     cat >>confdefs.h <<\_ACEOF
10090 #define HAVE_XF86VMODE 1
10091 _ACEOF
10092
10093   fi
10094
10095 elif test "$with_xf86vmode" != no; then
10096   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
10097   exit 1
10098 fi
10099
10100
10101 ###############################################################################
10102 #
10103 #       Check for the XF86VMODE server extension (for gamma fading.)
10104 #
10105 ###############################################################################
10106
10107 have_xf86gamma=no
10108 have_xf86gamma_ramp=no
10109 with_xf86gamma_req=unspecified
10110
10111 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
10112 if test "${with_xf86gamma_ext+set}" = set; then
10113   withval="$with_xf86gamma_ext"
10114   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
10115 else
10116   with_xf86gamma=yes
10117 fi;
10118
10119
10120    case "$with_xf86gamma" in
10121     yes) ;;
10122     no)  ;;
10123
10124     /*)
10125      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
10126 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
10127      d=$with_xf86gamma/include
10128      if test -d $d; then
10129        X_CFLAGS="-I$d $X_CFLAGS"
10130        echo "$as_me:$LINENO: result: $d" >&5
10131 echo "${ECHO_T}$d" >&6
10132      else
10133        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10134 echo "${ECHO_T}not found ($d: no such directory)" >&6
10135      fi
10136
10137      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
10138 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
10139      d=$with_xf86gamma/lib
10140      if test -d $d; then
10141        X_LIBS="-L$d $X_LIBS"
10142        echo "$as_me:$LINENO: result: $d" >&5
10143 echo "${ECHO_T}$d" >&6
10144      else
10145        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10146 echo "${ECHO_T}not found ($d: no such directory)" >&6
10147      fi
10148
10149      # replace the directory string with "yes".
10150      with_xf86gamma_req="yes"
10151      with_xf86gamma=$with_xf86gamma_req
10152      ;;
10153
10154     *)
10155      echo ""
10156      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
10157      echo "       If it is a directory, then \`DIR/include' will be added to"
10158      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10159      exit 1
10160      ;;
10161    esac
10162
10163
10164 if test "$with_xf86gamma" = yes; then
10165
10166   # first check for xf86vmode.h, if we haven't already
10167   if test "$have_xf86vmode" = yes; then
10168     have_xf86gamma=yes
10169   else
10170
10171   ac_save_CPPFLAGS="$CPPFLAGS"
10172   if test \! -z "$includedir" ; then
10173     CPPFLAGS="$CPPFLAGS -I$includedir"
10174   fi
10175   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10176   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10177 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10178 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10179   echo $ECHO_N "(cached) $ECHO_C" >&6
10180 else
10181   cat >conftest.$ac_ext <<_ACEOF
10182 #line $LINENO "configure"
10183 #include "confdefs.h"
10184 #include <X11/Xlib.h>
10185
10186 #include <X11/extensions/xf86vmode.h>
10187 _ACEOF
10188 rm -f conftest.$ac_objext
10189 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10190   (eval $ac_compile) 2>&5
10191   ac_status=$?
10192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10193   (exit $ac_status); } &&
10194          { ac_try='test -s conftest.$ac_objext'
10195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10196   (eval $ac_try) 2>&5
10197   ac_status=$?
10198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10199   (exit $ac_status); }; }; then
10200   ac_cv_header_X11_extensions_xf86vmode_h=yes
10201 else
10202   echo "$as_me: failed program was:" >&5
10203 cat conftest.$ac_ext >&5
10204 ac_cv_header_X11_extensions_xf86vmode_h=no
10205 fi
10206 rm -f conftest.$ac_objext conftest.$ac_ext
10207 fi
10208 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10209 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10210 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10211   have_xf86gamma=yes
10212 fi
10213
10214
10215   CPPFLAGS="$ac_save_CPPFLAGS"
10216   fi
10217
10218   # if that succeeded, then check for the -lXxf86vm
10219   if test "$have_xf86gamma" = yes; then
10220     have_xf86gamma=no
10221
10222   ac_save_CPPFLAGS="$CPPFLAGS"
10223   ac_save_LDFLAGS="$LDFLAGS"
10224 #  ac_save_LIBS="$LIBS"
10225
10226   if test \! -z "$includedir" ; then
10227     CPPFLAGS="$CPPFLAGS -I$includedir"
10228   fi
10229   # note: $X_CFLAGS includes $x_includes
10230   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10231
10232   if test \! -z "$libdir" ; then
10233     LDFLAGS="$LDFLAGS -L$libdir"
10234   fi
10235   # note: $X_LIBS includes $x_libraries
10236   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10237
10238   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
10239 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
10240 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
10241   echo $ECHO_N "(cached) $ECHO_C" >&6
10242 else
10243   ac_check_lib_save_LIBS=$LIBS
10244 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10245 cat >conftest.$ac_ext <<_ACEOF
10246 #line $LINENO "configure"
10247 #include "confdefs.h"
10248
10249 /* Override any gcc2 internal prototype to avoid an error.  */
10250 #ifdef __cplusplus
10251 extern "C"
10252 #endif
10253 /* We use char because int might match the return type of a gcc2
10254    builtin and then its argument prototype would still apply.  */
10255 char XF86VidModeSetGamma ();
10256 #ifdef F77_DUMMY_MAIN
10257 #  ifdef __cplusplus
10258      extern "C"
10259 #  endif
10260    int F77_DUMMY_MAIN() { return 1; }
10261 #endif
10262 int
10263 main ()
10264 {
10265 XF86VidModeSetGamma ();
10266   ;
10267   return 0;
10268 }
10269 _ACEOF
10270 rm -f conftest.$ac_objext conftest$ac_exeext
10271 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10272   (eval $ac_link) 2>&5
10273   ac_status=$?
10274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10275   (exit $ac_status); } &&
10276          { ac_try='test -s conftest$ac_exeext'
10277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10278   (eval $ac_try) 2>&5
10279   ac_status=$?
10280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10281   (exit $ac_status); }; }; then
10282   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
10283 else
10284   echo "$as_me: failed program was:" >&5
10285 cat conftest.$ac_ext >&5
10286 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
10287 fi
10288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10289 LIBS=$ac_check_lib_save_LIBS
10290 fi
10291 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
10292 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
10293 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
10294   have_xf86gamma=yes
10295 else
10296   true
10297 fi
10298
10299   CPPFLAGS="$ac_save_CPPFLAGS"
10300   LDFLAGS="$ac_save_LDFLAGS"
10301 #  LIBS="$ac_save_LIBS"
10302
10303   fi
10304
10305   # check for the Ramp versions of the functions too.
10306   if test "$have_xf86gamma" = yes; then
10307     have_xf86gamma_ramp=no
10308
10309   ac_save_CPPFLAGS="$CPPFLAGS"
10310   ac_save_LDFLAGS="$LDFLAGS"
10311 #  ac_save_LIBS="$LIBS"
10312
10313   if test \! -z "$includedir" ; then
10314     CPPFLAGS="$CPPFLAGS -I$includedir"
10315   fi
10316   # note: $X_CFLAGS includes $x_includes
10317   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10318
10319   if test \! -z "$libdir" ; then
10320     LDFLAGS="$LDFLAGS -L$libdir"
10321   fi
10322   # note: $X_LIBS includes $x_libraries
10323   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10324
10325   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
10326 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
10327 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
10328   echo $ECHO_N "(cached) $ECHO_C" >&6
10329 else
10330   ac_check_lib_save_LIBS=$LIBS
10331 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10332 cat >conftest.$ac_ext <<_ACEOF
10333 #line $LINENO "configure"
10334 #include "confdefs.h"
10335
10336 /* Override any gcc2 internal prototype to avoid an error.  */
10337 #ifdef __cplusplus
10338 extern "C"
10339 #endif
10340 /* We use char because int might match the return type of a gcc2
10341    builtin and then its argument prototype would still apply.  */
10342 char XF86VidModeSetGammaRamp ();
10343 #ifdef F77_DUMMY_MAIN
10344 #  ifdef __cplusplus
10345      extern "C"
10346 #  endif
10347    int F77_DUMMY_MAIN() { return 1; }
10348 #endif
10349 int
10350 main ()
10351 {
10352 XF86VidModeSetGammaRamp ();
10353   ;
10354   return 0;
10355 }
10356 _ACEOF
10357 rm -f conftest.$ac_objext conftest$ac_exeext
10358 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10359   (eval $ac_link) 2>&5
10360   ac_status=$?
10361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10362   (exit $ac_status); } &&
10363          { ac_try='test -s conftest$ac_exeext'
10364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10365   (eval $ac_try) 2>&5
10366   ac_status=$?
10367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10368   (exit $ac_status); }; }; then
10369   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
10370 else
10371   echo "$as_me: failed program was:" >&5
10372 cat conftest.$ac_ext >&5
10373 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
10374 fi
10375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10376 LIBS=$ac_check_lib_save_LIBS
10377 fi
10378 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
10379 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
10380 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
10381   have_xf86gamma_ramp=yes
10382 else
10383   true
10384 fi
10385
10386   CPPFLAGS="$ac_save_CPPFLAGS"
10387   LDFLAGS="$ac_save_LDFLAGS"
10388 #  LIBS="$ac_save_LIBS"
10389
10390   fi
10391
10392   # if those tests succeeded, then we've really got the functions.
10393   if test "$have_xf86gamma" = yes; then
10394     cat >>confdefs.h <<\_ACEOF
10395 #define HAVE_XF86VMODE_GAMMA 1
10396 _ACEOF
10397
10398   fi
10399
10400   if test "$have_xf86gamma_ramp" = yes; then
10401     cat >>confdefs.h <<\_ACEOF
10402 #define HAVE_XF86VMODE_GAMMA_RAMP 1
10403 _ACEOF
10404
10405   fi
10406
10407   # pull in the lib, if we haven't already
10408   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
10409     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10410   fi
10411
10412 elif test "$with_xf86gamma" != no; then
10413   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
10414   exit 1
10415 fi
10416
10417
10418 ###############################################################################
10419 #
10420 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
10421 #       using other XF86 stuff.)
10422 #
10423 ###############################################################################
10424
10425 have_xf86miscsetgrabkeysstate=no
10426 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10427
10428   ac_save_CPPFLAGS="$CPPFLAGS"
10429   ac_save_LDFLAGS="$LDFLAGS"
10430 #  ac_save_LIBS="$LIBS"
10431
10432   if test \! -z "$includedir" ; then
10433     CPPFLAGS="$CPPFLAGS -I$includedir"
10434   fi
10435   # note: $X_CFLAGS includes $x_includes
10436   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10437
10438   if test \! -z "$libdir" ; then
10439     LDFLAGS="$LDFLAGS -L$libdir"
10440   fi
10441   # note: $X_LIBS includes $x_libraries
10442   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10443
10444   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10445 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
10446 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
10447   echo $ECHO_N "(cached) $ECHO_C" >&6
10448 else
10449   ac_check_lib_save_LIBS=$LIBS
10450 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10451 cat >conftest.$ac_ext <<_ACEOF
10452 #line $LINENO "configure"
10453 #include "confdefs.h"
10454
10455 /* Override any gcc2 internal prototype to avoid an error.  */
10456 #ifdef __cplusplus
10457 extern "C"
10458 #endif
10459 /* We use char because int might match the return type of a gcc2
10460    builtin and then its argument prototype would still apply.  */
10461 char XF86MiscSetGrabKeysState ();
10462 #ifdef F77_DUMMY_MAIN
10463 #  ifdef __cplusplus
10464      extern "C"
10465 #  endif
10466    int F77_DUMMY_MAIN() { return 1; }
10467 #endif
10468 int
10469 main ()
10470 {
10471 XF86MiscSetGrabKeysState ();
10472   ;
10473   return 0;
10474 }
10475 _ACEOF
10476 rm -f conftest.$ac_objext conftest$ac_exeext
10477 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10478   (eval $ac_link) 2>&5
10479   ac_status=$?
10480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10481   (exit $ac_status); } &&
10482          { ac_try='test -s conftest$ac_exeext'
10483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10484   (eval $ac_try) 2>&5
10485   ac_status=$?
10486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10487   (exit $ac_status); }; }; then
10488   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10489 else
10490   echo "$as_me: failed program was:" >&5
10491 cat conftest.$ac_ext >&5
10492 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10493 fi
10494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10495 LIBS=$ac_check_lib_save_LIBS
10496 fi
10497 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10498 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
10499 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
10500   have_xf86miscsetgrabkeysstate=yes
10501 else
10502   true
10503 fi
10504
10505   CPPFLAGS="$ac_save_CPPFLAGS"
10506   LDFLAGS="$ac_save_LDFLAGS"
10507 #  LIBS="$ac_save_LIBS"
10508
10509   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10510     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10511     cat >>confdefs.h <<\_ACEOF
10512 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
10513 _ACEOF
10514
10515   fi
10516 fi
10517
10518
10519 ###############################################################################
10520 #
10521 #       Check for HP XHPDisableReset and XHPEnableReset.
10522 #
10523 ###############################################################################
10524
10525 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
10526 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
10527
10528   ac_save_CPPFLAGS="$CPPFLAGS"
10529   if test \! -z "$includedir" ; then
10530     CPPFLAGS="$CPPFLAGS -I$includedir"
10531   fi
10532   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10533   cat >conftest.$ac_ext <<_ACEOF
10534 #line $LINENO "configure"
10535 #include "confdefs.h"
10536 #include <X11/XHPlib.h>
10537
10538 _ACEOF
10539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10540   egrep "XHPDisableReset" >/dev/null 2>&1; then
10541   cat >>confdefs.h <<\_ACEOF
10542 #define HAVE_XHPDISABLERESET 1
10543 _ACEOF
10544
10545                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10546                    echo "$as_me:$LINENO: result: yes" >&5
10547 echo "${ECHO_T}yes" >&6
10548 else
10549   echo "$as_me:$LINENO: result: no" >&5
10550 echo "${ECHO_T}no" >&6
10551 fi
10552 rm -f conftest*
10553
10554   CPPFLAGS="$ac_save_CPPFLAGS"
10555
10556
10557 ###############################################################################
10558 #
10559 #       Check for /proc/interrupts.
10560 #
10561 ###############################################################################
10562
10563 have_proc_interrupts=no
10564 with_proc_interrupts_req=unspecified
10565
10566 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
10567 if test "${with_proc_interrupts+set}" = set; then
10568   withval="$with_proc_interrupts"
10569   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10570 else
10571   with_proc_interrupts=yes
10572 fi;
10573
10574 if test "$with_proc_interrupts" = yes; then
10575
10576    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
10577 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
10578 if test "${ac_cv_have_proc_interrupts+set}" = set; then
10579   echo $ECHO_N "(cached) $ECHO_C" >&6
10580 else
10581   ac_cv_have_proc_interrupts=no
10582      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
10583        ac_cv_have_proc_interrupts=yes
10584      fi
10585
10586 fi
10587 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
10588 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
10589    have_proc_interrupts=$ac_cv_have_proc_interrupts
10590
10591   if test "$have_proc_interrupts" = yes; then
10592     cat >>confdefs.h <<\_ACEOF
10593 #define HAVE_PROC_INTERRUPTS 1
10594 _ACEOF
10595
10596   fi
10597
10598 elif test "$with_proc_interrupts" != no; then
10599   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10600   exit 1
10601 fi
10602
10603
10604 ###############################################################################
10605 #
10606 #       The --enable-locking option
10607 #
10608 ###############################################################################
10609
10610 # Check whether --enable-locking or --disable-locking was given.
10611 if test "${enable_locking+set}" = set; then
10612   enableval="$enable_locking"
10613   enable_locking="$enableval"
10614 else
10615   enable_locking=yes
10616 fi;
10617 if test "$enable_locking" = yes; then
10618   true
10619 elif test "$enable_locking" = no; then
10620   cat >>confdefs.h <<\_ACEOF
10621 #define NO_LOCKING 1
10622 _ACEOF
10623
10624 else
10625   echo "error: must be yes or no: --enable-locking=$enable_locking"
10626   exit 1
10627 fi
10628
10629
10630
10631 ###############################################################################
10632 #
10633 #       The --enable-vt-locking option
10634 #
10635 ###############################################################################
10636
10637 #ac_vt_lockswitch=no
10638 #AC_ARG_ENABLE(vt-locking,[
10639 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
10640 #                          This is the default if the system supports it, and
10641 #                          if locking support is included (--enable-locking.)
10642 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
10643 #                          enabled.],
10644 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
10645 #if test "$enable_vt_locking" = yes; then
10646 #
10647 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
10648 #   [AC_TRY_COMPILE([#include <fcntl.h>
10649 #                   #include <sys/ioctl.h>
10650 #                   #include <sys/vt.h>],
10651 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
10652 #                  [ac_cv_vt_lockswitch=yes],
10653 #                  [ac_cv_vt_lockswitch=no])])
10654 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
10655 #
10656 #elif test "$enable_vt_locking" = no; then
10657 #  true
10658 #else
10659 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
10660 #  exit 1
10661 #fi
10662 #
10663 #if test "$ac_vt_lockswitch" = yes; then
10664 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
10665 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
10666 #  # #### but it doesn't work yet, so don't worry about that for now.
10667 ##  need_setuid=yes
10668 #fi
10669
10670
10671 ###############################################################################
10672 #
10673 #       Check for PAM.
10674 #
10675 ###############################################################################
10676
10677 case "$host" in
10678   *-solaris*)
10679    # Solaris systems tend to come with PAM misconfigured.
10680    #  Don't build it by default, even if the headers exist.
10681    with_pam_default=no
10682    ;;
10683   *)
10684    # Default to building PAM support on all other systems, if it exists.
10685    with_pam_default=yes
10686   ;;
10687 esac
10688
10689 have_pam=no
10690 with_pam_req=unspecified
10691
10692
10693 # Check whether --with-pam or --without-pam was given.
10694 if test "${with_pam+set}" = set; then
10695   withval="$with_pam"
10696   with_pam="$withval"; with_pam_req="$withval"
10697 else
10698   with_pam=$with_pam_default
10699 fi;
10700
10701
10702    case "$with_pam" in
10703     yes) ;;
10704     no)  ;;
10705
10706     /*)
10707      echo "$as_me:$LINENO: checking for PAM headers" >&5
10708 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
10709      d=$with_pam/include
10710      if test -d $d; then
10711        X_CFLAGS="-I$d $X_CFLAGS"
10712        echo "$as_me:$LINENO: result: $d" >&5
10713 echo "${ECHO_T}$d" >&6
10714      else
10715        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10716 echo "${ECHO_T}not found ($d: no such directory)" >&6
10717      fi
10718
10719      echo "$as_me:$LINENO: checking for PAM libs" >&5
10720 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
10721      d=$with_pam/lib
10722      if test -d $d; then
10723        X_LIBS="-L$d $X_LIBS"
10724        echo "$as_me:$LINENO: result: $d" >&5
10725 echo "${ECHO_T}$d" >&6
10726      else
10727        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10728 echo "${ECHO_T}not found ($d: no such directory)" >&6
10729      fi
10730
10731      # replace the directory string with "yes".
10732      with_pam_req="yes"
10733      with_pam=$with_pam_req
10734      ;;
10735
10736     *)
10737      echo ""
10738      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10739      echo "       If it is a directory, then \`DIR/include' will be added to"
10740      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10741      exit 1
10742      ;;
10743    esac
10744
10745
10746 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10747   echo "$as_me:$LINENO: checking for PAM" >&5
10748 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
10749 if test "${ac_cv_pam+set}" = set; then
10750   echo $ECHO_N "(cached) $ECHO_C" >&6
10751 else
10752
10753   ac_save_CPPFLAGS="$CPPFLAGS"
10754   if test \! -z "$includedir" ; then
10755     CPPFLAGS="$CPPFLAGS -I$includedir"
10756   fi
10757   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10758   cat >conftest.$ac_ext <<_ACEOF
10759 #line $LINENO "configure"
10760 #include "confdefs.h"
10761 #include <security/pam_appl.h>
10762 #ifdef F77_DUMMY_MAIN
10763 #  ifdef __cplusplus
10764      extern "C"
10765 #  endif
10766    int F77_DUMMY_MAIN() { return 1; }
10767 #endif
10768 int
10769 main ()
10770 {
10771
10772   ;
10773   return 0;
10774 }
10775 _ACEOF
10776 rm -f conftest.$ac_objext
10777 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10778   (eval $ac_compile) 2>&5
10779   ac_status=$?
10780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10781   (exit $ac_status); } &&
10782          { ac_try='test -s conftest.$ac_objext'
10783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10784   (eval $ac_try) 2>&5
10785   ac_status=$?
10786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10787   (exit $ac_status); }; }; then
10788   ac_cv_pam=yes
10789 else
10790   echo "$as_me: failed program was:" >&5
10791 cat conftest.$ac_ext >&5
10792 ac_cv_pam=no
10793 fi
10794 rm -f conftest.$ac_objext conftest.$ac_ext
10795   CPPFLAGS="$ac_save_CPPFLAGS"
10796 fi
10797 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
10798 echo "${ECHO_T}$ac_cv_pam" >&6
10799   if test "$ac_cv_pam" = yes ; then
10800     have_pam=yes
10801     cat >>confdefs.h <<\_ACEOF
10802 #define HAVE_PAM 1
10803 _ACEOF
10804
10805     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10806
10807     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10808     # those are in libc.  On Linux and Solaris, they're in libdl.
10809     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10810 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10811 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10812   echo $ECHO_N "(cached) $ECHO_C" >&6
10813 else
10814   ac_check_lib_save_LIBS=$LIBS
10815 LIBS="-ldl  $LIBS"
10816 cat >conftest.$ac_ext <<_ACEOF
10817 #line $LINENO "configure"
10818 #include "confdefs.h"
10819
10820 /* Override any gcc2 internal prototype to avoid an error.  */
10821 #ifdef __cplusplus
10822 extern "C"
10823 #endif
10824 /* We use char because int might match the return type of a gcc2
10825    builtin and then its argument prototype would still apply.  */
10826 char dlopen ();
10827 #ifdef F77_DUMMY_MAIN
10828 #  ifdef __cplusplus
10829      extern "C"
10830 #  endif
10831    int F77_DUMMY_MAIN() { return 1; }
10832 #endif
10833 int
10834 main ()
10835 {
10836 dlopen ();
10837   ;
10838   return 0;
10839 }
10840 _ACEOF
10841 rm -f conftest.$ac_objext conftest$ac_exeext
10842 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10843   (eval $ac_link) 2>&5
10844   ac_status=$?
10845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10846   (exit $ac_status); } &&
10847          { ac_try='test -s conftest$ac_exeext'
10848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10849   (eval $ac_try) 2>&5
10850   ac_status=$?
10851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10852   (exit $ac_status); }; }; then
10853   ac_cv_lib_dl_dlopen=yes
10854 else
10855   echo "$as_me: failed program was:" >&5
10856 cat conftest.$ac_ext >&5
10857 ac_cv_lib_dl_dlopen=no
10858 fi
10859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10860 LIBS=$ac_check_lib_save_LIBS
10861 fi
10862 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10863 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10864 if test $ac_cv_lib_dl_dlopen = yes; then
10865   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10866 fi
10867
10868
10869     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
10870 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
10871     if test "${ac_cv_pam_strerror_args+set}" = set; then
10872   echo $ECHO_N "(cached) $ECHO_C" >&6
10873 else
10874   cat >conftest.$ac_ext <<_ACEOF
10875 #line $LINENO "configure"
10876 #include "confdefs.h"
10877 #include <stdio.h>
10878                       #include <stdlib.h>
10879                       #include <security/pam_appl.h>
10880 #ifdef F77_DUMMY_MAIN
10881 #  ifdef __cplusplus
10882      extern "C"
10883 #  endif
10884    int F77_DUMMY_MAIN() { return 1; }
10885 #endif
10886 int
10887 main ()
10888 {
10889 pam_handle_t *pamh = 0;
10890                       char *s = pam_strerror(pamh, PAM_SUCCESS);
10891   ;
10892   return 0;
10893 }
10894 _ACEOF
10895 rm -f conftest.$ac_objext
10896 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10897   (eval $ac_compile) 2>&5
10898   ac_status=$?
10899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10900   (exit $ac_status); } &&
10901          { ac_try='test -s conftest.$ac_objext'
10902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10903   (eval $ac_try) 2>&5
10904   ac_status=$?
10905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10906   (exit $ac_status); }; }; then
10907   ac_pam_strerror_args=2
10908 else
10909   echo "$as_me: failed program was:" >&5
10910 cat conftest.$ac_ext >&5
10911 cat >conftest.$ac_ext <<_ACEOF
10912 #line $LINENO "configure"
10913 #include "confdefs.h"
10914 #include <stdio.h>
10915                                       #include <stdlib.h>
10916                                       #include <security/pam_appl.h>
10917 #ifdef F77_DUMMY_MAIN
10918 #  ifdef __cplusplus
10919      extern "C"
10920 #  endif
10921    int F77_DUMMY_MAIN() { return 1; }
10922 #endif
10923 int
10924 main ()
10925 {
10926 char *s =
10927                                        pam_strerror(PAM_SUCCESS);
10928   ;
10929   return 0;
10930 }
10931 _ACEOF
10932 rm -f conftest.$ac_objext
10933 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10934   (eval $ac_compile) 2>&5
10935   ac_status=$?
10936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10937   (exit $ac_status); } &&
10938          { ac_try='test -s conftest.$ac_objext'
10939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10940   (eval $ac_try) 2>&5
10941   ac_status=$?
10942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10943   (exit $ac_status); }; }; then
10944   ac_pam_strerror_args=1
10945 else
10946   echo "$as_me: failed program was:" >&5
10947 cat conftest.$ac_ext >&5
10948 ac_pam_strerror_args=0
10949 fi
10950 rm -f conftest.$ac_objext conftest.$ac_ext
10951 fi
10952 rm -f conftest.$ac_objext conftest.$ac_ext
10953       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10954 fi
10955
10956     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10957     if test "$ac_pam_strerror_args" = 1 ; then
10958       echo "$as_me:$LINENO: result: one argument" >&5
10959 echo "${ECHO_T}one argument" >&6
10960     elif test "$ac_pam_strerror_args" = 2 ; then
10961       cat >>confdefs.h <<\_ACEOF
10962 #define PAM_STRERROR_TWO_ARGS 1
10963 _ACEOF
10964
10965       echo "$as_me:$LINENO: result: two arguments" >&5
10966 echo "${ECHO_T}two arguments" >&6
10967     else
10968       echo "$as_me:$LINENO: result: unknown" >&5
10969 echo "${ECHO_T}unknown" >&6
10970     fi
10971   fi
10972 fi
10973
10974
10975 ###############################################################################
10976 #
10977 #       Check for Kerberos.
10978 #
10979 ###############################################################################
10980
10981 have_kerberos=no
10982 have_kerberos5=no
10983 with_kerberos_req=unspecified
10984
10985
10986 # Check whether --with-kerberos or --without-kerberos was given.
10987 if test "${with_kerberos+set}" = set; then
10988   withval="$with_kerberos"
10989   with_kerberos="$withval"; with_kerberos_req="$withval"
10990 else
10991   with_kerberos=yes
10992 fi;
10993
10994
10995    case "$with_kerberos" in
10996     yes) ;;
10997     no)  ;;
10998
10999     /*)
11000      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
11001 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
11002      d=$with_kerberos/include
11003      if test -d $d; then
11004        X_CFLAGS="-I$d $X_CFLAGS"
11005        echo "$as_me:$LINENO: result: $d" >&5
11006 echo "${ECHO_T}$d" >&6
11007      else
11008        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11009 echo "${ECHO_T}not found ($d: no such directory)" >&6
11010      fi
11011
11012      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
11013 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
11014      d=$with_kerberos/lib
11015      if test -d $d; then
11016        X_LIBS="-L$d $X_LIBS"
11017        echo "$as_me:$LINENO: result: $d" >&5
11018 echo "${ECHO_T}$d" >&6
11019      else
11020        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11021 echo "${ECHO_T}not found ($d: no such directory)" >&6
11022      fi
11023
11024      # replace the directory string with "yes".
11025      with_kerberos_req="yes"
11026      with_kerberos=$with_kerberos_req
11027      ;;
11028
11029     *)
11030      echo ""
11031      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
11032      echo "       If it is a directory, then \`DIR/include' will be added to"
11033      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11034      exit 1
11035      ;;
11036    esac
11037
11038
11039 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
11040   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
11041 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
11042 if test "${ac_cv_kerberos+set}" = set; then
11043   echo $ECHO_N "(cached) $ECHO_C" >&6
11044 else
11045
11046   ac_save_CPPFLAGS="$CPPFLAGS"
11047   if test \! -z "$includedir" ; then
11048     CPPFLAGS="$CPPFLAGS -I$includedir"
11049   fi
11050   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11051   cat >conftest.$ac_ext <<_ACEOF
11052 #line $LINENO "configure"
11053 #include "confdefs.h"
11054 #include <krb.h>
11055 #ifdef F77_DUMMY_MAIN
11056 #  ifdef __cplusplus
11057      extern "C"
11058 #  endif
11059    int F77_DUMMY_MAIN() { return 1; }
11060 #endif
11061 int
11062 main ()
11063 {
11064
11065   ;
11066   return 0;
11067 }
11068 _ACEOF
11069 rm -f conftest.$ac_objext
11070 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11071   (eval $ac_compile) 2>&5
11072   ac_status=$?
11073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11074   (exit $ac_status); } &&
11075          { ac_try='test -s conftest.$ac_objext'
11076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11077   (eval $ac_try) 2>&5
11078   ac_status=$?
11079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11080   (exit $ac_status); }; }; then
11081   ac_cv_kerberos=yes
11082 else
11083   echo "$as_me: failed program was:" >&5
11084 cat conftest.$ac_ext >&5
11085 ac_cv_kerberos=no
11086 fi
11087 rm -f conftest.$ac_objext conftest.$ac_ext
11088   CPPFLAGS="$ac_save_CPPFLAGS"
11089 fi
11090 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
11091 echo "${ECHO_T}$ac_cv_kerberos" >&6
11092   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
11093 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
11094 if test "${ac_cv_kerberos5+set}" = set; then
11095   echo $ECHO_N "(cached) $ECHO_C" >&6
11096 else
11097
11098   ac_save_CPPFLAGS="$CPPFLAGS"
11099   if test \! -z "$includedir" ; then
11100     CPPFLAGS="$CPPFLAGS -I$includedir"
11101   fi
11102   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11103   cat >conftest.$ac_ext <<_ACEOF
11104 #line $LINENO "configure"
11105 #include "confdefs.h"
11106 #include <kerberosIV/krb.h>
11107 #ifdef F77_DUMMY_MAIN
11108 #  ifdef __cplusplus
11109      extern "C"
11110 #  endif
11111    int F77_DUMMY_MAIN() { return 1; }
11112 #endif
11113 int
11114 main ()
11115 {
11116
11117   ;
11118   return 0;
11119 }
11120 _ACEOF
11121 rm -f conftest.$ac_objext
11122 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11123   (eval $ac_compile) 2>&5
11124   ac_status=$?
11125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11126   (exit $ac_status); } &&
11127          { ac_try='test -s conftest.$ac_objext'
11128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11129   (eval $ac_try) 2>&5
11130   ac_status=$?
11131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132   (exit $ac_status); }; }; then
11133   ac_cv_kerberos5=yes
11134 else
11135   echo "$as_me: failed program was:" >&5
11136 cat conftest.$ac_ext >&5
11137 ac_cv_kerberos5=no
11138 fi
11139 rm -f conftest.$ac_objext conftest.$ac_ext
11140   CPPFLAGS="$ac_save_CPPFLAGS"
11141 fi
11142 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
11143 echo "${ECHO_T}$ac_cv_kerberos5" >&6
11144
11145   if test "$ac_cv_kerberos" = yes ; then
11146     have_kerberos=yes
11147     cat >>confdefs.h <<\_ACEOF
11148 #define HAVE_KERBEROS 1
11149 _ACEOF
11150
11151   fi
11152
11153   if test "$ac_cv_kerberos5" = yes ; then
11154     have_kerberos=yes
11155     have_kerberos5=yes
11156     cat >>confdefs.h <<\_ACEOF
11157 #define HAVE_KERBEROS 1
11158 _ACEOF
11159
11160     cat >>confdefs.h <<\_ACEOF
11161 #define HAVE_KERBEROS5 1
11162 _ACEOF
11163
11164   fi
11165
11166   if test "$have_kerberos5" = yes ; then
11167     # from Matt Knopp <mhat@infocalypse.netlag.com>
11168     # (who got it from amu@mit.edu)
11169
11170     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
11171
11172     # jwz: MacOS X uses -lkrb5, but not -lcrypt
11173
11174   ac_save_CPPFLAGS="$CPPFLAGS"
11175   ac_save_LDFLAGS="$LDFLAGS"
11176 #  ac_save_LIBS="$LIBS"
11177
11178   if test \! -z "$includedir" ; then
11179     CPPFLAGS="$CPPFLAGS -I$includedir"
11180   fi
11181   # note: $X_CFLAGS includes $x_includes
11182   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11183
11184   if test \! -z "$libdir" ; then
11185     LDFLAGS="$LDFLAGS -L$libdir"
11186   fi
11187   # note: $X_LIBS includes $x_libraries
11188   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11189
11190   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
11191 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
11192 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
11193   echo $ECHO_N "(cached) $ECHO_C" >&6
11194 else
11195   ac_check_lib_save_LIBS=$LIBS
11196 LIBS="-lcrypt  $LIBS"
11197 cat >conftest.$ac_ext <<_ACEOF
11198 #line $LINENO "configure"
11199 #include "confdefs.h"
11200
11201 /* Override any gcc2 internal prototype to avoid an error.  */
11202 #ifdef __cplusplus
11203 extern "C"
11204 #endif
11205 /* We use char because int might match the return type of a gcc2
11206    builtin and then its argument prototype would still apply.  */
11207 char crypt ();
11208 #ifdef F77_DUMMY_MAIN
11209 #  ifdef __cplusplus
11210      extern "C"
11211 #  endif
11212    int F77_DUMMY_MAIN() { return 1; }
11213 #endif
11214 int
11215 main ()
11216 {
11217 crypt ();
11218   ;
11219   return 0;
11220 }
11221 _ACEOF
11222 rm -f conftest.$ac_objext conftest$ac_exeext
11223 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11224   (eval $ac_link) 2>&5
11225   ac_status=$?
11226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11227   (exit $ac_status); } &&
11228          { ac_try='test -s conftest$ac_exeext'
11229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11230   (eval $ac_try) 2>&5
11231   ac_status=$?
11232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11233   (exit $ac_status); }; }; then
11234   ac_cv_lib_crypt_crypt=yes
11235 else
11236   echo "$as_me: failed program was:" >&5
11237 cat conftest.$ac_ext >&5
11238 ac_cv_lib_crypt_crypt=no
11239 fi
11240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11241 LIBS=$ac_check_lib_save_LIBS
11242 fi
11243 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
11244 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
11245 if test $ac_cv_lib_crypt_crypt = yes; then
11246   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11247 fi
11248
11249   CPPFLAGS="$ac_save_CPPFLAGS"
11250   LDFLAGS="$ac_save_LDFLAGS"
11251 #  LIBS="$ac_save_LIBS"
11252
11253
11254   elif test "$have_kerberos" = yes ; then
11255     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11256     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11257   fi
11258
11259   if test "$have_kerberos" = yes ; then
11260     echo "$as_me:$LINENO: checking for res_search" >&5
11261 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
11262 if test "${ac_cv_func_res_search+set}" = set; then
11263   echo $ECHO_N "(cached) $ECHO_C" >&6
11264 else
11265   cat >conftest.$ac_ext <<_ACEOF
11266 #line $LINENO "configure"
11267 #include "confdefs.h"
11268 /* System header to define __stub macros and hopefully few prototypes,
11269     which can conflict with char res_search (); below.  */
11270 #include <assert.h>
11271 /* Override any gcc2 internal prototype to avoid an error.  */
11272 #ifdef __cplusplus
11273 extern "C"
11274 #endif
11275 /* We use char because int might match the return type of a gcc2
11276    builtin and then its argument prototype would still apply.  */
11277 char res_search ();
11278 char (*f) ();
11279
11280 #ifdef F77_DUMMY_MAIN
11281 #  ifdef __cplusplus
11282      extern "C"
11283 #  endif
11284    int F77_DUMMY_MAIN() { return 1; }
11285 #endif
11286 int
11287 main ()
11288 {
11289 /* The GNU C library defines this for functions which it implements
11290     to always fail with ENOSYS.  Some functions are actually named
11291     something starting with __ and the normal name is an alias.  */
11292 #if defined (__stub_res_search) || defined (__stub___res_search)
11293 choke me
11294 #else
11295 f = res_search;
11296 #endif
11297
11298   ;
11299   return 0;
11300 }
11301 _ACEOF
11302 rm -f conftest.$ac_objext conftest$ac_exeext
11303 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11304   (eval $ac_link) 2>&5
11305   ac_status=$?
11306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11307   (exit $ac_status); } &&
11308          { ac_try='test -s conftest$ac_exeext'
11309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11310   (eval $ac_try) 2>&5
11311   ac_status=$?
11312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11313   (exit $ac_status); }; }; then
11314   ac_cv_func_res_search=yes
11315 else
11316   echo "$as_me: failed program was:" >&5
11317 cat conftest.$ac_ext >&5
11318 ac_cv_func_res_search=no
11319 fi
11320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11321 fi
11322 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
11323 echo "${ECHO_T}$ac_cv_func_res_search" >&6
11324 if test $ac_cv_func_res_search = yes; then
11325   :
11326 else
11327   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
11328 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
11329 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
11330   echo $ECHO_N "(cached) $ECHO_C" >&6
11331 else
11332   ac_check_lib_save_LIBS=$LIBS
11333 LIBS="-lresolv  $LIBS"
11334 cat >conftest.$ac_ext <<_ACEOF
11335 #line $LINENO "configure"
11336 #include "confdefs.h"
11337
11338 /* Override any gcc2 internal prototype to avoid an error.  */
11339 #ifdef __cplusplus
11340 extern "C"
11341 #endif
11342 /* We use char because int might match the return type of a gcc2
11343    builtin and then its argument prototype would still apply.  */
11344 char res_search ();
11345 #ifdef F77_DUMMY_MAIN
11346 #  ifdef __cplusplus
11347      extern "C"
11348 #  endif
11349    int F77_DUMMY_MAIN() { return 1; }
11350 #endif
11351 int
11352 main ()
11353 {
11354 res_search ();
11355   ;
11356   return 0;
11357 }
11358 _ACEOF
11359 rm -f conftest.$ac_objext conftest$ac_exeext
11360 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11361   (eval $ac_link) 2>&5
11362   ac_status=$?
11363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11364   (exit $ac_status); } &&
11365          { ac_try='test -s conftest$ac_exeext'
11366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11367   (eval $ac_try) 2>&5
11368   ac_status=$?
11369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11370   (exit $ac_status); }; }; then
11371   ac_cv_lib_resolv_res_search=yes
11372 else
11373   echo "$as_me: failed program was:" >&5
11374 cat conftest.$ac_ext >&5
11375 ac_cv_lib_resolv_res_search=no
11376 fi
11377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11378 LIBS=$ac_check_lib_save_LIBS
11379 fi
11380 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
11381 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
11382 if test $ac_cv_lib_resolv_res_search = yes; then
11383   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11384 else
11385   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11386 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11387
11388 fi
11389
11390 fi
11391
11392   fi
11393 fi
11394
11395
11396 ###############################################################################
11397 #
11398 #       Check for the nine billion variants of shadow passwords...
11399 #
11400 ###############################################################################
11401
11402 need_setuid=no
11403
11404 have_shadow=no
11405 with_shadow_req=unspecified
11406
11407
11408 # Check whether --with-shadow or --without-shadow was given.
11409 if test "${with_shadow+set}" = set; then
11410   withval="$with_shadow"
11411   with_shadow="$withval"; with_shadow_req="$withval"
11412 else
11413   with_shadow=yes
11414 fi;
11415
11416
11417    case "$with_shadow" in
11418     yes) ;;
11419     no)  ;;
11420
11421     /*)
11422      echo "$as_me:$LINENO: checking for shadow password headers" >&5
11423 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
11424      d=$with_shadow/include
11425      if test -d $d; then
11426        X_CFLAGS="-I$d $X_CFLAGS"
11427        echo "$as_me:$LINENO: result: $d" >&5
11428 echo "${ECHO_T}$d" >&6
11429      else
11430        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11431 echo "${ECHO_T}not found ($d: no such directory)" >&6
11432      fi
11433
11434      echo "$as_me:$LINENO: checking for shadow password libs" >&5
11435 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
11436      d=$with_shadow/lib
11437      if test -d $d; then
11438        X_LIBS="-L$d $X_LIBS"
11439        echo "$as_me:$LINENO: result: $d" >&5
11440 echo "${ECHO_T}$d" >&6
11441      else
11442        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11443 echo "${ECHO_T}not found ($d: no such directory)" >&6
11444      fi
11445
11446      # replace the directory string with "yes".
11447      with_shadow_req="yes"
11448      with_shadow=$with_shadow_req
11449      ;;
11450
11451     *)
11452      echo ""
11453      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11454      echo "       If it is a directory, then \`DIR/include' will be added to"
11455      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11456      exit 1
11457      ;;
11458    esac
11459
11460
11461 if test "$enable_locking" = no ; then
11462   with_shadow_req=no
11463   with_shadow=no
11464 fi
11465
11466
11467 ###############################################################################
11468 #
11469 #       Check for Sun "adjunct" passwords.
11470 #
11471 ###############################################################################
11472
11473 if test "$with_shadow" = yes ; then
11474   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
11475 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
11476 if test "${ac_cv_sun_adjunct+set}" = set; then
11477   echo $ECHO_N "(cached) $ECHO_C" >&6
11478 else
11479
11480   ac_save_CPPFLAGS="$CPPFLAGS"
11481   if test \! -z "$includedir" ; then
11482     CPPFLAGS="$CPPFLAGS -I$includedir"
11483   fi
11484   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11485   cat >conftest.$ac_ext <<_ACEOF
11486 #line $LINENO "configure"
11487 #include "confdefs.h"
11488 #include <stdlib.h>
11489                                     #include <unistd.h>
11490                                     #include <sys/types.h>
11491                                     #include <sys/label.h>
11492                                     #include <sys/audit.h>
11493                                     #include <pwdadj.h>
11494 #ifdef F77_DUMMY_MAIN
11495 #  ifdef __cplusplus
11496      extern "C"
11497 #  endif
11498    int F77_DUMMY_MAIN() { return 1; }
11499 #endif
11500 int
11501 main ()
11502 {
11503 struct passwd_adjunct *p = getpwanam("nobody");
11504                        const char *pw = p->pwa_passwd;
11505   ;
11506   return 0;
11507 }
11508 _ACEOF
11509 rm -f conftest.$ac_objext
11510 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11511   (eval $ac_compile) 2>&5
11512   ac_status=$?
11513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11514   (exit $ac_status); } &&
11515          { ac_try='test -s conftest.$ac_objext'
11516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11517   (eval $ac_try) 2>&5
11518   ac_status=$?
11519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11520   (exit $ac_status); }; }; then
11521   ac_cv_sun_adjunct=yes
11522 else
11523   echo "$as_me: failed program was:" >&5
11524 cat conftest.$ac_ext >&5
11525 ac_cv_sun_adjunct=no
11526 fi
11527 rm -f conftest.$ac_objext conftest.$ac_ext
11528   CPPFLAGS="$ac_save_CPPFLAGS"
11529 fi
11530 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
11531 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
11532   if test "$ac_cv_sun_adjunct" = yes; then
11533     have_shadow_adjunct=yes
11534     have_shadow=yes
11535     need_setuid=yes
11536   fi
11537 fi
11538
11539
11540 ###############################################################################
11541 #
11542 #       Check for DEC and SCO so-called "enhanced" security.
11543 #
11544 ###############################################################################
11545
11546 if test "$with_shadow" = yes ; then
11547   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
11548 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
11549 if test "${ac_cv_enhanced_passwd+set}" = set; then
11550   echo $ECHO_N "(cached) $ECHO_C" >&6
11551 else
11552
11553   ac_save_CPPFLAGS="$CPPFLAGS"
11554   if test \! -z "$includedir" ; then
11555     CPPFLAGS="$CPPFLAGS -I$includedir"
11556   fi
11557   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11558   cat >conftest.$ac_ext <<_ACEOF
11559 #line $LINENO "configure"
11560 #include "confdefs.h"
11561 #include <stdlib.h>
11562                                     #include <unistd.h>
11563                                     #include <sys/types.h>
11564                                     #include <pwd.h>
11565                                     #include <sys/security.h>
11566                                     #include <prot.h>
11567 #ifdef F77_DUMMY_MAIN
11568 #  ifdef __cplusplus
11569      extern "C"
11570 #  endif
11571    int F77_DUMMY_MAIN() { return 1; }
11572 #endif
11573 int
11574 main ()
11575 {
11576 struct pr_passwd *p;
11577                        const char *pw;
11578                        set_auth_parameters(0, 0);
11579                        check_auth_parameters();
11580                        p = getprpwnam("nobody");
11581                        pw = p->ufld.fd_encrypt;
11582   ;
11583   return 0;
11584 }
11585 _ACEOF
11586 rm -f conftest.$ac_objext
11587 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11588   (eval $ac_compile) 2>&5
11589   ac_status=$?
11590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11591   (exit $ac_status); } &&
11592          { ac_try='test -s conftest.$ac_objext'
11593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11594   (eval $ac_try) 2>&5
11595   ac_status=$?
11596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11597   (exit $ac_status); }; }; then
11598   ac_cv_enhanced_passwd=yes
11599 else
11600   echo "$as_me: failed program was:" >&5
11601 cat conftest.$ac_ext >&5
11602 ac_cv_enhanced_passwd=no
11603 fi
11604 rm -f conftest.$ac_objext conftest.$ac_ext
11605   CPPFLAGS="$ac_save_CPPFLAGS"
11606 fi
11607 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
11608 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
11609   if test $ac_cv_enhanced_passwd = yes; then
11610     have_shadow_enhanced=yes
11611     have_shadow=yes
11612     need_setuid=yes
11613
11614     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11615     # (I'm told it needs -lcurses too, but I don't understand why.)
11616     # But on DEC, it's in -lsecurity.
11617     #
11618     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
11619 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
11620 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
11621   echo $ECHO_N "(cached) $ECHO_C" >&6
11622 else
11623   ac_check_lib_save_LIBS=$LIBS
11624 LIBS="-lprot -lx $LIBS"
11625 cat >conftest.$ac_ext <<_ACEOF
11626 #line $LINENO "configure"
11627 #include "confdefs.h"
11628
11629 /* Override any gcc2 internal prototype to avoid an error.  */
11630 #ifdef __cplusplus
11631 extern "C"
11632 #endif
11633 /* We use char because int might match the return type of a gcc2
11634    builtin and then its argument prototype would still apply.  */
11635 char getprpwnam ();
11636 #ifdef F77_DUMMY_MAIN
11637 #  ifdef __cplusplus
11638      extern "C"
11639 #  endif
11640    int F77_DUMMY_MAIN() { return 1; }
11641 #endif
11642 int
11643 main ()
11644 {
11645 getprpwnam ();
11646   ;
11647   return 0;
11648 }
11649 _ACEOF
11650 rm -f conftest.$ac_objext conftest$ac_exeext
11651 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11652   (eval $ac_link) 2>&5
11653   ac_status=$?
11654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11655   (exit $ac_status); } &&
11656          { ac_try='test -s conftest$ac_exeext'
11657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11658   (eval $ac_try) 2>&5
11659   ac_status=$?
11660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11661   (exit $ac_status); }; }; then
11662   ac_cv_lib_prot_getprpwnam=yes
11663 else
11664   echo "$as_me: failed program was:" >&5
11665 cat conftest.$ac_ext >&5
11666 ac_cv_lib_prot_getprpwnam=no
11667 fi
11668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11669 LIBS=$ac_check_lib_save_LIBS
11670 fi
11671 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
11672 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
11673 if test $ac_cv_lib_prot_getprpwnam = yes; then
11674   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11675 else
11676   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
11677 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
11678 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
11679   echo $ECHO_N "(cached) $ECHO_C" >&6
11680 else
11681   ac_check_lib_save_LIBS=$LIBS
11682 LIBS="-lsecurity  $LIBS"
11683 cat >conftest.$ac_ext <<_ACEOF
11684 #line $LINENO "configure"
11685 #include "confdefs.h"
11686
11687 /* Override any gcc2 internal prototype to avoid an error.  */
11688 #ifdef __cplusplus
11689 extern "C"
11690 #endif
11691 /* We use char because int might match the return type of a gcc2
11692    builtin and then its argument prototype would still apply.  */
11693 char getprpwnam ();
11694 #ifdef F77_DUMMY_MAIN
11695 #  ifdef __cplusplus
11696      extern "C"
11697 #  endif
11698    int F77_DUMMY_MAIN() { return 1; }
11699 #endif
11700 int
11701 main ()
11702 {
11703 getprpwnam ();
11704   ;
11705   return 0;
11706 }
11707 _ACEOF
11708 rm -f conftest.$ac_objext conftest$ac_exeext
11709 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11710   (eval $ac_link) 2>&5
11711   ac_status=$?
11712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11713   (exit $ac_status); } &&
11714          { ac_try='test -s conftest$ac_exeext'
11715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11716   (eval $ac_try) 2>&5
11717   ac_status=$?
11718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11719   (exit $ac_status); }; }; then
11720   ac_cv_lib_security_getprpwnam=yes
11721 else
11722   echo "$as_me: failed program was:" >&5
11723 cat conftest.$ac_ext >&5
11724 ac_cv_lib_security_getprpwnam=no
11725 fi
11726 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11727 LIBS=$ac_check_lib_save_LIBS
11728 fi
11729 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
11730 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
11731 if test $ac_cv_lib_security_getprpwnam = yes; then
11732   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11733 fi
11734
11735 fi
11736
11737   fi
11738 fi
11739
11740 ###############################################################################
11741 #
11742 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11743 #
11744 ###############################################################################
11745
11746 if test "$with_shadow" = yes ; then
11747   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
11748 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
11749 if test "${ac_cv_hpux_passwd+set}" = set; then
11750   echo $ECHO_N "(cached) $ECHO_C" >&6
11751 else
11752
11753   ac_save_CPPFLAGS="$CPPFLAGS"
11754   if test \! -z "$includedir" ; then
11755     CPPFLAGS="$CPPFLAGS -I$includedir"
11756   fi
11757   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11758   cat >conftest.$ac_ext <<_ACEOF
11759 #line $LINENO "configure"
11760 #include "confdefs.h"
11761 #include <stdlib.h>
11762                                     #include <unistd.h>
11763                                     #include <sys/types.h>
11764                                     #include <pwd.h>
11765                                     #include <hpsecurity.h>
11766                                     #include <prot.h>
11767 #ifdef F77_DUMMY_MAIN
11768 #  ifdef __cplusplus
11769      extern "C"
11770 #  endif
11771    int F77_DUMMY_MAIN() { return 1; }
11772 #endif
11773 int
11774 main ()
11775 {
11776 struct s_passwd *p = getspwnam("nobody");
11777                        const char *pw = p->pw_passwd;
11778   ;
11779   return 0;
11780 }
11781 _ACEOF
11782 rm -f conftest.$ac_objext
11783 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11784   (eval $ac_compile) 2>&5
11785   ac_status=$?
11786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11787   (exit $ac_status); } &&
11788          { ac_try='test -s conftest.$ac_objext'
11789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11790   (eval $ac_try) 2>&5
11791   ac_status=$?
11792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11793   (exit $ac_status); }; }; then
11794   ac_cv_hpux_passwd=yes
11795 else
11796   echo "$as_me: failed program was:" >&5
11797 cat conftest.$ac_ext >&5
11798 ac_cv_hpux_passwd=no
11799 fi
11800 rm -f conftest.$ac_objext conftest.$ac_ext
11801   CPPFLAGS="$ac_save_CPPFLAGS"
11802 fi
11803 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
11804 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
11805   if test "$ac_cv_hpux_passwd" = yes; then
11806     have_shadow_hpux=yes
11807     have_shadow=yes
11808     need_setuid=yes
11809
11810     # on HPUX, bigcrypt is in -lsec
11811     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
11812 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
11813 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
11814   echo $ECHO_N "(cached) $ECHO_C" >&6
11815 else
11816   ac_check_lib_save_LIBS=$LIBS
11817 LIBS="-lsec  $LIBS"
11818 cat >conftest.$ac_ext <<_ACEOF
11819 #line $LINENO "configure"
11820 #include "confdefs.h"
11821
11822 /* Override any gcc2 internal prototype to avoid an error.  */
11823 #ifdef __cplusplus
11824 extern "C"
11825 #endif
11826 /* We use char because int might match the return type of a gcc2
11827    builtin and then its argument prototype would still apply.  */
11828 char bigcrypt ();
11829 #ifdef F77_DUMMY_MAIN
11830 #  ifdef __cplusplus
11831      extern "C"
11832 #  endif
11833    int F77_DUMMY_MAIN() { return 1; }
11834 #endif
11835 int
11836 main ()
11837 {
11838 bigcrypt ();
11839   ;
11840   return 0;
11841 }
11842 _ACEOF
11843 rm -f conftest.$ac_objext conftest$ac_exeext
11844 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11845   (eval $ac_link) 2>&5
11846   ac_status=$?
11847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11848   (exit $ac_status); } &&
11849          { ac_try='test -s conftest$ac_exeext'
11850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11851   (eval $ac_try) 2>&5
11852   ac_status=$?
11853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11854   (exit $ac_status); }; }; then
11855   ac_cv_lib_sec_bigcrypt=yes
11856 else
11857   echo "$as_me: failed program was:" >&5
11858 cat conftest.$ac_ext >&5
11859 ac_cv_lib_sec_bigcrypt=no
11860 fi
11861 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11862 LIBS=$ac_check_lib_save_LIBS
11863 fi
11864 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
11865 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
11866 if test $ac_cv_lib_sec_bigcrypt = yes; then
11867   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11868 fi
11869
11870   fi
11871 fi
11872
11873
11874 ###############################################################################
11875 #
11876 #       Check for FreeBSD-style shadow passwords.
11877 #
11878 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11879 #       password systems -- except you only get stuff in the pw_passwd field
11880 #       if the running program is setuid.  So, guess that we've got this
11881 #       lossage to contend with if /etc/master.passwd exists, and default to
11882 #       a setuid installation.
11883 #
11884 ###############################################################################
11885
11886 if test "$with_shadow" = yes ; then
11887   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
11888 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
11889 if test "${ac_cv_master_passwd+set}" = set; then
11890   echo $ECHO_N "(cached) $ECHO_C" >&6
11891 else
11892   if test -f /etc/master.passwd ; then
11893                     ac_cv_master_passwd=yes
11894                   else
11895                     ac_cv_master_passwd=no
11896                   fi
11897 fi
11898 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
11899 echo "${ECHO_T}$ac_cv_master_passwd" >&6
11900   if test "$ac_cv_master_passwd" = yes; then
11901     need_setuid=yes
11902   fi
11903 fi
11904
11905
11906 ###############################################################################
11907 #
11908 #       Check for traditional (ha!) shadow passwords.
11909 #
11910 ###############################################################################
11911
11912 if test "$with_shadow" = yes ; then
11913   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
11914 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
11915 if test "${ac_cv_shadow+set}" = set; then
11916   echo $ECHO_N "(cached) $ECHO_C" >&6
11917 else
11918
11919   ac_save_CPPFLAGS="$CPPFLAGS"
11920   if test \! -z "$includedir" ; then
11921     CPPFLAGS="$CPPFLAGS -I$includedir"
11922   fi
11923   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11924   cat >conftest.$ac_ext <<_ACEOF
11925 #line $LINENO "configure"
11926 #include "confdefs.h"
11927 #include <stdlib.h>
11928                                     #include <unistd.h>
11929                                     #include <sys/types.h>
11930                                     #include <pwd.h>
11931                                     #include <shadow.h>
11932 #ifdef F77_DUMMY_MAIN
11933 #  ifdef __cplusplus
11934      extern "C"
11935 #  endif
11936    int F77_DUMMY_MAIN() { return 1; }
11937 #endif
11938 int
11939 main ()
11940 {
11941 struct spwd *p = getspnam("nobody");
11942                        const char *pw = p->sp_pwdp;
11943   ;
11944   return 0;
11945 }
11946 _ACEOF
11947 rm -f conftest.$ac_objext
11948 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11949   (eval $ac_compile) 2>&5
11950   ac_status=$?
11951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11952   (exit $ac_status); } &&
11953          { ac_try='test -s conftest.$ac_objext'
11954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11955   (eval $ac_try) 2>&5
11956   ac_status=$?
11957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958   (exit $ac_status); }; }; then
11959   ac_cv_shadow=yes
11960 else
11961   echo "$as_me: failed program was:" >&5
11962 cat conftest.$ac_ext >&5
11963 ac_cv_shadow=no
11964 fi
11965 rm -f conftest.$ac_objext conftest.$ac_ext
11966   CPPFLAGS="$ac_save_CPPFLAGS"
11967 fi
11968 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
11969 echo "${ECHO_T}$ac_cv_shadow" >&6
11970   if test "$ac_cv_shadow" = yes; then
11971     have_shadow=yes
11972     need_setuid=yes
11973
11974     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
11975     have_getspnam=no
11976     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
11977 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
11978 if test "${ac_cv_lib_c_getspnam+set}" = set; then
11979   echo $ECHO_N "(cached) $ECHO_C" >&6
11980 else
11981   ac_check_lib_save_LIBS=$LIBS
11982 LIBS="-lc  $LIBS"
11983 cat >conftest.$ac_ext <<_ACEOF
11984 #line $LINENO "configure"
11985 #include "confdefs.h"
11986
11987 /* Override any gcc2 internal prototype to avoid an error.  */
11988 #ifdef __cplusplus
11989 extern "C"
11990 #endif
11991 /* We use char because int might match the return type of a gcc2
11992    builtin and then its argument prototype would still apply.  */
11993 char getspnam ();
11994 #ifdef F77_DUMMY_MAIN
11995 #  ifdef __cplusplus
11996      extern "C"
11997 #  endif
11998    int F77_DUMMY_MAIN() { return 1; }
11999 #endif
12000 int
12001 main ()
12002 {
12003 getspnam ();
12004   ;
12005   return 0;
12006 }
12007 _ACEOF
12008 rm -f conftest.$ac_objext conftest$ac_exeext
12009 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12010   (eval $ac_link) 2>&5
12011   ac_status=$?
12012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12013   (exit $ac_status); } &&
12014          { ac_try='test -s conftest$ac_exeext'
12015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12016   (eval $ac_try) 2>&5
12017   ac_status=$?
12018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12019   (exit $ac_status); }; }; then
12020   ac_cv_lib_c_getspnam=yes
12021 else
12022   echo "$as_me: failed program was:" >&5
12023 cat conftest.$ac_ext >&5
12024 ac_cv_lib_c_getspnam=no
12025 fi
12026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12027 LIBS=$ac_check_lib_save_LIBS
12028 fi
12029 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
12030 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
12031 if test $ac_cv_lib_c_getspnam = yes; then
12032   have_getspnam=yes
12033 fi
12034
12035     if test "$have_getspnam" = no ; then
12036       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
12037 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
12038 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
12039   echo $ECHO_N "(cached) $ECHO_C" >&6
12040 else
12041   ac_check_lib_save_LIBS=$LIBS
12042 LIBS="-lgen  $LIBS"
12043 cat >conftest.$ac_ext <<_ACEOF
12044 #line $LINENO "configure"
12045 #include "confdefs.h"
12046
12047 /* Override any gcc2 internal prototype to avoid an error.  */
12048 #ifdef __cplusplus
12049 extern "C"
12050 #endif
12051 /* We use char because int might match the return type of a gcc2
12052    builtin and then its argument prototype would still apply.  */
12053 char getspnam ();
12054 #ifdef F77_DUMMY_MAIN
12055 #  ifdef __cplusplus
12056      extern "C"
12057 #  endif
12058    int F77_DUMMY_MAIN() { return 1; }
12059 #endif
12060 int
12061 main ()
12062 {
12063 getspnam ();
12064   ;
12065   return 0;
12066 }
12067 _ACEOF
12068 rm -f conftest.$ac_objext conftest$ac_exeext
12069 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12070   (eval $ac_link) 2>&5
12071   ac_status=$?
12072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12073   (exit $ac_status); } &&
12074          { ac_try='test -s conftest$ac_exeext'
12075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12076   (eval $ac_try) 2>&5
12077   ac_status=$?
12078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12079   (exit $ac_status); }; }; then
12080   ac_cv_lib_gen_getspnam=yes
12081 else
12082   echo "$as_me: failed program was:" >&5
12083 cat conftest.$ac_ext >&5
12084 ac_cv_lib_gen_getspnam=no
12085 fi
12086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12087 LIBS=$ac_check_lib_save_LIBS
12088 fi
12089 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
12090 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
12091 if test $ac_cv_lib_gen_getspnam = yes; then
12092   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
12093 fi
12094
12095     fi
12096   fi
12097 fi
12098
12099
12100 ###############################################################################
12101 #
12102 #       Check for other libraries needed for non-shadow passwords.
12103 #
12104 ###############################################################################
12105
12106 if test "$enable_locking" = yes ; then
12107
12108   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
12109   have_crypt=no
12110   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
12111 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
12112 if test "${ac_cv_lib_c_crypt+set}" = set; then
12113   echo $ECHO_N "(cached) $ECHO_C" >&6
12114 else
12115   ac_check_lib_save_LIBS=$LIBS
12116 LIBS="-lc  $LIBS"
12117 cat >conftest.$ac_ext <<_ACEOF
12118 #line $LINENO "configure"
12119 #include "confdefs.h"
12120
12121 /* Override any gcc2 internal prototype to avoid an error.  */
12122 #ifdef __cplusplus
12123 extern "C"
12124 #endif
12125 /* We use char because int might match the return type of a gcc2
12126    builtin and then its argument prototype would still apply.  */
12127 char crypt ();
12128 #ifdef F77_DUMMY_MAIN
12129 #  ifdef __cplusplus
12130      extern "C"
12131 #  endif
12132    int F77_DUMMY_MAIN() { return 1; }
12133 #endif
12134 int
12135 main ()
12136 {
12137 crypt ();
12138   ;
12139   return 0;
12140 }
12141 _ACEOF
12142 rm -f conftest.$ac_objext conftest$ac_exeext
12143 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12144   (eval $ac_link) 2>&5
12145   ac_status=$?
12146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12147   (exit $ac_status); } &&
12148          { ac_try='test -s conftest$ac_exeext'
12149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12150   (eval $ac_try) 2>&5
12151   ac_status=$?
12152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12153   (exit $ac_status); }; }; then
12154   ac_cv_lib_c_crypt=yes
12155 else
12156   echo "$as_me: failed program was:" >&5
12157 cat conftest.$ac_ext >&5
12158 ac_cv_lib_c_crypt=no
12159 fi
12160 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12161 LIBS=$ac_check_lib_save_LIBS
12162 fi
12163 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
12164 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
12165 if test $ac_cv_lib_c_crypt = yes; then
12166   have_crypt=yes
12167 fi
12168
12169   if test "$have_crypt" = no ; then
12170     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
12171 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
12172 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
12173   echo $ECHO_N "(cached) $ECHO_C" >&6
12174 else
12175   ac_check_lib_save_LIBS=$LIBS
12176 LIBS="-lcrypt  $LIBS"
12177 cat >conftest.$ac_ext <<_ACEOF
12178 #line $LINENO "configure"
12179 #include "confdefs.h"
12180
12181 /* Override any gcc2 internal prototype to avoid an error.  */
12182 #ifdef __cplusplus
12183 extern "C"
12184 #endif
12185 /* We use char because int might match the return type of a gcc2
12186    builtin and then its argument prototype would still apply.  */
12187 char crypt ();
12188 #ifdef F77_DUMMY_MAIN
12189 #  ifdef __cplusplus
12190      extern "C"
12191 #  endif
12192    int F77_DUMMY_MAIN() { return 1; }
12193 #endif
12194 int
12195 main ()
12196 {
12197 crypt ();
12198   ;
12199   return 0;
12200 }
12201 _ACEOF
12202 rm -f conftest.$ac_objext conftest$ac_exeext
12203 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12204   (eval $ac_link) 2>&5
12205   ac_status=$?
12206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12207   (exit $ac_status); } &&
12208          { ac_try='test -s conftest$ac_exeext'
12209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12210   (eval $ac_try) 2>&5
12211   ac_status=$?
12212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12213   (exit $ac_status); }; }; then
12214   ac_cv_lib_crypt_crypt=yes
12215 else
12216   echo "$as_me: failed program was:" >&5
12217 cat conftest.$ac_ext >&5
12218 ac_cv_lib_crypt_crypt=no
12219 fi
12220 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12221 LIBS=$ac_check_lib_save_LIBS
12222 fi
12223 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
12224 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
12225 if test $ac_cv_lib_crypt_crypt = yes; then
12226   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12227 fi
12228
12229   fi
12230 fi
12231
12232
12233 # Most of the above shadow mechanisms will have set need_setuid to yes,
12234 # if they were found.  But, on some systems, we need setuid even when
12235 # using plain old vanilla passwords.
12236 #
12237 if test "$enable_locking" = yes ; then
12238   case "$host" in
12239     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
12240       need_setuid=yes
12241     ;;
12242   esac
12243 fi
12244
12245
12246 if test "$have_shadow_adjunct" = yes ; then
12247   cat >>confdefs.h <<\_ACEOF
12248 #define HAVE_ADJUNCT_PASSWD 1
12249 _ACEOF
12250
12251 elif test "$have_shadow_enhanced" = yes ; then
12252   cat >>confdefs.h <<\_ACEOF
12253 #define HAVE_ENHANCED_PASSWD 1
12254 _ACEOF
12255
12256 elif test "$have_shadow_hpux" = yes ; then
12257   cat >>confdefs.h <<\_ACEOF
12258 #define HAVE_HPUX_PASSWD 1
12259 _ACEOF
12260
12261 elif test "$have_shadow" = yes ; then
12262   cat >>confdefs.h <<\_ACEOF
12263 #define HAVE_SHADOW_PASSWD 1
12264 _ACEOF
12265
12266 fi
12267
12268
12269 ###############################################################################
12270 #
12271 #       Check for -lXm.
12272 #
12273 ###############################################################################
12274
12275 have_motif=no
12276 with_motif_req=unspecified
12277
12278 # Check whether --with-motif or --without-motif was given.
12279 if test "${with_motif+set}" = set; then
12280   withval="$with_motif"
12281   with_motif="$withval"; with_motif_req="$withval"
12282 else
12283   with_motif=yes
12284 fi;
12285
12286
12287    case "$with_motif" in
12288     yes) ;;
12289     no)  ;;
12290
12291     /*)
12292      echo "$as_me:$LINENO: checking for Motif headers" >&5
12293 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
12294      d=$with_motif/include
12295      if test -d $d; then
12296        X_CFLAGS="-I$d $X_CFLAGS"
12297        echo "$as_me:$LINENO: result: $d" >&5
12298 echo "${ECHO_T}$d" >&6
12299      else
12300        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12301 echo "${ECHO_T}not found ($d: no such directory)" >&6
12302      fi
12303
12304      echo "$as_me:$LINENO: checking for Motif libs" >&5
12305 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
12306      d=$with_motif/lib
12307      if test -d $d; then
12308        X_LIBS="-L$d $X_LIBS"
12309        echo "$as_me:$LINENO: result: $d" >&5
12310 echo "${ECHO_T}$d" >&6
12311      else
12312        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12313 echo "${ECHO_T}not found ($d: no such directory)" >&6
12314      fi
12315
12316      # replace the directory string with "yes".
12317      with_motif_req="yes"
12318      with_motif=$with_motif_req
12319      ;;
12320
12321     *)
12322      echo ""
12323      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12324      echo "       If it is a directory, then \`DIR/include' will be added to"
12325      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12326      exit 1
12327      ;;
12328    esac
12329
12330
12331 if test "$with_motif" != yes -a "$with_motif" != no ; then
12332   echo "error: must be yes or no: --with-motif=$with_motif"
12333   exit 1
12334 fi
12335
12336 if test "$with_motif" = yes; then
12337   have_motif=no
12338
12339   ac_save_CPPFLAGS="$CPPFLAGS"
12340   if test \! -z "$includedir" ; then
12341     CPPFLAGS="$CPPFLAGS -I$includedir"
12342   fi
12343   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12344   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
12345 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
12346 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
12347   echo $ECHO_N "(cached) $ECHO_C" >&6
12348 else
12349   cat >conftest.$ac_ext <<_ACEOF
12350 #line $LINENO "configure"
12351 #include "confdefs.h"
12352 #include <stdlib.h>
12353                      #include <stdio.h>
12354                      #include <X11/Intrinsic.h>
12355
12356 #include <Xm/Xm.h>
12357 _ACEOF
12358 rm -f conftest.$ac_objext
12359 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12360   (eval $ac_compile) 2>&5
12361   ac_status=$?
12362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12363   (exit $ac_status); } &&
12364          { ac_try='test -s conftest.$ac_objext'
12365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12366   (eval $ac_try) 2>&5
12367   ac_status=$?
12368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369   (exit $ac_status); }; }; then
12370   ac_cv_header_Xm_Xm_h=yes
12371 else
12372   echo "$as_me: failed program was:" >&5
12373 cat conftest.$ac_ext >&5
12374 ac_cv_header_Xm_Xm_h=no
12375 fi
12376 rm -f conftest.$ac_objext conftest.$ac_ext
12377 fi
12378 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
12379 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
12380 if test $ac_cv_header_Xm_Xm_h = yes; then
12381   have_motif=yes
12382                      cat >>confdefs.h <<\_ACEOF
12383 #define HAVE_MOTIF 1
12384 _ACEOF
12385
12386                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12387 fi
12388
12389
12390   CPPFLAGS="$ac_save_CPPFLAGS"
12391 fi
12392
12393
12394 if test "$have_motif" = yes; then
12395
12396   ac_save_CPPFLAGS="$CPPFLAGS"
12397   if test \! -z "$includedir" ; then
12398     CPPFLAGS="$CPPFLAGS -I$includedir"
12399   fi
12400   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12401   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
12402 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
12403 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
12404   echo $ECHO_N "(cached) $ECHO_C" >&6
12405 else
12406   cat >conftest.$ac_ext <<_ACEOF
12407 #line $LINENO "configure"
12408 #include "confdefs.h"
12409 #include <stdlib.h>
12410                      #include <stdio.h>
12411                      #include <X11/Intrinsic.h>
12412
12413 #include <Xm/ComboBox.h>
12414 _ACEOF
12415 rm -f conftest.$ac_objext
12416 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12417   (eval $ac_compile) 2>&5
12418   ac_status=$?
12419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12420   (exit $ac_status); } &&
12421          { ac_try='test -s conftest.$ac_objext'
12422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12423   (eval $ac_try) 2>&5
12424   ac_status=$?
12425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12426   (exit $ac_status); }; }; then
12427   ac_cv_header_Xm_ComboBox_h=yes
12428 else
12429   echo "$as_me: failed program was:" >&5
12430 cat conftest.$ac_ext >&5
12431 ac_cv_header_Xm_ComboBox_h=no
12432 fi
12433 rm -f conftest.$ac_objext conftest.$ac_ext
12434 fi
12435 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
12436 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
12437 if test $ac_cv_header_Xm_ComboBox_h = yes; then
12438   cat >>confdefs.h <<\_ACEOF
12439 #define HAVE_XMCOMBOBOX 1
12440 _ACEOF
12441
12442 fi
12443
12444
12445   CPPFLAGS="$ac_save_CPPFLAGS"
12446 fi
12447
12448
12449 ###############################################################################
12450 #
12451 #       Check for -lgtk (and Gnome stuff)
12452 #
12453 ###############################################################################
12454
12455 have_gtk=no
12456 have_gtk2=no
12457 with_gtk_req=unspecified
12458
12459 # Check whether --with-gtk or --without-gtk was given.
12460 if test "${with_gtk+set}" = set; then
12461   withval="$with_gtk"
12462   with_gtk="$withval"; with_gtk_req="$withval"
12463 else
12464   with_gtk=yes
12465 fi;
12466
12467 # if --with-gtk=/directory/ was specified, remember that directory so that
12468 # we can also look for the `gtk-config' program in that directory.
12469 case "$with_gtk" in
12470   /*)
12471     gtk_dir="$with_gtk"
12472     ;;
12473   *)
12474     gtk_dir=""
12475     ;;
12476 esac
12477
12478
12479    case "$with_gtk" in
12480     yes) ;;
12481     no)  ;;
12482
12483     /*)
12484      echo "$as_me:$LINENO: checking for Gtk headers" >&5
12485 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
12486      d=$with_gtk/include
12487      if test -d $d; then
12488        X_CFLAGS="-I$d $X_CFLAGS"
12489        echo "$as_me:$LINENO: result: $d" >&5
12490 echo "${ECHO_T}$d" >&6
12491      else
12492        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12493 echo "${ECHO_T}not found ($d: no such directory)" >&6
12494      fi
12495
12496      echo "$as_me:$LINENO: checking for Gtk libs" >&5
12497 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12498      d=$with_gtk/lib
12499      if test -d $d; then
12500        X_LIBS="-L$d $X_LIBS"
12501        echo "$as_me:$LINENO: result: $d" >&5
12502 echo "${ECHO_T}$d" >&6
12503      else
12504        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12505 echo "${ECHO_T}not found ($d: no such directory)" >&6
12506      fi
12507
12508      # replace the directory string with "yes".
12509      with_gtk_req="yes"
12510      with_gtk=$with_gtk_req
12511      ;;
12512
12513     *)
12514      echo ""
12515      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
12516      echo "       If it is a directory, then \`DIR/include' will be added to"
12517      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12518      exit 1
12519      ;;
12520    esac
12521
12522
12523 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
12524   echo "error: must be yes or no: --with-gtk=$with_gtk"
12525   exit 1
12526 fi
12527
12528 have_gnome=no
12529 with_gnome_req=unspecified
12530
12531 # Check whether --with-gnome or --without-gnome was given.
12532 if test "${with_gnome+set}" = set; then
12533   withval="$with_gnome"
12534   with_gnome="$withval"; with_gnome_req="$withval"
12535 else
12536   with_gnome=yes
12537 fi;
12538
12539 # if --with-gnome=/directory/ was specified, remember that directory so that
12540 # we can also look for the `gnome-config' program in that directory.
12541 case "$with_gnome" in
12542   /*)
12543     gnome_dir="$with_gnome"
12544     ;;
12545   *)
12546     gnome_dir=""
12547     ;;
12548 esac
12549
12550
12551    case "$with_gnome" in
12552     yes) ;;
12553     no)  ;;
12554
12555     /*)
12556      echo "$as_me:$LINENO: checking for Gnome headers" >&5
12557 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
12558      d=$with_gnome/include
12559      if test -d $d; then
12560        X_CFLAGS="-I$d $X_CFLAGS"
12561        echo "$as_me:$LINENO: result: $d" >&5
12562 echo "${ECHO_T}$d" >&6
12563      else
12564        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12565 echo "${ECHO_T}not found ($d: no such directory)" >&6
12566      fi
12567
12568      echo "$as_me:$LINENO: checking for Gnome libs" >&5
12569 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
12570      d=$with_gnome/lib
12571      if test -d $d; then
12572        X_LIBS="-L$d $X_LIBS"
12573        echo "$as_me:$LINENO: result: $d" >&5
12574 echo "${ECHO_T}$d" >&6
12575      else
12576        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12577 echo "${ECHO_T}not found ($d: no such directory)" >&6
12578      fi
12579
12580      # replace the directory string with "yes".
12581      with_gnome_req="yes"
12582      with_gnome=$with_gnome_req
12583      ;;
12584
12585     *)
12586      echo ""
12587      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
12588      echo "       If it is a directory, then \`DIR/include' will be added to"
12589      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12590      exit 1
12591      ;;
12592    esac
12593
12594
12595 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
12596   echo "error: must be yes or no: --with-gnome=$with_gnome"
12597   exit 1
12598 fi
12599
12600 parse_gtk_version_string() {
12601   # M4 sucks!!
12602
12603   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
12604   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
12605
12606   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
12607   if test -z "$ac_gtk_version"; then
12608     ac_gtk_version=unknown
12609     ac_gtk_version_string=unknown
12610   fi
12611 }
12612
12613
12614 jurassic_gtk=no
12615 gtk2_halfassed=no
12616
12617 if test "$with_gtk" = yes; then
12618   have_gtk=no
12619
12620   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
12621   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
12622   #
12623   gtk_path="$PATH"
12624
12625   if test ! -z "$gtk_dir"; then
12626     # canonicalize slashes.
12627     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
12628     gtk_path="$foo:$gtk_path"
12629   fi
12630
12631   if test ! -z "$gnome_dir"; then
12632     # canonicalize slashes.
12633     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
12634     gtk_path="$foo:$gtk_path"
12635   fi
12636
12637   for ac_prog in pkg-config
12638 do
12639   # Extract the first word of "$ac_prog", so it can be a program name with args.
12640 set dummy $ac_prog; ac_word=$2
12641 echo "$as_me:$LINENO: checking for $ac_word" >&5
12642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12643 if test "${ac_cv_path_pkg_config+set}" = set; then
12644   echo $ECHO_N "(cached) $ECHO_C" >&6
12645 else
12646   case $pkg_config in
12647   [\\/]* | ?:[\\/]*)
12648   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
12649   ;;
12650   *)
12651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12652 for as_dir in $gtk_path
12653 do
12654   IFS=$as_save_IFS
12655   test -z "$as_dir" && as_dir=.
12656   for ac_exec_ext in '' $ac_executable_extensions; do
12657   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12658     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
12659     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12660     break 2
12661   fi
12662 done
12663 done
12664
12665   ;;
12666 esac
12667 fi
12668 pkg_config=$ac_cv_path_pkg_config
12669
12670 if test -n "$pkg_config"; then
12671   echo "$as_me:$LINENO: result: $pkg_config" >&5
12672 echo "${ECHO_T}$pkg_config" >&6
12673 else
12674   echo "$as_me:$LINENO: result: no" >&5
12675 echo "${ECHO_T}no" >&6
12676 fi
12677
12678   test -n "$pkg_config" && break
12679 done
12680
12681
12682   if test -n "$pkg_config" ; then
12683     #
12684     # the new way...
12685     # run pkg-config based tests.
12686     #
12687
12688     pkgs=''
12689     pkg_check_version() {
12690       if test "$ok" = yes ; then
12691         req="$1"
12692         min="$2"
12693         echo "$as_me:$LINENO: checking for $req" >&5
12694 echo $ECHO_N "checking for $req... $ECHO_C" >&6
12695         if $pkg_config --exists "$req" ; then
12696           vers=`$pkg_config --modversion "$req"`
12697           if $pkg_config --exists "$req >= $min" ; then
12698             echo "$as_me:$LINENO: result: $vers" >&5
12699 echo "${ECHO_T}$vers" >&6
12700             pkgs="$pkgs $req"
12701             return 1
12702           else
12703             echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
12704 echo "${ECHO_T}$vers (wanted >= $min)" >&6
12705             ok=no
12706             return 0
12707           fi
12708         else
12709           echo "$as_me:$LINENO: result: no" >&5
12710 echo "${ECHO_T}no" >&6
12711           ok=no
12712           return 0
12713         fi
12714       fi
12715     }
12716
12717     ok="yes"
12718     pkg_check_version     gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
12719     pkg_check_version  gmodule-2.0  2.0.0
12720     pkg_check_version   libxml-2.0  2.4.6
12721     pkg_check_version libglade-2.0  1.99.0
12722     have_gtk="$ok"
12723
12724     if test "$have_gtk" = yes; then
12725       have_gtk2=yes
12726       cat >>confdefs.h <<\_ACEOF
12727 #define HAVE_GTK2 1
12728 _ACEOF
12729
12730     else
12731       if test -n "$ac_gtk_version_string" ; then
12732         gtk2_halfassed="$ac_gtk_version_string"
12733         gtk2_halfassed_lib="$req"
12734       fi
12735     fi
12736
12737     if test "$have_gtk" = no; then
12738       #
12739       # we don't have GTK 2.  Let's look for GTK 1.
12740       #
12741       pkgs=''
12742       ok="yes"
12743       pkg_check_version gtk+ 1.2           ; ac_gtk_version_string="$vers"
12744       pkg_check_version glib 1.0
12745       have_gtk="$ok"
12746
12747       # Now check for Gnome...
12748       #
12749       if test "$have_gtk" = yes -a "$with_gnome" = yes; then
12750         old_pkgs="$pkgs"
12751         ok=yes
12752         pkg_check_version capplet    1.0
12753         pkg_check_version gnomeui    1.0
12754         pkg_check_version gdk_pixbuf 0.1
12755         have_gnome="$ok"
12756
12757         if test "$have_gnome" = no; then
12758           pkgs="$old_pkgs"
12759         else
12760           cat >>confdefs.h <<\_ACEOF
12761 #define HAVE_CRAPPLET 1
12762 _ACEOF
12763
12764         fi
12765       fi
12766     fi
12767
12768     if test "$have_gtk" = yes; then
12769       parse_gtk_version_string
12770       jurassic_gtk=no
12771     else
12772       have_gnome=no
12773     fi
12774
12775     if test "$have_gtk" = yes; then
12776       echo "$as_me:$LINENO: checking for Gtk includes" >&5
12777 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
12778 if test "${ac_cv_gtk_config_cflags+set}" = set; then
12779   echo $ECHO_N "(cached) $ECHO_C" >&6
12780 else
12781   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12782 fi
12783 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
12784 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
12785       echo "$as_me:$LINENO: checking for Gtk libs" >&5
12786 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12787 if test "${ac_cv_gtk_config_libs+set}" = set; then
12788   echo $ECHO_N "(cached) $ECHO_C" >&6
12789 else
12790   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12791 fi
12792 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
12793 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
12794     fi
12795     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12796     ac_gtk_config_libs=$ac_cv_gtk_config_libs
12797
12798     ac_gnome_config_cflags=$ac_gtk_config_cflags
12799     ac_gnome_config_libs=$ac_gtk_config_libs
12800
12801   else
12802     #
12803     # the old way...
12804     # run {gnome,gtk}-config based tests.
12805     #
12806
12807     for ac_prog in glib12-config glib-config
12808 do
12809   # Extract the first word of "$ac_prog", so it can be a program name with args.
12810 set dummy $ac_prog; ac_word=$2
12811 echo "$as_me:$LINENO: checking for $ac_word" >&5
12812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12813 if test "${ac_cv_path_glib_config+set}" = set; then
12814   echo $ECHO_N "(cached) $ECHO_C" >&6
12815 else
12816   case $glib_config in
12817   [\\/]* | ?:[\\/]*)
12818   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
12819   ;;
12820   *)
12821   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12822 for as_dir in $gtk_path
12823 do
12824   IFS=$as_save_IFS
12825   test -z "$as_dir" && as_dir=.
12826   for ac_exec_ext in '' $ac_executable_extensions; do
12827   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12828     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
12829     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12830     break 2
12831   fi
12832 done
12833 done
12834
12835   ;;
12836 esac
12837 fi
12838 glib_config=$ac_cv_path_glib_config
12839
12840 if test -n "$glib_config"; then
12841   echo "$as_me:$LINENO: result: $glib_config" >&5
12842 echo "${ECHO_T}$glib_config" >&6
12843 else
12844   echo "$as_me:$LINENO: result: no" >&5
12845 echo "${ECHO_T}no" >&6
12846 fi
12847
12848   test -n "$glib_config" && break
12849 done
12850
12851     for ac_prog in gtk12-config  gtk-config
12852 do
12853   # Extract the first word of "$ac_prog", so it can be a program name with args.
12854 set dummy $ac_prog; ac_word=$2
12855 echo "$as_me:$LINENO: checking for $ac_word" >&5
12856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12857 if test "${ac_cv_path_gtk_config+set}" = set; then
12858   echo $ECHO_N "(cached) $ECHO_C" >&6
12859 else
12860   case $gtk_config in
12861   [\\/]* | ?:[\\/]*)
12862   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
12863   ;;
12864   *)
12865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12866 for as_dir in $gtk_path
12867 do
12868   IFS=$as_save_IFS
12869   test -z "$as_dir" && as_dir=.
12870   for ac_exec_ext in '' $ac_executable_extensions; do
12871   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12872     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
12873     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12874     break 2
12875   fi
12876 done
12877 done
12878
12879   ;;
12880 esac
12881 fi
12882 gtk_config=$ac_cv_path_gtk_config
12883
12884 if test -n "$gtk_config"; then
12885   echo "$as_me:$LINENO: result: $gtk_config" >&5
12886 echo "${ECHO_T}$gtk_config" >&6
12887 else
12888   echo "$as_me:$LINENO: result: no" >&5
12889 echo "${ECHO_T}no" >&6
12890 fi
12891
12892   test -n "$gtk_config" && break
12893 done
12894
12895
12896     if test "$with_gnome" = yes; then
12897       for ac_prog in gnome-config
12898 do
12899   # Extract the first word of "$ac_prog", so it can be a program name with args.
12900 set dummy $ac_prog; ac_word=$2
12901 echo "$as_me:$LINENO: checking for $ac_word" >&5
12902 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12903 if test "${ac_cv_path_gnome_config+set}" = set; then
12904   echo $ECHO_N "(cached) $ECHO_C" >&6
12905 else
12906   case $gnome_config in
12907   [\\/]* | ?:[\\/]*)
12908   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
12909   ;;
12910   *)
12911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12912 for as_dir in $gtk_path
12913 do
12914   IFS=$as_save_IFS
12915   test -z "$as_dir" && as_dir=.
12916   for ac_exec_ext in '' $ac_executable_extensions; do
12917   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12918     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
12919     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12920     break 2
12921   fi
12922 done
12923 done
12924
12925   ;;
12926 esac
12927 fi
12928 gnome_config=$ac_cv_path_gnome_config
12929
12930 if test -n "$gnome_config"; then
12931   echo "$as_me:$LINENO: result: $gnome_config" >&5
12932 echo "${ECHO_T}$gnome_config" >&6
12933 else
12934   echo "$as_me:$LINENO: result: no" >&5
12935 echo "${ECHO_T}no" >&6
12936 fi
12937
12938   test -n "$gnome_config" && break
12939 done
12940
12941     fi
12942
12943     if test -n "$glib_config" -a  -n "$gtk_config" ; then
12944       have_gtk=yes
12945       if test "$with_gnome" = yes -a -n "$gnome_config" ; then
12946         have_gnome=yes
12947       fi
12948     fi
12949
12950     if test "$have_gtk" = yes; then
12951       echo "$as_me:$LINENO: checking Gtk version number" >&5
12952 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
12953 if test "${ac_cv_gtk_version_string+set}" = set; then
12954   echo $ECHO_N "(cached) $ECHO_C" >&6
12955 else
12956   ac_cv_gtk_version_string=`$gtk_config --version`
12957 fi
12958 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
12959 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
12960       ac_gtk_version_string=$ac_cv_gtk_version_string
12961       parse_gtk_version_string
12962     fi
12963
12964     if test "$have_gtk" = yes; then
12965       if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
12966       then
12967         have_gtk=no
12968         have_gnome=no
12969         jurassic_gtk=yes
12970       fi
12971     fi
12972
12973     if test "$have_gtk" = yes; then
12974       echo "$as_me:$LINENO: checking for Gtk includes" >&5
12975 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
12976 if test "${ac_cv_gtk_config_cflags+set}" = set; then
12977   echo $ECHO_N "(cached) $ECHO_C" >&6
12978 else
12979   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
12980 fi
12981 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
12982 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
12983       echo "$as_me:$LINENO: checking for Gtk libs" >&5
12984 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12985 if test "${ac_cv_gtk_config_libs+set}" = set; then
12986   echo $ECHO_N "(cached) $ECHO_C" >&6
12987 else
12988   ac_cv_gtk_config_libs=`$gtk_config --libs`
12989 fi
12990 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
12991 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
12992     fi
12993     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12994     ac_gtk_config_libs=$ac_cv_gtk_config_libs
12995
12996     # Check for Gnome Capplet support.
12997     # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
12998     # In a Gnome 2.x world, libcapplet will not exist.
12999     # (In fact, this likely won't even be checked, since in a Gnome 2.x
13000     # world, we will probably be up in the "$pkg_config" branch instead
13001     # of here in the "$gnome_config" branch.)
13002     #
13003     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13004       gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
13005       echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
13006 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
13007       if test "${ac_cv_gnome_config_cflags+set}" = set; then
13008   echo $ECHO_N "(cached) $ECHO_C" >&6
13009 else
13010   if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \
13011               grep Unknown >/dev/null ) ; then
13012            ac_cv_gnome_config_cflags=''
13013          else
13014           ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
13015          fi
13016 fi
13017
13018       ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
13019       if test "$ac_gnome_config_cflags" = "" ; then
13020         have_gnome=no
13021         echo "$as_me:$LINENO: result: no" >&5
13022 echo "${ECHO_T}no" >&6
13023       else
13024         echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
13025 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
13026       fi
13027     fi
13028
13029     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13030       echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
13031 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
13032       if test "${ac_cv_gnome_config_libs+set}" = set; then
13033   echo $ECHO_N "(cached) $ECHO_C" >&6
13034 else
13035   if ( $gnome_config --libs $gnome_config_libs 2>&1 |
13036               grep Unknown >/dev/null ) ; then
13037            ac_cv_gnome_config_libs=''
13038          else
13039            ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
13040          fi
13041 fi
13042
13043       ac_gnome_config_libs=$ac_cv_gnome_config_libs
13044       if test "$ac_gnome_config_libs" = "" ; then
13045         have_gnome=no
13046         echo "$as_me:$LINENO: result: no" >&5
13047 echo "${ECHO_T}no" >&6
13048       else
13049         echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
13050 echo "${ECHO_T}$ac_gnome_config_libs" >&6
13051       fi
13052     fi
13053
13054     # If we have Gnome, then override the gtk-config values with
13055     # the gnome-config values.
13056     #
13057     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13058       ac_gtk_config_cflags=$ac_gnome_config_cflags
13059       ac_gtk_config_libs=$ac_gnome_config_libs
13060       cat >>confdefs.h <<\_ACEOF
13061 #define HAVE_CRAPPLET 1
13062 _ACEOF
13063
13064     fi
13065
13066   fi   # end of {gnome,gtk}-config based tests
13067
13068   if test "$have_gtk" = yes -a "$have_gtk2" = no; then
13069     # check for this function that was not in libcapplet 1.2.
13070     # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
13071
13072   ac_save_CPPFLAGS="$CPPFLAGS"
13073   ac_save_LDFLAGS="$LDFLAGS"
13074 #  ac_save_LIBS="$LIBS"
13075
13076   if test \! -z "$includedir" ; then
13077     CPPFLAGS="$CPPFLAGS -I$includedir"
13078   fi
13079   # note: $X_CFLAGS includes $x_includes
13080   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13081
13082   if test \! -z "$libdir" ; then
13083     LDFLAGS="$LDFLAGS -L$libdir"
13084   fi
13085   # note: $X_LIBS includes $x_libraries
13086   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13087
13088   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
13089 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
13090 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
13091   echo $ECHO_N "(cached) $ECHO_C" >&6
13092 else
13093   ac_check_lib_save_LIBS=$LIBS
13094 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
13095 cat >conftest.$ac_ext <<_ACEOF
13096 #line $LINENO "configure"
13097 #include "confdefs.h"
13098
13099 /* Override any gcc2 internal prototype to avoid an error.  */
13100 #ifdef __cplusplus
13101 extern "C"
13102 #endif
13103 /* We use char because int might match the return type of a gcc2
13104    builtin and then its argument prototype would still apply.  */
13105 char capplet_widget_changes_are_immediate ();
13106 #ifdef F77_DUMMY_MAIN
13107 #  ifdef __cplusplus
13108      extern "C"
13109 #  endif
13110    int F77_DUMMY_MAIN() { return 1; }
13111 #endif
13112 int
13113 main ()
13114 {
13115 capplet_widget_changes_are_immediate ();
13116   ;
13117   return 0;
13118 }
13119 _ACEOF
13120 rm -f conftest.$ac_objext conftest$ac_exeext
13121 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13122   (eval $ac_link) 2>&5
13123   ac_status=$?
13124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13125   (exit $ac_status); } &&
13126          { ac_try='test -s conftest$ac_exeext'
13127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13128   (eval $ac_try) 2>&5
13129   ac_status=$?
13130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13131   (exit $ac_status); }; }; then
13132   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
13133 else
13134   echo "$as_me: failed program was:" >&5
13135 cat conftest.$ac_ext >&5
13136 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
13137 fi
13138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13139 LIBS=$ac_check_lib_save_LIBS
13140 fi
13141 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
13142 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
13143 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
13144   cat >>confdefs.h <<\_ACEOF
13145 #define HAVE_CRAPPLET_IMMEDIATE 1
13146 _ACEOF
13147
13148 else
13149   true
13150 fi
13151
13152   CPPFLAGS="$ac_save_CPPFLAGS"
13153   LDFLAGS="$ac_save_LDFLAGS"
13154 #  LIBS="$ac_save_LIBS"
13155
13156   fi
13157
13158
13159   GNOME_DATADIR=""
13160   if test "$have_gtk" = yes; then
13161     if test -n "$pkg_config"; then
13162       if test "$have_gtk2" = yes; then
13163         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
13164       else
13165         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
13166       fi
13167     else
13168       GNOME_DATADIR=`$gtk_config --prefix`
13169     fi
13170     GNOME_DATADIR="$GNOME_DATADIR/share"
13171   fi
13172
13173   # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
13174   if test "$have_gtk2" = yes; then
13175     GNOME_PANELDIR='$(GNOME_PANELDIR2)'
13176   else
13177     GNOME_PANELDIR='$(GNOME_PANELDIR1)'
13178   fi
13179
13180
13181   if test "$have_gtk" = yes; then
13182     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
13183     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
13184     cat >>confdefs.h <<\_ACEOF
13185 #define HAVE_GTK 1
13186 _ACEOF
13187
13188
13189     if test "$have_gtk2" = yes; then
13190       GTK_EXTRA_OBJS=""
13191     else
13192       GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
13193     fi
13194   fi
13195
13196 fi
13197
13198
13199 # Check for the Gnome Help Browser.
13200 #
13201 if test "$have_gtk" = yes; then
13202   for ac_prog in yelp gnome-help-browser
13203 do
13204   # Extract the first word of "$ac_prog", so it can be a program name with args.
13205 set dummy $ac_prog; ac_word=$2
13206 echo "$as_me:$LINENO: checking for $ac_word" >&5
13207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13208 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
13209   echo $ECHO_N "(cached) $ECHO_C" >&6
13210 else
13211   if test -n "$have_gnome_help"; then
13212   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
13213 else
13214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13215 for as_dir in $PATH
13216 do
13217   IFS=$as_save_IFS
13218   test -z "$as_dir" && as_dir=.
13219   for ac_exec_ext in '' $ac_executable_extensions; do
13220   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13221     ac_cv_prog_have_gnome_help="$ac_prog"
13222     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13223     break 2
13224   fi
13225 done
13226 done
13227
13228 fi
13229 fi
13230 have_gnome_help=$ac_cv_prog_have_gnome_help
13231 if test -n "$have_gnome_help"; then
13232   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
13233 echo "${ECHO_T}$have_gnome_help" >&6
13234 else
13235   echo "$as_me:$LINENO: result: no" >&5
13236 echo "${ECHO_T}no" >&6
13237 fi
13238
13239   test -n "$have_gnome_help" && break
13240 done
13241 test -n "$have_gnome_help" || have_gnome_help="no"
13242
13243   if test "$have_gnome_help" != no; then
13244     have_gnome_help=yes
13245   fi
13246 fi
13247
13248
13249 ###############################################################################
13250 #
13251 #       Check for -lxml
13252 #
13253 ###############################################################################
13254
13255 have_xml=no
13256 with_xml_req=unspecified
13257 xml_halfassed=no
13258
13259 # Check whether --with-xml or --without-xml was given.
13260 if test "${with_xml+set}" = set; then
13261   withval="$with_xml"
13262   with_xml="$withval"; with_xml_req="$withval"
13263 else
13264   with_xml=yes
13265 fi;
13266
13267 # if --with-xml=/directory/ was specified, remember that directory so that
13268 # we can also look for the `xml-config' program in that directory.
13269 case "$with_xml" in
13270   /*)
13271     xml_dir="$with_xml"
13272     ;;
13273   *)
13274     xml_dir=""
13275     ;;
13276 esac
13277
13278
13279    case "$with_xml" in
13280     yes) ;;
13281     no)  ;;
13282
13283     /*)
13284      echo "$as_me:$LINENO: checking for XML headers" >&5
13285 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
13286      d=$with_xml/include
13287      if test -d $d; then
13288        X_CFLAGS="-I$d $X_CFLAGS"
13289        echo "$as_me:$LINENO: result: $d" >&5
13290 echo "${ECHO_T}$d" >&6
13291      else
13292        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13293 echo "${ECHO_T}not found ($d: no such directory)" >&6
13294      fi
13295
13296      echo "$as_me:$LINENO: checking for XML libs" >&5
13297 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13298      d=$with_xml/lib
13299      if test -d $d; then
13300        X_LIBS="-L$d $X_LIBS"
13301        echo "$as_me:$LINENO: result: $d" >&5
13302 echo "${ECHO_T}$d" >&6
13303      else
13304        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13305 echo "${ECHO_T}not found ($d: no such directory)" >&6
13306      fi
13307
13308      # replace the directory string with "yes".
13309      with_xml_req="yes"
13310      with_xml=$with_xml_req
13311      ;;
13312
13313     *)
13314      echo ""
13315      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
13316      echo "       If it is a directory, then \`DIR/include' will be added to"
13317      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13318      exit 1
13319      ;;
13320    esac
13321
13322
13323 if test "$with_xml" != yes -a "$with_xml" != no ; then
13324   echo "error: must be yes or no: --with-xml=$with_xml"
13325   exit 1
13326 fi
13327
13328 if test "$with_xml" = yes; then
13329   have_xml=no
13330   have_old_xml=no
13331
13332   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13333   # look in /foo/bin/ for for xml-config.
13334   #
13335   xml_path="$PATH"
13336
13337   if test ! -z "$gtk_dir"; then
13338     # canonicalize slashes.
13339     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13340     xml_path="$foo:$xml_path"
13341   fi
13342
13343   if test ! -z "$gnome_dir"; then
13344     # canonicalize slashes.
13345     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13346     xml_path="$foo:$xml_path"
13347   fi
13348
13349   if test -n "$pkg_config" ; then
13350     #
13351     # the new way...
13352     # run pkg-config based tests.
13353     #
13354     pkgs=""
13355     ok="yes"
13356
13357     # If we have Gtk 2.x, then *only* XML 2.x will work.
13358     # If we have Gtk 1.x, or don't have Gtk at all, then
13359     # either XML 1.x or 2.x will work.
13360
13361     # First check for XML 2.x.
13362     #
13363     pkg_check_version libxml-2.0 2.4.6
13364
13365     # If that didn't work (we don't have XML 2.x) and we *don't* have
13366     # Gtk 2.x, then check to see if we have XML 1.x
13367     #
13368     if test "$ok" = no -a "$have_gtk2" = no; then
13369       ok=yes
13370       pkg_check_version libxml 1.0
13371     fi
13372
13373     have_xml="$ok"
13374
13375     if test "$have_xml" = yes; then
13376       echo "$as_me:$LINENO: checking for XML includes" >&5
13377 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13378 if test "${ac_cv_xml_config_cflags+set}" = set; then
13379   echo $ECHO_N "(cached) $ECHO_C" >&6
13380 else
13381   ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
13382 fi
13383 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13384 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13385       echo "$as_me:$LINENO: checking for XML libs" >&5
13386 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13387 if test "${ac_cv_xml_config_libs+set}" = set; then
13388   echo $ECHO_N "(cached) $ECHO_C" >&6
13389 else
13390   ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
13391 fi
13392 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13393 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13394       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13395       ac_xml_config_libs=$ac_cv_xml_config_libs
13396     fi
13397
13398   else
13399     #
13400     # the old way...
13401     # run {xml2,xml}-config based tests.
13402     #
13403
13404     for ac_prog in xml2-config xml-config
13405 do
13406   # Extract the first word of "$ac_prog", so it can be a program name with args.
13407 set dummy $ac_prog; ac_word=$2
13408 echo "$as_me:$LINENO: checking for $ac_word" >&5
13409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13410 if test "${ac_cv_path_xml_config+set}" = set; then
13411   echo $ECHO_N "(cached) $ECHO_C" >&6
13412 else
13413   case $xml_config in
13414   [\\/]* | ?:[\\/]*)
13415   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
13416   ;;
13417   *)
13418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13419 for as_dir in $xml_path
13420 do
13421   IFS=$as_save_IFS
13422   test -z "$as_dir" && as_dir=.
13423   for ac_exec_ext in '' $ac_executable_extensions; do
13424   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13425     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
13426     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13427     break 2
13428   fi
13429 done
13430 done
13431
13432   ;;
13433 esac
13434 fi
13435 xml_config=$ac_cv_path_xml_config
13436
13437 if test -n "$xml_config"; then
13438   echo "$as_me:$LINENO: result: $xml_config" >&5
13439 echo "${ECHO_T}$xml_config" >&6
13440 else
13441   echo "$as_me:$LINENO: result: no" >&5
13442 echo "${ECHO_T}no" >&6
13443 fi
13444
13445   test -n "$xml_config" && break
13446 done
13447
13448
13449     # If we found the xml-config program, run it to get flags.
13450     #
13451     if test -n "$xml_config" ; then
13452       echo "$as_me:$LINENO: checking for XML includes" >&5
13453 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13454 if test "${ac_cv_xml_config_cflags+set}" = set; then
13455   echo $ECHO_N "(cached) $ECHO_C" >&6
13456 else
13457   ac_cv_xml_config_cflags=`$xml_config --cflags`
13458 fi
13459 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13460 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13461       echo "$as_me:$LINENO: checking for XML libs" >&5
13462 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13463 if test "${ac_cv_xml_config_libs+set}" = set; then
13464   echo $ECHO_N "(cached) $ECHO_C" >&6
13465 else
13466   ac_cv_xml_config_libs=`$xml_config --libs`
13467 fi
13468 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13469 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13470       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13471       ac_xml_config_libs=$ac_cv_xml_config_libs
13472     fi
13473
13474     ac_save_xml_CPPFLAGS="$CPPFLAGS"
13475     CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
13476
13477     # first try <libxml/parser.h> which is the new way...
13478     #
13479
13480   ac_save_CPPFLAGS="$CPPFLAGS"
13481   if test \! -z "$includedir" ; then
13482     CPPFLAGS="$CPPFLAGS -I$includedir"
13483   fi
13484   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13485   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
13486 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
13487 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
13488   echo $ECHO_N "(cached) $ECHO_C" >&6
13489 else
13490   cat >conftest.$ac_ext <<_ACEOF
13491 #line $LINENO "configure"
13492 #include "confdefs.h"
13493 #include <libxml/parser.h>
13494
13495 #include <libxml/xmlIO.h>
13496 _ACEOF
13497 rm -f conftest.$ac_objext
13498 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13499   (eval $ac_compile) 2>&5
13500   ac_status=$?
13501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13502   (exit $ac_status); } &&
13503          { ac_try='test -s conftest.$ac_objext'
13504   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13505   (eval $ac_try) 2>&5
13506   ac_status=$?
13507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13508   (exit $ac_status); }; }; then
13509   ac_cv_header_libxml_xmlIO_h=yes
13510 else
13511   echo "$as_me: failed program was:" >&5
13512 cat conftest.$ac_ext >&5
13513 ac_cv_header_libxml_xmlIO_h=no
13514 fi
13515 rm -f conftest.$ac_objext conftest.$ac_ext
13516 fi
13517 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
13518 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
13519 if test $ac_cv_header_libxml_xmlIO_h = yes; then
13520   have_xml=yes
13521 fi
13522
13523
13524   CPPFLAGS="$ac_save_CPPFLAGS"
13525
13526     # if that didn't work, then try just <parser.h> which is the old way...
13527     #
13528     if test "$have_xml" = no; then
13529
13530   ac_save_CPPFLAGS="$CPPFLAGS"
13531   if test \! -z "$includedir" ; then
13532     CPPFLAGS="$CPPFLAGS -I$includedir"
13533   fi
13534   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13535   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
13536 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
13537 if test "${ac_cv_header_xmlIO_h+set}" = set; then
13538   echo $ECHO_N "(cached) $ECHO_C" >&6
13539 else
13540   cat >conftest.$ac_ext <<_ACEOF
13541 #line $LINENO "configure"
13542 #include "confdefs.h"
13543 #include <parser.h>
13544
13545 #include <xmlIO.h>
13546 _ACEOF
13547 rm -f conftest.$ac_objext
13548 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13549   (eval $ac_compile) 2>&5
13550   ac_status=$?
13551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13552   (exit $ac_status); } &&
13553          { ac_try='test -s conftest.$ac_objext'
13554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13555   (eval $ac_try) 2>&5
13556   ac_status=$?
13557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13558   (exit $ac_status); }; }; then
13559   ac_cv_header_xmlIO_h=yes
13560 else
13561   echo "$as_me: failed program was:" >&5
13562 cat conftest.$ac_ext >&5
13563 ac_cv_header_xmlIO_h=no
13564 fi
13565 rm -f conftest.$ac_objext conftest.$ac_ext
13566 fi
13567 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
13568 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
13569 if test $ac_cv_header_xmlIO_h = yes; then
13570   have_xml=yes; have_old_xml=yes
13571 fi
13572
13573
13574   CPPFLAGS="$ac_save_CPPFLAGS"
13575     fi
13576
13577     CPPFLAGS="$ac_save_xml_CPPFLAGS"
13578   fi
13579
13580
13581   have_zlib=no
13582   if test "$have_xml" = yes; then
13583     # we have the XML headers; now make sure zlib is around.
13584     # yes, it's stupid we have to do this too, but there is
13585     # dependency screwage in Gnome.
13586
13587   ac_save_CPPFLAGS="$CPPFLAGS"
13588   ac_save_LDFLAGS="$LDFLAGS"
13589 #  ac_save_LIBS="$LIBS"
13590
13591   if test \! -z "$includedir" ; then
13592     CPPFLAGS="$CPPFLAGS -I$includedir"
13593   fi
13594   # note: $X_CFLAGS includes $x_includes
13595   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13596
13597   if test \! -z "$libdir" ; then
13598     LDFLAGS="$LDFLAGS -L$libdir"
13599   fi
13600   # note: $X_LIBS includes $x_libraries
13601   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13602
13603   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
13604 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
13605 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
13606   echo $ECHO_N "(cached) $ECHO_C" >&6
13607 else
13608   ac_check_lib_save_LIBS=$LIBS
13609 LIBS="-lz  $LIBS"
13610 cat >conftest.$ac_ext <<_ACEOF
13611 #line $LINENO "configure"
13612 #include "confdefs.h"
13613
13614 /* Override any gcc2 internal prototype to avoid an error.  */
13615 #ifdef __cplusplus
13616 extern "C"
13617 #endif
13618 /* We use char because int might match the return type of a gcc2
13619    builtin and then its argument prototype would still apply.  */
13620 char zlibVersion ();
13621 #ifdef F77_DUMMY_MAIN
13622 #  ifdef __cplusplus
13623      extern "C"
13624 #  endif
13625    int F77_DUMMY_MAIN() { return 1; }
13626 #endif
13627 int
13628 main ()
13629 {
13630 zlibVersion ();
13631   ;
13632   return 0;
13633 }
13634 _ACEOF
13635 rm -f conftest.$ac_objext conftest$ac_exeext
13636 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13637   (eval $ac_link) 2>&5
13638   ac_status=$?
13639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13640   (exit $ac_status); } &&
13641          { ac_try='test -s conftest$ac_exeext'
13642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13643   (eval $ac_try) 2>&5
13644   ac_status=$?
13645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13646   (exit $ac_status); }; }; then
13647   ac_cv_lib_z_zlibVersion=yes
13648 else
13649   echo "$as_me: failed program was:" >&5
13650 cat conftest.$ac_ext >&5
13651 ac_cv_lib_z_zlibVersion=no
13652 fi
13653 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13654 LIBS=$ac_check_lib_save_LIBS
13655 fi
13656 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
13657 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
13658 if test $ac_cv_lib_z_zlibVersion = yes; then
13659   have_zlib=yes
13660 fi
13661
13662   CPPFLAGS="$ac_save_CPPFLAGS"
13663   LDFLAGS="$ac_save_LDFLAGS"
13664 #  LIBS="$ac_save_LIBS"
13665
13666     if test "$have_zlib" = no; then
13667       xml_halfassed=yes
13668       have_xml=no
13669     fi
13670   fi
13671
13672   if test "$have_xml" = yes; then
13673     # we have the header, now check for the library
13674     have_xml=no
13675     xml_halfassed=yes
13676
13677   ac_save_CPPFLAGS="$CPPFLAGS"
13678   ac_save_LDFLAGS="$LDFLAGS"
13679 #  ac_save_LIBS="$LIBS"
13680
13681   if test \! -z "$includedir" ; then
13682     CPPFLAGS="$CPPFLAGS -I$includedir"
13683   fi
13684   # note: $X_CFLAGS includes $x_includes
13685   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13686
13687   if test \! -z "$libdir" ; then
13688     LDFLAGS="$LDFLAGS -L$libdir"
13689   fi
13690   # note: $X_LIBS includes $x_libraries
13691   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13692
13693   echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
13694 echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
13695 if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
13696   echo $ECHO_N "(cached) $ECHO_C" >&6
13697 else
13698   ac_check_lib_save_LIBS=$LIBS
13699 LIBS="-lc $ac_xml_config_libs $LIBS"
13700 cat >conftest.$ac_ext <<_ACEOF
13701 #line $LINENO "configure"
13702 #include "confdefs.h"
13703
13704 /* Override any gcc2 internal prototype to avoid an error.  */
13705 #ifdef __cplusplus
13706 extern "C"
13707 #endif
13708 /* We use char because int might match the return type of a gcc2
13709    builtin and then its argument prototype would still apply.  */
13710 char xmlParseChunk ();
13711 #ifdef F77_DUMMY_MAIN
13712 #  ifdef __cplusplus
13713      extern "C"
13714 #  endif
13715    int F77_DUMMY_MAIN() { return 1; }
13716 #endif
13717 int
13718 main ()
13719 {
13720 xmlParseChunk ();
13721   ;
13722   return 0;
13723 }
13724 _ACEOF
13725 rm -f conftest.$ac_objext conftest$ac_exeext
13726 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13727   (eval $ac_link) 2>&5
13728   ac_status=$?
13729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13730   (exit $ac_status); } &&
13731          { ac_try='test -s conftest$ac_exeext'
13732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13733   (eval $ac_try) 2>&5
13734   ac_status=$?
13735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13736   (exit $ac_status); }; }; then
13737   ac_cv_lib_c_xmlParseChunk=yes
13738 else
13739   echo "$as_me: failed program was:" >&5
13740 cat conftest.$ac_ext >&5
13741 ac_cv_lib_c_xmlParseChunk=no
13742 fi
13743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13744 LIBS=$ac_check_lib_save_LIBS
13745 fi
13746 echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
13747 echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
13748 if test $ac_cv_lib_c_xmlParseChunk = yes; then
13749   have_xml=yes
13750                     xml_halfassed=no
13751                     XML_LIBS="$ac_xml_config_libs"
13752                     cat >>confdefs.h <<\_ACEOF
13753 #define HAVE_XML 1
13754 _ACEOF
13755
13756 else
13757   true
13758 fi
13759
13760   CPPFLAGS="$ac_save_CPPFLAGS"
13761   LDFLAGS="$ac_save_LDFLAGS"
13762 #  LIBS="$ac_save_LIBS"
13763
13764   fi
13765
13766   if test "$have_xml" = yes; then
13767     INCLUDES="$INCLUDES $ac_xml_config_cflags"
13768     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
13769     cat >>confdefs.h <<\_ACEOF
13770 #define HAVE_XML 1
13771 _ACEOF
13772
13773     if test "$have_old_xml" = yes; then
13774       cat >>confdefs.h <<\_ACEOF
13775 #define HAVE_OLD_XML_HEADERS 1
13776 _ACEOF
13777
13778     fi
13779   fi
13780
13781 fi
13782
13783
13784 ###############################################################################
13785 #
13786 #       Checking whether Motif is really Lesstif.
13787 #
13788 ###############################################################################
13789
13790 have_lesstif=no
13791 if test "$have_motif" = yes ; then
13792   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
13793 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
13794 if test "${ac_cv_have_lesstif+set}" = set; then
13795   echo $ECHO_N "(cached) $ECHO_C" >&6
13796 else
13797
13798   ac_save_CPPFLAGS="$CPPFLAGS"
13799   if test \! -z "$includedir" ; then
13800     CPPFLAGS="$CPPFLAGS -I$includedir"
13801   fi
13802   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13803   cat >conftest.$ac_ext <<_ACEOF
13804 #line $LINENO "configure"
13805 #include "confdefs.h"
13806 #include <Xm/Xm.h>
13807 #ifdef F77_DUMMY_MAIN
13808 #  ifdef __cplusplus
13809      extern "C"
13810 #  endif
13811    int F77_DUMMY_MAIN() { return 1; }
13812 #endif
13813 int
13814 main ()
13815 {
13816 long vers = LesstifVersion;
13817   ;
13818   return 0;
13819 }
13820 _ACEOF
13821 rm -f conftest.$ac_objext
13822 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13823   (eval $ac_compile) 2>&5
13824   ac_status=$?
13825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13826   (exit $ac_status); } &&
13827          { ac_try='test -s conftest.$ac_objext'
13828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13829   (eval $ac_try) 2>&5
13830   ac_status=$?
13831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13832   (exit $ac_status); }; }; then
13833   ac_cv_have_lesstif=yes
13834 else
13835   echo "$as_me: failed program was:" >&5
13836 cat conftest.$ac_ext >&5
13837 ac_cv_have_lesstif=no
13838 fi
13839 rm -f conftest.$ac_objext conftest.$ac_ext
13840   CPPFLAGS="$ac_save_CPPFLAGS"
13841 fi
13842 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
13843 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
13844   have_lesstif=$ac_cv_have_lesstif
13845 fi
13846
13847
13848 lesstif_version=unknown
13849 lesstif_version_string=unknown
13850
13851 if test "$have_lesstif" = yes ; then
13852   ltv=unknown
13853   echo unknown > conftest-lt
13854   echo "$as_me:$LINENO: checking LessTif version number" >&5
13855 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
13856 if test "${ac_cv_lesstif_version_string+set}" = set; then
13857   echo $ECHO_N "(cached) $ECHO_C" >&6
13858 else
13859
13860   ac_save_CPPFLAGS="$CPPFLAGS"
13861   if test \! -z "$includedir" ; then
13862     CPPFLAGS="$CPPFLAGS -I$includedir"
13863   fi
13864   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13865   if test "$cross_compiling" = yes; then
13866   ac_cv_lesstif_version=unknown
13867                      ac_cv_lesstif_version_string=unknown
13868 else
13869   cat >conftest.$ac_ext <<_ACEOF
13870 #line $LINENO "configure"
13871 #include "confdefs.h"
13872 #include <stdio.h>
13873                      #include <Xm/Xm.h>
13874                      int main() {
13875                        FILE *f = fopen("conftest-lt", "w");
13876                        if (!f) exit(1);
13877                        fprintf(f, "%d %d.%d\n", LesstifVersion,
13878                           LESSTIF_VERSION, LESSTIF_REVISION);
13879                        fclose(f);
13880                        exit(0);
13881                      }
13882 _ACEOF
13883 rm -f conftest$ac_exeext
13884 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13885   (eval $ac_link) 2>&5
13886   ac_status=$?
13887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13888   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13890   (eval $ac_try) 2>&5
13891   ac_status=$?
13892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13893   (exit $ac_status); }; }; then
13894   ltv=`cat conftest-lt`
13895                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
13896                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
13897 else
13898   echo "$as_me: program exited with status $ac_status" >&5
13899 echo "$as_me: failed program was:" >&5
13900 cat conftest.$ac_ext >&5
13901 ( exit $ac_status )
13902 ac_cv_lesstif_version=unknown
13903                      ac_cv_lesstif_version_string=unknown
13904 fi
13905 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13906 fi
13907   CPPFLAGS="$ac_save_CPPFLAGS"
13908 fi
13909 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
13910 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
13911   rm -f conftest-lt
13912   lesstif_version=$ac_cv_lesstif_version
13913   lesstif_version_string=$ac_cv_lesstif_version_string
13914
13915 fi
13916
13917
13918 if test "$have_motif" = yes ; then
13919   mtv=unknown
13920   echo unknown > conftest-mt
13921   echo "$as_me:$LINENO: checking Motif version number" >&5
13922 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
13923 if test "${ac_cv_motif_version_string+set}" = set; then
13924   echo $ECHO_N "(cached) $ECHO_C" >&6
13925 else
13926
13927   ac_save_CPPFLAGS="$CPPFLAGS"
13928   if test \! -z "$includedir" ; then
13929     CPPFLAGS="$CPPFLAGS -I$includedir"
13930   fi
13931   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13932   if test "$cross_compiling" = yes; then
13933   ac_cv_motif_version=unknown
13934                      ac_cv_motif_version_string=unknown
13935 else
13936   cat >conftest.$ac_ext <<_ACEOF
13937 #line $LINENO "configure"
13938 #include "confdefs.h"
13939 #include <stdio.h>
13940                      #include <Xm/Xm.h>
13941                      int main() {
13942                        FILE *f = fopen("conftest-mt", "w");
13943                        if (!f) exit(1);
13944                        fprintf(f, "%d %d.%d\n", XmVersion,
13945                           XmVERSION, XmREVISION);
13946                        fclose(f);
13947                        exit(0);
13948                      }
13949 _ACEOF
13950 rm -f conftest$ac_exeext
13951 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13952   (eval $ac_link) 2>&5
13953   ac_status=$?
13954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13955   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13957   (eval $ac_try) 2>&5
13958   ac_status=$?
13959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13960   (exit $ac_status); }; }; then
13961   mtv=`cat conftest-mt`
13962                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
13963                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
13964 else
13965   echo "$as_me: program exited with status $ac_status" >&5
13966 echo "$as_me: failed program was:" >&5
13967 cat conftest.$ac_ext >&5
13968 ( exit $ac_status )
13969 ac_cv_motif_version=unknown
13970                      ac_cv_motif_version_string=unknown
13971 fi
13972 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13973 fi
13974   CPPFLAGS="$ac_save_CPPFLAGS"
13975 fi
13976 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
13977 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
13978   rm -f conftest-mt
13979   motif_version=$ac_cv_motif_version
13980   motif_version_string=$ac_cv_motif_version_string
13981
13982 fi
13983
13984
13985 ###############################################################################
13986 #
13987 #       Checking whether Motif requires -lXpm.
13988 #
13989 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
13990 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
13991 #       of the library whether to build the XPM code into libXm, or whether
13992 #       to rely on an external libXm.  So the only way to tell whether XPM is
13993 #       a link-time requirement is to examine libXm.a, which is very
13994 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
13995 #       always link against XPM if the XPM lib exists (and this will be a
13996 #       no-op if libXm happens to already have the XPM code in it.)
13997 #
13998 ###############################################################################
13999
14000 motif_requires_xpm=no
14001 if test "$have_motif" = yes ; then
14002    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
14003 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
14004    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
14005    then
14006      motif_requires_xpm=yes
14007      echo "$as_me:$LINENO: result: maybe" >&5
14008 echo "${ECHO_T}maybe" >&6
14009    else
14010      echo "$as_me:$LINENO: result: no" >&5
14011 echo "${ECHO_T}no" >&6
14012    fi
14013 fi
14014
14015
14016 ###############################################################################
14017 #
14018 #       Checking whether Motif requires -lXp.
14019 #
14020 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
14021 #       Extension".   Why this extension isn't in -lXext with all the others,
14022 #       I have no idea.
14023 #
14024 ###############################################################################
14025
14026 have_xp_ext=no
14027 if test "$have_motif" = yes ; then
14028    have_xp_ext=no
14029
14030   ac_save_CPPFLAGS="$CPPFLAGS"
14031   ac_save_LDFLAGS="$LDFLAGS"
14032 #  ac_save_LIBS="$LIBS"
14033
14034   if test \! -z "$includedir" ; then
14035     CPPFLAGS="$CPPFLAGS -I$includedir"
14036   fi
14037   # note: $X_CFLAGS includes $x_includes
14038   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14039
14040   if test \! -z "$libdir" ; then
14041     LDFLAGS="$LDFLAGS -L$libdir"
14042   fi
14043   # note: $X_LIBS includes $x_libraries
14044   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14045
14046   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
14047 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
14048 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
14049   echo $ECHO_N "(cached) $ECHO_C" >&6
14050 else
14051   ac_check_lib_save_LIBS=$LIBS
14052 LIBS="-lXp -lX11 -lXext -lm $LIBS"
14053 cat >conftest.$ac_ext <<_ACEOF
14054 #line $LINENO "configure"
14055 #include "confdefs.h"
14056
14057 /* Override any gcc2 internal prototype to avoid an error.  */
14058 #ifdef __cplusplus
14059 extern "C"
14060 #endif
14061 /* We use char because int might match the return type of a gcc2
14062    builtin and then its argument prototype would still apply.  */
14063 char XpQueryExtension ();
14064 #ifdef F77_DUMMY_MAIN
14065 #  ifdef __cplusplus
14066      extern "C"
14067 #  endif
14068    int F77_DUMMY_MAIN() { return 1; }
14069 #endif
14070 int
14071 main ()
14072 {
14073 XpQueryExtension ();
14074   ;
14075   return 0;
14076 }
14077 _ACEOF
14078 rm -f conftest.$ac_objext conftest$ac_exeext
14079 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14080   (eval $ac_link) 2>&5
14081   ac_status=$?
14082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14083   (exit $ac_status); } &&
14084          { ac_try='test -s conftest$ac_exeext'
14085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14086   (eval $ac_try) 2>&5
14087   ac_status=$?
14088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14089   (exit $ac_status); }; }; then
14090   ac_cv_lib_Xp_XpQueryExtension=yes
14091 else
14092   echo "$as_me: failed program was:" >&5
14093 cat conftest.$ac_ext >&5
14094 ac_cv_lib_Xp_XpQueryExtension=no
14095 fi
14096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14097 LIBS=$ac_check_lib_save_LIBS
14098 fi
14099 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
14100 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
14101 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
14102   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
14103 else
14104   true
14105 fi
14106
14107   CPPFLAGS="$ac_save_CPPFLAGS"
14108   LDFLAGS="$ac_save_LDFLAGS"
14109 #  LIBS="$ac_save_LIBS"
14110
14111 fi
14112
14113
14114 ###############################################################################
14115 #
14116 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
14117 #
14118 ###############################################################################
14119
14120 have_xintl=no
14121 if test "$have_motif" = yes ; then
14122
14123   ac_save_CPPFLAGS="$CPPFLAGS"
14124   ac_save_LDFLAGS="$LDFLAGS"
14125 #  ac_save_LIBS="$LIBS"
14126
14127   if test \! -z "$includedir" ; then
14128     CPPFLAGS="$CPPFLAGS -I$includedir"
14129   fi
14130   # note: $X_CFLAGS includes $x_includes
14131   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14132
14133   if test \! -z "$libdir" ; then
14134     LDFLAGS="$LDFLAGS -L$libdir"
14135   fi
14136   # note: $X_LIBS includes $x_libraries
14137   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14138
14139   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
14140 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
14141 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
14142   echo $ECHO_N "(cached) $ECHO_C" >&6
14143 else
14144   ac_check_lib_save_LIBS=$LIBS
14145 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
14146 cat >conftest.$ac_ext <<_ACEOF
14147 #line $LINENO "configure"
14148 #include "confdefs.h"
14149
14150 /* Override any gcc2 internal prototype to avoid an error.  */
14151 #ifdef __cplusplus
14152 extern "C"
14153 #endif
14154 /* We use char because int might match the return type of a gcc2
14155    builtin and then its argument prototype would still apply.  */
14156 char _Xsetlocale ();
14157 #ifdef F77_DUMMY_MAIN
14158 #  ifdef __cplusplus
14159      extern "C"
14160 #  endif
14161    int F77_DUMMY_MAIN() { return 1; }
14162 #endif
14163 int
14164 main ()
14165 {
14166 _Xsetlocale ();
14167   ;
14168   return 0;
14169 }
14170 _ACEOF
14171 rm -f conftest.$ac_objext conftest$ac_exeext
14172 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14173   (eval $ac_link) 2>&5
14174   ac_status=$?
14175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14176   (exit $ac_status); } &&
14177          { ac_try='test -s conftest$ac_exeext'
14178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14179   (eval $ac_try) 2>&5
14180   ac_status=$?
14181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14182   (exit $ac_status); }; }; then
14183   ac_cv_lib_Xintl__Xsetlocale=yes
14184 else
14185   echo "$as_me: failed program was:" >&5
14186 cat conftest.$ac_ext >&5
14187 ac_cv_lib_Xintl__Xsetlocale=no
14188 fi
14189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14190 LIBS=$ac_check_lib_save_LIBS
14191 fi
14192 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
14193 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
14194 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
14195   have_xintl=yes
14196 else
14197   have_xintl=no
14198 fi
14199
14200   CPPFLAGS="$ac_save_CPPFLAGS"
14201   LDFLAGS="$ac_save_LDFLAGS"
14202 #  LIBS="$ac_save_LIBS"
14203
14204   if test "$have_xintl" = yes; then
14205     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
14206   fi
14207 fi
14208
14209
14210 ###############################################################################
14211 #
14212 #       Check for -lGL or -lMesaGL.
14213 #
14214 ###############################################################################
14215
14216 have_gl=no
14217 ac_have_mesa_gl=no
14218 with_gl_req=unspecified
14219 gl_halfassed=no
14220
14221 # Check whether --with-gl or --without-gl was given.
14222 if test "${with_gl+set}" = set; then
14223   withval="$with_gl"
14224   with_gl="$withval"; with_gl_req="$withval"
14225 else
14226   with_gl=yes
14227 fi;
14228
14229
14230    case "$with_gl" in
14231     yes) ;;
14232     no)  ;;
14233
14234     /*)
14235      echo "$as_me:$LINENO: checking for GL headers" >&5
14236 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
14237      d=$with_gl/include
14238      if test -d $d; then
14239        X_CFLAGS="-I$d $X_CFLAGS"
14240        echo "$as_me:$LINENO: result: $d" >&5
14241 echo "${ECHO_T}$d" >&6
14242      else
14243        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14244 echo "${ECHO_T}not found ($d: no such directory)" >&6
14245      fi
14246
14247      echo "$as_me:$LINENO: checking for GL libs" >&5
14248 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
14249      d=$with_gl/lib
14250      if test -d $d; then
14251        X_LIBS="-L$d $X_LIBS"
14252        echo "$as_me:$LINENO: result: $d" >&5
14253 echo "${ECHO_T}$d" >&6
14254      else
14255        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14256 echo "${ECHO_T}not found ($d: no such directory)" >&6
14257      fi
14258
14259      # replace the directory string with "yes".
14260      with_gl_req="yes"
14261      with_gl=$with_gl_req
14262      ;;
14263
14264     *)
14265      echo ""
14266      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
14267      echo "       If it is a directory, then \`DIR/include' will be added to"
14268      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14269      exit 1
14270      ;;
14271    esac
14272
14273
14274 ac_mesagl_version=unknown
14275 ac_mesagl_version_string=unknown
14276
14277 if test "$with_gl" = yes; then
14278
14279   ac_save_CPPFLAGS="$CPPFLAGS"
14280   if test \! -z "$includedir" ; then
14281     CPPFLAGS="$CPPFLAGS -I$includedir"
14282   fi
14283   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14284   if test "${ac_cv_header_GL_gl_h+set}" = set; then
14285   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14286 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14287 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14288   echo $ECHO_N "(cached) $ECHO_C" >&6
14289 fi
14290 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14291 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14292 else
14293   # Is the header compilable?
14294 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
14295 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
14296 cat >conftest.$ac_ext <<_ACEOF
14297 #line $LINENO "configure"
14298 #include "confdefs.h"
14299 $ac_includes_default
14300 #include <GL/gl.h>
14301 _ACEOF
14302 rm -f conftest.$ac_objext
14303 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14304   (eval $ac_compile) 2>&5
14305   ac_status=$?
14306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14307   (exit $ac_status); } &&
14308          { ac_try='test -s conftest.$ac_objext'
14309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14310   (eval $ac_try) 2>&5
14311   ac_status=$?
14312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14313   (exit $ac_status); }; }; then
14314   ac_header_compiler=yes
14315 else
14316   echo "$as_me: failed program was:" >&5
14317 cat conftest.$ac_ext >&5
14318 ac_header_compiler=no
14319 fi
14320 rm -f conftest.$ac_objext conftest.$ac_ext
14321 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14322 echo "${ECHO_T}$ac_header_compiler" >&6
14323
14324 # Is the header present?
14325 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
14326 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
14327 cat >conftest.$ac_ext <<_ACEOF
14328 #line $LINENO "configure"
14329 #include "confdefs.h"
14330 #include <GL/gl.h>
14331 _ACEOF
14332 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14333   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14334   ac_status=$?
14335   egrep -v '^ *\+' conftest.er1 >conftest.err
14336   rm -f conftest.er1
14337   cat conftest.err >&5
14338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14339   (exit $ac_status); } >/dev/null; then
14340   if test -s conftest.err; then
14341     ac_cpp_err=$ac_c_preproc_warn_flag
14342   else
14343     ac_cpp_err=
14344   fi
14345 else
14346   ac_cpp_err=yes
14347 fi
14348 if test -z "$ac_cpp_err"; then
14349   ac_header_preproc=yes
14350 else
14351   echo "$as_me: failed program was:" >&5
14352   cat conftest.$ac_ext >&5
14353   ac_header_preproc=no
14354 fi
14355 rm -f conftest.err conftest.$ac_ext
14356 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14357 echo "${ECHO_T}$ac_header_preproc" >&6
14358
14359 # So?  What about this header?
14360 case $ac_header_compiler:$ac_header_preproc in
14361   yes:no )
14362     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
14363 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14364     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14365 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
14366   no:yes )
14367     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
14368 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
14369     { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
14370 echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
14371     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14372 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
14373 esac
14374 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14375 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14376 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14377   echo $ECHO_N "(cached) $ECHO_C" >&6
14378 else
14379   ac_cv_header_GL_gl_h=$ac_header_preproc
14380 fi
14381 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14382 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14383
14384 fi
14385 if test $ac_cv_header_GL_gl_h = yes; then
14386   have_gl=yes
14387 else
14388   have_gl=no
14389 fi
14390
14391
14392   CPPFLAGS="$ac_save_CPPFLAGS"
14393   if test "$have_gl" = yes ; then
14394
14395   ac_save_CPPFLAGS="$CPPFLAGS"
14396   if test \! -z "$includedir" ; then
14397     CPPFLAGS="$CPPFLAGS -I$includedir"
14398   fi
14399   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14400   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
14401 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
14402 if test "${ac_cv_header_GL_glx_h+set}" = set; then
14403   echo $ECHO_N "(cached) $ECHO_C" >&6
14404 else
14405   cat >conftest.$ac_ext <<_ACEOF
14406 #line $LINENO "configure"
14407 #include "confdefs.h"
14408 #include <GL/gl.h>
14409
14410 #include <GL/glx.h>
14411 _ACEOF
14412 rm -f conftest.$ac_objext
14413 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14414   (eval $ac_compile) 2>&5
14415   ac_status=$?
14416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14417   (exit $ac_status); } &&
14418          { ac_try='test -s conftest.$ac_objext'
14419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14420   (eval $ac_try) 2>&5
14421   ac_status=$?
14422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14423   (exit $ac_status); }; }; then
14424   ac_cv_header_GL_glx_h=yes
14425 else
14426   echo "$as_me: failed program was:" >&5
14427 cat conftest.$ac_ext >&5
14428 ac_cv_header_GL_glx_h=no
14429 fi
14430 rm -f conftest.$ac_objext conftest.$ac_ext
14431 fi
14432 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
14433 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
14434 if test $ac_cv_header_GL_glx_h = yes; then
14435   have_gl=yes
14436 else
14437   have_gl=no
14438 fi
14439
14440
14441   CPPFLAGS="$ac_save_CPPFLAGS"
14442   fi
14443
14444   # If we have the headers, try and figure out which vendor it's from.
14445   #
14446   if test "$have_gl" = yes ; then
14447
14448     # We need to know whether it's MesaGL so that we know which libraries
14449     # to link against.
14450     #
14451     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
14452 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
14453 if test "${ac_cv_have_mesa_gl+set}" = set; then
14454   echo $ECHO_N "(cached) $ECHO_C" >&6
14455 else
14456   ac_cv_have_mesa_gl=no
14457
14458   ac_save_CPPFLAGS="$CPPFLAGS"
14459   if test \! -z "$includedir" ; then
14460     CPPFLAGS="$CPPFLAGS -I$includedir"
14461   fi
14462   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14463   cat >conftest.$ac_ext <<_ACEOF
14464 #line $LINENO "configure"
14465 #include "confdefs.h"
14466 #include <GL/glx.h>
14467
14468 _ACEOF
14469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14470   egrep "Mesa|MESA" >/dev/null 2>&1; then
14471   ac_cv_have_mesa_gl=yes
14472 fi
14473 rm -f conftest*
14474
14475   CPPFLAGS="$ac_save_CPPFLAGS"
14476
14477 fi
14478 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
14479 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
14480     ac_have_mesa_gl=$ac_cv_have_mesa_gl
14481
14482
14483     gl_lib_1=""
14484     GL_LIBS=""
14485
14486
14487     # Some versions of MesaGL are compiled to require -lpthread.
14488     # So if the Mesa headers exist, and -lpthread exists, then always
14489     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
14490     #
14491     if test "$ac_have_mesa_gl" = yes; then
14492       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14493 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
14494 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
14495   echo $ECHO_N "(cached) $ECHO_C" >&6
14496 else
14497   ac_check_lib_save_LIBS=$LIBS
14498 LIBS="-lpthread  $LIBS"
14499 cat >conftest.$ac_ext <<_ACEOF
14500 #line $LINENO "configure"
14501 #include "confdefs.h"
14502
14503 /* Override any gcc2 internal prototype to avoid an error.  */
14504 #ifdef __cplusplus
14505 extern "C"
14506 #endif
14507 /* We use char because int might match the return type of a gcc2
14508    builtin and then its argument prototype would still apply.  */
14509 char pthread_create ();
14510 #ifdef F77_DUMMY_MAIN
14511 #  ifdef __cplusplus
14512      extern "C"
14513 #  endif
14514    int F77_DUMMY_MAIN() { return 1; }
14515 #endif
14516 int
14517 main ()
14518 {
14519 pthread_create ();
14520   ;
14521   return 0;
14522 }
14523 _ACEOF
14524 rm -f conftest.$ac_objext conftest$ac_exeext
14525 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14526   (eval $ac_link) 2>&5
14527   ac_status=$?
14528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14529   (exit $ac_status); } &&
14530          { ac_try='test -s conftest$ac_exeext'
14531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14532   (eval $ac_try) 2>&5
14533   ac_status=$?
14534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14535   (exit $ac_status); }; }; then
14536   ac_cv_lib_pthread_pthread_create=yes
14537 else
14538   echo "$as_me: failed program was:" >&5
14539 cat conftest.$ac_ext >&5
14540 ac_cv_lib_pthread_pthread_create=no
14541 fi
14542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14543 LIBS=$ac_check_lib_save_LIBS
14544 fi
14545 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
14546 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
14547 if test $ac_cv_lib_pthread_pthread_create = yes; then
14548   GL_LIBS="-lpthread"
14549 fi
14550
14551     fi
14552
14553
14554     # If we have Mesa headers, check to see if we can link against -lMesaGL.
14555     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
14556     # Else, warn that GL is busted.  (We have the headers, but no libs.)
14557     #
14558
14559     if test "$ac_have_mesa_gl" = yes ; then
14560
14561   ac_save_CPPFLAGS="$CPPFLAGS"
14562   ac_save_LDFLAGS="$LDFLAGS"
14563 #  ac_save_LIBS="$LIBS"
14564
14565   if test \! -z "$includedir" ; then
14566     CPPFLAGS="$CPPFLAGS -I$includedir"
14567   fi
14568   # note: $X_CFLAGS includes $x_includes
14569   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14570
14571   if test \! -z "$libdir" ; then
14572     LDFLAGS="$LDFLAGS -L$libdir"
14573   fi
14574   # note: $X_LIBS includes $x_libraries
14575   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14576
14577   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
14578 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
14579 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
14580   echo $ECHO_N "(cached) $ECHO_C" >&6
14581 else
14582   ac_check_lib_save_LIBS=$LIBS
14583 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14584 cat >conftest.$ac_ext <<_ACEOF
14585 #line $LINENO "configure"
14586 #include "confdefs.h"
14587
14588 /* Override any gcc2 internal prototype to avoid an error.  */
14589 #ifdef __cplusplus
14590 extern "C"
14591 #endif
14592 /* We use char because int might match the return type of a gcc2
14593    builtin and then its argument prototype would still apply.  */
14594 char glXCreateContext ();
14595 #ifdef F77_DUMMY_MAIN
14596 #  ifdef __cplusplus
14597      extern "C"
14598 #  endif
14599    int F77_DUMMY_MAIN() { return 1; }
14600 #endif
14601 int
14602 main ()
14603 {
14604 glXCreateContext ();
14605   ;
14606   return 0;
14607 }
14608 _ACEOF
14609 rm -f conftest.$ac_objext conftest$ac_exeext
14610 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14611   (eval $ac_link) 2>&5
14612   ac_status=$?
14613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14614   (exit $ac_status); } &&
14615          { ac_try='test -s conftest$ac_exeext'
14616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14617   (eval $ac_try) 2>&5
14618   ac_status=$?
14619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14620   (exit $ac_status); }; }; then
14621   ac_cv_lib_MesaGL_glXCreateContext=yes
14622 else
14623   echo "$as_me: failed program was:" >&5
14624 cat conftest.$ac_ext >&5
14625 ac_cv_lib_MesaGL_glXCreateContext=no
14626 fi
14627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14628 LIBS=$ac_check_lib_save_LIBS
14629 fi
14630 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
14631 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
14632 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
14633   gl_lib_1="MesaGL"
14634                       GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
14635 fi
14636
14637   CPPFLAGS="$ac_save_CPPFLAGS"
14638   LDFLAGS="$ac_save_LDFLAGS"
14639 #  LIBS="$ac_save_LIBS"
14640
14641     fi
14642
14643     if test "$gl_lib_1" = "" ; then
14644
14645   ac_save_CPPFLAGS="$CPPFLAGS"
14646   ac_save_LDFLAGS="$LDFLAGS"
14647 #  ac_save_LIBS="$LIBS"
14648
14649   if test \! -z "$includedir" ; then
14650     CPPFLAGS="$CPPFLAGS -I$includedir"
14651   fi
14652   # note: $X_CFLAGS includes $x_includes
14653   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14654
14655   if test \! -z "$libdir" ; then
14656     LDFLAGS="$LDFLAGS -L$libdir"
14657   fi
14658   # note: $X_LIBS includes $x_libraries
14659   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14660
14661   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
14662 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
14663 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
14664   echo $ECHO_N "(cached) $ECHO_C" >&6
14665 else
14666   ac_check_lib_save_LIBS=$LIBS
14667 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14668 cat >conftest.$ac_ext <<_ACEOF
14669 #line $LINENO "configure"
14670 #include "confdefs.h"
14671
14672 /* Override any gcc2 internal prototype to avoid an error.  */
14673 #ifdef __cplusplus
14674 extern "C"
14675 #endif
14676 /* We use char because int might match the return type of a gcc2
14677    builtin and then its argument prototype would still apply.  */
14678 char glXCreateContext ();
14679 #ifdef F77_DUMMY_MAIN
14680 #  ifdef __cplusplus
14681      extern "C"
14682 #  endif
14683    int F77_DUMMY_MAIN() { return 1; }
14684 #endif
14685 int
14686 main ()
14687 {
14688 glXCreateContext ();
14689   ;
14690   return 0;
14691 }
14692 _ACEOF
14693 rm -f conftest.$ac_objext conftest$ac_exeext
14694 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14695   (eval $ac_link) 2>&5
14696   ac_status=$?
14697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14698   (exit $ac_status); } &&
14699          { ac_try='test -s conftest$ac_exeext'
14700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14701   (eval $ac_try) 2>&5
14702   ac_status=$?
14703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14704   (exit $ac_status); }; }; then
14705   ac_cv_lib_GL_glXCreateContext=yes
14706 else
14707   echo "$as_me: failed program was:" >&5
14708 cat conftest.$ac_ext >&5
14709 ac_cv_lib_GL_glXCreateContext=no
14710 fi
14711 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14712 LIBS=$ac_check_lib_save_LIBS
14713 fi
14714 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
14715 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
14716 if test $ac_cv_lib_GL_glXCreateContext = yes; then
14717   gl_lib_1="GL"
14718                       GL_LIBS="-lGL -lGLU $GL_LIBS"
14719 fi
14720
14721   CPPFLAGS="$ac_save_CPPFLAGS"
14722   LDFLAGS="$ac_save_LDFLAGS"
14723 #  LIBS="$ac_save_LIBS"
14724
14725     fi
14726
14727     if test "$gl_lib_1" = "" ; then
14728       # we have headers, but no libs -- bail.
14729       have_gl=no
14730       ac_have_mesa_gl=no
14731       gl_halfassed=yes
14732     else
14733       # linking works -- we can build the GL hacks.
14734       cat >>confdefs.h <<\_ACEOF
14735 #define HAVE_GL 1
14736 _ACEOF
14737
14738       if test "$ac_have_mesa_gl" = yes ; then
14739         cat >>confdefs.h <<\_ACEOF
14740 #define HAVE_MESA_GL 1
14741 _ACEOF
14742
14743       fi
14744     fi
14745   fi
14746
14747
14748   # Now that we know we have GL headers and libs, do some more GL testing.
14749   #
14750
14751   if test "$have_gl" = yes ; then
14752     # If it's MesaGL, we'd like to issue a warning if the version number
14753     # is less than or equal to 2.6, because that version had a security bug.
14754     #
14755     if test "$ac_have_mesa_gl" = yes; then
14756
14757       echo "$as_me:$LINENO: checking MesaGL version number" >&5
14758 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
14759 if test "${ac_cv_mesagl_version_string+set}" = set; then
14760   echo $ECHO_N "(cached) $ECHO_C" >&6
14761 else
14762   cat > conftest.$ac_ext <<EOF
14763 #line 14769 "configure"
14764 #include "confdefs.h"
14765 #include <GL/gl.h>
14766 #ifndef MESA_MAJOR_VERSION
14767 # include <GL/xmesa.h>
14768 # ifdef XMESA_MAJOR_VERSION
14769    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
14770       we have to check the XMesa version number (the number of the X protocol
14771       support, which seems to be the same as the Mesa version number.)
14772     */
14773 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
14774 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
14775 # else
14776    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
14777       so we have no way of telling what version of Mesa this is at all.
14778       So, we'll guess that the osmesa version (the "offscreen protocol")
14779       is less than or equal to the real mesa version number.  Except that
14780       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
14781       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
14782     */
14783 # include <GL/osmesa.h>
14784 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
14785 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
14786 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
14787 #   undef MESA_MINOR_VERSION
14788 #   define MESA_MINOR_VERSION 4 or newer, probably?
14789 #  endif
14790 # endif
14791 #endif
14792 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
14793 EOF
14794
14795          ac_save_CPPFLAGS="$CPPFLAGS"
14796          if test \! -z "$includedir" ; then
14797            CPPFLAGS="$CPPFLAGS -I$includedir"
14798          fi
14799          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14800
14801          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
14802
14803          # M4 sucks!!
14804
14805           mglv=`echo "$mglv" | sed -n \
14806              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
14807
14808
14809          rm -f conftest.$ac_ext
14810
14811          CPPFLAGS="$ac_save_CPPFLAGS"
14812
14813          if test "$mglv" = ""; then
14814            ac_mesagl_version=unknown
14815            ac_mesagl_version_string=unknown
14816          else
14817            ac_mesagl_version_string="$mglv"
14818            # M4 sucks!!
14819
14820            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
14821            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
14822
14823            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
14824            if test -z "$ac_mesagl_version"; then
14825              ac_mesagl_version=unknown
14826              ac_mesagl_version_string=unknown
14827            fi
14828          fi
14829          ac_cv_mesagl_version=$ac_mesagl_version
14830          ac_cv_mesagl_version_string=$ac_mesagl_version_string
14831
14832 fi
14833 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
14834 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
14835       ac_mesagl_version=$ac_cv_mesagl_version
14836       ac_mesagl_version_string=$ac_cv_mesagl_version_string
14837     fi
14838
14839
14840     # Check for OpenGL 1.1 features.
14841     #
14842
14843   ac_save_CPPFLAGS="$CPPFLAGS"
14844   ac_save_LDFLAGS="$LDFLAGS"
14845 #  ac_save_LIBS="$LIBS"
14846
14847   if test \! -z "$includedir" ; then
14848     CPPFLAGS="$CPPFLAGS -I$includedir"
14849   fi
14850   # note: $X_CFLAGS includes $x_includes
14851   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14852
14853   if test \! -z "$libdir" ; then
14854     LDFLAGS="$LDFLAGS -L$libdir"
14855   fi
14856   # note: $X_LIBS includes $x_libraries
14857   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14858
14859   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
14860 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
14861 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
14862 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14863   echo $ECHO_N "(cached) $ECHO_C" >&6
14864 else
14865   ac_check_lib_save_LIBS=$LIBS
14866 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
14867 cat >conftest.$ac_ext <<_ACEOF
14868 #line $LINENO "configure"
14869 #include "confdefs.h"
14870
14871 /* Override any gcc2 internal prototype to avoid an error.  */
14872 #ifdef __cplusplus
14873 extern "C"
14874 #endif
14875 /* We use char because int might match the return type of a gcc2
14876    builtin and then its argument prototype would still apply.  */
14877 char glBindTexture ();
14878 #ifdef F77_DUMMY_MAIN
14879 #  ifdef __cplusplus
14880      extern "C"
14881 #  endif
14882    int F77_DUMMY_MAIN() { return 1; }
14883 #endif
14884 int
14885 main ()
14886 {
14887 glBindTexture ();
14888   ;
14889   return 0;
14890 }
14891 _ACEOF
14892 rm -f conftest.$ac_objext conftest$ac_exeext
14893 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14894   (eval $ac_link) 2>&5
14895   ac_status=$?
14896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14897   (exit $ac_status); } &&
14898          { ac_try='test -s conftest$ac_exeext'
14899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14900   (eval $ac_try) 2>&5
14901   ac_status=$?
14902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14903   (exit $ac_status); }; }; then
14904   eval "$as_ac_Lib=yes"
14905 else
14906   echo "$as_me: failed program was:" >&5
14907 cat conftest.$ac_ext >&5
14908 eval "$as_ac_Lib=no"
14909 fi
14910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14911 LIBS=$ac_check_lib_save_LIBS
14912 fi
14913 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14914 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14915 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14916   cat >>confdefs.h <<\_ACEOF
14917 #define HAVE_GLBINDTEXTURE 1
14918 _ACEOF
14919
14920 else
14921   true
14922 fi
14923
14924   CPPFLAGS="$ac_save_CPPFLAGS"
14925   LDFLAGS="$ac_save_LDFLAGS"
14926 #  LIBS="$ac_save_LIBS"
14927
14928   fi
14929
14930 elif test "$with_gl" != no; then
14931   echo "error: must be yes or no: --with-gl=$with_gl"
14932   exit 1
14933 fi
14934
14935
14936 ###############################################################################
14937 #
14938 #       Check for -lgle.
14939 #
14940 ###############################################################################
14941
14942 have_gle=no
14943 with_gle_req=unspecified
14944 gle_halfassed=no
14945
14946 # Check whether --with-gle or --without-gle was given.
14947 if test "${with_gle+set}" = set; then
14948   withval="$with_gle"
14949   with_gle="$withval"; with_gle_req="$withval"
14950 else
14951   with_gle=yes
14952 fi;
14953
14954
14955    case "$with_gle" in
14956     yes) ;;
14957     no)  ;;
14958
14959     /*)
14960      echo "$as_me:$LINENO: checking for GLE headers" >&5
14961 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
14962      d=$with_gle/include
14963      if test -d $d; then
14964        X_CFLAGS="-I$d $X_CFLAGS"
14965        echo "$as_me:$LINENO: result: $d" >&5
14966 echo "${ECHO_T}$d" >&6
14967      else
14968        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14969 echo "${ECHO_T}not found ($d: no such directory)" >&6
14970      fi
14971
14972      echo "$as_me:$LINENO: checking for GLE libs" >&5
14973 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
14974      d=$with_gle/lib
14975      if test -d $d; then
14976        X_LIBS="-L$d $X_LIBS"
14977        echo "$as_me:$LINENO: result: $d" >&5
14978 echo "${ECHO_T}$d" >&6
14979      else
14980        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14981 echo "${ECHO_T}not found ($d: no such directory)" >&6
14982      fi
14983
14984      # replace the directory string with "yes".
14985      with_gle_req="yes"
14986      with_gle=$with_gle_req
14987      ;;
14988
14989     *)
14990      echo ""
14991      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
14992      echo "       If it is a directory, then \`DIR/include' will be added to"
14993      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14994      exit 1
14995      ;;
14996    esac
14997
14998
14999 GLE_LIBS=""
15000
15001 if test "$have_gl" = no ; then
15002  true
15003 elif test "$with_gle" = yes; then
15004
15005
15006   ac_save_CPPFLAGS="$CPPFLAGS"
15007   if test \! -z "$includedir" ; then
15008     CPPFLAGS="$CPPFLAGS -I$includedir"
15009   fi
15010   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15011   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
15012 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
15013 if test "${ac_cv_header_GL_gle_h+set}" = set; then
15014   echo $ECHO_N "(cached) $ECHO_C" >&6
15015 else
15016   cat >conftest.$ac_ext <<_ACEOF
15017 #line $LINENO "configure"
15018 #include "confdefs.h"
15019 #include <GL/gl.h>
15020
15021 #include <GL/gle.h>
15022 _ACEOF
15023 rm -f conftest.$ac_objext
15024 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15025   (eval $ac_compile) 2>&5
15026   ac_status=$?
15027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15028   (exit $ac_status); } &&
15029          { ac_try='test -s conftest.$ac_objext'
15030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15031   (eval $ac_try) 2>&5
15032   ac_status=$?
15033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15034   (exit $ac_status); }; }; then
15035   ac_cv_header_GL_gle_h=yes
15036 else
15037   echo "$as_me: failed program was:" >&5
15038 cat conftest.$ac_ext >&5
15039 ac_cv_header_GL_gle_h=no
15040 fi
15041 rm -f conftest.$ac_objext conftest.$ac_ext
15042 fi
15043 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
15044 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
15045 if test $ac_cv_header_GL_gle_h = yes; then
15046   have_gle3=yes
15047 else
15048   have_gle3=no
15049 fi
15050
15051
15052   CPPFLAGS="$ac_save_CPPFLAGS"
15053   if test "$have_gle3" = yes ; then
15054     have_gle=yes;
15055   else
15056
15057   ac_save_CPPFLAGS="$CPPFLAGS"
15058   if test \! -z "$includedir" ; then
15059     CPPFLAGS="$CPPFLAGS -I$includedir"
15060   fi
15061   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15062   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
15063 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
15064 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
15065   echo $ECHO_N "(cached) $ECHO_C" >&6
15066 else
15067   cat >conftest.$ac_ext <<_ACEOF
15068 #line $LINENO "configure"
15069 #include "confdefs.h"
15070 #include <GL/gl.h>
15071
15072 #include <GL/gutil.h>
15073 _ACEOF
15074 rm -f conftest.$ac_objext
15075 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15076   (eval $ac_compile) 2>&5
15077   ac_status=$?
15078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079   (exit $ac_status); } &&
15080          { ac_try='test -s conftest.$ac_objext'
15081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15082   (eval $ac_try) 2>&5
15083   ac_status=$?
15084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15085   (exit $ac_status); }; }; then
15086   ac_cv_header_GL_gutil_h=yes
15087 else
15088   echo "$as_me: failed program was:" >&5
15089 cat conftest.$ac_ext >&5
15090 ac_cv_header_GL_gutil_h=no
15091 fi
15092 rm -f conftest.$ac_objext conftest.$ac_ext
15093 fi
15094 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
15095 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
15096 if test $ac_cv_header_GL_gutil_h = yes; then
15097   have_gle=yes
15098 else
15099   have_gle=no
15100 fi
15101
15102
15103   CPPFLAGS="$ac_save_CPPFLAGS"
15104     if test "$have_gle" = yes ; then
15105
15106   ac_save_CPPFLAGS="$CPPFLAGS"
15107   if test \! -z "$includedir" ; then
15108     CPPFLAGS="$CPPFLAGS -I$includedir"
15109   fi
15110   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15111   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
15112 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
15113 if test "${ac_cv_header_GL_tube_h+set}" = set; then
15114   echo $ECHO_N "(cached) $ECHO_C" >&6
15115 else
15116   cat >conftest.$ac_ext <<_ACEOF
15117 #line $LINENO "configure"
15118 #include "confdefs.h"
15119 #include <GL/gl.h>
15120
15121 #include <GL/tube.h>
15122 _ACEOF
15123 rm -f conftest.$ac_objext
15124 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15125   (eval $ac_compile) 2>&5
15126   ac_status=$?
15127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15128   (exit $ac_status); } &&
15129          { ac_try='test -s conftest.$ac_objext'
15130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15131   (eval $ac_try) 2>&5
15132   ac_status=$?
15133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15134   (exit $ac_status); }; }; then
15135   ac_cv_header_GL_tube_h=yes
15136 else
15137   echo "$as_me: failed program was:" >&5
15138 cat conftest.$ac_ext >&5
15139 ac_cv_header_GL_tube_h=no
15140 fi
15141 rm -f conftest.$ac_objext conftest.$ac_ext
15142 fi
15143 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
15144 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
15145 if test $ac_cv_header_GL_tube_h = yes; then
15146   have_gle=yes
15147 else
15148   have_gle=no
15149 fi
15150
15151
15152   CPPFLAGS="$ac_save_CPPFLAGS"
15153     fi
15154   fi
15155
15156   if test "$have_gle" = yes ; then
15157     have_gle=no
15158     gle_halfassed=yes
15159
15160   ac_save_CPPFLAGS="$CPPFLAGS"
15161   ac_save_LDFLAGS="$LDFLAGS"
15162 #  ac_save_LIBS="$LIBS"
15163
15164   if test \! -z "$includedir" ; then
15165     CPPFLAGS="$CPPFLAGS -I$includedir"
15166   fi
15167   # note: $X_CFLAGS includes $x_includes
15168   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15169
15170   if test \! -z "$libdir" ; then
15171     LDFLAGS="$LDFLAGS -L$libdir"
15172   fi
15173   # note: $X_LIBS includes $x_libraries
15174   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15175
15176   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
15177 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
15178 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
15179   echo $ECHO_N "(cached) $ECHO_C" >&6
15180 else
15181   ac_check_lib_save_LIBS=$LIBS
15182 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15183 cat >conftest.$ac_ext <<_ACEOF
15184 #line $LINENO "configure"
15185 #include "confdefs.h"
15186
15187 /* Override any gcc2 internal prototype to avoid an error.  */
15188 #ifdef __cplusplus
15189 extern "C"
15190 #endif
15191 /* We use char because int might match the return type of a gcc2
15192    builtin and then its argument prototype would still apply.  */
15193 char gleCreateGC ();
15194 #ifdef F77_DUMMY_MAIN
15195 #  ifdef __cplusplus
15196      extern "C"
15197 #  endif
15198    int F77_DUMMY_MAIN() { return 1; }
15199 #endif
15200 int
15201 main ()
15202 {
15203 gleCreateGC ();
15204   ;
15205   return 0;
15206 }
15207 _ACEOF
15208 rm -f conftest.$ac_objext conftest$ac_exeext
15209 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15210   (eval $ac_link) 2>&5
15211   ac_status=$?
15212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15213   (exit $ac_status); } &&
15214          { ac_try='test -s conftest$ac_exeext'
15215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15216   (eval $ac_try) 2>&5
15217   ac_status=$?
15218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15219   (exit $ac_status); }; }; then
15220   ac_cv_lib_gle_gleCreateGC=yes
15221 else
15222   echo "$as_me: failed program was:" >&5
15223 cat conftest.$ac_ext >&5
15224 ac_cv_lib_gle_gleCreateGC=no
15225 fi
15226 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15227 LIBS=$ac_check_lib_save_LIBS
15228 fi
15229 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
15230 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
15231 if test $ac_cv_lib_gle_gleCreateGC = yes; then
15232   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
15233 fi
15234
15235   CPPFLAGS="$ac_save_CPPFLAGS"
15236   LDFLAGS="$ac_save_LDFLAGS"
15237 #  LIBS="$ac_save_LIBS"
15238
15239   fi
15240   if test "$have_gle" = yes ; then
15241     have_gle=no
15242     gle_halfassed=yes
15243
15244     # sometimes the libmatrix stuff is included in libgle.  look there first.
15245 #
15246 # I don't get it.  For some reason, this test passes on SGI, as if
15247 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
15248 # Yet the link is succeeding.  Why???
15249 #
15250 #    AC_CHECK_X_LIB(gle, uview_direction_d,
15251 #                   [have_gle=yes; gle_halfassed=no],
15252 #                   [], $GL_LIBS -lX11 -lXext -lm)
15253
15254     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
15255     # *sigh*
15256     if test "$have_gle3" = yes ; then
15257
15258   ac_save_CPPFLAGS="$CPPFLAGS"
15259   ac_save_LDFLAGS="$LDFLAGS"
15260 #  ac_save_LIBS="$LIBS"
15261
15262   if test \! -z "$includedir" ; then
15263     CPPFLAGS="$CPPFLAGS -I$includedir"
15264   fi
15265   # note: $X_CFLAGS includes $x_includes
15266   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15267
15268   if test \! -z "$libdir" ; then
15269     LDFLAGS="$LDFLAGS -L$libdir"
15270   fi
15271   # note: $X_LIBS includes $x_libraries
15272   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15273
15274   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
15275 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
15276 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
15277   echo $ECHO_N "(cached) $ECHO_C" >&6
15278 else
15279   ac_check_lib_save_LIBS=$LIBS
15280 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15281 cat >conftest.$ac_ext <<_ACEOF
15282 #line $LINENO "configure"
15283 #include "confdefs.h"
15284
15285 /* Override any gcc2 internal prototype to avoid an error.  */
15286 #ifdef __cplusplus
15287 extern "C"
15288 #endif
15289 /* We use char because int might match the return type of a gcc2
15290    builtin and then its argument prototype would still apply.  */
15291 char uview_direction ();
15292 #ifdef F77_DUMMY_MAIN
15293 #  ifdef __cplusplus
15294      extern "C"
15295 #  endif
15296    int F77_DUMMY_MAIN() { return 1; }
15297 #endif
15298 int
15299 main ()
15300 {
15301 uview_direction ();
15302   ;
15303   return 0;
15304 }
15305 _ACEOF
15306 rm -f conftest.$ac_objext conftest$ac_exeext
15307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15308   (eval $ac_link) 2>&5
15309   ac_status=$?
15310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311   (exit $ac_status); } &&
15312          { ac_try='test -s conftest$ac_exeext'
15313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15314   (eval $ac_try) 2>&5
15315   ac_status=$?
15316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15317   (exit $ac_status); }; }; then
15318   ac_cv_lib_gle_uview_direction=yes
15319 else
15320   echo "$as_me: failed program was:" >&5
15321 cat conftest.$ac_ext >&5
15322 ac_cv_lib_gle_uview_direction=no
15323 fi
15324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15325 LIBS=$ac_check_lib_save_LIBS
15326 fi
15327 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
15328 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
15329 if test $ac_cv_lib_gle_uview_direction = yes; then
15330   have_gle=yes; gle_halfassed=no
15331 fi
15332
15333   CPPFLAGS="$ac_save_CPPFLAGS"
15334   LDFLAGS="$ac_save_LDFLAGS"
15335 #  LIBS="$ac_save_LIBS"
15336
15337     fi
15338     # if it wasn't in libgle, then look in libmatrix.
15339     if test "$have_gle" = no ; then
15340
15341   ac_save_CPPFLAGS="$CPPFLAGS"
15342   ac_save_LDFLAGS="$LDFLAGS"
15343 #  ac_save_LIBS="$LIBS"
15344
15345   if test \! -z "$includedir" ; then
15346     CPPFLAGS="$CPPFLAGS -I$includedir"
15347   fi
15348   # note: $X_CFLAGS includes $x_includes
15349   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15350
15351   if test \! -z "$libdir" ; then
15352     LDFLAGS="$LDFLAGS -L$libdir"
15353   fi
15354   # note: $X_LIBS includes $x_libraries
15355   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15356
15357   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
15358 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
15359 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
15360   echo $ECHO_N "(cached) $ECHO_C" >&6
15361 else
15362   ac_check_lib_save_LIBS=$LIBS
15363 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
15364 cat >conftest.$ac_ext <<_ACEOF
15365 #line $LINENO "configure"
15366 #include "confdefs.h"
15367
15368 /* Override any gcc2 internal prototype to avoid an error.  */
15369 #ifdef __cplusplus
15370 extern "C"
15371 #endif
15372 /* We use char because int might match the return type of a gcc2
15373    builtin and then its argument prototype would still apply.  */
15374 char uview_direction_d ();
15375 #ifdef F77_DUMMY_MAIN
15376 #  ifdef __cplusplus
15377      extern "C"
15378 #  endif
15379    int F77_DUMMY_MAIN() { return 1; }
15380 #endif
15381 int
15382 main ()
15383 {
15384 uview_direction_d ();
15385   ;
15386   return 0;
15387 }
15388 _ACEOF
15389 rm -f conftest.$ac_objext conftest$ac_exeext
15390 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15391   (eval $ac_link) 2>&5
15392   ac_status=$?
15393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15394   (exit $ac_status); } &&
15395          { ac_try='test -s conftest$ac_exeext'
15396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15397   (eval $ac_try) 2>&5
15398   ac_status=$?
15399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400   (exit $ac_status); }; }; then
15401   ac_cv_lib_matrix_uview_direction_d=yes
15402 else
15403   echo "$as_me: failed program was:" >&5
15404 cat conftest.$ac_ext >&5
15405 ac_cv_lib_matrix_uview_direction_d=no
15406 fi
15407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15408 LIBS=$ac_check_lib_save_LIBS
15409 fi
15410 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
15411 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
15412 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
15413   have_gle=yes; gle_halfassed=no;
15414                       GLE_LIBS="$GLE_LIBS -lmatrix"
15415 fi
15416
15417   CPPFLAGS="$ac_save_CPPFLAGS"
15418   LDFLAGS="$ac_save_LDFLAGS"
15419 #  LIBS="$ac_save_LIBS"
15420
15421     fi
15422   fi
15423
15424   if test "$have_gle" = yes ; then
15425     cat >>confdefs.h <<\_ACEOF
15426 #define HAVE_GLE 1
15427 _ACEOF
15428
15429     if test "$have_gle3" = yes ; then
15430       cat >>confdefs.h <<\_ACEOF
15431 #define HAVE_GLE3 1
15432 _ACEOF
15433
15434     fi
15435   fi
15436
15437 elif test "$with_gle" != no; then
15438   echo "error: must be yes or no: --with-gle=$with_gle"
15439   exit 1
15440
15441 fi
15442
15443
15444
15445 ###############################################################################
15446 #
15447 #       Check for -lXpm.
15448 #
15449 ###############################################################################
15450
15451 have_xpm=no
15452 with_xpm_req=unspecified
15453
15454 # Check whether --with-xpm or --without-xpm was given.
15455 if test "${with_xpm+set}" = set; then
15456   withval="$with_xpm"
15457   with_xpm="$withval"; with_xpm_req="$withval"
15458 else
15459   with_xpm=yes
15460 fi;
15461
15462
15463    case "$with_xpm" in
15464     yes) ;;
15465     no)  ;;
15466
15467     /*)
15468      echo "$as_me:$LINENO: checking for XPM headers" >&5
15469 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
15470      d=$with_xpm/include
15471      if test -d $d; then
15472        X_CFLAGS="-I$d $X_CFLAGS"
15473        echo "$as_me:$LINENO: result: $d" >&5
15474 echo "${ECHO_T}$d" >&6
15475      else
15476        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15477 echo "${ECHO_T}not found ($d: no such directory)" >&6
15478      fi
15479
15480      echo "$as_me:$LINENO: checking for XPM libs" >&5
15481 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
15482      d=$with_xpm/lib
15483      if test -d $d; then
15484        X_LIBS="-L$d $X_LIBS"
15485        echo "$as_me:$LINENO: result: $d" >&5
15486 echo "${ECHO_T}$d" >&6
15487      else
15488        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15489 echo "${ECHO_T}not found ($d: no such directory)" >&6
15490      fi
15491
15492      # replace the directory string with "yes".
15493      with_xpm_req="yes"
15494      with_xpm=$with_xpm_req
15495      ;;
15496
15497     *)
15498      echo ""
15499      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
15500      echo "       If it is a directory, then \`DIR/include' will be added to"
15501      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15502      exit 1
15503      ;;
15504    esac
15505
15506
15507 if test "$with_xpm" = yes; then
15508
15509   ac_save_CPPFLAGS="$CPPFLAGS"
15510   if test \! -z "$includedir" ; then
15511     CPPFLAGS="$CPPFLAGS -I$includedir"
15512   fi
15513   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15514   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
15515 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
15516 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
15517   echo $ECHO_N "(cached) $ECHO_C" >&6
15518 else
15519   cat >conftest.$ac_ext <<_ACEOF
15520 #line $LINENO "configure"
15521 #include "confdefs.h"
15522 #include <X11/Xlib.h>
15523
15524 #include <X11/xpm.h>
15525 _ACEOF
15526 rm -f conftest.$ac_objext
15527 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15528   (eval $ac_compile) 2>&5
15529   ac_status=$?
15530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15531   (exit $ac_status); } &&
15532          { ac_try='test -s conftest.$ac_objext'
15533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15534   (eval $ac_try) 2>&5
15535   ac_status=$?
15536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15537   (exit $ac_status); }; }; then
15538   ac_cv_header_X11_xpm_h=yes
15539 else
15540   echo "$as_me: failed program was:" >&5
15541 cat conftest.$ac_ext >&5
15542 ac_cv_header_X11_xpm_h=no
15543 fi
15544 rm -f conftest.$ac_objext conftest.$ac_ext
15545 fi
15546 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
15547 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
15548 if test $ac_cv_header_X11_xpm_h = yes; then
15549   have_xpm=yes
15550                     cat >>confdefs.h <<\_ACEOF
15551 #define HAVE_XPM 1
15552 _ACEOF
15553
15554                     XPM_LIBS="-lXpm"
15555 fi
15556
15557
15558   CPPFLAGS="$ac_save_CPPFLAGS"
15559 elif test "$with_xpm" != no; then
15560   echo "error: must be yes or no: --with-xpm=$with_xpm"
15561   exit 1
15562 fi
15563
15564 # See comment near $motif_requires_xpm, above.
15565 # Need to do this here, after both Motif and XPM have been checked for.
15566 #
15567 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
15568   if test "$motif_requires_xpm" = yes ; then
15569     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
15570   fi
15571 fi
15572
15573 ###############################################################################
15574 #
15575 #       Check for -lgdk_pixbuf.
15576 #
15577 ###############################################################################
15578
15579 have_gdk_pixbuf=no
15580 with_gdk_pixbuf_req=unspecified
15581
15582 # Check whether --with-pixbuf or --without-pixbuf was given.
15583 if test "${with_pixbuf+set}" = set; then
15584   withval="$with_pixbuf"
15585   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
15586 else
15587   with_gdk_pixbuf=yes
15588 fi;
15589
15590 # if --with-pixbuf=/directory/ was specified, remember that directory so that
15591 # we can also look for the `gdk-pixbuf-config' program in that directory.
15592 case "$with_gdk_pixbuf" in
15593   /*)
15594     gdk_pixbuf_dir="$with_gdk_pixbuf"
15595     ;;
15596   *)
15597     gdk_pixbuf_dir=""
15598     ;;
15599 esac
15600
15601
15602    case "$with_gdk_pixbuf" in
15603     yes) ;;
15604     no)  ;;
15605
15606     /*)
15607      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
15608 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
15609      d=$with_gdk_pixbuf/include
15610      if test -d $d; then
15611        X_CFLAGS="-I$d $X_CFLAGS"
15612        echo "$as_me:$LINENO: result: $d" >&5
15613 echo "${ECHO_T}$d" >&6
15614      else
15615        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15616 echo "${ECHO_T}not found ($d: no such directory)" >&6
15617      fi
15618
15619      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
15620 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
15621      d=$with_gdk_pixbuf/lib
15622      if test -d $d; then
15623        X_LIBS="-L$d $X_LIBS"
15624        echo "$as_me:$LINENO: result: $d" >&5
15625 echo "${ECHO_T}$d" >&6
15626      else
15627        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15628 echo "${ECHO_T}not found ($d: no such directory)" >&6
15629      fi
15630
15631      # replace the directory string with "yes".
15632      with_gdk_pixbuf_req="yes"
15633      with_gdk_pixbuf=$with_gdk_pixbuf_req
15634      ;;
15635
15636     *)
15637      echo ""
15638      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
15639      echo "       If it is a directory, then \`DIR/include' will be added to"
15640      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15641      exit 1
15642      ;;
15643    esac
15644
15645
15646 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
15647   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
15648   exit 1
15649 fi
15650
15651 if test "$with_gdk_pixbuf" = yes; then
15652   have_gdk_pixbuf=no
15653   have_gdk_pixbuf2=no
15654
15655   if test -n "$pkg_config" ; then
15656     #
15657     # the new way...
15658     # run pkg-config based tests.
15659     #
15660     pkgs=''
15661     ok="yes"
15662
15663     # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work.
15664     # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work.
15665     # If we don't have Gtk at all, then either will work.
15666
15667     if test "$have_gtk" = no -o "$have_gtk2" = yes; then
15668       #
15669       # we don't have Gtk; or we have Gtk 2.x.  Check for pixbuf 2.x.
15670       #
15671       pkg_check_version gdk-pixbuf-2.0      2.0.0
15672       pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
15673       have_gdk_pixbuf="$ok"
15674       have_gdk_pixbuf2="$ok"
15675     fi
15676
15677     if test "$have_gtk" = no -o "$have_gtk2" = no; then
15678       #
15679       # we don't have Gtk; or we have Gtk 1.x.
15680       # If we don't have pixbuf 2.x, then check for pixbuf 1.x.
15681       #
15682       if test "$have_gdk_pixbuf2" = no; then
15683         pkgs=''
15684         ok="yes"
15685         pkg_check_version gdk-pixbuf      0.0
15686         pkg_check_version gdk-pixbuf-xlib 0.0
15687         have_gdk_pixbuf="$ok"
15688       fi
15689     fi
15690
15691     if test "$have_gdk_pixbuf" = yes; then
15692       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15693 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15694 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15695   echo $ECHO_N "(cached) $ECHO_C" >&6
15696 else
15697   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
15698 fi
15699 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15700 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15701       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15702 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15703 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15704   echo $ECHO_N "(cached) $ECHO_C" >&6
15705 else
15706   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
15707 fi
15708 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15709 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15710     fi
15711     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15712     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15713   fi
15714
15715
15716   if test "$have_gdk_pixbuf" = no; then
15717     #
15718     # the old way...
15719     # run gdk-pixbuf-config based tests.
15720     # note that we can't assume that the existence of "pkg-config" means
15721     # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4,
15722     # pkg-config exists, but doesn't know about pixbuf.
15723     #
15724
15725     # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
15726     # look in /foo/bin/ for for gdk-pixbuf-config.
15727     #
15728     gdk_pixbuf_path="$PATH"
15729
15730     if test ! -z "$gtk_dir"; then
15731       # canonicalize slashes.
15732       foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15733       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15734     fi
15735
15736     if test ! -z "$gnome_dir"; then
15737       # canonicalize slashes.
15738       foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
15739       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15740     fi
15741
15742     for ac_prog in gdk-pixbuf-config
15743 do
15744   # Extract the first word of "$ac_prog", so it can be a program name with args.
15745 set dummy $ac_prog; ac_word=$2
15746 echo "$as_me:$LINENO: checking for $ac_word" >&5
15747 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15748 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
15749   echo $ECHO_N "(cached) $ECHO_C" >&6
15750 else
15751   case $gdk_pixbuf_config in
15752   [\\/]* | ?:[\\/]*)
15753   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
15754   ;;
15755   *)
15756   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15757 for as_dir in $gdk_pixbuf_path
15758 do
15759   IFS=$as_save_IFS
15760   test -z "$as_dir" && as_dir=.
15761   for ac_exec_ext in '' $ac_executable_extensions; do
15762   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15763     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
15764     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15765     break 2
15766   fi
15767 done
15768 done
15769
15770   ;;
15771 esac
15772 fi
15773 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
15774
15775 if test -n "$gdk_pixbuf_config"; then
15776   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
15777 echo "${ECHO_T}$gdk_pixbuf_config" >&6
15778 else
15779   echo "$as_me:$LINENO: result: no" >&5
15780 echo "${ECHO_T}no" >&6
15781 fi
15782
15783   test -n "$gdk_pixbuf_config" && break
15784 done
15785
15786
15787     # If we found the gdk-pixbuf-config program, run it to get flags.
15788     #
15789     if test -n "$gdk_pixbuf_config" ; then
15790       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15791 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15792 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15793   echo $ECHO_N "(cached) $ECHO_C" >&6
15794 else
15795   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
15796 fi
15797 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15798 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15799       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15800 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15801 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15802   echo $ECHO_N "(cached) $ECHO_C" >&6
15803 else
15804   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
15805 fi
15806 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15807 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15808
15809       # note that "gdk-pixbuf-config --libs" produces a link line including
15810       # -lgdk_pixbuf, but there's no way to get it to produce one that also
15811       # includes -lgdk_pixbuf_xlib.  Since we don't know *exactly* what the
15812       # name of the library will be, construct it with sed...
15813       # M4 sucks!!
15814
15815       ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \
15816        sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'`
15817
15818
15819       ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15820       ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15821     fi
15822   fi
15823
15824   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
15825   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
15826
15827   if test "$have_gdk_pixbuf" = no; then
15828     #
15829     # we appear to have pixbuf; check for headers/libs to be sure.
15830     #
15831
15832     have_gdk_pixbuf=no
15833
15834     # check for header A...
15835
15836   ac_save_CPPFLAGS="$CPPFLAGS"
15837   if test \! -z "$includedir" ; then
15838     CPPFLAGS="$CPPFLAGS -I$includedir"
15839   fi
15840   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15841   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15842   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
15843 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
15844 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15845   echo $ECHO_N "(cached) $ECHO_C" >&6
15846 fi
15847 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
15848 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
15849 else
15850   # Is the header compilable?
15851 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
15852 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
15853 cat >conftest.$ac_ext <<_ACEOF
15854 #line $LINENO "configure"
15855 #include "confdefs.h"
15856 $ac_includes_default
15857 #include <gdk-pixbuf/gdk-pixbuf.h>
15858 _ACEOF
15859 rm -f conftest.$ac_objext
15860 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15861   (eval $ac_compile) 2>&5
15862   ac_status=$?
15863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15864   (exit $ac_status); } &&
15865          { ac_try='test -s conftest.$ac_objext'
15866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15867   (eval $ac_try) 2>&5
15868   ac_status=$?
15869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15870   (exit $ac_status); }; }; then
15871   ac_header_compiler=yes
15872 else
15873   echo "$as_me: failed program was:" >&5
15874 cat conftest.$ac_ext >&5
15875 ac_header_compiler=no
15876 fi
15877 rm -f conftest.$ac_objext conftest.$ac_ext
15878 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15879 echo "${ECHO_T}$ac_header_compiler" >&6
15880
15881 # Is the header present?
15882 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
15883 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
15884 cat >conftest.$ac_ext <<_ACEOF
15885 #line $LINENO "configure"
15886 #include "confdefs.h"
15887 #include <gdk-pixbuf/gdk-pixbuf.h>
15888 _ACEOF
15889 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15890   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15891   ac_status=$?
15892   egrep -v '^ *\+' conftest.er1 >conftest.err
15893   rm -f conftest.er1
15894   cat conftest.err >&5
15895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15896   (exit $ac_status); } >/dev/null; then
15897   if test -s conftest.err; then
15898     ac_cpp_err=$ac_c_preproc_warn_flag
15899   else
15900     ac_cpp_err=
15901   fi
15902 else
15903   ac_cpp_err=yes
15904 fi
15905 if test -z "$ac_cpp_err"; then
15906   ac_header_preproc=yes
15907 else
15908   echo "$as_me: failed program was:" >&5
15909   cat conftest.$ac_ext >&5
15910   ac_header_preproc=no
15911 fi
15912 rm -f conftest.err conftest.$ac_ext
15913 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15914 echo "${ECHO_T}$ac_header_preproc" >&6
15915
15916 # So?  What about this header?
15917 case $ac_header_compiler:$ac_header_preproc in
15918   yes:no )
15919     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
15920 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15921     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
15922 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
15923   no:yes )
15924     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
15925 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
15926     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5
15927 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;}
15928     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
15929 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
15930 esac
15931 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
15932 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
15933 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15934   echo $ECHO_N "(cached) $ECHO_C" >&6
15935 else
15936   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
15937 fi
15938 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
15939 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
15940
15941 fi
15942 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
15943   have_gdk_pixbuf=yes
15944 fi
15945
15946
15947   CPPFLAGS="$ac_save_CPPFLAGS"
15948
15949     # if that worked, check for header B...
15950     if test "$have_gdk_pixbuf" = yes; then
15951       have_gdk_pixbuf=no
15952       gdk_pixbuf_halfassed=yes
15953
15954   ac_save_CPPFLAGS="$CPPFLAGS"
15955   if test \! -z "$includedir" ; then
15956     CPPFLAGS="$CPPFLAGS -I$includedir"
15957   fi
15958   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15959   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15960   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
15961 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
15962 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15963   echo $ECHO_N "(cached) $ECHO_C" >&6
15964 fi
15965 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
15966 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
15967 else
15968   # Is the header compilable?
15969 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
15970 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
15971 cat >conftest.$ac_ext <<_ACEOF
15972 #line $LINENO "configure"
15973 #include "confdefs.h"
15974 $ac_includes_default
15975 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
15976 _ACEOF
15977 rm -f conftest.$ac_objext
15978 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15979   (eval $ac_compile) 2>&5
15980   ac_status=$?
15981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15982   (exit $ac_status); } &&
15983          { ac_try='test -s conftest.$ac_objext'
15984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15985   (eval $ac_try) 2>&5
15986   ac_status=$?
15987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15988   (exit $ac_status); }; }; then
15989   ac_header_compiler=yes
15990 else
15991   echo "$as_me: failed program was:" >&5
15992 cat conftest.$ac_ext >&5
15993 ac_header_compiler=no
15994 fi
15995 rm -f conftest.$ac_objext conftest.$ac_ext
15996 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15997 echo "${ECHO_T}$ac_header_compiler" >&6
15998
15999 # Is the header present?
16000 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
16001 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16002 cat >conftest.$ac_ext <<_ACEOF
16003 #line $LINENO "configure"
16004 #include "confdefs.h"
16005 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16006 _ACEOF
16007 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16008   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16009   ac_status=$?
16010   egrep -v '^ *\+' conftest.er1 >conftest.err
16011   rm -f conftest.er1
16012   cat conftest.err >&5
16013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16014   (exit $ac_status); } >/dev/null; then
16015   if test -s conftest.err; then
16016     ac_cpp_err=$ac_c_preproc_warn_flag
16017   else
16018     ac_cpp_err=
16019   fi
16020 else
16021   ac_cpp_err=yes
16022 fi
16023 if test -z "$ac_cpp_err"; then
16024   ac_header_preproc=yes
16025 else
16026   echo "$as_me: failed program was:" >&5
16027   cat conftest.$ac_ext >&5
16028   ac_header_preproc=no
16029 fi
16030 rm -f conftest.err conftest.$ac_ext
16031 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16032 echo "${ECHO_T}$ac_header_preproc" >&6
16033
16034 # So?  What about this header?
16035 case $ac_header_compiler:$ac_header_preproc in
16036   yes:no )
16037     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16038 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16039     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16040 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16041   no:yes )
16042     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16043 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16044     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16045 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16046     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16047 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16048 esac
16049 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16050 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16051 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16052   echo $ECHO_N "(cached) $ECHO_C" >&6
16053 else
16054   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
16055 fi
16056 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16057 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16058
16059 fi
16060 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
16061   have_gdk_pixbuf=yes
16062                          gdk_pixbuf_halfassed=no
16063 fi
16064
16065
16066   CPPFLAGS="$ac_save_CPPFLAGS"
16067
16068       # yay, it has a new name in Gtk 2.x...
16069       if test "$have_gdk_pixbuf" = no; then
16070         have_gdk_pixbuf=no
16071         gdk_pixbuf_halfassed=yes
16072
16073   ac_save_CPPFLAGS="$CPPFLAGS"
16074   if test \! -z "$includedir" ; then
16075     CPPFLAGS="$CPPFLAGS -I$includedir"
16076   fi
16077   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16078   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16079   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16080 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16081 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16082   echo $ECHO_N "(cached) $ECHO_C" >&6
16083 fi
16084 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16085 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16086 else
16087   # Is the header compilable?
16088 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
16089 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16090 cat >conftest.$ac_ext <<_ACEOF
16091 #line $LINENO "configure"
16092 #include "confdefs.h"
16093 $ac_includes_default
16094 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16095 _ACEOF
16096 rm -f conftest.$ac_objext
16097 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16098   (eval $ac_compile) 2>&5
16099   ac_status=$?
16100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16101   (exit $ac_status); } &&
16102          { ac_try='test -s conftest.$ac_objext'
16103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16104   (eval $ac_try) 2>&5
16105   ac_status=$?
16106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16107   (exit $ac_status); }; }; then
16108   ac_header_compiler=yes
16109 else
16110   echo "$as_me: failed program was:" >&5
16111 cat conftest.$ac_ext >&5
16112 ac_header_compiler=no
16113 fi
16114 rm -f conftest.$ac_objext conftest.$ac_ext
16115 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16116 echo "${ECHO_T}$ac_header_compiler" >&6
16117
16118 # Is the header present?
16119 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
16120 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16121 cat >conftest.$ac_ext <<_ACEOF
16122 #line $LINENO "configure"
16123 #include "confdefs.h"
16124 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16125 _ACEOF
16126 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16127   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16128   ac_status=$?
16129   egrep -v '^ *\+' conftest.er1 >conftest.err
16130   rm -f conftest.er1
16131   cat conftest.err >&5
16132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16133   (exit $ac_status); } >/dev/null; then
16134   if test -s conftest.err; then
16135     ac_cpp_err=$ac_c_preproc_warn_flag
16136   else
16137     ac_cpp_err=
16138   fi
16139 else
16140   ac_cpp_err=yes
16141 fi
16142 if test -z "$ac_cpp_err"; then
16143   ac_header_preproc=yes
16144 else
16145   echo "$as_me: failed program was:" >&5
16146   cat conftest.$ac_ext >&5
16147   ac_header_preproc=no
16148 fi
16149 rm -f conftest.err conftest.$ac_ext
16150 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16151 echo "${ECHO_T}$ac_header_preproc" >&6
16152
16153 # So?  What about this header?
16154 case $ac_header_compiler:$ac_header_preproc in
16155   yes:no )
16156     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16157 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16158     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16159 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16160   no:yes )
16161     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16162 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16163     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16164 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16165     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16166 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16167 esac
16168 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16169 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16170 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16171   echo $ECHO_N "(cached) $ECHO_C" >&6
16172 else
16173   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
16174 fi
16175 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16176 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16177
16178 fi
16179 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
16180   have_gdk_pixbuf=yes
16181                            gdk_pixbuf_halfassed=no
16182 fi
16183
16184
16185   CPPFLAGS="$ac_save_CPPFLAGS"
16186       fi
16187     fi
16188   fi
16189
16190   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
16191
16192   if test "$have_gdk_pixbuf" = yes; then
16193     # we have the headers, now check for the libraries
16194     have_gdk_pixbuf=no
16195     gdk_pixbuf_halfassed=yes
16196
16197     # library A...
16198
16199   ac_save_CPPFLAGS="$CPPFLAGS"
16200   ac_save_LDFLAGS="$LDFLAGS"
16201 #  ac_save_LIBS="$LIBS"
16202
16203   if test \! -z "$includedir" ; then
16204     CPPFLAGS="$CPPFLAGS -I$includedir"
16205   fi
16206   # note: $X_CFLAGS includes $x_includes
16207   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16208
16209   if test \! -z "$libdir" ; then
16210     LDFLAGS="$LDFLAGS -L$libdir"
16211   fi
16212   # note: $X_LIBS includes $x_libraries
16213   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16214
16215   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
16216 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
16217 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
16218   echo $ECHO_N "(cached) $ECHO_C" >&6
16219 else
16220   ac_check_lib_save_LIBS=$LIBS
16221 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16222 cat >conftest.$ac_ext <<_ACEOF
16223 #line $LINENO "configure"
16224 #include "confdefs.h"
16225
16226 /* Override any gcc2 internal prototype to avoid an error.  */
16227 #ifdef __cplusplus
16228 extern "C"
16229 #endif
16230 /* We use char because int might match the return type of a gcc2
16231    builtin and then its argument prototype would still apply.  */
16232 char gdk_pixbuf_new_from_file ();
16233 #ifdef F77_DUMMY_MAIN
16234 #  ifdef __cplusplus
16235      extern "C"
16236 #  endif
16237    int F77_DUMMY_MAIN() { return 1; }
16238 #endif
16239 int
16240 main ()
16241 {
16242 gdk_pixbuf_new_from_file ();
16243   ;
16244   return 0;
16245 }
16246 _ACEOF
16247 rm -f conftest.$ac_objext conftest$ac_exeext
16248 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16249   (eval $ac_link) 2>&5
16250   ac_status=$?
16251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16252   (exit $ac_status); } &&
16253          { ac_try='test -s conftest$ac_exeext'
16254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16255   (eval $ac_try) 2>&5
16256   ac_status=$?
16257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16258   (exit $ac_status); }; }; then
16259   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
16260 else
16261   echo "$as_me: failed program was:" >&5
16262 cat conftest.$ac_ext >&5
16263 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
16264 fi
16265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16266 LIBS=$ac_check_lib_save_LIBS
16267 fi
16268 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
16269 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
16270 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
16271   have_gdk_pixbuf=yes
16272 fi
16273
16274   CPPFLAGS="$ac_save_CPPFLAGS"
16275   LDFLAGS="$ac_save_LDFLAGS"
16276 #  LIBS="$ac_save_LIBS"
16277
16278     # library B...
16279     if test "$have_gdk_pixbuf" = yes; then
16280       have_gdk_pixbuf=no
16281
16282   ac_save_CPPFLAGS="$CPPFLAGS"
16283   ac_save_LDFLAGS="$LDFLAGS"
16284 #  ac_save_LIBS="$LIBS"
16285
16286   if test \! -z "$includedir" ; then
16287     CPPFLAGS="$CPPFLAGS -I$includedir"
16288   fi
16289   # note: $X_CFLAGS includes $x_includes
16290   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16291
16292   if test \! -z "$libdir" ; then
16293     LDFLAGS="$LDFLAGS -L$libdir"
16294   fi
16295   # note: $X_LIBS includes $x_libraries
16296   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16297
16298   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
16299 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
16300 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
16301   echo $ECHO_N "(cached) $ECHO_C" >&6
16302 else
16303   ac_check_lib_save_LIBS=$LIBS
16304 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16305 cat >conftest.$ac_ext <<_ACEOF
16306 #line $LINENO "configure"
16307 #include "confdefs.h"
16308
16309 /* Override any gcc2 internal prototype to avoid an error.  */
16310 #ifdef __cplusplus
16311 extern "C"
16312 #endif
16313 /* We use char because int might match the return type of a gcc2
16314    builtin and then its argument prototype would still apply.  */
16315 char gdk_pixbuf_xlib_init ();
16316 #ifdef F77_DUMMY_MAIN
16317 #  ifdef __cplusplus
16318      extern "C"
16319 #  endif
16320    int F77_DUMMY_MAIN() { return 1; }
16321 #endif
16322 int
16323 main ()
16324 {
16325 gdk_pixbuf_xlib_init ();
16326   ;
16327   return 0;
16328 }
16329 _ACEOF
16330 rm -f conftest.$ac_objext conftest$ac_exeext
16331 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16332   (eval $ac_link) 2>&5
16333   ac_status=$?
16334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16335   (exit $ac_status); } &&
16336          { ac_try='test -s conftest$ac_exeext'
16337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16338   (eval $ac_try) 2>&5
16339   ac_status=$?
16340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16341   (exit $ac_status); }; }; then
16342   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
16343 else
16344   echo "$as_me: failed program was:" >&5
16345 cat conftest.$ac_ext >&5
16346 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
16347 fi
16348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16349 LIBS=$ac_check_lib_save_LIBS
16350 fi
16351 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
16352 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
16353 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
16354   have_gdk_pixbuf=yes
16355                       gdk_pixbuf_halfassed=no
16356 fi
16357
16358   CPPFLAGS="$ac_save_CPPFLAGS"
16359   LDFLAGS="$ac_save_LDFLAGS"
16360 #  LIBS="$ac_save_LIBS"
16361
16362     fi
16363   fi
16364
16365   if test "$have_gdk_pixbuf" = yes; then
16366     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
16367     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
16368     cat >>confdefs.h <<\_ACEOF
16369 #define HAVE_GDK_PIXBUF 1
16370 _ACEOF
16371
16372   else
16373     have_gdk_pixbuf2=no
16374   fi
16375 fi
16376
16377
16378 ###############################################################################
16379 #
16380 #       Check for -ljpeg
16381 #
16382 ###############################################################################
16383
16384 have_jpeg=no
16385 with_jpeg_req=unspecified
16386 jpeg_halfassed=no
16387
16388 # Check whether --with-jpeg or --without-jpeg was given.
16389 if test "${with_jpeg+set}" = set; then
16390   withval="$with_jpeg"
16391   with_jpeg="$withval"; with_jpeg_req="$withval"
16392 else
16393   with_jpeg=yes
16394 fi;
16395
16396
16397    case "$with_jpeg" in
16398     yes) ;;
16399     no)  ;;
16400
16401     /*)
16402      echo "$as_me:$LINENO: checking for JPEG headers" >&5
16403 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
16404      d=$with_jpeg/include
16405      if test -d $d; then
16406        X_CFLAGS="-I$d $X_CFLAGS"
16407        echo "$as_me:$LINENO: result: $d" >&5
16408 echo "${ECHO_T}$d" >&6
16409      else
16410        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16411 echo "${ECHO_T}not found ($d: no such directory)" >&6
16412      fi
16413
16414      echo "$as_me:$LINENO: checking for JPEG libs" >&5
16415 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
16416      d=$with_jpeg/lib
16417      if test -d $d; then
16418        X_LIBS="-L$d $X_LIBS"
16419        echo "$as_me:$LINENO: result: $d" >&5
16420 echo "${ECHO_T}$d" >&6
16421      else
16422        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16423 echo "${ECHO_T}not found ($d: no such directory)" >&6
16424      fi
16425
16426      # replace the directory string with "yes".
16427      with_jpeg_req="yes"
16428      with_jpeg=$with_jpeg_req
16429      ;;
16430
16431     *)
16432      echo ""
16433      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
16434      echo "       If it is a directory, then \`DIR/include' will be added to"
16435      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16436      exit 1
16437      ;;
16438    esac
16439
16440
16441 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
16442   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
16443   exit 1
16444 fi
16445
16446 if test "$with_jpeg" = yes; then
16447
16448   have_jpeg=no
16449
16450   ac_save_CPPFLAGS="$CPPFLAGS"
16451   if test \! -z "$includedir" ; then
16452     CPPFLAGS="$CPPFLAGS -I$includedir"
16453   fi
16454   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16455   if test "${ac_cv_header_jpeglib_h+set}" = set; then
16456   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
16457 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
16458 if test "${ac_cv_header_jpeglib_h+set}" = set; then
16459   echo $ECHO_N "(cached) $ECHO_C" >&6
16460 fi
16461 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
16462 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
16463 else
16464   # Is the header compilable?
16465 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
16466 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
16467 cat >conftest.$ac_ext <<_ACEOF
16468 #line $LINENO "configure"
16469 #include "confdefs.h"
16470 $ac_includes_default
16471 #include <jpeglib.h>
16472 _ACEOF
16473 rm -f conftest.$ac_objext
16474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16475   (eval $ac_compile) 2>&5
16476   ac_status=$?
16477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16478   (exit $ac_status); } &&
16479          { ac_try='test -s conftest.$ac_objext'
16480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16481   (eval $ac_try) 2>&5
16482   ac_status=$?
16483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16484   (exit $ac_status); }; }; then
16485   ac_header_compiler=yes
16486 else
16487   echo "$as_me: failed program was:" >&5
16488 cat conftest.$ac_ext >&5
16489 ac_header_compiler=no
16490 fi
16491 rm -f conftest.$ac_objext conftest.$ac_ext
16492 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16493 echo "${ECHO_T}$ac_header_compiler" >&6
16494
16495 # Is the header present?
16496 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
16497 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
16498 cat >conftest.$ac_ext <<_ACEOF
16499 #line $LINENO "configure"
16500 #include "confdefs.h"
16501 #include <jpeglib.h>
16502 _ACEOF
16503 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16504   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16505   ac_status=$?
16506   egrep -v '^ *\+' conftest.er1 >conftest.err
16507   rm -f conftest.er1
16508   cat conftest.err >&5
16509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16510   (exit $ac_status); } >/dev/null; then
16511   if test -s conftest.err; then
16512     ac_cpp_err=$ac_c_preproc_warn_flag
16513   else
16514     ac_cpp_err=
16515   fi
16516 else
16517   ac_cpp_err=yes
16518 fi
16519 if test -z "$ac_cpp_err"; then
16520   ac_header_preproc=yes
16521 else
16522   echo "$as_me: failed program was:" >&5
16523   cat conftest.$ac_ext >&5
16524   ac_header_preproc=no
16525 fi
16526 rm -f conftest.err conftest.$ac_ext
16527 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16528 echo "${ECHO_T}$ac_header_preproc" >&6
16529
16530 # So?  What about this header?
16531 case $ac_header_compiler:$ac_header_preproc in
16532   yes:no )
16533     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16534 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16535     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
16536 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
16537   no:yes )
16538     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
16539 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
16540     { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
16541 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
16542     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
16543 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
16544 esac
16545 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
16546 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
16547 if test "${ac_cv_header_jpeglib_h+set}" = set; then
16548   echo $ECHO_N "(cached) $ECHO_C" >&6
16549 else
16550   ac_cv_header_jpeglib_h=$ac_header_preproc
16551 fi
16552 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
16553 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
16554
16555 fi
16556 if test $ac_cv_header_jpeglib_h = yes; then
16557   have_jpeg=yes
16558 fi
16559
16560
16561   CPPFLAGS="$ac_save_CPPFLAGS"
16562
16563   if test "$have_jpeg" = yes; then
16564     # we have the header, now check for the library
16565     have_jpeg=no
16566     jpeg_halfassed=yes
16567
16568   ac_save_CPPFLAGS="$CPPFLAGS"
16569   ac_save_LDFLAGS="$LDFLAGS"
16570 #  ac_save_LIBS="$LIBS"
16571
16572   if test \! -z "$includedir" ; then
16573     CPPFLAGS="$CPPFLAGS -I$includedir"
16574   fi
16575   # note: $X_CFLAGS includes $x_includes
16576   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16577
16578   if test \! -z "$libdir" ; then
16579     LDFLAGS="$LDFLAGS -L$libdir"
16580   fi
16581   # note: $X_LIBS includes $x_libraries
16582   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16583
16584   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
16585 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
16586 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
16587   echo $ECHO_N "(cached) $ECHO_C" >&6
16588 else
16589   ac_check_lib_save_LIBS=$LIBS
16590 LIBS="-ljpeg  $LIBS"
16591 cat >conftest.$ac_ext <<_ACEOF
16592 #line $LINENO "configure"
16593 #include "confdefs.h"
16594
16595 /* Override any gcc2 internal prototype to avoid an error.  */
16596 #ifdef __cplusplus
16597 extern "C"
16598 #endif
16599 /* We use char because int might match the return type of a gcc2
16600    builtin and then its argument prototype would still apply.  */
16601 char jpeg_start_compress ();
16602 #ifdef F77_DUMMY_MAIN
16603 #  ifdef __cplusplus
16604      extern "C"
16605 #  endif
16606    int F77_DUMMY_MAIN() { return 1; }
16607 #endif
16608 int
16609 main ()
16610 {
16611 jpeg_start_compress ();
16612   ;
16613   return 0;
16614 }
16615 _ACEOF
16616 rm -f conftest.$ac_objext conftest$ac_exeext
16617 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16618   (eval $ac_link) 2>&5
16619   ac_status=$?
16620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16621   (exit $ac_status); } &&
16622          { ac_try='test -s conftest$ac_exeext'
16623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16624   (eval $ac_try) 2>&5
16625   ac_status=$?
16626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16627   (exit $ac_status); }; }; then
16628   ac_cv_lib_jpeg_jpeg_start_compress=yes
16629 else
16630   echo "$as_me: failed program was:" >&5
16631 cat conftest.$ac_ext >&5
16632 ac_cv_lib_jpeg_jpeg_start_compress=no
16633 fi
16634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16635 LIBS=$ac_check_lib_save_LIBS
16636 fi
16637 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
16638 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
16639 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
16640   have_jpeg=yes
16641                     jpeg_halfassed=no
16642                     JPEG_LIBS="-ljpeg"
16643                     cat >>confdefs.h <<\_ACEOF
16644 #define HAVE_JPEGLIB 1
16645 _ACEOF
16646
16647 fi
16648
16649   CPPFLAGS="$ac_save_CPPFLAGS"
16650   LDFLAGS="$ac_save_LDFLAGS"
16651 #  LIBS="$ac_save_LIBS"
16652
16653   fi
16654 fi
16655
16656
16657 ###############################################################################
16658 #
16659 #       Check for the XSHM server extension.
16660 #
16661 ###############################################################################
16662
16663 have_xshm=no
16664 with_xshm_req=unspecified
16665
16666 # Check whether --with-xshm-ext or --without-xshm-ext was given.
16667 if test "${with_xshm_ext+set}" = set; then
16668   withval="$with_xshm_ext"
16669   with_xshm="$withval"; with_xshm_req="$withval"
16670 else
16671   with_xshm=yes
16672 fi;
16673
16674
16675    case "$with_xshm" in
16676     yes) ;;
16677     no)  ;;
16678
16679     /*)
16680      echo "$as_me:$LINENO: checking for XSHM headers" >&5
16681 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
16682      d=$with_xshm/include
16683      if test -d $d; then
16684        X_CFLAGS="-I$d $X_CFLAGS"
16685        echo "$as_me:$LINENO: result: $d" >&5
16686 echo "${ECHO_T}$d" >&6
16687      else
16688        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16689 echo "${ECHO_T}not found ($d: no such directory)" >&6
16690      fi
16691
16692      echo "$as_me:$LINENO: checking for XSHM libs" >&5
16693 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
16694      d=$with_xshm/lib
16695      if test -d $d; then
16696        X_LIBS="-L$d $X_LIBS"
16697        echo "$as_me:$LINENO: result: $d" >&5
16698 echo "${ECHO_T}$d" >&6
16699      else
16700        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16701 echo "${ECHO_T}not found ($d: no such directory)" >&6
16702      fi
16703
16704      # replace the directory string with "yes".
16705      with_xshm_req="yes"
16706      with_xshm=$with_xshm_req
16707      ;;
16708
16709     *)
16710      echo ""
16711      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
16712      echo "       If it is a directory, then \`DIR/include' will be added to"
16713      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16714      exit 1
16715      ;;
16716    esac
16717
16718
16719 if test "$with_xshm" = yes; then
16720
16721   # first check for Xshm.h.
16722
16723   ac_save_CPPFLAGS="$CPPFLAGS"
16724   if test \! -z "$includedir" ; then
16725     CPPFLAGS="$CPPFLAGS -I$includedir"
16726   fi
16727   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16728   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
16729 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
16730 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
16731   echo $ECHO_N "(cached) $ECHO_C" >&6
16732 else
16733   cat >conftest.$ac_ext <<_ACEOF
16734 #line $LINENO "configure"
16735 #include "confdefs.h"
16736 #include <X11/Xlib.h>
16737
16738 #include <X11/extensions/XShm.h>
16739 _ACEOF
16740 rm -f conftest.$ac_objext
16741 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16742   (eval $ac_compile) 2>&5
16743   ac_status=$?
16744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16745   (exit $ac_status); } &&
16746          { ac_try='test -s conftest.$ac_objext'
16747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16748   (eval $ac_try) 2>&5
16749   ac_status=$?
16750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16751   (exit $ac_status); }; }; then
16752   ac_cv_header_X11_extensions_XShm_h=yes
16753 else
16754   echo "$as_me: failed program was:" >&5
16755 cat conftest.$ac_ext >&5
16756 ac_cv_header_X11_extensions_XShm_h=no
16757 fi
16758 rm -f conftest.$ac_objext conftest.$ac_ext
16759 fi
16760 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
16761 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
16762 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
16763   have_xshm=yes
16764 fi
16765
16766
16767   CPPFLAGS="$ac_save_CPPFLAGS"
16768
16769   # if that succeeded, then check for sys/ipc.h.
16770   if test "$have_xshm" = yes; then
16771     have_xshm=no
16772
16773   ac_save_CPPFLAGS="$CPPFLAGS"
16774   if test \! -z "$includedir" ; then
16775     CPPFLAGS="$CPPFLAGS -I$includedir"
16776   fi
16777   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16778   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16779   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16780 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16781 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16782   echo $ECHO_N "(cached) $ECHO_C" >&6
16783 fi
16784 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16785 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16786 else
16787   # Is the header compilable?
16788 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
16789 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
16790 cat >conftest.$ac_ext <<_ACEOF
16791 #line $LINENO "configure"
16792 #include "confdefs.h"
16793 $ac_includes_default
16794 #include <sys/ipc.h>
16795 _ACEOF
16796 rm -f conftest.$ac_objext
16797 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16798   (eval $ac_compile) 2>&5
16799   ac_status=$?
16800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16801   (exit $ac_status); } &&
16802          { ac_try='test -s conftest.$ac_objext'
16803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16804   (eval $ac_try) 2>&5
16805   ac_status=$?
16806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16807   (exit $ac_status); }; }; then
16808   ac_header_compiler=yes
16809 else
16810   echo "$as_me: failed program was:" >&5
16811 cat conftest.$ac_ext >&5
16812 ac_header_compiler=no
16813 fi
16814 rm -f conftest.$ac_objext conftest.$ac_ext
16815 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16816 echo "${ECHO_T}$ac_header_compiler" >&6
16817
16818 # Is the header present?
16819 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
16820 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
16821 cat >conftest.$ac_ext <<_ACEOF
16822 #line $LINENO "configure"
16823 #include "confdefs.h"
16824 #include <sys/ipc.h>
16825 _ACEOF
16826 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16827   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16828   ac_status=$?
16829   egrep -v '^ *\+' conftest.er1 >conftest.err
16830   rm -f conftest.er1
16831   cat conftest.err >&5
16832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16833   (exit $ac_status); } >/dev/null; then
16834   if test -s conftest.err; then
16835     ac_cpp_err=$ac_c_preproc_warn_flag
16836   else
16837     ac_cpp_err=
16838   fi
16839 else
16840   ac_cpp_err=yes
16841 fi
16842 if test -z "$ac_cpp_err"; then
16843   ac_header_preproc=yes
16844 else
16845   echo "$as_me: failed program was:" >&5
16846   cat conftest.$ac_ext >&5
16847   ac_header_preproc=no
16848 fi
16849 rm -f conftest.err conftest.$ac_ext
16850 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16851 echo "${ECHO_T}$ac_header_preproc" >&6
16852
16853 # So?  What about this header?
16854 case $ac_header_compiler:$ac_header_preproc in
16855   yes:no )
16856     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
16857 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16858     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16859 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16860   no:yes )
16861     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
16862 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
16863     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
16864 echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
16865     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16866 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16867 esac
16868 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16869 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16870 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16871   echo $ECHO_N "(cached) $ECHO_C" >&6
16872 else
16873   ac_cv_header_sys_ipc_h=$ac_header_preproc
16874 fi
16875 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16876 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16877
16878 fi
16879 if test $ac_cv_header_sys_ipc_h = yes; then
16880   have_xshm=yes
16881 fi
16882
16883
16884   CPPFLAGS="$ac_save_CPPFLAGS"
16885   fi
16886
16887   # if that succeeded, then check for sys/shm.h.
16888   if test "$have_xshm" = yes; then
16889     have_xshm=no
16890
16891   ac_save_CPPFLAGS="$CPPFLAGS"
16892   if test \! -z "$includedir" ; then
16893     CPPFLAGS="$CPPFLAGS -I$includedir"
16894   fi
16895   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16896   if test "${ac_cv_header_sys_shm_h+set}" = set; then
16897   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
16898 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
16899 if test "${ac_cv_header_sys_shm_h+set}" = set; then
16900   echo $ECHO_N "(cached) $ECHO_C" >&6
16901 fi
16902 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
16903 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
16904 else
16905   # Is the header compilable?
16906 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
16907 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
16908 cat >conftest.$ac_ext <<_ACEOF
16909 #line $LINENO "configure"
16910 #include "confdefs.h"
16911 $ac_includes_default
16912 #include <sys/shm.h>
16913 _ACEOF
16914 rm -f conftest.$ac_objext
16915 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16916   (eval $ac_compile) 2>&5
16917   ac_status=$?
16918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16919   (exit $ac_status); } &&
16920          { ac_try='test -s conftest.$ac_objext'
16921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16922   (eval $ac_try) 2>&5
16923   ac_status=$?
16924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16925   (exit $ac_status); }; }; then
16926   ac_header_compiler=yes
16927 else
16928   echo "$as_me: failed program was:" >&5
16929 cat conftest.$ac_ext >&5
16930 ac_header_compiler=no
16931 fi
16932 rm -f conftest.$ac_objext conftest.$ac_ext
16933 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16934 echo "${ECHO_T}$ac_header_compiler" >&6
16935
16936 # Is the header present?
16937 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
16938 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
16939 cat >conftest.$ac_ext <<_ACEOF
16940 #line $LINENO "configure"
16941 #include "confdefs.h"
16942 #include <sys/shm.h>
16943 _ACEOF
16944 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16945   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16946   ac_status=$?
16947   egrep -v '^ *\+' conftest.er1 >conftest.err
16948   rm -f conftest.er1
16949   cat conftest.err >&5
16950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16951   (exit $ac_status); } >/dev/null; then
16952   if test -s conftest.err; then
16953     ac_cpp_err=$ac_c_preproc_warn_flag
16954   else
16955     ac_cpp_err=
16956   fi
16957 else
16958   ac_cpp_err=yes
16959 fi
16960 if test -z "$ac_cpp_err"; then
16961   ac_header_preproc=yes
16962 else
16963   echo "$as_me: failed program was:" >&5
16964   cat conftest.$ac_ext >&5
16965   ac_header_preproc=no
16966 fi
16967 rm -f conftest.err conftest.$ac_ext
16968 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16969 echo "${ECHO_T}$ac_header_preproc" >&6
16970
16971 # So?  What about this header?
16972 case $ac_header_compiler:$ac_header_preproc in
16973   yes:no )
16974     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
16975 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16976     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
16977 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
16978   no:yes )
16979     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
16980 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
16981     { echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
16982 echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
16983     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
16984 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
16985 esac
16986 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
16987 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
16988 if test "${ac_cv_header_sys_shm_h+set}" = set; then
16989   echo $ECHO_N "(cached) $ECHO_C" >&6
16990 else
16991   ac_cv_header_sys_shm_h=$ac_header_preproc
16992 fi
16993 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
16994 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
16995
16996 fi
16997 if test $ac_cv_header_sys_shm_h = yes; then
16998   have_xshm=yes
16999 fi
17000
17001
17002   CPPFLAGS="$ac_save_CPPFLAGS"
17003   fi
17004
17005   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
17006   # to exist, but the library code to not exist.  And even better, the library
17007   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
17008   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
17009   # that's not quite right, but close enough.)
17010   #
17011   case "$host" in
17012     *-aix*)
17013       if  `uname -v` -eq 3 ; then
17014         have_xshm=no
17015
17016   ac_save_CPPFLAGS="$CPPFLAGS"
17017   ac_save_LDFLAGS="$LDFLAGS"
17018 #  ac_save_LIBS="$LIBS"
17019
17020   if test \! -z "$includedir" ; then
17021     CPPFLAGS="$CPPFLAGS -I$includedir"
17022   fi
17023   # note: $X_CFLAGS includes $x_includes
17024   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17025
17026   if test \! -z "$libdir" ; then
17027     LDFLAGS="$LDFLAGS -L$libdir"
17028   fi
17029   # note: $X_LIBS includes $x_libraries
17030   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17031
17032   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
17033 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
17034 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
17035   echo $ECHO_N "(cached) $ECHO_C" >&6
17036 else
17037   ac_check_lib_save_LIBS=$LIBS
17038 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
17039 cat >conftest.$ac_ext <<_ACEOF
17040 #line $LINENO "configure"
17041 #include "confdefs.h"
17042
17043 /* Override any gcc2 internal prototype to avoid an error.  */
17044 #ifdef __cplusplus
17045 extern "C"
17046 #endif
17047 /* We use char because int might match the return type of a gcc2
17048    builtin and then its argument prototype would still apply.  */
17049 char XShmQueryExtension ();
17050 #ifdef F77_DUMMY_MAIN
17051 #  ifdef __cplusplus
17052      extern "C"
17053 #  endif
17054    int F77_DUMMY_MAIN() { return 1; }
17055 #endif
17056 int
17057 main ()
17058 {
17059 XShmQueryExtension ();
17060   ;
17061   return 0;
17062 }
17063 _ACEOF
17064 rm -f conftest.$ac_objext conftest$ac_exeext
17065 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17066   (eval $ac_link) 2>&5
17067   ac_status=$?
17068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17069   (exit $ac_status); } &&
17070          { ac_try='test -s conftest$ac_exeext'
17071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17072   (eval $ac_try) 2>&5
17073   ac_status=$?
17074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17075   (exit $ac_status); }; }; then
17076   ac_cv_lib_XextSam_XShmQueryExtension=yes
17077 else
17078   echo "$as_me: failed program was:" >&5
17079 cat conftest.$ac_ext >&5
17080 ac_cv_lib_XextSam_XShmQueryExtension=no
17081 fi
17082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17083 LIBS=$ac_check_lib_save_LIBS
17084 fi
17085 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
17086 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
17087 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
17088   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
17089 else
17090   true
17091 fi
17092
17093   CPPFLAGS="$ac_save_CPPFLAGS"
17094   LDFLAGS="$ac_save_LDFLAGS"
17095 #  LIBS="$ac_save_LIBS"
17096
17097       fi
17098     ;;
17099   esac
17100
17101   # if that succeeded, then we've really got it.
17102   if test "$have_xshm" = yes; then
17103     cat >>confdefs.h <<\_ACEOF
17104 #define HAVE_XSHM_EXTENSION 1
17105 _ACEOF
17106
17107   fi
17108
17109 elif test "$with_xshm" != no; then
17110   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
17111   exit 1
17112 fi
17113
17114
17115 ###############################################################################
17116 #
17117 #       Check for the DOUBLE-BUFFER server extension.
17118 #
17119 ###############################################################################
17120
17121 have_xdbe=no
17122 with_xdbe_req=unspecified
17123
17124 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
17125 if test "${with_xdbe_ext+set}" = set; then
17126   withval="$with_xdbe_ext"
17127   with_xdbe="$withval"; with_xdbe_req="$withval"
17128 else
17129   with_xdbe=yes
17130 fi;
17131
17132
17133    case "$with_xdbe" in
17134     yes) ;;
17135     no)  ;;
17136
17137     /*)
17138      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
17139 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
17140      d=$with_xdbe/include
17141      if test -d $d; then
17142        X_CFLAGS="-I$d $X_CFLAGS"
17143        echo "$as_me:$LINENO: result: $d" >&5
17144 echo "${ECHO_T}$d" >&6
17145      else
17146        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17147 echo "${ECHO_T}not found ($d: no such directory)" >&6
17148      fi
17149
17150      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
17151 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
17152      d=$with_xdbe/lib
17153      if test -d $d; then
17154        X_LIBS="-L$d $X_LIBS"
17155        echo "$as_me:$LINENO: result: $d" >&5
17156 echo "${ECHO_T}$d" >&6
17157      else
17158        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17159 echo "${ECHO_T}not found ($d: no such directory)" >&6
17160      fi
17161
17162      # replace the directory string with "yes".
17163      with_xdbe_req="yes"
17164      with_xdbe=$with_xdbe_req
17165      ;;
17166
17167     *)
17168      echo ""
17169      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
17170      echo "       If it is a directory, then \`DIR/include' will be added to"
17171      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17172      exit 1
17173      ;;
17174    esac
17175
17176
17177 if test "$with_xdbe" = yes; then
17178
17179
17180   ac_save_CPPFLAGS="$CPPFLAGS"
17181   if test \! -z "$includedir" ; then
17182     CPPFLAGS="$CPPFLAGS -I$includedir"
17183   fi
17184   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17185   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
17186 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
17187 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
17188   echo $ECHO_N "(cached) $ECHO_C" >&6
17189 else
17190   cat >conftest.$ac_ext <<_ACEOF
17191 #line $LINENO "configure"
17192 #include "confdefs.h"
17193 #include <X11/Xlib.h>
17194
17195 #include <X11/extensions/Xdbe.h>
17196 _ACEOF
17197 rm -f conftest.$ac_objext
17198 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17199   (eval $ac_compile) 2>&5
17200   ac_status=$?
17201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17202   (exit $ac_status); } &&
17203          { ac_try='test -s conftest.$ac_objext'
17204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17205   (eval $ac_try) 2>&5
17206   ac_status=$?
17207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17208   (exit $ac_status); }; }; then
17209   ac_cv_header_X11_extensions_Xdbe_h=yes
17210 else
17211   echo "$as_me: failed program was:" >&5
17212 cat conftest.$ac_ext >&5
17213 ac_cv_header_X11_extensions_Xdbe_h=no
17214 fi
17215 rm -f conftest.$ac_objext conftest.$ac_ext
17216 fi
17217 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
17218 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
17219 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
17220   have_xdbe=yes
17221 fi
17222
17223
17224   CPPFLAGS="$ac_save_CPPFLAGS"
17225   if test "$have_xdbe" = yes; then
17226     cat >>confdefs.h <<\_ACEOF
17227 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
17228 _ACEOF
17229
17230   fi
17231
17232 elif test "$with_xdbe" != no; then
17233   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
17234   exit 1
17235 fi
17236
17237
17238 ###############################################################################
17239 #
17240 #       Check for the SGI XReadDisplay server extension.
17241 #
17242 #       Note: this has to be down here, rather than up with the other server
17243 #       extension tests, so that the output of `configure --help' is in the
17244 #       right order.  Arrgh!
17245 #
17246 ###############################################################################
17247
17248 have_readdisplay=no
17249 with_readdisplay_req=unspecified
17250
17251 # Check whether --with-readdisplay or --without-readdisplay was given.
17252 if test "${with_readdisplay+set}" = set; then
17253   withval="$with_readdisplay"
17254   with_readdisplay="$withval"; with_readdisplay_req="$withval"
17255 else
17256   with_readdisplay=yes
17257 fi;
17258
17259
17260    case "$with_readdisplay" in
17261     yes) ;;
17262     no)  ;;
17263
17264     /*)
17265      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
17266 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
17267      d=$with_readdisplay/include
17268      if test -d $d; then
17269        X_CFLAGS="-I$d $X_CFLAGS"
17270        echo "$as_me:$LINENO: result: $d" >&5
17271 echo "${ECHO_T}$d" >&6
17272      else
17273        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17274 echo "${ECHO_T}not found ($d: no such directory)" >&6
17275      fi
17276
17277      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
17278 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
17279      d=$with_readdisplay/lib
17280      if test -d $d; then
17281        X_LIBS="-L$d $X_LIBS"
17282        echo "$as_me:$LINENO: result: $d" >&5
17283 echo "${ECHO_T}$d" >&6
17284      else
17285        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17286 echo "${ECHO_T}not found ($d: no such directory)" >&6
17287      fi
17288
17289      # replace the directory string with "yes".
17290      with_readdisplay_req="yes"
17291      with_readdisplay=$with_readdisplay_req
17292      ;;
17293
17294     *)
17295      echo ""
17296      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
17297      echo "       If it is a directory, then \`DIR/include' will be added to"
17298      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17299      exit 1
17300      ;;
17301    esac
17302
17303
17304 if test "$with_readdisplay" = yes; then
17305
17306   ac_save_CPPFLAGS="$CPPFLAGS"
17307   if test \! -z "$includedir" ; then
17308     CPPFLAGS="$CPPFLAGS -I$includedir"
17309   fi
17310   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17311   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
17312 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
17313 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
17314   echo $ECHO_N "(cached) $ECHO_C" >&6
17315 else
17316   cat >conftest.$ac_ext <<_ACEOF
17317 #line $LINENO "configure"
17318 #include "confdefs.h"
17319 #include <X11/Xlib.h>
17320
17321 #include <X11/extensions/readdisplay.h>
17322 _ACEOF
17323 rm -f conftest.$ac_objext
17324 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17325   (eval $ac_compile) 2>&5
17326   ac_status=$?
17327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17328   (exit $ac_status); } &&
17329          { ac_try='test -s conftest.$ac_objext'
17330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17331   (eval $ac_try) 2>&5
17332   ac_status=$?
17333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17334   (exit $ac_status); }; }; then
17335   ac_cv_header_X11_extensions_readdisplay_h=yes
17336 else
17337   echo "$as_me: failed program was:" >&5
17338 cat conftest.$ac_ext >&5
17339 ac_cv_header_X11_extensions_readdisplay_h=no
17340 fi
17341 rm -f conftest.$ac_objext conftest.$ac_ext
17342 fi
17343 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
17344 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
17345 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
17346   cat >>confdefs.h <<\_ACEOF
17347 #define HAVE_READ_DISPLAY_EXTENSION 1
17348 _ACEOF
17349
17350 fi
17351
17352
17353   CPPFLAGS="$ac_save_CPPFLAGS"
17354 elif test "$with_readdisplay" != no; then
17355   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
17356   exit 1
17357 fi
17358
17359
17360 ###############################################################################
17361 #
17362 #       Check for a program to generate random text.
17363 #
17364 #       Zippy is funnier than the idiocy generally spat out by `fortune',
17365 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
17366 #
17367 #       We used to dig around in Emacs to look for the "yow" program, but
17368 #       most people who have Emacs also have "fortune zippy", so nevermind.
17369 #
17370 ###############################################################################
17371
17372 with_fortune_req=""
17373
17374 # Check whether --with-fortune or --without-fortune was given.
17375 if test "${with_fortune+set}" = set; then
17376   withval="$with_fortune"
17377   with_fortune_req="$withval"; with_fortune="$withval"
17378 else
17379   with_fortune=yes
17380 fi;
17381
17382 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
17383   with_fortune=""
17384   with_fortune_req=""
17385 fi
17386
17387 if test -n "$with_fortune_req" ; then
17388   ac_cv_fortune_program=""
17389   case "$with_fortune_req" in
17390     /*)
17391
17392       set dummy $with_fortune_req ; fortune_tmp=$2
17393       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
17394 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
17395       if test -x "$fortune_tmp" ; then
17396         echo "$as_me:$LINENO: result: yes" >&5
17397 echo "${ECHO_T}yes" >&6
17398       else
17399         echo "$as_me:$LINENO: result: no" >&5
17400 echo "${ECHO_T}no" >&6
17401         with_fortune=""
17402       fi
17403     ;;
17404     *)
17405       set dummy $with_fortune_req ; fortune_tmp=$2
17406       # don't cache
17407       unset ac_cv_path_fortune_tmp
17408       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
17409 set dummy $fortune_tmp; ac_word=$2
17410 echo "$as_me:$LINENO: checking for $ac_word" >&5
17411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17412 if test "${ac_cv_path_fortune_tmp+set}" = set; then
17413   echo $ECHO_N "(cached) $ECHO_C" >&6
17414 else
17415   case $fortune_tmp in
17416   [\\/]* | ?:[\\/]*)
17417   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
17418   ;;
17419   *)
17420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17421 for as_dir in $PATH
17422 do
17423   IFS=$as_save_IFS
17424   test -z "$as_dir" && as_dir=.
17425   for ac_exec_ext in '' $ac_executable_extensions; do
17426   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17427     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
17428     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17429     break 2
17430   fi
17431 done
17432 done
17433
17434   ;;
17435 esac
17436 fi
17437 fortune_tmp=$ac_cv_path_fortune_tmp
17438
17439 if test -n "$fortune_tmp"; then
17440   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17441 echo "${ECHO_T}$fortune_tmp" >&6
17442 else
17443   echo "$as_me:$LINENO: result: no" >&5
17444 echo "${ECHO_T}no" >&6
17445 fi
17446
17447       if test -z "$fortune_tmp" ; then
17448         with_fortune=""
17449       fi
17450     ;;
17451   esac
17452   ac_cv_fortune_program="$with_fortune"
17453
17454 elif test -n "$ac_cv_fortune_program"; then
17455   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
17456 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
17457 fi
17458
17459 unset ac_cv_path_fortune_tmp
17460 unset fortune_tmp
17461
17462 if test -z "$ac_cv_fortune_program" ; then
17463
17464   # first look for fortune in /usr/games/ (and use absolute path)
17465   for ac_prog in fortune
17466 do
17467   # Extract the first word of "$ac_prog", so it can be a program name with args.
17468 set dummy $ac_prog; ac_word=$2
17469 echo "$as_me:$LINENO: checking for $ac_word" >&5
17470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17471 if test "${ac_cv_path_fortune_tmp+set}" = set; then
17472   echo $ECHO_N "(cached) $ECHO_C" >&6
17473 else
17474   case $fortune_tmp in
17475   [\\/]* | ?:[\\/]*)
17476   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
17477   ;;
17478   *)
17479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17480 as_dummy=""/usr/games""
17481 for as_dir in $as_dummy
17482 do
17483   IFS=$as_save_IFS
17484   test -z "$as_dir" && as_dir=.
17485   for ac_exec_ext in '' $ac_executable_extensions; do
17486   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17487     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
17488     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17489     break 2
17490   fi
17491 done
17492 done
17493
17494   ;;
17495 esac
17496 fi
17497 fortune_tmp=$ac_cv_path_fortune_tmp
17498
17499 if test -n "$fortune_tmp"; then
17500   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17501 echo "${ECHO_T}$fortune_tmp" >&6
17502 else
17503   echo "$as_me:$LINENO: result: no" >&5
17504 echo "${ECHO_T}no" >&6
17505 fi
17506
17507   test -n "$fortune_tmp" && break
17508 done
17509
17510
17511   # if it's not there, look on $PATH (and don't use absolute path)
17512   if test -z "$fortune_tmp" ; then
17513      for ac_prog in fortune
17514 do
17515   # Extract the first word of "$ac_prog", so it can be a program name with args.
17516 set dummy $ac_prog; ac_word=$2
17517 echo "$as_me:$LINENO: checking for $ac_word" >&5
17518 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17519 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
17520   echo $ECHO_N "(cached) $ECHO_C" >&6
17521 else
17522   if test -n "$fortune_tmp"; then
17523   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
17524 else
17525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17526 for as_dir in $PATH
17527 do
17528   IFS=$as_save_IFS
17529   test -z "$as_dir" && as_dir=.
17530   for ac_exec_ext in '' $ac_executable_extensions; do
17531   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17532     ac_cv_prog_fortune_tmp="$ac_prog"
17533     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17534     break 2
17535   fi
17536 done
17537 done
17538
17539 fi
17540 fi
17541 fortune_tmp=$ac_cv_prog_fortune_tmp
17542 if test -n "$fortune_tmp"; then
17543   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17544 echo "${ECHO_T}$fortune_tmp" >&6
17545 else
17546   echo "$as_me:$LINENO: result: no" >&5
17547 echo "${ECHO_T}no" >&6
17548 fi
17549
17550   test -n "$fortune_tmp" && break
17551 done
17552
17553   fi
17554
17555   # if we didn't find anything, then just assume /usr/games/
17556   if test -z "$fortune_tmp" ; then
17557      fortune_tmp="/usr/games/fortune"
17558   fi
17559
17560   ac_cv_fortune_program="$fortune_tmp"
17561
17562   # now check to see whether "fortune zippy" works.
17563   #
17564   fortune_tmp="$fortune_tmp zippy"
17565   echo "$as_me:$LINENO: checking for zippy quotes" >&5
17566 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
17567   if ( $fortune_tmp >/dev/null 2>&1 ); then
17568     ac_cv_fortune_program="$fortune_tmp"
17569     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17570 echo "${ECHO_T}$fortune_tmp" >&6
17571   else
17572     echo "$as_me:$LINENO: result: no" >&5
17573 echo "${ECHO_T}no" >&6
17574   fi
17575
17576 fi
17577
17578 unset ac_cv_path_fortune_tmp
17579 unset fortune_tmp
17580
17581 cat >>confdefs.h <<_ACEOF
17582 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
17583 _ACEOF
17584
17585
17586
17587 ###############################################################################
17588 #
17589 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
17590 #       This should be safe, but let's give people the option.
17591 #
17592 ###############################################################################
17593
17594 setuid_hacks_default=no
17595 setuid_hacks="$setuid_hacks_default"
17596
17597 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
17598 if test "${with_setuid_hacks+set}" = set; then
17599   withval="$with_setuid_hacks"
17600   setuid_hacks="$withval"
17601 else
17602   setuid_hacks="$setuid_hacks_default"
17603 fi;
17604
17605
17606    case "$setuid_hacks" in
17607     yes) ;;
17608     no)  ;;
17609
17610     /*)
17611      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
17612 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
17613      d=$setuid_hacks/include
17614      if test -d $d; then
17615        X_CFLAGS="-I$d $X_CFLAGS"
17616        echo "$as_me:$LINENO: result: $d" >&5
17617 echo "${ECHO_T}$d" >&6
17618      else
17619        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17620 echo "${ECHO_T}not found ($d: no such directory)" >&6
17621      fi
17622
17623      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
17624 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
17625      d=$setuid_hacks/lib
17626      if test -d $d; then
17627        X_LIBS="-L$d $X_LIBS"
17628        echo "$as_me:$LINENO: result: $d" >&5
17629 echo "${ECHO_T}$d" >&6
17630      else
17631        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17632 echo "${ECHO_T}not found ($d: no such directory)" >&6
17633      fi
17634
17635      # replace the directory string with "yes".
17636      setuid_hacks_req="yes"
17637      setuid_hacks=$setuid_hacks_req
17638      ;;
17639
17640     *)
17641      echo ""
17642      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
17643      echo "       If it is a directory, then \`DIR/include' will be added to"
17644      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17645      exit 1
17646      ;;
17647    esac
17648
17649
17650 if test "$setuid_hacks" = yes; then
17651   true
17652 elif test "$setuid_hacks" != no; then
17653   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
17654   exit 1
17655 fi
17656
17657
17658 ###############################################################################
17659 #
17660 #       Done testing.  Now, set up the various -I and -L variables,
17661 #       and decide which GUI program to build by default.
17662 #
17663 ###############################################################################
17664
17665 DEPEND=makedepend
17666 DEPEND_FLAGS=
17667 DEPEND_DEFINES=
17668
17669
17670 if test \! -z "$includedir" ; then
17671   INCLUDES="$INCLUDES -I$includedir"
17672 fi
17673
17674 if test \! -z "$libdir" ; then
17675   LDFLAGS="$LDFLAGS -L$libdir"
17676 fi
17677
17678
17679 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
17680 ALL_DEMO_PROGRAMS=
17681 if test "$have_motif" = yes; then
17682   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
17683   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
17684 fi
17685 if test "$have_gtk" = yes; then
17686   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
17687   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
17688 fi
17689
17690
17691 if test "$have_kerberos" = yes; then
17692   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
17693   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
17694 fi
17695 if test "$have_pam" = yes; then
17696   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
17697   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
17698   INSTALL_PAM="install-pam"
17699 fi
17700   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
17701   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
17702
17703
17704 if test "$enable_locking" = yes; then
17705   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
17706   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
17707 else
17708   LOCK_SRCS='$(NOLOCK_SRCS_1)'
17709   LOCK_OBJS='$(NOLOCK_OBJS_1)'
17710 fi
17711
17712 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
17713
17714 if test "$need_setuid" = yes; then
17715   NEED_SETUID=yes
17716 else
17717   NEED_SETUID=no
17718 fi
17719
17720 if test "$setuid_hacks" = yes; then
17721   SETUID_HACKS=yes
17722 else
17723   SETUID_HACKS=no
17724 fi
17725
17726 tab='   '
17727 if test "$have_gl" = yes; then
17728   GL_EXES='$(GL_EXES)'
17729   GL_UTIL_EXES='$(GL_UTIL_EXES)'
17730   GL_MEN='$(GL_MEN)'
17731   GL_KLUDGE="${tab}  "
17732 else
17733   GL_KLUDGE="-${tab}  "
17734 fi
17735
17736 if test "$have_gle" = yes; then
17737   GLE_EXES='$(GLE_EXES)'
17738   GLE_KLUDGE="${tab}   "
17739 else
17740   GLE_KLUDGE="-${tab}   "
17741 fi
17742
17743 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
17744  JPEG_EXES='$(JPEG_EXES)'
17745 fi
17746
17747
17748 # Another substitution in the XScreenSaver.ad.in file:
17749 #
17750 if test "$have_gnome_help" = yes; then
17751   GNOMEHELP_Y=''
17752   GNOMEHELP_N='!    '
17753 else
17754   GNOMEHELP_Y='!    '
17755   GNOMEHELP_N=''
17756 fi
17757
17758
17759 # Now that we know whether we have Gnome, we can decide where the XML
17760 # config files get installed.
17761 #
17762 if test -z "$HACK_CONF_DIR" ; then
17763   if test -n "$GNOME_DATADIR" ; then
17764     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
17765   else
17766     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
17767   fi
17768 fi
17769
17770
17771
17772 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
17773 # so that we know where to install the Gtk pixmaps.
17774 #
17775 # It should usually be "/usr/share/pixmaps/", but we can't just use
17776 # "$(prefix)/share/pixmaps" because that would usually result in
17777 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
17778 # Gnome/Gtk prefix, not the overall prefix.
17779 #
17780 if test -n "$GNOME_DATADIR" ; then
17781   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
17782 elif test "$have_gtk" = yes; then
17783   if test -n "$pkg_config"; then
17784     if test "$have_gtk2" = yes; then
17785       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
17786     else
17787       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+`
17788     fi
17789   else
17790     GLADE_DATADIR=`$gtk_config --prefix`
17791   fi
17792   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
17793 else
17794   GLADE_DATADIR=''
17795 fi
17796
17797
17798 # Set PO_DATADIR to something sensible.
17799 #
17800 echo "$as_me:$LINENO: checking for locale directory" >&5
17801 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
17802 if test -n "$GNOME_DATADIR" ; then
17803   PO_DATADIR="$GNOME_DATADIR"
17804 elif test "$have_gtk" = yes; then
17805   if test -n "$pkg_config"; then
17806     if test "$have_gtk2" = yes; then
17807       PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
17808     else
17809       PO_DATADIR=`$pkg_config --variable=prefix gtk+`
17810     fi
17811   else
17812     PO_DATADIR=`$gtk_config --prefix`
17813   fi
17814   PO_DATADIR="$PO_DATADIR/share"
17815 fi
17816
17817 if test -z "$PO_DATADIR" ; then
17818   #
17819   # #### Total fucking kludge --
17820   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
17821   # but of course we need to expand all the nested variables to do that...
17822   #
17823   dd=$datadir
17824   eval dd=${dd}
17825   eval dd=${dd}
17826   eval dd=${dd}
17827   eval dd=${dd}
17828   eval dd=${dd}
17829   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
17830 fi
17831
17832 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
17833 echo "${ECHO_T}$PO_DATADIR/locale" >&6
17834
17835
17836 # canonicalize slashes.
17837 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17838
17839 # gcc 3.0 likes to issue this warning for every file:
17840 #
17841 # cc1: warning: changing search order for system directory "/usr/local/include"
17842 # cc1: warning:   as it has already been specified as a non-system directory
17843 #
17844 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
17845 # Which *should* be totally redundant, and thus an ok thing to delete?
17846 #
17847 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
17848
17849
17850 ###############################################################################
17851 #
17852 #       Perform substitutions and write Makefiles.
17853 #
17854 ###############################################################################
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904 APPDEFAULTS=$ac_x_app_defaults
17905
17906
17907
17908
17909
17910
17911
17912 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad driver/xscreensaver.kss"
17913 cat >confcache <<\_ACEOF
17914 # This file is a shell script that caches the results of configure
17915 # tests run on this system so they can be shared between configure
17916 # scripts and configure runs, see configure's option --config-cache.
17917 # It is not useful on other systems.  If it contains results you don't
17918 # want to keep, you may remove or edit it.
17919 #
17920 # config.status only pays attention to the cache file if you give it
17921 # the --recheck option to rerun configure.
17922 #
17923 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17924 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17925 # following values.
17926
17927 _ACEOF
17928
17929 # The following way of writing the cache mishandles newlines in values,
17930 # but we know of no workaround that is simple, portable, and efficient.
17931 # So, don't put newlines in cache variables' values.
17932 # Ultrix sh set writes to stderr and can't be redirected directly,
17933 # and sets the high bit in the cache file unless we assign to the vars.
17934 {
17935   (set) 2>&1 |
17936     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17937     *ac_space=\ *)
17938       # `set' does not quote correctly, so add quotes (double-quote
17939       # substitution turns \\\\ into \\, and sed turns \\ into \).
17940       sed -n \
17941         "s/'/'\\\\''/g;
17942           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17943       ;;
17944     *)
17945       # `set' quotes correctly as required by POSIX, so do not add quotes.
17946       sed -n \
17947         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17948       ;;
17949     esac;
17950 } |
17951   sed '
17952      t clear
17953      : clear
17954      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17955      t end
17956      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17957      : end' >>confcache
17958 if cmp -s $cache_file confcache; then :; else
17959   if test -w $cache_file; then
17960     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17961     cat confcache >$cache_file
17962   else
17963     echo "not updating unwritable cache $cache_file"
17964   fi
17965 fi
17966 rm -f confcache
17967
17968 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17969 # Let make expand exec_prefix.
17970 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17971
17972 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17973 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17974 # trailing colons and then remove the whole line if VPATH becomes empty
17975 # (actually we leave an empty line to preserve line numbers).
17976 if test "x$srcdir" = x.; then
17977   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17978 s/:*\$(srcdir):*/:/;
17979 s/:*\${srcdir}:*/:/;
17980 s/:*@srcdir@:*/:/;
17981 s/^\([^=]*=[    ]*\):*/\1/;
17982 s/:*$//;
17983 s/^[^=]*=[      ]*$//;
17984 }'
17985 fi
17986
17987 DEFS=-DHAVE_CONFIG_H
17988
17989
17990
17991         mv -f po/POTFILES po/POTFILES.tmp
17992         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
17993         rm -f po/POTFILES.tmp
17994
17995
17996
17997 : ${CONFIG_STATUS=./config.status}
17998 ac_clean_files_save=$ac_clean_files
17999 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18000 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18001 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18002 cat >$CONFIG_STATUS <<_ACEOF
18003 #! $SHELL
18004 # Generated by $as_me.
18005 # Run this file to recreate the current configuration.
18006 # Compiler output produced by configure, useful for debugging
18007 # configure, is in config.log if it exists.
18008
18009 debug=false
18010 SHELL=\${CONFIG_SHELL-$SHELL}
18011 _ACEOF
18012
18013 cat >>$CONFIG_STATUS <<\_ACEOF
18014
18015 ## --------------------- ##
18016 ## M4sh Initialization.  ##
18017 ## --------------------- ##
18018
18019 # Be Bourne compatible
18020 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18021   emulate sh
18022   NULLCMD=:
18023 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18024   set -o posix
18025 fi
18026
18027 # NLS nuisances.
18028 # Support unset when possible.
18029 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18030   as_unset=unset
18031 else
18032   as_unset=false
18033 fi
18034
18035 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
18036     { $as_unset LANG || test "${LANG+set}" != set; } ||
18037       { LANG=C; export LANG; }
18038 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
18039     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
18040       { LC_ALL=C; export LC_ALL; }
18041 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
18042     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
18043       { LC_TIME=C; export LC_TIME; }
18044 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
18045     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
18046       { LC_CTYPE=C; export LC_CTYPE; }
18047 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
18048     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
18049       { LANGUAGE=C; export LANGUAGE; }
18050 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
18051     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
18052       { LC_COLLATE=C; export LC_COLLATE; }
18053 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
18054     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
18055       { LC_NUMERIC=C; export LC_NUMERIC; }
18056 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
18057     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
18058       { LC_MESSAGES=C; export LC_MESSAGES; }
18059
18060
18061 # Name of the executable.
18062 as_me=`(basename "$0") 2>/dev/null ||
18063 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18064          X"$0" : 'X\(//\)$' \| \
18065          X"$0" : 'X\(/\)$' \| \
18066          .     : '\(.\)' 2>/dev/null ||
18067 echo X/"$0" |
18068     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18069           /^X\/\(\/\/\)$/{ s//\1/; q; }
18070           /^X\/\(\/\).*/{ s//\1/; q; }
18071           s/.*/./; q'`
18072
18073 # PATH needs CR, and LINENO needs CR and PATH.
18074 # Avoid depending upon Character Ranges.
18075 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18076 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18077 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18078 as_cr_digits='0123456789'
18079 as_cr_alnum=$as_cr_Letters$as_cr_digits
18080
18081 # The user is always right.
18082 if test "${PATH_SEPARATOR+set}" != set; then
18083   echo "#! /bin/sh" >conftest.sh
18084   echo  "exit 0"   >>conftest.sh
18085   chmod +x conftest.sh
18086   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
18087     PATH_SEPARATOR=';'
18088   else
18089     PATH_SEPARATOR=:
18090   fi
18091   rm -f conftest.sh
18092 fi
18093
18094
18095   as_lineno_1=$LINENO
18096   as_lineno_2=$LINENO
18097   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18098   test "x$as_lineno_1" != "x$as_lineno_2" &&
18099   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
18100   # Find who we are.  Look in the path if we contain no path at all
18101   # relative or not.
18102   case $0 in
18103     *[\\/]* ) as_myself=$0 ;;
18104     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18105 for as_dir in $PATH
18106 do
18107   IFS=$as_save_IFS
18108   test -z "$as_dir" && as_dir=.
18109   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18110 done
18111
18112        ;;
18113   esac
18114   # We did not find ourselves, most probably we were run as `sh COMMAND'
18115   # in which case we are not to be found in the path.
18116   if test "x$as_myself" = x; then
18117     as_myself=$0
18118   fi
18119   if test ! -f "$as_myself"; then
18120     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18121 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18122    { (exit 1); exit 1; }; }
18123   fi
18124   case $CONFIG_SHELL in
18125   '')
18126     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18127 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18128 do
18129   IFS=$as_save_IFS
18130   test -z "$as_dir" && as_dir=.
18131   for as_base in sh bash ksh sh5; do
18132          case $as_dir in
18133          /*)
18134            if ("$as_dir/$as_base" -c '
18135   as_lineno_1=$LINENO
18136   as_lineno_2=$LINENO
18137   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18138   test "x$as_lineno_1" != "x$as_lineno_2" &&
18139   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
18140              CONFIG_SHELL=$as_dir/$as_base
18141              export CONFIG_SHELL
18142              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18143            fi;;
18144          esac
18145        done
18146 done
18147 ;;
18148   esac
18149
18150   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18151   # uniformly replaced by the line number.  The first 'sed' inserts a
18152   # line-number line before each line; the second 'sed' does the real
18153   # work.  The second script uses 'N' to pair each line-number line
18154   # with the numbered line, and appends trailing '-' during
18155   # substitution so that $LINENO is not a special case at line end.
18156   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18157   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
18158   sed '=' <$as_myself |
18159     sed '
18160       N
18161       s,$,-,
18162       : loop
18163       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18164       t loop
18165       s,-$,,
18166       s,^['$as_cr_digits']*\n,,
18167     ' >$as_me.lineno &&
18168   chmod +x $as_me.lineno ||
18169     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18170 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18171    { (exit 1); exit 1; }; }
18172
18173   # Don't try to exec as it changes $[0], causing all sort of problems
18174   # (the dirname of $[0] is not the place where we might find the
18175   # original and so on.  Autoconf is especially sensible to this).
18176   . ./$as_me.lineno
18177   # Exit status is that of the last command.
18178   exit
18179 }
18180
18181
18182 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18183   *c*,-n*) ECHO_N= ECHO_C='
18184 ' ECHO_T='      ' ;;
18185   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18186   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
18187 esac
18188
18189 if expr a : '\(a\)' >/dev/null 2>&1; then
18190   as_expr=expr
18191 else
18192   as_expr=false
18193 fi
18194
18195 rm -f conf$$ conf$$.exe conf$$.file
18196 echo >conf$$.file
18197 if ln -s conf$$.file conf$$ 2>/dev/null; then
18198   # We could just check for DJGPP; but this test a) works b) is more generic
18199   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18200   if test -f conf$$.exe; then
18201     # Don't use ln at all; we don't have any links
18202     as_ln_s='cp -p'
18203   else
18204     as_ln_s='ln -s'
18205   fi
18206 elif ln conf$$.file conf$$ 2>/dev/null; then
18207   as_ln_s=ln
18208 else
18209   as_ln_s='cp -p'
18210 fi
18211 rm -f conf$$ conf$$.exe conf$$.file
18212
18213 as_executable_p="test -f"
18214
18215 # Sed expression to map a string onto a valid CPP name.
18216 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18217
18218 # Sed expression to map a string onto a valid variable name.
18219 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18220
18221
18222 # IFS
18223 # We need space, tab and new line, in precisely that order.
18224 as_nl='
18225 '
18226 IFS="   $as_nl"
18227
18228 # CDPATH.
18229 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
18230
18231 exec 6>&1
18232
18233 # Open the log real soon, to keep \$[0] and so on meaningful, and to
18234 # report actual input values of CONFIG_FILES etc. instead of their
18235 # values after options handling.  Logging --version etc. is OK.
18236 exec 5>>config.log
18237 {
18238   echo
18239   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18240 ## Running $as_me. ##
18241 _ASBOX
18242 } >&5
18243 cat >&5 <<_CSEOF
18244
18245 This file was extended by $as_me, which was
18246 generated by GNU Autoconf 2.53.  Invocation command line was
18247
18248   CONFIG_FILES    = $CONFIG_FILES
18249   CONFIG_HEADERS  = $CONFIG_HEADERS
18250   CONFIG_LINKS    = $CONFIG_LINKS
18251   CONFIG_COMMANDS = $CONFIG_COMMANDS
18252   $ $0 $@
18253
18254 _CSEOF
18255 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18256 echo >&5
18257 _ACEOF
18258
18259 # Files that config.status was made for.
18260 if test -n "$ac_config_files"; then
18261   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18262 fi
18263
18264 if test -n "$ac_config_headers"; then
18265   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18266 fi
18267
18268 if test -n "$ac_config_links"; then
18269   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18270 fi
18271
18272 if test -n "$ac_config_commands"; then
18273   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18274 fi
18275
18276 cat >>$CONFIG_STATUS <<\_ACEOF
18277
18278 ac_cs_usage="\
18279 \`$as_me' instantiates files from templates according to the
18280 current configuration.
18281
18282 Usage: $0 [OPTIONS] [FILE]...
18283
18284   -h, --help       print this help, then exit
18285   -V, --version    print version number, then exit
18286   -d, --debug      don't remove temporary files
18287       --recheck    update $as_me by reconfiguring in the same conditions
18288   --file=FILE[:TEMPLATE]
18289                    instantiate the configuration file FILE
18290   --header=FILE[:TEMPLATE]
18291                    instantiate the configuration header FILE
18292
18293 Configuration files:
18294 $config_files
18295
18296 Configuration headers:
18297 $config_headers
18298
18299 Configuration commands:
18300 $config_commands
18301
18302 Report bugs to <bug-autoconf@gnu.org>."
18303 _ACEOF
18304
18305 cat >>$CONFIG_STATUS <<_ACEOF
18306 ac_cs_version="\\
18307 config.status
18308 configured by $0, generated by GNU Autoconf 2.53,
18309   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18310
18311 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18312 Free Software Foundation, Inc.
18313 This config.status script is free software; the Free Software Foundation
18314 gives unlimited permission to copy, distribute and modify it."
18315 srcdir=$srcdir
18316 INSTALL="$INSTALL"
18317 _ACEOF
18318
18319 cat >>$CONFIG_STATUS <<\_ACEOF
18320 # If no file are specified by the user, then we need to provide default
18321 # value.  By we need to know if files were specified by the user.
18322 ac_need_defaults=:
18323 while test $# != 0
18324 do
18325   case $1 in
18326   --*=*)
18327     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18328     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18329     shift
18330     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18331     shift
18332     ;;
18333   -*);;
18334   *) # This is not an option, so the user has probably given explicit
18335      # arguments.
18336      ac_need_defaults=false;;
18337   esac
18338
18339   case $1 in
18340   # Handling of the options.
18341 _ACEOF
18342 cat >>$CONFIG_STATUS <<_ACEOF
18343   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18344     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18345     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18346 _ACEOF
18347 cat >>$CONFIG_STATUS <<\_ACEOF
18348   --version | --vers* | -V )
18349     echo "$ac_cs_version"; exit 0 ;;
18350   --he | --h)
18351     # Conflict between --help and --header
18352     { { echo "$as_me:$LINENO: error: ambiguous option: $1
18353 Try \`$0 --help' for more information." >&5
18354 echo "$as_me: error: ambiguous option: $1
18355 Try \`$0 --help' for more information." >&2;}
18356    { (exit 1); exit 1; }; };;
18357   --help | --hel | -h )
18358     echo "$ac_cs_usage"; exit 0 ;;
18359   --debug | --d* | -d )
18360     debug=: ;;
18361   --file | --fil | --fi | --f )
18362     shift
18363     CONFIG_FILES="$CONFIG_FILES $1"
18364     ac_need_defaults=false;;
18365   --header | --heade | --head | --hea )
18366     shift
18367     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18368     ac_need_defaults=false;;
18369
18370   # This is an error.
18371   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18372 Try \`$0 --help' for more information." >&5
18373 echo "$as_me: error: unrecognized option: $1
18374 Try \`$0 --help' for more information." >&2;}
18375    { (exit 1); exit 1; }; } ;;
18376
18377   *) ac_config_targets="$ac_config_targets $1" ;;
18378
18379   esac
18380   shift
18381 done
18382
18383 _ACEOF
18384
18385 cat >>$CONFIG_STATUS <<_ACEOF
18386 #
18387 # INIT-COMMANDS section.
18388 #
18389
18390 INTLTOOL_PERL=${INTLTOOL_PERL}
18391
18392
18393 _ACEOF
18394
18395
18396
18397 cat >>$CONFIG_STATUS <<\_ACEOF
18398 for ac_config_target in $ac_config_targets
18399 do
18400   case "$ac_config_target" in
18401   # Handling of arguments.
18402   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18403   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
18404   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
18405   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
18406   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
18407   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
18408   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
18409   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
18410   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
18411   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
18412   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
18413   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18414 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18415    { (exit 1); exit 1; }; };;
18416   esac
18417 done
18418
18419 # If the user did not use the arguments to specify the items to instantiate,
18420 # then the envvar interface is used.  Set only those that are not.
18421 # We use the long form for the default assignment because of an extremely
18422 # bizarre bug on SunOS 4.1.3.
18423 if $ac_need_defaults; then
18424   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18425   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18426   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18427 fi
18428
18429 # Create a temporary directory, and hook for its removal unless debugging.
18430 $debug ||
18431 {
18432   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18433   trap '{ (exit 1); exit 1; }' 1 2 13 15
18434 }
18435
18436 # Create a (secure) tmp directory for tmp files.
18437 : ${TMPDIR=/tmp}
18438 {
18439   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18440   test -n "$tmp" && test -d "$tmp"
18441 }  ||
18442 {
18443   tmp=$TMPDIR/cs$$-$RANDOM
18444   (umask 077 && mkdir $tmp)
18445 } ||
18446 {
18447    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18448    { (exit 1); exit 1; }
18449 }
18450
18451 _ACEOF
18452
18453 cat >>$CONFIG_STATUS <<_ACEOF
18454
18455 #
18456 # CONFIG_FILES section.
18457 #
18458
18459 # No need to generate the scripts if there are no CONFIG_FILES.
18460 # This happens for instance when ./config.status config.h
18461 if test -n "\$CONFIG_FILES"; then
18462   # Protect against being on the right side of a sed subst in config.status.
18463   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18464    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18465 s,@SHELL@,$SHELL,;t t
18466 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18467 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18468 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18469 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18470 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18471 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18472 s,@exec_prefix@,$exec_prefix,;t t
18473 s,@prefix@,$prefix,;t t
18474 s,@program_transform_name@,$program_transform_name,;t t
18475 s,@bindir@,$bindir,;t t
18476 s,@sbindir@,$sbindir,;t t
18477 s,@libexecdir@,$libexecdir,;t t
18478 s,@datadir@,$datadir,;t t
18479 s,@sysconfdir@,$sysconfdir,;t t
18480 s,@sharedstatedir@,$sharedstatedir,;t t
18481 s,@localstatedir@,$localstatedir,;t t
18482 s,@libdir@,$libdir,;t t
18483 s,@includedir@,$includedir,;t t
18484 s,@oldincludedir@,$oldincludedir,;t t
18485 s,@infodir@,$infodir,;t t
18486 s,@mandir@,$mandir,;t t
18487 s,@build_alias@,$build_alias,;t t
18488 s,@host_alias@,$host_alias,;t t
18489 s,@target_alias@,$target_alias,;t t
18490 s,@DEFS@,$DEFS,;t t
18491 s,@ECHO_C@,$ECHO_C,;t t
18492 s,@ECHO_N@,$ECHO_N,;t t
18493 s,@ECHO_T@,$ECHO_T,;t t
18494 s,@LIBS@,$LIBS,;t t
18495 s,@build@,$build,;t t
18496 s,@build_cpu@,$build_cpu,;t t
18497 s,@build_vendor@,$build_vendor,;t t
18498 s,@build_os@,$build_os,;t t
18499 s,@host@,$host,;t t
18500 s,@host_cpu@,$host_cpu,;t t
18501 s,@host_vendor@,$host_vendor,;t t
18502 s,@host_os@,$host_os,;t t
18503 s,@CC@,$CC,;t t
18504 s,@CFLAGS@,$CFLAGS,;t t
18505 s,@LDFLAGS@,$LDFLAGS,;t t
18506 s,@CPPFLAGS@,$CPPFLAGS,;t t
18507 s,@ac_ct_CC@,$ac_ct_CC,;t t
18508 s,@EXEEXT@,$EXEEXT,;t t
18509 s,@OBJEXT@,$OBJEXT,;t t
18510 s,@CPP@,$CPP,;t t
18511 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18512 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18513 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18514 s,@SET_MAKE@,$SET_MAKE,;t t
18515 s,@PERL@,$PERL,;t t
18516 s,@X_CFLAGS@,$X_CFLAGS,;t t
18517 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18518 s,@X_LIBS@,$X_LIBS,;t t
18519 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18520 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
18521 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
18522 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
18523 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
18524 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
18525 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
18526 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
18527 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
18528 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
18529 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
18530 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
18531 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
18532 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
18533 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
18534 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
18535 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
18536 s,@RANLIB@,$RANLIB,;t t
18537 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18538 s,@ALLOCA@,$ALLOCA,;t t
18539 s,@USE_NLS@,$USE_NLS,;t t
18540 s,@MSGFMT@,$MSGFMT,;t t
18541 s,@GMSGFMT@,$GMSGFMT,;t t
18542 s,@XGETTEXT@,$XGETTEXT,;t t
18543 s,@CATALOGS@,$CATALOGS,;t t
18544 s,@CATOBJEXT@,$CATOBJEXT,;t t
18545 s,@DATADIRNAME@,$DATADIRNAME,;t t
18546 s,@GMOFILES@,$GMOFILES,;t t
18547 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
18548 s,@INTLDEPS@,$INTLDEPS,;t t
18549 s,@INTLLIBS@,$INTLLIBS,;t t
18550 s,@INTLOBJS@,$INTLOBJS,;t t
18551 s,@POFILES@,$POFILES,;t t
18552 s,@POSUB@,$POSUB,;t t
18553 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
18554 s,@pkg_config@,$pkg_config,;t t
18555 s,@glib_config@,$glib_config,;t t
18556 s,@gtk_config@,$gtk_config,;t t
18557 s,@gnome_config@,$gnome_config,;t t
18558 s,@have_gnome_help@,$have_gnome_help,;t t
18559 s,@xml_config@,$xml_config,;t t
18560 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
18561 s,@fortune_tmp@,$fortune_tmp,;t t
18562 s,@INCLUDES@,$INCLUDES,;t t
18563 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
18564 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
18565 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
18566 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
18567 s,@GTK_LIBS@,$GTK_LIBS,;t t
18568 s,@XML_LIBS@,$XML_LIBS,;t t
18569 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
18570 s,@HACK_LIBS@,$HACK_LIBS,;t t
18571 s,@XPM_LIBS@,$XPM_LIBS,;t t
18572 s,@GL_LIBS@,$GL_LIBS,;t t
18573 s,@GLE_LIBS@,$GLE_LIBS,;t t
18574 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
18575 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
18576 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
18577 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
18578 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
18579 s,@NEED_SETUID@,$NEED_SETUID,;t t
18580 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
18581 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
18582 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
18583 s,@XMU_SRCS@,$XMU_SRCS,;t t
18584 s,@XMU_OBJS@,$XMU_OBJS,;t t
18585 s,@XMU_LIBS@,$XMU_LIBS,;t t
18586 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
18587 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
18588 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
18589 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
18590 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
18591 s,@JPEG_EXES@,$JPEG_EXES,;t t
18592 s,@GL_EXES@,$GL_EXES,;t t
18593 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
18594 s,@GL_MEN@,$GL_MEN,;t t
18595 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
18596 s,@GLE_EXES@,$GLE_EXES,;t t
18597 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
18598 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
18599 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
18600 s,@HACKDIR@,$HACKDIR,;t t
18601 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
18602 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
18603 s,@PO_DATADIR@,$PO_DATADIR,;t t
18604 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
18605 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
18606 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
18607 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
18608 s,@DEPEND@,$DEPEND,;t t
18609 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
18610 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
18611 CEOF
18612
18613 _ACEOF
18614
18615   cat >>$CONFIG_STATUS <<\_ACEOF
18616   # Split the substitutions into bite-sized pieces for seds with
18617   # small command number limits, like on Digital OSF/1 and HP-UX.
18618   ac_max_sed_lines=48
18619   ac_sed_frag=1 # Number of current file.
18620   ac_beg=1 # First line for current file.
18621   ac_end=$ac_max_sed_lines # Line after last line for current file.
18622   ac_more_lines=:
18623   ac_sed_cmds=
18624   while $ac_more_lines; do
18625     if test $ac_beg -gt 1; then
18626       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18627     else
18628       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18629     fi
18630     if test ! -s $tmp/subs.frag; then
18631       ac_more_lines=false
18632     else
18633       # The purpose of the label and of the branching condition is to
18634       # speed up the sed processing (if there are no `@' at all, there
18635       # is no need to browse any of the substitutions).
18636       # These are the two extra sed commands mentioned above.
18637       (echo ':t
18638   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18639       if test -z "$ac_sed_cmds"; then
18640         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18641       else
18642         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18643       fi
18644       ac_sed_frag=`expr $ac_sed_frag + 1`
18645       ac_beg=$ac_end
18646       ac_end=`expr $ac_end + $ac_max_sed_lines`
18647     fi
18648   done
18649   if test -z "$ac_sed_cmds"; then
18650     ac_sed_cmds=cat
18651   fi
18652 fi # test -n "$CONFIG_FILES"
18653
18654 _ACEOF
18655 cat >>$CONFIG_STATUS <<\_ACEOF
18656 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18657   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18658   case $ac_file in
18659   - | *:- | *:-:* ) # input from stdin
18660         cat >$tmp/stdin
18661         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18662         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18663   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18664         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18665   * )   ac_file_in=$ac_file.in ;;
18666   esac
18667
18668   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18669   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18670 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18671          X"$ac_file" : 'X\(//\)[^/]' \| \
18672          X"$ac_file" : 'X\(//\)$' \| \
18673          X"$ac_file" : 'X\(/\)' \| \
18674          .     : '\(.\)' 2>/dev/null ||
18675 echo X"$ac_file" |
18676     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18677           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18678           /^X\(\/\/\)$/{ s//\1/; q; }
18679           /^X\(\/\).*/{ s//\1/; q; }
18680           s/.*/./; q'`
18681   { case "$ac_dir" in
18682   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18683   *)                      as_incr_dir=.;;
18684 esac
18685 as_dummy="$ac_dir"
18686 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18687   case $as_mkdir_dir in
18688     # Skip DOS drivespec
18689     ?:) as_incr_dir=$as_mkdir_dir ;;
18690     *)
18691       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18692       test -d "$as_incr_dir" ||
18693         mkdir "$as_incr_dir" ||
18694         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18695 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18696    { (exit 1); exit 1; }; }
18697     ;;
18698   esac
18699 done; }
18700
18701   ac_builddir=.
18702
18703 if test "$ac_dir" != .; then
18704   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18705   # A "../" for each directory in $ac_dir_suffix.
18706   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18707 else
18708   ac_dir_suffix= ac_top_builddir=
18709 fi
18710
18711 case $srcdir in
18712   .)  # No --srcdir option.  We are building in place.
18713     ac_srcdir=.
18714     if test -z "$ac_top_builddir"; then
18715        ac_top_srcdir=.
18716     else
18717        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18718     fi ;;
18719   [\\/]* | ?:[\\/]* )  # Absolute path.
18720     ac_srcdir=$srcdir$ac_dir_suffix;
18721     ac_top_srcdir=$srcdir ;;
18722   *) # Relative path.
18723     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18724     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18725 esac
18726 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18727 # absolute.
18728 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18729 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
18730 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18731 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18732
18733
18734   case $INSTALL in
18735   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18736   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18737   esac
18738
18739   if test x"$ac_file" != x-; then
18740     { echo "$as_me:$LINENO: creating $ac_file" >&5
18741 echo "$as_me: creating $ac_file" >&6;}
18742     rm -f "$ac_file"
18743   fi
18744   # Let's still pretend it is `configure' which instantiates (i.e., don't
18745   # use $as_me), people would be surprised to read:
18746   #    /* config.h.  Generated by config.status.  */
18747   if test x"$ac_file" = x-; then
18748     configure_input=
18749   else
18750     configure_input="$ac_file.  "
18751   fi
18752   configure_input=$configure_input"Generated from `echo $ac_file_in |
18753                                      sed 's,.*/,,'` by configure."
18754
18755   # First look for the input files in the build tree, otherwise in the
18756   # src tree.
18757   ac_file_inputs=`IFS=:
18758     for f in $ac_file_in; do
18759       case $f in
18760       -) echo $tmp/stdin ;;
18761       [\\/$]*)
18762          # Absolute (can't be DOS-style, as IFS=:)
18763          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18764 echo "$as_me: error: cannot find input file: $f" >&2;}
18765    { (exit 1); exit 1; }; }
18766          echo $f;;
18767       *) # Relative
18768          if test -f "$f"; then
18769            # Build tree
18770            echo $f
18771          elif test -f "$srcdir/$f"; then
18772            # Source tree
18773            echo $srcdir/$f
18774          else
18775            # /dev/null tree
18776            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18777 echo "$as_me: error: cannot find input file: $f" >&2;}
18778    { (exit 1); exit 1; }; }
18779          fi;;
18780       esac
18781     done` || { (exit 1); exit 1; }
18782 _ACEOF
18783 cat >>$CONFIG_STATUS <<_ACEOF
18784   sed "$ac_vpsub
18785 $extrasub
18786 _ACEOF
18787 cat >>$CONFIG_STATUS <<\_ACEOF
18788 :t
18789 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18790 s,@configure_input@,$configure_input,;t t
18791 s,@srcdir@,$ac_srcdir,;t t
18792 s,@abs_srcdir@,$ac_abs_srcdir,;t t
18793 s,@top_srcdir@,$ac_top_srcdir,;t t
18794 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18795 s,@builddir@,$ac_builddir,;t t
18796 s,@abs_builddir@,$ac_abs_builddir,;t t
18797 s,@top_builddir@,$ac_top_builddir,;t t
18798 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18799 s,@INSTALL@,$ac_INSTALL,;t t
18800 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18801   rm -f $tmp/stdin
18802   if test x"$ac_file" != x-; then
18803     mv $tmp/out $ac_file
18804   else
18805     cat $tmp/out
18806     rm -f $tmp/out
18807   fi
18808
18809 done
18810 _ACEOF
18811 cat >>$CONFIG_STATUS <<\_ACEOF
18812
18813 #
18814 # CONFIG_HEADER section.
18815 #
18816
18817 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18818 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18819 #
18820 # ac_d sets the value in "#define NAME VALUE" lines.
18821 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18822 ac_dB='[        ].*$,\1#\2'
18823 ac_dC=' '
18824 ac_dD=',;t'
18825 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18826 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18827 ac_uB='$,\1#\2define\3'
18828 ac_uC=' '
18829 ac_uD=',;t'
18830
18831 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18832   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18833   case $ac_file in
18834   - | *:- | *:-:* ) # input from stdin
18835         cat >$tmp/stdin
18836         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18837         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18838   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18839         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18840   * )   ac_file_in=$ac_file.in ;;
18841   esac
18842
18843   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18844 echo "$as_me: creating $ac_file" >&6;}
18845
18846   # First look for the input files in the build tree, otherwise in the
18847   # src tree.
18848   ac_file_inputs=`IFS=:
18849     for f in $ac_file_in; do
18850       case $f in
18851       -) echo $tmp/stdin ;;
18852       [\\/$]*)
18853          # Absolute (can't be DOS-style, as IFS=:)
18854          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18855 echo "$as_me: error: cannot find input file: $f" >&2;}
18856    { (exit 1); exit 1; }; }
18857          echo $f;;
18858       *) # Relative
18859          if test -f "$f"; then
18860            # Build tree
18861            echo $f
18862          elif test -f "$srcdir/$f"; then
18863            # Source tree
18864            echo $srcdir/$f
18865          else
18866            # /dev/null tree
18867            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18868 echo "$as_me: error: cannot find input file: $f" >&2;}
18869    { (exit 1); exit 1; }; }
18870          fi;;
18871       esac
18872     done` || { (exit 1); exit 1; }
18873   # Remove the trailing spaces.
18874   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18875
18876 _ACEOF
18877
18878 # Transform confdefs.h into two sed scripts, `conftest.defines' and
18879 # `conftest.undefs', that substitutes the proper values into
18880 # config.h.in to produce config.h.  The first handles `#define'
18881 # templates, and the second `#undef' templates.
18882 # And first: Protect against being on the right side of a sed subst in
18883 # config.status.  Protect against being in an unquoted here document
18884 # in config.status.
18885 rm -f conftest.defines conftest.undefs
18886 # Using a here document instead of a string reduces the quoting nightmare.
18887 # Putting comments in sed scripts is not portable.
18888 #
18889 # `end' is used to avoid that the second main sed command (meant for
18890 # 0-ary CPP macros) applies to n-ary macro definitions.
18891 # See the Autoconf documentation for `clear'.
18892 cat >confdef2sed.sed <<\_ACEOF
18893 s/[\\&,]/\\&/g
18894 s,[\\$`],\\&,g
18895 t clear
18896 : clear
18897 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18898 t end
18899 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18900 : end
18901 _ACEOF
18902 # If some macros were called several times there might be several times
18903 # the same #defines, which is useless.  Nevertheless, we may not want to
18904 # sort them, since we want the *last* AC-DEFINE to be honored.
18905 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18906 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18907 rm -f confdef2sed.sed
18908
18909 # This sed command replaces #undef with comments.  This is necessary, for
18910 # example, in the case of _POSIX_SOURCE, which is predefined and required
18911 # on some systems where configure will not decide to define it.
18912 cat >>conftest.undefs <<\_ACEOF
18913 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18914 _ACEOF
18915
18916 # Break up conftest.defines because some shells have a limit on the size
18917 # of here documents, and old seds have small limits too (100 cmds).
18918 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
18919 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
18920 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18921 echo '  :' >>$CONFIG_STATUS
18922 rm -f conftest.tail
18923 while grep . conftest.defines >/dev/null
18924 do
18925   # Write a limited-size here document to $tmp/defines.sed.
18926   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18927   # Speed up: don't consider the non `#define' lines.
18928   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
18929   # Work around the forget-to-reset-the-flag bug.
18930   echo 't clr' >>$CONFIG_STATUS
18931   echo ': clr' >>$CONFIG_STATUS
18932   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
18933   echo 'CEOF
18934   sed -f $tmp/defines.sed $tmp/in >$tmp/out
18935   rm -f $tmp/in
18936   mv $tmp/out $tmp/in
18937 ' >>$CONFIG_STATUS
18938   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18939   rm -f conftest.defines
18940   mv conftest.tail conftest.defines
18941 done
18942 rm -f conftest.defines
18943 echo '  fi # egrep' >>$CONFIG_STATUS
18944 echo >>$CONFIG_STATUS
18945
18946 # Break up conftest.undefs because some shells have a limit on the size
18947 # of here documents, and old seds have small limits too (100 cmds).
18948 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
18949 rm -f conftest.tail
18950 while grep . conftest.undefs >/dev/null
18951 do
18952   # Write a limited-size here document to $tmp/undefs.sed.
18953   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18954   # Speed up: don't consider the non `#undef'
18955   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
18956   # Work around the forget-to-reset-the-flag bug.
18957   echo 't clr' >>$CONFIG_STATUS
18958   echo ': clr' >>$CONFIG_STATUS
18959   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18960   echo 'CEOF
18961   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18962   rm -f $tmp/in
18963   mv $tmp/out $tmp/in
18964 ' >>$CONFIG_STATUS
18965   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18966   rm -f conftest.undefs
18967   mv conftest.tail conftest.undefs
18968 done
18969 rm -f conftest.undefs
18970
18971 cat >>$CONFIG_STATUS <<\_ACEOF
18972   # Let's still pretend it is `configure' which instantiates (i.e., don't
18973   # use $as_me), people would be surprised to read:
18974   #    /* config.h.  Generated by config.status.  */
18975   if test x"$ac_file" = x-; then
18976     echo "/* Generated by configure.  */" >$tmp/config.h
18977   else
18978     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
18979   fi
18980   cat $tmp/in >>$tmp/config.h
18981   rm -f $tmp/in
18982   if test x"$ac_file" != x-; then
18983     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18984       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18985 echo "$as_me: $ac_file is unchanged" >&6;}
18986     else
18987       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18988 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18989          X"$ac_file" : 'X\(//\)[^/]' \| \
18990          X"$ac_file" : 'X\(//\)$' \| \
18991          X"$ac_file" : 'X\(/\)' \| \
18992          .     : '\(.\)' 2>/dev/null ||
18993 echo X"$ac_file" |
18994     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18995           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18996           /^X\(\/\/\)$/{ s//\1/; q; }
18997           /^X\(\/\).*/{ s//\1/; q; }
18998           s/.*/./; q'`
18999       { case "$ac_dir" in
19000   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19001   *)                      as_incr_dir=.;;
19002 esac
19003 as_dummy="$ac_dir"
19004 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19005   case $as_mkdir_dir in
19006     # Skip DOS drivespec
19007     ?:) as_incr_dir=$as_mkdir_dir ;;
19008     *)
19009       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19010       test -d "$as_incr_dir" ||
19011         mkdir "$as_incr_dir" ||
19012         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
19013 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
19014    { (exit 1); exit 1; }; }
19015     ;;
19016   esac
19017 done; }
19018
19019       rm -f $ac_file
19020       mv $tmp/config.h $ac_file
19021     fi
19022   else
19023     cat $tmp/config.h
19024     rm -f $tmp/config.h
19025   fi
19026 done
19027 _ACEOF
19028 cat >>$CONFIG_STATUS <<\_ACEOF
19029
19030 #
19031 # CONFIG_COMMANDS section.
19032 #
19033 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19034   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19035   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19036   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19037 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19038          X"$ac_dest" : 'X\(//\)[^/]' \| \
19039          X"$ac_dest" : 'X\(//\)$' \| \
19040          X"$ac_dest" : 'X\(/\)' \| \
19041          .     : '\(.\)' 2>/dev/null ||
19042 echo X"$ac_dest" |
19043     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19044           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19045           /^X\(\/\/\)$/{ s//\1/; q; }
19046           /^X\(\/\).*/{ s//\1/; q; }
19047           s/.*/./; q'`
19048   ac_builddir=.
19049
19050 if test "$ac_dir" != .; then
19051   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19052   # A "../" for each directory in $ac_dir_suffix.
19053   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19054 else
19055   ac_dir_suffix= ac_top_builddir=
19056 fi
19057
19058 case $srcdir in
19059   .)  # No --srcdir option.  We are building in place.
19060     ac_srcdir=.
19061     if test -z "$ac_top_builddir"; then
19062        ac_top_srcdir=.
19063     else
19064        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19065     fi ;;
19066   [\\/]* | ?:[\\/]* )  # Absolute path.
19067     ac_srcdir=$srcdir$ac_dir_suffix;
19068     ac_top_srcdir=$srcdir ;;
19069   *) # Relative path.
19070     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19071     ac_top_srcdir=$ac_top_builddir$srcdir ;;
19072 esac
19073 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19074 # absolute.
19075 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19076 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
19077 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19078 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19079
19080
19081   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19082 echo "$as_me: executing $ac_dest commands" >&6;}
19083   case $ac_dest in
19084     default-1 )
19085
19086 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
19087 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
19088   rm -f intltool-extract.out
19089 else
19090   mv -f intltool-extract.out intltool-extract
19091 fi
19092 chmod ugo+x intltool-extract
19093 chmod u+w intltool-extract
19094
19095 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
19096 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
19097   rm -f intltool-merge.out
19098 else
19099   mv -f intltool-merge.out intltool-merge
19100 fi
19101 chmod ugo+x intltool-merge
19102 chmod u+w intltool-merge
19103
19104 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
19105 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
19106   rm -f intltool-update.out
19107 else
19108   mv -f intltool-update.out intltool-update
19109 fi
19110 chmod ugo+x intltool-update
19111 chmod u+w intltool-update
19112
19113  ;;
19114     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
19115         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
19116       esac ;;
19117   esac
19118 done
19119 _ACEOF
19120
19121 cat >>$CONFIG_STATUS <<\_ACEOF
19122
19123 { (exit 0); exit 0; }
19124 _ACEOF
19125 chmod +x $CONFIG_STATUS
19126 ac_clean_files=$ac_clean_files_save
19127
19128
19129 # configure is writing to config.log, and then calls config.status.
19130 # config.status does its own redirection, appending to config.log.
19131 # Unfortunately, on DOS this fails, as config.log is still kept open
19132 # by configure, so config.status won't be able to write to it; its
19133 # output is simply discarded.  So we exec the FD to /dev/null,
19134 # effectively closing config.log, so it can be properly (re)opened and
19135 # appended to by config.status.  When coming back to configure, we
19136 # need to make the FD available again.
19137 if test "$no_create" != yes; then
19138   ac_cs_success=:
19139   exec 5>/dev/null
19140   $SHELL $CONFIG_STATUS || ac_cs_success=false
19141   exec 5>>config.log
19142   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19143   # would make configure fail if this is the last instruction.
19144   $ac_cs_success || { (exit 1); exit 1; }
19145 fi
19146
19147
19148 ###############################################################################
19149 #
19150 #       Print some warnings at the end.
19151 #
19152 ###############################################################################
19153
19154 warn_prefix_1="    Warning:"
19155 warn_prefix_2="       Note:"
19156 warn_prefix="$warn_prefix_1"
19157
19158 warning=no
19159 warnsep='    #################################################################'
19160
19161 warnpre() {
19162   if test "$warning" = no ; then
19163     echo '' ; echo "$warnsep" ; echo ''
19164     warning=yes
19165   fi
19166 }
19167
19168 warn() {
19169   warnpre
19170   if test "$warning" = long ; then echo '' ; fi
19171   warning=yes
19172   rest="$@"
19173   echo "$warn_prefix $rest"
19174 }
19175
19176 warnL() {
19177   was=$warning
19178   warnpre
19179   warning=yes
19180   if test "$was" != no ; then echo '' ; fi
19181   rest="$@"
19182   echo "$warn_prefix $rest"
19183 }
19184
19185 warn2() {
19186   rest="$@"
19187   echo "             $rest"
19188   warning=long
19189 }
19190
19191 note() {
19192   warn_prefix="$warn_prefix_2"
19193   warn $@
19194   warn_prefix="$warn_prefix_1"
19195 }
19196
19197 noteL() {
19198   warn_prefix="$warn_prefix_2"
19199   warnL $@
19200   warn_prefix="$warn_prefix_1"
19201 }
19202
19203
19204 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
19205   warn 'The SGI saver extension was requested, but was not found.'
19206 fi
19207
19208 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
19209   warn 'The MIT saver extension was requested, but was not found.'
19210 fi
19211
19212 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
19213   warn 'The XIdle extension was requested, but was not found.'
19214 fi
19215
19216 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
19217   warn 'The XSHM extension was requested, but was not found.'
19218 fi
19219
19220 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
19221   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
19222 fi
19223
19224 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
19225   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
19226 fi
19227
19228 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
19229   warn 'The DPMS extension was requested, but was not found.'
19230 fi
19231
19232 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
19233   warn 'The Xinerama extension was requested, but was not found.'
19234 fi
19235
19236 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
19237   warn 'The XF86VMODE extension was requested, but was not found.'
19238 fi
19239
19240 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
19241   warn "Checking of /proc/interrupts was requested, but it's bogus."
19242 fi
19243
19244
19245 if test "$have_motif" = no -a "$have_gtk" = no; then
19246   warnL "Neither Motif nor Gtk seem to be available;"
19247   warn2 "the \`xscreensaver-demo' program requires one of these."
19248
19249 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
19250   warnL "Use of Motif was requested, but it wasn't found;"
19251   warn2 "Gtk will be used instead."
19252
19253 elif test "$jurassic_gtk" = yes ; then
19254
19255   pref_gtk=1.2
19256
19257   v="$ac_gtk_version_string"
19258   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
19259     warnL "Use of Gtk was requested, but its version number is unknown;"
19260   elif test "$with_gtk_req" = yes ; then
19261     warnL "Use of Gtk was requested, but it is version $v;"
19262   else
19263     warnL "Gtk was found on this system, but it is version $v;"
19264   fi
19265
19266   warn2 "Gtk $pref_gtk or newer is required.  Motif will be used instead."
19267
19268 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
19269   warnL "Use of Gtk was requested, but it wasn't found."
19270   if test "$have_motif" = yes; then
19271     warn2 "Motif will be used instead."
19272   fi
19273 fi
19274
19275 if test "$gtk2_halfassed" != no ; then
19276   warnL "GTK version $gtk2_halfassed was found, but at least one supporting"
19277   warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used."
19278   v="$ac_gtk_version_string"
19279   warn2 "GTK $v is also installed, so it will be used instead."
19280   warn2 "Please read the above output and the \`config.log' file"
19281   warn2 "for more details."
19282 fi
19283
19284
19285 if test "$with_gnome_req" = yes -a "$have_gnome" = no \
19286         -a "$have_gtk2" = no; then
19287   # don't issue this warning if we have GTK2 -- in that case, the
19288   # Gnome-specific code isn't needed.
19289   warn  'Use of the Gnome Control Panel was requested, but the necessary'
19290   warn2 'headers and/or libraries were not found.'
19291 fi
19292
19293 if test "$have_gtk" = yes ; then
19294   if test "$have_xml" = no ; then
19295     if test "$with_xml_req" = yes ; then
19296       warn  'Use of the XML library was requested, but the necessary'
19297       warn2 'headers and/or libraries were not found.'
19298     else
19299       warn  'GTK is being used, but the XML library was not found.'
19300     fi
19301
19302     if test "$xml_halfassed" = yes ; then
19303
19304       if test "$have_zlib" = yes ; then
19305         which="XML libraries"
19306       else
19307         which="\`zlib' library"
19308       fi
19309
19310       echo ''
19311       warn2 'More specifically, we found the headers, but not the'
19312       warn2 "$which; so either XML is half-installed on this"
19313       warn2 "system, or something else went wrong.  The \`config.log'"
19314       warn2 'file might contain some clues.'
19315     fi
19316
19317     echo ''
19318     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
19319     warn2 'will not be available.  Specify the location of the XML'
19320     warn2 'library through the --with-xml option to configure.'
19321   fi
19322 fi
19323
19324 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
19325   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
19326   warn2 "headers were not found.  That can't be good.  Please"
19327   warn2 "install the GDK-Pixbuf development kit and re-configure."
19328 fi
19329
19330 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
19331
19332   preferred_lesstif=0.92
19333
19334   if test "$lesstif_version" = unknown; then
19335     warnL "Unable to determine the LessTif version number!"
19336     warn2 "Make sure you are using version $preferred_lesstif or newer."
19337     warn2 "See <http://www.lesstif.org/>."
19338
19339   elif test \! $lesstif_version -gt 82; then
19340     warnL "LessTif version $lesstif_version_string is being used."
19341     warn2 "LessTif versions 0.82 and earlier are too buggy to"
19342     warn2 "use with XScreenSaver; it is strongly recommended"
19343     warn2 "that you upgrade to at least version $preferred_lesstif!"
19344     warn2 "See <http://www.lesstif.org/>."
19345   fi
19346 fi
19347
19348
19349 if test "$have_motif" = yes -a "$have_gtk" = no ; then
19350   warn  'Motif is being used, and GTK is not.'
19351   echo  ''
19352   warn2 'Though the Motif front-end to xscreensaver is still'
19353   warn2 'maintained, it is no longer being updated with new'
19354   warn2 'features: all new development on the xscreensaver-demo'
19355   warn2 'program is happening in the GTK version, and not in the'
19356   warn2 'Motif version.  It is recommended that you build against'
19357   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
19358 fi
19359
19360
19361 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
19362   warnL 'Use of XPM was requested, but it was not found.'
19363 fi
19364
19365 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
19366   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
19367 fi
19368
19369 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \
19370    test "$gdk_pixbuf_halfassed" = yes; then
19371
19372   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
19373     true
19374   elif test "$with_xpm_req" = no ; then
19375     warnL 'The XPM library is not being used.'
19376   else
19377     warnL 'The XPM library was not found.'
19378   fi
19379
19380   if test "$with_gdk_pixbuf_req" = yes ; then
19381     true
19382   elif test "$with_gdk_pixbuf_req" = no ; then
19383     warnL 'The GDK-Pixbuf library is not being used.'
19384   else
19385     warnL 'The GDK-Pixbuf library was not found.'
19386   fi
19387
19388   if test "$gdk_pixbuf_halfassed" = yes ; then
19389     echo ''
19390     warn2 'More specifically, we found the headers, but not the'
19391     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
19392     warn2 "system, or something else went wrong.  The \`config.log'"
19393     warn2 'file might contain some clues.'
19394   fi
19395
19396   echo ''
19397   warn2 'Some of the demos will not be as colorful as they'
19398   warn2 'could be.  You should consider installing Pixbuf or'
19399   warn2 'XPM and re-running configure.  The Pixbuf library is'
19400   warn2 'a part of GNOME.  The XPM library comes with most'
19401   warn2 'X11 installations; you can also find it at the X11'
19402   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
19403   echo  ''
19404   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
19405   warn2 'support for more image formats.'
19406 fi
19407
19408
19409 if test "$have_jpeg" = no ; then
19410   if test "$with_jpeg_req" = yes ; then
19411     warnL 'Use of libjpeg was requested, but it was not found.'
19412   elif test "$with_jpeg_req" = no ; then
19413     noteL 'The JPEG library is not being used.'
19414   else
19415     noteL 'The JPEG library was not found.'
19416   fi
19417
19418   if test "$jpeg_halfassed" = yes ; then
19419     echo ''
19420     warn2 'More specifically, we found the headers, but not the'
19421     warn2 'library; so either JPEG is half-installed on this'
19422     warn2 "system, or something else went wrong.  The \`config.log'"
19423     warn2 'file might contain some clues.'
19424     echo ''
19425   fi
19426
19427   if test "$have_gdk_pixbuf" = no ; then
19428     warn2 "This means that it won't be possible for the image-manipulating"
19429     warn2 "display modes to load files from disk; and it also means that"
19430     warn2 "the \`webcollage' program will be much slower."
19431   else
19432     warn2 "This means the \`webcollage' program will be much slower."
19433   fi
19434 fi
19435
19436
19437 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
19438   preferred_mesagl=3.4
19439   mgv="$ac_mesagl_version_string"
19440   pgl="$preferred_mesagl"
19441
19442   if test "$ac_mesagl_version" = unknown; then
19443     warnL "Unable to determine the MesaGL version number!"
19444     warn2 "Make sure you are using version $preferred_mesagl or newer."
19445
19446   elif test \! "$ac_mesagl_version" -gt 2006; then
19447     warnL "MesaGL version number is $mgv --"
19448     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
19449     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
19450
19451   elif test \! "$ac_mesagl_version" -gt 3003; then
19452     warnL "MesaGL version number is $mgv --"
19453     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
19454     warn2 "that you upgrade to $pgl or newer."
19455   fi
19456 fi
19457
19458 if test "$have_gl" = no ; then
19459   if test "$with_gl_req" = yes ; then
19460     warnL 'Use of GL was requested, but it was not found.'
19461   elif test "$with_gl_req" = no ; then
19462     noteL 'The OpenGL 3D library is not being used.'
19463   else
19464     noteL 'The OpenGL 3D library was not found.'
19465   fi
19466
19467   if test "$gl_halfassed" = yes ; then
19468     echo ''
19469     warn2 'More specifically, we found the headers, but not the'
19470     warn2 'libraries; so either GL is half-installed on this'
19471     warn2 "system, or something else went wrong.  The \`config.log'"
19472     warn2 'file might contain some clues.'
19473   fi
19474
19475   echo ''
19476   warn2 'Those demos which use 3D will not be built or installed.'
19477   warn2 'You might want to consider installing OpenGL and'
19478   warn2 "re-running configure.  If your vendor doesn't ship"
19479   warn2 'their own implementation of OpenGL, you can get a free'
19480   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
19481   warn2 'info, see <http://www.opengl.org/>.'
19482
19483 fi
19484
19485
19486 if test "$have_gl" = yes -a "$have_gle" = no ; then
19487
19488  # nobody cares about this; don't print the warning unless it was
19489  # requested and not found, or halfway-found.
19490  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
19491
19492   if test "$with_gle_req" = yes ; then
19493     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
19494     warn2 'it was not found (though the OpenGL library was found, and'
19495     warn2 'is being used.)'
19496   elif test "$with_gle_req" = no ; then
19497     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
19498     warn2 'library is not.'
19499   else
19500     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
19501     warn2 'was not.'
19502   fi
19503
19504   if test "$gle_halfassed" = yes ; then
19505     echo ''
19506     warn2 'More specifically, we found the headers, but not the'
19507     warn2 'libraries; so either GLE is half-installed on this'
19508     warn2 "system, or something else went wrong.  The \`config.log'"
19509     warn2 'file might contain some clues.'
19510   fi
19511
19512   echo ''
19513   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
19514   warn2 'will not be built or installed.  You might want to consider'
19515   warn2 'installing GLE and re-running configure.  You can find the'
19516   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
19517   warn2 'OpenGL info, see <http://www.opengl.org/>.'
19518
19519  fi
19520 fi
19521
19522
19523 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
19524   warn 'Use of XReadDisplay was requested, but it was not found.'
19525 fi
19526
19527 if test -n "$with_fortune_req"; then
19528   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
19529     warnL "$with_fortune_req was requested as the Fortune program,"
19530     warn2 "but was not found.  The default will be used instead."
19531   fi
19532 fi
19533
19534 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
19535   warn 'Use of Kerberos was requested, but it was not found.'
19536 fi
19537
19538 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
19539   warn 'Use of PAM was requested, but it was not found.'
19540 fi
19541
19542 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
19543   warn 'Use of shadow passwords was requested, but they were not found.'
19544 fi
19545
19546
19547 # You are in a twisty maze of namespaces and syntaxes, all alike.
19548 # Fuck the skull of Unix.
19549 #
19550 eval bindir=${bindir}
19551 eval bindir=${bindir}
19552 eval bindir=${bindir}
19553 eval bindir=${bindir}
19554 eval bindir=${bindir}
19555 eval bindir=${bindir}
19556 eval HACKDIR=${HACKDIR}
19557 eval HACKDIR=${HACKDIR}
19558 eval HACKDIR=${HACKDIR}
19559 eval HACKDIR=${HACKDIR}
19560 eval HACKDIR=${HACKDIR}
19561 eval HACKDIR=${HACKDIR}
19562 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19563 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19564 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19565 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19566 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19567 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19568
19569 # canonicalize slashes.
19570 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
19571 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
19572 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19573
19574
19575 # Sanity check the hackdir
19576 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
19577   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
19578     echo ""
19579     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
19580                    There will be an executable installed with that name, so
19581                    that can't be the name of a directory as well.  Please
19582                    re-configure with a different directory name." >&5
19583 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
19584                    There will be an executable installed with that name, so
19585                    that can't be the name of a directory as well.  Please
19586                    re-configure with a different directory name." >&2;}
19587    { (exit 1); exit 1; }; }
19588   fi
19589 done
19590
19591
19592 do_dir_warning=no
19593
19594 # Now let's see if there's a previous RPM version already installed.  Blargh!
19595
19596 # M4 sucks!!
19597
19598 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
19599       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
19600
19601
19602 if test \! -z "$rpmv" ; then
19603   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
19604   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
19605
19606   warning=no
19607   warnL "There is already an installed RPM of xscreensaver $rpmv"
19608   warn2 "on this system.  You might want to remove it (with"
19609   warn2 '"rpm -ve xscreensaver") before running "make install"'
19610   warn2 "from this directory."
19611   echo ""
19612   warn2 "Alternately, you could build this version of xscreensaver"
19613   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
19614   warn2 "file is included.  See the RPM documentation for more info."
19615   echo ""
19616
19617   if test "$rpmbdir" = "$rpmhdir" ; then
19618     warn2 "The RPM version was installed in $rpmbdir/."
19619   else
19620     warn2 "The RPM version was installed in $rpmbdir/,"
19621     warn2 "with demos in $rpmhdir/."
19622   fi
19623
19624   do_dir_warning=yes
19625 fi
19626
19627
19628 if test "${bindir}" = "${HACKDIR}" ; then
19629   do_dir_warning=yes
19630 fi
19631
19632 if test "$do_dir_warning" = yes; then
19633   echo ""
19634   echo "$warnsep"
19635   echo ""
19636   echo '      When you run "make install", the "xscreensaver",'
19637   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
19638   echo "      will be installed in ${bindir}/."
19639   echo ""
19640   echo "      The various graphics demos (150+ different executables) will"
19641   echo "      be installed in ${HACKDIR}/."
19642   echo ""
19643   echo "      If you would prefer the demos to be installed elsewhere,"
19644   echo "      you should re-run configure with the --with-hackdir=DIR"
19645   echo "      option.  For more information, run \`./configure --help'."
19646   warning=yes
19647 fi
19648
19649 if test "$warning" != no; then
19650   echo '' ; echo "$warnsep" ; echo ''
19651 fi
19652
19653 if test "$do_dir_warning" = no; then
19654   if test "$warning" = no; then
19655     echo ''
19656   fi
19657   echo "User programs will be installed in ${bindir}/"
19658   echo "Screen savers will be installed in ${HACKDIR}/"
19659   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
19660   echo ''
19661 fi