http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.03.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
837 Optional Packages:
838   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
839   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
840 Installation options:
841
842   --with-hackdir=DIR      Where to install the hundreds of demo executables.
843                           Default: \`PREFIX/lib/xscreensaver/'
844   --with-configdir=DIR    Where to install the data files that describe each
845                           of the display modes to the GUI.
846                           Default: \`GNOMEPREFIX/control-center/screensavers/'
847                           or \`PREFIX/lib/xscreensaver/config/', depending on
848                           whether GNOME is available.
849
850 Except where noted, all of the --with options below can also take a
851 directory argument: for example, \`--with-motif=/opt/Motif'.  That would
852 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
853 to be added to the -L list, assuming those directories exist.
854
855 By default, support for each of these options will be built in, if the
856 relevant library routines exist.  At run time, they will then be used
857 only if the X server being used supports them.  Each --with option has
858 a corresponding --without option, to override building support for them
859 at all.
860
861 Screen blanking and idle-detection options:
862
863   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
864   --with-mit-ext          Include support for the MIT-SCREEN-SAVER extension.
865   --with-xidle-ext        Include support for the XIDLE extension.
866   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
867   --with-dpms-ext         Include support for the DPMS extension.
868   --with-xinerama-ext     Include support for the XINERAMA extension.
869   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
870   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
871   --with-proc-interrupts  Include support for consulting the /proc/interrupts
872                           file to notice keyboard activity.
873   --with-pam              Include support for PAM (Pluggable Auth Modules.)
874   --with-kerberos         Include support for Kerberos authentication.
875   --with-shadow           Include support for shadow password authentication.
876
877 User interface options:
878
879   --with-motif            Use the Motif toolkit for the user interface.
880   --with-gtk              Use the Gtk toolkit for the user interface.
881   --with-gnome            Include support for the Gnome Control Center.
882   --with-xml              The XML toolkit is needed for some parts of
883                           the Gtk interface.
884
885 Graphics options:
886
887   --with-gl               Build those demos which depend on OpenGL.
888   --with-gle              Build those demos which depend on GLE
889                           (the OpenGL "extrusion" library.)
890   --with-xpm              Include support for XPM files in some demos.
891   --with-pixbuf           Include support for the GDK-Pixbuf library in some
892                           demos, which will make it possible for them to read
893                           GIF, JPEG, and PNG files as well.
894   --with-jpeg             Include support for the JPEG library in some demos,
895                           which will make it possible for them to read JPEG
896                           files as well.
897   --with-xshm-ext         Include support for the Shared Memory extension.
898   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
899   --with-readdisplay      Include support for the XReadDisplay extension.
900
901   --with-fortune=PROGRAM  Some demos are able to run an external program and
902                           display its text; this names the program to use by
903                           default (though it can be overridden with X
904                           resources.)  Default is \"/usr/games/fortune\".
905   --with-setuid-hacks     Allow some demos to be installed \`setuid root'
906                           (which is needed in order to ping other hosts.)
907
908
909 Some influential environment variables:
910   CC          C compiler command
911   CFLAGS      C compiler flags
912   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
913               nonstandard directory <lib dir>
914   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
915               headers in a nonstandard directory <include dir>
916   CPP         C preprocessor
917
918 Use these variables to override the choices made by `configure' or to help
919 it to find libraries and programs with nonstandard names/locations.
920
921 _ACEOF
922 fi
923
924 if test "$ac_init_help" = "recursive"; then
925   # If there are subdirs, report their specific --help.
926   ac_popdir=`pwd`
927   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
928     test -d $ac_dir || continue
929     ac_builddir=.
930
931 if test "$ac_dir" != .; then
932   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
933   # A "../" for each directory in $ac_dir_suffix.
934   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
935 else
936   ac_dir_suffix= ac_top_builddir=
937 fi
938
939 case $srcdir in
940   .)  # No --srcdir option.  We are building in place.
941     ac_srcdir=.
942     if test -z "$ac_top_builddir"; then
943        ac_top_srcdir=.
944     else
945        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
946     fi ;;
947   [\\/]* | ?:[\\/]* )  # Absolute path.
948     ac_srcdir=$srcdir$ac_dir_suffix;
949     ac_top_srcdir=$srcdir ;;
950   *) # Relative path.
951     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
952     ac_top_srcdir=$ac_top_builddir$srcdir ;;
953 esac
954 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
955 # absolute.
956 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
957 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
958 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
959 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
960
961     cd $ac_dir
962     # Check for guested configure; otherwise get Cygnus style configure.
963     if test -f $ac_srcdir/configure.gnu; then
964       echo
965       $SHELL $ac_srcdir/configure.gnu  --help=recursive
966     elif test -f $ac_srcdir/configure; then
967       echo
968       $SHELL $ac_srcdir/configure  --help=recursive
969     elif test -f $ac_srcdir/configure.ac ||
970            test -f $ac_srcdir/configure.in; then
971       echo
972       $ac_configure --help
973     else
974       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
975     fi
976     cd $ac_popdir
977   done
978 fi
979
980 test -n "$ac_init_help" && exit 0
981 if $ac_init_version; then
982   cat <<\_ACEOF
983
984 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
985 Free Software Foundation, Inc.
986 This configure script is free software; the Free Software Foundation
987 gives unlimited permission to copy, distribute and modify it.
988 _ACEOF
989   exit 0
990 fi
991 exec 5>config.log
992 cat >&5 <<_ACEOF
993 This file contains any messages produced by compilers while
994 running configure, to aid debugging if configure makes a mistake.
995
996 It was created by $as_me, which was
997 generated by GNU Autoconf 2.53.  Invocation command line was
998
999   $ $0 $@
1000
1001 _ACEOF
1002 {
1003 cat <<_ASUNAME
1004 ## --------- ##
1005 ## Platform. ##
1006 ## --------- ##
1007
1008 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1009 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1010 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1011 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1012 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1013
1014 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1015 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1016
1017 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1018 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1019 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1020 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1021 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1022 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1023 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1024
1025 _ASUNAME
1026
1027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1028 for as_dir in $PATH
1029 do
1030   IFS=$as_save_IFS
1031   test -z "$as_dir" && as_dir=.
1032   echo "PATH: $as_dir"
1033 done
1034
1035 } >&5
1036
1037 cat >&5 <<_ACEOF
1038
1039
1040 ## ----------- ##
1041 ## Core tests. ##
1042 ## ----------- ##
1043
1044 _ACEOF
1045
1046
1047 # Keep a trace of the command line.
1048 # Strip out --no-create and --no-recursion so they do not pile up.
1049 # Also quote any args containing shell meta-characters.
1050 ac_configure_args=
1051 ac_sep=
1052 for ac_arg
1053 do
1054   case $ac_arg in
1055   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1056   | --no-cr | --no-c | -n ) continue ;;
1057   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1058   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1059     continue ;;
1060   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1061     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1062   esac
1063   case " $ac_configure_args " in
1064     *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1065     *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1066        ac_sep=" " ;;
1067   esac
1068   # Get rid of the leading space.
1069 done
1070
1071 # When interrupted or exit'd, cleanup temporary files, and complete
1072 # config.log.  We remove comments because anyway the quotes in there
1073 # would cause problems or look ugly.
1074 # WARNING: Be sure not to use single quotes in there, as some shells,
1075 # such as our DU 5.0 friend, will then `close' the trap.
1076 trap 'exit_status=$?
1077   # Save into config.log some information that might help in debugging.
1078   {
1079     echo
1080     cat <<\_ASBOX
1081 ## ---------------- ##
1082 ## Cache variables. ##
1083 ## ---------------- ##
1084 _ASBOX
1085     echo
1086     # The following way of writing the cache mishandles newlines in values,
1087 {
1088   (set) 2>&1 |
1089     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1090     *ac_space=\ *)
1091       sed -n \
1092         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1093           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1094       ;;
1095     *)
1096       sed -n \
1097         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1098       ;;
1099     esac;
1100 }
1101     echo
1102     if test -s confdefs.h; then
1103       cat <<\_ASBOX
1104 ## ----------- ##
1105 ## confdefs.h. ##
1106 ## ----------- ##
1107 _ASBOX
1108       echo
1109       sed "/^$/d" confdefs.h
1110       echo
1111     fi
1112     test "$ac_signal" != 0 &&
1113       echo "$as_me: caught signal $ac_signal"
1114     echo "$as_me: exit $exit_status"
1115   } >&5
1116   rm -f core core.* *.core &&
1117   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1118     exit $exit_status
1119      ' 0
1120 for ac_signal in 1 2 13 15; do
1121   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1122 done
1123 ac_signal=0
1124
1125 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1126 rm -rf conftest* confdefs.h
1127 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1128 echo >confdefs.h
1129
1130 # Predefined preprocessor variables.
1131
1132 cat >>confdefs.h <<_ACEOF
1133 #define PACKAGE_NAME "$PACKAGE_NAME"
1134 _ACEOF
1135
1136
1137 cat >>confdefs.h <<_ACEOF
1138 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1139 _ACEOF
1140
1141
1142 cat >>confdefs.h <<_ACEOF
1143 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1144 _ACEOF
1145
1146
1147 cat >>confdefs.h <<_ACEOF
1148 #define PACKAGE_STRING "$PACKAGE_STRING"
1149 _ACEOF
1150
1151
1152 cat >>confdefs.h <<_ACEOF
1153 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1154 _ACEOF
1155
1156
1157 # Let the site file select an alternate cache file if it wants to.
1158 # Prefer explicitly selected file to automatically selected ones.
1159 if test -z "$CONFIG_SITE"; then
1160   if test "x$prefix" != xNONE; then
1161     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1162   else
1163     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1164   fi
1165 fi
1166 for ac_site_file in $CONFIG_SITE; do
1167   if test -r "$ac_site_file"; then
1168     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1169 echo "$as_me: loading site script $ac_site_file" >&6;}
1170     sed 's/^/| /' "$ac_site_file" >&5
1171     . "$ac_site_file"
1172   fi
1173 done
1174
1175 if test -r "$cache_file"; then
1176   # Some versions of bash will fail to source /dev/null (special
1177   # files actually), so we avoid doing that.
1178   if test -f "$cache_file"; then
1179     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1180 echo "$as_me: loading cache $cache_file" >&6;}
1181     case $cache_file in
1182       [\\/]* | ?:[\\/]* ) . $cache_file;;
1183       *)                      . ./$cache_file;;
1184     esac
1185   fi
1186 else
1187   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1188 echo "$as_me: creating cache $cache_file" >&6;}
1189   >$cache_file
1190 fi
1191
1192 # Check that the precious variables saved in the cache have kept the same
1193 # value.
1194 ac_cache_corrupted=false
1195 for ac_var in `(set) 2>&1 |
1196                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1197   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1198   eval ac_new_set=\$ac_env_${ac_var}_set
1199   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1200   eval ac_new_val="\$ac_env_${ac_var}_value"
1201   case $ac_old_set,$ac_new_set in
1202     set,)
1203       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1204 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1205       ac_cache_corrupted=: ;;
1206     ,set)
1207       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1208 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1209       ac_cache_corrupted=: ;;
1210     ,);;
1211     *)
1212       if test "x$ac_old_val" != "x$ac_new_val"; then
1213         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1214 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1215         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1216 echo "$as_me:   former value:  $ac_old_val" >&2;}
1217         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1218 echo "$as_me:   current value: $ac_new_val" >&2;}
1219         ac_cache_corrupted=:
1220       fi;;
1221   esac
1222   # Pass precious variables to config.status.
1223   if test "$ac_new_set" = set; then
1224     case $ac_new_val in
1225     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1226       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1227     *) ac_arg=$ac_var=$ac_new_val ;;
1228     esac
1229     case " $ac_configure_args " in
1230       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1231       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1232     esac
1233   fi
1234 done
1235 if $ac_cache_corrupted; then
1236   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1237 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1238   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1239 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1240    { (exit 1); exit 1; }; }
1241 fi
1242
1243 ac_ext=c
1244 ac_cpp='$CPP $CPPFLAGS'
1245 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1246 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1247 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266 ac_config_headers="$ac_config_headers config.h"
1267
1268
1269 echo "current directory: `pwd`"
1270 echo "command line was: $0 $@"
1271
1272
1273 # After checking to see that --srcdir is correct (which AC_INIT does)
1274 # check for some random other files that come later in the tar file,
1275 # to make sure everything is here.
1276 #
1277 for d in driver utils hacks hacks/glx ; do
1278   f=$srcdir/$d/Makefile.in
1279   if test \! -r $f ; then
1280     echo ""
1281     echo "ERROR: The package is incomplete: $f does not exist."
1282     echo "       This probably means that your download was truncated."
1283     echo ""
1284     exit 1
1285   fi
1286 done
1287
1288 ###############################################################################
1289 #
1290 #       Function to figure out how to run the compiler.
1291 #
1292 ###############################################################################
1293
1294
1295
1296
1297 ###############################################################################
1298 #
1299 #       Functions to figure out how to disable // comments in ANSI C code.
1300 #
1301 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1302 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1303 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1304 #       so much for compatibility!)
1305 #
1306 ###############################################################################
1307
1308
1309
1310
1311
1312
1313 ###############################################################################
1314 #
1315 #       Function to figure out how to create directory trees.
1316 #
1317 ###############################################################################
1318
1319
1320
1321
1322 ###############################################################################
1323 #
1324 #       Function to check whether gettimeofday() exists, and how to call it.
1325 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1326 #
1327 ###############################################################################
1328
1329
1330
1331
1332 ###############################################################################
1333 #
1334 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1335 #
1336 ###############################################################################
1337
1338 # M4 sucks!!  perl sucks too!!
1339
1340 perl_version_cmd='print $]'
1341
1342
1343
1344
1345
1346 ###############################################################################
1347 #
1348 #       Function to demand "bc".  Losers.
1349 #
1350 ###############################################################################
1351
1352
1353
1354 ###############################################################################
1355 #
1356 #       Functions to check how to do ICMP PING requests.
1357 #
1358 ###############################################################################
1359
1360
1361
1362
1363
1364
1365 ###############################################################################
1366 #
1367 #       Functions to check for various X11 crap.
1368 #
1369 ###############################################################################
1370
1371 # Try and find the app-defaults directory.
1372 # It sucks that autoconf doesn't do this already...
1373 #
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384 # Random special-cases for X on certain pathological OSes.
1385 # You know who you are.
1386 #
1387
1388
1389
1390
1391 ###############################################################################
1392 #
1393 #       Some utility functions to make checking for X things easier.
1394 #
1395 ###############################################################################
1396
1397 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1398 #
1399
1400
1401 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1402 #
1403
1404
1405 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1406 #
1407
1408
1409
1410 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1411 # Use this sparingly; it probably doesn't work very well on X programs.
1412 #
1413
1414
1415 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1416 # (But not the -L directories!)
1417 #
1418
1419
1420
1421
1422 # Usage: HANDLE_X_PATH_ARG([variable_name],
1423 #                          [--command-line-option],
1424 #                          [descriptive string])
1425 #
1426 # All of the --with options take three forms:
1427 #
1428 #   --with-foo (or --with-foo=yes)
1429 #   --without-foo (or --with-foo=no)
1430 #   --with-foo=/DIR
1431 #
1432 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1433 # a directory (string beginning with a slash) it checks to see whether
1434 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1435 # as appropriate.
1436 #
1437
1438
1439
1440
1441 ###############################################################################
1442 ###############################################################################
1443 #
1444 #       End of function definitions.  Now start actually executing stuff.
1445 #
1446 ###############################################################################
1447 ###############################################################################
1448
1449 # random compiler setup
1450 ac_aux_dir=
1451 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1452   if test -f $ac_dir/install-sh; then
1453     ac_aux_dir=$ac_dir
1454     ac_install_sh="$ac_aux_dir/install-sh -c"
1455     break
1456   elif test -f $ac_dir/install.sh; then
1457     ac_aux_dir=$ac_dir
1458     ac_install_sh="$ac_aux_dir/install.sh -c"
1459     break
1460   elif test -f $ac_dir/shtool; then
1461     ac_aux_dir=$ac_dir
1462     ac_install_sh="$ac_aux_dir/shtool install -c"
1463     break
1464   fi
1465 done
1466 if test -z "$ac_aux_dir"; then
1467   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1468 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1469    { (exit 1); exit 1; }; }
1470 fi
1471 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1472 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1473 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1474
1475 # Make sure we can run config.sub.
1476 $ac_config_sub sun4 >/dev/null 2>&1 ||
1477   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1478 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1479    { (exit 1); exit 1; }; }
1480
1481 echo "$as_me:$LINENO: checking build system type" >&5
1482 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1483 if test "${ac_cv_build+set}" = set; then
1484   echo $ECHO_N "(cached) $ECHO_C" >&6
1485 else
1486   ac_cv_build_alias=$build_alias
1487 test -z "$ac_cv_build_alias" &&
1488   ac_cv_build_alias=`$ac_config_guess`
1489 test -z "$ac_cv_build_alias" &&
1490   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1491 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1492    { (exit 1); exit 1; }; }
1493 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1494   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1495 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1496    { (exit 1); exit 1; }; }
1497
1498 fi
1499 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1500 echo "${ECHO_T}$ac_cv_build" >&6
1501 build=$ac_cv_build
1502 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1503 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1504 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1505
1506
1507 echo "$as_me:$LINENO: checking host system type" >&5
1508 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1509 if test "${ac_cv_host+set}" = set; then
1510   echo $ECHO_N "(cached) $ECHO_C" >&6
1511 else
1512   ac_cv_host_alias=$host_alias
1513 test -z "$ac_cv_host_alias" &&
1514   ac_cv_host_alias=$ac_cv_build_alias
1515 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1516   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1517 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1518    { (exit 1); exit 1; }; }
1519
1520 fi
1521 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1522 echo "${ECHO_T}$ac_cv_host" >&6
1523 host=$ac_cv_host
1524 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1525 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1526 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1527
1528
1529
1530 ac_ext=c
1531 ac_cpp='$CPP $CPPFLAGS'
1532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1535 if test -n "$ac_tool_prefix"; then
1536   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1537 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1538 echo "$as_me:$LINENO: checking for $ac_word" >&5
1539 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1540 if test "${ac_cv_prog_CC+set}" = set; then
1541   echo $ECHO_N "(cached) $ECHO_C" >&6
1542 else
1543   if test -n "$CC"; then
1544   ac_cv_prog_CC="$CC" # Let the user override the test.
1545 else
1546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1547 for as_dir in $PATH
1548 do
1549   IFS=$as_save_IFS
1550   test -z "$as_dir" && as_dir=.
1551   for ac_exec_ext in '' $ac_executable_extensions; do
1552   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1553     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1554     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1555     break 2
1556   fi
1557 done
1558 done
1559
1560 fi
1561 fi
1562 CC=$ac_cv_prog_CC
1563 if test -n "$CC"; then
1564   echo "$as_me:$LINENO: result: $CC" >&5
1565 echo "${ECHO_T}$CC" >&6
1566 else
1567   echo "$as_me:$LINENO: result: no" >&5
1568 echo "${ECHO_T}no" >&6
1569 fi
1570
1571 fi
1572 if test -z "$ac_cv_prog_CC"; then
1573   ac_ct_CC=$CC
1574   # Extract the first word of "gcc", so it can be a program name with args.
1575 set dummy gcc; ac_word=$2
1576 echo "$as_me:$LINENO: checking for $ac_word" >&5
1577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1578 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1579   echo $ECHO_N "(cached) $ECHO_C" >&6
1580 else
1581   if test -n "$ac_ct_CC"; then
1582   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1583 else
1584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1585 for as_dir in $PATH
1586 do
1587   IFS=$as_save_IFS
1588   test -z "$as_dir" && as_dir=.
1589   for ac_exec_ext in '' $ac_executable_extensions; do
1590   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1591     ac_cv_prog_ac_ct_CC="gcc"
1592     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1593     break 2
1594   fi
1595 done
1596 done
1597
1598 fi
1599 fi
1600 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1601 if test -n "$ac_ct_CC"; then
1602   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1603 echo "${ECHO_T}$ac_ct_CC" >&6
1604 else
1605   echo "$as_me:$LINENO: result: no" >&5
1606 echo "${ECHO_T}no" >&6
1607 fi
1608
1609   CC=$ac_ct_CC
1610 else
1611   CC="$ac_cv_prog_CC"
1612 fi
1613
1614 if test -z "$CC"; then
1615   if test -n "$ac_tool_prefix"; then
1616   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1617 set dummy ${ac_tool_prefix}cc; ac_word=$2
1618 echo "$as_me:$LINENO: checking for $ac_word" >&5
1619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1620 if test "${ac_cv_prog_CC+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1627 for as_dir in $PATH
1628 do
1629   IFS=$as_save_IFS
1630   test -z "$as_dir" && as_dir=.
1631   for ac_exec_ext in '' $ac_executable_extensions; do
1632   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1633     ac_cv_prog_CC="${ac_tool_prefix}cc"
1634     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1635     break 2
1636   fi
1637 done
1638 done
1639
1640 fi
1641 fi
1642 CC=$ac_cv_prog_CC
1643 if test -n "$CC"; then
1644   echo "$as_me:$LINENO: result: $CC" >&5
1645 echo "${ECHO_T}$CC" >&6
1646 else
1647   echo "$as_me:$LINENO: result: no" >&5
1648 echo "${ECHO_T}no" >&6
1649 fi
1650
1651 fi
1652 if test -z "$ac_cv_prog_CC"; then
1653   ac_ct_CC=$CC
1654   # Extract the first word of "cc", so it can be a program name with args.
1655 set dummy cc; ac_word=$2
1656 echo "$as_me:$LINENO: checking for $ac_word" >&5
1657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1658 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1659   echo $ECHO_N "(cached) $ECHO_C" >&6
1660 else
1661   if test -n "$ac_ct_CC"; then
1662   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1663 else
1664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1665 for as_dir in $PATH
1666 do
1667   IFS=$as_save_IFS
1668   test -z "$as_dir" && as_dir=.
1669   for ac_exec_ext in '' $ac_executable_extensions; do
1670   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1671     ac_cv_prog_ac_ct_CC="cc"
1672     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1673     break 2
1674   fi
1675 done
1676 done
1677
1678 fi
1679 fi
1680 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1681 if test -n "$ac_ct_CC"; then
1682   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1683 echo "${ECHO_T}$ac_ct_CC" >&6
1684 else
1685   echo "$as_me:$LINENO: result: no" >&5
1686 echo "${ECHO_T}no" >&6
1687 fi
1688
1689   CC=$ac_ct_CC
1690 else
1691   CC="$ac_cv_prog_CC"
1692 fi
1693
1694 fi
1695 if test -z "$CC"; then
1696   # Extract the first word of "cc", so it can be a program name with args.
1697 set dummy cc; ac_word=$2
1698 echo "$as_me:$LINENO: checking for $ac_word" >&5
1699 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1700 if test "${ac_cv_prog_CC+set}" = set; then
1701   echo $ECHO_N "(cached) $ECHO_C" >&6
1702 else
1703   if test -n "$CC"; then
1704   ac_cv_prog_CC="$CC" # Let the user override the test.
1705 else
1706   ac_prog_rejected=no
1707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1708 for as_dir in $PATH
1709 do
1710   IFS=$as_save_IFS
1711   test -z "$as_dir" && as_dir=.
1712   for ac_exec_ext in '' $ac_executable_extensions; do
1713   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1714     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1715        ac_prog_rejected=yes
1716        continue
1717      fi
1718     ac_cv_prog_CC="cc"
1719     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1720     break 2
1721   fi
1722 done
1723 done
1724
1725 if test $ac_prog_rejected = yes; then
1726   # We found a bogon in the path, so make sure we never use it.
1727   set dummy $ac_cv_prog_CC
1728   shift
1729   if test $# != 0; then
1730     # We chose a different compiler from the bogus one.
1731     # However, it has the same basename, so the bogon will be chosen
1732     # first if we set CC to just the basename; use the full file name.
1733     shift
1734     set dummy "$as_dir/$ac_word" ${1+"$@"}
1735     shift
1736     ac_cv_prog_CC="$@"
1737   fi
1738 fi
1739 fi
1740 fi
1741 CC=$ac_cv_prog_CC
1742 if test -n "$CC"; then
1743   echo "$as_me:$LINENO: result: $CC" >&5
1744 echo "${ECHO_T}$CC" >&6
1745 else
1746   echo "$as_me:$LINENO: result: no" >&5
1747 echo "${ECHO_T}no" >&6
1748 fi
1749
1750 fi
1751 if test -z "$CC"; then
1752   if test -n "$ac_tool_prefix"; then
1753   for ac_prog in cl
1754   do
1755     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1756 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1757 echo "$as_me:$LINENO: checking for $ac_word" >&5
1758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1759 if test "${ac_cv_prog_CC+set}" = set; then
1760   echo $ECHO_N "(cached) $ECHO_C" >&6
1761 else
1762   if test -n "$CC"; then
1763   ac_cv_prog_CC="$CC" # Let the user override the test.
1764 else
1765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1766 for as_dir in $PATH
1767 do
1768   IFS=$as_save_IFS
1769   test -z "$as_dir" && as_dir=.
1770   for ac_exec_ext in '' $ac_executable_extensions; do
1771   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1772     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1773     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1774     break 2
1775   fi
1776 done
1777 done
1778
1779 fi
1780 fi
1781 CC=$ac_cv_prog_CC
1782 if test -n "$CC"; then
1783   echo "$as_me:$LINENO: result: $CC" >&5
1784 echo "${ECHO_T}$CC" >&6
1785 else
1786   echo "$as_me:$LINENO: result: no" >&5
1787 echo "${ECHO_T}no" >&6
1788 fi
1789
1790     test -n "$CC" && break
1791   done
1792 fi
1793 if test -z "$CC"; then
1794   ac_ct_CC=$CC
1795   for ac_prog in cl
1796 do
1797   # Extract the first word of "$ac_prog", so it can be a program name with args.
1798 set dummy $ac_prog; ac_word=$2
1799 echo "$as_me:$LINENO: checking for $ac_word" >&5
1800 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1801 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1802   echo $ECHO_N "(cached) $ECHO_C" >&6
1803 else
1804   if test -n "$ac_ct_CC"; then
1805   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1806 else
1807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1808 for as_dir in $PATH
1809 do
1810   IFS=$as_save_IFS
1811   test -z "$as_dir" && as_dir=.
1812   for ac_exec_ext in '' $ac_executable_extensions; do
1813   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1814     ac_cv_prog_ac_ct_CC="$ac_prog"
1815     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1816     break 2
1817   fi
1818 done
1819 done
1820
1821 fi
1822 fi
1823 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1824 if test -n "$ac_ct_CC"; then
1825   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1826 echo "${ECHO_T}$ac_ct_CC" >&6
1827 else
1828   echo "$as_me:$LINENO: result: no" >&5
1829 echo "${ECHO_T}no" >&6
1830 fi
1831
1832   test -n "$ac_ct_CC" && break
1833 done
1834
1835   CC=$ac_ct_CC
1836 fi
1837
1838 fi
1839
1840
1841 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1842 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1843    { (exit 1); exit 1; }; }
1844
1845 # Provide some information about the compiler.
1846 echo "$as_me:$LINENO:" \
1847      "checking for C compiler version" >&5
1848 ac_compiler=`set X $ac_compile; echo $2`
1849 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1850   (eval $ac_compiler --version </dev/null >&5) 2>&5
1851   ac_status=$?
1852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1853   (exit $ac_status); }
1854 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1855   (eval $ac_compiler -v </dev/null >&5) 2>&5
1856   ac_status=$?
1857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1858   (exit $ac_status); }
1859 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1860   (eval $ac_compiler -V </dev/null >&5) 2>&5
1861   ac_status=$?
1862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1863   (exit $ac_status); }
1864
1865 cat >conftest.$ac_ext <<_ACEOF
1866 #line $LINENO "configure"
1867 #include "confdefs.h"
1868
1869 #ifdef F77_DUMMY_MAIN
1870 #  ifdef __cplusplus
1871      extern "C"
1872 #  endif
1873    int F77_DUMMY_MAIN() { return 1; }
1874 #endif
1875 int
1876 main ()
1877 {
1878
1879   ;
1880   return 0;
1881 }
1882 _ACEOF
1883 ac_clean_files_save=$ac_clean_files
1884 ac_clean_files="$ac_clean_files a.out a.exe"
1885 # Try to create an executable without -o first, disregard a.out.
1886 # It will help us diagnose broken compilers, and finding out an intuition
1887 # of exeext.
1888 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1889 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1890 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1891 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1892   (eval $ac_link_default) 2>&5
1893   ac_status=$?
1894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1895   (exit $ac_status); }; then
1896   # Find the output, starting from the most likely.  This scheme is
1897 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1898 # resort.
1899
1900 # Be careful to initialize this variable, since it used to be cached.
1901 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1902 ac_cv_exeext=
1903 for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1904                 ls a.out conftest 2>/dev/null;
1905                 ls a.* conftest.* 2>/dev/null`; do
1906   case $ac_file in
1907     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1908     a.out ) # We found the default executable, but exeext='' is most
1909             # certainly right.
1910             break;;
1911     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1912           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1913           export ac_cv_exeext
1914           break;;
1915     * ) break;;
1916   esac
1917 done
1918 else
1919   echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1921 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
1922 echo "$as_me: error: C compiler cannot create executables" >&2;}
1923    { (exit 77); exit 77; }; }
1924 fi
1925
1926 ac_exeext=$ac_cv_exeext
1927 echo "$as_me:$LINENO: result: $ac_file" >&5
1928 echo "${ECHO_T}$ac_file" >&6
1929
1930 # Check the compiler produces executables we can run.  If not, either
1931 # the compiler is broken, or we cross compile.
1932 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1933 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1934 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1935 # If not cross compiling, check that we can run a simple program.
1936 if test "$cross_compiling" != yes; then
1937   if { ac_try='./$ac_file'
1938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1939   (eval $ac_try) 2>&5
1940   ac_status=$?
1941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1942   (exit $ac_status); }; }; then
1943     cross_compiling=no
1944   else
1945     if test "$cross_compiling" = maybe; then
1946         cross_compiling=yes
1947     else
1948         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1949 If you meant to cross compile, use \`--host'." >&5
1950 echo "$as_me: error: cannot run C compiled programs.
1951 If you meant to cross compile, use \`--host'." >&2;}
1952    { (exit 1); exit 1; }; }
1953     fi
1954   fi
1955 fi
1956 echo "$as_me:$LINENO: result: yes" >&5
1957 echo "${ECHO_T}yes" >&6
1958
1959 rm -f a.out a.exe conftest$ac_cv_exeext
1960 ac_clean_files=$ac_clean_files_save
1961 # Check the compiler produces executables we can run.  If not, either
1962 # the compiler is broken, or we cross compile.
1963 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1964 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1965 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1966 echo "${ECHO_T}$cross_compiling" >&6
1967
1968 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1969 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1970 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1971   (eval $ac_link) 2>&5
1972   ac_status=$?
1973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1974   (exit $ac_status); }; then
1975   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1976 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1977 # work properly (i.e., refer to `conftest.exe'), while it won't with
1978 # `rm'.
1979 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1980   case $ac_file in
1981     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1982     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1983           export ac_cv_exeext
1984           break;;
1985     * ) break;;
1986   esac
1987 done
1988 else
1989   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1990 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1991    { (exit 1); exit 1; }; }
1992 fi
1993
1994 rm -f conftest$ac_cv_exeext
1995 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1996 echo "${ECHO_T}$ac_cv_exeext" >&6
1997
1998 rm -f conftest.$ac_ext
1999 EXEEXT=$ac_cv_exeext
2000 ac_exeext=$EXEEXT
2001 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2002 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2003 if test "${ac_cv_objext+set}" = set; then
2004   echo $ECHO_N "(cached) $ECHO_C" >&6
2005 else
2006   cat >conftest.$ac_ext <<_ACEOF
2007 #line $LINENO "configure"
2008 #include "confdefs.h"
2009
2010 #ifdef F77_DUMMY_MAIN
2011 #  ifdef __cplusplus
2012      extern "C"
2013 #  endif
2014    int F77_DUMMY_MAIN() { return 1; }
2015 #endif
2016 int
2017 main ()
2018 {
2019
2020   ;
2021   return 0;
2022 }
2023 _ACEOF
2024 rm -f conftest.o conftest.obj
2025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2026   (eval $ac_compile) 2>&5
2027   ac_status=$?
2028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2029   (exit $ac_status); }; then
2030   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2031   case $ac_file in
2032     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2033     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2034        break;;
2035   esac
2036 done
2037 else
2038   echo "$as_me: failed program was:" >&5
2039 cat conftest.$ac_ext >&5
2040 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2041 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2042    { (exit 1); exit 1; }; }
2043 fi
2044
2045 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2046 fi
2047 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2048 echo "${ECHO_T}$ac_cv_objext" >&6
2049 OBJEXT=$ac_cv_objext
2050 ac_objext=$OBJEXT
2051 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2052 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2053 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2054   echo $ECHO_N "(cached) $ECHO_C" >&6
2055 else
2056   cat >conftest.$ac_ext <<_ACEOF
2057 #line $LINENO "configure"
2058 #include "confdefs.h"
2059
2060 #ifdef F77_DUMMY_MAIN
2061 #  ifdef __cplusplus
2062      extern "C"
2063 #  endif
2064    int F77_DUMMY_MAIN() { return 1; }
2065 #endif
2066 int
2067 main ()
2068 {
2069 #ifndef __GNUC__
2070        choke me
2071 #endif
2072
2073   ;
2074   return 0;
2075 }
2076 _ACEOF
2077 rm -f conftest.$ac_objext
2078 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2079   (eval $ac_compile) 2>&5
2080   ac_status=$?
2081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2082   (exit $ac_status); } &&
2083          { ac_try='test -s conftest.$ac_objext'
2084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2085   (eval $ac_try) 2>&5
2086   ac_status=$?
2087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2088   (exit $ac_status); }; }; then
2089   ac_compiler_gnu=yes
2090 else
2091   echo "$as_me: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2093 ac_compiler_gnu=no
2094 fi
2095 rm -f conftest.$ac_objext conftest.$ac_ext
2096 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2097
2098 fi
2099 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2100 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2101 GCC=`test $ac_compiler_gnu = yes && echo yes`
2102 ac_test_CFLAGS=${CFLAGS+set}
2103 ac_save_CFLAGS=$CFLAGS
2104 CFLAGS="-g"
2105 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2106 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2107 if test "${ac_cv_prog_cc_g+set}" = set; then
2108   echo $ECHO_N "(cached) $ECHO_C" >&6
2109 else
2110   cat >conftest.$ac_ext <<_ACEOF
2111 #line $LINENO "configure"
2112 #include "confdefs.h"
2113
2114 #ifdef F77_DUMMY_MAIN
2115 #  ifdef __cplusplus
2116      extern "C"
2117 #  endif
2118    int F77_DUMMY_MAIN() { return 1; }
2119 #endif
2120 int
2121 main ()
2122 {
2123
2124   ;
2125   return 0;
2126 }
2127 _ACEOF
2128 rm -f conftest.$ac_objext
2129 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2130   (eval $ac_compile) 2>&5
2131   ac_status=$?
2132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2133   (exit $ac_status); } &&
2134          { ac_try='test -s conftest.$ac_objext'
2135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2136   (eval $ac_try) 2>&5
2137   ac_status=$?
2138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2139   (exit $ac_status); }; }; then
2140   ac_cv_prog_cc_g=yes
2141 else
2142   echo "$as_me: failed program was:" >&5
2143 cat conftest.$ac_ext >&5
2144 ac_cv_prog_cc_g=no
2145 fi
2146 rm -f conftest.$ac_objext conftest.$ac_ext
2147 fi
2148 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2149 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2150 if test "$ac_test_CFLAGS" = set; then
2151   CFLAGS=$ac_save_CFLAGS
2152 elif test $ac_cv_prog_cc_g = yes; then
2153   if test "$GCC" = yes; then
2154     CFLAGS="-g -O2"
2155   else
2156     CFLAGS="-g"
2157   fi
2158 else
2159   if test "$GCC" = yes; then
2160     CFLAGS="-O2"
2161   else
2162     CFLAGS=
2163   fi
2164 fi
2165 # Some people use a C++ compiler to compile C.  Since we use `exit',
2166 # in C++ we need to declare it.  In case someone uses the same compiler
2167 # for both compiling C and C++ we need to have the C++ compiler decide
2168 # the declaration of exit, since it's the most demanding environment.
2169 cat >conftest.$ac_ext <<_ACEOF
2170 #ifndef __cplusplus
2171   choke me
2172 #endif
2173 _ACEOF
2174 rm -f conftest.$ac_objext
2175 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2176   (eval $ac_compile) 2>&5
2177   ac_status=$?
2178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2179   (exit $ac_status); } &&
2180          { ac_try='test -s conftest.$ac_objext'
2181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2182   (eval $ac_try) 2>&5
2183   ac_status=$?
2184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2185   (exit $ac_status); }; }; then
2186   for ac_declaration in \
2187    ''\
2188    '#include <stdlib.h>' \
2189    'extern "C" void std::exit (int) throw (); using std::exit;' \
2190    'extern "C" void std::exit (int); using std::exit;' \
2191    'extern "C" void exit (int) throw ();' \
2192    'extern "C" void exit (int);' \
2193    'void exit (int);'
2194 do
2195   cat >conftest.$ac_ext <<_ACEOF
2196 #line $LINENO "configure"
2197 #include "confdefs.h"
2198 #include <stdlib.h>
2199 $ac_declaration
2200 #ifdef F77_DUMMY_MAIN
2201 #  ifdef __cplusplus
2202      extern "C"
2203 #  endif
2204    int F77_DUMMY_MAIN() { return 1; }
2205 #endif
2206 int
2207 main ()
2208 {
2209 exit (42);
2210   ;
2211   return 0;
2212 }
2213 _ACEOF
2214 rm -f conftest.$ac_objext
2215 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2216   (eval $ac_compile) 2>&5
2217   ac_status=$?
2218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2219   (exit $ac_status); } &&
2220          { ac_try='test -s conftest.$ac_objext'
2221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2222   (eval $ac_try) 2>&5
2223   ac_status=$?
2224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2225   (exit $ac_status); }; }; then
2226   :
2227 else
2228   echo "$as_me: failed program was:" >&5
2229 cat conftest.$ac_ext >&5
2230 continue
2231 fi
2232 rm -f conftest.$ac_objext conftest.$ac_ext
2233   cat >conftest.$ac_ext <<_ACEOF
2234 #line $LINENO "configure"
2235 #include "confdefs.h"
2236 $ac_declaration
2237 #ifdef F77_DUMMY_MAIN
2238 #  ifdef __cplusplus
2239      extern "C"
2240 #  endif
2241    int F77_DUMMY_MAIN() { return 1; }
2242 #endif
2243 int
2244 main ()
2245 {
2246 exit (42);
2247   ;
2248   return 0;
2249 }
2250 _ACEOF
2251 rm -f conftest.$ac_objext
2252 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2253   (eval $ac_compile) 2>&5
2254   ac_status=$?
2255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2256   (exit $ac_status); } &&
2257          { ac_try='test -s conftest.$ac_objext'
2258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2259   (eval $ac_try) 2>&5
2260   ac_status=$?
2261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2262   (exit $ac_status); }; }; then
2263   break
2264 else
2265   echo "$as_me: failed program was:" >&5
2266 cat conftest.$ac_ext >&5
2267 fi
2268 rm -f conftest.$ac_objext conftest.$ac_ext
2269 done
2270 rm -f conftest*
2271 if test -n "$ac_declaration"; then
2272   echo '#ifdef __cplusplus' >>confdefs.h
2273   echo $ac_declaration      >>confdefs.h
2274   echo '#endif'             >>confdefs.h
2275 fi
2276
2277 else
2278   echo "$as_me: failed program was:" >&5
2279 cat conftest.$ac_ext >&5
2280 fi
2281 rm -f conftest.$ac_objext conftest.$ac_ext
2282 ac_ext=c
2283 ac_cpp='$CPP $CPPFLAGS'
2284 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2285 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2286 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2287
2288
2289   if test -z "$GCC"; then
2290     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2291 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2292     case "$host" in
2293       *-hpux* )
2294         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2295 echo "${ECHO_T}HPUX: adding -Ae" >&6
2296         CC="$CC -Ae"
2297       ;;
2298       *-aix* )
2299         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2300 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2301         CC="$CC -qlanglvl=ansi -qhalt=e"
2302       ;;
2303
2304       *-dec-* )
2305         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2306 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2307         CC="$CC -std1"
2308       ;;
2309
2310       *)
2311         echo "$as_me:$LINENO: result: no idea" >&5
2312 echo "${ECHO_T}no idea" >&6
2313       ;;
2314     esac
2315   fi
2316
2317   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2318 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2319   if test "$cross_compiling" = yes; then
2320   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2321 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2322    { (exit 1); exit 1; }; }
2323 else
2324   cat >conftest.$ac_ext <<_ACEOF
2325 #line $LINENO "configure"
2326 #include "confdefs.h"
2327  main(int ac, char **av) { return 0; }
2328 _ACEOF
2329 rm -f conftest$ac_exeext
2330 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2331   (eval $ac_link) 2>&5
2332   ac_status=$?
2333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2334   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2336   (eval $ac_try) 2>&5
2337   ac_status=$?
2338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2339   (exit $ac_status); }; }; then
2340   echo "$as_me:$LINENO: result: yes" >&5
2341 echo "${ECHO_T}yes" >&6
2342 else
2343   echo "$as_me: program exited with status $ac_status" >&5
2344 echo "$as_me: failed program was:" >&5
2345 cat conftest.$ac_ext >&5
2346 ( exit $ac_status )
2347 echo "$as_me:$LINENO: result: no" >&5
2348 echo "${ECHO_T}no" >&6
2349      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2350 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2351    { (exit 1); exit 1; }; }
2352 fi
2353 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2354 fi
2355
2356   if test -n "$GCC"; then
2357     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2358 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2359     CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
2360   else
2361     case "$host" in
2362       *-irix5* |*-irix6.0-3* )
2363         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2364 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2365         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2366       ;;
2367 #     *-dec-osf* )
2368 #       if test -z "$GCC"; then
2369 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2370 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2371 #       fi
2372 #     ;;
2373     esac
2374   fi
2375
2376 if test -n "$GCC"; then
2377    if test -n "$GCC"; then
2378    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2379 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2380 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2381   echo $ECHO_N "(cached) $ECHO_C" >&6
2382 else
2383   if ( gcc -E -std=c89 - </dev/null >/dev/null 2>&1 | \
2384           grep unrecognized >/dev/null ); then
2385        ac_cv_gcc_accepts_std=no
2386      else
2387        ac_cv_gcc_accepts_std=yes
2388      fi
2389 fi
2390 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2391 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2392    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2393   fi
2394
2395    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2396 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2397    #
2398    # The reason that // comments are banned from xscreensaver is that gcc is
2399    # basically the only compiler in the world that supports them in C code.
2400    # All other vendors support them only in their C++ compilers, not in their
2401    # ANSI C compilers.  This means that it's a portability problem: every time
2402    # these comments have snuck into the xscreensaver source code, I've gotten
2403    # complaints about it the next day.  So we turn off support for them in gcc
2404    # as well to prevent them from accidentially slipping in.
2405    #
2406    if test "$ac_gcc_accepts_std" = yes ; then
2407      #
2408      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2409      # (That appears to be the only additional preprocessor symbol
2410      # it defines, in addition to the syntax changes it makes.)
2411      #
2412      # -std=gnu89 is no good, because // comments were a GNU extension
2413      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2414      # with -std=gnu89 but not with -std=c89.)
2415      #
2416      CC="$CC -std=c89 -U__STRICT_ANSI__"
2417    else
2418      # The old way:
2419      CC="$CC -Wp,-lang-c89"
2420    fi
2421   fi
2422
2423 ac_ext=c
2424 ac_cpp='$CPP $CPPFLAGS'
2425 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2426 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2427 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2428 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2429 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2430 # On Suns, sometimes $CPP names a directory.
2431 if test -n "$CPP" && test -d "$CPP"; then
2432   CPP=
2433 fi
2434 if test -z "$CPP"; then
2435   if test "${ac_cv_prog_CPP+set}" = set; then
2436   echo $ECHO_N "(cached) $ECHO_C" >&6
2437 else
2438       # Double quotes because CPP needs to be expanded
2439     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2440     do
2441       ac_preproc_ok=false
2442 for ac_c_preproc_warn_flag in '' yes
2443 do
2444   # Use a header file that comes with gcc, so configuring glibc
2445   # with a fresh cross-compiler works.
2446   # On the NeXT, cc -E runs the code through the compiler's parser,
2447   # not just through cpp. "Syntax error" is here to catch this case.
2448   cat >conftest.$ac_ext <<_ACEOF
2449 #line $LINENO "configure"
2450 #include "confdefs.h"
2451 #include <assert.h>
2452                      Syntax error
2453 _ACEOF
2454 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2455   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2456   ac_status=$?
2457   egrep -v '^ *\+' conftest.er1 >conftest.err
2458   rm -f conftest.er1
2459   cat conftest.err >&5
2460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2461   (exit $ac_status); } >/dev/null; then
2462   if test -s conftest.err; then
2463     ac_cpp_err=$ac_c_preproc_warn_flag
2464   else
2465     ac_cpp_err=
2466   fi
2467 else
2468   ac_cpp_err=yes
2469 fi
2470 if test -z "$ac_cpp_err"; then
2471   :
2472 else
2473   echo "$as_me: failed program was:" >&5
2474   cat conftest.$ac_ext >&5
2475   # Broken: fails on valid input.
2476 continue
2477 fi
2478 rm -f conftest.err conftest.$ac_ext
2479
2480   # OK, works on sane cases.  Now check whether non-existent headers
2481   # can be detected and how.
2482   cat >conftest.$ac_ext <<_ACEOF
2483 #line $LINENO "configure"
2484 #include "confdefs.h"
2485 #include <ac_nonexistent.h>
2486 _ACEOF
2487 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2488   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2489   ac_status=$?
2490   egrep -v '^ *\+' conftest.er1 >conftest.err
2491   rm -f conftest.er1
2492   cat conftest.err >&5
2493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2494   (exit $ac_status); } >/dev/null; then
2495   if test -s conftest.err; then
2496     ac_cpp_err=$ac_c_preproc_warn_flag
2497   else
2498     ac_cpp_err=
2499   fi
2500 else
2501   ac_cpp_err=yes
2502 fi
2503 if test -z "$ac_cpp_err"; then
2504   # Broken: success on invalid input.
2505 continue
2506 else
2507   echo "$as_me: failed program was:" >&5
2508   cat conftest.$ac_ext >&5
2509   # Passes both tests.
2510 ac_preproc_ok=:
2511 break
2512 fi
2513 rm -f conftest.err conftest.$ac_ext
2514
2515 done
2516 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2517 rm -f conftest.err conftest.$ac_ext
2518 if $ac_preproc_ok; then
2519   break
2520 fi
2521
2522     done
2523     ac_cv_prog_CPP=$CPP
2524
2525 fi
2526   CPP=$ac_cv_prog_CPP
2527 else
2528   ac_cv_prog_CPP=$CPP
2529 fi
2530 echo "$as_me:$LINENO: result: $CPP" >&5
2531 echo "${ECHO_T}$CPP" >&6
2532 ac_preproc_ok=false
2533 for ac_c_preproc_warn_flag in '' yes
2534 do
2535   # Use a header file that comes with gcc, so configuring glibc
2536   # with a fresh cross-compiler works.
2537   # On the NeXT, cc -E runs the code through the compiler's parser,
2538   # not just through cpp. "Syntax error" is here to catch this case.
2539   cat >conftest.$ac_ext <<_ACEOF
2540 #line $LINENO "configure"
2541 #include "confdefs.h"
2542 #include <assert.h>
2543                      Syntax error
2544 _ACEOF
2545 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2546   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2547   ac_status=$?
2548   egrep -v '^ *\+' conftest.er1 >conftest.err
2549   rm -f conftest.er1
2550   cat conftest.err >&5
2551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2552   (exit $ac_status); } >/dev/null; then
2553   if test -s conftest.err; then
2554     ac_cpp_err=$ac_c_preproc_warn_flag
2555   else
2556     ac_cpp_err=
2557   fi
2558 else
2559   ac_cpp_err=yes
2560 fi
2561 if test -z "$ac_cpp_err"; then
2562   :
2563 else
2564   echo "$as_me: failed program was:" >&5
2565   cat conftest.$ac_ext >&5
2566   # Broken: fails on valid input.
2567 continue
2568 fi
2569 rm -f conftest.err conftest.$ac_ext
2570
2571   # OK, works on sane cases.  Now check whether non-existent headers
2572   # can be detected and how.
2573   cat >conftest.$ac_ext <<_ACEOF
2574 #line $LINENO "configure"
2575 #include "confdefs.h"
2576 #include <ac_nonexistent.h>
2577 _ACEOF
2578 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2579   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2580   ac_status=$?
2581   egrep -v '^ *\+' conftest.er1 >conftest.err
2582   rm -f conftest.er1
2583   cat conftest.err >&5
2584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2585   (exit $ac_status); } >/dev/null; then
2586   if test -s conftest.err; then
2587     ac_cpp_err=$ac_c_preproc_warn_flag
2588   else
2589     ac_cpp_err=
2590   fi
2591 else
2592   ac_cpp_err=yes
2593 fi
2594 if test -z "$ac_cpp_err"; then
2595   # Broken: success on invalid input.
2596 continue
2597 else
2598   echo "$as_me: failed program was:" >&5
2599   cat conftest.$ac_ext >&5
2600   # Passes both tests.
2601 ac_preproc_ok=:
2602 break
2603 fi
2604 rm -f conftest.err conftest.$ac_ext
2605
2606 done
2607 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2608 rm -f conftest.err conftest.$ac_ext
2609 if $ac_preproc_ok; then
2610   :
2611 else
2612   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2613 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2614    { (exit 1); exit 1; }; }
2615 fi
2616
2617 ac_ext=c
2618 ac_cpp='$CPP $CPPFLAGS'
2619 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2620 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2621 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2622
2623 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2624 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2625 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2626   echo $ECHO_N "(cached) $ECHO_C" >&6
2627 else
2628   ac_cv_prog_cc_stdc=no
2629 ac_save_CC=$CC
2630 cat >conftest.$ac_ext <<_ACEOF
2631 #line $LINENO "configure"
2632 #include "confdefs.h"
2633 #include <stdarg.h>
2634 #include <stdio.h>
2635 #include <sys/types.h>
2636 #include <sys/stat.h>
2637 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2638 struct buf { int x; };
2639 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2640 static char *e (p, i)
2641      char **p;
2642      int i;
2643 {
2644   return p[i];
2645 }
2646 static char *f (char * (*g) (char **, int), char **p, ...)
2647 {
2648   char *s;
2649   va_list v;
2650   va_start (v,p);
2651   s = g (p, va_arg (v,int));
2652   va_end (v);
2653   return s;
2654 }
2655 int test (int i, double x);
2656 struct s1 {int (*f) (int a);};
2657 struct s2 {int (*f) (double a);};
2658 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2659 int argc;
2660 char **argv;
2661 #ifdef F77_DUMMY_MAIN
2662 #  ifdef __cplusplus
2663      extern "C"
2664 #  endif
2665    int F77_DUMMY_MAIN() { return 1; }
2666 #endif
2667 int
2668 main ()
2669 {
2670 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2671   ;
2672   return 0;
2673 }
2674 _ACEOF
2675 # Don't try gcc -ansi; that turns off useful extensions and
2676 # breaks some systems' header files.
2677 # AIX                   -qlanglvl=ansi
2678 # Ultrix and OSF/1      -std1
2679 # HP-UX 10.20 and later -Ae
2680 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2681 # SVR4                  -Xc -D__EXTENSIONS__
2682 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2683 do
2684   CC="$ac_save_CC $ac_arg"
2685   rm -f conftest.$ac_objext
2686 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2687   (eval $ac_compile) 2>&5
2688   ac_status=$?
2689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2690   (exit $ac_status); } &&
2691          { ac_try='test -s conftest.$ac_objext'
2692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2693   (eval $ac_try) 2>&5
2694   ac_status=$?
2695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2696   (exit $ac_status); }; }; then
2697   ac_cv_prog_cc_stdc=$ac_arg
2698 break
2699 else
2700   echo "$as_me: failed program was:" >&5
2701 cat conftest.$ac_ext >&5
2702 fi
2703 rm -f conftest.$ac_objext
2704 done
2705 rm -f conftest.$ac_ext conftest.$ac_objext
2706 CC=$ac_save_CC
2707
2708 fi
2709
2710 case "x$ac_cv_prog_cc_stdc" in
2711   x|xno)
2712     echo "$as_me:$LINENO: result: none needed" >&5
2713 echo "${ECHO_T}none needed" >&6 ;;
2714   *)
2715     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2716 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2717     CC="$CC $ac_cv_prog_cc_stdc" ;;
2718 esac
2719
2720 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2721 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2722 if test "${ac_cv_c_const+set}" = set; then
2723   echo $ECHO_N "(cached) $ECHO_C" >&6
2724 else
2725   cat >conftest.$ac_ext <<_ACEOF
2726 #line $LINENO "configure"
2727 #include "confdefs.h"
2728
2729 #ifdef F77_DUMMY_MAIN
2730 #  ifdef __cplusplus
2731      extern "C"
2732 #  endif
2733    int F77_DUMMY_MAIN() { return 1; }
2734 #endif
2735 int
2736 main ()
2737 {
2738 /* FIXME: Include the comments suggested by Paul. */
2739 #ifndef __cplusplus
2740   /* Ultrix mips cc rejects this.  */
2741   typedef int charset[2];
2742   const charset x;
2743   /* SunOS 4.1.1 cc rejects this.  */
2744   char const *const *ccp;
2745   char **p;
2746   /* NEC SVR4.0.2 mips cc rejects this.  */
2747   struct point {int x, y;};
2748   static struct point const zero = {0,0};
2749   /* AIX XL C 1.02.0.0 rejects this.
2750      It does not let you subtract one const X* pointer from another in
2751      an arm of an if-expression whose if-part is not a constant
2752      expression */
2753   const char *g = "string";
2754   ccp = &g + (g ? g-g : 0);
2755   /* HPUX 7.0 cc rejects these. */
2756   ++ccp;
2757   p = (char**) ccp;
2758   ccp = (char const *const *) p;
2759   { /* SCO 3.2v4 cc rejects this.  */
2760     char *t;
2761     char const *s = 0 ? (char *) 0 : (char const *) 0;
2762
2763     *t++ = 0;
2764   }
2765   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2766     int x[] = {25, 17};
2767     const int *foo = &x[0];
2768     ++foo;
2769   }
2770   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2771     typedef const int *iptr;
2772     iptr p = 0;
2773     ++p;
2774   }
2775   { /* AIX XL C 1.02.0.0 rejects this saying
2776        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2777     struct s { int j; const int *ap[3]; };
2778     struct s *b; b->j = 5;
2779   }
2780   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2781     const int foo = 10;
2782   }
2783 #endif
2784
2785   ;
2786   return 0;
2787 }
2788 _ACEOF
2789 rm -f conftest.$ac_objext
2790 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2791   (eval $ac_compile) 2>&5
2792   ac_status=$?
2793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794   (exit $ac_status); } &&
2795          { ac_try='test -s conftest.$ac_objext'
2796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2797   (eval $ac_try) 2>&5
2798   ac_status=$?
2799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800   (exit $ac_status); }; }; then
2801   ac_cv_c_const=yes
2802 else
2803   echo "$as_me: failed program was:" >&5
2804 cat conftest.$ac_ext >&5
2805 ac_cv_c_const=no
2806 fi
2807 rm -f conftest.$ac_objext conftest.$ac_ext
2808 fi
2809 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2810 echo "${ECHO_T}$ac_cv_c_const" >&6
2811 if test $ac_cv_c_const = no; then
2812
2813 cat >>confdefs.h <<\_ACEOF
2814 #define const
2815 _ACEOF
2816
2817 fi
2818
2819 echo "$as_me:$LINENO: checking for inline" >&5
2820 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2821 if test "${ac_cv_c_inline+set}" = set; then
2822   echo $ECHO_N "(cached) $ECHO_C" >&6
2823 else
2824   ac_cv_c_inline=no
2825 for ac_kw in inline __inline__ __inline; do
2826   cat >conftest.$ac_ext <<_ACEOF
2827 #line $LINENO "configure"
2828 #include "confdefs.h"
2829 #ifndef __cplusplus
2830 static $ac_kw int static_foo () {return 0; }
2831 $ac_kw int foo () {return 0; }
2832 #endif
2833
2834 _ACEOF
2835 rm -f conftest.$ac_objext
2836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2837   (eval $ac_compile) 2>&5
2838   ac_status=$?
2839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2840   (exit $ac_status); } &&
2841          { ac_try='test -s conftest.$ac_objext'
2842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2843   (eval $ac_try) 2>&5
2844   ac_status=$?
2845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2846   (exit $ac_status); }; }; then
2847   ac_cv_c_inline=$ac_kw; break
2848 else
2849   echo "$as_me: failed program was:" >&5
2850 cat conftest.$ac_ext >&5
2851 fi
2852 rm -f conftest.$ac_objext conftest.$ac_ext
2853 done
2854
2855 fi
2856 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2857 echo "${ECHO_T}$ac_cv_c_inline" >&6
2858 case $ac_cv_c_inline in
2859   inline | yes) ;;
2860   no)
2861 cat >>confdefs.h <<\_ACEOF
2862 #define inline
2863 _ACEOF
2864  ;;
2865   *)  cat >>confdefs.h <<_ACEOF
2866 #define inline $ac_cv_c_inline
2867 _ACEOF
2868  ;;
2869 esac
2870
2871
2872 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
2873   echo "$as_me:$LINENO: checking for bc" >&5
2874 echo $ECHO_N "checking for bc... $ECHO_C" >&6
2875   if test "$ac_bc_result" = "15" ; then
2876     echo "$as_me:$LINENO: result: yes" >&5
2877 echo "${ECHO_T}yes" >&6
2878   else
2879     echo "$as_me:$LINENO: result: no" >&5
2880 echo "${ECHO_T}no" >&6
2881     echo ''
2882     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
2883                   part of Unix since the 1970s.  Come back when your vendor
2884                   has grown a clue." >&5
2885 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
2886                   part of Unix since the 1970s.  Come back when your vendor
2887                   has grown a clue." >&2;}
2888    { (exit 1); exit 1; }; }
2889   fi
2890
2891
2892 # stuff for Makefiles
2893 # Find a good install program.  We prefer a C program (faster),
2894 # so one script is as good as another.  But avoid the broken or
2895 # incompatible versions:
2896 # SysV /etc/install, /usr/sbin/install
2897 # SunOS /usr/etc/install
2898 # IRIX /sbin/install
2899 # AIX /bin/install
2900 # AmigaOS /C/install, which installs bootblocks on floppy discs
2901 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2902 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2903 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2904 # ./install, which can be erroneously created by make from ./install.sh.
2905 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2906 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2907 if test -z "$INSTALL"; then
2908 if test "${ac_cv_path_install+set}" = set; then
2909   echo $ECHO_N "(cached) $ECHO_C" >&6
2910 else
2911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2912 for as_dir in $PATH
2913 do
2914   IFS=$as_save_IFS
2915   test -z "$as_dir" && as_dir=.
2916   # Account for people who put trailing slashes in PATH elements.
2917 case $as_dir/ in
2918   ./ | .// | /cC/* | \
2919   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2920   /usr/ucb/* ) ;;
2921   *)
2922     # OSF1 and SCO ODT 3.0 have their own names for install.
2923     # Don't use installbsd from OSF since it installs stuff as root
2924     # by default.
2925     for ac_prog in ginstall scoinst install; do
2926       for ac_exec_ext in '' $ac_executable_extensions; do
2927         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2928           if test $ac_prog = install &&
2929             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2930             # AIX install.  It has an incompatible calling convention.
2931             :
2932           elif test $ac_prog = install &&
2933             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2934             # program-specific install script used by HP pwplus--don't use.
2935             :
2936           else
2937             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2938             break 3
2939           fi
2940         fi
2941       done
2942     done
2943     ;;
2944 esac
2945 done
2946
2947
2948 fi
2949   if test "${ac_cv_path_install+set}" = set; then
2950     INSTALL=$ac_cv_path_install
2951   else
2952     # As a last resort, use the slow shell script.  We don't cache a
2953     # path for INSTALL within a source directory, because that will
2954     # break other packages using the cache if that directory is
2955     # removed, or if the path is relative.
2956     INSTALL=$ac_install_sh
2957   fi
2958 fi
2959 echo "$as_me:$LINENO: result: $INSTALL" >&5
2960 echo "${ECHO_T}$INSTALL" >&6
2961
2962 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2963 # It thinks the first close brace ends the variable substitution.
2964 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2965
2966 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2967
2968 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2969
2970 echo "$as_me:$LINENO: checking whether \\"\${INSTALL} -d\\" creates intermediate directories" >&5
2971 echo $ECHO_N "checking whether \\"\${INSTALL} -d\\" creates intermediate directories... $ECHO_C" >&6
2972 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
2973   echo $ECHO_N "(cached) $ECHO_C" >&6
2974 else
2975   ac_cv_install_d_creates_dirs=no
2976      rm -rf conftestdir
2977      if mkdir conftestdir; then
2978        cd conftestdir 2>/dev/null
2979        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
2980        if test -d dir1/dir2/. ; then
2981          ac_cv_install_d_creates_dirs=yes
2982        fi
2983        cd .. 2>/dev/null
2984        rm -rf conftestdir
2985      fi
2986
2987 fi
2988 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
2989 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
2990
2991   if test "$ac_cv_install_d_creates_dirs" = no ; then
2992     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
2993 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
2994 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
2995   echo $ECHO_N "(cached) $ECHO_C" >&6
2996 else
2997   ac_cv_mkdir_p_creates_dirs=no
2998        rm -rf conftestdir
2999        if mkdir conftestdir; then
3000          cd conftestdir 2>/dev/null
3001          mkdir -p dir1/dir2 >/dev/null 2>&1
3002          if test -d dir1/dir2/. ; then
3003            ac_cv_mkdir_p_creates_dirs=yes
3004          fi
3005          cd .. 2>/dev/null
3006          rm -rf conftestdir
3007        fi
3008
3009 fi
3010 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3011 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3012   fi
3013
3014   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3015     INSTALL_DIRS='${INSTALL} -d'
3016   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3017     INSTALL_DIRS='mkdir -p'
3018   else
3019     # any other ideas?
3020     INSTALL_DIRS='${INSTALL} -d'
3021   fi
3022
3023 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
3024 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3025 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3026 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3027   echo $ECHO_N "(cached) $ECHO_C" >&6
3028 else
3029   cat >conftest.make <<\_ACEOF
3030 all:
3031         @echo 'ac_maketemp="${MAKE}"'
3032 _ACEOF
3033 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3034 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3035 if test -n "$ac_maketemp"; then
3036   eval ac_cv_prog_make_${ac_make}_set=yes
3037 else
3038   eval ac_cv_prog_make_${ac_make}_set=no
3039 fi
3040 rm -f conftest.make
3041 fi
3042 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3043   echo "$as_me:$LINENO: result: yes" >&5
3044 echo "${ECHO_T}yes" >&6
3045   SET_MAKE=
3046 else
3047   echo "$as_me:$LINENO: result: no" >&5
3048 echo "${ECHO_T}no" >&6
3049   SET_MAKE="MAKE=${MAKE-make}"
3050 fi
3051
3052
3053 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3054 # That's wrong: it should be set to '${INSTALL}', so that one can
3055 # implement the "install-strip" target properly (strip executables,
3056 # but do not try to strip scripts.)
3057 #
3058 INSTALL_SCRIPT='${INSTALL}'
3059
3060 # random libc stuff
3061
3062 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3063 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3064 if test "${ac_cv_header_stdc+set}" = set; then
3065   echo $ECHO_N "(cached) $ECHO_C" >&6
3066 else
3067   cat >conftest.$ac_ext <<_ACEOF
3068 #line $LINENO "configure"
3069 #include "confdefs.h"
3070 #include <stdlib.h>
3071 #include <stdarg.h>
3072 #include <string.h>
3073 #include <float.h>
3074
3075 _ACEOF
3076 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3077   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3078   ac_status=$?
3079   egrep -v '^ *\+' conftest.er1 >conftest.err
3080   rm -f conftest.er1
3081   cat conftest.err >&5
3082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3083   (exit $ac_status); } >/dev/null; then
3084   if test -s conftest.err; then
3085     ac_cpp_err=$ac_c_preproc_warn_flag
3086   else
3087     ac_cpp_err=
3088   fi
3089 else
3090   ac_cpp_err=yes
3091 fi
3092 if test -z "$ac_cpp_err"; then
3093   ac_cv_header_stdc=yes
3094 else
3095   echo "$as_me: failed program was:" >&5
3096   cat conftest.$ac_ext >&5
3097   ac_cv_header_stdc=no
3098 fi
3099 rm -f conftest.err conftest.$ac_ext
3100
3101 if test $ac_cv_header_stdc = yes; then
3102   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3103   cat >conftest.$ac_ext <<_ACEOF
3104 #line $LINENO "configure"
3105 #include "confdefs.h"
3106 #include <string.h>
3107
3108 _ACEOF
3109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3110   egrep "memchr" >/dev/null 2>&1; then
3111   :
3112 else
3113   ac_cv_header_stdc=no
3114 fi
3115 rm -f conftest*
3116
3117 fi
3118
3119 if test $ac_cv_header_stdc = yes; then
3120   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3121   cat >conftest.$ac_ext <<_ACEOF
3122 #line $LINENO "configure"
3123 #include "confdefs.h"
3124 #include <stdlib.h>
3125
3126 _ACEOF
3127 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3128   egrep "free" >/dev/null 2>&1; then
3129   :
3130 else
3131   ac_cv_header_stdc=no
3132 fi
3133 rm -f conftest*
3134
3135 fi
3136
3137 if test $ac_cv_header_stdc = yes; then
3138   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3139   if test "$cross_compiling" = yes; then
3140   :
3141 else
3142   cat >conftest.$ac_ext <<_ACEOF
3143 #line $LINENO "configure"
3144 #include "confdefs.h"
3145 #include <ctype.h>
3146 #if ((' ' & 0x0FF) == 0x020)
3147 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3148 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3149 #else
3150 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3151                      || ('j' <= (c) && (c) <= 'r') \
3152                      || ('s' <= (c) && (c) <= 'z'))
3153 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3154 #endif
3155
3156 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3157 int
3158 main ()
3159 {
3160   int i;
3161   for (i = 0; i < 256; i++)
3162     if (XOR (islower (i), ISLOWER (i))
3163         || toupper (i) != TOUPPER (i))
3164       exit(2);
3165   exit (0);
3166 }
3167 _ACEOF
3168 rm -f conftest$ac_exeext
3169 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3170   (eval $ac_link) 2>&5
3171   ac_status=$?
3172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3173   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3175   (eval $ac_try) 2>&5
3176   ac_status=$?
3177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3178   (exit $ac_status); }; }; then
3179   :
3180 else
3181   echo "$as_me: program exited with status $ac_status" >&5
3182 echo "$as_me: failed program was:" >&5
3183 cat conftest.$ac_ext >&5
3184 ( exit $ac_status )
3185 ac_cv_header_stdc=no
3186 fi
3187 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3188 fi
3189 fi
3190 fi
3191 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3192 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3193 if test $ac_cv_header_stdc = yes; then
3194
3195 cat >>confdefs.h <<\_ACEOF
3196 #define STDC_HEADERS 1
3197 _ACEOF
3198
3199 fi
3200
3201 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3212                   inttypes.h stdint.h unistd.h
3213 do
3214 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3215 echo "$as_me:$LINENO: checking for $ac_header" >&5
3216 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3217 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3218   echo $ECHO_N "(cached) $ECHO_C" >&6
3219 else
3220   cat >conftest.$ac_ext <<_ACEOF
3221 #line $LINENO "configure"
3222 #include "confdefs.h"
3223 $ac_includes_default
3224
3225 #include <$ac_header>
3226 _ACEOF
3227 rm -f conftest.$ac_objext
3228 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3229   (eval $ac_compile) 2>&5
3230   ac_status=$?
3231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3232   (exit $ac_status); } &&
3233          { ac_try='test -s conftest.$ac_objext'
3234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3235   (eval $ac_try) 2>&5
3236   ac_status=$?
3237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3238   (exit $ac_status); }; }; then
3239   eval "$as_ac_Header=yes"
3240 else
3241   echo "$as_me: failed program was:" >&5
3242 cat conftest.$ac_ext >&5
3243 eval "$as_ac_Header=no"
3244 fi
3245 rm -f conftest.$ac_objext conftest.$ac_ext
3246 fi
3247 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3248 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3249 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3250   cat >>confdefs.h <<_ACEOF
3251 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3252 _ACEOF
3253
3254 fi
3255
3256 done
3257
3258
3259
3260 for ac_header in unistd.h
3261 do
3262 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3263 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3264   echo "$as_me:$LINENO: checking for $ac_header" >&5
3265 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3266 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3267   echo $ECHO_N "(cached) $ECHO_C" >&6
3268 fi
3269 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3270 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3271 else
3272   # Is the header compilable?
3273 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3274 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3275 cat >conftest.$ac_ext <<_ACEOF
3276 #line $LINENO "configure"
3277 #include "confdefs.h"
3278 $ac_includes_default
3279 #include <$ac_header>
3280 _ACEOF
3281 rm -f conftest.$ac_objext
3282 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3283   (eval $ac_compile) 2>&5
3284   ac_status=$?
3285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3286   (exit $ac_status); } &&
3287          { ac_try='test -s conftest.$ac_objext'
3288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3289   (eval $ac_try) 2>&5
3290   ac_status=$?
3291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3292   (exit $ac_status); }; }; then
3293   ac_header_compiler=yes
3294 else
3295   echo "$as_me: failed program was:" >&5
3296 cat conftest.$ac_ext >&5
3297 ac_header_compiler=no
3298 fi
3299 rm -f conftest.$ac_objext conftest.$ac_ext
3300 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3301 echo "${ECHO_T}$ac_header_compiler" >&6
3302
3303 # Is the header present?
3304 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3305 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3306 cat >conftest.$ac_ext <<_ACEOF
3307 #line $LINENO "configure"
3308 #include "confdefs.h"
3309 #include <$ac_header>
3310 _ACEOF
3311 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3312   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3313   ac_status=$?
3314   egrep -v '^ *\+' conftest.er1 >conftest.err
3315   rm -f conftest.er1
3316   cat conftest.err >&5
3317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3318   (exit $ac_status); } >/dev/null; then
3319   if test -s conftest.err; then
3320     ac_cpp_err=$ac_c_preproc_warn_flag
3321   else
3322     ac_cpp_err=
3323   fi
3324 else
3325   ac_cpp_err=yes
3326 fi
3327 if test -z "$ac_cpp_err"; then
3328   ac_header_preproc=yes
3329 else
3330   echo "$as_me: failed program was:" >&5
3331   cat conftest.$ac_ext >&5
3332   ac_header_preproc=no
3333 fi
3334 rm -f conftest.err conftest.$ac_ext
3335 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3336 echo "${ECHO_T}$ac_header_preproc" >&6
3337
3338 # So?  What about this header?
3339 case $ac_header_compiler:$ac_header_preproc in
3340   yes:no )
3341     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3342 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3343     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3344 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3345   no:yes )
3346     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3347 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3348     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3349 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3350     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3351 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3352 esac
3353 echo "$as_me:$LINENO: checking for $ac_header" >&5
3354 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3355 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3356   echo $ECHO_N "(cached) $ECHO_C" >&6
3357 else
3358   eval "$as_ac_Header=$ac_header_preproc"
3359 fi
3360 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3362
3363 fi
3364 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3365   cat >>confdefs.h <<_ACEOF
3366 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3367 _ACEOF
3368
3369 fi
3370
3371 done
3372
3373 echo "$as_me:$LINENO: checking for mode_t" >&5
3374 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3375 if test "${ac_cv_type_mode_t+set}" = set; then
3376   echo $ECHO_N "(cached) $ECHO_C" >&6
3377 else
3378   cat >conftest.$ac_ext <<_ACEOF
3379 #line $LINENO "configure"
3380 #include "confdefs.h"
3381 $ac_includes_default
3382 #ifdef F77_DUMMY_MAIN
3383 #  ifdef __cplusplus
3384      extern "C"
3385 #  endif
3386    int F77_DUMMY_MAIN() { return 1; }
3387 #endif
3388 int
3389 main ()
3390 {
3391 if ((mode_t *) 0)
3392   return 0;
3393 if (sizeof (mode_t))
3394   return 0;
3395   ;
3396   return 0;
3397 }
3398 _ACEOF
3399 rm -f conftest.$ac_objext
3400 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3401   (eval $ac_compile) 2>&5
3402   ac_status=$?
3403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3404   (exit $ac_status); } &&
3405          { ac_try='test -s conftest.$ac_objext'
3406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3407   (eval $ac_try) 2>&5
3408   ac_status=$?
3409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3410   (exit $ac_status); }; }; then
3411   ac_cv_type_mode_t=yes
3412 else
3413   echo "$as_me: failed program was:" >&5
3414 cat conftest.$ac_ext >&5
3415 ac_cv_type_mode_t=no
3416 fi
3417 rm -f conftest.$ac_objext conftest.$ac_ext
3418 fi
3419 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3420 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3421 if test $ac_cv_type_mode_t = yes; then
3422   :
3423 else
3424
3425 cat >>confdefs.h <<_ACEOF
3426 #define mode_t int
3427 _ACEOF
3428
3429 fi
3430
3431 echo "$as_me:$LINENO: checking for pid_t" >&5
3432 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3433 if test "${ac_cv_type_pid_t+set}" = set; then
3434   echo $ECHO_N "(cached) $ECHO_C" >&6
3435 else
3436   cat >conftest.$ac_ext <<_ACEOF
3437 #line $LINENO "configure"
3438 #include "confdefs.h"
3439 $ac_includes_default
3440 #ifdef F77_DUMMY_MAIN
3441 #  ifdef __cplusplus
3442      extern "C"
3443 #  endif
3444    int F77_DUMMY_MAIN() { return 1; }
3445 #endif
3446 int
3447 main ()
3448 {
3449 if ((pid_t *) 0)
3450   return 0;
3451 if (sizeof (pid_t))
3452   return 0;
3453   ;
3454   return 0;
3455 }
3456 _ACEOF
3457 rm -f conftest.$ac_objext
3458 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3459   (eval $ac_compile) 2>&5
3460   ac_status=$?
3461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3462   (exit $ac_status); } &&
3463          { ac_try='test -s conftest.$ac_objext'
3464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3465   (eval $ac_try) 2>&5
3466   ac_status=$?
3467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3468   (exit $ac_status); }; }; then
3469   ac_cv_type_pid_t=yes
3470 else
3471   echo "$as_me: failed program was:" >&5
3472 cat conftest.$ac_ext >&5
3473 ac_cv_type_pid_t=no
3474 fi
3475 rm -f conftest.$ac_objext conftest.$ac_ext
3476 fi
3477 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3478 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3479 if test $ac_cv_type_pid_t = yes; then
3480   :
3481 else
3482
3483 cat >>confdefs.h <<_ACEOF
3484 #define pid_t int
3485 _ACEOF
3486
3487 fi
3488
3489 echo "$as_me:$LINENO: checking for size_t" >&5
3490 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3491 if test "${ac_cv_type_size_t+set}" = set; then
3492   echo $ECHO_N "(cached) $ECHO_C" >&6
3493 else
3494   cat >conftest.$ac_ext <<_ACEOF
3495 #line $LINENO "configure"
3496 #include "confdefs.h"
3497 $ac_includes_default
3498 #ifdef F77_DUMMY_MAIN
3499 #  ifdef __cplusplus
3500      extern "C"
3501 #  endif
3502    int F77_DUMMY_MAIN() { return 1; }
3503 #endif
3504 int
3505 main ()
3506 {
3507 if ((size_t *) 0)
3508   return 0;
3509 if (sizeof (size_t))
3510   return 0;
3511   ;
3512   return 0;
3513 }
3514 _ACEOF
3515 rm -f conftest.$ac_objext
3516 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3517   (eval $ac_compile) 2>&5
3518   ac_status=$?
3519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520   (exit $ac_status); } &&
3521          { ac_try='test -s conftest.$ac_objext'
3522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3523   (eval $ac_try) 2>&5
3524   ac_status=$?
3525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3526   (exit $ac_status); }; }; then
3527   ac_cv_type_size_t=yes
3528 else
3529   echo "$as_me: failed program was:" >&5
3530 cat conftest.$ac_ext >&5
3531 ac_cv_type_size_t=no
3532 fi
3533 rm -f conftest.$ac_objext conftest.$ac_ext
3534 fi
3535 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3536 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3537 if test $ac_cv_type_size_t = yes; then
3538   :
3539 else
3540
3541 cat >>confdefs.h <<_ACEOF
3542 #define size_t unsigned
3543 _ACEOF
3544
3545 fi
3546
3547 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3548 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3549 if test "${ac_cv_type_signal+set}" = set; then
3550   echo $ECHO_N "(cached) $ECHO_C" >&6
3551 else
3552   cat >conftest.$ac_ext <<_ACEOF
3553 #line $LINENO "configure"
3554 #include "confdefs.h"
3555 #include <sys/types.h>
3556 #include <signal.h>
3557 #ifdef signal
3558 # undef signal
3559 #endif
3560 #ifdef __cplusplus
3561 extern "C" void (*signal (int, void (*)(int)))(int);
3562 #else
3563 void (*signal ()) ();
3564 #endif
3565
3566 #ifdef F77_DUMMY_MAIN
3567 #  ifdef __cplusplus
3568      extern "C"
3569 #  endif
3570    int F77_DUMMY_MAIN() { return 1; }
3571 #endif
3572 int
3573 main ()
3574 {
3575 int i;
3576   ;
3577   return 0;
3578 }
3579 _ACEOF
3580 rm -f conftest.$ac_objext
3581 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3582   (eval $ac_compile) 2>&5
3583   ac_status=$?
3584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3585   (exit $ac_status); } &&
3586          { ac_try='test -s conftest.$ac_objext'
3587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3588   (eval $ac_try) 2>&5
3589   ac_status=$?
3590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3591   (exit $ac_status); }; }; then
3592   ac_cv_type_signal=void
3593 else
3594   echo "$as_me: failed program was:" >&5
3595 cat conftest.$ac_ext >&5
3596 ac_cv_type_signal=int
3597 fi
3598 rm -f conftest.$ac_objext conftest.$ac_ext
3599 fi
3600 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3601 echo "${ECHO_T}$ac_cv_type_signal" >&6
3602
3603 cat >>confdefs.h <<_ACEOF
3604 #define RETSIGTYPE $ac_cv_type_signal
3605 _ACEOF
3606
3607
3608 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3609 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3610 if test "${ac_cv_header_time+set}" = set; then
3611   echo $ECHO_N "(cached) $ECHO_C" >&6
3612 else
3613   cat >conftest.$ac_ext <<_ACEOF
3614 #line $LINENO "configure"
3615 #include "confdefs.h"
3616 #include <sys/types.h>
3617 #include <sys/time.h>
3618 #include <time.h>
3619
3620 #ifdef F77_DUMMY_MAIN
3621 #  ifdef __cplusplus
3622      extern "C"
3623 #  endif
3624    int F77_DUMMY_MAIN() { return 1; }
3625 #endif
3626 int
3627 main ()
3628 {
3629 if ((struct tm *) 0)
3630 return 0;
3631   ;
3632   return 0;
3633 }
3634 _ACEOF
3635 rm -f conftest.$ac_objext
3636 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3637   (eval $ac_compile) 2>&5
3638   ac_status=$?
3639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3640   (exit $ac_status); } &&
3641          { ac_try='test -s conftest.$ac_objext'
3642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3643   (eval $ac_try) 2>&5
3644   ac_status=$?
3645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3646   (exit $ac_status); }; }; then
3647   ac_cv_header_time=yes
3648 else
3649   echo "$as_me: failed program was:" >&5
3650 cat conftest.$ac_ext >&5
3651 ac_cv_header_time=no
3652 fi
3653 rm -f conftest.$ac_objext conftest.$ac_ext
3654 fi
3655 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3656 echo "${ECHO_T}$ac_cv_header_time" >&6
3657 if test $ac_cv_header_time = yes; then
3658
3659 cat >>confdefs.h <<\_ACEOF
3660 #define TIME_WITH_SYS_TIME 1
3661 _ACEOF
3662
3663 fi
3664
3665 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3666 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3667 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3668   echo $ECHO_N "(cached) $ECHO_C" >&6
3669 else
3670   cat >conftest.$ac_ext <<_ACEOF
3671 #line $LINENO "configure"
3672 #include "confdefs.h"
3673 #include <sys/types.h>
3674 #include <sys/wait.h>
3675 #ifndef WEXITSTATUS
3676 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3677 #endif
3678 #ifndef WIFEXITED
3679 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3680 #endif
3681
3682 #ifdef F77_DUMMY_MAIN
3683 #  ifdef __cplusplus
3684      extern "C"
3685 #  endif
3686    int F77_DUMMY_MAIN() { return 1; }
3687 #endif
3688 int
3689 main ()
3690 {
3691   int s;
3692   wait (&s);
3693   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3694   ;
3695   return 0;
3696 }
3697 _ACEOF
3698 rm -f conftest.$ac_objext
3699 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3700   (eval $ac_compile) 2>&5
3701   ac_status=$?
3702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3703   (exit $ac_status); } &&
3704          { ac_try='test -s conftest.$ac_objext'
3705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3706   (eval $ac_try) 2>&5
3707   ac_status=$?
3708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3709   (exit $ac_status); }; }; then
3710   ac_cv_header_sys_wait_h=yes
3711 else
3712   echo "$as_me: failed program was:" >&5
3713 cat conftest.$ac_ext >&5
3714 ac_cv_header_sys_wait_h=no
3715 fi
3716 rm -f conftest.$ac_objext conftest.$ac_ext
3717 fi
3718 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3719 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3720 if test $ac_cv_header_sys_wait_h = yes; then
3721
3722 cat >>confdefs.h <<\_ACEOF
3723 #define HAVE_SYS_WAIT_H 1
3724 _ACEOF
3725
3726 fi
3727
3728
3729
3730
3731
3732
3733 ac_header_dirent=no
3734 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3735   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3736 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3737 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3738 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3739   echo $ECHO_N "(cached) $ECHO_C" >&6
3740 else
3741   cat >conftest.$ac_ext <<_ACEOF
3742 #line $LINENO "configure"
3743 #include "confdefs.h"
3744 #include <sys/types.h>
3745 #include <$ac_hdr>
3746
3747 #ifdef F77_DUMMY_MAIN
3748 #  ifdef __cplusplus
3749      extern "C"
3750 #  endif
3751    int F77_DUMMY_MAIN() { return 1; }
3752 #endif
3753 int
3754 main ()
3755 {
3756 if ((DIR *) 0)
3757 return 0;
3758   ;
3759   return 0;
3760 }
3761 _ACEOF
3762 rm -f conftest.$ac_objext
3763 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3764   (eval $ac_compile) 2>&5
3765   ac_status=$?
3766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3767   (exit $ac_status); } &&
3768          { ac_try='test -s conftest.$ac_objext'
3769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3770   (eval $ac_try) 2>&5
3771   ac_status=$?
3772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3773   (exit $ac_status); }; }; then
3774   eval "$as_ac_Header=yes"
3775 else
3776   echo "$as_me: failed program was:" >&5
3777 cat conftest.$ac_ext >&5
3778 eval "$as_ac_Header=no"
3779 fi
3780 rm -f conftest.$ac_objext conftest.$ac_ext
3781 fi
3782 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3783 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3784 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3785   cat >>confdefs.h <<_ACEOF
3786 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
3787 _ACEOF
3788
3789 ac_header_dirent=$ac_hdr; break
3790 fi
3791
3792 done
3793 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3794 if test $ac_header_dirent = dirent.h; then
3795   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3796 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3797 if test "${ac_cv_search_opendir+set}" = set; then
3798   echo $ECHO_N "(cached) $ECHO_C" >&6
3799 else
3800   ac_func_search_save_LIBS=$LIBS
3801 ac_cv_search_opendir=no
3802 cat >conftest.$ac_ext <<_ACEOF
3803 #line $LINENO "configure"
3804 #include "confdefs.h"
3805
3806 /* Override any gcc2 internal prototype to avoid an error.  */
3807 #ifdef __cplusplus
3808 extern "C"
3809 #endif
3810 /* We use char because int might match the return type of a gcc2
3811    builtin and then its argument prototype would still apply.  */
3812 char opendir ();
3813 #ifdef F77_DUMMY_MAIN
3814 #  ifdef __cplusplus
3815      extern "C"
3816 #  endif
3817    int F77_DUMMY_MAIN() { return 1; }
3818 #endif
3819 int
3820 main ()
3821 {
3822 opendir ();
3823   ;
3824   return 0;
3825 }
3826 _ACEOF
3827 rm -f conftest.$ac_objext conftest$ac_exeext
3828 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3829   (eval $ac_link) 2>&5
3830   ac_status=$?
3831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3832   (exit $ac_status); } &&
3833          { ac_try='test -s conftest$ac_exeext'
3834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3835   (eval $ac_try) 2>&5
3836   ac_status=$?
3837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3838   (exit $ac_status); }; }; then
3839   ac_cv_search_opendir="none required"
3840 else
3841   echo "$as_me: failed program was:" >&5
3842 cat conftest.$ac_ext >&5
3843 fi
3844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3845 if test "$ac_cv_search_opendir" = no; then
3846   for ac_lib in dir; do
3847     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3848     cat >conftest.$ac_ext <<_ACEOF
3849 #line $LINENO "configure"
3850 #include "confdefs.h"
3851
3852 /* Override any gcc2 internal prototype to avoid an error.  */
3853 #ifdef __cplusplus
3854 extern "C"
3855 #endif
3856 /* We use char because int might match the return type of a gcc2
3857    builtin and then its argument prototype would still apply.  */
3858 char opendir ();
3859 #ifdef F77_DUMMY_MAIN
3860 #  ifdef __cplusplus
3861      extern "C"
3862 #  endif
3863    int F77_DUMMY_MAIN() { return 1; }
3864 #endif
3865 int
3866 main ()
3867 {
3868 opendir ();
3869   ;
3870   return 0;
3871 }
3872 _ACEOF
3873 rm -f conftest.$ac_objext conftest$ac_exeext
3874 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3875   (eval $ac_link) 2>&5
3876   ac_status=$?
3877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3878   (exit $ac_status); } &&
3879          { ac_try='test -s conftest$ac_exeext'
3880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3881   (eval $ac_try) 2>&5
3882   ac_status=$?
3883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3884   (exit $ac_status); }; }; then
3885   ac_cv_search_opendir="-l$ac_lib"
3886 break
3887 else
3888   echo "$as_me: failed program was:" >&5
3889 cat conftest.$ac_ext >&5
3890 fi
3891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3892   done
3893 fi
3894 LIBS=$ac_func_search_save_LIBS
3895 fi
3896 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
3897 echo "${ECHO_T}$ac_cv_search_opendir" >&6
3898 if test "$ac_cv_search_opendir" != no; then
3899   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
3900
3901 fi
3902
3903 else
3904   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3905 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3906 if test "${ac_cv_search_opendir+set}" = set; then
3907   echo $ECHO_N "(cached) $ECHO_C" >&6
3908 else
3909   ac_func_search_save_LIBS=$LIBS
3910 ac_cv_search_opendir=no
3911 cat >conftest.$ac_ext <<_ACEOF
3912 #line $LINENO "configure"
3913 #include "confdefs.h"
3914
3915 /* Override any gcc2 internal prototype to avoid an error.  */
3916 #ifdef __cplusplus
3917 extern "C"
3918 #endif
3919 /* We use char because int might match the return type of a gcc2
3920    builtin and then its argument prototype would still apply.  */
3921 char opendir ();
3922 #ifdef F77_DUMMY_MAIN
3923 #  ifdef __cplusplus
3924      extern "C"
3925 #  endif
3926    int F77_DUMMY_MAIN() { return 1; }
3927 #endif
3928 int
3929 main ()
3930 {
3931 opendir ();
3932   ;
3933   return 0;
3934 }
3935 _ACEOF
3936 rm -f conftest.$ac_objext conftest$ac_exeext
3937 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3938   (eval $ac_link) 2>&5
3939   ac_status=$?
3940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3941   (exit $ac_status); } &&
3942          { ac_try='test -s conftest$ac_exeext'
3943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3944   (eval $ac_try) 2>&5
3945   ac_status=$?
3946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3947   (exit $ac_status); }; }; then
3948   ac_cv_search_opendir="none required"
3949 else
3950   echo "$as_me: failed program was:" >&5
3951 cat conftest.$ac_ext >&5
3952 fi
3953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3954 if test "$ac_cv_search_opendir" = no; then
3955   for ac_lib in x; do
3956     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3957     cat >conftest.$ac_ext <<_ACEOF
3958 #line $LINENO "configure"
3959 #include "confdefs.h"
3960
3961 /* Override any gcc2 internal prototype to avoid an error.  */
3962 #ifdef __cplusplus
3963 extern "C"
3964 #endif
3965 /* We use char because int might match the return type of a gcc2
3966    builtin and then its argument prototype would still apply.  */
3967 char opendir ();
3968 #ifdef F77_DUMMY_MAIN
3969 #  ifdef __cplusplus
3970      extern "C"
3971 #  endif
3972    int F77_DUMMY_MAIN() { return 1; }
3973 #endif
3974 int
3975 main ()
3976 {
3977 opendir ();
3978   ;
3979   return 0;
3980 }
3981 _ACEOF
3982 rm -f conftest.$ac_objext conftest$ac_exeext
3983 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3984   (eval $ac_link) 2>&5
3985   ac_status=$?
3986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3987   (exit $ac_status); } &&
3988          { ac_try='test -s conftest$ac_exeext'
3989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3990   (eval $ac_try) 2>&5
3991   ac_status=$?
3992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993   (exit $ac_status); }; }; then
3994   ac_cv_search_opendir="-l$ac_lib"
3995 break
3996 else
3997   echo "$as_me: failed program was:" >&5
3998 cat conftest.$ac_ext >&5
3999 fi
4000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4001   done
4002 fi
4003 LIBS=$ac_func_search_save_LIBS
4004 fi
4005 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4006 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4007 if test "$ac_cv_search_opendir" != no; then
4008   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4009
4010 fi
4011
4012 fi
4013
4014 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4015 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4016   if test "${ac_cv_gettimeofday_args+set}" = set; then
4017   echo $ECHO_N "(cached) $ECHO_C" >&6
4018 else
4019   cat >conftest.$ac_ext <<_ACEOF
4020 #line $LINENO "configure"
4021 #include "confdefs.h"
4022 #include <stdlib.h>
4023                     #include <sys/time.h>
4024 #ifdef F77_DUMMY_MAIN
4025 #  ifdef __cplusplus
4026      extern "C"
4027 #  endif
4028    int F77_DUMMY_MAIN() { return 1; }
4029 #endif
4030 int
4031 main ()
4032 {
4033 struct timeval tv; struct timezone tzp;
4034                     gettimeofday(&tv, &tzp);
4035   ;
4036   return 0;
4037 }
4038 _ACEOF
4039 rm -f conftest.$ac_objext
4040 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4041   (eval $ac_compile) 2>&5
4042   ac_status=$?
4043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044   (exit $ac_status); } &&
4045          { ac_try='test -s conftest.$ac_objext'
4046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4047   (eval $ac_try) 2>&5
4048   ac_status=$?
4049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4050   (exit $ac_status); }; }; then
4051   ac_gettimeofday_args=2
4052 else
4053   echo "$as_me: failed program was:" >&5
4054 cat conftest.$ac_ext >&5
4055 cat >conftest.$ac_ext <<_ACEOF
4056 #line $LINENO "configure"
4057 #include "confdefs.h"
4058 #include <stdlib.h>
4059                                     #include <sys/time.h>
4060 #ifdef F77_DUMMY_MAIN
4061 #  ifdef __cplusplus
4062      extern "C"
4063 #  endif
4064    int F77_DUMMY_MAIN() { return 1; }
4065 #endif
4066 int
4067 main ()
4068 {
4069 struct timeval tv; gettimeofday(&tv);
4070   ;
4071   return 0;
4072 }
4073 _ACEOF
4074 rm -f conftest.$ac_objext
4075 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4076   (eval $ac_compile) 2>&5
4077   ac_status=$?
4078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4079   (exit $ac_status); } &&
4080          { ac_try='test -s conftest.$ac_objext'
4081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4082   (eval $ac_try) 2>&5
4083   ac_status=$?
4084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085   (exit $ac_status); }; }; then
4086   ac_gettimeofday_args=1
4087 else
4088   echo "$as_me: failed program was:" >&5
4089 cat conftest.$ac_ext >&5
4090 ac_gettimeofday_args=0
4091 fi
4092 rm -f conftest.$ac_objext conftest.$ac_ext
4093 fi
4094 rm -f conftest.$ac_objext conftest.$ac_ext
4095     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4096 fi
4097
4098   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4099   if test "$ac_gettimeofday_args" = 1 ; then
4100     cat >>confdefs.h <<\_ACEOF
4101 #define HAVE_GETTIMEOFDAY 1
4102 _ACEOF
4103
4104     echo "$as_me:$LINENO: result: one argument" >&5
4105 echo "${ECHO_T}one argument" >&6
4106   elif test "$ac_gettimeofday_args" = 2 ; then
4107     cat >>confdefs.h <<\_ACEOF
4108 #define HAVE_GETTIMEOFDAY 1
4109 _ACEOF
4110
4111     cat >>confdefs.h <<\_ACEOF
4112 #define GETTIMEOFDAY_TWO_ARGS 1
4113 _ACEOF
4114
4115     echo "$as_me:$LINENO: result: two arguments" >&5
4116 echo "${ECHO_T}two arguments" >&6
4117   else
4118     echo "$as_me:$LINENO: result: unknown" >&5
4119 echo "${ECHO_T}unknown" >&6
4120   fi
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4132 do
4133 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4134 echo "$as_me:$LINENO: checking for $ac_func" >&5
4135 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4136 if eval "test \"\${$as_ac_var+set}\" = set"; then
4137   echo $ECHO_N "(cached) $ECHO_C" >&6
4138 else
4139   cat >conftest.$ac_ext <<_ACEOF
4140 #line $LINENO "configure"
4141 #include "confdefs.h"
4142 /* System header to define __stub macros and hopefully few prototypes,
4143     which can conflict with char $ac_func (); below.  */
4144 #include <assert.h>
4145 /* Override any gcc2 internal prototype to avoid an error.  */
4146 #ifdef __cplusplus
4147 extern "C"
4148 #endif
4149 /* We use char because int might match the return type of a gcc2
4150    builtin and then its argument prototype would still apply.  */
4151 char $ac_func ();
4152 char (*f) ();
4153
4154 #ifdef F77_DUMMY_MAIN
4155 #  ifdef __cplusplus
4156      extern "C"
4157 #  endif
4158    int F77_DUMMY_MAIN() { return 1; }
4159 #endif
4160 int
4161 main ()
4162 {
4163 /* The GNU C library defines this for functions which it implements
4164     to always fail with ENOSYS.  Some functions are actually named
4165     something starting with __ and the normal name is an alias.  */
4166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4167 choke me
4168 #else
4169 f = $ac_func;
4170 #endif
4171
4172   ;
4173   return 0;
4174 }
4175 _ACEOF
4176 rm -f conftest.$ac_objext conftest$ac_exeext
4177 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4178   (eval $ac_link) 2>&5
4179   ac_status=$?
4180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4181   (exit $ac_status); } &&
4182          { ac_try='test -s conftest$ac_exeext'
4183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4184   (eval $ac_try) 2>&5
4185   ac_status=$?
4186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4187   (exit $ac_status); }; }; then
4188   eval "$as_ac_var=yes"
4189 else
4190   echo "$as_me: failed program was:" >&5
4191 cat conftest.$ac_ext >&5
4192 eval "$as_ac_var=no"
4193 fi
4194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4195 fi
4196 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4197 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4198 if test `eval echo '${'$as_ac_var'}'` = yes; then
4199   cat >>confdefs.h <<_ACEOF
4200 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4201 _ACEOF
4202
4203 fi
4204 done
4205
4206
4207
4208
4209
4210
4211 for ac_func in sigaction syslog realpath setrlimit
4212 do
4213 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4214 echo "$as_me:$LINENO: checking for $ac_func" >&5
4215 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4216 if eval "test \"\${$as_ac_var+set}\" = set"; then
4217   echo $ECHO_N "(cached) $ECHO_C" >&6
4218 else
4219   cat >conftest.$ac_ext <<_ACEOF
4220 #line $LINENO "configure"
4221 #include "confdefs.h"
4222 /* System header to define __stub macros and hopefully few prototypes,
4223     which can conflict with char $ac_func (); below.  */
4224 #include <assert.h>
4225 /* Override any gcc2 internal prototype to avoid an error.  */
4226 #ifdef __cplusplus
4227 extern "C"
4228 #endif
4229 /* We use char because int might match the return type of a gcc2
4230    builtin and then its argument prototype would still apply.  */
4231 char $ac_func ();
4232 char (*f) ();
4233
4234 #ifdef F77_DUMMY_MAIN
4235 #  ifdef __cplusplus
4236      extern "C"
4237 #  endif
4238    int F77_DUMMY_MAIN() { return 1; }
4239 #endif
4240 int
4241 main ()
4242 {
4243 /* The GNU C library defines this for functions which it implements
4244     to always fail with ENOSYS.  Some functions are actually named
4245     something starting with __ and the normal name is an alias.  */
4246 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4247 choke me
4248 #else
4249 f = $ac_func;
4250 #endif
4251
4252   ;
4253   return 0;
4254 }
4255 _ACEOF
4256 rm -f conftest.$ac_objext conftest$ac_exeext
4257 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4258   (eval $ac_link) 2>&5
4259   ac_status=$?
4260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4261   (exit $ac_status); } &&
4262          { ac_try='test -s conftest$ac_exeext'
4263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4264   (eval $ac_try) 2>&5
4265   ac_status=$?
4266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4267   (exit $ac_status); }; }; then
4268   eval "$as_ac_var=yes"
4269 else
4270   echo "$as_me: failed program was:" >&5
4271 cat conftest.$ac_ext >&5
4272 eval "$as_ac_var=no"
4273 fi
4274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4275 fi
4276 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4277 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4278 if test `eval echo '${'$as_ac_var'}'` = yes; then
4279   cat >>confdefs.h <<_ACEOF
4280 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4281 _ACEOF
4282
4283 fi
4284 done
4285
4286 echo "$as_me:$LINENO: checking for struct icmp" >&5
4287 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4288 if test "${ac_cv_have_icmp+set}" = set; then
4289   echo $ECHO_N "(cached) $ECHO_C" >&6
4290 else
4291   cat >conftest.$ac_ext <<_ACEOF
4292 #line $LINENO "configure"
4293 #include "confdefs.h"
4294 #include <stdlib.h>
4295                    #include <stdio.h>
4296                    #include <math.h>
4297                    #include <unistd.h>
4298                    #include <limits.h>
4299                    #include <signal.h>
4300                    #include <fcntl.h>
4301                    #include <sys/types.h>
4302                    #include <sys/time.h>
4303                    #include <sys/ipc.h>
4304                    #include <sys/shm.h>
4305                    #include <sys/socket.h>
4306                    #include <netinet/in_systm.h>
4307                    #include <netinet/in.h>
4308                    #include <netinet/ip.h>
4309                    #include <netinet/ip_icmp.h>
4310                    #include <netinet/udp.h>
4311                    #include <arpa/inet.h>
4312                    #include <netdb.h>
4313 #ifdef F77_DUMMY_MAIN
4314 #  ifdef __cplusplus
4315      extern "C"
4316 #  endif
4317    int F77_DUMMY_MAIN() { return 1; }
4318 #endif
4319 int
4320 main ()
4321 {
4322 struct icmp i;
4323                    struct sockaddr s;
4324                    struct sockaddr_in si;
4325                    struct ip ip;
4326                    i.icmp_type = ICMP_ECHO;
4327                    i.icmp_code = 0;
4328                    i.icmp_cksum = 0;
4329                    i.icmp_id = 0;
4330                    i.icmp_seq = 0;
4331                    si.sin_family = AF_INET;
4332                    #if defined(__DECC) || defined(_IP_VHL)
4333                    ip.ip_vhl = 0;
4334                    #else
4335                    ip.ip_hl = 0;
4336                    #endif
4337
4338   ;
4339   return 0;
4340 }
4341 _ACEOF
4342 rm -f conftest.$ac_objext
4343 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4344   (eval $ac_compile) 2>&5
4345   ac_status=$?
4346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4347   (exit $ac_status); } &&
4348          { ac_try='test -s conftest.$ac_objext'
4349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4350   (eval $ac_try) 2>&5
4351   ac_status=$?
4352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4353   (exit $ac_status); }; }; then
4354   ac_cv_have_icmp=yes
4355 else
4356   echo "$as_me: failed program was:" >&5
4357 cat conftest.$ac_ext >&5
4358 ac_cv_have_icmp=no
4359 fi
4360 rm -f conftest.$ac_objext conftest.$ac_ext
4361 fi
4362 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4363 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4364  if test "$ac_cv_have_icmp" = yes ; then
4365    cat >>confdefs.h <<\_ACEOF
4366 #define HAVE_ICMP 1
4367 _ACEOF
4368
4369  fi
4370 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4371 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4372 if test "${ac_cv_have_icmphdr+set}" = set; then
4373   echo $ECHO_N "(cached) $ECHO_C" >&6
4374 else
4375   cat >conftest.$ac_ext <<_ACEOF
4376 #line $LINENO "configure"
4377 #include "confdefs.h"
4378 #include <stdlib.h>
4379                    #include <stdio.h>
4380                    #include <math.h>
4381                    #include <unistd.h>
4382                    #include <limits.h>
4383                    #include <signal.h>
4384                    #include <fcntl.h>
4385                    #include <sys/types.h>
4386                    #include <sys/time.h>
4387                    #include <sys/ipc.h>
4388                    #include <sys/shm.h>
4389                    #include <sys/socket.h>
4390                    #include <netinet/in_systm.h>
4391                    #include <netinet/in.h>
4392                    #include <netinet/ip.h>
4393                    #include <netinet/ip_icmp.h>
4394                    #include <netinet/udp.h>
4395                    #include <arpa/inet.h>
4396                    #include <netdb.h>
4397 #ifdef F77_DUMMY_MAIN
4398 #  ifdef __cplusplus
4399      extern "C"
4400 #  endif
4401    int F77_DUMMY_MAIN() { return 1; }
4402 #endif
4403 int
4404 main ()
4405 {
4406 struct icmphdr i;
4407                    struct sockaddr s;
4408                    struct sockaddr_in si;
4409                    struct ip ip;
4410                    i.type = ICMP_ECHO;
4411                    i.code = 0;
4412                    i.checksum = 0;
4413                    i.un.echo.id = 0;
4414                    i.un.echo.sequence = 0;
4415                    si.sin_family = AF_INET;
4416                    ip.ip_hl = 0;
4417   ;
4418   return 0;
4419 }
4420 _ACEOF
4421 rm -f conftest.$ac_objext
4422 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4423   (eval $ac_compile) 2>&5
4424   ac_status=$?
4425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4426   (exit $ac_status); } &&
4427          { ac_try='test -s conftest.$ac_objext'
4428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4429   (eval $ac_try) 2>&5
4430   ac_status=$?
4431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4432   (exit $ac_status); }; }; then
4433   ac_cv_have_icmphdr=yes
4434 else
4435   echo "$as_me: failed program was:" >&5
4436 cat conftest.$ac_ext >&5
4437 ac_cv_have_icmphdr=no
4438 fi
4439 rm -f conftest.$ac_objext conftest.$ac_ext
4440 fi
4441 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
4442 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
4443  if test "$ac_cv_have_icmphdr" = yes ; then
4444    cat >>confdefs.h <<\_ACEOF
4445 #define HAVE_ICMPHDR 1
4446 _ACEOF
4447
4448  fi
4449
4450
4451 for ac_header in crypt.h sys/select.h
4452 do
4453 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4454 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4455   echo "$as_me:$LINENO: checking for $ac_header" >&5
4456 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4457 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4458   echo $ECHO_N "(cached) $ECHO_C" >&6
4459 fi
4460 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4461 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4462 else
4463   # Is the header compilable?
4464 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4465 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4466 cat >conftest.$ac_ext <<_ACEOF
4467 #line $LINENO "configure"
4468 #include "confdefs.h"
4469 $ac_includes_default
4470 #include <$ac_header>
4471 _ACEOF
4472 rm -f conftest.$ac_objext
4473 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4474   (eval $ac_compile) 2>&5
4475   ac_status=$?
4476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477   (exit $ac_status); } &&
4478          { ac_try='test -s conftest.$ac_objext'
4479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4480   (eval $ac_try) 2>&5
4481   ac_status=$?
4482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4483   (exit $ac_status); }; }; then
4484   ac_header_compiler=yes
4485 else
4486   echo "$as_me: failed program was:" >&5
4487 cat conftest.$ac_ext >&5
4488 ac_header_compiler=no
4489 fi
4490 rm -f conftest.$ac_objext conftest.$ac_ext
4491 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4492 echo "${ECHO_T}$ac_header_compiler" >&6
4493
4494 # Is the header present?
4495 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4496 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4497 cat >conftest.$ac_ext <<_ACEOF
4498 #line $LINENO "configure"
4499 #include "confdefs.h"
4500 #include <$ac_header>
4501 _ACEOF
4502 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4503   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4504   ac_status=$?
4505   egrep -v '^ *\+' conftest.er1 >conftest.err
4506   rm -f conftest.er1
4507   cat conftest.err >&5
4508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4509   (exit $ac_status); } >/dev/null; then
4510   if test -s conftest.err; then
4511     ac_cpp_err=$ac_c_preproc_warn_flag
4512   else
4513     ac_cpp_err=
4514   fi
4515 else
4516   ac_cpp_err=yes
4517 fi
4518 if test -z "$ac_cpp_err"; then
4519   ac_header_preproc=yes
4520 else
4521   echo "$as_me: failed program was:" >&5
4522   cat conftest.$ac_ext >&5
4523   ac_header_preproc=no
4524 fi
4525 rm -f conftest.err conftest.$ac_ext
4526 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4527 echo "${ECHO_T}$ac_header_preproc" >&6
4528
4529 # So?  What about this header?
4530 case $ac_header_compiler:$ac_header_preproc in
4531   yes:no )
4532     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4533 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4534     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4535 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4536   no:yes )
4537     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4538 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4539     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4540 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4541     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4542 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4543 esac
4544 echo "$as_me:$LINENO: checking for $ac_header" >&5
4545 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4546 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4547   echo $ECHO_N "(cached) $ECHO_C" >&6
4548 else
4549   eval "$as_ac_Header=$ac_header_preproc"
4550 fi
4551 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4552 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4553
4554 fi
4555 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4556   cat >>confdefs.h <<_ACEOF
4557 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4558 _ACEOF
4559
4560 fi
4561
4562 done
4563
4564 for ac_prog in perl5 perl
4565 do
4566   # Extract the first word of "$ac_prog", so it can be a program name with args.
4567 set dummy $ac_prog; ac_word=$2
4568 echo "$as_me:$LINENO: checking for $ac_word" >&5
4569 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4570 if test "${ac_cv_path_PERL+set}" = set; then
4571   echo $ECHO_N "(cached) $ECHO_C" >&6
4572 else
4573   case $PERL in
4574   [\\/]* | ?:[\\/]*)
4575   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4576   ;;
4577   *)
4578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4579 for as_dir in $PATH
4580 do
4581   IFS=$as_save_IFS
4582   test -z "$as_dir" && as_dir=.
4583   for ac_exec_ext in '' $ac_executable_extensions; do
4584   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4585     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4586     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4587     break 2
4588   fi
4589 done
4590 done
4591
4592   ;;
4593 esac
4594 fi
4595 PERL=$ac_cv_path_PERL
4596
4597 if test -n "$PERL"; then
4598   echo "$as_me:$LINENO: result: $PERL" >&5
4599 echo "${ECHO_T}$PERL" >&6
4600 else
4601   echo "$as_me:$LINENO: result: no" >&5
4602 echo "${ECHO_T}no" >&6
4603 fi
4604
4605   test -n "$PERL" && break
4606 done
4607
4608   if test -z "$PERL" ; then
4609     PERL_VERSION=0
4610   else
4611     echo "$as_me:$LINENO: checking perl version" >&5
4612 echo $ECHO_N "checking perl version... $ECHO_C" >&6
4613 if test "${ac_cv_perl_version+set}" = set; then
4614   echo $ECHO_N "(cached) $ECHO_C" >&6
4615 else
4616   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
4617 fi
4618 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
4619 echo "${ECHO_T}$ac_cv_perl_version" >&6
4620     PERL_VERSION=$ac_cv_perl_version
4621   fi
4622
4623
4624 if test -z "$PERL" ; then
4625   # don't let it be blank...
4626   PERL=/usr/bin/perl
4627 fi
4628
4629 echo "$as_me:$LINENO: checking for X" >&5
4630 echo $ECHO_N "checking for X... $ECHO_C" >&6
4631
4632
4633 # Check whether --with-x or --without-x was given.
4634 if test "${with_x+set}" = set; then
4635   withval="$with_x"
4636
4637 fi;
4638 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4639 if test "x$with_x" = xno; then
4640   # The user explicitly disabled X.
4641   have_x=disabled
4642 else
4643   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4644     # Both variables are already set.
4645     have_x=yes
4646   else
4647     if test "${ac_cv_have_x+set}" = set; then
4648   echo $ECHO_N "(cached) $ECHO_C" >&6
4649 else
4650   # One or both of the vars are not set, and there is no cached value.
4651 ac_x_includes=no ac_x_libraries=no
4652 rm -fr conftest.dir
4653 if mkdir conftest.dir; then
4654   cd conftest.dir
4655   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4656   cat >Imakefile <<'_ACEOF'
4657 acfindx:
4658         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4659 _ACEOF
4660   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4661     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4662     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4663     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4664     for ac_extension in a so sl; do
4665       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4666          test -f $ac_im_libdir/libX11.$ac_extension; then
4667         ac_im_usrlibdir=$ac_im_libdir; break
4668       fi
4669     done
4670     # Screen out bogus values from the imake configuration.  They are
4671     # bogus both because they are the default anyway, and because
4672     # using them would break gcc on systems where it needs fixed includes.
4673     case $ac_im_incroot in
4674         /usr/include) ;;
4675         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4676     esac
4677     case $ac_im_usrlibdir in
4678         /usr/lib | /lib) ;;
4679         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4680     esac
4681   fi
4682   cd ..
4683   rm -fr conftest.dir
4684 fi
4685
4686 # Standard set of common directories for X headers.
4687 # Check X11 before X11Rn because it is often a symlink to the current release.
4688 ac_x_header_dirs='
4689 /usr/X11/include
4690 /usr/X11R6/include
4691 /usr/X11R5/include
4692 /usr/X11R4/include
4693
4694 /usr/include/X11
4695 /usr/include/X11R6
4696 /usr/include/X11R5
4697 /usr/include/X11R4
4698
4699 /usr/local/X11/include
4700 /usr/local/X11R6/include
4701 /usr/local/X11R5/include
4702 /usr/local/X11R4/include
4703
4704 /usr/local/include/X11
4705 /usr/local/include/X11R6
4706 /usr/local/include/X11R5
4707 /usr/local/include/X11R4
4708
4709 /usr/X386/include
4710 /usr/x386/include
4711 /usr/XFree86/include/X11
4712
4713 /usr/include
4714 /usr/local/include
4715 /usr/unsupported/include
4716 /usr/athena/include
4717 /usr/local/x11r5/include
4718 /usr/lpp/Xamples/include
4719
4720 /usr/openwin/include
4721 /usr/openwin/share/include'
4722
4723 if test "$ac_x_includes" = no; then
4724   # Guess where to find include files, by looking for Intrinsic.h.
4725   # First, try using that file with no special directory specified.
4726   cat >conftest.$ac_ext <<_ACEOF
4727 #line $LINENO "configure"
4728 #include "confdefs.h"
4729 #include <X11/Intrinsic.h>
4730 _ACEOF
4731 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4733   ac_status=$?
4734   egrep -v '^ *\+' conftest.er1 >conftest.err
4735   rm -f conftest.er1
4736   cat conftest.err >&5
4737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4738   (exit $ac_status); } >/dev/null; then
4739   if test -s conftest.err; then
4740     ac_cpp_err=$ac_c_preproc_warn_flag
4741   else
4742     ac_cpp_err=
4743   fi
4744 else
4745   ac_cpp_err=yes
4746 fi
4747 if test -z "$ac_cpp_err"; then
4748   # We can compile using X headers with no special include directory.
4749 ac_x_includes=
4750 else
4751   echo "$as_me: failed program was:" >&5
4752   cat conftest.$ac_ext >&5
4753   for ac_dir in $ac_x_header_dirs; do
4754   if test -r "$ac_dir/X11/Intrinsic.h"; then
4755     ac_x_includes=$ac_dir
4756     break
4757   fi
4758 done
4759 fi
4760 rm -f conftest.err conftest.$ac_ext
4761 fi # $ac_x_includes = no
4762
4763 if test "$ac_x_libraries" = no; then
4764   # Check for the libraries.
4765   # See if we find them without any special options.
4766   # Don't add to $LIBS permanently.
4767   ac_save_LIBS=$LIBS
4768   LIBS="-lXt $LIBS"
4769   cat >conftest.$ac_ext <<_ACEOF
4770 #line $LINENO "configure"
4771 #include "confdefs.h"
4772 #include <X11/Intrinsic.h>
4773 #ifdef F77_DUMMY_MAIN
4774 #  ifdef __cplusplus
4775      extern "C"
4776 #  endif
4777    int F77_DUMMY_MAIN() { return 1; }
4778 #endif
4779 int
4780 main ()
4781 {
4782 XtMalloc (0)
4783   ;
4784   return 0;
4785 }
4786 _ACEOF
4787 rm -f conftest.$ac_objext conftest$ac_exeext
4788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4789   (eval $ac_link) 2>&5
4790   ac_status=$?
4791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4792   (exit $ac_status); } &&
4793          { ac_try='test -s conftest$ac_exeext'
4794   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4795   (eval $ac_try) 2>&5
4796   ac_status=$?
4797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4798   (exit $ac_status); }; }; then
4799   LIBS=$ac_save_LIBS
4800 # We can link X programs with no special library path.
4801 ac_x_libraries=
4802 else
4803   echo "$as_me: failed program was:" >&5
4804 cat conftest.$ac_ext >&5
4805 LIBS=$ac_save_LIBS
4806 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4807 do
4808   # Don't even attempt the hair of trying to link an X program!
4809   for ac_extension in a so sl; do
4810     if test -r $ac_dir/libXt.$ac_extension; then
4811       ac_x_libraries=$ac_dir
4812       break 2
4813     fi
4814   done
4815 done
4816 fi
4817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4818 fi # $ac_x_libraries = no
4819
4820 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4821   # Didn't find X anywhere.  Cache the known absence of X.
4822   ac_cv_have_x="have_x=no"
4823 else
4824   # Record where we found X for the cache.
4825   ac_cv_have_x="have_x=yes \
4826                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4827 fi
4828 fi
4829
4830   fi
4831   eval "$ac_cv_have_x"
4832 fi # $with_x != no
4833
4834 if test "$have_x" != yes; then
4835   echo "$as_me:$LINENO: result: $have_x" >&5
4836 echo "${ECHO_T}$have_x" >&6
4837   no_x=yes
4838 else
4839   # If each of the values was on the command line, it overrides each guess.
4840   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4841   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4842   # Update the cache value to reflect the command line values.
4843   ac_cv_have_x="have_x=yes \
4844                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4845   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
4846 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
4847 fi
4848
4849 if test "$no_x" = yes; then
4850   # Not all programs may use this symbol, but it does not hurt to define it.
4851
4852 cat >>confdefs.h <<\_ACEOF
4853 #define X_DISPLAY_MISSING 1
4854 _ACEOF
4855
4856   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4857 else
4858   if test -n "$x_includes"; then
4859     X_CFLAGS="$X_CFLAGS -I$x_includes"
4860   fi
4861
4862   # It would also be nice to do this for all -L options, not just this one.
4863   if test -n "$x_libraries"; then
4864     X_LIBS="$X_LIBS -L$x_libraries"
4865     # For Solaris; some versions of Sun CC require a space after -R and
4866     # others require no space.  Words are not sufficient . . . .
4867     case `(uname -sr) 2>/dev/null` in
4868     "SunOS 5"*)
4869       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
4870 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
4871       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
4872       cat >conftest.$ac_ext <<_ACEOF
4873 #line $LINENO "configure"
4874 #include "confdefs.h"
4875
4876 #ifdef F77_DUMMY_MAIN
4877 #  ifdef __cplusplus
4878      extern "C"
4879 #  endif
4880    int F77_DUMMY_MAIN() { return 1; }
4881 #endif
4882 int
4883 main ()
4884 {
4885
4886   ;
4887   return 0;
4888 }
4889 _ACEOF
4890 rm -f conftest.$ac_objext conftest$ac_exeext
4891 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4892   (eval $ac_link) 2>&5
4893   ac_status=$?
4894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4895   (exit $ac_status); } &&
4896          { ac_try='test -s conftest$ac_exeext'
4897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4898   (eval $ac_try) 2>&5
4899   ac_status=$?
4900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4901   (exit $ac_status); }; }; then
4902   ac_R_nospace=yes
4903 else
4904   echo "$as_me: failed program was:" >&5
4905 cat conftest.$ac_ext >&5
4906 ac_R_nospace=no
4907 fi
4908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4909       if test $ac_R_nospace = yes; then
4910         echo "$as_me:$LINENO: result: no" >&5
4911 echo "${ECHO_T}no" >&6
4912         X_LIBS="$X_LIBS -R$x_libraries"
4913       else
4914         LIBS="$ac_xsave_LIBS -R $x_libraries"
4915         cat >conftest.$ac_ext <<_ACEOF
4916 #line $LINENO "configure"
4917 #include "confdefs.h"
4918
4919 #ifdef F77_DUMMY_MAIN
4920 #  ifdef __cplusplus
4921      extern "C"
4922 #  endif
4923    int F77_DUMMY_MAIN() { return 1; }
4924 #endif
4925 int
4926 main ()
4927 {
4928
4929   ;
4930   return 0;
4931 }
4932 _ACEOF
4933 rm -f conftest.$ac_objext conftest$ac_exeext
4934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4935   (eval $ac_link) 2>&5
4936   ac_status=$?
4937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938   (exit $ac_status); } &&
4939          { ac_try='test -s conftest$ac_exeext'
4940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4941   (eval $ac_try) 2>&5
4942   ac_status=$?
4943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4944   (exit $ac_status); }; }; then
4945   ac_R_space=yes
4946 else
4947   echo "$as_me: failed program was:" >&5
4948 cat conftest.$ac_ext >&5
4949 ac_R_space=no
4950 fi
4951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4952         if test $ac_R_space = yes; then
4953           echo "$as_me:$LINENO: result: yes" >&5
4954 echo "${ECHO_T}yes" >&6
4955           X_LIBS="$X_LIBS -R $x_libraries"
4956         else
4957           echo "$as_me:$LINENO: result: neither works" >&5
4958 echo "${ECHO_T}neither works" >&6
4959         fi
4960       fi
4961       LIBS=$ac_xsave_LIBS
4962     esac
4963   fi
4964
4965   # Check for system-dependent libraries X programs must link with.
4966   # Do this before checking for the system-independent R6 libraries
4967   # (-lICE), since we may need -lsocket or whatever for X linking.
4968
4969   if test "$ISC" = yes; then
4970     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4971   else
4972     # Martyn Johnson says this is needed for Ultrix, if the X
4973     # libraries were built with DECnet support.  And Karl Berry says
4974     # the Alpha needs dnet_stub (dnet does not exist).
4975     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
4976     cat >conftest.$ac_ext <<_ACEOF
4977 #line $LINENO "configure"
4978 #include "confdefs.h"
4979
4980 /* Override any gcc2 internal prototype to avoid an error.  */
4981 #ifdef __cplusplus
4982 extern "C"
4983 #endif
4984 /* We use char because int might match the return type of a gcc2
4985    builtin and then its argument prototype would still apply.  */
4986 char XOpenDisplay ();
4987 #ifdef F77_DUMMY_MAIN
4988 #  ifdef __cplusplus
4989      extern "C"
4990 #  endif
4991    int F77_DUMMY_MAIN() { return 1; }
4992 #endif
4993 int
4994 main ()
4995 {
4996 XOpenDisplay ();
4997   ;
4998   return 0;
4999 }
5000 _ACEOF
5001 rm -f conftest.$ac_objext conftest$ac_exeext
5002 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5003   (eval $ac_link) 2>&5
5004   ac_status=$?
5005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006   (exit $ac_status); } &&
5007          { ac_try='test -s conftest$ac_exeext'
5008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5009   (eval $ac_try) 2>&5
5010   ac_status=$?
5011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5012   (exit $ac_status); }; }; then
5013   :
5014 else
5015   echo "$as_me: failed program was:" >&5
5016 cat conftest.$ac_ext >&5
5017 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5018 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5019 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5020   echo $ECHO_N "(cached) $ECHO_C" >&6
5021 else
5022   ac_check_lib_save_LIBS=$LIBS
5023 LIBS="-ldnet  $LIBS"
5024 cat >conftest.$ac_ext <<_ACEOF
5025 #line $LINENO "configure"
5026 #include "confdefs.h"
5027
5028 /* Override any gcc2 internal prototype to avoid an error.  */
5029 #ifdef __cplusplus
5030 extern "C"
5031 #endif
5032 /* We use char because int might match the return type of a gcc2
5033    builtin and then its argument prototype would still apply.  */
5034 char dnet_ntoa ();
5035 #ifdef F77_DUMMY_MAIN
5036 #  ifdef __cplusplus
5037      extern "C"
5038 #  endif
5039    int F77_DUMMY_MAIN() { return 1; }
5040 #endif
5041 int
5042 main ()
5043 {
5044 dnet_ntoa ();
5045   ;
5046   return 0;
5047 }
5048 _ACEOF
5049 rm -f conftest.$ac_objext conftest$ac_exeext
5050 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5051   (eval $ac_link) 2>&5
5052   ac_status=$?
5053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5054   (exit $ac_status); } &&
5055          { ac_try='test -s conftest$ac_exeext'
5056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5057   (eval $ac_try) 2>&5
5058   ac_status=$?
5059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5060   (exit $ac_status); }; }; then
5061   ac_cv_lib_dnet_dnet_ntoa=yes
5062 else
5063   echo "$as_me: failed program was:" >&5
5064 cat conftest.$ac_ext >&5
5065 ac_cv_lib_dnet_dnet_ntoa=no
5066 fi
5067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5068 LIBS=$ac_check_lib_save_LIBS
5069 fi
5070 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5071 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5072 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5073   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5074 fi
5075
5076     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5077       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5078 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5079 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5080   echo $ECHO_N "(cached) $ECHO_C" >&6
5081 else
5082   ac_check_lib_save_LIBS=$LIBS
5083 LIBS="-ldnet_stub  $LIBS"
5084 cat >conftest.$ac_ext <<_ACEOF
5085 #line $LINENO "configure"
5086 #include "confdefs.h"
5087
5088 /* Override any gcc2 internal prototype to avoid an error.  */
5089 #ifdef __cplusplus
5090 extern "C"
5091 #endif
5092 /* We use char because int might match the return type of a gcc2
5093    builtin and then its argument prototype would still apply.  */
5094 char dnet_ntoa ();
5095 #ifdef F77_DUMMY_MAIN
5096 #  ifdef __cplusplus
5097      extern "C"
5098 #  endif
5099    int F77_DUMMY_MAIN() { return 1; }
5100 #endif
5101 int
5102 main ()
5103 {
5104 dnet_ntoa ();
5105   ;
5106   return 0;
5107 }
5108 _ACEOF
5109 rm -f conftest.$ac_objext conftest$ac_exeext
5110 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5111   (eval $ac_link) 2>&5
5112   ac_status=$?
5113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5114   (exit $ac_status); } &&
5115          { ac_try='test -s conftest$ac_exeext'
5116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5117   (eval $ac_try) 2>&5
5118   ac_status=$?
5119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5120   (exit $ac_status); }; }; then
5121   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5122 else
5123   echo "$as_me: failed program was:" >&5
5124 cat conftest.$ac_ext >&5
5125 ac_cv_lib_dnet_stub_dnet_ntoa=no
5126 fi
5127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5128 LIBS=$ac_check_lib_save_LIBS
5129 fi
5130 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5131 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5132 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5133   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5134 fi
5135
5136     fi
5137 fi
5138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5139     LIBS="$ac_xsave_LIBS"
5140
5141     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5142     # to get the SysV transport functions.
5143     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5144     # needs -lnsl.
5145     # The nsl library prevents programs from opening the X display
5146     # on Irix 5.2, according to T.E. Dickey.
5147     # The functions gethostbyname, getservbyname, and inet_addr are
5148     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5149     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5150 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5151 if test "${ac_cv_func_gethostbyname+set}" = set; then
5152   echo $ECHO_N "(cached) $ECHO_C" >&6
5153 else
5154   cat >conftest.$ac_ext <<_ACEOF
5155 #line $LINENO "configure"
5156 #include "confdefs.h"
5157 /* System header to define __stub macros and hopefully few prototypes,
5158     which can conflict with char gethostbyname (); below.  */
5159 #include <assert.h>
5160 /* Override any gcc2 internal prototype to avoid an error.  */
5161 #ifdef __cplusplus
5162 extern "C"
5163 #endif
5164 /* We use char because int might match the return type of a gcc2
5165    builtin and then its argument prototype would still apply.  */
5166 char gethostbyname ();
5167 char (*f) ();
5168
5169 #ifdef F77_DUMMY_MAIN
5170 #  ifdef __cplusplus
5171      extern "C"
5172 #  endif
5173    int F77_DUMMY_MAIN() { return 1; }
5174 #endif
5175 int
5176 main ()
5177 {
5178 /* The GNU C library defines this for functions which it implements
5179     to always fail with ENOSYS.  Some functions are actually named
5180     something starting with __ and the normal name is an alias.  */
5181 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5182 choke me
5183 #else
5184 f = gethostbyname;
5185 #endif
5186
5187   ;
5188   return 0;
5189 }
5190 _ACEOF
5191 rm -f conftest.$ac_objext conftest$ac_exeext
5192 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5193   (eval $ac_link) 2>&5
5194   ac_status=$?
5195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5196   (exit $ac_status); } &&
5197          { ac_try='test -s conftest$ac_exeext'
5198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5199   (eval $ac_try) 2>&5
5200   ac_status=$?
5201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5202   (exit $ac_status); }; }; then
5203   ac_cv_func_gethostbyname=yes
5204 else
5205   echo "$as_me: failed program was:" >&5
5206 cat conftest.$ac_ext >&5
5207 ac_cv_func_gethostbyname=no
5208 fi
5209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5210 fi
5211 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5212 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5213
5214     if test $ac_cv_func_gethostbyname = no; then
5215       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5216 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5217 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5218   echo $ECHO_N "(cached) $ECHO_C" >&6
5219 else
5220   ac_check_lib_save_LIBS=$LIBS
5221 LIBS="-lnsl  $LIBS"
5222 cat >conftest.$ac_ext <<_ACEOF
5223 #line $LINENO "configure"
5224 #include "confdefs.h"
5225
5226 /* Override any gcc2 internal prototype to avoid an error.  */
5227 #ifdef __cplusplus
5228 extern "C"
5229 #endif
5230 /* We use char because int might match the return type of a gcc2
5231    builtin and then its argument prototype would still apply.  */
5232 char gethostbyname ();
5233 #ifdef F77_DUMMY_MAIN
5234 #  ifdef __cplusplus
5235      extern "C"
5236 #  endif
5237    int F77_DUMMY_MAIN() { return 1; }
5238 #endif
5239 int
5240 main ()
5241 {
5242 gethostbyname ();
5243   ;
5244   return 0;
5245 }
5246 _ACEOF
5247 rm -f conftest.$ac_objext conftest$ac_exeext
5248 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5249   (eval $ac_link) 2>&5
5250   ac_status=$?
5251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5252   (exit $ac_status); } &&
5253          { ac_try='test -s conftest$ac_exeext'
5254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5255   (eval $ac_try) 2>&5
5256   ac_status=$?
5257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5258   (exit $ac_status); }; }; then
5259   ac_cv_lib_nsl_gethostbyname=yes
5260 else
5261   echo "$as_me: failed program was:" >&5
5262 cat conftest.$ac_ext >&5
5263 ac_cv_lib_nsl_gethostbyname=no
5264 fi
5265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5266 LIBS=$ac_check_lib_save_LIBS
5267 fi
5268 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5269 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5270 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5271   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5272 fi
5273
5274       if test $ac_cv_lib_nsl_gethostbyname = no; then
5275         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5276 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5277 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5278   echo $ECHO_N "(cached) $ECHO_C" >&6
5279 else
5280   ac_check_lib_save_LIBS=$LIBS
5281 LIBS="-lbsd  $LIBS"
5282 cat >conftest.$ac_ext <<_ACEOF
5283 #line $LINENO "configure"
5284 #include "confdefs.h"
5285
5286 /* Override any gcc2 internal prototype to avoid an error.  */
5287 #ifdef __cplusplus
5288 extern "C"
5289 #endif
5290 /* We use char because int might match the return type of a gcc2
5291    builtin and then its argument prototype would still apply.  */
5292 char gethostbyname ();
5293 #ifdef F77_DUMMY_MAIN
5294 #  ifdef __cplusplus
5295      extern "C"
5296 #  endif
5297    int F77_DUMMY_MAIN() { return 1; }
5298 #endif
5299 int
5300 main ()
5301 {
5302 gethostbyname ();
5303   ;
5304   return 0;
5305 }
5306 _ACEOF
5307 rm -f conftest.$ac_objext conftest$ac_exeext
5308 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5309   (eval $ac_link) 2>&5
5310   ac_status=$?
5311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312   (exit $ac_status); } &&
5313          { ac_try='test -s conftest$ac_exeext'
5314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5315   (eval $ac_try) 2>&5
5316   ac_status=$?
5317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5318   (exit $ac_status); }; }; then
5319   ac_cv_lib_bsd_gethostbyname=yes
5320 else
5321   echo "$as_me: failed program was:" >&5
5322 cat conftest.$ac_ext >&5
5323 ac_cv_lib_bsd_gethostbyname=no
5324 fi
5325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5326 LIBS=$ac_check_lib_save_LIBS
5327 fi
5328 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5329 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5330 if test $ac_cv_lib_bsd_gethostbyname = yes; then
5331   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5332 fi
5333
5334       fi
5335     fi
5336
5337     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5338     # socket/setsockopt and other routines are undefined under SCO ODT
5339     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5340     # on later versions), says Simon Leinen: it contains gethostby*
5341     # variants that don't use the nameserver (or something).  -lsocket
5342     # must be given before -lnsl if both are needed.  We assume that
5343     # if connect needs -lnsl, so does gethostbyname.
5344     echo "$as_me:$LINENO: checking for connect" >&5
5345 echo $ECHO_N "checking for connect... $ECHO_C" >&6
5346 if test "${ac_cv_func_connect+set}" = set; then
5347   echo $ECHO_N "(cached) $ECHO_C" >&6
5348 else
5349   cat >conftest.$ac_ext <<_ACEOF
5350 #line $LINENO "configure"
5351 #include "confdefs.h"
5352 /* System header to define __stub macros and hopefully few prototypes,
5353     which can conflict with char connect (); below.  */
5354 #include <assert.h>
5355 /* Override any gcc2 internal prototype to avoid an error.  */
5356 #ifdef __cplusplus
5357 extern "C"
5358 #endif
5359 /* We use char because int might match the return type of a gcc2
5360    builtin and then its argument prototype would still apply.  */
5361 char connect ();
5362 char (*f) ();
5363
5364 #ifdef F77_DUMMY_MAIN
5365 #  ifdef __cplusplus
5366      extern "C"
5367 #  endif
5368    int F77_DUMMY_MAIN() { return 1; }
5369 #endif
5370 int
5371 main ()
5372 {
5373 /* The GNU C library defines this for functions which it implements
5374     to always fail with ENOSYS.  Some functions are actually named
5375     something starting with __ and the normal name is an alias.  */
5376 #if defined (__stub_connect) || defined (__stub___connect)
5377 choke me
5378 #else
5379 f = connect;
5380 #endif
5381
5382   ;
5383   return 0;
5384 }
5385 _ACEOF
5386 rm -f conftest.$ac_objext conftest$ac_exeext
5387 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5388   (eval $ac_link) 2>&5
5389   ac_status=$?
5390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5391   (exit $ac_status); } &&
5392          { ac_try='test -s conftest$ac_exeext'
5393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5394   (eval $ac_try) 2>&5
5395   ac_status=$?
5396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5397   (exit $ac_status); }; }; then
5398   ac_cv_func_connect=yes
5399 else
5400   echo "$as_me: failed program was:" >&5
5401 cat conftest.$ac_ext >&5
5402 ac_cv_func_connect=no
5403 fi
5404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5405 fi
5406 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5407 echo "${ECHO_T}$ac_cv_func_connect" >&6
5408
5409     if test $ac_cv_func_connect = no; then
5410       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5411 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5412 if test "${ac_cv_lib_socket_connect+set}" = set; then
5413   echo $ECHO_N "(cached) $ECHO_C" >&6
5414 else
5415   ac_check_lib_save_LIBS=$LIBS
5416 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5417 cat >conftest.$ac_ext <<_ACEOF
5418 #line $LINENO "configure"
5419 #include "confdefs.h"
5420
5421 /* Override any gcc2 internal prototype to avoid an error.  */
5422 #ifdef __cplusplus
5423 extern "C"
5424 #endif
5425 /* We use char because int might match the return type of a gcc2
5426    builtin and then its argument prototype would still apply.  */
5427 char connect ();
5428 #ifdef F77_DUMMY_MAIN
5429 #  ifdef __cplusplus
5430      extern "C"
5431 #  endif
5432    int F77_DUMMY_MAIN() { return 1; }
5433 #endif
5434 int
5435 main ()
5436 {
5437 connect ();
5438   ;
5439   return 0;
5440 }
5441 _ACEOF
5442 rm -f conftest.$ac_objext conftest$ac_exeext
5443 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5444   (eval $ac_link) 2>&5
5445   ac_status=$?
5446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5447   (exit $ac_status); } &&
5448          { ac_try='test -s conftest$ac_exeext'
5449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5450   (eval $ac_try) 2>&5
5451   ac_status=$?
5452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5453   (exit $ac_status); }; }; then
5454   ac_cv_lib_socket_connect=yes
5455 else
5456   echo "$as_me: failed program was:" >&5
5457 cat conftest.$ac_ext >&5
5458 ac_cv_lib_socket_connect=no
5459 fi
5460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5461 LIBS=$ac_check_lib_save_LIBS
5462 fi
5463 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5464 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5465 if test $ac_cv_lib_socket_connect = yes; then
5466   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5467 fi
5468
5469     fi
5470
5471     # Guillermo Gomez says -lposix is necessary on A/UX.
5472     echo "$as_me:$LINENO: checking for remove" >&5
5473 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5474 if test "${ac_cv_func_remove+set}" = set; then
5475   echo $ECHO_N "(cached) $ECHO_C" >&6
5476 else
5477   cat >conftest.$ac_ext <<_ACEOF
5478 #line $LINENO "configure"
5479 #include "confdefs.h"
5480 /* System header to define __stub macros and hopefully few prototypes,
5481     which can conflict with char remove (); below.  */
5482 #include <assert.h>
5483 /* Override any gcc2 internal prototype to avoid an error.  */
5484 #ifdef __cplusplus
5485 extern "C"
5486 #endif
5487 /* We use char because int might match the return type of a gcc2
5488    builtin and then its argument prototype would still apply.  */
5489 char remove ();
5490 char (*f) ();
5491
5492 #ifdef F77_DUMMY_MAIN
5493 #  ifdef __cplusplus
5494      extern "C"
5495 #  endif
5496    int F77_DUMMY_MAIN() { return 1; }
5497 #endif
5498 int
5499 main ()
5500 {
5501 /* The GNU C library defines this for functions which it implements
5502     to always fail with ENOSYS.  Some functions are actually named
5503     something starting with __ and the normal name is an alias.  */
5504 #if defined (__stub_remove) || defined (__stub___remove)
5505 choke me
5506 #else
5507 f = remove;
5508 #endif
5509
5510   ;
5511   return 0;
5512 }
5513 _ACEOF
5514 rm -f conftest.$ac_objext conftest$ac_exeext
5515 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5516   (eval $ac_link) 2>&5
5517   ac_status=$?
5518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5519   (exit $ac_status); } &&
5520          { ac_try='test -s conftest$ac_exeext'
5521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5522   (eval $ac_try) 2>&5
5523   ac_status=$?
5524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525   (exit $ac_status); }; }; then
5526   ac_cv_func_remove=yes
5527 else
5528   echo "$as_me: failed program was:" >&5
5529 cat conftest.$ac_ext >&5
5530 ac_cv_func_remove=no
5531 fi
5532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5533 fi
5534 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5535 echo "${ECHO_T}$ac_cv_func_remove" >&6
5536
5537     if test $ac_cv_func_remove = no; then
5538       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5539 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5540 if test "${ac_cv_lib_posix_remove+set}" = set; then
5541   echo $ECHO_N "(cached) $ECHO_C" >&6
5542 else
5543   ac_check_lib_save_LIBS=$LIBS
5544 LIBS="-lposix  $LIBS"
5545 cat >conftest.$ac_ext <<_ACEOF
5546 #line $LINENO "configure"
5547 #include "confdefs.h"
5548
5549 /* Override any gcc2 internal prototype to avoid an error.  */
5550 #ifdef __cplusplus
5551 extern "C"
5552 #endif
5553 /* We use char because int might match the return type of a gcc2
5554    builtin and then its argument prototype would still apply.  */
5555 char remove ();
5556 #ifdef F77_DUMMY_MAIN
5557 #  ifdef __cplusplus
5558      extern "C"
5559 #  endif
5560    int F77_DUMMY_MAIN() { return 1; }
5561 #endif
5562 int
5563 main ()
5564 {
5565 remove ();
5566   ;
5567   return 0;
5568 }
5569 _ACEOF
5570 rm -f conftest.$ac_objext conftest$ac_exeext
5571 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5572   (eval $ac_link) 2>&5
5573   ac_status=$?
5574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575   (exit $ac_status); } &&
5576          { ac_try='test -s conftest$ac_exeext'
5577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578   (eval $ac_try) 2>&5
5579   ac_status=$?
5580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581   (exit $ac_status); }; }; then
5582   ac_cv_lib_posix_remove=yes
5583 else
5584   echo "$as_me: failed program was:" >&5
5585 cat conftest.$ac_ext >&5
5586 ac_cv_lib_posix_remove=no
5587 fi
5588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5589 LIBS=$ac_check_lib_save_LIBS
5590 fi
5591 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5592 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5593 if test $ac_cv_lib_posix_remove = yes; then
5594   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5595 fi
5596
5597     fi
5598
5599     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5600     echo "$as_me:$LINENO: checking for shmat" >&5
5601 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5602 if test "${ac_cv_func_shmat+set}" = set; then
5603   echo $ECHO_N "(cached) $ECHO_C" >&6
5604 else
5605   cat >conftest.$ac_ext <<_ACEOF
5606 #line $LINENO "configure"
5607 #include "confdefs.h"
5608 /* System header to define __stub macros and hopefully few prototypes,
5609     which can conflict with char shmat (); below.  */
5610 #include <assert.h>
5611 /* Override any gcc2 internal prototype to avoid an error.  */
5612 #ifdef __cplusplus
5613 extern "C"
5614 #endif
5615 /* We use char because int might match the return type of a gcc2
5616    builtin and then its argument prototype would still apply.  */
5617 char shmat ();
5618 char (*f) ();
5619
5620 #ifdef F77_DUMMY_MAIN
5621 #  ifdef __cplusplus
5622      extern "C"
5623 #  endif
5624    int F77_DUMMY_MAIN() { return 1; }
5625 #endif
5626 int
5627 main ()
5628 {
5629 /* The GNU C library defines this for functions which it implements
5630     to always fail with ENOSYS.  Some functions are actually named
5631     something starting with __ and the normal name is an alias.  */
5632 #if defined (__stub_shmat) || defined (__stub___shmat)
5633 choke me
5634 #else
5635 f = shmat;
5636 #endif
5637
5638   ;
5639   return 0;
5640 }
5641 _ACEOF
5642 rm -f conftest.$ac_objext conftest$ac_exeext
5643 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5644   (eval $ac_link) 2>&5
5645   ac_status=$?
5646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647   (exit $ac_status); } &&
5648          { ac_try='test -s conftest$ac_exeext'
5649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5650   (eval $ac_try) 2>&5
5651   ac_status=$?
5652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5653   (exit $ac_status); }; }; then
5654   ac_cv_func_shmat=yes
5655 else
5656   echo "$as_me: failed program was:" >&5
5657 cat conftest.$ac_ext >&5
5658 ac_cv_func_shmat=no
5659 fi
5660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5661 fi
5662 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
5663 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5664
5665     if test $ac_cv_func_shmat = no; then
5666       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
5667 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5668 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5669   echo $ECHO_N "(cached) $ECHO_C" >&6
5670 else
5671   ac_check_lib_save_LIBS=$LIBS
5672 LIBS="-lipc  $LIBS"
5673 cat >conftest.$ac_ext <<_ACEOF
5674 #line $LINENO "configure"
5675 #include "confdefs.h"
5676
5677 /* Override any gcc2 internal prototype to avoid an error.  */
5678 #ifdef __cplusplus
5679 extern "C"
5680 #endif
5681 /* We use char because int might match the return type of a gcc2
5682    builtin and then its argument prototype would still apply.  */
5683 char shmat ();
5684 #ifdef F77_DUMMY_MAIN
5685 #  ifdef __cplusplus
5686      extern "C"
5687 #  endif
5688    int F77_DUMMY_MAIN() { return 1; }
5689 #endif
5690 int
5691 main ()
5692 {
5693 shmat ();
5694   ;
5695   return 0;
5696 }
5697 _ACEOF
5698 rm -f conftest.$ac_objext conftest$ac_exeext
5699 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5700   (eval $ac_link) 2>&5
5701   ac_status=$?
5702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5703   (exit $ac_status); } &&
5704          { ac_try='test -s conftest$ac_exeext'
5705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5706   (eval $ac_try) 2>&5
5707   ac_status=$?
5708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5709   (exit $ac_status); }; }; then
5710   ac_cv_lib_ipc_shmat=yes
5711 else
5712   echo "$as_me: failed program was:" >&5
5713 cat conftest.$ac_ext >&5
5714 ac_cv_lib_ipc_shmat=no
5715 fi
5716 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5717 LIBS=$ac_check_lib_save_LIBS
5718 fi
5719 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
5720 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
5721 if test $ac_cv_lib_ipc_shmat = yes; then
5722   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5723 fi
5724
5725     fi
5726   fi
5727
5728   # Check for libraries that X11R6 Xt/Xaw programs need.
5729   ac_save_LDFLAGS=$LDFLAGS
5730   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5731   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5732   # check for ICE first), but we must link in the order -lSM -lICE or
5733   # we get undefined symbols.  So assume we have SM if we have ICE.
5734   # These have to be linked with before -lX11, unlike the other
5735   # libraries we check for below, so use a different variable.
5736   # John Interrante, Karl Berry
5737   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
5738 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
5739 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
5740   echo $ECHO_N "(cached) $ECHO_C" >&6
5741 else
5742   ac_check_lib_save_LIBS=$LIBS
5743 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5744 cat >conftest.$ac_ext <<_ACEOF
5745 #line $LINENO "configure"
5746 #include "confdefs.h"
5747
5748 /* Override any gcc2 internal prototype to avoid an error.  */
5749 #ifdef __cplusplus
5750 extern "C"
5751 #endif
5752 /* We use char because int might match the return type of a gcc2
5753    builtin and then its argument prototype would still apply.  */
5754 char IceConnectionNumber ();
5755 #ifdef F77_DUMMY_MAIN
5756 #  ifdef __cplusplus
5757      extern "C"
5758 #  endif
5759    int F77_DUMMY_MAIN() { return 1; }
5760 #endif
5761 int
5762 main ()
5763 {
5764 IceConnectionNumber ();
5765   ;
5766   return 0;
5767 }
5768 _ACEOF
5769 rm -f conftest.$ac_objext conftest$ac_exeext
5770 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5771   (eval $ac_link) 2>&5
5772   ac_status=$?
5773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5774   (exit $ac_status); } &&
5775          { ac_try='test -s conftest$ac_exeext'
5776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5777   (eval $ac_try) 2>&5
5778   ac_status=$?
5779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5780   (exit $ac_status); }; }; then
5781   ac_cv_lib_ICE_IceConnectionNumber=yes
5782 else
5783   echo "$as_me: failed program was:" >&5
5784 cat conftest.$ac_ext >&5
5785 ac_cv_lib_ICE_IceConnectionNumber=no
5786 fi
5787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5788 LIBS=$ac_check_lib_save_LIBS
5789 fi
5790 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
5791 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
5792 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
5793   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5794 fi
5795
5796   LDFLAGS=$ac_save_LDFLAGS
5797
5798 fi
5799
5800
5801 if test "$have_x" != yes; then
5802   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
5803 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
5804    { (exit 1); exit 1; }; }
5805 fi
5806
5807
5808     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
5809 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
5810 if test "${ac_cv_x_app_defaults+set}" = set; then
5811   echo $ECHO_N "(cached) $ECHO_C" >&6
5812 else
5813
5814   rm -fr conftestdir
5815   if mkdir conftestdir; then
5816     cd conftestdir 2>/dev/null
5817     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5818     cat > Imakefile <<'EOF'
5819 acfindx:
5820         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
5821 EOF
5822     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
5823       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
5824       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5825     fi
5826     cd .. 2>/dev/null
5827     rm -fr conftestdir
5828   fi
5829       if test x"$ac_x_app_defaults" = x; then
5830
5831   # Look for the directory under a standard set of common directories.
5832   # Check X11 before X11Rn because it's often a symlink to the current release.
5833   for ac_dir in                                 \
5834     /usr/X11/lib/app-defaults                   \
5835     /usr/X11R6/lib/app-defaults                 \
5836     /usr/X11R6/lib/X11/app-defaults             \
5837     /usr/X11R5/lib/app-defaults                 \
5838     /usr/X11R5/lib/X11/app-defaults             \
5839     /usr/X11R4/lib/app-defaults                 \
5840     /usr/X11R4/lib/X11/app-defaults             \
5841                                                 \
5842     /usr/lib/X11/app-defaults                   \
5843     /usr/lib/X11R6/app-defaults                 \
5844     /usr/lib/X11R5/app-defaults                 \
5845     /usr/lib/X11R4/app-defaults                 \
5846                                                 \
5847     /usr/local/X11/lib/app-defaults             \
5848     /usr/local/X11R6/lib/app-defaults           \
5849     /usr/local/X11R5/lib/app-defaults           \
5850     /usr/local/X11R4/lib/app-defaults           \
5851                                                 \
5852     /usr/local/lib/X11/app-defaults             \
5853     /usr/local/lib/X11R6/app-defaults           \
5854     /usr/local/lib/X11R6/X11/app-defaults       \
5855     /usr/local/lib/X11R5/app-defaults           \
5856     /usr/local/lib/X11R5/X11/app-defaults       \
5857     /usr/local/lib/X11R4/app-defaults           \
5858     /usr/local/lib/X11R4/X11/app-defaults       \
5859                                                 \
5860     /usr/X386/lib/X11/app-defaults              \
5861     /usr/x386/lib/X11/app-defaults              \
5862     /usr/XFree86/lib/X11/app-defaults           \
5863                                                 \
5864     /usr/lib/X11/app-defaults                   \
5865     /usr/local/lib/X11/app-defaults             \
5866     /usr/unsupported/lib/X11/app-defaults       \
5867     /usr/athena/lib/X11/app-defaults            \
5868     /usr/local/x11r5/lib/X11/app-defaults       \
5869     /usr/lpp/Xamples/lib/X11/app-defaults       \
5870     /lib/usr/lib/X11/app-defaults               \
5871                                                 \
5872     /usr/openwin/lib/app-defaults               \
5873     /usr/openwin/lib/X11/app-defaults           \
5874     /usr/openwin/share/lib/app-defaults         \
5875     /usr/openwin/share/lib/X11/app-defaults     \
5876                                                 \
5877     /X11R6/lib/app-defaults                     \
5878     /X11R5/lib/app-defaults                     \
5879     /X11R4/lib/app-defaults                     \
5880     ; \
5881   do
5882     if test -d "$ac_dir"; then
5883       ac_x_app_defaults=$ac_dir
5884       break
5885     fi
5886   done
5887
5888       fi
5889       if test x"$ac_x_app_defaults" = x; then
5890         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
5891       else
5892         # Record where we found app-defaults for the cache.
5893         ac_cv_x_app_defaults="$ac_x_app_defaults"
5894       fi
5895 fi
5896 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
5897 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
5898     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
5899 case "$host" in
5900     *-hpux*)
5901
5902       # The following arcana was gleaned from conversations with
5903       # Eric Schwartz <erics@col.hp.com>:
5904       #
5905       # On HPUX 10.x, the parts of X that HP considers "standard" live in
5906       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
5907       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
5908       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
5909       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
5910       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
5911       # you don't need any -I or -L arguments.
5912       #
5913       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
5914       # are the same division as 10.x.  However, there are no symlinks to
5915       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
5916       # arguments are always necessary.
5917       #
5918       # However, X11R6 was available on HPUX 9.x as a patch: if that
5919       # patch was installed, then all of X11R6 went in to
5920       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
5921       #
5922       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
5923       # whether R5 was available as a patch; R6 undoubtedly was not.)
5924       #
5925       # So.  We try and use the highest numbered pair of
5926       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
5927       # that are available.  We do not mix and match different versions
5928       # of X.
5929       #
5930       # Question I still don't know the answer to: (do you?)
5931       #
5932       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
5933       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
5934       #     that contrib directory?  Did it contain so-called "standard"
5935       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
5936       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
5937       #     be a situation where one had to reach into the R5 headers and
5938       #     libs to find Xmu?  That is, must both R6 and R5 directories
5939       #     be on the -I and -L lists in that case?
5940       #
5941       for version in X11R6 X11R5 X11R4 ; do
5942         # if either pair of directories exists...
5943         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
5944         then
5945            # if contrib exists, use it...
5946            if test -d /usr/contrib/$version/include ; then
5947              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
5948              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
5949            fi
5950            # if the "standard" one exists, use it.
5951            if test -d /usr/include/$version ; then
5952              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
5953              X_LIBS="$X_LIBS -L/usr/lib/$version"
5954            fi
5955            # since at least one of the pair exists, go no farther.
5956            break
5957         fi
5958       done
5959
5960       # Now find Motif.  Thanks for not making xmkmf find this by
5961       # default, you losers.
5962       #
5963       if test -d /usr/include/Motif2.1 ; then
5964         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
5965         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
5966       elif test -d /usr/include/Motif1.2 ; then
5967         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
5968         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
5969       elif test -d /usr/include/Motif1.1 ; then
5970         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
5971         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
5972       fi
5973
5974       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
5975       #
5976       if test -d /opt/graphics/OpenGL/include ; then
5977         # HP-UX 10.20 puts it here
5978         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
5979         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
5980       elif test -d /opt/Mesa/lib ; then
5981         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
5982         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
5983       fi
5984
5985
5986       if test -d /opt/xpm/lib/X11 ; then
5987         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
5988         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
5989       fi
5990
5991       # On HPUX, default to installing in /opt/xscreensaver/ instead of
5992       # in /usr/local/, unless there is already an xscreensaver in
5993       # /usr/local/bin/.  This can be overridden with the --prefix arg
5994       # to configure.  I'm not sure this is the right thing to do, but
5995       # Richard Lloyd says so...
5996       #
5997       if test \! -x /usr/local/bin/xscreensaver ; then
5998         ac_default_prefix=/opt/xscreensaver
5999       fi
6000
6001     ;;
6002     *-solaris*)
6003
6004       # Thanks for not making xmkmf find this by default, pinheads.
6005       # And thanks for moving things around again, too.  Is this
6006       # really the standard location now?  What happened to the
6007       # joke that this kind of thing went in /opt?
6008       # cthomp says "answer: CDE (Common Disorganized Environment)"
6009       #
6010       if test -f /usr/dt/include/Xm/Xm.h ; then
6011         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6012         X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
6013
6014         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6015         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6016 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6017 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6018   echo $ECHO_N "(cached) $ECHO_C" >&6
6019 else
6020   ac_check_lib_save_LIBS=$LIBS
6021 LIBS="-lgen  $LIBS"
6022 cat >conftest.$ac_ext <<_ACEOF
6023 #line $LINENO "configure"
6024 #include "confdefs.h"
6025
6026 /* Override any gcc2 internal prototype to avoid an error.  */
6027 #ifdef __cplusplus
6028 extern "C"
6029 #endif
6030 /* We use char because int might match the return type of a gcc2
6031    builtin and then its argument prototype would still apply.  */
6032 char regcmp ();
6033 #ifdef F77_DUMMY_MAIN
6034 #  ifdef __cplusplus
6035      extern "C"
6036 #  endif
6037    int F77_DUMMY_MAIN() { return 1; }
6038 #endif
6039 int
6040 main ()
6041 {
6042 regcmp ();
6043   ;
6044   return 0;
6045 }
6046 _ACEOF
6047 rm -f conftest.$ac_objext conftest$ac_exeext
6048 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6049   (eval $ac_link) 2>&5
6050   ac_status=$?
6051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6052   (exit $ac_status); } &&
6053          { ac_try='test -s conftest$ac_exeext'
6054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6055   (eval $ac_try) 2>&5
6056   ac_status=$?
6057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6058   (exit $ac_status); }; }; then
6059   ac_cv_lib_gen_regcmp=yes
6060 else
6061   echo "$as_me: failed program was:" >&5
6062 cat conftest.$ac_ext >&5
6063 ac_cv_lib_gen_regcmp=no
6064 fi
6065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6066 LIBS=$ac_check_lib_save_LIBS
6067 fi
6068 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6069 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6070 if test $ac_cv_lib_gen_regcmp = yes; then
6071   X_LIBS="$X_LIBS -lgen"
6072 fi
6073
6074       fi
6075     ;;
6076   esac
6077 echo "$as_me:$LINENO: checking for XPointer" >&5
6078 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6079 if test "${ac_cv_xpointer+set}" = set; then
6080   echo $ECHO_N "(cached) $ECHO_C" >&6
6081 else
6082
6083   ac_save_CPPFLAGS="$CPPFLAGS"
6084   if test \! -z "$includedir" ; then
6085     CPPFLAGS="$CPPFLAGS -I$includedir"
6086   fi
6087   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6088   cat >conftest.$ac_ext <<_ACEOF
6089 #line $LINENO "configure"
6090 #include "confdefs.h"
6091 #include <X11/Xlib.h>
6092 #ifdef F77_DUMMY_MAIN
6093 #  ifdef __cplusplus
6094      extern "C"
6095 #  endif
6096    int F77_DUMMY_MAIN() { return 1; }
6097 #endif
6098 int
6099 main ()
6100 {
6101 XPointer foo = (XPointer) 0;
6102   ;
6103   return 0;
6104 }
6105 _ACEOF
6106 rm -f conftest.$ac_objext
6107 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6108   (eval $ac_compile) 2>&5
6109   ac_status=$?
6110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6111   (exit $ac_status); } &&
6112          { ac_try='test -s conftest.$ac_objext'
6113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6114   (eval $ac_try) 2>&5
6115   ac_status=$?
6116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6117   (exit $ac_status); }; }; then
6118   ac_cv_xpointer=yes
6119 else
6120   echo "$as_me: failed program was:" >&5
6121 cat conftest.$ac_ext >&5
6122 ac_cv_xpointer=no
6123 fi
6124 rm -f conftest.$ac_objext conftest.$ac_ext
6125   CPPFLAGS="$ac_save_CPPFLAGS"
6126 fi
6127 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6128 echo "${ECHO_T}$ac_cv_xpointer" >&6
6129   if test "$ac_cv_xpointer" != yes; then
6130    cat >>confdefs.h <<\_ACEOF
6131 #define XPointer char*
6132 _ACEOF
6133
6134   fi
6135
6136
6137 ###############################################################################
6138 #
6139 #       Gettext support
6140 #
6141 ###############################################################################
6142
6143
6144
6145 if test -n ""; then
6146     echo "$as_me:$LINENO: checking for intltool >= " >&5
6147 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
6148
6149     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6150     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6151
6152     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6153
6154
6155     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6156         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
6157 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
6158     else
6159         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6160 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
6161         exit 1
6162     fi
6163 fi
6164
6165   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'
6166 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'
6167      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'
6168       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6169      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'
6170    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'
6171     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'
6172 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'
6173        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'
6174       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'
6175     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'
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189 # Use the tools built into the package, not the ones that are installed.
6190
6191 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6192 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6193 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6194
6195
6196
6197
6198
6199 # Extract the first word of "perl", so it can be a program name with args.
6200 set dummy perl; ac_word=$2
6201 echo "$as_me:$LINENO: checking for $ac_word" >&5
6202 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6203 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
6204   echo $ECHO_N "(cached) $ECHO_C" >&6
6205 else
6206   case $INTLTOOL_PERL in
6207   [\\/]* | ?:[\\/]*)
6208   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6209   ;;
6210   *)
6211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6212 for as_dir in $PATH
6213 do
6214   IFS=$as_save_IFS
6215   test -z "$as_dir" && as_dir=.
6216   for ac_exec_ext in '' $ac_executable_extensions; do
6217   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6218     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6219     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6220     break 2
6221   fi
6222 done
6223 done
6224
6225   ;;
6226 esac
6227 fi
6228 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6229
6230 if test -n "$INTLTOOL_PERL"; then
6231   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
6232 echo "${ECHO_T}$INTLTOOL_PERL" >&6
6233 else
6234   echo "$as_me:$LINENO: result: no" >&5
6235 echo "${ECHO_T}no" >&6
6236 fi
6237
6238 if test -z "$INTLTOOL_PERL"; then
6239    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
6240 echo "$as_me: error: perl not found; required for intltool" >&2;}
6241    { (exit 1); exit 1; }; }
6242 fi
6243 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6244    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
6245 echo "$as_me: error: perl 5.x required for intltool" >&2;}
6246    { (exit 1); exit 1; }; }
6247 fi
6248
6249 # Remove file type tags (using []) from po/POTFILES.
6250
6251
6252
6253
6254
6255
6256
6257 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6258
6259 ac_config_commands="$ac_config_commands default-1"
6260
6261
6262
6263 GETTEXT_PACKAGE=xscreensaver
6264 cat >>confdefs.h <<_ACEOF
6265 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6266 _ACEOF
6267
6268 cat >>confdefs.h <<_ACEOF
6269 #define PACKAGE "$GETTEXT_PACKAGE"
6270 _ACEOF
6271
6272
6273
6274 ALL_LINGUAS="ca de et fr it ko pl pt sv da es fi hu ja no pt pt_BR ru wa"
6275 if test -n "$ac_tool_prefix"; then
6276   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6277 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6278 echo "$as_me:$LINENO: checking for $ac_word" >&5
6279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6280 if test "${ac_cv_prog_RANLIB+set}" = set; then
6281   echo $ECHO_N "(cached) $ECHO_C" >&6
6282 else
6283   if test -n "$RANLIB"; then
6284   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6285 else
6286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287 for as_dir in $PATH
6288 do
6289   IFS=$as_save_IFS
6290   test -z "$as_dir" && as_dir=.
6291   for ac_exec_ext in '' $ac_executable_extensions; do
6292   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6293     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6294     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6295     break 2
6296   fi
6297 done
6298 done
6299
6300 fi
6301 fi
6302 RANLIB=$ac_cv_prog_RANLIB
6303 if test -n "$RANLIB"; then
6304   echo "$as_me:$LINENO: result: $RANLIB" >&5
6305 echo "${ECHO_T}$RANLIB" >&6
6306 else
6307   echo "$as_me:$LINENO: result: no" >&5
6308 echo "${ECHO_T}no" >&6
6309 fi
6310
6311 fi
6312 if test -z "$ac_cv_prog_RANLIB"; then
6313   ac_ct_RANLIB=$RANLIB
6314   # Extract the first word of "ranlib", so it can be a program name with args.
6315 set dummy ranlib; ac_word=$2
6316 echo "$as_me:$LINENO: checking for $ac_word" >&5
6317 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6318 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6319   echo $ECHO_N "(cached) $ECHO_C" >&6
6320 else
6321   if test -n "$ac_ct_RANLIB"; then
6322   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6323 else
6324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6325 for as_dir in $PATH
6326 do
6327   IFS=$as_save_IFS
6328   test -z "$as_dir" && as_dir=.
6329   for ac_exec_ext in '' $ac_executable_extensions; do
6330   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6331     ac_cv_prog_ac_ct_RANLIB="ranlib"
6332     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6333     break 2
6334   fi
6335 done
6336 done
6337
6338   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6339 fi
6340 fi
6341 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6342 if test -n "$ac_ct_RANLIB"; then
6343   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6344 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6345 else
6346   echo "$as_me:$LINENO: result: no" >&5
6347 echo "${ECHO_T}no" >&6
6348 fi
6349
6350   RANLIB=$ac_ct_RANLIB
6351 else
6352   RANLIB="$ac_cv_prog_RANLIB"
6353 fi
6354
6355 echo "$as_me:$LINENO: checking for off_t" >&5
6356 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6357 if test "${ac_cv_type_off_t+set}" = set; then
6358   echo $ECHO_N "(cached) $ECHO_C" >&6
6359 else
6360   cat >conftest.$ac_ext <<_ACEOF
6361 #line $LINENO "configure"
6362 #include "confdefs.h"
6363 $ac_includes_default
6364 #ifdef F77_DUMMY_MAIN
6365 #  ifdef __cplusplus
6366      extern "C"
6367 #  endif
6368    int F77_DUMMY_MAIN() { return 1; }
6369 #endif
6370 int
6371 main ()
6372 {
6373 if ((off_t *) 0)
6374   return 0;
6375 if (sizeof (off_t))
6376   return 0;
6377   ;
6378   return 0;
6379 }
6380 _ACEOF
6381 rm -f conftest.$ac_objext
6382 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6383   (eval $ac_compile) 2>&5
6384   ac_status=$?
6385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6386   (exit $ac_status); } &&
6387          { ac_try='test -s conftest.$ac_objext'
6388   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6389   (eval $ac_try) 2>&5
6390   ac_status=$?
6391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6392   (exit $ac_status); }; }; then
6393   ac_cv_type_off_t=yes
6394 else
6395   echo "$as_me: failed program was:" >&5
6396 cat conftest.$ac_ext >&5
6397 ac_cv_type_off_t=no
6398 fi
6399 rm -f conftest.$ac_objext conftest.$ac_ext
6400 fi
6401 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6402 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6403 if test $ac_cv_type_off_t = yes; then
6404   :
6405 else
6406
6407 cat >>confdefs.h <<_ACEOF
6408 #define off_t long
6409 _ACEOF
6410
6411 fi
6412
6413 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6414 # for constant arguments.  Useless!
6415 echo "$as_me:$LINENO: checking for working alloca.h" >&5
6416 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6417 if test "${ac_cv_working_alloca_h+set}" = set; then
6418   echo $ECHO_N "(cached) $ECHO_C" >&6
6419 else
6420   cat >conftest.$ac_ext <<_ACEOF
6421 #line $LINENO "configure"
6422 #include "confdefs.h"
6423 #include <alloca.h>
6424 #ifdef F77_DUMMY_MAIN
6425 #  ifdef __cplusplus
6426      extern "C"
6427 #  endif
6428    int F77_DUMMY_MAIN() { return 1; }
6429 #endif
6430 int
6431 main ()
6432 {
6433 char *p = (char *) alloca (2 * sizeof (int));
6434   ;
6435   return 0;
6436 }
6437 _ACEOF
6438 rm -f conftest.$ac_objext conftest$ac_exeext
6439 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6440   (eval $ac_link) 2>&5
6441   ac_status=$?
6442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443   (exit $ac_status); } &&
6444          { ac_try='test -s conftest$ac_exeext'
6445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6446   (eval $ac_try) 2>&5
6447   ac_status=$?
6448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6449   (exit $ac_status); }; }; then
6450   ac_cv_working_alloca_h=yes
6451 else
6452   echo "$as_me: failed program was:" >&5
6453 cat conftest.$ac_ext >&5
6454 ac_cv_working_alloca_h=no
6455 fi
6456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6457 fi
6458 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
6459 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6460 if test $ac_cv_working_alloca_h = yes; then
6461
6462 cat >>confdefs.h <<\_ACEOF
6463 #define HAVE_ALLOCA_H 1
6464 _ACEOF
6465
6466 fi
6467
6468 echo "$as_me:$LINENO: checking for alloca" >&5
6469 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6470 if test "${ac_cv_func_alloca_works+set}" = set; then
6471   echo $ECHO_N "(cached) $ECHO_C" >&6
6472 else
6473   cat >conftest.$ac_ext <<_ACEOF
6474 #line $LINENO "configure"
6475 #include "confdefs.h"
6476 #ifdef __GNUC__
6477 # define alloca __builtin_alloca
6478 #else
6479 # ifdef _MSC_VER
6480 #  include <malloc.h>
6481 #  define alloca _alloca
6482 # else
6483 #  if HAVE_ALLOCA_H
6484 #   include <alloca.h>
6485 #  else
6486 #   ifdef _AIX
6487  #pragma alloca
6488 #   else
6489 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6490 char *alloca ();
6491 #    endif
6492 #   endif
6493 #  endif
6494 # endif
6495 #endif
6496
6497 #ifdef F77_DUMMY_MAIN
6498 #  ifdef __cplusplus
6499      extern "C"
6500 #  endif
6501    int F77_DUMMY_MAIN() { return 1; }
6502 #endif
6503 int
6504 main ()
6505 {
6506 char *p = (char *) alloca (1);
6507   ;
6508   return 0;
6509 }
6510 _ACEOF
6511 rm -f conftest.$ac_objext conftest$ac_exeext
6512 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6513   (eval $ac_link) 2>&5
6514   ac_status=$?
6515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6516   (exit $ac_status); } &&
6517          { ac_try='test -s conftest$ac_exeext'
6518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6519   (eval $ac_try) 2>&5
6520   ac_status=$?
6521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6522   (exit $ac_status); }; }; then
6523   ac_cv_func_alloca_works=yes
6524 else
6525   echo "$as_me: failed program was:" >&5
6526 cat conftest.$ac_ext >&5
6527 ac_cv_func_alloca_works=no
6528 fi
6529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6530 fi
6531 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
6532 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6533
6534 if test $ac_cv_func_alloca_works = yes; then
6535
6536 cat >>confdefs.h <<\_ACEOF
6537 #define HAVE_ALLOCA 1
6538 _ACEOF
6539
6540 else
6541   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6542 # that cause trouble.  Some versions do not even contain alloca or
6543 # contain a buggy version.  If you still want to use their alloca,
6544 # use ar to extract alloca.o from them instead of compiling alloca.c.
6545
6546 ALLOCA=alloca.$ac_objext
6547
6548 cat >>confdefs.h <<\_ACEOF
6549 #define C_ALLOCA 1
6550 _ACEOF
6551
6552
6553 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
6554 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6555 if test "${ac_cv_os_cray+set}" = set; then
6556   echo $ECHO_N "(cached) $ECHO_C" >&6
6557 else
6558   cat >conftest.$ac_ext <<_ACEOF
6559 #line $LINENO "configure"
6560 #include "confdefs.h"
6561 #if defined(CRAY) && ! defined(CRAY2)
6562 webecray
6563 #else
6564 wenotbecray
6565 #endif
6566
6567 _ACEOF
6568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6569   egrep "webecray" >/dev/null 2>&1; then
6570   ac_cv_os_cray=yes
6571 else
6572   ac_cv_os_cray=no
6573 fi
6574 rm -f conftest*
6575
6576 fi
6577 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6578 echo "${ECHO_T}$ac_cv_os_cray" >&6
6579 if test $ac_cv_os_cray = yes; then
6580   for ac_func in _getb67 GETB67 getb67; do
6581     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6582 echo "$as_me:$LINENO: checking for $ac_func" >&5
6583 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6584 if eval "test \"\${$as_ac_var+set}\" = set"; then
6585   echo $ECHO_N "(cached) $ECHO_C" >&6
6586 else
6587   cat >conftest.$ac_ext <<_ACEOF
6588 #line $LINENO "configure"
6589 #include "confdefs.h"
6590 /* System header to define __stub macros and hopefully few prototypes,
6591     which can conflict with char $ac_func (); below.  */
6592 #include <assert.h>
6593 /* Override any gcc2 internal prototype to avoid an error.  */
6594 #ifdef __cplusplus
6595 extern "C"
6596 #endif
6597 /* We use char because int might match the return type of a gcc2
6598    builtin and then its argument prototype would still apply.  */
6599 char $ac_func ();
6600 char (*f) ();
6601
6602 #ifdef F77_DUMMY_MAIN
6603 #  ifdef __cplusplus
6604      extern "C"
6605 #  endif
6606    int F77_DUMMY_MAIN() { return 1; }
6607 #endif
6608 int
6609 main ()
6610 {
6611 /* The GNU C library defines this for functions which it implements
6612     to always fail with ENOSYS.  Some functions are actually named
6613     something starting with __ and the normal name is an alias.  */
6614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6615 choke me
6616 #else
6617 f = $ac_func;
6618 #endif
6619
6620   ;
6621   return 0;
6622 }
6623 _ACEOF
6624 rm -f conftest.$ac_objext conftest$ac_exeext
6625 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6626   (eval $ac_link) 2>&5
6627   ac_status=$?
6628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6629   (exit $ac_status); } &&
6630          { ac_try='test -s conftest$ac_exeext'
6631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6632   (eval $ac_try) 2>&5
6633   ac_status=$?
6634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6635   (exit $ac_status); }; }; then
6636   eval "$as_ac_var=yes"
6637 else
6638   echo "$as_me: failed program was:" >&5
6639 cat conftest.$ac_ext >&5
6640 eval "$as_ac_var=no"
6641 fi
6642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6643 fi
6644 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6645 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6646 if test `eval echo '${'$as_ac_var'}'` = yes; then
6647
6648 cat >>confdefs.h <<_ACEOF
6649 #define CRAY_STACKSEG_END $ac_func
6650 _ACEOF
6651
6652     break
6653 fi
6654
6655   done
6656 fi
6657
6658 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6659 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6660 if test "${ac_cv_c_stack_direction+set}" = set; then
6661   echo $ECHO_N "(cached) $ECHO_C" >&6
6662 else
6663   if test "$cross_compiling" = yes; then
6664   ac_cv_c_stack_direction=0
6665 else
6666   cat >conftest.$ac_ext <<_ACEOF
6667 #line $LINENO "configure"
6668 #include "confdefs.h"
6669 int
6670 find_stack_direction ()
6671 {
6672   static char *addr = 0;
6673   auto char dummy;
6674   if (addr == 0)
6675     {
6676       addr = &dummy;
6677       return find_stack_direction ();
6678     }
6679   else
6680     return (&dummy > addr) ? 1 : -1;
6681 }
6682
6683 int
6684 main ()
6685 {
6686   exit (find_stack_direction () < 0);
6687 }
6688 _ACEOF
6689 rm -f conftest$ac_exeext
6690 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6691   (eval $ac_link) 2>&5
6692   ac_status=$?
6693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6694   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6696   (eval $ac_try) 2>&5
6697   ac_status=$?
6698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6699   (exit $ac_status); }; }; then
6700   ac_cv_c_stack_direction=1
6701 else
6702   echo "$as_me: program exited with status $ac_status" >&5
6703 echo "$as_me: failed program was:" >&5
6704 cat conftest.$ac_ext >&5
6705 ( exit $ac_status )
6706 ac_cv_c_stack_direction=-1
6707 fi
6708 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6709 fi
6710 fi
6711 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
6712 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
6713
6714 cat >>confdefs.h <<_ACEOF
6715 #define STACK_DIRECTION $ac_cv_c_stack_direction
6716 _ACEOF
6717
6718
6719 fi
6720
6721
6722
6723 for ac_header in stdlib.h unistd.h
6724 do
6725 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6726 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6727   echo "$as_me:$LINENO: checking for $ac_header" >&5
6728 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6729 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6730   echo $ECHO_N "(cached) $ECHO_C" >&6
6731 fi
6732 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6733 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6734 else
6735   # Is the header compilable?
6736 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6737 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6738 cat >conftest.$ac_ext <<_ACEOF
6739 #line $LINENO "configure"
6740 #include "confdefs.h"
6741 $ac_includes_default
6742 #include <$ac_header>
6743 _ACEOF
6744 rm -f conftest.$ac_objext
6745 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6746   (eval $ac_compile) 2>&5
6747   ac_status=$?
6748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6749   (exit $ac_status); } &&
6750          { ac_try='test -s conftest.$ac_objext'
6751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6752   (eval $ac_try) 2>&5
6753   ac_status=$?
6754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6755   (exit $ac_status); }; }; then
6756   ac_header_compiler=yes
6757 else
6758   echo "$as_me: failed program was:" >&5
6759 cat conftest.$ac_ext >&5
6760 ac_header_compiler=no
6761 fi
6762 rm -f conftest.$ac_objext conftest.$ac_ext
6763 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6764 echo "${ECHO_T}$ac_header_compiler" >&6
6765
6766 # Is the header present?
6767 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6768 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6769 cat >conftest.$ac_ext <<_ACEOF
6770 #line $LINENO "configure"
6771 #include "confdefs.h"
6772 #include <$ac_header>
6773 _ACEOF
6774 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6775   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6776   ac_status=$?
6777   egrep -v '^ *\+' conftest.er1 >conftest.err
6778   rm -f conftest.er1
6779   cat conftest.err >&5
6780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6781   (exit $ac_status); } >/dev/null; then
6782   if test -s conftest.err; then
6783     ac_cpp_err=$ac_c_preproc_warn_flag
6784   else
6785     ac_cpp_err=
6786   fi
6787 else
6788   ac_cpp_err=yes
6789 fi
6790 if test -z "$ac_cpp_err"; then
6791   ac_header_preproc=yes
6792 else
6793   echo "$as_me: failed program was:" >&5
6794   cat conftest.$ac_ext >&5
6795   ac_header_preproc=no
6796 fi
6797 rm -f conftest.err conftest.$ac_ext
6798 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6799 echo "${ECHO_T}$ac_header_preproc" >&6
6800
6801 # So?  What about this header?
6802 case $ac_header_compiler:$ac_header_preproc in
6803   yes:no )
6804     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6805 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6806     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6807 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6808   no:yes )
6809     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6810 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6811     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6812 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6813     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6814 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6815 esac
6816 echo "$as_me:$LINENO: checking for $ac_header" >&5
6817 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6818 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6819   echo $ECHO_N "(cached) $ECHO_C" >&6
6820 else
6821   eval "$as_ac_Header=$ac_header_preproc"
6822 fi
6823 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6824 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6825
6826 fi
6827 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6828   cat >>confdefs.h <<_ACEOF
6829 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6830 _ACEOF
6831
6832 fi
6833
6834 done
6835
6836
6837 for ac_func in getpagesize
6838 do
6839 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6840 echo "$as_me:$LINENO: checking for $ac_func" >&5
6841 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6842 if eval "test \"\${$as_ac_var+set}\" = set"; then
6843   echo $ECHO_N "(cached) $ECHO_C" >&6
6844 else
6845   cat >conftest.$ac_ext <<_ACEOF
6846 #line $LINENO "configure"
6847 #include "confdefs.h"
6848 /* System header to define __stub macros and hopefully few prototypes,
6849     which can conflict with char $ac_func (); below.  */
6850 #include <assert.h>
6851 /* Override any gcc2 internal prototype to avoid an error.  */
6852 #ifdef __cplusplus
6853 extern "C"
6854 #endif
6855 /* We use char because int might match the return type of a gcc2
6856    builtin and then its argument prototype would still apply.  */
6857 char $ac_func ();
6858 char (*f) ();
6859
6860 #ifdef F77_DUMMY_MAIN
6861 #  ifdef __cplusplus
6862      extern "C"
6863 #  endif
6864    int F77_DUMMY_MAIN() { return 1; }
6865 #endif
6866 int
6867 main ()
6868 {
6869 /* The GNU C library defines this for functions which it implements
6870     to always fail with ENOSYS.  Some functions are actually named
6871     something starting with __ and the normal name is an alias.  */
6872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6873 choke me
6874 #else
6875 f = $ac_func;
6876 #endif
6877
6878   ;
6879   return 0;
6880 }
6881 _ACEOF
6882 rm -f conftest.$ac_objext conftest$ac_exeext
6883 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6884   (eval $ac_link) 2>&5
6885   ac_status=$?
6886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6887   (exit $ac_status); } &&
6888          { ac_try='test -s conftest$ac_exeext'
6889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6890   (eval $ac_try) 2>&5
6891   ac_status=$?
6892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6893   (exit $ac_status); }; }; then
6894   eval "$as_ac_var=yes"
6895 else
6896   echo "$as_me: failed program was:" >&5
6897 cat conftest.$ac_ext >&5
6898 eval "$as_ac_var=no"
6899 fi
6900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6901 fi
6902 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6903 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6904 if test `eval echo '${'$as_ac_var'}'` = yes; then
6905   cat >>confdefs.h <<_ACEOF
6906 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6907 _ACEOF
6908
6909 fi
6910 done
6911
6912 echo "$as_me:$LINENO: checking for working mmap" >&5
6913 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
6914 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
6915   echo $ECHO_N "(cached) $ECHO_C" >&6
6916 else
6917   if test "$cross_compiling" = yes; then
6918   ac_cv_func_mmap_fixed_mapped=no
6919 else
6920   cat >conftest.$ac_ext <<_ACEOF
6921 #line $LINENO "configure"
6922 #include "confdefs.h"
6923 $ac_includes_default
6924 /* malloc might have been renamed as rpl_malloc. */
6925 #undef malloc
6926
6927 /* Thanks to Mike Haertel and Jim Avera for this test.
6928    Here is a matrix of mmap possibilities:
6929         mmap private not fixed
6930         mmap private fixed at somewhere currently unmapped
6931         mmap private fixed at somewhere already mapped
6932         mmap shared not fixed
6933         mmap shared fixed at somewhere currently unmapped
6934         mmap shared fixed at somewhere already mapped
6935    For private mappings, we should verify that changes cannot be read()
6936    back from the file, nor mmap's back from the file at a different
6937    address.  (There have been systems where private was not correctly
6938    implemented like the infamous i386 svr4.0, and systems where the
6939    VM page cache was not coherent with the file system buffer cache
6940    like early versions of FreeBSD and possibly contemporary NetBSD.)
6941    For shared mappings, we should conversely verify that changes get
6942    propagated back to all the places they're supposed to be.
6943
6944    Grep wants private fixed already mapped.
6945    The main things grep needs to know about mmap are:
6946    * does it exist and is it safe to write into the mmap'd area
6947    * how to use it (BSD variants)  */
6948
6949 #include <fcntl.h>
6950 #include <sys/mman.h>
6951
6952 #if !STDC_HEADERS && !HAVE_STDLIB_H
6953 char *malloc ();
6954 #endif
6955
6956 /* This mess was copied from the GNU getpagesize.h.  */
6957 #if !HAVE_GETPAGESIZE
6958 /* Assume that all systems that can run configure have sys/param.h.  */
6959 # if !HAVE_SYS_PARAM_H
6960 #  define HAVE_SYS_PARAM_H 1
6961 # endif
6962
6963 # ifdef _SC_PAGESIZE
6964 #  define getpagesize() sysconf(_SC_PAGESIZE)
6965 # else /* no _SC_PAGESIZE */
6966 #  if HAVE_SYS_PARAM_H
6967 #   include <sys/param.h>
6968 #   ifdef EXEC_PAGESIZE
6969 #    define getpagesize() EXEC_PAGESIZE
6970 #   else /* no EXEC_PAGESIZE */
6971 #    ifdef NBPG
6972 #     define getpagesize() NBPG * CLSIZE
6973 #     ifndef CLSIZE
6974 #      define CLSIZE 1
6975 #     endif /* no CLSIZE */
6976 #    else /* no NBPG */
6977 #     ifdef NBPC
6978 #      define getpagesize() NBPC
6979 #     else /* no NBPC */
6980 #      ifdef PAGESIZE
6981 #       define getpagesize() PAGESIZE
6982 #      endif /* PAGESIZE */
6983 #     endif /* no NBPC */
6984 #    endif /* no NBPG */
6985 #   endif /* no EXEC_PAGESIZE */
6986 #  else /* no HAVE_SYS_PARAM_H */
6987 #   define getpagesize() 8192   /* punt totally */
6988 #  endif /* no HAVE_SYS_PARAM_H */
6989 # endif /* no _SC_PAGESIZE */
6990
6991 #endif /* no HAVE_GETPAGESIZE */
6992
6993 int
6994 main ()
6995 {
6996   char *data, *data2, *data3;
6997   int i, pagesize;
6998   int fd;
6999
7000   pagesize = getpagesize ();
7001
7002   /* First, make a file with some known garbage in it. */
7003   data = (char *) malloc (pagesize);
7004   if (!data)
7005     exit (1);
7006   for (i = 0; i < pagesize; ++i)
7007     *(data + i) = rand ();
7008   umask (0);
7009   fd = creat ("conftest.mmap", 0600);
7010   if (fd < 0)
7011     exit (1);
7012   if (write (fd, data, pagesize) != pagesize)
7013     exit (1);
7014   close (fd);
7015
7016   /* Next, try to mmap the file at a fixed address which already has
7017      something else allocated at it.  If we can, also make sure that
7018      we see the same garbage.  */
7019   fd = open ("conftest.mmap", O_RDWR);
7020   if (fd < 0)
7021     exit (1);
7022   data2 = (char *) malloc (2 * pagesize);
7023   if (!data2)
7024     exit (1);
7025   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7026   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7027                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7028     exit (1);
7029   for (i = 0; i < pagesize; ++i)
7030     if (*(data + i) != *(data2 + i))
7031       exit (1);
7032
7033   /* Finally, make sure that changes to the mapped area do not
7034      percolate back to the file as seen by read().  (This is a bug on
7035      some variants of i386 svr4.0.)  */
7036   for (i = 0; i < pagesize; ++i)
7037     *(data2 + i) = *(data2 + i) + 1;
7038   data3 = (char *) malloc (pagesize);
7039   if (!data3)
7040     exit (1);
7041   if (read (fd, data3, pagesize) != pagesize)
7042     exit (1);
7043   for (i = 0; i < pagesize; ++i)
7044     if (*(data + i) != *(data3 + i))
7045       exit (1);
7046   close (fd);
7047   exit (0);
7048 }
7049 _ACEOF
7050 rm -f conftest$ac_exeext
7051 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7052   (eval $ac_link) 2>&5
7053   ac_status=$?
7054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7055   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7057   (eval $ac_try) 2>&5
7058   ac_status=$?
7059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7060   (exit $ac_status); }; }; then
7061   ac_cv_func_mmap_fixed_mapped=yes
7062 else
7063   echo "$as_me: program exited with status $ac_status" >&5
7064 echo "$as_me: failed program was:" >&5
7065 cat conftest.$ac_ext >&5
7066 ( exit $ac_status )
7067 ac_cv_func_mmap_fixed_mapped=no
7068 fi
7069 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7070 fi
7071 fi
7072 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7073 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7074 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7075
7076 cat >>confdefs.h <<\_ACEOF
7077 #define HAVE_MMAP 1
7078 _ACEOF
7079
7080 fi
7081 rm -f conftest.mmap
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7093 unistd.h sys/param.h
7094 do
7095 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7096 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7097   echo "$as_me:$LINENO: checking for $ac_header" >&5
7098 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7099 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7100   echo $ECHO_N "(cached) $ECHO_C" >&6
7101 fi
7102 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7103 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7104 else
7105   # Is the header compilable?
7106 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7107 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7108 cat >conftest.$ac_ext <<_ACEOF
7109 #line $LINENO "configure"
7110 #include "confdefs.h"
7111 $ac_includes_default
7112 #include <$ac_header>
7113 _ACEOF
7114 rm -f conftest.$ac_objext
7115 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7116   (eval $ac_compile) 2>&5
7117   ac_status=$?
7118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119   (exit $ac_status); } &&
7120          { ac_try='test -s conftest.$ac_objext'
7121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7122   (eval $ac_try) 2>&5
7123   ac_status=$?
7124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7125   (exit $ac_status); }; }; then
7126   ac_header_compiler=yes
7127 else
7128   echo "$as_me: failed program was:" >&5
7129 cat conftest.$ac_ext >&5
7130 ac_header_compiler=no
7131 fi
7132 rm -f conftest.$ac_objext conftest.$ac_ext
7133 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7134 echo "${ECHO_T}$ac_header_compiler" >&6
7135
7136 # Is the header present?
7137 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7138 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7139 cat >conftest.$ac_ext <<_ACEOF
7140 #line $LINENO "configure"
7141 #include "confdefs.h"
7142 #include <$ac_header>
7143 _ACEOF
7144 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7145   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7146   ac_status=$?
7147   egrep -v '^ *\+' conftest.er1 >conftest.err
7148   rm -f conftest.er1
7149   cat conftest.err >&5
7150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7151   (exit $ac_status); } >/dev/null; then
7152   if test -s conftest.err; then
7153     ac_cpp_err=$ac_c_preproc_warn_flag
7154   else
7155     ac_cpp_err=
7156   fi
7157 else
7158   ac_cpp_err=yes
7159 fi
7160 if test -z "$ac_cpp_err"; then
7161   ac_header_preproc=yes
7162 else
7163   echo "$as_me: failed program was:" >&5
7164   cat conftest.$ac_ext >&5
7165   ac_header_preproc=no
7166 fi
7167 rm -f conftest.err conftest.$ac_ext
7168 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7169 echo "${ECHO_T}$ac_header_preproc" >&6
7170
7171 # So?  What about this header?
7172 case $ac_header_compiler:$ac_header_preproc in
7173   yes:no )
7174     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7175 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7176     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7177 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7178   no:yes )
7179     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7180 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7181     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7182 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7183     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7184 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7185 esac
7186 echo "$as_me:$LINENO: checking for $ac_header" >&5
7187 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7188 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7189   echo $ECHO_N "(cached) $ECHO_C" >&6
7190 else
7191   eval "$as_ac_Header=$ac_header_preproc"
7192 fi
7193 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7194 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7195
7196 fi
7197 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7198   cat >>confdefs.h <<_ACEOF
7199 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7200 _ACEOF
7201
7202 fi
7203
7204 done
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7218 strdup __argz_count __argz_stringify __argz_next
7219 do
7220 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7221 echo "$as_me:$LINENO: checking for $ac_func" >&5
7222 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7223 if eval "test \"\${$as_ac_var+set}\" = set"; then
7224   echo $ECHO_N "(cached) $ECHO_C" >&6
7225 else
7226   cat >conftest.$ac_ext <<_ACEOF
7227 #line $LINENO "configure"
7228 #include "confdefs.h"
7229 /* System header to define __stub macros and hopefully few prototypes,
7230     which can conflict with char $ac_func (); below.  */
7231 #include <assert.h>
7232 /* Override any gcc2 internal prototype to avoid an error.  */
7233 #ifdef __cplusplus
7234 extern "C"
7235 #endif
7236 /* We use char because int might match the return type of a gcc2
7237    builtin and then its argument prototype would still apply.  */
7238 char $ac_func ();
7239 char (*f) ();
7240
7241 #ifdef F77_DUMMY_MAIN
7242 #  ifdef __cplusplus
7243      extern "C"
7244 #  endif
7245    int F77_DUMMY_MAIN() { return 1; }
7246 #endif
7247 int
7248 main ()
7249 {
7250 /* The GNU C library defines this for functions which it implements
7251     to always fail with ENOSYS.  Some functions are actually named
7252     something starting with __ and the normal name is an alias.  */
7253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7254 choke me
7255 #else
7256 f = $ac_func;
7257 #endif
7258
7259   ;
7260   return 0;
7261 }
7262 _ACEOF
7263 rm -f conftest.$ac_objext conftest$ac_exeext
7264 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7265   (eval $ac_link) 2>&5
7266   ac_status=$?
7267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7268   (exit $ac_status); } &&
7269          { ac_try='test -s conftest$ac_exeext'
7270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7271   (eval $ac_try) 2>&5
7272   ac_status=$?
7273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274   (exit $ac_status); }; }; then
7275   eval "$as_ac_var=yes"
7276 else
7277   echo "$as_me: failed program was:" >&5
7278 cat conftest.$ac_ext >&5
7279 eval "$as_ac_var=no"
7280 fi
7281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7282 fi
7283 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7284 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7285 if test `eval echo '${'$as_ac_var'}'` = yes; then
7286   cat >>confdefs.h <<_ACEOF
7287 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7288 _ACEOF
7289
7290 fi
7291 done
7292
7293
7294    if test $ac_cv_header_locale_h = yes; then
7295     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7296 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7297 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7298   echo $ECHO_N "(cached) $ECHO_C" >&6
7299 else
7300   cat >conftest.$ac_ext <<_ACEOF
7301 #line $LINENO "configure"
7302 #include "confdefs.h"
7303 #include <locale.h>
7304 #ifdef F77_DUMMY_MAIN
7305 #  ifdef __cplusplus
7306      extern "C"
7307 #  endif
7308    int F77_DUMMY_MAIN() { return 1; }
7309 #endif
7310 int
7311 main ()
7312 {
7313 return LC_MESSAGES
7314   ;
7315   return 0;
7316 }
7317 _ACEOF
7318 rm -f conftest.$ac_objext conftest$ac_exeext
7319 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7320   (eval $ac_link) 2>&5
7321   ac_status=$?
7322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7323   (exit $ac_status); } &&
7324          { ac_try='test -s conftest$ac_exeext'
7325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7326   (eval $ac_try) 2>&5
7327   ac_status=$?
7328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7329   (exit $ac_status); }; }; then
7330   am_cv_val_LC_MESSAGES=yes
7331 else
7332   echo "$as_me: failed program was:" >&5
7333 cat conftest.$ac_ext >&5
7334 am_cv_val_LC_MESSAGES=no
7335 fi
7336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7337 fi
7338 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7339 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7340     if test $am_cv_val_LC_MESSAGES = yes; then
7341
7342 cat >>confdefs.h <<\_ACEOF
7343 #define HAVE_LC_MESSAGES 1
7344 _ACEOF
7345
7346     fi
7347   fi
7348      USE_NLS=yes
7349
7350
7351         nls_cv_force_use_gnu_gettext="no"
7352
7353     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7354     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7355                               nls_cv_header_intl=
7356       nls_cv_header_libgt=
7357       CATOBJEXT=NONE
7358
7359       if test "${ac_cv_header_libintl_h+set}" = set; then
7360   echo "$as_me:$LINENO: checking for libintl.h" >&5
7361 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7362 if test "${ac_cv_header_libintl_h+set}" = set; then
7363   echo $ECHO_N "(cached) $ECHO_C" >&6
7364 fi
7365 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7366 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7367 else
7368   # Is the header compilable?
7369 echo "$as_me:$LINENO: checking libintl.h usability" >&5
7370 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
7371 cat >conftest.$ac_ext <<_ACEOF
7372 #line $LINENO "configure"
7373 #include "confdefs.h"
7374 $ac_includes_default
7375 #include <libintl.h>
7376 _ACEOF
7377 rm -f conftest.$ac_objext
7378 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7379   (eval $ac_compile) 2>&5
7380   ac_status=$?
7381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7382   (exit $ac_status); } &&
7383          { ac_try='test -s conftest.$ac_objext'
7384   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7385   (eval $ac_try) 2>&5
7386   ac_status=$?
7387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7388   (exit $ac_status); }; }; then
7389   ac_header_compiler=yes
7390 else
7391   echo "$as_me: failed program was:" >&5
7392 cat conftest.$ac_ext >&5
7393 ac_header_compiler=no
7394 fi
7395 rm -f conftest.$ac_objext conftest.$ac_ext
7396 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7397 echo "${ECHO_T}$ac_header_compiler" >&6
7398
7399 # Is the header present?
7400 echo "$as_me:$LINENO: checking libintl.h presence" >&5
7401 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
7402 cat >conftest.$ac_ext <<_ACEOF
7403 #line $LINENO "configure"
7404 #include "confdefs.h"
7405 #include <libintl.h>
7406 _ACEOF
7407 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7408   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7409   ac_status=$?
7410   egrep -v '^ *\+' conftest.er1 >conftest.err
7411   rm -f conftest.er1
7412   cat conftest.err >&5
7413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7414   (exit $ac_status); } >/dev/null; then
7415   if test -s conftest.err; then
7416     ac_cpp_err=$ac_c_preproc_warn_flag
7417   else
7418     ac_cpp_err=
7419   fi
7420 else
7421   ac_cpp_err=yes
7422 fi
7423 if test -z "$ac_cpp_err"; then
7424   ac_header_preproc=yes
7425 else
7426   echo "$as_me: failed program was:" >&5
7427   cat conftest.$ac_ext >&5
7428   ac_header_preproc=no
7429 fi
7430 rm -f conftest.err conftest.$ac_ext
7431 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7432 echo "${ECHO_T}$ac_header_preproc" >&6
7433
7434 # So?  What about this header?
7435 case $ac_header_compiler:$ac_header_preproc in
7436   yes:no )
7437     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7438 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7439     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7440 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7441   no:yes )
7442     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
7443 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
7444     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
7445 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
7446     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7447 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7448 esac
7449 echo "$as_me:$LINENO: checking for libintl.h" >&5
7450 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7451 if test "${ac_cv_header_libintl_h+set}" = set; then
7452   echo $ECHO_N "(cached) $ECHO_C" >&6
7453 else
7454   ac_cv_header_libintl_h=$ac_header_preproc
7455 fi
7456 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7457 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7458
7459 fi
7460 if test $ac_cv_header_libintl_h = yes; then
7461   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
7462 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
7463 if test "${gt_cv_func_dgettext_libc+set}" = set; then
7464   echo $ECHO_N "(cached) $ECHO_C" >&6
7465 else
7466   cat >conftest.$ac_ext <<_ACEOF
7467 #line $LINENO "configure"
7468 #include "confdefs.h"
7469 #include <libintl.h>
7470 #ifdef F77_DUMMY_MAIN
7471 #  ifdef __cplusplus
7472      extern "C"
7473 #  endif
7474    int F77_DUMMY_MAIN() { return 1; }
7475 #endif
7476 int
7477 main ()
7478 {
7479 return (int) dgettext ("","")
7480   ;
7481   return 0;
7482 }
7483 _ACEOF
7484 rm -f conftest.$ac_objext conftest$ac_exeext
7485 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7486   (eval $ac_link) 2>&5
7487   ac_status=$?
7488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489   (exit $ac_status); } &&
7490          { ac_try='test -s conftest$ac_exeext'
7491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7492   (eval $ac_try) 2>&5
7493   ac_status=$?
7494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7495   (exit $ac_status); }; }; then
7496   gt_cv_func_dgettext_libc=yes
7497 else
7498   echo "$as_me: failed program was:" >&5
7499 cat conftest.$ac_ext >&5
7500 gt_cv_func_dgettext_libc=no
7501 fi
7502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7503 fi
7504 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
7505 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
7506
7507           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7508             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
7509 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7510 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7511   echo $ECHO_N "(cached) $ECHO_C" >&6
7512 else
7513   ac_check_lib_save_LIBS=$LIBS
7514 LIBS="-lintl  $LIBS"
7515 cat >conftest.$ac_ext <<_ACEOF
7516 #line $LINENO "configure"
7517 #include "confdefs.h"
7518
7519 /* Override any gcc2 internal prototype to avoid an error.  */
7520 #ifdef __cplusplus
7521 extern "C"
7522 #endif
7523 /* We use char because int might match the return type of a gcc2
7524    builtin and then its argument prototype would still apply.  */
7525 char bindtextdomain ();
7526 #ifdef F77_DUMMY_MAIN
7527 #  ifdef __cplusplus
7528      extern "C"
7529 #  endif
7530    int F77_DUMMY_MAIN() { return 1; }
7531 #endif
7532 int
7533 main ()
7534 {
7535 bindtextdomain ();
7536   ;
7537   return 0;
7538 }
7539 _ACEOF
7540 rm -f conftest.$ac_objext conftest$ac_exeext
7541 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7542   (eval $ac_link) 2>&5
7543   ac_status=$?
7544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545   (exit $ac_status); } &&
7546          { ac_try='test -s conftest$ac_exeext'
7547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7548   (eval $ac_try) 2>&5
7549   ac_status=$?
7550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7551   (exit $ac_status); }; }; then
7552   ac_cv_lib_intl_bindtextdomain=yes
7553 else
7554   echo "$as_me: failed program was:" >&5
7555 cat conftest.$ac_ext >&5
7556 ac_cv_lib_intl_bindtextdomain=no
7557 fi
7558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7559 LIBS=$ac_check_lib_save_LIBS
7560 fi
7561 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
7562 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
7563 if test $ac_cv_lib_intl_bindtextdomain = yes; then
7564   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
7565 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
7566 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
7567   echo $ECHO_N "(cached) $ECHO_C" >&6
7568 else
7569   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
7570 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
7571 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
7572   echo $ECHO_N "(cached) $ECHO_C" >&6
7573 else
7574   ac_check_lib_save_LIBS=$LIBS
7575 LIBS="-lintl  $LIBS"
7576 cat >conftest.$ac_ext <<_ACEOF
7577 #line $LINENO "configure"
7578 #include "confdefs.h"
7579
7580 /* Override any gcc2 internal prototype to avoid an error.  */
7581 #ifdef __cplusplus
7582 extern "C"
7583 #endif
7584 /* We use char because int might match the return type of a gcc2
7585    builtin and then its argument prototype would still apply.  */
7586 char dgettext ();
7587 #ifdef F77_DUMMY_MAIN
7588 #  ifdef __cplusplus
7589      extern "C"
7590 #  endif
7591    int F77_DUMMY_MAIN() { return 1; }
7592 #endif
7593 int
7594 main ()
7595 {
7596 dgettext ();
7597   ;
7598   return 0;
7599 }
7600 _ACEOF
7601 rm -f conftest.$ac_objext conftest$ac_exeext
7602 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7603   (eval $ac_link) 2>&5
7604   ac_status=$?
7605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7606   (exit $ac_status); } &&
7607          { ac_try='test -s conftest$ac_exeext'
7608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7609   (eval $ac_try) 2>&5
7610   ac_status=$?
7611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7612   (exit $ac_status); }; }; then
7613   ac_cv_lib_intl_dgettext=yes
7614 else
7615   echo "$as_me: failed program was:" >&5
7616 cat conftest.$ac_ext >&5
7617 ac_cv_lib_intl_dgettext=no
7618 fi
7619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7620 LIBS=$ac_check_lib_save_LIBS
7621 fi
7622 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
7623 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
7624 if test $ac_cv_lib_intl_dgettext = yes; then
7625   gt_cv_func_dgettext_libintl=yes
7626 else
7627   gt_cv_func_dgettext_libintl=no
7628 fi
7629
7630 fi
7631 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
7632 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
7633 fi
7634
7635           fi
7636
7637           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7638             LIBS="$LIBS -lintl";
7639           fi
7640
7641           if test "$gt_cv_func_dgettext_libc" = "yes" \
7642             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7643
7644 cat >>confdefs.h <<\_ACEOF
7645 #define HAVE_GETTEXT 1
7646 _ACEOF
7647
7648             # Extract the first word of "msgfmt", so it can be a program name with args.
7649 set dummy msgfmt; ac_word=$2
7650 echo "$as_me:$LINENO: checking for $ac_word" >&5
7651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7652 if test "${ac_cv_path_MSGFMT+set}" = set; then
7653   echo $ECHO_N "(cached) $ECHO_C" >&6
7654 else
7655   case "$MSGFMT" in
7656   /*)
7657   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7658   ;;
7659   *)
7660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7661   for ac_dir in $PATH; do
7662     test -z "$ac_dir" && ac_dir=.
7663     if test -f $ac_dir/$ac_word; then
7664       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7665         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7666         break
7667       fi
7668     fi
7669   done
7670   IFS="$ac_save_ifs"
7671   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7672   ;;
7673 esac
7674 fi
7675 MSGFMT="$ac_cv_path_MSGFMT"
7676 if test -n "$MSGFMT"; then
7677   echo "$as_me:$LINENO: result: $MSGFMT" >&5
7678 echo "${ECHO_T}$MSGFMT" >&6
7679 else
7680   echo "$as_me:$LINENO: result: no" >&5
7681 echo "${ECHO_T}no" >&6
7682 fi
7683             if test "$MSGFMT" != "no"; then
7684
7685 for ac_func in dcgettext
7686 do
7687 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7688 echo "$as_me:$LINENO: checking for $ac_func" >&5
7689 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7690 if eval "test \"\${$as_ac_var+set}\" = set"; then
7691   echo $ECHO_N "(cached) $ECHO_C" >&6
7692 else
7693   cat >conftest.$ac_ext <<_ACEOF
7694 #line $LINENO "configure"
7695 #include "confdefs.h"
7696 /* System header to define __stub macros and hopefully few prototypes,
7697     which can conflict with char $ac_func (); below.  */
7698 #include <assert.h>
7699 /* Override any gcc2 internal prototype to avoid an error.  */
7700 #ifdef __cplusplus
7701 extern "C"
7702 #endif
7703 /* We use char because int might match the return type of a gcc2
7704    builtin and then its argument prototype would still apply.  */
7705 char $ac_func ();
7706 char (*f) ();
7707
7708 #ifdef F77_DUMMY_MAIN
7709 #  ifdef __cplusplus
7710      extern "C"
7711 #  endif
7712    int F77_DUMMY_MAIN() { return 1; }
7713 #endif
7714 int
7715 main ()
7716 {
7717 /* The GNU C library defines this for functions which it implements
7718     to always fail with ENOSYS.  Some functions are actually named
7719     something starting with __ and the normal name is an alias.  */
7720 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7721 choke me
7722 #else
7723 f = $ac_func;
7724 #endif
7725
7726   ;
7727   return 0;
7728 }
7729 _ACEOF
7730 rm -f conftest.$ac_objext conftest$ac_exeext
7731 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7732   (eval $ac_link) 2>&5
7733   ac_status=$?
7734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7735   (exit $ac_status); } &&
7736          { ac_try='test -s conftest$ac_exeext'
7737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7738   (eval $ac_try) 2>&5
7739   ac_status=$?
7740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7741   (exit $ac_status); }; }; then
7742   eval "$as_ac_var=yes"
7743 else
7744   echo "$as_me: failed program was:" >&5
7745 cat conftest.$ac_ext >&5
7746 eval "$as_ac_var=no"
7747 fi
7748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7749 fi
7750 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7751 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7752 if test `eval echo '${'$as_ac_var'}'` = yes; then
7753   cat >>confdefs.h <<_ACEOF
7754 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7755 _ACEOF
7756
7757 fi
7758 done
7759
7760               # Extract the first word of "gmsgfmt", so it can be a program name with args.
7761 set dummy gmsgfmt; ac_word=$2
7762 echo "$as_me:$LINENO: checking for $ac_word" >&5
7763 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7764 if test "${ac_cv_path_GMSGFMT+set}" = set; then
7765   echo $ECHO_N "(cached) $ECHO_C" >&6
7766 else
7767   case $GMSGFMT in
7768   [\\/]* | ?:[\\/]*)
7769   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7770   ;;
7771   *)
7772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7773 for as_dir in $PATH
7774 do
7775   IFS=$as_save_IFS
7776   test -z "$as_dir" && as_dir=.
7777   for ac_exec_ext in '' $ac_executable_extensions; do
7778   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7779     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7780     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7781     break 2
7782   fi
7783 done
7784 done
7785
7786   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7787   ;;
7788 esac
7789 fi
7790 GMSGFMT=$ac_cv_path_GMSGFMT
7791
7792 if test -n "$GMSGFMT"; then
7793   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
7794 echo "${ECHO_T}$GMSGFMT" >&6
7795 else
7796   echo "$as_me:$LINENO: result: no" >&5
7797 echo "${ECHO_T}no" >&6
7798 fi
7799
7800               # Extract the first word of "xgettext", so it can be a program name with args.
7801 set dummy xgettext; ac_word=$2
7802 echo "$as_me:$LINENO: checking for $ac_word" >&5
7803 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7804 if test "${ac_cv_path_XGETTEXT+set}" = set; then
7805   echo $ECHO_N "(cached) $ECHO_C" >&6
7806 else
7807   case "$XGETTEXT" in
7808   /*)
7809   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7810   ;;
7811   *)
7812   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7813   for ac_dir in $PATH; do
7814     test -z "$ac_dir" && ac_dir=.
7815     if test -f $ac_dir/$ac_word; then
7816       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7817         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7818         break
7819       fi
7820     fi
7821   done
7822   IFS="$ac_save_ifs"
7823   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7824   ;;
7825 esac
7826 fi
7827 XGETTEXT="$ac_cv_path_XGETTEXT"
7828 if test -n "$XGETTEXT"; then
7829   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
7830 echo "${ECHO_T}$XGETTEXT" >&6
7831 else
7832   echo "$as_me:$LINENO: result: no" >&5
7833 echo "${ECHO_T}no" >&6
7834 fi
7835
7836               cat >conftest.$ac_ext <<_ACEOF
7837 #line $LINENO "configure"
7838 #include "confdefs.h"
7839
7840 #ifdef F77_DUMMY_MAIN
7841 #  ifdef __cplusplus
7842      extern "C"
7843 #  endif
7844    int F77_DUMMY_MAIN() { return 1; }
7845 #endif
7846 int
7847 main ()
7848 {
7849 extern int _nl_msg_cat_cntr;
7850                              return _nl_msg_cat_cntr
7851   ;
7852   return 0;
7853 }
7854 _ACEOF
7855 rm -f conftest.$ac_objext conftest$ac_exeext
7856 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7857   (eval $ac_link) 2>&5
7858   ac_status=$?
7859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7860   (exit $ac_status); } &&
7861          { ac_try='test -s conftest$ac_exeext'
7862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7863   (eval $ac_try) 2>&5
7864   ac_status=$?
7865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7866   (exit $ac_status); }; }; then
7867   CATOBJEXT=.gmo
7868                  DATADIRNAME=share
7869 else
7870   echo "$as_me: failed program was:" >&5
7871 cat conftest.$ac_ext >&5
7872 CATOBJEXT=.mo
7873                  DATADIRNAME=lib
7874 fi
7875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7876               INSTOBJEXT=.mo
7877             fi
7878           fi
7879
7880           # Added by Martin Baulig 12/15/98 for libc5 systems
7881           if test "$gt_cv_func_dgettext_libc" != "yes" \
7882             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
7883             INTLLIBS=-lintl
7884             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7885           fi
7886
7887 fi
7888
7889
7890
7891       if test "$CATOBJEXT" = "NONE"; then
7892                         nls_cv_use_gnu_gettext=yes
7893       fi
7894     fi
7895
7896     if test "$nls_cv_use_gnu_gettext" != "yes"; then
7897
7898 cat >>confdefs.h <<\_ACEOF
7899 #define ENABLE_NLS 1
7900 _ACEOF
7901
7902     else
7903             CATOBJEXT=
7904     fi
7905
7906         if test "$XGETTEXT" != ":"; then
7907                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7908         : ;
7909       else
7910         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
7911 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
7912         XGETTEXT=":"
7913       fi
7914     fi
7915
7916     # We need to process the po/ directory.
7917     POSUB=po
7918
7919     ac_config_commands="$ac_config_commands default-2"
7920
7921
7922                 for lang in $ALL_LINGUAS; do
7923       GMOFILES="$GMOFILES $lang.gmo"
7924       POFILES="$POFILES $lang.po"
7925     done
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939    if test "x$CATOBJEXT" != "x"; then
7940      if test "x$ALL_LINGUAS" = "x"; then
7941        LINGUAS=
7942      else
7943        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
7944 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
7945        NEW_LINGUAS=
7946        for lang in ${LINGUAS=$ALL_LINGUAS}; do
7947          case "$ALL_LINGUAS" in
7948           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
7949          esac
7950        done
7951        LINGUAS=$NEW_LINGUAS
7952        echo "$as_me:$LINENO: result: $LINGUAS" >&5
7953 echo "${ECHO_T}$LINGUAS" >&6
7954      fi
7955
7956           if test -n "$LINGUAS"; then
7957        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7958      fi
7959    fi
7960
7961             test -d po || mkdir po
7962    if test "$CATOBJEXT" = ".cat"; then
7963      if test "${ac_cv_header_linux_version_h+set}" = set; then
7964   echo "$as_me:$LINENO: checking for linux/version.h" >&5
7965 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
7966 if test "${ac_cv_header_linux_version_h+set}" = set; then
7967   echo $ECHO_N "(cached) $ECHO_C" >&6
7968 fi
7969 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
7970 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
7971 else
7972   # Is the header compilable?
7973 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
7974 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
7975 cat >conftest.$ac_ext <<_ACEOF
7976 #line $LINENO "configure"
7977 #include "confdefs.h"
7978 $ac_includes_default
7979 #include <linux/version.h>
7980 _ACEOF
7981 rm -f conftest.$ac_objext
7982 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7983   (eval $ac_compile) 2>&5
7984   ac_status=$?
7985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7986   (exit $ac_status); } &&
7987          { ac_try='test -s conftest.$ac_objext'
7988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7989   (eval $ac_try) 2>&5
7990   ac_status=$?
7991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7992   (exit $ac_status); }; }; then
7993   ac_header_compiler=yes
7994 else
7995   echo "$as_me: failed program was:" >&5
7996 cat conftest.$ac_ext >&5
7997 ac_header_compiler=no
7998 fi
7999 rm -f conftest.$ac_objext conftest.$ac_ext
8000 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8001 echo "${ECHO_T}$ac_header_compiler" >&6
8002
8003 # Is the header present?
8004 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
8005 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
8006 cat >conftest.$ac_ext <<_ACEOF
8007 #line $LINENO "configure"
8008 #include "confdefs.h"
8009 #include <linux/version.h>
8010 _ACEOF
8011 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8012   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8013   ac_status=$?
8014   egrep -v '^ *\+' conftest.er1 >conftest.err
8015   rm -f conftest.er1
8016   cat conftest.err >&5
8017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8018   (exit $ac_status); } >/dev/null; then
8019   if test -s conftest.err; then
8020     ac_cpp_err=$ac_c_preproc_warn_flag
8021   else
8022     ac_cpp_err=
8023   fi
8024 else
8025   ac_cpp_err=yes
8026 fi
8027 if test -z "$ac_cpp_err"; then
8028   ac_header_preproc=yes
8029 else
8030   echo "$as_me: failed program was:" >&5
8031   cat conftest.$ac_ext >&5
8032   ac_header_preproc=no
8033 fi
8034 rm -f conftest.err conftest.$ac_ext
8035 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8036 echo "${ECHO_T}$ac_header_preproc" >&6
8037
8038 # So?  What about this header?
8039 case $ac_header_compiler:$ac_header_preproc in
8040   yes:no )
8041     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
8042 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8043     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8044 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8045   no:yes )
8046     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
8047 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
8048     { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
8049 echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
8050     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8051 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8052 esac
8053 echo "$as_me:$LINENO: checking for linux/version.h" >&5
8054 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8055 if test "${ac_cv_header_linux_version_h+set}" = set; then
8056   echo $ECHO_N "(cached) $ECHO_C" >&6
8057 else
8058   ac_cv_header_linux_version_h=$ac_header_preproc
8059 fi
8060 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8061 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8062
8063 fi
8064 if test $ac_cv_header_linux_version_h = yes; then
8065   msgformat=linux
8066 else
8067   msgformat=xopen
8068 fi
8069
8070
8071
8072                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
8073    fi
8074
8075             MKINSTALLDIRS=
8076 #
8077 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
8078 #
8079 #   if test -n "$ac_aux_dir"; then
8080 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8081 #   fi
8082    if test -z "$MKINSTALLDIRS"; then
8083      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8084    fi
8085
8086    # jwz: you know what, screw it.  Let's just use the version that I
8087    # already computed in configure.in, instead of this version that came
8088    # with the i18n crud, ok?
8089    MKINSTALLDIRS="$INSTALL_DIRS"
8090
8091
8092
8093
8094          test -d po || mkdir po
8095    if test "x$srcdir" != "x."; then
8096      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8097        posrcprefix="$srcdir/"
8098      else
8099        posrcprefix="../$srcdir/"
8100      fi
8101    else
8102      posrcprefix="../"
8103    fi
8104    rm -f po/POTFILES
8105    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8106         < $srcdir/po/POTFILES.in > po/POTFILES
8107
8108
8109
8110 ###############################################################################
8111 #
8112 #       Check for -lXmu (some fucked up vendors don't ship it...)
8113 #
8114 ###############################################################################
8115
8116 have_xmu=no
8117
8118   ac_save_CPPFLAGS="$CPPFLAGS"
8119   if test \! -z "$includedir" ; then
8120     CPPFLAGS="$CPPFLAGS -I$includedir"
8121   fi
8122   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8123   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
8124 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
8125 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
8126   echo $ECHO_N "(cached) $ECHO_C" >&6
8127 else
8128   cat >conftest.$ac_ext <<_ACEOF
8129 #line $LINENO "configure"
8130 #include "confdefs.h"
8131 #include <stdlib.h>
8132                    #include <stdio.h>
8133                    #include <X11/Intrinsic.h>
8134
8135 #include <X11/Xmu/Error.h>
8136 _ACEOF
8137 rm -f conftest.$ac_objext
8138 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8139   (eval $ac_compile) 2>&5
8140   ac_status=$?
8141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142   (exit $ac_status); } &&
8143          { ac_try='test -s conftest.$ac_objext'
8144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8145   (eval $ac_try) 2>&5
8146   ac_status=$?
8147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148   (exit $ac_status); }; }; then
8149   ac_cv_header_X11_Xmu_Error_h=yes
8150 else
8151   echo "$as_me: failed program was:" >&5
8152 cat conftest.$ac_ext >&5
8153 ac_cv_header_X11_Xmu_Error_h=no
8154 fi
8155 rm -f conftest.$ac_objext conftest.$ac_ext
8156 fi
8157 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
8158 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
8159 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
8160   have_xmu=yes
8161 fi
8162
8163
8164   CPPFLAGS="$ac_save_CPPFLAGS"
8165 if test "$have_xmu" = no ; then
8166   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8167   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8168   XMU_LIBS=''
8169 else
8170   XMU_SRCS=''
8171   XMU_OBJS=''
8172   XMU_LIBS='-lXmu'
8173   cat >>confdefs.h <<\_ACEOF
8174 #define HAVE_XMU 1
8175 _ACEOF
8176
8177 fi
8178
8179
8180 ###############################################################################
8181 #
8182 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8183 #       See comp.windows.x FAQ question 124.  The right fix is to
8184 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8185 #
8186 ###############################################################################
8187
8188 if test "$have_xmu" = yes ; then
8189   case "$host" in
8190     *-sunos4*)
8191     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8192 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
8193 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
8194   echo $ECHO_N "(cached) $ECHO_C" >&6
8195 else
8196   ac_save_LDFLAGS="$LDFLAGS"
8197                     if test \! -z "$x_libraries" ; then
8198                       LDFLAGS="$LDFLAGS -L$x_libraries"
8199                     fi
8200                     # Note: this trick never works!  (Generally.)
8201                     # We're only getting away with using AC_TRY_LINK
8202                     # with X libraries because we know it's SunOS.
8203                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8204                     cat >conftest.$ac_ext <<_ACEOF
8205 #line $LINENO "configure"
8206 #include "confdefs.h"
8207
8208 #ifdef F77_DUMMY_MAIN
8209 #  ifdef __cplusplus
8210      extern "C"
8211 #  endif
8212    int F77_DUMMY_MAIN() { return 1; }
8213 #endif
8214 int
8215 main ()
8216 {
8217
8218   ;
8219   return 0;
8220 }
8221 _ACEOF
8222 rm -f conftest.$ac_objext conftest$ac_exeext
8223 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8224   (eval $ac_link) 2>&5
8225   ac_status=$?
8226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8227   (exit $ac_status); } &&
8228          { ac_try='test -s conftest$ac_exeext'
8229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8230   (eval $ac_try) 2>&5
8231   ac_status=$?
8232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8233   (exit $ac_status); }; }; then
8234   ac_cv_sunos_xmu_bug=no
8235 else
8236   echo "$as_me: failed program was:" >&5
8237 cat conftest.$ac_ext >&5
8238 ac_cv_sunos_xmu_bug=yes
8239 fi
8240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8241                     LDFLAGS="$ac_save_LDFLAGS"
8242 fi
8243 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
8244 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
8245     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8246       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
8247 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
8248 if test "${ac_cv_ld_static+set}" = set; then
8249   echo $ECHO_N "(cached) $ECHO_C" >&6
8250 else
8251   ac_save_LDFLAGS="$LDFLAGS"
8252                       LDFLAGS="$LDFLAGS -static"
8253                       cat >conftest.$ac_ext <<_ACEOF
8254 #line $LINENO "configure"
8255 #include "confdefs.h"
8256
8257 #ifdef F77_DUMMY_MAIN
8258 #  ifdef __cplusplus
8259      extern "C"
8260 #  endif
8261    int F77_DUMMY_MAIN() { return 1; }
8262 #endif
8263 int
8264 main ()
8265 {
8266
8267   ;
8268   return 0;
8269 }
8270 _ACEOF
8271 rm -f conftest.$ac_objext conftest$ac_exeext
8272 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8273   (eval $ac_link) 2>&5
8274   ac_status=$?
8275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8276   (exit $ac_status); } &&
8277          { ac_try='test -s conftest$ac_exeext'
8278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8279   (eval $ac_try) 2>&5
8280   ac_status=$?
8281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8282   (exit $ac_status); }; }; then
8283   ac_cv_ld_static=yes
8284 else
8285   echo "$as_me: failed program was:" >&5
8286 cat conftest.$ac_ext >&5
8287 ac_cv_ld_static=no
8288 fi
8289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8290                     LDFLAGS="$ac_save_LDFLAGS"
8291 fi
8292 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
8293 echo "${ECHO_T}$ac_cv_ld_static" >&6
8294       if test "$ac_cv_ld_static" = yes ; then
8295         LDFLAGS="$LDFLAGS -static"
8296       else
8297         LDFLAGS="$LDFLAGS -Bstatic"
8298       fi
8299     fi
8300     ;;
8301   esac
8302 fi
8303
8304
8305 ###############################################################################
8306 #
8307 #       Handle the --with-hackdir option
8308 #
8309 ###############################################################################
8310
8311 have_hackdir=yes
8312 with_hackdir_req=unspecified
8313
8314 # Check whether --with-hackdir or --without-hackdir was given.
8315 if test "${with_hackdir+set}" = set; then
8316   withval="$with_hackdir"
8317   with_hackdir="$withval"; with_hackdir_req="$withval"
8318 else
8319   with_hackdir=yes
8320 fi;
8321
8322 if test x"$with_hackdir" = xyes; then
8323   HACKDIR='${exec_prefix}/lib/xscreensaver'
8324 elif test x"$with_hackdir" = xno; then
8325   HACKDIR='${bindir}'
8326 else
8327   # there must be a better way than this...
8328   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
8329     # absolute path
8330     HACKDIR=$with_hackdir
8331   else
8332     # relative path
8333     HACKDIR="\${exec_prefix}$with_hackdir"
8334   fi
8335 fi
8336
8337 # canonicalize slashes.
8338 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8339
8340 # This option used to be called --enable-subdir; make sure that is no longer
8341 # used, since configure brain-damagedly ignores unknown --enable options.
8342
8343 obsolete_enable=
8344 # Check whether --enable-subdir or --disable-subdir was given.
8345 if test "${enable_subdir+set}" = set; then
8346   enableval="$enable_subdir"
8347   obsolete_enable=yes
8348 fi;
8349 if test -n "$obsolete_enable"; then
8350   echo "error: the --enable-subdir option has been replaced with"
8351   echo "       the new --with-hackdir option; see \`configure --help'"
8352   echo "       for more information."
8353   exit 1
8354 fi
8355
8356
8357 ###############################################################################
8358 #
8359 #       Handle the --with-configdir option
8360 #
8361 ###############################################################################
8362
8363 have_configdir=yes
8364 with_configdir_req=unspecified
8365
8366 # Check whether --with-configdir or --without-configdir was given.
8367 if test "${with_configdir+set}" = set; then
8368   withval="$with_configdir"
8369   with_configdir="$withval"; with_configdir_req="$withval"
8370 else
8371   with_configdir=yes
8372 fi;
8373
8374 if test x"$with_configdir" = xyes; then
8375   # filled in later...
8376   HACK_CONF_DIR=''
8377 elif test x"$with_configdir" = xno; then
8378   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8379   exit 1
8380 else
8381   # there must be a better way than this...
8382   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8383     # absolute path
8384     HACK_CONF_DIR=$with_configdir
8385   else
8386     # relative path
8387     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8388   fi
8389 fi
8390
8391
8392
8393
8394 ###############################################################################
8395 #
8396 #       Check for the SGI SCREEN_SAVER server extension.
8397 #
8398 ###############################################################################
8399
8400 have_sgi=no
8401 with_sgi_req=unspecified
8402
8403 # Check whether --with-sgi-ext or --without-sgi-ext was given.
8404 if test "${with_sgi_ext+set}" = set; then
8405   withval="$with_sgi_ext"
8406   with_sgi="$withval"; with_sgi_req="$withval"
8407 else
8408   with_sgi=yes
8409 fi;
8410
8411
8412    case "$with_sgi" in
8413     yes) ;;
8414     no)  ;;
8415
8416     /*)
8417      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
8418 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
8419      d=$with_sgi/include
8420      if test -d $d; then
8421        X_CFLAGS="-I$d $X_CFLAGS"
8422        echo "$as_me:$LINENO: result: $d" >&5
8423 echo "${ECHO_T}$d" >&6
8424      else
8425        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8426 echo "${ECHO_T}not found ($d: no such directory)" >&6
8427      fi
8428
8429      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
8430 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
8431      d=$with_sgi/lib
8432      if test -d $d; then
8433        X_LIBS="-L$d $X_LIBS"
8434        echo "$as_me:$LINENO: result: $d" >&5
8435 echo "${ECHO_T}$d" >&6
8436      else
8437        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8438 echo "${ECHO_T}not found ($d: no such directory)" >&6
8439      fi
8440
8441      # replace the directory string with "yes".
8442      with_sgi_req="yes"
8443      with_sgi=$with_sgi_req
8444      ;;
8445
8446     *)
8447      echo ""
8448      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
8449      echo "       If it is a directory, then \`DIR/include' will be added to"
8450      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8451      exit 1
8452      ;;
8453    esac
8454
8455
8456 if test "$with_sgi" = yes; then
8457
8458   ac_save_CPPFLAGS="$CPPFLAGS"
8459   if test \! -z "$includedir" ; then
8460     CPPFLAGS="$CPPFLAGS -I$includedir"
8461   fi
8462   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8463   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
8464 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
8465 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
8466   echo $ECHO_N "(cached) $ECHO_C" >&6
8467 else
8468   cat >conftest.$ac_ext <<_ACEOF
8469 #line $LINENO "configure"
8470 #include "confdefs.h"
8471 #include <X11/Xlib.h>
8472
8473 #include <X11/extensions/XScreenSaver.h>
8474 _ACEOF
8475 rm -f conftest.$ac_objext
8476 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8477   (eval $ac_compile) 2>&5
8478   ac_status=$?
8479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8480   (exit $ac_status); } &&
8481          { ac_try='test -s conftest.$ac_objext'
8482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8483   (eval $ac_try) 2>&5
8484   ac_status=$?
8485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8486   (exit $ac_status); }; }; then
8487   ac_cv_header_X11_extensions_XScreenSaver_h=yes
8488 else
8489   echo "$as_me: failed program was:" >&5
8490 cat conftest.$ac_ext >&5
8491 ac_cv_header_X11_extensions_XScreenSaver_h=no
8492 fi
8493 rm -f conftest.$ac_objext conftest.$ac_ext
8494 fi
8495 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
8496 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
8497 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
8498   have_sgi=yes
8499                      cat >>confdefs.h <<\_ACEOF
8500 #define HAVE_SGI_SAVER_EXTENSION 1
8501 _ACEOF
8502
8503 fi
8504
8505
8506   CPPFLAGS="$ac_save_CPPFLAGS"
8507
8508 elif test "$with_sgi" != no; then
8509   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8510   exit 1
8511 fi
8512
8513
8514 ###############################################################################
8515 #
8516 #       Check for the MIT-SCREEN-SAVER server extension.
8517 #
8518 ###############################################################################
8519
8520 have_mit=no
8521 with_mit_req=unspecified
8522
8523 # Check whether --with-mit-ext or --without-mit-ext was given.
8524 if test "${with_mit_ext+set}" = set; then
8525   withval="$with_mit_ext"
8526   with_mit="$withval"; with_mit_req="$withval"
8527 else
8528   with_mit=yes
8529 fi;
8530
8531
8532    case "$with_mit" in
8533     yes) ;;
8534     no)  ;;
8535
8536     /*)
8537      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
8538 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
8539      d=$with_mit/include
8540      if test -d $d; then
8541        X_CFLAGS="-I$d $X_CFLAGS"
8542        echo "$as_me:$LINENO: result: $d" >&5
8543 echo "${ECHO_T}$d" >&6
8544      else
8545        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8546 echo "${ECHO_T}not found ($d: no such directory)" >&6
8547      fi
8548
8549      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
8550 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
8551      d=$with_mit/lib
8552      if test -d $d; then
8553        X_LIBS="-L$d $X_LIBS"
8554        echo "$as_me:$LINENO: result: $d" >&5
8555 echo "${ECHO_T}$d" >&6
8556      else
8557        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8558 echo "${ECHO_T}not found ($d: no such directory)" >&6
8559      fi
8560
8561      # replace the directory string with "yes".
8562      with_mit_req="yes"
8563      with_mit=$with_mit_req
8564      ;;
8565
8566     *)
8567      echo ""
8568      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
8569      echo "       If it is a directory, then \`DIR/include' will be added to"
8570      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8571      exit 1
8572      ;;
8573    esac
8574
8575
8576 if test "$with_mit" = yes; then
8577
8578   ac_save_CPPFLAGS="$CPPFLAGS"
8579   if test \! -z "$includedir" ; then
8580     CPPFLAGS="$CPPFLAGS -I$includedir"
8581   fi
8582   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8583   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
8584 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
8585 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
8586   echo $ECHO_N "(cached) $ECHO_C" >&6
8587 else
8588   cat >conftest.$ac_ext <<_ACEOF
8589 #line $LINENO "configure"
8590 #include "confdefs.h"
8591 #include <X11/Xlib.h>
8592
8593 #include <X11/extensions/scrnsaver.h>
8594 _ACEOF
8595 rm -f conftest.$ac_objext
8596 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8597   (eval $ac_compile) 2>&5
8598   ac_status=$?
8599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8600   (exit $ac_status); } &&
8601          { ac_try='test -s conftest.$ac_objext'
8602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8603   (eval $ac_try) 2>&5
8604   ac_status=$?
8605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8606   (exit $ac_status); }; }; then
8607   ac_cv_header_X11_extensions_scrnsaver_h=yes
8608 else
8609   echo "$as_me: failed program was:" >&5
8610 cat conftest.$ac_ext >&5
8611 ac_cv_header_X11_extensions_scrnsaver_h=no
8612 fi
8613 rm -f conftest.$ac_objext conftest.$ac_ext
8614 fi
8615 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
8616 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
8617 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
8618   have_mit=yes
8619 fi
8620
8621
8622   CPPFLAGS="$ac_save_CPPFLAGS"
8623
8624   # Now check to see if it's really in the library; XF86Free-3.3 ships
8625   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
8626   #
8627   if test "$have_mit" = yes; then
8628
8629   ac_save_CPPFLAGS="$CPPFLAGS"
8630   ac_save_LDFLAGS="$LDFLAGS"
8631 #  ac_save_LIBS="$LIBS"
8632
8633   if test \! -z "$includedir" ; then
8634     CPPFLAGS="$CPPFLAGS -I$includedir"
8635   fi
8636   # note: $X_CFLAGS includes $x_includes
8637   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8638
8639   if test \! -z "$libdir" ; then
8640     LDFLAGS="$LDFLAGS -L$libdir"
8641   fi
8642   # note: $X_LIBS includes $x_libraries
8643   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8644
8645   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
8646 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
8647 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
8648   echo $ECHO_N "(cached) $ECHO_C" >&6
8649 else
8650   ac_check_lib_save_LIBS=$LIBS
8651 LIBS="-lXext -lm $LIBS"
8652 cat >conftest.$ac_ext <<_ACEOF
8653 #line $LINENO "configure"
8654 #include "confdefs.h"
8655
8656 /* Override any gcc2 internal prototype to avoid an error.  */
8657 #ifdef __cplusplus
8658 extern "C"
8659 #endif
8660 /* We use char because int might match the return type of a gcc2
8661    builtin and then its argument prototype would still apply.  */
8662 char XScreenSaverRegister ();
8663 #ifdef F77_DUMMY_MAIN
8664 #  ifdef __cplusplus
8665      extern "C"
8666 #  endif
8667    int F77_DUMMY_MAIN() { return 1; }
8668 #endif
8669 int
8670 main ()
8671 {
8672 XScreenSaverRegister ();
8673   ;
8674   return 0;
8675 }
8676 _ACEOF
8677 rm -f conftest.$ac_objext conftest$ac_exeext
8678 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8679   (eval $ac_link) 2>&5
8680   ac_status=$?
8681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8682   (exit $ac_status); } &&
8683          { ac_try='test -s conftest$ac_exeext'
8684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8685   (eval $ac_try) 2>&5
8686   ac_status=$?
8687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8688   (exit $ac_status); }; }; then
8689   ac_cv_lib_Xext_XScreenSaverRegister=yes
8690 else
8691   echo "$as_me: failed program was:" >&5
8692 cat conftest.$ac_ext >&5
8693 ac_cv_lib_Xext_XScreenSaverRegister=no
8694 fi
8695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8696 LIBS=$ac_check_lib_save_LIBS
8697 fi
8698 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
8699 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
8700 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
8701   true
8702 else
8703   have_mit=no
8704 fi
8705
8706   CPPFLAGS="$ac_save_CPPFLAGS"
8707   LDFLAGS="$ac_save_LDFLAGS"
8708 #  LIBS="$ac_save_LIBS"
8709
8710
8711     if test "$have_mit" = no; then
8712       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
8713       # of in Xext.  Thank you master, may I have another.
8714
8715   ac_save_CPPFLAGS="$CPPFLAGS"
8716   ac_save_LDFLAGS="$LDFLAGS"
8717 #  ac_save_LIBS="$LIBS"
8718
8719   if test \! -z "$includedir" ; then
8720     CPPFLAGS="$CPPFLAGS -I$includedir"
8721   fi
8722   # note: $X_CFLAGS includes $x_includes
8723   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8724
8725   if test \! -z "$libdir" ; then
8726     LDFLAGS="$LDFLAGS -L$libdir"
8727   fi
8728   # note: $X_LIBS includes $x_libraries
8729   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8730
8731   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
8732 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
8733 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
8734   echo $ECHO_N "(cached) $ECHO_C" >&6
8735 else
8736   ac_check_lib_save_LIBS=$LIBS
8737 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
8738 cat >conftest.$ac_ext <<_ACEOF
8739 #line $LINENO "configure"
8740 #include "confdefs.h"
8741
8742 /* Override any gcc2 internal prototype to avoid an error.  */
8743 #ifdef __cplusplus
8744 extern "C"
8745 #endif
8746 /* We use char because int might match the return type of a gcc2
8747    builtin and then its argument prototype would still apply.  */
8748 char XScreenSaverRegister ();
8749 #ifdef F77_DUMMY_MAIN
8750 #  ifdef __cplusplus
8751      extern "C"
8752 #  endif
8753    int F77_DUMMY_MAIN() { return 1; }
8754 #endif
8755 int
8756 main ()
8757 {
8758 XScreenSaverRegister ();
8759   ;
8760   return 0;
8761 }
8762 _ACEOF
8763 rm -f conftest.$ac_objext conftest$ac_exeext
8764 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8765   (eval $ac_link) 2>&5
8766   ac_status=$?
8767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8768   (exit $ac_status); } &&
8769          { ac_try='test -s conftest$ac_exeext'
8770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8771   (eval $ac_try) 2>&5
8772   ac_status=$?
8773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8774   (exit $ac_status); }; }; then
8775   ac_cv_lib_XExExt_XScreenSaverRegister=yes
8776 else
8777   echo "$as_me: failed program was:" >&5
8778 cat conftest.$ac_ext >&5
8779 ac_cv_lib_XExExt_XScreenSaverRegister=no
8780 fi
8781 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8782 LIBS=$ac_check_lib_save_LIBS
8783 fi
8784 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
8785 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
8786 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
8787   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
8788 else
8789   true
8790 fi
8791
8792   CPPFLAGS="$ac_save_CPPFLAGS"
8793   LDFLAGS="$ac_save_LDFLAGS"
8794 #  LIBS="$ac_save_LIBS"
8795
8796     fi
8797
8798     if test "$have_mit" = no; then
8799       # Double fuck!  Looks like some versions of XFree86 (whichever version
8800       # it is that comes with RedHat Linux 2.0 -- I can't find a version
8801       # number) put this garbage in Xss instead of Xext.  Thank you master,
8802       #  may I have another.
8803
8804   ac_save_CPPFLAGS="$CPPFLAGS"
8805   ac_save_LDFLAGS="$LDFLAGS"
8806 #  ac_save_LIBS="$LIBS"
8807
8808   if test \! -z "$includedir" ; then
8809     CPPFLAGS="$CPPFLAGS -I$includedir"
8810   fi
8811   # note: $X_CFLAGS includes $x_includes
8812   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8813
8814   if test \! -z "$libdir" ; then
8815     LDFLAGS="$LDFLAGS -L$libdir"
8816   fi
8817   # note: $X_LIBS includes $x_libraries
8818   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8819
8820   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
8821 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
8822 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
8823   echo $ECHO_N "(cached) $ECHO_C" >&6
8824 else
8825   ac_check_lib_save_LIBS=$LIBS
8826 LIBS="-lXss -lX11 -lXext -lm $LIBS"
8827 cat >conftest.$ac_ext <<_ACEOF
8828 #line $LINENO "configure"
8829 #include "confdefs.h"
8830
8831 /* Override any gcc2 internal prototype to avoid an error.  */
8832 #ifdef __cplusplus
8833 extern "C"
8834 #endif
8835 /* We use char because int might match the return type of a gcc2
8836    builtin and then its argument prototype would still apply.  */
8837 char XScreenSaverRegister ();
8838 #ifdef F77_DUMMY_MAIN
8839 #  ifdef __cplusplus
8840      extern "C"
8841 #  endif
8842    int F77_DUMMY_MAIN() { return 1; }
8843 #endif
8844 int
8845 main ()
8846 {
8847 XScreenSaverRegister ();
8848   ;
8849   return 0;
8850 }
8851 _ACEOF
8852 rm -f conftest.$ac_objext conftest$ac_exeext
8853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8854   (eval $ac_link) 2>&5
8855   ac_status=$?
8856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8857   (exit $ac_status); } &&
8858          { ac_try='test -s conftest$ac_exeext'
8859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8860   (eval $ac_try) 2>&5
8861   ac_status=$?
8862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8863   (exit $ac_status); }; }; then
8864   ac_cv_lib_Xss_XScreenSaverRegister=yes
8865 else
8866   echo "$as_me: failed program was:" >&5
8867 cat conftest.$ac_ext >&5
8868 ac_cv_lib_Xss_XScreenSaverRegister=no
8869 fi
8870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8871 LIBS=$ac_check_lib_save_LIBS
8872 fi
8873 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
8874 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
8875 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
8876   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
8877 else
8878   true
8879 fi
8880
8881   CPPFLAGS="$ac_save_CPPFLAGS"
8882   LDFLAGS="$ac_save_LDFLAGS"
8883 #  LIBS="$ac_save_LIBS"
8884
8885     fi
8886
8887   if test "$have_mit" = yes; then
8888     cat >>confdefs.h <<\_ACEOF
8889 #define HAVE_MIT_SAVER_EXTENSION 1
8890 _ACEOF
8891
8892   fi
8893
8894   fi
8895
8896 elif test "$with_mit" != no; then
8897   echo "error: must be yes or no: --with-mit-ext=$with_mit"
8898   exit 1
8899 fi
8900
8901
8902 ###############################################################################
8903 #
8904 #       Check for the XIDLE server extension.
8905 #
8906 ###############################################################################
8907
8908 have_xidle=no
8909 with_xidle_req=unspecified
8910
8911 # Check whether --with-xidle-ext or --without-xidle-ext was given.
8912 if test "${with_xidle_ext+set}" = set; then
8913   withval="$with_xidle_ext"
8914   with_xidle="$withval"; with_xidle_req="$withval"
8915 else
8916   with_xidle=yes
8917 fi;
8918
8919
8920    case "$with_xidle" in
8921     yes) ;;
8922     no)  ;;
8923
8924     /*)
8925      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
8926 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
8927      d=$with_xidle/include
8928      if test -d $d; then
8929        X_CFLAGS="-I$d $X_CFLAGS"
8930        echo "$as_me:$LINENO: result: $d" >&5
8931 echo "${ECHO_T}$d" >&6
8932      else
8933        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8934 echo "${ECHO_T}not found ($d: no such directory)" >&6
8935      fi
8936
8937      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
8938 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
8939      d=$with_xidle/lib
8940      if test -d $d; then
8941        X_LIBS="-L$d $X_LIBS"
8942        echo "$as_me:$LINENO: result: $d" >&5
8943 echo "${ECHO_T}$d" >&6
8944      else
8945        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8946 echo "${ECHO_T}not found ($d: no such directory)" >&6
8947      fi
8948
8949      # replace the directory string with "yes".
8950      with_xidle_req="yes"
8951      with_xidle=$with_xidle_req
8952      ;;
8953
8954     *)
8955      echo ""
8956      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
8957      echo "       If it is a directory, then \`DIR/include' will be added to"
8958      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8959      exit 1
8960      ;;
8961    esac
8962
8963
8964 if test "$with_xidle" = yes; then
8965
8966   ac_save_CPPFLAGS="$CPPFLAGS"
8967   if test \! -z "$includedir" ; then
8968     CPPFLAGS="$CPPFLAGS -I$includedir"
8969   fi
8970   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8971   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
8972 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
8973 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
8974   echo $ECHO_N "(cached) $ECHO_C" >&6
8975 else
8976   cat >conftest.$ac_ext <<_ACEOF
8977 #line $LINENO "configure"
8978 #include "confdefs.h"
8979 #include <X11/Xlib.h>
8980
8981 #include <X11/extensions/xidle.h>
8982 _ACEOF
8983 rm -f conftest.$ac_objext
8984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8985   (eval $ac_compile) 2>&5
8986   ac_status=$?
8987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8988   (exit $ac_status); } &&
8989          { ac_try='test -s conftest.$ac_objext'
8990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8991   (eval $ac_try) 2>&5
8992   ac_status=$?
8993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8994   (exit $ac_status); }; }; then
8995   ac_cv_header_X11_extensions_xidle_h=yes
8996 else
8997   echo "$as_me: failed program was:" >&5
8998 cat conftest.$ac_ext >&5
8999 ac_cv_header_X11_extensions_xidle_h=no
9000 fi
9001 rm -f conftest.$ac_objext conftest.$ac_ext
9002 fi
9003 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9004 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9005 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9006   have_xidle=yes
9007                      cat >>confdefs.h <<\_ACEOF
9008 #define HAVE_XIDLE_EXTENSION 1
9009 _ACEOF
9010
9011 fi
9012
9013
9014   CPPFLAGS="$ac_save_CPPFLAGS"
9015 elif test "$with_xidle" != no; then
9016   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9017   exit 1
9018 fi
9019
9020
9021 ###############################################################################
9022 #
9023 #       Check for the SGI-VIDEO-CONTROL server extension.
9024 #
9025 ###############################################################################
9026
9027 have_sgivc=no
9028 with_sgivc_req=unspecified
9029
9030 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9031 if test "${with_sgivc_ext+set}" = set; then
9032   withval="$with_sgivc_ext"
9033   with_sgivc="$withval"; with_sgivc_req="$withval"
9034 else
9035   with_sgivc=yes
9036 fi;
9037
9038
9039    case "$with_sgivc" in
9040     yes) ;;
9041     no)  ;;
9042
9043     /*)
9044      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9045 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9046      d=$with_sgivc/include
9047      if test -d $d; then
9048        X_CFLAGS="-I$d $X_CFLAGS"
9049        echo "$as_me:$LINENO: result: $d" >&5
9050 echo "${ECHO_T}$d" >&6
9051      else
9052        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9053 echo "${ECHO_T}not found ($d: no such directory)" >&6
9054      fi
9055
9056      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9057 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9058      d=$with_sgivc/lib
9059      if test -d $d; then
9060        X_LIBS="-L$d $X_LIBS"
9061        echo "$as_me:$LINENO: result: $d" >&5
9062 echo "${ECHO_T}$d" >&6
9063      else
9064        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9065 echo "${ECHO_T}not found ($d: no such directory)" >&6
9066      fi
9067
9068      # replace the directory string with "yes".
9069      with_sgivc_req="yes"
9070      with_sgivc=$with_sgivc_req
9071      ;;
9072
9073     *)
9074      echo ""
9075      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9076      echo "       If it is a directory, then \`DIR/include' will be added to"
9077      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9078      exit 1
9079      ;;
9080    esac
9081
9082
9083 if test "$with_sgivc" = yes; then
9084
9085   # first check for XSGIvc.h
9086
9087   ac_save_CPPFLAGS="$CPPFLAGS"
9088   if test \! -z "$includedir" ; then
9089     CPPFLAGS="$CPPFLAGS -I$includedir"
9090   fi
9091   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9092   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9093 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9094 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9095   echo $ECHO_N "(cached) $ECHO_C" >&6
9096 else
9097   cat >conftest.$ac_ext <<_ACEOF
9098 #line $LINENO "configure"
9099 #include "confdefs.h"
9100 #include <X11/Xlib.h>
9101
9102 #include <X11/extensions/XSGIvc.h>
9103 _ACEOF
9104 rm -f conftest.$ac_objext
9105 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9106   (eval $ac_compile) 2>&5
9107   ac_status=$?
9108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109   (exit $ac_status); } &&
9110          { ac_try='test -s conftest.$ac_objext'
9111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9112   (eval $ac_try) 2>&5
9113   ac_status=$?
9114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9115   (exit $ac_status); }; }; then
9116   ac_cv_header_X11_extensions_XSGIvc_h=yes
9117 else
9118   echo "$as_me: failed program was:" >&5
9119 cat conftest.$ac_ext >&5
9120 ac_cv_header_X11_extensions_XSGIvc_h=no
9121 fi
9122 rm -f conftest.$ac_objext conftest.$ac_ext
9123 fi
9124 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9125 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9126 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
9127   have_sgivc=yes
9128 fi
9129
9130
9131   CPPFLAGS="$ac_save_CPPFLAGS"
9132
9133   # if that succeeded, then check for the -lXsgivc
9134   if test "$have_sgivc" = yes; then
9135     have_sgivc=no
9136
9137   ac_save_CPPFLAGS="$CPPFLAGS"
9138   ac_save_LDFLAGS="$LDFLAGS"
9139 #  ac_save_LIBS="$LIBS"
9140
9141   if test \! -z "$includedir" ; then
9142     CPPFLAGS="$CPPFLAGS -I$includedir"
9143   fi
9144   # note: $X_CFLAGS includes $x_includes
9145   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9146
9147   if test \! -z "$libdir" ; then
9148     LDFLAGS="$LDFLAGS -L$libdir"
9149   fi
9150   # note: $X_LIBS includes $x_libraries
9151   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9152
9153   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
9154 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
9155 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
9156   echo $ECHO_N "(cached) $ECHO_C" >&6
9157 else
9158   ac_check_lib_save_LIBS=$LIBS
9159 LIBS="-lXsgivc -lXext -lX11 $LIBS"
9160 cat >conftest.$ac_ext <<_ACEOF
9161 #line $LINENO "configure"
9162 #include "confdefs.h"
9163
9164 /* Override any gcc2 internal prototype to avoid an error.  */
9165 #ifdef __cplusplus
9166 extern "C"
9167 #endif
9168 /* We use char because int might match the return type of a gcc2
9169    builtin and then its argument prototype would still apply.  */
9170 char XSGIvcQueryGammaMap ();
9171 #ifdef F77_DUMMY_MAIN
9172 #  ifdef __cplusplus
9173      extern "C"
9174 #  endif
9175    int F77_DUMMY_MAIN() { return 1; }
9176 #endif
9177 int
9178 main ()
9179 {
9180 XSGIvcQueryGammaMap ();
9181   ;
9182   return 0;
9183 }
9184 _ACEOF
9185 rm -f conftest.$ac_objext conftest$ac_exeext
9186 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9187   (eval $ac_link) 2>&5
9188   ac_status=$?
9189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9190   (exit $ac_status); } &&
9191          { ac_try='test -s conftest$ac_exeext'
9192   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9193   (eval $ac_try) 2>&5
9194   ac_status=$?
9195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9196   (exit $ac_status); }; }; then
9197   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
9198 else
9199   echo "$as_me: failed program was:" >&5
9200 cat conftest.$ac_ext >&5
9201 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
9202 fi
9203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9204 LIBS=$ac_check_lib_save_LIBS
9205 fi
9206 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
9207 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
9208 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
9209   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
9210 else
9211   true
9212 fi
9213
9214   CPPFLAGS="$ac_save_CPPFLAGS"
9215   LDFLAGS="$ac_save_LDFLAGS"
9216 #  LIBS="$ac_save_LIBS"
9217
9218   fi
9219
9220   # if that succeeded, then we've really got it.
9221   if test "$have_sgivc" = yes; then
9222     cat >>confdefs.h <<\_ACEOF
9223 #define HAVE_SGI_VC_EXTENSION 1
9224 _ACEOF
9225
9226   fi
9227
9228 elif test "$with_sgivc" != no; then
9229   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
9230   exit 1
9231 fi
9232
9233
9234 ###############################################################################
9235 #
9236 #       Check for the DPMS server extension.
9237 #
9238 ###############################################################################
9239
9240 have_dpms=no
9241 with_dpms_req=unspecified
9242
9243 # Check whether --with-dpms-ext or --without-dpms-ext was given.
9244 if test "${with_dpms_ext+set}" = set; then
9245   withval="$with_dpms_ext"
9246   with_dpms="$withval"; with_dpms_req="$withval"
9247 else
9248   with_dpms=yes
9249 fi;
9250
9251
9252    case "$with_dpms" in
9253     yes) ;;
9254     no)  ;;
9255
9256     /*)
9257      echo "$as_me:$LINENO: checking for DPMS headers" >&5
9258 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
9259      d=$with_dpms/include
9260      if test -d $d; then
9261        X_CFLAGS="-I$d $X_CFLAGS"
9262        echo "$as_me:$LINENO: result: $d" >&5
9263 echo "${ECHO_T}$d" >&6
9264      else
9265        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9266 echo "${ECHO_T}not found ($d: no such directory)" >&6
9267      fi
9268
9269      echo "$as_me:$LINENO: checking for DPMS libs" >&5
9270 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
9271      d=$with_dpms/lib
9272      if test -d $d; then
9273        X_LIBS="-L$d $X_LIBS"
9274        echo "$as_me:$LINENO: result: $d" >&5
9275 echo "${ECHO_T}$d" >&6
9276      else
9277        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9278 echo "${ECHO_T}not found ($d: no such directory)" >&6
9279      fi
9280
9281      # replace the directory string with "yes".
9282      with_dpms_req="yes"
9283      with_dpms=$with_dpms_req
9284      ;;
9285
9286     *)
9287      echo ""
9288      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
9289      echo "       If it is a directory, then \`DIR/include' will be added to"
9290      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9291      exit 1
9292      ;;
9293    esac
9294
9295
9296 if test "$with_dpms" = yes; then
9297
9298   # first check for dpms.h
9299
9300   ac_save_CPPFLAGS="$CPPFLAGS"
9301   if test \! -z "$includedir" ; then
9302     CPPFLAGS="$CPPFLAGS -I$includedir"
9303   fi
9304   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9305   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
9306 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
9307 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
9308   echo $ECHO_N "(cached) $ECHO_C" >&6
9309 else
9310   cat >conftest.$ac_ext <<_ACEOF
9311 #line $LINENO "configure"
9312 #include "confdefs.h"
9313 #include <X11/Xlib.h>
9314
9315 #include <X11/extensions/dpms.h>
9316 _ACEOF
9317 rm -f conftest.$ac_objext
9318 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9319   (eval $ac_compile) 2>&5
9320   ac_status=$?
9321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9322   (exit $ac_status); } &&
9323          { ac_try='test -s conftest.$ac_objext'
9324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9325   (eval $ac_try) 2>&5
9326   ac_status=$?
9327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328   (exit $ac_status); }; }; then
9329   ac_cv_header_X11_extensions_dpms_h=yes
9330 else
9331   echo "$as_me: failed program was:" >&5
9332 cat conftest.$ac_ext >&5
9333 ac_cv_header_X11_extensions_dpms_h=no
9334 fi
9335 rm -f conftest.$ac_objext conftest.$ac_ext
9336 fi
9337 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
9338 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
9339 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
9340   have_dpms=yes
9341 fi
9342
9343
9344   CPPFLAGS="$ac_save_CPPFLAGS"
9345
9346   # if that succeeded, then check for the DPMS code in the libraries
9347   if test "$have_dpms" = yes; then
9348
9349     # first look in -lXext (this is where it is with XFree86 4.0)
9350     have_dpms=no
9351
9352   ac_save_CPPFLAGS="$CPPFLAGS"
9353   ac_save_LDFLAGS="$LDFLAGS"
9354 #  ac_save_LIBS="$LIBS"
9355
9356   if test \! -z "$includedir" ; then
9357     CPPFLAGS="$CPPFLAGS -I$includedir"
9358   fi
9359   # note: $X_CFLAGS includes $x_includes
9360   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9361
9362   if test \! -z "$libdir" ; then
9363     LDFLAGS="$LDFLAGS -L$libdir"
9364   fi
9365   # note: $X_LIBS includes $x_libraries
9366   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9367
9368   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
9369 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
9370 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
9371   echo $ECHO_N "(cached) $ECHO_C" >&6
9372 else
9373   ac_check_lib_save_LIBS=$LIBS
9374 LIBS="-lXext -lXext -lX11 $LIBS"
9375 cat >conftest.$ac_ext <<_ACEOF
9376 #line $LINENO "configure"
9377 #include "confdefs.h"
9378
9379 /* Override any gcc2 internal prototype to avoid an error.  */
9380 #ifdef __cplusplus
9381 extern "C"
9382 #endif
9383 /* We use char because int might match the return type of a gcc2
9384    builtin and then its argument prototype would still apply.  */
9385 char DPMSInfo ();
9386 #ifdef F77_DUMMY_MAIN
9387 #  ifdef __cplusplus
9388      extern "C"
9389 #  endif
9390    int F77_DUMMY_MAIN() { return 1; }
9391 #endif
9392 int
9393 main ()
9394 {
9395 DPMSInfo ();
9396   ;
9397   return 0;
9398 }
9399 _ACEOF
9400 rm -f conftest.$ac_objext conftest$ac_exeext
9401 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9402   (eval $ac_link) 2>&5
9403   ac_status=$?
9404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9405   (exit $ac_status); } &&
9406          { ac_try='test -s conftest$ac_exeext'
9407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9408   (eval $ac_try) 2>&5
9409   ac_status=$?
9410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9411   (exit $ac_status); }; }; then
9412   ac_cv_lib_Xext_DPMSInfo=yes
9413 else
9414   echo "$as_me: failed program was:" >&5
9415 cat conftest.$ac_ext >&5
9416 ac_cv_lib_Xext_DPMSInfo=no
9417 fi
9418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9419 LIBS=$ac_check_lib_save_LIBS
9420 fi
9421 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
9422 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
9423 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
9424   have_dpms=yes
9425 else
9426   true
9427 fi
9428
9429   CPPFLAGS="$ac_save_CPPFLAGS"
9430   LDFLAGS="$ac_save_LDFLAGS"
9431 #  LIBS="$ac_save_LIBS"
9432
9433
9434     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
9435     if test "$have_dpms" = no; then
9436
9437   ac_save_CPPFLAGS="$CPPFLAGS"
9438   ac_save_LDFLAGS="$LDFLAGS"
9439 #  ac_save_LIBS="$LIBS"
9440
9441   if test \! -z "$includedir" ; then
9442     CPPFLAGS="$CPPFLAGS -I$includedir"
9443   fi
9444   # note: $X_CFLAGS includes $x_includes
9445   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9446
9447   if test \! -z "$libdir" ; then
9448     LDFLAGS="$LDFLAGS -L$libdir"
9449   fi
9450   # note: $X_LIBS includes $x_libraries
9451   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9452
9453   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
9454 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
9455 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
9456   echo $ECHO_N "(cached) $ECHO_C" >&6
9457 else
9458   ac_check_lib_save_LIBS=$LIBS
9459 LIBS="-lXdpms -lXext -lX11 $LIBS"
9460 cat >conftest.$ac_ext <<_ACEOF
9461 #line $LINENO "configure"
9462 #include "confdefs.h"
9463
9464 /* Override any gcc2 internal prototype to avoid an error.  */
9465 #ifdef __cplusplus
9466 extern "C"
9467 #endif
9468 /* We use char because int might match the return type of a gcc2
9469    builtin and then its argument prototype would still apply.  */
9470 char DPMSInfo ();
9471 #ifdef F77_DUMMY_MAIN
9472 #  ifdef __cplusplus
9473      extern "C"
9474 #  endif
9475    int F77_DUMMY_MAIN() { return 1; }
9476 #endif
9477 int
9478 main ()
9479 {
9480 DPMSInfo ();
9481   ;
9482   return 0;
9483 }
9484 _ACEOF
9485 rm -f conftest.$ac_objext conftest$ac_exeext
9486 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9487   (eval $ac_link) 2>&5
9488   ac_status=$?
9489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9490   (exit $ac_status); } &&
9491          { ac_try='test -s conftest$ac_exeext'
9492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9493   (eval $ac_try) 2>&5
9494   ac_status=$?
9495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9496   (exit $ac_status); }; }; then
9497   ac_cv_lib_Xdpms_DPMSInfo=yes
9498 else
9499   echo "$as_me: failed program was:" >&5
9500 cat conftest.$ac_ext >&5
9501 ac_cv_lib_Xdpms_DPMSInfo=no
9502 fi
9503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9504 LIBS=$ac_check_lib_save_LIBS
9505 fi
9506 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
9507 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
9508 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
9509   have_dpms=yes; XDPMS_LIBS="-lXdpms"
9510 else
9511   true
9512 fi
9513
9514   CPPFLAGS="$ac_save_CPPFLAGS"
9515   LDFLAGS="$ac_save_LDFLAGS"
9516 #  LIBS="$ac_save_LIBS"
9517
9518     fi
9519   fi
9520
9521
9522   # if that succeeded, then we've really got it.
9523   if test "$have_dpms" = yes; then
9524     cat >>confdefs.h <<\_ACEOF
9525 #define HAVE_DPMS_EXTENSION 1
9526 _ACEOF
9527
9528   fi
9529
9530 elif test "$with_dpms" != no; then
9531   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
9532   exit 1
9533 fi
9534
9535
9536 ###############################################################################
9537 #
9538 #       Check for the XINERAMA server extension.
9539 #
9540 ###############################################################################
9541
9542 have_xinerama=no
9543 with_xinerama_req=unspecified
9544
9545 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
9546 if test "${with_xinerama_ext+set}" = set; then
9547   withval="$with_xinerama_ext"
9548   with_xinerama="$withval"; with_xinerama_req="$withval"
9549 else
9550   with_xinerama=yes
9551 fi;
9552
9553
9554    case "$with_xinerama" in
9555     yes) ;;
9556     no)  ;;
9557
9558     /*)
9559      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
9560 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
9561      d=$with_xinerama/include
9562      if test -d $d; then
9563        X_CFLAGS="-I$d $X_CFLAGS"
9564        echo "$as_me:$LINENO: result: $d" >&5
9565 echo "${ECHO_T}$d" >&6
9566      else
9567        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9568 echo "${ECHO_T}not found ($d: no such directory)" >&6
9569      fi
9570
9571      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
9572 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
9573      d=$with_xinerama/lib
9574      if test -d $d; then
9575        X_LIBS="-L$d $X_LIBS"
9576        echo "$as_me:$LINENO: result: $d" >&5
9577 echo "${ECHO_T}$d" >&6
9578      else
9579        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9580 echo "${ECHO_T}not found ($d: no such directory)" >&6
9581      fi
9582
9583      # replace the directory string with "yes".
9584      with_xinerama_req="yes"
9585      with_xinerama=$with_xinerama_req
9586      ;;
9587
9588     *)
9589      echo ""
9590      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
9591      echo "       If it is a directory, then \`DIR/include' will be added to"
9592      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9593      exit 1
9594      ;;
9595    esac
9596
9597
9598 if test "$with_xinerama" = yes; then
9599
9600   # first check for Xinerama.h
9601
9602   ac_save_CPPFLAGS="$CPPFLAGS"
9603   if test \! -z "$includedir" ; then
9604     CPPFLAGS="$CPPFLAGS -I$includedir"
9605   fi
9606   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9607   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
9608 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
9609 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
9610   echo $ECHO_N "(cached) $ECHO_C" >&6
9611 else
9612   cat >conftest.$ac_ext <<_ACEOF
9613 #line $LINENO "configure"
9614 #include "confdefs.h"
9615 #include <X11/Xlib.h>
9616
9617 #include <X11/extensions/Xinerama.h>
9618 _ACEOF
9619 rm -f conftest.$ac_objext
9620 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9621   (eval $ac_compile) 2>&5
9622   ac_status=$?
9623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9624   (exit $ac_status); } &&
9625          { ac_try='test -s conftest.$ac_objext'
9626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9627   (eval $ac_try) 2>&5
9628   ac_status=$?
9629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9630   (exit $ac_status); }; }; then
9631   ac_cv_header_X11_extensions_Xinerama_h=yes
9632 else
9633   echo "$as_me: failed program was:" >&5
9634 cat conftest.$ac_ext >&5
9635 ac_cv_header_X11_extensions_Xinerama_h=no
9636 fi
9637 rm -f conftest.$ac_objext conftest.$ac_ext
9638 fi
9639 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
9640 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
9641 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
9642   have_xinerama=yes
9643 fi
9644
9645
9646   CPPFLAGS="$ac_save_CPPFLAGS"
9647
9648   # if that succeeded, then check for the XINERAMA code in the libraries
9649   if test "$have_xinerama" = yes; then
9650
9651     # first look in -lXext
9652     have_xinerama=no
9653
9654   ac_save_CPPFLAGS="$CPPFLAGS"
9655   ac_save_LDFLAGS="$LDFLAGS"
9656 #  ac_save_LIBS="$LIBS"
9657
9658   if test \! -z "$includedir" ; then
9659     CPPFLAGS="$CPPFLAGS -I$includedir"
9660   fi
9661   # note: $X_CFLAGS includes $x_includes
9662   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9663
9664   if test \! -z "$libdir" ; then
9665     LDFLAGS="$LDFLAGS -L$libdir"
9666   fi
9667   # note: $X_LIBS includes $x_libraries
9668   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9669
9670   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXext" >&5
9671 echo $ECHO_N "checking for XineramaQueryExtension in -lXext... $ECHO_C" >&6
9672 if test "${ac_cv_lib_Xext_XineramaQueryExtension+set}" = set; then
9673   echo $ECHO_N "(cached) $ECHO_C" >&6
9674 else
9675   ac_check_lib_save_LIBS=$LIBS
9676 LIBS="-lXext -lXext -lX11 $LIBS"
9677 cat >conftest.$ac_ext <<_ACEOF
9678 #line $LINENO "configure"
9679 #include "confdefs.h"
9680
9681 /* Override any gcc2 internal prototype to avoid an error.  */
9682 #ifdef __cplusplus
9683 extern "C"
9684 #endif
9685 /* We use char because int might match the return type of a gcc2
9686    builtin and then its argument prototype would still apply.  */
9687 char XineramaQueryExtension ();
9688 #ifdef F77_DUMMY_MAIN
9689 #  ifdef __cplusplus
9690      extern "C"
9691 #  endif
9692    int F77_DUMMY_MAIN() { return 1; }
9693 #endif
9694 int
9695 main ()
9696 {
9697 XineramaQueryExtension ();
9698   ;
9699   return 0;
9700 }
9701 _ACEOF
9702 rm -f conftest.$ac_objext conftest$ac_exeext
9703 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9704   (eval $ac_link) 2>&5
9705   ac_status=$?
9706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9707   (exit $ac_status); } &&
9708          { ac_try='test -s conftest$ac_exeext'
9709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9710   (eval $ac_try) 2>&5
9711   ac_status=$?
9712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9713   (exit $ac_status); }; }; then
9714   ac_cv_lib_Xext_XineramaQueryExtension=yes
9715 else
9716   echo "$as_me: failed program was:" >&5
9717 cat conftest.$ac_ext >&5
9718 ac_cv_lib_Xext_XineramaQueryExtension=no
9719 fi
9720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9721 LIBS=$ac_check_lib_save_LIBS
9722 fi
9723 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryExtension" >&5
9724 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryExtension" >&6
9725 if test $ac_cv_lib_Xext_XineramaQueryExtension = yes; then
9726   have_xinerama=yes
9727 else
9728   true
9729 fi
9730
9731   CPPFLAGS="$ac_save_CPPFLAGS"
9732   LDFLAGS="$ac_save_LDFLAGS"
9733 #  LIBS="$ac_save_LIBS"
9734
9735
9736     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
9737     if test "$have_xinerama" = no; then
9738
9739   ac_save_CPPFLAGS="$CPPFLAGS"
9740   ac_save_LDFLAGS="$LDFLAGS"
9741 #  ac_save_LIBS="$LIBS"
9742
9743   if test \! -z "$includedir" ; then
9744     CPPFLAGS="$CPPFLAGS -I$includedir"
9745   fi
9746   # note: $X_CFLAGS includes $x_includes
9747   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9748
9749   if test \! -z "$libdir" ; then
9750     LDFLAGS="$LDFLAGS -L$libdir"
9751   fi
9752   # note: $X_LIBS includes $x_libraries
9753   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9754
9755   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5
9756 echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6
9757 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
9758   echo $ECHO_N "(cached) $ECHO_C" >&6
9759 else
9760   ac_check_lib_save_LIBS=$LIBS
9761 LIBS="-lXinerama -lXext -lX11 $LIBS"
9762 cat >conftest.$ac_ext <<_ACEOF
9763 #line $LINENO "configure"
9764 #include "confdefs.h"
9765
9766 /* Override any gcc2 internal prototype to avoid an error.  */
9767 #ifdef __cplusplus
9768 extern "C"
9769 #endif
9770 /* We use char because int might match the return type of a gcc2
9771    builtin and then its argument prototype would still apply.  */
9772 char XineramaQueryExtension ();
9773 #ifdef F77_DUMMY_MAIN
9774 #  ifdef __cplusplus
9775      extern "C"
9776 #  endif
9777    int F77_DUMMY_MAIN() { return 1; }
9778 #endif
9779 int
9780 main ()
9781 {
9782 XineramaQueryExtension ();
9783   ;
9784   return 0;
9785 }
9786 _ACEOF
9787 rm -f conftest.$ac_objext conftest$ac_exeext
9788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9789   (eval $ac_link) 2>&5
9790   ac_status=$?
9791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9792   (exit $ac_status); } &&
9793          { ac_try='test -s conftest$ac_exeext'
9794   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9795   (eval $ac_try) 2>&5
9796   ac_status=$?
9797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9798   (exit $ac_status); }; }; then
9799   ac_cv_lib_Xinerama_XineramaQueryExtension=yes
9800 else
9801   echo "$as_me: failed program was:" >&5
9802 cat conftest.$ac_ext >&5
9803 ac_cv_lib_Xinerama_XineramaQueryExtension=no
9804 fi
9805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9806 LIBS=$ac_check_lib_save_LIBS
9807 fi
9808 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
9809 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6
9810 if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
9811   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
9812 else
9813   true
9814 fi
9815
9816   CPPFLAGS="$ac_save_CPPFLAGS"
9817   LDFLAGS="$ac_save_LDFLAGS"
9818 #  LIBS="$ac_save_LIBS"
9819
9820     fi
9821   fi
9822
9823   # if that succeeded, then we've really got it.
9824   if test "$have_xinerama" = yes; then
9825     cat >>confdefs.h <<\_ACEOF
9826 #define HAVE_XINERAMA 1
9827 _ACEOF
9828
9829   fi
9830
9831 elif test "$with_xinerama" != no; then
9832   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9833   exit 1
9834 fi
9835
9836
9837 ###############################################################################
9838 #
9839 #       Check for the XF86VMODE server extension (for virtual screens.)
9840 #
9841 ###############################################################################
9842
9843 have_xf86vmode=no
9844 with_xf86vmode_req=unspecified
9845
9846 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
9847 if test "${with_xf86vmode_ext+set}" = set; then
9848   withval="$with_xf86vmode_ext"
9849   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9850 else
9851   with_xf86vmode=yes
9852 fi;
9853
9854
9855    case "$with_xf86vmode" in
9856     yes) ;;
9857     no)  ;;
9858
9859     /*)
9860      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
9861 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
9862      d=$with_xf86vmode/include
9863      if test -d $d; then
9864        X_CFLAGS="-I$d $X_CFLAGS"
9865        echo "$as_me:$LINENO: result: $d" >&5
9866 echo "${ECHO_T}$d" >&6
9867      else
9868        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9869 echo "${ECHO_T}not found ($d: no such directory)" >&6
9870      fi
9871
9872      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
9873 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
9874      d=$with_xf86vmode/lib
9875      if test -d $d; then
9876        X_LIBS="-L$d $X_LIBS"
9877        echo "$as_me:$LINENO: result: $d" >&5
9878 echo "${ECHO_T}$d" >&6
9879      else
9880        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9881 echo "${ECHO_T}not found ($d: no such directory)" >&6
9882      fi
9883
9884      # replace the directory string with "yes".
9885      with_xf86vmode_req="yes"
9886      with_xf86vmode=$with_xf86vmode_req
9887      ;;
9888
9889     *)
9890      echo ""
9891      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9892      echo "       If it is a directory, then \`DIR/include' will be added to"
9893      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9894      exit 1
9895      ;;
9896    esac
9897
9898
9899 if test "$with_xf86vmode" = yes; then
9900
9901   # first check for xf86vmode.h
9902
9903   ac_save_CPPFLAGS="$CPPFLAGS"
9904   if test \! -z "$includedir" ; then
9905     CPPFLAGS="$CPPFLAGS -I$includedir"
9906   fi
9907   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9908   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
9909 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
9910 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
9911   echo $ECHO_N "(cached) $ECHO_C" >&6
9912 else
9913   cat >conftest.$ac_ext <<_ACEOF
9914 #line $LINENO "configure"
9915 #include "confdefs.h"
9916 #include <X11/Xlib.h>
9917
9918 #include <X11/extensions/xf86vmode.h>
9919 _ACEOF
9920 rm -f conftest.$ac_objext
9921 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9922   (eval $ac_compile) 2>&5
9923   ac_status=$?
9924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9925   (exit $ac_status); } &&
9926          { ac_try='test -s conftest.$ac_objext'
9927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9928   (eval $ac_try) 2>&5
9929   ac_status=$?
9930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931   (exit $ac_status); }; }; then
9932   ac_cv_header_X11_extensions_xf86vmode_h=yes
9933 else
9934   echo "$as_me: failed program was:" >&5
9935 cat conftest.$ac_ext >&5
9936 ac_cv_header_X11_extensions_xf86vmode_h=no
9937 fi
9938 rm -f conftest.$ac_objext conftest.$ac_ext
9939 fi
9940 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
9941 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
9942 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
9943   have_xf86vmode=yes
9944 fi
9945
9946
9947   CPPFLAGS="$ac_save_CPPFLAGS"
9948
9949   # if that succeeded, then check for the -lXxf86vm
9950   if test "$have_xf86vmode" = yes; then
9951     have_xf86vmode=no
9952
9953   ac_save_CPPFLAGS="$CPPFLAGS"
9954   ac_save_LDFLAGS="$LDFLAGS"
9955 #  ac_save_LIBS="$LIBS"
9956
9957   if test \! -z "$includedir" ; then
9958     CPPFLAGS="$CPPFLAGS -I$includedir"
9959   fi
9960   # note: $X_CFLAGS includes $x_includes
9961   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9962
9963   if test \! -z "$libdir" ; then
9964     LDFLAGS="$LDFLAGS -L$libdir"
9965   fi
9966   # note: $X_LIBS includes $x_libraries
9967   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9968
9969   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
9970 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
9971 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
9972   echo $ECHO_N "(cached) $ECHO_C" >&6
9973 else
9974   ac_check_lib_save_LIBS=$LIBS
9975 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9976 cat >conftest.$ac_ext <<_ACEOF
9977 #line $LINENO "configure"
9978 #include "confdefs.h"
9979
9980 /* Override any gcc2 internal prototype to avoid an error.  */
9981 #ifdef __cplusplus
9982 extern "C"
9983 #endif
9984 /* We use char because int might match the return type of a gcc2
9985    builtin and then its argument prototype would still apply.  */
9986 char XF86VidModeGetViewPort ();
9987 #ifdef F77_DUMMY_MAIN
9988 #  ifdef __cplusplus
9989      extern "C"
9990 #  endif
9991    int F77_DUMMY_MAIN() { return 1; }
9992 #endif
9993 int
9994 main ()
9995 {
9996 XF86VidModeGetViewPort ();
9997   ;
9998   return 0;
9999 }
10000 _ACEOF
10001 rm -f conftest.$ac_objext conftest$ac_exeext
10002 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10003   (eval $ac_link) 2>&5
10004   ac_status=$?
10005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10006   (exit $ac_status); } &&
10007          { ac_try='test -s conftest$ac_exeext'
10008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10009   (eval $ac_try) 2>&5
10010   ac_status=$?
10011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10012   (exit $ac_status); }; }; then
10013   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10014 else
10015   echo "$as_me: failed program was:" >&5
10016 cat conftest.$ac_ext >&5
10017 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10018 fi
10019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10020 LIBS=$ac_check_lib_save_LIBS
10021 fi
10022 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10023 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10024 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10025   have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10026 else
10027   true
10028 fi
10029
10030   CPPFLAGS="$ac_save_CPPFLAGS"
10031   LDFLAGS="$ac_save_LDFLAGS"
10032 #  LIBS="$ac_save_LIBS"
10033
10034   fi
10035
10036   # if that succeeded, then we've really got it.
10037   if test "$have_xf86vmode" = yes; then
10038     cat >>confdefs.h <<\_ACEOF
10039 #define HAVE_XF86VMODE 1
10040 _ACEOF
10041
10042   fi
10043
10044 elif test "$with_xf86vmode" != no; then
10045   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
10046   exit 1
10047 fi
10048
10049
10050 ###############################################################################
10051 #
10052 #       Check for the XF86VMODE server extension (for gamma fading.)
10053 #
10054 ###############################################################################
10055
10056 have_xf86gamma=no
10057 have_xf86gamma_ramp=no
10058 with_xf86gamma_req=unspecified
10059
10060 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
10061 if test "${with_xf86gamma_ext+set}" = set; then
10062   withval="$with_xf86gamma_ext"
10063   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
10064 else
10065   with_xf86gamma=yes
10066 fi;
10067
10068
10069    case "$with_xf86gamma" in
10070     yes) ;;
10071     no)  ;;
10072
10073     /*)
10074      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
10075 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
10076      d=$with_xf86gamma/include
10077      if test -d $d; then
10078        X_CFLAGS="-I$d $X_CFLAGS"
10079        echo "$as_me:$LINENO: result: $d" >&5
10080 echo "${ECHO_T}$d" >&6
10081      else
10082        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10083 echo "${ECHO_T}not found ($d: no such directory)" >&6
10084      fi
10085
10086      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
10087 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
10088      d=$with_xf86gamma/lib
10089      if test -d $d; then
10090        X_LIBS="-L$d $X_LIBS"
10091        echo "$as_me:$LINENO: result: $d" >&5
10092 echo "${ECHO_T}$d" >&6
10093      else
10094        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10095 echo "${ECHO_T}not found ($d: no such directory)" >&6
10096      fi
10097
10098      # replace the directory string with "yes".
10099      with_xf86gamma_req="yes"
10100      with_xf86gamma=$with_xf86gamma_req
10101      ;;
10102
10103     *)
10104      echo ""
10105      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
10106      echo "       If it is a directory, then \`DIR/include' will be added to"
10107      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10108      exit 1
10109      ;;
10110    esac
10111
10112
10113 if test "$with_xf86gamma" = yes; then
10114
10115   # first check for xf86vmode.h, if we haven't already
10116   if test "$have_xf86vmode" = yes; then
10117     have_xf86gamma=yes
10118   else
10119
10120   ac_save_CPPFLAGS="$CPPFLAGS"
10121   if test \! -z "$includedir" ; then
10122     CPPFLAGS="$CPPFLAGS -I$includedir"
10123   fi
10124   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10125   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10126 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10127 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10128   echo $ECHO_N "(cached) $ECHO_C" >&6
10129 else
10130   cat >conftest.$ac_ext <<_ACEOF
10131 #line $LINENO "configure"
10132 #include "confdefs.h"
10133 #include <X11/Xlib.h>
10134
10135 #include <X11/extensions/xf86vmode.h>
10136 _ACEOF
10137 rm -f conftest.$ac_objext
10138 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10139   (eval $ac_compile) 2>&5
10140   ac_status=$?
10141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10142   (exit $ac_status); } &&
10143          { ac_try='test -s conftest.$ac_objext'
10144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10145   (eval $ac_try) 2>&5
10146   ac_status=$?
10147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10148   (exit $ac_status); }; }; then
10149   ac_cv_header_X11_extensions_xf86vmode_h=yes
10150 else
10151   echo "$as_me: failed program was:" >&5
10152 cat conftest.$ac_ext >&5
10153 ac_cv_header_X11_extensions_xf86vmode_h=no
10154 fi
10155 rm -f conftest.$ac_objext conftest.$ac_ext
10156 fi
10157 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10158 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10159 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10160   have_xf86gamma=yes
10161 fi
10162
10163
10164   CPPFLAGS="$ac_save_CPPFLAGS"
10165   fi
10166
10167   # if that succeeded, then check for the -lXxf86vm
10168   if test "$have_xf86gamma" = yes; then
10169     have_xf86gamma=no
10170
10171   ac_save_CPPFLAGS="$CPPFLAGS"
10172   ac_save_LDFLAGS="$LDFLAGS"
10173 #  ac_save_LIBS="$LIBS"
10174
10175   if test \! -z "$includedir" ; then
10176     CPPFLAGS="$CPPFLAGS -I$includedir"
10177   fi
10178   # note: $X_CFLAGS includes $x_includes
10179   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10180
10181   if test \! -z "$libdir" ; then
10182     LDFLAGS="$LDFLAGS -L$libdir"
10183   fi
10184   # note: $X_LIBS includes $x_libraries
10185   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10186
10187   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
10188 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
10189 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
10190   echo $ECHO_N "(cached) $ECHO_C" >&6
10191 else
10192   ac_check_lib_save_LIBS=$LIBS
10193 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10194 cat >conftest.$ac_ext <<_ACEOF
10195 #line $LINENO "configure"
10196 #include "confdefs.h"
10197
10198 /* Override any gcc2 internal prototype to avoid an error.  */
10199 #ifdef __cplusplus
10200 extern "C"
10201 #endif
10202 /* We use char because int might match the return type of a gcc2
10203    builtin and then its argument prototype would still apply.  */
10204 char XF86VidModeSetGamma ();
10205 #ifdef F77_DUMMY_MAIN
10206 #  ifdef __cplusplus
10207      extern "C"
10208 #  endif
10209    int F77_DUMMY_MAIN() { return 1; }
10210 #endif
10211 int
10212 main ()
10213 {
10214 XF86VidModeSetGamma ();
10215   ;
10216   return 0;
10217 }
10218 _ACEOF
10219 rm -f conftest.$ac_objext conftest$ac_exeext
10220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10221   (eval $ac_link) 2>&5
10222   ac_status=$?
10223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10224   (exit $ac_status); } &&
10225          { ac_try='test -s conftest$ac_exeext'
10226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10227   (eval $ac_try) 2>&5
10228   ac_status=$?
10229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10230   (exit $ac_status); }; }; then
10231   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
10232 else
10233   echo "$as_me: failed program was:" >&5
10234 cat conftest.$ac_ext >&5
10235 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
10236 fi
10237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10238 LIBS=$ac_check_lib_save_LIBS
10239 fi
10240 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
10241 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
10242 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
10243   have_xf86gamma=yes
10244 else
10245   true
10246 fi
10247
10248   CPPFLAGS="$ac_save_CPPFLAGS"
10249   LDFLAGS="$ac_save_LDFLAGS"
10250 #  LIBS="$ac_save_LIBS"
10251
10252   fi
10253
10254   # check for the Ramp versions of the functions too.
10255   if test "$have_xf86gamma" = yes; then
10256     have_xf86gamma_ramp=no
10257
10258   ac_save_CPPFLAGS="$CPPFLAGS"
10259   ac_save_LDFLAGS="$LDFLAGS"
10260 #  ac_save_LIBS="$LIBS"
10261
10262   if test \! -z "$includedir" ; then
10263     CPPFLAGS="$CPPFLAGS -I$includedir"
10264   fi
10265   # note: $X_CFLAGS includes $x_includes
10266   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10267
10268   if test \! -z "$libdir" ; then
10269     LDFLAGS="$LDFLAGS -L$libdir"
10270   fi
10271   # note: $X_LIBS includes $x_libraries
10272   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10273
10274   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
10275 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
10276 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
10277   echo $ECHO_N "(cached) $ECHO_C" >&6
10278 else
10279   ac_check_lib_save_LIBS=$LIBS
10280 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10281 cat >conftest.$ac_ext <<_ACEOF
10282 #line $LINENO "configure"
10283 #include "confdefs.h"
10284
10285 /* Override any gcc2 internal prototype to avoid an error.  */
10286 #ifdef __cplusplus
10287 extern "C"
10288 #endif
10289 /* We use char because int might match the return type of a gcc2
10290    builtin and then its argument prototype would still apply.  */
10291 char XF86VidModeSetGammaRamp ();
10292 #ifdef F77_DUMMY_MAIN
10293 #  ifdef __cplusplus
10294      extern "C"
10295 #  endif
10296    int F77_DUMMY_MAIN() { return 1; }
10297 #endif
10298 int
10299 main ()
10300 {
10301 XF86VidModeSetGammaRamp ();
10302   ;
10303   return 0;
10304 }
10305 _ACEOF
10306 rm -f conftest.$ac_objext conftest$ac_exeext
10307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10308   (eval $ac_link) 2>&5
10309   ac_status=$?
10310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10311   (exit $ac_status); } &&
10312          { ac_try='test -s conftest$ac_exeext'
10313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10314   (eval $ac_try) 2>&5
10315   ac_status=$?
10316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10317   (exit $ac_status); }; }; then
10318   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
10319 else
10320   echo "$as_me: failed program was:" >&5
10321 cat conftest.$ac_ext >&5
10322 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
10323 fi
10324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10325 LIBS=$ac_check_lib_save_LIBS
10326 fi
10327 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
10328 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
10329 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
10330   have_xf86gamma_ramp=yes
10331 else
10332   true
10333 fi
10334
10335   CPPFLAGS="$ac_save_CPPFLAGS"
10336   LDFLAGS="$ac_save_LDFLAGS"
10337 #  LIBS="$ac_save_LIBS"
10338
10339   fi
10340
10341   # if those tests succeeded, then we've really got the functions.
10342   if test "$have_xf86gamma" = yes; then
10343     cat >>confdefs.h <<\_ACEOF
10344 #define HAVE_XF86VMODE_GAMMA 1
10345 _ACEOF
10346
10347   fi
10348
10349   if test "$have_xf86gamma_ramp" = yes; then
10350     cat >>confdefs.h <<\_ACEOF
10351 #define HAVE_XF86VMODE_GAMMA_RAMP 1
10352 _ACEOF
10353
10354   fi
10355
10356   # pull in the lib, if we haven't already
10357   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
10358     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10359   fi
10360
10361 elif test "$with_xf86gamma" != no; then
10362   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
10363   exit 1
10364 fi
10365
10366
10367 ###############################################################################
10368 #
10369 #       Check for HP XHPDisableReset and XHPEnableReset.
10370 #
10371 ###############################################################################
10372
10373
10374   ac_save_CPPFLAGS="$CPPFLAGS"
10375   if test \! -z "$includedir" ; then
10376     CPPFLAGS="$CPPFLAGS -I$includedir"
10377   fi
10378   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10379   cat >conftest.$ac_ext <<_ACEOF
10380 #line $LINENO "configure"
10381 #include "confdefs.h"
10382 #include <X11/XHPlib.h>
10383
10384 _ACEOF
10385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10386   egrep "XHPDisableReset" >/dev/null 2>&1; then
10387   cat >>confdefs.h <<\_ACEOF
10388 #define HAVE_XHPDISABLERESET 1
10389 _ACEOF
10390
10391                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10392 fi
10393 rm -f conftest*
10394
10395   CPPFLAGS="$ac_save_CPPFLAGS"
10396
10397
10398 ###############################################################################
10399 #
10400 #       Check for /proc/interrupts.
10401 #
10402 ###############################################################################
10403
10404 have_proc_interrupts=no
10405 with_proc_interrupts_req=unspecified
10406
10407 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
10408 if test "${with_proc_interrupts+set}" = set; then
10409   withval="$with_proc_interrupts"
10410   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10411 else
10412   with_proc_interrupts=yes
10413 fi;
10414
10415 if test "$with_proc_interrupts" = yes; then
10416
10417    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
10418 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
10419 if test "${ac_cv_have_proc_interrupts+set}" = set; then
10420   echo $ECHO_N "(cached) $ECHO_C" >&6
10421 else
10422   ac_cv_have_proc_interrupts=no
10423      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
10424        ac_cv_have_proc_interrupts=yes
10425      fi
10426
10427 fi
10428 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
10429 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
10430    have_proc_interrupts=$ac_cv_have_proc_interrupts
10431
10432   if test "$have_proc_interrupts" = yes; then
10433     cat >>confdefs.h <<\_ACEOF
10434 #define HAVE_PROC_INTERRUPTS 1
10435 _ACEOF
10436
10437   fi
10438
10439 elif test "$with_proc_interrupts" != no; then
10440   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10441   exit 1
10442 fi
10443
10444
10445 ###############################################################################
10446 #
10447 #       The --enable-locking option
10448 #
10449 ###############################################################################
10450
10451 # Check whether --enable-locking or --disable-locking was given.
10452 if test "${enable_locking+set}" = set; then
10453   enableval="$enable_locking"
10454   enable_locking="$enableval"
10455 else
10456   enable_locking=yes
10457 fi;
10458 if test "$enable_locking" = yes; then
10459   true
10460 elif test "$enable_locking" = no; then
10461   cat >>confdefs.h <<\_ACEOF
10462 #define NO_LOCKING 1
10463 _ACEOF
10464
10465 else
10466   echo "error: must be yes or no: --enable-locking=$enable_locking"
10467   exit 1
10468 fi
10469
10470
10471
10472 ###############################################################################
10473 #
10474 #       The --enable-vt-locking option
10475 #
10476 ###############################################################################
10477
10478 #ac_vt_lockswitch=no
10479 #AC_ARG_ENABLE(vt-locking,[
10480 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
10481 #                          This is the default if the system supports it, and
10482 #                          if locking support is included (--enable-locking.)
10483 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
10484 #                          enabled.],
10485 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
10486 #if test "$enable_vt_locking" = yes; then
10487 #
10488 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
10489 #   [AC_TRY_COMPILE([#include <fcntl.h>
10490 #                   #include <sys/ioctl.h>
10491 #                   #include <sys/vt.h>],
10492 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
10493 #                  [ac_cv_vt_lockswitch=yes],
10494 #                  [ac_cv_vt_lockswitch=no])])
10495 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
10496 #
10497 #elif test "$enable_vt_locking" = no; then
10498 #  true
10499 #else
10500 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
10501 #  exit 1
10502 #fi
10503 #
10504 #if test "$ac_vt_lockswitch" = yes; then
10505 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
10506 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
10507 #  # #### but it doesn't work yet, so don't worry about that for now.
10508 ##  need_setuid=yes
10509 #fi
10510
10511
10512
10513 ###############################################################################
10514 #
10515 #       Check for PAM.
10516 #
10517 ###############################################################################
10518
10519 case "$host" in
10520   *-solaris*)
10521    # Solaris systems tend to come with PAM misconfigured.
10522    #  Don't build it by default, even if the headers exist.
10523    with_pam_default=no
10524    ;;
10525   *)
10526    # Default to building PAM support on all other systems, if it exists.
10527    with_pam_default=yes
10528   ;;
10529 esac
10530
10531 have_pam=no
10532 with_pam_req=unspecified
10533
10534
10535 # Check whether --with-pam or --without-pam was given.
10536 if test "${with_pam+set}" = set; then
10537   withval="$with_pam"
10538   with_pam="$withval"; with_pam_req="$withval"
10539 else
10540   with_pam=$with_pam_default
10541 fi;
10542
10543
10544    case "$with_pam" in
10545     yes) ;;
10546     no)  ;;
10547
10548     /*)
10549      echo "$as_me:$LINENO: checking for PAM headers" >&5
10550 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
10551      d=$with_pam/include
10552      if test -d $d; then
10553        X_CFLAGS="-I$d $X_CFLAGS"
10554        echo "$as_me:$LINENO: result: $d" >&5
10555 echo "${ECHO_T}$d" >&6
10556      else
10557        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10558 echo "${ECHO_T}not found ($d: no such directory)" >&6
10559      fi
10560
10561      echo "$as_me:$LINENO: checking for PAM libs" >&5
10562 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
10563      d=$with_pam/lib
10564      if test -d $d; then
10565        X_LIBS="-L$d $X_LIBS"
10566        echo "$as_me:$LINENO: result: $d" >&5
10567 echo "${ECHO_T}$d" >&6
10568      else
10569        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10570 echo "${ECHO_T}not found ($d: no such directory)" >&6
10571      fi
10572
10573      # replace the directory string with "yes".
10574      with_pam_req="yes"
10575      with_pam=$with_pam_req
10576      ;;
10577
10578     *)
10579      echo ""
10580      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10581      echo "       If it is a directory, then \`DIR/include' will be added to"
10582      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10583      exit 1
10584      ;;
10585    esac
10586
10587
10588 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10589   echo "$as_me:$LINENO: checking for PAM" >&5
10590 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
10591 if test "${ac_cv_pam+set}" = set; then
10592   echo $ECHO_N "(cached) $ECHO_C" >&6
10593 else
10594
10595   ac_save_CPPFLAGS="$CPPFLAGS"
10596   if test \! -z "$includedir" ; then
10597     CPPFLAGS="$CPPFLAGS -I$includedir"
10598   fi
10599   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10600   cat >conftest.$ac_ext <<_ACEOF
10601 #line $LINENO "configure"
10602 #include "confdefs.h"
10603 #include <security/pam_appl.h>
10604 #ifdef F77_DUMMY_MAIN
10605 #  ifdef __cplusplus
10606      extern "C"
10607 #  endif
10608    int F77_DUMMY_MAIN() { return 1; }
10609 #endif
10610 int
10611 main ()
10612 {
10613
10614   ;
10615   return 0;
10616 }
10617 _ACEOF
10618 rm -f conftest.$ac_objext
10619 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10620   (eval $ac_compile) 2>&5
10621   ac_status=$?
10622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10623   (exit $ac_status); } &&
10624          { ac_try='test -s conftest.$ac_objext'
10625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10626   (eval $ac_try) 2>&5
10627   ac_status=$?
10628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10629   (exit $ac_status); }; }; then
10630   ac_cv_pam=yes
10631 else
10632   echo "$as_me: failed program was:" >&5
10633 cat conftest.$ac_ext >&5
10634 ac_cv_pam=no
10635 fi
10636 rm -f conftest.$ac_objext conftest.$ac_ext
10637   CPPFLAGS="$ac_save_CPPFLAGS"
10638 fi
10639 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
10640 echo "${ECHO_T}$ac_cv_pam" >&6
10641   if test "$ac_cv_pam" = yes ; then
10642     have_pam=yes
10643     cat >>confdefs.h <<\_ACEOF
10644 #define HAVE_PAM 1
10645 _ACEOF
10646
10647     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10648
10649     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10650     # those are in libc.  On Linux and Solaris, they're in libdl.
10651     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10652 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10653 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10654   echo $ECHO_N "(cached) $ECHO_C" >&6
10655 else
10656   ac_check_lib_save_LIBS=$LIBS
10657 LIBS="-ldl  $LIBS"
10658 cat >conftest.$ac_ext <<_ACEOF
10659 #line $LINENO "configure"
10660 #include "confdefs.h"
10661
10662 /* Override any gcc2 internal prototype to avoid an error.  */
10663 #ifdef __cplusplus
10664 extern "C"
10665 #endif
10666 /* We use char because int might match the return type of a gcc2
10667    builtin and then its argument prototype would still apply.  */
10668 char dlopen ();
10669 #ifdef F77_DUMMY_MAIN
10670 #  ifdef __cplusplus
10671      extern "C"
10672 #  endif
10673    int F77_DUMMY_MAIN() { return 1; }
10674 #endif
10675 int
10676 main ()
10677 {
10678 dlopen ();
10679   ;
10680   return 0;
10681 }
10682 _ACEOF
10683 rm -f conftest.$ac_objext conftest$ac_exeext
10684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10685   (eval $ac_link) 2>&5
10686   ac_status=$?
10687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10688   (exit $ac_status); } &&
10689          { ac_try='test -s conftest$ac_exeext'
10690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10691   (eval $ac_try) 2>&5
10692   ac_status=$?
10693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694   (exit $ac_status); }; }; then
10695   ac_cv_lib_dl_dlopen=yes
10696 else
10697   echo "$as_me: failed program was:" >&5
10698 cat conftest.$ac_ext >&5
10699 ac_cv_lib_dl_dlopen=no
10700 fi
10701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10702 LIBS=$ac_check_lib_save_LIBS
10703 fi
10704 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10705 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10706 if test $ac_cv_lib_dl_dlopen = yes; then
10707   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10708 fi
10709
10710
10711     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
10712 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
10713     if test "${ac_cv_pam_strerror_args+set}" = set; then
10714   echo $ECHO_N "(cached) $ECHO_C" >&6
10715 else
10716   cat >conftest.$ac_ext <<_ACEOF
10717 #line $LINENO "configure"
10718 #include "confdefs.h"
10719 #include <stdio.h>
10720                       #include <stdlib.h>
10721                       #include <security/pam_appl.h>
10722 #ifdef F77_DUMMY_MAIN
10723 #  ifdef __cplusplus
10724      extern "C"
10725 #  endif
10726    int F77_DUMMY_MAIN() { return 1; }
10727 #endif
10728 int
10729 main ()
10730 {
10731 pam_handle_t *pamh = 0;
10732                       char *s = pam_strerror(pamh, PAM_SUCCESS);
10733   ;
10734   return 0;
10735 }
10736 _ACEOF
10737 rm -f conftest.$ac_objext
10738 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10739   (eval $ac_compile) 2>&5
10740   ac_status=$?
10741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10742   (exit $ac_status); } &&
10743          { ac_try='test -s conftest.$ac_objext'
10744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10745   (eval $ac_try) 2>&5
10746   ac_status=$?
10747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10748   (exit $ac_status); }; }; then
10749   ac_pam_strerror_args=2
10750 else
10751   echo "$as_me: failed program was:" >&5
10752 cat conftest.$ac_ext >&5
10753 cat >conftest.$ac_ext <<_ACEOF
10754 #line $LINENO "configure"
10755 #include "confdefs.h"
10756 #include <stdio.h>
10757                                       #include <stdlib.h>
10758                                       #include <security/pam_appl.h>
10759 #ifdef F77_DUMMY_MAIN
10760 #  ifdef __cplusplus
10761      extern "C"
10762 #  endif
10763    int F77_DUMMY_MAIN() { return 1; }
10764 #endif
10765 int
10766 main ()
10767 {
10768 char *s =
10769                                        pam_strerror(PAM_SUCCESS);
10770   ;
10771   return 0;
10772 }
10773 _ACEOF
10774 rm -f conftest.$ac_objext
10775 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10776   (eval $ac_compile) 2>&5
10777   ac_status=$?
10778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10779   (exit $ac_status); } &&
10780          { ac_try='test -s conftest.$ac_objext'
10781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10782   (eval $ac_try) 2>&5
10783   ac_status=$?
10784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10785   (exit $ac_status); }; }; then
10786   ac_pam_strerror_args=1
10787 else
10788   echo "$as_me: failed program was:" >&5
10789 cat conftest.$ac_ext >&5
10790 ac_pam_strerror_args=0
10791 fi
10792 rm -f conftest.$ac_objext conftest.$ac_ext
10793 fi
10794 rm -f conftest.$ac_objext conftest.$ac_ext
10795       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10796 fi
10797
10798     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10799     if test "$ac_pam_strerror_args" = 1 ; then
10800       echo "$as_me:$LINENO: result: one argument" >&5
10801 echo "${ECHO_T}one argument" >&6
10802     elif test "$ac_pam_strerror_args" = 2 ; then
10803       cat >>confdefs.h <<\_ACEOF
10804 #define PAM_STRERROR_TWO_ARGS 1
10805 _ACEOF
10806
10807       echo "$as_me:$LINENO: result: two arguments" >&5
10808 echo "${ECHO_T}two arguments" >&6
10809     else
10810       echo "$as_me:$LINENO: result: unknown" >&5
10811 echo "${ECHO_T}unknown" >&6
10812     fi
10813   fi
10814 fi
10815
10816
10817 ###############################################################################
10818 #
10819 #       Check for Kerberos.
10820 #
10821 ###############################################################################
10822
10823 have_kerberos=no
10824 have_kerberos5=no
10825 with_kerberos_req=unspecified
10826
10827
10828 # Check whether --with-kerberos or --without-kerberos was given.
10829 if test "${with_kerberos+set}" = set; then
10830   withval="$with_kerberos"
10831   with_kerberos="$withval"; with_kerberos_req="$withval"
10832 else
10833   with_kerberos=yes
10834 fi;
10835
10836
10837    case "$with_kerberos" in
10838     yes) ;;
10839     no)  ;;
10840
10841     /*)
10842      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
10843 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
10844      d=$with_kerberos/include
10845      if test -d $d; then
10846        X_CFLAGS="-I$d $X_CFLAGS"
10847        echo "$as_me:$LINENO: result: $d" >&5
10848 echo "${ECHO_T}$d" >&6
10849      else
10850        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10851 echo "${ECHO_T}not found ($d: no such directory)" >&6
10852      fi
10853
10854      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
10855 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
10856      d=$with_kerberos/lib
10857      if test -d $d; then
10858        X_LIBS="-L$d $X_LIBS"
10859        echo "$as_me:$LINENO: result: $d" >&5
10860 echo "${ECHO_T}$d" >&6
10861      else
10862        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10863 echo "${ECHO_T}not found ($d: no such directory)" >&6
10864      fi
10865
10866      # replace the directory string with "yes".
10867      with_kerberos_req="yes"
10868      with_kerberos=$with_kerberos_req
10869      ;;
10870
10871     *)
10872      echo ""
10873      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
10874      echo "       If it is a directory, then \`DIR/include' will be added to"
10875      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10876      exit 1
10877      ;;
10878    esac
10879
10880
10881 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
10882   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
10883 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
10884 if test "${ac_cv_kerberos+set}" = set; then
10885   echo $ECHO_N "(cached) $ECHO_C" >&6
10886 else
10887
10888   ac_save_CPPFLAGS="$CPPFLAGS"
10889   if test \! -z "$includedir" ; then
10890     CPPFLAGS="$CPPFLAGS -I$includedir"
10891   fi
10892   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10893   cat >conftest.$ac_ext <<_ACEOF
10894 #line $LINENO "configure"
10895 #include "confdefs.h"
10896 #include <krb.h>
10897 #ifdef F77_DUMMY_MAIN
10898 #  ifdef __cplusplus
10899      extern "C"
10900 #  endif
10901    int F77_DUMMY_MAIN() { return 1; }
10902 #endif
10903 int
10904 main ()
10905 {
10906
10907   ;
10908   return 0;
10909 }
10910 _ACEOF
10911 rm -f conftest.$ac_objext
10912 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10913   (eval $ac_compile) 2>&5
10914   ac_status=$?
10915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10916   (exit $ac_status); } &&
10917          { ac_try='test -s conftest.$ac_objext'
10918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10919   (eval $ac_try) 2>&5
10920   ac_status=$?
10921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10922   (exit $ac_status); }; }; then
10923   ac_cv_kerberos=yes
10924 else
10925   echo "$as_me: failed program was:" >&5
10926 cat conftest.$ac_ext >&5
10927 ac_cv_kerberos=no
10928 fi
10929 rm -f conftest.$ac_objext conftest.$ac_ext
10930   CPPFLAGS="$ac_save_CPPFLAGS"
10931 fi
10932 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
10933 echo "${ECHO_T}$ac_cv_kerberos" >&6
10934   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
10935 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
10936 if test "${ac_cv_kerberos5+set}" = set; then
10937   echo $ECHO_N "(cached) $ECHO_C" >&6
10938 else
10939
10940   ac_save_CPPFLAGS="$CPPFLAGS"
10941   if test \! -z "$includedir" ; then
10942     CPPFLAGS="$CPPFLAGS -I$includedir"
10943   fi
10944   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10945   cat >conftest.$ac_ext <<_ACEOF
10946 #line $LINENO "configure"
10947 #include "confdefs.h"
10948 #include <kerberosIV/krb.h>
10949 #ifdef F77_DUMMY_MAIN
10950 #  ifdef __cplusplus
10951      extern "C"
10952 #  endif
10953    int F77_DUMMY_MAIN() { return 1; }
10954 #endif
10955 int
10956 main ()
10957 {
10958
10959   ;
10960   return 0;
10961 }
10962 _ACEOF
10963 rm -f conftest.$ac_objext
10964 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10965   (eval $ac_compile) 2>&5
10966   ac_status=$?
10967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10968   (exit $ac_status); } &&
10969          { ac_try='test -s conftest.$ac_objext'
10970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10971   (eval $ac_try) 2>&5
10972   ac_status=$?
10973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10974   (exit $ac_status); }; }; then
10975   ac_cv_kerberos5=yes
10976 else
10977   echo "$as_me: failed program was:" >&5
10978 cat conftest.$ac_ext >&5
10979 ac_cv_kerberos5=no
10980 fi
10981 rm -f conftest.$ac_objext conftest.$ac_ext
10982   CPPFLAGS="$ac_save_CPPFLAGS"
10983 fi
10984 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
10985 echo "${ECHO_T}$ac_cv_kerberos5" >&6
10986
10987   if test "$ac_cv_kerberos" = yes ; then
10988     have_kerberos=yes
10989     cat >>confdefs.h <<\_ACEOF
10990 #define HAVE_KERBEROS 1
10991 _ACEOF
10992
10993   fi
10994
10995   if test "$ac_cv_kerberos5" = yes ; then
10996     have_kerberos=yes
10997     have_kerberos5=yes
10998     cat >>confdefs.h <<\_ACEOF
10999 #define HAVE_KERBEROS 1
11000 _ACEOF
11001
11002     cat >>confdefs.h <<\_ACEOF
11003 #define HAVE_KERBEROS5 1
11004 _ACEOF
11005
11006   fi
11007
11008   if test "$have_kerberos5" = yes ; then
11009     # from Matt Knopp <mhat@infocalypse.netlag.com>
11010     # (who got it from amu@mit.edu)
11011     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
11012   elif test "$have_kerberos" = yes ; then
11013     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11014     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11015   fi
11016
11017   if test "$have_kerberos" = yes ; then
11018     echo "$as_me:$LINENO: checking for res_search" >&5
11019 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
11020 if test "${ac_cv_func_res_search+set}" = set; then
11021   echo $ECHO_N "(cached) $ECHO_C" >&6
11022 else
11023   cat >conftest.$ac_ext <<_ACEOF
11024 #line $LINENO "configure"
11025 #include "confdefs.h"
11026 /* System header to define __stub macros and hopefully few prototypes,
11027     which can conflict with char res_search (); below.  */
11028 #include <assert.h>
11029 /* Override any gcc2 internal prototype to avoid an error.  */
11030 #ifdef __cplusplus
11031 extern "C"
11032 #endif
11033 /* We use char because int might match the return type of a gcc2
11034    builtin and then its argument prototype would still apply.  */
11035 char res_search ();
11036 char (*f) ();
11037
11038 #ifdef F77_DUMMY_MAIN
11039 #  ifdef __cplusplus
11040      extern "C"
11041 #  endif
11042    int F77_DUMMY_MAIN() { return 1; }
11043 #endif
11044 int
11045 main ()
11046 {
11047 /* The GNU C library defines this for functions which it implements
11048     to always fail with ENOSYS.  Some functions are actually named
11049     something starting with __ and the normal name is an alias.  */
11050 #if defined (__stub_res_search) || defined (__stub___res_search)
11051 choke me
11052 #else
11053 f = res_search;
11054 #endif
11055
11056   ;
11057   return 0;
11058 }
11059 _ACEOF
11060 rm -f conftest.$ac_objext conftest$ac_exeext
11061 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11062   (eval $ac_link) 2>&5
11063   ac_status=$?
11064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11065   (exit $ac_status); } &&
11066          { ac_try='test -s conftest$ac_exeext'
11067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11068   (eval $ac_try) 2>&5
11069   ac_status=$?
11070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11071   (exit $ac_status); }; }; then
11072   ac_cv_func_res_search=yes
11073 else
11074   echo "$as_me: failed program was:" >&5
11075 cat conftest.$ac_ext >&5
11076 ac_cv_func_res_search=no
11077 fi
11078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11079 fi
11080 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
11081 echo "${ECHO_T}$ac_cv_func_res_search" >&6
11082 if test $ac_cv_func_res_search = yes; then
11083   :
11084 else
11085   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
11086 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
11087 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
11088   echo $ECHO_N "(cached) $ECHO_C" >&6
11089 else
11090   ac_check_lib_save_LIBS=$LIBS
11091 LIBS="-lresolv  $LIBS"
11092 cat >conftest.$ac_ext <<_ACEOF
11093 #line $LINENO "configure"
11094 #include "confdefs.h"
11095
11096 /* Override any gcc2 internal prototype to avoid an error.  */
11097 #ifdef __cplusplus
11098 extern "C"
11099 #endif
11100 /* We use char because int might match the return type of a gcc2
11101    builtin and then its argument prototype would still apply.  */
11102 char res_search ();
11103 #ifdef F77_DUMMY_MAIN
11104 #  ifdef __cplusplus
11105      extern "C"
11106 #  endif
11107    int F77_DUMMY_MAIN() { return 1; }
11108 #endif
11109 int
11110 main ()
11111 {
11112 res_search ();
11113   ;
11114   return 0;
11115 }
11116 _ACEOF
11117 rm -f conftest.$ac_objext conftest$ac_exeext
11118 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11119   (eval $ac_link) 2>&5
11120   ac_status=$?
11121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11122   (exit $ac_status); } &&
11123          { ac_try='test -s conftest$ac_exeext'
11124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11125   (eval $ac_try) 2>&5
11126   ac_status=$?
11127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11128   (exit $ac_status); }; }; then
11129   ac_cv_lib_resolv_res_search=yes
11130 else
11131   echo "$as_me: failed program was:" >&5
11132 cat conftest.$ac_ext >&5
11133 ac_cv_lib_resolv_res_search=no
11134 fi
11135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11136 LIBS=$ac_check_lib_save_LIBS
11137 fi
11138 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
11139 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
11140 if test $ac_cv_lib_resolv_res_search = yes; then
11141   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11142 else
11143   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11144 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11145
11146 fi
11147
11148 fi
11149
11150   fi
11151 fi
11152
11153
11154 ###############################################################################
11155 #
11156 #       Check for the nine billion variants of shadow passwords...
11157 #
11158 ###############################################################################
11159
11160 need_setuid=no
11161
11162 have_shadow=no
11163 with_shadow_req=unspecified
11164
11165
11166 # Check whether --with-shadow or --without-shadow was given.
11167 if test "${with_shadow+set}" = set; then
11168   withval="$with_shadow"
11169   with_shadow="$withval"; with_shadow_req="$withval"
11170 else
11171   with_shadow=yes
11172 fi;
11173
11174
11175    case "$with_shadow" in
11176     yes) ;;
11177     no)  ;;
11178
11179     /*)
11180      echo "$as_me:$LINENO: checking for shadow password headers" >&5
11181 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
11182      d=$with_shadow/include
11183      if test -d $d; then
11184        X_CFLAGS="-I$d $X_CFLAGS"
11185        echo "$as_me:$LINENO: result: $d" >&5
11186 echo "${ECHO_T}$d" >&6
11187      else
11188        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11189 echo "${ECHO_T}not found ($d: no such directory)" >&6
11190      fi
11191
11192      echo "$as_me:$LINENO: checking for shadow password libs" >&5
11193 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
11194      d=$with_shadow/lib
11195      if test -d $d; then
11196        X_LIBS="-L$d $X_LIBS"
11197        echo "$as_me:$LINENO: result: $d" >&5
11198 echo "${ECHO_T}$d" >&6
11199      else
11200        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11201 echo "${ECHO_T}not found ($d: no such directory)" >&6
11202      fi
11203
11204      # replace the directory string with "yes".
11205      with_shadow_req="yes"
11206      with_shadow=$with_shadow_req
11207      ;;
11208
11209     *)
11210      echo ""
11211      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11212      echo "       If it is a directory, then \`DIR/include' will be added to"
11213      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11214      exit 1
11215      ;;
11216    esac
11217
11218
11219 if test "$enable_locking" = no ; then
11220   with_shadow_req=no
11221   with_shadow=no
11222 fi
11223
11224
11225 ###############################################################################
11226 #
11227 #       Check for Sun "adjunct" passwords.
11228 #
11229 ###############################################################################
11230
11231 if test "$with_shadow" = yes ; then
11232   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
11233 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
11234 if test "${ac_cv_sun_adjunct+set}" = set; then
11235   echo $ECHO_N "(cached) $ECHO_C" >&6
11236 else
11237
11238   ac_save_CPPFLAGS="$CPPFLAGS"
11239   if test \! -z "$includedir" ; then
11240     CPPFLAGS="$CPPFLAGS -I$includedir"
11241   fi
11242   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11243   cat >conftest.$ac_ext <<_ACEOF
11244 #line $LINENO "configure"
11245 #include "confdefs.h"
11246 #include <stdlib.h>
11247                                     #include <unistd.h>
11248                                     #include <sys/types.h>
11249                                     #include <sys/label.h>
11250                                     #include <sys/audit.h>
11251                                     #include <pwdadj.h>
11252 #ifdef F77_DUMMY_MAIN
11253 #  ifdef __cplusplus
11254      extern "C"
11255 #  endif
11256    int F77_DUMMY_MAIN() { return 1; }
11257 #endif
11258 int
11259 main ()
11260 {
11261 struct passwd_adjunct *p = getpwanam("nobody");
11262                        const char *pw = p->pwa_passwd;
11263   ;
11264   return 0;
11265 }
11266 _ACEOF
11267 rm -f conftest.$ac_objext
11268 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11269   (eval $ac_compile) 2>&5
11270   ac_status=$?
11271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11272   (exit $ac_status); } &&
11273          { ac_try='test -s conftest.$ac_objext'
11274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11275   (eval $ac_try) 2>&5
11276   ac_status=$?
11277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11278   (exit $ac_status); }; }; then
11279   ac_cv_sun_adjunct=yes
11280 else
11281   echo "$as_me: failed program was:" >&5
11282 cat conftest.$ac_ext >&5
11283 ac_cv_sun_adjunct=no
11284 fi
11285 rm -f conftest.$ac_objext conftest.$ac_ext
11286   CPPFLAGS="$ac_save_CPPFLAGS"
11287 fi
11288 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
11289 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
11290   if test "$ac_cv_sun_adjunct" = yes; then
11291     have_shadow_adjunct=yes
11292     have_shadow=yes
11293     need_setuid=yes
11294   fi
11295 fi
11296
11297
11298 ###############################################################################
11299 #
11300 #       Check for DEC and SCO so-called "enhanced" security.
11301 #
11302 ###############################################################################
11303
11304 if test "$with_shadow" = yes ; then
11305   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
11306 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
11307 if test "${ac_cv_enhanced_passwd+set}" = set; then
11308   echo $ECHO_N "(cached) $ECHO_C" >&6
11309 else
11310
11311   ac_save_CPPFLAGS="$CPPFLAGS"
11312   if test \! -z "$includedir" ; then
11313     CPPFLAGS="$CPPFLAGS -I$includedir"
11314   fi
11315   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11316   cat >conftest.$ac_ext <<_ACEOF
11317 #line $LINENO "configure"
11318 #include "confdefs.h"
11319 #include <stdlib.h>
11320                                     #include <unistd.h>
11321                                     #include <sys/types.h>
11322                                     #include <pwd.h>
11323                                     #include <sys/security.h>
11324                                     #include <prot.h>
11325 #ifdef F77_DUMMY_MAIN
11326 #  ifdef __cplusplus
11327      extern "C"
11328 #  endif
11329    int F77_DUMMY_MAIN() { return 1; }
11330 #endif
11331 int
11332 main ()
11333 {
11334 struct pr_passwd *p;
11335                        const char *pw;
11336                        set_auth_parameters(0, 0);
11337                        check_auth_parameters();
11338                        p = getprpwnam("nobody");
11339                        pw = p->ufld.fd_encrypt;
11340   ;
11341   return 0;
11342 }
11343 _ACEOF
11344 rm -f conftest.$ac_objext
11345 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11346   (eval $ac_compile) 2>&5
11347   ac_status=$?
11348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11349   (exit $ac_status); } &&
11350          { ac_try='test -s conftest.$ac_objext'
11351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11352   (eval $ac_try) 2>&5
11353   ac_status=$?
11354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11355   (exit $ac_status); }; }; then
11356   ac_cv_enhanced_passwd=yes
11357 else
11358   echo "$as_me: failed program was:" >&5
11359 cat conftest.$ac_ext >&5
11360 ac_cv_enhanced_passwd=no
11361 fi
11362 rm -f conftest.$ac_objext conftest.$ac_ext
11363   CPPFLAGS="$ac_save_CPPFLAGS"
11364 fi
11365 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
11366 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
11367   if test $ac_cv_enhanced_passwd = yes; then
11368     have_shadow_enhanced=yes
11369     have_shadow=yes
11370     need_setuid=yes
11371
11372     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11373     # (I'm told it needs -lcurses too, but I don't understand why.)
11374     # But on DEC, it's in -lsecurity.
11375     #
11376     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
11377 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
11378 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
11379   echo $ECHO_N "(cached) $ECHO_C" >&6
11380 else
11381   ac_check_lib_save_LIBS=$LIBS
11382 LIBS="-lprot -lx $LIBS"
11383 cat >conftest.$ac_ext <<_ACEOF
11384 #line $LINENO "configure"
11385 #include "confdefs.h"
11386
11387 /* Override any gcc2 internal prototype to avoid an error.  */
11388 #ifdef __cplusplus
11389 extern "C"
11390 #endif
11391 /* We use char because int might match the return type of a gcc2
11392    builtin and then its argument prototype would still apply.  */
11393 char getprpwnam ();
11394 #ifdef F77_DUMMY_MAIN
11395 #  ifdef __cplusplus
11396      extern "C"
11397 #  endif
11398    int F77_DUMMY_MAIN() { return 1; }
11399 #endif
11400 int
11401 main ()
11402 {
11403 getprpwnam ();
11404   ;
11405   return 0;
11406 }
11407 _ACEOF
11408 rm -f conftest.$ac_objext conftest$ac_exeext
11409 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11410   (eval $ac_link) 2>&5
11411   ac_status=$?
11412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11413   (exit $ac_status); } &&
11414          { ac_try='test -s conftest$ac_exeext'
11415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11416   (eval $ac_try) 2>&5
11417   ac_status=$?
11418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11419   (exit $ac_status); }; }; then
11420   ac_cv_lib_prot_getprpwnam=yes
11421 else
11422   echo "$as_me: failed program was:" >&5
11423 cat conftest.$ac_ext >&5
11424 ac_cv_lib_prot_getprpwnam=no
11425 fi
11426 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11427 LIBS=$ac_check_lib_save_LIBS
11428 fi
11429 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
11430 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
11431 if test $ac_cv_lib_prot_getprpwnam = yes; then
11432   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11433 else
11434   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
11435 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
11436 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
11437   echo $ECHO_N "(cached) $ECHO_C" >&6
11438 else
11439   ac_check_lib_save_LIBS=$LIBS
11440 LIBS="-lsecurity  $LIBS"
11441 cat >conftest.$ac_ext <<_ACEOF
11442 #line $LINENO "configure"
11443 #include "confdefs.h"
11444
11445 /* Override any gcc2 internal prototype to avoid an error.  */
11446 #ifdef __cplusplus
11447 extern "C"
11448 #endif
11449 /* We use char because int might match the return type of a gcc2
11450    builtin and then its argument prototype would still apply.  */
11451 char getprpwnam ();
11452 #ifdef F77_DUMMY_MAIN
11453 #  ifdef __cplusplus
11454      extern "C"
11455 #  endif
11456    int F77_DUMMY_MAIN() { return 1; }
11457 #endif
11458 int
11459 main ()
11460 {
11461 getprpwnam ();
11462   ;
11463   return 0;
11464 }
11465 _ACEOF
11466 rm -f conftest.$ac_objext conftest$ac_exeext
11467 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11468   (eval $ac_link) 2>&5
11469   ac_status=$?
11470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11471   (exit $ac_status); } &&
11472          { ac_try='test -s conftest$ac_exeext'
11473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11474   (eval $ac_try) 2>&5
11475   ac_status=$?
11476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11477   (exit $ac_status); }; }; then
11478   ac_cv_lib_security_getprpwnam=yes
11479 else
11480   echo "$as_me: failed program was:" >&5
11481 cat conftest.$ac_ext >&5
11482 ac_cv_lib_security_getprpwnam=no
11483 fi
11484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11485 LIBS=$ac_check_lib_save_LIBS
11486 fi
11487 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
11488 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
11489 if test $ac_cv_lib_security_getprpwnam = yes; then
11490   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11491 fi
11492
11493 fi
11494
11495   fi
11496 fi
11497
11498 ###############################################################################
11499 #
11500 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11501 #
11502 ###############################################################################
11503
11504 if test "$with_shadow" = yes ; then
11505   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
11506 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
11507 if test "${ac_cv_hpux_passwd+set}" = set; then
11508   echo $ECHO_N "(cached) $ECHO_C" >&6
11509 else
11510
11511   ac_save_CPPFLAGS="$CPPFLAGS"
11512   if test \! -z "$includedir" ; then
11513     CPPFLAGS="$CPPFLAGS -I$includedir"
11514   fi
11515   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11516   cat >conftest.$ac_ext <<_ACEOF
11517 #line $LINENO "configure"
11518 #include "confdefs.h"
11519 #include <stdlib.h>
11520                                     #include <unistd.h>
11521                                     #include <sys/types.h>
11522                                     #include <pwd.h>
11523                                     #include <hpsecurity.h>
11524                                     #include <prot.h>
11525 #ifdef F77_DUMMY_MAIN
11526 #  ifdef __cplusplus
11527      extern "C"
11528 #  endif
11529    int F77_DUMMY_MAIN() { return 1; }
11530 #endif
11531 int
11532 main ()
11533 {
11534 struct s_passwd *p = getspwnam("nobody");
11535                        const char *pw = p->pw_passwd;
11536   ;
11537   return 0;
11538 }
11539 _ACEOF
11540 rm -f conftest.$ac_objext
11541 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11542   (eval $ac_compile) 2>&5
11543   ac_status=$?
11544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11545   (exit $ac_status); } &&
11546          { ac_try='test -s conftest.$ac_objext'
11547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11548   (eval $ac_try) 2>&5
11549   ac_status=$?
11550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11551   (exit $ac_status); }; }; then
11552   ac_cv_hpux_passwd=yes
11553 else
11554   echo "$as_me: failed program was:" >&5
11555 cat conftest.$ac_ext >&5
11556 ac_cv_hpux_passwd=no
11557 fi
11558 rm -f conftest.$ac_objext conftest.$ac_ext
11559   CPPFLAGS="$ac_save_CPPFLAGS"
11560 fi
11561 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
11562 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
11563   if test "$ac_cv_hpux_passwd" = yes; then
11564     have_shadow_hpux=yes
11565     have_shadow=yes
11566     need_setuid=yes
11567
11568     # on HPUX, bigcrypt is in -lsec
11569     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
11570 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
11571 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
11572   echo $ECHO_N "(cached) $ECHO_C" >&6
11573 else
11574   ac_check_lib_save_LIBS=$LIBS
11575 LIBS="-lsec  $LIBS"
11576 cat >conftest.$ac_ext <<_ACEOF
11577 #line $LINENO "configure"
11578 #include "confdefs.h"
11579
11580 /* Override any gcc2 internal prototype to avoid an error.  */
11581 #ifdef __cplusplus
11582 extern "C"
11583 #endif
11584 /* We use char because int might match the return type of a gcc2
11585    builtin and then its argument prototype would still apply.  */
11586 char bigcrypt ();
11587 #ifdef F77_DUMMY_MAIN
11588 #  ifdef __cplusplus
11589      extern "C"
11590 #  endif
11591    int F77_DUMMY_MAIN() { return 1; }
11592 #endif
11593 int
11594 main ()
11595 {
11596 bigcrypt ();
11597   ;
11598   return 0;
11599 }
11600 _ACEOF
11601 rm -f conftest.$ac_objext conftest$ac_exeext
11602 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11603   (eval $ac_link) 2>&5
11604   ac_status=$?
11605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11606   (exit $ac_status); } &&
11607          { ac_try='test -s conftest$ac_exeext'
11608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11609   (eval $ac_try) 2>&5
11610   ac_status=$?
11611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612   (exit $ac_status); }; }; then
11613   ac_cv_lib_sec_bigcrypt=yes
11614 else
11615   echo "$as_me: failed program was:" >&5
11616 cat conftest.$ac_ext >&5
11617 ac_cv_lib_sec_bigcrypt=no
11618 fi
11619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11620 LIBS=$ac_check_lib_save_LIBS
11621 fi
11622 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
11623 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
11624 if test $ac_cv_lib_sec_bigcrypt = yes; then
11625   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11626 fi
11627
11628   fi
11629 fi
11630
11631
11632 ###############################################################################
11633 #
11634 #       Check for FreeBSD-style shadow passwords.
11635 #
11636 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11637 #       password systems -- except you only get stuff in the pw_passwd field
11638 #       if the running program is setuid.  So, guess that we've got this
11639 #       lossage to contend with if /etc/master.passwd exists, and default to
11640 #       a setuid installation.
11641 #
11642 ###############################################################################
11643
11644 if test "$with_shadow" = yes ; then
11645   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
11646 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
11647 if test "${ac_cv_master_passwd+set}" = set; then
11648   echo $ECHO_N "(cached) $ECHO_C" >&6
11649 else
11650   if test -f /etc/master.passwd ; then
11651                     ac_cv_master_passwd=yes
11652                   else
11653                     ac_cv_master_passwd=no
11654                   fi
11655 fi
11656 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
11657 echo "${ECHO_T}$ac_cv_master_passwd" >&6
11658   if test "$ac_cv_master_passwd" = yes; then
11659     need_setuid=yes
11660   fi
11661 fi
11662
11663
11664 ###############################################################################
11665 #
11666 #       Check for traditional (ha!) shadow passwords.
11667 #
11668 ###############################################################################
11669
11670 if test "$with_shadow" = yes ; then
11671   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
11672 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
11673 if test "${ac_cv_shadow+set}" = set; then
11674   echo $ECHO_N "(cached) $ECHO_C" >&6
11675 else
11676
11677   ac_save_CPPFLAGS="$CPPFLAGS"
11678   if test \! -z "$includedir" ; then
11679     CPPFLAGS="$CPPFLAGS -I$includedir"
11680   fi
11681   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11682   cat >conftest.$ac_ext <<_ACEOF
11683 #line $LINENO "configure"
11684 #include "confdefs.h"
11685 #include <stdlib.h>
11686                                     #include <unistd.h>
11687                                     #include <sys/types.h>
11688                                     #include <pwd.h>
11689                                     #include <shadow.h>
11690 #ifdef F77_DUMMY_MAIN
11691 #  ifdef __cplusplus
11692      extern "C"
11693 #  endif
11694    int F77_DUMMY_MAIN() { return 1; }
11695 #endif
11696 int
11697 main ()
11698 {
11699 struct spwd *p = getspnam("nobody");
11700                        const char *pw = p->sp_pwdp;
11701   ;
11702   return 0;
11703 }
11704 _ACEOF
11705 rm -f conftest.$ac_objext
11706 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11707   (eval $ac_compile) 2>&5
11708   ac_status=$?
11709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11710   (exit $ac_status); } &&
11711          { ac_try='test -s conftest.$ac_objext'
11712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11713   (eval $ac_try) 2>&5
11714   ac_status=$?
11715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11716   (exit $ac_status); }; }; then
11717   ac_cv_shadow=yes
11718 else
11719   echo "$as_me: failed program was:" >&5
11720 cat conftest.$ac_ext >&5
11721 ac_cv_shadow=no
11722 fi
11723 rm -f conftest.$ac_objext conftest.$ac_ext
11724   CPPFLAGS="$ac_save_CPPFLAGS"
11725 fi
11726 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
11727 echo "${ECHO_T}$ac_cv_shadow" >&6
11728   if test "$ac_cv_shadow" = yes; then
11729     have_shadow=yes
11730     need_setuid=yes
11731
11732     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
11733     have_getspnam=no
11734     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
11735 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
11736 if test "${ac_cv_lib_c_getspnam+set}" = set; then
11737   echo $ECHO_N "(cached) $ECHO_C" >&6
11738 else
11739   ac_check_lib_save_LIBS=$LIBS
11740 LIBS="-lc  $LIBS"
11741 cat >conftest.$ac_ext <<_ACEOF
11742 #line $LINENO "configure"
11743 #include "confdefs.h"
11744
11745 /* Override any gcc2 internal prototype to avoid an error.  */
11746 #ifdef __cplusplus
11747 extern "C"
11748 #endif
11749 /* We use char because int might match the return type of a gcc2
11750    builtin and then its argument prototype would still apply.  */
11751 char getspnam ();
11752 #ifdef F77_DUMMY_MAIN
11753 #  ifdef __cplusplus
11754      extern "C"
11755 #  endif
11756    int F77_DUMMY_MAIN() { return 1; }
11757 #endif
11758 int
11759 main ()
11760 {
11761 getspnam ();
11762   ;
11763   return 0;
11764 }
11765 _ACEOF
11766 rm -f conftest.$ac_objext conftest$ac_exeext
11767 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11768   (eval $ac_link) 2>&5
11769   ac_status=$?
11770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11771   (exit $ac_status); } &&
11772          { ac_try='test -s conftest$ac_exeext'
11773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11774   (eval $ac_try) 2>&5
11775   ac_status=$?
11776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11777   (exit $ac_status); }; }; then
11778   ac_cv_lib_c_getspnam=yes
11779 else
11780   echo "$as_me: failed program was:" >&5
11781 cat conftest.$ac_ext >&5
11782 ac_cv_lib_c_getspnam=no
11783 fi
11784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11785 LIBS=$ac_check_lib_save_LIBS
11786 fi
11787 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
11788 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
11789 if test $ac_cv_lib_c_getspnam = yes; then
11790   have_getspnam=yes
11791 fi
11792
11793     if test "$have_getspnam" = no ; then
11794       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
11795 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
11796 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
11797   echo $ECHO_N "(cached) $ECHO_C" >&6
11798 else
11799   ac_check_lib_save_LIBS=$LIBS
11800 LIBS="-lgen  $LIBS"
11801 cat >conftest.$ac_ext <<_ACEOF
11802 #line $LINENO "configure"
11803 #include "confdefs.h"
11804
11805 /* Override any gcc2 internal prototype to avoid an error.  */
11806 #ifdef __cplusplus
11807 extern "C"
11808 #endif
11809 /* We use char because int might match the return type of a gcc2
11810    builtin and then its argument prototype would still apply.  */
11811 char getspnam ();
11812 #ifdef F77_DUMMY_MAIN
11813 #  ifdef __cplusplus
11814      extern "C"
11815 #  endif
11816    int F77_DUMMY_MAIN() { return 1; }
11817 #endif
11818 int
11819 main ()
11820 {
11821 getspnam ();
11822   ;
11823   return 0;
11824 }
11825 _ACEOF
11826 rm -f conftest.$ac_objext conftest$ac_exeext
11827 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11828   (eval $ac_link) 2>&5
11829   ac_status=$?
11830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11831   (exit $ac_status); } &&
11832          { ac_try='test -s conftest$ac_exeext'
11833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11834   (eval $ac_try) 2>&5
11835   ac_status=$?
11836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11837   (exit $ac_status); }; }; then
11838   ac_cv_lib_gen_getspnam=yes
11839 else
11840   echo "$as_me: failed program was:" >&5
11841 cat conftest.$ac_ext >&5
11842 ac_cv_lib_gen_getspnam=no
11843 fi
11844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11845 LIBS=$ac_check_lib_save_LIBS
11846 fi
11847 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
11848 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
11849 if test $ac_cv_lib_gen_getspnam = yes; then
11850   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
11851 fi
11852
11853     fi
11854   fi
11855 fi
11856
11857
11858 ###############################################################################
11859 #
11860 #       Check for other libraries needed for non-shadow passwords.
11861 #
11862 ###############################################################################
11863
11864 if test "$enable_locking" = yes ; then
11865
11866   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
11867   have_crypt=no
11868   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
11869 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
11870 if test "${ac_cv_lib_c_crypt+set}" = set; then
11871   echo $ECHO_N "(cached) $ECHO_C" >&6
11872 else
11873   ac_check_lib_save_LIBS=$LIBS
11874 LIBS="-lc  $LIBS"
11875 cat >conftest.$ac_ext <<_ACEOF
11876 #line $LINENO "configure"
11877 #include "confdefs.h"
11878
11879 /* Override any gcc2 internal prototype to avoid an error.  */
11880 #ifdef __cplusplus
11881 extern "C"
11882 #endif
11883 /* We use char because int might match the return type of a gcc2
11884    builtin and then its argument prototype would still apply.  */
11885 char crypt ();
11886 #ifdef F77_DUMMY_MAIN
11887 #  ifdef __cplusplus
11888      extern "C"
11889 #  endif
11890    int F77_DUMMY_MAIN() { return 1; }
11891 #endif
11892 int
11893 main ()
11894 {
11895 crypt ();
11896   ;
11897   return 0;
11898 }
11899 _ACEOF
11900 rm -f conftest.$ac_objext conftest$ac_exeext
11901 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11902   (eval $ac_link) 2>&5
11903   ac_status=$?
11904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11905   (exit $ac_status); } &&
11906          { ac_try='test -s conftest$ac_exeext'
11907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11908   (eval $ac_try) 2>&5
11909   ac_status=$?
11910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11911   (exit $ac_status); }; }; then
11912   ac_cv_lib_c_crypt=yes
11913 else
11914   echo "$as_me: failed program was:" >&5
11915 cat conftest.$ac_ext >&5
11916 ac_cv_lib_c_crypt=no
11917 fi
11918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11919 LIBS=$ac_check_lib_save_LIBS
11920 fi
11921 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
11922 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
11923 if test $ac_cv_lib_c_crypt = yes; then
11924   have_crypt=yes
11925 fi
11926
11927   if test "$have_crypt" = no ; then
11928     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
11929 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
11930 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
11931   echo $ECHO_N "(cached) $ECHO_C" >&6
11932 else
11933   ac_check_lib_save_LIBS=$LIBS
11934 LIBS="-lcrypt  $LIBS"
11935 cat >conftest.$ac_ext <<_ACEOF
11936 #line $LINENO "configure"
11937 #include "confdefs.h"
11938
11939 /* Override any gcc2 internal prototype to avoid an error.  */
11940 #ifdef __cplusplus
11941 extern "C"
11942 #endif
11943 /* We use char because int might match the return type of a gcc2
11944    builtin and then its argument prototype would still apply.  */
11945 char crypt ();
11946 #ifdef F77_DUMMY_MAIN
11947 #  ifdef __cplusplus
11948      extern "C"
11949 #  endif
11950    int F77_DUMMY_MAIN() { return 1; }
11951 #endif
11952 int
11953 main ()
11954 {
11955 crypt ();
11956   ;
11957   return 0;
11958 }
11959 _ACEOF
11960 rm -f conftest.$ac_objext conftest$ac_exeext
11961 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11962   (eval $ac_link) 2>&5
11963   ac_status=$?
11964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11965   (exit $ac_status); } &&
11966          { ac_try='test -s conftest$ac_exeext'
11967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11968   (eval $ac_try) 2>&5
11969   ac_status=$?
11970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971   (exit $ac_status); }; }; then
11972   ac_cv_lib_crypt_crypt=yes
11973 else
11974   echo "$as_me: failed program was:" >&5
11975 cat conftest.$ac_ext >&5
11976 ac_cv_lib_crypt_crypt=no
11977 fi
11978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11979 LIBS=$ac_check_lib_save_LIBS
11980 fi
11981 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
11982 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
11983 if test $ac_cv_lib_crypt_crypt = yes; then
11984   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11985 fi
11986
11987   fi
11988 fi
11989
11990
11991 # Most of the above shadow mechanisms will have set need_setuid to yes,
11992 # if they were found.  But, on some systems, we need setuid even when
11993 # using plain old vanilla passwords.
11994 #
11995 if test "$enable_locking" = yes ; then
11996   case "$host" in
11997     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
11998       need_setuid=yes
11999     ;;
12000   esac
12001 fi
12002
12003
12004 if test "$have_shadow_adjunct" = yes ; then
12005   cat >>confdefs.h <<\_ACEOF
12006 #define HAVE_ADJUNCT_PASSWD 1
12007 _ACEOF
12008
12009 elif test "$have_shadow_enhanced" = yes ; then
12010   cat >>confdefs.h <<\_ACEOF
12011 #define HAVE_ENHANCED_PASSWD 1
12012 _ACEOF
12013
12014 elif test "$have_shadow_hpux" = yes ; then
12015   cat >>confdefs.h <<\_ACEOF
12016 #define HAVE_HPUX_PASSWD 1
12017 _ACEOF
12018
12019 elif test "$have_shadow" = yes ; then
12020   cat >>confdefs.h <<\_ACEOF
12021 #define HAVE_SHADOW_PASSWD 1
12022 _ACEOF
12023
12024 fi
12025
12026
12027 ###############################################################################
12028 #
12029 #       Check for -lXm.
12030 #
12031 ###############################################################################
12032
12033 have_motif=no
12034 with_motif_req=unspecified
12035
12036 # Check whether --with-motif or --without-motif was given.
12037 if test "${with_motif+set}" = set; then
12038   withval="$with_motif"
12039   with_motif="$withval"; with_motif_req="$withval"
12040 else
12041   with_motif=yes
12042 fi;
12043
12044
12045    case "$with_motif" in
12046     yes) ;;
12047     no)  ;;
12048
12049     /*)
12050      echo "$as_me:$LINENO: checking for Motif headers" >&5
12051 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
12052      d=$with_motif/include
12053      if test -d $d; then
12054        X_CFLAGS="-I$d $X_CFLAGS"
12055        echo "$as_me:$LINENO: result: $d" >&5
12056 echo "${ECHO_T}$d" >&6
12057      else
12058        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12059 echo "${ECHO_T}not found ($d: no such directory)" >&6
12060      fi
12061
12062      echo "$as_me:$LINENO: checking for Motif libs" >&5
12063 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
12064      d=$with_motif/lib
12065      if test -d $d; then
12066        X_LIBS="-L$d $X_LIBS"
12067        echo "$as_me:$LINENO: result: $d" >&5
12068 echo "${ECHO_T}$d" >&6
12069      else
12070        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12071 echo "${ECHO_T}not found ($d: no such directory)" >&6
12072      fi
12073
12074      # replace the directory string with "yes".
12075      with_motif_req="yes"
12076      with_motif=$with_motif_req
12077      ;;
12078
12079     *)
12080      echo ""
12081      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12082      echo "       If it is a directory, then \`DIR/include' will be added to"
12083      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12084      exit 1
12085      ;;
12086    esac
12087
12088
12089 if test "$with_motif" != yes -a "$with_motif" != no ; then
12090   echo "error: must be yes or no: --with-motif=$with_motif"
12091   exit 1
12092 fi
12093
12094 if test "$with_motif" = yes; then
12095   have_motif=no
12096
12097   ac_save_CPPFLAGS="$CPPFLAGS"
12098   if test \! -z "$includedir" ; then
12099     CPPFLAGS="$CPPFLAGS -I$includedir"
12100   fi
12101   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12102   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
12103 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
12104 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
12105   echo $ECHO_N "(cached) $ECHO_C" >&6
12106 else
12107   cat >conftest.$ac_ext <<_ACEOF
12108 #line $LINENO "configure"
12109 #include "confdefs.h"
12110 #include <stdlib.h>
12111                      #include <stdio.h>
12112                      #include <X11/Intrinsic.h>
12113
12114 #include <Xm/Xm.h>
12115 _ACEOF
12116 rm -f conftest.$ac_objext
12117 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12118   (eval $ac_compile) 2>&5
12119   ac_status=$?
12120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12121   (exit $ac_status); } &&
12122          { ac_try='test -s conftest.$ac_objext'
12123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12124   (eval $ac_try) 2>&5
12125   ac_status=$?
12126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12127   (exit $ac_status); }; }; then
12128   ac_cv_header_Xm_Xm_h=yes
12129 else
12130   echo "$as_me: failed program was:" >&5
12131 cat conftest.$ac_ext >&5
12132 ac_cv_header_Xm_Xm_h=no
12133 fi
12134 rm -f conftest.$ac_objext conftest.$ac_ext
12135 fi
12136 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
12137 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
12138 if test $ac_cv_header_Xm_Xm_h = yes; then
12139   have_motif=yes
12140                      cat >>confdefs.h <<\_ACEOF
12141 #define HAVE_MOTIF 1
12142 _ACEOF
12143
12144                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12145 fi
12146
12147
12148   CPPFLAGS="$ac_save_CPPFLAGS"
12149 fi
12150
12151
12152 if test "$have_motif" = yes; then
12153
12154   ac_save_CPPFLAGS="$CPPFLAGS"
12155   if test \! -z "$includedir" ; then
12156     CPPFLAGS="$CPPFLAGS -I$includedir"
12157   fi
12158   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12159   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
12160 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
12161 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
12162   echo $ECHO_N "(cached) $ECHO_C" >&6
12163 else
12164   cat >conftest.$ac_ext <<_ACEOF
12165 #line $LINENO "configure"
12166 #include "confdefs.h"
12167 #include <stdlib.h>
12168                      #include <stdio.h>
12169                      #include <X11/Intrinsic.h>
12170
12171 #include <Xm/ComboBox.h>
12172 _ACEOF
12173 rm -f conftest.$ac_objext
12174 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12175   (eval $ac_compile) 2>&5
12176   ac_status=$?
12177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12178   (exit $ac_status); } &&
12179          { ac_try='test -s conftest.$ac_objext'
12180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12181   (eval $ac_try) 2>&5
12182   ac_status=$?
12183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12184   (exit $ac_status); }; }; then
12185   ac_cv_header_Xm_ComboBox_h=yes
12186 else
12187   echo "$as_me: failed program was:" >&5
12188 cat conftest.$ac_ext >&5
12189 ac_cv_header_Xm_ComboBox_h=no
12190 fi
12191 rm -f conftest.$ac_objext conftest.$ac_ext
12192 fi
12193 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
12194 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
12195 if test $ac_cv_header_Xm_ComboBox_h = yes; then
12196   cat >>confdefs.h <<\_ACEOF
12197 #define HAVE_XMCOMBOBOX 1
12198 _ACEOF
12199
12200 fi
12201
12202
12203   CPPFLAGS="$ac_save_CPPFLAGS"
12204 fi
12205
12206
12207 ###############################################################################
12208 #
12209 #       Check for -lgtk (and Gnome stuff)
12210 #
12211 ###############################################################################
12212
12213 have_gtk=no
12214 with_gtk_req=unspecified
12215
12216 # Check whether --with-gtk or --without-gtk was given.
12217 if test "${with_gtk+set}" = set; then
12218   withval="$with_gtk"
12219   with_gtk="$withval"; with_gtk_req="$withval"
12220 else
12221   with_gtk=yes
12222 fi;
12223
12224 # if --with-gtk=/directory/ was specified, remember that directory so that
12225 # we can also look for the `gtk-config' program in that directory.
12226 case "$with_gtk" in
12227   /*)
12228     gtk_dir="$with_gtk"
12229     ;;
12230   *)
12231     gtk_dir=""
12232     ;;
12233 esac
12234
12235
12236    case "$with_gtk" in
12237     yes) ;;
12238     no)  ;;
12239
12240     /*)
12241      echo "$as_me:$LINENO: checking for Gtk headers" >&5
12242 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
12243      d=$with_gtk/include
12244      if test -d $d; then
12245        X_CFLAGS="-I$d $X_CFLAGS"
12246        echo "$as_me:$LINENO: result: $d" >&5
12247 echo "${ECHO_T}$d" >&6
12248      else
12249        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12250 echo "${ECHO_T}not found ($d: no such directory)" >&6
12251      fi
12252
12253      echo "$as_me:$LINENO: checking for Gtk libs" >&5
12254 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12255      d=$with_gtk/lib
12256      if test -d $d; then
12257        X_LIBS="-L$d $X_LIBS"
12258        echo "$as_me:$LINENO: result: $d" >&5
12259 echo "${ECHO_T}$d" >&6
12260      else
12261        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12262 echo "${ECHO_T}not found ($d: no such directory)" >&6
12263      fi
12264
12265      # replace the directory string with "yes".
12266      with_gtk_req="yes"
12267      with_gtk=$with_gtk_req
12268      ;;
12269
12270     *)
12271      echo ""
12272      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
12273      echo "       If it is a directory, then \`DIR/include' will be added to"
12274      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12275      exit 1
12276      ;;
12277    esac
12278
12279
12280 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
12281   echo "error: must be yes or no: --with-gtk=$with_gtk"
12282   exit 1
12283 fi
12284
12285 have_gnome=no
12286 with_gnome_req=unspecified
12287
12288 # Check whether --with-gnome or --without-gnome was given.
12289 if test "${with_gnome+set}" = set; then
12290   withval="$with_gnome"
12291   with_gnome="$withval"; with_gnome_req="$withval"
12292 else
12293   with_gnome=yes
12294 fi;
12295
12296 # if --with-gnome=/directory/ was specified, remember that directory so that
12297 # we can also look for the `gnome-config' program in that directory.
12298 case "$with_gnome" in
12299   /*)
12300     gnome_dir="$with_gnome"
12301     ;;
12302   *)
12303     gnome_dir=""
12304     ;;
12305 esac
12306
12307
12308    case "$with_gnome" in
12309     yes) ;;
12310     no)  ;;
12311
12312     /*)
12313      echo "$as_me:$LINENO: checking for Gnome headers" >&5
12314 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
12315      d=$with_gnome/include
12316      if test -d $d; then
12317        X_CFLAGS="-I$d $X_CFLAGS"
12318        echo "$as_me:$LINENO: result: $d" >&5
12319 echo "${ECHO_T}$d" >&6
12320      else
12321        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12322 echo "${ECHO_T}not found ($d: no such directory)" >&6
12323      fi
12324
12325      echo "$as_me:$LINENO: checking for Gnome libs" >&5
12326 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
12327      d=$with_gnome/lib
12328      if test -d $d; then
12329        X_LIBS="-L$d $X_LIBS"
12330        echo "$as_me:$LINENO: result: $d" >&5
12331 echo "${ECHO_T}$d" >&6
12332      else
12333        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12334 echo "${ECHO_T}not found ($d: no such directory)" >&6
12335      fi
12336
12337      # replace the directory string with "yes".
12338      with_gnome_req="yes"
12339      with_gnome=$with_gnome_req
12340      ;;
12341
12342     *)
12343      echo ""
12344      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
12345      echo "       If it is a directory, then \`DIR/include' will be added to"
12346      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12347      exit 1
12348      ;;
12349    esac
12350
12351
12352 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
12353   echo "error: must be yes or no: --with-gnome=$with_gnome"
12354   exit 1
12355 fi
12356
12357
12358 jurassic_gtk=no
12359 if test "$with_gtk" = yes; then
12360   have_gtk=no
12361
12362   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
12363   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
12364   #
12365   gtk_path="$PATH"
12366
12367   if test ! -z "$gtk_dir"; then
12368     # canonicalize slashes.
12369     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
12370     gtk_path="$foo:$gtk_path"
12371   fi
12372
12373   if test ! -z "$gnome_dir"; then
12374     # canonicalize slashes.
12375     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
12376     gtk_path="$foo:$gtk_path"
12377   fi
12378
12379   for ac_prog in glib12-config glib-config
12380 do
12381   # Extract the first word of "$ac_prog", so it can be a program name with args.
12382 set dummy $ac_prog; ac_word=$2
12383 echo "$as_me:$LINENO: checking for $ac_word" >&5
12384 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12385 if test "${ac_cv_path_glib_config+set}" = set; then
12386   echo $ECHO_N "(cached) $ECHO_C" >&6
12387 else
12388   case $glib_config in
12389   [\\/]* | ?:[\\/]*)
12390   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
12391   ;;
12392   *)
12393   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12394 for as_dir in $gtk_path
12395 do
12396   IFS=$as_save_IFS
12397   test -z "$as_dir" && as_dir=.
12398   for ac_exec_ext in '' $ac_executable_extensions; do
12399   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12400     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
12401     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12402     break 2
12403   fi
12404 done
12405 done
12406
12407   ;;
12408 esac
12409 fi
12410 glib_config=$ac_cv_path_glib_config
12411
12412 if test -n "$glib_config"; then
12413   echo "$as_me:$LINENO: result: $glib_config" >&5
12414 echo "${ECHO_T}$glib_config" >&6
12415 else
12416   echo "$as_me:$LINENO: result: no" >&5
12417 echo "${ECHO_T}no" >&6
12418 fi
12419
12420   test -n "$glib_config" && break
12421 done
12422
12423   for ac_prog in gtk12-config  gtk-config
12424 do
12425   # Extract the first word of "$ac_prog", so it can be a program name with args.
12426 set dummy $ac_prog; ac_word=$2
12427 echo "$as_me:$LINENO: checking for $ac_word" >&5
12428 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12429 if test "${ac_cv_path_gtk_config+set}" = set; then
12430   echo $ECHO_N "(cached) $ECHO_C" >&6
12431 else
12432   case $gtk_config in
12433   [\\/]* | ?:[\\/]*)
12434   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
12435   ;;
12436   *)
12437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12438 for as_dir in $gtk_path
12439 do
12440   IFS=$as_save_IFS
12441   test -z "$as_dir" && as_dir=.
12442   for ac_exec_ext in '' $ac_executable_extensions; do
12443   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12444     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
12445     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12446     break 2
12447   fi
12448 done
12449 done
12450
12451   ;;
12452 esac
12453 fi
12454 gtk_config=$ac_cv_path_gtk_config
12455
12456 if test -n "$gtk_config"; then
12457   echo "$as_me:$LINENO: result: $gtk_config" >&5
12458 echo "${ECHO_T}$gtk_config" >&6
12459 else
12460   echo "$as_me:$LINENO: result: no" >&5
12461 echo "${ECHO_T}no" >&6
12462 fi
12463
12464   test -n "$gtk_config" && break
12465 done
12466
12467
12468   if test "$with_gnome" = yes; then
12469     for ac_prog in gnome-config
12470 do
12471   # Extract the first word of "$ac_prog", so it can be a program name with args.
12472 set dummy $ac_prog; ac_word=$2
12473 echo "$as_me:$LINENO: checking for $ac_word" >&5
12474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12475 if test "${ac_cv_path_gnome_config+set}" = set; then
12476   echo $ECHO_N "(cached) $ECHO_C" >&6
12477 else
12478   case $gnome_config in
12479   [\\/]* | ?:[\\/]*)
12480   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
12481   ;;
12482   *)
12483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12484 for as_dir in $gtk_path
12485 do
12486   IFS=$as_save_IFS
12487   test -z "$as_dir" && as_dir=.
12488   for ac_exec_ext in '' $ac_executable_extensions; do
12489   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12490     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
12491     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12492     break 2
12493   fi
12494 done
12495 done
12496
12497   ;;
12498 esac
12499 fi
12500 gnome_config=$ac_cv_path_gnome_config
12501
12502 if test -n "$gnome_config"; then
12503   echo "$as_me:$LINENO: result: $gnome_config" >&5
12504 echo "${ECHO_T}$gnome_config" >&6
12505 else
12506   echo "$as_me:$LINENO: result: no" >&5
12507 echo "${ECHO_T}no" >&6
12508 fi
12509
12510   test -n "$gnome_config" && break
12511 done
12512
12513   fi
12514
12515   if test -n "$glib_config" -a  -n "$gtk_config" ; then
12516     have_gtk=yes
12517     if test "$with_gnome" = yes -a -n "$gnome_config" ; then
12518       have_gnome=yes
12519     fi
12520   fi
12521
12522   if test "$have_gtk" = yes; then
12523     echo "$as_me:$LINENO: checking Gtk version number" >&5
12524 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
12525 if test "${ac_cv_gtk_version_string+set}" = set; then
12526   echo $ECHO_N "(cached) $ECHO_C" >&6
12527 else
12528   ac_cv_gtk_version_string=`$gtk_config --version`
12529 fi
12530 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
12531 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
12532     ac_gtk_version_string=$ac_cv_gtk_version_string
12533     # M4 sucks!!
12534
12535     maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
12536     min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
12537
12538     ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
12539     if test -z "$ac_gtk_version"; then
12540       ac_gtk_version=unknown
12541       ac_gtk_version_string=unknown
12542     fi
12543     if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
12544     then
12545       have_gtk=no
12546       have_gnome=no
12547       jurassic_gtk=yes
12548     fi
12549   fi
12550
12551   if test "$have_gtk" = yes; then
12552     echo "$as_me:$LINENO: checking for Gtk includes" >&5
12553 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
12554 if test "${ac_cv_gtk_config_cflags+set}" = set; then
12555   echo $ECHO_N "(cached) $ECHO_C" >&6
12556 else
12557   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
12558 fi
12559 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
12560 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
12561     echo "$as_me:$LINENO: checking for Gtk libs" >&5
12562 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12563 if test "${ac_cv_gtk_config_libs+set}" = set; then
12564   echo $ECHO_N "(cached) $ECHO_C" >&6
12565 else
12566   ac_cv_gtk_config_libs=`$gtk_config --libs`
12567 fi
12568 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
12569 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
12570   fi
12571   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12572   ac_gtk_config_libs=$ac_cv_gtk_config_libs
12573
12574   # Check for Gnome Capplet support.
12575   #
12576   if test "$have_gnome" = yes -a "$have_gtk" = yes; then
12577     gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
12578     echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
12579 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
12580     if test "${ac_cv_gnome_config_cflags+set}" = set; then
12581   echo $ECHO_N "(cached) $ECHO_C" >&6
12582 else
12583   if ( $gnome_config --cflags $gnome_config_libs >/dev/null 2>&1 | \
12584             grep Unknown >/dev/null ) ; then
12585          ac_cv_gnome_config_cflags=''
12586        else
12587          ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
12588        fi
12589 fi
12590
12591     ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
12592     if test "$ac_gnome_config_cflags" = "" ; then
12593       have_gnome=no
12594       echo "$as_me:$LINENO: result: no" >&5
12595 echo "${ECHO_T}no" >&6
12596     else
12597       echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
12598 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
12599     fi
12600   fi
12601
12602   if test "$have_gnome" = yes -a "$have_gtk" = yes; then
12603     echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
12604 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
12605     if test "${ac_cv_gnome_config_libs+set}" = set; then
12606   echo $ECHO_N "(cached) $ECHO_C" >&6
12607 else
12608   if ( $gnome_config --libs $gnome_config_libs >/dev/null 2>&1 |
12609             grep Unknown >/dev/null ) ; then
12610          ac_cv_gnome_config_libs=''
12611        else
12612          ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
12613        fi
12614 fi
12615
12616     ac_gnome_config_libs=$ac_cv_gnome_config_libs
12617     if test "$ac_gnome_config_libs" = "" ; then
12618       have_gnome=no
12619       echo "$as_me:$LINENO: result: no" >&5
12620 echo "${ECHO_T}no" >&6
12621     else
12622       echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
12623 echo "${ECHO_T}$ac_gnome_config_libs" >&6
12624     fi
12625   fi
12626
12627   GNOME_DATADIR=""
12628   if test "$have_gnome" = yes -a "$have_gtk" = yes; then
12629     GNOME_DATADIR=`$gnome_config --datadir`
12630   fi
12631
12632
12633   # If we have Gnome, then override the gtk-config values with
12634   # the gnome-config values.
12635   #
12636   if test "$have_gnome" = yes -a "$have_gtk" = yes; then
12637     ac_gtk_config_cflags=$ac_gnome_config_cflags
12638     ac_gtk_config_libs=$ac_gnome_config_libs
12639     cat >>confdefs.h <<\_ACEOF
12640 #define HAVE_CRAPPLET 1
12641 _ACEOF
12642
12643
12644     # check for this function that was not in libcapplet 1.2.
12645
12646   ac_save_CPPFLAGS="$CPPFLAGS"
12647   ac_save_LDFLAGS="$LDFLAGS"
12648 #  ac_save_LIBS="$LIBS"
12649
12650   if test \! -z "$includedir" ; then
12651     CPPFLAGS="$CPPFLAGS -I$includedir"
12652   fi
12653   # note: $X_CFLAGS includes $x_includes
12654   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12655
12656   if test \! -z "$libdir" ; then
12657     LDFLAGS="$LDFLAGS -L$libdir"
12658   fi
12659   # note: $X_LIBS includes $x_libraries
12660   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12661
12662   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
12663 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
12664 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
12665   echo $ECHO_N "(cached) $ECHO_C" >&6
12666 else
12667   ac_check_lib_save_LIBS=$LIBS
12668 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
12669 cat >conftest.$ac_ext <<_ACEOF
12670 #line $LINENO "configure"
12671 #include "confdefs.h"
12672
12673 /* Override any gcc2 internal prototype to avoid an error.  */
12674 #ifdef __cplusplus
12675 extern "C"
12676 #endif
12677 /* We use char because int might match the return type of a gcc2
12678    builtin and then its argument prototype would still apply.  */
12679 char capplet_widget_changes_are_immediate ();
12680 #ifdef F77_DUMMY_MAIN
12681 #  ifdef __cplusplus
12682      extern "C"
12683 #  endif
12684    int F77_DUMMY_MAIN() { return 1; }
12685 #endif
12686 int
12687 main ()
12688 {
12689 capplet_widget_changes_are_immediate ();
12690   ;
12691   return 0;
12692 }
12693 _ACEOF
12694 rm -f conftest.$ac_objext conftest$ac_exeext
12695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12696   (eval $ac_link) 2>&5
12697   ac_status=$?
12698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12699   (exit $ac_status); } &&
12700          { ac_try='test -s conftest$ac_exeext'
12701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12702   (eval $ac_try) 2>&5
12703   ac_status=$?
12704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705   (exit $ac_status); }; }; then
12706   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
12707 else
12708   echo "$as_me: failed program was:" >&5
12709 cat conftest.$ac_ext >&5
12710 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
12711 fi
12712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12713 LIBS=$ac_check_lib_save_LIBS
12714 fi
12715 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
12716 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
12717 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
12718   cat >>confdefs.h <<\_ACEOF
12719 #define HAVE_CRAPPLET_IMMEDIATE 1
12720 _ACEOF
12721
12722 else
12723   true
12724 fi
12725
12726   CPPFLAGS="$ac_save_CPPFLAGS"
12727   LDFLAGS="$ac_save_LDFLAGS"
12728 #  LIBS="$ac_save_LIBS"
12729
12730   fi
12731
12732
12733   if test "$have_gtk" = yes; then
12734     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
12735     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
12736     cat >>confdefs.h <<\_ACEOF
12737 #define HAVE_GTK 1
12738 _ACEOF
12739
12740   fi
12741
12742 fi
12743
12744
12745 # Check for the Gnome Help Browser.
12746 #
12747 if test "$have_gnome" = yes; then
12748   # Extract the first word of "gnome-help-browser", so it can be a program name with args.
12749 set dummy gnome-help-browser; ac_word=$2
12750 echo "$as_me:$LINENO: checking for $ac_word" >&5
12751 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12752 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
12753   echo $ECHO_N "(cached) $ECHO_C" >&6
12754 else
12755   if test -n "$have_gnome_help"; then
12756   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
12757 else
12758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12759 for as_dir in $PATH
12760 do
12761   IFS=$as_save_IFS
12762   test -z "$as_dir" && as_dir=.
12763   for ac_exec_ext in '' $ac_executable_extensions; do
12764   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12765     ac_cv_prog_have_gnome_help="yes"
12766     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12767     break 2
12768   fi
12769 done
12770 done
12771
12772   test -z "$ac_cv_prog_have_gnome_help" && ac_cv_prog_have_gnome_help="no"
12773 fi
12774 fi
12775 have_gnome_help=$ac_cv_prog_have_gnome_help
12776 if test -n "$have_gnome_help"; then
12777   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
12778 echo "${ECHO_T}$have_gnome_help" >&6
12779 else
12780   echo "$as_me:$LINENO: result: no" >&5
12781 echo "${ECHO_T}no" >&6
12782 fi
12783
12784 else
12785   have_gnome_help=no
12786 fi
12787
12788
12789 ###############################################################################
12790 #
12791 #       Check for -lxml
12792 #
12793 ###############################################################################
12794
12795 have_xml=no
12796 with_xml_req=unspecified
12797 xml_halfassed=no
12798
12799 # Check whether --with-xml or --without-xml was given.
12800 if test "${with_xml+set}" = set; then
12801   withval="$with_xml"
12802   with_xml="$withval"; with_xml_req="$withval"
12803 else
12804   with_xml=yes
12805 fi;
12806
12807 # if --with-xml=/directory/ was specified, remember that directory so that
12808 # we can also look for the `xml-config' program in that directory.
12809 case "$with_xml" in
12810   /*)
12811     xml_dir="$with_xml"
12812     ;;
12813   *)
12814     xml_dir=""
12815     ;;
12816 esac
12817
12818
12819    case "$with_xml" in
12820     yes) ;;
12821     no)  ;;
12822
12823     /*)
12824      echo "$as_me:$LINENO: checking for XML headers" >&5
12825 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
12826      d=$with_xml/include
12827      if test -d $d; then
12828        X_CFLAGS="-I$d $X_CFLAGS"
12829        echo "$as_me:$LINENO: result: $d" >&5
12830 echo "${ECHO_T}$d" >&6
12831      else
12832        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12833 echo "${ECHO_T}not found ($d: no such directory)" >&6
12834      fi
12835
12836      echo "$as_me:$LINENO: checking for XML libs" >&5
12837 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
12838      d=$with_xml/lib
12839      if test -d $d; then
12840        X_LIBS="-L$d $X_LIBS"
12841        echo "$as_me:$LINENO: result: $d" >&5
12842 echo "${ECHO_T}$d" >&6
12843      else
12844        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12845 echo "${ECHO_T}not found ($d: no such directory)" >&6
12846      fi
12847
12848      # replace the directory string with "yes".
12849      with_xml_req="yes"
12850      with_xml=$with_xml_req
12851      ;;
12852
12853     *)
12854      echo ""
12855      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
12856      echo "       If it is a directory, then \`DIR/include' will be added to"
12857      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12858      exit 1
12859      ;;
12860    esac
12861
12862
12863 if test "$with_xml" != yes -a "$with_xml" != no ; then
12864   echo "error: must be yes or no: --with-xml=$with_xml"
12865   exit 1
12866 fi
12867
12868 if test "$with_xml" = yes; then
12869   have_xml=no
12870   have_old_xml=no
12871
12872   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
12873   # look in /foo/bin/ for for xml-config.
12874   #
12875   xml_path="$PATH"
12876
12877   if test ! -z "$gtk_dir"; then
12878     # canonicalize slashes.
12879     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
12880     xml_path="$foo:$xml_path"
12881   fi
12882
12883   if test ! -z "$gnome_dir"; then
12884     # canonicalize slashes.
12885     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
12886     xml_path="$foo:$xml_path"
12887   fi
12888
12889   for ac_prog in xml2-config xml-config
12890 do
12891   # Extract the first word of "$ac_prog", so it can be a program name with args.
12892 set dummy $ac_prog; ac_word=$2
12893 echo "$as_me:$LINENO: checking for $ac_word" >&5
12894 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12895 if test "${ac_cv_path_xml_config+set}" = set; then
12896   echo $ECHO_N "(cached) $ECHO_C" >&6
12897 else
12898   case $xml_config in
12899   [\\/]* | ?:[\\/]*)
12900   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
12901   ;;
12902   *)
12903   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12904 for as_dir in $xml_path
12905 do
12906   IFS=$as_save_IFS
12907   test -z "$as_dir" && as_dir=.
12908   for ac_exec_ext in '' $ac_executable_extensions; do
12909   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12910     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
12911     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12912     break 2
12913   fi
12914 done
12915 done
12916
12917   ;;
12918 esac
12919 fi
12920 xml_config=$ac_cv_path_xml_config
12921
12922 if test -n "$xml_config"; then
12923   echo "$as_me:$LINENO: result: $xml_config" >&5
12924 echo "${ECHO_T}$xml_config" >&6
12925 else
12926   echo "$as_me:$LINENO: result: no" >&5
12927 echo "${ECHO_T}no" >&6
12928 fi
12929
12930   test -n "$xml_config" && break
12931 done
12932
12933
12934   # If we found the xml-config program, run it to get flags.
12935   #
12936   if test -n "$xml_config" ; then
12937     echo "$as_me:$LINENO: checking for XML includes" >&5
12938 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
12939 if test "${ac_cv_xml_config_cflags+set}" = set; then
12940   echo $ECHO_N "(cached) $ECHO_C" >&6
12941 else
12942   ac_cv_xml_config_cflags=`$xml_config --cflags`
12943 fi
12944 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
12945 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
12946     echo "$as_me:$LINENO: checking for XML libs" >&5
12947 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
12948 if test "${ac_cv_xml_config_libs+set}" = set; then
12949   echo $ECHO_N "(cached) $ECHO_C" >&6
12950 else
12951   ac_cv_xml_config_libs=`$xml_config --libs`
12952 fi
12953 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
12954 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
12955     ac_xml_config_cflags=$ac_cv_xml_config_cflags
12956     ac_xml_config_libs=$ac_cv_xml_config_libs
12957   fi
12958
12959   ac_save_xml_CPPFLAGS="$CPPFLAGS"
12960   CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
12961
12962   # first try <libxml/parser.h> which is the new way...
12963   #
12964
12965   ac_save_CPPFLAGS="$CPPFLAGS"
12966   if test \! -z "$includedir" ; then
12967     CPPFLAGS="$CPPFLAGS -I$includedir"
12968   fi
12969   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12970   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
12971 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
12972 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
12973   echo $ECHO_N "(cached) $ECHO_C" >&6
12974 else
12975   cat >conftest.$ac_ext <<_ACEOF
12976 #line $LINENO "configure"
12977 #include "confdefs.h"
12978 #include <libxml/parser.h>
12979
12980 #include <libxml/xmlIO.h>
12981 _ACEOF
12982 rm -f conftest.$ac_objext
12983 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12984   (eval $ac_compile) 2>&5
12985   ac_status=$?
12986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12987   (exit $ac_status); } &&
12988          { ac_try='test -s conftest.$ac_objext'
12989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12990   (eval $ac_try) 2>&5
12991   ac_status=$?
12992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993   (exit $ac_status); }; }; then
12994   ac_cv_header_libxml_xmlIO_h=yes
12995 else
12996   echo "$as_me: failed program was:" >&5
12997 cat conftest.$ac_ext >&5
12998 ac_cv_header_libxml_xmlIO_h=no
12999 fi
13000 rm -f conftest.$ac_objext conftest.$ac_ext
13001 fi
13002 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
13003 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
13004 if test $ac_cv_header_libxml_xmlIO_h = yes; then
13005   have_xml=yes
13006 fi
13007
13008
13009   CPPFLAGS="$ac_save_CPPFLAGS"
13010
13011   # if that didn't work, then try just <parser.h> which is the old way...
13012   #
13013   if test "$have_xml" = no; then
13014
13015   ac_save_CPPFLAGS="$CPPFLAGS"
13016   if test \! -z "$includedir" ; then
13017     CPPFLAGS="$CPPFLAGS -I$includedir"
13018   fi
13019   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13020   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
13021 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
13022 if test "${ac_cv_header_xmlIO_h+set}" = set; then
13023   echo $ECHO_N "(cached) $ECHO_C" >&6
13024 else
13025   cat >conftest.$ac_ext <<_ACEOF
13026 #line $LINENO "configure"
13027 #include "confdefs.h"
13028 #include <parser.h>
13029
13030 #include <xmlIO.h>
13031 _ACEOF
13032 rm -f conftest.$ac_objext
13033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13034   (eval $ac_compile) 2>&5
13035   ac_status=$?
13036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13037   (exit $ac_status); } &&
13038          { ac_try='test -s conftest.$ac_objext'
13039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13040   (eval $ac_try) 2>&5
13041   ac_status=$?
13042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13043   (exit $ac_status); }; }; then
13044   ac_cv_header_xmlIO_h=yes
13045 else
13046   echo "$as_me: failed program was:" >&5
13047 cat conftest.$ac_ext >&5
13048 ac_cv_header_xmlIO_h=no
13049 fi
13050 rm -f conftest.$ac_objext conftest.$ac_ext
13051 fi
13052 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
13053 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
13054 if test $ac_cv_header_xmlIO_h = yes; then
13055   have_xml=yes; have_old_xml=yes
13056 fi
13057
13058
13059   CPPFLAGS="$ac_save_CPPFLAGS"
13060   fi
13061
13062   CPPFLAGS="$ac_save_xml_CPPFLAGS"
13063
13064   have_zlib=no
13065   if test "$have_xml" = yes; then
13066     # we have the XML headers; now make sure zlib is around.
13067     # yes, it's stupid we have to do this too, but there is
13068     # dependency screwage in Gnome.
13069
13070   ac_save_CPPFLAGS="$CPPFLAGS"
13071   ac_save_LDFLAGS="$LDFLAGS"
13072 #  ac_save_LIBS="$LIBS"
13073
13074   if test \! -z "$includedir" ; then
13075     CPPFLAGS="$CPPFLAGS -I$includedir"
13076   fi
13077   # note: $X_CFLAGS includes $x_includes
13078   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13079
13080   if test \! -z "$libdir" ; then
13081     LDFLAGS="$LDFLAGS -L$libdir"
13082   fi
13083   # note: $X_LIBS includes $x_libraries
13084   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13085
13086   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
13087 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
13088 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
13089   echo $ECHO_N "(cached) $ECHO_C" >&6
13090 else
13091   ac_check_lib_save_LIBS=$LIBS
13092 LIBS="-lz  $LIBS"
13093 cat >conftest.$ac_ext <<_ACEOF
13094 #line $LINENO "configure"
13095 #include "confdefs.h"
13096
13097 /* Override any gcc2 internal prototype to avoid an error.  */
13098 #ifdef __cplusplus
13099 extern "C"
13100 #endif
13101 /* We use char because int might match the return type of a gcc2
13102    builtin and then its argument prototype would still apply.  */
13103 char zlibVersion ();
13104 #ifdef F77_DUMMY_MAIN
13105 #  ifdef __cplusplus
13106      extern "C"
13107 #  endif
13108    int F77_DUMMY_MAIN() { return 1; }
13109 #endif
13110 int
13111 main ()
13112 {
13113 zlibVersion ();
13114   ;
13115   return 0;
13116 }
13117 _ACEOF
13118 rm -f conftest.$ac_objext conftest$ac_exeext
13119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13120   (eval $ac_link) 2>&5
13121   ac_status=$?
13122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13123   (exit $ac_status); } &&
13124          { ac_try='test -s conftest$ac_exeext'
13125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13126   (eval $ac_try) 2>&5
13127   ac_status=$?
13128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13129   (exit $ac_status); }; }; then
13130   ac_cv_lib_z_zlibVersion=yes
13131 else
13132   echo "$as_me: failed program was:" >&5
13133 cat conftest.$ac_ext >&5
13134 ac_cv_lib_z_zlibVersion=no
13135 fi
13136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13137 LIBS=$ac_check_lib_save_LIBS
13138 fi
13139 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
13140 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
13141 if test $ac_cv_lib_z_zlibVersion = yes; then
13142   have_zlib=yes
13143 fi
13144
13145   CPPFLAGS="$ac_save_CPPFLAGS"
13146   LDFLAGS="$ac_save_LDFLAGS"
13147 #  LIBS="$ac_save_LIBS"
13148
13149     if test "$have_zlib" = no; then
13150       xml_halfassed=yes
13151       have_xml=no
13152     fi
13153   fi
13154
13155   if test "$have_xml" = yes; then
13156     # we have the header, now check for the library
13157     have_xml=no
13158     xml_halfassed=yes
13159
13160   ac_save_CPPFLAGS="$CPPFLAGS"
13161   ac_save_LDFLAGS="$LDFLAGS"
13162 #  ac_save_LIBS="$LIBS"
13163
13164   if test \! -z "$includedir" ; then
13165     CPPFLAGS="$CPPFLAGS -I$includedir"
13166   fi
13167   # note: $X_CFLAGS includes $x_includes
13168   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13169
13170   if test \! -z "$libdir" ; then
13171     LDFLAGS="$LDFLAGS -L$libdir"
13172   fi
13173   # note: $X_LIBS includes $x_libraries
13174   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13175
13176   echo "$as_me:$LINENO: checking for xmlParseChunk in -lxml" >&5
13177 echo $ECHO_N "checking for xmlParseChunk in -lxml... $ECHO_C" >&6
13178 if test "${ac_cv_lib_xml_xmlParseChunk+set}" = set; then
13179   echo $ECHO_N "(cached) $ECHO_C" >&6
13180 else
13181   ac_check_lib_save_LIBS=$LIBS
13182 LIBS="-lxml $ac_xml_config_libs $LIBS"
13183 cat >conftest.$ac_ext <<_ACEOF
13184 #line $LINENO "configure"
13185 #include "confdefs.h"
13186
13187 /* Override any gcc2 internal prototype to avoid an error.  */
13188 #ifdef __cplusplus
13189 extern "C"
13190 #endif
13191 /* We use char because int might match the return type of a gcc2
13192    builtin and then its argument prototype would still apply.  */
13193 char xmlParseChunk ();
13194 #ifdef F77_DUMMY_MAIN
13195 #  ifdef __cplusplus
13196      extern "C"
13197 #  endif
13198    int F77_DUMMY_MAIN() { return 1; }
13199 #endif
13200 int
13201 main ()
13202 {
13203 xmlParseChunk ();
13204   ;
13205   return 0;
13206 }
13207 _ACEOF
13208 rm -f conftest.$ac_objext conftest$ac_exeext
13209 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13210   (eval $ac_link) 2>&5
13211   ac_status=$?
13212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13213   (exit $ac_status); } &&
13214          { ac_try='test -s conftest$ac_exeext'
13215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13216   (eval $ac_try) 2>&5
13217   ac_status=$?
13218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13219   (exit $ac_status); }; }; then
13220   ac_cv_lib_xml_xmlParseChunk=yes
13221 else
13222   echo "$as_me: failed program was:" >&5
13223 cat conftest.$ac_ext >&5
13224 ac_cv_lib_xml_xmlParseChunk=no
13225 fi
13226 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13227 LIBS=$ac_check_lib_save_LIBS
13228 fi
13229 echo "$as_me:$LINENO: result: $ac_cv_lib_xml_xmlParseChunk" >&5
13230 echo "${ECHO_T}$ac_cv_lib_xml_xmlParseChunk" >&6
13231 if test $ac_cv_lib_xml_xmlParseChunk = yes; then
13232   have_xml=yes
13233                     xml_halfassed=no
13234                     XML_LIBS="$ac_xml_config_libs"
13235                     cat >>confdefs.h <<\_ACEOF
13236 #define HAVE_XML 1
13237 _ACEOF
13238
13239 else
13240   true
13241 fi
13242
13243   CPPFLAGS="$ac_save_CPPFLAGS"
13244   LDFLAGS="$ac_save_LDFLAGS"
13245 #  LIBS="$ac_save_LIBS"
13246
13247   fi
13248
13249   if test "$have_xml" = yes; then
13250     INCLUDES="$INCLUDES $ac_xml_config_cflags"
13251     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
13252     cat >>confdefs.h <<\_ACEOF
13253 #define HAVE_XML 1
13254 _ACEOF
13255
13256     if test "$have_old_xml" = yes; then
13257       cat >>confdefs.h <<\_ACEOF
13258 #define HAVE_OLD_XML_HEADERS 1
13259 _ACEOF
13260
13261     fi
13262   fi
13263
13264 fi
13265
13266
13267 ###############################################################################
13268 #
13269 #       Checking whether Motif is really Lesstif.
13270 #
13271 ###############################################################################
13272
13273 have_lesstif=no
13274 if test "$have_motif" = yes ; then
13275   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
13276 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
13277 if test "${ac_cv_have_lesstif+set}" = set; then
13278   echo $ECHO_N "(cached) $ECHO_C" >&6
13279 else
13280
13281   ac_save_CPPFLAGS="$CPPFLAGS"
13282   if test \! -z "$includedir" ; then
13283     CPPFLAGS="$CPPFLAGS -I$includedir"
13284   fi
13285   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13286   cat >conftest.$ac_ext <<_ACEOF
13287 #line $LINENO "configure"
13288 #include "confdefs.h"
13289 #include <Xm/Xm.h>
13290 #ifdef F77_DUMMY_MAIN
13291 #  ifdef __cplusplus
13292      extern "C"
13293 #  endif
13294    int F77_DUMMY_MAIN() { return 1; }
13295 #endif
13296 int
13297 main ()
13298 {
13299 long vers = LesstifVersion;
13300   ;
13301   return 0;
13302 }
13303 _ACEOF
13304 rm -f conftest.$ac_objext
13305 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13306   (eval $ac_compile) 2>&5
13307   ac_status=$?
13308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13309   (exit $ac_status); } &&
13310          { ac_try='test -s conftest.$ac_objext'
13311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13312   (eval $ac_try) 2>&5
13313   ac_status=$?
13314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13315   (exit $ac_status); }; }; then
13316   ac_cv_have_lesstif=yes
13317 else
13318   echo "$as_me: failed program was:" >&5
13319 cat conftest.$ac_ext >&5
13320 ac_cv_have_lesstif=no
13321 fi
13322 rm -f conftest.$ac_objext conftest.$ac_ext
13323   CPPFLAGS="$ac_save_CPPFLAGS"
13324 fi
13325 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
13326 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
13327   have_lesstif=$ac_cv_have_lesstif
13328 fi
13329
13330
13331 lesstif_version=unknown
13332 lesstif_version_string=unknown
13333
13334 if test "$have_lesstif" = yes ; then
13335   ltv=unknown
13336   echo unknown > conftest-lt
13337   echo "$as_me:$LINENO: checking LessTif version number" >&5
13338 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
13339 if test "${ac_cv_lesstif_version_string+set}" = set; then
13340   echo $ECHO_N "(cached) $ECHO_C" >&6
13341 else
13342
13343   ac_save_CPPFLAGS="$CPPFLAGS"
13344   if test \! -z "$includedir" ; then
13345     CPPFLAGS="$CPPFLAGS -I$includedir"
13346   fi
13347   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13348   if test "$cross_compiling" = yes; then
13349   ac_cv_lesstif_version=unknown
13350                      ac_cv_lesstif_version_string=unknown
13351 else
13352   cat >conftest.$ac_ext <<_ACEOF
13353 #line $LINENO "configure"
13354 #include "confdefs.h"
13355 #include <stdio.h>
13356                      #include <Xm/Xm.h>
13357                      int main() {
13358                        FILE *f = fopen("conftest-lt", "w");
13359                        if (!f) exit(1);
13360                        fprintf(f, "%d %d.%d\n", LesstifVersion,
13361                           LESSTIF_VERSION, LESSTIF_REVISION);
13362                        fclose(f);
13363                        exit(0);
13364                      }
13365 _ACEOF
13366 rm -f conftest$ac_exeext
13367 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13368   (eval $ac_link) 2>&5
13369   ac_status=$?
13370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13371   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13373   (eval $ac_try) 2>&5
13374   ac_status=$?
13375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13376   (exit $ac_status); }; }; then
13377   ltv=`cat conftest-lt`
13378                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
13379                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
13380 else
13381   echo "$as_me: program exited with status $ac_status" >&5
13382 echo "$as_me: failed program was:" >&5
13383 cat conftest.$ac_ext >&5
13384 ( exit $ac_status )
13385 ac_cv_lesstif_version=unknown
13386                      ac_cv_lesstif_version_string=unknown
13387 fi
13388 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13389 fi
13390   CPPFLAGS="$ac_save_CPPFLAGS"
13391 fi
13392 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
13393 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
13394   rm -f conftest-lt
13395   lesstif_version=$ac_cv_lesstif_version
13396   lesstif_version_string=$ac_cv_lesstif_version_string
13397
13398 fi
13399
13400
13401 if test "$have_motif" = yes ; then
13402   mtv=unknown
13403   echo unknown > conftest-mt
13404   echo "$as_me:$LINENO: checking Motif version number" >&5
13405 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
13406 if test "${ac_cv_motif_version_string+set}" = set; then
13407   echo $ECHO_N "(cached) $ECHO_C" >&6
13408 else
13409
13410   ac_save_CPPFLAGS="$CPPFLAGS"
13411   if test \! -z "$includedir" ; then
13412     CPPFLAGS="$CPPFLAGS -I$includedir"
13413   fi
13414   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13415   if test "$cross_compiling" = yes; then
13416   ac_cv_motif_version=unknown
13417                      ac_cv_motif_version_string=unknown
13418 else
13419   cat >conftest.$ac_ext <<_ACEOF
13420 #line $LINENO "configure"
13421 #include "confdefs.h"
13422 #include <stdio.h>
13423                      #include <Xm/Xm.h>
13424                      int main() {
13425                        FILE *f = fopen("conftest-mt", "w");
13426                        if (!f) exit(1);
13427                        fprintf(f, "%d %d.%d\n", XmVersion,
13428                           XmVERSION, XmREVISION);
13429                        fclose(f);
13430                        exit(0);
13431                      }
13432 _ACEOF
13433 rm -f conftest$ac_exeext
13434 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13435   (eval $ac_link) 2>&5
13436   ac_status=$?
13437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13438   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13440   (eval $ac_try) 2>&5
13441   ac_status=$?
13442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13443   (exit $ac_status); }; }; then
13444   mtv=`cat conftest-mt`
13445                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
13446                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
13447 else
13448   echo "$as_me: program exited with status $ac_status" >&5
13449 echo "$as_me: failed program was:" >&5
13450 cat conftest.$ac_ext >&5
13451 ( exit $ac_status )
13452 ac_cv_motif_version=unknown
13453                      ac_cv_motif_version_string=unknown
13454 fi
13455 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13456 fi
13457   CPPFLAGS="$ac_save_CPPFLAGS"
13458 fi
13459 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
13460 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
13461   rm -f conftest-mt
13462   motif_version=$ac_cv_motif_version
13463   motif_version_string=$ac_cv_motif_version_string
13464
13465 fi
13466
13467
13468 ###############################################################################
13469 #
13470 #       Checking whether Motif requires -lXpm.
13471 #
13472 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
13473 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
13474 #       of the library whether to build the XPM code into libXm, or whether
13475 #       to rely on an external libXm.  So the only way to tell whether XPM is
13476 #       a link-time requirement is to examine libXm.a, which is very
13477 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
13478 #       always link against XPM if the XPM lib exists (and this will be a
13479 #       no-op if libXm happens to already have the XPM code in it.)
13480 #
13481 ###############################################################################
13482
13483 motif_requires_xpm=no
13484 if test "$have_motif" = yes ; then
13485    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
13486 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
13487    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
13488    then
13489      motif_requires_xpm=yes
13490      echo "$as_me:$LINENO: result: maybe" >&5
13491 echo "${ECHO_T}maybe" >&6
13492    else
13493      echo "$as_me:$LINENO: result: no" >&5
13494 echo "${ECHO_T}no" >&6
13495    fi
13496 fi
13497
13498
13499 ###############################################################################
13500 #
13501 #       Checking whether Motif requires -lXp.
13502 #
13503 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
13504 #       Extension".   Why this extension isn't in -lXext with all the others,
13505 #       I have no idea.
13506 #
13507 ###############################################################################
13508
13509 have_xp_ext=no
13510 if test "$have_motif" = yes ; then
13511    have_xp_ext=no
13512
13513   ac_save_CPPFLAGS="$CPPFLAGS"
13514   ac_save_LDFLAGS="$LDFLAGS"
13515 #  ac_save_LIBS="$LIBS"
13516
13517   if test \! -z "$includedir" ; then
13518     CPPFLAGS="$CPPFLAGS -I$includedir"
13519   fi
13520   # note: $X_CFLAGS includes $x_includes
13521   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13522
13523   if test \! -z "$libdir" ; then
13524     LDFLAGS="$LDFLAGS -L$libdir"
13525   fi
13526   # note: $X_LIBS includes $x_libraries
13527   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13528
13529   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
13530 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
13531 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
13532   echo $ECHO_N "(cached) $ECHO_C" >&6
13533 else
13534   ac_check_lib_save_LIBS=$LIBS
13535 LIBS="-lXp -lX11 -lXext -lm $LIBS"
13536 cat >conftest.$ac_ext <<_ACEOF
13537 #line $LINENO "configure"
13538 #include "confdefs.h"
13539
13540 /* Override any gcc2 internal prototype to avoid an error.  */
13541 #ifdef __cplusplus
13542 extern "C"
13543 #endif
13544 /* We use char because int might match the return type of a gcc2
13545    builtin and then its argument prototype would still apply.  */
13546 char XpQueryExtension ();
13547 #ifdef F77_DUMMY_MAIN
13548 #  ifdef __cplusplus
13549      extern "C"
13550 #  endif
13551    int F77_DUMMY_MAIN() { return 1; }
13552 #endif
13553 int
13554 main ()
13555 {
13556 XpQueryExtension ();
13557   ;
13558   return 0;
13559 }
13560 _ACEOF
13561 rm -f conftest.$ac_objext conftest$ac_exeext
13562 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13563   (eval $ac_link) 2>&5
13564   ac_status=$?
13565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13566   (exit $ac_status); } &&
13567          { ac_try='test -s conftest$ac_exeext'
13568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13569   (eval $ac_try) 2>&5
13570   ac_status=$?
13571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13572   (exit $ac_status); }; }; then
13573   ac_cv_lib_Xp_XpQueryExtension=yes
13574 else
13575   echo "$as_me: failed program was:" >&5
13576 cat conftest.$ac_ext >&5
13577 ac_cv_lib_Xp_XpQueryExtension=no
13578 fi
13579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13580 LIBS=$ac_check_lib_save_LIBS
13581 fi
13582 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
13583 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
13584 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
13585   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
13586 else
13587   true
13588 fi
13589
13590   CPPFLAGS="$ac_save_CPPFLAGS"
13591   LDFLAGS="$ac_save_LDFLAGS"
13592 #  LIBS="$ac_save_LIBS"
13593
13594 fi
13595
13596
13597 ###############################################################################
13598 #
13599 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
13600 #
13601 ###############################################################################
13602
13603 have_xintl=no
13604 if test "$have_motif" = yes ; then
13605
13606   ac_save_CPPFLAGS="$CPPFLAGS"
13607   ac_save_LDFLAGS="$LDFLAGS"
13608 #  ac_save_LIBS="$LIBS"
13609
13610   if test \! -z "$includedir" ; then
13611     CPPFLAGS="$CPPFLAGS -I$includedir"
13612   fi
13613   # note: $X_CFLAGS includes $x_includes
13614   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13615
13616   if test \! -z "$libdir" ; then
13617     LDFLAGS="$LDFLAGS -L$libdir"
13618   fi
13619   # note: $X_LIBS includes $x_libraries
13620   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13621
13622   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
13623 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
13624 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
13625   echo $ECHO_N "(cached) $ECHO_C" >&6
13626 else
13627   ac_check_lib_save_LIBS=$LIBS
13628 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
13629 cat >conftest.$ac_ext <<_ACEOF
13630 #line $LINENO "configure"
13631 #include "confdefs.h"
13632
13633 /* Override any gcc2 internal prototype to avoid an error.  */
13634 #ifdef __cplusplus
13635 extern "C"
13636 #endif
13637 /* We use char because int might match the return type of a gcc2
13638    builtin and then its argument prototype would still apply.  */
13639 char _Xsetlocale ();
13640 #ifdef F77_DUMMY_MAIN
13641 #  ifdef __cplusplus
13642      extern "C"
13643 #  endif
13644    int F77_DUMMY_MAIN() { return 1; }
13645 #endif
13646 int
13647 main ()
13648 {
13649 _Xsetlocale ();
13650   ;
13651   return 0;
13652 }
13653 _ACEOF
13654 rm -f conftest.$ac_objext conftest$ac_exeext
13655 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13656   (eval $ac_link) 2>&5
13657   ac_status=$?
13658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13659   (exit $ac_status); } &&
13660          { ac_try='test -s conftest$ac_exeext'
13661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13662   (eval $ac_try) 2>&5
13663   ac_status=$?
13664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13665   (exit $ac_status); }; }; then
13666   ac_cv_lib_Xintl__Xsetlocale=yes
13667 else
13668   echo "$as_me: failed program was:" >&5
13669 cat conftest.$ac_ext >&5
13670 ac_cv_lib_Xintl__Xsetlocale=no
13671 fi
13672 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13673 LIBS=$ac_check_lib_save_LIBS
13674 fi
13675 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
13676 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
13677 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
13678   have_xintl=yes
13679 else
13680   have_xintl=no
13681 fi
13682
13683   CPPFLAGS="$ac_save_CPPFLAGS"
13684   LDFLAGS="$ac_save_LDFLAGS"
13685 #  LIBS="$ac_save_LIBS"
13686
13687   if test "$have_xintl" = yes; then
13688     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
13689   fi
13690 fi
13691
13692
13693 ###############################################################################
13694 #
13695 #       Check for -lGL or -lMesaGL.
13696 #
13697 ###############################################################################
13698
13699 have_gl=no
13700 ac_have_mesa_gl=no
13701 with_gl_req=unspecified
13702 gl_halfassed=no
13703
13704 # Check whether --with-gl or --without-gl was given.
13705 if test "${with_gl+set}" = set; then
13706   withval="$with_gl"
13707   with_gl="$withval"; with_gl_req="$withval"
13708 else
13709   with_gl=yes
13710 fi;
13711
13712
13713    case "$with_gl" in
13714     yes) ;;
13715     no)  ;;
13716
13717     /*)
13718      echo "$as_me:$LINENO: checking for GL headers" >&5
13719 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
13720      d=$with_gl/include
13721      if test -d $d; then
13722        X_CFLAGS="-I$d $X_CFLAGS"
13723        echo "$as_me:$LINENO: result: $d" >&5
13724 echo "${ECHO_T}$d" >&6
13725      else
13726        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13727 echo "${ECHO_T}not found ($d: no such directory)" >&6
13728      fi
13729
13730      echo "$as_me:$LINENO: checking for GL libs" >&5
13731 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
13732      d=$with_gl/lib
13733      if test -d $d; then
13734        X_LIBS="-L$d $X_LIBS"
13735        echo "$as_me:$LINENO: result: $d" >&5
13736 echo "${ECHO_T}$d" >&6
13737      else
13738        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13739 echo "${ECHO_T}not found ($d: no such directory)" >&6
13740      fi
13741
13742      # replace the directory string with "yes".
13743      with_gl_req="yes"
13744      with_gl=$with_gl_req
13745      ;;
13746
13747     *)
13748      echo ""
13749      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
13750      echo "       If it is a directory, then \`DIR/include' will be added to"
13751      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13752      exit 1
13753      ;;
13754    esac
13755
13756
13757 ac_mesagl_version=unknown
13758 ac_mesagl_version_string=unknown
13759
13760 if test "$with_gl" = yes; then
13761
13762   ac_save_CPPFLAGS="$CPPFLAGS"
13763   if test \! -z "$includedir" ; then
13764     CPPFLAGS="$CPPFLAGS -I$includedir"
13765   fi
13766   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13767   if test "${ac_cv_header_GL_gl_h+set}" = set; then
13768   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
13769 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
13770 if test "${ac_cv_header_GL_gl_h+set}" = set; then
13771   echo $ECHO_N "(cached) $ECHO_C" >&6
13772 fi
13773 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
13774 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
13775 else
13776   # Is the header compilable?
13777 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
13778 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
13779 cat >conftest.$ac_ext <<_ACEOF
13780 #line $LINENO "configure"
13781 #include "confdefs.h"
13782 $ac_includes_default
13783 #include <GL/gl.h>
13784 _ACEOF
13785 rm -f conftest.$ac_objext
13786 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13787   (eval $ac_compile) 2>&5
13788   ac_status=$?
13789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13790   (exit $ac_status); } &&
13791          { ac_try='test -s conftest.$ac_objext'
13792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13793   (eval $ac_try) 2>&5
13794   ac_status=$?
13795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13796   (exit $ac_status); }; }; then
13797   ac_header_compiler=yes
13798 else
13799   echo "$as_me: failed program was:" >&5
13800 cat conftest.$ac_ext >&5
13801 ac_header_compiler=no
13802 fi
13803 rm -f conftest.$ac_objext conftest.$ac_ext
13804 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13805 echo "${ECHO_T}$ac_header_compiler" >&6
13806
13807 # Is the header present?
13808 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
13809 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
13810 cat >conftest.$ac_ext <<_ACEOF
13811 #line $LINENO "configure"
13812 #include "confdefs.h"
13813 #include <GL/gl.h>
13814 _ACEOF
13815 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13816   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13817   ac_status=$?
13818   egrep -v '^ *\+' conftest.er1 >conftest.err
13819   rm -f conftest.er1
13820   cat conftest.err >&5
13821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13822   (exit $ac_status); } >/dev/null; then
13823   if test -s conftest.err; then
13824     ac_cpp_err=$ac_c_preproc_warn_flag
13825   else
13826     ac_cpp_err=
13827   fi
13828 else
13829   ac_cpp_err=yes
13830 fi
13831 if test -z "$ac_cpp_err"; then
13832   ac_header_preproc=yes
13833 else
13834   echo "$as_me: failed program was:" >&5
13835   cat conftest.$ac_ext >&5
13836   ac_header_preproc=no
13837 fi
13838 rm -f conftest.err conftest.$ac_ext
13839 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13840 echo "${ECHO_T}$ac_header_preproc" >&6
13841
13842 # So?  What about this header?
13843 case $ac_header_compiler:$ac_header_preproc in
13844   yes:no )
13845     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
13846 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13847     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
13848 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
13849   no:yes )
13850     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
13851 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
13852     { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
13853 echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
13854     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
13855 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
13856 esac
13857 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
13858 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
13859 if test "${ac_cv_header_GL_gl_h+set}" = set; then
13860   echo $ECHO_N "(cached) $ECHO_C" >&6
13861 else
13862   ac_cv_header_GL_gl_h=$ac_header_preproc
13863 fi
13864 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
13865 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
13866
13867 fi
13868 if test $ac_cv_header_GL_gl_h = yes; then
13869   have_gl=yes
13870 else
13871   have_gl=no
13872 fi
13873
13874
13875   CPPFLAGS="$ac_save_CPPFLAGS"
13876   if test "$have_gl" = yes ; then
13877
13878   ac_save_CPPFLAGS="$CPPFLAGS"
13879   if test \! -z "$includedir" ; then
13880     CPPFLAGS="$CPPFLAGS -I$includedir"
13881   fi
13882   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13883   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
13884 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
13885 if test "${ac_cv_header_GL_glx_h+set}" = set; then
13886   echo $ECHO_N "(cached) $ECHO_C" >&6
13887 else
13888   cat >conftest.$ac_ext <<_ACEOF
13889 #line $LINENO "configure"
13890 #include "confdefs.h"
13891 #include <GL/gl.h>
13892
13893 #include <GL/glx.h>
13894 _ACEOF
13895 rm -f conftest.$ac_objext
13896 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13897   (eval $ac_compile) 2>&5
13898   ac_status=$?
13899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13900   (exit $ac_status); } &&
13901          { ac_try='test -s conftest.$ac_objext'
13902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13903   (eval $ac_try) 2>&5
13904   ac_status=$?
13905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13906   (exit $ac_status); }; }; then
13907   ac_cv_header_GL_glx_h=yes
13908 else
13909   echo "$as_me: failed program was:" >&5
13910 cat conftest.$ac_ext >&5
13911 ac_cv_header_GL_glx_h=no
13912 fi
13913 rm -f conftest.$ac_objext conftest.$ac_ext
13914 fi
13915 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
13916 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
13917 if test $ac_cv_header_GL_glx_h = yes; then
13918   have_gl=yes
13919 else
13920   have_gl=no
13921 fi
13922
13923
13924   CPPFLAGS="$ac_save_CPPFLAGS"
13925   fi
13926
13927   # If we have the headers, try and figure out which vendor it's from.
13928   #
13929   if test "$have_gl" = yes ; then
13930
13931     # We need to know whether it's MesaGL so that we know which libraries
13932     # to link against.
13933     #
13934     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
13935 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
13936 if test "${ac_cv_have_mesa_gl+set}" = set; then
13937   echo $ECHO_N "(cached) $ECHO_C" >&6
13938 else
13939   ac_cv_have_mesa_gl=no
13940
13941   ac_save_CPPFLAGS="$CPPFLAGS"
13942   if test \! -z "$includedir" ; then
13943     CPPFLAGS="$CPPFLAGS -I$includedir"
13944   fi
13945   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13946   cat >conftest.$ac_ext <<_ACEOF
13947 #line $LINENO "configure"
13948 #include "confdefs.h"
13949 #include <GL/glx.h>
13950
13951 _ACEOF
13952 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13953   egrep "Mesa|MESA" >/dev/null 2>&1; then
13954   ac_cv_have_mesa_gl=yes
13955 fi
13956 rm -f conftest*
13957
13958   CPPFLAGS="$ac_save_CPPFLAGS"
13959
13960 fi
13961 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
13962 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
13963     ac_have_mesa_gl=$ac_cv_have_mesa_gl
13964
13965
13966     gl_lib_1=""
13967     GL_LIBS=""
13968
13969
13970     # Some versions of MesaGL are compiled to require -lpthread.
13971     # So if the Mesa headers exist, and -lpthread exists, then always
13972     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
13973     #
13974     if test "$ac_have_mesa_gl" = yes; then
13975       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13976 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
13977 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
13978   echo $ECHO_N "(cached) $ECHO_C" >&6
13979 else
13980   ac_check_lib_save_LIBS=$LIBS
13981 LIBS="-lpthread  $LIBS"
13982 cat >conftest.$ac_ext <<_ACEOF
13983 #line $LINENO "configure"
13984 #include "confdefs.h"
13985
13986 /* Override any gcc2 internal prototype to avoid an error.  */
13987 #ifdef __cplusplus
13988 extern "C"
13989 #endif
13990 /* We use char because int might match the return type of a gcc2
13991    builtin and then its argument prototype would still apply.  */
13992 char pthread_create ();
13993 #ifdef F77_DUMMY_MAIN
13994 #  ifdef __cplusplus
13995      extern "C"
13996 #  endif
13997    int F77_DUMMY_MAIN() { return 1; }
13998 #endif
13999 int
14000 main ()
14001 {
14002 pthread_create ();
14003   ;
14004   return 0;
14005 }
14006 _ACEOF
14007 rm -f conftest.$ac_objext conftest$ac_exeext
14008 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14009   (eval $ac_link) 2>&5
14010   ac_status=$?
14011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14012   (exit $ac_status); } &&
14013          { ac_try='test -s conftest$ac_exeext'
14014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14015   (eval $ac_try) 2>&5
14016   ac_status=$?
14017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14018   (exit $ac_status); }; }; then
14019   ac_cv_lib_pthread_pthread_create=yes
14020 else
14021   echo "$as_me: failed program was:" >&5
14022 cat conftest.$ac_ext >&5
14023 ac_cv_lib_pthread_pthread_create=no
14024 fi
14025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14026 LIBS=$ac_check_lib_save_LIBS
14027 fi
14028 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
14029 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
14030 if test $ac_cv_lib_pthread_pthread_create = yes; then
14031   GL_LIBS="-lpthread"
14032 fi
14033
14034     fi
14035
14036
14037     # If we have Mesa headers, check to see if we can link against -lMesaGL.
14038     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
14039     # Else, warn that GL is busted.  (We have the headers, but no libs.)
14040     #
14041
14042     if test "$ac_have_mesa_gl" = yes ; then
14043
14044   ac_save_CPPFLAGS="$CPPFLAGS"
14045   ac_save_LDFLAGS="$LDFLAGS"
14046 #  ac_save_LIBS="$LIBS"
14047
14048   if test \! -z "$includedir" ; then
14049     CPPFLAGS="$CPPFLAGS -I$includedir"
14050   fi
14051   # note: $X_CFLAGS includes $x_includes
14052   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14053
14054   if test \! -z "$libdir" ; then
14055     LDFLAGS="$LDFLAGS -L$libdir"
14056   fi
14057   # note: $X_LIBS includes $x_libraries
14058   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14059
14060   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
14061 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
14062 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
14063   echo $ECHO_N "(cached) $ECHO_C" >&6
14064 else
14065   ac_check_lib_save_LIBS=$LIBS
14066 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14067 cat >conftest.$ac_ext <<_ACEOF
14068 #line $LINENO "configure"
14069 #include "confdefs.h"
14070
14071 /* Override any gcc2 internal prototype to avoid an error.  */
14072 #ifdef __cplusplus
14073 extern "C"
14074 #endif
14075 /* We use char because int might match the return type of a gcc2
14076    builtin and then its argument prototype would still apply.  */
14077 char glXCreateContext ();
14078 #ifdef F77_DUMMY_MAIN
14079 #  ifdef __cplusplus
14080      extern "C"
14081 #  endif
14082    int F77_DUMMY_MAIN() { return 1; }
14083 #endif
14084 int
14085 main ()
14086 {
14087 glXCreateContext ();
14088   ;
14089   return 0;
14090 }
14091 _ACEOF
14092 rm -f conftest.$ac_objext conftest$ac_exeext
14093 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14094   (eval $ac_link) 2>&5
14095   ac_status=$?
14096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14097   (exit $ac_status); } &&
14098          { ac_try='test -s conftest$ac_exeext'
14099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14100   (eval $ac_try) 2>&5
14101   ac_status=$?
14102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103   (exit $ac_status); }; }; then
14104   ac_cv_lib_MesaGL_glXCreateContext=yes
14105 else
14106   echo "$as_me: failed program was:" >&5
14107 cat conftest.$ac_ext >&5
14108 ac_cv_lib_MesaGL_glXCreateContext=no
14109 fi
14110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14111 LIBS=$ac_check_lib_save_LIBS
14112 fi
14113 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
14114 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
14115 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
14116   gl_lib_1="MesaGL"
14117                       GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
14118 fi
14119
14120   CPPFLAGS="$ac_save_CPPFLAGS"
14121   LDFLAGS="$ac_save_LDFLAGS"
14122 #  LIBS="$ac_save_LIBS"
14123
14124     fi
14125
14126     if test "$gl_lib_1" = "" ; then
14127
14128   ac_save_CPPFLAGS="$CPPFLAGS"
14129   ac_save_LDFLAGS="$LDFLAGS"
14130 #  ac_save_LIBS="$LIBS"
14131
14132   if test \! -z "$includedir" ; then
14133     CPPFLAGS="$CPPFLAGS -I$includedir"
14134   fi
14135   # note: $X_CFLAGS includes $x_includes
14136   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14137
14138   if test \! -z "$libdir" ; then
14139     LDFLAGS="$LDFLAGS -L$libdir"
14140   fi
14141   # note: $X_LIBS includes $x_libraries
14142   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14143
14144   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
14145 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
14146 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
14147   echo $ECHO_N "(cached) $ECHO_C" >&6
14148 else
14149   ac_check_lib_save_LIBS=$LIBS
14150 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14151 cat >conftest.$ac_ext <<_ACEOF
14152 #line $LINENO "configure"
14153 #include "confdefs.h"
14154
14155 /* Override any gcc2 internal prototype to avoid an error.  */
14156 #ifdef __cplusplus
14157 extern "C"
14158 #endif
14159 /* We use char because int might match the return type of a gcc2
14160    builtin and then its argument prototype would still apply.  */
14161 char glXCreateContext ();
14162 #ifdef F77_DUMMY_MAIN
14163 #  ifdef __cplusplus
14164      extern "C"
14165 #  endif
14166    int F77_DUMMY_MAIN() { return 1; }
14167 #endif
14168 int
14169 main ()
14170 {
14171 glXCreateContext ();
14172   ;
14173   return 0;
14174 }
14175 _ACEOF
14176 rm -f conftest.$ac_objext conftest$ac_exeext
14177 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14178   (eval $ac_link) 2>&5
14179   ac_status=$?
14180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14181   (exit $ac_status); } &&
14182          { ac_try='test -s conftest$ac_exeext'
14183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14184   (eval $ac_try) 2>&5
14185   ac_status=$?
14186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14187   (exit $ac_status); }; }; then
14188   ac_cv_lib_GL_glXCreateContext=yes
14189 else
14190   echo "$as_me: failed program was:" >&5
14191 cat conftest.$ac_ext >&5
14192 ac_cv_lib_GL_glXCreateContext=no
14193 fi
14194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14195 LIBS=$ac_check_lib_save_LIBS
14196 fi
14197 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
14198 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
14199 if test $ac_cv_lib_GL_glXCreateContext = yes; then
14200   gl_lib_1="GL"
14201                       GL_LIBS="-lGL -lGLU $GL_LIBS"
14202 fi
14203
14204   CPPFLAGS="$ac_save_CPPFLAGS"
14205   LDFLAGS="$ac_save_LDFLAGS"
14206 #  LIBS="$ac_save_LIBS"
14207
14208     fi
14209
14210     if test "$gl_lib_1" = "" ; then
14211       # we have headers, but no libs -- bail.
14212       have_gl=no
14213       ac_have_mesa_gl=no
14214       gl_halfassed=yes
14215     else
14216       # linking works -- we can build the GL hacks.
14217       cat >>confdefs.h <<\_ACEOF
14218 #define HAVE_GL 1
14219 _ACEOF
14220
14221       if test "$ac_have_mesa_gl" = yes ; then
14222         cat >>confdefs.h <<\_ACEOF
14223 #define HAVE_MESA_GL 1
14224 _ACEOF
14225
14226       fi
14227     fi
14228   fi
14229
14230
14231   # Now that we know we have GL headers and libs, do some more GL testing.
14232   #
14233
14234   if test "$have_gl" = yes ; then
14235     # If it's MesaGL, we'd like to issue a warning if the version number
14236     # is less than or equal to 2.6, because that version had a security bug.
14237     #
14238     if test "$ac_have_mesa_gl" = yes; then
14239
14240       echo "$as_me:$LINENO: checking MesaGL version number" >&5
14241 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
14242 if test "${ac_cv_mesagl_version_string+set}" = set; then
14243   echo $ECHO_N "(cached) $ECHO_C" >&6
14244 else
14245   cat > conftest.$ac_ext <<EOF
14246 #line 14252 "configure"
14247 #include "confdefs.h"
14248 #include <GL/gl.h>
14249 #ifndef MESA_MAJOR_VERSION
14250 # include <GL/xmesa.h>
14251 # define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
14252 # define MESA_MINOR_VERSION XMESA_MINOR_VERSION
14253 #endif
14254 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
14255 EOF
14256
14257          ac_save_CPPFLAGS="$CPPFLAGS"
14258          if test \! -z "$includedir" ; then
14259            CPPFLAGS="$CPPFLAGS -I$includedir"
14260          fi
14261          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14262
14263 # With autoconf 2.13 we could do this:
14264 #
14265 #        changequote(X,Y)
14266 #        mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | sed -n \
14267 #             's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
14268 #        changequote([,])
14269 #
14270 # but with autoconf 2.52+ (m4 1.4) that causes an error:
14271 #   m4: ERROR: Recursion limit of 1024 exceeded, use -L<N> to change it
14272 #
14273 # So, we need to use the autoconf line-noise macros [ for [ and ] for ]
14274 #
14275          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
14276               's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
14277
14278
14279          rm -f conftest.$ac_ext
14280
14281          CPPFLAGS="$ac_save_CPPFLAGS"
14282
14283          if test "$mglv" = ""; then
14284            ac_mesagl_version=unknown
14285            ac_mesagl_version_string=unknown
14286          else
14287            ac_mesagl_version_string=$mglv
14288            maj=`echo $mglv | sed -n 's/\..*//p'`
14289            min=`echo $mglv | sed -n 's/.*\.//p'`
14290            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
14291            if test -z "$ac_mesagl_version"; then
14292              ac_mesagl_version=unknown
14293              ac_mesagl_version_string=unknown
14294            fi
14295          fi
14296          ac_cv_mesagl_version=$ac_mesagl_version
14297          ac_cv_mesagl_version_string=$ac_mesagl_version_string
14298
14299 fi
14300 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
14301 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
14302       ac_mesagl_version=$ac_cv_mesagl_version
14303       ac_mesagl_version_string=$ac_cv_mesagl_version_string
14304     fi
14305
14306
14307     # Check for OpenGL 1.1 features.
14308     #
14309
14310   ac_save_CPPFLAGS="$CPPFLAGS"
14311   ac_save_LDFLAGS="$LDFLAGS"
14312 #  ac_save_LIBS="$LIBS"
14313
14314   if test \! -z "$includedir" ; then
14315     CPPFLAGS="$CPPFLAGS -I$includedir"
14316   fi
14317   # note: $X_CFLAGS includes $x_includes
14318   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14319
14320   if test \! -z "$libdir" ; then
14321     LDFLAGS="$LDFLAGS -L$libdir"
14322   fi
14323   # note: $X_LIBS includes $x_libraries
14324   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14325
14326   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
14327 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
14328 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
14329 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14330   echo $ECHO_N "(cached) $ECHO_C" >&6
14331 else
14332   ac_check_lib_save_LIBS=$LIBS
14333 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
14334 cat >conftest.$ac_ext <<_ACEOF
14335 #line $LINENO "configure"
14336 #include "confdefs.h"
14337
14338 /* Override any gcc2 internal prototype to avoid an error.  */
14339 #ifdef __cplusplus
14340 extern "C"
14341 #endif
14342 /* We use char because int might match the return type of a gcc2
14343    builtin and then its argument prototype would still apply.  */
14344 char glBindTexture ();
14345 #ifdef F77_DUMMY_MAIN
14346 #  ifdef __cplusplus
14347      extern "C"
14348 #  endif
14349    int F77_DUMMY_MAIN() { return 1; }
14350 #endif
14351 int
14352 main ()
14353 {
14354 glBindTexture ();
14355   ;
14356   return 0;
14357 }
14358 _ACEOF
14359 rm -f conftest.$ac_objext conftest$ac_exeext
14360 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14361   (eval $ac_link) 2>&5
14362   ac_status=$?
14363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14364   (exit $ac_status); } &&
14365          { ac_try='test -s conftest$ac_exeext'
14366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14367   (eval $ac_try) 2>&5
14368   ac_status=$?
14369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14370   (exit $ac_status); }; }; then
14371   eval "$as_ac_Lib=yes"
14372 else
14373   echo "$as_me: failed program was:" >&5
14374 cat conftest.$ac_ext >&5
14375 eval "$as_ac_Lib=no"
14376 fi
14377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14378 LIBS=$ac_check_lib_save_LIBS
14379 fi
14380 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14381 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14382 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14383   cat >>confdefs.h <<\_ACEOF
14384 #define HAVE_GLBINDTEXTURE 1
14385 _ACEOF
14386
14387 else
14388   true
14389 fi
14390
14391   CPPFLAGS="$ac_save_CPPFLAGS"
14392   LDFLAGS="$ac_save_LDFLAGS"
14393 #  LIBS="$ac_save_LIBS"
14394
14395   fi
14396
14397 elif test "$with_gl" != no; then
14398   echo "error: must be yes or no: --with-gl=$with_gl"
14399   exit 1
14400 fi
14401
14402
14403 ###############################################################################
14404 #
14405 #       Check for -lgle.
14406 #
14407 ###############################################################################
14408
14409 have_gle=no
14410 with_gle_req=unspecified
14411 gle_halfassed=no
14412
14413 # Check whether --with-gle or --without-gle was given.
14414 if test "${with_gle+set}" = set; then
14415   withval="$with_gle"
14416   with_gle="$withval"; with_gle_req="$withval"
14417 else
14418   with_gle=yes
14419 fi;
14420
14421
14422    case "$with_gle" in
14423     yes) ;;
14424     no)  ;;
14425
14426     /*)
14427      echo "$as_me:$LINENO: checking for GLE headers" >&5
14428 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
14429      d=$with_gle/include
14430      if test -d $d; then
14431        X_CFLAGS="-I$d $X_CFLAGS"
14432        echo "$as_me:$LINENO: result: $d" >&5
14433 echo "${ECHO_T}$d" >&6
14434      else
14435        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14436 echo "${ECHO_T}not found ($d: no such directory)" >&6
14437      fi
14438
14439      echo "$as_me:$LINENO: checking for GLE libs" >&5
14440 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
14441      d=$with_gle/lib
14442      if test -d $d; then
14443        X_LIBS="-L$d $X_LIBS"
14444        echo "$as_me:$LINENO: result: $d" >&5
14445 echo "${ECHO_T}$d" >&6
14446      else
14447        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14448 echo "${ECHO_T}not found ($d: no such directory)" >&6
14449      fi
14450
14451      # replace the directory string with "yes".
14452      with_gle_req="yes"
14453      with_gle=$with_gle_req
14454      ;;
14455
14456     *)
14457      echo ""
14458      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
14459      echo "       If it is a directory, then \`DIR/include' will be added to"
14460      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14461      exit 1
14462      ;;
14463    esac
14464
14465
14466 GLE_LIBS=""
14467
14468 if test "$with_gle" = yes; then
14469
14470
14471   ac_save_CPPFLAGS="$CPPFLAGS"
14472   if test \! -z "$includedir" ; then
14473     CPPFLAGS="$CPPFLAGS -I$includedir"
14474   fi
14475   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14476   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
14477 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
14478 if test "${ac_cv_header_GL_gle_h+set}" = set; then
14479   echo $ECHO_N "(cached) $ECHO_C" >&6
14480 else
14481   cat >conftest.$ac_ext <<_ACEOF
14482 #line $LINENO "configure"
14483 #include "confdefs.h"
14484 #include <GL/gl.h>
14485
14486 #include <GL/gle.h>
14487 _ACEOF
14488 rm -f conftest.$ac_objext
14489 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14490   (eval $ac_compile) 2>&5
14491   ac_status=$?
14492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14493   (exit $ac_status); } &&
14494          { ac_try='test -s conftest.$ac_objext'
14495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14496   (eval $ac_try) 2>&5
14497   ac_status=$?
14498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14499   (exit $ac_status); }; }; then
14500   ac_cv_header_GL_gle_h=yes
14501 else
14502   echo "$as_me: failed program was:" >&5
14503 cat conftest.$ac_ext >&5
14504 ac_cv_header_GL_gle_h=no
14505 fi
14506 rm -f conftest.$ac_objext conftest.$ac_ext
14507 fi
14508 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
14509 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
14510 if test $ac_cv_header_GL_gle_h = yes; then
14511   have_gle3=yes
14512 else
14513   have_gle3=no
14514 fi
14515
14516
14517   CPPFLAGS="$ac_save_CPPFLAGS"
14518   if test "$have_gle3" = yes ; then
14519     have_gle=yes;
14520   else
14521
14522   ac_save_CPPFLAGS="$CPPFLAGS"
14523   if test \! -z "$includedir" ; then
14524     CPPFLAGS="$CPPFLAGS -I$includedir"
14525   fi
14526   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14527   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
14528 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
14529 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
14530   echo $ECHO_N "(cached) $ECHO_C" >&6
14531 else
14532   cat >conftest.$ac_ext <<_ACEOF
14533 #line $LINENO "configure"
14534 #include "confdefs.h"
14535 #include <GL/gl.h>
14536
14537 #include <GL/gutil.h>
14538 _ACEOF
14539 rm -f conftest.$ac_objext
14540 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14541   (eval $ac_compile) 2>&5
14542   ac_status=$?
14543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14544   (exit $ac_status); } &&
14545          { ac_try='test -s conftest.$ac_objext'
14546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14547   (eval $ac_try) 2>&5
14548   ac_status=$?
14549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14550   (exit $ac_status); }; }; then
14551   ac_cv_header_GL_gutil_h=yes
14552 else
14553   echo "$as_me: failed program was:" >&5
14554 cat conftest.$ac_ext >&5
14555 ac_cv_header_GL_gutil_h=no
14556 fi
14557 rm -f conftest.$ac_objext conftest.$ac_ext
14558 fi
14559 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
14560 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
14561 if test $ac_cv_header_GL_gutil_h = yes; then
14562   have_gle=yes
14563 else
14564   have_gle=no
14565 fi
14566
14567
14568   CPPFLAGS="$ac_save_CPPFLAGS"
14569     if test "$have_gle" = yes ; then
14570
14571   ac_save_CPPFLAGS="$CPPFLAGS"
14572   if test \! -z "$includedir" ; then
14573     CPPFLAGS="$CPPFLAGS -I$includedir"
14574   fi
14575   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14576   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
14577 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
14578 if test "${ac_cv_header_GL_tube_h+set}" = set; then
14579   echo $ECHO_N "(cached) $ECHO_C" >&6
14580 else
14581   cat >conftest.$ac_ext <<_ACEOF
14582 #line $LINENO "configure"
14583 #include "confdefs.h"
14584 #include <GL/gl.h>
14585
14586 #include <GL/tube.h>
14587 _ACEOF
14588 rm -f conftest.$ac_objext
14589 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14590   (eval $ac_compile) 2>&5
14591   ac_status=$?
14592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14593   (exit $ac_status); } &&
14594          { ac_try='test -s conftest.$ac_objext'
14595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14596   (eval $ac_try) 2>&5
14597   ac_status=$?
14598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14599   (exit $ac_status); }; }; then
14600   ac_cv_header_GL_tube_h=yes
14601 else
14602   echo "$as_me: failed program was:" >&5
14603 cat conftest.$ac_ext >&5
14604 ac_cv_header_GL_tube_h=no
14605 fi
14606 rm -f conftest.$ac_objext conftest.$ac_ext
14607 fi
14608 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
14609 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
14610 if test $ac_cv_header_GL_tube_h = yes; then
14611   have_gle=yes
14612 else
14613   have_gle=no
14614 fi
14615
14616
14617   CPPFLAGS="$ac_save_CPPFLAGS"
14618     fi
14619   fi
14620
14621   if test "$have_gle" = yes ; then
14622     have_gle=no
14623     gle_halfassed=yes
14624
14625   ac_save_CPPFLAGS="$CPPFLAGS"
14626   ac_save_LDFLAGS="$LDFLAGS"
14627 #  ac_save_LIBS="$LIBS"
14628
14629   if test \! -z "$includedir" ; then
14630     CPPFLAGS="$CPPFLAGS -I$includedir"
14631   fi
14632   # note: $X_CFLAGS includes $x_includes
14633   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14634
14635   if test \! -z "$libdir" ; then
14636     LDFLAGS="$LDFLAGS -L$libdir"
14637   fi
14638   # note: $X_LIBS includes $x_libraries
14639   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14640
14641   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
14642 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
14643 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
14644   echo $ECHO_N "(cached) $ECHO_C" >&6
14645 else
14646   ac_check_lib_save_LIBS=$LIBS
14647 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
14648 cat >conftest.$ac_ext <<_ACEOF
14649 #line $LINENO "configure"
14650 #include "confdefs.h"
14651
14652 /* Override any gcc2 internal prototype to avoid an error.  */
14653 #ifdef __cplusplus
14654 extern "C"
14655 #endif
14656 /* We use char because int might match the return type of a gcc2
14657    builtin and then its argument prototype would still apply.  */
14658 char gleCreateGC ();
14659 #ifdef F77_DUMMY_MAIN
14660 #  ifdef __cplusplus
14661      extern "C"
14662 #  endif
14663    int F77_DUMMY_MAIN() { return 1; }
14664 #endif
14665 int
14666 main ()
14667 {
14668 gleCreateGC ();
14669   ;
14670   return 0;
14671 }
14672 _ACEOF
14673 rm -f conftest.$ac_objext conftest$ac_exeext
14674 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14675   (eval $ac_link) 2>&5
14676   ac_status=$?
14677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14678   (exit $ac_status); } &&
14679          { ac_try='test -s conftest$ac_exeext'
14680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14681   (eval $ac_try) 2>&5
14682   ac_status=$?
14683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14684   (exit $ac_status); }; }; then
14685   ac_cv_lib_gle_gleCreateGC=yes
14686 else
14687   echo "$as_me: failed program was:" >&5
14688 cat conftest.$ac_ext >&5
14689 ac_cv_lib_gle_gleCreateGC=no
14690 fi
14691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14692 LIBS=$ac_check_lib_save_LIBS
14693 fi
14694 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
14695 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
14696 if test $ac_cv_lib_gle_gleCreateGC = yes; then
14697   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
14698 fi
14699
14700   CPPFLAGS="$ac_save_CPPFLAGS"
14701   LDFLAGS="$ac_save_LDFLAGS"
14702 #  LIBS="$ac_save_LIBS"
14703
14704   fi
14705   if test "$have_gle" = yes ; then
14706     have_gle=no
14707     gle_halfassed=yes
14708
14709     # sometimes the libmatrix stuff is included in libgle.  look there first.
14710 #
14711 # I don't get it.  For some reason, this test passes on SGI, as if
14712 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
14713 # Yet the link is succeeding.  Why???
14714 #
14715 #    AC_CHECK_X_LIB(gle, uview_direction_d,
14716 #                   [have_gle=yes; gle_halfassed=no],
14717 #                   [], $GL_LIBS -lX11 -lXext -lm)
14718
14719     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
14720     # *sigh*
14721     if test "$have_gle3" = yes ; then
14722
14723   ac_save_CPPFLAGS="$CPPFLAGS"
14724   ac_save_LDFLAGS="$LDFLAGS"
14725 #  ac_save_LIBS="$LIBS"
14726
14727   if test \! -z "$includedir" ; then
14728     CPPFLAGS="$CPPFLAGS -I$includedir"
14729   fi
14730   # note: $X_CFLAGS includes $x_includes
14731   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14732
14733   if test \! -z "$libdir" ; then
14734     LDFLAGS="$LDFLAGS -L$libdir"
14735   fi
14736   # note: $X_LIBS includes $x_libraries
14737   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14738
14739   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
14740 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
14741 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
14742   echo $ECHO_N "(cached) $ECHO_C" >&6
14743 else
14744   ac_check_lib_save_LIBS=$LIBS
14745 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
14746 cat >conftest.$ac_ext <<_ACEOF
14747 #line $LINENO "configure"
14748 #include "confdefs.h"
14749
14750 /* Override any gcc2 internal prototype to avoid an error.  */
14751 #ifdef __cplusplus
14752 extern "C"
14753 #endif
14754 /* We use char because int might match the return type of a gcc2
14755    builtin and then its argument prototype would still apply.  */
14756 char uview_direction ();
14757 #ifdef F77_DUMMY_MAIN
14758 #  ifdef __cplusplus
14759      extern "C"
14760 #  endif
14761    int F77_DUMMY_MAIN() { return 1; }
14762 #endif
14763 int
14764 main ()
14765 {
14766 uview_direction ();
14767   ;
14768   return 0;
14769 }
14770 _ACEOF
14771 rm -f conftest.$ac_objext conftest$ac_exeext
14772 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14773   (eval $ac_link) 2>&5
14774   ac_status=$?
14775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14776   (exit $ac_status); } &&
14777          { ac_try='test -s conftest$ac_exeext'
14778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14779   (eval $ac_try) 2>&5
14780   ac_status=$?
14781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14782   (exit $ac_status); }; }; then
14783   ac_cv_lib_gle_uview_direction=yes
14784 else
14785   echo "$as_me: failed program was:" >&5
14786 cat conftest.$ac_ext >&5
14787 ac_cv_lib_gle_uview_direction=no
14788 fi
14789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14790 LIBS=$ac_check_lib_save_LIBS
14791 fi
14792 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
14793 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
14794 if test $ac_cv_lib_gle_uview_direction = yes; then
14795   have_gle=yes; gle_halfassed=no
14796 fi
14797
14798   CPPFLAGS="$ac_save_CPPFLAGS"
14799   LDFLAGS="$ac_save_LDFLAGS"
14800 #  LIBS="$ac_save_LIBS"
14801
14802     fi
14803     # if it wasn't in libgle, then look in libmatrix.
14804     if test "$have_gle" = no ; then
14805
14806   ac_save_CPPFLAGS="$CPPFLAGS"
14807   ac_save_LDFLAGS="$LDFLAGS"
14808 #  ac_save_LIBS="$LIBS"
14809
14810   if test \! -z "$includedir" ; then
14811     CPPFLAGS="$CPPFLAGS -I$includedir"
14812   fi
14813   # note: $X_CFLAGS includes $x_includes
14814   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14815
14816   if test \! -z "$libdir" ; then
14817     LDFLAGS="$LDFLAGS -L$libdir"
14818   fi
14819   # note: $X_LIBS includes $x_libraries
14820   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14821
14822   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
14823 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
14824 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
14825   echo $ECHO_N "(cached) $ECHO_C" >&6
14826 else
14827   ac_check_lib_save_LIBS=$LIBS
14828 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
14829 cat >conftest.$ac_ext <<_ACEOF
14830 #line $LINENO "configure"
14831 #include "confdefs.h"
14832
14833 /* Override any gcc2 internal prototype to avoid an error.  */
14834 #ifdef __cplusplus
14835 extern "C"
14836 #endif
14837 /* We use char because int might match the return type of a gcc2
14838    builtin and then its argument prototype would still apply.  */
14839 char uview_direction_d ();
14840 #ifdef F77_DUMMY_MAIN
14841 #  ifdef __cplusplus
14842      extern "C"
14843 #  endif
14844    int F77_DUMMY_MAIN() { return 1; }
14845 #endif
14846 int
14847 main ()
14848 {
14849 uview_direction_d ();
14850   ;
14851   return 0;
14852 }
14853 _ACEOF
14854 rm -f conftest.$ac_objext conftest$ac_exeext
14855 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14856   (eval $ac_link) 2>&5
14857   ac_status=$?
14858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859   (exit $ac_status); } &&
14860          { ac_try='test -s conftest$ac_exeext'
14861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14862   (eval $ac_try) 2>&5
14863   ac_status=$?
14864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14865   (exit $ac_status); }; }; then
14866   ac_cv_lib_matrix_uview_direction_d=yes
14867 else
14868   echo "$as_me: failed program was:" >&5
14869 cat conftest.$ac_ext >&5
14870 ac_cv_lib_matrix_uview_direction_d=no
14871 fi
14872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14873 LIBS=$ac_check_lib_save_LIBS
14874 fi
14875 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
14876 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
14877 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
14878   have_gle=yes; gle_halfassed=no;
14879                       GLE_LIBS="$GLE_LIBS -lmatrix"
14880 fi
14881
14882   CPPFLAGS="$ac_save_CPPFLAGS"
14883   LDFLAGS="$ac_save_LDFLAGS"
14884 #  LIBS="$ac_save_LIBS"
14885
14886     fi
14887   fi
14888
14889   if test "$have_gle" = yes ; then
14890     cat >>confdefs.h <<\_ACEOF
14891 #define HAVE_GLE 1
14892 _ACEOF
14893
14894     if test "$have_gle3" = yes ; then
14895       cat >>confdefs.h <<\_ACEOF
14896 #define HAVE_GLE3 1
14897 _ACEOF
14898
14899     fi
14900   fi
14901
14902 elif test "$with_gle" != no; then
14903   echo "error: must be yes or no: --with-gle=$with_gle"
14904   exit 1
14905
14906 fi
14907
14908
14909
14910 ###############################################################################
14911 #
14912 #       Check for -lXpm.
14913 #
14914 ###############################################################################
14915
14916 have_xpm=no
14917 with_xpm_req=unspecified
14918
14919 # Check whether --with-xpm or --without-xpm was given.
14920 if test "${with_xpm+set}" = set; then
14921   withval="$with_xpm"
14922   with_xpm="$withval"; with_xpm_req="$withval"
14923 else
14924   with_xpm=yes
14925 fi;
14926
14927
14928    case "$with_xpm" in
14929     yes) ;;
14930     no)  ;;
14931
14932     /*)
14933      echo "$as_me:$LINENO: checking for XPM headers" >&5
14934 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
14935      d=$with_xpm/include
14936      if test -d $d; then
14937        X_CFLAGS="-I$d $X_CFLAGS"
14938        echo "$as_me:$LINENO: result: $d" >&5
14939 echo "${ECHO_T}$d" >&6
14940      else
14941        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14942 echo "${ECHO_T}not found ($d: no such directory)" >&6
14943      fi
14944
14945      echo "$as_me:$LINENO: checking for XPM libs" >&5
14946 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
14947      d=$with_xpm/lib
14948      if test -d $d; then
14949        X_LIBS="-L$d $X_LIBS"
14950        echo "$as_me:$LINENO: result: $d" >&5
14951 echo "${ECHO_T}$d" >&6
14952      else
14953        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14954 echo "${ECHO_T}not found ($d: no such directory)" >&6
14955      fi
14956
14957      # replace the directory string with "yes".
14958      with_xpm_req="yes"
14959      with_xpm=$with_xpm_req
14960      ;;
14961
14962     *)
14963      echo ""
14964      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
14965      echo "       If it is a directory, then \`DIR/include' will be added to"
14966      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14967      exit 1
14968      ;;
14969    esac
14970
14971
14972 if test "$with_xpm" = yes; then
14973
14974   ac_save_CPPFLAGS="$CPPFLAGS"
14975   if test \! -z "$includedir" ; then
14976     CPPFLAGS="$CPPFLAGS -I$includedir"
14977   fi
14978   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14979   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
14980 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
14981 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
14982   echo $ECHO_N "(cached) $ECHO_C" >&6
14983 else
14984   cat >conftest.$ac_ext <<_ACEOF
14985 #line $LINENO "configure"
14986 #include "confdefs.h"
14987 #include <X11/Xlib.h>
14988
14989 #include <X11/xpm.h>
14990 _ACEOF
14991 rm -f conftest.$ac_objext
14992 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14993   (eval $ac_compile) 2>&5
14994   ac_status=$?
14995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14996   (exit $ac_status); } &&
14997          { ac_try='test -s conftest.$ac_objext'
14998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14999   (eval $ac_try) 2>&5
15000   ac_status=$?
15001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15002   (exit $ac_status); }; }; then
15003   ac_cv_header_X11_xpm_h=yes
15004 else
15005   echo "$as_me: failed program was:" >&5
15006 cat conftest.$ac_ext >&5
15007 ac_cv_header_X11_xpm_h=no
15008 fi
15009 rm -f conftest.$ac_objext conftest.$ac_ext
15010 fi
15011 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
15012 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
15013 if test $ac_cv_header_X11_xpm_h = yes; then
15014   have_xpm=yes
15015                     cat >>confdefs.h <<\_ACEOF
15016 #define HAVE_XPM 1
15017 _ACEOF
15018
15019                     XPM_LIBS="-lXpm"
15020 fi
15021
15022
15023   CPPFLAGS="$ac_save_CPPFLAGS"
15024 elif test "$with_xpm" != no; then
15025   echo "error: must be yes or no: --with-xpm=$with_xpm"
15026   exit 1
15027 fi
15028
15029 # See comment near $motif_requires_xpm, above.
15030 # Need to do this here, after both Motif and XPM have been checked for.
15031 #
15032 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
15033   if test "$motif_requires_xpm" = yes ; then
15034     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
15035   fi
15036 fi
15037
15038
15039 ###############################################################################
15040 #
15041 #       Check for -lgdk_pixbuf.
15042 #
15043 ###############################################################################
15044
15045 have_gdk_pixbuf=no
15046 with_gdk_pixbuf_req=unspecified
15047
15048 # Check whether --with-pixbuf or --without-pixbuf was given.
15049 if test "${with_pixbuf+set}" = set; then
15050   withval="$with_pixbuf"
15051   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
15052 else
15053   with_gdk_pixbuf=yes
15054 fi;
15055
15056 # if --with-pixbuf=/directory/ was specified, remember that directory so that
15057 # we can also look for the `gdk-pixbuf-config' program in that directory.
15058 case "$with_gdk_pixbuf" in
15059   /*)
15060     gdk_pixbuf_dir="$with_gdk_pixbuf"
15061     ;;
15062   *)
15063     gdk_pixbuf_dir=""
15064     ;;
15065 esac
15066
15067
15068    case "$with_gdk_pixbuf" in
15069     yes) ;;
15070     no)  ;;
15071
15072     /*)
15073      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
15074 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
15075      d=$with_gdk_pixbuf/include
15076      if test -d $d; then
15077        X_CFLAGS="-I$d $X_CFLAGS"
15078        echo "$as_me:$LINENO: result: $d" >&5
15079 echo "${ECHO_T}$d" >&6
15080      else
15081        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15082 echo "${ECHO_T}not found ($d: no such directory)" >&6
15083      fi
15084
15085      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
15086 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
15087      d=$with_gdk_pixbuf/lib
15088      if test -d $d; then
15089        X_LIBS="-L$d $X_LIBS"
15090        echo "$as_me:$LINENO: result: $d" >&5
15091 echo "${ECHO_T}$d" >&6
15092      else
15093        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15094 echo "${ECHO_T}not found ($d: no such directory)" >&6
15095      fi
15096
15097      # replace the directory string with "yes".
15098      with_gdk_pixbuf_req="yes"
15099      with_gdk_pixbuf=$with_gdk_pixbuf_req
15100      ;;
15101
15102     *)
15103      echo ""
15104      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
15105      echo "       If it is a directory, then \`DIR/include' will be added to"
15106      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15107      exit 1
15108      ;;
15109    esac
15110
15111
15112 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
15113   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
15114   exit 1
15115 fi
15116
15117 if test "$with_gdk_pixbuf" = yes; then
15118   have_gdk_pixbuf=no
15119
15120   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
15121   # look in /foo/bin/ for for gdk-pixbuf-config.
15122   #
15123   gdk_pixbuf_path="$PATH"
15124
15125   if test ! -z "$gtk_dir"; then
15126     # canonicalize slashes.
15127     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15128     gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15129   fi
15130
15131   if test ! -z "$gnome_dir"; then
15132     # canonicalize slashes.
15133     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
15134     gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15135   fi
15136
15137   for ac_prog in gdk-pixbuf-config
15138 do
15139   # Extract the first word of "$ac_prog", so it can be a program name with args.
15140 set dummy $ac_prog; ac_word=$2
15141 echo "$as_me:$LINENO: checking for $ac_word" >&5
15142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15143 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
15144   echo $ECHO_N "(cached) $ECHO_C" >&6
15145 else
15146   case $gdk_pixbuf_config in
15147   [\\/]* | ?:[\\/]*)
15148   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
15149   ;;
15150   *)
15151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15152 for as_dir in $gdk_pixbuf_path
15153 do
15154   IFS=$as_save_IFS
15155   test -z "$as_dir" && as_dir=.
15156   for ac_exec_ext in '' $ac_executable_extensions; do
15157   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15158     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
15159     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15160     break 2
15161   fi
15162 done
15163 done
15164
15165   ;;
15166 esac
15167 fi
15168 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
15169
15170 if test -n "$gdk_pixbuf_config"; then
15171   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
15172 echo "${ECHO_T}$gdk_pixbuf_config" >&6
15173 else
15174   echo "$as_me:$LINENO: result: no" >&5
15175 echo "${ECHO_T}no" >&6
15176 fi
15177
15178   test -n "$gdk_pixbuf_config" && break
15179 done
15180
15181
15182   # If we found the gdk-pixbuf-config program, run it to get flags.
15183   #
15184   if test -n "$gdk_pixbuf_config" ; then
15185     echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15186 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15187 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15188   echo $ECHO_N "(cached) $ECHO_C" >&6
15189 else
15190   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
15191 fi
15192 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15193 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15194     echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15195 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15196 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15197   echo $ECHO_N "(cached) $ECHO_C" >&6
15198 else
15199   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
15200 fi
15201 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15202 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15203     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15204     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15205   fi
15206
15207   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
15208   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
15209
15210   # check for header 1...
15211
15212   ac_save_CPPFLAGS="$CPPFLAGS"
15213   if test \! -z "$includedir" ; then
15214     CPPFLAGS="$CPPFLAGS -I$includedir"
15215   fi
15216   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15217   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15218   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
15219 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
15220 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15221   echo $ECHO_N "(cached) $ECHO_C" >&6
15222 fi
15223 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
15224 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
15225 else
15226   # Is the header compilable?
15227 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
15228 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
15229 cat >conftest.$ac_ext <<_ACEOF
15230 #line $LINENO "configure"
15231 #include "confdefs.h"
15232 $ac_includes_default
15233 #include <gdk-pixbuf/gdk-pixbuf.h>
15234 _ACEOF
15235 rm -f conftest.$ac_objext
15236 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15237   (eval $ac_compile) 2>&5
15238   ac_status=$?
15239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15240   (exit $ac_status); } &&
15241          { ac_try='test -s conftest.$ac_objext'
15242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15243   (eval $ac_try) 2>&5
15244   ac_status=$?
15245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15246   (exit $ac_status); }; }; then
15247   ac_header_compiler=yes
15248 else
15249   echo "$as_me: failed program was:" >&5
15250 cat conftest.$ac_ext >&5
15251 ac_header_compiler=no
15252 fi
15253 rm -f conftest.$ac_objext conftest.$ac_ext
15254 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15255 echo "${ECHO_T}$ac_header_compiler" >&6
15256
15257 # Is the header present?
15258 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
15259 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
15260 cat >conftest.$ac_ext <<_ACEOF
15261 #line $LINENO "configure"
15262 #include "confdefs.h"
15263 #include <gdk-pixbuf/gdk-pixbuf.h>
15264 _ACEOF
15265 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15267   ac_status=$?
15268   egrep -v '^ *\+' conftest.er1 >conftest.err
15269   rm -f conftest.er1
15270   cat conftest.err >&5
15271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15272   (exit $ac_status); } >/dev/null; then
15273   if test -s conftest.err; then
15274     ac_cpp_err=$ac_c_preproc_warn_flag
15275   else
15276     ac_cpp_err=
15277   fi
15278 else
15279   ac_cpp_err=yes
15280 fi
15281 if test -z "$ac_cpp_err"; then
15282   ac_header_preproc=yes
15283 else
15284   echo "$as_me: failed program was:" >&5
15285   cat conftest.$ac_ext >&5
15286   ac_header_preproc=no
15287 fi
15288 rm -f conftest.err conftest.$ac_ext
15289 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15290 echo "${ECHO_T}$ac_header_preproc" >&6
15291
15292 # So?  What about this header?
15293 case $ac_header_compiler:$ac_header_preproc in
15294   yes:no )
15295     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
15296 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15297     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
15298 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
15299   no:yes )
15300     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
15301 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
15302     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5
15303 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;}
15304     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
15305 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
15306 esac
15307 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
15308 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
15309 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15310   echo $ECHO_N "(cached) $ECHO_C" >&6
15311 else
15312   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
15313 fi
15314 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
15315 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
15316
15317 fi
15318 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
15319   have_gdk_pixbuf=yes
15320 fi
15321
15322
15323   CPPFLAGS="$ac_save_CPPFLAGS"
15324
15325   # if that worked, check for header 2...
15326   if test "$have_gdk_pixbuf" = yes; then
15327     have_gdk_pixbuf=no
15328
15329   ac_save_CPPFLAGS="$CPPFLAGS"
15330   if test \! -z "$includedir" ; then
15331     CPPFLAGS="$CPPFLAGS -I$includedir"
15332   fi
15333   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15334   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15335   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
15336 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
15337 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15338   echo $ECHO_N "(cached) $ECHO_C" >&6
15339 fi
15340 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
15341 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
15342 else
15343   # Is the header compilable?
15344 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
15345 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
15346 cat >conftest.$ac_ext <<_ACEOF
15347 #line $LINENO "configure"
15348 #include "confdefs.h"
15349 $ac_includes_default
15350 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
15351 _ACEOF
15352 rm -f conftest.$ac_objext
15353 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15354   (eval $ac_compile) 2>&5
15355   ac_status=$?
15356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15357   (exit $ac_status); } &&
15358          { ac_try='test -s conftest.$ac_objext'
15359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15360   (eval $ac_try) 2>&5
15361   ac_status=$?
15362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15363   (exit $ac_status); }; }; then
15364   ac_header_compiler=yes
15365 else
15366   echo "$as_me: failed program was:" >&5
15367 cat conftest.$ac_ext >&5
15368 ac_header_compiler=no
15369 fi
15370 rm -f conftest.$ac_objext conftest.$ac_ext
15371 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15372 echo "${ECHO_T}$ac_header_compiler" >&6
15373
15374 # Is the header present?
15375 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
15376 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
15377 cat >conftest.$ac_ext <<_ACEOF
15378 #line $LINENO "configure"
15379 #include "confdefs.h"
15380 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
15381 _ACEOF
15382 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15383   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15384   ac_status=$?
15385   egrep -v '^ *\+' conftest.er1 >conftest.err
15386   rm -f conftest.er1
15387   cat conftest.err >&5
15388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15389   (exit $ac_status); } >/dev/null; then
15390   if test -s conftest.err; then
15391     ac_cpp_err=$ac_c_preproc_warn_flag
15392   else
15393     ac_cpp_err=
15394   fi
15395 else
15396   ac_cpp_err=yes
15397 fi
15398 if test -z "$ac_cpp_err"; then
15399   ac_header_preproc=yes
15400 else
15401   echo "$as_me: failed program was:" >&5
15402   cat conftest.$ac_ext >&5
15403   ac_header_preproc=no
15404 fi
15405 rm -f conftest.err conftest.$ac_ext
15406 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15407 echo "${ECHO_T}$ac_header_preproc" >&6
15408
15409 # So?  What about this header?
15410 case $ac_header_compiler:$ac_header_preproc in
15411   yes:no )
15412     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15413 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15414     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
15415 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
15416   no:yes )
15417     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
15418 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
15419     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
15420 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
15421     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
15422 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
15423 esac
15424 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
15425 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
15426 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15427   echo $ECHO_N "(cached) $ECHO_C" >&6
15428 else
15429   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
15430 fi
15431 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
15432 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
15433
15434 fi
15435 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
15436   have_gdk_pixbuf=yes
15437 fi
15438
15439
15440   CPPFLAGS="$ac_save_CPPFLAGS"
15441   fi
15442
15443   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
15444
15445   if test "$have_gdk_pixbuf" = yes; then
15446     # we have the headers, now check for the libraries
15447     have_gdk_pixbuf=no
15448     gdk_pixbuf_halfassed=yes
15449     # library 1...
15450
15451   ac_save_CPPFLAGS="$CPPFLAGS"
15452   ac_save_LDFLAGS="$LDFLAGS"
15453 #  ac_save_LIBS="$LIBS"
15454
15455   if test \! -z "$includedir" ; then
15456     CPPFLAGS="$CPPFLAGS -I$includedir"
15457   fi
15458   # note: $X_CFLAGS includes $x_includes
15459   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15460
15461   if test \! -z "$libdir" ; then
15462     LDFLAGS="$LDFLAGS -L$libdir"
15463   fi
15464   # note: $X_LIBS includes $x_libraries
15465   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15466
15467   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lgdk_pixbuf" >&5
15468 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lgdk_pixbuf... $ECHO_C" >&6
15469 if test "${ac_cv_lib_gdk_pixbuf_gdk_pixbuf_new_from_file+set}" = set; then
15470   echo $ECHO_N "(cached) $ECHO_C" >&6
15471 else
15472   ac_check_lib_save_LIBS=$LIBS
15473 LIBS="-lgdk_pixbuf $ac_gdk_pixbuf_config_libs $LIBS"
15474 cat >conftest.$ac_ext <<_ACEOF
15475 #line $LINENO "configure"
15476 #include "confdefs.h"
15477
15478 /* Override any gcc2 internal prototype to avoid an error.  */
15479 #ifdef __cplusplus
15480 extern "C"
15481 #endif
15482 /* We use char because int might match the return type of a gcc2
15483    builtin and then its argument prototype would still apply.  */
15484 char gdk_pixbuf_new_from_file ();
15485 #ifdef F77_DUMMY_MAIN
15486 #  ifdef __cplusplus
15487      extern "C"
15488 #  endif
15489    int F77_DUMMY_MAIN() { return 1; }
15490 #endif
15491 int
15492 main ()
15493 {
15494 gdk_pixbuf_new_from_file ();
15495   ;
15496   return 0;
15497 }
15498 _ACEOF
15499 rm -f conftest.$ac_objext conftest$ac_exeext
15500 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15501   (eval $ac_link) 2>&5
15502   ac_status=$?
15503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15504   (exit $ac_status); } &&
15505          { ac_try='test -s conftest$ac_exeext'
15506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15507   (eval $ac_try) 2>&5
15508   ac_status=$?
15509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15510   (exit $ac_status); }; }; then
15511   ac_cv_lib_gdk_pixbuf_gdk_pixbuf_new_from_file=yes
15512 else
15513   echo "$as_me: failed program was:" >&5
15514 cat conftest.$ac_ext >&5
15515 ac_cv_lib_gdk_pixbuf_gdk_pixbuf_new_from_file=no
15516 fi
15517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15518 LIBS=$ac_check_lib_save_LIBS
15519 fi
15520 echo "$as_me:$LINENO: result: $ac_cv_lib_gdk_pixbuf_gdk_pixbuf_new_from_file" >&5
15521 echo "${ECHO_T}$ac_cv_lib_gdk_pixbuf_gdk_pixbuf_new_from_file" >&6
15522 if test $ac_cv_lib_gdk_pixbuf_gdk_pixbuf_new_from_file = yes; then
15523   have_gdk_pixbuf=yes
15524 else
15525   true
15526 fi
15527
15528   CPPFLAGS="$ac_save_CPPFLAGS"
15529   LDFLAGS="$ac_save_LDFLAGS"
15530 #  LIBS="$ac_save_LIBS"
15531
15532     # library 2...
15533     if test "$have_gdk_pixbuf" = yes; then
15534
15535   ac_save_CPPFLAGS="$CPPFLAGS"
15536   ac_save_LDFLAGS="$LDFLAGS"
15537 #  ac_save_LIBS="$LIBS"
15538
15539   if test \! -z "$includedir" ; then
15540     CPPFLAGS="$CPPFLAGS -I$includedir"
15541   fi
15542   # note: $X_CFLAGS includes $x_includes
15543   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15544
15545   if test \! -z "$libdir" ; then
15546     LDFLAGS="$LDFLAGS -L$libdir"
15547   fi
15548   # note: $X_LIBS includes $x_libraries
15549   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15550
15551   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lgdk_pixbuf_xlib" >&5
15552 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lgdk_pixbuf_xlib... $ECHO_C" >&6
15553 if test "${ac_cv_lib_gdk_pixbuf_xlib_gdk_pixbuf_xlib_init+set}" = set; then
15554   echo $ECHO_N "(cached) $ECHO_C" >&6
15555 else
15556   ac_check_lib_save_LIBS=$LIBS
15557 LIBS="-lgdk_pixbuf_xlib $ac_gdk_pixbuf_config_libs $LIBS"
15558 cat >conftest.$ac_ext <<_ACEOF
15559 #line $LINENO "configure"
15560 #include "confdefs.h"
15561
15562 /* Override any gcc2 internal prototype to avoid an error.  */
15563 #ifdef __cplusplus
15564 extern "C"
15565 #endif
15566 /* We use char because int might match the return type of a gcc2
15567    builtin and then its argument prototype would still apply.  */
15568 char gdk_pixbuf_xlib_init ();
15569 #ifdef F77_DUMMY_MAIN
15570 #  ifdef __cplusplus
15571      extern "C"
15572 #  endif
15573    int F77_DUMMY_MAIN() { return 1; }
15574 #endif
15575 int
15576 main ()
15577 {
15578 gdk_pixbuf_xlib_init ();
15579   ;
15580   return 0;
15581 }
15582 _ACEOF
15583 rm -f conftest.$ac_objext conftest$ac_exeext
15584 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15585   (eval $ac_link) 2>&5
15586   ac_status=$?
15587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15588   (exit $ac_status); } &&
15589          { ac_try='test -s conftest$ac_exeext'
15590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15591   (eval $ac_try) 2>&5
15592   ac_status=$?
15593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594   (exit $ac_status); }; }; then
15595   ac_cv_lib_gdk_pixbuf_xlib_gdk_pixbuf_xlib_init=yes
15596 else
15597   echo "$as_me: failed program was:" >&5
15598 cat conftest.$ac_ext >&5
15599 ac_cv_lib_gdk_pixbuf_xlib_gdk_pixbuf_xlib_init=no
15600 fi
15601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15602 LIBS=$ac_check_lib_save_LIBS
15603 fi
15604 echo "$as_me:$LINENO: result: $ac_cv_lib_gdk_pixbuf_xlib_gdk_pixbuf_xlib_init" >&5
15605 echo "${ECHO_T}$ac_cv_lib_gdk_pixbuf_xlib_gdk_pixbuf_xlib_init" >&6
15606 if test $ac_cv_lib_gdk_pixbuf_xlib_gdk_pixbuf_xlib_init = yes; then
15607   have_gdk_pixbuf=yes
15608                       gdk_pixbuf_halfassed=no
15609 else
15610   true
15611 fi
15612
15613   CPPFLAGS="$ac_save_CPPFLAGS"
15614   LDFLAGS="$ac_save_LDFLAGS"
15615 #  LIBS="$ac_save_LIBS"
15616
15617     fi
15618   fi
15619
15620   if test "$have_gdk_pixbuf" = yes; then
15621     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
15622     XPM_LIBS="$ac_gdk_pixbuf_config_libs -lgdk_pixbuf -lgdk_pixbuf_xlib"
15623     cat >>confdefs.h <<\_ACEOF
15624 #define HAVE_GDK_PIXBUF 1
15625 _ACEOF
15626
15627   fi
15628 fi
15629
15630
15631 ###############################################################################
15632 #
15633 #       Check for -ljpeg
15634 #
15635 ###############################################################################
15636
15637 have_jpeg=no
15638 with_jpeg_req=unspecified
15639 jpeg_halfassed=no
15640
15641 # Check whether --with-jpeg or --without-jpeg was given.
15642 if test "${with_jpeg+set}" = set; then
15643   withval="$with_jpeg"
15644   with_jpeg="$withval"; with_jpeg_req="$withval"
15645 else
15646   with_jpeg=yes
15647 fi;
15648
15649
15650    case "$with_jpeg" in
15651     yes) ;;
15652     no)  ;;
15653
15654     /*)
15655      echo "$as_me:$LINENO: checking for JPEG headers" >&5
15656 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
15657      d=$with_jpeg/include
15658      if test -d $d; then
15659        X_CFLAGS="-I$d $X_CFLAGS"
15660        echo "$as_me:$LINENO: result: $d" >&5
15661 echo "${ECHO_T}$d" >&6
15662      else
15663        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15664 echo "${ECHO_T}not found ($d: no such directory)" >&6
15665      fi
15666
15667      echo "$as_me:$LINENO: checking for JPEG libs" >&5
15668 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
15669      d=$with_jpeg/lib
15670      if test -d $d; then
15671        X_LIBS="-L$d $X_LIBS"
15672        echo "$as_me:$LINENO: result: $d" >&5
15673 echo "${ECHO_T}$d" >&6
15674      else
15675        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15676 echo "${ECHO_T}not found ($d: no such directory)" >&6
15677      fi
15678
15679      # replace the directory string with "yes".
15680      with_jpeg_req="yes"
15681      with_jpeg=$with_jpeg_req
15682      ;;
15683
15684     *)
15685      echo ""
15686      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
15687      echo "       If it is a directory, then \`DIR/include' will be added to"
15688      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15689      exit 1
15690      ;;
15691    esac
15692
15693
15694 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
15695   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
15696   exit 1
15697 fi
15698
15699 if test "$with_jpeg" = yes; then
15700
15701   have_jpeg=no
15702
15703   ac_save_CPPFLAGS="$CPPFLAGS"
15704   if test \! -z "$includedir" ; then
15705     CPPFLAGS="$CPPFLAGS -I$includedir"
15706   fi
15707   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15708   if test "${ac_cv_header_jpeglib_h+set}" = set; then
15709   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
15710 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
15711 if test "${ac_cv_header_jpeglib_h+set}" = set; then
15712   echo $ECHO_N "(cached) $ECHO_C" >&6
15713 fi
15714 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
15715 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
15716 else
15717   # Is the header compilable?
15718 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
15719 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
15720 cat >conftest.$ac_ext <<_ACEOF
15721 #line $LINENO "configure"
15722 #include "confdefs.h"
15723 $ac_includes_default
15724 #include <jpeglib.h>
15725 _ACEOF
15726 rm -f conftest.$ac_objext
15727 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15728   (eval $ac_compile) 2>&5
15729   ac_status=$?
15730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15731   (exit $ac_status); } &&
15732          { ac_try='test -s conftest.$ac_objext'
15733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15734   (eval $ac_try) 2>&5
15735   ac_status=$?
15736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15737   (exit $ac_status); }; }; then
15738   ac_header_compiler=yes
15739 else
15740   echo "$as_me: failed program was:" >&5
15741 cat conftest.$ac_ext >&5
15742 ac_header_compiler=no
15743 fi
15744 rm -f conftest.$ac_objext conftest.$ac_ext
15745 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15746 echo "${ECHO_T}$ac_header_compiler" >&6
15747
15748 # Is the header present?
15749 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
15750 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
15751 cat >conftest.$ac_ext <<_ACEOF
15752 #line $LINENO "configure"
15753 #include "confdefs.h"
15754 #include <jpeglib.h>
15755 _ACEOF
15756 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15757   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15758   ac_status=$?
15759   egrep -v '^ *\+' conftest.er1 >conftest.err
15760   rm -f conftest.er1
15761   cat conftest.err >&5
15762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15763   (exit $ac_status); } >/dev/null; then
15764   if test -s conftest.err; then
15765     ac_cpp_err=$ac_c_preproc_warn_flag
15766   else
15767     ac_cpp_err=
15768   fi
15769 else
15770   ac_cpp_err=yes
15771 fi
15772 if test -z "$ac_cpp_err"; then
15773   ac_header_preproc=yes
15774 else
15775   echo "$as_me: failed program was:" >&5
15776   cat conftest.$ac_ext >&5
15777   ac_header_preproc=no
15778 fi
15779 rm -f conftest.err conftest.$ac_ext
15780 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15781 echo "${ECHO_T}$ac_header_preproc" >&6
15782
15783 # So?  What about this header?
15784 case $ac_header_compiler:$ac_header_preproc in
15785   yes:no )
15786     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15787 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15788     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
15789 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
15790   no:yes )
15791     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
15792 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
15793     { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
15794 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
15795     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
15796 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
15797 esac
15798 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
15799 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
15800 if test "${ac_cv_header_jpeglib_h+set}" = set; then
15801   echo $ECHO_N "(cached) $ECHO_C" >&6
15802 else
15803   ac_cv_header_jpeglib_h=$ac_header_preproc
15804 fi
15805 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
15806 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
15807
15808 fi
15809 if test $ac_cv_header_jpeglib_h = yes; then
15810   have_jpeg=yes
15811 fi
15812
15813
15814   CPPFLAGS="$ac_save_CPPFLAGS"
15815
15816   if test "$have_jpeg" = yes; then
15817     # we have the header, now check for the library
15818     have_jpeg=no
15819     jpeg_halfassed=yes
15820
15821   ac_save_CPPFLAGS="$CPPFLAGS"
15822   ac_save_LDFLAGS="$LDFLAGS"
15823 #  ac_save_LIBS="$LIBS"
15824
15825   if test \! -z "$includedir" ; then
15826     CPPFLAGS="$CPPFLAGS -I$includedir"
15827   fi
15828   # note: $X_CFLAGS includes $x_includes
15829   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15830
15831   if test \! -z "$libdir" ; then
15832     LDFLAGS="$LDFLAGS -L$libdir"
15833   fi
15834   # note: $X_LIBS includes $x_libraries
15835   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15836
15837   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
15838 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
15839 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
15840   echo $ECHO_N "(cached) $ECHO_C" >&6
15841 else
15842   ac_check_lib_save_LIBS=$LIBS
15843 LIBS="-ljpeg  $LIBS"
15844 cat >conftest.$ac_ext <<_ACEOF
15845 #line $LINENO "configure"
15846 #include "confdefs.h"
15847
15848 /* Override any gcc2 internal prototype to avoid an error.  */
15849 #ifdef __cplusplus
15850 extern "C"
15851 #endif
15852 /* We use char because int might match the return type of a gcc2
15853    builtin and then its argument prototype would still apply.  */
15854 char jpeg_start_compress ();
15855 #ifdef F77_DUMMY_MAIN
15856 #  ifdef __cplusplus
15857      extern "C"
15858 #  endif
15859    int F77_DUMMY_MAIN() { return 1; }
15860 #endif
15861 int
15862 main ()
15863 {
15864 jpeg_start_compress ();
15865   ;
15866   return 0;
15867 }
15868 _ACEOF
15869 rm -f conftest.$ac_objext conftest$ac_exeext
15870 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15871   (eval $ac_link) 2>&5
15872   ac_status=$?
15873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15874   (exit $ac_status); } &&
15875          { ac_try='test -s conftest$ac_exeext'
15876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15877   (eval $ac_try) 2>&5
15878   ac_status=$?
15879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15880   (exit $ac_status); }; }; then
15881   ac_cv_lib_jpeg_jpeg_start_compress=yes
15882 else
15883   echo "$as_me: failed program was:" >&5
15884 cat conftest.$ac_ext >&5
15885 ac_cv_lib_jpeg_jpeg_start_compress=no
15886 fi
15887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15888 LIBS=$ac_check_lib_save_LIBS
15889 fi
15890 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
15891 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
15892 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
15893   have_jpeg=yes
15894                     jpeg_halfassed=no
15895                     JPEG_LIBS="-ljpeg"
15896                     cat >>confdefs.h <<\_ACEOF
15897 #define HAVE_JPEGLIB 1
15898 _ACEOF
15899
15900 fi
15901
15902   CPPFLAGS="$ac_save_CPPFLAGS"
15903   LDFLAGS="$ac_save_LDFLAGS"
15904 #  LIBS="$ac_save_LIBS"
15905
15906   fi
15907 fi
15908
15909
15910 ###############################################################################
15911 #
15912 #       Check for the XSHM server extension.
15913 #
15914 ###############################################################################
15915
15916 have_xshm=no
15917 with_xshm_req=unspecified
15918
15919 # Check whether --with-xshm-ext or --without-xshm-ext was given.
15920 if test "${with_xshm_ext+set}" = set; then
15921   withval="$with_xshm_ext"
15922   with_xshm="$withval"; with_xshm_req="$withval"
15923 else
15924   with_xshm=yes
15925 fi;
15926
15927
15928    case "$with_xshm" in
15929     yes) ;;
15930     no)  ;;
15931
15932     /*)
15933      echo "$as_me:$LINENO: checking for XSHM headers" >&5
15934 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
15935      d=$with_xshm/include
15936      if test -d $d; then
15937        X_CFLAGS="-I$d $X_CFLAGS"
15938        echo "$as_me:$LINENO: result: $d" >&5
15939 echo "${ECHO_T}$d" >&6
15940      else
15941        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15942 echo "${ECHO_T}not found ($d: no such directory)" >&6
15943      fi
15944
15945      echo "$as_me:$LINENO: checking for XSHM libs" >&5
15946 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
15947      d=$with_xshm/lib
15948      if test -d $d; then
15949        X_LIBS="-L$d $X_LIBS"
15950        echo "$as_me:$LINENO: result: $d" >&5
15951 echo "${ECHO_T}$d" >&6
15952      else
15953        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15954 echo "${ECHO_T}not found ($d: no such directory)" >&6
15955      fi
15956
15957      # replace the directory string with "yes".
15958      with_xshm_req="yes"
15959      with_xshm=$with_xshm_req
15960      ;;
15961
15962     *)
15963      echo ""
15964      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
15965      echo "       If it is a directory, then \`DIR/include' will be added to"
15966      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15967      exit 1
15968      ;;
15969    esac
15970
15971
15972 if test "$with_xshm" = yes; then
15973
15974   # first check for Xshm.h.
15975
15976   ac_save_CPPFLAGS="$CPPFLAGS"
15977   if test \! -z "$includedir" ; then
15978     CPPFLAGS="$CPPFLAGS -I$includedir"
15979   fi
15980   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15981   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
15982 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
15983 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
15984   echo $ECHO_N "(cached) $ECHO_C" >&6
15985 else
15986   cat >conftest.$ac_ext <<_ACEOF
15987 #line $LINENO "configure"
15988 #include "confdefs.h"
15989 #include <X11/Xlib.h>
15990
15991 #include <X11/extensions/XShm.h>
15992 _ACEOF
15993 rm -f conftest.$ac_objext
15994 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15995   (eval $ac_compile) 2>&5
15996   ac_status=$?
15997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15998   (exit $ac_status); } &&
15999          { ac_try='test -s conftest.$ac_objext'
16000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16001   (eval $ac_try) 2>&5
16002   ac_status=$?
16003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16004   (exit $ac_status); }; }; then
16005   ac_cv_header_X11_extensions_XShm_h=yes
16006 else
16007   echo "$as_me: failed program was:" >&5
16008 cat conftest.$ac_ext >&5
16009 ac_cv_header_X11_extensions_XShm_h=no
16010 fi
16011 rm -f conftest.$ac_objext conftest.$ac_ext
16012 fi
16013 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
16014 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
16015 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
16016   have_xshm=yes
16017 fi
16018
16019
16020   CPPFLAGS="$ac_save_CPPFLAGS"
16021
16022   # if that succeeded, then check for sys/ipc.h.
16023   if test "$have_xshm" = yes; then
16024     have_xshm=no
16025
16026   ac_save_CPPFLAGS="$CPPFLAGS"
16027   if test \! -z "$includedir" ; then
16028     CPPFLAGS="$CPPFLAGS -I$includedir"
16029   fi
16030   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16031   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16032   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16033 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16034 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16035   echo $ECHO_N "(cached) $ECHO_C" >&6
16036 fi
16037 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16038 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16039 else
16040   # Is the header compilable?
16041 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
16042 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
16043 cat >conftest.$ac_ext <<_ACEOF
16044 #line $LINENO "configure"
16045 #include "confdefs.h"
16046 $ac_includes_default
16047 #include <sys/ipc.h>
16048 _ACEOF
16049 rm -f conftest.$ac_objext
16050 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16051   (eval $ac_compile) 2>&5
16052   ac_status=$?
16053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16054   (exit $ac_status); } &&
16055          { ac_try='test -s conftest.$ac_objext'
16056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16057   (eval $ac_try) 2>&5
16058   ac_status=$?
16059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16060   (exit $ac_status); }; }; then
16061   ac_header_compiler=yes
16062 else
16063   echo "$as_me: failed program was:" >&5
16064 cat conftest.$ac_ext >&5
16065 ac_header_compiler=no
16066 fi
16067 rm -f conftest.$ac_objext conftest.$ac_ext
16068 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16069 echo "${ECHO_T}$ac_header_compiler" >&6
16070
16071 # Is the header present?
16072 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
16073 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
16074 cat >conftest.$ac_ext <<_ACEOF
16075 #line $LINENO "configure"
16076 #include "confdefs.h"
16077 #include <sys/ipc.h>
16078 _ACEOF
16079 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16080   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16081   ac_status=$?
16082   egrep -v '^ *\+' conftest.er1 >conftest.err
16083   rm -f conftest.er1
16084   cat conftest.err >&5
16085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16086   (exit $ac_status); } >/dev/null; then
16087   if test -s conftest.err; then
16088     ac_cpp_err=$ac_c_preproc_warn_flag
16089   else
16090     ac_cpp_err=
16091   fi
16092 else
16093   ac_cpp_err=yes
16094 fi
16095 if test -z "$ac_cpp_err"; then
16096   ac_header_preproc=yes
16097 else
16098   echo "$as_me: failed program was:" >&5
16099   cat conftest.$ac_ext >&5
16100   ac_header_preproc=no
16101 fi
16102 rm -f conftest.err conftest.$ac_ext
16103 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16104 echo "${ECHO_T}$ac_header_preproc" >&6
16105
16106 # So?  What about this header?
16107 case $ac_header_compiler:$ac_header_preproc in
16108   yes:no )
16109     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
16110 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16111     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16112 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16113   no:yes )
16114     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
16115 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
16116     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
16117 echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
16118     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16119 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16120 esac
16121 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16122 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16123 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16124   echo $ECHO_N "(cached) $ECHO_C" >&6
16125 else
16126   ac_cv_header_sys_ipc_h=$ac_header_preproc
16127 fi
16128 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16129 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16130
16131 fi
16132 if test $ac_cv_header_sys_ipc_h = yes; then
16133   have_xshm=yes
16134 fi
16135
16136
16137   CPPFLAGS="$ac_save_CPPFLAGS"
16138   fi
16139
16140   # if that succeeded, then check for sys/shm.h.
16141   if test "$have_xshm" = yes; then
16142     have_xshm=no
16143
16144   ac_save_CPPFLAGS="$CPPFLAGS"
16145   if test \! -z "$includedir" ; then
16146     CPPFLAGS="$CPPFLAGS -I$includedir"
16147   fi
16148   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16149   if test "${ac_cv_header_sys_shm_h+set}" = set; then
16150   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
16151 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
16152 if test "${ac_cv_header_sys_shm_h+set}" = set; then
16153   echo $ECHO_N "(cached) $ECHO_C" >&6
16154 fi
16155 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
16156 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
16157 else
16158   # Is the header compilable?
16159 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
16160 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
16161 cat >conftest.$ac_ext <<_ACEOF
16162 #line $LINENO "configure"
16163 #include "confdefs.h"
16164 $ac_includes_default
16165 #include <sys/shm.h>
16166 _ACEOF
16167 rm -f conftest.$ac_objext
16168 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16169   (eval $ac_compile) 2>&5
16170   ac_status=$?
16171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16172   (exit $ac_status); } &&
16173          { ac_try='test -s conftest.$ac_objext'
16174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16175   (eval $ac_try) 2>&5
16176   ac_status=$?
16177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16178   (exit $ac_status); }; }; then
16179   ac_header_compiler=yes
16180 else
16181   echo "$as_me: failed program was:" >&5
16182 cat conftest.$ac_ext >&5
16183 ac_header_compiler=no
16184 fi
16185 rm -f conftest.$ac_objext conftest.$ac_ext
16186 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16187 echo "${ECHO_T}$ac_header_compiler" >&6
16188
16189 # Is the header present?
16190 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
16191 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
16192 cat >conftest.$ac_ext <<_ACEOF
16193 #line $LINENO "configure"
16194 #include "confdefs.h"
16195 #include <sys/shm.h>
16196 _ACEOF
16197 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16198   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16199   ac_status=$?
16200   egrep -v '^ *\+' conftest.er1 >conftest.err
16201   rm -f conftest.er1
16202   cat conftest.err >&5
16203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16204   (exit $ac_status); } >/dev/null; then
16205   if test -s conftest.err; then
16206     ac_cpp_err=$ac_c_preproc_warn_flag
16207   else
16208     ac_cpp_err=
16209   fi
16210 else
16211   ac_cpp_err=yes
16212 fi
16213 if test -z "$ac_cpp_err"; then
16214   ac_header_preproc=yes
16215 else
16216   echo "$as_me: failed program was:" >&5
16217   cat conftest.$ac_ext >&5
16218   ac_header_preproc=no
16219 fi
16220 rm -f conftest.err conftest.$ac_ext
16221 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16222 echo "${ECHO_T}$ac_header_preproc" >&6
16223
16224 # So?  What about this header?
16225 case $ac_header_compiler:$ac_header_preproc in
16226   yes:no )
16227     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
16228 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16229     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
16230 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
16231   no:yes )
16232     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
16233 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
16234     { echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
16235 echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
16236     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
16237 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
16238 esac
16239 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
16240 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
16241 if test "${ac_cv_header_sys_shm_h+set}" = set; then
16242   echo $ECHO_N "(cached) $ECHO_C" >&6
16243 else
16244   ac_cv_header_sys_shm_h=$ac_header_preproc
16245 fi
16246 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
16247 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
16248
16249 fi
16250 if test $ac_cv_header_sys_shm_h = yes; then
16251   have_xshm=yes
16252 fi
16253
16254
16255   CPPFLAGS="$ac_save_CPPFLAGS"
16256   fi
16257
16258   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
16259   # to exist, but the library code to not exist.  And even better, the library
16260   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
16261   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
16262   # that's not quite right, but close enough.)
16263   #
16264   case "$host" in
16265     *-aix*)
16266       if  `uname -v` -eq 3 ; then
16267         have_xshm=no
16268
16269   ac_save_CPPFLAGS="$CPPFLAGS"
16270   ac_save_LDFLAGS="$LDFLAGS"
16271 #  ac_save_LIBS="$LIBS"
16272
16273   if test \! -z "$includedir" ; then
16274     CPPFLAGS="$CPPFLAGS -I$includedir"
16275   fi
16276   # note: $X_CFLAGS includes $x_includes
16277   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16278
16279   if test \! -z "$libdir" ; then
16280     LDFLAGS="$LDFLAGS -L$libdir"
16281   fi
16282   # note: $X_LIBS includes $x_libraries
16283   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16284
16285   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
16286 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
16287 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
16288   echo $ECHO_N "(cached) $ECHO_C" >&6
16289 else
16290   ac_check_lib_save_LIBS=$LIBS
16291 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
16292 cat >conftest.$ac_ext <<_ACEOF
16293 #line $LINENO "configure"
16294 #include "confdefs.h"
16295
16296 /* Override any gcc2 internal prototype to avoid an error.  */
16297 #ifdef __cplusplus
16298 extern "C"
16299 #endif
16300 /* We use char because int might match the return type of a gcc2
16301    builtin and then its argument prototype would still apply.  */
16302 char XShmQueryExtension ();
16303 #ifdef F77_DUMMY_MAIN
16304 #  ifdef __cplusplus
16305      extern "C"
16306 #  endif
16307    int F77_DUMMY_MAIN() { return 1; }
16308 #endif
16309 int
16310 main ()
16311 {
16312 XShmQueryExtension ();
16313   ;
16314   return 0;
16315 }
16316 _ACEOF
16317 rm -f conftest.$ac_objext conftest$ac_exeext
16318 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16319   (eval $ac_link) 2>&5
16320   ac_status=$?
16321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16322   (exit $ac_status); } &&
16323          { ac_try='test -s conftest$ac_exeext'
16324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16325   (eval $ac_try) 2>&5
16326   ac_status=$?
16327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16328   (exit $ac_status); }; }; then
16329   ac_cv_lib_XextSam_XShmQueryExtension=yes
16330 else
16331   echo "$as_me: failed program was:" >&5
16332 cat conftest.$ac_ext >&5
16333 ac_cv_lib_XextSam_XShmQueryExtension=no
16334 fi
16335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16336 LIBS=$ac_check_lib_save_LIBS
16337 fi
16338 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
16339 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
16340 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
16341   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
16342 else
16343   true
16344 fi
16345
16346   CPPFLAGS="$ac_save_CPPFLAGS"
16347   LDFLAGS="$ac_save_LDFLAGS"
16348 #  LIBS="$ac_save_LIBS"
16349
16350       fi
16351     ;;
16352   esac
16353
16354   # if that succeeded, then we've really got it.
16355   if test "$have_xshm" = yes; then
16356     cat >>confdefs.h <<\_ACEOF
16357 #define HAVE_XSHM_EXTENSION 1
16358 _ACEOF
16359
16360   fi
16361
16362 elif test "$with_xshm" != no; then
16363   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
16364   exit 1
16365 fi
16366
16367
16368 ###############################################################################
16369 #
16370 #       Check for the DOUBLE-BUFFER server extension.
16371 #
16372 ###############################################################################
16373
16374 have_xdbe=no
16375 with_xdbe_req=unspecified
16376
16377 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
16378 if test "${with_xdbe_ext+set}" = set; then
16379   withval="$with_xdbe_ext"
16380   with_xdbe="$withval"; with_xdbe_req="$withval"
16381 else
16382   with_xdbe=yes
16383 fi;
16384
16385
16386    case "$with_xdbe" in
16387     yes) ;;
16388     no)  ;;
16389
16390     /*)
16391      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
16392 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
16393      d=$with_xdbe/include
16394      if test -d $d; then
16395        X_CFLAGS="-I$d $X_CFLAGS"
16396        echo "$as_me:$LINENO: result: $d" >&5
16397 echo "${ECHO_T}$d" >&6
16398      else
16399        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16400 echo "${ECHO_T}not found ($d: no such directory)" >&6
16401      fi
16402
16403      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
16404 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
16405      d=$with_xdbe/lib
16406      if test -d $d; then
16407        X_LIBS="-L$d $X_LIBS"
16408        echo "$as_me:$LINENO: result: $d" >&5
16409 echo "${ECHO_T}$d" >&6
16410      else
16411        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16412 echo "${ECHO_T}not found ($d: no such directory)" >&6
16413      fi
16414
16415      # replace the directory string with "yes".
16416      with_xdbe_req="yes"
16417      with_xdbe=$with_xdbe_req
16418      ;;
16419
16420     *)
16421      echo ""
16422      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
16423      echo "       If it is a directory, then \`DIR/include' will be added to"
16424      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16425      exit 1
16426      ;;
16427    esac
16428
16429
16430 if test "$with_xdbe" = yes; then
16431
16432
16433   ac_save_CPPFLAGS="$CPPFLAGS"
16434   if test \! -z "$includedir" ; then
16435     CPPFLAGS="$CPPFLAGS -I$includedir"
16436   fi
16437   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16438   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
16439 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
16440 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
16441   echo $ECHO_N "(cached) $ECHO_C" >&6
16442 else
16443   cat >conftest.$ac_ext <<_ACEOF
16444 #line $LINENO "configure"
16445 #include "confdefs.h"
16446 #include <X11/Xlib.h>
16447
16448 #include <X11/extensions/Xdbe.h>
16449 _ACEOF
16450 rm -f conftest.$ac_objext
16451 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16452   (eval $ac_compile) 2>&5
16453   ac_status=$?
16454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16455   (exit $ac_status); } &&
16456          { ac_try='test -s conftest.$ac_objext'
16457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16458   (eval $ac_try) 2>&5
16459   ac_status=$?
16460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16461   (exit $ac_status); }; }; then
16462   ac_cv_header_X11_extensions_Xdbe_h=yes
16463 else
16464   echo "$as_me: failed program was:" >&5
16465 cat conftest.$ac_ext >&5
16466 ac_cv_header_X11_extensions_Xdbe_h=no
16467 fi
16468 rm -f conftest.$ac_objext conftest.$ac_ext
16469 fi
16470 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
16471 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
16472 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
16473   have_xdbe=yes
16474 fi
16475
16476
16477   CPPFLAGS="$ac_save_CPPFLAGS"
16478   if test "$have_xdbe" = yes; then
16479     cat >>confdefs.h <<\_ACEOF
16480 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
16481 _ACEOF
16482
16483   fi
16484
16485 elif test "$with_xdbe" != no; then
16486   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
16487   exit 1
16488 fi
16489
16490
16491 ###############################################################################
16492 #
16493 #       Check for the SGI XReadDisplay server extension.
16494 #
16495 #       Note: this has to be down here, rather than up with the other server
16496 #       extension tests, so that the output of `configure --help' is in the
16497 #       right order.  Arrgh!
16498 #
16499 ###############################################################################
16500
16501 have_readdisplay=no
16502 with_readdisplay_req=unspecified
16503
16504 # Check whether --with-readdisplay or --without-readdisplay was given.
16505 if test "${with_readdisplay+set}" = set; then
16506   withval="$with_readdisplay"
16507   with_readdisplay="$withval"; with_readdisplay_req="$withval"
16508 else
16509   with_readdisplay=yes
16510 fi;
16511
16512
16513    case "$with_readdisplay" in
16514     yes) ;;
16515     no)  ;;
16516
16517     /*)
16518      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
16519 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
16520      d=$with_readdisplay/include
16521      if test -d $d; then
16522        X_CFLAGS="-I$d $X_CFLAGS"
16523        echo "$as_me:$LINENO: result: $d" >&5
16524 echo "${ECHO_T}$d" >&6
16525      else
16526        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16527 echo "${ECHO_T}not found ($d: no such directory)" >&6
16528      fi
16529
16530      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
16531 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
16532      d=$with_readdisplay/lib
16533      if test -d $d; then
16534        X_LIBS="-L$d $X_LIBS"
16535        echo "$as_me:$LINENO: result: $d" >&5
16536 echo "${ECHO_T}$d" >&6
16537      else
16538        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16539 echo "${ECHO_T}not found ($d: no such directory)" >&6
16540      fi
16541
16542      # replace the directory string with "yes".
16543      with_readdisplay_req="yes"
16544      with_readdisplay=$with_readdisplay_req
16545      ;;
16546
16547     *)
16548      echo ""
16549      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
16550      echo "       If it is a directory, then \`DIR/include' will be added to"
16551      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16552      exit 1
16553      ;;
16554    esac
16555
16556
16557 if test "$with_readdisplay" = yes; then
16558
16559   ac_save_CPPFLAGS="$CPPFLAGS"
16560   if test \! -z "$includedir" ; then
16561     CPPFLAGS="$CPPFLAGS -I$includedir"
16562   fi
16563   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16564   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
16565 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
16566 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
16567   echo $ECHO_N "(cached) $ECHO_C" >&6
16568 else
16569   cat >conftest.$ac_ext <<_ACEOF
16570 #line $LINENO "configure"
16571 #include "confdefs.h"
16572 #include <X11/Xlib.h>
16573
16574 #include <X11/extensions/readdisplay.h>
16575 _ACEOF
16576 rm -f conftest.$ac_objext
16577 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16578   (eval $ac_compile) 2>&5
16579   ac_status=$?
16580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16581   (exit $ac_status); } &&
16582          { ac_try='test -s conftest.$ac_objext'
16583   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16584   (eval $ac_try) 2>&5
16585   ac_status=$?
16586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16587   (exit $ac_status); }; }; then
16588   ac_cv_header_X11_extensions_readdisplay_h=yes
16589 else
16590   echo "$as_me: failed program was:" >&5
16591 cat conftest.$ac_ext >&5
16592 ac_cv_header_X11_extensions_readdisplay_h=no
16593 fi
16594 rm -f conftest.$ac_objext conftest.$ac_ext
16595 fi
16596 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
16597 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
16598 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
16599   cat >>confdefs.h <<\_ACEOF
16600 #define HAVE_READ_DISPLAY_EXTENSION 1
16601 _ACEOF
16602
16603 fi
16604
16605
16606   CPPFLAGS="$ac_save_CPPFLAGS"
16607 elif test "$with_readdisplay" != no; then
16608   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
16609   exit 1
16610 fi
16611
16612
16613 ###############################################################################
16614 #
16615 #       Check for a program to generate random text.
16616 #
16617 #       Zippy is funnier than the idiocy generally spat out by `fortune',
16618 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
16619 #
16620 #       We used to dig around in Emacs to look for the "yow" program, but
16621 #       most people who have Emacs also have "fortune zippy", so nevermind.
16622 #
16623 ###############################################################################
16624
16625 with_fortune_req=""
16626
16627 # Check whether --with-fortune or --without-fortune was given.
16628 if test "${with_fortune+set}" = set; then
16629   withval="$with_fortune"
16630   with_fortune_req="$withval"; with_fortune="$withval"
16631 else
16632   with_fortune=yes
16633 fi;
16634
16635 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
16636   with_fortune=""
16637   with_fortune_req=""
16638 fi
16639
16640 if test -n "$with_fortune_req" ; then
16641   ac_cv_fortune_program=""
16642   case "$with_fortune_req" in
16643     /*)
16644
16645       set dummy $with_fortune_req ; fortune_tmp=$2
16646       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
16647 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
16648       if test -x "$fortune_tmp" ; then
16649         echo "$as_me:$LINENO: result: yes" >&5
16650 echo "${ECHO_T}yes" >&6
16651       else
16652         echo "$as_me:$LINENO: result: no" >&5
16653 echo "${ECHO_T}no" >&6
16654         with_fortune=""
16655       fi
16656     ;;
16657     *)
16658       set dummy $with_fortune_req ; fortune_tmp=$2
16659       # don't cache
16660       unset ac_cv_path_fortune_tmp
16661       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
16662 set dummy $fortune_tmp; ac_word=$2
16663 echo "$as_me:$LINENO: checking for $ac_word" >&5
16664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16665 if test "${ac_cv_path_fortune_tmp+set}" = set; then
16666   echo $ECHO_N "(cached) $ECHO_C" >&6
16667 else
16668   case $fortune_tmp in
16669   [\\/]* | ?:[\\/]*)
16670   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
16671   ;;
16672   *)
16673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16674 for as_dir in $PATH
16675 do
16676   IFS=$as_save_IFS
16677   test -z "$as_dir" && as_dir=.
16678   for ac_exec_ext in '' $ac_executable_extensions; do
16679   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16680     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
16681     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16682     break 2
16683   fi
16684 done
16685 done
16686
16687   ;;
16688 esac
16689 fi
16690 fortune_tmp=$ac_cv_path_fortune_tmp
16691
16692 if test -n "$fortune_tmp"; then
16693   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
16694 echo "${ECHO_T}$fortune_tmp" >&6
16695 else
16696   echo "$as_me:$LINENO: result: no" >&5
16697 echo "${ECHO_T}no" >&6
16698 fi
16699
16700       if test -z "$fortune_tmp" ; then
16701         with_fortune=""
16702       fi
16703     ;;
16704   esac
16705   ac_cv_fortune_program="$with_fortune"
16706
16707 elif test -n "$ac_cv_fortune_program"; then
16708   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
16709 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
16710 fi
16711
16712 unset ac_cv_path_fortune_tmp
16713 unset fortune_tmp
16714
16715 if test -z "$ac_cv_fortune_program" ; then
16716
16717   # first look for fortune in /usr/games/ (and use absolute path)
16718   for ac_prog in fortune
16719 do
16720   # Extract the first word of "$ac_prog", so it can be a program name with args.
16721 set dummy $ac_prog; ac_word=$2
16722 echo "$as_me:$LINENO: checking for $ac_word" >&5
16723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16724 if test "${ac_cv_path_fortune_tmp+set}" = set; then
16725   echo $ECHO_N "(cached) $ECHO_C" >&6
16726 else
16727   case $fortune_tmp in
16728   [\\/]* | ?:[\\/]*)
16729   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
16730   ;;
16731   *)
16732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16733 as_dummy=""/usr/games""
16734 for as_dir in $as_dummy
16735 do
16736   IFS=$as_save_IFS
16737   test -z "$as_dir" && as_dir=.
16738   for ac_exec_ext in '' $ac_executable_extensions; do
16739   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16740     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
16741     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16742     break 2
16743   fi
16744 done
16745 done
16746
16747   ;;
16748 esac
16749 fi
16750 fortune_tmp=$ac_cv_path_fortune_tmp
16751
16752 if test -n "$fortune_tmp"; then
16753   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
16754 echo "${ECHO_T}$fortune_tmp" >&6
16755 else
16756   echo "$as_me:$LINENO: result: no" >&5
16757 echo "${ECHO_T}no" >&6
16758 fi
16759
16760   test -n "$fortune_tmp" && break
16761 done
16762
16763
16764   # if it's not there, look on $PATH (and don't use absolute path)
16765   if test -z "$fortune_tmp" ; then
16766      for ac_prog in fortune
16767 do
16768   # Extract the first word of "$ac_prog", so it can be a program name with args.
16769 set dummy $ac_prog; ac_word=$2
16770 echo "$as_me:$LINENO: checking for $ac_word" >&5
16771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16772 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
16773   echo $ECHO_N "(cached) $ECHO_C" >&6
16774 else
16775   if test -n "$fortune_tmp"; then
16776   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
16777 else
16778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16779 for as_dir in $PATH
16780 do
16781   IFS=$as_save_IFS
16782   test -z "$as_dir" && as_dir=.
16783   for ac_exec_ext in '' $ac_executable_extensions; do
16784   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16785     ac_cv_prog_fortune_tmp="$ac_prog"
16786     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16787     break 2
16788   fi
16789 done
16790 done
16791
16792 fi
16793 fi
16794 fortune_tmp=$ac_cv_prog_fortune_tmp
16795 if test -n "$fortune_tmp"; then
16796   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
16797 echo "${ECHO_T}$fortune_tmp" >&6
16798 else
16799   echo "$as_me:$LINENO: result: no" >&5
16800 echo "${ECHO_T}no" >&6
16801 fi
16802
16803   test -n "$fortune_tmp" && break
16804 done
16805
16806   fi
16807
16808   # if we didn't find anything, then just assume /usr/games/
16809   if test -z "$fortune_tmp" ; then
16810      fortune_tmp="/usr/games/fortune"
16811   fi
16812
16813   ac_cv_fortune_program="$fortune_tmp"
16814
16815   # now check to see whether "fortune zippy" works.
16816   #
16817   fortune_tmp="$fortune_tmp zippy"
16818   echo "$as_me:$LINENO: checking for zippy quotes" >&5
16819 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
16820   if ( $fortune_tmp >/dev/null 2>&1 ); then
16821     ac_cv_fortune_program="$fortune_tmp"
16822     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
16823 echo "${ECHO_T}$fortune_tmp" >&6
16824   else
16825     echo "$as_me:$LINENO: result: no" >&5
16826 echo "${ECHO_T}no" >&6
16827   fi
16828
16829 fi
16830
16831 unset ac_cv_path_fortune_tmp
16832 unset fortune_tmp
16833
16834 cat >>confdefs.h <<_ACEOF
16835 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
16836 _ACEOF
16837
16838
16839
16840 ###############################################################################
16841 #
16842 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
16843 #       This should be safe, but let's give people the option.
16844 #
16845 ###############################################################################
16846
16847 setuid_hacks_default=no
16848 setuid_hacks="$setuid_hacks_default"
16849
16850 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
16851 if test "${with_setuid_hacks+set}" = set; then
16852   withval="$with_setuid_hacks"
16853   setuid_hacks="$withval"
16854 else
16855   setuid_hacks="$setuid_hacks_default"
16856 fi;
16857
16858
16859    case "$setuid_hacks" in
16860     yes) ;;
16861     no)  ;;
16862
16863     /*)
16864      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
16865 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
16866      d=$setuid_hacks/include
16867      if test -d $d; then
16868        X_CFLAGS="-I$d $X_CFLAGS"
16869        echo "$as_me:$LINENO: result: $d" >&5
16870 echo "${ECHO_T}$d" >&6
16871      else
16872        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16873 echo "${ECHO_T}not found ($d: no such directory)" >&6
16874      fi
16875
16876      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
16877 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
16878      d=$setuid_hacks/lib
16879      if test -d $d; then
16880        X_LIBS="-L$d $X_LIBS"
16881        echo "$as_me:$LINENO: result: $d" >&5
16882 echo "${ECHO_T}$d" >&6
16883      else
16884        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16885 echo "${ECHO_T}not found ($d: no such directory)" >&6
16886      fi
16887
16888      # replace the directory string with "yes".
16889      setuid_hacks_req="yes"
16890      setuid_hacks=$setuid_hacks_req
16891      ;;
16892
16893     *)
16894      echo ""
16895      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
16896      echo "       If it is a directory, then \`DIR/include' will be added to"
16897      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16898      exit 1
16899      ;;
16900    esac
16901
16902
16903 if test "$setuid_hacks" = yes; then
16904   true
16905 elif test "$setuid_hacks" != no; then
16906   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
16907   exit 1
16908 fi
16909
16910
16911 ###############################################################################
16912 #
16913 #       Done testing.  Now, set up the various -I and -L variables,
16914 #       and decide which GUI program to build by default.
16915 #
16916 ###############################################################################
16917
16918 DEPEND=makedepend
16919 DEPEND_FLAGS=
16920 DEPEND_DEFINES=
16921
16922
16923 if test \! -z "$includedir" ; then
16924   INCLUDES="$INCLUDES -I$includedir"
16925 fi
16926
16927 if test \! -z "$libdir" ; then
16928   LDFLAGS="$LDFLAGS -L$libdir"
16929 fi
16930
16931
16932 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
16933 ALL_DEMO_PROGRAMS=
16934 if test "$have_motif" = yes; then
16935   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
16936   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
16937 fi
16938 if test "$have_gtk" = yes; then
16939   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
16940   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
16941 fi
16942
16943
16944 if test "$have_kerberos" = yes; then
16945   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
16946   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
16947 fi
16948 if test "$have_pam" = yes; then
16949   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
16950   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
16951   INSTALL_PAM="install-pam"
16952 fi
16953   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
16954   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
16955
16956
16957 if test "$enable_locking" = yes; then
16958   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
16959   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
16960 else
16961   LOCK_SRCS='$(NOLOCK_SRCS_1)'
16962   LOCK_OBJS='$(NOLOCK_OBJS_1)'
16963 fi
16964
16965 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
16966
16967 if test "$need_setuid" = yes; then
16968   NEED_SETUID=yes
16969 else
16970   NEED_SETUID=no
16971 fi
16972
16973 if test "$setuid_hacks" = yes; then
16974   SETUID_HACKS=yes
16975 else
16976   SETUID_HACKS=no
16977 fi
16978
16979 tab='   '
16980 if test "$have_gl" = yes; then
16981   GL_EXES='$(GL_EXES)'
16982   GL_UTIL_EXES='$(GL_UTIL_EXES)'
16983   GL_MEN='$(GL_MEN)'
16984   GL_KLUDGE="${tab}  "
16985 else
16986   GL_KLUDGE="-${tab}  "
16987 fi
16988
16989 if test "$have_gle" = yes; then
16990   GLE_EXES='$(GLE_EXES)'
16991   GLE_MEN='$(GLE_MEN)'
16992   GLE_KLUDGE="${tab}   "
16993 else
16994   GLE_KLUDGE="-${tab}   "
16995 fi
16996
16997 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
16998  JPEG_EXES='$(JPEG_EXES)'
16999 fi
17000
17001
17002 # Another substitution in the XScreenSaver.ad.in file:
17003 #
17004 if test "$have_gnome_help" = yes; then
17005   GNOMEHELP_Y=''
17006   GNOMEHELP_N='!    '
17007 else
17008   GNOMEHELP_Y='!    '
17009   GNOMEHELP_N=''
17010 fi
17011
17012
17013 # Now that we know whether we have Gnome, we can decide where the XML
17014 # config files get installed.
17015 #
17016 if test -z "$HACK_CONF_DIR" ; then
17017   if test -n "$GNOME_DATADIR" ; then
17018     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
17019   else
17020     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
17021   fi
17022 fi
17023
17024
17025
17026 # After computing $HACK_CONF_DIR, make sure $GTK_ICONDIR has a value
17027 # so that we know where to install the Gtk pixmaps.
17028 #
17029 if test -n "$GNOME_DATADIR" ; then
17030   GTK_ICONDIR='$(GNOME_DATADIR)/pixmaps'
17031 elif test "$have_gtk" = yes; then
17032   # should this be "$(prefix)/share/pixmaps"? But /usr/X11R6/share/ is wrong...
17033   GTK_ICONDIR='/usr/share/pixmaps'
17034 else
17035   GTK_ICONDIR=''
17036 fi
17037
17038
17039 # canonicalize slashes.
17040 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17041
17042
17043
17044 ###############################################################################
17045 #
17046 #       Perform substitutions and write Makefiles.
17047 #
17048 ###############################################################################
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096 APPDEFAULTS=$ac_x_app_defaults
17097
17098
17099
17100
17101
17102
17103
17104 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
17105 cat >confcache <<\_ACEOF
17106 # This file is a shell script that caches the results of configure
17107 # tests run on this system so they can be shared between configure
17108 # scripts and configure runs, see configure's option --config-cache.
17109 # It is not useful on other systems.  If it contains results you don't
17110 # want to keep, you may remove or edit it.
17111 #
17112 # config.status only pays attention to the cache file if you give it
17113 # the --recheck option to rerun configure.
17114 #
17115 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17116 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17117 # following values.
17118
17119 _ACEOF
17120
17121 # The following way of writing the cache mishandles newlines in values,
17122 # but we know of no workaround that is simple, portable, and efficient.
17123 # So, don't put newlines in cache variables' values.
17124 # Ultrix sh set writes to stderr and can't be redirected directly,
17125 # and sets the high bit in the cache file unless we assign to the vars.
17126 {
17127   (set) 2>&1 |
17128     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17129     *ac_space=\ *)
17130       # `set' does not quote correctly, so add quotes (double-quote
17131       # substitution turns \\\\ into \\, and sed turns \\ into \).
17132       sed -n \
17133         "s/'/'\\\\''/g;
17134           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17135       ;;
17136     *)
17137       # `set' quotes correctly as required by POSIX, so do not add quotes.
17138       sed -n \
17139         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17140       ;;
17141     esac;
17142 } |
17143   sed '
17144      t clear
17145      : clear
17146      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17147      t end
17148      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17149      : end' >>confcache
17150 if cmp -s $cache_file confcache; then :; else
17151   if test -w $cache_file; then
17152     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17153     cat confcache >$cache_file
17154   else
17155     echo "not updating unwritable cache $cache_file"
17156   fi
17157 fi
17158 rm -f confcache
17159
17160 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17161 # Let make expand exec_prefix.
17162 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17163
17164 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17165 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17166 # trailing colons and then remove the whole line if VPATH becomes empty
17167 # (actually we leave an empty line to preserve line numbers).
17168 if test "x$srcdir" = x.; then
17169   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17170 s/:*\$(srcdir):*/:/;
17171 s/:*\${srcdir}:*/:/;
17172 s/:*@srcdir@:*/:/;
17173 s/^\([^=]*=[    ]*\):*/\1/;
17174 s/:*$//;
17175 s/^[^=]*=[      ]*$//;
17176 }'
17177 fi
17178
17179 DEFS=-DHAVE_CONFIG_H
17180
17181
17182
17183         mv -f po/POTFILES po/POTFILES.tmp
17184         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
17185         rm -f po/POTFILES.tmp
17186
17187
17188
17189 : ${CONFIG_STATUS=./config.status}
17190 ac_clean_files_save=$ac_clean_files
17191 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17192 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17193 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17194 cat >$CONFIG_STATUS <<_ACEOF
17195 #! $SHELL
17196 # Generated by $as_me.
17197 # Run this file to recreate the current configuration.
17198 # Compiler output produced by configure, useful for debugging
17199 # configure, is in config.log if it exists.
17200
17201 debug=false
17202 SHELL=\${CONFIG_SHELL-$SHELL}
17203 _ACEOF
17204
17205 cat >>$CONFIG_STATUS <<\_ACEOF
17206
17207 ## --------------------- ##
17208 ## M4sh Initialization.  ##
17209 ## --------------------- ##
17210
17211 # Be Bourne compatible
17212 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17213   emulate sh
17214   NULLCMD=:
17215 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17216   set -o posix
17217 fi
17218
17219 # NLS nuisances.
17220 # Support unset when possible.
17221 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17222   as_unset=unset
17223 else
17224   as_unset=false
17225 fi
17226
17227 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17228     { $as_unset LANG || test "${LANG+set}" != set; } ||
17229       { LANG=C; export LANG; }
17230 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17231     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17232       { LC_ALL=C; export LC_ALL; }
17233 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17234     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17235       { LC_TIME=C; export LC_TIME; }
17236 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17237     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17238       { LC_CTYPE=C; export LC_CTYPE; }
17239 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17240     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17241       { LANGUAGE=C; export LANGUAGE; }
17242 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17243     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17244       { LC_COLLATE=C; export LC_COLLATE; }
17245 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17246     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17247       { LC_NUMERIC=C; export LC_NUMERIC; }
17248 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17249     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17250       { LC_MESSAGES=C; export LC_MESSAGES; }
17251
17252
17253 # Name of the executable.
17254 as_me=`(basename "$0") 2>/dev/null ||
17255 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17256          X"$0" : 'X\(//\)$' \| \
17257          X"$0" : 'X\(/\)$' \| \
17258          .     : '\(.\)' 2>/dev/null ||
17259 echo X/"$0" |
17260     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17261           /^X\/\(\/\/\)$/{ s//\1/; q; }
17262           /^X\/\(\/\).*/{ s//\1/; q; }
17263           s/.*/./; q'`
17264
17265 # PATH needs CR, and LINENO needs CR and PATH.
17266 # Avoid depending upon Character Ranges.
17267 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17268 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17269 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17270 as_cr_digits='0123456789'
17271 as_cr_alnum=$as_cr_Letters$as_cr_digits
17272
17273 # The user is always right.
17274 if test "${PATH_SEPARATOR+set}" != set; then
17275   echo "#! /bin/sh" >conftest.sh
17276   echo  "exit 0"   >>conftest.sh
17277   chmod +x conftest.sh
17278   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
17279     PATH_SEPARATOR=';'
17280   else
17281     PATH_SEPARATOR=:
17282   fi
17283   rm -f conftest.sh
17284 fi
17285
17286
17287   as_lineno_1=$LINENO
17288   as_lineno_2=$LINENO
17289   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17290   test "x$as_lineno_1" != "x$as_lineno_2" &&
17291   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
17292   # Find who we are.  Look in the path if we contain no path at all
17293   # relative or not.
17294   case $0 in
17295     *[\\/]* ) as_myself=$0 ;;
17296     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17297 for as_dir in $PATH
17298 do
17299   IFS=$as_save_IFS
17300   test -z "$as_dir" && as_dir=.
17301   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17302 done
17303
17304        ;;
17305   esac
17306   # We did not find ourselves, most probably we were run as `sh COMMAND'
17307   # in which case we are not to be found in the path.
17308   if test "x$as_myself" = x; then
17309     as_myself=$0
17310   fi
17311   if test ! -f "$as_myself"; then
17312     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17313 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17314    { (exit 1); exit 1; }; }
17315   fi
17316   case $CONFIG_SHELL in
17317   '')
17318     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17319 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17320 do
17321   IFS=$as_save_IFS
17322   test -z "$as_dir" && as_dir=.
17323   for as_base in sh bash ksh sh5; do
17324          case $as_dir in
17325          /*)
17326            if ("$as_dir/$as_base" -c '
17327   as_lineno_1=$LINENO
17328   as_lineno_2=$LINENO
17329   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17330   test "x$as_lineno_1" != "x$as_lineno_2" &&
17331   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
17332              CONFIG_SHELL=$as_dir/$as_base
17333              export CONFIG_SHELL
17334              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17335            fi;;
17336          esac
17337        done
17338 done
17339 ;;
17340   esac
17341
17342   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17343   # uniformly replaced by the line number.  The first 'sed' inserts a
17344   # line-number line before each line; the second 'sed' does the real
17345   # work.  The second script uses 'N' to pair each line-number line
17346   # with the numbered line, and appends trailing '-' during
17347   # substitution so that $LINENO is not a special case at line end.
17348   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17349   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
17350   sed '=' <$as_myself |
17351     sed '
17352       N
17353       s,$,-,
17354       : loop
17355       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17356       t loop
17357       s,-$,,
17358       s,^['$as_cr_digits']*\n,,
17359     ' >$as_me.lineno &&
17360   chmod +x $as_me.lineno ||
17361     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17362 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17363    { (exit 1); exit 1; }; }
17364
17365   # Don't try to exec as it changes $[0], causing all sort of problems
17366   # (the dirname of $[0] is not the place where we might find the
17367   # original and so on.  Autoconf is especially sensible to this).
17368   . ./$as_me.lineno
17369   # Exit status is that of the last command.
17370   exit
17371 }
17372
17373
17374 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17375   *c*,-n*) ECHO_N= ECHO_C='
17376 ' ECHO_T='      ' ;;
17377   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17378   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
17379 esac
17380
17381 if expr a : '\(a\)' >/dev/null 2>&1; then
17382   as_expr=expr
17383 else
17384   as_expr=false
17385 fi
17386
17387 rm -f conf$$ conf$$.exe conf$$.file
17388 echo >conf$$.file
17389 if ln -s conf$$.file conf$$ 2>/dev/null; then
17390   # We could just check for DJGPP; but this test a) works b) is more generic
17391   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17392   if test -f conf$$.exe; then
17393     # Don't use ln at all; we don't have any links
17394     as_ln_s='cp -p'
17395   else
17396     as_ln_s='ln -s'
17397   fi
17398 elif ln conf$$.file conf$$ 2>/dev/null; then
17399   as_ln_s=ln
17400 else
17401   as_ln_s='cp -p'
17402 fi
17403 rm -f conf$$ conf$$.exe conf$$.file
17404
17405 as_executable_p="test -f"
17406
17407 # Sed expression to map a string onto a valid CPP name.
17408 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17409
17410 # Sed expression to map a string onto a valid variable name.
17411 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17412
17413
17414 # IFS
17415 # We need space, tab and new line, in precisely that order.
17416 as_nl='
17417 '
17418 IFS="   $as_nl"
17419
17420 # CDPATH.
17421 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
17422
17423 exec 6>&1
17424
17425 # Open the log real soon, to keep \$[0] and so on meaningful, and to
17426 # report actual input values of CONFIG_FILES etc. instead of their
17427 # values after options handling.  Logging --version etc. is OK.
17428 exec 5>>config.log
17429 {
17430   echo
17431   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17432 ## Running $as_me. ##
17433 _ASBOX
17434 } >&5
17435 cat >&5 <<_CSEOF
17436
17437 This file was extended by $as_me, which was
17438 generated by GNU Autoconf 2.53.  Invocation command line was
17439
17440   CONFIG_FILES    = $CONFIG_FILES
17441   CONFIG_HEADERS  = $CONFIG_HEADERS
17442   CONFIG_LINKS    = $CONFIG_LINKS
17443   CONFIG_COMMANDS = $CONFIG_COMMANDS
17444   $ $0 $@
17445
17446 _CSEOF
17447 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17448 echo >&5
17449 _ACEOF
17450
17451 # Files that config.status was made for.
17452 if test -n "$ac_config_files"; then
17453   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17454 fi
17455
17456 if test -n "$ac_config_headers"; then
17457   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17458 fi
17459
17460 if test -n "$ac_config_links"; then
17461   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17462 fi
17463
17464 if test -n "$ac_config_commands"; then
17465   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17466 fi
17467
17468 cat >>$CONFIG_STATUS <<\_ACEOF
17469
17470 ac_cs_usage="\
17471 \`$as_me' instantiates files from templates according to the
17472 current configuration.
17473
17474 Usage: $0 [OPTIONS] [FILE]...
17475
17476   -h, --help       print this help, then exit
17477   -V, --version    print version number, then exit
17478   -d, --debug      don't remove temporary files
17479       --recheck    update $as_me by reconfiguring in the same conditions
17480   --file=FILE[:TEMPLATE]
17481                    instantiate the configuration file FILE
17482   --header=FILE[:TEMPLATE]
17483                    instantiate the configuration header FILE
17484
17485 Configuration files:
17486 $config_files
17487
17488 Configuration headers:
17489 $config_headers
17490
17491 Configuration commands:
17492 $config_commands
17493
17494 Report bugs to <bug-autoconf@gnu.org>."
17495 _ACEOF
17496
17497 cat >>$CONFIG_STATUS <<_ACEOF
17498 ac_cs_version="\\
17499 config.status
17500 configured by $0, generated by GNU Autoconf 2.53,
17501   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17502
17503 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17504 Free Software Foundation, Inc.
17505 This config.status script is free software; the Free Software Foundation
17506 gives unlimited permission to copy, distribute and modify it."
17507 srcdir=$srcdir
17508 INSTALL="$INSTALL"
17509 _ACEOF
17510
17511 cat >>$CONFIG_STATUS <<\_ACEOF
17512 # If no file are specified by the user, then we need to provide default
17513 # value.  By we need to know if files were specified by the user.
17514 ac_need_defaults=:
17515 while test $# != 0
17516 do
17517   case $1 in
17518   --*=*)
17519     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17520     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17521     shift
17522     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17523     shift
17524     ;;
17525   -*);;
17526   *) # This is not an option, so the user has probably given explicit
17527      # arguments.
17528      ac_need_defaults=false;;
17529   esac
17530
17531   case $1 in
17532   # Handling of the options.
17533 _ACEOF
17534 cat >>$CONFIG_STATUS <<_ACEOF
17535   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17536     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17537     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17538 _ACEOF
17539 cat >>$CONFIG_STATUS <<\_ACEOF
17540   --version | --vers* | -V )
17541     echo "$ac_cs_version"; exit 0 ;;
17542   --he | --h)
17543     # Conflict between --help and --header
17544     { { echo "$as_me:$LINENO: error: ambiguous option: $1
17545 Try \`$0 --help' for more information." >&5
17546 echo "$as_me: error: ambiguous option: $1
17547 Try \`$0 --help' for more information." >&2;}
17548    { (exit 1); exit 1; }; };;
17549   --help | --hel | -h )
17550     echo "$ac_cs_usage"; exit 0 ;;
17551   --debug | --d* | -d )
17552     debug=: ;;
17553   --file | --fil | --fi | --f )
17554     shift
17555     CONFIG_FILES="$CONFIG_FILES $1"
17556     ac_need_defaults=false;;
17557   --header | --heade | --head | --hea )
17558     shift
17559     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17560     ac_need_defaults=false;;
17561
17562   # This is an error.
17563   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17564 Try \`$0 --help' for more information." >&5
17565 echo "$as_me: error: unrecognized option: $1
17566 Try \`$0 --help' for more information." >&2;}
17567    { (exit 1); exit 1; }; } ;;
17568
17569   *) ac_config_targets="$ac_config_targets $1" ;;
17570
17571   esac
17572   shift
17573 done
17574
17575 _ACEOF
17576
17577 cat >>$CONFIG_STATUS <<_ACEOF
17578 #
17579 # INIT-COMMANDS section.
17580 #
17581
17582 INTLTOOL_PERL=${INTLTOOL_PERL}
17583
17584
17585 _ACEOF
17586
17587
17588
17589 cat >>$CONFIG_STATUS <<\_ACEOF
17590 for ac_config_target in $ac_config_targets
17591 do
17592   case "$ac_config_target" in
17593   # Handling of arguments.
17594   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17595   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
17596   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
17597   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
17598   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
17599   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
17600   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
17601   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
17602   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
17603   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
17604   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17605 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17606    { (exit 1); exit 1; }; };;
17607   esac
17608 done
17609
17610 # If the user did not use the arguments to specify the items to instantiate,
17611 # then the envvar interface is used.  Set only those that are not.
17612 # We use the long form for the default assignment because of an extremely
17613 # bizarre bug on SunOS 4.1.3.
17614 if $ac_need_defaults; then
17615   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17616   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17617   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17618 fi
17619
17620 # Create a temporary directory, and hook for its removal unless debugging.
17621 $debug ||
17622 {
17623   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17624   trap '{ (exit 1); exit 1; }' 1 2 13 15
17625 }
17626
17627 # Create a (secure) tmp directory for tmp files.
17628 : ${TMPDIR=/tmp}
17629 {
17630   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17631   test -n "$tmp" && test -d "$tmp"
17632 }  ||
17633 {
17634   tmp=$TMPDIR/cs$$-$RANDOM
17635   (umask 077 && mkdir $tmp)
17636 } ||
17637 {
17638    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17639    { (exit 1); exit 1; }
17640 }
17641
17642 _ACEOF
17643
17644 cat >>$CONFIG_STATUS <<_ACEOF
17645
17646 #
17647 # CONFIG_FILES section.
17648 #
17649
17650 # No need to generate the scripts if there are no CONFIG_FILES.
17651 # This happens for instance when ./config.status config.h
17652 if test -n "\$CONFIG_FILES"; then
17653   # Protect against being on the right side of a sed subst in config.status.
17654   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17655    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17656 s,@SHELL@,$SHELL,;t t
17657 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17658 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17659 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17660 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17661 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17662 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17663 s,@exec_prefix@,$exec_prefix,;t t
17664 s,@prefix@,$prefix,;t t
17665 s,@program_transform_name@,$program_transform_name,;t t
17666 s,@bindir@,$bindir,;t t
17667 s,@sbindir@,$sbindir,;t t
17668 s,@libexecdir@,$libexecdir,;t t
17669 s,@datadir@,$datadir,;t t
17670 s,@sysconfdir@,$sysconfdir,;t t
17671 s,@sharedstatedir@,$sharedstatedir,;t t
17672 s,@localstatedir@,$localstatedir,;t t
17673 s,@libdir@,$libdir,;t t
17674 s,@includedir@,$includedir,;t t
17675 s,@oldincludedir@,$oldincludedir,;t t
17676 s,@infodir@,$infodir,;t t
17677 s,@mandir@,$mandir,;t t
17678 s,@build_alias@,$build_alias,;t t
17679 s,@host_alias@,$host_alias,;t t
17680 s,@target_alias@,$target_alias,;t t
17681 s,@DEFS@,$DEFS,;t t
17682 s,@ECHO_C@,$ECHO_C,;t t
17683 s,@ECHO_N@,$ECHO_N,;t t
17684 s,@ECHO_T@,$ECHO_T,;t t
17685 s,@LIBS@,$LIBS,;t t
17686 s,@build@,$build,;t t
17687 s,@build_cpu@,$build_cpu,;t t
17688 s,@build_vendor@,$build_vendor,;t t
17689 s,@build_os@,$build_os,;t t
17690 s,@host@,$host,;t t
17691 s,@host_cpu@,$host_cpu,;t t
17692 s,@host_vendor@,$host_vendor,;t t
17693 s,@host_os@,$host_os,;t t
17694 s,@CC@,$CC,;t t
17695 s,@CFLAGS@,$CFLAGS,;t t
17696 s,@LDFLAGS@,$LDFLAGS,;t t
17697 s,@CPPFLAGS@,$CPPFLAGS,;t t
17698 s,@ac_ct_CC@,$ac_ct_CC,;t t
17699 s,@EXEEXT@,$EXEEXT,;t t
17700 s,@OBJEXT@,$OBJEXT,;t t
17701 s,@CPP@,$CPP,;t t
17702 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17703 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17704 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17705 s,@SET_MAKE@,$SET_MAKE,;t t
17706 s,@PERL@,$PERL,;t t
17707 s,@X_CFLAGS@,$X_CFLAGS,;t t
17708 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
17709 s,@X_LIBS@,$X_LIBS,;t t
17710 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
17711 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
17712 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
17713 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
17714 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
17715 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
17716 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
17717 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
17718 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
17719 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
17720 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
17721 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
17722 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
17723 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
17724 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
17725 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
17726 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
17727 s,@RANLIB@,$RANLIB,;t t
17728 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17729 s,@ALLOCA@,$ALLOCA,;t t
17730 s,@USE_NLS@,$USE_NLS,;t t
17731 s,@MSGFMT@,$MSGFMT,;t t
17732 s,@GMSGFMT@,$GMSGFMT,;t t
17733 s,@XGETTEXT@,$XGETTEXT,;t t
17734 s,@CATALOGS@,$CATALOGS,;t t
17735 s,@CATOBJEXT@,$CATOBJEXT,;t t
17736 s,@DATADIRNAME@,$DATADIRNAME,;t t
17737 s,@GMOFILES@,$GMOFILES,;t t
17738 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
17739 s,@INTLDEPS@,$INTLDEPS,;t t
17740 s,@INTLLIBS@,$INTLLIBS,;t t
17741 s,@INTLOBJS@,$INTLOBJS,;t t
17742 s,@POFILES@,$POFILES,;t t
17743 s,@POSUB@,$POSUB,;t t
17744 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
17745 s,@glib_config@,$glib_config,;t t
17746 s,@gtk_config@,$gtk_config,;t t
17747 s,@gnome_config@,$gnome_config,;t t
17748 s,@have_gnome_help@,$have_gnome_help,;t t
17749 s,@xml_config@,$xml_config,;t t
17750 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
17751 s,@fortune_tmp@,$fortune_tmp,;t t
17752 s,@INCLUDES@,$INCLUDES,;t t
17753 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
17754 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
17755 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
17756 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
17757 s,@GTK_LIBS@,$GTK_LIBS,;t t
17758 s,@XML_LIBS@,$XML_LIBS,;t t
17759 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
17760 s,@HACK_LIBS@,$HACK_LIBS,;t t
17761 s,@XPM_LIBS@,$XPM_LIBS,;t t
17762 s,@GL_LIBS@,$GL_LIBS,;t t
17763 s,@GLE_LIBS@,$GLE_LIBS,;t t
17764 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
17765 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
17766 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
17767 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
17768 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
17769 s,@NEED_SETUID@,$NEED_SETUID,;t t
17770 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
17771 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
17772 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
17773 s,@XMU_SRCS@,$XMU_SRCS,;t t
17774 s,@XMU_OBJS@,$XMU_OBJS,;t t
17775 s,@XMU_LIBS@,$XMU_LIBS,;t t
17776 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
17777 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
17778 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
17779 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
17780 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
17781 s,@JPEG_EXES@,$JPEG_EXES,;t t
17782 s,@GL_EXES@,$GL_EXES,;t t
17783 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
17784 s,@GL_MEN@,$GL_MEN,;t t
17785 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
17786 s,@GLE_EXES@,$GLE_EXES,;t t
17787 s,@GLE_MEN@,$GLE_MEN,;t t
17788 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
17789 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
17790 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
17791 s,@HACKDIR@,$HACKDIR,;t t
17792 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
17793 s,@GTK_ICONDIR@,$GTK_ICONDIR,;t t
17794 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
17795 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
17796 s,@DEPEND@,$DEPEND,;t t
17797 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
17798 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
17799 CEOF
17800
17801 _ACEOF
17802
17803   cat >>$CONFIG_STATUS <<\_ACEOF
17804   # Split the substitutions into bite-sized pieces for seds with
17805   # small command number limits, like on Digital OSF/1 and HP-UX.
17806   ac_max_sed_lines=48
17807   ac_sed_frag=1 # Number of current file.
17808   ac_beg=1 # First line for current file.
17809   ac_end=$ac_max_sed_lines # Line after last line for current file.
17810   ac_more_lines=:
17811   ac_sed_cmds=
17812   while $ac_more_lines; do
17813     if test $ac_beg -gt 1; then
17814       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17815     else
17816       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17817     fi
17818     if test ! -s $tmp/subs.frag; then
17819       ac_more_lines=false
17820     else
17821       # The purpose of the label and of the branching condition is to
17822       # speed up the sed processing (if there are no `@' at all, there
17823       # is no need to browse any of the substitutions).
17824       # These are the two extra sed commands mentioned above.
17825       (echo ':t
17826   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17827       if test -z "$ac_sed_cmds"; then
17828         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17829       else
17830         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17831       fi
17832       ac_sed_frag=`expr $ac_sed_frag + 1`
17833       ac_beg=$ac_end
17834       ac_end=`expr $ac_end + $ac_max_sed_lines`
17835     fi
17836   done
17837   if test -z "$ac_sed_cmds"; then
17838     ac_sed_cmds=cat
17839   fi
17840 fi # test -n "$CONFIG_FILES"
17841
17842 _ACEOF
17843 cat >>$CONFIG_STATUS <<\_ACEOF
17844 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17845   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17846   case $ac_file in
17847   - | *:- | *:-:* ) # input from stdin
17848         cat >$tmp/stdin
17849         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17850         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17851   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17852         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17853   * )   ac_file_in=$ac_file.in ;;
17854   esac
17855
17856   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17857   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17858 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17859          X"$ac_file" : 'X\(//\)[^/]' \| \
17860          X"$ac_file" : 'X\(//\)$' \| \
17861          X"$ac_file" : 'X\(/\)' \| \
17862          .     : '\(.\)' 2>/dev/null ||
17863 echo X"$ac_file" |
17864     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17865           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17866           /^X\(\/\/\)$/{ s//\1/; q; }
17867           /^X\(\/\).*/{ s//\1/; q; }
17868           s/.*/./; q'`
17869   { case "$ac_dir" in
17870   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17871   *)                      as_incr_dir=.;;
17872 esac
17873 as_dummy="$ac_dir"
17874 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17875   case $as_mkdir_dir in
17876     # Skip DOS drivespec
17877     ?:) as_incr_dir=$as_mkdir_dir ;;
17878     *)
17879       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17880       test -d "$as_incr_dir" ||
17881         mkdir "$as_incr_dir" ||
17882         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17883 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17884    { (exit 1); exit 1; }; }
17885     ;;
17886   esac
17887 done; }
17888
17889   ac_builddir=.
17890
17891 if test "$ac_dir" != .; then
17892   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17893   # A "../" for each directory in $ac_dir_suffix.
17894   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17895 else
17896   ac_dir_suffix= ac_top_builddir=
17897 fi
17898
17899 case $srcdir in
17900   .)  # No --srcdir option.  We are building in place.
17901     ac_srcdir=.
17902     if test -z "$ac_top_builddir"; then
17903        ac_top_srcdir=.
17904     else
17905        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17906     fi ;;
17907   [\\/]* | ?:[\\/]* )  # Absolute path.
17908     ac_srcdir=$srcdir$ac_dir_suffix;
17909     ac_top_srcdir=$srcdir ;;
17910   *) # Relative path.
17911     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17912     ac_top_srcdir=$ac_top_builddir$srcdir ;;
17913 esac
17914 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17915 # absolute.
17916 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
17917 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
17918 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17919 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17920
17921
17922   case $INSTALL in
17923   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17924   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17925   esac
17926
17927   if test x"$ac_file" != x-; then
17928     { echo "$as_me:$LINENO: creating $ac_file" >&5
17929 echo "$as_me: creating $ac_file" >&6;}
17930     rm -f "$ac_file"
17931   fi
17932   # Let's still pretend it is `configure' which instantiates (i.e., don't
17933   # use $as_me), people would be surprised to read:
17934   #    /* config.h.  Generated by config.status.  */
17935   if test x"$ac_file" = x-; then
17936     configure_input=
17937   else
17938     configure_input="$ac_file.  "
17939   fi
17940   configure_input=$configure_input"Generated from `echo $ac_file_in |
17941                                      sed 's,.*/,,'` by configure."
17942
17943   # First look for the input files in the build tree, otherwise in the
17944   # src tree.
17945   ac_file_inputs=`IFS=:
17946     for f in $ac_file_in; do
17947       case $f in
17948       -) echo $tmp/stdin ;;
17949       [\\/$]*)
17950          # Absolute (can't be DOS-style, as IFS=:)
17951          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17952 echo "$as_me: error: cannot find input file: $f" >&2;}
17953    { (exit 1); exit 1; }; }
17954          echo $f;;
17955       *) # Relative
17956          if test -f "$f"; then
17957            # Build tree
17958            echo $f
17959          elif test -f "$srcdir/$f"; then
17960            # Source tree
17961            echo $srcdir/$f
17962          else
17963            # /dev/null tree
17964            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17965 echo "$as_me: error: cannot find input file: $f" >&2;}
17966    { (exit 1); exit 1; }; }
17967          fi;;
17968       esac
17969     done` || { (exit 1); exit 1; }
17970 _ACEOF
17971 cat >>$CONFIG_STATUS <<_ACEOF
17972   sed "$ac_vpsub
17973 $extrasub
17974 _ACEOF
17975 cat >>$CONFIG_STATUS <<\_ACEOF
17976 :t
17977 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17978 s,@configure_input@,$configure_input,;t t
17979 s,@srcdir@,$ac_srcdir,;t t
17980 s,@abs_srcdir@,$ac_abs_srcdir,;t t
17981 s,@top_srcdir@,$ac_top_srcdir,;t t
17982 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17983 s,@builddir@,$ac_builddir,;t t
17984 s,@abs_builddir@,$ac_abs_builddir,;t t
17985 s,@top_builddir@,$ac_top_builddir,;t t
17986 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17987 s,@INSTALL@,$ac_INSTALL,;t t
17988 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17989   rm -f $tmp/stdin
17990   if test x"$ac_file" != x-; then
17991     mv $tmp/out $ac_file
17992   else
17993     cat $tmp/out
17994     rm -f $tmp/out
17995   fi
17996
17997 done
17998 _ACEOF
17999 cat >>$CONFIG_STATUS <<\_ACEOF
18000
18001 #
18002 # CONFIG_HEADER section.
18003 #
18004
18005 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18006 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18007 #
18008 # ac_d sets the value in "#define NAME VALUE" lines.
18009 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18010 ac_dB='[        ].*$,\1#\2'
18011 ac_dC=' '
18012 ac_dD=',;t'
18013 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18014 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18015 ac_uB='$,\1#\2define\3'
18016 ac_uC=' '
18017 ac_uD=',;t'
18018
18019 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18020   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18021   case $ac_file in
18022   - | *:- | *:-:* ) # input from stdin
18023         cat >$tmp/stdin
18024         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18025         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18026   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18027         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18028   * )   ac_file_in=$ac_file.in ;;
18029   esac
18030
18031   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18032 echo "$as_me: creating $ac_file" >&6;}
18033
18034   # First look for the input files in the build tree, otherwise in the
18035   # src tree.
18036   ac_file_inputs=`IFS=:
18037     for f in $ac_file_in; do
18038       case $f in
18039       -) echo $tmp/stdin ;;
18040       [\\/$]*)
18041          # Absolute (can't be DOS-style, as IFS=:)
18042          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18043 echo "$as_me: error: cannot find input file: $f" >&2;}
18044    { (exit 1); exit 1; }; }
18045          echo $f;;
18046       *) # Relative
18047          if test -f "$f"; then
18048            # Build tree
18049            echo $f
18050          elif test -f "$srcdir/$f"; then
18051            # Source tree
18052            echo $srcdir/$f
18053          else
18054            # /dev/null tree
18055            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18056 echo "$as_me: error: cannot find input file: $f" >&2;}
18057    { (exit 1); exit 1; }; }
18058          fi;;
18059       esac
18060     done` || { (exit 1); exit 1; }
18061   # Remove the trailing spaces.
18062   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18063
18064 _ACEOF
18065
18066 # Transform confdefs.h into two sed scripts, `conftest.defines' and
18067 # `conftest.undefs', that substitutes the proper values into
18068 # config.h.in to produce config.h.  The first handles `#define'
18069 # templates, and the second `#undef' templates.
18070 # And first: Protect against being on the right side of a sed subst in
18071 # config.status.  Protect against being in an unquoted here document
18072 # in config.status.
18073 rm -f conftest.defines conftest.undefs
18074 # Using a here document instead of a string reduces the quoting nightmare.
18075 # Putting comments in sed scripts is not portable.
18076 #
18077 # `end' is used to avoid that the second main sed command (meant for
18078 # 0-ary CPP macros) applies to n-ary macro definitions.
18079 # See the Autoconf documentation for `clear'.
18080 cat >confdef2sed.sed <<\_ACEOF
18081 s/[\\&,]/\\&/g
18082 s,[\\$`],\\&,g
18083 t clear
18084 : clear
18085 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18086 t end
18087 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18088 : end
18089 _ACEOF
18090 # If some macros were called several times there might be several times
18091 # the same #defines, which is useless.  Nevertheless, we may not want to
18092 # sort them, since we want the *last* AC-DEFINE to be honored.
18093 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18094 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18095 rm -f confdef2sed.sed
18096
18097 # This sed command replaces #undef with comments.  This is necessary, for
18098 # example, in the case of _POSIX_SOURCE, which is predefined and required
18099 # on some systems where configure will not decide to define it.
18100 cat >>conftest.undefs <<\_ACEOF
18101 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18102 _ACEOF
18103
18104 # Break up conftest.defines because some shells have a limit on the size
18105 # of here documents, and old seds have small limits too (100 cmds).
18106 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
18107 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
18108 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18109 echo '  :' >>$CONFIG_STATUS
18110 rm -f conftest.tail
18111 while grep . conftest.defines >/dev/null
18112 do
18113   # Write a limited-size here document to $tmp/defines.sed.
18114   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18115   # Speed up: don't consider the non `#define' lines.
18116   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
18117   # Work around the forget-to-reset-the-flag bug.
18118   echo 't clr' >>$CONFIG_STATUS
18119   echo ': clr' >>$CONFIG_STATUS
18120   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
18121   echo 'CEOF
18122   sed -f $tmp/defines.sed $tmp/in >$tmp/out
18123   rm -f $tmp/in
18124   mv $tmp/out $tmp/in
18125 ' >>$CONFIG_STATUS
18126   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18127   rm -f conftest.defines
18128   mv conftest.tail conftest.defines
18129 done
18130 rm -f conftest.defines
18131 echo '  fi # egrep' >>$CONFIG_STATUS
18132 echo >>$CONFIG_STATUS
18133
18134 # Break up conftest.undefs because some shells have a limit on the size
18135 # of here documents, and old seds have small limits too (100 cmds).
18136 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
18137 rm -f conftest.tail
18138 while grep . conftest.undefs >/dev/null
18139 do
18140   # Write a limited-size here document to $tmp/undefs.sed.
18141   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18142   # Speed up: don't consider the non `#undef'
18143   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
18144   # Work around the forget-to-reset-the-flag bug.
18145   echo 't clr' >>$CONFIG_STATUS
18146   echo ': clr' >>$CONFIG_STATUS
18147   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18148   echo 'CEOF
18149   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18150   rm -f $tmp/in
18151   mv $tmp/out $tmp/in
18152 ' >>$CONFIG_STATUS
18153   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18154   rm -f conftest.undefs
18155   mv conftest.tail conftest.undefs
18156 done
18157 rm -f conftest.undefs
18158
18159 cat >>$CONFIG_STATUS <<\_ACEOF
18160   # Let's still pretend it is `configure' which instantiates (i.e., don't
18161   # use $as_me), people would be surprised to read:
18162   #    /* config.h.  Generated by config.status.  */
18163   if test x"$ac_file" = x-; then
18164     echo "/* Generated by configure.  */" >$tmp/config.h
18165   else
18166     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
18167   fi
18168   cat $tmp/in >>$tmp/config.h
18169   rm -f $tmp/in
18170   if test x"$ac_file" != x-; then
18171     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18172       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18173 echo "$as_me: $ac_file is unchanged" >&6;}
18174     else
18175       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18176 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18177          X"$ac_file" : 'X\(//\)[^/]' \| \
18178          X"$ac_file" : 'X\(//\)$' \| \
18179          X"$ac_file" : 'X\(/\)' \| \
18180          .     : '\(.\)' 2>/dev/null ||
18181 echo X"$ac_file" |
18182     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18183           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18184           /^X\(\/\/\)$/{ s//\1/; q; }
18185           /^X\(\/\).*/{ s//\1/; q; }
18186           s/.*/./; q'`
18187       { case "$ac_dir" in
18188   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18189   *)                      as_incr_dir=.;;
18190 esac
18191 as_dummy="$ac_dir"
18192 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18193   case $as_mkdir_dir in
18194     # Skip DOS drivespec
18195     ?:) as_incr_dir=$as_mkdir_dir ;;
18196     *)
18197       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18198       test -d "$as_incr_dir" ||
18199         mkdir "$as_incr_dir" ||
18200         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18201 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18202    { (exit 1); exit 1; }; }
18203     ;;
18204   esac
18205 done; }
18206
18207       rm -f $ac_file
18208       mv $tmp/config.h $ac_file
18209     fi
18210   else
18211     cat $tmp/config.h
18212     rm -f $tmp/config.h
18213   fi
18214 done
18215 _ACEOF
18216 cat >>$CONFIG_STATUS <<\_ACEOF
18217
18218 #
18219 # CONFIG_COMMANDS section.
18220 #
18221 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18222   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18223   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18224   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
18225 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18226          X"$ac_dest" : 'X\(//\)[^/]' \| \
18227          X"$ac_dest" : 'X\(//\)$' \| \
18228          X"$ac_dest" : 'X\(/\)' \| \
18229          .     : '\(.\)' 2>/dev/null ||
18230 echo X"$ac_dest" |
18231     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18232           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18233           /^X\(\/\/\)$/{ s//\1/; q; }
18234           /^X\(\/\).*/{ s//\1/; q; }
18235           s/.*/./; q'`
18236   ac_builddir=.
18237
18238 if test "$ac_dir" != .; then
18239   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18240   # A "../" for each directory in $ac_dir_suffix.
18241   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18242 else
18243   ac_dir_suffix= ac_top_builddir=
18244 fi
18245
18246 case $srcdir in
18247   .)  # No --srcdir option.  We are building in place.
18248     ac_srcdir=.
18249     if test -z "$ac_top_builddir"; then
18250        ac_top_srcdir=.
18251     else
18252        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18253     fi ;;
18254   [\\/]* | ?:[\\/]* )  # Absolute path.
18255     ac_srcdir=$srcdir$ac_dir_suffix;
18256     ac_top_srcdir=$srcdir ;;
18257   *) # Relative path.
18258     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18259     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18260 esac
18261 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18262 # absolute.
18263 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18264 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
18265 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18266 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18267
18268
18269   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
18270 echo "$as_me: executing $ac_dest commands" >&6;}
18271   case $ac_dest in
18272     default-1 )
18273
18274 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
18275 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
18276   rm -f intltool-extract.out
18277 else
18278   mv -f intltool-extract.out intltool-extract
18279 fi
18280 chmod ugo+x intltool-extract
18281 chmod u+w intltool-extract
18282
18283 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
18284 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
18285   rm -f intltool-merge.out
18286 else
18287   mv -f intltool-merge.out intltool-merge
18288 fi
18289 chmod ugo+x intltool-merge
18290 chmod u+w intltool-merge
18291
18292 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
18293 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
18294   rm -f intltool-update.out
18295 else
18296   mv -f intltool-update.out intltool-update
18297 fi
18298 chmod ugo+x intltool-update
18299 chmod u+w intltool-update
18300
18301  ;;
18302     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
18303         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
18304       esac ;;
18305   esac
18306 done
18307 _ACEOF
18308
18309 cat >>$CONFIG_STATUS <<\_ACEOF
18310
18311 { (exit 0); exit 0; }
18312 _ACEOF
18313 chmod +x $CONFIG_STATUS
18314 ac_clean_files=$ac_clean_files_save
18315
18316
18317 # configure is writing to config.log, and then calls config.status.
18318 # config.status does its own redirection, appending to config.log.
18319 # Unfortunately, on DOS this fails, as config.log is still kept open
18320 # by configure, so config.status won't be able to write to it; its
18321 # output is simply discarded.  So we exec the FD to /dev/null,
18322 # effectively closing config.log, so it can be properly (re)opened and
18323 # appended to by config.status.  When coming back to configure, we
18324 # need to make the FD available again.
18325 if test "$no_create" != yes; then
18326   ac_cs_success=:
18327   exec 5>/dev/null
18328   $SHELL $CONFIG_STATUS || ac_cs_success=false
18329   exec 5>>config.log
18330   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18331   # would make configure fail if this is the last instruction.
18332   $ac_cs_success || { (exit 1); exit 1; }
18333 fi
18334
18335
18336 ###############################################################################
18337 #
18338 #       Print some warnings at the end.
18339 #
18340 ###############################################################################
18341
18342 warn_prefix_1="    Warning:"
18343 warn_prefix_2="       Note:"
18344 warn_prefix="$warn_prefix_1"
18345
18346 warning=no
18347 warnsep='    #################################################################'
18348
18349 warnpre() {
18350   if test "$warning" = no ; then
18351     echo '' ; echo "$warnsep" ; echo ''
18352     warning=yes
18353   fi
18354 }
18355
18356 warn() {
18357   warnpre
18358   if test "$warning" = long ; then echo '' ; fi
18359   warning=yes
18360   rest="$@"
18361   echo "$warn_prefix $rest"
18362 }
18363
18364 warnL() {
18365   was=$warning
18366   warnpre
18367   warning=yes
18368   if test "$was" != no ; then echo '' ; fi
18369   rest="$@"
18370   echo "$warn_prefix $rest"
18371 }
18372
18373 warn2() {
18374   rest="$@"
18375   echo "             $rest"
18376   warning=long
18377 }
18378
18379 note() {
18380   warn_prefix="$warn_prefix_2"
18381   warn $@
18382   warn_prefix="$warn_prefix_1"
18383 }
18384
18385 noteL() {
18386   warn_prefix="$warn_prefix_2"
18387   warnL $@
18388   warn_prefix="$warn_prefix_1"
18389 }
18390
18391
18392 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
18393   warn 'The SGI saver extension was requested, but was not found.'
18394 fi
18395
18396 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
18397   warn 'The MIT saver extension was requested, but was not found.'
18398 fi
18399
18400 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
18401   warn 'The XIdle extension was requested, but was not found.'
18402 fi
18403
18404 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
18405   warn 'The XSHM extension was requested, but was not found.'
18406 fi
18407
18408 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
18409   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
18410 fi
18411
18412 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
18413   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
18414 fi
18415
18416 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
18417   warn 'The DPMS extension was requested, but was not found.'
18418 fi
18419
18420 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
18421   warn 'The Xinerama extension was requested, but was not found.'
18422 fi
18423
18424 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
18425   warn 'The XF86VMODE extension was requested, but was not found.'
18426 fi
18427
18428 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
18429   warn "Checking of /proc/interrupts was requested, but it's bogus."
18430 fi
18431
18432
18433 if test "$have_motif" = no -a "$have_gtk" = no; then
18434   warnL "Neither Motif nor Gtk seem to be available;"
18435   warn2 "the \`xscreensaver-demo' program requires one of these."
18436
18437 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
18438   warnL "Use of Motif was requested, but it wasn't found;"
18439   warn2 "Gtk will be used instead."
18440
18441 elif test "$jurassic_gtk" = yes ; then
18442
18443   pref_gtk=1.2
18444
18445   v="$ac_gtk_version_string"
18446   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
18447     warnL "Use of Gtk was requested, but its version number is unknown;"
18448   elif test "$with_gtk_req" = yes ; then
18449     warnL "Use of Gtk was requested, but it is version $v;"
18450   else
18451     warnL "Gtk was found on this system, but it is version $v;"
18452   fi
18453
18454   warn2 "Gtk $pref_gtk or newer is required.  Motif will be used instead."
18455
18456 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
18457   warnL "Use of Gtk was requested, but it wasn't found;"
18458   warn2 "Motif will be used instead."
18459
18460 fi
18461
18462
18463 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
18464   warn  'Use of the Gnome Control Panel was requested, but the necessary'
18465   warn2 'headers and/or libraries were not found.'
18466 fi
18467
18468 if test "$have_gtk" = yes ; then
18469   if test "$have_xml" = no ; then
18470     if test "$with_xml_req" = yes ; then
18471       warn  'Use of the XML library was requested, but the necessary'
18472       warn2 'headers and/or libraries were not found.'
18473     else
18474       warn  'GTK is being used, but the XML library was not found.'
18475     fi
18476
18477     if test "$xml_halfassed" = yes ; then
18478
18479       if test "$have_zlib" = yes ; then
18480         which="XML libraries"
18481       else
18482         which="\`zlib' library"
18483       fi
18484
18485       echo ''
18486       warn2 'More specifically, we found the headers, but not the'
18487       warn2 "$which; so either XML is half-installed on this"
18488       warn2 "system, or something else went wrong.  The \`config.log'"
18489       warn2 'file might contain some clues.'
18490     fi
18491
18492     echo ''
18493     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
18494     warn2 'will not be available.  Specify the location of the XML'
18495     warn2 'library through the --with-xml option to configure.'
18496   fi
18497 fi
18498
18499 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
18500
18501   preferred_lesstif=0.92
18502
18503   if test "$lesstif_version" = unknown; then
18504     warnL "Unable to determine the LessTif version number!"
18505     warn2 "Make sure you are using version $preferred_lesstif or newer."
18506     warn2 "See <http://www.lesstif.org/>."
18507
18508   elif test \! $lesstif_version -gt 82; then
18509     warnL "LessTif version $lesstif_version_string is being used."
18510     warn2 "LessTif versions 0.82 and earlier are too buggy to"
18511     warn2 "use with XScreenSaver; it is strongly recommended"
18512     warn2 "that you upgrade to at least version $preferred_lesstif!"
18513     warn2 "See <http://www.lesstif.org/>."
18514   fi
18515 fi
18516
18517
18518 if test "$have_motif" = yes -a "$have_gtk" = no ; then
18519   warn  'Motif is being used, and GTK is not.'
18520   echo  ''
18521   warn2 'Though the Motif front-end to xscreensaver is still'
18522   warn2 'maintained, it is no longer being updated with new'
18523   warn2 'features: all new development on the xscreensaver-demo'
18524   warn2 'program is happening in the GTK version, and not in the'
18525   warn2 'Motif version.  It is recommended that you build against'
18526   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
18527 fi
18528
18529
18530 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
18531   warnL 'Use of XPM was requested, but it was not found.'
18532 fi
18533
18534 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
18535   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
18536 fi
18537
18538 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no; then
18539
18540   if test "$with_xpm_req" = yes ; then
18541     true
18542   elif test "$with_xpm_req" = no ; then
18543     warnL 'The XPM library is not being used.'
18544   else
18545     warnL 'The XPM library was not found.'
18546   fi
18547
18548   if test "$with_gdk_pixbuf_req" = yes ; then
18549     true
18550   elif test "$with_gdk_pixbuf_req" = no ; then
18551     warnL 'The GDK-Pixbuf library is not being used.'
18552   else
18553     warnL 'The GDK-Pixbuf library was not found.'
18554   fi
18555
18556   if test "$gdk_pixbuf_halfassed" = yes ; then
18557     echo ''
18558     warn2 'More specifically, we found the headers, but not the'
18559     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
18560     warn2 "system, or something else went wrong.  The \`config.log'"
18561     warn2 'file might contain some clues.'
18562   fi
18563
18564   echo ''
18565   warn2 'Some of the demos will not be as colorful as they'
18566   warn2 'could be.  You should consider installing Pixbuf or'
18567   warn2 'XPM and re-running configure.  (Remember to delete'
18568   warn2 'the config.cache file first.)  The Pixbuf library is'
18569   warn2 'a part of GNOME.  The XPM library comes with most'
18570   warn2 'X11 installations; you can also find it at the X11'
18571   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
18572   echo  ''
18573   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
18574   warn2 'support for more image formats.'
18575 fi
18576
18577
18578 if test "$have_jpeg" = no ; then
18579   if test "$with_jpeg_req" = yes ; then
18580     warnL 'Use of libjpeg was requested, but it was not found.'
18581   elif test "$with_jpeg_req" = no ; then
18582     noteL 'The JPEG library is not being used.'
18583   else
18584     noteL 'The JPEG library was not found.'
18585   fi
18586
18587   if test "$jpeg_halfassed" = yes ; then
18588     echo ''
18589     warn2 'More specifically, we found the headers, but not the'
18590     warn2 'library; so either JPEG is half-installed on this'
18591     warn2 "system, or something else went wrong.  The \`config.log'"
18592     warn2 'file might contain some clues.'
18593     echo ''
18594   fi
18595
18596   warn2 "This means the \`webcollage' program will be much slower."
18597 fi
18598
18599
18600 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
18601   preferred_mesagl=3.4
18602   mgv="$ac_mesagl_version_string"
18603   pgl="$preferred_mesagl"
18604
18605   if test "$ac_mesagl_version" = unknown; then
18606     warnL "Unable to determine the MesaGL version number!"
18607     warn2 "Make sure you are using version $preferred_mesagl or newer."
18608
18609   elif test \! "$ac_mesagl_version" -gt 2006; then
18610     warnL "MesaGL version $mgv is being used.  MesaGL 2.6 and earlier"
18611     warn2 "have a security bug.  It is strongly recommended that you"
18612     warn2 "upgrade to at least version $preferred_mesagl."
18613
18614   elif test \! "$ac_mesagl_version" -gt 3003; then
18615     warnL "MesaGL version $mgv is being used.  That version has some"
18616     warn2 "bugs; it is recommended that you upgrade to $pgl or newer."
18617   fi
18618 fi
18619
18620 if test "$have_gl" = no ; then
18621   if test "$with_gl_req" = yes ; then
18622     warnL 'Use of GL was requested, but it was not found.'
18623   elif test "$with_gl_req" = no ; then
18624     noteL 'The OpenGL 3D library is not being used.'
18625   else
18626     noteL 'The OpenGL 3D library was not found.'
18627   fi
18628
18629   if test "$gl_halfassed" = yes ; then
18630     echo ''
18631     warn2 'More specifically, we found the headers, but not the'
18632     warn2 'libraries; so either GL is half-installed on this'
18633     warn2 "system, or something else went wrong.  The \`config.log'"
18634     warn2 'file might contain some clues.'
18635   fi
18636
18637   echo ''
18638   warn2 'Those demos which use 3D will not be built or installed.'
18639   warn2 'You might want to consider installing OpenGL and'
18640   warn2 're-running configure.  (Remember to delete the'
18641   warn2 "config.cache file first.)  If your vendor doesn't ship"
18642   warn2 'their own implementation of OpenGL, you can get a free'
18643   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
18644   warn2 'info, see <http://www.opengl.org/>.'
18645
18646 fi
18647
18648
18649 if test "$have_gl" = yes -a "$have_gle" = no ; then
18650   if test "$with_gle_req" = yes ; then
18651     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
18652     warn2 'it was not found (though the OpenGL library was found, and'
18653     warn2 'is being used.)'
18654   elif test "$with_gle_req" = no ; then
18655     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
18656     warn2 'library is not.'
18657   else
18658     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
18659     warn2 'was not.'
18660   fi
18661
18662   if test "$gle_halfassed" = yes ; then
18663     echo ''
18664     warn2 'More specifically, we found the headers, but not the'
18665     warn2 'libraries; so either GLE is half-installed on this'
18666     warn2 "system, or something else went wrong.  The \`config.log'"
18667     warn2 'file might contain some clues.'
18668   fi
18669
18670   echo ''
18671   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
18672   warn2 'will not be built or installed.  You might want to consider'
18673   warn2 'installing GLE and re-running configure.  (Remember to delete'
18674   warn2 'the config.cache file first.)  You can find the GLE library'
18675   warn2 'at <http://www.linas.org/gle/>.  For general OpenGL info,'
18676   warn2 'see <http://www.opengl.org/>.'
18677
18678 fi
18679
18680
18681 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
18682   warn 'Use of XReadDisplay was requested, but it was not found.'
18683 fi
18684
18685 if test -n "$with_fortune_req"; then
18686   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
18687     warnL "$with_fortune_req was requested as the Fortune program,"
18688     warn2 "but was not found.  The default will be used instead."
18689   fi
18690 fi
18691
18692 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
18693   warn 'Use of Kerberos was requested, but it was not found.'
18694 fi
18695
18696 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
18697   warn 'Use of PAM was requested, but it was not found.'
18698 fi
18699
18700 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
18701   warn 'Use of shadow passwords was requested, but they were not found.'
18702 fi
18703
18704
18705 # You are in a twisty maze of namespaces and syntaxes, all alike.
18706 # Fuck the skull of Unix.
18707 #
18708 eval bindir=${bindir}
18709 eval bindir=${bindir}
18710 eval bindir=${bindir}
18711 eval bindir=${bindir}
18712 eval bindir=${bindir}
18713 eval bindir=${bindir}
18714 eval HACKDIR=${HACKDIR}
18715 eval HACKDIR=${HACKDIR}
18716 eval HACKDIR=${HACKDIR}
18717 eval HACKDIR=${HACKDIR}
18718 eval HACKDIR=${HACKDIR}
18719 eval HACKDIR=${HACKDIR}
18720 eval HACK_CONF_DIR=${HACK_CONF_DIR}
18721 eval HACK_CONF_DIR=${HACK_CONF_DIR}
18722 eval HACK_CONF_DIR=${HACK_CONF_DIR}
18723 eval HACK_CONF_DIR=${HACK_CONF_DIR}
18724 eval HACK_CONF_DIR=${HACK_CONF_DIR}
18725 eval HACK_CONF_DIR=${HACK_CONF_DIR}
18726
18727 # canonicalize slashes.
18728 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
18729 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
18730 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
18731
18732
18733 # Sanity check the hackdir
18734 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
18735   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
18736     echo ""
18737     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
18738                    There will be an executable installed with that name, so
18739                    that can't be the name of a directory as well.  Please
18740                    re-configure with a different directory name." >&5
18741 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
18742                    There will be an executable installed with that name, so
18743                    that can't be the name of a directory as well.  Please
18744                    re-configure with a different directory name." >&2;}
18745    { (exit 1); exit 1; }; }
18746   fi
18747 done
18748
18749
18750 do_dir_warning=no
18751
18752 # Now let's see if there's a previous RPM version already installed.  Blargh!
18753
18754 # M4 sucks!!
18755
18756 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
18757       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
18758
18759
18760 if test \! -z "$rpmv" ; then
18761   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
18762   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
18763
18764   warning=no
18765   warnL "There is already an installed RPM of xscreensaver $rpmv"
18766   warn2 "on this system.  You might want to remove it (with"
18767   warn2 '"rpm -ve xscreensaver") before running "make install"'
18768   warn2 "from this directory."
18769   echo ""
18770   warn2 "Alternately, you could build this version of xscreensaver"
18771   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
18772   warn2 "file is included.  See the RPM documentation for more info."
18773   echo ""
18774
18775   if test "$rpmbdir" = "$rpmhdir" ; then
18776     warn2 "The RPM version was installed in $rpmbdir/."
18777   else
18778     warn2 "The RPM version was installed in $rpmbdir/,"
18779     warn2 "with demos in $rpmhdir/."
18780   fi
18781
18782   do_dir_warning=yes
18783 fi
18784
18785
18786 if test "${bindir}" = "${HACKDIR}" ; then
18787   do_dir_warning=yes
18788 fi
18789
18790 if test "$do_dir_warning" = yes; then
18791   echo ""
18792   echo "$warnsep"
18793   echo ""
18794   echo '      When you run "make install", the "xscreensaver",'
18795   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
18796   echo "      will be installed in ${bindir}/."
18797   echo ""
18798   echo "      The various graphics demos (140+ different executables) will"
18799   echo "      be installed in ${HACKDIR}/."
18800   echo ""
18801   echo "      If you would prefer the demos to be installed elsewhere,"
18802   echo "      you should re-run configure with the --with-hackdir=DIR"
18803   echo "      option.  For more information, run \`./configure --help'."
18804   warning=yes
18805 fi
18806
18807 if test "$warning" != no; then
18808   echo '' ; echo "$warnsep" ; echo ''
18809 fi
18810
18811 if test "$do_dir_warning" = no; then
18812   if test "$warning" = no; then
18813     echo ''
18814   fi
18815   echo "User programs will be installed in ${bindir}/"
18816   echo "Screen savers will be installed in ${HACKDIR}/"
18817   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
18818   echo ''
18819 fi