http://svn.poeml.de/viewvc/ppc/src-unpacked/xscreensaver/xscreensaver-4.12.tar.bz2...
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.53.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 if expr a : '\(a\)' >/dev/null 2>&1; then
11   as_expr=expr
12 else
13   as_expr=false
14 fi
15
16
17 ## --------------------- ##
18 ## M4sh Initialization.  ##
19 ## --------------------- ##
20
21 # Be Bourne compatible
22 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23   emulate sh
24   NULLCMD=:
25 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26   set -o posix
27 fi
28
29 # NLS nuisances.
30 # Support unset when possible.
31 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
32   as_unset=unset
33 else
34   as_unset=false
35 fi
36
37 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
38     { $as_unset LANG || test "${LANG+set}" != set; } ||
39       { LANG=C; export LANG; }
40 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
41     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
42       { LC_ALL=C; export LC_ALL; }
43 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
44     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
45       { LC_TIME=C; export LC_TIME; }
46 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
47     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
48       { LC_CTYPE=C; export LC_CTYPE; }
49 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
50     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
51       { LANGUAGE=C; export LANGUAGE; }
52 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
53     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
54       { LC_COLLATE=C; export LC_COLLATE; }
55 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
56     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
57       { LC_NUMERIC=C; export LC_NUMERIC; }
58 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
59     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
60       { LC_MESSAGES=C; export LC_MESSAGES; }
61
62
63 # Name of the executable.
64 as_me=`(basename "$0") 2>/dev/null ||
65 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66          X"$0" : 'X\(//\)$' \| \
67          X"$0" : 'X\(/\)$' \| \
68          .     : '\(.\)' 2>/dev/null ||
69 echo X/"$0" |
70     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
71           /^X\/\(\/\/\)$/{ s//\1/; q; }
72           /^X\/\(\/\).*/{ s//\1/; q; }
73           s/.*/./; q'`
74
75 # PATH needs CR, and LINENO needs CR and PATH.
76 # Avoid depending upon Character Ranges.
77 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
78 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
79 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
80 as_cr_digits='0123456789'
81 as_cr_alnum=$as_cr_Letters$as_cr_digits
82
83 # The user is always right.
84 if test "${PATH_SEPARATOR+set}" != set; then
85   echo "#! /bin/sh" >conftest.sh
86   echo  "exit 0"   >>conftest.sh
87   chmod +x conftest.sh
88   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
89     PATH_SEPARATOR=';'
90   else
91     PATH_SEPARATOR=:
92   fi
93   rm -f conftest.sh
94 fi
95
96
97   as_lineno_1=$LINENO
98   as_lineno_2=$LINENO
99   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
100   test "x$as_lineno_1" != "x$as_lineno_2" &&
101   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
102   # Find who we are.  Look in the path if we contain no path at all
103   # relative or not.
104   case $0 in
105     *[\\/]* ) as_myself=$0 ;;
106     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
107 for as_dir in $PATH
108 do
109   IFS=$as_save_IFS
110   test -z "$as_dir" && as_dir=.
111   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
112 done
113
114        ;;
115   esac
116   # We did not find ourselves, most probably we were run as `sh COMMAND'
117   # in which case we are not to be found in the path.
118   if test "x$as_myself" = x; then
119     as_myself=$0
120   fi
121   if test ! -f "$as_myself"; then
122     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
123    { (exit 1); exit 1; }; }
124   fi
125   case $CONFIG_SHELL in
126   '')
127     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
128 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
129 do
130   IFS=$as_save_IFS
131   test -z "$as_dir" && as_dir=.
132   for as_base in sh bash ksh sh5; do
133          case $as_dir in
134          /*)
135            if ("$as_dir/$as_base" -c '
136   as_lineno_1=$LINENO
137   as_lineno_2=$LINENO
138   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
139   test "x$as_lineno_1" != "x$as_lineno_2" &&
140   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
141              CONFIG_SHELL=$as_dir/$as_base
142              export CONFIG_SHELL
143              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
144            fi;;
145          esac
146        done
147 done
148 ;;
149   esac
150
151   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
152   # uniformly replaced by the line number.  The first 'sed' inserts a
153   # line-number line before each line; the second 'sed' does the real
154   # work.  The second script uses 'N' to pair each line-number line
155   # with the numbered line, and appends trailing '-' during
156   # substitution so that $LINENO is not a special case at line end.
157   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
158   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
159   sed '=' <$as_myself |
160     sed '
161       N
162       s,$,-,
163       : loop
164       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
165       t loop
166       s,-$,,
167       s,^['$as_cr_digits']*\n,,
168     ' >$as_me.lineno &&
169   chmod +x $as_me.lineno ||
170     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
171    { (exit 1); exit 1; }; }
172
173   # Don't try to exec as it changes $[0], causing all sort of problems
174   # (the dirname of $[0] is not the place where we might find the
175   # original and so on.  Autoconf is especially sensible to this).
176   . ./$as_me.lineno
177   # Exit status is that of the last command.
178   exit
179 }
180
181
182 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
183   *c*,-n*) ECHO_N= ECHO_C='
184 ' ECHO_T='      ' ;;
185   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
186   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
187 esac
188
189 if expr a : '\(a\)' >/dev/null 2>&1; then
190   as_expr=expr
191 else
192   as_expr=false
193 fi
194
195 rm -f conf$$ conf$$.exe conf$$.file
196 echo >conf$$.file
197 if ln -s conf$$.file conf$$ 2>/dev/null; then
198   # We could just check for DJGPP; but this test a) works b) is more generic
199   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
200   if test -f conf$$.exe; then
201     # Don't use ln at all; we don't have any links
202     as_ln_s='cp -p'
203   else
204     as_ln_s='ln -s'
205   fi
206 elif ln conf$$.file conf$$ 2>/dev/null; then
207   as_ln_s=ln
208 else
209   as_ln_s='cp -p'
210 fi
211 rm -f conf$$ conf$$.exe conf$$.file
212
213 as_executable_p="test -f"
214
215 # Sed expression to map a string onto a valid CPP name.
216 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
217
218 # Sed expression to map a string onto a valid variable name.
219 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
220
221
222 # IFS
223 # We need space, tab and new line, in precisely that order.
224 as_nl='
225 '
226 IFS="   $as_nl"
227
228 # CDPATH.
229 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
230
231
232 # Name of the host.
233 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
234 # so uname gets run too.
235 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
236
237 exec 6>&1
238
239 #
240 # Initializations.
241 #
242 ac_default_prefix=/usr/local
243 cross_compiling=no
244 subdirs=
245 MFLAGS=
246 MAKEFLAGS=
247 SHELL=${CONFIG_SHELL-/bin/sh}
248
249 # Maximum number of lines to put in a shell here document.
250 # This variable seems obsolete.  It should probably be removed, and
251 # only ac_max_sed_lines should be used.
252 : ${ac_max_here_lines=38}
253
254 # Identity of this package.
255 PACKAGE_NAME=
256 PACKAGE_TARNAME=
257 PACKAGE_VERSION=
258 PACKAGE_STRING=
259 PACKAGE_BUGREPORT=
260
261 ac_unique_file="driver/subprocs.c"
262 # Factoring default headers for most tests.
263 ac_includes_default="\
264 #include <stdio.h>
265 #if HAVE_SYS_TYPES_H
266 # include <sys/types.h>
267 #endif
268 #if HAVE_SYS_STAT_H
269 # include <sys/stat.h>
270 #endif
271 #if STDC_HEADERS
272 # include <stdlib.h>
273 # include <stddef.h>
274 #else
275 # if HAVE_STDLIB_H
276 #  include <stdlib.h>
277 # endif
278 #endif
279 #if HAVE_STRING_H
280 # if !STDC_HEADERS && HAVE_MEMORY_H
281 #  include <memory.h>
282 # endif
283 # include <string.h>
284 #endif
285 #if HAVE_STRINGS_H
286 # include <strings.h>
287 #endif
288 #if HAVE_INTTYPES_H
289 # include <inttypes.h>
290 #else
291 # if HAVE_STDINT_H
292 #  include <stdint.h>
293 # endif
294 #endif
295 #if HAVE_UNISTD_H
296 # include <unistd.h>
297 #endif"
298
299
300 # Initialize some variables set by options.
301 ac_init_help=
302 ac_init_version=false
303 # The variables have the same names as the options, with
304 # dashes changed to underlines.
305 cache_file=/dev/null
306 exec_prefix=NONE
307 no_create=
308 no_recursion=
309 prefix=NONE
310 program_prefix=NONE
311 program_suffix=NONE
312 program_transform_name=s,x,x,
313 silent=
314 site=
315 srcdir=
316 verbose=
317 x_includes=NONE
318 x_libraries=NONE
319
320 # Installation directory options.
321 # These are left unexpanded so users can "make install exec_prefix=/foo"
322 # and all the variables that are supposed to be based on exec_prefix
323 # by default will actually change.
324 # Use braces instead of parens because sh, perl, etc. also accept them.
325 bindir='${exec_prefix}/bin'
326 sbindir='${exec_prefix}/sbin'
327 libexecdir='${exec_prefix}/libexec'
328 datadir='${prefix}/share'
329 sysconfdir='${prefix}/etc'
330 sharedstatedir='${prefix}/com'
331 localstatedir='${prefix}/var'
332 libdir='${exec_prefix}/lib'
333 includedir='${prefix}/include'
334 oldincludedir='/usr/include'
335 infodir='${prefix}/info'
336 mandir='${prefix}/man'
337
338 ac_prev=
339 for ac_option
340 do
341   # If the previous option needs an argument, assign it.
342   if test -n "$ac_prev"; then
343     eval "$ac_prev=\$ac_option"
344     ac_prev=
345     continue
346   fi
347
348   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
349
350   # Accept the important Cygnus configure options, so we can diagnose typos.
351
352   case $ac_option in
353
354   -bindir | --bindir | --bindi | --bind | --bin | --bi)
355     ac_prev=bindir ;;
356   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
357     bindir=$ac_optarg ;;
358
359   -build | --build | --buil | --bui | --bu)
360     ac_prev=build_alias ;;
361   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
362     build_alias=$ac_optarg ;;
363
364   -cache-file | --cache-file | --cache-fil | --cache-fi \
365   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
366     ac_prev=cache_file ;;
367   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
368   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
369     cache_file=$ac_optarg ;;
370
371   --config-cache | -C)
372     cache_file=config.cache ;;
373
374   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
375     ac_prev=datadir ;;
376   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
377   | --da=*)
378     datadir=$ac_optarg ;;
379
380   -disable-* | --disable-*)
381     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
382     # Reject names that are not valid shell variable names.
383     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
384       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
385    { (exit 1); exit 1; }; }
386     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
387     eval "enable_$ac_feature=no" ;;
388
389   -enable-* | --enable-*)
390     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
391     # Reject names that are not valid shell variable names.
392     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
393       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
394    { (exit 1); exit 1; }; }
395     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
396     case $ac_option in
397       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
398       *) ac_optarg=yes ;;
399     esac
400     eval "enable_$ac_feature='$ac_optarg'" ;;
401
402   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
403   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
404   | --exec | --exe | --ex)
405     ac_prev=exec_prefix ;;
406   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
407   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
408   | --exec=* | --exe=* | --ex=*)
409     exec_prefix=$ac_optarg ;;
410
411   -gas | --gas | --ga | --g)
412     # Obsolete; use --with-gas.
413     with_gas=yes ;;
414
415   -help | --help | --hel | --he | -h)
416     ac_init_help=long ;;
417   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
418     ac_init_help=recursive ;;
419   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
420     ac_init_help=short ;;
421
422   -host | --host | --hos | --ho)
423     ac_prev=host_alias ;;
424   -host=* | --host=* | --hos=* | --ho=*)
425     host_alias=$ac_optarg ;;
426
427   -includedir | --includedir | --includedi | --included | --include \
428   | --includ | --inclu | --incl | --inc)
429     ac_prev=includedir ;;
430   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
431   | --includ=* | --inclu=* | --incl=* | --inc=*)
432     includedir=$ac_optarg ;;
433
434   -infodir | --infodir | --infodi | --infod | --info | --inf)
435     ac_prev=infodir ;;
436   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
437     infodir=$ac_optarg ;;
438
439   -libdir | --libdir | --libdi | --libd)
440     ac_prev=libdir ;;
441   -libdir=* | --libdir=* | --libdi=* | --libd=*)
442     libdir=$ac_optarg ;;
443
444   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
445   | --libexe | --libex | --libe)
446     ac_prev=libexecdir ;;
447   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
448   | --libexe=* | --libex=* | --libe=*)
449     libexecdir=$ac_optarg ;;
450
451   -localstatedir | --localstatedir | --localstatedi | --localstated \
452   | --localstate | --localstat | --localsta | --localst \
453   | --locals | --local | --loca | --loc | --lo)
454     ac_prev=localstatedir ;;
455   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
456   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
457   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
458     localstatedir=$ac_optarg ;;
459
460   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
461     ac_prev=mandir ;;
462   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
463     mandir=$ac_optarg ;;
464
465   -nfp | --nfp | --nf)
466     # Obsolete; use --without-fp.
467     with_fp=no ;;
468
469   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
470   | --no-cr | --no-c | -n)
471     no_create=yes ;;
472
473   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
474   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
475     no_recursion=yes ;;
476
477   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
478   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
479   | --oldin | --oldi | --old | --ol | --o)
480     ac_prev=oldincludedir ;;
481   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
482   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
483   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
484     oldincludedir=$ac_optarg ;;
485
486   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
487     ac_prev=prefix ;;
488   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
489     prefix=$ac_optarg ;;
490
491   -program-prefix | --program-prefix | --program-prefi | --program-pref \
492   | --program-pre | --program-pr | --program-p)
493     ac_prev=program_prefix ;;
494   -program-prefix=* | --program-prefix=* | --program-prefi=* \
495   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
496     program_prefix=$ac_optarg ;;
497
498   -program-suffix | --program-suffix | --program-suffi | --program-suff \
499   | --program-suf | --program-su | --program-s)
500     ac_prev=program_suffix ;;
501   -program-suffix=* | --program-suffix=* | --program-suffi=* \
502   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503     program_suffix=$ac_optarg ;;
504
505   -program-transform-name | --program-transform-name \
506   | --program-transform-nam | --program-transform-na \
507   | --program-transform-n | --program-transform- \
508   | --program-transform | --program-transfor \
509   | --program-transfo | --program-transf \
510   | --program-trans | --program-tran \
511   | --progr-tra | --program-tr | --program-t)
512     ac_prev=program_transform_name ;;
513   -program-transform-name=* | --program-transform-name=* \
514   | --program-transform-nam=* | --program-transform-na=* \
515   | --program-transform-n=* | --program-transform-=* \
516   | --program-transform=* | --program-transfor=* \
517   | --program-transfo=* | --program-transf=* \
518   | --program-trans=* | --program-tran=* \
519   | --progr-tra=* | --program-tr=* | --program-t=*)
520     program_transform_name=$ac_optarg ;;
521
522   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
523   | -silent | --silent | --silen | --sile | --sil)
524     silent=yes ;;
525
526   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
527     ac_prev=sbindir ;;
528   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
529   | --sbi=* | --sb=*)
530     sbindir=$ac_optarg ;;
531
532   -sharedstatedir | --sharedstatedir | --sharedstatedi \
533   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
534   | --sharedst | --shareds | --shared | --share | --shar \
535   | --sha | --sh)
536     ac_prev=sharedstatedir ;;
537   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
538   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
539   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
540   | --sha=* | --sh=*)
541     sharedstatedir=$ac_optarg ;;
542
543   -site | --site | --sit)
544     ac_prev=site ;;
545   -site=* | --site=* | --sit=*)
546     site=$ac_optarg ;;
547
548   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
549     ac_prev=srcdir ;;
550   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
551     srcdir=$ac_optarg ;;
552
553   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
554   | --syscon | --sysco | --sysc | --sys | --sy)
555     ac_prev=sysconfdir ;;
556   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
557   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
558     sysconfdir=$ac_optarg ;;
559
560   -target | --target | --targe | --targ | --tar | --ta | --t)
561     ac_prev=target_alias ;;
562   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
563     target_alias=$ac_optarg ;;
564
565   -v | -verbose | --verbose | --verbos | --verbo | --verb)
566     verbose=yes ;;
567
568   -version | --version | --versio | --versi | --vers | -V)
569     ac_init_version=: ;;
570
571   -with-* | --with-*)
572     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
573     # Reject names that are not valid shell variable names.
574     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
575       { echo "$as_me: error: invalid package name: $ac_package" >&2
576    { (exit 1); exit 1; }; }
577     ac_package=`echo $ac_package| sed 's/-/_/g'`
578     case $ac_option in
579       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
580       *) ac_optarg=yes ;;
581     esac
582     eval "with_$ac_package='$ac_optarg'" ;;
583
584   -without-* | --without-*)
585     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
586     # Reject names that are not valid shell variable names.
587     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
588       { echo "$as_me: error: invalid package name: $ac_package" >&2
589    { (exit 1); exit 1; }; }
590     ac_package=`echo $ac_package | sed 's/-/_/g'`
591     eval "with_$ac_package=no" ;;
592
593   --x)
594     # Obsolete; use --with-x.
595     with_x=yes ;;
596
597   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
598   | --x-incl | --x-inc | --x-in | --x-i)
599     ac_prev=x_includes ;;
600   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
601   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
602     x_includes=$ac_optarg ;;
603
604   -x-libraries | --x-libraries | --x-librarie | --x-librari \
605   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
606     ac_prev=x_libraries ;;
607   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
608   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
609     x_libraries=$ac_optarg ;;
610
611   -*) { echo "$as_me: error: unrecognized option: $ac_option
612 Try \`$0 --help' for more information." >&2
613    { (exit 1); exit 1; }; }
614     ;;
615
616   *=*)
617     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
618     # Reject names that are not valid shell variable names.
619     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
620       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
621    { (exit 1); exit 1; }; }
622     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
623     eval "$ac_envvar='$ac_optarg'"
624     export $ac_envvar ;;
625
626   *)
627     # FIXME: should be removed in autoconf 3.0.
628     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
629     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
630       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
631     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
632     ;;
633
634   esac
635 done
636
637 if test -n "$ac_prev"; then
638   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
639   { echo "$as_me: error: missing argument to $ac_option" >&2
640    { (exit 1); exit 1; }; }
641 fi
642
643 # Be sure to have absolute paths.
644 for ac_var in exec_prefix prefix
645 do
646   eval ac_val=$`echo $ac_var`
647   case $ac_val in
648     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
649     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
650    { (exit 1); exit 1; }; };;
651   esac
652 done
653
654 # Be sure to have absolute paths.
655 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
656               localstatedir libdir includedir oldincludedir infodir mandir
657 do
658   eval ac_val=$`echo $ac_var`
659   case $ac_val in
660     [\\/$]* | ?:[\\/]* ) ;;
661     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
662    { (exit 1); exit 1; }; };;
663   esac
664 done
665
666 # There might be people who depend on the old broken behavior: `$host'
667 # used to hold the argument of --host etc.
668 # FIXME: To remove some day.
669 build=$build_alias
670 host=$host_alias
671 target=$target_alias
672
673 # FIXME: To remove some day.
674 if test "x$host_alias" != x; then
675   if test "x$build_alias" = x; then
676     cross_compiling=maybe
677     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
678     If a cross compiler is detected then cross compile mode will be used." >&2
679   elif test "x$build_alias" != "x$host_alias"; then
680     cross_compiling=yes
681   fi
682 fi
683
684 ac_tool_prefix=
685 test -n "$host_alias" && ac_tool_prefix=$host_alias-
686
687 test "$silent" = yes && exec 6>/dev/null
688
689
690 # Find the source files, if location was not specified.
691 if test -z "$srcdir"; then
692   ac_srcdir_defaulted=yes
693   # Try the directory containing this script, then its parent.
694   ac_confdir=`(dirname "$0") 2>/dev/null ||
695 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
696          X"$0" : 'X\(//\)[^/]' \| \
697          X"$0" : 'X\(//\)$' \| \
698          X"$0" : 'X\(/\)' \| \
699          .     : '\(.\)' 2>/dev/null ||
700 echo X"$0" |
701     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
702           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
703           /^X\(\/\/\)$/{ s//\1/; q; }
704           /^X\(\/\).*/{ s//\1/; q; }
705           s/.*/./; q'`
706   srcdir=$ac_confdir
707   if test ! -r $srcdir/$ac_unique_file; then
708     srcdir=..
709   fi
710 else
711   ac_srcdir_defaulted=no
712 fi
713 if test ! -r $srcdir/$ac_unique_file; then
714   if test "$ac_srcdir_defaulted" = yes; then
715     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
716    { (exit 1); exit 1; }; }
717   else
718     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
719    { (exit 1); exit 1; }; }
720   fi
721 fi
722 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
723 ac_env_build_alias_set=${build_alias+set}
724 ac_env_build_alias_value=$build_alias
725 ac_cv_env_build_alias_set=${build_alias+set}
726 ac_cv_env_build_alias_value=$build_alias
727 ac_env_host_alias_set=${host_alias+set}
728 ac_env_host_alias_value=$host_alias
729 ac_cv_env_host_alias_set=${host_alias+set}
730 ac_cv_env_host_alias_value=$host_alias
731 ac_env_target_alias_set=${target_alias+set}
732 ac_env_target_alias_value=$target_alias
733 ac_cv_env_target_alias_set=${target_alias+set}
734 ac_cv_env_target_alias_value=$target_alias
735 ac_env_CC_set=${CC+set}
736 ac_env_CC_value=$CC
737 ac_cv_env_CC_set=${CC+set}
738 ac_cv_env_CC_value=$CC
739 ac_env_CFLAGS_set=${CFLAGS+set}
740 ac_env_CFLAGS_value=$CFLAGS
741 ac_cv_env_CFLAGS_set=${CFLAGS+set}
742 ac_cv_env_CFLAGS_value=$CFLAGS
743 ac_env_LDFLAGS_set=${LDFLAGS+set}
744 ac_env_LDFLAGS_value=$LDFLAGS
745 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
746 ac_cv_env_LDFLAGS_value=$LDFLAGS
747 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
748 ac_env_CPPFLAGS_value=$CPPFLAGS
749 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
750 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
751 ac_env_CPP_set=${CPP+set}
752 ac_env_CPP_value=$CPP
753 ac_cv_env_CPP_set=${CPP+set}
754 ac_cv_env_CPP_value=$CPP
755
756 #
757 # Report the --help message.
758 #
759 if test "$ac_init_help" = "long"; then
760   # Omit some internal or obsolete options to make the list less imposing.
761   # This message is too long to be a string in the A/UX 3.1 sh.
762   cat <<_ACEOF
763 \`configure' configures this package to adapt to many kinds of systems.
764
765 Usage: $0 [OPTION]... [VAR=VALUE]...
766
767 To assign environment variables (e.g., CC, CFLAGS...), specify them as
768 VAR=VALUE.  See below for descriptions of some of the useful variables.
769
770 Defaults for the options are specified in brackets.
771
772
773 Configuration:
774
775   -h, --help              display this help and exit
776       --help=short        display options specific to this package
777       --help=recursive    display the short help of all the included packages
778   -V, --version           display version information and exit
779   -q, --quiet, --silent   do not print \`checking...' messages
780       --cache-file=FILE   cache test results in FILE [disabled]
781   -C, --config-cache      alias for \`--cache-file=config.cache'
782   -n, --no-create         do not create output files
783       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
784
785 _ACEOF
786
787   cat <<_ACEOF
788 Installation directories:
789   --prefix=PREFIX         install architecture-independent files in PREFIX
790                           [$ac_default_prefix]
791   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
792                           [PREFIX]
793
794 By default, \`make install' will install all the files in
795 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
796 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
797 for instance \`--prefix=\$HOME'.
798
799 For better control, use the options below.
800
801 Fine tuning of the installation directories:
802   --bindir=DIR           user executables [EPREFIX/bin]
803   --libdir=DIR           object code libraries [EPREFIX/lib]
804   --includedir=DIR       C header files [PREFIX/include]
805   --x-includes=DIR        X include files are in DIR
806   --x-libraries=DIR       X library files are in DIR
807   --mandir=DIR           man documentation [PREFIX/man]
808 _ACEOF
809
810   cat <<\_ACEOF
811
812 X features:
813   --x-includes=DIR    X include files are in DIR
814   --x-libraries=DIR   X library files are in DIR
815
816 System types:
817   --build=BUILD     configure for building on BUILD [guessed]
818   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
819 _ACEOF
820 fi
821
822 if test -n "$ac_init_help"; then
823
824   cat <<\_ACEOF
825
826 Optional Features:
827   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
828   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
829
830
831 Screen locking options:
832
833   --enable-locking        Compile in support for locking the display.
834   --disable-locking       Do not allow locking at all.
835
836 Optional Packages:
837   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
838   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
839 Installation options:
840
841   --with-hackdir=DIR      Where to install the hundreds of demo executables.
842                           Default: \`PREFIX/lib/xscreensaver/'
843   --with-configdir=DIR    Where to install the data files that describe each
844                           of the display modes to the GUI.
845                           Default: \`GNOMEPREFIX/control-center/screensavers/'
846                           or \`PREFIX/lib/xscreensaver/config/', depending on
847                           whether GNOME is available.
848
849 Except where noted, all of the --with options below can also take a
850 directory argument: for example, \`--with-motif=/opt/Motif'.  That would
851 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
852 to be added to the -L list, assuming those directories exist.
853
854 By default, support for each of these options will be built in, if the
855 relevant library routines exist.  At run time, they will then be used
856 only if the X server being used supports them.  Each --with option has
857 a corresponding --without option, to override building support for them
858 at all.
859
860 Screen blanking and idle-detection options:
861
862   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
863   --with-mit-ext          Include support for the MIT-SCREEN-SAVER extension.
864   --with-xidle-ext        Include support for the XIDLE extension.
865   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
866   --with-dpms-ext         Include support for the DPMS extension.
867   --with-xinerama-ext     Include support for the XINERAMA extension.
868   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
869   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
870   --with-proc-interrupts  Include support for consulting the /proc/interrupts
871                           file to notice keyboard activity.
872   --with-pam              Include support for PAM (Pluggable Auth Modules.)
873   --with-kerberos         Include support for Kerberos authentication.
874   --with-shadow           Include support for shadow password authentication.
875
876 User interface options:
877
878   --with-motif            Use the Motif toolkit for the user interface
879                           (not recommended.)
880   --with-gtk              Use the Gtk toolkit for the user interface.
881   --with-gnome            Include support for the Gnome 1.x Control Center.
882                           (This option is not needed with GTK 2.x / Gnome 2.x.)
883
884   --with-xml              The XML toolkit is needed for some parts of
885                           the Gtk interface.  Without it, the configuration
886                           interface will be much less featureful.
887
888 Graphics options:
889
890   --with-gl               Build those demos which depend on OpenGL.
891   --with-gle              Build those demos which depend on GLE
892                           (the OpenGL "extrusion" library.)
893   --with-xpm              Include support for XPM files in some demos.
894                           (Not needed if Pixbuf is used.)
895   --with-pixbuf           Include support for the GDK-Pixbuf library in some
896                           demos, which will make it possible for them to read
897                           GIF, JPEG, and PNG files as well.  (The path here is
898                           ignored if GTK 2.x is being used.)
899   --with-jpeg             Include support for the JPEG library.
900   --with-xshm-ext         Include support for the Shared Memory extension.
901   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
902   --with-readdisplay      Include support for the XReadDisplay extension.
903
904   --with-fortune=PROGRAM  Some demos are able to run an external program and
905                           display its text; this names the program to use by
906                           default (though it can be overridden with X
907                           resources.)  Default is \"/usr/games/fortune\".
908   --with-setuid-hacks     Allow some demos to be installed \`setuid root'
909                           (which is needed in order to ping other hosts.)
910
911
912 Some influential environment variables:
913   CC          C compiler command
914   CFLAGS      C compiler flags
915   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
916               nonstandard directory <lib dir>
917   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
918               headers in a nonstandard directory <include dir>
919   CPP         C preprocessor
920
921 Use these variables to override the choices made by `configure' or to help
922 it to find libraries and programs with nonstandard names/locations.
923
924 _ACEOF
925 fi
926
927 if test "$ac_init_help" = "recursive"; then
928   # If there are subdirs, report their specific --help.
929   ac_popdir=`pwd`
930   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
931     test -d $ac_dir || continue
932     ac_builddir=.
933
934 if test "$ac_dir" != .; then
935   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
936   # A "../" for each directory in $ac_dir_suffix.
937   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
938 else
939   ac_dir_suffix= ac_top_builddir=
940 fi
941
942 case $srcdir in
943   .)  # No --srcdir option.  We are building in place.
944     ac_srcdir=.
945     if test -z "$ac_top_builddir"; then
946        ac_top_srcdir=.
947     else
948        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
949     fi ;;
950   [\\/]* | ?:[\\/]* )  # Absolute path.
951     ac_srcdir=$srcdir$ac_dir_suffix;
952     ac_top_srcdir=$srcdir ;;
953   *) # Relative path.
954     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
955     ac_top_srcdir=$ac_top_builddir$srcdir ;;
956 esac
957 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
958 # absolute.
959 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
960 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
961 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
962 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
963
964     cd $ac_dir
965     # Check for guested configure; otherwise get Cygnus style configure.
966     if test -f $ac_srcdir/configure.gnu; then
967       echo
968       $SHELL $ac_srcdir/configure.gnu  --help=recursive
969     elif test -f $ac_srcdir/configure; then
970       echo
971       $SHELL $ac_srcdir/configure  --help=recursive
972     elif test -f $ac_srcdir/configure.ac ||
973            test -f $ac_srcdir/configure.in; then
974       echo
975       $ac_configure --help
976     else
977       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
978     fi
979     cd $ac_popdir
980   done
981 fi
982
983 test -n "$ac_init_help" && exit 0
984 if $ac_init_version; then
985   cat <<\_ACEOF
986
987 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
988 Free Software Foundation, Inc.
989 This configure script is free software; the Free Software Foundation
990 gives unlimited permission to copy, distribute and modify it.
991 _ACEOF
992   exit 0
993 fi
994 exec 5>config.log
995 cat >&5 <<_ACEOF
996 This file contains any messages produced by compilers while
997 running configure, to aid debugging if configure makes a mistake.
998
999 It was created by $as_me, which was
1000 generated by GNU Autoconf 2.53.  Invocation command line was
1001
1002   $ $0 $@
1003
1004 _ACEOF
1005 {
1006 cat <<_ASUNAME
1007 ## --------- ##
1008 ## Platform. ##
1009 ## --------- ##
1010
1011 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1012 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1013 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1014 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1015 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1016
1017 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1018 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1019
1020 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1021 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1022 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1023 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1024 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1025 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1026 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1027
1028 _ASUNAME
1029
1030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1031 for as_dir in $PATH
1032 do
1033   IFS=$as_save_IFS
1034   test -z "$as_dir" && as_dir=.
1035   echo "PATH: $as_dir"
1036 done
1037
1038 } >&5
1039
1040 cat >&5 <<_ACEOF
1041
1042
1043 ## ----------- ##
1044 ## Core tests. ##
1045 ## ----------- ##
1046
1047 _ACEOF
1048
1049
1050 # Keep a trace of the command line.
1051 # Strip out --no-create and --no-recursion so they do not pile up.
1052 # Also quote any args containing shell meta-characters.
1053 ac_configure_args=
1054 ac_sep=
1055 for ac_arg
1056 do
1057   case $ac_arg in
1058   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1059   | --no-cr | --no-c | -n ) continue ;;
1060   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1061   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1062     continue ;;
1063   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1064     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1065   esac
1066   case " $ac_configure_args " in
1067     *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1068     *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1069        ac_sep=" " ;;
1070   esac
1071   # Get rid of the leading space.
1072 done
1073
1074 # When interrupted or exit'd, cleanup temporary files, and complete
1075 # config.log.  We remove comments because anyway the quotes in there
1076 # would cause problems or look ugly.
1077 # WARNING: Be sure not to use single quotes in there, as some shells,
1078 # such as our DU 5.0 friend, will then `close' the trap.
1079 trap 'exit_status=$?
1080   # Save into config.log some information that might help in debugging.
1081   {
1082     echo
1083     cat <<\_ASBOX
1084 ## ---------------- ##
1085 ## Cache variables. ##
1086 ## ---------------- ##
1087 _ASBOX
1088     echo
1089     # The following way of writing the cache mishandles newlines in values,
1090 {
1091   (set) 2>&1 |
1092     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1093     *ac_space=\ *)
1094       sed -n \
1095         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1096           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1097       ;;
1098     *)
1099       sed -n \
1100         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1101       ;;
1102     esac;
1103 }
1104     echo
1105     if test -s confdefs.h; then
1106       cat <<\_ASBOX
1107 ## ----------- ##
1108 ## confdefs.h. ##
1109 ## ----------- ##
1110 _ASBOX
1111       echo
1112       sed "/^$/d" confdefs.h
1113       echo
1114     fi
1115     test "$ac_signal" != 0 &&
1116       echo "$as_me: caught signal $ac_signal"
1117     echo "$as_me: exit $exit_status"
1118   } >&5
1119   rm -f core core.* *.core &&
1120   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1121     exit $exit_status
1122      ' 0
1123 for ac_signal in 1 2 13 15; do
1124   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1125 done
1126 ac_signal=0
1127
1128 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1129 rm -rf conftest* confdefs.h
1130 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1131 echo >confdefs.h
1132
1133 # Predefined preprocessor variables.
1134
1135 cat >>confdefs.h <<_ACEOF
1136 #define PACKAGE_NAME "$PACKAGE_NAME"
1137 _ACEOF
1138
1139
1140 cat >>confdefs.h <<_ACEOF
1141 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1142 _ACEOF
1143
1144
1145 cat >>confdefs.h <<_ACEOF
1146 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1147 _ACEOF
1148
1149
1150 cat >>confdefs.h <<_ACEOF
1151 #define PACKAGE_STRING "$PACKAGE_STRING"
1152 _ACEOF
1153
1154
1155 cat >>confdefs.h <<_ACEOF
1156 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1157 _ACEOF
1158
1159
1160 # Let the site file select an alternate cache file if it wants to.
1161 # Prefer explicitly selected file to automatically selected ones.
1162 if test -z "$CONFIG_SITE"; then
1163   if test "x$prefix" != xNONE; then
1164     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1165   else
1166     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1167   fi
1168 fi
1169 for ac_site_file in $CONFIG_SITE; do
1170   if test -r "$ac_site_file"; then
1171     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1172 echo "$as_me: loading site script $ac_site_file" >&6;}
1173     sed 's/^/| /' "$ac_site_file" >&5
1174     . "$ac_site_file"
1175   fi
1176 done
1177
1178 if test -r "$cache_file"; then
1179   # Some versions of bash will fail to source /dev/null (special
1180   # files actually), so we avoid doing that.
1181   if test -f "$cache_file"; then
1182     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1183 echo "$as_me: loading cache $cache_file" >&6;}
1184     case $cache_file in
1185       [\\/]* | ?:[\\/]* ) . $cache_file;;
1186       *)                      . ./$cache_file;;
1187     esac
1188   fi
1189 else
1190   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1191 echo "$as_me: creating cache $cache_file" >&6;}
1192   >$cache_file
1193 fi
1194
1195 # Check that the precious variables saved in the cache have kept the same
1196 # value.
1197 ac_cache_corrupted=false
1198 for ac_var in `(set) 2>&1 |
1199                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1200   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1201   eval ac_new_set=\$ac_env_${ac_var}_set
1202   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1203   eval ac_new_val="\$ac_env_${ac_var}_value"
1204   case $ac_old_set,$ac_new_set in
1205     set,)
1206       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1207 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1208       ac_cache_corrupted=: ;;
1209     ,set)
1210       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1211 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1212       ac_cache_corrupted=: ;;
1213     ,);;
1214     *)
1215       if test "x$ac_old_val" != "x$ac_new_val"; then
1216         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1217 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1218         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1219 echo "$as_me:   former value:  $ac_old_val" >&2;}
1220         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1221 echo "$as_me:   current value: $ac_new_val" >&2;}
1222         ac_cache_corrupted=:
1223       fi;;
1224   esac
1225   # Pass precious variables to config.status.
1226   if test "$ac_new_set" = set; then
1227     case $ac_new_val in
1228     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1229       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1230     *) ac_arg=$ac_var=$ac_new_val ;;
1231     esac
1232     case " $ac_configure_args " in
1233       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1234       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1235     esac
1236   fi
1237 done
1238 if $ac_cache_corrupted; then
1239   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1240 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1241   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1242 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1243    { (exit 1); exit 1; }; }
1244 fi
1245
1246 ac_ext=c
1247 ac_cpp='$CPP $CPPFLAGS'
1248 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1249 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1250 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269 ac_config_headers="$ac_config_headers config.h"
1270
1271
1272 echo "current directory: `pwd`"
1273 echo "command line was: $0 $@"
1274
1275
1276 # After checking to see that --srcdir is correct (which AC_INIT does)
1277 # check for some random other files that come later in the tar file,
1278 # to make sure everything is here.
1279 #
1280 for d in driver utils hacks hacks/glx ; do
1281   f=$srcdir/$d/Makefile.in
1282   if test \! -r $f ; then
1283     echo ""
1284     echo "ERROR: The package is incomplete: $f does not exist."
1285     echo "       This probably means that your download was truncated."
1286     echo ""
1287     exit 1
1288   fi
1289 done
1290
1291 ###############################################################################
1292 #
1293 #       Function to figure out how to run the compiler.
1294 #
1295 ###############################################################################
1296
1297
1298
1299
1300 ###############################################################################
1301 #
1302 #       Functions to figure out how to disable // comments in ANSI C code.
1303 #
1304 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1305 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1306 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1307 #       so much for compatibility!)
1308 #
1309 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
1310 #       declarations preceed statements, without resorting to "-pedantic".
1311 #       This means that there is no way to get gcc3 to issue warnings that
1312 #       ensure that your code complies with the ANSI/ISO C89 standard, without
1313 #       also drowning in totally useless warnings.  Thank you master may I
1314 #       have another.
1315 #
1316 #       So, I give up, let's just use -pedantic.
1317 #
1318 ###############################################################################
1319
1320
1321
1322
1323
1324
1325 ###############################################################################
1326 #
1327 #       Function to figure out how to turn off Objective C on MacOS X.
1328 #       (We have to do this to work around an Apple-specific gcc bug.)
1329 #
1330 ###############################################################################
1331
1332
1333
1334
1335
1336
1337 ###############################################################################
1338 #
1339 #       Function to figure out how to create directory trees.
1340 #
1341 ###############################################################################
1342
1343
1344
1345
1346 ###############################################################################
1347 #
1348 #       Function to check whether gettimeofday() exists, and how to call it.
1349 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1350 #
1351 ###############################################################################
1352
1353
1354
1355
1356 ###############################################################################
1357 #
1358 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1359 #
1360 ###############################################################################
1361
1362 # M4 sucks!!  perl sucks too!!
1363
1364 perl_version_cmd='print $]'
1365
1366
1367
1368
1369
1370 ###############################################################################
1371 #
1372 #       Function to demand "bc".  Losers.
1373 #
1374 ###############################################################################
1375
1376
1377
1378 ###############################################################################
1379 #
1380 #       Functions to check how to do ICMP PING requests.
1381 #
1382 ###############################################################################
1383
1384
1385
1386
1387
1388
1389 ###############################################################################
1390 #
1391 #       Functions to check for various X11 crap.
1392 #
1393 ###############################################################################
1394
1395 # Try and find the app-defaults directory.
1396 # It sucks that autoconf doesn't do this already...
1397 #
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408 # Random special-cases for X on certain pathological OSes.
1409 # You know who you are.
1410 #
1411
1412
1413
1414
1415 ###############################################################################
1416 #
1417 #       Some utility functions to make checking for X things easier.
1418 #
1419 ###############################################################################
1420
1421 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1422 #
1423
1424
1425 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1426 #
1427
1428
1429 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1430 #
1431
1432
1433
1434 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1435 # Use this sparingly; it probably doesn't work very well on X programs.
1436 #
1437
1438
1439 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1440 # (But not the -L directories!)
1441 #
1442
1443
1444
1445
1446 # Usage: HANDLE_X_PATH_ARG([variable_name],
1447 #                          [--command-line-option],
1448 #                          [descriptive string])
1449 #
1450 # All of the --with options take three forms:
1451 #
1452 #   --with-foo (or --with-foo=yes)
1453 #   --without-foo (or --with-foo=no)
1454 #   --with-foo=/DIR
1455 #
1456 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1457 # a directory (string beginning with a slash) it checks to see whether
1458 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1459 # as appropriate.
1460 #
1461
1462
1463
1464
1465 ###############################################################################
1466 ###############################################################################
1467 #
1468 #       End of function definitions.  Now start actually executing stuff.
1469 #
1470 ###############################################################################
1471 ###############################################################################
1472
1473 # random compiler setup
1474 ac_aux_dir=
1475 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1476   if test -f $ac_dir/install-sh; then
1477     ac_aux_dir=$ac_dir
1478     ac_install_sh="$ac_aux_dir/install-sh -c"
1479     break
1480   elif test -f $ac_dir/install.sh; then
1481     ac_aux_dir=$ac_dir
1482     ac_install_sh="$ac_aux_dir/install.sh -c"
1483     break
1484   elif test -f $ac_dir/shtool; then
1485     ac_aux_dir=$ac_dir
1486     ac_install_sh="$ac_aux_dir/shtool install -c"
1487     break
1488   fi
1489 done
1490 if test -z "$ac_aux_dir"; then
1491   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1492 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1493    { (exit 1); exit 1; }; }
1494 fi
1495 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1496 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1497 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1498
1499 # Make sure we can run config.sub.
1500 $ac_config_sub sun4 >/dev/null 2>&1 ||
1501   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1502 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1503    { (exit 1); exit 1; }; }
1504
1505 echo "$as_me:$LINENO: checking build system type" >&5
1506 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1507 if test "${ac_cv_build+set}" = set; then
1508   echo $ECHO_N "(cached) $ECHO_C" >&6
1509 else
1510   ac_cv_build_alias=$build_alias
1511 test -z "$ac_cv_build_alias" &&
1512   ac_cv_build_alias=`$ac_config_guess`
1513 test -z "$ac_cv_build_alias" &&
1514   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1515 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1516    { (exit 1); exit 1; }; }
1517 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1518   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1519 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1520    { (exit 1); exit 1; }; }
1521
1522 fi
1523 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1524 echo "${ECHO_T}$ac_cv_build" >&6
1525 build=$ac_cv_build
1526 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1527 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1528 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1529
1530
1531 echo "$as_me:$LINENO: checking host system type" >&5
1532 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1533 if test "${ac_cv_host+set}" = set; then
1534   echo $ECHO_N "(cached) $ECHO_C" >&6
1535 else
1536   ac_cv_host_alias=$host_alias
1537 test -z "$ac_cv_host_alias" &&
1538   ac_cv_host_alias=$ac_cv_build_alias
1539 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1540   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1541 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1542    { (exit 1); exit 1; }; }
1543
1544 fi
1545 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1546 echo "${ECHO_T}$ac_cv_host" >&6
1547 host=$ac_cv_host
1548 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1549 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1550 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1551
1552
1553
1554 ac_ext=c
1555 ac_cpp='$CPP $CPPFLAGS'
1556 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1557 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1558 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1559 if test -n "$ac_tool_prefix"; then
1560   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1561 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1562 echo "$as_me:$LINENO: checking for $ac_word" >&5
1563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1564 if test "${ac_cv_prog_CC+set}" = set; then
1565   echo $ECHO_N "(cached) $ECHO_C" >&6
1566 else
1567   if test -n "$CC"; then
1568   ac_cv_prog_CC="$CC" # Let the user override the test.
1569 else
1570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1571 for as_dir in $PATH
1572 do
1573   IFS=$as_save_IFS
1574   test -z "$as_dir" && as_dir=.
1575   for ac_exec_ext in '' $ac_executable_extensions; do
1576   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1577     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1578     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1579     break 2
1580   fi
1581 done
1582 done
1583
1584 fi
1585 fi
1586 CC=$ac_cv_prog_CC
1587 if test -n "$CC"; then
1588   echo "$as_me:$LINENO: result: $CC" >&5
1589 echo "${ECHO_T}$CC" >&6
1590 else
1591   echo "$as_me:$LINENO: result: no" >&5
1592 echo "${ECHO_T}no" >&6
1593 fi
1594
1595 fi
1596 if test -z "$ac_cv_prog_CC"; then
1597   ac_ct_CC=$CC
1598   # Extract the first word of "gcc", so it can be a program name with args.
1599 set dummy gcc; ac_word=$2
1600 echo "$as_me:$LINENO: checking for $ac_word" >&5
1601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1602 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1603   echo $ECHO_N "(cached) $ECHO_C" >&6
1604 else
1605   if test -n "$ac_ct_CC"; then
1606   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1607 else
1608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1609 for as_dir in $PATH
1610 do
1611   IFS=$as_save_IFS
1612   test -z "$as_dir" && as_dir=.
1613   for ac_exec_ext in '' $ac_executable_extensions; do
1614   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1615     ac_cv_prog_ac_ct_CC="gcc"
1616     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1617     break 2
1618   fi
1619 done
1620 done
1621
1622 fi
1623 fi
1624 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1625 if test -n "$ac_ct_CC"; then
1626   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1627 echo "${ECHO_T}$ac_ct_CC" >&6
1628 else
1629   echo "$as_me:$LINENO: result: no" >&5
1630 echo "${ECHO_T}no" >&6
1631 fi
1632
1633   CC=$ac_ct_CC
1634 else
1635   CC="$ac_cv_prog_CC"
1636 fi
1637
1638 if test -z "$CC"; then
1639   if test -n "$ac_tool_prefix"; then
1640   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1641 set dummy ${ac_tool_prefix}cc; ac_word=$2
1642 echo "$as_me:$LINENO: checking for $ac_word" >&5
1643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1644 if test "${ac_cv_prog_CC+set}" = set; then
1645   echo $ECHO_N "(cached) $ECHO_C" >&6
1646 else
1647   if test -n "$CC"; then
1648   ac_cv_prog_CC="$CC" # Let the user override the test.
1649 else
1650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1651 for as_dir in $PATH
1652 do
1653   IFS=$as_save_IFS
1654   test -z "$as_dir" && as_dir=.
1655   for ac_exec_ext in '' $ac_executable_extensions; do
1656   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1657     ac_cv_prog_CC="${ac_tool_prefix}cc"
1658     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1659     break 2
1660   fi
1661 done
1662 done
1663
1664 fi
1665 fi
1666 CC=$ac_cv_prog_CC
1667 if test -n "$CC"; then
1668   echo "$as_me:$LINENO: result: $CC" >&5
1669 echo "${ECHO_T}$CC" >&6
1670 else
1671   echo "$as_me:$LINENO: result: no" >&5
1672 echo "${ECHO_T}no" >&6
1673 fi
1674
1675 fi
1676 if test -z "$ac_cv_prog_CC"; then
1677   ac_ct_CC=$CC
1678   # Extract the first word of "cc", so it can be a program name with args.
1679 set dummy cc; ac_word=$2
1680 echo "$as_me:$LINENO: checking for $ac_word" >&5
1681 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1682 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1683   echo $ECHO_N "(cached) $ECHO_C" >&6
1684 else
1685   if test -n "$ac_ct_CC"; then
1686   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1687 else
1688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1689 for as_dir in $PATH
1690 do
1691   IFS=$as_save_IFS
1692   test -z "$as_dir" && as_dir=.
1693   for ac_exec_ext in '' $ac_executable_extensions; do
1694   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1695     ac_cv_prog_ac_ct_CC="cc"
1696     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1697     break 2
1698   fi
1699 done
1700 done
1701
1702 fi
1703 fi
1704 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1705 if test -n "$ac_ct_CC"; then
1706   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1707 echo "${ECHO_T}$ac_ct_CC" >&6
1708 else
1709   echo "$as_me:$LINENO: result: no" >&5
1710 echo "${ECHO_T}no" >&6
1711 fi
1712
1713   CC=$ac_ct_CC
1714 else
1715   CC="$ac_cv_prog_CC"
1716 fi
1717
1718 fi
1719 if test -z "$CC"; then
1720   # Extract the first word of "cc", so it can be a program name with args.
1721 set dummy cc; ac_word=$2
1722 echo "$as_me:$LINENO: checking for $ac_word" >&5
1723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1724 if test "${ac_cv_prog_CC+set}" = set; then
1725   echo $ECHO_N "(cached) $ECHO_C" >&6
1726 else
1727   if test -n "$CC"; then
1728   ac_cv_prog_CC="$CC" # Let the user override the test.
1729 else
1730   ac_prog_rejected=no
1731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1732 for as_dir in $PATH
1733 do
1734   IFS=$as_save_IFS
1735   test -z "$as_dir" && as_dir=.
1736   for ac_exec_ext in '' $ac_executable_extensions; do
1737   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1738     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1739        ac_prog_rejected=yes
1740        continue
1741      fi
1742     ac_cv_prog_CC="cc"
1743     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1744     break 2
1745   fi
1746 done
1747 done
1748
1749 if test $ac_prog_rejected = yes; then
1750   # We found a bogon in the path, so make sure we never use it.
1751   set dummy $ac_cv_prog_CC
1752   shift
1753   if test $# != 0; then
1754     # We chose a different compiler from the bogus one.
1755     # However, it has the same basename, so the bogon will be chosen
1756     # first if we set CC to just the basename; use the full file name.
1757     shift
1758     set dummy "$as_dir/$ac_word" ${1+"$@"}
1759     shift
1760     ac_cv_prog_CC="$@"
1761   fi
1762 fi
1763 fi
1764 fi
1765 CC=$ac_cv_prog_CC
1766 if test -n "$CC"; then
1767   echo "$as_me:$LINENO: result: $CC" >&5
1768 echo "${ECHO_T}$CC" >&6
1769 else
1770   echo "$as_me:$LINENO: result: no" >&5
1771 echo "${ECHO_T}no" >&6
1772 fi
1773
1774 fi
1775 if test -z "$CC"; then
1776   if test -n "$ac_tool_prefix"; then
1777   for ac_prog in cl
1778   do
1779     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1780 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1781 echo "$as_me:$LINENO: checking for $ac_word" >&5
1782 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1783 if test "${ac_cv_prog_CC+set}" = set; then
1784   echo $ECHO_N "(cached) $ECHO_C" >&6
1785 else
1786   if test -n "$CC"; then
1787   ac_cv_prog_CC="$CC" # Let the user override the test.
1788 else
1789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1790 for as_dir in $PATH
1791 do
1792   IFS=$as_save_IFS
1793   test -z "$as_dir" && as_dir=.
1794   for ac_exec_ext in '' $ac_executable_extensions; do
1795   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1796     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1797     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1798     break 2
1799   fi
1800 done
1801 done
1802
1803 fi
1804 fi
1805 CC=$ac_cv_prog_CC
1806 if test -n "$CC"; then
1807   echo "$as_me:$LINENO: result: $CC" >&5
1808 echo "${ECHO_T}$CC" >&6
1809 else
1810   echo "$as_me:$LINENO: result: no" >&5
1811 echo "${ECHO_T}no" >&6
1812 fi
1813
1814     test -n "$CC" && break
1815   done
1816 fi
1817 if test -z "$CC"; then
1818   ac_ct_CC=$CC
1819   for ac_prog in cl
1820 do
1821   # Extract the first word of "$ac_prog", so it can be a program name with args.
1822 set dummy $ac_prog; ac_word=$2
1823 echo "$as_me:$LINENO: checking for $ac_word" >&5
1824 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1825 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1826   echo $ECHO_N "(cached) $ECHO_C" >&6
1827 else
1828   if test -n "$ac_ct_CC"; then
1829   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1830 else
1831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1832 for as_dir in $PATH
1833 do
1834   IFS=$as_save_IFS
1835   test -z "$as_dir" && as_dir=.
1836   for ac_exec_ext in '' $ac_executable_extensions; do
1837   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1838     ac_cv_prog_ac_ct_CC="$ac_prog"
1839     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1840     break 2
1841   fi
1842 done
1843 done
1844
1845 fi
1846 fi
1847 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1848 if test -n "$ac_ct_CC"; then
1849   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1850 echo "${ECHO_T}$ac_ct_CC" >&6
1851 else
1852   echo "$as_me:$LINENO: result: no" >&5
1853 echo "${ECHO_T}no" >&6
1854 fi
1855
1856   test -n "$ac_ct_CC" && break
1857 done
1858
1859   CC=$ac_ct_CC
1860 fi
1861
1862 fi
1863
1864
1865 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1866 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1867    { (exit 1); exit 1; }; }
1868
1869 # Provide some information about the compiler.
1870 echo "$as_me:$LINENO:" \
1871      "checking for C compiler version" >&5
1872 ac_compiler=`set X $ac_compile; echo $2`
1873 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1874   (eval $ac_compiler --version </dev/null >&5) 2>&5
1875   ac_status=$?
1876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1877   (exit $ac_status); }
1878 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1879   (eval $ac_compiler -v </dev/null >&5) 2>&5
1880   ac_status=$?
1881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1882   (exit $ac_status); }
1883 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1884   (eval $ac_compiler -V </dev/null >&5) 2>&5
1885   ac_status=$?
1886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1887   (exit $ac_status); }
1888
1889 cat >conftest.$ac_ext <<_ACEOF
1890 #line $LINENO "configure"
1891 #include "confdefs.h"
1892
1893 #ifdef F77_DUMMY_MAIN
1894 #  ifdef __cplusplus
1895      extern "C"
1896 #  endif
1897    int F77_DUMMY_MAIN() { return 1; }
1898 #endif
1899 int
1900 main ()
1901 {
1902
1903   ;
1904   return 0;
1905 }
1906 _ACEOF
1907 ac_clean_files_save=$ac_clean_files
1908 ac_clean_files="$ac_clean_files a.out a.exe"
1909 # Try to create an executable without -o first, disregard a.out.
1910 # It will help us diagnose broken compilers, and finding out an intuition
1911 # of exeext.
1912 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1913 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1914 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1915 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1916   (eval $ac_link_default) 2>&5
1917   ac_status=$?
1918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1919   (exit $ac_status); }; then
1920   # Find the output, starting from the most likely.  This scheme is
1921 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1922 # resort.
1923
1924 # Be careful to initialize this variable, since it used to be cached.
1925 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1926 ac_cv_exeext=
1927 for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1928                 ls a.out conftest 2>/dev/null;
1929                 ls a.* conftest.* 2>/dev/null`; do
1930   case $ac_file in
1931     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1932     a.out ) # We found the default executable, but exeext='' is most
1933             # certainly right.
1934             break;;
1935     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1936           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1937           export ac_cv_exeext
1938           break;;
1939     * ) break;;
1940   esac
1941 done
1942 else
1943   echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
1946 echo "$as_me: error: C compiler cannot create executables" >&2;}
1947    { (exit 77); exit 77; }; }
1948 fi
1949
1950 ac_exeext=$ac_cv_exeext
1951 echo "$as_me:$LINENO: result: $ac_file" >&5
1952 echo "${ECHO_T}$ac_file" >&6
1953
1954 # Check the compiler produces executables we can run.  If not, either
1955 # the compiler is broken, or we cross compile.
1956 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1957 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1958 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1959 # If not cross compiling, check that we can run a simple program.
1960 if test "$cross_compiling" != yes; then
1961   if { ac_try='./$ac_file'
1962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967     cross_compiling=no
1968   else
1969     if test "$cross_compiling" = maybe; then
1970         cross_compiling=yes
1971     else
1972         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1973 If you meant to cross compile, use \`--host'." >&5
1974 echo "$as_me: error: cannot run C compiled programs.
1975 If you meant to cross compile, use \`--host'." >&2;}
1976    { (exit 1); exit 1; }; }
1977     fi
1978   fi
1979 fi
1980 echo "$as_me:$LINENO: result: yes" >&5
1981 echo "${ECHO_T}yes" >&6
1982
1983 rm -f a.out a.exe conftest$ac_cv_exeext
1984 ac_clean_files=$ac_clean_files_save
1985 # Check the compiler produces executables we can run.  If not, either
1986 # the compiler is broken, or we cross compile.
1987 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1988 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1989 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1990 echo "${ECHO_T}$cross_compiling" >&6
1991
1992 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1993 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1994 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1995   (eval $ac_link) 2>&5
1996   ac_status=$?
1997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1998   (exit $ac_status); }; then
1999   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2000 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2001 # work properly (i.e., refer to `conftest.exe'), while it won't with
2002 # `rm'.
2003 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2004   case $ac_file in
2005     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2006     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2007           export ac_cv_exeext
2008           break;;
2009     * ) break;;
2010   esac
2011 done
2012 else
2013   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2014 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2015    { (exit 1); exit 1; }; }
2016 fi
2017
2018 rm -f conftest$ac_cv_exeext
2019 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2020 echo "${ECHO_T}$ac_cv_exeext" >&6
2021
2022 rm -f conftest.$ac_ext
2023 EXEEXT=$ac_cv_exeext
2024 ac_exeext=$EXEEXT
2025 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2026 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2027 if test "${ac_cv_objext+set}" = set; then
2028   echo $ECHO_N "(cached) $ECHO_C" >&6
2029 else
2030   cat >conftest.$ac_ext <<_ACEOF
2031 #line $LINENO "configure"
2032 #include "confdefs.h"
2033
2034 #ifdef F77_DUMMY_MAIN
2035 #  ifdef __cplusplus
2036      extern "C"
2037 #  endif
2038    int F77_DUMMY_MAIN() { return 1; }
2039 #endif
2040 int
2041 main ()
2042 {
2043
2044   ;
2045   return 0;
2046 }
2047 _ACEOF
2048 rm -f conftest.o conftest.obj
2049 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2050   (eval $ac_compile) 2>&5
2051   ac_status=$?
2052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2053   (exit $ac_status); }; then
2054   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2055   case $ac_file in
2056     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2057     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2058        break;;
2059   esac
2060 done
2061 else
2062   echo "$as_me: failed program was:" >&5
2063 cat conftest.$ac_ext >&5
2064 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2065 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2066    { (exit 1); exit 1; }; }
2067 fi
2068
2069 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2070 fi
2071 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2072 echo "${ECHO_T}$ac_cv_objext" >&6
2073 OBJEXT=$ac_cv_objext
2074 ac_objext=$OBJEXT
2075 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2076 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2077 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2078   echo $ECHO_N "(cached) $ECHO_C" >&6
2079 else
2080   cat >conftest.$ac_ext <<_ACEOF
2081 #line $LINENO "configure"
2082 #include "confdefs.h"
2083
2084 #ifdef F77_DUMMY_MAIN
2085 #  ifdef __cplusplus
2086      extern "C"
2087 #  endif
2088    int F77_DUMMY_MAIN() { return 1; }
2089 #endif
2090 int
2091 main ()
2092 {
2093 #ifndef __GNUC__
2094        choke me
2095 #endif
2096
2097   ;
2098   return 0;
2099 }
2100 _ACEOF
2101 rm -f conftest.$ac_objext
2102 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2103   (eval $ac_compile) 2>&5
2104   ac_status=$?
2105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2106   (exit $ac_status); } &&
2107          { ac_try='test -s conftest.$ac_objext'
2108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2109   (eval $ac_try) 2>&5
2110   ac_status=$?
2111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2112   (exit $ac_status); }; }; then
2113   ac_compiler_gnu=yes
2114 else
2115   echo "$as_me: failed program was:" >&5
2116 cat conftest.$ac_ext >&5
2117 ac_compiler_gnu=no
2118 fi
2119 rm -f conftest.$ac_objext conftest.$ac_ext
2120 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2121
2122 fi
2123 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2124 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2125 GCC=`test $ac_compiler_gnu = yes && echo yes`
2126 ac_test_CFLAGS=${CFLAGS+set}
2127 ac_save_CFLAGS=$CFLAGS
2128 CFLAGS="-g"
2129 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2130 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2131 if test "${ac_cv_prog_cc_g+set}" = set; then
2132   echo $ECHO_N "(cached) $ECHO_C" >&6
2133 else
2134   cat >conftest.$ac_ext <<_ACEOF
2135 #line $LINENO "configure"
2136 #include "confdefs.h"
2137
2138 #ifdef F77_DUMMY_MAIN
2139 #  ifdef __cplusplus
2140      extern "C"
2141 #  endif
2142    int F77_DUMMY_MAIN() { return 1; }
2143 #endif
2144 int
2145 main ()
2146 {
2147
2148   ;
2149   return 0;
2150 }
2151 _ACEOF
2152 rm -f conftest.$ac_objext
2153 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2154   (eval $ac_compile) 2>&5
2155   ac_status=$?
2156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2157   (exit $ac_status); } &&
2158          { ac_try='test -s conftest.$ac_objext'
2159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2160   (eval $ac_try) 2>&5
2161   ac_status=$?
2162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2163   (exit $ac_status); }; }; then
2164   ac_cv_prog_cc_g=yes
2165 else
2166   echo "$as_me: failed program was:" >&5
2167 cat conftest.$ac_ext >&5
2168 ac_cv_prog_cc_g=no
2169 fi
2170 rm -f conftest.$ac_objext conftest.$ac_ext
2171 fi
2172 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2173 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2174 if test "$ac_test_CFLAGS" = set; then
2175   CFLAGS=$ac_save_CFLAGS
2176 elif test $ac_cv_prog_cc_g = yes; then
2177   if test "$GCC" = yes; then
2178     CFLAGS="-g -O2"
2179   else
2180     CFLAGS="-g"
2181   fi
2182 else
2183   if test "$GCC" = yes; then
2184     CFLAGS="-O2"
2185   else
2186     CFLAGS=
2187   fi
2188 fi
2189 # Some people use a C++ compiler to compile C.  Since we use `exit',
2190 # in C++ we need to declare it.  In case someone uses the same compiler
2191 # for both compiling C and C++ we need to have the C++ compiler decide
2192 # the declaration of exit, since it's the most demanding environment.
2193 cat >conftest.$ac_ext <<_ACEOF
2194 #ifndef __cplusplus
2195   choke me
2196 #endif
2197 _ACEOF
2198 rm -f conftest.$ac_objext
2199 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2200   (eval $ac_compile) 2>&5
2201   ac_status=$?
2202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2203   (exit $ac_status); } &&
2204          { ac_try='test -s conftest.$ac_objext'
2205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2206   (eval $ac_try) 2>&5
2207   ac_status=$?
2208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2209   (exit $ac_status); }; }; then
2210   for ac_declaration in \
2211    ''\
2212    '#include <stdlib.h>' \
2213    'extern "C" void std::exit (int) throw (); using std::exit;' \
2214    'extern "C" void std::exit (int); using std::exit;' \
2215    'extern "C" void exit (int) throw ();' \
2216    'extern "C" void exit (int);' \
2217    'void exit (int);'
2218 do
2219   cat >conftest.$ac_ext <<_ACEOF
2220 #line $LINENO "configure"
2221 #include "confdefs.h"
2222 #include <stdlib.h>
2223 $ac_declaration
2224 #ifdef F77_DUMMY_MAIN
2225 #  ifdef __cplusplus
2226      extern "C"
2227 #  endif
2228    int F77_DUMMY_MAIN() { return 1; }
2229 #endif
2230 int
2231 main ()
2232 {
2233 exit (42);
2234   ;
2235   return 0;
2236 }
2237 _ACEOF
2238 rm -f conftest.$ac_objext
2239 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2240   (eval $ac_compile) 2>&5
2241   ac_status=$?
2242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2243   (exit $ac_status); } &&
2244          { ac_try='test -s conftest.$ac_objext'
2245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2246   (eval $ac_try) 2>&5
2247   ac_status=$?
2248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2249   (exit $ac_status); }; }; then
2250   :
2251 else
2252   echo "$as_me: failed program was:" >&5
2253 cat conftest.$ac_ext >&5
2254 continue
2255 fi
2256 rm -f conftest.$ac_objext conftest.$ac_ext
2257   cat >conftest.$ac_ext <<_ACEOF
2258 #line $LINENO "configure"
2259 #include "confdefs.h"
2260 $ac_declaration
2261 #ifdef F77_DUMMY_MAIN
2262 #  ifdef __cplusplus
2263      extern "C"
2264 #  endif
2265    int F77_DUMMY_MAIN() { return 1; }
2266 #endif
2267 int
2268 main ()
2269 {
2270 exit (42);
2271   ;
2272   return 0;
2273 }
2274 _ACEOF
2275 rm -f conftest.$ac_objext
2276 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2277   (eval $ac_compile) 2>&5
2278   ac_status=$?
2279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2280   (exit $ac_status); } &&
2281          { ac_try='test -s conftest.$ac_objext'
2282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2283   (eval $ac_try) 2>&5
2284   ac_status=$?
2285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2286   (exit $ac_status); }; }; then
2287   break
2288 else
2289   echo "$as_me: failed program was:" >&5
2290 cat conftest.$ac_ext >&5
2291 fi
2292 rm -f conftest.$ac_objext conftest.$ac_ext
2293 done
2294 rm -f conftest*
2295 if test -n "$ac_declaration"; then
2296   echo '#ifdef __cplusplus' >>confdefs.h
2297   echo $ac_declaration      >>confdefs.h
2298   echo '#endif'             >>confdefs.h
2299 fi
2300
2301 else
2302   echo "$as_me: failed program was:" >&5
2303 cat conftest.$ac_ext >&5
2304 fi
2305 rm -f conftest.$ac_objext conftest.$ac_ext
2306 ac_ext=c
2307 ac_cpp='$CPP $CPPFLAGS'
2308 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2309 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2310 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2311
2312
2313   if test -z "$GCC"; then
2314     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2315 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2316     case "$host" in
2317       *-hpux* )
2318         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2319 echo "${ECHO_T}HPUX: adding -Ae" >&6
2320         CC="$CC -Ae"
2321       ;;
2322       *-aix* )
2323         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2324 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2325         CC="$CC -qlanglvl=ansi -qhalt=e"
2326       ;;
2327
2328       *-dec-* )
2329         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2330 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2331         CC="$CC -std1"
2332       ;;
2333
2334       *)
2335         echo "$as_me:$LINENO: result: no idea" >&5
2336 echo "${ECHO_T}no idea" >&6
2337       ;;
2338     esac
2339   fi
2340
2341   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2342 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2343   if test "$cross_compiling" = yes; then
2344   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2345 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2346    { (exit 1); exit 1; }; }
2347 else
2348   cat >conftest.$ac_ext <<_ACEOF
2349 #line $LINENO "configure"
2350 #include "confdefs.h"
2351  main(int ac, char **av) { return 0; }
2352 _ACEOF
2353 rm -f conftest$ac_exeext
2354 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2355   (eval $ac_link) 2>&5
2356   ac_status=$?
2357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2358   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2360   (eval $ac_try) 2>&5
2361   ac_status=$?
2362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2363   (exit $ac_status); }; }; then
2364   echo "$as_me:$LINENO: result: yes" >&5
2365 echo "${ECHO_T}yes" >&6
2366 else
2367   echo "$as_me: program exited with status $ac_status" >&5
2368 echo "$as_me: failed program was:" >&5
2369 cat conftest.$ac_ext >&5
2370 ( exit $ac_status )
2371 echo "$as_me:$LINENO: result: no" >&5
2372 echo "${ECHO_T}no" >&6
2373      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2374 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2375    { (exit 1); exit 1; }; }
2376 fi
2377 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2378 fi
2379
2380   if test -n "$GCC"; then
2381     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2382 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2383     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs"
2384     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
2385     # and then perhaps we can do without -pedantic?
2386   else
2387     case "$host" in
2388       *-irix5* |*-irix6.0-3* )
2389         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2390 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2391         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2392       ;;
2393 #     *-dec-osf* )
2394 #       if test -z "$GCC"; then
2395 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2396 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2397 #       fi
2398 #     ;;
2399     esac
2400   fi
2401
2402 if test -n "$GCC"; then
2403    if test -n "$GCC"; then
2404    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2405 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2406 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2407   echo $ECHO_N "(cached) $ECHO_C" >&6
2408 else
2409   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2410           grep unrecognized >/dev/null ); then
2411        ac_cv_gcc_accepts_std=no
2412      else
2413        ac_cv_gcc_accepts_std=yes
2414      fi
2415 fi
2416 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2417 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2418    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2419   fi
2420
2421    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2422 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2423    #
2424    # The reason that // comments are banned from xscreensaver is that gcc is
2425    # basically the only compiler in the world that supports them in C code.
2426    # All other vendors support them only in their C++ compilers, not in their
2427    # ANSI C compilers.  This means that it's a portability problem: every time
2428    # these comments have snuck into the xscreensaver source code, I've gotten
2429    # complaints about it the next day.  So we turn off support for them in gcc
2430    # as well to prevent them from accidentially slipping in.
2431    #
2432    if test "$ac_gcc_accepts_std" = yes ; then
2433      #
2434      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2435      # (That appears to be the only additional preprocessor symbol
2436      # it defines, in addition to the syntax changes it makes.)
2437      #
2438      # -std=gnu89 is no good, because // comments were a GNU extension
2439      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2440      # with -std=gnu89 but not with -std=c89.)
2441      #
2442      CC="$CC -std=c89 -U__STRICT_ANSI__"
2443    else
2444      # The old way:
2445      CC="$CC -Wp,-lang-c89"
2446    fi
2447   fi
2448
2449 if test -n "$GCC"; then
2450    if test -n "$GCC"; then
2451    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2452 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2453 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2454   echo $ECHO_N "(cached) $ECHO_C" >&6
2455 else
2456   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2457           grep unrecognized >/dev/null ); then
2458        ac_cv_gcc_accepts_no_cpp_precomp=no
2459      else
2460        ac_cv_gcc_accepts_no_cpp_precomp=yes
2461      fi
2462 fi
2463 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2464 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2465    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2466   fi
2467
2468    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2469      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2470 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2471      CC="$CC -no-cpp-precomp"
2472    fi
2473   fi
2474
2475 ac_ext=c
2476 ac_cpp='$CPP $CPPFLAGS'
2477 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2478 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2479 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2480 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2481 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2482 # On Suns, sometimes $CPP names a directory.
2483 if test -n "$CPP" && test -d "$CPP"; then
2484   CPP=
2485 fi
2486 if test -z "$CPP"; then
2487   if test "${ac_cv_prog_CPP+set}" = set; then
2488   echo $ECHO_N "(cached) $ECHO_C" >&6
2489 else
2490       # Double quotes because CPP needs to be expanded
2491     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2492     do
2493       ac_preproc_ok=false
2494 for ac_c_preproc_warn_flag in '' yes
2495 do
2496   # Use a header file that comes with gcc, so configuring glibc
2497   # with a fresh cross-compiler works.
2498   # On the NeXT, cc -E runs the code through the compiler's parser,
2499   # not just through cpp. "Syntax error" is here to catch this case.
2500   cat >conftest.$ac_ext <<_ACEOF
2501 #line $LINENO "configure"
2502 #include "confdefs.h"
2503 #include <assert.h>
2504                      Syntax error
2505 _ACEOF
2506 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2507   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2508   ac_status=$?
2509   egrep -v '^ *\+' conftest.er1 >conftest.err
2510   rm -f conftest.er1
2511   cat conftest.err >&5
2512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2513   (exit $ac_status); } >/dev/null; then
2514   if test -s conftest.err; then
2515     ac_cpp_err=$ac_c_preproc_warn_flag
2516   else
2517     ac_cpp_err=
2518   fi
2519 else
2520   ac_cpp_err=yes
2521 fi
2522 if test -z "$ac_cpp_err"; then
2523   :
2524 else
2525   echo "$as_me: failed program was:" >&5
2526   cat conftest.$ac_ext >&5
2527   # Broken: fails on valid input.
2528 continue
2529 fi
2530 rm -f conftest.err conftest.$ac_ext
2531
2532   # OK, works on sane cases.  Now check whether non-existent headers
2533   # can be detected and how.
2534   cat >conftest.$ac_ext <<_ACEOF
2535 #line $LINENO "configure"
2536 #include "confdefs.h"
2537 #include <ac_nonexistent.h>
2538 _ACEOF
2539 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2540   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2541   ac_status=$?
2542   egrep -v '^ *\+' conftest.er1 >conftest.err
2543   rm -f conftest.er1
2544   cat conftest.err >&5
2545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2546   (exit $ac_status); } >/dev/null; then
2547   if test -s conftest.err; then
2548     ac_cpp_err=$ac_c_preproc_warn_flag
2549   else
2550     ac_cpp_err=
2551   fi
2552 else
2553   ac_cpp_err=yes
2554 fi
2555 if test -z "$ac_cpp_err"; then
2556   # Broken: success on invalid input.
2557 continue
2558 else
2559   echo "$as_me: failed program was:" >&5
2560   cat conftest.$ac_ext >&5
2561   # Passes both tests.
2562 ac_preproc_ok=:
2563 break
2564 fi
2565 rm -f conftest.err conftest.$ac_ext
2566
2567 done
2568 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2569 rm -f conftest.err conftest.$ac_ext
2570 if $ac_preproc_ok; then
2571   break
2572 fi
2573
2574     done
2575     ac_cv_prog_CPP=$CPP
2576
2577 fi
2578   CPP=$ac_cv_prog_CPP
2579 else
2580   ac_cv_prog_CPP=$CPP
2581 fi
2582 echo "$as_me:$LINENO: result: $CPP" >&5
2583 echo "${ECHO_T}$CPP" >&6
2584 ac_preproc_ok=false
2585 for ac_c_preproc_warn_flag in '' yes
2586 do
2587   # Use a header file that comes with gcc, so configuring glibc
2588   # with a fresh cross-compiler works.
2589   # On the NeXT, cc -E runs the code through the compiler's parser,
2590   # not just through cpp. "Syntax error" is here to catch this case.
2591   cat >conftest.$ac_ext <<_ACEOF
2592 #line $LINENO "configure"
2593 #include "confdefs.h"
2594 #include <assert.h>
2595                      Syntax error
2596 _ACEOF
2597 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2598   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2599   ac_status=$?
2600   egrep -v '^ *\+' conftest.er1 >conftest.err
2601   rm -f conftest.er1
2602   cat conftest.err >&5
2603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2604   (exit $ac_status); } >/dev/null; then
2605   if test -s conftest.err; then
2606     ac_cpp_err=$ac_c_preproc_warn_flag
2607   else
2608     ac_cpp_err=
2609   fi
2610 else
2611   ac_cpp_err=yes
2612 fi
2613 if test -z "$ac_cpp_err"; then
2614   :
2615 else
2616   echo "$as_me: failed program was:" >&5
2617   cat conftest.$ac_ext >&5
2618   # Broken: fails on valid input.
2619 continue
2620 fi
2621 rm -f conftest.err conftest.$ac_ext
2622
2623   # OK, works on sane cases.  Now check whether non-existent headers
2624   # can be detected and how.
2625   cat >conftest.$ac_ext <<_ACEOF
2626 #line $LINENO "configure"
2627 #include "confdefs.h"
2628 #include <ac_nonexistent.h>
2629 _ACEOF
2630 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2631   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2632   ac_status=$?
2633   egrep -v '^ *\+' conftest.er1 >conftest.err
2634   rm -f conftest.er1
2635   cat conftest.err >&5
2636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2637   (exit $ac_status); } >/dev/null; then
2638   if test -s conftest.err; then
2639     ac_cpp_err=$ac_c_preproc_warn_flag
2640   else
2641     ac_cpp_err=
2642   fi
2643 else
2644   ac_cpp_err=yes
2645 fi
2646 if test -z "$ac_cpp_err"; then
2647   # Broken: success on invalid input.
2648 continue
2649 else
2650   echo "$as_me: failed program was:" >&5
2651   cat conftest.$ac_ext >&5
2652   # Passes both tests.
2653 ac_preproc_ok=:
2654 break
2655 fi
2656 rm -f conftest.err conftest.$ac_ext
2657
2658 done
2659 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2660 rm -f conftest.err conftest.$ac_ext
2661 if $ac_preproc_ok; then
2662   :
2663 else
2664   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2665 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2666    { (exit 1); exit 1; }; }
2667 fi
2668
2669 ac_ext=c
2670 ac_cpp='$CPP $CPPFLAGS'
2671 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2672 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2673 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2674
2675 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2676 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2677 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2678   echo $ECHO_N "(cached) $ECHO_C" >&6
2679 else
2680   ac_cv_prog_cc_stdc=no
2681 ac_save_CC=$CC
2682 cat >conftest.$ac_ext <<_ACEOF
2683 #line $LINENO "configure"
2684 #include "confdefs.h"
2685 #include <stdarg.h>
2686 #include <stdio.h>
2687 #include <sys/types.h>
2688 #include <sys/stat.h>
2689 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2690 struct buf { int x; };
2691 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2692 static char *e (p, i)
2693      char **p;
2694      int i;
2695 {
2696   return p[i];
2697 }
2698 static char *f (char * (*g) (char **, int), char **p, ...)
2699 {
2700   char *s;
2701   va_list v;
2702   va_start (v,p);
2703   s = g (p, va_arg (v,int));
2704   va_end (v);
2705   return s;
2706 }
2707 int test (int i, double x);
2708 struct s1 {int (*f) (int a);};
2709 struct s2 {int (*f) (double a);};
2710 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2711 int argc;
2712 char **argv;
2713 #ifdef F77_DUMMY_MAIN
2714 #  ifdef __cplusplus
2715      extern "C"
2716 #  endif
2717    int F77_DUMMY_MAIN() { return 1; }
2718 #endif
2719 int
2720 main ()
2721 {
2722 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2723   ;
2724   return 0;
2725 }
2726 _ACEOF
2727 # Don't try gcc -ansi; that turns off useful extensions and
2728 # breaks some systems' header files.
2729 # AIX                   -qlanglvl=ansi
2730 # Ultrix and OSF/1      -std1
2731 # HP-UX 10.20 and later -Ae
2732 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2733 # SVR4                  -Xc -D__EXTENSIONS__
2734 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2735 do
2736   CC="$ac_save_CC $ac_arg"
2737   rm -f conftest.$ac_objext
2738 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2739   (eval $ac_compile) 2>&5
2740   ac_status=$?
2741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2742   (exit $ac_status); } &&
2743          { ac_try='test -s conftest.$ac_objext'
2744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2745   (eval $ac_try) 2>&5
2746   ac_status=$?
2747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2748   (exit $ac_status); }; }; then
2749   ac_cv_prog_cc_stdc=$ac_arg
2750 break
2751 else
2752   echo "$as_me: failed program was:" >&5
2753 cat conftest.$ac_ext >&5
2754 fi
2755 rm -f conftest.$ac_objext
2756 done
2757 rm -f conftest.$ac_ext conftest.$ac_objext
2758 CC=$ac_save_CC
2759
2760 fi
2761
2762 case "x$ac_cv_prog_cc_stdc" in
2763   x|xno)
2764     echo "$as_me:$LINENO: result: none needed" >&5
2765 echo "${ECHO_T}none needed" >&6 ;;
2766   *)
2767     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2768 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2769     CC="$CC $ac_cv_prog_cc_stdc" ;;
2770 esac
2771
2772 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2773 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2774 if test "${ac_cv_c_const+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777   cat >conftest.$ac_ext <<_ACEOF
2778 #line $LINENO "configure"
2779 #include "confdefs.h"
2780
2781 #ifdef F77_DUMMY_MAIN
2782 #  ifdef __cplusplus
2783      extern "C"
2784 #  endif
2785    int F77_DUMMY_MAIN() { return 1; }
2786 #endif
2787 int
2788 main ()
2789 {
2790 /* FIXME: Include the comments suggested by Paul. */
2791 #ifndef __cplusplus
2792   /* Ultrix mips cc rejects this.  */
2793   typedef int charset[2];
2794   const charset x;
2795   /* SunOS 4.1.1 cc rejects this.  */
2796   char const *const *ccp;
2797   char **p;
2798   /* NEC SVR4.0.2 mips cc rejects this.  */
2799   struct point {int x, y;};
2800   static struct point const zero = {0,0};
2801   /* AIX XL C 1.02.0.0 rejects this.
2802      It does not let you subtract one const X* pointer from another in
2803      an arm of an if-expression whose if-part is not a constant
2804      expression */
2805   const char *g = "string";
2806   ccp = &g + (g ? g-g : 0);
2807   /* HPUX 7.0 cc rejects these. */
2808   ++ccp;
2809   p = (char**) ccp;
2810   ccp = (char const *const *) p;
2811   { /* SCO 3.2v4 cc rejects this.  */
2812     char *t;
2813     char const *s = 0 ? (char *) 0 : (char const *) 0;
2814
2815     *t++ = 0;
2816   }
2817   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2818     int x[] = {25, 17};
2819     const int *foo = &x[0];
2820     ++foo;
2821   }
2822   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2823     typedef const int *iptr;
2824     iptr p = 0;
2825     ++p;
2826   }
2827   { /* AIX XL C 1.02.0.0 rejects this saying
2828        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2829     struct s { int j; const int *ap[3]; };
2830     struct s *b; b->j = 5;
2831   }
2832   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2833     const int foo = 10;
2834   }
2835 #endif
2836
2837   ;
2838   return 0;
2839 }
2840 _ACEOF
2841 rm -f conftest.$ac_objext
2842 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2843   (eval $ac_compile) 2>&5
2844   ac_status=$?
2845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2846   (exit $ac_status); } &&
2847          { ac_try='test -s conftest.$ac_objext'
2848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2849   (eval $ac_try) 2>&5
2850   ac_status=$?
2851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2852   (exit $ac_status); }; }; then
2853   ac_cv_c_const=yes
2854 else
2855   echo "$as_me: failed program was:" >&5
2856 cat conftest.$ac_ext >&5
2857 ac_cv_c_const=no
2858 fi
2859 rm -f conftest.$ac_objext conftest.$ac_ext
2860 fi
2861 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2862 echo "${ECHO_T}$ac_cv_c_const" >&6
2863 if test $ac_cv_c_const = no; then
2864
2865 cat >>confdefs.h <<\_ACEOF
2866 #define const
2867 _ACEOF
2868
2869 fi
2870
2871 echo "$as_me:$LINENO: checking for inline" >&5
2872 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2873 if test "${ac_cv_c_inline+set}" = set; then
2874   echo $ECHO_N "(cached) $ECHO_C" >&6
2875 else
2876   ac_cv_c_inline=no
2877 for ac_kw in inline __inline__ __inline; do
2878   cat >conftest.$ac_ext <<_ACEOF
2879 #line $LINENO "configure"
2880 #include "confdefs.h"
2881 #ifndef __cplusplus
2882 static $ac_kw int static_foo () {return 0; }
2883 $ac_kw int foo () {return 0; }
2884 #endif
2885
2886 _ACEOF
2887 rm -f conftest.$ac_objext
2888 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2889   (eval $ac_compile) 2>&5
2890   ac_status=$?
2891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2892   (exit $ac_status); } &&
2893          { ac_try='test -s conftest.$ac_objext'
2894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2895   (eval $ac_try) 2>&5
2896   ac_status=$?
2897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898   (exit $ac_status); }; }; then
2899   ac_cv_c_inline=$ac_kw; break
2900 else
2901   echo "$as_me: failed program was:" >&5
2902 cat conftest.$ac_ext >&5
2903 fi
2904 rm -f conftest.$ac_objext conftest.$ac_ext
2905 done
2906
2907 fi
2908 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2909 echo "${ECHO_T}$ac_cv_c_inline" >&6
2910 case $ac_cv_c_inline in
2911   inline | yes) ;;
2912   no)
2913 cat >>confdefs.h <<\_ACEOF
2914 #define inline
2915 _ACEOF
2916  ;;
2917   *)  cat >>confdefs.h <<_ACEOF
2918 #define inline $ac_cv_c_inline
2919 _ACEOF
2920  ;;
2921 esac
2922
2923
2924 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
2925   echo "$as_me:$LINENO: checking for bc" >&5
2926 echo $ECHO_N "checking for bc... $ECHO_C" >&6
2927   if test "$ac_bc_result" = "15" ; then
2928     echo "$as_me:$LINENO: result: yes" >&5
2929 echo "${ECHO_T}yes" >&6
2930   else
2931     echo "$as_me:$LINENO: result: no" >&5
2932 echo "${ECHO_T}no" >&6
2933     echo ''
2934     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
2935                   part of Unix since the 1970s.  Come back when your vendor
2936                   has grown a clue." >&5
2937 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
2938                   part of Unix since the 1970s.  Come back when your vendor
2939                   has grown a clue." >&2;}
2940    { (exit 1); exit 1; }; }
2941   fi
2942
2943
2944 # stuff for Makefiles
2945 # Find a good install program.  We prefer a C program (faster),
2946 # so one script is as good as another.  But avoid the broken or
2947 # incompatible versions:
2948 # SysV /etc/install, /usr/sbin/install
2949 # SunOS /usr/etc/install
2950 # IRIX /sbin/install
2951 # AIX /bin/install
2952 # AmigaOS /C/install, which installs bootblocks on floppy discs
2953 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2954 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2955 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2956 # ./install, which can be erroneously created by make from ./install.sh.
2957 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2958 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2959 if test -z "$INSTALL"; then
2960 if test "${ac_cv_path_install+set}" = set; then
2961   echo $ECHO_N "(cached) $ECHO_C" >&6
2962 else
2963   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2964 for as_dir in $PATH
2965 do
2966   IFS=$as_save_IFS
2967   test -z "$as_dir" && as_dir=.
2968   # Account for people who put trailing slashes in PATH elements.
2969 case $as_dir/ in
2970   ./ | .// | /cC/* | \
2971   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2972   /usr/ucb/* ) ;;
2973   *)
2974     # OSF1 and SCO ODT 3.0 have their own names for install.
2975     # Don't use installbsd from OSF since it installs stuff as root
2976     # by default.
2977     for ac_prog in ginstall scoinst install; do
2978       for ac_exec_ext in '' $ac_executable_extensions; do
2979         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2980           if test $ac_prog = install &&
2981             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2982             # AIX install.  It has an incompatible calling convention.
2983             :
2984           elif test $ac_prog = install &&
2985             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2986             # program-specific install script used by HP pwplus--don't use.
2987             :
2988           else
2989             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2990             break 3
2991           fi
2992         fi
2993       done
2994     done
2995     ;;
2996 esac
2997 done
2998
2999
3000 fi
3001   if test "${ac_cv_path_install+set}" = set; then
3002     INSTALL=$ac_cv_path_install
3003   else
3004     # As a last resort, use the slow shell script.  We don't cache a
3005     # path for INSTALL within a source directory, because that will
3006     # break other packages using the cache if that directory is
3007     # removed, or if the path is relative.
3008     INSTALL=$ac_install_sh
3009   fi
3010 fi
3011 echo "$as_me:$LINENO: result: $INSTALL" >&5
3012 echo "${ECHO_T}$INSTALL" >&6
3013
3014 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3015 # It thinks the first close brace ends the variable substitution.
3016 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3017
3018 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3019
3020 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3021
3022 echo "$as_me:$LINENO: checking whether \\"\${INSTALL} -d\\" creates intermediate directories" >&5
3023 echo $ECHO_N "checking whether \\"\${INSTALL} -d\\" creates intermediate directories... $ECHO_C" >&6
3024 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3025   echo $ECHO_N "(cached) $ECHO_C" >&6
3026 else
3027   ac_cv_install_d_creates_dirs=no
3028      rm -rf conftestdir
3029      if mkdir conftestdir; then
3030        cd conftestdir 2>/dev/null
3031        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3032        if test -d dir1/dir2/. ; then
3033          ac_cv_install_d_creates_dirs=yes
3034        fi
3035        cd .. 2>/dev/null
3036        rm -rf conftestdir
3037      fi
3038
3039 fi
3040 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3041 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3042
3043   if test "$ac_cv_install_d_creates_dirs" = no ; then
3044     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3045 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3046 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3047   echo $ECHO_N "(cached) $ECHO_C" >&6
3048 else
3049   ac_cv_mkdir_p_creates_dirs=no
3050        rm -rf conftestdir
3051        if mkdir conftestdir; then
3052          cd conftestdir 2>/dev/null
3053          mkdir -p dir1/dir2 >/dev/null 2>&1
3054          if test -d dir1/dir2/. ; then
3055            ac_cv_mkdir_p_creates_dirs=yes
3056          fi
3057          cd .. 2>/dev/null
3058          rm -rf conftestdir
3059        fi
3060
3061 fi
3062 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3063 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3064   fi
3065
3066   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3067     INSTALL_DIRS='${INSTALL} -d'
3068   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3069     INSTALL_DIRS='mkdir -p'
3070   else
3071     # any other ideas?
3072     INSTALL_DIRS='${INSTALL} -d'
3073   fi
3074
3075 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
3076 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3077 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3078 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3079   echo $ECHO_N "(cached) $ECHO_C" >&6
3080 else
3081   cat >conftest.make <<\_ACEOF
3082 all:
3083         @echo 'ac_maketemp="${MAKE}"'
3084 _ACEOF
3085 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3086 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3087 if test -n "$ac_maketemp"; then
3088   eval ac_cv_prog_make_${ac_make}_set=yes
3089 else
3090   eval ac_cv_prog_make_${ac_make}_set=no
3091 fi
3092 rm -f conftest.make
3093 fi
3094 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3095   echo "$as_me:$LINENO: result: yes" >&5
3096 echo "${ECHO_T}yes" >&6
3097   SET_MAKE=
3098 else
3099   echo "$as_me:$LINENO: result: no" >&5
3100 echo "${ECHO_T}no" >&6
3101   SET_MAKE="MAKE=${MAKE-make}"
3102 fi
3103
3104
3105 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3106 # That's wrong: it should be set to '${INSTALL}', so that one can
3107 # implement the "install-strip" target properly (strip executables,
3108 # but do not try to strip scripts.)
3109 #
3110 INSTALL_SCRIPT='${INSTALL}'
3111
3112 # random libc stuff
3113
3114 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3115 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3116 if test "${ac_cv_header_stdc+set}" = set; then
3117   echo $ECHO_N "(cached) $ECHO_C" >&6
3118 else
3119   cat >conftest.$ac_ext <<_ACEOF
3120 #line $LINENO "configure"
3121 #include "confdefs.h"
3122 #include <stdlib.h>
3123 #include <stdarg.h>
3124 #include <string.h>
3125 #include <float.h>
3126
3127 _ACEOF
3128 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3129   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3130   ac_status=$?
3131   egrep -v '^ *\+' conftest.er1 >conftest.err
3132   rm -f conftest.er1
3133   cat conftest.err >&5
3134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3135   (exit $ac_status); } >/dev/null; then
3136   if test -s conftest.err; then
3137     ac_cpp_err=$ac_c_preproc_warn_flag
3138   else
3139     ac_cpp_err=
3140   fi
3141 else
3142   ac_cpp_err=yes
3143 fi
3144 if test -z "$ac_cpp_err"; then
3145   ac_cv_header_stdc=yes
3146 else
3147   echo "$as_me: failed program was:" >&5
3148   cat conftest.$ac_ext >&5
3149   ac_cv_header_stdc=no
3150 fi
3151 rm -f conftest.err conftest.$ac_ext
3152
3153 if test $ac_cv_header_stdc = yes; then
3154   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3155   cat >conftest.$ac_ext <<_ACEOF
3156 #line $LINENO "configure"
3157 #include "confdefs.h"
3158 #include <string.h>
3159
3160 _ACEOF
3161 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3162   egrep "memchr" >/dev/null 2>&1; then
3163   :
3164 else
3165   ac_cv_header_stdc=no
3166 fi
3167 rm -f conftest*
3168
3169 fi
3170
3171 if test $ac_cv_header_stdc = yes; then
3172   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3173   cat >conftest.$ac_ext <<_ACEOF
3174 #line $LINENO "configure"
3175 #include "confdefs.h"
3176 #include <stdlib.h>
3177
3178 _ACEOF
3179 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3180   egrep "free" >/dev/null 2>&1; then
3181   :
3182 else
3183   ac_cv_header_stdc=no
3184 fi
3185 rm -f conftest*
3186
3187 fi
3188
3189 if test $ac_cv_header_stdc = yes; then
3190   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3191   if test "$cross_compiling" = yes; then
3192   :
3193 else
3194   cat >conftest.$ac_ext <<_ACEOF
3195 #line $LINENO "configure"
3196 #include "confdefs.h"
3197 #include <ctype.h>
3198 #if ((' ' & 0x0FF) == 0x020)
3199 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3200 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3201 #else
3202 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3203                      || ('j' <= (c) && (c) <= 'r') \
3204                      || ('s' <= (c) && (c) <= 'z'))
3205 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3206 #endif
3207
3208 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3209 int
3210 main ()
3211 {
3212   int i;
3213   for (i = 0; i < 256; i++)
3214     if (XOR (islower (i), ISLOWER (i))
3215         || toupper (i) != TOUPPER (i))
3216       exit(2);
3217   exit (0);
3218 }
3219 _ACEOF
3220 rm -f conftest$ac_exeext
3221 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3222   (eval $ac_link) 2>&5
3223   ac_status=$?
3224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3225   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3227   (eval $ac_try) 2>&5
3228   ac_status=$?
3229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3230   (exit $ac_status); }; }; then
3231   :
3232 else
3233   echo "$as_me: program exited with status $ac_status" >&5
3234 echo "$as_me: failed program was:" >&5
3235 cat conftest.$ac_ext >&5
3236 ( exit $ac_status )
3237 ac_cv_header_stdc=no
3238 fi
3239 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3240 fi
3241 fi
3242 fi
3243 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3244 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3245 if test $ac_cv_header_stdc = yes; then
3246
3247 cat >>confdefs.h <<\_ACEOF
3248 #define STDC_HEADERS 1
3249 _ACEOF
3250
3251 fi
3252
3253 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3264                   inttypes.h stdint.h unistd.h
3265 do
3266 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3267 echo "$as_me:$LINENO: checking for $ac_header" >&5
3268 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3269 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3270   echo $ECHO_N "(cached) $ECHO_C" >&6
3271 else
3272   cat >conftest.$ac_ext <<_ACEOF
3273 #line $LINENO "configure"
3274 #include "confdefs.h"
3275 $ac_includes_default
3276
3277 #include <$ac_header>
3278 _ACEOF
3279 rm -f conftest.$ac_objext
3280 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3281   (eval $ac_compile) 2>&5
3282   ac_status=$?
3283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3284   (exit $ac_status); } &&
3285          { ac_try='test -s conftest.$ac_objext'
3286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3287   (eval $ac_try) 2>&5
3288   ac_status=$?
3289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3290   (exit $ac_status); }; }; then
3291   eval "$as_ac_Header=yes"
3292 else
3293   echo "$as_me: failed program was:" >&5
3294 cat conftest.$ac_ext >&5
3295 eval "$as_ac_Header=no"
3296 fi
3297 rm -f conftest.$ac_objext conftest.$ac_ext
3298 fi
3299 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3300 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3301 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3302   cat >>confdefs.h <<_ACEOF
3303 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3304 _ACEOF
3305
3306 fi
3307
3308 done
3309
3310
3311
3312 for ac_header in unistd.h
3313 do
3314 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3316   echo "$as_me:$LINENO: checking for $ac_header" >&5
3317 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3318 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3319   echo $ECHO_N "(cached) $ECHO_C" >&6
3320 fi
3321 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3322 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3323 else
3324   # Is the header compilable?
3325 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3326 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3327 cat >conftest.$ac_ext <<_ACEOF
3328 #line $LINENO "configure"
3329 #include "confdefs.h"
3330 $ac_includes_default
3331 #include <$ac_header>
3332 _ACEOF
3333 rm -f conftest.$ac_objext
3334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3335   (eval $ac_compile) 2>&5
3336   ac_status=$?
3337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3338   (exit $ac_status); } &&
3339          { ac_try='test -s conftest.$ac_objext'
3340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3341   (eval $ac_try) 2>&5
3342   ac_status=$?
3343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3344   (exit $ac_status); }; }; then
3345   ac_header_compiler=yes
3346 else
3347   echo "$as_me: failed program was:" >&5
3348 cat conftest.$ac_ext >&5
3349 ac_header_compiler=no
3350 fi
3351 rm -f conftest.$ac_objext conftest.$ac_ext
3352 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3353 echo "${ECHO_T}$ac_header_compiler" >&6
3354
3355 # Is the header present?
3356 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3357 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3358 cat >conftest.$ac_ext <<_ACEOF
3359 #line $LINENO "configure"
3360 #include "confdefs.h"
3361 #include <$ac_header>
3362 _ACEOF
3363 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3364   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3365   ac_status=$?
3366   egrep -v '^ *\+' conftest.er1 >conftest.err
3367   rm -f conftest.er1
3368   cat conftest.err >&5
3369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3370   (exit $ac_status); } >/dev/null; then
3371   if test -s conftest.err; then
3372     ac_cpp_err=$ac_c_preproc_warn_flag
3373   else
3374     ac_cpp_err=
3375   fi
3376 else
3377   ac_cpp_err=yes
3378 fi
3379 if test -z "$ac_cpp_err"; then
3380   ac_header_preproc=yes
3381 else
3382   echo "$as_me: failed program was:" >&5
3383   cat conftest.$ac_ext >&5
3384   ac_header_preproc=no
3385 fi
3386 rm -f conftest.err conftest.$ac_ext
3387 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3388 echo "${ECHO_T}$ac_header_preproc" >&6
3389
3390 # So?  What about this header?
3391 case $ac_header_compiler:$ac_header_preproc in
3392   yes:no )
3393     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3394 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3395     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3396 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3397   no:yes )
3398     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3399 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3400     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3401 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3402     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3403 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3404 esac
3405 echo "$as_me:$LINENO: checking for $ac_header" >&5
3406 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3407 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3408   echo $ECHO_N "(cached) $ECHO_C" >&6
3409 else
3410   eval "$as_ac_Header=$ac_header_preproc"
3411 fi
3412 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3413 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3414
3415 fi
3416 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3417   cat >>confdefs.h <<_ACEOF
3418 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3419 _ACEOF
3420
3421 fi
3422
3423 done
3424
3425 echo "$as_me:$LINENO: checking for mode_t" >&5
3426 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3427 if test "${ac_cv_type_mode_t+set}" = set; then
3428   echo $ECHO_N "(cached) $ECHO_C" >&6
3429 else
3430   cat >conftest.$ac_ext <<_ACEOF
3431 #line $LINENO "configure"
3432 #include "confdefs.h"
3433 $ac_includes_default
3434 #ifdef F77_DUMMY_MAIN
3435 #  ifdef __cplusplus
3436      extern "C"
3437 #  endif
3438    int F77_DUMMY_MAIN() { return 1; }
3439 #endif
3440 int
3441 main ()
3442 {
3443 if ((mode_t *) 0)
3444   return 0;
3445 if (sizeof (mode_t))
3446   return 0;
3447   ;
3448   return 0;
3449 }
3450 _ACEOF
3451 rm -f conftest.$ac_objext
3452 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3453   (eval $ac_compile) 2>&5
3454   ac_status=$?
3455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3456   (exit $ac_status); } &&
3457          { ac_try='test -s conftest.$ac_objext'
3458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3459   (eval $ac_try) 2>&5
3460   ac_status=$?
3461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3462   (exit $ac_status); }; }; then
3463   ac_cv_type_mode_t=yes
3464 else
3465   echo "$as_me: failed program was:" >&5
3466 cat conftest.$ac_ext >&5
3467 ac_cv_type_mode_t=no
3468 fi
3469 rm -f conftest.$ac_objext conftest.$ac_ext
3470 fi
3471 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3472 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3473 if test $ac_cv_type_mode_t = yes; then
3474   :
3475 else
3476
3477 cat >>confdefs.h <<_ACEOF
3478 #define mode_t int
3479 _ACEOF
3480
3481 fi
3482
3483 echo "$as_me:$LINENO: checking for pid_t" >&5
3484 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3485 if test "${ac_cv_type_pid_t+set}" = set; then
3486   echo $ECHO_N "(cached) $ECHO_C" >&6
3487 else
3488   cat >conftest.$ac_ext <<_ACEOF
3489 #line $LINENO "configure"
3490 #include "confdefs.h"
3491 $ac_includes_default
3492 #ifdef F77_DUMMY_MAIN
3493 #  ifdef __cplusplus
3494      extern "C"
3495 #  endif
3496    int F77_DUMMY_MAIN() { return 1; }
3497 #endif
3498 int
3499 main ()
3500 {
3501 if ((pid_t *) 0)
3502   return 0;
3503 if (sizeof (pid_t))
3504   return 0;
3505   ;
3506   return 0;
3507 }
3508 _ACEOF
3509 rm -f conftest.$ac_objext
3510 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3511   (eval $ac_compile) 2>&5
3512   ac_status=$?
3513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3514   (exit $ac_status); } &&
3515          { ac_try='test -s conftest.$ac_objext'
3516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3517   (eval $ac_try) 2>&5
3518   ac_status=$?
3519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520   (exit $ac_status); }; }; then
3521   ac_cv_type_pid_t=yes
3522 else
3523   echo "$as_me: failed program was:" >&5
3524 cat conftest.$ac_ext >&5
3525 ac_cv_type_pid_t=no
3526 fi
3527 rm -f conftest.$ac_objext conftest.$ac_ext
3528 fi
3529 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3530 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3531 if test $ac_cv_type_pid_t = yes; then
3532   :
3533 else
3534
3535 cat >>confdefs.h <<_ACEOF
3536 #define pid_t int
3537 _ACEOF
3538
3539 fi
3540
3541 echo "$as_me:$LINENO: checking for size_t" >&5
3542 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3543 if test "${ac_cv_type_size_t+set}" = set; then
3544   echo $ECHO_N "(cached) $ECHO_C" >&6
3545 else
3546   cat >conftest.$ac_ext <<_ACEOF
3547 #line $LINENO "configure"
3548 #include "confdefs.h"
3549 $ac_includes_default
3550 #ifdef F77_DUMMY_MAIN
3551 #  ifdef __cplusplus
3552      extern "C"
3553 #  endif
3554    int F77_DUMMY_MAIN() { return 1; }
3555 #endif
3556 int
3557 main ()
3558 {
3559 if ((size_t *) 0)
3560   return 0;
3561 if (sizeof (size_t))
3562   return 0;
3563   ;
3564   return 0;
3565 }
3566 _ACEOF
3567 rm -f conftest.$ac_objext
3568 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3569   (eval $ac_compile) 2>&5
3570   ac_status=$?
3571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3572   (exit $ac_status); } &&
3573          { ac_try='test -s conftest.$ac_objext'
3574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3575   (eval $ac_try) 2>&5
3576   ac_status=$?
3577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3578   (exit $ac_status); }; }; then
3579   ac_cv_type_size_t=yes
3580 else
3581   echo "$as_me: failed program was:" >&5
3582 cat conftest.$ac_ext >&5
3583 ac_cv_type_size_t=no
3584 fi
3585 rm -f conftest.$ac_objext conftest.$ac_ext
3586 fi
3587 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3588 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3589 if test $ac_cv_type_size_t = yes; then
3590   :
3591 else
3592
3593 cat >>confdefs.h <<_ACEOF
3594 #define size_t unsigned
3595 _ACEOF
3596
3597 fi
3598
3599 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3600 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3601 if test "${ac_cv_type_signal+set}" = set; then
3602   echo $ECHO_N "(cached) $ECHO_C" >&6
3603 else
3604   cat >conftest.$ac_ext <<_ACEOF
3605 #line $LINENO "configure"
3606 #include "confdefs.h"
3607 #include <sys/types.h>
3608 #include <signal.h>
3609 #ifdef signal
3610 # undef signal
3611 #endif
3612 #ifdef __cplusplus
3613 extern "C" void (*signal (int, void (*)(int)))(int);
3614 #else
3615 void (*signal ()) ();
3616 #endif
3617
3618 #ifdef F77_DUMMY_MAIN
3619 #  ifdef __cplusplus
3620      extern "C"
3621 #  endif
3622    int F77_DUMMY_MAIN() { return 1; }
3623 #endif
3624 int
3625 main ()
3626 {
3627 int i;
3628   ;
3629   return 0;
3630 }
3631 _ACEOF
3632 rm -f conftest.$ac_objext
3633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3634   (eval $ac_compile) 2>&5
3635   ac_status=$?
3636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3637   (exit $ac_status); } &&
3638          { ac_try='test -s conftest.$ac_objext'
3639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3640   (eval $ac_try) 2>&5
3641   ac_status=$?
3642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3643   (exit $ac_status); }; }; then
3644   ac_cv_type_signal=void
3645 else
3646   echo "$as_me: failed program was:" >&5
3647 cat conftest.$ac_ext >&5
3648 ac_cv_type_signal=int
3649 fi
3650 rm -f conftest.$ac_objext conftest.$ac_ext
3651 fi
3652 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3653 echo "${ECHO_T}$ac_cv_type_signal" >&6
3654
3655 cat >>confdefs.h <<_ACEOF
3656 #define RETSIGTYPE $ac_cv_type_signal
3657 _ACEOF
3658
3659
3660 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3661 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3662 if test "${ac_cv_header_time+set}" = set; then
3663   echo $ECHO_N "(cached) $ECHO_C" >&6
3664 else
3665   cat >conftest.$ac_ext <<_ACEOF
3666 #line $LINENO "configure"
3667 #include "confdefs.h"
3668 #include <sys/types.h>
3669 #include <sys/time.h>
3670 #include <time.h>
3671
3672 #ifdef F77_DUMMY_MAIN
3673 #  ifdef __cplusplus
3674      extern "C"
3675 #  endif
3676    int F77_DUMMY_MAIN() { return 1; }
3677 #endif
3678 int
3679 main ()
3680 {
3681 if ((struct tm *) 0)
3682 return 0;
3683   ;
3684   return 0;
3685 }
3686 _ACEOF
3687 rm -f conftest.$ac_objext
3688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3689   (eval $ac_compile) 2>&5
3690   ac_status=$?
3691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3692   (exit $ac_status); } &&
3693          { ac_try='test -s conftest.$ac_objext'
3694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3695   (eval $ac_try) 2>&5
3696   ac_status=$?
3697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3698   (exit $ac_status); }; }; then
3699   ac_cv_header_time=yes
3700 else
3701   echo "$as_me: failed program was:" >&5
3702 cat conftest.$ac_ext >&5
3703 ac_cv_header_time=no
3704 fi
3705 rm -f conftest.$ac_objext conftest.$ac_ext
3706 fi
3707 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3708 echo "${ECHO_T}$ac_cv_header_time" >&6
3709 if test $ac_cv_header_time = yes; then
3710
3711 cat >>confdefs.h <<\_ACEOF
3712 #define TIME_WITH_SYS_TIME 1
3713 _ACEOF
3714
3715 fi
3716
3717 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3718 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3719 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   cat >conftest.$ac_ext <<_ACEOF
3723 #line $LINENO "configure"
3724 #include "confdefs.h"
3725 #include <sys/types.h>
3726 #include <sys/wait.h>
3727 #ifndef WEXITSTATUS
3728 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3729 #endif
3730 #ifndef WIFEXITED
3731 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3732 #endif
3733
3734 #ifdef F77_DUMMY_MAIN
3735 #  ifdef __cplusplus
3736      extern "C"
3737 #  endif
3738    int F77_DUMMY_MAIN() { return 1; }
3739 #endif
3740 int
3741 main ()
3742 {
3743   int s;
3744   wait (&s);
3745   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3746   ;
3747   return 0;
3748 }
3749 _ACEOF
3750 rm -f conftest.$ac_objext
3751 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3752   (eval $ac_compile) 2>&5
3753   ac_status=$?
3754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3755   (exit $ac_status); } &&
3756          { ac_try='test -s conftest.$ac_objext'
3757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3758   (eval $ac_try) 2>&5
3759   ac_status=$?
3760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3761   (exit $ac_status); }; }; then
3762   ac_cv_header_sys_wait_h=yes
3763 else
3764   echo "$as_me: failed program was:" >&5
3765 cat conftest.$ac_ext >&5
3766 ac_cv_header_sys_wait_h=no
3767 fi
3768 rm -f conftest.$ac_objext conftest.$ac_ext
3769 fi
3770 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3771 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3772 if test $ac_cv_header_sys_wait_h = yes; then
3773
3774 cat >>confdefs.h <<\_ACEOF
3775 #define HAVE_SYS_WAIT_H 1
3776 _ACEOF
3777
3778 fi
3779
3780
3781
3782
3783
3784
3785 ac_header_dirent=no
3786 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3787   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3788 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3789 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3790 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3791   echo $ECHO_N "(cached) $ECHO_C" >&6
3792 else
3793   cat >conftest.$ac_ext <<_ACEOF
3794 #line $LINENO "configure"
3795 #include "confdefs.h"
3796 #include <sys/types.h>
3797 #include <$ac_hdr>
3798
3799 #ifdef F77_DUMMY_MAIN
3800 #  ifdef __cplusplus
3801      extern "C"
3802 #  endif
3803    int F77_DUMMY_MAIN() { return 1; }
3804 #endif
3805 int
3806 main ()
3807 {
3808 if ((DIR *) 0)
3809 return 0;
3810   ;
3811   return 0;
3812 }
3813 _ACEOF
3814 rm -f conftest.$ac_objext
3815 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3816   (eval $ac_compile) 2>&5
3817   ac_status=$?
3818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3819   (exit $ac_status); } &&
3820          { ac_try='test -s conftest.$ac_objext'
3821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3822   (eval $ac_try) 2>&5
3823   ac_status=$?
3824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3825   (exit $ac_status); }; }; then
3826   eval "$as_ac_Header=yes"
3827 else
3828   echo "$as_me: failed program was:" >&5
3829 cat conftest.$ac_ext >&5
3830 eval "$as_ac_Header=no"
3831 fi
3832 rm -f conftest.$ac_objext conftest.$ac_ext
3833 fi
3834 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3835 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3836 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3837   cat >>confdefs.h <<_ACEOF
3838 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
3839 _ACEOF
3840
3841 ac_header_dirent=$ac_hdr; break
3842 fi
3843
3844 done
3845 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3846 if test $ac_header_dirent = dirent.h; then
3847   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3848 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3849 if test "${ac_cv_search_opendir+set}" = set; then
3850   echo $ECHO_N "(cached) $ECHO_C" >&6
3851 else
3852   ac_func_search_save_LIBS=$LIBS
3853 ac_cv_search_opendir=no
3854 cat >conftest.$ac_ext <<_ACEOF
3855 #line $LINENO "configure"
3856 #include "confdefs.h"
3857
3858 /* Override any gcc2 internal prototype to avoid an error.  */
3859 #ifdef __cplusplus
3860 extern "C"
3861 #endif
3862 /* We use char because int might match the return type of a gcc2
3863    builtin and then its argument prototype would still apply.  */
3864 char opendir ();
3865 #ifdef F77_DUMMY_MAIN
3866 #  ifdef __cplusplus
3867      extern "C"
3868 #  endif
3869    int F77_DUMMY_MAIN() { return 1; }
3870 #endif
3871 int
3872 main ()
3873 {
3874 opendir ();
3875   ;
3876   return 0;
3877 }
3878 _ACEOF
3879 rm -f conftest.$ac_objext conftest$ac_exeext
3880 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3881   (eval $ac_link) 2>&5
3882   ac_status=$?
3883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3884   (exit $ac_status); } &&
3885          { ac_try='test -s conftest$ac_exeext'
3886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3887   (eval $ac_try) 2>&5
3888   ac_status=$?
3889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3890   (exit $ac_status); }; }; then
3891   ac_cv_search_opendir="none required"
3892 else
3893   echo "$as_me: failed program was:" >&5
3894 cat conftest.$ac_ext >&5
3895 fi
3896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3897 if test "$ac_cv_search_opendir" = no; then
3898   for ac_lib in dir; do
3899     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3900     cat >conftest.$ac_ext <<_ACEOF
3901 #line $LINENO "configure"
3902 #include "confdefs.h"
3903
3904 /* Override any gcc2 internal prototype to avoid an error.  */
3905 #ifdef __cplusplus
3906 extern "C"
3907 #endif
3908 /* We use char because int might match the return type of a gcc2
3909    builtin and then its argument prototype would still apply.  */
3910 char opendir ();
3911 #ifdef F77_DUMMY_MAIN
3912 #  ifdef __cplusplus
3913      extern "C"
3914 #  endif
3915    int F77_DUMMY_MAIN() { return 1; }
3916 #endif
3917 int
3918 main ()
3919 {
3920 opendir ();
3921   ;
3922   return 0;
3923 }
3924 _ACEOF
3925 rm -f conftest.$ac_objext conftest$ac_exeext
3926 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3927   (eval $ac_link) 2>&5
3928   ac_status=$?
3929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3930   (exit $ac_status); } &&
3931          { ac_try='test -s conftest$ac_exeext'
3932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3933   (eval $ac_try) 2>&5
3934   ac_status=$?
3935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3936   (exit $ac_status); }; }; then
3937   ac_cv_search_opendir="-l$ac_lib"
3938 break
3939 else
3940   echo "$as_me: failed program was:" >&5
3941 cat conftest.$ac_ext >&5
3942 fi
3943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3944   done
3945 fi
3946 LIBS=$ac_func_search_save_LIBS
3947 fi
3948 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
3949 echo "${ECHO_T}$ac_cv_search_opendir" >&6
3950 if test "$ac_cv_search_opendir" != no; then
3951   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
3952
3953 fi
3954
3955 else
3956   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3957 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3958 if test "${ac_cv_search_opendir+set}" = set; then
3959   echo $ECHO_N "(cached) $ECHO_C" >&6
3960 else
3961   ac_func_search_save_LIBS=$LIBS
3962 ac_cv_search_opendir=no
3963 cat >conftest.$ac_ext <<_ACEOF
3964 #line $LINENO "configure"
3965 #include "confdefs.h"
3966
3967 /* Override any gcc2 internal prototype to avoid an error.  */
3968 #ifdef __cplusplus
3969 extern "C"
3970 #endif
3971 /* We use char because int might match the return type of a gcc2
3972    builtin and then its argument prototype would still apply.  */
3973 char opendir ();
3974 #ifdef F77_DUMMY_MAIN
3975 #  ifdef __cplusplus
3976      extern "C"
3977 #  endif
3978    int F77_DUMMY_MAIN() { return 1; }
3979 #endif
3980 int
3981 main ()
3982 {
3983 opendir ();
3984   ;
3985   return 0;
3986 }
3987 _ACEOF
3988 rm -f conftest.$ac_objext conftest$ac_exeext
3989 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3990   (eval $ac_link) 2>&5
3991   ac_status=$?
3992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993   (exit $ac_status); } &&
3994          { ac_try='test -s conftest$ac_exeext'
3995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3996   (eval $ac_try) 2>&5
3997   ac_status=$?
3998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999   (exit $ac_status); }; }; then
4000   ac_cv_search_opendir="none required"
4001 else
4002   echo "$as_me: failed program was:" >&5
4003 cat conftest.$ac_ext >&5
4004 fi
4005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4006 if test "$ac_cv_search_opendir" = no; then
4007   for ac_lib in x; do
4008     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4009     cat >conftest.$ac_ext <<_ACEOF
4010 #line $LINENO "configure"
4011 #include "confdefs.h"
4012
4013 /* Override any gcc2 internal prototype to avoid an error.  */
4014 #ifdef __cplusplus
4015 extern "C"
4016 #endif
4017 /* We use char because int might match the return type of a gcc2
4018    builtin and then its argument prototype would still apply.  */
4019 char opendir ();
4020 #ifdef F77_DUMMY_MAIN
4021 #  ifdef __cplusplus
4022      extern "C"
4023 #  endif
4024    int F77_DUMMY_MAIN() { return 1; }
4025 #endif
4026 int
4027 main ()
4028 {
4029 opendir ();
4030   ;
4031   return 0;
4032 }
4033 _ACEOF
4034 rm -f conftest.$ac_objext conftest$ac_exeext
4035 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4036   (eval $ac_link) 2>&5
4037   ac_status=$?
4038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039   (exit $ac_status); } &&
4040          { ac_try='test -s conftest$ac_exeext'
4041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4042   (eval $ac_try) 2>&5
4043   ac_status=$?
4044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4045   (exit $ac_status); }; }; then
4046   ac_cv_search_opendir="-l$ac_lib"
4047 break
4048 else
4049   echo "$as_me: failed program was:" >&5
4050 cat conftest.$ac_ext >&5
4051 fi
4052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4053   done
4054 fi
4055 LIBS=$ac_func_search_save_LIBS
4056 fi
4057 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4058 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4059 if test "$ac_cv_search_opendir" != no; then
4060   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4061
4062 fi
4063
4064 fi
4065
4066 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4067 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4068   if test "${ac_cv_gettimeofday_args+set}" = set; then
4069   echo $ECHO_N "(cached) $ECHO_C" >&6
4070 else
4071   cat >conftest.$ac_ext <<_ACEOF
4072 #line $LINENO "configure"
4073 #include "confdefs.h"
4074 #include <stdlib.h>
4075                     #include <sys/time.h>
4076 #ifdef F77_DUMMY_MAIN
4077 #  ifdef __cplusplus
4078      extern "C"
4079 #  endif
4080    int F77_DUMMY_MAIN() { return 1; }
4081 #endif
4082 int
4083 main ()
4084 {
4085 struct timeval tv; struct timezone tzp;
4086                     gettimeofday(&tv, &tzp);
4087   ;
4088   return 0;
4089 }
4090 _ACEOF
4091 rm -f conftest.$ac_objext
4092 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4093   (eval $ac_compile) 2>&5
4094   ac_status=$?
4095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4096   (exit $ac_status); } &&
4097          { ac_try='test -s conftest.$ac_objext'
4098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4099   (eval $ac_try) 2>&5
4100   ac_status=$?
4101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4102   (exit $ac_status); }; }; then
4103   ac_gettimeofday_args=2
4104 else
4105   echo "$as_me: failed program was:" >&5
4106 cat conftest.$ac_ext >&5
4107 cat >conftest.$ac_ext <<_ACEOF
4108 #line $LINENO "configure"
4109 #include "confdefs.h"
4110 #include <stdlib.h>
4111                                     #include <sys/time.h>
4112 #ifdef F77_DUMMY_MAIN
4113 #  ifdef __cplusplus
4114      extern "C"
4115 #  endif
4116    int F77_DUMMY_MAIN() { return 1; }
4117 #endif
4118 int
4119 main ()
4120 {
4121 struct timeval tv; gettimeofday(&tv);
4122   ;
4123   return 0;
4124 }
4125 _ACEOF
4126 rm -f conftest.$ac_objext
4127 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4128   (eval $ac_compile) 2>&5
4129   ac_status=$?
4130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4131   (exit $ac_status); } &&
4132          { ac_try='test -s conftest.$ac_objext'
4133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4134   (eval $ac_try) 2>&5
4135   ac_status=$?
4136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4137   (exit $ac_status); }; }; then
4138   ac_gettimeofday_args=1
4139 else
4140   echo "$as_me: failed program was:" >&5
4141 cat conftest.$ac_ext >&5
4142 ac_gettimeofday_args=0
4143 fi
4144 rm -f conftest.$ac_objext conftest.$ac_ext
4145 fi
4146 rm -f conftest.$ac_objext conftest.$ac_ext
4147     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4148 fi
4149
4150   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4151   if test "$ac_gettimeofday_args" = 1 ; then
4152     cat >>confdefs.h <<\_ACEOF
4153 #define HAVE_GETTIMEOFDAY 1
4154 _ACEOF
4155
4156     echo "$as_me:$LINENO: result: one argument" >&5
4157 echo "${ECHO_T}one argument" >&6
4158   elif test "$ac_gettimeofday_args" = 2 ; then
4159     cat >>confdefs.h <<\_ACEOF
4160 #define HAVE_GETTIMEOFDAY 1
4161 _ACEOF
4162
4163     cat >>confdefs.h <<\_ACEOF
4164 #define GETTIMEOFDAY_TWO_ARGS 1
4165 _ACEOF
4166
4167     echo "$as_me:$LINENO: result: two arguments" >&5
4168 echo "${ECHO_T}two arguments" >&6
4169   else
4170     echo "$as_me:$LINENO: result: unknown" >&5
4171 echo "${ECHO_T}unknown" >&6
4172   fi
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4184 do
4185 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4186 echo "$as_me:$LINENO: checking for $ac_func" >&5
4187 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4188 if eval "test \"\${$as_ac_var+set}\" = set"; then
4189   echo $ECHO_N "(cached) $ECHO_C" >&6
4190 else
4191   cat >conftest.$ac_ext <<_ACEOF
4192 #line $LINENO "configure"
4193 #include "confdefs.h"
4194 /* System header to define __stub macros and hopefully few prototypes,
4195     which can conflict with char $ac_func (); below.  */
4196 #include <assert.h>
4197 /* Override any gcc2 internal prototype to avoid an error.  */
4198 #ifdef __cplusplus
4199 extern "C"
4200 #endif
4201 /* We use char because int might match the return type of a gcc2
4202    builtin and then its argument prototype would still apply.  */
4203 char $ac_func ();
4204 char (*f) ();
4205
4206 #ifdef F77_DUMMY_MAIN
4207 #  ifdef __cplusplus
4208      extern "C"
4209 #  endif
4210    int F77_DUMMY_MAIN() { return 1; }
4211 #endif
4212 int
4213 main ()
4214 {
4215 /* The GNU C library defines this for functions which it implements
4216     to always fail with ENOSYS.  Some functions are actually named
4217     something starting with __ and the normal name is an alias.  */
4218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4219 choke me
4220 #else
4221 f = $ac_func;
4222 #endif
4223
4224   ;
4225   return 0;
4226 }
4227 _ACEOF
4228 rm -f conftest.$ac_objext conftest$ac_exeext
4229 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4230   (eval $ac_link) 2>&5
4231   ac_status=$?
4232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4233   (exit $ac_status); } &&
4234          { ac_try='test -s conftest$ac_exeext'
4235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4236   (eval $ac_try) 2>&5
4237   ac_status=$?
4238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4239   (exit $ac_status); }; }; then
4240   eval "$as_ac_var=yes"
4241 else
4242   echo "$as_me: failed program was:" >&5
4243 cat conftest.$ac_ext >&5
4244 eval "$as_ac_var=no"
4245 fi
4246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4247 fi
4248 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4249 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4250 if test `eval echo '${'$as_ac_var'}'` = yes; then
4251   cat >>confdefs.h <<_ACEOF
4252 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4253 _ACEOF
4254
4255 fi
4256 done
4257
4258
4259
4260
4261
4262
4263 for ac_func in sigaction syslog realpath setrlimit
4264 do
4265 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4266 echo "$as_me:$LINENO: checking for $ac_func" >&5
4267 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4268 if eval "test \"\${$as_ac_var+set}\" = set"; then
4269   echo $ECHO_N "(cached) $ECHO_C" >&6
4270 else
4271   cat >conftest.$ac_ext <<_ACEOF
4272 #line $LINENO "configure"
4273 #include "confdefs.h"
4274 /* System header to define __stub macros and hopefully few prototypes,
4275     which can conflict with char $ac_func (); below.  */
4276 #include <assert.h>
4277 /* Override any gcc2 internal prototype to avoid an error.  */
4278 #ifdef __cplusplus
4279 extern "C"
4280 #endif
4281 /* We use char because int might match the return type of a gcc2
4282    builtin and then its argument prototype would still apply.  */
4283 char $ac_func ();
4284 char (*f) ();
4285
4286 #ifdef F77_DUMMY_MAIN
4287 #  ifdef __cplusplus
4288      extern "C"
4289 #  endif
4290    int F77_DUMMY_MAIN() { return 1; }
4291 #endif
4292 int
4293 main ()
4294 {
4295 /* The GNU C library defines this for functions which it implements
4296     to always fail with ENOSYS.  Some functions are actually named
4297     something starting with __ and the normal name is an alias.  */
4298 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4299 choke me
4300 #else
4301 f = $ac_func;
4302 #endif
4303
4304   ;
4305   return 0;
4306 }
4307 _ACEOF
4308 rm -f conftest.$ac_objext conftest$ac_exeext
4309 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4310   (eval $ac_link) 2>&5
4311   ac_status=$?
4312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4313   (exit $ac_status); } &&
4314          { ac_try='test -s conftest$ac_exeext'
4315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4316   (eval $ac_try) 2>&5
4317   ac_status=$?
4318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4319   (exit $ac_status); }; }; then
4320   eval "$as_ac_var=yes"
4321 else
4322   echo "$as_me: failed program was:" >&5
4323 cat conftest.$ac_ext >&5
4324 eval "$as_ac_var=no"
4325 fi
4326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4327 fi
4328 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4329 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4330 if test `eval echo '${'$as_ac_var'}'` = yes; then
4331   cat >>confdefs.h <<_ACEOF
4332 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4333 _ACEOF
4334
4335 fi
4336 done
4337
4338 echo "$as_me:$LINENO: checking for struct icmp" >&5
4339 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4340 if test "${ac_cv_have_icmp+set}" = set; then
4341   echo $ECHO_N "(cached) $ECHO_C" >&6
4342 else
4343   cat >conftest.$ac_ext <<_ACEOF
4344 #line $LINENO "configure"
4345 #include "confdefs.h"
4346 #include <stdlib.h>
4347                    #include <stdio.h>
4348                    #include <math.h>
4349                    #include <unistd.h>
4350                    #include <limits.h>
4351                    #include <signal.h>
4352                    #include <fcntl.h>
4353                    #include <sys/types.h>
4354                    #include <sys/time.h>
4355                    #include <sys/ipc.h>
4356                    #include <sys/shm.h>
4357                    #include <sys/socket.h>
4358                    #include <netinet/in_systm.h>
4359                    #include <netinet/in.h>
4360                    #include <netinet/ip.h>
4361                    #include <netinet/ip_icmp.h>
4362                    #include <netinet/udp.h>
4363                    #include <arpa/inet.h>
4364                    #include <netdb.h>
4365 #ifdef F77_DUMMY_MAIN
4366 #  ifdef __cplusplus
4367      extern "C"
4368 #  endif
4369    int F77_DUMMY_MAIN() { return 1; }
4370 #endif
4371 int
4372 main ()
4373 {
4374 struct icmp i;
4375                    struct sockaddr s;
4376                    struct sockaddr_in si;
4377                    struct ip ip;
4378                    i.icmp_type = ICMP_ECHO;
4379                    i.icmp_code = 0;
4380                    i.icmp_cksum = 0;
4381                    i.icmp_id = 0;
4382                    i.icmp_seq = 0;
4383                    si.sin_family = AF_INET;
4384                    #if defined(__DECC) || defined(_IP_VHL)
4385                    ip.ip_vhl = 0;
4386                    #else
4387                    ip.ip_hl = 0;
4388                    #endif
4389
4390   ;
4391   return 0;
4392 }
4393 _ACEOF
4394 rm -f conftest.$ac_objext
4395 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4396   (eval $ac_compile) 2>&5
4397   ac_status=$?
4398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4399   (exit $ac_status); } &&
4400          { ac_try='test -s conftest.$ac_objext'
4401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4402   (eval $ac_try) 2>&5
4403   ac_status=$?
4404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4405   (exit $ac_status); }; }; then
4406   ac_cv_have_icmp=yes
4407 else
4408   echo "$as_me: failed program was:" >&5
4409 cat conftest.$ac_ext >&5
4410 ac_cv_have_icmp=no
4411 fi
4412 rm -f conftest.$ac_objext conftest.$ac_ext
4413 fi
4414 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4415 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4416  if test "$ac_cv_have_icmp" = yes ; then
4417    cat >>confdefs.h <<\_ACEOF
4418 #define HAVE_ICMP 1
4419 _ACEOF
4420
4421  fi
4422 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4423 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4424 if test "${ac_cv_have_icmphdr+set}" = set; then
4425   echo $ECHO_N "(cached) $ECHO_C" >&6
4426 else
4427   cat >conftest.$ac_ext <<_ACEOF
4428 #line $LINENO "configure"
4429 #include "confdefs.h"
4430 #include <stdlib.h>
4431                    #include <stdio.h>
4432                    #include <math.h>
4433                    #include <unistd.h>
4434                    #include <limits.h>
4435                    #include <signal.h>
4436                    #include <fcntl.h>
4437                    #include <sys/types.h>
4438                    #include <sys/time.h>
4439                    #include <sys/ipc.h>
4440                    #include <sys/shm.h>
4441                    #include <sys/socket.h>
4442                    #include <netinet/in_systm.h>
4443                    #include <netinet/in.h>
4444                    #include <netinet/ip.h>
4445                    #include <netinet/ip_icmp.h>
4446                    #include <netinet/udp.h>
4447                    #include <arpa/inet.h>
4448                    #include <netdb.h>
4449 #ifdef F77_DUMMY_MAIN
4450 #  ifdef __cplusplus
4451      extern "C"
4452 #  endif
4453    int F77_DUMMY_MAIN() { return 1; }
4454 #endif
4455 int
4456 main ()
4457 {
4458 struct icmphdr i;
4459                    struct sockaddr s;
4460                    struct sockaddr_in si;
4461                    struct ip ip;
4462                    i.type = ICMP_ECHO;
4463                    i.code = 0;
4464                    i.checksum = 0;
4465                    i.un.echo.id = 0;
4466                    i.un.echo.sequence = 0;
4467                    si.sin_family = AF_INET;
4468                    ip.ip_hl = 0;
4469   ;
4470   return 0;
4471 }
4472 _ACEOF
4473 rm -f conftest.$ac_objext
4474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4475   (eval $ac_compile) 2>&5
4476   ac_status=$?
4477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478   (exit $ac_status); } &&
4479          { ac_try='test -s conftest.$ac_objext'
4480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4481   (eval $ac_try) 2>&5
4482   ac_status=$?
4483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484   (exit $ac_status); }; }; then
4485   ac_cv_have_icmphdr=yes
4486 else
4487   echo "$as_me: failed program was:" >&5
4488 cat conftest.$ac_ext >&5
4489 ac_cv_have_icmphdr=no
4490 fi
4491 rm -f conftest.$ac_objext conftest.$ac_ext
4492 fi
4493 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
4494 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
4495  if test "$ac_cv_have_icmphdr" = yes ; then
4496    cat >>confdefs.h <<\_ACEOF
4497 #define HAVE_ICMPHDR 1
4498 _ACEOF
4499
4500  fi
4501
4502
4503 for ac_header in crypt.h sys/select.h
4504 do
4505 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4506 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4507   echo "$as_me:$LINENO: checking for $ac_header" >&5
4508 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4509 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4510   echo $ECHO_N "(cached) $ECHO_C" >&6
4511 fi
4512 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4513 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4514 else
4515   # Is the header compilable?
4516 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4517 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4518 cat >conftest.$ac_ext <<_ACEOF
4519 #line $LINENO "configure"
4520 #include "confdefs.h"
4521 $ac_includes_default
4522 #include <$ac_header>
4523 _ACEOF
4524 rm -f conftest.$ac_objext
4525 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4526   (eval $ac_compile) 2>&5
4527   ac_status=$?
4528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4529   (exit $ac_status); } &&
4530          { ac_try='test -s conftest.$ac_objext'
4531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4532   (eval $ac_try) 2>&5
4533   ac_status=$?
4534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535   (exit $ac_status); }; }; then
4536   ac_header_compiler=yes
4537 else
4538   echo "$as_me: failed program was:" >&5
4539 cat conftest.$ac_ext >&5
4540 ac_header_compiler=no
4541 fi
4542 rm -f conftest.$ac_objext conftest.$ac_ext
4543 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4544 echo "${ECHO_T}$ac_header_compiler" >&6
4545
4546 # Is the header present?
4547 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4548 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4549 cat >conftest.$ac_ext <<_ACEOF
4550 #line $LINENO "configure"
4551 #include "confdefs.h"
4552 #include <$ac_header>
4553 _ACEOF
4554 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4555   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4556   ac_status=$?
4557   egrep -v '^ *\+' conftest.er1 >conftest.err
4558   rm -f conftest.er1
4559   cat conftest.err >&5
4560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4561   (exit $ac_status); } >/dev/null; then
4562   if test -s conftest.err; then
4563     ac_cpp_err=$ac_c_preproc_warn_flag
4564   else
4565     ac_cpp_err=
4566   fi
4567 else
4568   ac_cpp_err=yes
4569 fi
4570 if test -z "$ac_cpp_err"; then
4571   ac_header_preproc=yes
4572 else
4573   echo "$as_me: failed program was:" >&5
4574   cat conftest.$ac_ext >&5
4575   ac_header_preproc=no
4576 fi
4577 rm -f conftest.err conftest.$ac_ext
4578 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4579 echo "${ECHO_T}$ac_header_preproc" >&6
4580
4581 # So?  What about this header?
4582 case $ac_header_compiler:$ac_header_preproc in
4583   yes:no )
4584     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4585 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4586     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4587 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4588   no:yes )
4589     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4590 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4591     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4592 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4593     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4594 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4595 esac
4596 echo "$as_me:$LINENO: checking for $ac_header" >&5
4597 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4598 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4599   echo $ECHO_N "(cached) $ECHO_C" >&6
4600 else
4601   eval "$as_ac_Header=$ac_header_preproc"
4602 fi
4603 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4604 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4605
4606 fi
4607 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4608   cat >>confdefs.h <<_ACEOF
4609 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4610 _ACEOF
4611
4612 fi
4613
4614 done
4615
4616 for ac_prog in perl5 perl
4617 do
4618   # Extract the first word of "$ac_prog", so it can be a program name with args.
4619 set dummy $ac_prog; ac_word=$2
4620 echo "$as_me:$LINENO: checking for $ac_word" >&5
4621 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4622 if test "${ac_cv_path_PERL+set}" = set; then
4623   echo $ECHO_N "(cached) $ECHO_C" >&6
4624 else
4625   case $PERL in
4626   [\\/]* | ?:[\\/]*)
4627   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4628   ;;
4629   *)
4630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4631 for as_dir in $PATH
4632 do
4633   IFS=$as_save_IFS
4634   test -z "$as_dir" && as_dir=.
4635   for ac_exec_ext in '' $ac_executable_extensions; do
4636   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4637     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4638     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4639     break 2
4640   fi
4641 done
4642 done
4643
4644   ;;
4645 esac
4646 fi
4647 PERL=$ac_cv_path_PERL
4648
4649 if test -n "$PERL"; then
4650   echo "$as_me:$LINENO: result: $PERL" >&5
4651 echo "${ECHO_T}$PERL" >&6
4652 else
4653   echo "$as_me:$LINENO: result: no" >&5
4654 echo "${ECHO_T}no" >&6
4655 fi
4656
4657   test -n "$PERL" && break
4658 done
4659
4660   if test -z "$PERL" ; then
4661     PERL_VERSION=0
4662   else
4663     echo "$as_me:$LINENO: checking perl version" >&5
4664 echo $ECHO_N "checking perl version... $ECHO_C" >&6
4665 if test "${ac_cv_perl_version+set}" = set; then
4666   echo $ECHO_N "(cached) $ECHO_C" >&6
4667 else
4668   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
4669 fi
4670 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
4671 echo "${ECHO_T}$ac_cv_perl_version" >&6
4672     PERL_VERSION=$ac_cv_perl_version
4673   fi
4674
4675
4676 if test -z "$PERL" ; then
4677   # don't let it be blank...
4678   PERL=/usr/bin/perl
4679 fi
4680
4681 echo "$as_me:$LINENO: checking for X" >&5
4682 echo $ECHO_N "checking for X... $ECHO_C" >&6
4683
4684
4685 # Check whether --with-x or --without-x was given.
4686 if test "${with_x+set}" = set; then
4687   withval="$with_x"
4688
4689 fi;
4690 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4691 if test "x$with_x" = xno; then
4692   # The user explicitly disabled X.
4693   have_x=disabled
4694 else
4695   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4696     # Both variables are already set.
4697     have_x=yes
4698   else
4699     if test "${ac_cv_have_x+set}" = set; then
4700   echo $ECHO_N "(cached) $ECHO_C" >&6
4701 else
4702   # One or both of the vars are not set, and there is no cached value.
4703 ac_x_includes=no ac_x_libraries=no
4704 rm -fr conftest.dir
4705 if mkdir conftest.dir; then
4706   cd conftest.dir
4707   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4708   cat >Imakefile <<'_ACEOF'
4709 acfindx:
4710         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4711 _ACEOF
4712   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4713     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4714     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4715     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4716     for ac_extension in a so sl; do
4717       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4718          test -f $ac_im_libdir/libX11.$ac_extension; then
4719         ac_im_usrlibdir=$ac_im_libdir; break
4720       fi
4721     done
4722     # Screen out bogus values from the imake configuration.  They are
4723     # bogus both because they are the default anyway, and because
4724     # using them would break gcc on systems where it needs fixed includes.
4725     case $ac_im_incroot in
4726         /usr/include) ;;
4727         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4728     esac
4729     case $ac_im_usrlibdir in
4730         /usr/lib | /lib) ;;
4731         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4732     esac
4733   fi
4734   cd ..
4735   rm -fr conftest.dir
4736 fi
4737
4738 # Standard set of common directories for X headers.
4739 # Check X11 before X11Rn because it is often a symlink to the current release.
4740 ac_x_header_dirs='
4741 /usr/X11/include
4742 /usr/X11R6/include
4743 /usr/X11R5/include
4744 /usr/X11R4/include
4745
4746 /usr/include/X11
4747 /usr/include/X11R6
4748 /usr/include/X11R5
4749 /usr/include/X11R4
4750
4751 /usr/local/X11/include
4752 /usr/local/X11R6/include
4753 /usr/local/X11R5/include
4754 /usr/local/X11R4/include
4755
4756 /usr/local/include/X11
4757 /usr/local/include/X11R6
4758 /usr/local/include/X11R5
4759 /usr/local/include/X11R4
4760
4761 /usr/X386/include
4762 /usr/x386/include
4763 /usr/XFree86/include/X11
4764
4765 /usr/include
4766 /usr/local/include
4767 /usr/unsupported/include
4768 /usr/athena/include
4769 /usr/local/x11r5/include
4770 /usr/lpp/Xamples/include
4771
4772 /usr/openwin/include
4773 /usr/openwin/share/include'
4774
4775 if test "$ac_x_includes" = no; then
4776   # Guess where to find include files, by looking for Intrinsic.h.
4777   # First, try using that file with no special directory specified.
4778   cat >conftest.$ac_ext <<_ACEOF
4779 #line $LINENO "configure"
4780 #include "confdefs.h"
4781 #include <X11/Intrinsic.h>
4782 _ACEOF
4783 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4784   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4785   ac_status=$?
4786   egrep -v '^ *\+' conftest.er1 >conftest.err
4787   rm -f conftest.er1
4788   cat conftest.err >&5
4789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4790   (exit $ac_status); } >/dev/null; then
4791   if test -s conftest.err; then
4792     ac_cpp_err=$ac_c_preproc_warn_flag
4793   else
4794     ac_cpp_err=
4795   fi
4796 else
4797   ac_cpp_err=yes
4798 fi
4799 if test -z "$ac_cpp_err"; then
4800   # We can compile using X headers with no special include directory.
4801 ac_x_includes=
4802 else
4803   echo "$as_me: failed program was:" >&5
4804   cat conftest.$ac_ext >&5
4805   for ac_dir in $ac_x_header_dirs; do
4806   if test -r "$ac_dir/X11/Intrinsic.h"; then
4807     ac_x_includes=$ac_dir
4808     break
4809   fi
4810 done
4811 fi
4812 rm -f conftest.err conftest.$ac_ext
4813 fi # $ac_x_includes = no
4814
4815 if test "$ac_x_libraries" = no; then
4816   # Check for the libraries.
4817   # See if we find them without any special options.
4818   # Don't add to $LIBS permanently.
4819   ac_save_LIBS=$LIBS
4820   LIBS="-lXt $LIBS"
4821   cat >conftest.$ac_ext <<_ACEOF
4822 #line $LINENO "configure"
4823 #include "confdefs.h"
4824 #include <X11/Intrinsic.h>
4825 #ifdef F77_DUMMY_MAIN
4826 #  ifdef __cplusplus
4827      extern "C"
4828 #  endif
4829    int F77_DUMMY_MAIN() { return 1; }
4830 #endif
4831 int
4832 main ()
4833 {
4834 XtMalloc (0)
4835   ;
4836   return 0;
4837 }
4838 _ACEOF
4839 rm -f conftest.$ac_objext conftest$ac_exeext
4840 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4841   (eval $ac_link) 2>&5
4842   ac_status=$?
4843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4844   (exit $ac_status); } &&
4845          { ac_try='test -s conftest$ac_exeext'
4846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4847   (eval $ac_try) 2>&5
4848   ac_status=$?
4849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850   (exit $ac_status); }; }; then
4851   LIBS=$ac_save_LIBS
4852 # We can link X programs with no special library path.
4853 ac_x_libraries=
4854 else
4855   echo "$as_me: failed program was:" >&5
4856 cat conftest.$ac_ext >&5
4857 LIBS=$ac_save_LIBS
4858 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4859 do
4860   # Don't even attempt the hair of trying to link an X program!
4861   for ac_extension in a so sl; do
4862     if test -r $ac_dir/libXt.$ac_extension; then
4863       ac_x_libraries=$ac_dir
4864       break 2
4865     fi
4866   done
4867 done
4868 fi
4869 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4870 fi # $ac_x_libraries = no
4871
4872 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4873   # Didn't find X anywhere.  Cache the known absence of X.
4874   ac_cv_have_x="have_x=no"
4875 else
4876   # Record where we found X for the cache.
4877   ac_cv_have_x="have_x=yes \
4878                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4879 fi
4880 fi
4881
4882   fi
4883   eval "$ac_cv_have_x"
4884 fi # $with_x != no
4885
4886 if test "$have_x" != yes; then
4887   echo "$as_me:$LINENO: result: $have_x" >&5
4888 echo "${ECHO_T}$have_x" >&6
4889   no_x=yes
4890 else
4891   # If each of the values was on the command line, it overrides each guess.
4892   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4893   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4894   # Update the cache value to reflect the command line values.
4895   ac_cv_have_x="have_x=yes \
4896                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4897   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
4898 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
4899 fi
4900
4901 if test "$no_x" = yes; then
4902   # Not all programs may use this symbol, but it does not hurt to define it.
4903
4904 cat >>confdefs.h <<\_ACEOF
4905 #define X_DISPLAY_MISSING 1
4906 _ACEOF
4907
4908   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4909 else
4910   if test -n "$x_includes"; then
4911     X_CFLAGS="$X_CFLAGS -I$x_includes"
4912   fi
4913
4914   # It would also be nice to do this for all -L options, not just this one.
4915   if test -n "$x_libraries"; then
4916     X_LIBS="$X_LIBS -L$x_libraries"
4917     # For Solaris; some versions of Sun CC require a space after -R and
4918     # others require no space.  Words are not sufficient . . . .
4919     case `(uname -sr) 2>/dev/null` in
4920     "SunOS 5"*)
4921       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
4922 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
4923       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
4924       cat >conftest.$ac_ext <<_ACEOF
4925 #line $LINENO "configure"
4926 #include "confdefs.h"
4927
4928 #ifdef F77_DUMMY_MAIN
4929 #  ifdef __cplusplus
4930      extern "C"
4931 #  endif
4932    int F77_DUMMY_MAIN() { return 1; }
4933 #endif
4934 int
4935 main ()
4936 {
4937
4938   ;
4939   return 0;
4940 }
4941 _ACEOF
4942 rm -f conftest.$ac_objext conftest$ac_exeext
4943 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4944   (eval $ac_link) 2>&5
4945   ac_status=$?
4946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4947   (exit $ac_status); } &&
4948          { ac_try='test -s conftest$ac_exeext'
4949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4950   (eval $ac_try) 2>&5
4951   ac_status=$?
4952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4953   (exit $ac_status); }; }; then
4954   ac_R_nospace=yes
4955 else
4956   echo "$as_me: failed program was:" >&5
4957 cat conftest.$ac_ext >&5
4958 ac_R_nospace=no
4959 fi
4960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4961       if test $ac_R_nospace = yes; then
4962         echo "$as_me:$LINENO: result: no" >&5
4963 echo "${ECHO_T}no" >&6
4964         X_LIBS="$X_LIBS -R$x_libraries"
4965       else
4966         LIBS="$ac_xsave_LIBS -R $x_libraries"
4967         cat >conftest.$ac_ext <<_ACEOF
4968 #line $LINENO "configure"
4969 #include "confdefs.h"
4970
4971 #ifdef F77_DUMMY_MAIN
4972 #  ifdef __cplusplus
4973      extern "C"
4974 #  endif
4975    int F77_DUMMY_MAIN() { return 1; }
4976 #endif
4977 int
4978 main ()
4979 {
4980
4981   ;
4982   return 0;
4983 }
4984 _ACEOF
4985 rm -f conftest.$ac_objext conftest$ac_exeext
4986 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4987   (eval $ac_link) 2>&5
4988   ac_status=$?
4989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990   (exit $ac_status); } &&
4991          { ac_try='test -s conftest$ac_exeext'
4992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4993   (eval $ac_try) 2>&5
4994   ac_status=$?
4995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4996   (exit $ac_status); }; }; then
4997   ac_R_space=yes
4998 else
4999   echo "$as_me: failed program was:" >&5
5000 cat conftest.$ac_ext >&5
5001 ac_R_space=no
5002 fi
5003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5004         if test $ac_R_space = yes; then
5005           echo "$as_me:$LINENO: result: yes" >&5
5006 echo "${ECHO_T}yes" >&6
5007           X_LIBS="$X_LIBS -R $x_libraries"
5008         else
5009           echo "$as_me:$LINENO: result: neither works" >&5
5010 echo "${ECHO_T}neither works" >&6
5011         fi
5012       fi
5013       LIBS=$ac_xsave_LIBS
5014     esac
5015   fi
5016
5017   # Check for system-dependent libraries X programs must link with.
5018   # Do this before checking for the system-independent R6 libraries
5019   # (-lICE), since we may need -lsocket or whatever for X linking.
5020
5021   if test "$ISC" = yes; then
5022     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5023   else
5024     # Martyn Johnson says this is needed for Ultrix, if the X
5025     # libraries were built with DECnet support.  And Karl Berry says
5026     # the Alpha needs dnet_stub (dnet does not exist).
5027     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5028     cat >conftest.$ac_ext <<_ACEOF
5029 #line $LINENO "configure"
5030 #include "confdefs.h"
5031
5032 /* Override any gcc2 internal prototype to avoid an error.  */
5033 #ifdef __cplusplus
5034 extern "C"
5035 #endif
5036 /* We use char because int might match the return type of a gcc2
5037    builtin and then its argument prototype would still apply.  */
5038 char XOpenDisplay ();
5039 #ifdef F77_DUMMY_MAIN
5040 #  ifdef __cplusplus
5041      extern "C"
5042 #  endif
5043    int F77_DUMMY_MAIN() { return 1; }
5044 #endif
5045 int
5046 main ()
5047 {
5048 XOpenDisplay ();
5049   ;
5050   return 0;
5051 }
5052 _ACEOF
5053 rm -f conftest.$ac_objext conftest$ac_exeext
5054 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5055   (eval $ac_link) 2>&5
5056   ac_status=$?
5057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5058   (exit $ac_status); } &&
5059          { ac_try='test -s conftest$ac_exeext'
5060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5061   (eval $ac_try) 2>&5
5062   ac_status=$?
5063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064   (exit $ac_status); }; }; then
5065   :
5066 else
5067   echo "$as_me: failed program was:" >&5
5068 cat conftest.$ac_ext >&5
5069 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5070 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5071 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5072   echo $ECHO_N "(cached) $ECHO_C" >&6
5073 else
5074   ac_check_lib_save_LIBS=$LIBS
5075 LIBS="-ldnet  $LIBS"
5076 cat >conftest.$ac_ext <<_ACEOF
5077 #line $LINENO "configure"
5078 #include "confdefs.h"
5079
5080 /* Override any gcc2 internal prototype to avoid an error.  */
5081 #ifdef __cplusplus
5082 extern "C"
5083 #endif
5084 /* We use char because int might match the return type of a gcc2
5085    builtin and then its argument prototype would still apply.  */
5086 char dnet_ntoa ();
5087 #ifdef F77_DUMMY_MAIN
5088 #  ifdef __cplusplus
5089      extern "C"
5090 #  endif
5091    int F77_DUMMY_MAIN() { return 1; }
5092 #endif
5093 int
5094 main ()
5095 {
5096 dnet_ntoa ();
5097   ;
5098   return 0;
5099 }
5100 _ACEOF
5101 rm -f conftest.$ac_objext conftest$ac_exeext
5102 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5103   (eval $ac_link) 2>&5
5104   ac_status=$?
5105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5106   (exit $ac_status); } &&
5107          { ac_try='test -s conftest$ac_exeext'
5108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5109   (eval $ac_try) 2>&5
5110   ac_status=$?
5111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5112   (exit $ac_status); }; }; then
5113   ac_cv_lib_dnet_dnet_ntoa=yes
5114 else
5115   echo "$as_me: failed program was:" >&5
5116 cat conftest.$ac_ext >&5
5117 ac_cv_lib_dnet_dnet_ntoa=no
5118 fi
5119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5120 LIBS=$ac_check_lib_save_LIBS
5121 fi
5122 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5123 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5124 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5125   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5126 fi
5127
5128     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5129       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5130 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5131 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5132   echo $ECHO_N "(cached) $ECHO_C" >&6
5133 else
5134   ac_check_lib_save_LIBS=$LIBS
5135 LIBS="-ldnet_stub  $LIBS"
5136 cat >conftest.$ac_ext <<_ACEOF
5137 #line $LINENO "configure"
5138 #include "confdefs.h"
5139
5140 /* Override any gcc2 internal prototype to avoid an error.  */
5141 #ifdef __cplusplus
5142 extern "C"
5143 #endif
5144 /* We use char because int might match the return type of a gcc2
5145    builtin and then its argument prototype would still apply.  */
5146 char dnet_ntoa ();
5147 #ifdef F77_DUMMY_MAIN
5148 #  ifdef __cplusplus
5149      extern "C"
5150 #  endif
5151    int F77_DUMMY_MAIN() { return 1; }
5152 #endif
5153 int
5154 main ()
5155 {
5156 dnet_ntoa ();
5157   ;
5158   return 0;
5159 }
5160 _ACEOF
5161 rm -f conftest.$ac_objext conftest$ac_exeext
5162 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5163   (eval $ac_link) 2>&5
5164   ac_status=$?
5165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166   (exit $ac_status); } &&
5167          { ac_try='test -s conftest$ac_exeext'
5168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5169   (eval $ac_try) 2>&5
5170   ac_status=$?
5171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172   (exit $ac_status); }; }; then
5173   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5174 else
5175   echo "$as_me: failed program was:" >&5
5176 cat conftest.$ac_ext >&5
5177 ac_cv_lib_dnet_stub_dnet_ntoa=no
5178 fi
5179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5180 LIBS=$ac_check_lib_save_LIBS
5181 fi
5182 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5183 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5184 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5185   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5186 fi
5187
5188     fi
5189 fi
5190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5191     LIBS="$ac_xsave_LIBS"
5192
5193     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5194     # to get the SysV transport functions.
5195     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5196     # needs -lnsl.
5197     # The nsl library prevents programs from opening the X display
5198     # on Irix 5.2, according to T.E. Dickey.
5199     # The functions gethostbyname, getservbyname, and inet_addr are
5200     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5201     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5202 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5203 if test "${ac_cv_func_gethostbyname+set}" = set; then
5204   echo $ECHO_N "(cached) $ECHO_C" >&6
5205 else
5206   cat >conftest.$ac_ext <<_ACEOF
5207 #line $LINENO "configure"
5208 #include "confdefs.h"
5209 /* System header to define __stub macros and hopefully few prototypes,
5210     which can conflict with char gethostbyname (); below.  */
5211 #include <assert.h>
5212 /* Override any gcc2 internal prototype to avoid an error.  */
5213 #ifdef __cplusplus
5214 extern "C"
5215 #endif
5216 /* We use char because int might match the return type of a gcc2
5217    builtin and then its argument prototype would still apply.  */
5218 char gethostbyname ();
5219 char (*f) ();
5220
5221 #ifdef F77_DUMMY_MAIN
5222 #  ifdef __cplusplus
5223      extern "C"
5224 #  endif
5225    int F77_DUMMY_MAIN() { return 1; }
5226 #endif
5227 int
5228 main ()
5229 {
5230 /* The GNU C library defines this for functions which it implements
5231     to always fail with ENOSYS.  Some functions are actually named
5232     something starting with __ and the normal name is an alias.  */
5233 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5234 choke me
5235 #else
5236 f = gethostbyname;
5237 #endif
5238
5239   ;
5240   return 0;
5241 }
5242 _ACEOF
5243 rm -f conftest.$ac_objext conftest$ac_exeext
5244 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5245   (eval $ac_link) 2>&5
5246   ac_status=$?
5247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5248   (exit $ac_status); } &&
5249          { ac_try='test -s conftest$ac_exeext'
5250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5251   (eval $ac_try) 2>&5
5252   ac_status=$?
5253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5254   (exit $ac_status); }; }; then
5255   ac_cv_func_gethostbyname=yes
5256 else
5257   echo "$as_me: failed program was:" >&5
5258 cat conftest.$ac_ext >&5
5259 ac_cv_func_gethostbyname=no
5260 fi
5261 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5262 fi
5263 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5264 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5265
5266     if test $ac_cv_func_gethostbyname = no; then
5267       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5268 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5269 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5270   echo $ECHO_N "(cached) $ECHO_C" >&6
5271 else
5272   ac_check_lib_save_LIBS=$LIBS
5273 LIBS="-lnsl  $LIBS"
5274 cat >conftest.$ac_ext <<_ACEOF
5275 #line $LINENO "configure"
5276 #include "confdefs.h"
5277
5278 /* Override any gcc2 internal prototype to avoid an error.  */
5279 #ifdef __cplusplus
5280 extern "C"
5281 #endif
5282 /* We use char because int might match the return type of a gcc2
5283    builtin and then its argument prototype would still apply.  */
5284 char gethostbyname ();
5285 #ifdef F77_DUMMY_MAIN
5286 #  ifdef __cplusplus
5287      extern "C"
5288 #  endif
5289    int F77_DUMMY_MAIN() { return 1; }
5290 #endif
5291 int
5292 main ()
5293 {
5294 gethostbyname ();
5295   ;
5296   return 0;
5297 }
5298 _ACEOF
5299 rm -f conftest.$ac_objext conftest$ac_exeext
5300 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5301   (eval $ac_link) 2>&5
5302   ac_status=$?
5303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5304   (exit $ac_status); } &&
5305          { ac_try='test -s conftest$ac_exeext'
5306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5307   (eval $ac_try) 2>&5
5308   ac_status=$?
5309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5310   (exit $ac_status); }; }; then
5311   ac_cv_lib_nsl_gethostbyname=yes
5312 else
5313   echo "$as_me: failed program was:" >&5
5314 cat conftest.$ac_ext >&5
5315 ac_cv_lib_nsl_gethostbyname=no
5316 fi
5317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5318 LIBS=$ac_check_lib_save_LIBS
5319 fi
5320 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5321 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5322 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5323   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5324 fi
5325
5326       if test $ac_cv_lib_nsl_gethostbyname = no; then
5327         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5328 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5329 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5330   echo $ECHO_N "(cached) $ECHO_C" >&6
5331 else
5332   ac_check_lib_save_LIBS=$LIBS
5333 LIBS="-lbsd  $LIBS"
5334 cat >conftest.$ac_ext <<_ACEOF
5335 #line $LINENO "configure"
5336 #include "confdefs.h"
5337
5338 /* Override any gcc2 internal prototype to avoid an error.  */
5339 #ifdef __cplusplus
5340 extern "C"
5341 #endif
5342 /* We use char because int might match the return type of a gcc2
5343    builtin and then its argument prototype would still apply.  */
5344 char gethostbyname ();
5345 #ifdef F77_DUMMY_MAIN
5346 #  ifdef __cplusplus
5347      extern "C"
5348 #  endif
5349    int F77_DUMMY_MAIN() { return 1; }
5350 #endif
5351 int
5352 main ()
5353 {
5354 gethostbyname ();
5355   ;
5356   return 0;
5357 }
5358 _ACEOF
5359 rm -f conftest.$ac_objext conftest$ac_exeext
5360 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5361   (eval $ac_link) 2>&5
5362   ac_status=$?
5363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5364   (exit $ac_status); } &&
5365          { ac_try='test -s conftest$ac_exeext'
5366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5367   (eval $ac_try) 2>&5
5368   ac_status=$?
5369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5370   (exit $ac_status); }; }; then
5371   ac_cv_lib_bsd_gethostbyname=yes
5372 else
5373   echo "$as_me: failed program was:" >&5
5374 cat conftest.$ac_ext >&5
5375 ac_cv_lib_bsd_gethostbyname=no
5376 fi
5377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5378 LIBS=$ac_check_lib_save_LIBS
5379 fi
5380 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5381 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5382 if test $ac_cv_lib_bsd_gethostbyname = yes; then
5383   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5384 fi
5385
5386       fi
5387     fi
5388
5389     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5390     # socket/setsockopt and other routines are undefined under SCO ODT
5391     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5392     # on later versions), says Simon Leinen: it contains gethostby*
5393     # variants that don't use the nameserver (or something).  -lsocket
5394     # must be given before -lnsl if both are needed.  We assume that
5395     # if connect needs -lnsl, so does gethostbyname.
5396     echo "$as_me:$LINENO: checking for connect" >&5
5397 echo $ECHO_N "checking for connect... $ECHO_C" >&6
5398 if test "${ac_cv_func_connect+set}" = set; then
5399   echo $ECHO_N "(cached) $ECHO_C" >&6
5400 else
5401   cat >conftest.$ac_ext <<_ACEOF
5402 #line $LINENO "configure"
5403 #include "confdefs.h"
5404 /* System header to define __stub macros and hopefully few prototypes,
5405     which can conflict with char connect (); below.  */
5406 #include <assert.h>
5407 /* Override any gcc2 internal prototype to avoid an error.  */
5408 #ifdef __cplusplus
5409 extern "C"
5410 #endif
5411 /* We use char because int might match the return type of a gcc2
5412    builtin and then its argument prototype would still apply.  */
5413 char connect ();
5414 char (*f) ();
5415
5416 #ifdef F77_DUMMY_MAIN
5417 #  ifdef __cplusplus
5418      extern "C"
5419 #  endif
5420    int F77_DUMMY_MAIN() { return 1; }
5421 #endif
5422 int
5423 main ()
5424 {
5425 /* The GNU C library defines this for functions which it implements
5426     to always fail with ENOSYS.  Some functions are actually named
5427     something starting with __ and the normal name is an alias.  */
5428 #if defined (__stub_connect) || defined (__stub___connect)
5429 choke me
5430 #else
5431 f = connect;
5432 #endif
5433
5434   ;
5435   return 0;
5436 }
5437 _ACEOF
5438 rm -f conftest.$ac_objext conftest$ac_exeext
5439 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5440   (eval $ac_link) 2>&5
5441   ac_status=$?
5442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5443   (exit $ac_status); } &&
5444          { ac_try='test -s conftest$ac_exeext'
5445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5446   (eval $ac_try) 2>&5
5447   ac_status=$?
5448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5449   (exit $ac_status); }; }; then
5450   ac_cv_func_connect=yes
5451 else
5452   echo "$as_me: failed program was:" >&5
5453 cat conftest.$ac_ext >&5
5454 ac_cv_func_connect=no
5455 fi
5456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5457 fi
5458 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5459 echo "${ECHO_T}$ac_cv_func_connect" >&6
5460
5461     if test $ac_cv_func_connect = no; then
5462       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5463 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5464 if test "${ac_cv_lib_socket_connect+set}" = set; then
5465   echo $ECHO_N "(cached) $ECHO_C" >&6
5466 else
5467   ac_check_lib_save_LIBS=$LIBS
5468 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5469 cat >conftest.$ac_ext <<_ACEOF
5470 #line $LINENO "configure"
5471 #include "confdefs.h"
5472
5473 /* Override any gcc2 internal prototype to avoid an error.  */
5474 #ifdef __cplusplus
5475 extern "C"
5476 #endif
5477 /* We use char because int might match the return type of a gcc2
5478    builtin and then its argument prototype would still apply.  */
5479 char connect ();
5480 #ifdef F77_DUMMY_MAIN
5481 #  ifdef __cplusplus
5482      extern "C"
5483 #  endif
5484    int F77_DUMMY_MAIN() { return 1; }
5485 #endif
5486 int
5487 main ()
5488 {
5489 connect ();
5490   ;
5491   return 0;
5492 }
5493 _ACEOF
5494 rm -f conftest.$ac_objext conftest$ac_exeext
5495 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5496   (eval $ac_link) 2>&5
5497   ac_status=$?
5498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499   (exit $ac_status); } &&
5500          { ac_try='test -s conftest$ac_exeext'
5501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5502   (eval $ac_try) 2>&5
5503   ac_status=$?
5504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505   (exit $ac_status); }; }; then
5506   ac_cv_lib_socket_connect=yes
5507 else
5508   echo "$as_me: failed program was:" >&5
5509 cat conftest.$ac_ext >&5
5510 ac_cv_lib_socket_connect=no
5511 fi
5512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5513 LIBS=$ac_check_lib_save_LIBS
5514 fi
5515 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5516 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5517 if test $ac_cv_lib_socket_connect = yes; then
5518   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5519 fi
5520
5521     fi
5522
5523     # Guillermo Gomez says -lposix is necessary on A/UX.
5524     echo "$as_me:$LINENO: checking for remove" >&5
5525 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5526 if test "${ac_cv_func_remove+set}" = set; then
5527   echo $ECHO_N "(cached) $ECHO_C" >&6
5528 else
5529   cat >conftest.$ac_ext <<_ACEOF
5530 #line $LINENO "configure"
5531 #include "confdefs.h"
5532 /* System header to define __stub macros and hopefully few prototypes,
5533     which can conflict with char remove (); below.  */
5534 #include <assert.h>
5535 /* Override any gcc2 internal prototype to avoid an error.  */
5536 #ifdef __cplusplus
5537 extern "C"
5538 #endif
5539 /* We use char because int might match the return type of a gcc2
5540    builtin and then its argument prototype would still apply.  */
5541 char remove ();
5542 char (*f) ();
5543
5544 #ifdef F77_DUMMY_MAIN
5545 #  ifdef __cplusplus
5546      extern "C"
5547 #  endif
5548    int F77_DUMMY_MAIN() { return 1; }
5549 #endif
5550 int
5551 main ()
5552 {
5553 /* The GNU C library defines this for functions which it implements
5554     to always fail with ENOSYS.  Some functions are actually named
5555     something starting with __ and the normal name is an alias.  */
5556 #if defined (__stub_remove) || defined (__stub___remove)
5557 choke me
5558 #else
5559 f = remove;
5560 #endif
5561
5562   ;
5563   return 0;
5564 }
5565 _ACEOF
5566 rm -f conftest.$ac_objext conftest$ac_exeext
5567 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5568   (eval $ac_link) 2>&5
5569   ac_status=$?
5570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5571   (exit $ac_status); } &&
5572          { ac_try='test -s conftest$ac_exeext'
5573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5574   (eval $ac_try) 2>&5
5575   ac_status=$?
5576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5577   (exit $ac_status); }; }; then
5578   ac_cv_func_remove=yes
5579 else
5580   echo "$as_me: failed program was:" >&5
5581 cat conftest.$ac_ext >&5
5582 ac_cv_func_remove=no
5583 fi
5584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5585 fi
5586 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5587 echo "${ECHO_T}$ac_cv_func_remove" >&6
5588
5589     if test $ac_cv_func_remove = no; then
5590       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5591 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5592 if test "${ac_cv_lib_posix_remove+set}" = set; then
5593   echo $ECHO_N "(cached) $ECHO_C" >&6
5594 else
5595   ac_check_lib_save_LIBS=$LIBS
5596 LIBS="-lposix  $LIBS"
5597 cat >conftest.$ac_ext <<_ACEOF
5598 #line $LINENO "configure"
5599 #include "confdefs.h"
5600
5601 /* Override any gcc2 internal prototype to avoid an error.  */
5602 #ifdef __cplusplus
5603 extern "C"
5604 #endif
5605 /* We use char because int might match the return type of a gcc2
5606    builtin and then its argument prototype would still apply.  */
5607 char remove ();
5608 #ifdef F77_DUMMY_MAIN
5609 #  ifdef __cplusplus
5610      extern "C"
5611 #  endif
5612    int F77_DUMMY_MAIN() { return 1; }
5613 #endif
5614 int
5615 main ()
5616 {
5617 remove ();
5618   ;
5619   return 0;
5620 }
5621 _ACEOF
5622 rm -f conftest.$ac_objext conftest$ac_exeext
5623 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5624   (eval $ac_link) 2>&5
5625   ac_status=$?
5626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627   (exit $ac_status); } &&
5628          { ac_try='test -s conftest$ac_exeext'
5629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5630   (eval $ac_try) 2>&5
5631   ac_status=$?
5632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5633   (exit $ac_status); }; }; then
5634   ac_cv_lib_posix_remove=yes
5635 else
5636   echo "$as_me: failed program was:" >&5
5637 cat conftest.$ac_ext >&5
5638 ac_cv_lib_posix_remove=no
5639 fi
5640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5641 LIBS=$ac_check_lib_save_LIBS
5642 fi
5643 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5644 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5645 if test $ac_cv_lib_posix_remove = yes; then
5646   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5647 fi
5648
5649     fi
5650
5651     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5652     echo "$as_me:$LINENO: checking for shmat" >&5
5653 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5654 if test "${ac_cv_func_shmat+set}" = set; then
5655   echo $ECHO_N "(cached) $ECHO_C" >&6
5656 else
5657   cat >conftest.$ac_ext <<_ACEOF
5658 #line $LINENO "configure"
5659 #include "confdefs.h"
5660 /* System header to define __stub macros and hopefully few prototypes,
5661     which can conflict with char shmat (); below.  */
5662 #include <assert.h>
5663 /* Override any gcc2 internal prototype to avoid an error.  */
5664 #ifdef __cplusplus
5665 extern "C"
5666 #endif
5667 /* We use char because int might match the return type of a gcc2
5668    builtin and then its argument prototype would still apply.  */
5669 char shmat ();
5670 char (*f) ();
5671
5672 #ifdef F77_DUMMY_MAIN
5673 #  ifdef __cplusplus
5674      extern "C"
5675 #  endif
5676    int F77_DUMMY_MAIN() { return 1; }
5677 #endif
5678 int
5679 main ()
5680 {
5681 /* The GNU C library defines this for functions which it implements
5682     to always fail with ENOSYS.  Some functions are actually named
5683     something starting with __ and the normal name is an alias.  */
5684 #if defined (__stub_shmat) || defined (__stub___shmat)
5685 choke me
5686 #else
5687 f = shmat;
5688 #endif
5689
5690   ;
5691   return 0;
5692 }
5693 _ACEOF
5694 rm -f conftest.$ac_objext conftest$ac_exeext
5695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5696   (eval $ac_link) 2>&5
5697   ac_status=$?
5698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5699   (exit $ac_status); } &&
5700          { ac_try='test -s conftest$ac_exeext'
5701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5702   (eval $ac_try) 2>&5
5703   ac_status=$?
5704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5705   (exit $ac_status); }; }; then
5706   ac_cv_func_shmat=yes
5707 else
5708   echo "$as_me: failed program was:" >&5
5709 cat conftest.$ac_ext >&5
5710 ac_cv_func_shmat=no
5711 fi
5712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5713 fi
5714 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
5715 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5716
5717     if test $ac_cv_func_shmat = no; then
5718       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
5719 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5720 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5721   echo $ECHO_N "(cached) $ECHO_C" >&6
5722 else
5723   ac_check_lib_save_LIBS=$LIBS
5724 LIBS="-lipc  $LIBS"
5725 cat >conftest.$ac_ext <<_ACEOF
5726 #line $LINENO "configure"
5727 #include "confdefs.h"
5728
5729 /* Override any gcc2 internal prototype to avoid an error.  */
5730 #ifdef __cplusplus
5731 extern "C"
5732 #endif
5733 /* We use char because int might match the return type of a gcc2
5734    builtin and then its argument prototype would still apply.  */
5735 char shmat ();
5736 #ifdef F77_DUMMY_MAIN
5737 #  ifdef __cplusplus
5738      extern "C"
5739 #  endif
5740    int F77_DUMMY_MAIN() { return 1; }
5741 #endif
5742 int
5743 main ()
5744 {
5745 shmat ();
5746   ;
5747   return 0;
5748 }
5749 _ACEOF
5750 rm -f conftest.$ac_objext conftest$ac_exeext
5751 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5752   (eval $ac_link) 2>&5
5753   ac_status=$?
5754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5755   (exit $ac_status); } &&
5756          { ac_try='test -s conftest$ac_exeext'
5757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5758   (eval $ac_try) 2>&5
5759   ac_status=$?
5760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5761   (exit $ac_status); }; }; then
5762   ac_cv_lib_ipc_shmat=yes
5763 else
5764   echo "$as_me: failed program was:" >&5
5765 cat conftest.$ac_ext >&5
5766 ac_cv_lib_ipc_shmat=no
5767 fi
5768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5769 LIBS=$ac_check_lib_save_LIBS
5770 fi
5771 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
5772 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
5773 if test $ac_cv_lib_ipc_shmat = yes; then
5774   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5775 fi
5776
5777     fi
5778   fi
5779
5780   # Check for libraries that X11R6 Xt/Xaw programs need.
5781   ac_save_LDFLAGS=$LDFLAGS
5782   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5783   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5784   # check for ICE first), but we must link in the order -lSM -lICE or
5785   # we get undefined symbols.  So assume we have SM if we have ICE.
5786   # These have to be linked with before -lX11, unlike the other
5787   # libraries we check for below, so use a different variable.
5788   # John Interrante, Karl Berry
5789   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
5790 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
5791 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
5792   echo $ECHO_N "(cached) $ECHO_C" >&6
5793 else
5794   ac_check_lib_save_LIBS=$LIBS
5795 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5796 cat >conftest.$ac_ext <<_ACEOF
5797 #line $LINENO "configure"
5798 #include "confdefs.h"
5799
5800 /* Override any gcc2 internal prototype to avoid an error.  */
5801 #ifdef __cplusplus
5802 extern "C"
5803 #endif
5804 /* We use char because int might match the return type of a gcc2
5805    builtin and then its argument prototype would still apply.  */
5806 char IceConnectionNumber ();
5807 #ifdef F77_DUMMY_MAIN
5808 #  ifdef __cplusplus
5809      extern "C"
5810 #  endif
5811    int F77_DUMMY_MAIN() { return 1; }
5812 #endif
5813 int
5814 main ()
5815 {
5816 IceConnectionNumber ();
5817   ;
5818   return 0;
5819 }
5820 _ACEOF
5821 rm -f conftest.$ac_objext conftest$ac_exeext
5822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5823   (eval $ac_link) 2>&5
5824   ac_status=$?
5825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826   (exit $ac_status); } &&
5827          { ac_try='test -s conftest$ac_exeext'
5828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5829   (eval $ac_try) 2>&5
5830   ac_status=$?
5831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832   (exit $ac_status); }; }; then
5833   ac_cv_lib_ICE_IceConnectionNumber=yes
5834 else
5835   echo "$as_me: failed program was:" >&5
5836 cat conftest.$ac_ext >&5
5837 ac_cv_lib_ICE_IceConnectionNumber=no
5838 fi
5839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5840 LIBS=$ac_check_lib_save_LIBS
5841 fi
5842 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
5843 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
5844 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
5845   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5846 fi
5847
5848   LDFLAGS=$ac_save_LDFLAGS
5849
5850 fi
5851
5852
5853 if test "$have_x" != yes; then
5854   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
5855 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
5856    { (exit 1); exit 1; }; }
5857 fi
5858
5859
5860     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
5861 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
5862 if test "${ac_cv_x_app_defaults+set}" = set; then
5863   echo $ECHO_N "(cached) $ECHO_C" >&6
5864 else
5865
5866   rm -fr conftestdir
5867   if mkdir conftestdir; then
5868     cd conftestdir 2>/dev/null
5869     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5870     cat > Imakefile <<'EOF'
5871 acfindx:
5872         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
5873 EOF
5874     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
5875       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
5876       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5877     fi
5878     cd .. 2>/dev/null
5879     rm -fr conftestdir
5880   fi
5881       if test x"$ac_x_app_defaults" = x; then
5882
5883   # Look for the directory under a standard set of common directories.
5884   # Check X11 before X11Rn because it's often a symlink to the current release.
5885   for ac_dir in                                 \
5886     /usr/X11/lib/app-defaults                   \
5887     /usr/X11R6/lib/app-defaults                 \
5888     /usr/X11R6/lib/X11/app-defaults             \
5889     /usr/X11R5/lib/app-defaults                 \
5890     /usr/X11R5/lib/X11/app-defaults             \
5891     /usr/X11R4/lib/app-defaults                 \
5892     /usr/X11R4/lib/X11/app-defaults             \
5893                                                 \
5894     /usr/lib/X11/app-defaults                   \
5895     /usr/lib/X11R6/app-defaults                 \
5896     /usr/lib/X11R5/app-defaults                 \
5897     /usr/lib/X11R4/app-defaults                 \
5898                                                 \
5899     /usr/local/X11/lib/app-defaults             \
5900     /usr/local/X11R6/lib/app-defaults           \
5901     /usr/local/X11R5/lib/app-defaults           \
5902     /usr/local/X11R4/lib/app-defaults           \
5903                                                 \
5904     /usr/local/lib/X11/app-defaults             \
5905     /usr/local/lib/X11R6/app-defaults           \
5906     /usr/local/lib/X11R6/X11/app-defaults       \
5907     /usr/local/lib/X11R5/app-defaults           \
5908     /usr/local/lib/X11R5/X11/app-defaults       \
5909     /usr/local/lib/X11R4/app-defaults           \
5910     /usr/local/lib/X11R4/X11/app-defaults       \
5911                                                 \
5912     /usr/X386/lib/X11/app-defaults              \
5913     /usr/x386/lib/X11/app-defaults              \
5914     /usr/XFree86/lib/X11/app-defaults           \
5915                                                 \
5916     /usr/lib/X11/app-defaults                   \
5917     /usr/local/lib/X11/app-defaults             \
5918     /usr/unsupported/lib/X11/app-defaults       \
5919     /usr/athena/lib/X11/app-defaults            \
5920     /usr/local/x11r5/lib/X11/app-defaults       \
5921     /usr/lpp/Xamples/lib/X11/app-defaults       \
5922     /lib/usr/lib/X11/app-defaults               \
5923                                                 \
5924     /usr/openwin/lib/app-defaults               \
5925     /usr/openwin/lib/X11/app-defaults           \
5926     /usr/openwin/share/lib/app-defaults         \
5927     /usr/openwin/share/lib/X11/app-defaults     \
5928                                                 \
5929     /X11R6/lib/app-defaults                     \
5930     /X11R5/lib/app-defaults                     \
5931     /X11R4/lib/app-defaults                     \
5932     ; \
5933   do
5934     if test -d "$ac_dir"; then
5935       ac_x_app_defaults=$ac_dir
5936       break
5937     fi
5938   done
5939
5940       fi
5941       if test x"$ac_x_app_defaults" = x; then
5942         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
5943       else
5944         # Record where we found app-defaults for the cache.
5945         ac_cv_x_app_defaults="$ac_x_app_defaults"
5946       fi
5947 fi
5948 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
5949 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
5950     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
5951 case "$host" in
5952     *-hpux*)
5953
5954       # The following arcana was gleaned from conversations with
5955       # Eric Schwartz <erics@col.hp.com>:
5956       #
5957       # On HPUX 10.x, the parts of X that HP considers "standard" live in
5958       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
5959       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
5960       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
5961       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
5962       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
5963       # you don't need any -I or -L arguments.
5964       #
5965       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
5966       # are the same division as 10.x.  However, there are no symlinks to
5967       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
5968       # arguments are always necessary.
5969       #
5970       # However, X11R6 was available on HPUX 9.x as a patch: if that
5971       # patch was installed, then all of X11R6 went in to
5972       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
5973       #
5974       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
5975       # whether R5 was available as a patch; R6 undoubtedly was not.)
5976       #
5977       # So.  We try and use the highest numbered pair of
5978       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
5979       # that are available.  We do not mix and match different versions
5980       # of X.
5981       #
5982       # Question I still don't know the answer to: (do you?)
5983       #
5984       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
5985       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
5986       #     that contrib directory?  Did it contain so-called "standard"
5987       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
5988       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
5989       #     be a situation where one had to reach into the R5 headers and
5990       #     libs to find Xmu?  That is, must both R6 and R5 directories
5991       #     be on the -I and -L lists in that case?
5992       #
5993       for version in X11R6 X11R5 X11R4 ; do
5994         # if either pair of directories exists...
5995         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
5996         then
5997            # if contrib exists, use it...
5998            if test -d /usr/contrib/$version/include ; then
5999              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6000              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6001            fi
6002            # if the "standard" one exists, use it.
6003            if test -d /usr/include/$version ; then
6004              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6005              X_LIBS="$X_LIBS -L/usr/lib/$version"
6006            fi
6007            # since at least one of the pair exists, go no farther.
6008            break
6009         fi
6010       done
6011
6012       # Now find Motif.  Thanks for not making xmkmf find this by
6013       # default, you losers.
6014       #
6015       if test -d /usr/include/Motif2.1 ; then
6016         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6017         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6018       elif test -d /usr/include/Motif1.2 ; then
6019         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6020         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6021       elif test -d /usr/include/Motif1.1 ; then
6022         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6023         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6024       fi
6025
6026       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6027       #
6028       if test -d /opt/graphics/OpenGL/include ; then
6029         # HP-UX 10.20 puts it here
6030         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6031         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6032       elif test -d /opt/Mesa/lib ; then
6033         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6034         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6035       fi
6036
6037
6038       if test -d /opt/xpm/lib/X11 ; then
6039         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6040         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6041       fi
6042
6043       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6044       # in /usr/local/, unless there is already an xscreensaver in
6045       # /usr/local/bin/.  This can be overridden with the --prefix arg
6046       # to configure.  I'm not sure this is the right thing to do, but
6047       # Richard Lloyd says so...
6048       #
6049       if test \! -x /usr/local/bin/xscreensaver ; then
6050         ac_default_prefix=/opt/xscreensaver
6051       fi
6052
6053     ;;
6054     *-solaris*)
6055
6056       # Thanks for not making xmkmf find this by default, pinheads.
6057       # And thanks for moving things around again, too.  Is this
6058       # really the standard location now?  What happened to the
6059       # joke that this kind of thing went in /opt?
6060       # cthomp says "answer: CDE (Common Disorganized Environment)"
6061       #
6062       if test -f /usr/dt/include/Xm/Xm.h ; then
6063         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6064         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6065
6066         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6067         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6068 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6069 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6070   echo $ECHO_N "(cached) $ECHO_C" >&6
6071 else
6072   ac_check_lib_save_LIBS=$LIBS
6073 LIBS="-lgen  $LIBS"
6074 cat >conftest.$ac_ext <<_ACEOF
6075 #line $LINENO "configure"
6076 #include "confdefs.h"
6077
6078 /* Override any gcc2 internal prototype to avoid an error.  */
6079 #ifdef __cplusplus
6080 extern "C"
6081 #endif
6082 /* We use char because int might match the return type of a gcc2
6083    builtin and then its argument prototype would still apply.  */
6084 char regcmp ();
6085 #ifdef F77_DUMMY_MAIN
6086 #  ifdef __cplusplus
6087      extern "C"
6088 #  endif
6089    int F77_DUMMY_MAIN() { return 1; }
6090 #endif
6091 int
6092 main ()
6093 {
6094 regcmp ();
6095   ;
6096   return 0;
6097 }
6098 _ACEOF
6099 rm -f conftest.$ac_objext conftest$ac_exeext
6100 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6101   (eval $ac_link) 2>&5
6102   ac_status=$?
6103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6104   (exit $ac_status); } &&
6105          { ac_try='test -s conftest$ac_exeext'
6106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6107   (eval $ac_try) 2>&5
6108   ac_status=$?
6109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6110   (exit $ac_status); }; }; then
6111   ac_cv_lib_gen_regcmp=yes
6112 else
6113   echo "$as_me: failed program was:" >&5
6114 cat conftest.$ac_ext >&5
6115 ac_cv_lib_gen_regcmp=no
6116 fi
6117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6118 LIBS=$ac_check_lib_save_LIBS
6119 fi
6120 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6121 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6122 if test $ac_cv_lib_gen_regcmp = yes; then
6123   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6124 fi
6125
6126       fi
6127
6128     ;;
6129     *-darwin*)
6130
6131       # On MacOS X (10.x with "fink"), many things are under /sw/.
6132       #
6133       if test -d /sw/include ; then
6134         X_CFLAGS="-I/sw/include $X_CFLAGS"
6135         X_LIBS="-L/sw/lib $X_LIBS"
6136       fi
6137     ;;
6138   esac
6139 echo "$as_me:$LINENO: checking for XPointer" >&5
6140 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6141 if test "${ac_cv_xpointer+set}" = set; then
6142   echo $ECHO_N "(cached) $ECHO_C" >&6
6143 else
6144
6145   ac_save_CPPFLAGS="$CPPFLAGS"
6146   if test \! -z "$includedir" ; then
6147     CPPFLAGS="$CPPFLAGS -I$includedir"
6148   fi
6149   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6150   cat >conftest.$ac_ext <<_ACEOF
6151 #line $LINENO "configure"
6152 #include "confdefs.h"
6153 #include <X11/Xlib.h>
6154 #ifdef F77_DUMMY_MAIN
6155 #  ifdef __cplusplus
6156      extern "C"
6157 #  endif
6158    int F77_DUMMY_MAIN() { return 1; }
6159 #endif
6160 int
6161 main ()
6162 {
6163 XPointer foo = (XPointer) 0;
6164   ;
6165   return 0;
6166 }
6167 _ACEOF
6168 rm -f conftest.$ac_objext
6169 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6170   (eval $ac_compile) 2>&5
6171   ac_status=$?
6172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173   (exit $ac_status); } &&
6174          { ac_try='test -s conftest.$ac_objext'
6175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6176   (eval $ac_try) 2>&5
6177   ac_status=$?
6178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6179   (exit $ac_status); }; }; then
6180   ac_cv_xpointer=yes
6181 else
6182   echo "$as_me: failed program was:" >&5
6183 cat conftest.$ac_ext >&5
6184 ac_cv_xpointer=no
6185 fi
6186 rm -f conftest.$ac_objext conftest.$ac_ext
6187   CPPFLAGS="$ac_save_CPPFLAGS"
6188 fi
6189 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6190 echo "${ECHO_T}$ac_cv_xpointer" >&6
6191   if test "$ac_cv_xpointer" != yes; then
6192    cat >>confdefs.h <<\_ACEOF
6193 #define XPointer char*
6194 _ACEOF
6195
6196   fi
6197
6198
6199 ###############################################################################
6200 #
6201 #       Gettext support
6202 #
6203 ###############################################################################
6204
6205
6206
6207 if test -n ""; then
6208     echo "$as_me:$LINENO: checking for intltool >= " >&5
6209 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
6210
6211     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6212     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6213
6214     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6215
6216
6217     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6218         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
6219 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
6220     else
6221         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6222 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
6223         exit 1
6224     fi
6225 fi
6226
6227   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'
6228 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'
6229      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'
6230       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6231      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'
6232    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'
6233     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'
6234 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'
6235        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'
6236       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'
6237     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'
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251 # Use the tools built into the package, not the ones that are installed.
6252
6253 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6254 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6255 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6256
6257
6258
6259
6260
6261 # Extract the first word of "perl", so it can be a program name with args.
6262 set dummy perl; ac_word=$2
6263 echo "$as_me:$LINENO: checking for $ac_word" >&5
6264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6265 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
6266   echo $ECHO_N "(cached) $ECHO_C" >&6
6267 else
6268   case $INTLTOOL_PERL in
6269   [\\/]* | ?:[\\/]*)
6270   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6271   ;;
6272   *)
6273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6274 for as_dir in $PATH
6275 do
6276   IFS=$as_save_IFS
6277   test -z "$as_dir" && as_dir=.
6278   for ac_exec_ext in '' $ac_executable_extensions; do
6279   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6280     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6281     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6282     break 2
6283   fi
6284 done
6285 done
6286
6287   ;;
6288 esac
6289 fi
6290 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6291
6292 if test -n "$INTLTOOL_PERL"; then
6293   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
6294 echo "${ECHO_T}$INTLTOOL_PERL" >&6
6295 else
6296   echo "$as_me:$LINENO: result: no" >&5
6297 echo "${ECHO_T}no" >&6
6298 fi
6299
6300 if test -z "$INTLTOOL_PERL"; then
6301    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
6302 echo "$as_me: error: perl not found; required for intltool" >&2;}
6303    { (exit 1); exit 1; }; }
6304 fi
6305 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6306    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
6307 echo "$as_me: error: perl 5.x required for intltool" >&2;}
6308    { (exit 1); exit 1; }; }
6309 fi
6310
6311 # Remove file type tags (using []) from po/POTFILES.
6312
6313
6314
6315
6316
6317
6318
6319 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6320
6321 ac_config_commands="$ac_config_commands default-1"
6322
6323
6324
6325 GETTEXT_PACKAGE=xscreensaver
6326 cat >>confdefs.h <<_ACEOF
6327 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6328 _ACEOF
6329
6330 cat >>confdefs.h <<_ACEOF
6331 #define PACKAGE "$GETTEXT_PACKAGE"
6332 _ACEOF
6333
6334
6335
6336 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
6337 if test -n "$ac_tool_prefix"; then
6338   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6339 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6340 echo "$as_me:$LINENO: checking for $ac_word" >&5
6341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6342 if test "${ac_cv_prog_RANLIB+set}" = set; then
6343   echo $ECHO_N "(cached) $ECHO_C" >&6
6344 else
6345   if test -n "$RANLIB"; then
6346   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6347 else
6348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6349 for as_dir in $PATH
6350 do
6351   IFS=$as_save_IFS
6352   test -z "$as_dir" && as_dir=.
6353   for ac_exec_ext in '' $ac_executable_extensions; do
6354   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6355     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6356     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6357     break 2
6358   fi
6359 done
6360 done
6361
6362 fi
6363 fi
6364 RANLIB=$ac_cv_prog_RANLIB
6365 if test -n "$RANLIB"; then
6366   echo "$as_me:$LINENO: result: $RANLIB" >&5
6367 echo "${ECHO_T}$RANLIB" >&6
6368 else
6369   echo "$as_me:$LINENO: result: no" >&5
6370 echo "${ECHO_T}no" >&6
6371 fi
6372
6373 fi
6374 if test -z "$ac_cv_prog_RANLIB"; then
6375   ac_ct_RANLIB=$RANLIB
6376   # Extract the first word of "ranlib", so it can be a program name with args.
6377 set dummy ranlib; ac_word=$2
6378 echo "$as_me:$LINENO: checking for $ac_word" >&5
6379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6380 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6381   echo $ECHO_N "(cached) $ECHO_C" >&6
6382 else
6383   if test -n "$ac_ct_RANLIB"; then
6384   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6385 else
6386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6387 for as_dir in $PATH
6388 do
6389   IFS=$as_save_IFS
6390   test -z "$as_dir" && as_dir=.
6391   for ac_exec_ext in '' $ac_executable_extensions; do
6392   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6393     ac_cv_prog_ac_ct_RANLIB="ranlib"
6394     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6395     break 2
6396   fi
6397 done
6398 done
6399
6400   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6401 fi
6402 fi
6403 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6404 if test -n "$ac_ct_RANLIB"; then
6405   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6406 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6407 else
6408   echo "$as_me:$LINENO: result: no" >&5
6409 echo "${ECHO_T}no" >&6
6410 fi
6411
6412   RANLIB=$ac_ct_RANLIB
6413 else
6414   RANLIB="$ac_cv_prog_RANLIB"
6415 fi
6416
6417 echo "$as_me:$LINENO: checking for off_t" >&5
6418 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6419 if test "${ac_cv_type_off_t+set}" = set; then
6420   echo $ECHO_N "(cached) $ECHO_C" >&6
6421 else
6422   cat >conftest.$ac_ext <<_ACEOF
6423 #line $LINENO "configure"
6424 #include "confdefs.h"
6425 $ac_includes_default
6426 #ifdef F77_DUMMY_MAIN
6427 #  ifdef __cplusplus
6428      extern "C"
6429 #  endif
6430    int F77_DUMMY_MAIN() { return 1; }
6431 #endif
6432 int
6433 main ()
6434 {
6435 if ((off_t *) 0)
6436   return 0;
6437 if (sizeof (off_t))
6438   return 0;
6439   ;
6440   return 0;
6441 }
6442 _ACEOF
6443 rm -f conftest.$ac_objext
6444 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6445   (eval $ac_compile) 2>&5
6446   ac_status=$?
6447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6448   (exit $ac_status); } &&
6449          { ac_try='test -s conftest.$ac_objext'
6450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6451   (eval $ac_try) 2>&5
6452   ac_status=$?
6453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454   (exit $ac_status); }; }; then
6455   ac_cv_type_off_t=yes
6456 else
6457   echo "$as_me: failed program was:" >&5
6458 cat conftest.$ac_ext >&5
6459 ac_cv_type_off_t=no
6460 fi
6461 rm -f conftest.$ac_objext conftest.$ac_ext
6462 fi
6463 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6464 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6465 if test $ac_cv_type_off_t = yes; then
6466   :
6467 else
6468
6469 cat >>confdefs.h <<_ACEOF
6470 #define off_t long
6471 _ACEOF
6472
6473 fi
6474
6475 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6476 # for constant arguments.  Useless!
6477 echo "$as_me:$LINENO: checking for working alloca.h" >&5
6478 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6479 if test "${ac_cv_working_alloca_h+set}" = set; then
6480   echo $ECHO_N "(cached) $ECHO_C" >&6
6481 else
6482   cat >conftest.$ac_ext <<_ACEOF
6483 #line $LINENO "configure"
6484 #include "confdefs.h"
6485 #include <alloca.h>
6486 #ifdef F77_DUMMY_MAIN
6487 #  ifdef __cplusplus
6488      extern "C"
6489 #  endif
6490    int F77_DUMMY_MAIN() { return 1; }
6491 #endif
6492 int
6493 main ()
6494 {
6495 char *p = (char *) alloca (2 * sizeof (int));
6496   ;
6497   return 0;
6498 }
6499 _ACEOF
6500 rm -f conftest.$ac_objext conftest$ac_exeext
6501 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6502   (eval $ac_link) 2>&5
6503   ac_status=$?
6504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6505   (exit $ac_status); } &&
6506          { ac_try='test -s conftest$ac_exeext'
6507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6508   (eval $ac_try) 2>&5
6509   ac_status=$?
6510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6511   (exit $ac_status); }; }; then
6512   ac_cv_working_alloca_h=yes
6513 else
6514   echo "$as_me: failed program was:" >&5
6515 cat conftest.$ac_ext >&5
6516 ac_cv_working_alloca_h=no
6517 fi
6518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6519 fi
6520 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
6521 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6522 if test $ac_cv_working_alloca_h = yes; then
6523
6524 cat >>confdefs.h <<\_ACEOF
6525 #define HAVE_ALLOCA_H 1
6526 _ACEOF
6527
6528 fi
6529
6530 echo "$as_me:$LINENO: checking for alloca" >&5
6531 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6532 if test "${ac_cv_func_alloca_works+set}" = set; then
6533   echo $ECHO_N "(cached) $ECHO_C" >&6
6534 else
6535   cat >conftest.$ac_ext <<_ACEOF
6536 #line $LINENO "configure"
6537 #include "confdefs.h"
6538 #ifdef __GNUC__
6539 # define alloca __builtin_alloca
6540 #else
6541 # ifdef _MSC_VER
6542 #  include <malloc.h>
6543 #  define alloca _alloca
6544 # else
6545 #  if HAVE_ALLOCA_H
6546 #   include <alloca.h>
6547 #  else
6548 #   ifdef _AIX
6549  #pragma alloca
6550 #   else
6551 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6552 char *alloca ();
6553 #    endif
6554 #   endif
6555 #  endif
6556 # endif
6557 #endif
6558
6559 #ifdef F77_DUMMY_MAIN
6560 #  ifdef __cplusplus
6561      extern "C"
6562 #  endif
6563    int F77_DUMMY_MAIN() { return 1; }
6564 #endif
6565 int
6566 main ()
6567 {
6568 char *p = (char *) alloca (1);
6569   ;
6570   return 0;
6571 }
6572 _ACEOF
6573 rm -f conftest.$ac_objext conftest$ac_exeext
6574 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6575   (eval $ac_link) 2>&5
6576   ac_status=$?
6577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6578   (exit $ac_status); } &&
6579          { ac_try='test -s conftest$ac_exeext'
6580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6581   (eval $ac_try) 2>&5
6582   ac_status=$?
6583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584   (exit $ac_status); }; }; then
6585   ac_cv_func_alloca_works=yes
6586 else
6587   echo "$as_me: failed program was:" >&5
6588 cat conftest.$ac_ext >&5
6589 ac_cv_func_alloca_works=no
6590 fi
6591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6592 fi
6593 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
6594 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6595
6596 if test $ac_cv_func_alloca_works = yes; then
6597
6598 cat >>confdefs.h <<\_ACEOF
6599 #define HAVE_ALLOCA 1
6600 _ACEOF
6601
6602 else
6603   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6604 # that cause trouble.  Some versions do not even contain alloca or
6605 # contain a buggy version.  If you still want to use their alloca,
6606 # use ar to extract alloca.o from them instead of compiling alloca.c.
6607
6608 ALLOCA=alloca.$ac_objext
6609
6610 cat >>confdefs.h <<\_ACEOF
6611 #define C_ALLOCA 1
6612 _ACEOF
6613
6614
6615 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
6616 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6617 if test "${ac_cv_os_cray+set}" = set; then
6618   echo $ECHO_N "(cached) $ECHO_C" >&6
6619 else
6620   cat >conftest.$ac_ext <<_ACEOF
6621 #line $LINENO "configure"
6622 #include "confdefs.h"
6623 #if defined(CRAY) && ! defined(CRAY2)
6624 webecray
6625 #else
6626 wenotbecray
6627 #endif
6628
6629 _ACEOF
6630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6631   egrep "webecray" >/dev/null 2>&1; then
6632   ac_cv_os_cray=yes
6633 else
6634   ac_cv_os_cray=no
6635 fi
6636 rm -f conftest*
6637
6638 fi
6639 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6640 echo "${ECHO_T}$ac_cv_os_cray" >&6
6641 if test $ac_cv_os_cray = yes; then
6642   for ac_func in _getb67 GETB67 getb67; do
6643     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6644 echo "$as_me:$LINENO: checking for $ac_func" >&5
6645 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6646 if eval "test \"\${$as_ac_var+set}\" = set"; then
6647   echo $ECHO_N "(cached) $ECHO_C" >&6
6648 else
6649   cat >conftest.$ac_ext <<_ACEOF
6650 #line $LINENO "configure"
6651 #include "confdefs.h"
6652 /* System header to define __stub macros and hopefully few prototypes,
6653     which can conflict with char $ac_func (); below.  */
6654 #include <assert.h>
6655 /* Override any gcc2 internal prototype to avoid an error.  */
6656 #ifdef __cplusplus
6657 extern "C"
6658 #endif
6659 /* We use char because int might match the return type of a gcc2
6660    builtin and then its argument prototype would still apply.  */
6661 char $ac_func ();
6662 char (*f) ();
6663
6664 #ifdef F77_DUMMY_MAIN
6665 #  ifdef __cplusplus
6666      extern "C"
6667 #  endif
6668    int F77_DUMMY_MAIN() { return 1; }
6669 #endif
6670 int
6671 main ()
6672 {
6673 /* The GNU C library defines this for functions which it implements
6674     to always fail with ENOSYS.  Some functions are actually named
6675     something starting with __ and the normal name is an alias.  */
6676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6677 choke me
6678 #else
6679 f = $ac_func;
6680 #endif
6681
6682   ;
6683   return 0;
6684 }
6685 _ACEOF
6686 rm -f conftest.$ac_objext conftest$ac_exeext
6687 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6688   (eval $ac_link) 2>&5
6689   ac_status=$?
6690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6691   (exit $ac_status); } &&
6692          { ac_try='test -s conftest$ac_exeext'
6693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6694   (eval $ac_try) 2>&5
6695   ac_status=$?
6696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6697   (exit $ac_status); }; }; then
6698   eval "$as_ac_var=yes"
6699 else
6700   echo "$as_me: failed program was:" >&5
6701 cat conftest.$ac_ext >&5
6702 eval "$as_ac_var=no"
6703 fi
6704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6705 fi
6706 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6707 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6708 if test `eval echo '${'$as_ac_var'}'` = yes; then
6709
6710 cat >>confdefs.h <<_ACEOF
6711 #define CRAY_STACKSEG_END $ac_func
6712 _ACEOF
6713
6714     break
6715 fi
6716
6717   done
6718 fi
6719
6720 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6721 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6722 if test "${ac_cv_c_stack_direction+set}" = set; then
6723   echo $ECHO_N "(cached) $ECHO_C" >&6
6724 else
6725   if test "$cross_compiling" = yes; then
6726   ac_cv_c_stack_direction=0
6727 else
6728   cat >conftest.$ac_ext <<_ACEOF
6729 #line $LINENO "configure"
6730 #include "confdefs.h"
6731 int
6732 find_stack_direction ()
6733 {
6734   static char *addr = 0;
6735   auto char dummy;
6736   if (addr == 0)
6737     {
6738       addr = &dummy;
6739       return find_stack_direction ();
6740     }
6741   else
6742     return (&dummy > addr) ? 1 : -1;
6743 }
6744
6745 int
6746 main ()
6747 {
6748   exit (find_stack_direction () < 0);
6749 }
6750 _ACEOF
6751 rm -f conftest$ac_exeext
6752 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6753   (eval $ac_link) 2>&5
6754   ac_status=$?
6755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6756   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6758   (eval $ac_try) 2>&5
6759   ac_status=$?
6760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761   (exit $ac_status); }; }; then
6762   ac_cv_c_stack_direction=1
6763 else
6764   echo "$as_me: program exited with status $ac_status" >&5
6765 echo "$as_me: failed program was:" >&5
6766 cat conftest.$ac_ext >&5
6767 ( exit $ac_status )
6768 ac_cv_c_stack_direction=-1
6769 fi
6770 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6771 fi
6772 fi
6773 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
6774 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
6775
6776 cat >>confdefs.h <<_ACEOF
6777 #define STACK_DIRECTION $ac_cv_c_stack_direction
6778 _ACEOF
6779
6780
6781 fi
6782
6783
6784
6785 for ac_header in stdlib.h unistd.h
6786 do
6787 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6788 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6789   echo "$as_me:$LINENO: checking for $ac_header" >&5
6790 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6791 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6792   echo $ECHO_N "(cached) $ECHO_C" >&6
6793 fi
6794 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6795 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6796 else
6797   # Is the header compilable?
6798 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6799 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6800 cat >conftest.$ac_ext <<_ACEOF
6801 #line $LINENO "configure"
6802 #include "confdefs.h"
6803 $ac_includes_default
6804 #include <$ac_header>
6805 _ACEOF
6806 rm -f conftest.$ac_objext
6807 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6808   (eval $ac_compile) 2>&5
6809   ac_status=$?
6810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6811   (exit $ac_status); } &&
6812          { ac_try='test -s conftest.$ac_objext'
6813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6814   (eval $ac_try) 2>&5
6815   ac_status=$?
6816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6817   (exit $ac_status); }; }; then
6818   ac_header_compiler=yes
6819 else
6820   echo "$as_me: failed program was:" >&5
6821 cat conftest.$ac_ext >&5
6822 ac_header_compiler=no
6823 fi
6824 rm -f conftest.$ac_objext conftest.$ac_ext
6825 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6826 echo "${ECHO_T}$ac_header_compiler" >&6
6827
6828 # Is the header present?
6829 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6830 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6831 cat >conftest.$ac_ext <<_ACEOF
6832 #line $LINENO "configure"
6833 #include "confdefs.h"
6834 #include <$ac_header>
6835 _ACEOF
6836 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6837   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6838   ac_status=$?
6839   egrep -v '^ *\+' conftest.er1 >conftest.err
6840   rm -f conftest.er1
6841   cat conftest.err >&5
6842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6843   (exit $ac_status); } >/dev/null; then
6844   if test -s conftest.err; then
6845     ac_cpp_err=$ac_c_preproc_warn_flag
6846   else
6847     ac_cpp_err=
6848   fi
6849 else
6850   ac_cpp_err=yes
6851 fi
6852 if test -z "$ac_cpp_err"; then
6853   ac_header_preproc=yes
6854 else
6855   echo "$as_me: failed program was:" >&5
6856   cat conftest.$ac_ext >&5
6857   ac_header_preproc=no
6858 fi
6859 rm -f conftest.err conftest.$ac_ext
6860 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6861 echo "${ECHO_T}$ac_header_preproc" >&6
6862
6863 # So?  What about this header?
6864 case $ac_header_compiler:$ac_header_preproc in
6865   yes:no )
6866     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6867 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6868     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6869 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6870   no:yes )
6871     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6872 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6873     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6874 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6875     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6876 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6877 esac
6878 echo "$as_me:$LINENO: checking for $ac_header" >&5
6879 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6880 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6881   echo $ECHO_N "(cached) $ECHO_C" >&6
6882 else
6883   eval "$as_ac_Header=$ac_header_preproc"
6884 fi
6885 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6886 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6887
6888 fi
6889 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6890   cat >>confdefs.h <<_ACEOF
6891 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6892 _ACEOF
6893
6894 fi
6895
6896 done
6897
6898
6899 for ac_func in getpagesize
6900 do
6901 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6902 echo "$as_me:$LINENO: checking for $ac_func" >&5
6903 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6904 if eval "test \"\${$as_ac_var+set}\" = set"; then
6905   echo $ECHO_N "(cached) $ECHO_C" >&6
6906 else
6907   cat >conftest.$ac_ext <<_ACEOF
6908 #line $LINENO "configure"
6909 #include "confdefs.h"
6910 /* System header to define __stub macros and hopefully few prototypes,
6911     which can conflict with char $ac_func (); below.  */
6912 #include <assert.h>
6913 /* Override any gcc2 internal prototype to avoid an error.  */
6914 #ifdef __cplusplus
6915 extern "C"
6916 #endif
6917 /* We use char because int might match the return type of a gcc2
6918    builtin and then its argument prototype would still apply.  */
6919 char $ac_func ();
6920 char (*f) ();
6921
6922 #ifdef F77_DUMMY_MAIN
6923 #  ifdef __cplusplus
6924      extern "C"
6925 #  endif
6926    int F77_DUMMY_MAIN() { return 1; }
6927 #endif
6928 int
6929 main ()
6930 {
6931 /* The GNU C library defines this for functions which it implements
6932     to always fail with ENOSYS.  Some functions are actually named
6933     something starting with __ and the normal name is an alias.  */
6934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6935 choke me
6936 #else
6937 f = $ac_func;
6938 #endif
6939
6940   ;
6941   return 0;
6942 }
6943 _ACEOF
6944 rm -f conftest.$ac_objext conftest$ac_exeext
6945 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6946   (eval $ac_link) 2>&5
6947   ac_status=$?
6948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6949   (exit $ac_status); } &&
6950          { ac_try='test -s conftest$ac_exeext'
6951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6952   (eval $ac_try) 2>&5
6953   ac_status=$?
6954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6955   (exit $ac_status); }; }; then
6956   eval "$as_ac_var=yes"
6957 else
6958   echo "$as_me: failed program was:" >&5
6959 cat conftest.$ac_ext >&5
6960 eval "$as_ac_var=no"
6961 fi
6962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6963 fi
6964 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6965 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6966 if test `eval echo '${'$as_ac_var'}'` = yes; then
6967   cat >>confdefs.h <<_ACEOF
6968 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6969 _ACEOF
6970
6971 fi
6972 done
6973
6974 echo "$as_me:$LINENO: checking for working mmap" >&5
6975 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
6976 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
6977   echo $ECHO_N "(cached) $ECHO_C" >&6
6978 else
6979   if test "$cross_compiling" = yes; then
6980   ac_cv_func_mmap_fixed_mapped=no
6981 else
6982   cat >conftest.$ac_ext <<_ACEOF
6983 #line $LINENO "configure"
6984 #include "confdefs.h"
6985 $ac_includes_default
6986 /* malloc might have been renamed as rpl_malloc. */
6987 #undef malloc
6988
6989 /* Thanks to Mike Haertel and Jim Avera for this test.
6990    Here is a matrix of mmap possibilities:
6991         mmap private not fixed
6992         mmap private fixed at somewhere currently unmapped
6993         mmap private fixed at somewhere already mapped
6994         mmap shared not fixed
6995         mmap shared fixed at somewhere currently unmapped
6996         mmap shared fixed at somewhere already mapped
6997    For private mappings, we should verify that changes cannot be read()
6998    back from the file, nor mmap's back from the file at a different
6999    address.  (There have been systems where private was not correctly
7000    implemented like the infamous i386 svr4.0, and systems where the
7001    VM page cache was not coherent with the file system buffer cache
7002    like early versions of FreeBSD and possibly contemporary NetBSD.)
7003    For shared mappings, we should conversely verify that changes get
7004    propagated back to all the places they're supposed to be.
7005
7006    Grep wants private fixed already mapped.
7007    The main things grep needs to know about mmap are:
7008    * does it exist and is it safe to write into the mmap'd area
7009    * how to use it (BSD variants)  */
7010
7011 #include <fcntl.h>
7012 #include <sys/mman.h>
7013
7014 #if !STDC_HEADERS && !HAVE_STDLIB_H
7015 char *malloc ();
7016 #endif
7017
7018 /* This mess was copied from the GNU getpagesize.h.  */
7019 #if !HAVE_GETPAGESIZE
7020 /* Assume that all systems that can run configure have sys/param.h.  */
7021 # if !HAVE_SYS_PARAM_H
7022 #  define HAVE_SYS_PARAM_H 1
7023 # endif
7024
7025 # ifdef _SC_PAGESIZE
7026 #  define getpagesize() sysconf(_SC_PAGESIZE)
7027 # else /* no _SC_PAGESIZE */
7028 #  if HAVE_SYS_PARAM_H
7029 #   include <sys/param.h>
7030 #   ifdef EXEC_PAGESIZE
7031 #    define getpagesize() EXEC_PAGESIZE
7032 #   else /* no EXEC_PAGESIZE */
7033 #    ifdef NBPG
7034 #     define getpagesize() NBPG * CLSIZE
7035 #     ifndef CLSIZE
7036 #      define CLSIZE 1
7037 #     endif /* no CLSIZE */
7038 #    else /* no NBPG */
7039 #     ifdef NBPC
7040 #      define getpagesize() NBPC
7041 #     else /* no NBPC */
7042 #      ifdef PAGESIZE
7043 #       define getpagesize() PAGESIZE
7044 #      endif /* PAGESIZE */
7045 #     endif /* no NBPC */
7046 #    endif /* no NBPG */
7047 #   endif /* no EXEC_PAGESIZE */
7048 #  else /* no HAVE_SYS_PARAM_H */
7049 #   define getpagesize() 8192   /* punt totally */
7050 #  endif /* no HAVE_SYS_PARAM_H */
7051 # endif /* no _SC_PAGESIZE */
7052
7053 #endif /* no HAVE_GETPAGESIZE */
7054
7055 int
7056 main ()
7057 {
7058   char *data, *data2, *data3;
7059   int i, pagesize;
7060   int fd;
7061
7062   pagesize = getpagesize ();
7063
7064   /* First, make a file with some known garbage in it. */
7065   data = (char *) malloc (pagesize);
7066   if (!data)
7067     exit (1);
7068   for (i = 0; i < pagesize; ++i)
7069     *(data + i) = rand ();
7070   umask (0);
7071   fd = creat ("conftest.mmap", 0600);
7072   if (fd < 0)
7073     exit (1);
7074   if (write (fd, data, pagesize) != pagesize)
7075     exit (1);
7076   close (fd);
7077
7078   /* Next, try to mmap the file at a fixed address which already has
7079      something else allocated at it.  If we can, also make sure that
7080      we see the same garbage.  */
7081   fd = open ("conftest.mmap", O_RDWR);
7082   if (fd < 0)
7083     exit (1);
7084   data2 = (char *) malloc (2 * pagesize);
7085   if (!data2)
7086     exit (1);
7087   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7088   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7089                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7090     exit (1);
7091   for (i = 0; i < pagesize; ++i)
7092     if (*(data + i) != *(data2 + i))
7093       exit (1);
7094
7095   /* Finally, make sure that changes to the mapped area do not
7096      percolate back to the file as seen by read().  (This is a bug on
7097      some variants of i386 svr4.0.)  */
7098   for (i = 0; i < pagesize; ++i)
7099     *(data2 + i) = *(data2 + i) + 1;
7100   data3 = (char *) malloc (pagesize);
7101   if (!data3)
7102     exit (1);
7103   if (read (fd, data3, pagesize) != pagesize)
7104     exit (1);
7105   for (i = 0; i < pagesize; ++i)
7106     if (*(data + i) != *(data3 + i))
7107       exit (1);
7108   close (fd);
7109   exit (0);
7110 }
7111 _ACEOF
7112 rm -f conftest$ac_exeext
7113 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7114   (eval $ac_link) 2>&5
7115   ac_status=$?
7116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7117   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7119   (eval $ac_try) 2>&5
7120   ac_status=$?
7121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122   (exit $ac_status); }; }; then
7123   ac_cv_func_mmap_fixed_mapped=yes
7124 else
7125   echo "$as_me: program exited with status $ac_status" >&5
7126 echo "$as_me: failed program was:" >&5
7127 cat conftest.$ac_ext >&5
7128 ( exit $ac_status )
7129 ac_cv_func_mmap_fixed_mapped=no
7130 fi
7131 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7132 fi
7133 fi
7134 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7135 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7136 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7137
7138 cat >>confdefs.h <<\_ACEOF
7139 #define HAVE_MMAP 1
7140 _ACEOF
7141
7142 fi
7143 rm -f conftest.mmap
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7155 unistd.h sys/param.h
7156 do
7157 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7158 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7159   echo "$as_me:$LINENO: checking for $ac_header" >&5
7160 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7161 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7162   echo $ECHO_N "(cached) $ECHO_C" >&6
7163 fi
7164 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7165 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7166 else
7167   # Is the header compilable?
7168 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7169 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7170 cat >conftest.$ac_ext <<_ACEOF
7171 #line $LINENO "configure"
7172 #include "confdefs.h"
7173 $ac_includes_default
7174 #include <$ac_header>
7175 _ACEOF
7176 rm -f conftest.$ac_objext
7177 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7178   (eval $ac_compile) 2>&5
7179   ac_status=$?
7180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7181   (exit $ac_status); } &&
7182          { ac_try='test -s conftest.$ac_objext'
7183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7184   (eval $ac_try) 2>&5
7185   ac_status=$?
7186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7187   (exit $ac_status); }; }; then
7188   ac_header_compiler=yes
7189 else
7190   echo "$as_me: failed program was:" >&5
7191 cat conftest.$ac_ext >&5
7192 ac_header_compiler=no
7193 fi
7194 rm -f conftest.$ac_objext conftest.$ac_ext
7195 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7196 echo "${ECHO_T}$ac_header_compiler" >&6
7197
7198 # Is the header present?
7199 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7200 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7201 cat >conftest.$ac_ext <<_ACEOF
7202 #line $LINENO "configure"
7203 #include "confdefs.h"
7204 #include <$ac_header>
7205 _ACEOF
7206 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7207   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7208   ac_status=$?
7209   egrep -v '^ *\+' conftest.er1 >conftest.err
7210   rm -f conftest.er1
7211   cat conftest.err >&5
7212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7213   (exit $ac_status); } >/dev/null; then
7214   if test -s conftest.err; then
7215     ac_cpp_err=$ac_c_preproc_warn_flag
7216   else
7217     ac_cpp_err=
7218   fi
7219 else
7220   ac_cpp_err=yes
7221 fi
7222 if test -z "$ac_cpp_err"; then
7223   ac_header_preproc=yes
7224 else
7225   echo "$as_me: failed program was:" >&5
7226   cat conftest.$ac_ext >&5
7227   ac_header_preproc=no
7228 fi
7229 rm -f conftest.err conftest.$ac_ext
7230 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7231 echo "${ECHO_T}$ac_header_preproc" >&6
7232
7233 # So?  What about this header?
7234 case $ac_header_compiler:$ac_header_preproc in
7235   yes:no )
7236     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7237 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7238     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7239 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7240   no:yes )
7241     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7242 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7243     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7244 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7245     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7246 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7247 esac
7248 echo "$as_me:$LINENO: checking for $ac_header" >&5
7249 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7250 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7251   echo $ECHO_N "(cached) $ECHO_C" >&6
7252 else
7253   eval "$as_ac_Header=$ac_header_preproc"
7254 fi
7255 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7256 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7257
7258 fi
7259 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7260   cat >>confdefs.h <<_ACEOF
7261 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7262 _ACEOF
7263
7264 fi
7265
7266 done
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7280 strdup __argz_count __argz_stringify __argz_next
7281 do
7282 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7283 echo "$as_me:$LINENO: checking for $ac_func" >&5
7284 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7285 if eval "test \"\${$as_ac_var+set}\" = set"; then
7286   echo $ECHO_N "(cached) $ECHO_C" >&6
7287 else
7288   cat >conftest.$ac_ext <<_ACEOF
7289 #line $LINENO "configure"
7290 #include "confdefs.h"
7291 /* System header to define __stub macros and hopefully few prototypes,
7292     which can conflict with char $ac_func (); below.  */
7293 #include <assert.h>
7294 /* Override any gcc2 internal prototype to avoid an error.  */
7295 #ifdef __cplusplus
7296 extern "C"
7297 #endif
7298 /* We use char because int might match the return type of a gcc2
7299    builtin and then its argument prototype would still apply.  */
7300 char $ac_func ();
7301 char (*f) ();
7302
7303 #ifdef F77_DUMMY_MAIN
7304 #  ifdef __cplusplus
7305      extern "C"
7306 #  endif
7307    int F77_DUMMY_MAIN() { return 1; }
7308 #endif
7309 int
7310 main ()
7311 {
7312 /* The GNU C library defines this for functions which it implements
7313     to always fail with ENOSYS.  Some functions are actually named
7314     something starting with __ and the normal name is an alias.  */
7315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7316 choke me
7317 #else
7318 f = $ac_func;
7319 #endif
7320
7321   ;
7322   return 0;
7323 }
7324 _ACEOF
7325 rm -f conftest.$ac_objext conftest$ac_exeext
7326 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7327   (eval $ac_link) 2>&5
7328   ac_status=$?
7329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7330   (exit $ac_status); } &&
7331          { ac_try='test -s conftest$ac_exeext'
7332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7333   (eval $ac_try) 2>&5
7334   ac_status=$?
7335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7336   (exit $ac_status); }; }; then
7337   eval "$as_ac_var=yes"
7338 else
7339   echo "$as_me: failed program was:" >&5
7340 cat conftest.$ac_ext >&5
7341 eval "$as_ac_var=no"
7342 fi
7343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7344 fi
7345 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7346 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7347 if test `eval echo '${'$as_ac_var'}'` = yes; then
7348   cat >>confdefs.h <<_ACEOF
7349 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7350 _ACEOF
7351
7352 fi
7353 done
7354
7355
7356    if test $ac_cv_header_locale_h = yes; then
7357     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7358 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7359 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7360   echo $ECHO_N "(cached) $ECHO_C" >&6
7361 else
7362   cat >conftest.$ac_ext <<_ACEOF
7363 #line $LINENO "configure"
7364 #include "confdefs.h"
7365 #include <locale.h>
7366 #ifdef F77_DUMMY_MAIN
7367 #  ifdef __cplusplus
7368      extern "C"
7369 #  endif
7370    int F77_DUMMY_MAIN() { return 1; }
7371 #endif
7372 int
7373 main ()
7374 {
7375 return LC_MESSAGES
7376   ;
7377   return 0;
7378 }
7379 _ACEOF
7380 rm -f conftest.$ac_objext conftest$ac_exeext
7381 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7382   (eval $ac_link) 2>&5
7383   ac_status=$?
7384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7385   (exit $ac_status); } &&
7386          { ac_try='test -s conftest$ac_exeext'
7387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7388   (eval $ac_try) 2>&5
7389   ac_status=$?
7390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391   (exit $ac_status); }; }; then
7392   am_cv_val_LC_MESSAGES=yes
7393 else
7394   echo "$as_me: failed program was:" >&5
7395 cat conftest.$ac_ext >&5
7396 am_cv_val_LC_MESSAGES=no
7397 fi
7398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7399 fi
7400 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7401 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7402     if test $am_cv_val_LC_MESSAGES = yes; then
7403
7404 cat >>confdefs.h <<\_ACEOF
7405 #define HAVE_LC_MESSAGES 1
7406 _ACEOF
7407
7408     fi
7409   fi
7410      USE_NLS=yes
7411
7412
7413         nls_cv_force_use_gnu_gettext="no"
7414
7415     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7416     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7417                               nls_cv_header_intl=
7418       nls_cv_header_libgt=
7419       CATOBJEXT=NONE
7420
7421       if test "${ac_cv_header_libintl_h+set}" = set; then
7422   echo "$as_me:$LINENO: checking for libintl.h" >&5
7423 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7424 if test "${ac_cv_header_libintl_h+set}" = set; then
7425   echo $ECHO_N "(cached) $ECHO_C" >&6
7426 fi
7427 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7428 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7429 else
7430   # Is the header compilable?
7431 echo "$as_me:$LINENO: checking libintl.h usability" >&5
7432 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
7433 cat >conftest.$ac_ext <<_ACEOF
7434 #line $LINENO "configure"
7435 #include "confdefs.h"
7436 $ac_includes_default
7437 #include <libintl.h>
7438 _ACEOF
7439 rm -f conftest.$ac_objext
7440 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7441   (eval $ac_compile) 2>&5
7442   ac_status=$?
7443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7444   (exit $ac_status); } &&
7445          { ac_try='test -s conftest.$ac_objext'
7446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7447   (eval $ac_try) 2>&5
7448   ac_status=$?
7449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7450   (exit $ac_status); }; }; then
7451   ac_header_compiler=yes
7452 else
7453   echo "$as_me: failed program was:" >&5
7454 cat conftest.$ac_ext >&5
7455 ac_header_compiler=no
7456 fi
7457 rm -f conftest.$ac_objext conftest.$ac_ext
7458 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7459 echo "${ECHO_T}$ac_header_compiler" >&6
7460
7461 # Is the header present?
7462 echo "$as_me:$LINENO: checking libintl.h presence" >&5
7463 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
7464 cat >conftest.$ac_ext <<_ACEOF
7465 #line $LINENO "configure"
7466 #include "confdefs.h"
7467 #include <libintl.h>
7468 _ACEOF
7469 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7470   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7471   ac_status=$?
7472   egrep -v '^ *\+' conftest.er1 >conftest.err
7473   rm -f conftest.er1
7474   cat conftest.err >&5
7475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7476   (exit $ac_status); } >/dev/null; then
7477   if test -s conftest.err; then
7478     ac_cpp_err=$ac_c_preproc_warn_flag
7479   else
7480     ac_cpp_err=
7481   fi
7482 else
7483   ac_cpp_err=yes
7484 fi
7485 if test -z "$ac_cpp_err"; then
7486   ac_header_preproc=yes
7487 else
7488   echo "$as_me: failed program was:" >&5
7489   cat conftest.$ac_ext >&5
7490   ac_header_preproc=no
7491 fi
7492 rm -f conftest.err conftest.$ac_ext
7493 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7494 echo "${ECHO_T}$ac_header_preproc" >&6
7495
7496 # So?  What about this header?
7497 case $ac_header_compiler:$ac_header_preproc in
7498   yes:no )
7499     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7500 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7501     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7502 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7503   no:yes )
7504     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
7505 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
7506     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
7507 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
7508     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7509 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7510 esac
7511 echo "$as_me:$LINENO: checking for libintl.h" >&5
7512 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7513 if test "${ac_cv_header_libintl_h+set}" = set; then
7514   echo $ECHO_N "(cached) $ECHO_C" >&6
7515 else
7516   ac_cv_header_libintl_h=$ac_header_preproc
7517 fi
7518 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7519 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7520
7521 fi
7522 if test $ac_cv_header_libintl_h = yes; then
7523   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
7524 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
7525 if test "${gt_cv_func_dgettext_libc+set}" = set; then
7526   echo $ECHO_N "(cached) $ECHO_C" >&6
7527 else
7528   cat >conftest.$ac_ext <<_ACEOF
7529 #line $LINENO "configure"
7530 #include "confdefs.h"
7531 #include <libintl.h>
7532 #ifdef F77_DUMMY_MAIN
7533 #  ifdef __cplusplus
7534      extern "C"
7535 #  endif
7536    int F77_DUMMY_MAIN() { return 1; }
7537 #endif
7538 int
7539 main ()
7540 {
7541 return (int) dgettext ("","")
7542   ;
7543   return 0;
7544 }
7545 _ACEOF
7546 rm -f conftest.$ac_objext conftest$ac_exeext
7547 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7548   (eval $ac_link) 2>&5
7549   ac_status=$?
7550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7551   (exit $ac_status); } &&
7552          { ac_try='test -s conftest$ac_exeext'
7553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7554   (eval $ac_try) 2>&5
7555   ac_status=$?
7556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7557   (exit $ac_status); }; }; then
7558   gt_cv_func_dgettext_libc=yes
7559 else
7560   echo "$as_me: failed program was:" >&5
7561 cat conftest.$ac_ext >&5
7562 gt_cv_func_dgettext_libc=no
7563 fi
7564 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7565 fi
7566 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
7567 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
7568
7569           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7570             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
7571 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7572 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7573   echo $ECHO_N "(cached) $ECHO_C" >&6
7574 else
7575   ac_check_lib_save_LIBS=$LIBS
7576 LIBS="-lintl  $LIBS"
7577 cat >conftest.$ac_ext <<_ACEOF
7578 #line $LINENO "configure"
7579 #include "confdefs.h"
7580
7581 /* Override any gcc2 internal prototype to avoid an error.  */
7582 #ifdef __cplusplus
7583 extern "C"
7584 #endif
7585 /* We use char because int might match the return type of a gcc2
7586    builtin and then its argument prototype would still apply.  */
7587 char bindtextdomain ();
7588 #ifdef F77_DUMMY_MAIN
7589 #  ifdef __cplusplus
7590      extern "C"
7591 #  endif
7592    int F77_DUMMY_MAIN() { return 1; }
7593 #endif
7594 int
7595 main ()
7596 {
7597 bindtextdomain ();
7598   ;
7599   return 0;
7600 }
7601 _ACEOF
7602 rm -f conftest.$ac_objext conftest$ac_exeext
7603 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7604   (eval $ac_link) 2>&5
7605   ac_status=$?
7606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7607   (exit $ac_status); } &&
7608          { ac_try='test -s conftest$ac_exeext'
7609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7610   (eval $ac_try) 2>&5
7611   ac_status=$?
7612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7613   (exit $ac_status); }; }; then
7614   ac_cv_lib_intl_bindtextdomain=yes
7615 else
7616   echo "$as_me: failed program was:" >&5
7617 cat conftest.$ac_ext >&5
7618 ac_cv_lib_intl_bindtextdomain=no
7619 fi
7620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7621 LIBS=$ac_check_lib_save_LIBS
7622 fi
7623 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
7624 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
7625 if test $ac_cv_lib_intl_bindtextdomain = yes; then
7626   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
7627 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
7628 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
7629   echo $ECHO_N "(cached) $ECHO_C" >&6
7630 else
7631   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
7632 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
7633 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
7634   echo $ECHO_N "(cached) $ECHO_C" >&6
7635 else
7636   ac_check_lib_save_LIBS=$LIBS
7637 LIBS="-lintl  $LIBS"
7638 cat >conftest.$ac_ext <<_ACEOF
7639 #line $LINENO "configure"
7640 #include "confdefs.h"
7641
7642 /* Override any gcc2 internal prototype to avoid an error.  */
7643 #ifdef __cplusplus
7644 extern "C"
7645 #endif
7646 /* We use char because int might match the return type of a gcc2
7647    builtin and then its argument prototype would still apply.  */
7648 char dgettext ();
7649 #ifdef F77_DUMMY_MAIN
7650 #  ifdef __cplusplus
7651      extern "C"
7652 #  endif
7653    int F77_DUMMY_MAIN() { return 1; }
7654 #endif
7655 int
7656 main ()
7657 {
7658 dgettext ();
7659   ;
7660   return 0;
7661 }
7662 _ACEOF
7663 rm -f conftest.$ac_objext conftest$ac_exeext
7664 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7665   (eval $ac_link) 2>&5
7666   ac_status=$?
7667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7668   (exit $ac_status); } &&
7669          { ac_try='test -s conftest$ac_exeext'
7670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7671   (eval $ac_try) 2>&5
7672   ac_status=$?
7673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7674   (exit $ac_status); }; }; then
7675   ac_cv_lib_intl_dgettext=yes
7676 else
7677   echo "$as_me: failed program was:" >&5
7678 cat conftest.$ac_ext >&5
7679 ac_cv_lib_intl_dgettext=no
7680 fi
7681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7682 LIBS=$ac_check_lib_save_LIBS
7683 fi
7684 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
7685 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
7686 if test $ac_cv_lib_intl_dgettext = yes; then
7687   gt_cv_func_dgettext_libintl=yes
7688 else
7689   gt_cv_func_dgettext_libintl=no
7690 fi
7691
7692 fi
7693 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
7694 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
7695 fi
7696
7697           fi
7698
7699           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7700             LIBS="$LIBS -lintl";
7701           fi
7702
7703           if test "$gt_cv_func_dgettext_libc" = "yes" \
7704             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7705
7706 cat >>confdefs.h <<\_ACEOF
7707 #define HAVE_GETTEXT 1
7708 _ACEOF
7709
7710             # Extract the first word of "msgfmt", so it can be a program name with args.
7711 set dummy msgfmt; ac_word=$2
7712 echo "$as_me:$LINENO: checking for $ac_word" >&5
7713 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7714 if test "${ac_cv_path_MSGFMT+set}" = set; then
7715   echo $ECHO_N "(cached) $ECHO_C" >&6
7716 else
7717   case "$MSGFMT" in
7718   /*)
7719   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7720   ;;
7721   *)
7722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7723   for ac_dir in $PATH; do
7724     test -z "$ac_dir" && ac_dir=.
7725     if test -f $ac_dir/$ac_word; then
7726       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7727         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7728         break
7729       fi
7730     fi
7731   done
7732   IFS="$ac_save_ifs"
7733   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7734   ;;
7735 esac
7736 fi
7737 MSGFMT="$ac_cv_path_MSGFMT"
7738 if test -n "$MSGFMT"; then
7739   echo "$as_me:$LINENO: result: $MSGFMT" >&5
7740 echo "${ECHO_T}$MSGFMT" >&6
7741 else
7742   echo "$as_me:$LINENO: result: no" >&5
7743 echo "${ECHO_T}no" >&6
7744 fi
7745             if test "$MSGFMT" != "no"; then
7746
7747 for ac_func in dcgettext
7748 do
7749 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7750 echo "$as_me:$LINENO: checking for $ac_func" >&5
7751 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7752 if eval "test \"\${$as_ac_var+set}\" = set"; then
7753   echo $ECHO_N "(cached) $ECHO_C" >&6
7754 else
7755   cat >conftest.$ac_ext <<_ACEOF
7756 #line $LINENO "configure"
7757 #include "confdefs.h"
7758 /* System header to define __stub macros and hopefully few prototypes,
7759     which can conflict with char $ac_func (); below.  */
7760 #include <assert.h>
7761 /* Override any gcc2 internal prototype to avoid an error.  */
7762 #ifdef __cplusplus
7763 extern "C"
7764 #endif
7765 /* We use char because int might match the return type of a gcc2
7766    builtin and then its argument prototype would still apply.  */
7767 char $ac_func ();
7768 char (*f) ();
7769
7770 #ifdef F77_DUMMY_MAIN
7771 #  ifdef __cplusplus
7772      extern "C"
7773 #  endif
7774    int F77_DUMMY_MAIN() { return 1; }
7775 #endif
7776 int
7777 main ()
7778 {
7779 /* The GNU C library defines this for functions which it implements
7780     to always fail with ENOSYS.  Some functions are actually named
7781     something starting with __ and the normal name is an alias.  */
7782 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7783 choke me
7784 #else
7785 f = $ac_func;
7786 #endif
7787
7788   ;
7789   return 0;
7790 }
7791 _ACEOF
7792 rm -f conftest.$ac_objext conftest$ac_exeext
7793 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7794   (eval $ac_link) 2>&5
7795   ac_status=$?
7796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7797   (exit $ac_status); } &&
7798          { ac_try='test -s conftest$ac_exeext'
7799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7800   (eval $ac_try) 2>&5
7801   ac_status=$?
7802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7803   (exit $ac_status); }; }; then
7804   eval "$as_ac_var=yes"
7805 else
7806   echo "$as_me: failed program was:" >&5
7807 cat conftest.$ac_ext >&5
7808 eval "$as_ac_var=no"
7809 fi
7810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7811 fi
7812 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7813 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7814 if test `eval echo '${'$as_ac_var'}'` = yes; then
7815   cat >>confdefs.h <<_ACEOF
7816 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7817 _ACEOF
7818
7819 fi
7820 done
7821
7822               # Extract the first word of "gmsgfmt", so it can be a program name with args.
7823 set dummy gmsgfmt; ac_word=$2
7824 echo "$as_me:$LINENO: checking for $ac_word" >&5
7825 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7826 if test "${ac_cv_path_GMSGFMT+set}" = set; then
7827   echo $ECHO_N "(cached) $ECHO_C" >&6
7828 else
7829   case $GMSGFMT in
7830   [\\/]* | ?:[\\/]*)
7831   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7832   ;;
7833   *)
7834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7835 for as_dir in $PATH
7836 do
7837   IFS=$as_save_IFS
7838   test -z "$as_dir" && as_dir=.
7839   for ac_exec_ext in '' $ac_executable_extensions; do
7840   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7841     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7842     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7843     break 2
7844   fi
7845 done
7846 done
7847
7848   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7849   ;;
7850 esac
7851 fi
7852 GMSGFMT=$ac_cv_path_GMSGFMT
7853
7854 if test -n "$GMSGFMT"; then
7855   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
7856 echo "${ECHO_T}$GMSGFMT" >&6
7857 else
7858   echo "$as_me:$LINENO: result: no" >&5
7859 echo "${ECHO_T}no" >&6
7860 fi
7861
7862               # Extract the first word of "xgettext", so it can be a program name with args.
7863 set dummy xgettext; ac_word=$2
7864 echo "$as_me:$LINENO: checking for $ac_word" >&5
7865 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7866 if test "${ac_cv_path_XGETTEXT+set}" = set; then
7867   echo $ECHO_N "(cached) $ECHO_C" >&6
7868 else
7869   case "$XGETTEXT" in
7870   /*)
7871   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7872   ;;
7873   *)
7874   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7875   for ac_dir in $PATH; do
7876     test -z "$ac_dir" && ac_dir=.
7877     if test -f $ac_dir/$ac_word; then
7878       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7879         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7880         break
7881       fi
7882     fi
7883   done
7884   IFS="$ac_save_ifs"
7885   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7886   ;;
7887 esac
7888 fi
7889 XGETTEXT="$ac_cv_path_XGETTEXT"
7890 if test -n "$XGETTEXT"; then
7891   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
7892 echo "${ECHO_T}$XGETTEXT" >&6
7893 else
7894   echo "$as_me:$LINENO: result: no" >&5
7895 echo "${ECHO_T}no" >&6
7896 fi
7897
7898               cat >conftest.$ac_ext <<_ACEOF
7899 #line $LINENO "configure"
7900 #include "confdefs.h"
7901
7902 #ifdef F77_DUMMY_MAIN
7903 #  ifdef __cplusplus
7904      extern "C"
7905 #  endif
7906    int F77_DUMMY_MAIN() { return 1; }
7907 #endif
7908 int
7909 main ()
7910 {
7911 extern int _nl_msg_cat_cntr;
7912                              return _nl_msg_cat_cntr
7913   ;
7914   return 0;
7915 }
7916 _ACEOF
7917 rm -f conftest.$ac_objext conftest$ac_exeext
7918 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7919   (eval $ac_link) 2>&5
7920   ac_status=$?
7921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922   (exit $ac_status); } &&
7923          { ac_try='test -s conftest$ac_exeext'
7924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7925   (eval $ac_try) 2>&5
7926   ac_status=$?
7927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7928   (exit $ac_status); }; }; then
7929   CATOBJEXT=.gmo
7930                  DATADIRNAME=share
7931 else
7932   echo "$as_me: failed program was:" >&5
7933 cat conftest.$ac_ext >&5
7934 CATOBJEXT=.mo
7935                  DATADIRNAME=lib
7936 fi
7937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7938               INSTOBJEXT=.mo
7939             fi
7940           fi
7941
7942           # Added by Martin Baulig 12/15/98 for libc5 systems
7943           if test "$gt_cv_func_dgettext_libc" != "yes" \
7944             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
7945             INTLLIBS=-lintl
7946             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7947           fi
7948
7949 fi
7950
7951
7952
7953       if test "$CATOBJEXT" = "NONE"; then
7954                         nls_cv_use_gnu_gettext=yes
7955       fi
7956     fi
7957
7958     if test "$nls_cv_use_gnu_gettext" != "yes"; then
7959
7960 cat >>confdefs.h <<\_ACEOF
7961 #define ENABLE_NLS 1
7962 _ACEOF
7963
7964     else
7965             CATOBJEXT=
7966     fi
7967
7968         if test "$XGETTEXT" != ":"; then
7969                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7970         : ;
7971       else
7972         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
7973 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
7974         XGETTEXT=":"
7975       fi
7976     fi
7977
7978     # We need to process the po/ directory.
7979     POSUB=po
7980
7981     ac_config_commands="$ac_config_commands default-2"
7982
7983
7984                 for lang in $ALL_LINGUAS; do
7985       GMOFILES="$GMOFILES $lang.gmo"
7986       POFILES="$POFILES $lang.po"
7987     done
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001    if test "x$CATOBJEXT" != "x"; then
8002      if test "x$ALL_LINGUAS" = "x"; then
8003        LINGUAS=
8004      else
8005        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
8006 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
8007        NEW_LINGUAS=
8008        for lang in ${LINGUAS=$ALL_LINGUAS}; do
8009          case "$ALL_LINGUAS" in
8010           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
8011          esac
8012        done
8013        LINGUAS=$NEW_LINGUAS
8014        echo "$as_me:$LINENO: result: $LINGUAS" >&5
8015 echo "${ECHO_T}$LINGUAS" >&6
8016      fi
8017
8018           if test -n "$LINGUAS"; then
8019        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8020      fi
8021    fi
8022
8023             test -d po || mkdir po
8024    if test "$CATOBJEXT" = ".cat"; then
8025      if test "${ac_cv_header_linux_version_h+set}" = set; then
8026   echo "$as_me:$LINENO: checking for linux/version.h" >&5
8027 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8028 if test "${ac_cv_header_linux_version_h+set}" = set; then
8029   echo $ECHO_N "(cached) $ECHO_C" >&6
8030 fi
8031 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8032 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8033 else
8034   # Is the header compilable?
8035 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
8036 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
8037 cat >conftest.$ac_ext <<_ACEOF
8038 #line $LINENO "configure"
8039 #include "confdefs.h"
8040 $ac_includes_default
8041 #include <linux/version.h>
8042 _ACEOF
8043 rm -f conftest.$ac_objext
8044 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8045   (eval $ac_compile) 2>&5
8046   ac_status=$?
8047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8048   (exit $ac_status); } &&
8049          { ac_try='test -s conftest.$ac_objext'
8050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8051   (eval $ac_try) 2>&5
8052   ac_status=$?
8053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8054   (exit $ac_status); }; }; then
8055   ac_header_compiler=yes
8056 else
8057   echo "$as_me: failed program was:" >&5
8058 cat conftest.$ac_ext >&5
8059 ac_header_compiler=no
8060 fi
8061 rm -f conftest.$ac_objext conftest.$ac_ext
8062 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8063 echo "${ECHO_T}$ac_header_compiler" >&6
8064
8065 # Is the header present?
8066 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
8067 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
8068 cat >conftest.$ac_ext <<_ACEOF
8069 #line $LINENO "configure"
8070 #include "confdefs.h"
8071 #include <linux/version.h>
8072 _ACEOF
8073 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8074   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8075   ac_status=$?
8076   egrep -v '^ *\+' conftest.er1 >conftest.err
8077   rm -f conftest.er1
8078   cat conftest.err >&5
8079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8080   (exit $ac_status); } >/dev/null; then
8081   if test -s conftest.err; then
8082     ac_cpp_err=$ac_c_preproc_warn_flag
8083   else
8084     ac_cpp_err=
8085   fi
8086 else
8087   ac_cpp_err=yes
8088 fi
8089 if test -z "$ac_cpp_err"; then
8090   ac_header_preproc=yes
8091 else
8092   echo "$as_me: failed program was:" >&5
8093   cat conftest.$ac_ext >&5
8094   ac_header_preproc=no
8095 fi
8096 rm -f conftest.err conftest.$ac_ext
8097 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8098 echo "${ECHO_T}$ac_header_preproc" >&6
8099
8100 # So?  What about this header?
8101 case $ac_header_compiler:$ac_header_preproc in
8102   yes:no )
8103     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
8104 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8105     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8106 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8107   no:yes )
8108     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
8109 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
8110     { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
8111 echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
8112     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8113 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8114 esac
8115 echo "$as_me:$LINENO: checking for linux/version.h" >&5
8116 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8117 if test "${ac_cv_header_linux_version_h+set}" = set; then
8118   echo $ECHO_N "(cached) $ECHO_C" >&6
8119 else
8120   ac_cv_header_linux_version_h=$ac_header_preproc
8121 fi
8122 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8123 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8124
8125 fi
8126 if test $ac_cv_header_linux_version_h = yes; then
8127   msgformat=linux
8128 else
8129   msgformat=xopen
8130 fi
8131
8132
8133
8134                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
8135    fi
8136
8137             MKINSTALLDIRS=
8138 #
8139 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
8140 #
8141 #   if test -n "$ac_aux_dir"; then
8142 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8143 #   fi
8144    if test -z "$MKINSTALLDIRS"; then
8145      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8146    fi
8147
8148    # jwz: you know what, screw it.  Let's just use the version that I
8149    # already computed in configure.in, instead of this version that came
8150    # with the i18n crud, ok?
8151    MKINSTALLDIRS="$INSTALL_DIRS"
8152
8153
8154
8155
8156          test -d po || mkdir po
8157    if test "x$srcdir" != "x."; then
8158      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8159        posrcprefix="$srcdir/"
8160      else
8161        posrcprefix="../$srcdir/"
8162      fi
8163    else
8164      posrcprefix="../"
8165    fi
8166    rm -f po/POTFILES
8167    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8168         < $srcdir/po/POTFILES.in > po/POTFILES
8169
8170
8171
8172 ###############################################################################
8173 #
8174 #       Check for -lXmu (some fucked up vendors don't ship it...)
8175 #
8176 ###############################################################################
8177
8178 have_xmu=no
8179
8180   ac_save_CPPFLAGS="$CPPFLAGS"
8181   if test \! -z "$includedir" ; then
8182     CPPFLAGS="$CPPFLAGS -I$includedir"
8183   fi
8184   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8185   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
8186 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
8187 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
8188   echo $ECHO_N "(cached) $ECHO_C" >&6
8189 else
8190   cat >conftest.$ac_ext <<_ACEOF
8191 #line $LINENO "configure"
8192 #include "confdefs.h"
8193 #include <stdlib.h>
8194                    #include <stdio.h>
8195                    #include <X11/Intrinsic.h>
8196
8197 #include <X11/Xmu/Error.h>
8198 _ACEOF
8199 rm -f conftest.$ac_objext
8200 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8201   (eval $ac_compile) 2>&5
8202   ac_status=$?
8203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8204   (exit $ac_status); } &&
8205          { ac_try='test -s conftest.$ac_objext'
8206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8207   (eval $ac_try) 2>&5
8208   ac_status=$?
8209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8210   (exit $ac_status); }; }; then
8211   ac_cv_header_X11_Xmu_Error_h=yes
8212 else
8213   echo "$as_me: failed program was:" >&5
8214 cat conftest.$ac_ext >&5
8215 ac_cv_header_X11_Xmu_Error_h=no
8216 fi
8217 rm -f conftest.$ac_objext conftest.$ac_ext
8218 fi
8219 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
8220 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
8221 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
8222   have_xmu=yes
8223 fi
8224
8225
8226   CPPFLAGS="$ac_save_CPPFLAGS"
8227 if test "$have_xmu" = no ; then
8228   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8229   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8230   XMU_LIBS=''
8231 else
8232   XMU_SRCS=''
8233   XMU_OBJS=''
8234   XMU_LIBS='-lXmu'
8235   cat >>confdefs.h <<\_ACEOF
8236 #define HAVE_XMU 1
8237 _ACEOF
8238
8239 fi
8240
8241
8242 ###############################################################################
8243 #
8244 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8245 #       See comp.windows.x FAQ question 124.  The right fix is to
8246 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8247 #
8248 ###############################################################################
8249
8250 if test "$have_xmu" = yes ; then
8251   case "$host" in
8252     *-sunos4*)
8253     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8254 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
8255 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
8256   echo $ECHO_N "(cached) $ECHO_C" >&6
8257 else
8258   ac_save_LDFLAGS="$LDFLAGS"
8259                     if test \! -z "$x_libraries" ; then
8260                       LDFLAGS="$LDFLAGS -L$x_libraries"
8261                     fi
8262                     # Note: this trick never works!  (Generally.)
8263                     # We're only getting away with using AC_TRY_LINK
8264                     # with X libraries because we know it's SunOS.
8265                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8266                     cat >conftest.$ac_ext <<_ACEOF
8267 #line $LINENO "configure"
8268 #include "confdefs.h"
8269
8270 #ifdef F77_DUMMY_MAIN
8271 #  ifdef __cplusplus
8272      extern "C"
8273 #  endif
8274    int F77_DUMMY_MAIN() { return 1; }
8275 #endif
8276 int
8277 main ()
8278 {
8279
8280   ;
8281   return 0;
8282 }
8283 _ACEOF
8284 rm -f conftest.$ac_objext conftest$ac_exeext
8285 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8286   (eval $ac_link) 2>&5
8287   ac_status=$?
8288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8289   (exit $ac_status); } &&
8290          { ac_try='test -s conftest$ac_exeext'
8291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8292   (eval $ac_try) 2>&5
8293   ac_status=$?
8294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8295   (exit $ac_status); }; }; then
8296   ac_cv_sunos_xmu_bug=no
8297 else
8298   echo "$as_me: failed program was:" >&5
8299 cat conftest.$ac_ext >&5
8300 ac_cv_sunos_xmu_bug=yes
8301 fi
8302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8303                     LDFLAGS="$ac_save_LDFLAGS"
8304 fi
8305 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
8306 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
8307     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8308       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
8309 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
8310 if test "${ac_cv_ld_static+set}" = set; then
8311   echo $ECHO_N "(cached) $ECHO_C" >&6
8312 else
8313   ac_save_LDFLAGS="$LDFLAGS"
8314                       LDFLAGS="$LDFLAGS -static"
8315                       cat >conftest.$ac_ext <<_ACEOF
8316 #line $LINENO "configure"
8317 #include "confdefs.h"
8318
8319 #ifdef F77_DUMMY_MAIN
8320 #  ifdef __cplusplus
8321      extern "C"
8322 #  endif
8323    int F77_DUMMY_MAIN() { return 1; }
8324 #endif
8325 int
8326 main ()
8327 {
8328
8329   ;
8330   return 0;
8331 }
8332 _ACEOF
8333 rm -f conftest.$ac_objext conftest$ac_exeext
8334 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8335   (eval $ac_link) 2>&5
8336   ac_status=$?
8337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8338   (exit $ac_status); } &&
8339          { ac_try='test -s conftest$ac_exeext'
8340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8341   (eval $ac_try) 2>&5
8342   ac_status=$?
8343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344   (exit $ac_status); }; }; then
8345   ac_cv_ld_static=yes
8346 else
8347   echo "$as_me: failed program was:" >&5
8348 cat conftest.$ac_ext >&5
8349 ac_cv_ld_static=no
8350 fi
8351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8352                     LDFLAGS="$ac_save_LDFLAGS"
8353 fi
8354 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
8355 echo "${ECHO_T}$ac_cv_ld_static" >&6
8356       if test "$ac_cv_ld_static" = yes ; then
8357         LDFLAGS="$LDFLAGS -static"
8358       else
8359         LDFLAGS="$LDFLAGS -Bstatic"
8360       fi
8361     fi
8362     ;;
8363   esac
8364 fi
8365
8366
8367 ###############################################################################
8368 #
8369 #       Handle the --with-hackdir option
8370 #
8371 ###############################################################################
8372
8373 have_hackdir=yes
8374 with_hackdir_req=unspecified
8375
8376 # Check whether --with-hackdir or --without-hackdir was given.
8377 if test "${with_hackdir+set}" = set; then
8378   withval="$with_hackdir"
8379   with_hackdir="$withval"; with_hackdir_req="$withval"
8380 else
8381   with_hackdir=yes
8382 fi;
8383
8384 if test x"$with_hackdir" = xyes; then
8385   HACKDIR='${exec_prefix}/lib/xscreensaver'
8386 elif test x"$with_hackdir" = xno; then
8387   HACKDIR='${bindir}'
8388 else
8389   # there must be a better way than this...
8390   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
8391     # absolute path
8392     HACKDIR=$with_hackdir
8393   else
8394     # relative path
8395     HACKDIR="\${exec_prefix}$with_hackdir"
8396   fi
8397 fi
8398
8399 # canonicalize slashes.
8400 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8401
8402 # This option used to be called --enable-subdir; make sure that is no longer
8403 # used, since configure brain-damagedly ignores unknown --enable options.
8404
8405 obsolete_enable=
8406 # Check whether --enable-subdir or --disable-subdir was given.
8407 if test "${enable_subdir+set}" = set; then
8408   enableval="$enable_subdir"
8409   obsolete_enable=yes
8410 fi;
8411 if test -n "$obsolete_enable"; then
8412   echo "error: the --enable-subdir option has been replaced with"
8413   echo "       the new --with-hackdir option; see \`configure --help'"
8414   echo "       for more information."
8415   exit 1
8416 fi
8417
8418
8419 ###############################################################################
8420 #
8421 #       Handle the --with-configdir option
8422 #
8423 ###############################################################################
8424
8425 have_configdir=yes
8426 with_configdir_req=unspecified
8427
8428 # Check whether --with-configdir or --without-configdir was given.
8429 if test "${with_configdir+set}" = set; then
8430   withval="$with_configdir"
8431   with_configdir="$withval"; with_configdir_req="$withval"
8432 else
8433   with_configdir=yes
8434 fi;
8435
8436 if test x"$with_configdir" = xyes; then
8437   # filled in later...
8438   HACK_CONF_DIR=''
8439 elif test x"$with_configdir" = xno; then
8440   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8441   exit 1
8442 else
8443   # there must be a better way than this...
8444   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8445     # absolute path
8446     HACK_CONF_DIR=$with_configdir
8447   else
8448     # relative path
8449     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8450   fi
8451 fi
8452
8453
8454
8455
8456 ###############################################################################
8457 #
8458 #       Check for the SGI SCREEN_SAVER server extension.
8459 #
8460 ###############################################################################
8461
8462 have_sgi=no
8463 with_sgi_req=unspecified
8464
8465 # Check whether --with-sgi-ext or --without-sgi-ext was given.
8466 if test "${with_sgi_ext+set}" = set; then
8467   withval="$with_sgi_ext"
8468   with_sgi="$withval"; with_sgi_req="$withval"
8469 else
8470   with_sgi=yes
8471 fi;
8472
8473
8474    case "$with_sgi" in
8475     yes) ;;
8476     no)  ;;
8477
8478     /*)
8479      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
8480 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
8481      d=$with_sgi/include
8482      if test -d $d; then
8483        X_CFLAGS="-I$d $X_CFLAGS"
8484        echo "$as_me:$LINENO: result: $d" >&5
8485 echo "${ECHO_T}$d" >&6
8486      else
8487        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8488 echo "${ECHO_T}not found ($d: no such directory)" >&6
8489      fi
8490
8491      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
8492 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
8493      d=$with_sgi/lib
8494      if test -d $d; then
8495        X_LIBS="-L$d $X_LIBS"
8496        echo "$as_me:$LINENO: result: $d" >&5
8497 echo "${ECHO_T}$d" >&6
8498      else
8499        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8500 echo "${ECHO_T}not found ($d: no such directory)" >&6
8501      fi
8502
8503      # replace the directory string with "yes".
8504      with_sgi_req="yes"
8505      with_sgi=$with_sgi_req
8506      ;;
8507
8508     *)
8509      echo ""
8510      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
8511      echo "       If it is a directory, then \`DIR/include' will be added to"
8512      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8513      exit 1
8514      ;;
8515    esac
8516
8517
8518 if test "$with_sgi" = yes; then
8519
8520   ac_save_CPPFLAGS="$CPPFLAGS"
8521   if test \! -z "$includedir" ; then
8522     CPPFLAGS="$CPPFLAGS -I$includedir"
8523   fi
8524   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8525   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
8526 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
8527 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
8528   echo $ECHO_N "(cached) $ECHO_C" >&6
8529 else
8530   cat >conftest.$ac_ext <<_ACEOF
8531 #line $LINENO "configure"
8532 #include "confdefs.h"
8533 #include <X11/Xlib.h>
8534
8535 #include <X11/extensions/XScreenSaver.h>
8536 _ACEOF
8537 rm -f conftest.$ac_objext
8538 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8539   (eval $ac_compile) 2>&5
8540   ac_status=$?
8541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8542   (exit $ac_status); } &&
8543          { ac_try='test -s conftest.$ac_objext'
8544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8545   (eval $ac_try) 2>&5
8546   ac_status=$?
8547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8548   (exit $ac_status); }; }; then
8549   ac_cv_header_X11_extensions_XScreenSaver_h=yes
8550 else
8551   echo "$as_me: failed program was:" >&5
8552 cat conftest.$ac_ext >&5
8553 ac_cv_header_X11_extensions_XScreenSaver_h=no
8554 fi
8555 rm -f conftest.$ac_objext conftest.$ac_ext
8556 fi
8557 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
8558 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
8559 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
8560   have_sgi=yes
8561                      cat >>confdefs.h <<\_ACEOF
8562 #define HAVE_SGI_SAVER_EXTENSION 1
8563 _ACEOF
8564
8565 fi
8566
8567
8568   CPPFLAGS="$ac_save_CPPFLAGS"
8569
8570 elif test "$with_sgi" != no; then
8571   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8572   exit 1
8573 fi
8574
8575
8576 ###############################################################################
8577 #
8578 #       Check for the MIT-SCREEN-SAVER server extension.
8579 #
8580 ###############################################################################
8581
8582 have_mit=no
8583 with_mit_req=unspecified
8584
8585 # Check whether --with-mit-ext or --without-mit-ext was given.
8586 if test "${with_mit_ext+set}" = set; then
8587   withval="$with_mit_ext"
8588   with_mit="$withval"; with_mit_req="$withval"
8589 else
8590   with_mit=yes
8591 fi;
8592
8593
8594    case "$with_mit" in
8595     yes) ;;
8596     no)  ;;
8597
8598     /*)
8599      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
8600 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
8601      d=$with_mit/include
8602      if test -d $d; then
8603        X_CFLAGS="-I$d $X_CFLAGS"
8604        echo "$as_me:$LINENO: result: $d" >&5
8605 echo "${ECHO_T}$d" >&6
8606      else
8607        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8608 echo "${ECHO_T}not found ($d: no such directory)" >&6
8609      fi
8610
8611      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
8612 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
8613      d=$with_mit/lib
8614      if test -d $d; then
8615        X_LIBS="-L$d $X_LIBS"
8616        echo "$as_me:$LINENO: result: $d" >&5
8617 echo "${ECHO_T}$d" >&6
8618      else
8619        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8620 echo "${ECHO_T}not found ($d: no such directory)" >&6
8621      fi
8622
8623      # replace the directory string with "yes".
8624      with_mit_req="yes"
8625      with_mit=$with_mit_req
8626      ;;
8627
8628     *)
8629      echo ""
8630      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
8631      echo "       If it is a directory, then \`DIR/include' will be added to"
8632      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8633      exit 1
8634      ;;
8635    esac
8636
8637
8638 if test "$with_mit" = yes; then
8639
8640   ac_save_CPPFLAGS="$CPPFLAGS"
8641   if test \! -z "$includedir" ; then
8642     CPPFLAGS="$CPPFLAGS -I$includedir"
8643   fi
8644   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8645   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
8646 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
8647 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
8648   echo $ECHO_N "(cached) $ECHO_C" >&6
8649 else
8650   cat >conftest.$ac_ext <<_ACEOF
8651 #line $LINENO "configure"
8652 #include "confdefs.h"
8653 #include <X11/Xlib.h>
8654
8655 #include <X11/extensions/scrnsaver.h>
8656 _ACEOF
8657 rm -f conftest.$ac_objext
8658 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8659   (eval $ac_compile) 2>&5
8660   ac_status=$?
8661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8662   (exit $ac_status); } &&
8663          { ac_try='test -s conftest.$ac_objext'
8664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8665   (eval $ac_try) 2>&5
8666   ac_status=$?
8667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8668   (exit $ac_status); }; }; then
8669   ac_cv_header_X11_extensions_scrnsaver_h=yes
8670 else
8671   echo "$as_me: failed program was:" >&5
8672 cat conftest.$ac_ext >&5
8673 ac_cv_header_X11_extensions_scrnsaver_h=no
8674 fi
8675 rm -f conftest.$ac_objext conftest.$ac_ext
8676 fi
8677 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
8678 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
8679 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
8680   have_mit=yes
8681 fi
8682
8683
8684   CPPFLAGS="$ac_save_CPPFLAGS"
8685
8686   # Now check to see if it's really in the library; XF86Free-3.3 ships
8687   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
8688   #
8689   if test "$have_mit" = yes; then
8690
8691   ac_save_CPPFLAGS="$CPPFLAGS"
8692   ac_save_LDFLAGS="$LDFLAGS"
8693 #  ac_save_LIBS="$LIBS"
8694
8695   if test \! -z "$includedir" ; then
8696     CPPFLAGS="$CPPFLAGS -I$includedir"
8697   fi
8698   # note: $X_CFLAGS includes $x_includes
8699   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8700
8701   if test \! -z "$libdir" ; then
8702     LDFLAGS="$LDFLAGS -L$libdir"
8703   fi
8704   # note: $X_LIBS includes $x_libraries
8705   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8706
8707   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
8708 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
8709 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
8710   echo $ECHO_N "(cached) $ECHO_C" >&6
8711 else
8712   ac_check_lib_save_LIBS=$LIBS
8713 LIBS="-lXext -lm $LIBS"
8714 cat >conftest.$ac_ext <<_ACEOF
8715 #line $LINENO "configure"
8716 #include "confdefs.h"
8717
8718 /* Override any gcc2 internal prototype to avoid an error.  */
8719 #ifdef __cplusplus
8720 extern "C"
8721 #endif
8722 /* We use char because int might match the return type of a gcc2
8723    builtin and then its argument prototype would still apply.  */
8724 char XScreenSaverRegister ();
8725 #ifdef F77_DUMMY_MAIN
8726 #  ifdef __cplusplus
8727      extern "C"
8728 #  endif
8729    int F77_DUMMY_MAIN() { return 1; }
8730 #endif
8731 int
8732 main ()
8733 {
8734 XScreenSaverRegister ();
8735   ;
8736   return 0;
8737 }
8738 _ACEOF
8739 rm -f conftest.$ac_objext conftest$ac_exeext
8740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8741   (eval $ac_link) 2>&5
8742   ac_status=$?
8743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8744   (exit $ac_status); } &&
8745          { ac_try='test -s conftest$ac_exeext'
8746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8747   (eval $ac_try) 2>&5
8748   ac_status=$?
8749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8750   (exit $ac_status); }; }; then
8751   ac_cv_lib_Xext_XScreenSaverRegister=yes
8752 else
8753   echo "$as_me: failed program was:" >&5
8754 cat conftest.$ac_ext >&5
8755 ac_cv_lib_Xext_XScreenSaverRegister=no
8756 fi
8757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8758 LIBS=$ac_check_lib_save_LIBS
8759 fi
8760 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
8761 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
8762 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
8763   true
8764 else
8765   have_mit=no
8766 fi
8767
8768   CPPFLAGS="$ac_save_CPPFLAGS"
8769   LDFLAGS="$ac_save_LDFLAGS"
8770 #  LIBS="$ac_save_LIBS"
8771
8772
8773     if test "$have_mit" = no; then
8774       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
8775       # of in Xext.  Thank you master, may I have another.
8776
8777   ac_save_CPPFLAGS="$CPPFLAGS"
8778   ac_save_LDFLAGS="$LDFLAGS"
8779 #  ac_save_LIBS="$LIBS"
8780
8781   if test \! -z "$includedir" ; then
8782     CPPFLAGS="$CPPFLAGS -I$includedir"
8783   fi
8784   # note: $X_CFLAGS includes $x_includes
8785   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8786
8787   if test \! -z "$libdir" ; then
8788     LDFLAGS="$LDFLAGS -L$libdir"
8789   fi
8790   # note: $X_LIBS includes $x_libraries
8791   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8792
8793   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
8794 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
8795 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
8796   echo $ECHO_N "(cached) $ECHO_C" >&6
8797 else
8798   ac_check_lib_save_LIBS=$LIBS
8799 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
8800 cat >conftest.$ac_ext <<_ACEOF
8801 #line $LINENO "configure"
8802 #include "confdefs.h"
8803
8804 /* Override any gcc2 internal prototype to avoid an error.  */
8805 #ifdef __cplusplus
8806 extern "C"
8807 #endif
8808 /* We use char because int might match the return type of a gcc2
8809    builtin and then its argument prototype would still apply.  */
8810 char XScreenSaverRegister ();
8811 #ifdef F77_DUMMY_MAIN
8812 #  ifdef __cplusplus
8813      extern "C"
8814 #  endif
8815    int F77_DUMMY_MAIN() { return 1; }
8816 #endif
8817 int
8818 main ()
8819 {
8820 XScreenSaverRegister ();
8821   ;
8822   return 0;
8823 }
8824 _ACEOF
8825 rm -f conftest.$ac_objext conftest$ac_exeext
8826 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8827   (eval $ac_link) 2>&5
8828   ac_status=$?
8829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8830   (exit $ac_status); } &&
8831          { ac_try='test -s conftest$ac_exeext'
8832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8833   (eval $ac_try) 2>&5
8834   ac_status=$?
8835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8836   (exit $ac_status); }; }; then
8837   ac_cv_lib_XExExt_XScreenSaverRegister=yes
8838 else
8839   echo "$as_me: failed program was:" >&5
8840 cat conftest.$ac_ext >&5
8841 ac_cv_lib_XExExt_XScreenSaverRegister=no
8842 fi
8843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8844 LIBS=$ac_check_lib_save_LIBS
8845 fi
8846 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
8847 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
8848 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
8849   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
8850 else
8851   true
8852 fi
8853
8854   CPPFLAGS="$ac_save_CPPFLAGS"
8855   LDFLAGS="$ac_save_LDFLAGS"
8856 #  LIBS="$ac_save_LIBS"
8857
8858     fi
8859
8860     if test "$have_mit" = no; then
8861       # Double fuck!  Looks like some versions of XFree86 (whichever version
8862       # it is that comes with RedHat Linux 2.0 -- I can't find a version
8863       # number) put this garbage in Xss instead of Xext.  Thank you master,
8864       #  may I have another.
8865
8866   ac_save_CPPFLAGS="$CPPFLAGS"
8867   ac_save_LDFLAGS="$LDFLAGS"
8868 #  ac_save_LIBS="$LIBS"
8869
8870   if test \! -z "$includedir" ; then
8871     CPPFLAGS="$CPPFLAGS -I$includedir"
8872   fi
8873   # note: $X_CFLAGS includes $x_includes
8874   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8875
8876   if test \! -z "$libdir" ; then
8877     LDFLAGS="$LDFLAGS -L$libdir"
8878   fi
8879   # note: $X_LIBS includes $x_libraries
8880   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8881
8882   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
8883 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
8884 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
8885   echo $ECHO_N "(cached) $ECHO_C" >&6
8886 else
8887   ac_check_lib_save_LIBS=$LIBS
8888 LIBS="-lXss -lX11 -lXext -lm $LIBS"
8889 cat >conftest.$ac_ext <<_ACEOF
8890 #line $LINENO "configure"
8891 #include "confdefs.h"
8892
8893 /* Override any gcc2 internal prototype to avoid an error.  */
8894 #ifdef __cplusplus
8895 extern "C"
8896 #endif
8897 /* We use char because int might match the return type of a gcc2
8898    builtin and then its argument prototype would still apply.  */
8899 char XScreenSaverRegister ();
8900 #ifdef F77_DUMMY_MAIN
8901 #  ifdef __cplusplus
8902      extern "C"
8903 #  endif
8904    int F77_DUMMY_MAIN() { return 1; }
8905 #endif
8906 int
8907 main ()
8908 {
8909 XScreenSaverRegister ();
8910   ;
8911   return 0;
8912 }
8913 _ACEOF
8914 rm -f conftest.$ac_objext conftest$ac_exeext
8915 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8916   (eval $ac_link) 2>&5
8917   ac_status=$?
8918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8919   (exit $ac_status); } &&
8920          { ac_try='test -s conftest$ac_exeext'
8921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8922   (eval $ac_try) 2>&5
8923   ac_status=$?
8924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925   (exit $ac_status); }; }; then
8926   ac_cv_lib_Xss_XScreenSaverRegister=yes
8927 else
8928   echo "$as_me: failed program was:" >&5
8929 cat conftest.$ac_ext >&5
8930 ac_cv_lib_Xss_XScreenSaverRegister=no
8931 fi
8932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8933 LIBS=$ac_check_lib_save_LIBS
8934 fi
8935 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
8936 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
8937 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
8938   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
8939 else
8940   true
8941 fi
8942
8943   CPPFLAGS="$ac_save_CPPFLAGS"
8944   LDFLAGS="$ac_save_LDFLAGS"
8945 #  LIBS="$ac_save_LIBS"
8946
8947     fi
8948
8949   if test "$have_mit" = yes; then
8950     cat >>confdefs.h <<\_ACEOF
8951 #define HAVE_MIT_SAVER_EXTENSION 1
8952 _ACEOF
8953
8954   fi
8955
8956   fi
8957
8958 elif test "$with_mit" != no; then
8959   echo "error: must be yes or no: --with-mit-ext=$with_mit"
8960   exit 1
8961 fi
8962
8963
8964 ###############################################################################
8965 #
8966 #       Check for the XIDLE server extension.
8967 #
8968 ###############################################################################
8969
8970 have_xidle=no
8971 with_xidle_req=unspecified
8972
8973 # Check whether --with-xidle-ext or --without-xidle-ext was given.
8974 if test "${with_xidle_ext+set}" = set; then
8975   withval="$with_xidle_ext"
8976   with_xidle="$withval"; with_xidle_req="$withval"
8977 else
8978   with_xidle=yes
8979 fi;
8980
8981
8982    case "$with_xidle" in
8983     yes) ;;
8984     no)  ;;
8985
8986     /*)
8987      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
8988 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
8989      d=$with_xidle/include
8990      if test -d $d; then
8991        X_CFLAGS="-I$d $X_CFLAGS"
8992        echo "$as_me:$LINENO: result: $d" >&5
8993 echo "${ECHO_T}$d" >&6
8994      else
8995        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8996 echo "${ECHO_T}not found ($d: no such directory)" >&6
8997      fi
8998
8999      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
9000 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
9001      d=$with_xidle/lib
9002      if test -d $d; then
9003        X_LIBS="-L$d $X_LIBS"
9004        echo "$as_me:$LINENO: result: $d" >&5
9005 echo "${ECHO_T}$d" >&6
9006      else
9007        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9008 echo "${ECHO_T}not found ($d: no such directory)" >&6
9009      fi
9010
9011      # replace the directory string with "yes".
9012      with_xidle_req="yes"
9013      with_xidle=$with_xidle_req
9014      ;;
9015
9016     *)
9017      echo ""
9018      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
9019      echo "       If it is a directory, then \`DIR/include' will be added to"
9020      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9021      exit 1
9022      ;;
9023    esac
9024
9025
9026 if test "$with_xidle" = yes; then
9027
9028   ac_save_CPPFLAGS="$CPPFLAGS"
9029   if test \! -z "$includedir" ; then
9030     CPPFLAGS="$CPPFLAGS -I$includedir"
9031   fi
9032   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9033   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
9034 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
9035 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
9036   echo $ECHO_N "(cached) $ECHO_C" >&6
9037 else
9038   cat >conftest.$ac_ext <<_ACEOF
9039 #line $LINENO "configure"
9040 #include "confdefs.h"
9041 #include <X11/Xlib.h>
9042
9043 #include <X11/extensions/xidle.h>
9044 _ACEOF
9045 rm -f conftest.$ac_objext
9046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9047   (eval $ac_compile) 2>&5
9048   ac_status=$?
9049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9050   (exit $ac_status); } &&
9051          { ac_try='test -s conftest.$ac_objext'
9052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9053   (eval $ac_try) 2>&5
9054   ac_status=$?
9055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9056   (exit $ac_status); }; }; then
9057   ac_cv_header_X11_extensions_xidle_h=yes
9058 else
9059   echo "$as_me: failed program was:" >&5
9060 cat conftest.$ac_ext >&5
9061 ac_cv_header_X11_extensions_xidle_h=no
9062 fi
9063 rm -f conftest.$ac_objext conftest.$ac_ext
9064 fi
9065 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9066 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9067 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9068   have_xidle=yes
9069                      cat >>confdefs.h <<\_ACEOF
9070 #define HAVE_XIDLE_EXTENSION 1
9071 _ACEOF
9072
9073 fi
9074
9075
9076   CPPFLAGS="$ac_save_CPPFLAGS"
9077 elif test "$with_xidle" != no; then
9078   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9079   exit 1
9080 fi
9081
9082
9083 ###############################################################################
9084 #
9085 #       Check for the SGI-VIDEO-CONTROL server extension.
9086 #
9087 ###############################################################################
9088
9089 have_sgivc=no
9090 with_sgivc_req=unspecified
9091
9092 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9093 if test "${with_sgivc_ext+set}" = set; then
9094   withval="$with_sgivc_ext"
9095   with_sgivc="$withval"; with_sgivc_req="$withval"
9096 else
9097   with_sgivc=yes
9098 fi;
9099
9100
9101    case "$with_sgivc" in
9102     yes) ;;
9103     no)  ;;
9104
9105     /*)
9106      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9107 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9108      d=$with_sgivc/include
9109      if test -d $d; then
9110        X_CFLAGS="-I$d $X_CFLAGS"
9111        echo "$as_me:$LINENO: result: $d" >&5
9112 echo "${ECHO_T}$d" >&6
9113      else
9114        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9115 echo "${ECHO_T}not found ($d: no such directory)" >&6
9116      fi
9117
9118      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9119 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9120      d=$with_sgivc/lib
9121      if test -d $d; then
9122        X_LIBS="-L$d $X_LIBS"
9123        echo "$as_me:$LINENO: result: $d" >&5
9124 echo "${ECHO_T}$d" >&6
9125      else
9126        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9127 echo "${ECHO_T}not found ($d: no such directory)" >&6
9128      fi
9129
9130      # replace the directory string with "yes".
9131      with_sgivc_req="yes"
9132      with_sgivc=$with_sgivc_req
9133      ;;
9134
9135     *)
9136      echo ""
9137      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9138      echo "       If it is a directory, then \`DIR/include' will be added to"
9139      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9140      exit 1
9141      ;;
9142    esac
9143
9144
9145 if test "$with_sgivc" = yes; then
9146
9147   # first check for XSGIvc.h
9148
9149   ac_save_CPPFLAGS="$CPPFLAGS"
9150   if test \! -z "$includedir" ; then
9151     CPPFLAGS="$CPPFLAGS -I$includedir"
9152   fi
9153   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9154   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9155 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9156 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9157   echo $ECHO_N "(cached) $ECHO_C" >&6
9158 else
9159   cat >conftest.$ac_ext <<_ACEOF
9160 #line $LINENO "configure"
9161 #include "confdefs.h"
9162 #include <X11/Xlib.h>
9163
9164 #include <X11/extensions/XSGIvc.h>
9165 _ACEOF
9166 rm -f conftest.$ac_objext
9167 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9168   (eval $ac_compile) 2>&5
9169   ac_status=$?
9170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9171   (exit $ac_status); } &&
9172          { ac_try='test -s conftest.$ac_objext'
9173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9174   (eval $ac_try) 2>&5
9175   ac_status=$?
9176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9177   (exit $ac_status); }; }; then
9178   ac_cv_header_X11_extensions_XSGIvc_h=yes
9179 else
9180   echo "$as_me: failed program was:" >&5
9181 cat conftest.$ac_ext >&5
9182 ac_cv_header_X11_extensions_XSGIvc_h=no
9183 fi
9184 rm -f conftest.$ac_objext conftest.$ac_ext
9185 fi
9186 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9187 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9188 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
9189   have_sgivc=yes
9190 fi
9191
9192
9193   CPPFLAGS="$ac_save_CPPFLAGS"
9194
9195   # if that succeeded, then check for the -lXsgivc
9196   if test "$have_sgivc" = yes; then
9197     have_sgivc=no
9198
9199   ac_save_CPPFLAGS="$CPPFLAGS"
9200   ac_save_LDFLAGS="$LDFLAGS"
9201 #  ac_save_LIBS="$LIBS"
9202
9203   if test \! -z "$includedir" ; then
9204     CPPFLAGS="$CPPFLAGS -I$includedir"
9205   fi
9206   # note: $X_CFLAGS includes $x_includes
9207   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9208
9209   if test \! -z "$libdir" ; then
9210     LDFLAGS="$LDFLAGS -L$libdir"
9211   fi
9212   # note: $X_LIBS includes $x_libraries
9213   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9214
9215   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
9216 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
9217 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
9218   echo $ECHO_N "(cached) $ECHO_C" >&6
9219 else
9220   ac_check_lib_save_LIBS=$LIBS
9221 LIBS="-lXsgivc -lXext -lX11 $LIBS"
9222 cat >conftest.$ac_ext <<_ACEOF
9223 #line $LINENO "configure"
9224 #include "confdefs.h"
9225
9226 /* Override any gcc2 internal prototype to avoid an error.  */
9227 #ifdef __cplusplus
9228 extern "C"
9229 #endif
9230 /* We use char because int might match the return type of a gcc2
9231    builtin and then its argument prototype would still apply.  */
9232 char XSGIvcQueryGammaMap ();
9233 #ifdef F77_DUMMY_MAIN
9234 #  ifdef __cplusplus
9235      extern "C"
9236 #  endif
9237    int F77_DUMMY_MAIN() { return 1; }
9238 #endif
9239 int
9240 main ()
9241 {
9242 XSGIvcQueryGammaMap ();
9243   ;
9244   return 0;
9245 }
9246 _ACEOF
9247 rm -f conftest.$ac_objext conftest$ac_exeext
9248 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9249   (eval $ac_link) 2>&5
9250   ac_status=$?
9251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9252   (exit $ac_status); } &&
9253          { ac_try='test -s conftest$ac_exeext'
9254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9255   (eval $ac_try) 2>&5
9256   ac_status=$?
9257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9258   (exit $ac_status); }; }; then
9259   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
9260 else
9261   echo "$as_me: failed program was:" >&5
9262 cat conftest.$ac_ext >&5
9263 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
9264 fi
9265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9266 LIBS=$ac_check_lib_save_LIBS
9267 fi
9268 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
9269 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
9270 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
9271   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
9272 else
9273   true
9274 fi
9275
9276   CPPFLAGS="$ac_save_CPPFLAGS"
9277   LDFLAGS="$ac_save_LDFLAGS"
9278 #  LIBS="$ac_save_LIBS"
9279
9280   fi
9281
9282   # if that succeeded, then we've really got it.
9283   if test "$have_sgivc" = yes; then
9284     cat >>confdefs.h <<\_ACEOF
9285 #define HAVE_SGI_VC_EXTENSION 1
9286 _ACEOF
9287
9288   fi
9289
9290 elif test "$with_sgivc" != no; then
9291   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
9292   exit 1
9293 fi
9294
9295
9296 ###############################################################################
9297 #
9298 #       Check for the DPMS server extension.
9299 #
9300 ###############################################################################
9301
9302 have_dpms=no
9303 with_dpms_req=unspecified
9304
9305 # Check whether --with-dpms-ext or --without-dpms-ext was given.
9306 if test "${with_dpms_ext+set}" = set; then
9307   withval="$with_dpms_ext"
9308   with_dpms="$withval"; with_dpms_req="$withval"
9309 else
9310   with_dpms=yes
9311 fi;
9312
9313
9314    case "$with_dpms" in
9315     yes) ;;
9316     no)  ;;
9317
9318     /*)
9319      echo "$as_me:$LINENO: checking for DPMS headers" >&5
9320 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
9321      d=$with_dpms/include
9322      if test -d $d; then
9323        X_CFLAGS="-I$d $X_CFLAGS"
9324        echo "$as_me:$LINENO: result: $d" >&5
9325 echo "${ECHO_T}$d" >&6
9326      else
9327        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9328 echo "${ECHO_T}not found ($d: no such directory)" >&6
9329      fi
9330
9331      echo "$as_me:$LINENO: checking for DPMS libs" >&5
9332 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
9333      d=$with_dpms/lib
9334      if test -d $d; then
9335        X_LIBS="-L$d $X_LIBS"
9336        echo "$as_me:$LINENO: result: $d" >&5
9337 echo "${ECHO_T}$d" >&6
9338      else
9339        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9340 echo "${ECHO_T}not found ($d: no such directory)" >&6
9341      fi
9342
9343      # replace the directory string with "yes".
9344      with_dpms_req="yes"
9345      with_dpms=$with_dpms_req
9346      ;;
9347
9348     *)
9349      echo ""
9350      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
9351      echo "       If it is a directory, then \`DIR/include' will be added to"
9352      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9353      exit 1
9354      ;;
9355    esac
9356
9357
9358 if test "$with_dpms" = yes; then
9359
9360   # first check for dpms.h
9361
9362   ac_save_CPPFLAGS="$CPPFLAGS"
9363   if test \! -z "$includedir" ; then
9364     CPPFLAGS="$CPPFLAGS -I$includedir"
9365   fi
9366   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9367   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
9368 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
9369 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
9370   echo $ECHO_N "(cached) $ECHO_C" >&6
9371 else
9372   cat >conftest.$ac_ext <<_ACEOF
9373 #line $LINENO "configure"
9374 #include "confdefs.h"
9375 #include <X11/Xlib.h>
9376                      #include <X11/Xmd.h>
9377
9378 #include <X11/extensions/dpms.h>
9379 _ACEOF
9380 rm -f conftest.$ac_objext
9381 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9382   (eval $ac_compile) 2>&5
9383   ac_status=$?
9384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9385   (exit $ac_status); } &&
9386          { ac_try='test -s conftest.$ac_objext'
9387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9388   (eval $ac_try) 2>&5
9389   ac_status=$?
9390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9391   (exit $ac_status); }; }; then
9392   ac_cv_header_X11_extensions_dpms_h=yes
9393 else
9394   echo "$as_me: failed program was:" >&5
9395 cat conftest.$ac_ext >&5
9396 ac_cv_header_X11_extensions_dpms_h=no
9397 fi
9398 rm -f conftest.$ac_objext conftest.$ac_ext
9399 fi
9400 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
9401 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
9402 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
9403   have_dpms=yes
9404 fi
9405
9406
9407   CPPFLAGS="$ac_save_CPPFLAGS"
9408
9409   # if that succeeded, then check for the DPMS code in the libraries
9410   if test "$have_dpms" = yes; then
9411
9412     # first look in -lXext (this is where it is with XFree86 4.0)
9413     have_dpms=no
9414
9415   ac_save_CPPFLAGS="$CPPFLAGS"
9416   ac_save_LDFLAGS="$LDFLAGS"
9417 #  ac_save_LIBS="$LIBS"
9418
9419   if test \! -z "$includedir" ; then
9420     CPPFLAGS="$CPPFLAGS -I$includedir"
9421   fi
9422   # note: $X_CFLAGS includes $x_includes
9423   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9424
9425   if test \! -z "$libdir" ; then
9426     LDFLAGS="$LDFLAGS -L$libdir"
9427   fi
9428   # note: $X_LIBS includes $x_libraries
9429   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9430
9431   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
9432 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
9433 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
9434   echo $ECHO_N "(cached) $ECHO_C" >&6
9435 else
9436   ac_check_lib_save_LIBS=$LIBS
9437 LIBS="-lXext -lXext -lX11 $LIBS"
9438 cat >conftest.$ac_ext <<_ACEOF
9439 #line $LINENO "configure"
9440 #include "confdefs.h"
9441
9442 /* Override any gcc2 internal prototype to avoid an error.  */
9443 #ifdef __cplusplus
9444 extern "C"
9445 #endif
9446 /* We use char because int might match the return type of a gcc2
9447    builtin and then its argument prototype would still apply.  */
9448 char DPMSInfo ();
9449 #ifdef F77_DUMMY_MAIN
9450 #  ifdef __cplusplus
9451      extern "C"
9452 #  endif
9453    int F77_DUMMY_MAIN() { return 1; }
9454 #endif
9455 int
9456 main ()
9457 {
9458 DPMSInfo ();
9459   ;
9460   return 0;
9461 }
9462 _ACEOF
9463 rm -f conftest.$ac_objext conftest$ac_exeext
9464 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9465   (eval $ac_link) 2>&5
9466   ac_status=$?
9467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9468   (exit $ac_status); } &&
9469          { ac_try='test -s conftest$ac_exeext'
9470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9471   (eval $ac_try) 2>&5
9472   ac_status=$?
9473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9474   (exit $ac_status); }; }; then
9475   ac_cv_lib_Xext_DPMSInfo=yes
9476 else
9477   echo "$as_me: failed program was:" >&5
9478 cat conftest.$ac_ext >&5
9479 ac_cv_lib_Xext_DPMSInfo=no
9480 fi
9481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9482 LIBS=$ac_check_lib_save_LIBS
9483 fi
9484 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
9485 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
9486 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
9487   have_dpms=yes
9488 else
9489   true
9490 fi
9491
9492   CPPFLAGS="$ac_save_CPPFLAGS"
9493   LDFLAGS="$ac_save_LDFLAGS"
9494 #  LIBS="$ac_save_LIBS"
9495
9496
9497     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
9498     if test "$have_dpms" = no; then
9499
9500   ac_save_CPPFLAGS="$CPPFLAGS"
9501   ac_save_LDFLAGS="$LDFLAGS"
9502 #  ac_save_LIBS="$LIBS"
9503
9504   if test \! -z "$includedir" ; then
9505     CPPFLAGS="$CPPFLAGS -I$includedir"
9506   fi
9507   # note: $X_CFLAGS includes $x_includes
9508   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9509
9510   if test \! -z "$libdir" ; then
9511     LDFLAGS="$LDFLAGS -L$libdir"
9512   fi
9513   # note: $X_LIBS includes $x_libraries
9514   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9515
9516   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
9517 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
9518 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
9519   echo $ECHO_N "(cached) $ECHO_C" >&6
9520 else
9521   ac_check_lib_save_LIBS=$LIBS
9522 LIBS="-lXdpms -lXext -lX11 $LIBS"
9523 cat >conftest.$ac_ext <<_ACEOF
9524 #line $LINENO "configure"
9525 #include "confdefs.h"
9526
9527 /* Override any gcc2 internal prototype to avoid an error.  */
9528 #ifdef __cplusplus
9529 extern "C"
9530 #endif
9531 /* We use char because int might match the return type of a gcc2
9532    builtin and then its argument prototype would still apply.  */
9533 char DPMSInfo ();
9534 #ifdef F77_DUMMY_MAIN
9535 #  ifdef __cplusplus
9536      extern "C"
9537 #  endif
9538    int F77_DUMMY_MAIN() { return 1; }
9539 #endif
9540 int
9541 main ()
9542 {
9543 DPMSInfo ();
9544   ;
9545   return 0;
9546 }
9547 _ACEOF
9548 rm -f conftest.$ac_objext conftest$ac_exeext
9549 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9550   (eval $ac_link) 2>&5
9551   ac_status=$?
9552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9553   (exit $ac_status); } &&
9554          { ac_try='test -s conftest$ac_exeext'
9555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9556   (eval $ac_try) 2>&5
9557   ac_status=$?
9558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9559   (exit $ac_status); }; }; then
9560   ac_cv_lib_Xdpms_DPMSInfo=yes
9561 else
9562   echo "$as_me: failed program was:" >&5
9563 cat conftest.$ac_ext >&5
9564 ac_cv_lib_Xdpms_DPMSInfo=no
9565 fi
9566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9567 LIBS=$ac_check_lib_save_LIBS
9568 fi
9569 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
9570 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
9571 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
9572   have_dpms=yes; XDPMS_LIBS="-lXdpms"
9573 else
9574   true
9575 fi
9576
9577   CPPFLAGS="$ac_save_CPPFLAGS"
9578   LDFLAGS="$ac_save_LDFLAGS"
9579 #  LIBS="$ac_save_LIBS"
9580
9581     fi
9582   fi
9583
9584
9585   # if that succeeded, then we've really got it.
9586   if test "$have_dpms" = yes; then
9587     cat >>confdefs.h <<\_ACEOF
9588 #define HAVE_DPMS_EXTENSION 1
9589 _ACEOF
9590
9591   fi
9592
9593 elif test "$with_dpms" != no; then
9594   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
9595   exit 1
9596 fi
9597
9598
9599 ###############################################################################
9600 #
9601 #       Check for the XINERAMA server extension.
9602 #
9603 ###############################################################################
9604
9605 have_xinerama=no
9606 with_xinerama_req=unspecified
9607
9608 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
9609 if test "${with_xinerama_ext+set}" = set; then
9610   withval="$with_xinerama_ext"
9611   with_xinerama="$withval"; with_xinerama_req="$withval"
9612 else
9613   with_xinerama=yes
9614 fi;
9615
9616
9617    case "$with_xinerama" in
9618     yes) ;;
9619     no)  ;;
9620
9621     /*)
9622      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
9623 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
9624      d=$with_xinerama/include
9625      if test -d $d; then
9626        X_CFLAGS="-I$d $X_CFLAGS"
9627        echo "$as_me:$LINENO: result: $d" >&5
9628 echo "${ECHO_T}$d" >&6
9629      else
9630        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9631 echo "${ECHO_T}not found ($d: no such directory)" >&6
9632      fi
9633
9634      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
9635 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
9636      d=$with_xinerama/lib
9637      if test -d $d; then
9638        X_LIBS="-L$d $X_LIBS"
9639        echo "$as_me:$LINENO: result: $d" >&5
9640 echo "${ECHO_T}$d" >&6
9641      else
9642        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9643 echo "${ECHO_T}not found ($d: no such directory)" >&6
9644      fi
9645
9646      # replace the directory string with "yes".
9647      with_xinerama_req="yes"
9648      with_xinerama=$with_xinerama_req
9649      ;;
9650
9651     *)
9652      echo ""
9653      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
9654      echo "       If it is a directory, then \`DIR/include' will be added to"
9655      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9656      exit 1
9657      ;;
9658    esac
9659
9660
9661 if test "$with_xinerama" = yes; then
9662
9663   # first check for Xinerama.h
9664
9665   ac_save_CPPFLAGS="$CPPFLAGS"
9666   if test \! -z "$includedir" ; then
9667     CPPFLAGS="$CPPFLAGS -I$includedir"
9668   fi
9669   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9670   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
9671 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
9672 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
9673   echo $ECHO_N "(cached) $ECHO_C" >&6
9674 else
9675   cat >conftest.$ac_ext <<_ACEOF
9676 #line $LINENO "configure"
9677 #include "confdefs.h"
9678 #include <X11/Xlib.h>
9679
9680 #include <X11/extensions/Xinerama.h>
9681 _ACEOF
9682 rm -f conftest.$ac_objext
9683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9684   (eval $ac_compile) 2>&5
9685   ac_status=$?
9686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9687   (exit $ac_status); } &&
9688          { ac_try='test -s conftest.$ac_objext'
9689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9690   (eval $ac_try) 2>&5
9691   ac_status=$?
9692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9693   (exit $ac_status); }; }; then
9694   ac_cv_header_X11_extensions_Xinerama_h=yes
9695 else
9696   echo "$as_me: failed program was:" >&5
9697 cat conftest.$ac_ext >&5
9698 ac_cv_header_X11_extensions_Xinerama_h=no
9699 fi
9700 rm -f conftest.$ac_objext conftest.$ac_ext
9701 fi
9702 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
9703 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
9704 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
9705   have_xinerama=yes
9706 fi
9707
9708
9709   CPPFLAGS="$ac_save_CPPFLAGS"
9710
9711   # if that succeeded, then check for the XINERAMA code in the libraries
9712   if test "$have_xinerama" = yes; then
9713
9714     # first look in -lXext
9715     have_xinerama=no
9716
9717   ac_save_CPPFLAGS="$CPPFLAGS"
9718   ac_save_LDFLAGS="$LDFLAGS"
9719 #  ac_save_LIBS="$LIBS"
9720
9721   if test \! -z "$includedir" ; then
9722     CPPFLAGS="$CPPFLAGS -I$includedir"
9723   fi
9724   # note: $X_CFLAGS includes $x_includes
9725   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9726
9727   if test \! -z "$libdir" ; then
9728     LDFLAGS="$LDFLAGS -L$libdir"
9729   fi
9730   # note: $X_LIBS includes $x_libraries
9731   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9732
9733   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXext" >&5
9734 echo $ECHO_N "checking for XineramaQueryExtension in -lXext... $ECHO_C" >&6
9735 if test "${ac_cv_lib_Xext_XineramaQueryExtension+set}" = set; then
9736   echo $ECHO_N "(cached) $ECHO_C" >&6
9737 else
9738   ac_check_lib_save_LIBS=$LIBS
9739 LIBS="-lXext -lXext -lX11 $LIBS"
9740 cat >conftest.$ac_ext <<_ACEOF
9741 #line $LINENO "configure"
9742 #include "confdefs.h"
9743
9744 /* Override any gcc2 internal prototype to avoid an error.  */
9745 #ifdef __cplusplus
9746 extern "C"
9747 #endif
9748 /* We use char because int might match the return type of a gcc2
9749    builtin and then its argument prototype would still apply.  */
9750 char XineramaQueryExtension ();
9751 #ifdef F77_DUMMY_MAIN
9752 #  ifdef __cplusplus
9753      extern "C"
9754 #  endif
9755    int F77_DUMMY_MAIN() { return 1; }
9756 #endif
9757 int
9758 main ()
9759 {
9760 XineramaQueryExtension ();
9761   ;
9762   return 0;
9763 }
9764 _ACEOF
9765 rm -f conftest.$ac_objext conftest$ac_exeext
9766 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9767   (eval $ac_link) 2>&5
9768   ac_status=$?
9769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9770   (exit $ac_status); } &&
9771          { ac_try='test -s conftest$ac_exeext'
9772   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9773   (eval $ac_try) 2>&5
9774   ac_status=$?
9775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9776   (exit $ac_status); }; }; then
9777   ac_cv_lib_Xext_XineramaQueryExtension=yes
9778 else
9779   echo "$as_me: failed program was:" >&5
9780 cat conftest.$ac_ext >&5
9781 ac_cv_lib_Xext_XineramaQueryExtension=no
9782 fi
9783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9784 LIBS=$ac_check_lib_save_LIBS
9785 fi
9786 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryExtension" >&5
9787 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryExtension" >&6
9788 if test $ac_cv_lib_Xext_XineramaQueryExtension = yes; then
9789   have_xinerama=yes
9790 else
9791   true
9792 fi
9793
9794   CPPFLAGS="$ac_save_CPPFLAGS"
9795   LDFLAGS="$ac_save_LDFLAGS"
9796 #  LIBS="$ac_save_LIBS"
9797
9798
9799     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
9800     if test "$have_xinerama" = no; then
9801
9802   ac_save_CPPFLAGS="$CPPFLAGS"
9803   ac_save_LDFLAGS="$LDFLAGS"
9804 #  ac_save_LIBS="$LIBS"
9805
9806   if test \! -z "$includedir" ; then
9807     CPPFLAGS="$CPPFLAGS -I$includedir"
9808   fi
9809   # note: $X_CFLAGS includes $x_includes
9810   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9811
9812   if test \! -z "$libdir" ; then
9813     LDFLAGS="$LDFLAGS -L$libdir"
9814   fi
9815   # note: $X_LIBS includes $x_libraries
9816   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9817
9818   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5
9819 echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6
9820 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
9821   echo $ECHO_N "(cached) $ECHO_C" >&6
9822 else
9823   ac_check_lib_save_LIBS=$LIBS
9824 LIBS="-lXinerama -lXext -lX11 $LIBS"
9825 cat >conftest.$ac_ext <<_ACEOF
9826 #line $LINENO "configure"
9827 #include "confdefs.h"
9828
9829 /* Override any gcc2 internal prototype to avoid an error.  */
9830 #ifdef __cplusplus
9831 extern "C"
9832 #endif
9833 /* We use char because int might match the return type of a gcc2
9834    builtin and then its argument prototype would still apply.  */
9835 char XineramaQueryExtension ();
9836 #ifdef F77_DUMMY_MAIN
9837 #  ifdef __cplusplus
9838      extern "C"
9839 #  endif
9840    int F77_DUMMY_MAIN() { return 1; }
9841 #endif
9842 int
9843 main ()
9844 {
9845 XineramaQueryExtension ();
9846   ;
9847   return 0;
9848 }
9849 _ACEOF
9850 rm -f conftest.$ac_objext conftest$ac_exeext
9851 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9852   (eval $ac_link) 2>&5
9853   ac_status=$?
9854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9855   (exit $ac_status); } &&
9856          { ac_try='test -s conftest$ac_exeext'
9857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9858   (eval $ac_try) 2>&5
9859   ac_status=$?
9860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9861   (exit $ac_status); }; }; then
9862   ac_cv_lib_Xinerama_XineramaQueryExtension=yes
9863 else
9864   echo "$as_me: failed program was:" >&5
9865 cat conftest.$ac_ext >&5
9866 ac_cv_lib_Xinerama_XineramaQueryExtension=no
9867 fi
9868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9869 LIBS=$ac_check_lib_save_LIBS
9870 fi
9871 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
9872 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6
9873 if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
9874   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
9875 else
9876   true
9877 fi
9878
9879   CPPFLAGS="$ac_save_CPPFLAGS"
9880   LDFLAGS="$ac_save_LDFLAGS"
9881 #  LIBS="$ac_save_LIBS"
9882
9883     fi
9884   fi
9885
9886   # if that succeeded, then we've really got it.
9887   if test "$have_xinerama" = yes; then
9888     cat >>confdefs.h <<\_ACEOF
9889 #define HAVE_XINERAMA 1
9890 _ACEOF
9891
9892   fi
9893
9894 elif test "$with_xinerama" != no; then
9895   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9896   exit 1
9897 fi
9898
9899
9900 ###############################################################################
9901 #
9902 #       Check for the XF86VMODE server extension (for virtual screens.)
9903 #
9904 ###############################################################################
9905
9906 have_xf86vmode=no
9907 with_xf86vmode_req=unspecified
9908
9909 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
9910 if test "${with_xf86vmode_ext+set}" = set; then
9911   withval="$with_xf86vmode_ext"
9912   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9913 else
9914   with_xf86vmode=yes
9915 fi;
9916
9917
9918    case "$with_xf86vmode" in
9919     yes) ;;
9920     no)  ;;
9921
9922     /*)
9923      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
9924 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
9925      d=$with_xf86vmode/include
9926      if test -d $d; then
9927        X_CFLAGS="-I$d $X_CFLAGS"
9928        echo "$as_me:$LINENO: result: $d" >&5
9929 echo "${ECHO_T}$d" >&6
9930      else
9931        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9932 echo "${ECHO_T}not found ($d: no such directory)" >&6
9933      fi
9934
9935      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
9936 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
9937      d=$with_xf86vmode/lib
9938      if test -d $d; then
9939        X_LIBS="-L$d $X_LIBS"
9940        echo "$as_me:$LINENO: result: $d" >&5
9941 echo "${ECHO_T}$d" >&6
9942      else
9943        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9944 echo "${ECHO_T}not found ($d: no such directory)" >&6
9945      fi
9946
9947      # replace the directory string with "yes".
9948      with_xf86vmode_req="yes"
9949      with_xf86vmode=$with_xf86vmode_req
9950      ;;
9951
9952     *)
9953      echo ""
9954      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9955      echo "       If it is a directory, then \`DIR/include' will be added to"
9956      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9957      exit 1
9958      ;;
9959    esac
9960
9961
9962 if test "$with_xf86vmode" = yes; then
9963
9964   # first check for xf86vmode.h
9965
9966   ac_save_CPPFLAGS="$CPPFLAGS"
9967   if test \! -z "$includedir" ; then
9968     CPPFLAGS="$CPPFLAGS -I$includedir"
9969   fi
9970   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9971   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
9972 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
9973 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
9974   echo $ECHO_N "(cached) $ECHO_C" >&6
9975 else
9976   cat >conftest.$ac_ext <<_ACEOF
9977 #line $LINENO "configure"
9978 #include "confdefs.h"
9979 #include <X11/Xlib.h>
9980
9981 #include <X11/extensions/xf86vmode.h>
9982 _ACEOF
9983 rm -f conftest.$ac_objext
9984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9985   (eval $ac_compile) 2>&5
9986   ac_status=$?
9987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9988   (exit $ac_status); } &&
9989          { ac_try='test -s conftest.$ac_objext'
9990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9991   (eval $ac_try) 2>&5
9992   ac_status=$?
9993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9994   (exit $ac_status); }; }; then
9995   ac_cv_header_X11_extensions_xf86vmode_h=yes
9996 else
9997   echo "$as_me: failed program was:" >&5
9998 cat conftest.$ac_ext >&5
9999 ac_cv_header_X11_extensions_xf86vmode_h=no
10000 fi
10001 rm -f conftest.$ac_objext conftest.$ac_ext
10002 fi
10003 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10004 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10005 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10006   have_xf86vmode=yes
10007 fi
10008
10009
10010   CPPFLAGS="$ac_save_CPPFLAGS"
10011
10012   # if that succeeded, then check for the -lXxf86vm
10013   if test "$have_xf86vmode" = yes; then
10014     have_xf86vmode=no
10015
10016   ac_save_CPPFLAGS="$CPPFLAGS"
10017   ac_save_LDFLAGS="$LDFLAGS"
10018 #  ac_save_LIBS="$LIBS"
10019
10020   if test \! -z "$includedir" ; then
10021     CPPFLAGS="$CPPFLAGS -I$includedir"
10022   fi
10023   # note: $X_CFLAGS includes $x_includes
10024   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10025
10026   if test \! -z "$libdir" ; then
10027     LDFLAGS="$LDFLAGS -L$libdir"
10028   fi
10029   # note: $X_LIBS includes $x_libraries
10030   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10031
10032   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
10033 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
10034 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
10035   echo $ECHO_N "(cached) $ECHO_C" >&6
10036 else
10037   ac_check_lib_save_LIBS=$LIBS
10038 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10039 cat >conftest.$ac_ext <<_ACEOF
10040 #line $LINENO "configure"
10041 #include "confdefs.h"
10042
10043 /* Override any gcc2 internal prototype to avoid an error.  */
10044 #ifdef __cplusplus
10045 extern "C"
10046 #endif
10047 /* We use char because int might match the return type of a gcc2
10048    builtin and then its argument prototype would still apply.  */
10049 char XF86VidModeGetViewPort ();
10050 #ifdef F77_DUMMY_MAIN
10051 #  ifdef __cplusplus
10052      extern "C"
10053 #  endif
10054    int F77_DUMMY_MAIN() { return 1; }
10055 #endif
10056 int
10057 main ()
10058 {
10059 XF86VidModeGetViewPort ();
10060   ;
10061   return 0;
10062 }
10063 _ACEOF
10064 rm -f conftest.$ac_objext conftest$ac_exeext
10065 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10066   (eval $ac_link) 2>&5
10067   ac_status=$?
10068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10069   (exit $ac_status); } &&
10070          { ac_try='test -s conftest$ac_exeext'
10071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10072   (eval $ac_try) 2>&5
10073   ac_status=$?
10074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10075   (exit $ac_status); }; }; then
10076   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10077 else
10078   echo "$as_me: failed program was:" >&5
10079 cat conftest.$ac_ext >&5
10080 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10081 fi
10082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10083 LIBS=$ac_check_lib_save_LIBS
10084 fi
10085 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10086 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10087 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10088   have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10089 else
10090   true
10091 fi
10092
10093   CPPFLAGS="$ac_save_CPPFLAGS"
10094   LDFLAGS="$ac_save_LDFLAGS"
10095 #  LIBS="$ac_save_LIBS"
10096
10097   fi
10098
10099   # if that succeeded, then we've really got it.
10100   if test "$have_xf86vmode" = yes; then
10101     cat >>confdefs.h <<\_ACEOF
10102 #define HAVE_XF86VMODE 1
10103 _ACEOF
10104
10105   fi
10106
10107 elif test "$with_xf86vmode" != no; then
10108   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
10109   exit 1
10110 fi
10111
10112
10113 ###############################################################################
10114 #
10115 #       Check for the XF86VMODE server extension (for gamma fading.)
10116 #
10117 ###############################################################################
10118
10119 have_xf86gamma=no
10120 have_xf86gamma_ramp=no
10121 with_xf86gamma_req=unspecified
10122
10123 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
10124 if test "${with_xf86gamma_ext+set}" = set; then
10125   withval="$with_xf86gamma_ext"
10126   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
10127 else
10128   with_xf86gamma=yes
10129 fi;
10130
10131
10132    case "$with_xf86gamma" in
10133     yes) ;;
10134     no)  ;;
10135
10136     /*)
10137      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
10138 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
10139      d=$with_xf86gamma/include
10140      if test -d $d; then
10141        X_CFLAGS="-I$d $X_CFLAGS"
10142        echo "$as_me:$LINENO: result: $d" >&5
10143 echo "${ECHO_T}$d" >&6
10144      else
10145        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10146 echo "${ECHO_T}not found ($d: no such directory)" >&6
10147      fi
10148
10149      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
10150 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
10151      d=$with_xf86gamma/lib
10152      if test -d $d; then
10153        X_LIBS="-L$d $X_LIBS"
10154        echo "$as_me:$LINENO: result: $d" >&5
10155 echo "${ECHO_T}$d" >&6
10156      else
10157        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10158 echo "${ECHO_T}not found ($d: no such directory)" >&6
10159      fi
10160
10161      # replace the directory string with "yes".
10162      with_xf86gamma_req="yes"
10163      with_xf86gamma=$with_xf86gamma_req
10164      ;;
10165
10166     *)
10167      echo ""
10168      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
10169      echo "       If it is a directory, then \`DIR/include' will be added to"
10170      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10171      exit 1
10172      ;;
10173    esac
10174
10175
10176 if test "$with_xf86gamma" = yes; then
10177
10178   # first check for xf86vmode.h, if we haven't already
10179   if test "$have_xf86vmode" = yes; then
10180     have_xf86gamma=yes
10181   else
10182
10183   ac_save_CPPFLAGS="$CPPFLAGS"
10184   if test \! -z "$includedir" ; then
10185     CPPFLAGS="$CPPFLAGS -I$includedir"
10186   fi
10187   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10188   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10189 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10190 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10191   echo $ECHO_N "(cached) $ECHO_C" >&6
10192 else
10193   cat >conftest.$ac_ext <<_ACEOF
10194 #line $LINENO "configure"
10195 #include "confdefs.h"
10196 #include <X11/Xlib.h>
10197
10198 #include <X11/extensions/xf86vmode.h>
10199 _ACEOF
10200 rm -f conftest.$ac_objext
10201 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10202   (eval $ac_compile) 2>&5
10203   ac_status=$?
10204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10205   (exit $ac_status); } &&
10206          { ac_try='test -s conftest.$ac_objext'
10207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10208   (eval $ac_try) 2>&5
10209   ac_status=$?
10210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10211   (exit $ac_status); }; }; then
10212   ac_cv_header_X11_extensions_xf86vmode_h=yes
10213 else
10214   echo "$as_me: failed program was:" >&5
10215 cat conftest.$ac_ext >&5
10216 ac_cv_header_X11_extensions_xf86vmode_h=no
10217 fi
10218 rm -f conftest.$ac_objext conftest.$ac_ext
10219 fi
10220 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10221 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10222 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10223   have_xf86gamma=yes
10224 fi
10225
10226
10227   CPPFLAGS="$ac_save_CPPFLAGS"
10228   fi
10229
10230   # if that succeeded, then check for the -lXxf86vm
10231   if test "$have_xf86gamma" = yes; then
10232     have_xf86gamma=no
10233
10234   ac_save_CPPFLAGS="$CPPFLAGS"
10235   ac_save_LDFLAGS="$LDFLAGS"
10236 #  ac_save_LIBS="$LIBS"
10237
10238   if test \! -z "$includedir" ; then
10239     CPPFLAGS="$CPPFLAGS -I$includedir"
10240   fi
10241   # note: $X_CFLAGS includes $x_includes
10242   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10243
10244   if test \! -z "$libdir" ; then
10245     LDFLAGS="$LDFLAGS -L$libdir"
10246   fi
10247   # note: $X_LIBS includes $x_libraries
10248   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10249
10250   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
10251 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
10252 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
10253   echo $ECHO_N "(cached) $ECHO_C" >&6
10254 else
10255   ac_check_lib_save_LIBS=$LIBS
10256 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10257 cat >conftest.$ac_ext <<_ACEOF
10258 #line $LINENO "configure"
10259 #include "confdefs.h"
10260
10261 /* Override any gcc2 internal prototype to avoid an error.  */
10262 #ifdef __cplusplus
10263 extern "C"
10264 #endif
10265 /* We use char because int might match the return type of a gcc2
10266    builtin and then its argument prototype would still apply.  */
10267 char XF86VidModeSetGamma ();
10268 #ifdef F77_DUMMY_MAIN
10269 #  ifdef __cplusplus
10270      extern "C"
10271 #  endif
10272    int F77_DUMMY_MAIN() { return 1; }
10273 #endif
10274 int
10275 main ()
10276 {
10277 XF86VidModeSetGamma ();
10278   ;
10279   return 0;
10280 }
10281 _ACEOF
10282 rm -f conftest.$ac_objext conftest$ac_exeext
10283 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10284   (eval $ac_link) 2>&5
10285   ac_status=$?
10286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10287   (exit $ac_status); } &&
10288          { ac_try='test -s conftest$ac_exeext'
10289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10290   (eval $ac_try) 2>&5
10291   ac_status=$?
10292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10293   (exit $ac_status); }; }; then
10294   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
10295 else
10296   echo "$as_me: failed program was:" >&5
10297 cat conftest.$ac_ext >&5
10298 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
10299 fi
10300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10301 LIBS=$ac_check_lib_save_LIBS
10302 fi
10303 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
10304 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
10305 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
10306   have_xf86gamma=yes
10307 else
10308   true
10309 fi
10310
10311   CPPFLAGS="$ac_save_CPPFLAGS"
10312   LDFLAGS="$ac_save_LDFLAGS"
10313 #  LIBS="$ac_save_LIBS"
10314
10315   fi
10316
10317   # check for the Ramp versions of the functions too.
10318   if test "$have_xf86gamma" = yes; then
10319     have_xf86gamma_ramp=no
10320
10321   ac_save_CPPFLAGS="$CPPFLAGS"
10322   ac_save_LDFLAGS="$LDFLAGS"
10323 #  ac_save_LIBS="$LIBS"
10324
10325   if test \! -z "$includedir" ; then
10326     CPPFLAGS="$CPPFLAGS -I$includedir"
10327   fi
10328   # note: $X_CFLAGS includes $x_includes
10329   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10330
10331   if test \! -z "$libdir" ; then
10332     LDFLAGS="$LDFLAGS -L$libdir"
10333   fi
10334   # note: $X_LIBS includes $x_libraries
10335   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10336
10337   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
10338 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
10339 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
10340   echo $ECHO_N "(cached) $ECHO_C" >&6
10341 else
10342   ac_check_lib_save_LIBS=$LIBS
10343 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10344 cat >conftest.$ac_ext <<_ACEOF
10345 #line $LINENO "configure"
10346 #include "confdefs.h"
10347
10348 /* Override any gcc2 internal prototype to avoid an error.  */
10349 #ifdef __cplusplus
10350 extern "C"
10351 #endif
10352 /* We use char because int might match the return type of a gcc2
10353    builtin and then its argument prototype would still apply.  */
10354 char XF86VidModeSetGammaRamp ();
10355 #ifdef F77_DUMMY_MAIN
10356 #  ifdef __cplusplus
10357      extern "C"
10358 #  endif
10359    int F77_DUMMY_MAIN() { return 1; }
10360 #endif
10361 int
10362 main ()
10363 {
10364 XF86VidModeSetGammaRamp ();
10365   ;
10366   return 0;
10367 }
10368 _ACEOF
10369 rm -f conftest.$ac_objext conftest$ac_exeext
10370 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10371   (eval $ac_link) 2>&5
10372   ac_status=$?
10373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10374   (exit $ac_status); } &&
10375          { ac_try='test -s conftest$ac_exeext'
10376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10377   (eval $ac_try) 2>&5
10378   ac_status=$?
10379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10380   (exit $ac_status); }; }; then
10381   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
10382 else
10383   echo "$as_me: failed program was:" >&5
10384 cat conftest.$ac_ext >&5
10385 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
10386 fi
10387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10388 LIBS=$ac_check_lib_save_LIBS
10389 fi
10390 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
10391 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
10392 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
10393   have_xf86gamma_ramp=yes
10394 else
10395   true
10396 fi
10397
10398   CPPFLAGS="$ac_save_CPPFLAGS"
10399   LDFLAGS="$ac_save_LDFLAGS"
10400 #  LIBS="$ac_save_LIBS"
10401
10402   fi
10403
10404   # if those tests succeeded, then we've really got the functions.
10405   if test "$have_xf86gamma" = yes; then
10406     cat >>confdefs.h <<\_ACEOF
10407 #define HAVE_XF86VMODE_GAMMA 1
10408 _ACEOF
10409
10410   fi
10411
10412   if test "$have_xf86gamma_ramp" = yes; then
10413     cat >>confdefs.h <<\_ACEOF
10414 #define HAVE_XF86VMODE_GAMMA_RAMP 1
10415 _ACEOF
10416
10417   fi
10418
10419   # pull in the lib, if we haven't already
10420   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
10421     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10422   fi
10423
10424 elif test "$with_xf86gamma" != no; then
10425   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
10426   exit 1
10427 fi
10428
10429
10430 ###############################################################################
10431 #
10432 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
10433 #       using other XF86 stuff.)
10434 #
10435 ###############################################################################
10436
10437 have_xf86miscsetgrabkeysstate=no
10438 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10439
10440   ac_save_CPPFLAGS="$CPPFLAGS"
10441   ac_save_LDFLAGS="$LDFLAGS"
10442 #  ac_save_LIBS="$LIBS"
10443
10444   if test \! -z "$includedir" ; then
10445     CPPFLAGS="$CPPFLAGS -I$includedir"
10446   fi
10447   # note: $X_CFLAGS includes $x_includes
10448   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10449
10450   if test \! -z "$libdir" ; then
10451     LDFLAGS="$LDFLAGS -L$libdir"
10452   fi
10453   # note: $X_LIBS includes $x_libraries
10454   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10455
10456   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10457 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
10458 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
10459   echo $ECHO_N "(cached) $ECHO_C" >&6
10460 else
10461   ac_check_lib_save_LIBS=$LIBS
10462 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10463 cat >conftest.$ac_ext <<_ACEOF
10464 #line $LINENO "configure"
10465 #include "confdefs.h"
10466
10467 /* Override any gcc2 internal prototype to avoid an error.  */
10468 #ifdef __cplusplus
10469 extern "C"
10470 #endif
10471 /* We use char because int might match the return type of a gcc2
10472    builtin and then its argument prototype would still apply.  */
10473 char XF86MiscSetGrabKeysState ();
10474 #ifdef F77_DUMMY_MAIN
10475 #  ifdef __cplusplus
10476      extern "C"
10477 #  endif
10478    int F77_DUMMY_MAIN() { return 1; }
10479 #endif
10480 int
10481 main ()
10482 {
10483 XF86MiscSetGrabKeysState ();
10484   ;
10485   return 0;
10486 }
10487 _ACEOF
10488 rm -f conftest.$ac_objext conftest$ac_exeext
10489 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10490   (eval $ac_link) 2>&5
10491   ac_status=$?
10492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10493   (exit $ac_status); } &&
10494          { ac_try='test -s conftest$ac_exeext'
10495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10496   (eval $ac_try) 2>&5
10497   ac_status=$?
10498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10499   (exit $ac_status); }; }; then
10500   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10501 else
10502   echo "$as_me: failed program was:" >&5
10503 cat conftest.$ac_ext >&5
10504 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10505 fi
10506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10507 LIBS=$ac_check_lib_save_LIBS
10508 fi
10509 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10510 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
10511 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
10512   have_xf86miscsetgrabkeysstate=yes
10513 else
10514   true
10515 fi
10516
10517   CPPFLAGS="$ac_save_CPPFLAGS"
10518   LDFLAGS="$ac_save_LDFLAGS"
10519 #  LIBS="$ac_save_LIBS"
10520
10521   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10522     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10523     cat >>confdefs.h <<\_ACEOF
10524 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
10525 _ACEOF
10526
10527   fi
10528 fi
10529
10530
10531 ###############################################################################
10532 #
10533 #       Check for HP XHPDisableReset and XHPEnableReset.
10534 #
10535 ###############################################################################
10536
10537 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
10538 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
10539
10540   ac_save_CPPFLAGS="$CPPFLAGS"
10541   if test \! -z "$includedir" ; then
10542     CPPFLAGS="$CPPFLAGS -I$includedir"
10543   fi
10544   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10545   cat >conftest.$ac_ext <<_ACEOF
10546 #line $LINENO "configure"
10547 #include "confdefs.h"
10548 #include <X11/XHPlib.h>
10549
10550 _ACEOF
10551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10552   egrep "XHPDisableReset" >/dev/null 2>&1; then
10553   cat >>confdefs.h <<\_ACEOF
10554 #define HAVE_XHPDISABLERESET 1
10555 _ACEOF
10556
10557                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10558                    echo "$as_me:$LINENO: result: yes" >&5
10559 echo "${ECHO_T}yes" >&6
10560 else
10561   echo "$as_me:$LINENO: result: no" >&5
10562 echo "${ECHO_T}no" >&6
10563 fi
10564 rm -f conftest*
10565
10566   CPPFLAGS="$ac_save_CPPFLAGS"
10567
10568
10569 ###############################################################################
10570 #
10571 #       Check for /proc/interrupts.
10572 #
10573 ###############################################################################
10574
10575 have_proc_interrupts=no
10576 with_proc_interrupts_req=unspecified
10577
10578 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
10579 if test "${with_proc_interrupts+set}" = set; then
10580   withval="$with_proc_interrupts"
10581   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10582 else
10583   with_proc_interrupts=yes
10584 fi;
10585
10586 if test "$with_proc_interrupts" = yes; then
10587
10588    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
10589 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
10590 if test "${ac_cv_have_proc_interrupts+set}" = set; then
10591   echo $ECHO_N "(cached) $ECHO_C" >&6
10592 else
10593   ac_cv_have_proc_interrupts=no
10594      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
10595        ac_cv_have_proc_interrupts=yes
10596      fi
10597
10598 fi
10599 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
10600 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
10601    have_proc_interrupts=$ac_cv_have_proc_interrupts
10602
10603   if test "$have_proc_interrupts" = yes; then
10604     cat >>confdefs.h <<\_ACEOF
10605 #define HAVE_PROC_INTERRUPTS 1
10606 _ACEOF
10607
10608   fi
10609
10610 elif test "$with_proc_interrupts" != no; then
10611   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10612   exit 1
10613 fi
10614
10615
10616 ###############################################################################
10617 #
10618 #       The --enable-locking option
10619 #
10620 ###############################################################################
10621
10622 # Check whether --enable-locking or --disable-locking was given.
10623 if test "${enable_locking+set}" = set; then
10624   enableval="$enable_locking"
10625   enable_locking="$enableval"
10626 else
10627   enable_locking=yes
10628 fi;
10629 if test "$enable_locking" = yes; then
10630   true
10631 elif test "$enable_locking" = no; then
10632   cat >>confdefs.h <<\_ACEOF
10633 #define NO_LOCKING 1
10634 _ACEOF
10635
10636 else
10637   echo "error: must be yes or no: --enable-locking=$enable_locking"
10638   exit 1
10639 fi
10640
10641
10642
10643 ###############################################################################
10644 #
10645 #       The --enable-vt-locking option
10646 #
10647 ###############################################################################
10648
10649 #ac_vt_lockswitch=no
10650 #AC_ARG_ENABLE(vt-locking,[
10651 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
10652 #                          This is the default if the system supports it, and
10653 #                          if locking support is included (--enable-locking.)
10654 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
10655 #                          enabled.],
10656 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
10657 #if test "$enable_vt_locking" = yes; then
10658 #
10659 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
10660 #   [AC_TRY_COMPILE([#include <fcntl.h>
10661 #                   #include <sys/ioctl.h>
10662 #                   #include <sys/vt.h>],
10663 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
10664 #                  [ac_cv_vt_lockswitch=yes],
10665 #                  [ac_cv_vt_lockswitch=no])])
10666 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
10667 #
10668 #elif test "$enable_vt_locking" = no; then
10669 #  true
10670 #else
10671 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
10672 #  exit 1
10673 #fi
10674 #
10675 #if test "$ac_vt_lockswitch" = yes; then
10676 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
10677 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
10678 #  # #### but it doesn't work yet, so don't worry about that for now.
10679 ##  need_setuid=yes
10680 #fi
10681
10682
10683 ###############################################################################
10684 #
10685 #       Check for PAM.
10686 #
10687 ###############################################################################
10688
10689 case "$host" in
10690   *-solaris*)
10691    # Solaris systems tend to come with PAM misconfigured.
10692    #  Don't build it by default, even if the headers exist.
10693    with_pam_default=no
10694    ;;
10695   *)
10696    # Default to building PAM support on all other systems, if it exists.
10697    with_pam_default=yes
10698   ;;
10699 esac
10700
10701 have_pam=no
10702 with_pam_req=unspecified
10703
10704
10705 # Check whether --with-pam or --without-pam was given.
10706 if test "${with_pam+set}" = set; then
10707   withval="$with_pam"
10708   with_pam="$withval"; with_pam_req="$withval"
10709 else
10710   with_pam=$with_pam_default
10711 fi;
10712
10713
10714    case "$with_pam" in
10715     yes) ;;
10716     no)  ;;
10717
10718     /*)
10719      echo "$as_me:$LINENO: checking for PAM headers" >&5
10720 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
10721      d=$with_pam/include
10722      if test -d $d; then
10723        X_CFLAGS="-I$d $X_CFLAGS"
10724        echo "$as_me:$LINENO: result: $d" >&5
10725 echo "${ECHO_T}$d" >&6
10726      else
10727        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10728 echo "${ECHO_T}not found ($d: no such directory)" >&6
10729      fi
10730
10731      echo "$as_me:$LINENO: checking for PAM libs" >&5
10732 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
10733      d=$with_pam/lib
10734      if test -d $d; then
10735        X_LIBS="-L$d $X_LIBS"
10736        echo "$as_me:$LINENO: result: $d" >&5
10737 echo "${ECHO_T}$d" >&6
10738      else
10739        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10740 echo "${ECHO_T}not found ($d: no such directory)" >&6
10741      fi
10742
10743      # replace the directory string with "yes".
10744      with_pam_req="yes"
10745      with_pam=$with_pam_req
10746      ;;
10747
10748     *)
10749      echo ""
10750      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10751      echo "       If it is a directory, then \`DIR/include' will be added to"
10752      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10753      exit 1
10754      ;;
10755    esac
10756
10757
10758 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10759   echo "$as_me:$LINENO: checking for PAM" >&5
10760 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
10761 if test "${ac_cv_pam+set}" = set; then
10762   echo $ECHO_N "(cached) $ECHO_C" >&6
10763 else
10764
10765   ac_save_CPPFLAGS="$CPPFLAGS"
10766   if test \! -z "$includedir" ; then
10767     CPPFLAGS="$CPPFLAGS -I$includedir"
10768   fi
10769   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10770   cat >conftest.$ac_ext <<_ACEOF
10771 #line $LINENO "configure"
10772 #include "confdefs.h"
10773 #include <security/pam_appl.h>
10774 #ifdef F77_DUMMY_MAIN
10775 #  ifdef __cplusplus
10776      extern "C"
10777 #  endif
10778    int F77_DUMMY_MAIN() { return 1; }
10779 #endif
10780 int
10781 main ()
10782 {
10783
10784   ;
10785   return 0;
10786 }
10787 _ACEOF
10788 rm -f conftest.$ac_objext
10789 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10790   (eval $ac_compile) 2>&5
10791   ac_status=$?
10792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10793   (exit $ac_status); } &&
10794          { ac_try='test -s conftest.$ac_objext'
10795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10796   (eval $ac_try) 2>&5
10797   ac_status=$?
10798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10799   (exit $ac_status); }; }; then
10800   ac_cv_pam=yes
10801 else
10802   echo "$as_me: failed program was:" >&5
10803 cat conftest.$ac_ext >&5
10804 ac_cv_pam=no
10805 fi
10806 rm -f conftest.$ac_objext conftest.$ac_ext
10807   CPPFLAGS="$ac_save_CPPFLAGS"
10808 fi
10809 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
10810 echo "${ECHO_T}$ac_cv_pam" >&6
10811   if test "$ac_cv_pam" = yes ; then
10812     have_pam=yes
10813     cat >>confdefs.h <<\_ACEOF
10814 #define HAVE_PAM 1
10815 _ACEOF
10816
10817     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10818
10819     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10820     # those are in libc.  On Linux and Solaris, they're in libdl.
10821     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10822 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10823 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10824   echo $ECHO_N "(cached) $ECHO_C" >&6
10825 else
10826   ac_check_lib_save_LIBS=$LIBS
10827 LIBS="-ldl  $LIBS"
10828 cat >conftest.$ac_ext <<_ACEOF
10829 #line $LINENO "configure"
10830 #include "confdefs.h"
10831
10832 /* Override any gcc2 internal prototype to avoid an error.  */
10833 #ifdef __cplusplus
10834 extern "C"
10835 #endif
10836 /* We use char because int might match the return type of a gcc2
10837    builtin and then its argument prototype would still apply.  */
10838 char dlopen ();
10839 #ifdef F77_DUMMY_MAIN
10840 #  ifdef __cplusplus
10841      extern "C"
10842 #  endif
10843    int F77_DUMMY_MAIN() { return 1; }
10844 #endif
10845 int
10846 main ()
10847 {
10848 dlopen ();
10849   ;
10850   return 0;
10851 }
10852 _ACEOF
10853 rm -f conftest.$ac_objext conftest$ac_exeext
10854 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10855   (eval $ac_link) 2>&5
10856   ac_status=$?
10857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10858   (exit $ac_status); } &&
10859          { ac_try='test -s conftest$ac_exeext'
10860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10861   (eval $ac_try) 2>&5
10862   ac_status=$?
10863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10864   (exit $ac_status); }; }; then
10865   ac_cv_lib_dl_dlopen=yes
10866 else
10867   echo "$as_me: failed program was:" >&5
10868 cat conftest.$ac_ext >&5
10869 ac_cv_lib_dl_dlopen=no
10870 fi
10871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10872 LIBS=$ac_check_lib_save_LIBS
10873 fi
10874 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10875 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10876 if test $ac_cv_lib_dl_dlopen = yes; then
10877   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10878 fi
10879
10880
10881     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
10882 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
10883     if test "${ac_cv_pam_strerror_args+set}" = set; then
10884   echo $ECHO_N "(cached) $ECHO_C" >&6
10885 else
10886   cat >conftest.$ac_ext <<_ACEOF
10887 #line $LINENO "configure"
10888 #include "confdefs.h"
10889 #include <stdio.h>
10890                       #include <stdlib.h>
10891                       #include <security/pam_appl.h>
10892 #ifdef F77_DUMMY_MAIN
10893 #  ifdef __cplusplus
10894      extern "C"
10895 #  endif
10896    int F77_DUMMY_MAIN() { return 1; }
10897 #endif
10898 int
10899 main ()
10900 {
10901 pam_handle_t *pamh = 0;
10902                       char *s = pam_strerror(pamh, PAM_SUCCESS);
10903   ;
10904   return 0;
10905 }
10906 _ACEOF
10907 rm -f conftest.$ac_objext
10908 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10909   (eval $ac_compile) 2>&5
10910   ac_status=$?
10911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10912   (exit $ac_status); } &&
10913          { ac_try='test -s conftest.$ac_objext'
10914   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10915   (eval $ac_try) 2>&5
10916   ac_status=$?
10917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10918   (exit $ac_status); }; }; then
10919   ac_pam_strerror_args=2
10920 else
10921   echo "$as_me: failed program was:" >&5
10922 cat conftest.$ac_ext >&5
10923 cat >conftest.$ac_ext <<_ACEOF
10924 #line $LINENO "configure"
10925 #include "confdefs.h"
10926 #include <stdio.h>
10927                                       #include <stdlib.h>
10928                                       #include <security/pam_appl.h>
10929 #ifdef F77_DUMMY_MAIN
10930 #  ifdef __cplusplus
10931      extern "C"
10932 #  endif
10933    int F77_DUMMY_MAIN() { return 1; }
10934 #endif
10935 int
10936 main ()
10937 {
10938 char *s =
10939                                        pam_strerror(PAM_SUCCESS);
10940   ;
10941   return 0;
10942 }
10943 _ACEOF
10944 rm -f conftest.$ac_objext
10945 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10946   (eval $ac_compile) 2>&5
10947   ac_status=$?
10948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949   (exit $ac_status); } &&
10950          { ac_try='test -s conftest.$ac_objext'
10951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10952   (eval $ac_try) 2>&5
10953   ac_status=$?
10954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10955   (exit $ac_status); }; }; then
10956   ac_pam_strerror_args=1
10957 else
10958   echo "$as_me: failed program was:" >&5
10959 cat conftest.$ac_ext >&5
10960 ac_pam_strerror_args=0
10961 fi
10962 rm -f conftest.$ac_objext conftest.$ac_ext
10963 fi
10964 rm -f conftest.$ac_objext conftest.$ac_ext
10965       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10966 fi
10967
10968     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10969     if test "$ac_pam_strerror_args" = 1 ; then
10970       echo "$as_me:$LINENO: result: one argument" >&5
10971 echo "${ECHO_T}one argument" >&6
10972     elif test "$ac_pam_strerror_args" = 2 ; then
10973       cat >>confdefs.h <<\_ACEOF
10974 #define PAM_STRERROR_TWO_ARGS 1
10975 _ACEOF
10976
10977       echo "$as_me:$LINENO: result: two arguments" >&5
10978 echo "${ECHO_T}two arguments" >&6
10979     else
10980       echo "$as_me:$LINENO: result: unknown" >&5
10981 echo "${ECHO_T}unknown" >&6
10982     fi
10983   fi
10984 fi
10985
10986
10987 ###############################################################################
10988 #
10989 #       Check for Kerberos.
10990 #
10991 ###############################################################################
10992
10993 have_kerberos=no
10994 have_kerberos5=no
10995 with_kerberos_req=unspecified
10996
10997
10998 # Check whether --with-kerberos or --without-kerberos was given.
10999 if test "${with_kerberos+set}" = set; then
11000   withval="$with_kerberos"
11001   with_kerberos="$withval"; with_kerberos_req="$withval"
11002 else
11003   with_kerberos=yes
11004 fi;
11005
11006
11007    case "$with_kerberos" in
11008     yes) ;;
11009     no)  ;;
11010
11011     /*)
11012      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
11013 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
11014      d=$with_kerberos/include
11015      if test -d $d; then
11016        X_CFLAGS="-I$d $X_CFLAGS"
11017        echo "$as_me:$LINENO: result: $d" >&5
11018 echo "${ECHO_T}$d" >&6
11019      else
11020        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11021 echo "${ECHO_T}not found ($d: no such directory)" >&6
11022      fi
11023
11024      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
11025 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
11026      d=$with_kerberos/lib
11027      if test -d $d; then
11028        X_LIBS="-L$d $X_LIBS"
11029        echo "$as_me:$LINENO: result: $d" >&5
11030 echo "${ECHO_T}$d" >&6
11031      else
11032        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11033 echo "${ECHO_T}not found ($d: no such directory)" >&6
11034      fi
11035
11036      # replace the directory string with "yes".
11037      with_kerberos_req="yes"
11038      with_kerberos=$with_kerberos_req
11039      ;;
11040
11041     *)
11042      echo ""
11043      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
11044      echo "       If it is a directory, then \`DIR/include' will be added to"
11045      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11046      exit 1
11047      ;;
11048    esac
11049
11050
11051 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
11052   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
11053 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
11054 if test "${ac_cv_kerberos+set}" = set; then
11055   echo $ECHO_N "(cached) $ECHO_C" >&6
11056 else
11057
11058   ac_save_CPPFLAGS="$CPPFLAGS"
11059   if test \! -z "$includedir" ; then
11060     CPPFLAGS="$CPPFLAGS -I$includedir"
11061   fi
11062   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11063   cat >conftest.$ac_ext <<_ACEOF
11064 #line $LINENO "configure"
11065 #include "confdefs.h"
11066 #include <krb.h>
11067 #ifdef F77_DUMMY_MAIN
11068 #  ifdef __cplusplus
11069      extern "C"
11070 #  endif
11071    int F77_DUMMY_MAIN() { return 1; }
11072 #endif
11073 int
11074 main ()
11075 {
11076
11077   ;
11078   return 0;
11079 }
11080 _ACEOF
11081 rm -f conftest.$ac_objext
11082 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11083   (eval $ac_compile) 2>&5
11084   ac_status=$?
11085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11086   (exit $ac_status); } &&
11087          { ac_try='test -s conftest.$ac_objext'
11088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11089   (eval $ac_try) 2>&5
11090   ac_status=$?
11091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11092   (exit $ac_status); }; }; then
11093   ac_cv_kerberos=yes
11094 else
11095   echo "$as_me: failed program was:" >&5
11096 cat conftest.$ac_ext >&5
11097 ac_cv_kerberos=no
11098 fi
11099 rm -f conftest.$ac_objext conftest.$ac_ext
11100   CPPFLAGS="$ac_save_CPPFLAGS"
11101 fi
11102 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
11103 echo "${ECHO_T}$ac_cv_kerberos" >&6
11104   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
11105 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
11106 if test "${ac_cv_kerberos5+set}" = set; then
11107   echo $ECHO_N "(cached) $ECHO_C" >&6
11108 else
11109
11110   ac_save_CPPFLAGS="$CPPFLAGS"
11111   if test \! -z "$includedir" ; then
11112     CPPFLAGS="$CPPFLAGS -I$includedir"
11113   fi
11114   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11115   cat >conftest.$ac_ext <<_ACEOF
11116 #line $LINENO "configure"
11117 #include "confdefs.h"
11118 #include <kerberosIV/krb.h>
11119 #ifdef F77_DUMMY_MAIN
11120 #  ifdef __cplusplus
11121      extern "C"
11122 #  endif
11123    int F77_DUMMY_MAIN() { return 1; }
11124 #endif
11125 int
11126 main ()
11127 {
11128
11129   ;
11130   return 0;
11131 }
11132 _ACEOF
11133 rm -f conftest.$ac_objext
11134 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11135   (eval $ac_compile) 2>&5
11136   ac_status=$?
11137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11138   (exit $ac_status); } &&
11139          { ac_try='test -s conftest.$ac_objext'
11140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11141   (eval $ac_try) 2>&5
11142   ac_status=$?
11143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11144   (exit $ac_status); }; }; then
11145   ac_cv_kerberos5=yes
11146 else
11147   echo "$as_me: failed program was:" >&5
11148 cat conftest.$ac_ext >&5
11149 ac_cv_kerberos5=no
11150 fi
11151 rm -f conftest.$ac_objext conftest.$ac_ext
11152   CPPFLAGS="$ac_save_CPPFLAGS"
11153 fi
11154 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
11155 echo "${ECHO_T}$ac_cv_kerberos5" >&6
11156
11157   if test "$ac_cv_kerberos" = yes ; then
11158     have_kerberos=yes
11159     cat >>confdefs.h <<\_ACEOF
11160 #define HAVE_KERBEROS 1
11161 _ACEOF
11162
11163   fi
11164
11165   if test "$ac_cv_kerberos5" = yes ; then
11166
11167     # Andrew Snare <ajs@pigpond.com> wrote:
11168     #
11169     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
11170     # (krb4) was also available.  This turns out not to be the case with
11171     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
11172     # is optional.
11173     #
11174     # So, disable kerberosV support if libkrb4 can't be found.
11175     # This is not the best solution, but it makes the compile not fail.
11176     #
11177
11178   ac_save_CPPFLAGS="$CPPFLAGS"
11179   ac_save_LDFLAGS="$LDFLAGS"
11180 #  ac_save_LIBS="$LIBS"
11181
11182   if test \! -z "$includedir" ; then
11183     CPPFLAGS="$CPPFLAGS -I$includedir"
11184   fi
11185   # note: $X_CFLAGS includes $x_includes
11186   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11187
11188   if test \! -z "$libdir" ; then
11189     LDFLAGS="$LDFLAGS -L$libdir"
11190   fi
11191   # note: $X_LIBS includes $x_libraries
11192   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11193
11194   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
11195 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
11196 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
11197   echo $ECHO_N "(cached) $ECHO_C" >&6
11198 else
11199   ac_check_lib_save_LIBS=$LIBS
11200 LIBS="-lkrb4  $LIBS"
11201 cat >conftest.$ac_ext <<_ACEOF
11202 #line $LINENO "configure"
11203 #include "confdefs.h"
11204
11205 /* Override any gcc2 internal prototype to avoid an error.  */
11206 #ifdef __cplusplus
11207 extern "C"
11208 #endif
11209 /* We use char because int might match the return type of a gcc2
11210    builtin and then its argument prototype would still apply.  */
11211 char krb_get_tf_realm ();
11212 #ifdef F77_DUMMY_MAIN
11213 #  ifdef __cplusplus
11214      extern "C"
11215 #  endif
11216    int F77_DUMMY_MAIN() { return 1; }
11217 #endif
11218 int
11219 main ()
11220 {
11221 krb_get_tf_realm ();
11222   ;
11223   return 0;
11224 }
11225 _ACEOF
11226 rm -f conftest.$ac_objext conftest$ac_exeext
11227 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11228   (eval $ac_link) 2>&5
11229   ac_status=$?
11230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11231   (exit $ac_status); } &&
11232          { ac_try='test -s conftest$ac_exeext'
11233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11234   (eval $ac_try) 2>&5
11235   ac_status=$?
11236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11237   (exit $ac_status); }; }; then
11238   ac_cv_lib_krb4_krb_get_tf_realm=yes
11239 else
11240   echo "$as_me: failed program was:" >&5
11241 cat conftest.$ac_ext >&5
11242 ac_cv_lib_krb4_krb_get_tf_realm=no
11243 fi
11244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11245 LIBS=$ac_check_lib_save_LIBS
11246 fi
11247 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
11248 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
11249 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
11250   have_kerberos=yes
11251 else
11252   have_kerberos=no
11253 fi
11254
11255   CPPFLAGS="$ac_save_CPPFLAGS"
11256   LDFLAGS="$ac_save_LDFLAGS"
11257 #  LIBS="$ac_save_LIBS"
11258
11259     if test "$have_kerberos" = yes ; then
11260       have_kerberos5=yes
11261       cat >>confdefs.h <<\_ACEOF
11262 #define HAVE_KERBEROS 1
11263 _ACEOF
11264
11265       cat >>confdefs.h <<\_ACEOF
11266 #define HAVE_KERBEROS5 1
11267 _ACEOF
11268
11269     else
11270       have_kerberos5=no
11271       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
11272 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
11273     fi
11274
11275   fi
11276
11277   if test "$have_kerberos5" = yes ; then
11278     # from Matt Knopp <mhat@infocalypse.netlag.com>
11279     # (who got it from amu@mit.edu)
11280
11281     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
11282
11283     # jwz: MacOS X uses -lkrb5, but not -lcrypt
11284
11285   ac_save_CPPFLAGS="$CPPFLAGS"
11286   ac_save_LDFLAGS="$LDFLAGS"
11287 #  ac_save_LIBS="$LIBS"
11288
11289   if test \! -z "$includedir" ; then
11290     CPPFLAGS="$CPPFLAGS -I$includedir"
11291   fi
11292   # note: $X_CFLAGS includes $x_includes
11293   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11294
11295   if test \! -z "$libdir" ; then
11296     LDFLAGS="$LDFLAGS -L$libdir"
11297   fi
11298   # note: $X_LIBS includes $x_libraries
11299   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11300
11301   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
11302 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
11303 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
11304   echo $ECHO_N "(cached) $ECHO_C" >&6
11305 else
11306   ac_check_lib_save_LIBS=$LIBS
11307 LIBS="-lcrypt  $LIBS"
11308 cat >conftest.$ac_ext <<_ACEOF
11309 #line $LINENO "configure"
11310 #include "confdefs.h"
11311
11312 /* Override any gcc2 internal prototype to avoid an error.  */
11313 #ifdef __cplusplus
11314 extern "C"
11315 #endif
11316 /* We use char because int might match the return type of a gcc2
11317    builtin and then its argument prototype would still apply.  */
11318 char crypt ();
11319 #ifdef F77_DUMMY_MAIN
11320 #  ifdef __cplusplus
11321      extern "C"
11322 #  endif
11323    int F77_DUMMY_MAIN() { return 1; }
11324 #endif
11325 int
11326 main ()
11327 {
11328 crypt ();
11329   ;
11330   return 0;
11331 }
11332 _ACEOF
11333 rm -f conftest.$ac_objext conftest$ac_exeext
11334 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11335   (eval $ac_link) 2>&5
11336   ac_status=$?
11337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338   (exit $ac_status); } &&
11339          { ac_try='test -s conftest$ac_exeext'
11340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11341   (eval $ac_try) 2>&5
11342   ac_status=$?
11343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11344   (exit $ac_status); }; }; then
11345   ac_cv_lib_crypt_crypt=yes
11346 else
11347   echo "$as_me: failed program was:" >&5
11348 cat conftest.$ac_ext >&5
11349 ac_cv_lib_crypt_crypt=no
11350 fi
11351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11352 LIBS=$ac_check_lib_save_LIBS
11353 fi
11354 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
11355 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
11356 if test $ac_cv_lib_crypt_crypt = yes; then
11357   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11358 fi
11359
11360   CPPFLAGS="$ac_save_CPPFLAGS"
11361   LDFLAGS="$ac_save_LDFLAGS"
11362 #  LIBS="$ac_save_LIBS"
11363
11364
11365   elif test "$have_kerberos" = yes ; then
11366     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11367     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11368   fi
11369
11370   if test "$have_kerberos" = yes ; then
11371     echo "$as_me:$LINENO: checking for res_search" >&5
11372 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
11373 if test "${ac_cv_func_res_search+set}" = set; then
11374   echo $ECHO_N "(cached) $ECHO_C" >&6
11375 else
11376   cat >conftest.$ac_ext <<_ACEOF
11377 #line $LINENO "configure"
11378 #include "confdefs.h"
11379 /* System header to define __stub macros and hopefully few prototypes,
11380     which can conflict with char res_search (); below.  */
11381 #include <assert.h>
11382 /* Override any gcc2 internal prototype to avoid an error.  */
11383 #ifdef __cplusplus
11384 extern "C"
11385 #endif
11386 /* We use char because int might match the return type of a gcc2
11387    builtin and then its argument prototype would still apply.  */
11388 char res_search ();
11389 char (*f) ();
11390
11391 #ifdef F77_DUMMY_MAIN
11392 #  ifdef __cplusplus
11393      extern "C"
11394 #  endif
11395    int F77_DUMMY_MAIN() { return 1; }
11396 #endif
11397 int
11398 main ()
11399 {
11400 /* The GNU C library defines this for functions which it implements
11401     to always fail with ENOSYS.  Some functions are actually named
11402     something starting with __ and the normal name is an alias.  */
11403 #if defined (__stub_res_search) || defined (__stub___res_search)
11404 choke me
11405 #else
11406 f = res_search;
11407 #endif
11408
11409   ;
11410   return 0;
11411 }
11412 _ACEOF
11413 rm -f conftest.$ac_objext conftest$ac_exeext
11414 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11415   (eval $ac_link) 2>&5
11416   ac_status=$?
11417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11418   (exit $ac_status); } &&
11419          { ac_try='test -s conftest$ac_exeext'
11420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11421   (eval $ac_try) 2>&5
11422   ac_status=$?
11423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11424   (exit $ac_status); }; }; then
11425   ac_cv_func_res_search=yes
11426 else
11427   echo "$as_me: failed program was:" >&5
11428 cat conftest.$ac_ext >&5
11429 ac_cv_func_res_search=no
11430 fi
11431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11432 fi
11433 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
11434 echo "${ECHO_T}$ac_cv_func_res_search" >&6
11435 if test $ac_cv_func_res_search = yes; then
11436   :
11437 else
11438   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
11439 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
11440 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
11441   echo $ECHO_N "(cached) $ECHO_C" >&6
11442 else
11443   ac_check_lib_save_LIBS=$LIBS
11444 LIBS="-lresolv  $LIBS"
11445 cat >conftest.$ac_ext <<_ACEOF
11446 #line $LINENO "configure"
11447 #include "confdefs.h"
11448
11449 /* Override any gcc2 internal prototype to avoid an error.  */
11450 #ifdef __cplusplus
11451 extern "C"
11452 #endif
11453 /* We use char because int might match the return type of a gcc2
11454    builtin and then its argument prototype would still apply.  */
11455 char res_search ();
11456 #ifdef F77_DUMMY_MAIN
11457 #  ifdef __cplusplus
11458      extern "C"
11459 #  endif
11460    int F77_DUMMY_MAIN() { return 1; }
11461 #endif
11462 int
11463 main ()
11464 {
11465 res_search ();
11466   ;
11467   return 0;
11468 }
11469 _ACEOF
11470 rm -f conftest.$ac_objext conftest$ac_exeext
11471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11472   (eval $ac_link) 2>&5
11473   ac_status=$?
11474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11475   (exit $ac_status); } &&
11476          { ac_try='test -s conftest$ac_exeext'
11477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11478   (eval $ac_try) 2>&5
11479   ac_status=$?
11480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11481   (exit $ac_status); }; }; then
11482   ac_cv_lib_resolv_res_search=yes
11483 else
11484   echo "$as_me: failed program was:" >&5
11485 cat conftest.$ac_ext >&5
11486 ac_cv_lib_resolv_res_search=no
11487 fi
11488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11489 LIBS=$ac_check_lib_save_LIBS
11490 fi
11491 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
11492 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
11493 if test $ac_cv_lib_resolv_res_search = yes; then
11494   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11495 else
11496   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11497 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11498
11499 fi
11500
11501 fi
11502
11503   fi
11504 fi
11505
11506
11507 ###############################################################################
11508 #
11509 #       Check for the nine billion variants of shadow passwords...
11510 #
11511 ###############################################################################
11512
11513 need_setuid=no
11514
11515 have_shadow=no
11516 with_shadow_req=unspecified
11517
11518
11519 # Check whether --with-shadow or --without-shadow was given.
11520 if test "${with_shadow+set}" = set; then
11521   withval="$with_shadow"
11522   with_shadow="$withval"; with_shadow_req="$withval"
11523 else
11524   with_shadow=yes
11525 fi;
11526
11527
11528    case "$with_shadow" in
11529     yes) ;;
11530     no)  ;;
11531
11532     /*)
11533      echo "$as_me:$LINENO: checking for shadow password headers" >&5
11534 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
11535      d=$with_shadow/include
11536      if test -d $d; then
11537        X_CFLAGS="-I$d $X_CFLAGS"
11538        echo "$as_me:$LINENO: result: $d" >&5
11539 echo "${ECHO_T}$d" >&6
11540      else
11541        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11542 echo "${ECHO_T}not found ($d: no such directory)" >&6
11543      fi
11544
11545      echo "$as_me:$LINENO: checking for shadow password libs" >&5
11546 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
11547      d=$with_shadow/lib
11548      if test -d $d; then
11549        X_LIBS="-L$d $X_LIBS"
11550        echo "$as_me:$LINENO: result: $d" >&5
11551 echo "${ECHO_T}$d" >&6
11552      else
11553        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11554 echo "${ECHO_T}not found ($d: no such directory)" >&6
11555      fi
11556
11557      # replace the directory string with "yes".
11558      with_shadow_req="yes"
11559      with_shadow=$with_shadow_req
11560      ;;
11561
11562     *)
11563      echo ""
11564      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11565      echo "       If it is a directory, then \`DIR/include' will be added to"
11566      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11567      exit 1
11568      ;;
11569    esac
11570
11571
11572 if test "$enable_locking" = no ; then
11573   with_shadow_req=no
11574   with_shadow=no
11575 fi
11576
11577
11578 ###############################################################################
11579 #
11580 #       Check for Sun "adjunct" passwords.
11581 #
11582 ###############################################################################
11583
11584 if test "$with_shadow" = yes ; then
11585   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
11586 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
11587 if test "${ac_cv_sun_adjunct+set}" = set; then
11588   echo $ECHO_N "(cached) $ECHO_C" >&6
11589 else
11590
11591   ac_save_CPPFLAGS="$CPPFLAGS"
11592   if test \! -z "$includedir" ; then
11593     CPPFLAGS="$CPPFLAGS -I$includedir"
11594   fi
11595   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11596   cat >conftest.$ac_ext <<_ACEOF
11597 #line $LINENO "configure"
11598 #include "confdefs.h"
11599 #include <stdlib.h>
11600                                     #include <unistd.h>
11601                                     #include <sys/types.h>
11602                                     #include <sys/label.h>
11603                                     #include <sys/audit.h>
11604                                     #include <pwdadj.h>
11605 #ifdef F77_DUMMY_MAIN
11606 #  ifdef __cplusplus
11607      extern "C"
11608 #  endif
11609    int F77_DUMMY_MAIN() { return 1; }
11610 #endif
11611 int
11612 main ()
11613 {
11614 struct passwd_adjunct *p = getpwanam("nobody");
11615                        const char *pw = p->pwa_passwd;
11616   ;
11617   return 0;
11618 }
11619 _ACEOF
11620 rm -f conftest.$ac_objext
11621 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11622   (eval $ac_compile) 2>&5
11623   ac_status=$?
11624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11625   (exit $ac_status); } &&
11626          { ac_try='test -s conftest.$ac_objext'
11627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11628   (eval $ac_try) 2>&5
11629   ac_status=$?
11630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11631   (exit $ac_status); }; }; then
11632   ac_cv_sun_adjunct=yes
11633 else
11634   echo "$as_me: failed program was:" >&5
11635 cat conftest.$ac_ext >&5
11636 ac_cv_sun_adjunct=no
11637 fi
11638 rm -f conftest.$ac_objext conftest.$ac_ext
11639   CPPFLAGS="$ac_save_CPPFLAGS"
11640 fi
11641 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
11642 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
11643   if test "$ac_cv_sun_adjunct" = yes; then
11644     have_shadow_adjunct=yes
11645     have_shadow=yes
11646     need_setuid=yes
11647   fi
11648 fi
11649
11650
11651 ###############################################################################
11652 #
11653 #       Check for DEC and SCO so-called "enhanced" security.
11654 #
11655 ###############################################################################
11656
11657 if test "$with_shadow" = yes ; then
11658   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
11659 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
11660 if test "${ac_cv_enhanced_passwd+set}" = set; then
11661   echo $ECHO_N "(cached) $ECHO_C" >&6
11662 else
11663
11664   ac_save_CPPFLAGS="$CPPFLAGS"
11665   if test \! -z "$includedir" ; then
11666     CPPFLAGS="$CPPFLAGS -I$includedir"
11667   fi
11668   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11669   cat >conftest.$ac_ext <<_ACEOF
11670 #line $LINENO "configure"
11671 #include "confdefs.h"
11672 #include <stdlib.h>
11673                                     #include <unistd.h>
11674                                     #include <sys/types.h>
11675                                     #include <pwd.h>
11676                                     #include <sys/security.h>
11677                                     #include <prot.h>
11678 #ifdef F77_DUMMY_MAIN
11679 #  ifdef __cplusplus
11680      extern "C"
11681 #  endif
11682    int F77_DUMMY_MAIN() { return 1; }
11683 #endif
11684 int
11685 main ()
11686 {
11687 struct pr_passwd *p;
11688                        const char *pw;
11689                        set_auth_parameters(0, 0);
11690                        check_auth_parameters();
11691                        p = getprpwnam("nobody");
11692                        pw = p->ufld.fd_encrypt;
11693   ;
11694   return 0;
11695 }
11696 _ACEOF
11697 rm -f conftest.$ac_objext
11698 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11699   (eval $ac_compile) 2>&5
11700   ac_status=$?
11701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11702   (exit $ac_status); } &&
11703          { ac_try='test -s conftest.$ac_objext'
11704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11705   (eval $ac_try) 2>&5
11706   ac_status=$?
11707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11708   (exit $ac_status); }; }; then
11709   ac_cv_enhanced_passwd=yes
11710 else
11711   echo "$as_me: failed program was:" >&5
11712 cat conftest.$ac_ext >&5
11713 ac_cv_enhanced_passwd=no
11714 fi
11715 rm -f conftest.$ac_objext conftest.$ac_ext
11716   CPPFLAGS="$ac_save_CPPFLAGS"
11717 fi
11718 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
11719 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
11720   if test $ac_cv_enhanced_passwd = yes; then
11721     have_shadow_enhanced=yes
11722     have_shadow=yes
11723     need_setuid=yes
11724
11725     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11726     # (I'm told it needs -lcurses too, but I don't understand why.)
11727     # But on DEC, it's in -lsecurity.
11728     #
11729     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
11730 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
11731 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
11732   echo $ECHO_N "(cached) $ECHO_C" >&6
11733 else
11734   ac_check_lib_save_LIBS=$LIBS
11735 LIBS="-lprot -lx $LIBS"
11736 cat >conftest.$ac_ext <<_ACEOF
11737 #line $LINENO "configure"
11738 #include "confdefs.h"
11739
11740 /* Override any gcc2 internal prototype to avoid an error.  */
11741 #ifdef __cplusplus
11742 extern "C"
11743 #endif
11744 /* We use char because int might match the return type of a gcc2
11745    builtin and then its argument prototype would still apply.  */
11746 char getprpwnam ();
11747 #ifdef F77_DUMMY_MAIN
11748 #  ifdef __cplusplus
11749      extern "C"
11750 #  endif
11751    int F77_DUMMY_MAIN() { return 1; }
11752 #endif
11753 int
11754 main ()
11755 {
11756 getprpwnam ();
11757   ;
11758   return 0;
11759 }
11760 _ACEOF
11761 rm -f conftest.$ac_objext conftest$ac_exeext
11762 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11763   (eval $ac_link) 2>&5
11764   ac_status=$?
11765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11766   (exit $ac_status); } &&
11767          { ac_try='test -s conftest$ac_exeext'
11768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11769   (eval $ac_try) 2>&5
11770   ac_status=$?
11771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11772   (exit $ac_status); }; }; then
11773   ac_cv_lib_prot_getprpwnam=yes
11774 else
11775   echo "$as_me: failed program was:" >&5
11776 cat conftest.$ac_ext >&5
11777 ac_cv_lib_prot_getprpwnam=no
11778 fi
11779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11780 LIBS=$ac_check_lib_save_LIBS
11781 fi
11782 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
11783 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
11784 if test $ac_cv_lib_prot_getprpwnam = yes; then
11785   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11786 else
11787   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
11788 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
11789 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
11790   echo $ECHO_N "(cached) $ECHO_C" >&6
11791 else
11792   ac_check_lib_save_LIBS=$LIBS
11793 LIBS="-lsecurity  $LIBS"
11794 cat >conftest.$ac_ext <<_ACEOF
11795 #line $LINENO "configure"
11796 #include "confdefs.h"
11797
11798 /* Override any gcc2 internal prototype to avoid an error.  */
11799 #ifdef __cplusplus
11800 extern "C"
11801 #endif
11802 /* We use char because int might match the return type of a gcc2
11803    builtin and then its argument prototype would still apply.  */
11804 char getprpwnam ();
11805 #ifdef F77_DUMMY_MAIN
11806 #  ifdef __cplusplus
11807      extern "C"
11808 #  endif
11809    int F77_DUMMY_MAIN() { return 1; }
11810 #endif
11811 int
11812 main ()
11813 {
11814 getprpwnam ();
11815   ;
11816   return 0;
11817 }
11818 _ACEOF
11819 rm -f conftest.$ac_objext conftest$ac_exeext
11820 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11821   (eval $ac_link) 2>&5
11822   ac_status=$?
11823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11824   (exit $ac_status); } &&
11825          { ac_try='test -s conftest$ac_exeext'
11826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11827   (eval $ac_try) 2>&5
11828   ac_status=$?
11829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11830   (exit $ac_status); }; }; then
11831   ac_cv_lib_security_getprpwnam=yes
11832 else
11833   echo "$as_me: failed program was:" >&5
11834 cat conftest.$ac_ext >&5
11835 ac_cv_lib_security_getprpwnam=no
11836 fi
11837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11838 LIBS=$ac_check_lib_save_LIBS
11839 fi
11840 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
11841 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
11842 if test $ac_cv_lib_security_getprpwnam = yes; then
11843   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11844 fi
11845
11846 fi
11847
11848   fi
11849 fi
11850
11851 ###############################################################################
11852 #
11853 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11854 #
11855 ###############################################################################
11856
11857 if test "$with_shadow" = yes ; then
11858   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
11859 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
11860 if test "${ac_cv_hpux_passwd+set}" = set; then
11861   echo $ECHO_N "(cached) $ECHO_C" >&6
11862 else
11863
11864   ac_save_CPPFLAGS="$CPPFLAGS"
11865   if test \! -z "$includedir" ; then
11866     CPPFLAGS="$CPPFLAGS -I$includedir"
11867   fi
11868   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11869   cat >conftest.$ac_ext <<_ACEOF
11870 #line $LINENO "configure"
11871 #include "confdefs.h"
11872 #include <stdlib.h>
11873                                     #include <unistd.h>
11874                                     #include <sys/types.h>
11875                                     #include <pwd.h>
11876                                     #include <hpsecurity.h>
11877                                     #include <prot.h>
11878 #ifdef F77_DUMMY_MAIN
11879 #  ifdef __cplusplus
11880      extern "C"
11881 #  endif
11882    int F77_DUMMY_MAIN() { return 1; }
11883 #endif
11884 int
11885 main ()
11886 {
11887 struct s_passwd *p = getspwnam("nobody");
11888                        const char *pw = p->pw_passwd;
11889   ;
11890   return 0;
11891 }
11892 _ACEOF
11893 rm -f conftest.$ac_objext
11894 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11895   (eval $ac_compile) 2>&5
11896   ac_status=$?
11897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11898   (exit $ac_status); } &&
11899          { ac_try='test -s conftest.$ac_objext'
11900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11901   (eval $ac_try) 2>&5
11902   ac_status=$?
11903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11904   (exit $ac_status); }; }; then
11905   ac_cv_hpux_passwd=yes
11906 else
11907   echo "$as_me: failed program was:" >&5
11908 cat conftest.$ac_ext >&5
11909 ac_cv_hpux_passwd=no
11910 fi
11911 rm -f conftest.$ac_objext conftest.$ac_ext
11912   CPPFLAGS="$ac_save_CPPFLAGS"
11913 fi
11914 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
11915 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
11916   if test "$ac_cv_hpux_passwd" = yes; then
11917     have_shadow_hpux=yes
11918     have_shadow=yes
11919     need_setuid=yes
11920
11921     # on HPUX, bigcrypt is in -lsec
11922     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
11923 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
11924 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
11925   echo $ECHO_N "(cached) $ECHO_C" >&6
11926 else
11927   ac_check_lib_save_LIBS=$LIBS
11928 LIBS="-lsec  $LIBS"
11929 cat >conftest.$ac_ext <<_ACEOF
11930 #line $LINENO "configure"
11931 #include "confdefs.h"
11932
11933 /* Override any gcc2 internal prototype to avoid an error.  */
11934 #ifdef __cplusplus
11935 extern "C"
11936 #endif
11937 /* We use char because int might match the return type of a gcc2
11938    builtin and then its argument prototype would still apply.  */
11939 char bigcrypt ();
11940 #ifdef F77_DUMMY_MAIN
11941 #  ifdef __cplusplus
11942      extern "C"
11943 #  endif
11944    int F77_DUMMY_MAIN() { return 1; }
11945 #endif
11946 int
11947 main ()
11948 {
11949 bigcrypt ();
11950   ;
11951   return 0;
11952 }
11953 _ACEOF
11954 rm -f conftest.$ac_objext conftest$ac_exeext
11955 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11956   (eval $ac_link) 2>&5
11957   ac_status=$?
11958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11959   (exit $ac_status); } &&
11960          { ac_try='test -s conftest$ac_exeext'
11961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11962   (eval $ac_try) 2>&5
11963   ac_status=$?
11964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11965   (exit $ac_status); }; }; then
11966   ac_cv_lib_sec_bigcrypt=yes
11967 else
11968   echo "$as_me: failed program was:" >&5
11969 cat conftest.$ac_ext >&5
11970 ac_cv_lib_sec_bigcrypt=no
11971 fi
11972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11973 LIBS=$ac_check_lib_save_LIBS
11974 fi
11975 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
11976 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
11977 if test $ac_cv_lib_sec_bigcrypt = yes; then
11978   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11979 fi
11980
11981   fi
11982 fi
11983
11984
11985 ###############################################################################
11986 #
11987 #       Check for FreeBSD-style shadow passwords.
11988 #
11989 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11990 #       password systems -- except you only get stuff in the pw_passwd field
11991 #       if the running program is setuid.  So, guess that we've got this
11992 #       lossage to contend with if /etc/master.passwd exists, and default to
11993 #       a setuid installation.
11994 #
11995 ###############################################################################
11996
11997 if test "$with_shadow" = yes ; then
11998   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
11999 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
12000 if test "${ac_cv_master_passwd+set}" = set; then
12001   echo $ECHO_N "(cached) $ECHO_C" >&6
12002 else
12003   if test -f /etc/master.passwd ; then
12004                     ac_cv_master_passwd=yes
12005                   else
12006                     ac_cv_master_passwd=no
12007                   fi
12008 fi
12009 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
12010 echo "${ECHO_T}$ac_cv_master_passwd" >&6
12011   if test "$ac_cv_master_passwd" = yes; then
12012     need_setuid=yes
12013   fi
12014 fi
12015
12016
12017 ###############################################################################
12018 #
12019 #       Check for traditional (ha!) shadow passwords.
12020 #
12021 ###############################################################################
12022
12023 if test "$with_shadow" = yes ; then
12024   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
12025 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
12026 if test "${ac_cv_shadow+set}" = set; then
12027   echo $ECHO_N "(cached) $ECHO_C" >&6
12028 else
12029
12030   ac_save_CPPFLAGS="$CPPFLAGS"
12031   if test \! -z "$includedir" ; then
12032     CPPFLAGS="$CPPFLAGS -I$includedir"
12033   fi
12034   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12035   cat >conftest.$ac_ext <<_ACEOF
12036 #line $LINENO "configure"
12037 #include "confdefs.h"
12038 #include <stdlib.h>
12039                                     #include <unistd.h>
12040                                     #include <sys/types.h>
12041                                     #include <pwd.h>
12042                                     #include <shadow.h>
12043 #ifdef F77_DUMMY_MAIN
12044 #  ifdef __cplusplus
12045      extern "C"
12046 #  endif
12047    int F77_DUMMY_MAIN() { return 1; }
12048 #endif
12049 int
12050 main ()
12051 {
12052 struct spwd *p = getspnam("nobody");
12053                        const char *pw = p->sp_pwdp;
12054   ;
12055   return 0;
12056 }
12057 _ACEOF
12058 rm -f conftest.$ac_objext
12059 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12060   (eval $ac_compile) 2>&5
12061   ac_status=$?
12062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12063   (exit $ac_status); } &&
12064          { ac_try='test -s conftest.$ac_objext'
12065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12066   (eval $ac_try) 2>&5
12067   ac_status=$?
12068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12069   (exit $ac_status); }; }; then
12070   ac_cv_shadow=yes
12071 else
12072   echo "$as_me: failed program was:" >&5
12073 cat conftest.$ac_ext >&5
12074 ac_cv_shadow=no
12075 fi
12076 rm -f conftest.$ac_objext conftest.$ac_ext
12077   CPPFLAGS="$ac_save_CPPFLAGS"
12078 fi
12079 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
12080 echo "${ECHO_T}$ac_cv_shadow" >&6
12081   if test "$ac_cv_shadow" = yes; then
12082     have_shadow=yes
12083     need_setuid=yes
12084
12085     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
12086     have_getspnam=no
12087     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
12088 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
12089 if test "${ac_cv_lib_c_getspnam+set}" = set; then
12090   echo $ECHO_N "(cached) $ECHO_C" >&6
12091 else
12092   ac_check_lib_save_LIBS=$LIBS
12093 LIBS="-lc  $LIBS"
12094 cat >conftest.$ac_ext <<_ACEOF
12095 #line $LINENO "configure"
12096 #include "confdefs.h"
12097
12098 /* Override any gcc2 internal prototype to avoid an error.  */
12099 #ifdef __cplusplus
12100 extern "C"
12101 #endif
12102 /* We use char because int might match the return type of a gcc2
12103    builtin and then its argument prototype would still apply.  */
12104 char getspnam ();
12105 #ifdef F77_DUMMY_MAIN
12106 #  ifdef __cplusplus
12107      extern "C"
12108 #  endif
12109    int F77_DUMMY_MAIN() { return 1; }
12110 #endif
12111 int
12112 main ()
12113 {
12114 getspnam ();
12115   ;
12116   return 0;
12117 }
12118 _ACEOF
12119 rm -f conftest.$ac_objext conftest$ac_exeext
12120 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12121   (eval $ac_link) 2>&5
12122   ac_status=$?
12123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12124   (exit $ac_status); } &&
12125          { ac_try='test -s conftest$ac_exeext'
12126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12127   (eval $ac_try) 2>&5
12128   ac_status=$?
12129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12130   (exit $ac_status); }; }; then
12131   ac_cv_lib_c_getspnam=yes
12132 else
12133   echo "$as_me: failed program was:" >&5
12134 cat conftest.$ac_ext >&5
12135 ac_cv_lib_c_getspnam=no
12136 fi
12137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12138 LIBS=$ac_check_lib_save_LIBS
12139 fi
12140 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
12141 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
12142 if test $ac_cv_lib_c_getspnam = yes; then
12143   have_getspnam=yes
12144 fi
12145
12146     if test "$have_getspnam" = no ; then
12147       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
12148 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
12149 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
12150   echo $ECHO_N "(cached) $ECHO_C" >&6
12151 else
12152   ac_check_lib_save_LIBS=$LIBS
12153 LIBS="-lgen  $LIBS"
12154 cat >conftest.$ac_ext <<_ACEOF
12155 #line $LINENO "configure"
12156 #include "confdefs.h"
12157
12158 /* Override any gcc2 internal prototype to avoid an error.  */
12159 #ifdef __cplusplus
12160 extern "C"
12161 #endif
12162 /* We use char because int might match the return type of a gcc2
12163    builtin and then its argument prototype would still apply.  */
12164 char getspnam ();
12165 #ifdef F77_DUMMY_MAIN
12166 #  ifdef __cplusplus
12167      extern "C"
12168 #  endif
12169    int F77_DUMMY_MAIN() { return 1; }
12170 #endif
12171 int
12172 main ()
12173 {
12174 getspnam ();
12175   ;
12176   return 0;
12177 }
12178 _ACEOF
12179 rm -f conftest.$ac_objext conftest$ac_exeext
12180 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12181   (eval $ac_link) 2>&5
12182   ac_status=$?
12183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12184   (exit $ac_status); } &&
12185          { ac_try='test -s conftest$ac_exeext'
12186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12187   (eval $ac_try) 2>&5
12188   ac_status=$?
12189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12190   (exit $ac_status); }; }; then
12191   ac_cv_lib_gen_getspnam=yes
12192 else
12193   echo "$as_me: failed program was:" >&5
12194 cat conftest.$ac_ext >&5
12195 ac_cv_lib_gen_getspnam=no
12196 fi
12197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12198 LIBS=$ac_check_lib_save_LIBS
12199 fi
12200 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
12201 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
12202 if test $ac_cv_lib_gen_getspnam = yes; then
12203   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
12204 fi
12205
12206     fi
12207   fi
12208 fi
12209
12210
12211 ###############################################################################
12212 #
12213 #       Check for other libraries needed for non-shadow passwords.
12214 #
12215 ###############################################################################
12216
12217 if test "$enable_locking" = yes ; then
12218
12219   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
12220   have_crypt=no
12221   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
12222 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
12223 if test "${ac_cv_lib_c_crypt+set}" = set; then
12224   echo $ECHO_N "(cached) $ECHO_C" >&6
12225 else
12226   ac_check_lib_save_LIBS=$LIBS
12227 LIBS="-lc  $LIBS"
12228 cat >conftest.$ac_ext <<_ACEOF
12229 #line $LINENO "configure"
12230 #include "confdefs.h"
12231
12232 /* Override any gcc2 internal prototype to avoid an error.  */
12233 #ifdef __cplusplus
12234 extern "C"
12235 #endif
12236 /* We use char because int might match the return type of a gcc2
12237    builtin and then its argument prototype would still apply.  */
12238 char crypt ();
12239 #ifdef F77_DUMMY_MAIN
12240 #  ifdef __cplusplus
12241      extern "C"
12242 #  endif
12243    int F77_DUMMY_MAIN() { return 1; }
12244 #endif
12245 int
12246 main ()
12247 {
12248 crypt ();
12249   ;
12250   return 0;
12251 }
12252 _ACEOF
12253 rm -f conftest.$ac_objext conftest$ac_exeext
12254 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12255   (eval $ac_link) 2>&5
12256   ac_status=$?
12257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12258   (exit $ac_status); } &&
12259          { ac_try='test -s conftest$ac_exeext'
12260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12261   (eval $ac_try) 2>&5
12262   ac_status=$?
12263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12264   (exit $ac_status); }; }; then
12265   ac_cv_lib_c_crypt=yes
12266 else
12267   echo "$as_me: failed program was:" >&5
12268 cat conftest.$ac_ext >&5
12269 ac_cv_lib_c_crypt=no
12270 fi
12271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12272 LIBS=$ac_check_lib_save_LIBS
12273 fi
12274 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
12275 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
12276 if test $ac_cv_lib_c_crypt = yes; then
12277   have_crypt=yes
12278 fi
12279
12280   if test "$have_crypt" = no ; then
12281     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
12282 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
12283 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
12284   echo $ECHO_N "(cached) $ECHO_C" >&6
12285 else
12286   ac_check_lib_save_LIBS=$LIBS
12287 LIBS="-lcrypt  $LIBS"
12288 cat >conftest.$ac_ext <<_ACEOF
12289 #line $LINENO "configure"
12290 #include "confdefs.h"
12291
12292 /* Override any gcc2 internal prototype to avoid an error.  */
12293 #ifdef __cplusplus
12294 extern "C"
12295 #endif
12296 /* We use char because int might match the return type of a gcc2
12297    builtin and then its argument prototype would still apply.  */
12298 char crypt ();
12299 #ifdef F77_DUMMY_MAIN
12300 #  ifdef __cplusplus
12301      extern "C"
12302 #  endif
12303    int F77_DUMMY_MAIN() { return 1; }
12304 #endif
12305 int
12306 main ()
12307 {
12308 crypt ();
12309   ;
12310   return 0;
12311 }
12312 _ACEOF
12313 rm -f conftest.$ac_objext conftest$ac_exeext
12314 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12315   (eval $ac_link) 2>&5
12316   ac_status=$?
12317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12318   (exit $ac_status); } &&
12319          { ac_try='test -s conftest$ac_exeext'
12320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12321   (eval $ac_try) 2>&5
12322   ac_status=$?
12323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12324   (exit $ac_status); }; }; then
12325   ac_cv_lib_crypt_crypt=yes
12326 else
12327   echo "$as_me: failed program was:" >&5
12328 cat conftest.$ac_ext >&5
12329 ac_cv_lib_crypt_crypt=no
12330 fi
12331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12332 LIBS=$ac_check_lib_save_LIBS
12333 fi
12334 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
12335 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
12336 if test $ac_cv_lib_crypt_crypt = yes; then
12337   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12338 fi
12339
12340   fi
12341 fi
12342
12343
12344 # Most of the above shadow mechanisms will have set need_setuid to yes,
12345 # if they were found.  But, on some systems, we need setuid even when
12346 # using plain old vanilla passwords.
12347 #
12348 if test "$enable_locking" = yes ; then
12349   case "$host" in
12350     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
12351       need_setuid=yes
12352     ;;
12353   esac
12354 fi
12355
12356
12357 if test "$have_shadow_adjunct" = yes ; then
12358   cat >>confdefs.h <<\_ACEOF
12359 #define HAVE_ADJUNCT_PASSWD 1
12360 _ACEOF
12361
12362 elif test "$have_shadow_enhanced" = yes ; then
12363   cat >>confdefs.h <<\_ACEOF
12364 #define HAVE_ENHANCED_PASSWD 1
12365 _ACEOF
12366
12367 elif test "$have_shadow_hpux" = yes ; then
12368   cat >>confdefs.h <<\_ACEOF
12369 #define HAVE_HPUX_PASSWD 1
12370 _ACEOF
12371
12372 elif test "$have_shadow" = yes ; then
12373   cat >>confdefs.h <<\_ACEOF
12374 #define HAVE_SHADOW_PASSWD 1
12375 _ACEOF
12376
12377 fi
12378
12379
12380 ###############################################################################
12381 #
12382 #       Check for -lXm.
12383 #
12384 ###############################################################################
12385
12386 have_motif=no
12387 with_motif_req=unspecified
12388
12389 # Check whether --with-motif or --without-motif was given.
12390 if test "${with_motif+set}" = set; then
12391   withval="$with_motif"
12392   with_motif="$withval"; with_motif_req="$withval"
12393 else
12394   with_motif=yes
12395 fi;
12396
12397
12398    case "$with_motif" in
12399     yes) ;;
12400     no)  ;;
12401
12402     /*)
12403      echo "$as_me:$LINENO: checking for Motif headers" >&5
12404 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
12405      d=$with_motif/include
12406      if test -d $d; then
12407        X_CFLAGS="-I$d $X_CFLAGS"
12408        echo "$as_me:$LINENO: result: $d" >&5
12409 echo "${ECHO_T}$d" >&6
12410      else
12411        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12412 echo "${ECHO_T}not found ($d: no such directory)" >&6
12413      fi
12414
12415      echo "$as_me:$LINENO: checking for Motif libs" >&5
12416 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
12417      d=$with_motif/lib
12418      if test -d $d; then
12419        X_LIBS="-L$d $X_LIBS"
12420        echo "$as_me:$LINENO: result: $d" >&5
12421 echo "${ECHO_T}$d" >&6
12422      else
12423        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12424 echo "${ECHO_T}not found ($d: no such directory)" >&6
12425      fi
12426
12427      # replace the directory string with "yes".
12428      with_motif_req="yes"
12429      with_motif=$with_motif_req
12430      ;;
12431
12432     *)
12433      echo ""
12434      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12435      echo "       If it is a directory, then \`DIR/include' will be added to"
12436      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12437      exit 1
12438      ;;
12439    esac
12440
12441
12442 if test "$with_motif" != yes -a "$with_motif" != no ; then
12443   echo "error: must be yes or no: --with-motif=$with_motif"
12444   exit 1
12445 fi
12446
12447 if test "$with_motif" = yes; then
12448   have_motif=no
12449
12450   ac_save_CPPFLAGS="$CPPFLAGS"
12451   if test \! -z "$includedir" ; then
12452     CPPFLAGS="$CPPFLAGS -I$includedir"
12453   fi
12454   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12455   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
12456 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
12457 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
12458   echo $ECHO_N "(cached) $ECHO_C" >&6
12459 else
12460   cat >conftest.$ac_ext <<_ACEOF
12461 #line $LINENO "configure"
12462 #include "confdefs.h"
12463 #include <stdlib.h>
12464                      #include <stdio.h>
12465                      #include <X11/Intrinsic.h>
12466
12467 #include <Xm/Xm.h>
12468 _ACEOF
12469 rm -f conftest.$ac_objext
12470 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12471   (eval $ac_compile) 2>&5
12472   ac_status=$?
12473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474   (exit $ac_status); } &&
12475          { ac_try='test -s conftest.$ac_objext'
12476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12477   (eval $ac_try) 2>&5
12478   ac_status=$?
12479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480   (exit $ac_status); }; }; then
12481   ac_cv_header_Xm_Xm_h=yes
12482 else
12483   echo "$as_me: failed program was:" >&5
12484 cat conftest.$ac_ext >&5
12485 ac_cv_header_Xm_Xm_h=no
12486 fi
12487 rm -f conftest.$ac_objext conftest.$ac_ext
12488 fi
12489 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
12490 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
12491 if test $ac_cv_header_Xm_Xm_h = yes; then
12492   have_motif=yes
12493                      cat >>confdefs.h <<\_ACEOF
12494 #define HAVE_MOTIF 1
12495 _ACEOF
12496
12497                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12498 fi
12499
12500
12501   CPPFLAGS="$ac_save_CPPFLAGS"
12502 fi
12503
12504
12505 if test "$have_motif" = yes; then
12506
12507   ac_save_CPPFLAGS="$CPPFLAGS"
12508   if test \! -z "$includedir" ; then
12509     CPPFLAGS="$CPPFLAGS -I$includedir"
12510   fi
12511   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12512   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
12513 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
12514 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
12515   echo $ECHO_N "(cached) $ECHO_C" >&6
12516 else
12517   cat >conftest.$ac_ext <<_ACEOF
12518 #line $LINENO "configure"
12519 #include "confdefs.h"
12520 #include <stdlib.h>
12521                      #include <stdio.h>
12522                      #include <X11/Intrinsic.h>
12523
12524 #include <Xm/ComboBox.h>
12525 _ACEOF
12526 rm -f conftest.$ac_objext
12527 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12528   (eval $ac_compile) 2>&5
12529   ac_status=$?
12530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12531   (exit $ac_status); } &&
12532          { ac_try='test -s conftest.$ac_objext'
12533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12534   (eval $ac_try) 2>&5
12535   ac_status=$?
12536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12537   (exit $ac_status); }; }; then
12538   ac_cv_header_Xm_ComboBox_h=yes
12539 else
12540   echo "$as_me: failed program was:" >&5
12541 cat conftest.$ac_ext >&5
12542 ac_cv_header_Xm_ComboBox_h=no
12543 fi
12544 rm -f conftest.$ac_objext conftest.$ac_ext
12545 fi
12546 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
12547 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
12548 if test $ac_cv_header_Xm_ComboBox_h = yes; then
12549   cat >>confdefs.h <<\_ACEOF
12550 #define HAVE_XMCOMBOBOX 1
12551 _ACEOF
12552
12553 fi
12554
12555
12556   CPPFLAGS="$ac_save_CPPFLAGS"
12557 fi
12558
12559
12560 ###############################################################################
12561 #
12562 #       Check for -lgtk (and Gnome stuff)
12563 #
12564 ###############################################################################
12565
12566 have_gtk=no
12567 have_gtk2=no
12568 with_gtk_req=unspecified
12569
12570 # Check whether --with-gtk or --without-gtk was given.
12571 if test "${with_gtk+set}" = set; then
12572   withval="$with_gtk"
12573   with_gtk="$withval"; with_gtk_req="$withval"
12574 else
12575   with_gtk=yes
12576 fi;
12577
12578 # if --with-gtk=/directory/ was specified, remember that directory so that
12579 # we can also look for the `gtk-config' program in that directory.
12580 case "$with_gtk" in
12581   /*)
12582     gtk_dir="$with_gtk"
12583     ;;
12584   *)
12585     gtk_dir=""
12586     ;;
12587 esac
12588
12589
12590    case "$with_gtk" in
12591     yes) ;;
12592     no)  ;;
12593
12594     /*)
12595      echo "$as_me:$LINENO: checking for Gtk headers" >&5
12596 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
12597      d=$with_gtk/include
12598      if test -d $d; then
12599        X_CFLAGS="-I$d $X_CFLAGS"
12600        echo "$as_me:$LINENO: result: $d" >&5
12601 echo "${ECHO_T}$d" >&6
12602      else
12603        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12604 echo "${ECHO_T}not found ($d: no such directory)" >&6
12605      fi
12606
12607      echo "$as_me:$LINENO: checking for Gtk libs" >&5
12608 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12609      d=$with_gtk/lib
12610      if test -d $d; then
12611        X_LIBS="-L$d $X_LIBS"
12612        echo "$as_me:$LINENO: result: $d" >&5
12613 echo "${ECHO_T}$d" >&6
12614      else
12615        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12616 echo "${ECHO_T}not found ($d: no such directory)" >&6
12617      fi
12618
12619      # replace the directory string with "yes".
12620      with_gtk_req="yes"
12621      with_gtk=$with_gtk_req
12622      ;;
12623
12624     *)
12625      echo ""
12626      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
12627      echo "       If it is a directory, then \`DIR/include' will be added to"
12628      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12629      exit 1
12630      ;;
12631    esac
12632
12633
12634 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
12635   echo "error: must be yes or no: --with-gtk=$with_gtk"
12636   exit 1
12637 fi
12638
12639 have_gnome=no
12640 with_gnome_req=unspecified
12641
12642 # Check whether --with-gnome or --without-gnome was given.
12643 if test "${with_gnome+set}" = set; then
12644   withval="$with_gnome"
12645   with_gnome="$withval"; with_gnome_req="$withval"
12646 else
12647   with_gnome=yes
12648 fi;
12649
12650 # if --with-gnome=/directory/ was specified, remember that directory so that
12651 # we can also look for the `gnome-config' program in that directory.
12652 case "$with_gnome" in
12653   /*)
12654     gnome_dir="$with_gnome"
12655     ;;
12656   *)
12657     gnome_dir=""
12658     ;;
12659 esac
12660
12661
12662    case "$with_gnome" in
12663     yes) ;;
12664     no)  ;;
12665
12666     /*)
12667      echo "$as_me:$LINENO: checking for Gnome headers" >&5
12668 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
12669      d=$with_gnome/include
12670      if test -d $d; then
12671        X_CFLAGS="-I$d $X_CFLAGS"
12672        echo "$as_me:$LINENO: result: $d" >&5
12673 echo "${ECHO_T}$d" >&6
12674      else
12675        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12676 echo "${ECHO_T}not found ($d: no such directory)" >&6
12677      fi
12678
12679      echo "$as_me:$LINENO: checking for Gnome libs" >&5
12680 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
12681      d=$with_gnome/lib
12682      if test -d $d; then
12683        X_LIBS="-L$d $X_LIBS"
12684        echo "$as_me:$LINENO: result: $d" >&5
12685 echo "${ECHO_T}$d" >&6
12686      else
12687        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12688 echo "${ECHO_T}not found ($d: no such directory)" >&6
12689      fi
12690
12691      # replace the directory string with "yes".
12692      with_gnome_req="yes"
12693      with_gnome=$with_gnome_req
12694      ;;
12695
12696     *)
12697      echo ""
12698      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
12699      echo "       If it is a directory, then \`DIR/include' will be added to"
12700      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12701      exit 1
12702      ;;
12703    esac
12704
12705
12706 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
12707   echo "error: must be yes or no: --with-gnome=$with_gnome"
12708   exit 1
12709 fi
12710
12711 parse_gtk_version_string() {
12712   # M4 sucks!!
12713
12714   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
12715   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
12716
12717   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
12718   if test -z "$ac_gtk_version"; then
12719     ac_gtk_version=unknown
12720     ac_gtk_version_string=unknown
12721   fi
12722 }
12723
12724
12725 jurassic_gtk=no
12726 gtk2_halfassed=no
12727
12728 if test "$with_gtk" = yes; then
12729   have_gtk=no
12730
12731   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
12732   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
12733   #
12734   gtk_path="$PATH"
12735
12736   if test ! -z "$gtk_dir"; then
12737     # canonicalize slashes.
12738     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
12739     gtk_path="$foo:$gtk_path"
12740   fi
12741
12742   if test ! -z "$gnome_dir"; then
12743     # canonicalize slashes.
12744     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
12745     gtk_path="$foo:$gtk_path"
12746   fi
12747
12748   for ac_prog in pkg-config
12749 do
12750   # Extract the first word of "$ac_prog", so it can be a program name with args.
12751 set dummy $ac_prog; ac_word=$2
12752 echo "$as_me:$LINENO: checking for $ac_word" >&5
12753 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12754 if test "${ac_cv_path_pkg_config+set}" = set; then
12755   echo $ECHO_N "(cached) $ECHO_C" >&6
12756 else
12757   case $pkg_config in
12758   [\\/]* | ?:[\\/]*)
12759   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
12760   ;;
12761   *)
12762   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12763 for as_dir in $gtk_path
12764 do
12765   IFS=$as_save_IFS
12766   test -z "$as_dir" && as_dir=.
12767   for ac_exec_ext in '' $ac_executable_extensions; do
12768   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12769     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
12770     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12771     break 2
12772   fi
12773 done
12774 done
12775
12776   ;;
12777 esac
12778 fi
12779 pkg_config=$ac_cv_path_pkg_config
12780
12781 if test -n "$pkg_config"; then
12782   echo "$as_me:$LINENO: result: $pkg_config" >&5
12783 echo "${ECHO_T}$pkg_config" >&6
12784 else
12785   echo "$as_me:$LINENO: result: no" >&5
12786 echo "${ECHO_T}no" >&6
12787 fi
12788
12789   test -n "$pkg_config" && break
12790 done
12791
12792
12793   if test -n "$pkg_config" ; then
12794     #
12795     # the new way...
12796     # run pkg-config based tests.
12797     #
12798     pkgs=''
12799     pkg_check_version() {
12800       if test "$ok" = yes ; then
12801         req="$1"
12802         min="$2"
12803         echo "$as_me:$LINENO: checking for $req" >&5
12804 echo $ECHO_N "checking for $req... $ECHO_C" >&6
12805         if $pkg_config --exists "$req" ; then
12806           vers=`$pkg_config --modversion "$req"`
12807           if $pkg_config --exists "$req >= $min" ; then
12808             echo "$as_me:$LINENO: result: $vers" >&5
12809 echo "${ECHO_T}$vers" >&6
12810             pkgs="$pkgs $req"
12811             return 1
12812           else
12813             echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
12814 echo "${ECHO_T}$vers (wanted >= $min)" >&6
12815             ok=no
12816             return 0
12817           fi
12818         else
12819           echo "$as_me:$LINENO: result: no" >&5
12820 echo "${ECHO_T}no" >&6
12821           ok=no
12822           return 0
12823         fi
12824       fi
12825     }
12826
12827     echo "$as_me:$LINENO: result: checking for GTK 2.x with pkg-config based tests..." >&5
12828 echo "${ECHO_T}checking for GTK 2.x with pkg-config based tests..." >&6
12829
12830     ok="yes"
12831     pkg_check_version       gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
12832     pkg_check_version    gmodule-2.0  2.0.0
12833     pkg_check_version     libxml-2.0  2.4.6
12834     pkg_check_version   libglade-2.0  1.99.0
12835 #   pkg_check_version gdk_pixbuf      0.1
12836     have_gtk="$ok"
12837
12838     if test "$have_gtk" = yes; then
12839       have_gtk2=yes
12840       cat >>confdefs.h <<\_ACEOF
12841 #define HAVE_GTK2 1
12842 _ACEOF
12843
12844     else
12845       if test -n "$ac_gtk_version_string" ; then
12846         gtk2_halfassed="$ac_gtk_version_string"
12847         gtk2_halfassed_lib="$req"
12848       fi
12849     fi
12850
12851     if test "$have_gtk" = no; then
12852       #
12853       # we don't have GTK 2.  Let's look for GTK 1.
12854       #
12855       echo "$as_me:$LINENO: result: checking for GTK 1.x with pkg-config based tests..." >&5
12856 echo "${ECHO_T}checking for GTK 1.x with pkg-config based tests..." >&6
12857
12858       pkgs=''
12859       ok="yes"
12860       pkg_check_version gtk+       1.2     ; ac_gtk_version_string="$vers"
12861       pkg_check_version glib       1.0
12862       pkg_check_version gdk_pixbuf 0.1
12863       have_gtk="$ok"
12864
12865       # Now check for Gnome...
12866       #
12867       if test "$have_gtk" = yes -a "$with_gnome" = yes; then
12868         old_pkgs="$pkgs"
12869         ok=yes
12870         pkg_check_version capplet    1.0
12871         pkg_check_version gnomeui    1.0
12872         pkg_check_version gdk_pixbuf 0.1
12873         have_gnome="$ok"
12874
12875         if test "$have_gnome" = no; then
12876           pkgs="$old_pkgs"
12877         else
12878           cat >>confdefs.h <<\_ACEOF
12879 #define HAVE_CRAPPLET 1
12880 _ACEOF
12881
12882         fi
12883       fi
12884     fi
12885
12886     if test "$have_gtk" = yes; then
12887       parse_gtk_version_string
12888       jurassic_gtk=no
12889     else
12890       have_gnome=no
12891     fi
12892
12893     if test "$have_gtk" = yes; then
12894       echo "$as_me:$LINENO: checking for Gtk includes" >&5
12895 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
12896 if test "${ac_cv_gtk_config_cflags+set}" = set; then
12897   echo $ECHO_N "(cached) $ECHO_C" >&6
12898 else
12899   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12900 fi
12901 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
12902 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
12903       echo "$as_me:$LINENO: checking for Gtk libs" >&5
12904 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12905 if test "${ac_cv_gtk_config_libs+set}" = set; then
12906   echo $ECHO_N "(cached) $ECHO_C" >&6
12907 else
12908   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12909 fi
12910 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
12911 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
12912     fi
12913     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12914     ac_gtk_config_libs=$ac_cv_gtk_config_libs
12915
12916     ac_gnome_config_cflags=$ac_gtk_config_cflags
12917     ac_gnome_config_libs=$ac_gtk_config_libs
12918
12919   else
12920     #
12921     # the old way...
12922     # run {gnome,gtk}-config based tests.
12923     #
12924     echo "$as_me:$LINENO: result: checking for GTK 1.x with gtk-config based tests..." >&5
12925 echo "${ECHO_T}checking for GTK 1.x with gtk-config based tests..." >&6
12926
12927     for ac_prog in glib12-config glib-config
12928 do
12929   # Extract the first word of "$ac_prog", so it can be a program name with args.
12930 set dummy $ac_prog; ac_word=$2
12931 echo "$as_me:$LINENO: checking for $ac_word" >&5
12932 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12933 if test "${ac_cv_path_glib_config+set}" = set; then
12934   echo $ECHO_N "(cached) $ECHO_C" >&6
12935 else
12936   case $glib_config in
12937   [\\/]* | ?:[\\/]*)
12938   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
12939   ;;
12940   *)
12941   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12942 for as_dir in $gtk_path
12943 do
12944   IFS=$as_save_IFS
12945   test -z "$as_dir" && as_dir=.
12946   for ac_exec_ext in '' $ac_executable_extensions; do
12947   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12948     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
12949     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12950     break 2
12951   fi
12952 done
12953 done
12954
12955   ;;
12956 esac
12957 fi
12958 glib_config=$ac_cv_path_glib_config
12959
12960 if test -n "$glib_config"; then
12961   echo "$as_me:$LINENO: result: $glib_config" >&5
12962 echo "${ECHO_T}$glib_config" >&6
12963 else
12964   echo "$as_me:$LINENO: result: no" >&5
12965 echo "${ECHO_T}no" >&6
12966 fi
12967
12968   test -n "$glib_config" && break
12969 done
12970
12971     for ac_prog in gtk12-config  gtk-config
12972 do
12973   # Extract the first word of "$ac_prog", so it can be a program name with args.
12974 set dummy $ac_prog; ac_word=$2
12975 echo "$as_me:$LINENO: checking for $ac_word" >&5
12976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12977 if test "${ac_cv_path_gtk_config+set}" = set; then
12978   echo $ECHO_N "(cached) $ECHO_C" >&6
12979 else
12980   case $gtk_config in
12981   [\\/]* | ?:[\\/]*)
12982   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
12983   ;;
12984   *)
12985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12986 for as_dir in $gtk_path
12987 do
12988   IFS=$as_save_IFS
12989   test -z "$as_dir" && as_dir=.
12990   for ac_exec_ext in '' $ac_executable_extensions; do
12991   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12992     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
12993     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12994     break 2
12995   fi
12996 done
12997 done
12998
12999   ;;
13000 esac
13001 fi
13002 gtk_config=$ac_cv_path_gtk_config
13003
13004 if test -n "$gtk_config"; then
13005   echo "$as_me:$LINENO: result: $gtk_config" >&5
13006 echo "${ECHO_T}$gtk_config" >&6
13007 else
13008   echo "$as_me:$LINENO: result: no" >&5
13009 echo "${ECHO_T}no" >&6
13010 fi
13011
13012   test -n "$gtk_config" && break
13013 done
13014
13015
13016     if test "$with_gnome" = yes; then
13017       for ac_prog in gnome-config
13018 do
13019   # Extract the first word of "$ac_prog", so it can be a program name with args.
13020 set dummy $ac_prog; ac_word=$2
13021 echo "$as_me:$LINENO: checking for $ac_word" >&5
13022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13023 if test "${ac_cv_path_gnome_config+set}" = set; then
13024   echo $ECHO_N "(cached) $ECHO_C" >&6
13025 else
13026   case $gnome_config in
13027   [\\/]* | ?:[\\/]*)
13028   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
13029   ;;
13030   *)
13031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13032 for as_dir in $gtk_path
13033 do
13034   IFS=$as_save_IFS
13035   test -z "$as_dir" && as_dir=.
13036   for ac_exec_ext in '' $ac_executable_extensions; do
13037   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13038     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
13039     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13040     break 2
13041   fi
13042 done
13043 done
13044
13045   ;;
13046 esac
13047 fi
13048 gnome_config=$ac_cv_path_gnome_config
13049
13050 if test -n "$gnome_config"; then
13051   echo "$as_me:$LINENO: result: $gnome_config" >&5
13052 echo "${ECHO_T}$gnome_config" >&6
13053 else
13054   echo "$as_me:$LINENO: result: no" >&5
13055 echo "${ECHO_T}no" >&6
13056 fi
13057
13058   test -n "$gnome_config" && break
13059 done
13060
13061     fi
13062
13063     if test -n "$glib_config" -a  -n "$gtk_config" ; then
13064       have_gtk=yes
13065       if test "$with_gnome" = yes -a -n "$gnome_config" ; then
13066         have_gnome=yes
13067       fi
13068     fi
13069
13070     if test "$have_gtk" = yes; then
13071       echo "$as_me:$LINENO: checking Gtk version number" >&5
13072 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
13073 if test "${ac_cv_gtk_version_string+set}" = set; then
13074   echo $ECHO_N "(cached) $ECHO_C" >&6
13075 else
13076   ac_cv_gtk_version_string=`$gtk_config --version`
13077 fi
13078 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
13079 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
13080       ac_gtk_version_string=$ac_cv_gtk_version_string
13081       parse_gtk_version_string
13082     fi
13083
13084     if test "$have_gtk" = yes; then
13085       if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
13086       then
13087         have_gtk=no
13088         have_gnome=no
13089         jurassic_gtk=yes
13090       fi
13091     fi
13092
13093     if test "$have_gtk" = yes; then
13094       echo "$as_me:$LINENO: checking for Gtk includes" >&5
13095 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
13096 if test "${ac_cv_gtk_config_cflags+set}" = set; then
13097   echo $ECHO_N "(cached) $ECHO_C" >&6
13098 else
13099   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
13100 fi
13101 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
13102 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
13103       echo "$as_me:$LINENO: checking for Gtk libs" >&5
13104 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13105 if test "${ac_cv_gtk_config_libs+set}" = set; then
13106   echo $ECHO_N "(cached) $ECHO_C" >&6
13107 else
13108   ac_cv_gtk_config_libs=`$gtk_config --libs`
13109 fi
13110 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
13111 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
13112     fi
13113     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
13114     ac_gtk_config_libs=$ac_cv_gtk_config_libs
13115
13116     # Check for Gnome Capplet support.
13117     # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
13118     # In a Gnome 2.x world, libcapplet will not exist.
13119     # (In fact, this likely won't even be checked, since in a Gnome 2.x
13120     # world, we will probably be up in the "$pkg_config" branch instead
13121     # of here in the "$gnome_config" branch.)
13122     #
13123     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13124       gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
13125       echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
13126 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
13127       if test "${ac_cv_gnome_config_cflags+set}" = set; then
13128   echo $ECHO_N "(cached) $ECHO_C" >&6
13129 else
13130   if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \
13131               grep Unknown >/dev/null ) ; then
13132            ac_cv_gnome_config_cflags=''
13133          else
13134           ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
13135          fi
13136 fi
13137
13138       ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
13139       if test "$ac_gnome_config_cflags" = "" ; then
13140         have_gnome=no
13141         echo "$as_me:$LINENO: result: no" >&5
13142 echo "${ECHO_T}no" >&6
13143       else
13144         echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
13145 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
13146       fi
13147     fi
13148
13149     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13150       echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
13151 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
13152       if test "${ac_cv_gnome_config_libs+set}" = set; then
13153   echo $ECHO_N "(cached) $ECHO_C" >&6
13154 else
13155   if ( $gnome_config --libs $gnome_config_libs 2>&1 |
13156               grep Unknown >/dev/null ) ; then
13157            ac_cv_gnome_config_libs=''
13158          else
13159            ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
13160          fi
13161 fi
13162
13163       ac_gnome_config_libs=$ac_cv_gnome_config_libs
13164       if test "$ac_gnome_config_libs" = "" ; then
13165         have_gnome=no
13166         echo "$as_me:$LINENO: result: no" >&5
13167 echo "${ECHO_T}no" >&6
13168       else
13169         echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
13170 echo "${ECHO_T}$ac_gnome_config_libs" >&6
13171       fi
13172     fi
13173
13174     # If we have Gnome, then override the gtk-config values with
13175     # the gnome-config values.
13176     #
13177     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13178       ac_gtk_config_cflags=$ac_gnome_config_cflags
13179       ac_gtk_config_libs=$ac_gnome_config_libs
13180       cat >>confdefs.h <<\_ACEOF
13181 #define HAVE_CRAPPLET 1
13182 _ACEOF
13183
13184     fi
13185
13186   fi   # end of {gnome,gtk}-config based tests
13187
13188   if test "$have_gtk" = yes -a "$have_gtk2" = no; then
13189     # check for this function that was not in libcapplet 1.2.
13190     # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
13191
13192   ac_save_CPPFLAGS="$CPPFLAGS"
13193   ac_save_LDFLAGS="$LDFLAGS"
13194 #  ac_save_LIBS="$LIBS"
13195
13196   if test \! -z "$includedir" ; then
13197     CPPFLAGS="$CPPFLAGS -I$includedir"
13198   fi
13199   # note: $X_CFLAGS includes $x_includes
13200   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13201
13202   if test \! -z "$libdir" ; then
13203     LDFLAGS="$LDFLAGS -L$libdir"
13204   fi
13205   # note: $X_LIBS includes $x_libraries
13206   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13207
13208   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
13209 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
13210 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
13211   echo $ECHO_N "(cached) $ECHO_C" >&6
13212 else
13213   ac_check_lib_save_LIBS=$LIBS
13214 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
13215 cat >conftest.$ac_ext <<_ACEOF
13216 #line $LINENO "configure"
13217 #include "confdefs.h"
13218
13219 /* Override any gcc2 internal prototype to avoid an error.  */
13220 #ifdef __cplusplus
13221 extern "C"
13222 #endif
13223 /* We use char because int might match the return type of a gcc2
13224    builtin and then its argument prototype would still apply.  */
13225 char capplet_widget_changes_are_immediate ();
13226 #ifdef F77_DUMMY_MAIN
13227 #  ifdef __cplusplus
13228      extern "C"
13229 #  endif
13230    int F77_DUMMY_MAIN() { return 1; }
13231 #endif
13232 int
13233 main ()
13234 {
13235 capplet_widget_changes_are_immediate ();
13236   ;
13237   return 0;
13238 }
13239 _ACEOF
13240 rm -f conftest.$ac_objext conftest$ac_exeext
13241 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13242   (eval $ac_link) 2>&5
13243   ac_status=$?
13244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13245   (exit $ac_status); } &&
13246          { ac_try='test -s conftest$ac_exeext'
13247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13248   (eval $ac_try) 2>&5
13249   ac_status=$?
13250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13251   (exit $ac_status); }; }; then
13252   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
13253 else
13254   echo "$as_me: failed program was:" >&5
13255 cat conftest.$ac_ext >&5
13256 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
13257 fi
13258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13259 LIBS=$ac_check_lib_save_LIBS
13260 fi
13261 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
13262 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
13263 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
13264   cat >>confdefs.h <<\_ACEOF
13265 #define HAVE_CRAPPLET_IMMEDIATE 1
13266 _ACEOF
13267
13268 else
13269   true
13270 fi
13271
13272   CPPFLAGS="$ac_save_CPPFLAGS"
13273   LDFLAGS="$ac_save_LDFLAGS"
13274 #  LIBS="$ac_save_LIBS"
13275
13276   fi
13277
13278
13279   GNOME_DATADIR=""
13280   if test "$have_gtk" = yes; then
13281     if test -n "$pkg_config"; then
13282       if test "$have_gtk2" = yes; then
13283         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
13284       else
13285         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
13286       fi
13287     else
13288       GNOME_DATADIR=`$gtk_config --prefix`
13289     fi
13290     GNOME_DATADIR="$GNOME_DATADIR/share"
13291   fi
13292
13293   # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
13294   if test "$have_gtk2" = yes; then
13295     GNOME_PANELDIR='$(GNOME_PANELDIR2)'
13296   else
13297     GNOME_PANELDIR='$(GNOME_PANELDIR1)'
13298   fi
13299
13300
13301   if test "$have_gtk" = yes; then
13302     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
13303     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
13304     cat >>confdefs.h <<\_ACEOF
13305 #define HAVE_GTK 1
13306 _ACEOF
13307
13308
13309     if test "$have_gtk2" = yes; then
13310       GTK_EXTRA_OBJS=""
13311     else
13312       GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
13313     fi
13314   fi
13315
13316 fi
13317
13318
13319 # Check for the Gnome Help Browser.
13320 #
13321 if test "$have_gtk" = yes; then
13322   for ac_prog in yelp gnome-help-browser
13323 do
13324   # Extract the first word of "$ac_prog", so it can be a program name with args.
13325 set dummy $ac_prog; ac_word=$2
13326 echo "$as_me:$LINENO: checking for $ac_word" >&5
13327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13328 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
13329   echo $ECHO_N "(cached) $ECHO_C" >&6
13330 else
13331   if test -n "$have_gnome_help"; then
13332   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
13333 else
13334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13335 for as_dir in $PATH
13336 do
13337   IFS=$as_save_IFS
13338   test -z "$as_dir" && as_dir=.
13339   for ac_exec_ext in '' $ac_executable_extensions; do
13340   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13341     ac_cv_prog_have_gnome_help="$ac_prog"
13342     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13343     break 2
13344   fi
13345 done
13346 done
13347
13348 fi
13349 fi
13350 have_gnome_help=$ac_cv_prog_have_gnome_help
13351 if test -n "$have_gnome_help"; then
13352   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
13353 echo "${ECHO_T}$have_gnome_help" >&6
13354 else
13355   echo "$as_me:$LINENO: result: no" >&5
13356 echo "${ECHO_T}no" >&6
13357 fi
13358
13359   test -n "$have_gnome_help" && break
13360 done
13361 test -n "$have_gnome_help" || have_gnome_help="no"
13362
13363   if test "$have_gnome_help" != no; then
13364     have_gnome_help=yes
13365   fi
13366 fi
13367
13368
13369 ###############################################################################
13370 #
13371 #       Check for -lxml
13372 #
13373 ###############################################################################
13374
13375 have_xml=no
13376 with_xml_req=unspecified
13377 xml_halfassed=no
13378
13379 # Check whether --with-xml or --without-xml was given.
13380 if test "${with_xml+set}" = set; then
13381   withval="$with_xml"
13382   with_xml="$withval"; with_xml_req="$withval"
13383 else
13384   with_xml=yes
13385 fi;
13386
13387 # if --with-xml=/directory/ was specified, remember that directory so that
13388 # we can also look for the `xml-config' program in that directory.
13389 case "$with_xml" in
13390   /*)
13391     xml_dir="$with_xml"
13392     ;;
13393   *)
13394     xml_dir=""
13395     ;;
13396 esac
13397
13398
13399    case "$with_xml" in
13400     yes) ;;
13401     no)  ;;
13402
13403     /*)
13404      echo "$as_me:$LINENO: checking for XML headers" >&5
13405 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
13406      d=$with_xml/include
13407      if test -d $d; then
13408        X_CFLAGS="-I$d $X_CFLAGS"
13409        echo "$as_me:$LINENO: result: $d" >&5
13410 echo "${ECHO_T}$d" >&6
13411      else
13412        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13413 echo "${ECHO_T}not found ($d: no such directory)" >&6
13414      fi
13415
13416      echo "$as_me:$LINENO: checking for XML libs" >&5
13417 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13418      d=$with_xml/lib
13419      if test -d $d; then
13420        X_LIBS="-L$d $X_LIBS"
13421        echo "$as_me:$LINENO: result: $d" >&5
13422 echo "${ECHO_T}$d" >&6
13423      else
13424        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13425 echo "${ECHO_T}not found ($d: no such directory)" >&6
13426      fi
13427
13428      # replace the directory string with "yes".
13429      with_xml_req="yes"
13430      with_xml=$with_xml_req
13431      ;;
13432
13433     *)
13434      echo ""
13435      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
13436      echo "       If it is a directory, then \`DIR/include' will be added to"
13437      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13438      exit 1
13439      ;;
13440    esac
13441
13442
13443 if test "$with_xml" != yes -a "$with_xml" != no ; then
13444   echo "error: must be yes or no: --with-xml=$with_xml"
13445   exit 1
13446 fi
13447
13448 if test "$with_xml" = yes; then
13449   have_xml=no
13450   have_old_xml=no
13451
13452   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13453   # look in /foo/bin/ for for xml-config.
13454   #
13455   xml_path="$PATH"
13456
13457   if test ! -z "$gtk_dir"; then
13458     # canonicalize slashes.
13459     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13460     xml_path="$foo:$xml_path"
13461   fi
13462
13463   if test ! -z "$gnome_dir"; then
13464     # canonicalize slashes.
13465     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13466     xml_path="$foo:$xml_path"
13467   fi
13468
13469   if test -n "$pkg_config" ; then
13470     #
13471     # the new way...
13472     # run pkg-config based tests.
13473     #
13474     pkgs=""
13475     ok="yes"
13476
13477     # If we have Gtk 2.x, then *only* XML 2.x will work.
13478     # If we have Gtk 1.x, or don't have Gtk at all, then
13479     # either XML 1.x or 2.x will work.
13480
13481     # First check for XML 2.x.
13482     #
13483     pkg_check_version libxml-2.0 2.4.6
13484
13485     # If that didn't work (we don't have XML 2.x) and we *don't* have
13486     # Gtk 2.x, then check to see if we have XML 1.x
13487     #
13488     if test "$ok" = no -a "$have_gtk2" = no; then
13489       ok=yes
13490       pkg_check_version libxml 1.0
13491     fi
13492
13493     have_xml="$ok"
13494
13495     if test "$have_xml" = yes; then
13496       echo "$as_me:$LINENO: checking for XML includes" >&5
13497 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13498 if test "${ac_cv_xml_config_cflags+set}" = set; then
13499   echo $ECHO_N "(cached) $ECHO_C" >&6
13500 else
13501   ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
13502 fi
13503 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13504 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13505       echo "$as_me:$LINENO: checking for XML libs" >&5
13506 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13507 if test "${ac_cv_xml_config_libs+set}" = set; then
13508   echo $ECHO_N "(cached) $ECHO_C" >&6
13509 else
13510   ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
13511 fi
13512 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13513 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13514       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13515       ac_xml_config_libs=$ac_cv_xml_config_libs
13516     fi
13517
13518   else
13519     #
13520     # the old way...
13521     # run {xml2,xml}-config based tests.
13522     #
13523
13524     for ac_prog in xml2-config xml-config
13525 do
13526   # Extract the first word of "$ac_prog", so it can be a program name with args.
13527 set dummy $ac_prog; ac_word=$2
13528 echo "$as_me:$LINENO: checking for $ac_word" >&5
13529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13530 if test "${ac_cv_path_xml_config+set}" = set; then
13531   echo $ECHO_N "(cached) $ECHO_C" >&6
13532 else
13533   case $xml_config in
13534   [\\/]* | ?:[\\/]*)
13535   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
13536   ;;
13537   *)
13538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13539 for as_dir in $xml_path
13540 do
13541   IFS=$as_save_IFS
13542   test -z "$as_dir" && as_dir=.
13543   for ac_exec_ext in '' $ac_executable_extensions; do
13544   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13545     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
13546     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13547     break 2
13548   fi
13549 done
13550 done
13551
13552   ;;
13553 esac
13554 fi
13555 xml_config=$ac_cv_path_xml_config
13556
13557 if test -n "$xml_config"; then
13558   echo "$as_me:$LINENO: result: $xml_config" >&5
13559 echo "${ECHO_T}$xml_config" >&6
13560 else
13561   echo "$as_me:$LINENO: result: no" >&5
13562 echo "${ECHO_T}no" >&6
13563 fi
13564
13565   test -n "$xml_config" && break
13566 done
13567
13568
13569     # If we found the xml-config program, run it to get flags.
13570     #
13571     if test -n "$xml_config" ; then
13572       echo "$as_me:$LINENO: checking for XML includes" >&5
13573 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13574 if test "${ac_cv_xml_config_cflags+set}" = set; then
13575   echo $ECHO_N "(cached) $ECHO_C" >&6
13576 else
13577   ac_cv_xml_config_cflags=`$xml_config --cflags`
13578 fi
13579 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13580 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13581       echo "$as_me:$LINENO: checking for XML libs" >&5
13582 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13583 if test "${ac_cv_xml_config_libs+set}" = set; then
13584   echo $ECHO_N "(cached) $ECHO_C" >&6
13585 else
13586   ac_cv_xml_config_libs=`$xml_config --libs`
13587 fi
13588 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13589 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13590       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13591       ac_xml_config_libs=$ac_cv_xml_config_libs
13592     fi
13593
13594     ac_save_xml_CPPFLAGS="$CPPFLAGS"
13595     CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
13596
13597     # first try <libxml/parser.h> which is the new way...
13598     #
13599
13600   ac_save_CPPFLAGS="$CPPFLAGS"
13601   if test \! -z "$includedir" ; then
13602     CPPFLAGS="$CPPFLAGS -I$includedir"
13603   fi
13604   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13605   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
13606 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
13607 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
13608   echo $ECHO_N "(cached) $ECHO_C" >&6
13609 else
13610   cat >conftest.$ac_ext <<_ACEOF
13611 #line $LINENO "configure"
13612 #include "confdefs.h"
13613 #include <libxml/parser.h>
13614
13615 #include <libxml/xmlIO.h>
13616 _ACEOF
13617 rm -f conftest.$ac_objext
13618 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13619   (eval $ac_compile) 2>&5
13620   ac_status=$?
13621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13622   (exit $ac_status); } &&
13623          { ac_try='test -s conftest.$ac_objext'
13624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13625   (eval $ac_try) 2>&5
13626   ac_status=$?
13627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13628   (exit $ac_status); }; }; then
13629   ac_cv_header_libxml_xmlIO_h=yes
13630 else
13631   echo "$as_me: failed program was:" >&5
13632 cat conftest.$ac_ext >&5
13633 ac_cv_header_libxml_xmlIO_h=no
13634 fi
13635 rm -f conftest.$ac_objext conftest.$ac_ext
13636 fi
13637 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
13638 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
13639 if test $ac_cv_header_libxml_xmlIO_h = yes; then
13640   have_xml=yes
13641 fi
13642
13643
13644   CPPFLAGS="$ac_save_CPPFLAGS"
13645
13646     # if that didn't work, then try just <parser.h> which is the old way...
13647     #
13648     if test "$have_xml" = no; then
13649
13650   ac_save_CPPFLAGS="$CPPFLAGS"
13651   if test \! -z "$includedir" ; then
13652     CPPFLAGS="$CPPFLAGS -I$includedir"
13653   fi
13654   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13655   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
13656 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
13657 if test "${ac_cv_header_xmlIO_h+set}" = set; then
13658   echo $ECHO_N "(cached) $ECHO_C" >&6
13659 else
13660   cat >conftest.$ac_ext <<_ACEOF
13661 #line $LINENO "configure"
13662 #include "confdefs.h"
13663 #include <parser.h>
13664
13665 #include <xmlIO.h>
13666 _ACEOF
13667 rm -f conftest.$ac_objext
13668 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13669   (eval $ac_compile) 2>&5
13670   ac_status=$?
13671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13672   (exit $ac_status); } &&
13673          { ac_try='test -s conftest.$ac_objext'
13674   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13675   (eval $ac_try) 2>&5
13676   ac_status=$?
13677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13678   (exit $ac_status); }; }; then
13679   ac_cv_header_xmlIO_h=yes
13680 else
13681   echo "$as_me: failed program was:" >&5
13682 cat conftest.$ac_ext >&5
13683 ac_cv_header_xmlIO_h=no
13684 fi
13685 rm -f conftest.$ac_objext conftest.$ac_ext
13686 fi
13687 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
13688 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
13689 if test $ac_cv_header_xmlIO_h = yes; then
13690   have_xml=yes; have_old_xml=yes
13691 fi
13692
13693
13694   CPPFLAGS="$ac_save_CPPFLAGS"
13695     fi
13696
13697     CPPFLAGS="$ac_save_xml_CPPFLAGS"
13698   fi
13699
13700
13701   have_zlib=no
13702   if test "$have_xml" = yes; then
13703     # we have the XML headers; now make sure zlib is around.
13704     # yes, it's stupid we have to do this too, but there is
13705     # dependency screwage in Gnome.
13706
13707   ac_save_CPPFLAGS="$CPPFLAGS"
13708   ac_save_LDFLAGS="$LDFLAGS"
13709 #  ac_save_LIBS="$LIBS"
13710
13711   if test \! -z "$includedir" ; then
13712     CPPFLAGS="$CPPFLAGS -I$includedir"
13713   fi
13714   # note: $X_CFLAGS includes $x_includes
13715   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13716
13717   if test \! -z "$libdir" ; then
13718     LDFLAGS="$LDFLAGS -L$libdir"
13719   fi
13720   # note: $X_LIBS includes $x_libraries
13721   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13722
13723   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
13724 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
13725 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
13726   echo $ECHO_N "(cached) $ECHO_C" >&6
13727 else
13728   ac_check_lib_save_LIBS=$LIBS
13729 LIBS="-lz  $LIBS"
13730 cat >conftest.$ac_ext <<_ACEOF
13731 #line $LINENO "configure"
13732 #include "confdefs.h"
13733
13734 /* Override any gcc2 internal prototype to avoid an error.  */
13735 #ifdef __cplusplus
13736 extern "C"
13737 #endif
13738 /* We use char because int might match the return type of a gcc2
13739    builtin and then its argument prototype would still apply.  */
13740 char zlibVersion ();
13741 #ifdef F77_DUMMY_MAIN
13742 #  ifdef __cplusplus
13743      extern "C"
13744 #  endif
13745    int F77_DUMMY_MAIN() { return 1; }
13746 #endif
13747 int
13748 main ()
13749 {
13750 zlibVersion ();
13751   ;
13752   return 0;
13753 }
13754 _ACEOF
13755 rm -f conftest.$ac_objext conftest$ac_exeext
13756 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13757   (eval $ac_link) 2>&5
13758   ac_status=$?
13759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13760   (exit $ac_status); } &&
13761          { ac_try='test -s conftest$ac_exeext'
13762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13763   (eval $ac_try) 2>&5
13764   ac_status=$?
13765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13766   (exit $ac_status); }; }; then
13767   ac_cv_lib_z_zlibVersion=yes
13768 else
13769   echo "$as_me: failed program was:" >&5
13770 cat conftest.$ac_ext >&5
13771 ac_cv_lib_z_zlibVersion=no
13772 fi
13773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13774 LIBS=$ac_check_lib_save_LIBS
13775 fi
13776 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
13777 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
13778 if test $ac_cv_lib_z_zlibVersion = yes; then
13779   have_zlib=yes
13780 fi
13781
13782   CPPFLAGS="$ac_save_CPPFLAGS"
13783   LDFLAGS="$ac_save_LDFLAGS"
13784 #  LIBS="$ac_save_LIBS"
13785
13786     if test "$have_zlib" = no; then
13787       xml_halfassed=yes
13788       have_xml=no
13789     fi
13790   fi
13791
13792   if test "$have_xml" = yes; then
13793     # we have the header, now check for the library
13794     have_xml=no
13795     xml_halfassed=yes
13796
13797   ac_save_CPPFLAGS="$CPPFLAGS"
13798   ac_save_LDFLAGS="$LDFLAGS"
13799 #  ac_save_LIBS="$LIBS"
13800
13801   if test \! -z "$includedir" ; then
13802     CPPFLAGS="$CPPFLAGS -I$includedir"
13803   fi
13804   # note: $X_CFLAGS includes $x_includes
13805   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13806
13807   if test \! -z "$libdir" ; then
13808     LDFLAGS="$LDFLAGS -L$libdir"
13809   fi
13810   # note: $X_LIBS includes $x_libraries
13811   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13812
13813   echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
13814 echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
13815 if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
13816   echo $ECHO_N "(cached) $ECHO_C" >&6
13817 else
13818   ac_check_lib_save_LIBS=$LIBS
13819 LIBS="-lc $ac_xml_config_libs $LIBS"
13820 cat >conftest.$ac_ext <<_ACEOF
13821 #line $LINENO "configure"
13822 #include "confdefs.h"
13823
13824 /* Override any gcc2 internal prototype to avoid an error.  */
13825 #ifdef __cplusplus
13826 extern "C"
13827 #endif
13828 /* We use char because int might match the return type of a gcc2
13829    builtin and then its argument prototype would still apply.  */
13830 char xmlParseChunk ();
13831 #ifdef F77_DUMMY_MAIN
13832 #  ifdef __cplusplus
13833      extern "C"
13834 #  endif
13835    int F77_DUMMY_MAIN() { return 1; }
13836 #endif
13837 int
13838 main ()
13839 {
13840 xmlParseChunk ();
13841   ;
13842   return 0;
13843 }
13844 _ACEOF
13845 rm -f conftest.$ac_objext conftest$ac_exeext
13846 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13847   (eval $ac_link) 2>&5
13848   ac_status=$?
13849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13850   (exit $ac_status); } &&
13851          { ac_try='test -s conftest$ac_exeext'
13852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13853   (eval $ac_try) 2>&5
13854   ac_status=$?
13855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13856   (exit $ac_status); }; }; then
13857   ac_cv_lib_c_xmlParseChunk=yes
13858 else
13859   echo "$as_me: failed program was:" >&5
13860 cat conftest.$ac_ext >&5
13861 ac_cv_lib_c_xmlParseChunk=no
13862 fi
13863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13864 LIBS=$ac_check_lib_save_LIBS
13865 fi
13866 echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
13867 echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
13868 if test $ac_cv_lib_c_xmlParseChunk = yes; then
13869   have_xml=yes
13870                     xml_halfassed=no
13871                     XML_LIBS="$ac_xml_config_libs"
13872                     cat >>confdefs.h <<\_ACEOF
13873 #define HAVE_XML 1
13874 _ACEOF
13875
13876 else
13877   true
13878 fi
13879
13880   CPPFLAGS="$ac_save_CPPFLAGS"
13881   LDFLAGS="$ac_save_LDFLAGS"
13882 #  LIBS="$ac_save_LIBS"
13883
13884   fi
13885
13886   if test "$have_xml" = yes; then
13887     INCLUDES="$INCLUDES $ac_xml_config_cflags"
13888     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
13889     cat >>confdefs.h <<\_ACEOF
13890 #define HAVE_XML 1
13891 _ACEOF
13892
13893     if test "$have_old_xml" = yes; then
13894       cat >>confdefs.h <<\_ACEOF
13895 #define HAVE_OLD_XML_HEADERS 1
13896 _ACEOF
13897
13898     fi
13899   fi
13900
13901 fi
13902
13903
13904 ###############################################################################
13905 #
13906 #       Checking whether Motif is really Lesstif.
13907 #
13908 ###############################################################################
13909
13910 have_lesstif=no
13911 if test "$have_motif" = yes ; then
13912   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
13913 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
13914 if test "${ac_cv_have_lesstif+set}" = set; then
13915   echo $ECHO_N "(cached) $ECHO_C" >&6
13916 else
13917
13918   ac_save_CPPFLAGS="$CPPFLAGS"
13919   if test \! -z "$includedir" ; then
13920     CPPFLAGS="$CPPFLAGS -I$includedir"
13921   fi
13922   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13923   cat >conftest.$ac_ext <<_ACEOF
13924 #line $LINENO "configure"
13925 #include "confdefs.h"
13926 #include <Xm/Xm.h>
13927 #ifdef F77_DUMMY_MAIN
13928 #  ifdef __cplusplus
13929      extern "C"
13930 #  endif
13931    int F77_DUMMY_MAIN() { return 1; }
13932 #endif
13933 int
13934 main ()
13935 {
13936 long vers = LesstifVersion;
13937   ;
13938   return 0;
13939 }
13940 _ACEOF
13941 rm -f conftest.$ac_objext
13942 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13943   (eval $ac_compile) 2>&5
13944   ac_status=$?
13945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13946   (exit $ac_status); } &&
13947          { ac_try='test -s conftest.$ac_objext'
13948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13949   (eval $ac_try) 2>&5
13950   ac_status=$?
13951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13952   (exit $ac_status); }; }; then
13953   ac_cv_have_lesstif=yes
13954 else
13955   echo "$as_me: failed program was:" >&5
13956 cat conftest.$ac_ext >&5
13957 ac_cv_have_lesstif=no
13958 fi
13959 rm -f conftest.$ac_objext conftest.$ac_ext
13960   CPPFLAGS="$ac_save_CPPFLAGS"
13961 fi
13962 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
13963 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
13964   have_lesstif=$ac_cv_have_lesstif
13965 fi
13966
13967
13968 lesstif_version=unknown
13969 lesstif_version_string=unknown
13970
13971 if test "$have_lesstif" = yes ; then
13972   ltv=unknown
13973   echo unknown > conftest-lt
13974   echo "$as_me:$LINENO: checking LessTif version number" >&5
13975 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
13976 if test "${ac_cv_lesstif_version_string+set}" = set; then
13977   echo $ECHO_N "(cached) $ECHO_C" >&6
13978 else
13979
13980   ac_save_CPPFLAGS="$CPPFLAGS"
13981   if test \! -z "$includedir" ; then
13982     CPPFLAGS="$CPPFLAGS -I$includedir"
13983   fi
13984   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13985   if test "$cross_compiling" = yes; then
13986   ac_cv_lesstif_version=unknown
13987                      ac_cv_lesstif_version_string=unknown
13988 else
13989   cat >conftest.$ac_ext <<_ACEOF
13990 #line $LINENO "configure"
13991 #include "confdefs.h"
13992 #include <stdio.h>
13993                      #include <Xm/Xm.h>
13994                      int main() {
13995                        FILE *f = fopen("conftest-lt", "w");
13996                        if (!f) exit(1);
13997                        fprintf(f, "%d %d.%d\n", LesstifVersion,
13998                           LESSTIF_VERSION, LESSTIF_REVISION);
13999                        fclose(f);
14000                        exit(0);
14001                      }
14002 _ACEOF
14003 rm -f conftest$ac_exeext
14004 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14005   (eval $ac_link) 2>&5
14006   ac_status=$?
14007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14008   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14010   (eval $ac_try) 2>&5
14011   ac_status=$?
14012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14013   (exit $ac_status); }; }; then
14014   ltv=`cat conftest-lt`
14015                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
14016                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
14017 else
14018   echo "$as_me: program exited with status $ac_status" >&5
14019 echo "$as_me: failed program was:" >&5
14020 cat conftest.$ac_ext >&5
14021 ( exit $ac_status )
14022 ac_cv_lesstif_version=unknown
14023                      ac_cv_lesstif_version_string=unknown
14024 fi
14025 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14026 fi
14027   CPPFLAGS="$ac_save_CPPFLAGS"
14028 fi
14029 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
14030 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
14031   rm -f conftest-lt
14032   lesstif_version=$ac_cv_lesstif_version
14033   lesstif_version_string=$ac_cv_lesstif_version_string
14034
14035 fi
14036
14037
14038 if test "$have_motif" = yes ; then
14039   mtv=unknown
14040   echo unknown > conftest-mt
14041   echo "$as_me:$LINENO: checking Motif version number" >&5
14042 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
14043 if test "${ac_cv_motif_version_string+set}" = set; then
14044   echo $ECHO_N "(cached) $ECHO_C" >&6
14045 else
14046
14047   ac_save_CPPFLAGS="$CPPFLAGS"
14048   if test \! -z "$includedir" ; then
14049     CPPFLAGS="$CPPFLAGS -I$includedir"
14050   fi
14051   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14052   if test "$cross_compiling" = yes; then
14053   ac_cv_motif_version=unknown
14054                      ac_cv_motif_version_string=unknown
14055 else
14056   cat >conftest.$ac_ext <<_ACEOF
14057 #line $LINENO "configure"
14058 #include "confdefs.h"
14059 #include <stdio.h>
14060                      #include <Xm/Xm.h>
14061                      int main() {
14062                        FILE *f = fopen("conftest-mt", "w");
14063                        if (!f) exit(1);
14064                        fprintf(f, "%d %d.%d\n", XmVersion,
14065                           XmVERSION, XmREVISION);
14066                        fclose(f);
14067                        exit(0);
14068                      }
14069 _ACEOF
14070 rm -f conftest$ac_exeext
14071 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14072   (eval $ac_link) 2>&5
14073   ac_status=$?
14074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14075   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14077   (eval $ac_try) 2>&5
14078   ac_status=$?
14079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14080   (exit $ac_status); }; }; then
14081   mtv=`cat conftest-mt`
14082                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
14083                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
14084 else
14085   echo "$as_me: program exited with status $ac_status" >&5
14086 echo "$as_me: failed program was:" >&5
14087 cat conftest.$ac_ext >&5
14088 ( exit $ac_status )
14089 ac_cv_motif_version=unknown
14090                      ac_cv_motif_version_string=unknown
14091 fi
14092 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14093 fi
14094   CPPFLAGS="$ac_save_CPPFLAGS"
14095 fi
14096 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
14097 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
14098   rm -f conftest-mt
14099   motif_version=$ac_cv_motif_version
14100   motif_version_string=$ac_cv_motif_version_string
14101
14102 fi
14103
14104
14105 ###############################################################################
14106 #
14107 #       Checking whether Motif requires -lXpm.
14108 #
14109 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
14110 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
14111 #       of the library whether to build the XPM code into libXm, or whether
14112 #       to rely on an external libXm.  So the only way to tell whether XPM is
14113 #       a link-time requirement is to examine libXm.a, which is very
14114 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
14115 #       always link against XPM if the XPM lib exists (and this will be a
14116 #       no-op if libXm happens to already have the XPM code in it.)
14117 #
14118 ###############################################################################
14119
14120 motif_requires_xpm=no
14121 if test "$have_motif" = yes ; then
14122    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
14123 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
14124    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
14125    then
14126      motif_requires_xpm=yes
14127      echo "$as_me:$LINENO: result: maybe" >&5
14128 echo "${ECHO_T}maybe" >&6
14129    else
14130      echo "$as_me:$LINENO: result: no" >&5
14131 echo "${ECHO_T}no" >&6
14132    fi
14133 fi
14134
14135
14136 ###############################################################################
14137 #
14138 #       Checking whether Motif requires -lXp.
14139 #
14140 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
14141 #       Extension".   Why this extension isn't in -lXext with all the others,
14142 #       I have no idea.
14143 #
14144 ###############################################################################
14145
14146 have_xp_ext=no
14147 if test "$have_motif" = yes ; then
14148    have_xp_ext=no
14149
14150   ac_save_CPPFLAGS="$CPPFLAGS"
14151   ac_save_LDFLAGS="$LDFLAGS"
14152 #  ac_save_LIBS="$LIBS"
14153
14154   if test \! -z "$includedir" ; then
14155     CPPFLAGS="$CPPFLAGS -I$includedir"
14156   fi
14157   # note: $X_CFLAGS includes $x_includes
14158   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14159
14160   if test \! -z "$libdir" ; then
14161     LDFLAGS="$LDFLAGS -L$libdir"
14162   fi
14163   # note: $X_LIBS includes $x_libraries
14164   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14165
14166   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
14167 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
14168 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
14169   echo $ECHO_N "(cached) $ECHO_C" >&6
14170 else
14171   ac_check_lib_save_LIBS=$LIBS
14172 LIBS="-lXp -lX11 -lXext -lm $LIBS"
14173 cat >conftest.$ac_ext <<_ACEOF
14174 #line $LINENO "configure"
14175 #include "confdefs.h"
14176
14177 /* Override any gcc2 internal prototype to avoid an error.  */
14178 #ifdef __cplusplus
14179 extern "C"
14180 #endif
14181 /* We use char because int might match the return type of a gcc2
14182    builtin and then its argument prototype would still apply.  */
14183 char XpQueryExtension ();
14184 #ifdef F77_DUMMY_MAIN
14185 #  ifdef __cplusplus
14186      extern "C"
14187 #  endif
14188    int F77_DUMMY_MAIN() { return 1; }
14189 #endif
14190 int
14191 main ()
14192 {
14193 XpQueryExtension ();
14194   ;
14195   return 0;
14196 }
14197 _ACEOF
14198 rm -f conftest.$ac_objext conftest$ac_exeext
14199 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14200   (eval $ac_link) 2>&5
14201   ac_status=$?
14202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203   (exit $ac_status); } &&
14204          { ac_try='test -s conftest$ac_exeext'
14205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14206   (eval $ac_try) 2>&5
14207   ac_status=$?
14208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209   (exit $ac_status); }; }; then
14210   ac_cv_lib_Xp_XpQueryExtension=yes
14211 else
14212   echo "$as_me: failed program was:" >&5
14213 cat conftest.$ac_ext >&5
14214 ac_cv_lib_Xp_XpQueryExtension=no
14215 fi
14216 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14217 LIBS=$ac_check_lib_save_LIBS
14218 fi
14219 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
14220 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
14221 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
14222   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
14223 else
14224   true
14225 fi
14226
14227   CPPFLAGS="$ac_save_CPPFLAGS"
14228   LDFLAGS="$ac_save_LDFLAGS"
14229 #  LIBS="$ac_save_LIBS"
14230
14231 fi
14232
14233
14234 ###############################################################################
14235 #
14236 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
14237 #
14238 ###############################################################################
14239
14240 have_xintl=no
14241 if test "$have_motif" = yes ; then
14242
14243   ac_save_CPPFLAGS="$CPPFLAGS"
14244   ac_save_LDFLAGS="$LDFLAGS"
14245 #  ac_save_LIBS="$LIBS"
14246
14247   if test \! -z "$includedir" ; then
14248     CPPFLAGS="$CPPFLAGS -I$includedir"
14249   fi
14250   # note: $X_CFLAGS includes $x_includes
14251   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14252
14253   if test \! -z "$libdir" ; then
14254     LDFLAGS="$LDFLAGS -L$libdir"
14255   fi
14256   # note: $X_LIBS includes $x_libraries
14257   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14258
14259   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
14260 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
14261 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
14262   echo $ECHO_N "(cached) $ECHO_C" >&6
14263 else
14264   ac_check_lib_save_LIBS=$LIBS
14265 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
14266 cat >conftest.$ac_ext <<_ACEOF
14267 #line $LINENO "configure"
14268 #include "confdefs.h"
14269
14270 /* Override any gcc2 internal prototype to avoid an error.  */
14271 #ifdef __cplusplus
14272 extern "C"
14273 #endif
14274 /* We use char because int might match the return type of a gcc2
14275    builtin and then its argument prototype would still apply.  */
14276 char _Xsetlocale ();
14277 #ifdef F77_DUMMY_MAIN
14278 #  ifdef __cplusplus
14279      extern "C"
14280 #  endif
14281    int F77_DUMMY_MAIN() { return 1; }
14282 #endif
14283 int
14284 main ()
14285 {
14286 _Xsetlocale ();
14287   ;
14288   return 0;
14289 }
14290 _ACEOF
14291 rm -f conftest.$ac_objext conftest$ac_exeext
14292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14293   (eval $ac_link) 2>&5
14294   ac_status=$?
14295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14296   (exit $ac_status); } &&
14297          { ac_try='test -s conftest$ac_exeext'
14298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14299   (eval $ac_try) 2>&5
14300   ac_status=$?
14301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14302   (exit $ac_status); }; }; then
14303   ac_cv_lib_Xintl__Xsetlocale=yes
14304 else
14305   echo "$as_me: failed program was:" >&5
14306 cat conftest.$ac_ext >&5
14307 ac_cv_lib_Xintl__Xsetlocale=no
14308 fi
14309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14310 LIBS=$ac_check_lib_save_LIBS
14311 fi
14312 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
14313 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
14314 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
14315   have_xintl=yes
14316 else
14317   have_xintl=no
14318 fi
14319
14320   CPPFLAGS="$ac_save_CPPFLAGS"
14321   LDFLAGS="$ac_save_LDFLAGS"
14322 #  LIBS="$ac_save_LIBS"
14323
14324   if test "$have_xintl" = yes; then
14325     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
14326   fi
14327 fi
14328
14329
14330 ###############################################################################
14331 #
14332 #       Check for -lGL or -lMesaGL.
14333 #
14334 ###############################################################################
14335
14336 have_gl=no
14337 ac_have_mesa_gl=no
14338 with_gl_req=unspecified
14339 gl_halfassed=no
14340
14341 # Check whether --with-gl or --without-gl was given.
14342 if test "${with_gl+set}" = set; then
14343   withval="$with_gl"
14344   with_gl="$withval"; with_gl_req="$withval"
14345 else
14346   with_gl=yes
14347 fi;
14348
14349
14350    case "$with_gl" in
14351     yes) ;;
14352     no)  ;;
14353
14354     /*)
14355      echo "$as_me:$LINENO: checking for GL headers" >&5
14356 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
14357      d=$with_gl/include
14358      if test -d $d; then
14359        X_CFLAGS="-I$d $X_CFLAGS"
14360        echo "$as_me:$LINENO: result: $d" >&5
14361 echo "${ECHO_T}$d" >&6
14362      else
14363        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14364 echo "${ECHO_T}not found ($d: no such directory)" >&6
14365      fi
14366
14367      echo "$as_me:$LINENO: checking for GL libs" >&5
14368 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
14369      d=$with_gl/lib
14370      if test -d $d; then
14371        X_LIBS="-L$d $X_LIBS"
14372        echo "$as_me:$LINENO: result: $d" >&5
14373 echo "${ECHO_T}$d" >&6
14374      else
14375        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14376 echo "${ECHO_T}not found ($d: no such directory)" >&6
14377      fi
14378
14379      # replace the directory string with "yes".
14380      with_gl_req="yes"
14381      with_gl=$with_gl_req
14382      ;;
14383
14384     *)
14385      echo ""
14386      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
14387      echo "       If it is a directory, then \`DIR/include' will be added to"
14388      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14389      exit 1
14390      ;;
14391    esac
14392
14393
14394 ac_mesagl_version=unknown
14395 ac_mesagl_version_string=unknown
14396
14397 if test "$with_gl" = yes; then
14398
14399   ac_save_CPPFLAGS="$CPPFLAGS"
14400   if test \! -z "$includedir" ; then
14401     CPPFLAGS="$CPPFLAGS -I$includedir"
14402   fi
14403   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14404   if test "${ac_cv_header_GL_gl_h+set}" = set; then
14405   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14406 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14407 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14408   echo $ECHO_N "(cached) $ECHO_C" >&6
14409 fi
14410 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14411 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14412 else
14413   # Is the header compilable?
14414 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
14415 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
14416 cat >conftest.$ac_ext <<_ACEOF
14417 #line $LINENO "configure"
14418 #include "confdefs.h"
14419 $ac_includes_default
14420 #include <GL/gl.h>
14421 _ACEOF
14422 rm -f conftest.$ac_objext
14423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14424   (eval $ac_compile) 2>&5
14425   ac_status=$?
14426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14427   (exit $ac_status); } &&
14428          { ac_try='test -s conftest.$ac_objext'
14429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14430   (eval $ac_try) 2>&5
14431   ac_status=$?
14432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433   (exit $ac_status); }; }; then
14434   ac_header_compiler=yes
14435 else
14436   echo "$as_me: failed program was:" >&5
14437 cat conftest.$ac_ext >&5
14438 ac_header_compiler=no
14439 fi
14440 rm -f conftest.$ac_objext conftest.$ac_ext
14441 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14442 echo "${ECHO_T}$ac_header_compiler" >&6
14443
14444 # Is the header present?
14445 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
14446 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
14447 cat >conftest.$ac_ext <<_ACEOF
14448 #line $LINENO "configure"
14449 #include "confdefs.h"
14450 #include <GL/gl.h>
14451 _ACEOF
14452 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14454   ac_status=$?
14455   egrep -v '^ *\+' conftest.er1 >conftest.err
14456   rm -f conftest.er1
14457   cat conftest.err >&5
14458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14459   (exit $ac_status); } >/dev/null; then
14460   if test -s conftest.err; then
14461     ac_cpp_err=$ac_c_preproc_warn_flag
14462   else
14463     ac_cpp_err=
14464   fi
14465 else
14466   ac_cpp_err=yes
14467 fi
14468 if test -z "$ac_cpp_err"; then
14469   ac_header_preproc=yes
14470 else
14471   echo "$as_me: failed program was:" >&5
14472   cat conftest.$ac_ext >&5
14473   ac_header_preproc=no
14474 fi
14475 rm -f conftest.err conftest.$ac_ext
14476 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14477 echo "${ECHO_T}$ac_header_preproc" >&6
14478
14479 # So?  What about this header?
14480 case $ac_header_compiler:$ac_header_preproc in
14481   yes:no )
14482     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
14483 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14484     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14485 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
14486   no:yes )
14487     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
14488 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
14489     { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
14490 echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
14491     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14492 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
14493 esac
14494 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14495 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14496 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14497   echo $ECHO_N "(cached) $ECHO_C" >&6
14498 else
14499   ac_cv_header_GL_gl_h=$ac_header_preproc
14500 fi
14501 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14502 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14503
14504 fi
14505 if test $ac_cv_header_GL_gl_h = yes; then
14506   have_gl=yes
14507 else
14508   have_gl=no
14509 fi
14510
14511
14512   CPPFLAGS="$ac_save_CPPFLAGS"
14513   if test "$have_gl" = yes ; then
14514
14515   ac_save_CPPFLAGS="$CPPFLAGS"
14516   if test \! -z "$includedir" ; then
14517     CPPFLAGS="$CPPFLAGS -I$includedir"
14518   fi
14519   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14520   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
14521 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
14522 if test "${ac_cv_header_GL_glx_h+set}" = set; then
14523   echo $ECHO_N "(cached) $ECHO_C" >&6
14524 else
14525   cat >conftest.$ac_ext <<_ACEOF
14526 #line $LINENO "configure"
14527 #include "confdefs.h"
14528 #include <GL/gl.h>
14529
14530 #include <GL/glx.h>
14531 _ACEOF
14532 rm -f conftest.$ac_objext
14533 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14534   (eval $ac_compile) 2>&5
14535   ac_status=$?
14536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14537   (exit $ac_status); } &&
14538          { ac_try='test -s conftest.$ac_objext'
14539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14540   (eval $ac_try) 2>&5
14541   ac_status=$?
14542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14543   (exit $ac_status); }; }; then
14544   ac_cv_header_GL_glx_h=yes
14545 else
14546   echo "$as_me: failed program was:" >&5
14547 cat conftest.$ac_ext >&5
14548 ac_cv_header_GL_glx_h=no
14549 fi
14550 rm -f conftest.$ac_objext conftest.$ac_ext
14551 fi
14552 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
14553 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
14554 if test $ac_cv_header_GL_glx_h = yes; then
14555   have_gl=yes
14556 else
14557   have_gl=no
14558 fi
14559
14560
14561   CPPFLAGS="$ac_save_CPPFLAGS"
14562   fi
14563
14564   # If we have the headers, try and figure out which vendor it's from.
14565   #
14566   if test "$have_gl" = yes ; then
14567
14568     # We need to know whether it's MesaGL so that we know which libraries
14569     # to link against.
14570     #
14571     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
14572 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
14573 if test "${ac_cv_have_mesa_gl+set}" = set; then
14574   echo $ECHO_N "(cached) $ECHO_C" >&6
14575 else
14576   ac_cv_have_mesa_gl=no
14577
14578   ac_save_CPPFLAGS="$CPPFLAGS"
14579   if test \! -z "$includedir" ; then
14580     CPPFLAGS="$CPPFLAGS -I$includedir"
14581   fi
14582   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14583   cat >conftest.$ac_ext <<_ACEOF
14584 #line $LINENO "configure"
14585 #include "confdefs.h"
14586 #include <GL/glx.h>
14587
14588 _ACEOF
14589 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14590   egrep "Mesa|MESA" >/dev/null 2>&1; then
14591   ac_cv_have_mesa_gl=yes
14592 fi
14593 rm -f conftest*
14594
14595   CPPFLAGS="$ac_save_CPPFLAGS"
14596
14597 fi
14598 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
14599 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
14600     ac_have_mesa_gl=$ac_cv_have_mesa_gl
14601
14602
14603     gl_lib_1=""
14604     GL_LIBS=""
14605
14606
14607     # Some versions of MesaGL are compiled to require -lpthread.
14608     # So if the Mesa headers exist, and -lpthread exists, then always
14609     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
14610     #
14611     if test "$ac_have_mesa_gl" = yes; then
14612       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14613 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
14614 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
14615   echo $ECHO_N "(cached) $ECHO_C" >&6
14616 else
14617   ac_check_lib_save_LIBS=$LIBS
14618 LIBS="-lpthread  $LIBS"
14619 cat >conftest.$ac_ext <<_ACEOF
14620 #line $LINENO "configure"
14621 #include "confdefs.h"
14622
14623 /* Override any gcc2 internal prototype to avoid an error.  */
14624 #ifdef __cplusplus
14625 extern "C"
14626 #endif
14627 /* We use char because int might match the return type of a gcc2
14628    builtin and then its argument prototype would still apply.  */
14629 char pthread_create ();
14630 #ifdef F77_DUMMY_MAIN
14631 #  ifdef __cplusplus
14632      extern "C"
14633 #  endif
14634    int F77_DUMMY_MAIN() { return 1; }
14635 #endif
14636 int
14637 main ()
14638 {
14639 pthread_create ();
14640   ;
14641   return 0;
14642 }
14643 _ACEOF
14644 rm -f conftest.$ac_objext conftest$ac_exeext
14645 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14646   (eval $ac_link) 2>&5
14647   ac_status=$?
14648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14649   (exit $ac_status); } &&
14650          { ac_try='test -s conftest$ac_exeext'
14651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14652   (eval $ac_try) 2>&5
14653   ac_status=$?
14654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14655   (exit $ac_status); }; }; then
14656   ac_cv_lib_pthread_pthread_create=yes
14657 else
14658   echo "$as_me: failed program was:" >&5
14659 cat conftest.$ac_ext >&5
14660 ac_cv_lib_pthread_pthread_create=no
14661 fi
14662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14663 LIBS=$ac_check_lib_save_LIBS
14664 fi
14665 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
14666 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
14667 if test $ac_cv_lib_pthread_pthread_create = yes; then
14668   GL_LIBS="-lpthread"
14669 fi
14670
14671     fi
14672
14673
14674     # If we have Mesa headers, check to see if we can link against -lMesaGL.
14675     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
14676     # Else, warn that GL is busted.  (We have the headers, but no libs.)
14677     #
14678
14679     if test "$ac_have_mesa_gl" = yes ; then
14680
14681   ac_save_CPPFLAGS="$CPPFLAGS"
14682   ac_save_LDFLAGS="$LDFLAGS"
14683 #  ac_save_LIBS="$LIBS"
14684
14685   if test \! -z "$includedir" ; then
14686     CPPFLAGS="$CPPFLAGS -I$includedir"
14687   fi
14688   # note: $X_CFLAGS includes $x_includes
14689   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14690
14691   if test \! -z "$libdir" ; then
14692     LDFLAGS="$LDFLAGS -L$libdir"
14693   fi
14694   # note: $X_LIBS includes $x_libraries
14695   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14696
14697   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
14698 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
14699 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
14700   echo $ECHO_N "(cached) $ECHO_C" >&6
14701 else
14702   ac_check_lib_save_LIBS=$LIBS
14703 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14704 cat >conftest.$ac_ext <<_ACEOF
14705 #line $LINENO "configure"
14706 #include "confdefs.h"
14707
14708 /* Override any gcc2 internal prototype to avoid an error.  */
14709 #ifdef __cplusplus
14710 extern "C"
14711 #endif
14712 /* We use char because int might match the return type of a gcc2
14713    builtin and then its argument prototype would still apply.  */
14714 char glXCreateContext ();
14715 #ifdef F77_DUMMY_MAIN
14716 #  ifdef __cplusplus
14717      extern "C"
14718 #  endif
14719    int F77_DUMMY_MAIN() { return 1; }
14720 #endif
14721 int
14722 main ()
14723 {
14724 glXCreateContext ();
14725   ;
14726   return 0;
14727 }
14728 _ACEOF
14729 rm -f conftest.$ac_objext conftest$ac_exeext
14730 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14731   (eval $ac_link) 2>&5
14732   ac_status=$?
14733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14734   (exit $ac_status); } &&
14735          { ac_try='test -s conftest$ac_exeext'
14736   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14737   (eval $ac_try) 2>&5
14738   ac_status=$?
14739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14740   (exit $ac_status); }; }; then
14741   ac_cv_lib_MesaGL_glXCreateContext=yes
14742 else
14743   echo "$as_me: failed program was:" >&5
14744 cat conftest.$ac_ext >&5
14745 ac_cv_lib_MesaGL_glXCreateContext=no
14746 fi
14747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14748 LIBS=$ac_check_lib_save_LIBS
14749 fi
14750 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
14751 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
14752 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
14753   gl_lib_1="MesaGL"
14754                       GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
14755 fi
14756
14757   CPPFLAGS="$ac_save_CPPFLAGS"
14758   LDFLAGS="$ac_save_LDFLAGS"
14759 #  LIBS="$ac_save_LIBS"
14760
14761     fi
14762
14763     if test "$gl_lib_1" = "" ; then
14764
14765   ac_save_CPPFLAGS="$CPPFLAGS"
14766   ac_save_LDFLAGS="$LDFLAGS"
14767 #  ac_save_LIBS="$LIBS"
14768
14769   if test \! -z "$includedir" ; then
14770     CPPFLAGS="$CPPFLAGS -I$includedir"
14771   fi
14772   # note: $X_CFLAGS includes $x_includes
14773   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14774
14775   if test \! -z "$libdir" ; then
14776     LDFLAGS="$LDFLAGS -L$libdir"
14777   fi
14778   # note: $X_LIBS includes $x_libraries
14779   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14780
14781   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
14782 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
14783 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
14784   echo $ECHO_N "(cached) $ECHO_C" >&6
14785 else
14786   ac_check_lib_save_LIBS=$LIBS
14787 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14788 cat >conftest.$ac_ext <<_ACEOF
14789 #line $LINENO "configure"
14790 #include "confdefs.h"
14791
14792 /* Override any gcc2 internal prototype to avoid an error.  */
14793 #ifdef __cplusplus
14794 extern "C"
14795 #endif
14796 /* We use char because int might match the return type of a gcc2
14797    builtin and then its argument prototype would still apply.  */
14798 char glXCreateContext ();
14799 #ifdef F77_DUMMY_MAIN
14800 #  ifdef __cplusplus
14801      extern "C"
14802 #  endif
14803    int F77_DUMMY_MAIN() { return 1; }
14804 #endif
14805 int
14806 main ()
14807 {
14808 glXCreateContext ();
14809   ;
14810   return 0;
14811 }
14812 _ACEOF
14813 rm -f conftest.$ac_objext conftest$ac_exeext
14814 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14815   (eval $ac_link) 2>&5
14816   ac_status=$?
14817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14818   (exit $ac_status); } &&
14819          { ac_try='test -s conftest$ac_exeext'
14820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14821   (eval $ac_try) 2>&5
14822   ac_status=$?
14823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14824   (exit $ac_status); }; }; then
14825   ac_cv_lib_GL_glXCreateContext=yes
14826 else
14827   echo "$as_me: failed program was:" >&5
14828 cat conftest.$ac_ext >&5
14829 ac_cv_lib_GL_glXCreateContext=no
14830 fi
14831 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14832 LIBS=$ac_check_lib_save_LIBS
14833 fi
14834 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
14835 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
14836 if test $ac_cv_lib_GL_glXCreateContext = yes; then
14837   gl_lib_1="GL"
14838                       GL_LIBS="-lGL -lGLU $GL_LIBS"
14839 fi
14840
14841   CPPFLAGS="$ac_save_CPPFLAGS"
14842   LDFLAGS="$ac_save_LDFLAGS"
14843 #  LIBS="$ac_save_LIBS"
14844
14845     fi
14846
14847     if test "$gl_lib_1" = "" ; then
14848       # we have headers, but no libs -- bail.
14849       have_gl=no
14850       ac_have_mesa_gl=no
14851       gl_halfassed=yes
14852     else
14853       # linking works -- we can build the GL hacks.
14854       cat >>confdefs.h <<\_ACEOF
14855 #define HAVE_GL 1
14856 _ACEOF
14857
14858       if test "$ac_have_mesa_gl" = yes ; then
14859         cat >>confdefs.h <<\_ACEOF
14860 #define HAVE_MESA_GL 1
14861 _ACEOF
14862
14863       fi
14864     fi
14865   fi
14866
14867
14868   # Now that we know we have GL headers and libs, do some more GL testing.
14869   #
14870
14871   if test "$have_gl" = yes ; then
14872     # If it's MesaGL, we'd like to issue a warning if the version number
14873     # is less than or equal to 2.6, because that version had a security bug.
14874     #
14875     if test "$ac_have_mesa_gl" = yes; then
14876
14877       echo "$as_me:$LINENO: checking MesaGL version number" >&5
14878 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
14879 if test "${ac_cv_mesagl_version_string+set}" = set; then
14880   echo $ECHO_N "(cached) $ECHO_C" >&6
14881 else
14882   cat > conftest.$ac_ext <<EOF
14883 #line 14889 "configure"
14884 #include "confdefs.h"
14885 #include <GL/gl.h>
14886 #ifndef MESA_MAJOR_VERSION
14887 # include <GL/xmesa.h>
14888 # ifdef XMESA_MAJOR_VERSION
14889    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
14890       we have to check the XMesa version number (the number of the X protocol
14891       support, which seems to be the same as the Mesa version number.)
14892     */
14893 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
14894 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
14895 # else
14896    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
14897       so we have no way of telling what version of Mesa this is at all.
14898       So, we'll guess that the osmesa version (the "offscreen protocol")
14899       is less than or equal to the real mesa version number.  Except that
14900       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
14901       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
14902     */
14903 # include <GL/osmesa.h>
14904 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
14905 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
14906 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
14907 #   undef MESA_MINOR_VERSION
14908 #   define MESA_MINOR_VERSION 4 or newer, probably?
14909 #  endif
14910 # endif
14911 #endif
14912 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
14913 EOF
14914
14915          ac_save_CPPFLAGS="$CPPFLAGS"
14916          if test \! -z "$includedir" ; then
14917            CPPFLAGS="$CPPFLAGS -I$includedir"
14918          fi
14919          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14920
14921          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
14922
14923          # M4 sucks!!
14924
14925           mglv=`echo "$mglv" | sed -n \
14926              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
14927
14928
14929          rm -f conftest.$ac_ext
14930
14931          CPPFLAGS="$ac_save_CPPFLAGS"
14932
14933          if test "$mglv" = ""; then
14934            ac_mesagl_version=unknown
14935            ac_mesagl_version_string=unknown
14936          else
14937            ac_mesagl_version_string="$mglv"
14938            # M4 sucks!!
14939
14940            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
14941            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
14942
14943            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
14944            if test -z "$ac_mesagl_version"; then
14945              ac_mesagl_version=unknown
14946              ac_mesagl_version_string=unknown
14947            fi
14948          fi
14949          ac_cv_mesagl_version=$ac_mesagl_version
14950          ac_cv_mesagl_version_string=$ac_mesagl_version_string
14951
14952 fi
14953 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
14954 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
14955       ac_mesagl_version=$ac_cv_mesagl_version
14956       ac_mesagl_version_string=$ac_cv_mesagl_version_string
14957     fi
14958
14959
14960     # Check for OpenGL 1.1 features.
14961     #
14962
14963   ac_save_CPPFLAGS="$CPPFLAGS"
14964   ac_save_LDFLAGS="$LDFLAGS"
14965 #  ac_save_LIBS="$LIBS"
14966
14967   if test \! -z "$includedir" ; then
14968     CPPFLAGS="$CPPFLAGS -I$includedir"
14969   fi
14970   # note: $X_CFLAGS includes $x_includes
14971   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14972
14973   if test \! -z "$libdir" ; then
14974     LDFLAGS="$LDFLAGS -L$libdir"
14975   fi
14976   # note: $X_LIBS includes $x_libraries
14977   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14978
14979   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
14980 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
14981 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
14982 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14983   echo $ECHO_N "(cached) $ECHO_C" >&6
14984 else
14985   ac_check_lib_save_LIBS=$LIBS
14986 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
14987 cat >conftest.$ac_ext <<_ACEOF
14988 #line $LINENO "configure"
14989 #include "confdefs.h"
14990
14991 /* Override any gcc2 internal prototype to avoid an error.  */
14992 #ifdef __cplusplus
14993 extern "C"
14994 #endif
14995 /* We use char because int might match the return type of a gcc2
14996    builtin and then its argument prototype would still apply.  */
14997 char glBindTexture ();
14998 #ifdef F77_DUMMY_MAIN
14999 #  ifdef __cplusplus
15000      extern "C"
15001 #  endif
15002    int F77_DUMMY_MAIN() { return 1; }
15003 #endif
15004 int
15005 main ()
15006 {
15007 glBindTexture ();
15008   ;
15009   return 0;
15010 }
15011 _ACEOF
15012 rm -f conftest.$ac_objext conftest$ac_exeext
15013 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15014   (eval $ac_link) 2>&5
15015   ac_status=$?
15016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15017   (exit $ac_status); } &&
15018          { ac_try='test -s conftest$ac_exeext'
15019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15020   (eval $ac_try) 2>&5
15021   ac_status=$?
15022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15023   (exit $ac_status); }; }; then
15024   eval "$as_ac_Lib=yes"
15025 else
15026   echo "$as_me: failed program was:" >&5
15027 cat conftest.$ac_ext >&5
15028 eval "$as_ac_Lib=no"
15029 fi
15030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15031 LIBS=$ac_check_lib_save_LIBS
15032 fi
15033 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15034 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15035 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15036   cat >>confdefs.h <<\_ACEOF
15037 #define HAVE_GLBINDTEXTURE 1
15038 _ACEOF
15039
15040 else
15041   true
15042 fi
15043
15044   CPPFLAGS="$ac_save_CPPFLAGS"
15045   LDFLAGS="$ac_save_LDFLAGS"
15046 #  LIBS="$ac_save_LIBS"
15047
15048   fi
15049
15050 elif test "$with_gl" != no; then
15051   echo "error: must be yes or no: --with-gl=$with_gl"
15052   exit 1
15053 fi
15054
15055
15056 ###############################################################################
15057 #
15058 #       Check for -lgle.
15059 #
15060 ###############################################################################
15061
15062 have_gle=no
15063 with_gle_req=unspecified
15064 gle_halfassed=no
15065
15066 # Check whether --with-gle or --without-gle was given.
15067 if test "${with_gle+set}" = set; then
15068   withval="$with_gle"
15069   with_gle="$withval"; with_gle_req="$withval"
15070 else
15071   with_gle=yes
15072 fi;
15073
15074
15075    case "$with_gle" in
15076     yes) ;;
15077     no)  ;;
15078
15079     /*)
15080      echo "$as_me:$LINENO: checking for GLE headers" >&5
15081 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
15082      d=$with_gle/include
15083      if test -d $d; then
15084        X_CFLAGS="-I$d $X_CFLAGS"
15085        echo "$as_me:$LINENO: result: $d" >&5
15086 echo "${ECHO_T}$d" >&6
15087      else
15088        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15089 echo "${ECHO_T}not found ($d: no such directory)" >&6
15090      fi
15091
15092      echo "$as_me:$LINENO: checking for GLE libs" >&5
15093 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
15094      d=$with_gle/lib
15095      if test -d $d; then
15096        X_LIBS="-L$d $X_LIBS"
15097        echo "$as_me:$LINENO: result: $d" >&5
15098 echo "${ECHO_T}$d" >&6
15099      else
15100        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15101 echo "${ECHO_T}not found ($d: no such directory)" >&6
15102      fi
15103
15104      # replace the directory string with "yes".
15105      with_gle_req="yes"
15106      with_gle=$with_gle_req
15107      ;;
15108
15109     *)
15110      echo ""
15111      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
15112      echo "       If it is a directory, then \`DIR/include' will be added to"
15113      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15114      exit 1
15115      ;;
15116    esac
15117
15118
15119 GLE_LIBS=""
15120
15121 if test "$have_gl" = no ; then
15122  true
15123 elif test "$with_gle" = yes; then
15124
15125
15126   ac_save_CPPFLAGS="$CPPFLAGS"
15127   if test \! -z "$includedir" ; then
15128     CPPFLAGS="$CPPFLAGS -I$includedir"
15129   fi
15130   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15131   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
15132 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
15133 if test "${ac_cv_header_GL_gle_h+set}" = set; then
15134   echo $ECHO_N "(cached) $ECHO_C" >&6
15135 else
15136   cat >conftest.$ac_ext <<_ACEOF
15137 #line $LINENO "configure"
15138 #include "confdefs.h"
15139 #include <GL/gl.h>
15140
15141 #include <GL/gle.h>
15142 _ACEOF
15143 rm -f conftest.$ac_objext
15144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15145   (eval $ac_compile) 2>&5
15146   ac_status=$?
15147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15148   (exit $ac_status); } &&
15149          { ac_try='test -s conftest.$ac_objext'
15150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15151   (eval $ac_try) 2>&5
15152   ac_status=$?
15153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15154   (exit $ac_status); }; }; then
15155   ac_cv_header_GL_gle_h=yes
15156 else
15157   echo "$as_me: failed program was:" >&5
15158 cat conftest.$ac_ext >&5
15159 ac_cv_header_GL_gle_h=no
15160 fi
15161 rm -f conftest.$ac_objext conftest.$ac_ext
15162 fi
15163 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
15164 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
15165 if test $ac_cv_header_GL_gle_h = yes; then
15166   have_gle3=yes
15167 else
15168   have_gle3=no
15169 fi
15170
15171
15172   CPPFLAGS="$ac_save_CPPFLAGS"
15173   if test "$have_gle3" = yes ; then
15174     have_gle=yes;
15175   else
15176
15177   ac_save_CPPFLAGS="$CPPFLAGS"
15178   if test \! -z "$includedir" ; then
15179     CPPFLAGS="$CPPFLAGS -I$includedir"
15180   fi
15181   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15182   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
15183 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
15184 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
15185   echo $ECHO_N "(cached) $ECHO_C" >&6
15186 else
15187   cat >conftest.$ac_ext <<_ACEOF
15188 #line $LINENO "configure"
15189 #include "confdefs.h"
15190 #include <GL/gl.h>
15191
15192 #include <GL/gutil.h>
15193 _ACEOF
15194 rm -f conftest.$ac_objext
15195 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15196   (eval $ac_compile) 2>&5
15197   ac_status=$?
15198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15199   (exit $ac_status); } &&
15200          { ac_try='test -s conftest.$ac_objext'
15201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15202   (eval $ac_try) 2>&5
15203   ac_status=$?
15204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15205   (exit $ac_status); }; }; then
15206   ac_cv_header_GL_gutil_h=yes
15207 else
15208   echo "$as_me: failed program was:" >&5
15209 cat conftest.$ac_ext >&5
15210 ac_cv_header_GL_gutil_h=no
15211 fi
15212 rm -f conftest.$ac_objext conftest.$ac_ext
15213 fi
15214 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
15215 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
15216 if test $ac_cv_header_GL_gutil_h = yes; then
15217   have_gle=yes
15218 else
15219   have_gle=no
15220 fi
15221
15222
15223   CPPFLAGS="$ac_save_CPPFLAGS"
15224     if test "$have_gle" = yes ; then
15225
15226   ac_save_CPPFLAGS="$CPPFLAGS"
15227   if test \! -z "$includedir" ; then
15228     CPPFLAGS="$CPPFLAGS -I$includedir"
15229   fi
15230   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15231   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
15232 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
15233 if test "${ac_cv_header_GL_tube_h+set}" = set; then
15234   echo $ECHO_N "(cached) $ECHO_C" >&6
15235 else
15236   cat >conftest.$ac_ext <<_ACEOF
15237 #line $LINENO "configure"
15238 #include "confdefs.h"
15239 #include <GL/gl.h>
15240
15241 #include <GL/tube.h>
15242 _ACEOF
15243 rm -f conftest.$ac_objext
15244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15245   (eval $ac_compile) 2>&5
15246   ac_status=$?
15247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15248   (exit $ac_status); } &&
15249          { ac_try='test -s conftest.$ac_objext'
15250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15251   (eval $ac_try) 2>&5
15252   ac_status=$?
15253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15254   (exit $ac_status); }; }; then
15255   ac_cv_header_GL_tube_h=yes
15256 else
15257   echo "$as_me: failed program was:" >&5
15258 cat conftest.$ac_ext >&5
15259 ac_cv_header_GL_tube_h=no
15260 fi
15261 rm -f conftest.$ac_objext conftest.$ac_ext
15262 fi
15263 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
15264 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
15265 if test $ac_cv_header_GL_tube_h = yes; then
15266   have_gle=yes
15267 else
15268   have_gle=no
15269 fi
15270
15271
15272   CPPFLAGS="$ac_save_CPPFLAGS"
15273     fi
15274   fi
15275
15276   if test "$have_gle" = yes ; then
15277     have_gle=no
15278     gle_halfassed=yes
15279
15280   ac_save_CPPFLAGS="$CPPFLAGS"
15281   ac_save_LDFLAGS="$LDFLAGS"
15282 #  ac_save_LIBS="$LIBS"
15283
15284   if test \! -z "$includedir" ; then
15285     CPPFLAGS="$CPPFLAGS -I$includedir"
15286   fi
15287   # note: $X_CFLAGS includes $x_includes
15288   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15289
15290   if test \! -z "$libdir" ; then
15291     LDFLAGS="$LDFLAGS -L$libdir"
15292   fi
15293   # note: $X_LIBS includes $x_libraries
15294   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15295
15296   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
15297 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
15298 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
15299   echo $ECHO_N "(cached) $ECHO_C" >&6
15300 else
15301   ac_check_lib_save_LIBS=$LIBS
15302 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15303 cat >conftest.$ac_ext <<_ACEOF
15304 #line $LINENO "configure"
15305 #include "confdefs.h"
15306
15307 /* Override any gcc2 internal prototype to avoid an error.  */
15308 #ifdef __cplusplus
15309 extern "C"
15310 #endif
15311 /* We use char because int might match the return type of a gcc2
15312    builtin and then its argument prototype would still apply.  */
15313 char gleCreateGC ();
15314 #ifdef F77_DUMMY_MAIN
15315 #  ifdef __cplusplus
15316      extern "C"
15317 #  endif
15318    int F77_DUMMY_MAIN() { return 1; }
15319 #endif
15320 int
15321 main ()
15322 {
15323 gleCreateGC ();
15324   ;
15325   return 0;
15326 }
15327 _ACEOF
15328 rm -f conftest.$ac_objext conftest$ac_exeext
15329 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15330   (eval $ac_link) 2>&5
15331   ac_status=$?
15332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15333   (exit $ac_status); } &&
15334          { ac_try='test -s conftest$ac_exeext'
15335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15336   (eval $ac_try) 2>&5
15337   ac_status=$?
15338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15339   (exit $ac_status); }; }; then
15340   ac_cv_lib_gle_gleCreateGC=yes
15341 else
15342   echo "$as_me: failed program was:" >&5
15343 cat conftest.$ac_ext >&5
15344 ac_cv_lib_gle_gleCreateGC=no
15345 fi
15346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15347 LIBS=$ac_check_lib_save_LIBS
15348 fi
15349 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
15350 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
15351 if test $ac_cv_lib_gle_gleCreateGC = yes; then
15352   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
15353 fi
15354
15355   CPPFLAGS="$ac_save_CPPFLAGS"
15356   LDFLAGS="$ac_save_LDFLAGS"
15357 #  LIBS="$ac_save_LIBS"
15358
15359   fi
15360   if test "$have_gle" = yes ; then
15361     have_gle=no
15362     gle_halfassed=yes
15363
15364     # sometimes the libmatrix stuff is included in libgle.  look there first.
15365 #
15366 # I don't get it.  For some reason, this test passes on SGI, as if
15367 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
15368 # Yet the link is succeeding.  Why???
15369 #
15370 #    AC_CHECK_X_LIB(gle, uview_direction_d,
15371 #                   [have_gle=yes; gle_halfassed=no],
15372 #                   [], $GL_LIBS -lX11 -lXext -lm)
15373
15374     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
15375     # *sigh*
15376     if test "$have_gle3" = yes ; then
15377
15378   ac_save_CPPFLAGS="$CPPFLAGS"
15379   ac_save_LDFLAGS="$LDFLAGS"
15380 #  ac_save_LIBS="$LIBS"
15381
15382   if test \! -z "$includedir" ; then
15383     CPPFLAGS="$CPPFLAGS -I$includedir"
15384   fi
15385   # note: $X_CFLAGS includes $x_includes
15386   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15387
15388   if test \! -z "$libdir" ; then
15389     LDFLAGS="$LDFLAGS -L$libdir"
15390   fi
15391   # note: $X_LIBS includes $x_libraries
15392   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15393
15394   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
15395 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
15396 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
15397   echo $ECHO_N "(cached) $ECHO_C" >&6
15398 else
15399   ac_check_lib_save_LIBS=$LIBS
15400 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15401 cat >conftest.$ac_ext <<_ACEOF
15402 #line $LINENO "configure"
15403 #include "confdefs.h"
15404
15405 /* Override any gcc2 internal prototype to avoid an error.  */
15406 #ifdef __cplusplus
15407 extern "C"
15408 #endif
15409 /* We use char because int might match the return type of a gcc2
15410    builtin and then its argument prototype would still apply.  */
15411 char uview_direction ();
15412 #ifdef F77_DUMMY_MAIN
15413 #  ifdef __cplusplus
15414      extern "C"
15415 #  endif
15416    int F77_DUMMY_MAIN() { return 1; }
15417 #endif
15418 int
15419 main ()
15420 {
15421 uview_direction ();
15422   ;
15423   return 0;
15424 }
15425 _ACEOF
15426 rm -f conftest.$ac_objext conftest$ac_exeext
15427 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15428   (eval $ac_link) 2>&5
15429   ac_status=$?
15430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15431   (exit $ac_status); } &&
15432          { ac_try='test -s conftest$ac_exeext'
15433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15434   (eval $ac_try) 2>&5
15435   ac_status=$?
15436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15437   (exit $ac_status); }; }; then
15438   ac_cv_lib_gle_uview_direction=yes
15439 else
15440   echo "$as_me: failed program was:" >&5
15441 cat conftest.$ac_ext >&5
15442 ac_cv_lib_gle_uview_direction=no
15443 fi
15444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15445 LIBS=$ac_check_lib_save_LIBS
15446 fi
15447 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
15448 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
15449 if test $ac_cv_lib_gle_uview_direction = yes; then
15450   have_gle=yes; gle_halfassed=no
15451 fi
15452
15453   CPPFLAGS="$ac_save_CPPFLAGS"
15454   LDFLAGS="$ac_save_LDFLAGS"
15455 #  LIBS="$ac_save_LIBS"
15456
15457     fi
15458     # if it wasn't in libgle, then look in libmatrix.
15459     if test "$have_gle" = no ; then
15460
15461   ac_save_CPPFLAGS="$CPPFLAGS"
15462   ac_save_LDFLAGS="$LDFLAGS"
15463 #  ac_save_LIBS="$LIBS"
15464
15465   if test \! -z "$includedir" ; then
15466     CPPFLAGS="$CPPFLAGS -I$includedir"
15467   fi
15468   # note: $X_CFLAGS includes $x_includes
15469   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15470
15471   if test \! -z "$libdir" ; then
15472     LDFLAGS="$LDFLAGS -L$libdir"
15473   fi
15474   # note: $X_LIBS includes $x_libraries
15475   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15476
15477   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
15478 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
15479 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
15480   echo $ECHO_N "(cached) $ECHO_C" >&6
15481 else
15482   ac_check_lib_save_LIBS=$LIBS
15483 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
15484 cat >conftest.$ac_ext <<_ACEOF
15485 #line $LINENO "configure"
15486 #include "confdefs.h"
15487
15488 /* Override any gcc2 internal prototype to avoid an error.  */
15489 #ifdef __cplusplus
15490 extern "C"
15491 #endif
15492 /* We use char because int might match the return type of a gcc2
15493    builtin and then its argument prototype would still apply.  */
15494 char uview_direction_d ();
15495 #ifdef F77_DUMMY_MAIN
15496 #  ifdef __cplusplus
15497      extern "C"
15498 #  endif
15499    int F77_DUMMY_MAIN() { return 1; }
15500 #endif
15501 int
15502 main ()
15503 {
15504 uview_direction_d ();
15505   ;
15506   return 0;
15507 }
15508 _ACEOF
15509 rm -f conftest.$ac_objext conftest$ac_exeext
15510 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15511   (eval $ac_link) 2>&5
15512   ac_status=$?
15513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15514   (exit $ac_status); } &&
15515          { ac_try='test -s conftest$ac_exeext'
15516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15517   (eval $ac_try) 2>&5
15518   ac_status=$?
15519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15520   (exit $ac_status); }; }; then
15521   ac_cv_lib_matrix_uview_direction_d=yes
15522 else
15523   echo "$as_me: failed program was:" >&5
15524 cat conftest.$ac_ext >&5
15525 ac_cv_lib_matrix_uview_direction_d=no
15526 fi
15527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15528 LIBS=$ac_check_lib_save_LIBS
15529 fi
15530 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
15531 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
15532 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
15533   have_gle=yes; gle_halfassed=no;
15534                       GLE_LIBS="$GLE_LIBS -lmatrix"
15535 fi
15536
15537   CPPFLAGS="$ac_save_CPPFLAGS"
15538   LDFLAGS="$ac_save_LDFLAGS"
15539 #  LIBS="$ac_save_LIBS"
15540
15541     fi
15542   fi
15543
15544   if test "$have_gle" = yes ; then
15545     cat >>confdefs.h <<\_ACEOF
15546 #define HAVE_GLE 1
15547 _ACEOF
15548
15549     if test "$have_gle3" = yes ; then
15550       cat >>confdefs.h <<\_ACEOF
15551 #define HAVE_GLE3 1
15552 _ACEOF
15553
15554     fi
15555   fi
15556
15557 elif test "$with_gle" != no; then
15558   echo "error: must be yes or no: --with-gle=$with_gle"
15559   exit 1
15560
15561 fi
15562
15563
15564
15565 ###############################################################################
15566 #
15567 #       Check for -lXpm.
15568 #
15569 ###############################################################################
15570
15571 have_xpm=no
15572 with_xpm_req=unspecified
15573
15574 # Check whether --with-xpm or --without-xpm was given.
15575 if test "${with_xpm+set}" = set; then
15576   withval="$with_xpm"
15577   with_xpm="$withval"; with_xpm_req="$withval"
15578 else
15579   with_xpm=yes
15580 fi;
15581
15582
15583    case "$with_xpm" in
15584     yes) ;;
15585     no)  ;;
15586
15587     /*)
15588      echo "$as_me:$LINENO: checking for XPM headers" >&5
15589 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
15590      d=$with_xpm/include
15591      if test -d $d; then
15592        X_CFLAGS="-I$d $X_CFLAGS"
15593        echo "$as_me:$LINENO: result: $d" >&5
15594 echo "${ECHO_T}$d" >&6
15595      else
15596        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15597 echo "${ECHO_T}not found ($d: no such directory)" >&6
15598      fi
15599
15600      echo "$as_me:$LINENO: checking for XPM libs" >&5
15601 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
15602      d=$with_xpm/lib
15603      if test -d $d; then
15604        X_LIBS="-L$d $X_LIBS"
15605        echo "$as_me:$LINENO: result: $d" >&5
15606 echo "${ECHO_T}$d" >&6
15607      else
15608        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15609 echo "${ECHO_T}not found ($d: no such directory)" >&6
15610      fi
15611
15612      # replace the directory string with "yes".
15613      with_xpm_req="yes"
15614      with_xpm=$with_xpm_req
15615      ;;
15616
15617     *)
15618      echo ""
15619      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
15620      echo "       If it is a directory, then \`DIR/include' will be added to"
15621      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15622      exit 1
15623      ;;
15624    esac
15625
15626
15627 if test "$with_xpm" = yes; then
15628
15629   ac_save_CPPFLAGS="$CPPFLAGS"
15630   if test \! -z "$includedir" ; then
15631     CPPFLAGS="$CPPFLAGS -I$includedir"
15632   fi
15633   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15634   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
15635 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
15636 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
15637   echo $ECHO_N "(cached) $ECHO_C" >&6
15638 else
15639   cat >conftest.$ac_ext <<_ACEOF
15640 #line $LINENO "configure"
15641 #include "confdefs.h"
15642 #include <X11/Xlib.h>
15643
15644 #include <X11/xpm.h>
15645 _ACEOF
15646 rm -f conftest.$ac_objext
15647 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15648   (eval $ac_compile) 2>&5
15649   ac_status=$?
15650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15651   (exit $ac_status); } &&
15652          { ac_try='test -s conftest.$ac_objext'
15653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15654   (eval $ac_try) 2>&5
15655   ac_status=$?
15656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15657   (exit $ac_status); }; }; then
15658   ac_cv_header_X11_xpm_h=yes
15659 else
15660   echo "$as_me: failed program was:" >&5
15661 cat conftest.$ac_ext >&5
15662 ac_cv_header_X11_xpm_h=no
15663 fi
15664 rm -f conftest.$ac_objext conftest.$ac_ext
15665 fi
15666 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
15667 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
15668 if test $ac_cv_header_X11_xpm_h = yes; then
15669   have_xpm=yes
15670                     cat >>confdefs.h <<\_ACEOF
15671 #define HAVE_XPM 1
15672 _ACEOF
15673
15674                     XPM_LIBS="-lXpm"
15675 fi
15676
15677
15678   CPPFLAGS="$ac_save_CPPFLAGS"
15679 elif test "$with_xpm" != no; then
15680   echo "error: must be yes or no: --with-xpm=$with_xpm"
15681   exit 1
15682 fi
15683
15684 # See comment near $motif_requires_xpm, above.
15685 # Need to do this here, after both Motif and XPM have been checked for.
15686 #
15687 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
15688   if test "$motif_requires_xpm" = yes ; then
15689     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
15690   fi
15691 fi
15692
15693 ###############################################################################
15694 #
15695 #       Check for -lgdk_pixbuf.
15696 #
15697 ###############################################################################
15698
15699 have_gdk_pixbuf=no
15700 with_gdk_pixbuf_req=unspecified
15701
15702 # Check whether --with-pixbuf or --without-pixbuf was given.
15703 if test "${with_pixbuf+set}" = set; then
15704   withval="$with_pixbuf"
15705   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
15706 else
15707   with_gdk_pixbuf=yes
15708 fi;
15709
15710 # if --with-pixbuf=/directory/ was specified, remember that directory so that
15711 # we can also look for the `gdk-pixbuf-config' program in that directory.
15712 case "$with_gdk_pixbuf" in
15713   /*)
15714     gdk_pixbuf_dir="$with_gdk_pixbuf"
15715     ;;
15716   *)
15717     gdk_pixbuf_dir=""
15718     ;;
15719 esac
15720
15721
15722    case "$with_gdk_pixbuf" in
15723     yes) ;;
15724     no)  ;;
15725
15726     /*)
15727      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
15728 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
15729      d=$with_gdk_pixbuf/include
15730      if test -d $d; then
15731        X_CFLAGS="-I$d $X_CFLAGS"
15732        echo "$as_me:$LINENO: result: $d" >&5
15733 echo "${ECHO_T}$d" >&6
15734      else
15735        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15736 echo "${ECHO_T}not found ($d: no such directory)" >&6
15737      fi
15738
15739      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
15740 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
15741      d=$with_gdk_pixbuf/lib
15742      if test -d $d; then
15743        X_LIBS="-L$d $X_LIBS"
15744        echo "$as_me:$LINENO: result: $d" >&5
15745 echo "${ECHO_T}$d" >&6
15746      else
15747        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15748 echo "${ECHO_T}not found ($d: no such directory)" >&6
15749      fi
15750
15751      # replace the directory string with "yes".
15752      with_gdk_pixbuf_req="yes"
15753      with_gdk_pixbuf=$with_gdk_pixbuf_req
15754      ;;
15755
15756     *)
15757      echo ""
15758      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
15759      echo "       If it is a directory, then \`DIR/include' will be added to"
15760      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15761      exit 1
15762      ;;
15763    esac
15764
15765
15766 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
15767   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
15768   exit 1
15769 fi
15770
15771 if test "$with_gdk_pixbuf" = yes; then
15772   have_gdk_pixbuf=no
15773   have_gdk_pixbuf2=no
15774
15775   if test -n "$pkg_config" ; then
15776     #
15777     # the new way...
15778     # run pkg-config based tests.
15779     #
15780     pkgs=''
15781     ok="yes"
15782
15783     # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work.
15784     # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work.
15785     # If we don't have Gtk at all, then either will work.
15786
15787     if test "$have_gtk" = no -o "$have_gtk2" = yes; then
15788       #
15789       # we don't have Gtk; or we have Gtk 2.x.  Check for pixbuf 2.x.
15790       #
15791       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 2.x with gtk-config based tests..." >&5
15792 echo "${ECHO_T}checking for gdk_pixbuf 2.x with gtk-config based tests..." >&6
15793       pkg_check_version gdk-pixbuf-2.0      2.0.0
15794       pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
15795       have_gdk_pixbuf="$ok"
15796       have_gdk_pixbuf2="$ok"
15797     fi
15798
15799     if test "$have_gtk" = no -o "$have_gtk2" = no; then
15800       #
15801       # we don't have Gtk; or we have Gtk 1.x.
15802       # If we don't have pixbuf 2.x, then check for pixbuf 1.x.
15803       #
15804       if test "$have_gdk_pixbuf2" = no; then
15805         pkgs=''
15806         ok="yes"
15807       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 1.x with gtk-config based tests..." >&5
15808 echo "${ECHO_T}checking for gdk_pixbuf 1.x with gtk-config based tests..." >&6
15809         pkg_check_version gdk_pixbuf      0.0
15810         pkg_check_version gdk_pixbuf_xlib 0.0
15811         have_gdk_pixbuf="$ok"
15812       fi
15813     fi
15814
15815     if test "$have_gdk_pixbuf" = yes; then
15816       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15817 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15818 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15819   echo $ECHO_N "(cached) $ECHO_C" >&6
15820 else
15821   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
15822 fi
15823 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15824 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15825       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15826 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15827 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15828   echo $ECHO_N "(cached) $ECHO_C" >&6
15829 else
15830   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
15831 fi
15832 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15833 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15834     fi
15835     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15836     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15837   fi
15838
15839
15840   if test "$have_gdk_pixbuf" = no; then
15841     #
15842     # the old way...
15843     # run gdk-pixbuf-config based tests.
15844     # note that we can't assume that the existence of "pkg-config" means
15845     # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4,
15846     # pkg-config exists, but doesn't know about pixbuf.
15847     #
15848
15849    echo "$as_me:$LINENO: result: checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&5
15850 echo "${ECHO_T}checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&6
15851
15852     # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
15853     # look in /foo/bin/ for for gdk-pixbuf-config.
15854     #
15855     gdk_pixbuf_path="$PATH"
15856
15857     if test ! -z "$gtk_dir"; then
15858       # canonicalize slashes.
15859       foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15860       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15861     fi
15862
15863     if test ! -z "$gnome_dir"; then
15864       # canonicalize slashes.
15865       foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
15866       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15867     fi
15868
15869     for ac_prog in gdk-pixbuf-config
15870 do
15871   # Extract the first word of "$ac_prog", so it can be a program name with args.
15872 set dummy $ac_prog; ac_word=$2
15873 echo "$as_me:$LINENO: checking for $ac_word" >&5
15874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15875 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
15876   echo $ECHO_N "(cached) $ECHO_C" >&6
15877 else
15878   case $gdk_pixbuf_config in
15879   [\\/]* | ?:[\\/]*)
15880   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
15881   ;;
15882   *)
15883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15884 for as_dir in $gdk_pixbuf_path
15885 do
15886   IFS=$as_save_IFS
15887   test -z "$as_dir" && as_dir=.
15888   for ac_exec_ext in '' $ac_executable_extensions; do
15889   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15890     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
15891     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15892     break 2
15893   fi
15894 done
15895 done
15896
15897   ;;
15898 esac
15899 fi
15900 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
15901
15902 if test -n "$gdk_pixbuf_config"; then
15903   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
15904 echo "${ECHO_T}$gdk_pixbuf_config" >&6
15905 else
15906   echo "$as_me:$LINENO: result: no" >&5
15907 echo "${ECHO_T}no" >&6
15908 fi
15909
15910   test -n "$gdk_pixbuf_config" && break
15911 done
15912
15913
15914     # If we found the gdk-pixbuf-config program, run it to get flags.
15915     #
15916     if test -n "$gdk_pixbuf_config" ; then
15917       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15918 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15919 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15920   echo $ECHO_N "(cached) $ECHO_C" >&6
15921 else
15922   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
15923 fi
15924 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15925 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15926       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15927 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15928 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15929   echo $ECHO_N "(cached) $ECHO_C" >&6
15930 else
15931   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
15932 fi
15933 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15934 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15935
15936       # note that "gdk-pixbuf-config --libs" produces a link line including
15937       # -lgdk_pixbuf, but there's no way to get it to produce one that also
15938       # includes -lgdk_pixbuf_xlib.  Since we don't know *exactly* what the
15939       # name of the library will be, construct it with sed...
15940       # M4 sucks!!
15941
15942       ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \
15943        sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'`
15944
15945
15946       ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15947       ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15948     fi
15949   fi
15950
15951   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
15952   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
15953
15954   if test "$have_gdk_pixbuf" = no; then
15955     #
15956     # we appear to have pixbuf; check for headers/libs to be sure.
15957     #
15958
15959     have_gdk_pixbuf=no
15960
15961     # check for header A...
15962
15963   ac_save_CPPFLAGS="$CPPFLAGS"
15964   if test \! -z "$includedir" ; then
15965     CPPFLAGS="$CPPFLAGS -I$includedir"
15966   fi
15967   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15968   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15969   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
15970 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
15971 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15972   echo $ECHO_N "(cached) $ECHO_C" >&6
15973 fi
15974 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
15975 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
15976 else
15977   # Is the header compilable?
15978 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
15979 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
15980 cat >conftest.$ac_ext <<_ACEOF
15981 #line $LINENO "configure"
15982 #include "confdefs.h"
15983 $ac_includes_default
15984 #include <gdk-pixbuf/gdk-pixbuf.h>
15985 _ACEOF
15986 rm -f conftest.$ac_objext
15987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15988   (eval $ac_compile) 2>&5
15989   ac_status=$?
15990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15991   (exit $ac_status); } &&
15992          { ac_try='test -s conftest.$ac_objext'
15993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15994   (eval $ac_try) 2>&5
15995   ac_status=$?
15996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15997   (exit $ac_status); }; }; then
15998   ac_header_compiler=yes
15999 else
16000   echo "$as_me: failed program was:" >&5
16001 cat conftest.$ac_ext >&5
16002 ac_header_compiler=no
16003 fi
16004 rm -f conftest.$ac_objext conftest.$ac_ext
16005 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16006 echo "${ECHO_T}$ac_header_compiler" >&6
16007
16008 # Is the header present?
16009 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
16010 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
16011 cat >conftest.$ac_ext <<_ACEOF
16012 #line $LINENO "configure"
16013 #include "confdefs.h"
16014 #include <gdk-pixbuf/gdk-pixbuf.h>
16015 _ACEOF
16016 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16017   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16018   ac_status=$?
16019   egrep -v '^ *\+' conftest.er1 >conftest.err
16020   rm -f conftest.er1
16021   cat conftest.err >&5
16022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16023   (exit $ac_status); } >/dev/null; then
16024   if test -s conftest.err; then
16025     ac_cpp_err=$ac_c_preproc_warn_flag
16026   else
16027     ac_cpp_err=
16028   fi
16029 else
16030   ac_cpp_err=yes
16031 fi
16032 if test -z "$ac_cpp_err"; then
16033   ac_header_preproc=yes
16034 else
16035   echo "$as_me: failed program was:" >&5
16036   cat conftest.$ac_ext >&5
16037   ac_header_preproc=no
16038 fi
16039 rm -f conftest.err conftest.$ac_ext
16040 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16041 echo "${ECHO_T}$ac_header_preproc" >&6
16042
16043 # So?  What about this header?
16044 case $ac_header_compiler:$ac_header_preproc in
16045   yes:no )
16046     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
16047 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16048     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16049 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
16050   no:yes )
16051     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
16052 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
16053     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5
16054 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;}
16055     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16056 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
16057 esac
16058 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
16059 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
16060 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16061   echo $ECHO_N "(cached) $ECHO_C" >&6
16062 else
16063   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
16064 fi
16065 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
16066 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
16067
16068 fi
16069 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
16070   have_gdk_pixbuf=yes
16071 fi
16072
16073
16074   CPPFLAGS="$ac_save_CPPFLAGS"
16075
16076     # if that worked, check for header B...
16077     if test "$have_gdk_pixbuf" = yes; then
16078       have_gdk_pixbuf=no
16079       gdk_pixbuf_halfassed=yes
16080
16081   ac_save_CPPFLAGS="$CPPFLAGS"
16082   if test \! -z "$includedir" ; then
16083     CPPFLAGS="$CPPFLAGS -I$includedir"
16084   fi
16085   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16086   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16087   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16088 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16089 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16090   echo $ECHO_N "(cached) $ECHO_C" >&6
16091 fi
16092 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16093 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16094 else
16095   # Is the header compilable?
16096 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
16097 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16098 cat >conftest.$ac_ext <<_ACEOF
16099 #line $LINENO "configure"
16100 #include "confdefs.h"
16101 $ac_includes_default
16102 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16103 _ACEOF
16104 rm -f conftest.$ac_objext
16105 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16106   (eval $ac_compile) 2>&5
16107   ac_status=$?
16108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16109   (exit $ac_status); } &&
16110          { ac_try='test -s conftest.$ac_objext'
16111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16112   (eval $ac_try) 2>&5
16113   ac_status=$?
16114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16115   (exit $ac_status); }; }; then
16116   ac_header_compiler=yes
16117 else
16118   echo "$as_me: failed program was:" >&5
16119 cat conftest.$ac_ext >&5
16120 ac_header_compiler=no
16121 fi
16122 rm -f conftest.$ac_objext conftest.$ac_ext
16123 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16124 echo "${ECHO_T}$ac_header_compiler" >&6
16125
16126 # Is the header present?
16127 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
16128 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16129 cat >conftest.$ac_ext <<_ACEOF
16130 #line $LINENO "configure"
16131 #include "confdefs.h"
16132 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16133 _ACEOF
16134 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16135   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16136   ac_status=$?
16137   egrep -v '^ *\+' conftest.er1 >conftest.err
16138   rm -f conftest.er1
16139   cat conftest.err >&5
16140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16141   (exit $ac_status); } >/dev/null; then
16142   if test -s conftest.err; then
16143     ac_cpp_err=$ac_c_preproc_warn_flag
16144   else
16145     ac_cpp_err=
16146   fi
16147 else
16148   ac_cpp_err=yes
16149 fi
16150 if test -z "$ac_cpp_err"; then
16151   ac_header_preproc=yes
16152 else
16153   echo "$as_me: failed program was:" >&5
16154   cat conftest.$ac_ext >&5
16155   ac_header_preproc=no
16156 fi
16157 rm -f conftest.err conftest.$ac_ext
16158 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16159 echo "${ECHO_T}$ac_header_preproc" >&6
16160
16161 # So?  What about this header?
16162 case $ac_header_compiler:$ac_header_preproc in
16163   yes:no )
16164     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16165 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16166     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16167 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16168   no:yes )
16169     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16170 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16171     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16172 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16173     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16174 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16175 esac
16176 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16177 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16178 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16179   echo $ECHO_N "(cached) $ECHO_C" >&6
16180 else
16181   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
16182 fi
16183 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16184 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16185
16186 fi
16187 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
16188   have_gdk_pixbuf=yes
16189                          gdk_pixbuf_halfassed=no
16190 fi
16191
16192
16193   CPPFLAGS="$ac_save_CPPFLAGS"
16194
16195       # yay, it has a new name in Gtk 2.x...
16196       if test "$have_gdk_pixbuf" = no; then
16197         have_gdk_pixbuf=no
16198         gdk_pixbuf_halfassed=yes
16199
16200   ac_save_CPPFLAGS="$CPPFLAGS"
16201   if test \! -z "$includedir" ; then
16202     CPPFLAGS="$CPPFLAGS -I$includedir"
16203   fi
16204   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16205   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16206   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16207 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16208 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16209   echo $ECHO_N "(cached) $ECHO_C" >&6
16210 fi
16211 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16212 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16213 else
16214   # Is the header compilable?
16215 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
16216 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16217 cat >conftest.$ac_ext <<_ACEOF
16218 #line $LINENO "configure"
16219 #include "confdefs.h"
16220 $ac_includes_default
16221 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16222 _ACEOF
16223 rm -f conftest.$ac_objext
16224 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16225   (eval $ac_compile) 2>&5
16226   ac_status=$?
16227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16228   (exit $ac_status); } &&
16229          { ac_try='test -s conftest.$ac_objext'
16230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16231   (eval $ac_try) 2>&5
16232   ac_status=$?
16233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16234   (exit $ac_status); }; }; then
16235   ac_header_compiler=yes
16236 else
16237   echo "$as_me: failed program was:" >&5
16238 cat conftest.$ac_ext >&5
16239 ac_header_compiler=no
16240 fi
16241 rm -f conftest.$ac_objext conftest.$ac_ext
16242 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16243 echo "${ECHO_T}$ac_header_compiler" >&6
16244
16245 # Is the header present?
16246 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
16247 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16248 cat >conftest.$ac_ext <<_ACEOF
16249 #line $LINENO "configure"
16250 #include "confdefs.h"
16251 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16252 _ACEOF
16253 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16254   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16255   ac_status=$?
16256   egrep -v '^ *\+' conftest.er1 >conftest.err
16257   rm -f conftest.er1
16258   cat conftest.err >&5
16259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16260   (exit $ac_status); } >/dev/null; then
16261   if test -s conftest.err; then
16262     ac_cpp_err=$ac_c_preproc_warn_flag
16263   else
16264     ac_cpp_err=
16265   fi
16266 else
16267   ac_cpp_err=yes
16268 fi
16269 if test -z "$ac_cpp_err"; then
16270   ac_header_preproc=yes
16271 else
16272   echo "$as_me: failed program was:" >&5
16273   cat conftest.$ac_ext >&5
16274   ac_header_preproc=no
16275 fi
16276 rm -f conftest.err conftest.$ac_ext
16277 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16278 echo "${ECHO_T}$ac_header_preproc" >&6
16279
16280 # So?  What about this header?
16281 case $ac_header_compiler:$ac_header_preproc in
16282   yes:no )
16283     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16284 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16285     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16286 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16287   no:yes )
16288     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16289 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16290     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16291 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16292     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16293 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16294 esac
16295 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16296 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16297 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16298   echo $ECHO_N "(cached) $ECHO_C" >&6
16299 else
16300   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
16301 fi
16302 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16303 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16304
16305 fi
16306 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
16307   have_gdk_pixbuf=yes
16308                            gdk_pixbuf_halfassed=no
16309 fi
16310
16311
16312   CPPFLAGS="$ac_save_CPPFLAGS"
16313       fi
16314     fi
16315   fi
16316
16317   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
16318
16319   if test "$have_gdk_pixbuf" = yes; then
16320     # we have the headers, now check for the libraries
16321     have_gdk_pixbuf=no
16322     gdk_pixbuf_halfassed=yes
16323
16324     # library A...
16325
16326   ac_save_CPPFLAGS="$CPPFLAGS"
16327   ac_save_LDFLAGS="$LDFLAGS"
16328 #  ac_save_LIBS="$LIBS"
16329
16330   if test \! -z "$includedir" ; then
16331     CPPFLAGS="$CPPFLAGS -I$includedir"
16332   fi
16333   # note: $X_CFLAGS includes $x_includes
16334   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16335
16336   if test \! -z "$libdir" ; then
16337     LDFLAGS="$LDFLAGS -L$libdir"
16338   fi
16339   # note: $X_LIBS includes $x_libraries
16340   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16341
16342   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
16343 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
16344 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
16345   echo $ECHO_N "(cached) $ECHO_C" >&6
16346 else
16347   ac_check_lib_save_LIBS=$LIBS
16348 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16349 cat >conftest.$ac_ext <<_ACEOF
16350 #line $LINENO "configure"
16351 #include "confdefs.h"
16352
16353 /* Override any gcc2 internal prototype to avoid an error.  */
16354 #ifdef __cplusplus
16355 extern "C"
16356 #endif
16357 /* We use char because int might match the return type of a gcc2
16358    builtin and then its argument prototype would still apply.  */
16359 char gdk_pixbuf_new_from_file ();
16360 #ifdef F77_DUMMY_MAIN
16361 #  ifdef __cplusplus
16362      extern "C"
16363 #  endif
16364    int F77_DUMMY_MAIN() { return 1; }
16365 #endif
16366 int
16367 main ()
16368 {
16369 gdk_pixbuf_new_from_file ();
16370   ;
16371   return 0;
16372 }
16373 _ACEOF
16374 rm -f conftest.$ac_objext conftest$ac_exeext
16375 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16376   (eval $ac_link) 2>&5
16377   ac_status=$?
16378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16379   (exit $ac_status); } &&
16380          { ac_try='test -s conftest$ac_exeext'
16381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16382   (eval $ac_try) 2>&5
16383   ac_status=$?
16384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16385   (exit $ac_status); }; }; then
16386   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
16387 else
16388   echo "$as_me: failed program was:" >&5
16389 cat conftest.$ac_ext >&5
16390 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
16391 fi
16392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16393 LIBS=$ac_check_lib_save_LIBS
16394 fi
16395 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
16396 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
16397 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
16398   have_gdk_pixbuf=yes
16399 fi
16400
16401   CPPFLAGS="$ac_save_CPPFLAGS"
16402   LDFLAGS="$ac_save_LDFLAGS"
16403 #  LIBS="$ac_save_LIBS"
16404
16405     # library B...
16406     if test "$have_gdk_pixbuf" = yes; then
16407       have_gdk_pixbuf=no
16408
16409   ac_save_CPPFLAGS="$CPPFLAGS"
16410   ac_save_LDFLAGS="$LDFLAGS"
16411 #  ac_save_LIBS="$LIBS"
16412
16413   if test \! -z "$includedir" ; then
16414     CPPFLAGS="$CPPFLAGS -I$includedir"
16415   fi
16416   # note: $X_CFLAGS includes $x_includes
16417   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16418
16419   if test \! -z "$libdir" ; then
16420     LDFLAGS="$LDFLAGS -L$libdir"
16421   fi
16422   # note: $X_LIBS includes $x_libraries
16423   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16424
16425   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
16426 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
16427 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
16428   echo $ECHO_N "(cached) $ECHO_C" >&6
16429 else
16430   ac_check_lib_save_LIBS=$LIBS
16431 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16432 cat >conftest.$ac_ext <<_ACEOF
16433 #line $LINENO "configure"
16434 #include "confdefs.h"
16435
16436 /* Override any gcc2 internal prototype to avoid an error.  */
16437 #ifdef __cplusplus
16438 extern "C"
16439 #endif
16440 /* We use char because int might match the return type of a gcc2
16441    builtin and then its argument prototype would still apply.  */
16442 char gdk_pixbuf_xlib_init ();
16443 #ifdef F77_DUMMY_MAIN
16444 #  ifdef __cplusplus
16445      extern "C"
16446 #  endif
16447    int F77_DUMMY_MAIN() { return 1; }
16448 #endif
16449 int
16450 main ()
16451 {
16452 gdk_pixbuf_xlib_init ();
16453   ;
16454   return 0;
16455 }
16456 _ACEOF
16457 rm -f conftest.$ac_objext conftest$ac_exeext
16458 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16459   (eval $ac_link) 2>&5
16460   ac_status=$?
16461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16462   (exit $ac_status); } &&
16463          { ac_try='test -s conftest$ac_exeext'
16464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16465   (eval $ac_try) 2>&5
16466   ac_status=$?
16467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16468   (exit $ac_status); }; }; then
16469   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
16470 else
16471   echo "$as_me: failed program was:" >&5
16472 cat conftest.$ac_ext >&5
16473 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
16474 fi
16475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16476 LIBS=$ac_check_lib_save_LIBS
16477 fi
16478 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
16479 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
16480 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
16481   have_gdk_pixbuf=yes
16482                       gdk_pixbuf_halfassed=no
16483 fi
16484
16485   CPPFLAGS="$ac_save_CPPFLAGS"
16486   LDFLAGS="$ac_save_LDFLAGS"
16487 #  LIBS="$ac_save_LIBS"
16488
16489     fi
16490   fi
16491
16492   if test "$have_gdk_pixbuf" = yes; then
16493     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
16494     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
16495     cat >>confdefs.h <<\_ACEOF
16496 #define HAVE_GDK_PIXBUF 1
16497 _ACEOF
16498
16499   else
16500     have_gdk_pixbuf2=no
16501   fi
16502 fi
16503
16504
16505 ###############################################################################
16506 #
16507 #       Check for -ljpeg
16508 #
16509 ###############################################################################
16510
16511 have_jpeg=no
16512 with_jpeg_req=unspecified
16513 jpeg_halfassed=no
16514
16515 # Check whether --with-jpeg or --without-jpeg was given.
16516 if test "${with_jpeg+set}" = set; then
16517   withval="$with_jpeg"
16518   with_jpeg="$withval"; with_jpeg_req="$withval"
16519 else
16520   with_jpeg=yes
16521 fi;
16522
16523
16524    case "$with_jpeg" in
16525     yes) ;;
16526     no)  ;;
16527
16528     /*)
16529      echo "$as_me:$LINENO: checking for JPEG headers" >&5
16530 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
16531      d=$with_jpeg/include
16532      if test -d $d; then
16533        X_CFLAGS="-I$d $X_CFLAGS"
16534        echo "$as_me:$LINENO: result: $d" >&5
16535 echo "${ECHO_T}$d" >&6
16536      else
16537        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16538 echo "${ECHO_T}not found ($d: no such directory)" >&6
16539      fi
16540
16541      echo "$as_me:$LINENO: checking for JPEG libs" >&5
16542 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
16543      d=$with_jpeg/lib
16544      if test -d $d; then
16545        X_LIBS="-L$d $X_LIBS"
16546        echo "$as_me:$LINENO: result: $d" >&5
16547 echo "${ECHO_T}$d" >&6
16548      else
16549        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16550 echo "${ECHO_T}not found ($d: no such directory)" >&6
16551      fi
16552
16553      # replace the directory string with "yes".
16554      with_jpeg_req="yes"
16555      with_jpeg=$with_jpeg_req
16556      ;;
16557
16558     *)
16559      echo ""
16560      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
16561      echo "       If it is a directory, then \`DIR/include' will be added to"
16562      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16563      exit 1
16564      ;;
16565    esac
16566
16567
16568 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
16569   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
16570   exit 1
16571 fi
16572
16573 if test "$with_jpeg" = yes; then
16574
16575   have_jpeg=no
16576
16577   ac_save_CPPFLAGS="$CPPFLAGS"
16578   if test \! -z "$includedir" ; then
16579     CPPFLAGS="$CPPFLAGS -I$includedir"
16580   fi
16581   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16582   if test "${ac_cv_header_jpeglib_h+set}" = set; then
16583   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
16584 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
16585 if test "${ac_cv_header_jpeglib_h+set}" = set; then
16586   echo $ECHO_N "(cached) $ECHO_C" >&6
16587 fi
16588 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
16589 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
16590 else
16591   # Is the header compilable?
16592 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
16593 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
16594 cat >conftest.$ac_ext <<_ACEOF
16595 #line $LINENO "configure"
16596 #include "confdefs.h"
16597 $ac_includes_default
16598 #include <jpeglib.h>
16599 _ACEOF
16600 rm -f conftest.$ac_objext
16601 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16602   (eval $ac_compile) 2>&5
16603   ac_status=$?
16604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16605   (exit $ac_status); } &&
16606          { ac_try='test -s conftest.$ac_objext'
16607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16608   (eval $ac_try) 2>&5
16609   ac_status=$?
16610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16611   (exit $ac_status); }; }; then
16612   ac_header_compiler=yes
16613 else
16614   echo "$as_me: failed program was:" >&5
16615 cat conftest.$ac_ext >&5
16616 ac_header_compiler=no
16617 fi
16618 rm -f conftest.$ac_objext conftest.$ac_ext
16619 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16620 echo "${ECHO_T}$ac_header_compiler" >&6
16621
16622 # Is the header present?
16623 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
16624 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
16625 cat >conftest.$ac_ext <<_ACEOF
16626 #line $LINENO "configure"
16627 #include "confdefs.h"
16628 #include <jpeglib.h>
16629 _ACEOF
16630 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16631   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16632   ac_status=$?
16633   egrep -v '^ *\+' conftest.er1 >conftest.err
16634   rm -f conftest.er1
16635   cat conftest.err >&5
16636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16637   (exit $ac_status); } >/dev/null; then
16638   if test -s conftest.err; then
16639     ac_cpp_err=$ac_c_preproc_warn_flag
16640   else
16641     ac_cpp_err=
16642   fi
16643 else
16644   ac_cpp_err=yes
16645 fi
16646 if test -z "$ac_cpp_err"; then
16647   ac_header_preproc=yes
16648 else
16649   echo "$as_me: failed program was:" >&5
16650   cat conftest.$ac_ext >&5
16651   ac_header_preproc=no
16652 fi
16653 rm -f conftest.err conftest.$ac_ext
16654 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16655 echo "${ECHO_T}$ac_header_preproc" >&6
16656
16657 # So?  What about this header?
16658 case $ac_header_compiler:$ac_header_preproc in
16659   yes:no )
16660     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16661 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16662     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
16663 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
16664   no:yes )
16665     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
16666 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
16667     { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
16668 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
16669     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
16670 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
16671 esac
16672 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
16673 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
16674 if test "${ac_cv_header_jpeglib_h+set}" = set; then
16675   echo $ECHO_N "(cached) $ECHO_C" >&6
16676 else
16677   ac_cv_header_jpeglib_h=$ac_header_preproc
16678 fi
16679 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
16680 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
16681
16682 fi
16683 if test $ac_cv_header_jpeglib_h = yes; then
16684   have_jpeg=yes
16685 fi
16686
16687
16688   CPPFLAGS="$ac_save_CPPFLAGS"
16689
16690   if test "$have_jpeg" = yes; then
16691     # we have the header, now check for the library
16692     have_jpeg=no
16693     jpeg_halfassed=yes
16694
16695   ac_save_CPPFLAGS="$CPPFLAGS"
16696   ac_save_LDFLAGS="$LDFLAGS"
16697 #  ac_save_LIBS="$LIBS"
16698
16699   if test \! -z "$includedir" ; then
16700     CPPFLAGS="$CPPFLAGS -I$includedir"
16701   fi
16702   # note: $X_CFLAGS includes $x_includes
16703   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16704
16705   if test \! -z "$libdir" ; then
16706     LDFLAGS="$LDFLAGS -L$libdir"
16707   fi
16708   # note: $X_LIBS includes $x_libraries
16709   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16710
16711   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
16712 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
16713 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
16714   echo $ECHO_N "(cached) $ECHO_C" >&6
16715 else
16716   ac_check_lib_save_LIBS=$LIBS
16717 LIBS="-ljpeg  $LIBS"
16718 cat >conftest.$ac_ext <<_ACEOF
16719 #line $LINENO "configure"
16720 #include "confdefs.h"
16721
16722 /* Override any gcc2 internal prototype to avoid an error.  */
16723 #ifdef __cplusplus
16724 extern "C"
16725 #endif
16726 /* We use char because int might match the return type of a gcc2
16727    builtin and then its argument prototype would still apply.  */
16728 char jpeg_start_compress ();
16729 #ifdef F77_DUMMY_MAIN
16730 #  ifdef __cplusplus
16731      extern "C"
16732 #  endif
16733    int F77_DUMMY_MAIN() { return 1; }
16734 #endif
16735 int
16736 main ()
16737 {
16738 jpeg_start_compress ();
16739   ;
16740   return 0;
16741 }
16742 _ACEOF
16743 rm -f conftest.$ac_objext conftest$ac_exeext
16744 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16745   (eval $ac_link) 2>&5
16746   ac_status=$?
16747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16748   (exit $ac_status); } &&
16749          { ac_try='test -s conftest$ac_exeext'
16750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16751   (eval $ac_try) 2>&5
16752   ac_status=$?
16753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16754   (exit $ac_status); }; }; then
16755   ac_cv_lib_jpeg_jpeg_start_compress=yes
16756 else
16757   echo "$as_me: failed program was:" >&5
16758 cat conftest.$ac_ext >&5
16759 ac_cv_lib_jpeg_jpeg_start_compress=no
16760 fi
16761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16762 LIBS=$ac_check_lib_save_LIBS
16763 fi
16764 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
16765 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
16766 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
16767   have_jpeg=yes
16768                     jpeg_halfassed=no
16769                     JPEG_LIBS="-ljpeg"
16770                     cat >>confdefs.h <<\_ACEOF
16771 #define HAVE_JPEGLIB 1
16772 _ACEOF
16773
16774 fi
16775
16776   CPPFLAGS="$ac_save_CPPFLAGS"
16777   LDFLAGS="$ac_save_LDFLAGS"
16778 #  LIBS="$ac_save_LIBS"
16779
16780   fi
16781 fi
16782
16783
16784 ###############################################################################
16785 #
16786 #       Check for the XSHM server extension.
16787 #
16788 ###############################################################################
16789
16790 have_xshm=no
16791 with_xshm_req=unspecified
16792
16793 # Check whether --with-xshm-ext or --without-xshm-ext was given.
16794 if test "${with_xshm_ext+set}" = set; then
16795   withval="$with_xshm_ext"
16796   with_xshm="$withval"; with_xshm_req="$withval"
16797 else
16798   with_xshm=yes
16799 fi;
16800
16801
16802    case "$with_xshm" in
16803     yes) ;;
16804     no)  ;;
16805
16806     /*)
16807      echo "$as_me:$LINENO: checking for XSHM headers" >&5
16808 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
16809      d=$with_xshm/include
16810      if test -d $d; then
16811        X_CFLAGS="-I$d $X_CFLAGS"
16812        echo "$as_me:$LINENO: result: $d" >&5
16813 echo "${ECHO_T}$d" >&6
16814      else
16815        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16816 echo "${ECHO_T}not found ($d: no such directory)" >&6
16817      fi
16818
16819      echo "$as_me:$LINENO: checking for XSHM libs" >&5
16820 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
16821      d=$with_xshm/lib
16822      if test -d $d; then
16823        X_LIBS="-L$d $X_LIBS"
16824        echo "$as_me:$LINENO: result: $d" >&5
16825 echo "${ECHO_T}$d" >&6
16826      else
16827        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16828 echo "${ECHO_T}not found ($d: no such directory)" >&6
16829      fi
16830
16831      # replace the directory string with "yes".
16832      with_xshm_req="yes"
16833      with_xshm=$with_xshm_req
16834      ;;
16835
16836     *)
16837      echo ""
16838      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
16839      echo "       If it is a directory, then \`DIR/include' will be added to"
16840      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16841      exit 1
16842      ;;
16843    esac
16844
16845
16846 if test "$with_xshm" = yes; then
16847
16848   # first check for Xshm.h.
16849
16850   ac_save_CPPFLAGS="$CPPFLAGS"
16851   if test \! -z "$includedir" ; then
16852     CPPFLAGS="$CPPFLAGS -I$includedir"
16853   fi
16854   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16855   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
16856 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
16857 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
16858   echo $ECHO_N "(cached) $ECHO_C" >&6
16859 else
16860   cat >conftest.$ac_ext <<_ACEOF
16861 #line $LINENO "configure"
16862 #include "confdefs.h"
16863 #include <X11/Xlib.h>
16864
16865 #include <X11/extensions/XShm.h>
16866 _ACEOF
16867 rm -f conftest.$ac_objext
16868 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16869   (eval $ac_compile) 2>&5
16870   ac_status=$?
16871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16872   (exit $ac_status); } &&
16873          { ac_try='test -s conftest.$ac_objext'
16874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16875   (eval $ac_try) 2>&5
16876   ac_status=$?
16877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16878   (exit $ac_status); }; }; then
16879   ac_cv_header_X11_extensions_XShm_h=yes
16880 else
16881   echo "$as_me: failed program was:" >&5
16882 cat conftest.$ac_ext >&5
16883 ac_cv_header_X11_extensions_XShm_h=no
16884 fi
16885 rm -f conftest.$ac_objext conftest.$ac_ext
16886 fi
16887 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
16888 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
16889 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
16890   have_xshm=yes
16891 fi
16892
16893
16894   CPPFLAGS="$ac_save_CPPFLAGS"
16895
16896   # if that succeeded, then check for sys/ipc.h.
16897   if test "$have_xshm" = yes; then
16898     have_xshm=no
16899
16900   ac_save_CPPFLAGS="$CPPFLAGS"
16901   if test \! -z "$includedir" ; then
16902     CPPFLAGS="$CPPFLAGS -I$includedir"
16903   fi
16904   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16905   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16906   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16907 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16908 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16909   echo $ECHO_N "(cached) $ECHO_C" >&6
16910 fi
16911 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16912 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16913 else
16914   # Is the header compilable?
16915 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
16916 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
16917 cat >conftest.$ac_ext <<_ACEOF
16918 #line $LINENO "configure"
16919 #include "confdefs.h"
16920 $ac_includes_default
16921 #include <sys/ipc.h>
16922 _ACEOF
16923 rm -f conftest.$ac_objext
16924 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16925   (eval $ac_compile) 2>&5
16926   ac_status=$?
16927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16928   (exit $ac_status); } &&
16929          { ac_try='test -s conftest.$ac_objext'
16930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16931   (eval $ac_try) 2>&5
16932   ac_status=$?
16933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16934   (exit $ac_status); }; }; then
16935   ac_header_compiler=yes
16936 else
16937   echo "$as_me: failed program was:" >&5
16938 cat conftest.$ac_ext >&5
16939 ac_header_compiler=no
16940 fi
16941 rm -f conftest.$ac_objext conftest.$ac_ext
16942 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16943 echo "${ECHO_T}$ac_header_compiler" >&6
16944
16945 # Is the header present?
16946 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
16947 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
16948 cat >conftest.$ac_ext <<_ACEOF
16949 #line $LINENO "configure"
16950 #include "confdefs.h"
16951 #include <sys/ipc.h>
16952 _ACEOF
16953 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16954   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16955   ac_status=$?
16956   egrep -v '^ *\+' conftest.er1 >conftest.err
16957   rm -f conftest.er1
16958   cat conftest.err >&5
16959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16960   (exit $ac_status); } >/dev/null; then
16961   if test -s conftest.err; then
16962     ac_cpp_err=$ac_c_preproc_warn_flag
16963   else
16964     ac_cpp_err=
16965   fi
16966 else
16967   ac_cpp_err=yes
16968 fi
16969 if test -z "$ac_cpp_err"; then
16970   ac_header_preproc=yes
16971 else
16972   echo "$as_me: failed program was:" >&5
16973   cat conftest.$ac_ext >&5
16974   ac_header_preproc=no
16975 fi
16976 rm -f conftest.err conftest.$ac_ext
16977 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16978 echo "${ECHO_T}$ac_header_preproc" >&6
16979
16980 # So?  What about this header?
16981 case $ac_header_compiler:$ac_header_preproc in
16982   yes:no )
16983     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
16984 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16985     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16986 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16987   no:yes )
16988     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
16989 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
16990     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
16991 echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
16992     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16993 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16994 esac
16995 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16996 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16997 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16998   echo $ECHO_N "(cached) $ECHO_C" >&6
16999 else
17000   ac_cv_header_sys_ipc_h=$ac_header_preproc
17001 fi
17002 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
17003 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
17004
17005 fi
17006 if test $ac_cv_header_sys_ipc_h = yes; then
17007   have_xshm=yes
17008 fi
17009
17010
17011   CPPFLAGS="$ac_save_CPPFLAGS"
17012   fi
17013
17014   # if that succeeded, then check for sys/shm.h.
17015   if test "$have_xshm" = yes; then
17016     have_xshm=no
17017
17018   ac_save_CPPFLAGS="$CPPFLAGS"
17019   if test \! -z "$includedir" ; then
17020     CPPFLAGS="$CPPFLAGS -I$includedir"
17021   fi
17022   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17023   if test "${ac_cv_header_sys_shm_h+set}" = set; then
17024   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
17025 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
17026 if test "${ac_cv_header_sys_shm_h+set}" = set; then
17027   echo $ECHO_N "(cached) $ECHO_C" >&6
17028 fi
17029 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
17030 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
17031 else
17032   # Is the header compilable?
17033 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
17034 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
17035 cat >conftest.$ac_ext <<_ACEOF
17036 #line $LINENO "configure"
17037 #include "confdefs.h"
17038 $ac_includes_default
17039 #include <sys/shm.h>
17040 _ACEOF
17041 rm -f conftest.$ac_objext
17042 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17043   (eval $ac_compile) 2>&5
17044   ac_status=$?
17045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17046   (exit $ac_status); } &&
17047          { ac_try='test -s conftest.$ac_objext'
17048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17049   (eval $ac_try) 2>&5
17050   ac_status=$?
17051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17052   (exit $ac_status); }; }; then
17053   ac_header_compiler=yes
17054 else
17055   echo "$as_me: failed program was:" >&5
17056 cat conftest.$ac_ext >&5
17057 ac_header_compiler=no
17058 fi
17059 rm -f conftest.$ac_objext conftest.$ac_ext
17060 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17061 echo "${ECHO_T}$ac_header_compiler" >&6
17062
17063 # Is the header present?
17064 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
17065 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
17066 cat >conftest.$ac_ext <<_ACEOF
17067 #line $LINENO "configure"
17068 #include "confdefs.h"
17069 #include <sys/shm.h>
17070 _ACEOF
17071 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17072   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17073   ac_status=$?
17074   egrep -v '^ *\+' conftest.er1 >conftest.err
17075   rm -f conftest.er1
17076   cat conftest.err >&5
17077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17078   (exit $ac_status); } >/dev/null; then
17079   if test -s conftest.err; then
17080     ac_cpp_err=$ac_c_preproc_warn_flag
17081   else
17082     ac_cpp_err=
17083   fi
17084 else
17085   ac_cpp_err=yes
17086 fi
17087 if test -z "$ac_cpp_err"; then
17088   ac_header_preproc=yes
17089 else
17090   echo "$as_me: failed program was:" >&5
17091   cat conftest.$ac_ext >&5
17092   ac_header_preproc=no
17093 fi
17094 rm -f conftest.err conftest.$ac_ext
17095 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17096 echo "${ECHO_T}$ac_header_preproc" >&6
17097
17098 # So?  What about this header?
17099 case $ac_header_compiler:$ac_header_preproc in
17100   yes:no )
17101     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
17102 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17103     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
17104 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
17105   no:yes )
17106     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
17107 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
17108     { echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
17109 echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
17110     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
17111 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
17112 esac
17113 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
17114 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
17115 if test "${ac_cv_header_sys_shm_h+set}" = set; then
17116   echo $ECHO_N "(cached) $ECHO_C" >&6
17117 else
17118   ac_cv_header_sys_shm_h=$ac_header_preproc
17119 fi
17120 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
17121 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
17122
17123 fi
17124 if test $ac_cv_header_sys_shm_h = yes; then
17125   have_xshm=yes
17126 fi
17127
17128
17129   CPPFLAGS="$ac_save_CPPFLAGS"
17130   fi
17131
17132   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
17133   # to exist, but the library code to not exist.  And even better, the library
17134   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
17135   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
17136   # that's not quite right, but close enough.)
17137   #
17138   case "$host" in
17139     *-aix*)
17140       if  `uname -v` -eq 3 ; then
17141         have_xshm=no
17142
17143   ac_save_CPPFLAGS="$CPPFLAGS"
17144   ac_save_LDFLAGS="$LDFLAGS"
17145 #  ac_save_LIBS="$LIBS"
17146
17147   if test \! -z "$includedir" ; then
17148     CPPFLAGS="$CPPFLAGS -I$includedir"
17149   fi
17150   # note: $X_CFLAGS includes $x_includes
17151   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17152
17153   if test \! -z "$libdir" ; then
17154     LDFLAGS="$LDFLAGS -L$libdir"
17155   fi
17156   # note: $X_LIBS includes $x_libraries
17157   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17158
17159   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
17160 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
17161 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
17162   echo $ECHO_N "(cached) $ECHO_C" >&6
17163 else
17164   ac_check_lib_save_LIBS=$LIBS
17165 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
17166 cat >conftest.$ac_ext <<_ACEOF
17167 #line $LINENO "configure"
17168 #include "confdefs.h"
17169
17170 /* Override any gcc2 internal prototype to avoid an error.  */
17171 #ifdef __cplusplus
17172 extern "C"
17173 #endif
17174 /* We use char because int might match the return type of a gcc2
17175    builtin and then its argument prototype would still apply.  */
17176 char XShmQueryExtension ();
17177 #ifdef F77_DUMMY_MAIN
17178 #  ifdef __cplusplus
17179      extern "C"
17180 #  endif
17181    int F77_DUMMY_MAIN() { return 1; }
17182 #endif
17183 int
17184 main ()
17185 {
17186 XShmQueryExtension ();
17187   ;
17188   return 0;
17189 }
17190 _ACEOF
17191 rm -f conftest.$ac_objext conftest$ac_exeext
17192 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17193   (eval $ac_link) 2>&5
17194   ac_status=$?
17195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17196   (exit $ac_status); } &&
17197          { ac_try='test -s conftest$ac_exeext'
17198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17199   (eval $ac_try) 2>&5
17200   ac_status=$?
17201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17202   (exit $ac_status); }; }; then
17203   ac_cv_lib_XextSam_XShmQueryExtension=yes
17204 else
17205   echo "$as_me: failed program was:" >&5
17206 cat conftest.$ac_ext >&5
17207 ac_cv_lib_XextSam_XShmQueryExtension=no
17208 fi
17209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17210 LIBS=$ac_check_lib_save_LIBS
17211 fi
17212 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
17213 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
17214 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
17215   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
17216 else
17217   true
17218 fi
17219
17220   CPPFLAGS="$ac_save_CPPFLAGS"
17221   LDFLAGS="$ac_save_LDFLAGS"
17222 #  LIBS="$ac_save_LIBS"
17223
17224       fi
17225     ;;
17226   esac
17227
17228   # if that succeeded, then we've really got it.
17229   if test "$have_xshm" = yes; then
17230     cat >>confdefs.h <<\_ACEOF
17231 #define HAVE_XSHM_EXTENSION 1
17232 _ACEOF
17233
17234   fi
17235
17236 elif test "$with_xshm" != no; then
17237   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
17238   exit 1
17239 fi
17240
17241
17242 ###############################################################################
17243 #
17244 #       Check for the DOUBLE-BUFFER server extension.
17245 #
17246 ###############################################################################
17247
17248 have_xdbe=no
17249 with_xdbe_req=unspecified
17250
17251 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
17252 if test "${with_xdbe_ext+set}" = set; then
17253   withval="$with_xdbe_ext"
17254   with_xdbe="$withval"; with_xdbe_req="$withval"
17255 else
17256   with_xdbe=yes
17257 fi;
17258
17259
17260    case "$with_xdbe" in
17261     yes) ;;
17262     no)  ;;
17263
17264     /*)
17265      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
17266 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
17267      d=$with_xdbe/include
17268      if test -d $d; then
17269        X_CFLAGS="-I$d $X_CFLAGS"
17270        echo "$as_me:$LINENO: result: $d" >&5
17271 echo "${ECHO_T}$d" >&6
17272      else
17273        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17274 echo "${ECHO_T}not found ($d: no such directory)" >&6
17275      fi
17276
17277      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
17278 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
17279      d=$with_xdbe/lib
17280      if test -d $d; then
17281        X_LIBS="-L$d $X_LIBS"
17282        echo "$as_me:$LINENO: result: $d" >&5
17283 echo "${ECHO_T}$d" >&6
17284      else
17285        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17286 echo "${ECHO_T}not found ($d: no such directory)" >&6
17287      fi
17288
17289      # replace the directory string with "yes".
17290      with_xdbe_req="yes"
17291      with_xdbe=$with_xdbe_req
17292      ;;
17293
17294     *)
17295      echo ""
17296      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
17297      echo "       If it is a directory, then \`DIR/include' will be added to"
17298      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17299      exit 1
17300      ;;
17301    esac
17302
17303
17304 if test "$with_xdbe" = yes; then
17305
17306
17307   ac_save_CPPFLAGS="$CPPFLAGS"
17308   if test \! -z "$includedir" ; then
17309     CPPFLAGS="$CPPFLAGS -I$includedir"
17310   fi
17311   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17312   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
17313 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
17314 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
17315   echo $ECHO_N "(cached) $ECHO_C" >&6
17316 else
17317   cat >conftest.$ac_ext <<_ACEOF
17318 #line $LINENO "configure"
17319 #include "confdefs.h"
17320 #include <X11/Xlib.h>
17321
17322 #include <X11/extensions/Xdbe.h>
17323 _ACEOF
17324 rm -f conftest.$ac_objext
17325 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17326   (eval $ac_compile) 2>&5
17327   ac_status=$?
17328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17329   (exit $ac_status); } &&
17330          { ac_try='test -s conftest.$ac_objext'
17331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17332   (eval $ac_try) 2>&5
17333   ac_status=$?
17334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17335   (exit $ac_status); }; }; then
17336   ac_cv_header_X11_extensions_Xdbe_h=yes
17337 else
17338   echo "$as_me: failed program was:" >&5
17339 cat conftest.$ac_ext >&5
17340 ac_cv_header_X11_extensions_Xdbe_h=no
17341 fi
17342 rm -f conftest.$ac_objext conftest.$ac_ext
17343 fi
17344 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
17345 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
17346 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
17347   have_xdbe=yes
17348 fi
17349
17350
17351   CPPFLAGS="$ac_save_CPPFLAGS"
17352   if test "$have_xdbe" = yes; then
17353     cat >>confdefs.h <<\_ACEOF
17354 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
17355 _ACEOF
17356
17357   fi
17358
17359 elif test "$with_xdbe" != no; then
17360   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
17361   exit 1
17362 fi
17363
17364
17365 ###############################################################################
17366 #
17367 #       Check for the SGI XReadDisplay server extension.
17368 #
17369 #       Note: this has to be down here, rather than up with the other server
17370 #       extension tests, so that the output of `configure --help' is in the
17371 #       right order.  Arrgh!
17372 #
17373 ###############################################################################
17374
17375 have_readdisplay=no
17376 with_readdisplay_req=unspecified
17377
17378 # Check whether --with-readdisplay or --without-readdisplay was given.
17379 if test "${with_readdisplay+set}" = set; then
17380   withval="$with_readdisplay"
17381   with_readdisplay="$withval"; with_readdisplay_req="$withval"
17382 else
17383   with_readdisplay=yes
17384 fi;
17385
17386
17387    case "$with_readdisplay" in
17388     yes) ;;
17389     no)  ;;
17390
17391     /*)
17392      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
17393 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
17394      d=$with_readdisplay/include
17395      if test -d $d; then
17396        X_CFLAGS="-I$d $X_CFLAGS"
17397        echo "$as_me:$LINENO: result: $d" >&5
17398 echo "${ECHO_T}$d" >&6
17399      else
17400        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17401 echo "${ECHO_T}not found ($d: no such directory)" >&6
17402      fi
17403
17404      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
17405 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
17406      d=$with_readdisplay/lib
17407      if test -d $d; then
17408        X_LIBS="-L$d $X_LIBS"
17409        echo "$as_me:$LINENO: result: $d" >&5
17410 echo "${ECHO_T}$d" >&6
17411      else
17412        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17413 echo "${ECHO_T}not found ($d: no such directory)" >&6
17414      fi
17415
17416      # replace the directory string with "yes".
17417      with_readdisplay_req="yes"
17418      with_readdisplay=$with_readdisplay_req
17419      ;;
17420
17421     *)
17422      echo ""
17423      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
17424      echo "       If it is a directory, then \`DIR/include' will be added to"
17425      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17426      exit 1
17427      ;;
17428    esac
17429
17430
17431 if test "$with_readdisplay" = yes; then
17432
17433   ac_save_CPPFLAGS="$CPPFLAGS"
17434   if test \! -z "$includedir" ; then
17435     CPPFLAGS="$CPPFLAGS -I$includedir"
17436   fi
17437   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17438   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
17439 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
17440 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
17441   echo $ECHO_N "(cached) $ECHO_C" >&6
17442 else
17443   cat >conftest.$ac_ext <<_ACEOF
17444 #line $LINENO "configure"
17445 #include "confdefs.h"
17446 #include <X11/Xlib.h>
17447
17448 #include <X11/extensions/readdisplay.h>
17449 _ACEOF
17450 rm -f conftest.$ac_objext
17451 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17452   (eval $ac_compile) 2>&5
17453   ac_status=$?
17454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17455   (exit $ac_status); } &&
17456          { ac_try='test -s conftest.$ac_objext'
17457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17458   (eval $ac_try) 2>&5
17459   ac_status=$?
17460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17461   (exit $ac_status); }; }; then
17462   ac_cv_header_X11_extensions_readdisplay_h=yes
17463 else
17464   echo "$as_me: failed program was:" >&5
17465 cat conftest.$ac_ext >&5
17466 ac_cv_header_X11_extensions_readdisplay_h=no
17467 fi
17468 rm -f conftest.$ac_objext conftest.$ac_ext
17469 fi
17470 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
17471 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
17472 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
17473   cat >>confdefs.h <<\_ACEOF
17474 #define HAVE_READ_DISPLAY_EXTENSION 1
17475 _ACEOF
17476
17477 fi
17478
17479
17480   CPPFLAGS="$ac_save_CPPFLAGS"
17481 elif test "$with_readdisplay" != no; then
17482   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
17483   exit 1
17484 fi
17485
17486
17487 ###############################################################################
17488 #
17489 #       Check for a program to generate random text.
17490 #
17491 #       Zippy is funnier than the idiocy generally spat out by `fortune',
17492 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
17493 #
17494 #       We used to dig around in Emacs to look for the "yow" program, but
17495 #       most people who have Emacs also have "fortune zippy", so nevermind.
17496 #
17497 ###############################################################################
17498
17499 with_fortune_req=""
17500
17501 # Check whether --with-fortune or --without-fortune was given.
17502 if test "${with_fortune+set}" = set; then
17503   withval="$with_fortune"
17504   with_fortune_req="$withval"; with_fortune="$withval"
17505 else
17506   with_fortune=yes
17507 fi;
17508
17509 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
17510   with_fortune=""
17511   with_fortune_req=""
17512 fi
17513
17514 if test -n "$with_fortune_req" ; then
17515   ac_cv_fortune_program=""
17516   case "$with_fortune_req" in
17517     /*)
17518
17519       set dummy $with_fortune_req ; fortune_tmp=$2
17520       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
17521 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
17522       if test -x "$fortune_tmp" ; then
17523         echo "$as_me:$LINENO: result: yes" >&5
17524 echo "${ECHO_T}yes" >&6
17525       else
17526         echo "$as_me:$LINENO: result: no" >&5
17527 echo "${ECHO_T}no" >&6
17528         with_fortune=""
17529       fi
17530     ;;
17531     *)
17532       set dummy $with_fortune_req ; fortune_tmp=$2
17533       # don't cache
17534       unset ac_cv_path_fortune_tmp
17535       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
17536 set dummy $fortune_tmp; ac_word=$2
17537 echo "$as_me:$LINENO: checking for $ac_word" >&5
17538 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17539 if test "${ac_cv_path_fortune_tmp+set}" = set; then
17540   echo $ECHO_N "(cached) $ECHO_C" >&6
17541 else
17542   case $fortune_tmp in
17543   [\\/]* | ?:[\\/]*)
17544   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
17545   ;;
17546   *)
17547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17548 for as_dir in $PATH
17549 do
17550   IFS=$as_save_IFS
17551   test -z "$as_dir" && as_dir=.
17552   for ac_exec_ext in '' $ac_executable_extensions; do
17553   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17554     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
17555     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17556     break 2
17557   fi
17558 done
17559 done
17560
17561   ;;
17562 esac
17563 fi
17564 fortune_tmp=$ac_cv_path_fortune_tmp
17565
17566 if test -n "$fortune_tmp"; then
17567   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17568 echo "${ECHO_T}$fortune_tmp" >&6
17569 else
17570   echo "$as_me:$LINENO: result: no" >&5
17571 echo "${ECHO_T}no" >&6
17572 fi
17573
17574       if test -z "$fortune_tmp" ; then
17575         with_fortune=""
17576       fi
17577     ;;
17578   esac
17579   ac_cv_fortune_program="$with_fortune"
17580
17581 elif test -n "$ac_cv_fortune_program"; then
17582   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
17583 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
17584 fi
17585
17586 unset ac_cv_path_fortune_tmp
17587 unset fortune_tmp
17588
17589 if test -z "$ac_cv_fortune_program" ; then
17590
17591   # first look for fortune in /usr/games/ (and use absolute path)
17592   for ac_prog in fortune
17593 do
17594   # Extract the first word of "$ac_prog", so it can be a program name with args.
17595 set dummy $ac_prog; ac_word=$2
17596 echo "$as_me:$LINENO: checking for $ac_word" >&5
17597 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17598 if test "${ac_cv_path_fortune_tmp+set}" = set; then
17599   echo $ECHO_N "(cached) $ECHO_C" >&6
17600 else
17601   case $fortune_tmp in
17602   [\\/]* | ?:[\\/]*)
17603   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
17604   ;;
17605   *)
17606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17607 as_dummy=""/usr/games""
17608 for as_dir in $as_dummy
17609 do
17610   IFS=$as_save_IFS
17611   test -z "$as_dir" && as_dir=.
17612   for ac_exec_ext in '' $ac_executable_extensions; do
17613   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17614     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
17615     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17616     break 2
17617   fi
17618 done
17619 done
17620
17621   ;;
17622 esac
17623 fi
17624 fortune_tmp=$ac_cv_path_fortune_tmp
17625
17626 if test -n "$fortune_tmp"; then
17627   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17628 echo "${ECHO_T}$fortune_tmp" >&6
17629 else
17630   echo "$as_me:$LINENO: result: no" >&5
17631 echo "${ECHO_T}no" >&6
17632 fi
17633
17634   test -n "$fortune_tmp" && break
17635 done
17636
17637
17638   # if it's not there, look on $PATH (and don't use absolute path)
17639   if test -z "$fortune_tmp" ; then
17640      for ac_prog in fortune
17641 do
17642   # Extract the first word of "$ac_prog", so it can be a program name with args.
17643 set dummy $ac_prog; ac_word=$2
17644 echo "$as_me:$LINENO: checking for $ac_word" >&5
17645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17646 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
17647   echo $ECHO_N "(cached) $ECHO_C" >&6
17648 else
17649   if test -n "$fortune_tmp"; then
17650   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
17651 else
17652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17653 for as_dir in $PATH
17654 do
17655   IFS=$as_save_IFS
17656   test -z "$as_dir" && as_dir=.
17657   for ac_exec_ext in '' $ac_executable_extensions; do
17658   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17659     ac_cv_prog_fortune_tmp="$ac_prog"
17660     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17661     break 2
17662   fi
17663 done
17664 done
17665
17666 fi
17667 fi
17668 fortune_tmp=$ac_cv_prog_fortune_tmp
17669 if test -n "$fortune_tmp"; then
17670   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17671 echo "${ECHO_T}$fortune_tmp" >&6
17672 else
17673   echo "$as_me:$LINENO: result: no" >&5
17674 echo "${ECHO_T}no" >&6
17675 fi
17676
17677   test -n "$fortune_tmp" && break
17678 done
17679
17680   fi
17681
17682   # if we didn't find anything, then just assume /usr/games/
17683   if test -z "$fortune_tmp" ; then
17684      fortune_tmp="/usr/games/fortune"
17685   fi
17686
17687   ac_cv_fortune_program="$fortune_tmp"
17688
17689   # now check to see whether "fortune zippy" works.
17690   #
17691   fortune_tmp="$fortune_tmp zippy"
17692   echo "$as_me:$LINENO: checking for zippy quotes" >&5
17693 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
17694   if ( $fortune_tmp >/dev/null 2>&1 ); then
17695     ac_cv_fortune_program="$fortune_tmp"
17696     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17697 echo "${ECHO_T}$fortune_tmp" >&6
17698   else
17699     echo "$as_me:$LINENO: result: no" >&5
17700 echo "${ECHO_T}no" >&6
17701   fi
17702
17703 fi
17704
17705 unset ac_cv_path_fortune_tmp
17706 unset fortune_tmp
17707
17708 cat >>confdefs.h <<_ACEOF
17709 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
17710 _ACEOF
17711
17712
17713
17714 ###############################################################################
17715 #
17716 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
17717 #       This should be safe, but let's give people the option.
17718 #
17719 ###############################################################################
17720
17721 setuid_hacks_default=no
17722 setuid_hacks="$setuid_hacks_default"
17723
17724 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
17725 if test "${with_setuid_hacks+set}" = set; then
17726   withval="$with_setuid_hacks"
17727   setuid_hacks="$withval"
17728 else
17729   setuid_hacks="$setuid_hacks_default"
17730 fi;
17731
17732
17733    case "$setuid_hacks" in
17734     yes) ;;
17735     no)  ;;
17736
17737     /*)
17738      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
17739 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
17740      d=$setuid_hacks/include
17741      if test -d $d; then
17742        X_CFLAGS="-I$d $X_CFLAGS"
17743        echo "$as_me:$LINENO: result: $d" >&5
17744 echo "${ECHO_T}$d" >&6
17745      else
17746        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17747 echo "${ECHO_T}not found ($d: no such directory)" >&6
17748      fi
17749
17750      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
17751 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
17752      d=$setuid_hacks/lib
17753      if test -d $d; then
17754        X_LIBS="-L$d $X_LIBS"
17755        echo "$as_me:$LINENO: result: $d" >&5
17756 echo "${ECHO_T}$d" >&6
17757      else
17758        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17759 echo "${ECHO_T}not found ($d: no such directory)" >&6
17760      fi
17761
17762      # replace the directory string with "yes".
17763      setuid_hacks_req="yes"
17764      setuid_hacks=$setuid_hacks_req
17765      ;;
17766
17767     *)
17768      echo ""
17769      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
17770      echo "       If it is a directory, then \`DIR/include' will be added to"
17771      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17772      exit 1
17773      ;;
17774    esac
17775
17776
17777 if test "$setuid_hacks" = yes; then
17778   true
17779 elif test "$setuid_hacks" != no; then
17780   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
17781   exit 1
17782 fi
17783
17784
17785 ###############################################################################
17786 #
17787 #       Done testing.  Now, set up the various -I and -L variables,
17788 #       and decide which GUI program to build by default.
17789 #
17790 ###############################################################################
17791
17792 DEPEND=makedepend
17793 DEPEND_FLAGS=
17794 DEPEND_DEFINES=
17795
17796
17797 if test \! -z "$includedir" ; then
17798   INCLUDES="$INCLUDES -I$includedir"
17799 fi
17800
17801 if test \! -z "$libdir" ; then
17802   LDFLAGS="$LDFLAGS -L$libdir"
17803 fi
17804
17805
17806 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
17807 ALL_DEMO_PROGRAMS=
17808 if test "$have_motif" = yes; then
17809   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
17810   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
17811 fi
17812 if test "$have_gtk" = yes; then
17813   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
17814   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
17815 fi
17816
17817
17818 if test "$have_kerberos" = yes; then
17819   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
17820   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
17821 fi
17822 if test "$have_pam" = yes; then
17823   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
17824   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
17825   INSTALL_PAM="install-pam"
17826 fi
17827   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
17828   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
17829
17830
17831 if test "$enable_locking" = yes; then
17832   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
17833   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
17834 else
17835   LOCK_SRCS='$(NOLOCK_SRCS_1)'
17836   LOCK_OBJS='$(NOLOCK_OBJS_1)'
17837 fi
17838
17839 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
17840
17841 if test "$need_setuid" = yes; then
17842   NEED_SETUID=yes
17843 else
17844   NEED_SETUID=no
17845 fi
17846
17847 if test "$setuid_hacks" = yes; then
17848   SETUID_HACKS=yes
17849 else
17850   SETUID_HACKS=no
17851 fi
17852
17853 tab='   '
17854 if test "$have_gl" = yes; then
17855   GL_EXES='$(GL_EXES)'
17856   GL_UTIL_EXES='$(GL_UTIL_EXES)'
17857   GL_MEN='$(GL_MEN)'
17858   GL_KLUDGE="${tab}  "
17859 else
17860   GL_KLUDGE="-${tab}  "
17861 fi
17862
17863 if test "$have_gle" = yes; then
17864   GLE_EXES='$(GLE_EXES)'
17865   GLE_KLUDGE="${tab}   "
17866 else
17867   GLE_KLUDGE="-${tab}   "
17868 fi
17869
17870 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
17871  JPEG_EXES='$(JPEG_EXES)'
17872 fi
17873
17874
17875 # Another substitution in the XScreenSaver.ad.in file:
17876 #
17877 if test "$have_gnome_help" = yes; then
17878   GNOMEHELP_Y=''
17879   GNOMEHELP_N='!    '
17880 else
17881   GNOMEHELP_Y='!    '
17882   GNOMEHELP_N=''
17883 fi
17884
17885
17886 # Now that we know whether we have Gnome, we can decide where the XML
17887 # config files get installed.
17888 #
17889 if test -z "$HACK_CONF_DIR" ; then
17890   if test -n "$GNOME_DATADIR" ; then
17891     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
17892   else
17893     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
17894   fi
17895 fi
17896
17897
17898
17899 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
17900 # so that we know where to install the Gtk pixmaps.
17901 #
17902 # It should usually be "/usr/share/pixmaps/", but we can't just use
17903 # "$(prefix)/share/pixmaps" because that would usually result in
17904 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
17905 # Gnome/Gtk prefix, not the overall prefix.
17906 #
17907 if test -n "$GNOME_DATADIR" ; then
17908   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
17909 elif test "$have_gtk" = yes; then
17910   if test -n "$pkg_config"; then
17911     if test "$have_gtk2" = yes; then
17912       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
17913     else
17914       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+`
17915     fi
17916   else
17917     GLADE_DATADIR=`$gtk_config --prefix`
17918   fi
17919   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
17920 else
17921   GLADE_DATADIR=''
17922 fi
17923
17924
17925 # Set PO_DATADIR to something sensible.
17926 #
17927 echo "$as_me:$LINENO: checking for locale directory" >&5
17928 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
17929 if test -n "$GNOME_DATADIR" ; then
17930   PO_DATADIR="$GNOME_DATADIR"
17931 elif test "$have_gtk" = yes; then
17932   if test -n "$pkg_config"; then
17933     if test "$have_gtk2" = yes; then
17934       PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
17935     else
17936       PO_DATADIR=`$pkg_config --variable=prefix gtk+`
17937     fi
17938   else
17939     PO_DATADIR=`$gtk_config --prefix`
17940   fi
17941   PO_DATADIR="$PO_DATADIR/share"
17942 fi
17943
17944 if test -z "$PO_DATADIR" ; then
17945   #
17946   # #### Total fucking kludge --
17947   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
17948   # but of course we need to expand all the nested variables to do that...
17949   #
17950   dd=$datadir
17951   eval dd=${dd}
17952   eval dd=${dd}
17953   eval dd=${dd}
17954   eval dd=${dd}
17955   eval dd=${dd}
17956   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
17957 fi
17958
17959 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
17960 echo "${ECHO_T}$PO_DATADIR/locale" >&6
17961
17962
17963 # canonicalize slashes.
17964 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17965
17966 # gcc 3.0 likes to issue this warning for every file:
17967 #
17968 # cc1: warning: changing search order for system directory "/usr/local/include"
17969 # cc1: warning:   as it has already been specified as a non-system directory
17970 #
17971 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
17972 # Which *should* be totally redundant, and thus an ok thing to delete?
17973 #
17974 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
17975
17976
17977 ###############################################################################
17978 #
17979 #       Perform substitutions and write Makefiles.
17980 #
17981 ###############################################################################
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031 APPDEFAULTS=$ac_x_app_defaults
18032
18033
18034
18035
18036
18037
18038
18039 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad driver/xscreensaver.kss"
18040 cat >confcache <<\_ACEOF
18041 # This file is a shell script that caches the results of configure
18042 # tests run on this system so they can be shared between configure
18043 # scripts and configure runs, see configure's option --config-cache.
18044 # It is not useful on other systems.  If it contains results you don't
18045 # want to keep, you may remove or edit it.
18046 #
18047 # config.status only pays attention to the cache file if you give it
18048 # the --recheck option to rerun configure.
18049 #
18050 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18051 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18052 # following values.
18053
18054 _ACEOF
18055
18056 # The following way of writing the cache mishandles newlines in values,
18057 # but we know of no workaround that is simple, portable, and efficient.
18058 # So, don't put newlines in cache variables' values.
18059 # Ultrix sh set writes to stderr and can't be redirected directly,
18060 # and sets the high bit in the cache file unless we assign to the vars.
18061 {
18062   (set) 2>&1 |
18063     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18064     *ac_space=\ *)
18065       # `set' does not quote correctly, so add quotes (double-quote
18066       # substitution turns \\\\ into \\, and sed turns \\ into \).
18067       sed -n \
18068         "s/'/'\\\\''/g;
18069           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18070       ;;
18071     *)
18072       # `set' quotes correctly as required by POSIX, so do not add quotes.
18073       sed -n \
18074         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18075       ;;
18076     esac;
18077 } |
18078   sed '
18079      t clear
18080      : clear
18081      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18082      t end
18083      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18084      : end' >>confcache
18085 if cmp -s $cache_file confcache; then :; else
18086   if test -w $cache_file; then
18087     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18088     cat confcache >$cache_file
18089   else
18090     echo "not updating unwritable cache $cache_file"
18091   fi
18092 fi
18093 rm -f confcache
18094
18095 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18096 # Let make expand exec_prefix.
18097 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18098
18099 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18100 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18101 # trailing colons and then remove the whole line if VPATH becomes empty
18102 # (actually we leave an empty line to preserve line numbers).
18103 if test "x$srcdir" = x.; then
18104   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18105 s/:*\$(srcdir):*/:/;
18106 s/:*\${srcdir}:*/:/;
18107 s/:*@srcdir@:*/:/;
18108 s/^\([^=]*=[    ]*\):*/\1/;
18109 s/:*$//;
18110 s/^[^=]*=[      ]*$//;
18111 }'
18112 fi
18113
18114 DEFS=-DHAVE_CONFIG_H
18115
18116
18117
18118         mv -f po/POTFILES po/POTFILES.tmp
18119         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
18120         rm -f po/POTFILES.tmp
18121
18122
18123
18124 : ${CONFIG_STATUS=./config.status}
18125 ac_clean_files_save=$ac_clean_files
18126 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18127 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18128 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18129 cat >$CONFIG_STATUS <<_ACEOF
18130 #! $SHELL
18131 # Generated by $as_me.
18132 # Run this file to recreate the current configuration.
18133 # Compiler output produced by configure, useful for debugging
18134 # configure, is in config.log if it exists.
18135
18136 debug=false
18137 SHELL=\${CONFIG_SHELL-$SHELL}
18138 _ACEOF
18139
18140 cat >>$CONFIG_STATUS <<\_ACEOF
18141
18142 ## --------------------- ##
18143 ## M4sh Initialization.  ##
18144 ## --------------------- ##
18145
18146 # Be Bourne compatible
18147 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18148   emulate sh
18149   NULLCMD=:
18150 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18151   set -o posix
18152 fi
18153
18154 # NLS nuisances.
18155 # Support unset when possible.
18156 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18157   as_unset=unset
18158 else
18159   as_unset=false
18160 fi
18161
18162 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
18163     { $as_unset LANG || test "${LANG+set}" != set; } ||
18164       { LANG=C; export LANG; }
18165 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
18166     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
18167       { LC_ALL=C; export LC_ALL; }
18168 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
18169     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
18170       { LC_TIME=C; export LC_TIME; }
18171 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
18172     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
18173       { LC_CTYPE=C; export LC_CTYPE; }
18174 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
18175     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
18176       { LANGUAGE=C; export LANGUAGE; }
18177 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
18178     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
18179       { LC_COLLATE=C; export LC_COLLATE; }
18180 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
18181     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
18182       { LC_NUMERIC=C; export LC_NUMERIC; }
18183 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
18184     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
18185       { LC_MESSAGES=C; export LC_MESSAGES; }
18186
18187
18188 # Name of the executable.
18189 as_me=`(basename "$0") 2>/dev/null ||
18190 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18191          X"$0" : 'X\(//\)$' \| \
18192          X"$0" : 'X\(/\)$' \| \
18193          .     : '\(.\)' 2>/dev/null ||
18194 echo X/"$0" |
18195     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18196           /^X\/\(\/\/\)$/{ s//\1/; q; }
18197           /^X\/\(\/\).*/{ s//\1/; q; }
18198           s/.*/./; q'`
18199
18200 # PATH needs CR, and LINENO needs CR and PATH.
18201 # Avoid depending upon Character Ranges.
18202 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18203 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18204 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18205 as_cr_digits='0123456789'
18206 as_cr_alnum=$as_cr_Letters$as_cr_digits
18207
18208 # The user is always right.
18209 if test "${PATH_SEPARATOR+set}" != set; then
18210   echo "#! /bin/sh" >conftest.sh
18211   echo  "exit 0"   >>conftest.sh
18212   chmod +x conftest.sh
18213   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
18214     PATH_SEPARATOR=';'
18215   else
18216     PATH_SEPARATOR=:
18217   fi
18218   rm -f conftest.sh
18219 fi
18220
18221
18222   as_lineno_1=$LINENO
18223   as_lineno_2=$LINENO
18224   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18225   test "x$as_lineno_1" != "x$as_lineno_2" &&
18226   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
18227   # Find who we are.  Look in the path if we contain no path at all
18228   # relative or not.
18229   case $0 in
18230     *[\\/]* ) as_myself=$0 ;;
18231     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18232 for as_dir in $PATH
18233 do
18234   IFS=$as_save_IFS
18235   test -z "$as_dir" && as_dir=.
18236   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18237 done
18238
18239        ;;
18240   esac
18241   # We did not find ourselves, most probably we were run as `sh COMMAND'
18242   # in which case we are not to be found in the path.
18243   if test "x$as_myself" = x; then
18244     as_myself=$0
18245   fi
18246   if test ! -f "$as_myself"; then
18247     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18248 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18249    { (exit 1); exit 1; }; }
18250   fi
18251   case $CONFIG_SHELL in
18252   '')
18253     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18254 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18255 do
18256   IFS=$as_save_IFS
18257   test -z "$as_dir" && as_dir=.
18258   for as_base in sh bash ksh sh5; do
18259          case $as_dir in
18260          /*)
18261            if ("$as_dir/$as_base" -c '
18262   as_lineno_1=$LINENO
18263   as_lineno_2=$LINENO
18264   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18265   test "x$as_lineno_1" != "x$as_lineno_2" &&
18266   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
18267              CONFIG_SHELL=$as_dir/$as_base
18268              export CONFIG_SHELL
18269              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18270            fi;;
18271          esac
18272        done
18273 done
18274 ;;
18275   esac
18276
18277   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18278   # uniformly replaced by the line number.  The first 'sed' inserts a
18279   # line-number line before each line; the second 'sed' does the real
18280   # work.  The second script uses 'N' to pair each line-number line
18281   # with the numbered line, and appends trailing '-' during
18282   # substitution so that $LINENO is not a special case at line end.
18283   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18284   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
18285   sed '=' <$as_myself |
18286     sed '
18287       N
18288       s,$,-,
18289       : loop
18290       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18291       t loop
18292       s,-$,,
18293       s,^['$as_cr_digits']*\n,,
18294     ' >$as_me.lineno &&
18295   chmod +x $as_me.lineno ||
18296     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18297 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18298    { (exit 1); exit 1; }; }
18299
18300   # Don't try to exec as it changes $[0], causing all sort of problems
18301   # (the dirname of $[0] is not the place where we might find the
18302   # original and so on.  Autoconf is especially sensible to this).
18303   . ./$as_me.lineno
18304   # Exit status is that of the last command.
18305   exit
18306 }
18307
18308
18309 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18310   *c*,-n*) ECHO_N= ECHO_C='
18311 ' ECHO_T='      ' ;;
18312   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18313   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
18314 esac
18315
18316 if expr a : '\(a\)' >/dev/null 2>&1; then
18317   as_expr=expr
18318 else
18319   as_expr=false
18320 fi
18321
18322 rm -f conf$$ conf$$.exe conf$$.file
18323 echo >conf$$.file
18324 if ln -s conf$$.file conf$$ 2>/dev/null; then
18325   # We could just check for DJGPP; but this test a) works b) is more generic
18326   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18327   if test -f conf$$.exe; then
18328     # Don't use ln at all; we don't have any links
18329     as_ln_s='cp -p'
18330   else
18331     as_ln_s='ln -s'
18332   fi
18333 elif ln conf$$.file conf$$ 2>/dev/null; then
18334   as_ln_s=ln
18335 else
18336   as_ln_s='cp -p'
18337 fi
18338 rm -f conf$$ conf$$.exe conf$$.file
18339
18340 as_executable_p="test -f"
18341
18342 # Sed expression to map a string onto a valid CPP name.
18343 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18344
18345 # Sed expression to map a string onto a valid variable name.
18346 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18347
18348
18349 # IFS
18350 # We need space, tab and new line, in precisely that order.
18351 as_nl='
18352 '
18353 IFS="   $as_nl"
18354
18355 # CDPATH.
18356 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
18357
18358 exec 6>&1
18359
18360 # Open the log real soon, to keep \$[0] and so on meaningful, and to
18361 # report actual input values of CONFIG_FILES etc. instead of their
18362 # values after options handling.  Logging --version etc. is OK.
18363 exec 5>>config.log
18364 {
18365   echo
18366   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18367 ## Running $as_me. ##
18368 _ASBOX
18369 } >&5
18370 cat >&5 <<_CSEOF
18371
18372 This file was extended by $as_me, which was
18373 generated by GNU Autoconf 2.53.  Invocation command line was
18374
18375   CONFIG_FILES    = $CONFIG_FILES
18376   CONFIG_HEADERS  = $CONFIG_HEADERS
18377   CONFIG_LINKS    = $CONFIG_LINKS
18378   CONFIG_COMMANDS = $CONFIG_COMMANDS
18379   $ $0 $@
18380
18381 _CSEOF
18382 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18383 echo >&5
18384 _ACEOF
18385
18386 # Files that config.status was made for.
18387 if test -n "$ac_config_files"; then
18388   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18389 fi
18390
18391 if test -n "$ac_config_headers"; then
18392   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18393 fi
18394
18395 if test -n "$ac_config_links"; then
18396   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18397 fi
18398
18399 if test -n "$ac_config_commands"; then
18400   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18401 fi
18402
18403 cat >>$CONFIG_STATUS <<\_ACEOF
18404
18405 ac_cs_usage="\
18406 \`$as_me' instantiates files from templates according to the
18407 current configuration.
18408
18409 Usage: $0 [OPTIONS] [FILE]...
18410
18411   -h, --help       print this help, then exit
18412   -V, --version    print version number, then exit
18413   -d, --debug      don't remove temporary files
18414       --recheck    update $as_me by reconfiguring in the same conditions
18415   --file=FILE[:TEMPLATE]
18416                    instantiate the configuration file FILE
18417   --header=FILE[:TEMPLATE]
18418                    instantiate the configuration header FILE
18419
18420 Configuration files:
18421 $config_files
18422
18423 Configuration headers:
18424 $config_headers
18425
18426 Configuration commands:
18427 $config_commands
18428
18429 Report bugs to <bug-autoconf@gnu.org>."
18430 _ACEOF
18431
18432 cat >>$CONFIG_STATUS <<_ACEOF
18433 ac_cs_version="\\
18434 config.status
18435 configured by $0, generated by GNU Autoconf 2.53,
18436   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18437
18438 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18439 Free Software Foundation, Inc.
18440 This config.status script is free software; the Free Software Foundation
18441 gives unlimited permission to copy, distribute and modify it."
18442 srcdir=$srcdir
18443 INSTALL="$INSTALL"
18444 _ACEOF
18445
18446 cat >>$CONFIG_STATUS <<\_ACEOF
18447 # If no file are specified by the user, then we need to provide default
18448 # value.  By we need to know if files were specified by the user.
18449 ac_need_defaults=:
18450 while test $# != 0
18451 do
18452   case $1 in
18453   --*=*)
18454     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18455     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18456     shift
18457     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18458     shift
18459     ;;
18460   -*);;
18461   *) # This is not an option, so the user has probably given explicit
18462      # arguments.
18463      ac_need_defaults=false;;
18464   esac
18465
18466   case $1 in
18467   # Handling of the options.
18468 _ACEOF
18469 cat >>$CONFIG_STATUS <<_ACEOF
18470   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18471     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18472     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18473 _ACEOF
18474 cat >>$CONFIG_STATUS <<\_ACEOF
18475   --version | --vers* | -V )
18476     echo "$ac_cs_version"; exit 0 ;;
18477   --he | --h)
18478     # Conflict between --help and --header
18479     { { echo "$as_me:$LINENO: error: ambiguous option: $1
18480 Try \`$0 --help' for more information." >&5
18481 echo "$as_me: error: ambiguous option: $1
18482 Try \`$0 --help' for more information." >&2;}
18483    { (exit 1); exit 1; }; };;
18484   --help | --hel | -h )
18485     echo "$ac_cs_usage"; exit 0 ;;
18486   --debug | --d* | -d )
18487     debug=: ;;
18488   --file | --fil | --fi | --f )
18489     shift
18490     CONFIG_FILES="$CONFIG_FILES $1"
18491     ac_need_defaults=false;;
18492   --header | --heade | --head | --hea )
18493     shift
18494     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18495     ac_need_defaults=false;;
18496
18497   # This is an error.
18498   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18499 Try \`$0 --help' for more information." >&5
18500 echo "$as_me: error: unrecognized option: $1
18501 Try \`$0 --help' for more information." >&2;}
18502    { (exit 1); exit 1; }; } ;;
18503
18504   *) ac_config_targets="$ac_config_targets $1" ;;
18505
18506   esac
18507   shift
18508 done
18509
18510 _ACEOF
18511
18512 cat >>$CONFIG_STATUS <<_ACEOF
18513 #
18514 # INIT-COMMANDS section.
18515 #
18516
18517 INTLTOOL_PERL=${INTLTOOL_PERL}
18518
18519
18520 _ACEOF
18521
18522
18523
18524 cat >>$CONFIG_STATUS <<\_ACEOF
18525 for ac_config_target in $ac_config_targets
18526 do
18527   case "$ac_config_target" in
18528   # Handling of arguments.
18529   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18530   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
18531   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
18532   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
18533   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
18534   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
18535   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
18536   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
18537   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
18538   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
18539   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
18540   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18541 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18542    { (exit 1); exit 1; }; };;
18543   esac
18544 done
18545
18546 # If the user did not use the arguments to specify the items to instantiate,
18547 # then the envvar interface is used.  Set only those that are not.
18548 # We use the long form for the default assignment because of an extremely
18549 # bizarre bug on SunOS 4.1.3.
18550 if $ac_need_defaults; then
18551   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18552   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18553   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18554 fi
18555
18556 # Create a temporary directory, and hook for its removal unless debugging.
18557 $debug ||
18558 {
18559   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18560   trap '{ (exit 1); exit 1; }' 1 2 13 15
18561 }
18562
18563 # Create a (secure) tmp directory for tmp files.
18564 : ${TMPDIR=/tmp}
18565 {
18566   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18567   test -n "$tmp" && test -d "$tmp"
18568 }  ||
18569 {
18570   tmp=$TMPDIR/cs$$-$RANDOM
18571   (umask 077 && mkdir $tmp)
18572 } ||
18573 {
18574    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18575    { (exit 1); exit 1; }
18576 }
18577
18578 _ACEOF
18579
18580 cat >>$CONFIG_STATUS <<_ACEOF
18581
18582 #
18583 # CONFIG_FILES section.
18584 #
18585
18586 # No need to generate the scripts if there are no CONFIG_FILES.
18587 # This happens for instance when ./config.status config.h
18588 if test -n "\$CONFIG_FILES"; then
18589   # Protect against being on the right side of a sed subst in config.status.
18590   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18591    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18592 s,@SHELL@,$SHELL,;t t
18593 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18594 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18595 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18596 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18597 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18598 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18599 s,@exec_prefix@,$exec_prefix,;t t
18600 s,@prefix@,$prefix,;t t
18601 s,@program_transform_name@,$program_transform_name,;t t
18602 s,@bindir@,$bindir,;t t
18603 s,@sbindir@,$sbindir,;t t
18604 s,@libexecdir@,$libexecdir,;t t
18605 s,@datadir@,$datadir,;t t
18606 s,@sysconfdir@,$sysconfdir,;t t
18607 s,@sharedstatedir@,$sharedstatedir,;t t
18608 s,@localstatedir@,$localstatedir,;t t
18609 s,@libdir@,$libdir,;t t
18610 s,@includedir@,$includedir,;t t
18611 s,@oldincludedir@,$oldincludedir,;t t
18612 s,@infodir@,$infodir,;t t
18613 s,@mandir@,$mandir,;t t
18614 s,@build_alias@,$build_alias,;t t
18615 s,@host_alias@,$host_alias,;t t
18616 s,@target_alias@,$target_alias,;t t
18617 s,@DEFS@,$DEFS,;t t
18618 s,@ECHO_C@,$ECHO_C,;t t
18619 s,@ECHO_N@,$ECHO_N,;t t
18620 s,@ECHO_T@,$ECHO_T,;t t
18621 s,@LIBS@,$LIBS,;t t
18622 s,@build@,$build,;t t
18623 s,@build_cpu@,$build_cpu,;t t
18624 s,@build_vendor@,$build_vendor,;t t
18625 s,@build_os@,$build_os,;t t
18626 s,@host@,$host,;t t
18627 s,@host_cpu@,$host_cpu,;t t
18628 s,@host_vendor@,$host_vendor,;t t
18629 s,@host_os@,$host_os,;t t
18630 s,@CC@,$CC,;t t
18631 s,@CFLAGS@,$CFLAGS,;t t
18632 s,@LDFLAGS@,$LDFLAGS,;t t
18633 s,@CPPFLAGS@,$CPPFLAGS,;t t
18634 s,@ac_ct_CC@,$ac_ct_CC,;t t
18635 s,@EXEEXT@,$EXEEXT,;t t
18636 s,@OBJEXT@,$OBJEXT,;t t
18637 s,@CPP@,$CPP,;t t
18638 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18639 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18640 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18641 s,@SET_MAKE@,$SET_MAKE,;t t
18642 s,@PERL@,$PERL,;t t
18643 s,@X_CFLAGS@,$X_CFLAGS,;t t
18644 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18645 s,@X_LIBS@,$X_LIBS,;t t
18646 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18647 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
18648 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
18649 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
18650 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
18651 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
18652 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
18653 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
18654 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
18655 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
18656 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
18657 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
18658 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
18659 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
18660 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
18661 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
18662 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
18663 s,@RANLIB@,$RANLIB,;t t
18664 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18665 s,@ALLOCA@,$ALLOCA,;t t
18666 s,@USE_NLS@,$USE_NLS,;t t
18667 s,@MSGFMT@,$MSGFMT,;t t
18668 s,@GMSGFMT@,$GMSGFMT,;t t
18669 s,@XGETTEXT@,$XGETTEXT,;t t
18670 s,@CATALOGS@,$CATALOGS,;t t
18671 s,@CATOBJEXT@,$CATOBJEXT,;t t
18672 s,@DATADIRNAME@,$DATADIRNAME,;t t
18673 s,@GMOFILES@,$GMOFILES,;t t
18674 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
18675 s,@INTLDEPS@,$INTLDEPS,;t t
18676 s,@INTLLIBS@,$INTLLIBS,;t t
18677 s,@INTLOBJS@,$INTLOBJS,;t t
18678 s,@POFILES@,$POFILES,;t t
18679 s,@POSUB@,$POSUB,;t t
18680 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
18681 s,@pkg_config@,$pkg_config,;t t
18682 s,@glib_config@,$glib_config,;t t
18683 s,@gtk_config@,$gtk_config,;t t
18684 s,@gnome_config@,$gnome_config,;t t
18685 s,@have_gnome_help@,$have_gnome_help,;t t
18686 s,@xml_config@,$xml_config,;t t
18687 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
18688 s,@fortune_tmp@,$fortune_tmp,;t t
18689 s,@INCLUDES@,$INCLUDES,;t t
18690 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
18691 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
18692 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
18693 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
18694 s,@GTK_LIBS@,$GTK_LIBS,;t t
18695 s,@XML_LIBS@,$XML_LIBS,;t t
18696 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
18697 s,@HACK_LIBS@,$HACK_LIBS,;t t
18698 s,@XPM_LIBS@,$XPM_LIBS,;t t
18699 s,@GL_LIBS@,$GL_LIBS,;t t
18700 s,@GLE_LIBS@,$GLE_LIBS,;t t
18701 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
18702 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
18703 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
18704 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
18705 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
18706 s,@NEED_SETUID@,$NEED_SETUID,;t t
18707 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
18708 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
18709 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
18710 s,@XMU_SRCS@,$XMU_SRCS,;t t
18711 s,@XMU_OBJS@,$XMU_OBJS,;t t
18712 s,@XMU_LIBS@,$XMU_LIBS,;t t
18713 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
18714 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
18715 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
18716 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
18717 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
18718 s,@JPEG_EXES@,$JPEG_EXES,;t t
18719 s,@GL_EXES@,$GL_EXES,;t t
18720 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
18721 s,@GL_MEN@,$GL_MEN,;t t
18722 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
18723 s,@GLE_EXES@,$GLE_EXES,;t t
18724 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
18725 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
18726 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
18727 s,@HACKDIR@,$HACKDIR,;t t
18728 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
18729 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
18730 s,@PO_DATADIR@,$PO_DATADIR,;t t
18731 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
18732 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
18733 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
18734 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
18735 s,@DEPEND@,$DEPEND,;t t
18736 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
18737 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
18738 CEOF
18739
18740 _ACEOF
18741
18742   cat >>$CONFIG_STATUS <<\_ACEOF
18743   # Split the substitutions into bite-sized pieces for seds with
18744   # small command number limits, like on Digital OSF/1 and HP-UX.
18745   ac_max_sed_lines=48
18746   ac_sed_frag=1 # Number of current file.
18747   ac_beg=1 # First line for current file.
18748   ac_end=$ac_max_sed_lines # Line after last line for current file.
18749   ac_more_lines=:
18750   ac_sed_cmds=
18751   while $ac_more_lines; do
18752     if test $ac_beg -gt 1; then
18753       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18754     else
18755       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18756     fi
18757     if test ! -s $tmp/subs.frag; then
18758       ac_more_lines=false
18759     else
18760       # The purpose of the label and of the branching condition is to
18761       # speed up the sed processing (if there are no `@' at all, there
18762       # is no need to browse any of the substitutions).
18763       # These are the two extra sed commands mentioned above.
18764       (echo ':t
18765   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18766       if test -z "$ac_sed_cmds"; then
18767         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18768       else
18769         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18770       fi
18771       ac_sed_frag=`expr $ac_sed_frag + 1`
18772       ac_beg=$ac_end
18773       ac_end=`expr $ac_end + $ac_max_sed_lines`
18774     fi
18775   done
18776   if test -z "$ac_sed_cmds"; then
18777     ac_sed_cmds=cat
18778   fi
18779 fi # test -n "$CONFIG_FILES"
18780
18781 _ACEOF
18782 cat >>$CONFIG_STATUS <<\_ACEOF
18783 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18784   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18785   case $ac_file in
18786   - | *:- | *:-:* ) # input from stdin
18787         cat >$tmp/stdin
18788         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18789         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18790   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18791         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18792   * )   ac_file_in=$ac_file.in ;;
18793   esac
18794
18795   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18796   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18797 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18798          X"$ac_file" : 'X\(//\)[^/]' \| \
18799          X"$ac_file" : 'X\(//\)$' \| \
18800          X"$ac_file" : 'X\(/\)' \| \
18801          .     : '\(.\)' 2>/dev/null ||
18802 echo X"$ac_file" |
18803     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18804           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18805           /^X\(\/\/\)$/{ s//\1/; q; }
18806           /^X\(\/\).*/{ s//\1/; q; }
18807           s/.*/./; q'`
18808   { case "$ac_dir" in
18809   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18810   *)                      as_incr_dir=.;;
18811 esac
18812 as_dummy="$ac_dir"
18813 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18814   case $as_mkdir_dir in
18815     # Skip DOS drivespec
18816     ?:) as_incr_dir=$as_mkdir_dir ;;
18817     *)
18818       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18819       test -d "$as_incr_dir" ||
18820         mkdir "$as_incr_dir" ||
18821         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18822 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18823    { (exit 1); exit 1; }; }
18824     ;;
18825   esac
18826 done; }
18827
18828   ac_builddir=.
18829
18830 if test "$ac_dir" != .; then
18831   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18832   # A "../" for each directory in $ac_dir_suffix.
18833   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18834 else
18835   ac_dir_suffix= ac_top_builddir=
18836 fi
18837
18838 case $srcdir in
18839   .)  # No --srcdir option.  We are building in place.
18840     ac_srcdir=.
18841     if test -z "$ac_top_builddir"; then
18842        ac_top_srcdir=.
18843     else
18844        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18845     fi ;;
18846   [\\/]* | ?:[\\/]* )  # Absolute path.
18847     ac_srcdir=$srcdir$ac_dir_suffix;
18848     ac_top_srcdir=$srcdir ;;
18849   *) # Relative path.
18850     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18851     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18852 esac
18853 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18854 # absolute.
18855 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18856 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
18857 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18858 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18859
18860
18861   case $INSTALL in
18862   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18863   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18864   esac
18865
18866   if test x"$ac_file" != x-; then
18867     { echo "$as_me:$LINENO: creating $ac_file" >&5
18868 echo "$as_me: creating $ac_file" >&6;}
18869     rm -f "$ac_file"
18870   fi
18871   # Let's still pretend it is `configure' which instantiates (i.e., don't
18872   # use $as_me), people would be surprised to read:
18873   #    /* config.h.  Generated by config.status.  */
18874   if test x"$ac_file" = x-; then
18875     configure_input=
18876   else
18877     configure_input="$ac_file.  "
18878   fi
18879   configure_input=$configure_input"Generated from `echo $ac_file_in |
18880                                      sed 's,.*/,,'` by configure."
18881
18882   # First look for the input files in the build tree, otherwise in the
18883   # src tree.
18884   ac_file_inputs=`IFS=:
18885     for f in $ac_file_in; do
18886       case $f in
18887       -) echo $tmp/stdin ;;
18888       [\\/$]*)
18889          # Absolute (can't be DOS-style, as IFS=:)
18890          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18891 echo "$as_me: error: cannot find input file: $f" >&2;}
18892    { (exit 1); exit 1; }; }
18893          echo $f;;
18894       *) # Relative
18895          if test -f "$f"; then
18896            # Build tree
18897            echo $f
18898          elif test -f "$srcdir/$f"; then
18899            # Source tree
18900            echo $srcdir/$f
18901          else
18902            # /dev/null tree
18903            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18904 echo "$as_me: error: cannot find input file: $f" >&2;}
18905    { (exit 1); exit 1; }; }
18906          fi;;
18907       esac
18908     done` || { (exit 1); exit 1; }
18909 _ACEOF
18910 cat >>$CONFIG_STATUS <<_ACEOF
18911   sed "$ac_vpsub
18912 $extrasub
18913 _ACEOF
18914 cat >>$CONFIG_STATUS <<\_ACEOF
18915 :t
18916 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18917 s,@configure_input@,$configure_input,;t t
18918 s,@srcdir@,$ac_srcdir,;t t
18919 s,@abs_srcdir@,$ac_abs_srcdir,;t t
18920 s,@top_srcdir@,$ac_top_srcdir,;t t
18921 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18922 s,@builddir@,$ac_builddir,;t t
18923 s,@abs_builddir@,$ac_abs_builddir,;t t
18924 s,@top_builddir@,$ac_top_builddir,;t t
18925 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18926 s,@INSTALL@,$ac_INSTALL,;t t
18927 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18928   rm -f $tmp/stdin
18929   if test x"$ac_file" != x-; then
18930     mv $tmp/out $ac_file
18931   else
18932     cat $tmp/out
18933     rm -f $tmp/out
18934   fi
18935
18936 done
18937 _ACEOF
18938 cat >>$CONFIG_STATUS <<\_ACEOF
18939
18940 #
18941 # CONFIG_HEADER section.
18942 #
18943
18944 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18945 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18946 #
18947 # ac_d sets the value in "#define NAME VALUE" lines.
18948 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18949 ac_dB='[        ].*$,\1#\2'
18950 ac_dC=' '
18951 ac_dD=',;t'
18952 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18953 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18954 ac_uB='$,\1#\2define\3'
18955 ac_uC=' '
18956 ac_uD=',;t'
18957
18958 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18959   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18960   case $ac_file in
18961   - | *:- | *:-:* ) # input from stdin
18962         cat >$tmp/stdin
18963         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18964         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18965   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18966         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18967   * )   ac_file_in=$ac_file.in ;;
18968   esac
18969
18970   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18971 echo "$as_me: creating $ac_file" >&6;}
18972
18973   # First look for the input files in the build tree, otherwise in the
18974   # src tree.
18975   ac_file_inputs=`IFS=:
18976     for f in $ac_file_in; do
18977       case $f in
18978       -) echo $tmp/stdin ;;
18979       [\\/$]*)
18980          # Absolute (can't be DOS-style, as IFS=:)
18981          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18982 echo "$as_me: error: cannot find input file: $f" >&2;}
18983    { (exit 1); exit 1; }; }
18984          echo $f;;
18985       *) # Relative
18986          if test -f "$f"; then
18987            # Build tree
18988            echo $f
18989          elif test -f "$srcdir/$f"; then
18990            # Source tree
18991            echo $srcdir/$f
18992          else
18993            # /dev/null tree
18994            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18995 echo "$as_me: error: cannot find input file: $f" >&2;}
18996    { (exit 1); exit 1; }; }
18997          fi;;
18998       esac
18999     done` || { (exit 1); exit 1; }
19000   # Remove the trailing spaces.
19001   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19002
19003 _ACEOF
19004
19005 # Transform confdefs.h into two sed scripts, `conftest.defines' and
19006 # `conftest.undefs', that substitutes the proper values into
19007 # config.h.in to produce config.h.  The first handles `#define'
19008 # templates, and the second `#undef' templates.
19009 # And first: Protect against being on the right side of a sed subst in
19010 # config.status.  Protect against being in an unquoted here document
19011 # in config.status.
19012 rm -f conftest.defines conftest.undefs
19013 # Using a here document instead of a string reduces the quoting nightmare.
19014 # Putting comments in sed scripts is not portable.
19015 #
19016 # `end' is used to avoid that the second main sed command (meant for
19017 # 0-ary CPP macros) applies to n-ary macro definitions.
19018 # See the Autoconf documentation for `clear'.
19019 cat >confdef2sed.sed <<\_ACEOF
19020 s/[\\&,]/\\&/g
19021 s,[\\$`],\\&,g
19022 t clear
19023 : clear
19024 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19025 t end
19026 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19027 : end
19028 _ACEOF
19029 # If some macros were called several times there might be several times
19030 # the same #defines, which is useless.  Nevertheless, we may not want to
19031 # sort them, since we want the *last* AC-DEFINE to be honored.
19032 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19033 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19034 rm -f confdef2sed.sed
19035
19036 # This sed command replaces #undef with comments.  This is necessary, for
19037 # example, in the case of _POSIX_SOURCE, which is predefined and required
19038 # on some systems where configure will not decide to define it.
19039 cat >>conftest.undefs <<\_ACEOF
19040 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19041 _ACEOF
19042
19043 # Break up conftest.defines because some shells have a limit on the size
19044 # of here documents, and old seds have small limits too (100 cmds).
19045 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
19046 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
19047 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19048 echo '  :' >>$CONFIG_STATUS
19049 rm -f conftest.tail
19050 while grep . conftest.defines >/dev/null
19051 do
19052   # Write a limited-size here document to $tmp/defines.sed.
19053   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19054   # Speed up: don't consider the non `#define' lines.
19055   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
19056   # Work around the forget-to-reset-the-flag bug.
19057   echo 't clr' >>$CONFIG_STATUS
19058   echo ': clr' >>$CONFIG_STATUS
19059   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19060   echo 'CEOF
19061   sed -f $tmp/defines.sed $tmp/in >$tmp/out
19062   rm -f $tmp/in
19063   mv $tmp/out $tmp/in
19064 ' >>$CONFIG_STATUS
19065   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19066   rm -f conftest.defines
19067   mv conftest.tail conftest.defines
19068 done
19069 rm -f conftest.defines
19070 echo '  fi # egrep' >>$CONFIG_STATUS
19071 echo >>$CONFIG_STATUS
19072
19073 # Break up conftest.undefs because some shells have a limit on the size
19074 # of here documents, and old seds have small limits too (100 cmds).
19075 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
19076 rm -f conftest.tail
19077 while grep . conftest.undefs >/dev/null
19078 do
19079   # Write a limited-size here document to $tmp/undefs.sed.
19080   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19081   # Speed up: don't consider the non `#undef'
19082   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
19083   # Work around the forget-to-reset-the-flag bug.
19084   echo 't clr' >>$CONFIG_STATUS
19085   echo ': clr' >>$CONFIG_STATUS
19086   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19087   echo 'CEOF
19088   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19089   rm -f $tmp/in
19090   mv $tmp/out $tmp/in
19091 ' >>$CONFIG_STATUS
19092   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19093   rm -f conftest.undefs
19094   mv conftest.tail conftest.undefs
19095 done
19096 rm -f conftest.undefs
19097
19098 cat >>$CONFIG_STATUS <<\_ACEOF
19099   # Let's still pretend it is `configure' which instantiates (i.e., don't
19100   # use $as_me), people would be surprised to read:
19101   #    /* config.h.  Generated by config.status.  */
19102   if test x"$ac_file" = x-; then
19103     echo "/* Generated by configure.  */" >$tmp/config.h
19104   else
19105     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
19106   fi
19107   cat $tmp/in >>$tmp/config.h
19108   rm -f $tmp/in
19109   if test x"$ac_file" != x-; then
19110     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19111       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19112 echo "$as_me: $ac_file is unchanged" >&6;}
19113     else
19114       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19115 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19116          X"$ac_file" : 'X\(//\)[^/]' \| \
19117          X"$ac_file" : 'X\(//\)$' \| \
19118          X"$ac_file" : 'X\(/\)' \| \
19119          .     : '\(.\)' 2>/dev/null ||
19120 echo X"$ac_file" |
19121     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19122           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19123           /^X\(\/\/\)$/{ s//\1/; q; }
19124           /^X\(\/\).*/{ s//\1/; q; }
19125           s/.*/./; q'`
19126       { case "$ac_dir" in
19127   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19128   *)                      as_incr_dir=.;;
19129 esac
19130 as_dummy="$ac_dir"
19131 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19132   case $as_mkdir_dir in
19133     # Skip DOS drivespec
19134     ?:) as_incr_dir=$as_mkdir_dir ;;
19135     *)
19136       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19137       test -d "$as_incr_dir" ||
19138         mkdir "$as_incr_dir" ||
19139         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
19140 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
19141    { (exit 1); exit 1; }; }
19142     ;;
19143   esac
19144 done; }
19145
19146       rm -f $ac_file
19147       mv $tmp/config.h $ac_file
19148     fi
19149   else
19150     cat $tmp/config.h
19151     rm -f $tmp/config.h
19152   fi
19153 done
19154 _ACEOF
19155 cat >>$CONFIG_STATUS <<\_ACEOF
19156
19157 #
19158 # CONFIG_COMMANDS section.
19159 #
19160 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19161   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19162   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19163   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19164 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19165          X"$ac_dest" : 'X\(//\)[^/]' \| \
19166          X"$ac_dest" : 'X\(//\)$' \| \
19167          X"$ac_dest" : 'X\(/\)' \| \
19168          .     : '\(.\)' 2>/dev/null ||
19169 echo X"$ac_dest" |
19170     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19171           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19172           /^X\(\/\/\)$/{ s//\1/; q; }
19173           /^X\(\/\).*/{ s//\1/; q; }
19174           s/.*/./; q'`
19175   ac_builddir=.
19176
19177 if test "$ac_dir" != .; then
19178   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19179   # A "../" for each directory in $ac_dir_suffix.
19180   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19181 else
19182   ac_dir_suffix= ac_top_builddir=
19183 fi
19184
19185 case $srcdir in
19186   .)  # No --srcdir option.  We are building in place.
19187     ac_srcdir=.
19188     if test -z "$ac_top_builddir"; then
19189        ac_top_srcdir=.
19190     else
19191        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19192     fi ;;
19193   [\\/]* | ?:[\\/]* )  # Absolute path.
19194     ac_srcdir=$srcdir$ac_dir_suffix;
19195     ac_top_srcdir=$srcdir ;;
19196   *) # Relative path.
19197     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19198     ac_top_srcdir=$ac_top_builddir$srcdir ;;
19199 esac
19200 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19201 # absolute.
19202 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19203 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
19204 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19205 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19206
19207
19208   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19209 echo "$as_me: executing $ac_dest commands" >&6;}
19210   case $ac_dest in
19211     default-1 )
19212
19213 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
19214 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
19215   rm -f intltool-extract.out
19216 else
19217   mv -f intltool-extract.out intltool-extract
19218 fi
19219 chmod ugo+x intltool-extract
19220 chmod u+w intltool-extract
19221
19222 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
19223 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
19224   rm -f intltool-merge.out
19225 else
19226   mv -f intltool-merge.out intltool-merge
19227 fi
19228 chmod ugo+x intltool-merge
19229 chmod u+w intltool-merge
19230
19231 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
19232 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
19233   rm -f intltool-update.out
19234 else
19235   mv -f intltool-update.out intltool-update
19236 fi
19237 chmod ugo+x intltool-update
19238 chmod u+w intltool-update
19239
19240  ;;
19241     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
19242         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
19243       esac ;;
19244   esac
19245 done
19246 _ACEOF
19247
19248 cat >>$CONFIG_STATUS <<\_ACEOF
19249
19250 { (exit 0); exit 0; }
19251 _ACEOF
19252 chmod +x $CONFIG_STATUS
19253 ac_clean_files=$ac_clean_files_save
19254
19255
19256 # configure is writing to config.log, and then calls config.status.
19257 # config.status does its own redirection, appending to config.log.
19258 # Unfortunately, on DOS this fails, as config.log is still kept open
19259 # by configure, so config.status won't be able to write to it; its
19260 # output is simply discarded.  So we exec the FD to /dev/null,
19261 # effectively closing config.log, so it can be properly (re)opened and
19262 # appended to by config.status.  When coming back to configure, we
19263 # need to make the FD available again.
19264 if test "$no_create" != yes; then
19265   ac_cs_success=:
19266   exec 5>/dev/null
19267   $SHELL $CONFIG_STATUS || ac_cs_success=false
19268   exec 5>>config.log
19269   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19270   # would make configure fail if this is the last instruction.
19271   $ac_cs_success || { (exit 1); exit 1; }
19272 fi
19273
19274
19275 ###############################################################################
19276 #
19277 #       Print some warnings at the end.
19278 #
19279 ###############################################################################
19280
19281 warn_prefix_1="    Warning:"
19282 warn_prefix_2="       Note:"
19283 warn_prefix="$warn_prefix_1"
19284
19285 warning=no
19286 warnsep='    #################################################################'
19287
19288 warnpre() {
19289   if test "$warning" = no ; then
19290     echo '' ; echo "$warnsep" ; echo ''
19291     warning=yes
19292   fi
19293 }
19294
19295 warn() {
19296   warnpre
19297   if test "$warning" = long ; then echo '' ; fi
19298   warning=yes
19299   rest="$@"
19300   echo "$warn_prefix $rest"
19301 }
19302
19303 warnL() {
19304   was=$warning
19305   warnpre
19306   warning=yes
19307   if test "$was" != no ; then echo '' ; fi
19308   rest="$@"
19309   echo "$warn_prefix $rest"
19310 }
19311
19312 warn2() {
19313   rest="$@"
19314   echo "             $rest"
19315   warning=long
19316 }
19317
19318 note() {
19319   warn_prefix="$warn_prefix_2"
19320   warn $@
19321   warn_prefix="$warn_prefix_1"
19322 }
19323
19324 noteL() {
19325   warn_prefix="$warn_prefix_2"
19326   warnL $@
19327   warn_prefix="$warn_prefix_1"
19328 }
19329
19330
19331 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
19332   warn 'The SGI saver extension was requested, but was not found.'
19333 fi
19334
19335 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
19336   warn 'The MIT saver extension was requested, but was not found.'
19337 fi
19338
19339 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
19340   warn 'The XIdle extension was requested, but was not found.'
19341 fi
19342
19343 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
19344   warn 'The XSHM extension was requested, but was not found.'
19345 fi
19346
19347 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
19348   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
19349 fi
19350
19351 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
19352   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
19353 fi
19354
19355 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
19356   warn 'The DPMS extension was requested, but was not found.'
19357 fi
19358
19359 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
19360   warn 'The Xinerama extension was requested, but was not found.'
19361 fi
19362
19363 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
19364   warn 'The XF86VMODE extension was requested, but was not found.'
19365 fi
19366
19367 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
19368   warn "Checking of /proc/interrupts was requested, but it's bogus."
19369 fi
19370
19371
19372 if test "$have_motif" = no -a "$have_gtk" = no; then
19373   warnL "Neither Motif nor Gtk seem to be available;"
19374   warn2 "the \`xscreensaver-demo' program requires one of these."
19375
19376 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
19377   warnL "Use of Motif was requested, but it wasn't found;"
19378   warn2 "Gtk will be used instead."
19379
19380 elif test "$jurassic_gtk" = yes ; then
19381
19382   pref_gtk=1.2
19383
19384   v="$ac_gtk_version_string"
19385   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
19386     warnL "Use of Gtk was requested, but its version number is unknown;"
19387   elif test "$with_gtk_req" = yes ; then
19388     warnL "Use of Gtk was requested, but it is version $v;"
19389   else
19390     warnL "Gtk was found on this system, but it is version $v;"
19391   fi
19392
19393   warn2 "Gtk $pref_gtk or newer is required.  Motif will be used instead."
19394
19395 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
19396   warnL "Use of Gtk was requested, but it wasn't found."
19397   if test "$have_motif" = yes; then
19398     warn2 "Motif will be used instead."
19399   fi
19400 fi
19401
19402 if test "$gtk2_halfassed" != no ; then
19403   warnL "GTK version $gtk2_halfassed was found, but at least one supporting"
19404   warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used."
19405   v="$ac_gtk_version_string"
19406   warn2 "GTK $v is also installed, so it will be used instead."
19407   warn2 "Please read the above output and the \`config.log' file"
19408   warn2 "for more details."
19409 fi
19410
19411
19412 if test "$with_gnome_req" = yes -a "$have_gnome" = no \
19413         -a "$have_gtk2" = no; then
19414   # don't issue this warning if we have GTK2 -- in that case, the
19415   # Gnome-specific code isn't needed.
19416   warn  'Use of the Gnome Control Panel was requested, but the necessary'
19417   warn2 'headers and/or libraries were not found.'
19418 fi
19419
19420 if test "$have_gtk" = yes ; then
19421   if test "$have_xml" = no ; then
19422     if test "$with_xml_req" = yes ; then
19423       warn  'Use of the XML library was requested, but the necessary'
19424       warn2 'headers and/or libraries were not found.'
19425     else
19426       warn  'GTK is being used, but the XML library was not found.'
19427     fi
19428
19429     if test "$xml_halfassed" = yes ; then
19430
19431       if test "$have_zlib" = yes ; then
19432         which="XML libraries"
19433       else
19434         which="\`zlib' library"
19435       fi
19436
19437       echo ''
19438       warn2 'More specifically, we found the headers, but not the'
19439       warn2 "$which; so either XML is half-installed on this"
19440       warn2 "system, or something else went wrong.  The \`config.log'"
19441       warn2 'file might contain some clues.'
19442     fi
19443
19444     echo ''
19445     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
19446     warn2 'will not be available.  Specify the location of the XML'
19447     warn2 'library through the --with-xml option to configure.'
19448   fi
19449 fi
19450
19451 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
19452   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
19453   warn2 "headers were not found.  That can't be good.  Please"
19454   warn2 "install the GDK-Pixbuf development kit and re-configure."
19455 fi
19456
19457 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
19458
19459   preferred_lesstif=0.92
19460
19461   if test "$lesstif_version" = unknown; then
19462     warnL "Unable to determine the LessTif version number!"
19463     warn2 "Make sure you are using version $preferred_lesstif or newer."
19464     warn2 "See <http://www.lesstif.org/>."
19465
19466   elif test \! $lesstif_version -gt 82; then
19467     warnL "LessTif version $lesstif_version_string is being used."
19468     warn2 "LessTif versions 0.82 and earlier are too buggy to"
19469     warn2 "use with XScreenSaver; it is strongly recommended"
19470     warn2 "that you upgrade to at least version $preferred_lesstif!"
19471     warn2 "See <http://www.lesstif.org/>."
19472   fi
19473 fi
19474
19475
19476 if test "$have_motif" = yes -a "$have_gtk" = no ; then
19477   warn  'Motif is being used, and GTK is not.'
19478   echo  ''
19479   warn2 'Though the Motif front-end to xscreensaver is still'
19480   warn2 'maintained, it is no longer being updated with new'
19481   warn2 'features: all new development on the xscreensaver-demo'
19482   warn2 'program is happening in the GTK version, and not in the'
19483   warn2 'Motif version.  It is recommended that you build against'
19484   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
19485 fi
19486
19487
19488 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
19489   warnL 'Use of XPM was requested, but it was not found.'
19490 fi
19491
19492 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
19493   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
19494 fi
19495
19496 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \
19497    test "$gdk_pixbuf_halfassed" = yes; then
19498
19499   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
19500     true
19501   elif test "$with_xpm_req" = no ; then
19502     warnL 'The XPM library is not being used.'
19503   else
19504     warnL 'The XPM library was not found.'
19505   fi
19506
19507   if test "$with_gdk_pixbuf_req" = yes ; then
19508     true
19509   elif test "$with_gdk_pixbuf_req" = no ; then
19510     warnL 'The GDK-Pixbuf library is not being used.'
19511   else
19512     warnL 'The GDK-Pixbuf library was not found.'
19513   fi
19514
19515   if test "$gdk_pixbuf_halfassed" = yes ; then
19516     echo ''
19517     warn2 'More specifically, we found the headers, but not the'
19518     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
19519     warn2 "system, or something else went wrong.  The \`config.log'"
19520     warn2 'file might contain some clues.'
19521   fi
19522
19523   echo ''
19524   warn2 'Some of the demos will not be as colorful as they'
19525   warn2 'could be.  You should consider installing Pixbuf or'
19526   warn2 'XPM and re-running configure.  The Pixbuf library is'
19527   warn2 'a part of GNOME.  The XPM library comes with most'
19528   warn2 'X11 installations; you can also find it at the X11'
19529   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
19530   echo  ''
19531   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
19532   warn2 'support for more image formats.'
19533 fi
19534
19535
19536 if test "$have_jpeg" = no ; then
19537   if test "$with_jpeg_req" = yes ; then
19538     warnL 'Use of libjpeg was requested, but it was not found.'
19539   elif test "$with_jpeg_req" = no ; then
19540     noteL 'The JPEG library is not being used.'
19541   else
19542     noteL 'The JPEG library was not found.'
19543   fi
19544
19545   if test "$jpeg_halfassed" = yes ; then
19546     echo ''
19547     warn2 'More specifically, we found the headers, but not the'
19548     warn2 'library; so either JPEG is half-installed on this'
19549     warn2 "system, or something else went wrong.  The \`config.log'"
19550     warn2 'file might contain some clues.'
19551     echo ''
19552   fi
19553
19554   if test "$have_gdk_pixbuf" = no ; then
19555     warn2 "This means that it won't be possible for the image-manipulating"
19556     warn2 "display modes to load files from disk; and it also means that"
19557     warn2 "the \`webcollage' program will be much slower."
19558   else
19559     warn2 "This means the \`webcollage' program will be much slower."
19560   fi
19561 fi
19562
19563
19564 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
19565   preferred_mesagl=3.4
19566   mgv="$ac_mesagl_version_string"
19567   pgl="$preferred_mesagl"
19568
19569   if test "$ac_mesagl_version" = unknown; then
19570     warnL "Unable to determine the MesaGL version number!"
19571     warn2 "Make sure you are using version $preferred_mesagl or newer."
19572
19573   elif test \! "$ac_mesagl_version" -gt 2006; then
19574     warnL "MesaGL version number is $mgv --"
19575     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
19576     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
19577
19578   elif test \! "$ac_mesagl_version" -gt 3003; then
19579     warnL "MesaGL version number is $mgv --"
19580     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
19581     warn2 "that you upgrade to $pgl or newer."
19582   fi
19583 fi
19584
19585 if test "$have_gl" = no ; then
19586   if test "$with_gl_req" = yes ; then
19587     warnL 'Use of GL was requested, but it was not found.'
19588   elif test "$with_gl_req" = no ; then
19589     noteL 'The OpenGL 3D library is not being used.'
19590   else
19591     noteL 'The OpenGL 3D library was not found.'
19592   fi
19593
19594   if test "$gl_halfassed" = yes ; then
19595     echo ''
19596     warn2 'More specifically, we found the headers, but not the'
19597     warn2 'libraries; so either GL is half-installed on this'
19598     warn2 "system, or something else went wrong.  The \`config.log'"
19599     warn2 'file might contain some clues.'
19600   fi
19601
19602   echo ''
19603   warn2 'Those demos which use 3D will not be built or installed.'
19604   warn2 'You might want to consider installing OpenGL and'
19605   warn2 "re-running configure.  If your vendor doesn't ship"
19606   warn2 'their own implementation of OpenGL, you can get a free'
19607   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
19608   warn2 'info, see <http://www.opengl.org/>.'
19609
19610 fi
19611
19612
19613 if test "$have_gl" = yes -a "$have_gle" = no ; then
19614
19615  # nobody cares about this; don't print the warning unless it was
19616  # requested and not found, or halfway-found.
19617  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
19618
19619   if test "$with_gle_req" = yes ; then
19620     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
19621     warn2 'it was not found (though the OpenGL library was found, and'
19622     warn2 'is being used.)'
19623   elif test "$with_gle_req" = no ; then
19624     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
19625     warn2 'library is not.'
19626   else
19627     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
19628     warn2 'was not.'
19629   fi
19630
19631   if test "$gle_halfassed" = yes ; then
19632     echo ''
19633     warn2 'More specifically, we found the headers, but not the'
19634     warn2 'libraries; so either GLE is half-installed on this'
19635     warn2 "system, or something else went wrong.  The \`config.log'"
19636     warn2 'file might contain some clues.'
19637   fi
19638
19639   echo ''
19640   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
19641   warn2 'will not be built or installed.  You might want to consider'
19642   warn2 'installing GLE and re-running configure.  You can find the'
19643   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
19644   warn2 'OpenGL info, see <http://www.opengl.org/>.'
19645
19646  fi
19647 fi
19648
19649
19650 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
19651   warn 'Use of XReadDisplay was requested, but it was not found.'
19652 fi
19653
19654 if test -n "$with_fortune_req"; then
19655   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
19656     warnL "$with_fortune_req was requested as the Fortune program,"
19657     warn2 "but was not found.  The default will be used instead."
19658   fi
19659 fi
19660
19661 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
19662   warn 'Use of Kerberos was requested, but it was not found.'
19663 fi
19664
19665 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
19666   warn 'Use of PAM was requested, but it was not found.'
19667 fi
19668
19669 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
19670   warn 'Use of shadow passwords was requested, but they were not found.'
19671 fi
19672
19673
19674 # You are in a twisty maze of namespaces and syntaxes, all alike.
19675 # Fuck the skull of Unix.
19676 #
19677 eval bindir=${bindir}
19678 eval bindir=${bindir}
19679 eval bindir=${bindir}
19680 eval bindir=${bindir}
19681 eval bindir=${bindir}
19682 eval bindir=${bindir}
19683 eval HACKDIR=${HACKDIR}
19684 eval HACKDIR=${HACKDIR}
19685 eval HACKDIR=${HACKDIR}
19686 eval HACKDIR=${HACKDIR}
19687 eval HACKDIR=${HACKDIR}
19688 eval HACKDIR=${HACKDIR}
19689 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19690 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19691 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19692 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19693 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19694 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19695
19696 # canonicalize slashes.
19697 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
19698 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
19699 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19700
19701
19702 # Sanity check the hackdir
19703 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
19704   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
19705     echo ""
19706     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
19707                    There will be an executable installed with that name, so
19708                    that can't be the name of a directory as well.  Please
19709                    re-configure with a different directory name." >&5
19710 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
19711                    There will be an executable installed with that name, so
19712                    that can't be the name of a directory as well.  Please
19713                    re-configure with a different directory name." >&2;}
19714    { (exit 1); exit 1; }; }
19715   fi
19716 done
19717
19718
19719 do_dir_warning=no
19720
19721 # Now let's see if there's a previous RPM version already installed.  Blargh!
19722
19723 # M4 sucks!!
19724
19725 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
19726       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
19727
19728
19729 if test \! -z "$rpmv" ; then
19730   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
19731   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
19732
19733   warning=no
19734   warnL "There is already an installed RPM of xscreensaver $rpmv"
19735   warn2 "on this system.  You might want to remove it (with"
19736   warn2 '"rpm -ve xscreensaver") before running "make install"'
19737   warn2 "from this directory."
19738   echo ""
19739   warn2 "Alternately, you could build this version of xscreensaver"
19740   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
19741   warn2 "file is included.  See the RPM documentation for more info."
19742   echo ""
19743
19744   if test "$rpmbdir" = "$rpmhdir" ; then
19745     warn2 "The RPM version was installed in $rpmbdir/."
19746   else
19747     warn2 "The RPM version was installed in $rpmbdir/,"
19748     warn2 "with demos in $rpmhdir/."
19749   fi
19750
19751   do_dir_warning=yes
19752 fi
19753
19754
19755 if test "${bindir}" = "${HACKDIR}" ; then
19756   do_dir_warning=yes
19757 fi
19758
19759 if test "$do_dir_warning" = yes; then
19760   echo ""
19761   echo "$warnsep"
19762   echo ""
19763   echo '      When you run "make install", the "xscreensaver",'
19764   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
19765   echo "      will be installed in ${bindir}/."
19766   echo ""
19767   echo "      The various graphics demos (160+ different executables) will"
19768   echo "      be installed in ${HACKDIR}/."
19769   echo ""
19770   echo "      If you would prefer the demos to be installed elsewhere,"
19771   echo "      you should re-run configure with the --with-hackdir=DIR"
19772   echo "      option.  For more information, run \`./configure --help'."
19773   warning=yes
19774 fi
19775
19776 if test "$warning" != no; then
19777   echo '' ; echo "$warnsep" ; echo ''
19778 fi
19779
19780 if test "$do_dir_warning" = no; then
19781   if test "$warning" = no; then
19782     echo ''
19783   fi
19784   echo "User programs will be installed in ${bindir}/"
19785   echo "Screen savers will be installed in ${HACKDIR}/"
19786   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
19787   echo ''
19788 fi